qf-taro-echarts
Version:
为易观千帆taro项目开发,适用于Taro项目的ECharts图表组件
2 lines • 442 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),r&&(i.ie=!0,i.version=r[1]),a&&(i.edge=!0,i.version=a[1]),o&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}function i(t,e){"createCanvas"===t&&(Pg=null),Dg[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=bg.call(t);if("[object Array]"===i){if(!B(t)){e=[];for(var r=0,a=t.length;a>r;r++)e[r]=n(t[r])}}else if(wg[i]){if(!B(t)){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var r=0,a=t.length;a>r;r++)e[r]=n(t[r])}}}else if(!_g[i]&&!B(t)&&!C(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function r(t,e,i){if(!S(e)||!S(t))return i?n(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],s=e[a];!S(s)||!S(o)||_(s)||_(o)||C(s)||C(o)||M(s)||M(o)||B(s)||B(o)?!i&&a in t||(t[a]=n(e[a],!0)):r(o,s,i)}return t}function a(t,e){for(var i=t[0],n=1,a=t.length;a>n;n++)i=r(i,t[n],e);return i}function o(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return Pg||(Pg=kg().getContext("2d")),Pg}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===Mg)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===Tg)return t.map(e,i);for(var n=[],r=0,a=t.length;a>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===Ag)return t.reduce(e,i,n);for(var r=0,a=t.length;a>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===Ig)return t.filter(e,i);for(var n=[],r=0,a=t.length;a>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=Cg.call(arguments,2);return function(){return t.apply(e,i.concat(Cg.call(arguments)))}}function x(t){var e=Cg.call(arguments,1);return function(){return t.apply(this,e.concat(Cg.call(arguments)))}}function _(t){return"[object Array]"===bg.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===bg.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!_g[bg.call(t)]}function I(t){return!!wg[bg.call(t)]}function C(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function T(t){return t!==t}function A(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function D(t,e){return null!=t?t:e}function k(t,e,i){return null!=t?t:null!=e?e:i}function P(){return Function.call.apply(Cg,arguments)}function L(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function O(t,e){if(!t)throw new Error(e)}function z(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function E(t){t[Lg]=!0}function B(t){return t[Lg]}function R(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=_(t);this.data={};var n=this;t instanceof R?t.each(e):t&&f(t,e)}function N(t){return new R(t)}function F(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var r=t.length;for(n=0;n<e.length;n++)i[n+r]=e[n];return i}function V(){}function G(t,e){var i=new zg(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function W(t,e){return t[0]=e[0],t[1]=e[1],t}function H(t){var e=new zg(2);return e[0]=t[0],e[1]=t[1],e}function Z(t,e,i){return t[0]=e,t[1]=i,t}function X(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function Y(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function U(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function q(t){return Math.sqrt(j(t))}function j(t){return t[0]*t[0]+t[1]*t[1]}function K(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function $(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function Q(t,e){return t[0]*e[0]+t[1]*e[1]}function J(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function te(t,e){var i=q(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function ee(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function ie(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function ne(t,e){return t[0]=-e[0],t[1]=-e[1],t}function re(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function ae(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function oe(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function se(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function le(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function ue(t,e){return{target:t,topTarget:e&&e.topTarget}}function he(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}function ce(t,e,i,n,r,a){var o=t._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!e)return t;i=he(t,i),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:r||t,callAtLast:n.zrEventfulCallAtLast},u=o[e].length-1,h=o[e][u];return h&&h.callAtLast?o[e].splice(u,0,l):o[e].push(l),t}function de(t,e,i,n,r,a){var o=n+"-"+r,s=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/Wg);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;s>d;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[i][d]*de(t,e-1,h,u,r|p,a),f++)}return a[o]=c,c}function fe(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},r=de(i,8,0,0,0,n);if(0!==r){for(var a=[],o=0;8>o;o++)for(var s=0;8>s;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*de(i,7,0===o?1:0,1<<o,1<<s,n)/r*e[o];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}function pe(t,e,i,n,r){return ge(Zg,e,n,r,!0)&&ge(t,i,Zg[0],Zg[1])}function ge(t,e,i,n,r){if(e.getBoundingClientRect&&xg.domSupported&&!ye(e)){var a=e[Hg]||(e[Hg]={}),o=ve(e,a),s=me(o,a,r);if(s)return s(t,i,n),!0}return!1}function ve(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],r=["top","bottom"],a=0;4>a;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}function me(t,e,i){for(var n=i?"invTrans":"trans",r=e[n],a=e.srcCoords,o=!0,s=[],l=[],u=0;4>u;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),o=o&&a&&d===a[c]&&f===a[c+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&r?r:(e.srcCoords=s,e[n]=i?fe(l,s):fe(s,l))}function ye(t){return"CANVAS"===t.nodeName.toUpperCase()}function xe(t,e,i,n){return i=i||{},n||!xg.canvasSupported?_e(t,e,i):xg.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):_e(t,e,i),i}function _e(t,e,i){if(xg.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(ye(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(ge(Ug,t,n,r))return i.zrX=Ug[0],void(i.zrY=Ug[1])}i.zrX=i.zrY=0}function we(t){return t||window.event}function be(t,e,i){if(e=we(e),null!=e.zrX)return e;var n=e.type,r=n&&n.indexOf("touch")>=0;if(r){var a="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];a&&xe(t,a,e,i)}else xe(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&Yg.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Se(t,e,i,n){Xg?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}function Me(t,e,i,n){Xg?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)}function Ie(t){return 2===t.which||3===t.which}function Ce(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function Te(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Ae(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:De}}function De(){qg(this.event)}function ke(){}function Pe(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return n?$g:!0}return!1}function Le(t,e,i){var n=t.painter;return 0>e||e>n.getWidth()||0>i||i>n.getHeight()}function Oe(){var t=new tv(6);return ze(t),t}function ze(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Ee(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Be(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Re(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Ne(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function Fe(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t}function Ve(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null}function Ge(t){var e=Oe();return Ee(e,t),e}function We(t){return t>nv||-nv>t}function He(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Ze(t){return t=Math.round(t),0>t?0:t>255?255:t}function Xe(t){return t=Math.round(t),0>t?0:t>360?360:t}function Ye(t){return 0>t?0:t>1?1:t}function Ue(t){return Ze(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function qe(t){return Ye(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function je(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function Ke(t,e,i){return t+(e-t)*i}function $e(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function Qe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Je(t,e){mv&&Qe(mv,e),mv=vv.put(t,mv||e.slice())}function ti(t,e){if(t){e=e||[];var i=vv.get(t);if(i)return Qe(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in gv)return Qe(e,gv[n]),Je(t,e),e;if("#"!==n.charAt(0)){var r=n.indexOf("("),a=n.indexOf(")");if(-1!==r&&a+1===n.length){var o=n.substr(0,r),s=n.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void $e(e,0,0,0,1);l=qe(s.pop());case"rgb":return 3!==s.length?void $e(e,0,0,0,1):($e(e,Ue(s[0]),Ue(s[1]),Ue(s[2]),l),Je(t,e),e);case"hsla":return 4!==s.length?void $e(e,0,0,0,1):(s[3]=qe(s[3]),ei(s,e),Je(t,e),e);case"hsl":return 3!==s.length?void $e(e,0,0,0,1):(ei(s,e),Je(t,e),e);default:return}}$e(e,0,0,0,1)}else{if(4===n.length){var u=parseInt(n.substr(1),16);return u>=0&&4095>=u?($e(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Je(t,e),e):void $e(e,0,0,0,1)}if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&16777215>=u?($e(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Je(t,e),e):void $e(e,0,0,0,1)}}}}function ei(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=qe(t[1]),r=qe(t[2]),a=.5>=r?r*(n+1):r+n-r*n,o=2*r-a;return e=e||[],$e(e,Ze(255*je(o,a,i+1/3)),Ze(255*je(o,a,i)),Ze(255*je(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ii(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+o):l/(2-s-o);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:a===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function ni(t,e){var i=ti(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return ui(i,4===i.length?"rgba":"rgb")}}function ri(t){var e=ti(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function ai(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=e[r],s=e[a],l=n-r;return i[0]=Ze(Ke(o[0],s[0],l)),i[1]=Ze(Ke(o[1],s[1],l)),i[2]=Ze(Ke(o[2],s[2],l)),i[3]=Ye(Ke(o[3],s[3],l)),i}}function oi(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=ti(e[r]),s=ti(e[a]),l=n-r,u=ui([Ze(Ke(o[0],s[0],l)),Ze(Ke(o[1],s[1],l)),Ze(Ke(o[2],s[2],l)),Ye(Ke(o[3],s[3],l))],"rgba");return i?{color:u,leftIndex:r,rightIndex:a,value:n}:u}}function si(t,e,i,n){return t=ti(t),t?(t=ii(t),null!=e&&(t[0]=Xe(e)),null!=i&&(t[1]=qe(i)),null!=n&&(t[2]=qe(n)),ui(ei(t),"rgba")):void 0}function li(t,e){return t=ti(t),t&&null!=e?(t[3]=Ye(e),ui(t,"rgba")):void 0}function ui(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(i+=","+t[3]),e+"("+i+")"}}function hi(t,e){return t[e]}function ci(t,e,i){t[e]=i}function di(t,e,i){return(e-t)*i+t}function fi(t,e,i){return i>.5?e:t}function pi(t,e,i,n,r){var a=t.length;if(1===r)for(var o=0;a>o;o++)n[o]=di(t[o],e[o],i);else for(var s=a&&t[0].length,o=0;a>o;o++)for(var l=0;s>l;l++)n[o][l]=di(t[o][l],e[o][l],i)}function gi(t,e,i){var n=t.length,r=e.length;if(n!==r){var a=n>r;if(a)t.length=r;else for(var o=n;r>o;o++)t.push(1===i?e[o]:wv.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;o<t.length;o++)if(1===i)isNaN(t[o])&&(t[o]=e[o]);else for(var l=0;s>l;l++)isNaN(t[o][l])&&(t[o][l]=e[o][l])}function vi(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var a=t[0].length,r=0;n>r;r++)for(var o=0;a>o;o++)if(t[r][o]!==e[r][o])return!1;return!0}function mi(t,e,i,n,r,a,o,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=yi(t[h],e[h],i[h],n[h],r,a,o);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=yi(t[h][d],e[h][d],i[h][d],n[h][d],r,a,o)}function yi(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function xi(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(wv.call(t[n]));return i}return wv.call(t)}return t}function _i(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function wi(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function bi(t,e,i,n,r,a){var o=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,f=d(c),p=!1,g=!1,v=f?wi(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var m=[],y=[],x=n[0].value,_=!0,w=0;u>w;w++){m.push(n[w].time/h);var b=n[w].value;if(f&&vi(b,x,v)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var S=ti(b);S?(b=S,p=!0):g=!0}y.push(b)}if(a||!_){for(var M=y[u-1],w=0;u-1>w;w++)f?gi(y[w],M,v):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&gi(o(t._target,r),M,v);var I,C,T,A,D,k,P=0,L=0;if(p)var O=[0,0,0,0];var z=function(t,e){var i;if(0>e)i=0;else if(L>e){for(I=Math.min(P+1,u-1),i=I;i>=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=P;u>i&&!(m[i]>e);i++);i=Math.min(i-1,u-2)}P=i,L=e;var n=m[i+1]-m[i];if(0!==n)if(C=(e-m[i])/n,l)if(A=y[i],T=y[0===i?i:i-1],D=y[i>u-2?u-1:i+1],k=y[i>u-3?u-1:i+2],f)mi(T,A,D,k,C,C*C,C*C*C,o(t,r),v);else{var a;if(p)a=mi(T,A,D,k,C,C*C,C*C*C,O,1),a=_i(O);else{if(g)return fi(A,D,C);a=yi(T,A,D,k,C,C*C,C*C*C)}s(t,r,a)}else if(f)pi(y[i],y[i+1],C,o(t,r),v);else{var a;if(p)pi(y[i],y[i+1],C,O,1),a=_i(O);else{if(g)return fi(y[i],y[i+1],C);a=di(y[i],y[i+1],C)}s(t,r,a)}},E=new He({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:z,ondestroy:i});return e&&"spline"!==e&&(E.easing=e),E}}}function Si(t,e,i,n,r,a,o,s){function l(){h--,h||a&&a()}b(n)?(a=r,r=n,n=0):w(r)?(a=r,r="linear",n=0):w(n)?(a=n,n=0):w(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),Mi(t,"",t,e,i,n,s);var u=t.animators.slice(),h=u.length;h||a&&a();for(var c=0;c<u.length;c++)u[c].done(l).start(r,o)}function Mi(t,e,i,n,r,a,o){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?S(n[u])&&!d(n[u])?Mi(t,e?e+"."+u:u,i[u],n[u],r,a,o):(o?(s[u]=i[u],Ii(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||o||Ii(t,e,u,n[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function Ii(t,e,i,n){if(e){var r={};r[e]={},r[e][i]=n,t.attr(r)}else t.attr(i,n)}function Ci(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function Ti(t){for(var e=0;t>=zv;)e|=1&t,t>>=1;return t+e}function Ai(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;i>r&&n(t[r],t[r-1])<0;)r++;Di(t,e,r)}else for(;i>r&&n(t[r],t[r-1])>=0;)r++;return r-e}function Di(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function ki(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var a,o=t[n],s=e,l=n;l>s;)a=s+l>>>1,r(o,t[a])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function Pi(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;s>l&&a(t,e[i+r+l])>0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;s>l&&a(t,e[i+r-l])<=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[i+h])>0?o=h+1:l=h}return l}function Li(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;s>l&&a(t,e[i+r-l])<0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=n-r;s>l&&a(t,e[i+r+l])>=0;)o=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;l>o;){var h=o+(l-o>>>1);a(t,e[i+h])<0?l=h:o=h+1}return l}function Oi(t,e){function i(t,e){l[c]=t,u[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]<u[t+1]&&t--;else if(u[t]>u[t+1])break;a(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]<u[t+1]&&t--,a(t)}}function a(i){var n=l[i],r=u[i],a=l[i+1],h=u[i+1];u[i]=r+h,i===c-3&&(l[i+1]=l[i+2],u[i+1]=u[i+2]),c--;var d=Li(t[a],t,n,r,0,e);n+=d,r-=d,0!==r&&(h=Pi(t[n+r-1],t,a,h,h-1,e),0!==h&&(h>=r?o(n,r,a,h):s(n,r,a,h)))}function o(i,n,r,a){var o=0;for(o=0;n>o;o++)d[o]=t[i+o];var s=0,l=r,u=i;if(t[u++]=t[l++],0!==--a){if(1===n){for(o=0;a>o;o++)t[u+o]=t[l+o];return void(t[u+a]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--a){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=Li(t[l],d,s,n,0,e),0!==c){for(o=0;c>o;o++)t[u+o]=d[s+o];if(u+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[u++]=t[l++],0===--a){p=!0;break}if(f=Pi(d[s],t,l,a,0,e),0!==f){for(o=0;f>o;o++)t[u+o]=t[l+o];if(u+=f,l+=f,a-=f,0===a){p=!0;break}}if(t[u++]=d[s++],1===--n){p=!0;break}g--}while(c>=Ev||f>=Ev);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===n){for(o=0;a>o;o++)t[u+o]=t[l+o];t[u+a]=d[s]}else{if(0===n)throw new Error;for(o=0;n>o;o++)t[u+o]=d[s+o]}}else for(o=0;n>o;o++)t[u+o]=d[s+o]}function s(i,n,r,a){var o=0;for(o=0;a>o;o++)d[o]=t[r+o];var s=i+n-1,l=a-1,u=r+a-1,c=0,f=0;if(t[u--]=t[s--],0!==--n){if(1===a){for(u-=n,s-=n,f=u+1,c=s+1,o=n-1;o>=0;o--)t[f+o]=t[c+o];return void(t[u]=d[l])}for(var p=h;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--n){m=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--a){m=!0;break}while(p>(g|v));if(m)break;do{if(g=n-Li(d[l],t,i,n,n-1,e),0!==g){for(u-=g,s-=g,n-=g,f=u+1,c=s+1,o=g-1;o>=0;o--)t[f+o]=t[c+o];if(0===n){m=!0;break}}if(t[u--]=d[l--],1===--a){m=!0;break}if(v=a-Pi(t[s],d,0,a,a-1,e),0!==v){for(u-=v,l-=v,a-=v,f=u+1,c=l+1,o=0;v>o;o++)t[f+o]=d[c+o];if(1>=a){m=!0;break}}if(t[u--]=t[s--],0===--n){m=!0;break}p--}while(g>=Ev||v>=Ev);if(m)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===a){for(u-=n,s-=n,f=u+1,c=s+1,o=n-1;o>=0;o--)t[f+o]=t[c+o];t[u]=d[l]}else{if(0===a)throw new Error;for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}}else for(c=u-(a-1),o=0;a>o;o++)t[c+o]=d[o]}var l,u,h=Ev,c=0,d=[];l=[],u=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function zi(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(2>r)){var a=0;if(zv>r)return a=Ai(t,i,n,e),void ki(t,i,n,i+a,e);var o=new Oi(t,e),s=Ti(r);do{if(a=Ai(t,i,n,e),s>a){var l=r;l>s&&(l=s),ki(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}function Ei(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Bi(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o;var s=t.createLinearGradient(n,a,r,o);return s}function Ri(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(o=o*n+i.x,s=s*r+i.y,l*=a);var u=t.createRadialGradient(o,s,0,o,s,l);return u}function Ni(){return!1}function Fi(t,e,i){var n=kg(),r=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=a*i,n}function Vi(t){if("string"==typeof t){var e=jv.get(t);return e&&e.image}return t}function Gi(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=jv.get(t),o={hostEl:i,cb:n,cbPayload:r};return a?(e=a.image,!Hi(e)&&a.pending.push(o)):(e=new Image,e.onload=e.onerror=Wi,jv.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Wi(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Hi(t){return t&&t.width&&t.height}function Zi(t,e){e=e||tm;var i=t+":"+e;if(Kv[i])return Kv[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;o>a;a++)r=Math.max(nn(n[a],e).width,r);return $v>Qv&&($v=0,Kv={}),$v++,Kv[i]=r,r}function Xi(t,e,i,n,r,a,o,s){return o?Ui(t,e,i,n,r,a,o,s):Yi(t,e,i,n,r,a,s)}function Yi(t,e,i,n,r,a,o){var s=rn(t,e,r,a,o),l=Zi(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=qi(0,l,i),c=ji(0,u,n),d=new Ci(h,c,l,u);return d.lineHeight=s.lineHeight,d}function Ui(t,e,i,n,r,a,o,s){var l=an(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:r,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=qi(0,u,i),d=ji(0,h,n);return new Ci(c,d,u,h)}function qi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function ji(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Ki(t,e,i){var n=e.textPosition,r=e.textDistance,a=i.x,o=i.y;r=r||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=r,o+=u,h="right",c="middle";break;case"right":a+=r+l,o+=u,c="middle";break;case"top":a+=l/2,o-=r,h="center",c="bottom";break;case"bottom":a+=l/2,o+=s+r,h="center";break;case"inside":a+=l/2,o+=u,h="center",c="middle";break;case"insideLeft":a+=r,o+=u,c="middle";break;case"insideRight":a+=l-r,o+=u,h="right",c="middle";break;case"insideTop":a+=l/2,o+=r,h="center";break;case"insideBottom":a+=l/2,o+=s-r,h="center",c="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,h="right";break;case"insideBottomLeft":a+=r,o+=s-r,c="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,h="right",c="bottom"}return t=t||{},t.x=a,t.y=o,t.textAlign=h,t.textVerticalAlign=c,t}function $i(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=Qi(e,i,n,r);for(var o=0,s=a.length;s>o;o++)a[o]=Ji(a[o],r);return a.join("\n")}function Qi(t,e,i,n){n=o({},n),n.font=e;var i=D(i,"...");n.maxIterations=D(n.maxIterations,2);var r=n.minChar=D(n.minChar,0);n.cnCharWidth=Zi("国",e);var a=n.ascCharWidth=Zi("a",e);n.placeholder=D(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=a;l++)s-=a;var u=Zi(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Ji(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=Zi(t,n);if(i>=a)return t;for(var o=0;;o++){if(r>=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?tn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,s),a=Zi(t,n)}return""===t&&(t=e.placeholder),t}function tn(t,e,i,n){for(var r=0,a=0,o=t.length;o>a&&e>r;a++){var s=t.charCodeAt(a);r+=s>=0&&127>=s?i:n}return a}function en(t){return Zi("国",t)}function nn(t,e){return em.measureText(t,e)}function rn(t,e,i,n,r){null!=t&&(t+="");var a=D(n,en(e)),o=t?t.split("\n"):[],s=o.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&r){u=!1;var h=r.outerHeight,c=r.outerWidth;if(null!=h&&l>h)t="",o=[];else if(null!=c)for(var d=Qi(c-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;p>f;f++)o[f]=Ji(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function an(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=Jv.lastIndex=0;null!=(n=Jv.exec(t));){var a=n.index;a>r&&on(i,t.substring(r,a)),on(i,n[2],n[1]),r=Jv.lastIndex}r<t.length&&on(i,t.substring(r,t.length));var o=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<o.length;p++){for(var g=o[p],v=0,m=0,y=0;y<g.tokens.length;y++){var x=g.tokens[y],_=x.styleName&&e.rich[x.styleName]||{},w=x.textPadding=_.textPadding,b=x.font=_.font||e.font,S=x.textHeight=D(_.textHeight,en(b));if(w&&(S+=w[0]+w[2]),x.height=S,x.lineHeight=k(_.textLineHeight,e.textLineHeight,S),x.textAlign=_&&_.textAlign||e.textAlign,x.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+x.lineHeight>f)return{lines:[],width:0,height:0};x.textWidth=Zi(x.text,b);var M=_.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))x.percentWidth=M,u.push(x),M=0;else{if(I){M=x.textWidth;var C=_.textBackgroundColor,T=C&&C.image;T&&(T=Vi(T),Hi(T)&&(M=Math.max(M,T.width*S/T.height)))}var A=w?w[1]+w[3]:0;M+=A;var P=null!=d?d-m:null;null!=P&&M>P&&(!I||A>P?(x.text="",x.textWidth=M=0):(x.text=$i(x.text,P-A,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=Zi(x.text,b),M=x.textWidth+A))}m+=x.width=M,_&&(v=Math.max(v,x.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}i.outerWidth=i.width=D(e.textWidth,l),i.outerHeight=i.height=D(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(var p=0;p<u.length;p++){var x=u[p],L=x.percentWidth;x.width=parseInt(L,10)/100*l}return i}function on(t,e,i){for(var n=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:i,text:s,isLineHolder:!s&&!n};if(o)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||n)&&u.push(l)}}}function sn(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&z(e)||t.textFont||t.font}function ln(t,e){var i,n,r,a,o=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(o+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=r=a=h:h instanceof Array?1===h.length?i=n=r=a=h[0]:2===h.length?(i=r=h[0],n=a=h[1]):3===h.length?(i=h[0],n=a=h[1],r=h[2]):(i=h[0],n=h[1],r=h[2],a=h[3]):i=n=r=a=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+a>l&&(c=r+a,r*=l/c,a*=l/c),n+r>u&&(c=n+r,n*=u/c,r*=u/c),i+a>u&&(c=i+a,i*=u/c,a*=u/c),t.moveTo(o+i,s),t.lineTo(o+l-n,s),0!==n&&t.arc(o+l-n,s+n,n,-Math.PI/2,0),t.lineTo(o+l,s+u-r),0!==r&&t.arc(o+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(o+a,s+u),0!==a&&t.arc(o+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+i),0!==i&&t.arc(o+i,s+i,i,Math.PI,1.5*Math.PI)}function un(t){return hn(t),f(t.rich,hn),t}function hn(t){if(t){t.font=sn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||nm[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||rm[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=L(t.textPadding))}}function cn(t,e,i,n,r,a){n.rich?fn(t,e,i,n,r,a):dn(t,e,i,n,r,a)}function dn(t,e,i,n,r,a){var o,s=mn(n),l=!1,u=e.__attrCachedBy===Fv.PLAIN_TEXT;a!==Vv?(a&&(o=a.style,l=!s&&u&&o),e.__attrCachedBy=s?Fv.NONE:Fv.PLAIN_TEXT):u&&(e.__attrCachedBy=Fv.NONE);var h=n.font||im;l&&h===(o.font||im)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=rn(i,c,d,f,n.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=_n(sm,t,n,r),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;gn(e,n,r,x,_);var S=ji(_,g,b),M=x,I=S;if(s||d){var C=Zi(i,c),T=C;d&&(T+=d[1]+d[3]);var A=qi(x,T,w);s&&yn(t,e,n,A,S,T,g),d&&(M=In(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var D=0;D<am.length;D++){var k=am[D],P=k[0],L=k[1],O=n[P];l&&O===o[P]||(e[L]=Nv(e,L,O||k[2]))}I+=m/2;var z=n.textStrokeWidth,E=l?o.textStrokeWidth:null,B=!l||z!==E,R=!l||B||n.textStroke!==o.textStroke,N=bn(n.textStroke,z),F=Sn(n.textFill);if(N&&(B&&(e.lineWidth=z),R&&(e.strokeStyle=N)),F&&(l&&n.textFill===o.textFill||(e.fillStyle=F)),1===v.length)N&&e.strokeText(v[0],M,I),F&&e.fillText(v[0],M,I);else for(var D=0;D<v.length;D++)N&&e.strokeText(v[D],M,I),F&&e.fillText(v[D],M,I),I+=m}function fn(t,e,i,n,r,a){a!==Vv&&(e.__attrCachedBy=Fv.NONE);var o=t.__textCotentBlock;(!o||t.__dirtyText)&&(o=t.__textCotentBlock=an(i,n)),pn(t,e,o,n,r)}function pn(t,e,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=_n(sm,t,n,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;gn(e,n,r,h,c);var p=qi(h,o,d),g=ji(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+a;mn(n)&&yn(t,e,n,p,g,o,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,C=0,T=v,A=y,D=S-1;S>C&&(_=b[C],!_.textAlign||"left"===_.textAlign);)vn(t,e,_,n,M,m,T,"left"),I-=_.width,T+=_.width,C++;for(;D>=0&&(_=b[D],"right"===_.textAlign);)vn(t,e,_,n,M,m,A,"right"),I-=_.width,A-=_.width,D--;for(T+=(a-(T-v)-(y-A)-I)/2;D>=C;)_=b[C],vn(t,e,_,n,M,m,T+_.width/2,"center"),T+=_.width,C++;m+=M}}function gn(t,e,i,n,r){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,r=i.height/2+i.y):a&&(n=a[0]+i.x,r=a[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function vn(t,e,i,n,r,a,o,s){var l=n.rich[i.styleName]||{};
l.text=i.text;var u=i.textVerticalAlign,h=a+r/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+r-i.height/2),!i.isLineHolder&&mn(l)&&yn(t,e,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=In(o,s,c),h-=i.height/2-c[2]-i.textHeight/2),wn(e,"shadowBlur",k(l.textShadowBlur,n.textShadowBlur,0)),wn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),wn(e,"shadowOffsetX",k(l.textShadowOffsetX,n.textShadowOffsetX,0)),wn(e,"shadowOffsetY",k(l.textShadowOffsetY,n.textShadowOffsetY,0)),wn(e,"textAlign",s),wn(e,"textBaseline","middle"),wn(e,"font",i.font||im);var d=bn(l.textStroke||n.textStroke,p),f=Sn(l.textFill||n.textFill),p=D(l.textStrokeWidth,n.textStrokeWidth);d&&(wn(e,"lineWidth",p),wn(e,"strokeStyle",d),e.strokeText(i.text,o,h)),f&&(wn(e,"fillStyle",f),e.fillText(i.text,o,h))}function mn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function yn(t,e,i,n,r,a,o){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=b(s);if(wn(e,"shadowBlur",i.textBoxShadowBlur||0),wn(e,"shadowColor",i.textBoxShadowColor||"transparent"),wn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),wn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?ln(e,{x:n,y:r,width:a,height:o,r:c}):e.rect(n,r,a,o),e.closePath()}if(h)if(wn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(S(s)){var f=s.image;f=Gi(f,null,t,xn,s),f&&Hi(f)&&e.drawImage(f,n,r,a,o)}if(l&&u)if(wn(e,"lineWidth",l),wn(e,"strokeStyle",u),null!=i.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function xn(t,e){e.image=t}function _n(t,e,i,n){var r=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)r=n.x+Mn(l[0],n.width),a=n.y+Mn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(om,i,n):Ki(om,i,n);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(r+=h[0],a+=h[1])}return t=t||{},t.baseX=r,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function wn(t,e,i){return t[e]=Nv(t,e,i),t[e]}function bn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Sn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Mn(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function In(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Cn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Tn(t){t=t||{},Dv.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Wv(t.style,this),this._rect=null,this.__clipPaths=null}function An(t){Tn.call(this,t)}function Dn(t){return parseInt(t,10)}function kn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Pn(t,e,i){return pm.copy(t.getBoundingRect()),t.transform&&pm.applyTransform(t.transform),gm.width=e,gm.height=i,!pm.intersect(gm)}function Ln(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}function On(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}function zn(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function En(t){return"mousewheel"===t&&xg.browser.firefox?"DOMMouseScroll":t}function Bn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Rn(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Nn(t){t&&(t.zrByTouch=!0)}function Fn(t,e){return be(t.dom,new Gn(t,e),!0)}function Vn(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function Gn(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}function Wn(t,e){var i=e.domHandlers;xg.pointerEventsSupported?f(_m.pointer,function(n){Zn(e,n,function(e){i[n].call(t,e)})}):(xg.touchEventsSupported&&f(_m.touch,function(n){Zn(e,n,function(r){i[n].call(t,r),Rn(e)})}),f(_m.mouse,function(n){Zn(e,n,function(r){r=we(r),e.touching||i[n].call(t,r)})}))}function Hn(t,e){function i(i){function n(n){n=we(n),Vn(t,n.target)||(n=Fn(t,n),e.domHandlers[i].call(t,n))}Zn(e,i,n,{capture:!0})}xg.pointerEventsSupported?f(wm.pointer,i):xg.touchEventsSupported||f(wm.mouse,i)}function Zn(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Se(t.domTarget,En(e),i,n)}function Xn(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&Me(t.domTarget,En(i),e[i],t.listenerOpts[i]);t.mounted={}}function Yn(t,e){if(t._mayPointerCapture=null,xm&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?Hn(t,i):Xn(i)}}function Un(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function qn(t,e){Gg.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Un(t,Sm),xm&&(this._globalHandlerScope=new Un(document,Mm)),this._pointerCapturing=!1,this._mayPointerCapture=null,Wn(this,this._localHandlerScope)}function jn(t,e){var i=new km(mg(),t,e);return Am[i.id]=i,i}function Kn(t){if(t)t.dispose();else{for(var e in Am)Am.hasOwnProperty(e)&&Am[e].dispose();Am={}}return this}function $n(t){return Am[t]}function Qn(t,e){Tm[t]=e}function Jn(t){delete Am[t]}function tr(t){return t instanceof Array?t:null==t?[]:[t]}function er(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;r>n;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function ir(t){return!Om(t)||zm(t)||t instanceof Date?t:t.value}function nr(t){return Om(t)&&!(t instanceof Array)}function rr(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return Lm(e,function(t,n){if(Om(t)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(var r=0;r<i.length;r++){var a=i[r].exist;if(!(i[r].option||null!=a.id&&null!=t.id||null==t.name||sr(t)||sr(a)||a.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}}),Lm(e,function(t){if(Om(t)){for(var e=0;e<i.length;e++){var n=i[e].exist;if(!i[e].option&&!sr(n)&&null==t.id){i[e].option=t;break}}e>=i.length&&i.push({option:t})}}),i}function ar(t){var e=N();Lm(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),Lm(t,function(t){var i=t.option;O(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),Lm(t,function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(Om(r)){if(a.name=null!=r.name?r.name+"":n?n.name:Em+i,n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do a.id="\x00"+a.name+"\x00"+o++;while(e.get(a.id))}e.set(a.id,t)}})}function or(t){var e=t.name;return!(!e||!e.indexOf(Em))}function sr(t){return Om(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function lr(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function ur(){var t="__\x00ec_inner_"+Rm++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function hr(t,e,i){if(b(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||cr(e,r+"Index")||cr(e,r+"Id")||cr(e,r+"Name")||(e[r+"Index"]=0);var a={};return Lm(e,function(n,r){var n=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(a[r]=n);var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&u(i.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==n)&&(h[l]=n);var c=t.queryComponents(h);a[s+"Models"]=c,a[s+"Model"]=c[0]}}),a}function cr(t,e){return t&&t.hasOwnProperty(e)}function dr(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function fr(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function pr(t){return"auto"===t?xg.domSupported?"html":"richText":t||"html"}function gr(t){var e={main:"",sub:""};return t&&(t=t.split(Nm),e.main=t[0]||"",e.sub=t[1]||""),e}function vr(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function mr(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(i.prototype,t),i.extend=this.extend,i.superCall=xr,i.superApply=_r,h(i,this),i.superClass=e,i}}function yr(t){var e=["__\x00is_clz",Vm++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function xr(t,e){var i=P(arguments,2);return this.superClass.prototype[e].apply(t,i)}function _r(t,e,i){return this.superClass.prototype[e].apply(t,i)}function wr(t,e){function i(t){var e=n[t.main];return e&&e[Fm]||(e=n[t.main]={},e[Fm]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(vr(e),e=gr(e),e.sub){if(e.sub!==Fm){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[Fm]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=gr(t);var e=[],i=n[t.main];return i&&i[Fm]?f(i,function(t,i){i!==Fm&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=gr(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=gr(t);var e=n[t.main];return e&&e[Fm]},t.parseClassType=gr,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t}function br(t){return t>-qm&&qm>t}function Sr(t){return t>qm||-qm>t}function Mr(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function Ir(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)}function Cr(t,e,i,n,r,a){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*o*l,c=s*l-9*o*u,d=l*l-3*s*u,f=0;if(br(h)&&br(c))if(br(s))a[0]=0;else{var p=-l/s;p>=0&&1>=p&&(a[f++]=p)}else{var g=c*c-4*h*d;if(br(g)){var v=c/h,p=-s/o+v,m=-v/2;p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m)}else if(g>0){var y=Um(g),x=h*s+1.5*o*(-c+y),_=h*s+1.5*o*(-c-y);x=0>x?-Ym(-x,$m):Ym(x,$m),_=0>_?-Ym(-_,$m):Ym(_,$m);var p=(-s-(x+_))/(3*o);p>=0&&1>=p&&(a[f++]=p)}else{var w=(2*h*s-3*o*c)/(2*Um(h*h*h)),b=Math.acos(w)/3,S=Um(h),M=Math.cos(b),p=(-s-2*S*M)/(3*o),m=(-s+S*(M+Km*Math.sin(b)))/(3*o),I=(-s+S*(M-Km*Math.sin(b)))/(3*o);p>=0&&1>=p&&(a[f++]=p),m>=0&&1>=m&&(a[f++]=m),I>=0&&1>=I&&(a[f++]=I)}}return f}function Tr(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(br(o)){if(Sr(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(br(h))r[0]=-a/(2*o);else if(h>0){var c=Um(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function Ar(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-o)*r+o,h=(l-s)*r+s,c=(h-u)*r+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function Dr(t,e,i,n,r,a,o,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;Qm[0]=l,Qm[1]=u;for(var y=0;1>y;y+=.05)Jm[0]=Mr(t,i,r,o,y),Jm[1]=Mr(e,n,a,s,y),p=Ng(Qm,Jm),m>p&&(c=y,m=p);m=1/0;for(var x=0;32>x&&!(jm>v);x++)d=c-v,f=c+v,Jm[0]=Mr(t,i,r,o,d),Jm[1]=Mr(e,n,a,s,d),p=Ng(Jm,Qm),d>=0&&m>p?(c=d,m=p):(ty[0]=Mr(t,i,r,o,f),ty[1]=Mr(e,n,a,s,f),g=Ng(ty,Qm),1>=f&&m>g?(c=f,m=g):v*=.5);return h&&(h[0]=Mr(t,i,r,o,c),h[1]=Mr(e,n,a,s,c)),Um(m)}function kr(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function Pr(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Lr(t,e,i,n,r){var a=t-2*e+i,o=2*(e-t),s=t-n,l=0;if(br(a)){if(Sr(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(br(h)){var u=-o/(2*a);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=Um(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function Or(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function zr(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}function Er(t,e,i,n,r,a,o,s,l){var u,h=.005,c=1/0;Qm[0]=o,Qm[1]=s;for(var d=0;1>d;d+=.05){Jm[0]=kr(t,i,r,d),Jm[1]=kr(e,n,a,d);var f=Ng(Qm,Jm);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(jm>h);p++){var g=u-h,v=u+h;Jm[0]=kr(t,i,r,g),Jm[1]=kr(e,n,a,g);var f=Ng(Jm,Qm);if(g>=0&&c>f)u=g,c=f;else{ty[0]=kr(t,i,r,v),ty[1]=kr(e,n,a,v);var m=Ng(ty,Qm);1>=v&&c>m?(u=v,c=m):h*=.5}}return l&&(l[0]=kr(t,i,r,u),l[1]=kr(e,n,a,u)),Um(c)}function Br(t,e,i){if(0!==t.length){var n,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(n=1;n<t.length;n++)r=t[n],a=ey(a,r[0]),o=iy(o,r[0]),s=ey(s,r[1]),l=iy(l,r[1]);e[0]=a,e[1]=s,i[0]=o,i[1]=l}}function Rr(t,e,i,n,r,a){r[0]=ey(t,i),r[1]=ey(e,n),a[0]=iy(t,i),a[1]=iy(e,n)}function Nr(t,e,i,n,r,a,o,s,l,u){var h,c=Tr,d=Mr,f=c(t,i,r,o,uy);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;f>h;h++){var p=d(t,i,r,o,uy[h]);l[0]=ey(p,l[0]),u[0]=iy(p,u[0])}for(f=c(e,n,a,s,hy),h=0;f>h;h++){var g=d(e,n,a,s,hy[h]);l[1]=ey(g,l[1]),u[1]=iy(g,u[1])}l[0]=ey(t,l[0]),u[0]=iy(t,u[0]),l[0]=ey(o,l[0]),u[0]=iy(o,u[0]),l[1]=ey(e,l[1]),u[1]=iy(e,u[1]),l[1]=ey(s,l[1]),u[1]=iy(s,u[1])}function Fr(t,e,i,n,r,a,o,s){var l=Or,u=kr,h=iy(ey(l(t,i,r),1),0),c=iy(ey(l(e,n,a),1),0),d=u(t,i,r,h),f=u(e,n,a,c);o[0]=ey(t,r,d),o[1]=ey(e,a,f),s[0]=iy(t,r,d),s[1]=iy(e,a,f)}function Vr(t,e,i,n,r,a,o,s,l){var u=oe,h=se,c=Math.abs(r-a);if(1e-4>c%ay&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(oy[0]=ry(r)*i+t,oy[1]=ny(r)*n+e,sy[0]=ry(a)*i+t,sy[1]=ny(a)*n+e,u(s,oy,sy),h(l,oy,sy),r%=ay,0>r&&(r+=ay),a%=ay,0>a&&(a+=ay),r>a&&!o?a+=ay:a>r&&o&&(r+=ay),o){var d=a;a=r,r=d}for(var f=0;a>f;f+=Math.PI/2)f>r&&(ly[0]=ry(f)*i+t,ly[1]=ny(f)*n+e,u(s,ly,s),h(l,ly,l))}function Gr(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0,u=t;if(o>e+s&&o>n+s||e-s>o&&n-s>o||a>t+s&&a>i+s||t-s>a&&i-s>a)return!1;if(t===i)return Math.abs(a-t)<=s/2;l=(e-n)/(t-i),u=(t*n-i*e)/(t-i);var h=l*a-o+u,c=h*h/(l*l+1);return s/2*s/2>=c}function Wr(t,e,i,n,r,a,o,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>n+c&&h>a+c&&h>s+c||e-c>h&&n-c>h&&a-c>h&&s-c>h||u>t+c&&u>i+c&&u>r+c&&u>o+c||t-c>u&&i-c>u&&r-c>u&&o-c>u)return!1;var d=Dr(t,e,i,n,r,a,o,s,u,h,null);return c/2>=d}function Hr(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||e-u>l&&n-u>l&&a-u>l||s>t+u&&s>i+u&&s>r+u||t-u>s&&i-u>s&&r-u>s)return!1;var h=Er(t,e,i,n,r,a,s,l,null);return u/2>=h}function Zr(t){return t%=My,0>t&&(t+=My),t}function Xr(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||i>h+u)return!1;if(Math.abs(n-r)%Iy<1e-4)return!0;if(a){var c=n;n=Zr(r),r=Zr(c)}else n=Zr(n),r=Zr(r);n>r&&(r+=Iy);var d=Math.atan2(l,s);return 0>d&&(d+=Iy),d>=n&&r>=d||d+Iy>=n&&r>=d+Iy}function Yr(t,e,i,n,r,a){if(a>e&&a>n||e>a&&n>a)return 0;if(n===e)return 0;var o=e>n?1:-1,s=(a-e)/(n-e);(1===s||0===s)&&(o=e>n?.5:-.5);var l=s*(i-t)+t;return l===r?1/0:l>r?o:0}function Ur(t,e){return Math.abs(t-e)<Ay}function qr(){var t=ky[0];ky[0]=ky[1],ky[1]=t}function jr(t,e,i,n,r,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||e>u&&n>u&&a>u&&s>u)return 0;var h=Cr(e,n,a,s,u,Dy);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var v=Dy[g],m=0===v||1===v?.5:1,y=Mr(t,i,r,o,v);l>y||(0>p&&(p=Tr(e,n,a,s,ky),ky[1]<ky[0]&&p>1&&qr(),c=Mr(e,n,a,s,ky[0]),p>1&&(d=Mr(e,n,a,s,ky[1]))),f+=2===p?v<ky[0]?e>c?m:-m:v<ky[1]?c>d?m:-m:d>s?m:-m:v<ky[0]?e>c?m:-m:c>s?m:-m)}return f}function Kr(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||e>s&&n>s&&a>s)return 0;var l=Lr(e,n,a,s,Dy);if(0===l)return 0;var u=Or(e,n,a);if(u>=0&&1>=u){for(var h=0,c=kr(e,n,a,u),d=0;l>d;d++){var f=0===Dy[d]||1===Dy[d]?.5:1,p=kr(t,i,r,Dy[d]);o>p||(h+=Dy[d]<u?e>c?f:-f:c>a?f:-f)}return h}var f=0===Dy[0]||1===Dy[0]?.5:1,p=kr(t,i,r,Dy[0]);return o>p?0:e>a?f:-f}function $r(t,e,i,n,r,a,o,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);Dy[0]=-l,Dy[1]=l;var u=Math.abs(n-r);if(1e-4>u)return 0;if(1e-4>u%Ty){n=0,r=Ty;var h=a?1:-1;return o>=Dy[0]+t&&o<=Dy[1]+t?h:0}if(a){var l=n;n=Zr(r),r=Zr(l)}else n=Zr(n),r=Zr(r);n>r&&(r+=Ty);for(var c=0,d=0;2>d;d++){var f=Dy[d];if(f+t>o){var p=Math.atan2(s,f),h=a?1:-1;0>p&&(p=Ty+p),(p>=n&&r>=p||p+Ty>=n&&r>=p+Ty)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Qr(t,e,i,n,r){for(var a=0,o=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===Cy.M&&h>1&&(i||(a+=Yr(o,s,l,u,n,r))),1===h&&(o=t[h],s=t[h+1],l=o,u=s),c){case Cy.M:l=t[h++],u=t[h++],o=l,s=u;break;case Cy.L:if(i){if(Gr(o,s,t[h],t[h+1],e,n,r))return!0}else a+=Yr(o,s,t[h],t[h+1],n,r)||0;o=t[h++],s=t[h++];break;case Cy.C:if(i){if(Wr(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,r))return!0}else a+=jr(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,r)||0;o=t[h++],s=t[h++];break;case Cy.Q:if(i){if(Hr(o,s,t[h++],t[h++],t[h],t[h+1],e,n,r))return!0}else a+=Kr(o,s,t[h++],t[h++],t[h],t[h+1],n,r)||0;o=t[h++],s=t[h++];break;case Cy.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],v=t[h++],m=t[h++];h+=1;var y=1-t[h++],x=Math.cos(v)*p+d,_=Math.sin(v)*g+f;h>1?a+=Yr(o,s,x,_,n,r):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(Xr(d,f,g,v,v+m,y,e,w,r))return!0}else a+=$r(d,f,g,v,v+m,y,w,r);o=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case Cy.R:l=o=t[h++],u=s=t[h++];var b=t[h++],S=t[h++],x=l+b,_=u+S;if(i){if(Gr(l,u,x,u,e,n,r)||Gr(x,u,x,_,e,n,r)||Gr(x,_,l,_,e,n,r)||Gr(l,_,l,u,e,n,r))return!0}else a+=Yr(x,u,x,_,n,r),a+=Yr(l,_,l,u,n,r);break;case Cy.Z:if(i){if(Gr(o,s,l,u,e,n,r))return!0}else a+=Yr(o,s,l,u,n,r);o=l,s=u}}return i||Ur(s,u)||(a+=Yr(o,s,l,u,n,r)||0),0!==a}function Jr(t,e,i){return Qr