!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G2Plot=e():t.G2Plot=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=200)}([function(t,e,n){"use strict";n.r(e),n.d(e,"contains",(function(){return r})),n.d(e,"includes",(function(){return r})),n.d(e,"difference",(function(){return a})),n.d(e,"find",(function(){return x})),n.d(e,"findIndex",(function(){return _})),n.d(e,"firstValue",(function(){return O})),n.d(e,"flatten",(function(){return w})),n.d(e,"flattenDeep",(function(){return j})),n.d(e,"getRange",(function(){return A})),n.d(e,"pull",(function(){return P})),n.d(e,"pullAt",(function(){return F})),n.d(e,"reduce",(function(){return L})),n.d(e,"remove",(function(){return k})),n.d(e,"sortBy",(function(){return B})),n.d(e,"union",(function(){return R})),n.d(e,"uniq",(function(){return N})),n.d(e,"valuesOfKey",(function(){return V})),n.d(e,"head",(function(){return z})),n.d(e,"last",(function(){return G})),n.d(e,"startsWith",(function(){return Y})),n.d(e,"endsWith",(function(){return W})),n.d(e,"filter",(function(){return o})),n.d(e,"every",(function(){return X})),n.d(e,"some",(function(){return H})),n.d(e,"group",(function(){return $})),n.d(e,"groupBy",(function(){return q})),n.d(e,"groupToMap",(function(){return Z})),n.d(e,"getWrapBehavior",(function(){return K})),n.d(e,"wrapBehavior",(function(){return Q})),n.d(e,"number2color",(function(){return tt})),n.d(e,"parseRadius",(function(){return et})),n.d(e,"clamp",(function(){return nt})),n.d(e,"fixedBase",(function(){return it})),n.d(e,"isDecimal",(function(){return ot})),n.d(e,"isEven",(function(){return at})),n.d(e,"isInteger",(function(){return st})),n.d(e,"isNegative",(function(){return ct})),n.d(e,"isNumberEqual",(function(){return lt})),n.d(e,"isOdd",(function(){return ut})),n.d(e,"isPositive",(function(){return ht})),n.d(e,"max",(function(){return S})),n.d(e,"maxBy",(function(){return ft})),n.d(e,"min",(function(){return M})),n.d(e,"minBy",(function(){return pt})),n.d(e,"mod",(function(){return dt})),n.d(e,"toDegree",(function(){return yt})),n.d(e,"toInteger",(function(){return vt})),n.d(e,"toRadian",(function(){return bt})),n.d(e,"forIn",(function(){return xt})),n.d(e,"has",(function(){return _t})),n.d(e,"hasKey",(function(){return Ot})),n.d(e,"hasValue",(function(){return jt})),n.d(e,"keys",(function(){return g})),n.d(e,"isMatch",(function(){return y})),n.d(e,"values",(function(){return wt})),n.d(e,"lowerCase",(function(){return Mt})),n.d(e,"lowerFirst",(function(){return At})),n.d(e,"substitute",(function(){return Ct})),n.d(e,"upperCase",(function(){return Et})),n.d(e,"upperFirst",(function(){return It})),n.d(e,"getType",(function(){return Tt})),n.d(e,"isArguments",(function(){return Ft})),n.d(e,"isArray",(function(){return h})),n.d(e,"isArrayLike",(function(){return i})),n.d(e,"isBoolean",(function(){return Lt})),n.d(e,"isDate",(function(){return kt})),n.d(e,"isError",(function(){return Dt})),n.d(e,"isFunction",(function(){return l})),n.d(e,"isFinite",(function(){return Bt})),n.d(e,"isNil",(function(){return u})),n.d(e,"isNull",(function(){return Nt})),n.d(e,"isNumber",(function(){return rt})),n.d(e,"isObject",(function(){return p})),n.d(e,"isObjectLike",(function(){return m})),n.d(e,"isPlainObject",(function(){return b})),n.d(e,"isPrototype",(function(){return Vt})),n.d(e,"isRegExp",(function(){return zt})),n.d(e,"isString",(function(){return D})),n.d(e,"isType",(function(){return c})),n.d(e,"isUndefined",(function(){return Gt})),n.d(e,"isElement",(function(){return Yt})),n.d(e,"requestAnimationFrame",(function(){return Wt})),n.d(e,"clearAnimationFrame",(function(){return Xt})),n.d(e,"augment",(function(){return qt})),n.d(e,"clone",(function(){return $t})),n.d(e,"debounce",(function(){return Kt})),n.d(e,"memoize",(function(){return Qt})),n.d(e,"deepMix",(function(){return te})),n.d(e,"each",(function(){return d})),n.d(e,"extend",(function(){return ee})),n.d(e,"indexOf",(function(){return ne})),n.d(e,"isEmpty",(function(){return re})),n.d(e,"isEqual",(function(){return oe})),n.d(e,"isEqualWith",(function(){return ae})),n.d(e,"map",(function(){return se})),n.d(e,"mapValues",(function(){return le})),n.d(e,"mix",(function(){return Ut})),n.d(e,"assign",(function(){return Ut})),n.d(e,"get",(function(){return ue})),n.d(e,"set",(function(){return he})),n.d(e,"pick",(function(){return pe})),n.d(e,"omit",(function(){return de})),n.d(e,"throttle",(function(){return ge})),n.d(e,"toArray",(function(){return ye})),n.d(e,"toString",(function(){return St})),n.d(e,"uniqueId",(function(){return me})),n.d(e,"noop",(function(){return be})),n.d(e,"identity",(function(){return xe})),n.d(e,"size",(function(){return _e})),n.d(e,"measureTextWidth",(function(){return je})),n.d(e,"getEllipsisText",(function(){return Se})),n.d(e,"Cache",(function(){return Me}));var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!i(t)&&t.indexOf(e)>-1},o=function(t,e){if(!i(t))return t;for(var n=[],r=0;r-1;)E.call(t,o,1);return t},T=Array.prototype.splice,F=function(t,e){if(!i(t))return[];for(var n=t?e.length:0,r=n-1;n--;){var o=void 0,a=e[n];n!==r&&a===o||(o=a,T.call(t,a,1))}return t},L=function(t,e,n){if(!h(t)&&!b(t))return t;var i=n;return d(t,(function(t,n){i=e(i,t,n)})),i},k=function(t,e){var n=[];if(!i(t))return n;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]n?n:t},it=function(t,e){var n=e.toString(),i=n.indexOf(".");if(-1===i)return Math.round(t);var r=n.substr(i+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},rt=function(t){return c(t,"Number")},ot=function(t){return rt(t)&&t%1!=0},at=function(t){return rt(t)&&t%2==0},st=Number.isInteger?Number.isInteger:function(t){return rt(t)&&t%1==0},ct=function(t){return rt(t)&&t<0};function lt(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)0},ft=function(t,e){if(h(t)){for(var n,i=-1/0,r=0;ri&&(n=o,i=a)}return n}},pt=function(t,e){if(h(t)){for(var n,i=1/0,r=0;re?(i&&(clearTimeout(i),i=null),s=l,a=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(c,u)),a};return l.cancel=function(){clearTimeout(i),s=0,i=r=o=null},l},ye=function(t){return i(t)?Array.prototype.slice.call(t):[]},ve={},me=function(t){return ve[t=t||"g"]?ve[t]+=1:ve[t]=1,t+ve[t]},be=function(){},xe=function(t){return t};function _e(t){return u(t)?0:i(t)?t.length:Object.keys(t).length}var Oe,we=n(1),je=Qt((function(t,e){void 0===e&&(e={});var n=e.fontSize,i=e.fontFamily,r=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return Oe||(Oe=document.createElement("canvas").getContext("2d")),Oe.font=[o,a,r,n+"px",i].join(" "),Oe.measureText(D(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),Object(we.__spreadArrays)([t],wt(e)).join("")})),Se=function(t,e,n,i){void 0===i&&(i="...");var r,o,a=je(i,n),s=D(t)?t:St(t),c=e,l=[];if(je(t,n)<=e)return t;for(;r=s.substr(0,16),!((o=je(r,n))+a>c&&o>c);)if(l.push(r),c-=o,!(s=s.substr(16)))return l.join("");for(;r=s.substr(0,1),!((o=je(r,n))+a>c);)if(l.push(r),c-=o,!(s=s.substr(1)))return l.join("");return""+l.join("")+i},Me=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.r(e),n.d(e,"__extends",(function(){return o})),n.d(e,"__assign",(function(){return a})),n.d(e,"__rest",(function(){return s})),n.d(e,"__decorate",(function(){return c})),n.d(e,"__param",(function(){return l})),n.d(e,"__esDecorate",(function(){return u})),n.d(e,"__runInitializers",(function(){return h})),n.d(e,"__propKey",(function(){return f})),n.d(e,"__setFunctionName",(function(){return p})),n.d(e,"__metadata",(function(){return d})),n.d(e,"__awaiter",(function(){return g})),n.d(e,"__generator",(function(){return y})),n.d(e,"__createBinding",(function(){return v})),n.d(e,"__exportStar",(function(){return m})),n.d(e,"__values",(function(){return b})),n.d(e,"__read",(function(){return x})),n.d(e,"__spread",(function(){return _})),n.d(e,"__spreadArrays",(function(){return O})),n.d(e,"__spreadArray",(function(){return w})),n.d(e,"__await",(function(){return j})),n.d(e,"__asyncGenerator",(function(){return S})),n.d(e,"__asyncDelegator",(function(){return M})),n.d(e,"__asyncValues",(function(){return A})),n.d(e,"__makeTemplateObject",(function(){return C})),n.d(e,"__importStar",(function(){return I})),n.d(e,"__importDefault",(function(){return P})),n.d(e,"__classPrivateFieldGet",(function(){return T})),n.d(e,"__classPrivateFieldSet",(function(){return F})),n.d(e,"__classPrivateFieldIn",(function(){return L}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0;c--)(o=t[c])&&(s=(a<3?o(s):a>3?o(e,n,s):o(e,n))||s);return a>3&&s&&Object.defineProperty(e,n,s),s}function l(t,e){return function(n,i){e(n,i,t)}}function u(t,e,n,r,o,a){function s(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var c,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",h=!e&&t?r.static?t:t.prototype:null,f=e||(h?Object.getOwnPropertyDescriptor(h,r.name):{}),p=!1,d=n.length-1;d>=0;d--){var g={};for(var y in r)g[y]="access"===y?{}:r[y];for(var y in r.access)g.access[y]=r.access[y];g.addInitializer=function(t){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(t||null))};var v=(0,n[d])("accessor"===l?{get:f.get,set:f.set}:f[u],g);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!==i(v))throw new TypeError("Object expected");(c=s(v.get))&&(f.get=c),(c=s(v.set))&&(f.set=c),(c=s(v.init))&&o.push(c)}else(c=s(v))&&("field"===l?o.push(c):f[u]=c)}h&&Object.defineProperty(h,r.name,f),p=!0}function h(t,e,n){for(var i=arguments.length>2,r=0;r0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function _(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof j?Promise.resolve(n.value.v).then(c,l):u(o[0][2],n)}catch(t){u(o[0][3],t)}var n}function c(t){s("next",t)}function l(t){s("throw",t)}function u(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function M(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:j(t[i](e)),done:!1}:r?r(e):e}:r}}function A(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=b(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){(function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)})(i,r,(e=t[n](e)).done,e.value)}))}}}function C(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var E=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function I(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&v(e,t,n);return E(e,t),e}function P(t){return t&&t.__esModule?t:{default:t}}function T(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function F(t,e,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,n):r?r.value=n:e.set(t,n),n}function L(t,e){if(null===e||"object"!==i(e)&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getViews=e.getSiblingViews=e.findViewById=e.addViewAnimation=e.template=e.renderStatistic=e.renderGaugeStatistic=e.pick=e.getSplinePath=e.isRealNumber=e.isBetween=e.measureTextWidth=e.transformLabel=e.kebabCase=e.log=e.LEVEL=e.invariant=e.flow=e.getContainerSize=e.deepAssign=void 0;var i=n(1);i.__exportStar(n(64),e);var r=n(109);Object.defineProperty(e,"deepAssign",{enumerable:!0,get:function(){return r.deepAssign}});var o=n(209);Object.defineProperty(e,"getContainerSize",{enumerable:!0,get:function(){return o.getContainerSize}});var a=n(210);Object.defineProperty(e,"flow",{enumerable:!0,get:function(){return a.flow}}),i.__exportStar(n(211),e);var s=n(108);Object.defineProperty(e,"invariant",{enumerable:!0,get:function(){return s.invariant}}),Object.defineProperty(e,"LEVEL",{enumerable:!0,get:function(){return s.LEVEL}}),Object.defineProperty(e,"log",{enumerable:!0,get:function(){return s.log}});var c=n(110);Object.defineProperty(e,"kebabCase",{enumerable:!0,get:function(){return c.kebabCase}});var l=n(212);Object.defineProperty(e,"transformLabel",{enumerable:!0,get:function(){return l.transformLabel}});var u=n(213);Object.defineProperty(e,"measureTextWidth",{enumerable:!0,get:function(){return u.measureTextWidth}});var h=n(84);Object.defineProperty(e,"isBetween",{enumerable:!0,get:function(){return h.isBetween}}),Object.defineProperty(e,"isRealNumber",{enumerable:!0,get:function(){return h.isRealNumber}}),i.__exportStar(n(45),e);var f=n(215);Object.defineProperty(e,"getSplinePath",{enumerable:!0,get:function(){return f.getSplinePath}});var p=n(83);Object.defineProperty(e,"pick",{enumerable:!0,get:function(){return p.pick}});var d=n(111);Object.defineProperty(e,"renderGaugeStatistic",{enumerable:!0,get:function(){return d.renderGaugeStatistic}}),Object.defineProperty(e,"renderStatistic",{enumerable:!0,get:function(){return d.renderStatistic}});var g=n(216);Object.defineProperty(e,"template",{enumerable:!0,get:function(){return g.template}});var y=n(65);Object.defineProperty(e,"addViewAnimation",{enumerable:!0,get:function(){return y.addViewAnimation}}),Object.defineProperty(e,"findViewById",{enumerable:!0,get:function(){return y.findViewById}}),Object.defineProperty(e,"getSiblingViews",{enumerable:!0,get:function(){return y.getSiblingViews}}),Object.defineProperty(e,"getViews",{enumerable:!0,get:function(){return y.getViews}})},function(t,e,n){"use strict";n.r(e),n.d(e,"mat3",(function(){return r.a})),n.d(e,"vec2",(function(){return r.b})),n.d(e,"vec3",(function(){return r.c})),n.d(e,"ext",(function(){return i}));var i={};n.r(i),n.d(i,"leftTranslate",(function(){return o})),n.d(i,"leftRotate",(function(){return a})),n.d(i,"leftScale",(function(){return s})),n.d(i,"transform",(function(){return c})),n.d(i,"direction",(function(){return l})),n.d(i,"angleTo",(function(){return u})),n.d(i,"vertical",(function(){return h}));var r=n(7);function o(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.a.fromTranslation(i,n),r.a.multiply(t,i,e)}function a(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.a.fromRotation(i,n),r.a.multiply(t,i,e)}function s(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.a.fromScaling(i,n),r.a.multiply(t,i,e)}function c(t,e){for(var n,i,c,l=t?[].concat(t):[1,0,0,0,1,0,0,0,1],u=0,h=e.length;u=0;return n?o?2*Math.PI-i:i:o?i:2*Math.PI-i}function h(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t}},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"h",(function(){return a})),n.d(e,"k",(function(){return s})),n.d(e,"j",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"e",(function(){return h})),n.d(e,"i",(function(){return f})),n.d(e,"d",(function(){return p})),n.d(e,"m",(function(){return d})),n.d(e,"l",(function(){return g})),n.d(e,"f",(function(){return y}));var i=n(0);function r(t){var e=0,n=0,r=0,o=0;return Object(i.isNumber)(t)?e=n=r=o=t:Object(i.isArray)(t)&&(e=t[0],r=Object(i.isNil)(t[1])?t[0]:t[1],o=Object(i.isNil)(t[2])?t[0]:t[2],n=Object(i.isNil)(t[3])?r:t[3]),[e,r,o,n]}function o(t){for(var e=t.childNodes,n=e.length-1;n>=0;n--)t.removeChild(e[n])}function a(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function s(t){var e=t.start,n=t.end,i=Math.min(e.x,n.x),r=Math.min(e.y,n.y),o=Math.max(e.x,n.x),a=Math.max(e.y,n.y);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}}function c(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),i=Math.min.apply(Math,e),r=Math.min.apply(Math,n),o=Math.max.apply(Math,e),a=Math.max.apply(Math,n);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}}function l(t,e,n,i){var r=t+n,o=e+i;return{x:t,y:e,width:n,height:i,minX:t,minY:e,maxX:isNaN(r)?0:r,maxY:isNaN(o)?0:o}}function u(t,e,n){return(1-n)*t+e*n}function h(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}}var f=function(t,e,n){return void 0===n&&(n=Math.pow(Number.EPSILON,.5)),[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)0?Object(i.each)(g,(function(t){if(t.get("visible")){if(t.isGroup()&&0===t.get("children").length)return!0;var e=p(t),n=t.applyToMatrix([e.minX,e.minY,1]),i=t.applyToMatrix([e.minX,e.maxY,1]),r=t.applyToMatrix([e.maxX,e.minY,1]),o=t.applyToMatrix([e.maxX,e.maxY,1]),a=Math.min(n[0],i[0],r[0],o[0]),s=Math.max(n[0],i[0],r[0],o[0]),c=Math.min(n[1],i[1],r[1],o[1]),l=Math.max(n[1],i[1],r[1],o[1]);ah&&(h=s),cd&&(d=l)}})):(u=0,h=0,f=0,d=0),e=l(u,f,h-u,d-f)}else e=t.getBBox();return c?(n=e,r=c,o=Math.max(n.minX,r.minX),a=Math.max(n.minY,r.minY),l(o,a,Math.min(n.maxX,r.maxX)-o,Math.min(n.maxY,r.maxY)-a)):e}function d(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(n){var i={type:n.get("type"),attrs:n.attr()};t.setClip(i)}else t.setClip(null)}}function g(t){return t+"px"}function y(t,e,n,i){var r,o,a,s,c=i/(r=t,a=(o=e).x-r.x,s=o.y-r.y,Math.sqrt(a*a+s*s)),l=0;return"start"===n?l=0-c:"end"===n&&(l=1+c),{x:u(t.x,e.x,l),y:u(t.y,e.y,l)}}},function(t,e,n){"use strict";e.a={fontFamily:'\n BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",\n Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",\n SimSun, "sans-serif"',textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"}},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"l",(function(){return c})),n.d(e,"j",(function(){return l}));var i=n(0);function r(){return window?window.devicePixelRatio:1}function o(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)}function a(t,e,n,i,r,o){return r>=t&&r<=t+n&&o>=e&&o<=e+i}function s(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},e.prototype.convertPoint=function(t){var e,n=t.x,i=t.y;this.isTransposed&&(n=(e=[i,n])[0],i=e[1]);var r=this.convertDim(n,"x"),o=this.a*r,a=this.convertDim(i,"y");return{x:this.center.x+Math.cos(r)*(o+a),y:this.center.y+Math.sin(r)*(o+a)}},e.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,i=B.vec2.subtract([0,0],[t.x,t.y],[this.center.x,this.center.y]),r=B.ext.angleTo(i,[1,0],!0),o=r*this.a;B.vec2.length(i)this.width/i?(e=this.width/i,this.circleCenter={x:this.center.x-(.5-o)*this.width,y:this.center.y-(.5-a)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-o)*e*i,y:this.center.y-(.5-a)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,n=this.getCenter(),i=t.x,r=t.y;return this.isTransposed&&(i=(e=[r,i])[0],r=e[1]),i=this.convertDim(i,"x"),r=this.convertDim(r,"y"),{x:n.x+Math.cos(i)*r,y:n.y+Math.sin(i)*r}},e.prototype.invertPoint=function(t){var e,n=this.getCenter(),i=[t.x-n.x,t.y-n.y],r=this.startAngle,o=this.endAngle;this.isReflect("x")&&(r=(e=[o,r])[0],o=e[1]);var a=[1,0,0,0,1,0,0,0,1];B.ext.leftRotate(a,a,r);var c=[1,0,0];B.vec3.transformMat3(c,c,a);var l=[c[0],c[1]],u=B.ext.angleTo(l,i,o0?f:-f;var p=this.invertDim(h,"y"),d={x:0,y:0};return d.x=this.isTransposed?p:f,d.y=this.isTransposed?f:p,d},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],i=[0,Math.sin(t),Math.sin(e)],r=Math.min(t,e);rt.x?t.x:e,n=nt.y?t.y:i,r=r=i&&t<=r}function st(t,e){return"object"===ot(t)&&e.forEach((function(e){delete t[e]})),t}function ct(t,e,n){var i,r;void 0===e&&(e=[]),void 0===n&&(n=new Map);try{for(var o=Object(a.__values)(t),s=o.next();!s.done;s=o.next()){var c=s.value;n.has(c)||(e.push(c),n.set(c,!0))}}catch(t){i={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return e}var lt=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x=t,this.y=e,this.height=i,this.width=n}return t.fromRange=function(e,n,i,r){return new t(e,n,i-e,r-n)},t.fromObject=function(e){return new t(e.minX,e.minY,e.width,e.height)},Object.defineProperty(t.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.contains=function(t){return t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;et.minX&&this.minYt.minY},t.prototype.size=function(){return this.width*this.height},t.prototype.isPointIn=function(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY},t}();function ut(t){if(t.isPolar&&!t.isTransposed)return(t.endAngle-t.startAngle)*t.getRadius();var e=t.convert({x:0,y:0}),n=t.convert({x:1,y:0});return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function ht(t,e){var n=t.getCenter();return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function ft(t,e){var n=t.getCenter();return Math.atan2(e.y-n.y,e.x-n.x)}function pt(t,e){void 0===e&&(e=0);var n,i=t.start,r=t.end,o=t.getWidth(),a=t.getHeight();if(t.isPolar){var s=t.startAngle,c=t.endAngle,l=t.getCenter(),u=t.getRadius();return{type:"path",startState:{path:et(l.x,l.y,u+e,s,s)},endState:function(t){var n=(c-s)*t+s;return{path:et(l.x,l.y,u+e,s,n)}},attrs:{path:et(l.x,l.y,u+e,s,c)}}}return n=t.isTransposed?{height:a+2*e}:{width:o+2*e},{type:"rect",startState:{x:i.x-e,y:r.y-e,width:t.isTransposed?o+2*e:0,height:t.isTransposed?0:a+2*e},endState:n,attrs:{x:i.x-e,y:r.y-e,width:o+2*e,height:a+2*e}}}var dt=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;function gt(t,e,n,i){return void 0===e&&(e={}),e.type?e.type:"identity"!==t.type&&g.includes(n)&&["interval"].includes(i)||t.isCategory?"cat":t.type}function yt(t,e,n){var i=e||[];if(Object(s.isNumber)(t)||Object(s.isNil)(Object(s.firstValue)(i,t))&&Object(s.isEmpty)(n))return new(Object(F.d)("identity"))({field:t.toString(),values:[t]});var r=Object(s.valuesOfKey)(i,t),o=Object(s.get)(n,"type",function(t){var e="linear";return dt.test(t)?e="timeCat":Object(s.isString)(t)&&(e="cat"),e}(r[0]));return new(Object(F.d)(o))(Object(a.__assign)({field:t,values:r},n))}function vt(t){return t.alias||t.field}function mt(t,e,n){var i,r=t.values.length;if(1===r)i=[.5,1];else{var o=0;i=function(t){if(t.isPolar){var e=t.startAngle;return t.endAngle-e==2*Math.PI}return!1}(e)?e.isTransposed?[(o=1/r*Object(s.get)(n,"widthRatio.multiplePie",1/1.3))/2,1-o/2]:[0,1-1/r]:[o=1/r/2,1-o]}return i}function bt(t,e){var n={start:{x:0,y:0},end:{x:0,y:0}};t.isRect?n=function(t){var e,n;switch(t){case r.TOP:e={x:0,y:1},n={x:1,y:1};break;case r.RIGHT:e={x:1,y:0},n={x:1,y:1};break;case r.BOTTOM:e={x:0,y:0},n={x:1,y:0};break;case r.LEFT:e={x:0,y:0},n={x:0,y:1};break;default:e=n={x:0,y:0}}return{start:e,end:n}}(e):t.isPolar&&(n=function(t){var e,n;return t.isTransposed?(e={x:0,y:0},n={x:1,y:0}):(e={x:0,y:0},n={x:0,y:1}),{start:e,end:n}}(t));var i=n.start,o=n.end;return{start:t.convert(i),end:t.convert(o)}}function xt(t){var e=t.start,n=t.end;return e.x===n.x}function _t(t,e){var n=t.start,i=t.end;return xt(t)?(n.y-i.y)*(e.x-n.x)>0?1:-1:(i.x-n.x)*(n.y-e.y)>0?-1:1}function Ot(t,e){var n=Object(s.get)(t,["components","axis"],{});return Object(s.deepMix)({},Object(s.get)(n,["common"],{}),Object(s.deepMix)({},Object(s.get)(n,[e],{})))}function wt(t,e,n){var i=Object(s.get)(t,["components","axis"],{});return Object(s.deepMix)({},Object(s.get)(i,["common","title"],{}),Object(s.deepMix)({},Object(s.get)(i,[e,"title"],{})),n)}function jt(t){var e=t.x,n=t.y,i=t.circleCenter,r=n.start>n.end,o=t.isTransposed?t.convert({x:r?0:1,y:0}):t.convert({x:0,y:r?0:1}),a=[o.x-i.x,o.y-i.y],s=[1,0],c=o.y>i.y?B.vec2.angle(a,s):-1*B.vec2.angle(a,s),l=c+(e.end-e.start);return{center:i,radius:Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),startAngle:c,endAngle:l}}function St(t,e){return Object(s.isBoolean)(t)?!1!==t&&{}:Object(s.get)(t,[e])}function Mt(t,e){return Object(s.get)(t,"position",e)}function At(t,e){return Object(s.get)(e,["title","text"],vt(t))}var Ct=function(){function t(t,e){this.destroyed=!1,this.facets=[],this.view=t,this.cfg=Object(s.deepMix)({},this.getDefaultCfg(),e)}return t.prototype.init=function(){this.container||(this.container=this.createContainer());var t=this.view.getData();this.facets=this.generateFacets(t)},t.prototype.render=function(){this.renderViews()},t.prototype.update=function(){},t.prototype.clear=function(){this.clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},t.prototype.facetToView=function(t){var e=t.region,n=t.data,i=t.padding,r=void 0===i?this.cfg.padding:i,o=this.view.createView({region:e,padding:r});o.data(n||[]),t.view=o,this.beforeEachView(o,t);var a=this.cfg.eachView;return a&&a(o,t),this.afterEachView(o,t),o},t.prototype.createContainer=function(){return this.view.getLayer(i.FORE).addGroup()},t.prototype.renderViews=function(){this.createFacetViews()},t.prototype.createFacetViews=function(){var t=this;return this.facets.map((function(e){return t.facetToView(e)}))},t.prototype.clearFacetViews=function(){var t=this;Object(s.each)(this.facets,(function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)}))},t.prototype.parseSpacing=function(){var t=this.view.viewBBox,e=t.width,n=t.height;return this.cfg.spacing.map((function(t,i){return Object(s.isNumber)(t)?t/(0===i?e:n):parseFloat(t)/100}))},t.prototype.getFieldValues=function(t,e){var n=[],i={};return Object(s.each)(t,(function(t){var r=t[e];Object(s.isNil)(r)||i[r]||(n.push(r),i[r]=!0)})),n},t.prototype.getRegion=function(t,e,n,i){var r=Object(a.__read)(this.parseSpacing(),2),o=r[0],s=r[1],c=(1+o)/(0===e?1:e)-o,l=(1+s)/(0===t?1:t)-s,u={x:(c+o)*n,y:(l+s)*i};return{start:u,end:{x:u.x+c,y:u.y+l}}},t.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},t.prototype.getDefaultTitleCfg=function(){return{style:{fontSize:14,fill:"#666",fontFamily:this.view.getTheme().fontFamily}}},t.prototype.processAxis=function(t,e){var n=t.getOptions(),i=n.coordinate,r=t.geometries;if("rect"===Object(s.get)(i,"type","rect")&&r.length){Object(s.isNil)(n.axes)&&(n.axes={});var o=n.axes,c=Object(a.__read)(r[0].getXYFields(),2),l=c[0],u=c[1],h=St(o,l),f=St(o,u);!1!==h&&(n.axes[l]=this.getXAxisOption(l,o,h,e)),!1!==f&&(n.axes[u]=this.getYAxisOption(u,o,f,e))}},t.prototype.getFacetDataFilter=function(t){return function(e){return Object(s.every)(t,(function(t){var n=t.field,i=t.value;return!(!Object(s.isNil)(i)&&n)||e[n]===i}))}},t}(),Et={},It=function(t){return Et[Object(s.lowerCase)(t)]},Pt=function(t,e){Et[Object(s.lowerCase)(t)]=e},Tt=function(){function t(t,e){this.context=t,this.cfg=e,t.addAction(this)}return t.prototype.applyCfg=function(t){Object(s.assign)(this,t)},t.prototype.init=function(){this.applyCfg(this.cfg)},t.prototype.destroy=function(){this.context.removeAction(this),this.context=null},t}(),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.execute=function(){this.callback&&this.callback(this.context)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.callback=null},e}(Tt),Lt={};function kt(t){var e=Lt[t];return Object(s.get)(e,"ActionClass")}function Dt(t,e,n){Lt[t]={ActionClass:e,cfg:n}}function Bt(t,e){var n=new Ft(e);return n.callback=t,n.name="callback",n}function Nt(t,e){for(var n=[t[0]],i=1,r=t.length;i=a[l]?1:0,f=u>Math.PI?1:0,p=n.convert(s),d=ht(n,p);if(d>=.5)if(u===2*Math.PI){var g={x:(s.x+a.x)/2,y:(s.y+a.y)/2},y=n.convert(g);c.push(["A",d,d,0,f,h,y.x,y.y]),c.push(["A",d,d,0,f,h,p.x,p.y])}else c.push(["A",d,d,0,f,h,p.x,p.y]);return c}(n,i,t)):o.push(Nt(a,t));break;case"a":o.push(Rt(a,t));break;case"z":default:o.push(a)}})),function(t){Object(s.each)(t,(function(e,n){if("a"===e[0].toLowerCase()){var i=t[n-1],r=t[n+1];r&&"a"===r[0].toLowerCase()?i&&"l"===i[0].toLowerCase()&&(i[0]="M"):i&&"a"===i[0].toLowerCase()&&r&&"l"===r[0].toLowerCase()&&(r[0]="M")}}))}(o),o}var Wt=n(30);function Xt(t,e){return Ut(t.event.target,e)}function Ht(t,e){var n=t.getCanvasBBox(),i=n.width,r=n.height;return i>0&&r>0&&(i>=e||r>=e)}function Ut(t,e){var n=t.getCanvasBBox();return Ht(t,e)?n:null}function qt(t,e){return t.event.maskShapes.map((function(t){return Ut(t,e)})).filter((function(t){return!!t}))}function Zt(t,e){return Ht(t,e)?t.attr("path"):null}function $t(t){var e,n=t.event.target;return n&&(e=n.get("element")),e}function Kt(t){var e,n=t.event.target;return n&&(e=n.get("delegateObject")),e}function Qt(t){var e=t.event.gEvent;return!(e&&e.fromShape&&e.toShape&&e.fromShape.get("element")===e.toShape.get("element"))}function Jt(t){return t&&t.component&&t.component.isList()}function te(t){return t&&t.component&&t.component.isSlider()}function ee(t){var e=t.event.target;return e&&"mask"===(null==e?void 0:e.get("name"))||ne(t)}function ne(t){var e;return"multi-mask"===(null===(e=t.event.target)||void 0===e?void 0:e.get("name"))}function ie(t,e){var n=t.event.target;if(ne(t))return function(t,e){if("path"===t.event.target.get("type")){var n=function(t,e){return t.event.maskShapes.map((function(t){return Zt(t,e)}))}(t,e);return n.length>0?n.flatMap((function(e){return he(t.view,e)})):null}var i=qt(t,e);if(i.length>0)return i.flatMap((function(e){return le(t.view,e)}));return null}(t,e);if("path"===n.get("type")){var i=function(t,e){return Zt(t.event.target,e)}(t,e);if(!i)return;return he(t.view,i)}var r=Xt(t,e);return r?le(t.view,r):null}function re(t,e,n){if(ne(t))return function(t,e,n){var i=qt(t,n);if(i.length>0)return i.flatMap((function(n){return oe(n,t,e)}));return null}(t,e,n);var i=Xt(t,n);return i?oe(i,t,e):null}function oe(t,e,n){var i=e.view,r=ye(i,n,{x:t.x,y:t.y}),o=ye(i,n,{x:t.maxX,y:t.maxY});return le(n,{minX:r.x,minY:r.y,maxX:o.x,maxY:o.y})}function ae(t){var e=t.geometries,n=[];return Object(s.each)(e,(function(t){var e=t.elements;n=n.concat(e)})),t.views&&t.views.length&&Object(s.each)(t.views,(function(t){n=n.concat(ae(t))})),n}function se(t,e){var n=t.geometries,i=[];return Object(s.each)(n,(function(t){var n=t.getElementsBy((function(t){return t.hasState(e)}));i=i.concat(n)})),i}function ce(t,e){var n=t.getModel().data;return Object(s.isArray)(n)?n[0][e]:n[e]}function le(t,e){var n=ae(t),i=[];return Object(s.each)(n,(function(t){var n,r,o=t.shape.getCanvasBBox();n=e,(r=o).minX>n.maxX||r.maxXn.maxY||r.maxY=e.x&&t.y<=e.y&&t.maxY>e.y}function ge(t){var e=t.parent,n=null;return e&&(n=e.views.filter((function(e){return e!==t}))),n}function ye(t,e,n){var i=function(t,e){return t.getCoordinate().invert(e)}(t,n);return e.getCoordinate().convert(i)}function ve(t,e,n,i){var r=!1;return Object(s.each)(t,(function(t){if(t[n]===e[n]&&t[i]===e[i])return r=!0,!1})),r}function me(t,e){var n=t.getScaleByField(e);return!n&&t.views&&Object(s.each)(t.views,(function(t){if(n=me(t,e))return!1})),n}var be=function(){function t(t){this.actions=[],this.event=null,this.cacheMap={},this.view=t}return t.prototype.cache=function(){for(var t=[],e=0;e=0&&e.splice(n,1)},t.prototype.getCurrentPoint=function(){var t=this.event;return t?t.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(t.clientX,t.clientY):{x:t.x,y:t.y}:null},t.prototype.getCurrentShape=function(){return Object(s.get)(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=fe(this.view),n=this.getCurrentPoint();return!!n&&!!e.find((function(e){var i=e.getBBox();return t?e.get("name")===t&&de(i,n):de(i,n)}))},t.prototype.destroy=function(){Object(s.each)(this.actions.slice(),(function(t){t.destroy()})),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},t}(),xe=function(){function t(t,e){this.view=t,this.cfg=e}return t.prototype.init=function(){this.initEvents()},t.prototype.initEvents=function(){},t.prototype.clearEvents=function(){},t.prototype.destroy=function(){this.clearEvents()},t}();function _e(t,e,n){var i=t.split(":"),r=i[0],o=e.getAction(r)||function(t,e){var n=Lt[t],i=null;return n&&((i=new(0,n.ActionClass)(e,n.cfg)).name=t,i.init()),i}(r,e);if(!o)throw new Error("There is no action named ".concat(r));return{action:o,methodName:i[1],arg:n}}function Oe(t){var e=t.action,n=t.methodName,i=t.arg;if(!e[n])throw new Error("Action(".concat(e.name,") doesn't have a method called ").concat(n));e[n](i)}var we="start",je="showEnable",Se="end",Me="rollback",Ae="processing",Ce=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.callbackCaches={},i.emitCaches={},i.steps=n,i}return Object(a.__extends)(e,t),e.prototype.init=function(){this.initContext(),t.prototype.init.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},e.prototype.initEvents=function(){var t=this;Object(s.each)(this.steps,(function(e,n){Object(s.each)(e,(function(e){var i=t.getActionCallback(n,e);i&&t.bindEvent(e.trigger,i)}))}))},e.prototype.clearEvents=function(){var t=this;Object(s.each)(this.steps,(function(e,n){Object(s.each)(e,(function(e){var i=t.getActionCallback(n,e);i&&t.offEvent(e.trigger,i)}))}))},e.prototype.initContext=function(){var t=this.view,e=new be(t);this.context=e;var n=this.steps;Object(s.each)(n,(function(t){Object(s.each)(t,(function(t){if(Object(s.isFunction)(t.action))t.actionObject={action:Bt(t.action,e),methodName:"execute"};else if(Object(s.isString)(t.action))t.actionObject=_e(t.action,e,t.arg);else if(Object(s.isArray)(t.action)){var n=t.action,i=Object(s.isArray)(t.arg)?t.arg:[t.arg];t.actionObject=[],Object(s.each)(n,(function(n,r){t.actionObject.push(_e(n,e,i[r]))}))}}))}))},e.prototype.isAllowStep=function(t){var e=this.currentStepName,n=this.steps;if(e===t)return!0;if(t===je)return!0;if(t===Ae)return e===we;if(t===we)return e!==Ae;if(t===Se)return e===Ae||e===we;if(t===Me){if(n[Se])return e===Se;if(e===we)return!0}return!1},e.prototype.isAllowExecute=function(t,e){if(this.isAllowStep(t)){var n=this.getKey(t,e);return(!e.once||!this.emitCaches[n])&&(!e.isEnable||e.isEnable(this.context))}return!1},e.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},e.prototype.afterExecute=function(t,e){t!==je&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,e);this.emitCaches[n]=!0},e.prototype.getKey=function(t,e){return t+e.trigger+e.action},e.prototype.getActionCallback=function(t,e){var n=this,i=this.context,r=this.callbackCaches,o=e.actionObject;if(e.action&&o){var a=this.getKey(t,e);if(!r[a]){var c=function(r){i.event=r,n.isAllowExecute(t,e)?(Object(s.isArray)(o)?Object(s.each)(o,(function(t){i.event=r,Oe(t)})):(i.event=r,Oe(o)),n.afterExecute(t,e),e.callback&&(i.event=r,e.callback(i))):i.event=null};e.debounce?r[a]=Object(s.debounce)(c,e.debounce.wait,e.debounce.immediate):e.throttle?r[a]=Object(s.throttle)(c,e.throttle.wait,{leading:e.throttle.leading,trailing:e.throttle.trailing}):r[a]=c}return r[a]}return null},e.prototype.bindEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.addEventListener(n[1],e):"document"===n[0]?document.addEventListener(n[1],e):this.view.on(t,e)},e.prototype.offEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.removeEventListener(n[1],e):"document"===n[0]?document.removeEventListener(n[1],e):this.view.off(t,e)},e}(xe),Ee={};function Ie(t){return Ee[Object(s.lowerCase)(t)]}function Pe(t,e){Ee[Object(s.lowerCase)(t)]=e}function Te(t){var e,n={point:{default:{fill:t.pointFillColor,r:t.pointSize,stroke:t.pointBorderColor,lineWidth:t.pointBorder,fillOpacity:t.pointFillOpacity},active:{stroke:t.pointActiveBorderColor,lineWidth:t.pointActiveBorder},selected:{stroke:t.pointSelectedBorderColor,lineWidth:t.pointSelectedBorder},inactive:{fillOpacity:t.pointInactiveFillOpacity,strokeOpacity:t.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:t.hollowPointFillColor,lineWidth:t.hollowPointBorder,stroke:t.hollowPointBorderColor,strokeOpacity:t.hollowPointBorderOpacity,r:t.hollowPointSize},active:{stroke:t.hollowPointActiveBorderColor,strokeOpacity:t.hollowPointActiveBorderOpacity},selected:{lineWidth:t.hollowPointSelectedBorder,stroke:t.hollowPointSelectedBorderColor,strokeOpacity:t.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:t.hollowPointInactiveBorderOpacity}},area:{default:{fill:t.areaFillColor,fillOpacity:t.areaFillOpacity,stroke:null},active:{fillOpacity:t.areaActiveFillOpacity},selected:{fillOpacity:t.areaSelectedFillOpacity},inactive:{fillOpacity:t.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:t.hollowAreaBorderColor,lineWidth:t.hollowAreaBorder,strokeOpacity:t.hollowAreaBorderOpacity},active:{fill:null,lineWidth:t.hollowAreaActiveBorder},selected:{fill:null,lineWidth:t.hollowAreaSelectedBorder},inactive:{strokeOpacity:t.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:t.intervalFillColor,fillOpacity:t.intervalFillOpacity},active:{stroke:t.intervalActiveBorderColor,lineWidth:t.intervalActiveBorder},selected:{stroke:t.intervalSelectedBorderColor,lineWidth:t.intervalSelectedBorder},inactive:{fillOpacity:t.intervalInactiveFillOpacity,strokeOpacity:t.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:t.hollowIntervalFillColor,stroke:t.hollowIntervalBorderColor,lineWidth:t.hollowIntervalBorder,strokeOpacity:t.hollowIntervalBorderOpacity},active:{stroke:t.hollowIntervalActiveBorderColor,lineWidth:t.hollowIntervalActiveBorder,strokeOpacity:t.hollowIntervalActiveBorderOpacity},selected:{stroke:t.hollowIntervalSelectedBorderColor,lineWidth:t.hollowIntervalSelectedBorder,strokeOpacity:t.hollowIntervalSelectedBorderOpacity},inactive:{stroke:t.hollowIntervalInactiveBorderColor,lineWidth:t.hollowIntervalInactiveBorder,strokeOpacity:t.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:t.lineBorderColor,lineWidth:t.lineBorder,strokeOpacity:t.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:t.lineActiveBorder},selected:{lineWidth:t.lineSelectedBorder},inactive:{strokeOpacity:t.lineInactiveBorderOpacity}}},i=function(t){return{title:{autoRotate:!0,position:"center",spacing:t.axisTitleSpacing,style:{fill:t.axisTitleTextFillColor,fontSize:t.axisTitleTextFontSize,lineHeight:t.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily},iconStyle:{fill:t.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:t.axisLabelOffset,style:{fill:t.axisLabelFillColor,fontSize:t.axisLabelFontSize,lineHeight:t.axisLabelLineHeight,fontFamily:t.fontFamily}},line:{style:{lineWidth:t.axisLineBorder,stroke:t.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:t.axisGridBorderColor,lineWidth:t.axisGridBorder,lineDash:t.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:t.axisTickLineBorder,stroke:t.axisTickLineBorderColor},alignTick:!0,length:t.axisTickLineLength},subTickLine:null,animate:!0}}(t),r=function(t){return{title:null,marker:{symbol:"circle",spacing:t.legendMarkerSpacing,style:{r:t.legendCircleMarkerSize,fill:t.legendMarkerColor}},itemName:{spacing:5,style:{fill:t.legendItemNameFillColor,fontFamily:t.fontFamily,fontSize:t.legendItemNameFontSize,lineHeight:t.legendItemNameLineHeight,fontWeight:t.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:t.legendPageNavigatorMarkerSize,inactiveFill:t.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:t.legendPageNavigatorMarkerInactiveFillOpacity,fill:t.legendPageNavigatorMarkerFillColor,opacity:t.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:t.legendPageNavigatorTextFillColor,fontSize:t.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:t.legendItemSpacing,itemMarginBottom:t.legendItemMarginBottom,padding:t.legendPadding}}(t);return{background:t.backgroundColor,defaultColor:t.brandColor,subColor:t.subColor,semanticRed:t.paletteSemanticRed,semanticGreen:t.paletteSemanticGreen,padding:"auto",fontFamily:t.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:t.paletteQualitative10,colors20:t.paletteQualitative20,sequenceColors:t.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:function(t){var e=t.geometry.coordinate;if(e.isPolar&&e.isTransposed){var i=it(t.getModel(),e),r=(i.startAngle+i.endAngle)/2,o=7.5*Math.cos(r),a=7.5*Math.sin(r);return{matrix:B.ext.transform(null,[["t",o,a]])}}return n.interval.selected}}},"hollow-rect":{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},line:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},tick:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},funnel:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}},pyramid:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},line:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},dot:{default:{style:Object(a.__assign)(Object(a.__assign)({},n.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:Object(a.__assign)(Object(a.__assign)({},n.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:Object(a.__assign)(Object(a.__assign)({},n.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:Object(a.__assign)(Object(a.__assign)({},n.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:Object(a.__assign)(Object(a.__assign)({},n.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:Object(a.__assign)(Object(a.__assign)({},n.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:Object(a.__assign)(Object(a.__assign)({},n.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:Object(a.__assign)(Object(a.__assign)({},n.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hvh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},polygon:{polygon:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},point:{circle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},square:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},bowtie:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},diamond:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},hexagon:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},triangle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"triangle-down":{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"hollow-circle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-square":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-bowtie":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-diamond":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-hexagon":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle-down":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},cross:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},tick:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},plus:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},hyphen:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},line:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}}},area:{area:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},smooth:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},line:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"smooth-line":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}},schema:{candle:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},box:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}}},edge:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},arc:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},violin:{violin:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hollow:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"hollow-smooth":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}}},components:{axis:{common:i,top:{position:"top",grid:null,title:null,verticalLimitLength:.5},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:.5},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:Object(s.deepMix)({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:Object(s.deepMix)({},i.grid,{line:{type:"circle"}})}},legend:{common:r,right:{layout:"vertical",padding:t.legendVerticalPadding},left:{layout:"vertical",padding:t.legendVerticalPadding},top:{layout:"horizontal",padding:t.legendHorizontalPadding},bottom:{layout:"horizontal",padding:t.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:t.sliderRailHeight,defaultLength:t.sliderRailWidth,style:{fill:t.sliderRailFillColor,stroke:t.sliderRailBorderColor,lineWidth:t.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:t.sliderLabelTextFillColor,fontSize:t.sliderLabelTextFontSize,lineHeight:t.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},handler:{size:t.sliderHandlerWidth,style:{fill:t.sliderHandlerFillColor,stroke:t.sliderHandlerBorderColor}},slidable:!0,padding:r.padding}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:t.tooltipCrosshairsBorderColor,lineWidth:t.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e["".concat(W.TOOLTIP_CSS_CONST.CONTAINER_CLASS)]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:t.tooltipContainerFillColor,opacity:t.tooltipContainerFillOpacity,boxShadow:t.tooltipContainerShadow,borderRadius:"".concat(t.tooltipContainerBorderRadius,"px"),color:t.tooltipTextFillColor,fontSize:"".concat(t.tooltipTextFontSize,"px"),fontFamily:t.fontFamily,lineHeight:"".concat(t.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},e["".concat(W.TOOLTIP_CSS_CONST.TITLE_CLASS)]={marginBottom:"12px",marginTop:"12px"},e["".concat(W.TOOLTIP_CSS_CONST.LIST_CLASS)]={margin:0,listStyleType:"none",padding:0},e["".concat(W.TOOLTIP_CSS_CONST.LIST_ITEM_CLASS)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e["".concat(W.TOOLTIP_CSS_CONST.MARKER_CLASS)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e["".concat(W.TOOLTIP_CSS_CONST.VALUE_CLASS)]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:t.annotationArcBorderColor,lineWidth:t.annotationArcBorder},animate:!0},line:{style:{stroke:t.annotationLineBorderColor,lineDash:t.annotationLineDash,lineWidth:t.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textAlign:"start",fontFamily:t.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:t.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:t.annotationRegionBorder,stroke:t.annotationRegionBorderColor,fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:t.brandColor,lineWidth:2}},line:{style:{stroke:t.annotationLineBorderColor,lineWidth:t.annotationLineBorder},length:t.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:t.cSliderBackgroundFillColor,opacity:t.cSliderBackgroundFillOpacity},foregroundStyle:{fill:t.cSliderForegroundFillColor,opacity:t.cSliderForegroundFillOpacity},handlerStyle:{width:t.cSliderHandlerWidth,height:t.cSliderHandlerHeight,fill:t.cSliderHandlerFillColor,opacity:t.cSliderHandlerFillOpacity,stroke:t.cSliderHandlerBorderColor,lineWidth:t.cSliderHandlerBorder,radius:t.cSliderHandlerBorderRadius,highLightFill:t.cSliderHandlerHighlightFillColor},textStyle:{fill:t.cSliderTextFillColor,opacity:t.cSliderTextFillOpacity,fontSize:t.cSliderTextFontSize,lineHeight:t.cSliderTextLineHeight,fontWeight:t.cSliderTextFontWeight,stroke:t.cSliderTextBorderColor,lineWidth:t.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:t.scrollbarTrackFillColor,thumbColor:t.scrollbarThumbFillColor}},hover:{style:{thumbColor:t.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:t.labelFillColor,fontSize:t.labelFontSize,fontFamily:t.fontFamily,stroke:t.labelBorderColor,lineWidth:t.labelBorder},fillColorDark:t.labelFillColorDark,fillColorLight:t.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:t.innerLabelFillColor,fontSize:t.innerLabelFontSize,fontFamily:t.fontFamily,stroke:t.innerLabelBorderColor,lineWidth:t.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:t.overflowLabelFillColor,fontSize:t.overflowLabelFontSize,fontFamily:t.fontFamily,stroke:t.overflowLabelBorderColor,lineWidth:t.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:t.labelLineBorder}},autoRotate:!0}}}var Fe="#000",Le="#595959",ke="#8C8C8C",De="#BFBFBF",Be="#D9D9D9",Ne="#F0F0F0",Re="#FFFFFF",Ve="#D9D9D9",ze=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],Ge=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],Ye=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],We=function(t){void 0===t&&(t={});var e=t.paletteQualitative10,n=void 0===e?ze:e,i=t.paletteQualitative20,r=void 0===i?Ge:i,o=t.brandColor,s=void 0===o?n[0]:o,c={backgroundColor:"transparent",brandColor:s,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:n,paletteQualitative20:r,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:Ye,fontFamily:'"Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:De,axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Le,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Ve,axisTickLineBorderColor:De,axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Be,axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:ke,axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Be,axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:ke,legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:s,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Le,legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:Fe,legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Fe,legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:ke,legendPageNavigatorTextFontSize:12,sliderRailFillColor:Be,sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:ke,sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Ne,sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:De,annotationArcBorderColor:Be,annotationArcBorder:1,annotationLineBorderColor:De,annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Le,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Fe,annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:De,tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Le,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Le,labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Re,innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Le,overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Re,overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:De,cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:s,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Re,pointBorderOpacity:1,pointActiveBorderColor:Fe,pointSelectedBorder:2,pointSelectedBorderColor:Fe,pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:s,hollowPointBorderOpacity:.95,hollowPointFillColor:Re,hollowPointActiveBorder:1,hollowPointActiveBorderColor:Fe,hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Fe,hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:s,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:s,areaFillOpacity:.25,areaActiveFillColor:s,areaActiveFillOpacity:.5,areaSelectedFillColor:s,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:s,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:Fe,hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Fe,hollowAreaInactiveBorderOpacity:.3,intervalFillColor:s,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Fe,intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Fe,intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:s,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Re,hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Fe,hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Fe,hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return Object(a.__assign)(Object(a.__assign)({},c),t)};We();function Xe(t){var e=t.styleSheet,n=void 0===e?{}:e,i=Object(a.__rest)(t,["styleSheet"]),r=We(n);return Object(s.deepMix)({},Te(r),i)}var He={default:Xe({})};function Ue(t){return Object(s.get)(He,Object(s.lowerCase)(t),He.default)}function qe(t,e){He[Object(s.lowerCase)(t)]=Xe(e)}function Ze(t,e,n){var i=n.translate(t),r=n.translate(e);return Object(s.isNumberEqual)(i,r)}function $e(t,e,n){var i=n.coordinate,r=n.getYScale(),o=r.field,a=i.invert(e),c=r.invert(a.y);return Object(s.find)(t,(function(t){var e=t._origin;return e[o][0]<=c&&e[o][1]>=c}))||t[t.length-1]}var Ke=Object(s.memoize)((function(t){if(t.isCategory)return 1;for(var e=t.values,n=e.length,i=t.translate(e[0]),r=i,o=0;or&&(r=s)}return(r-i)/(n-1)}));function Qe(t){var e,n,i,r=function(t){var e=Object(s.values)(t.attributes);return Object(s.filter)(e,(function(t){return Object(s.contains)(g,t.type)}))}(t);try{for(var o=Object(a.__values)(r),c=o.next();!c.done;c=o.next()){var l=c.value,u=l.getScale(l.type);if(u&&u.isLinear)if("cat"!==gt(u,Object(s.get)(t.scaleDefs,u.field),l.type,t.type)){i=u;break}}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}var h=t.getXScale(),f=t.getYScale();return i||f||h}function Je(t,e,n){if(0===e.length)return null;var i=n.type,r=n.getXScale(),o=n.getYScale(),a=r.field,c=o.field,l=null;if("heatmap"===i||"point"===i){for(var u=n.coordinate.invert(t),h=r.invert(u.x),f=o.invert(u.y),p=1/0,d=0;d(1+o)/2&&(s=a),i.translate(i.invert(s))}(t,n),_=m._origin[a],O=m._origin[c],w=b._origin[a],j=o.isLinear&&Object(s.isArray)(O);if(Object(s.isArray)(_)){for(d=0;d=x){if(!j){l=I;break}Object(s.isArray)(l)||(l=[]),l.push(I)}}Object(s.isArray)(l)&&(l=$e(l,t,n))}else{var S=void 0;if(r.isLinear||"timeCat"===r.type){if((x>r.translate(w)||xr.max||xMath.abs(r.translate(S._origin[a])-x)&&(b=S)}var P=Ke(n.getXScale());return!l&&Math.abs(r.translate(b._origin[a])-x)<=P/2&&(l=b),l}function tn(t,e,n,i){var r,o;void 0===n&&(n=""),void 0===i&&(i=!1);var c,l=t._origin,u=function(t,e,n){var i=e.getAttribute("position").getFields(),r=e.scales,o=Object(s.isFunction)(n)||!n?i[0]:n,a=r[o],c=a?a.getText(t[o]):t[o]||o;return Object(s.isFunction)(n)?n(c,t):c}(l,e,n),h=e.tooltipOption,f=e.theme.defaultColor,p=[];function d(e,n){if(i||!Object(s.isNil)(n)&&""!==n){var r={title:u,data:l,mappingData:t,name:e,value:n,color:t.color||f,marker:!0};p.push(r)}}if(Object(s.isObject)(h)){var g=h.fields,y=h.callback;if(y){var v=g.map((function(e){return t._origin[e]})),m=y.apply(void 0,Object(a.__spreadArray)([],Object(a.__read)(v),!1)),b=Object(a.__assign)({data:t._origin,mappingData:t,title:u,color:t.color||f,marker:!0},m);p.push(b)}else{var x=e.scales;try{for(var _=Object(a.__values)(g),O=_.next();!O.done;O=_.next()){var w=O.value;if(!Object(s.isNil)(l[w])){var j=x[w];d(vt(j),c=j.getText(l[w]))}}}catch(t){r={error:t}}finally{try{O&&!O.done&&(o=_.return)&&o.call(_)}finally{if(r)throw r.error}}}}else{var S=Qe(e);c=function(t,e){var n=t[e.field];return Object(s.isArray)(n)?n.map((function(t){return e.getText(t)})).join("-"):e.getText(n)}(l,S),d(function(t,e){var n,i=e.getGroupScales();if(i.length&&(n=i[0]),n){var r=n.field;return n.getText(t[r])}return vt(Qe(e))}(l,e),c)}return p}function en(t,e,n,i){var r,o,c=i.showNil,l=[],u=t.dataArray;if(!Object(s.isEmpty)(u)){t.sort(u);try{for(var h=Object(a.__values)(u),f=h.next();!f.done;f=h.next()){var p=Je(e,f.value,t);if(p){var d=t.getElementId(p),g=t.elementsMap[d];if("heatmap"===t.type||g.visible){var y=tn(p,t,n,c);y.length&&l.push(y)}}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}return l}function nn(t,e,n,i){var r=i.showNil,o=[],a=t.container.getShape(e.x,e.y);if(a&&a.get("visible")&&a.get("origin")){var s=tn(a.get("origin").mappingData,t,n,r);s.length&&o.push(s)}return o}function rn(t,e,n){var i,r,o=[],s=t.geometries,c=n.shared,l=n.title,u=n.reversed;try{for(var h=Object(a.__values)(s),f=h.next();!f.done;f=h.next()){var p=f.value;if(p.visible&&!1!==p.tooltipOption){var d=p.type,g=void 0;(g=["point","edge","polygon"].includes(d)?nn(p,e,l,n):["area","line","path","heatmap"].includes(d)||!1!==c?en(p,e,l,n):nn(p,e,l,n)).length&&(u&&g.reverse(),o.push(g))}}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(i)throw i.error}}return o}function on(t){void 0===t&&(t=0);var e=Object(s.isArray)(t)?t:[t];switch(e.length){case 0:e=[0,0,0,0];break;case 1:e=new Array(4).fill(e[0]);break;case 2:e=Object(a.__spreadArray)(Object(a.__spreadArray)([],Object(a.__read)(e),!1),Object(a.__read)(e),!1);break;case 3:e=Object(a.__spreadArray)(Object(a.__spreadArray)([],Object(a.__read)(e),!1),[e[1]],!1);break;default:e=e.slice(0,4)}return e}var an={};function sn(t,e){an[t]=e}var cn=function(){function t(t){this.option=this.wrapperOption(t)}return t.prototype.update=function(t){return this.option=this.wrapperOption(t),this},t.prototype.hasAction=function(t){var e=this.option.actions;return Object(s.some)(e,(function(e){return e[0]===t}))},t.prototype.create=function(t,e){var n=this.option,i=n.type,r=n.cfg,o="theta"===i,s=Object(a.__assign)({start:t,end:e},r),c=function(t){return G[t.toLowerCase()]}(o?"polar":i);return this.coordinate=new c(s),this.coordinate.type=i,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},t.prototype.adjust=function(t,e){return this.coordinate.update({start:t,end:e}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},t.prototype.rotate=function(t){return this.option.actions.push(["rotate",t]),this},t.prototype.reflect=function(t){return this.option.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.option.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},t.prototype.getOption=function(){return this.option},t.prototype.getCoordinate=function(){return this.coordinate},t.prototype.wrapperOption=function(t){return Object(a.__assign)({type:"rect",actions:[],cfg:{}},t)},t.prototype.execActions=function(t){var e=this,n=this.option.actions;Object(s.each)(n,(function(n){var i,r=Object(a.__read)(n),o=r[0],c=r.slice(1);(!!Object(s.isNil)(t)||t.includes(o))&&(i=e.coordinate)[o].apply(i,Object(a.__spreadArray)([],Object(a.__read)(c),!1))}))},t}(),ln=function(){function t(t,e,n){this.view=t,this.gEvent=e,this.data=n,this.type=e.type}return t.fromData=function(e,n,i){return new t(e,new w.Event(n,{}),i)},Object.defineProperty(t.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},t.prototype.clone=function(){return new t(this.view,this.gEvent,this.data)},t}();function un(t){var e=t.getController("axis"),n=t.getController("legend"),i=t.getController("annotation");[e,t.getController("slider"),t.getController("scrollbar"),n,i].forEach((function(t){t&&t.layout()}))}var hn=function(){function t(){this.scales=new Map,this.syncScales=new Map}return t.prototype.createScale=function(t,e,n,i){var r=n,o=this.getScaleMeta(i);if(0===e.length&&o){var a=o.scale,c={type:a.type};a.isCategory&&(c.values=a.values),r=Object(s.deepMix)(c,o.scaleDef,n)}var l=yt(t,e,r);return this.cacheScale(l,n,i),l},t.prototype.sync=function(t,e){var n=this;this.syncScales.forEach((function(i,r){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,c=[];Object(s.each)(i,(function(t){var e=n.getScale(t);a=Object(s.isNumber)(e.max)?Math.max(a,e.max):a,o=Object(s.isNumber)(e.min)?Math.min(o,e.min):o,Object(s.each)(e.values,(function(t){c.includes(t)||c.push(t)}))})),Object(s.each)(i,(function(i){var r=n.getScale(i);if(r.isContinuous)r.change({min:o,max:a,values:c});else if(r.isCategory){var l=r.range,u=n.getScaleMeta(i);c&&!Object(s.get)(u,["scaleDef","range"])&&(l=mt(Object(s.deepMix)({},r,{values:c}),t,e)),r.change({values:c,range:l})}}))}))},t.prototype.cacheScale=function(t,e,n){var i=this.getScaleMeta(n);i&&i.scale.type===t.type?(!function(t,e){if("identity"!==t.type&&"identity"!==e.type){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);t.change(n)}}(i.scale,t),i.scaleDef=e):(i={key:n,scale:t,scaleDef:e},this.scales.set(n,i));var r=this.getSyncKey(i);if(i.syncKey=r,this.removeFromSyncScales(n),r){var o=this.syncScales.get(r);o||(o=[],this.syncScales.set(r,o)),o.push(n)}},t.prototype.getScale=function(t){var e=this.getScaleMeta(t);if(!e){var n=Object(s.last)(t.split("-")),i=this.syncScales.get(n);i&&i.length&&(e=this.getScaleMeta(i[0]))}return e&&e.scale},t.prototype.deleteScale=function(t){var e=this.getScaleMeta(t);if(e){var n=e.syncKey,i=this.syncScales.get(n);if(i&&i.length){var r=i.indexOf(t);-1!==r&&i.splice(r,1)}}this.scales.delete(t)},t.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},t.prototype.removeFromSyncScales=function(t){var e=this;this.syncScales.forEach((function(n,i){var r=n.indexOf(t);if(-1!==r)return n.splice(r,1),0===n.length&&e.syncScales.delete(i),!1}))},t.prototype.getSyncKey=function(t){var e=t.scale,n=t.scaleDef,i=e.field,r=Object(s.get)(n,["sync"]);return!0===r?i:!1===r?void 0:r},t.prototype.getScaleMeta=function(t){return this.scales.get(t)},t}(),fn=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=t,this.right=e,this.bottom=n,this.left=i}return t.instance=function(e,n,i,r){return void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=0),new t(e,n,i,r)},t.prototype.max=function(t){var e=Object(a.__read)(t,4),n=e[0],i=e[1],r=e[2],o=e[3];return this.top=Math.max(this.top,n),this.right=Math.max(this.right,i),this.bottom=Math.max(this.bottom,r),this.left=Math.max(this.left,o),this},t.prototype.shrink=function(t){var e=Object(a.__read)(t,4),n=e[0],i=e[1],r=e[2],o=e[3];return this.top+=n,this.right+=i,this.bottom+=r,this.left+=o,this},t.prototype.inc=function(t,e){var n=t.width,i=t.height;switch(e){case r.TOP:case r.TOP_LEFT:case r.TOP_RIGHT:this.top+=i;break;case r.RIGHT:case r.RIGHT_TOP:case r.RIGHT_BOTTOM:this.right+=n;break;case r.BOTTOM:case r.BOTTOM_LEFT:case r.BOTTOM_RIGHT:this.bottom+=i;break;case r.LEFT:case r.LEFT_TOP:case r.LEFT_BOTTOM:this.left+=n}return this},t.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},t.prototype.clone=function(){return new(t.bind.apply(t,Object(a.__spreadArray)([void 0],Object(a.__read)(this.getPadding()),!1)))},t}();function pn(t){var e=t.padding;if(!function(t){return!Object(s.isNumber)(t)&&!Object(s.isArray)(t)}(e))return new(fn.bind.apply(fn,Object(a.__spreadArray)([void 0],Object(a.__read)(on(e)),!1)));var n=t.viewBBox,i=new fn,r=[],c=[],l=[];return Object(s.each)(t.getComponents(),(function(t){var e=t.type;e===o.AXIS?r.push(t):[o.LEGEND,o.SLIDER,o.SCROLLBAR].includes(e)?c.push(t):e!==o.GRID&&e!==o.TOOLTIP&&l.push(t)})),Object(s.each)(r,(function(t){var e=t.component.getLayoutBBox(),r=new lt(e.x,e.y,e.width,e.height).exceed(n);i.max(r)})),Object(s.each)(c,(function(t){var e=t.component,n=t.direction,r=e.getLayoutBBox(),o=e.get("padding"),a=new lt(r.x,r.y,r.width,r.height).expand(o);i.inc(a,n)})),Object(s.each)(l,(function(t){var e=t.component,n=t.direction,r=e.getLayoutBBox(),o=new lt(r.x,r.y,r.width,r.height);i.inc(o,n)})),i}function dn(t,e,n){var i=n.instance();e.forEach((function(t){t.autoPadding=i.max(t.autoPadding.getPadding())}))}var gn=function(t){function e(e){var n=t.call(this,{visible:e.visible})||this;n.views=[],n.geometries=[],n.controllers=[],n.interactions={},n.limitInPlot=!1,n.options={data:[],animate:!0},n.usedControllers=Object.keys(an),n.scalePool=new hn,n.layoutFunc=un,n.isPreMouseInPlot=!1,n.isDataChanged=!1,n.isCoordinateChanged=!1,n.createdScaleKeys=new Map,n.onCanvasEvent=function(t){var e=t.name;if(!e.includes(":")){var i=n.createViewEvent(t);n.doPlotEvent(i),n.emit(e,i)}},n.onDelegateEvents=function(t){var e=t.name;if(e.includes(":")){var i=n.createViewEvent(t);n.emit(e,i)}};var i=e.id,r=void 0===i?Object(s.uniqueId)("view"):i,o=e.parent,c=e.canvas,l=e.backgroundGroup,u=e.middleGroup,h=e.foregroundGroup,f=e.region,p=void 0===f?{start:{x:0,y:0},end:{x:1,y:1}}:f,d=e.padding,g=e.appendPadding,y=e.theme,v=e.options,m=e.limitInPlot,b=e.syncViewPadding;return n.parent=o,n.canvas=c,n.backgroundGroup=l,n.middleGroup=u,n.foregroundGroup=h,n.region=p,n.padding=d,n.appendPadding=g,n.options=Object(a.__assign)(Object(a.__assign)({},n.options),v),n.limitInPlot=m,n.id=r,n.syncViewPadding=b,n.themeObject=Object(s.isObject)(y)?Object(s.deepMix)({},Ue("default"),Xe(y)):Ue(y),n.init(),n}return Object(a.__extends)(e,t),e.prototype.setLayout=function(t){this.layoutFunc=t},e.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},e.prototype.render=function(t,e){void 0===t&&(t=!1),this.emit(c.BEFORE_RENDER,ln.fromData(this,c.BEFORE_RENDER,e)),this.paint(t),this.emit(c.AFTER_RENDER,ln.fromData(this,c.AFTER_RENDER,e)),!1===this.visible&&this.changeVisible(!1)},e.prototype.clear=function(){var t=this;this.emit(c.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var e=this.geometries,n=0;n');F.appendChild(L);var k=_(F,l,r,o),D=new(v(y).Canvas)(Object(a.__assign)({container:L,pixelRatio:m,localRefresh:O,supportCSSTransform:M},k));return(n=t.call(this,{parent:null,canvas:D,backgroundGroup:D.addGroup({zIndex:d}),middleGroup:D.addGroup({zIndex:p}),foregroundGroup:D.addGroup({zIndex:f}),padding:u,appendPadding:h,visible:j,options:E,limitInPlot:I,theme:P,syncViewPadding:T})||this).onResize=Object(s.debounce)((function(){n.forceFit()}),300),n.ele=F,n.canvas=D,n.width=k.width,n.height=k.height,n.autoFit=l,n.localRefresh=O,n.renderer=y,n.wrapperElement=L,n.updateCanvasStyle(),n.bindAutoFit(),n.initDefaultInteractions(C),n}return Object(a.__extends)(e,t),e.prototype.initDefaultInteractions=function(t){var e=this;Object(s.each)(t,(function(t){e.interaction(t)}))},e.prototype.aria=function(t){!1===t?this.ele.removeAttribute("aria-label"):this.ele.setAttribute("aria-label",t.label)},e.prototype.changeSize=function(t,e){return this.width===t&&this.height===e||(this.emit(c.BEFORE_CHANGE_SIZE),this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this.emit(c.AFTER_CHANGE_SIZE)),this},e.prototype.clear=function(){t.prototype.clear.call(this),this.aria(!1)},e.prototype.destroy=function(){var e,n;t.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),e=this.wrapperElement,(n=e.parentNode)&&n.removeChild(e),this.wrapperElement=null},e.prototype.changeVisible=function(e){return t.prototype.changeVisible.call(this,e),this.wrapperElement.style.display=e?"":"none",this},e.prototype.forceFit=function(){if(!this.destroyed){var t=_(this.ele,!0,this.width,this.height),e=t.width,n=t.height;this.changeSize(e,n)}},e.prototype.updateCanvasStyle=function(){Object(b.e)(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(vn),bn=function(){function t(t){this.visible=!0,this.components=[],this.view=t}return t.prototype.clear=function(t){Object(s.each)(this.components,(function(t){t.component.destroy()})),this.components=[]},t.prototype.destroy=function(){this.clear()},t.prototype.getComponents=function(){return this.components},t.prototype.changeVisible=function(t){this.visible!==t&&(this.components.forEach((function(e){t?e.component.show():e.component.hide()})),this.visible=t)},t}();var xn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isLocked=!1,e}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.isVisible=function(){return!1!==this.view.getOptions().tooltip},e.prototype.render=function(){},e.prototype.showTooltip=function(t){if(this.point=t,this.isVisible()){var e=this.view,n=this.getTooltipItems(t);if(n.length){var i=this.getTitle(n),r={x:n[0].x,y:n[0].y};e.emit("tooltip:show",ln.fromData(e,"tooltip:show",Object(a.__assign)({items:n,title:i},t)));var o=this.getTooltipCfg(),c=o.follow,l=o.showMarkers,u=o.showCrosshairs,h=o.showContent,f=o.marker,p=this.items,d=this.title;if(Object(s.isEqual)(d,i)&&Object(s.isEqual)(p,n)?(this.tooltip&&c&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()):(e.emit("tooltip:change",ln.fromData(e,"tooltip:change",Object(a.__assign)({items:n,title:i},t))),(Object(s.isFunction)(h)?h(n):h)&&(this.tooltip||this.renderTooltip(),this.tooltip.update(Object(s.mix)({},o,{items:this.getItemsAfterProcess(n),title:i},c?t:{})),this.tooltip.show()),l&&this.renderTooltipMarkers(n,f)),this.items=n,this.title=i,u){var g=Object(s.get)(o,["crosshairs","follow"],!1);this.renderCrosshairs(g?t:r,o)}}else this.hideTooltip()}},e.prototype.hideTooltip=function(){if(this.getTooltipCfg().follow){var t=this.tooltipMarkersGroup;t&&t.hide();var e=this.xCrosshair,n=this.yCrosshair;e&&e.hide(),n&&n.hide();var i=this.tooltip;i&&i.hide(),this.view.emit("tooltip:hide",ln.fromData(this.view,"tooltip:hide",{})),this.point=null}else this.point=null},e.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},e.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},e.prototype.isTooltipLocked=function(){return this.isLocked},e.prototype.clear=function(){var t=this.tooltip,e=this.xCrosshair,n=this.yCrosshair,i=this.tooltipMarkersGroup;t&&(t.hide(),t.clear()),e&&e.clear(),n&&n.clear(),i&&i.clear(),(null==t?void 0:t.get("customContent"))&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},e.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},e.prototype.changeVisible=function(t){if(this.visible!==t){var e=this.tooltip,n=this.tooltipMarkersGroup,i=this.xCrosshair,r=this.yCrosshair;t?(e&&e.show(),n&&n.show(),i&&i.show(),r&&r.show()):(e&&e.hide(),n&&n.hide(),i&&i.hide(),r&&r.hide()),this.visible=t}},e.prototype.getTooltipItems=function(t){var e,n,i,r,o,c,l=this.findItemsFromView(this.view,t);if(l.length){l=Object(s.flatten)(l);try{for(var u=Object(a.__values)(l),h=u.next();!h.done;h=u.next()){var f=h.value;try{for(var p=(i=void 0,Object(a.__values)(f)),d=p.next();!d.done;d=p.next()){var g=d.value,y=g.mappingData,v=y.x,m=y.y;g.x=Object(s.isArray)(v)?v[v.length-1]:v,g.y=Object(s.isArray)(m)?m[m.length-1]:m}}catch(t){i={error:t}}finally{try{d&&!d.done&&(r=p.return)&&r.call(p)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}if(!1===this.getTooltipCfg().shared&&l.length>1){var b=l[0],x=Math.abs(t.y-b[0].y);try{for(var _=Object(a.__values)(l),O=_.next();!O.done;O=_.next()){var w=O.value,j=Math.abs(t.y-w[0].y);j<=x&&(b=w,x=j)}}catch(t){o={error:t}}finally{try{O&&!O.done&&(c=_.return)&&c.call(_)}finally{if(o)throw o.error}}l=[b]}return function(t){for(var e=[],n=function(n){var i=t[n];Object(s.find)(e,(function(t){return t.color===i.color&&t.name===i.name&&t.value===i.value&&t.title===i.title}))||e.push(i)},i=0;i'+i+"":i}})},e.prototype.getTitle=function(t){var e=t[0].title||t[0].name;return this.title=e,e},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),e={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),i=new K(Object(a.__assign)(Object(a.__assign)({parent:t.get("el").parentNode,region:e},n),{visible:!1,crosshairs:null}));i.init(),this.tooltip=i},e.prototype.renderTooltipMarkers=function(t,e){var n,i,r=this.getTooltipMarkersGroup(),o=this.view.getRootView(),c=o.limitInPlot;try{for(var l=Object(a.__values)(t),u=l.next();!u.done;u=l.next()){var h=u.value,f=h.x,p=h.y;if(c||(null==r?void 0:r.getClip())){var d=pt(o.getCoordinate()),g=d.type,y=d.attrs;null==r||r.setClip({type:g,attrs:y})}else null==r||r.setClip(void 0);var v=this.view.getTheme(),m=Object(s.get)(v,["components","tooltip","marker"],{}),b=Object(a.__assign)(Object(a.__assign)({fill:h.color,symbol:"circle",shadowColor:h.color},Object(s.isFunction)(e)?Object(a.__assign)(Object(a.__assign)({},m),e(h)):e),{x:f,y:p});r.addShape("marker",{attrs:b})}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}},e.prototype.renderCrosshairs=function(t,e){var n=Object(s.get)(e,["crosshairs","type"],"x");"x"===n?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,e)):"y"===n?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,e)):"xy"===n&&(this.renderXCrosshairs(t,e),this.renderYCrosshairs(t,e))},e.prototype.renderXCrosshairs=function(t,e){var n,i,r=this.getViewWithGeometry(this.view).getCoordinate();if(r.isRect)r.isTransposed?(n={x:r.start.x,y:t.y},i={x:r.end.x,y:t.y}):(n={x:t.x,y:r.end.y},i={x:t.x,y:r.start.y});else{var o=ft(r,t),a=r.getCenter(),c=r.getRadius();i=tt(a.x,a.y,c,o),n=a}var l=Object(s.deepMix)({start:n,end:i,container:this.getTooltipCrosshairsGroup()},Object(s.get)(e,"crosshairs",{}),this.getCrosshairsText("x",t,e));delete l.type;var u=this.xCrosshair;u?u.update(l):(u=new W.Crosshair.Line(l)).init(),u.render(),u.show(),this.xCrosshair=u},e.prototype.renderYCrosshairs=function(t,e){var n,i,r=this.getViewWithGeometry(this.view).getCoordinate();if(r.isRect){var o=void 0,a=void 0;r.isTransposed?(o={x:t.x,y:r.end.y},a={x:t.x,y:r.start.y}):(o={x:r.start.x,y:t.y},a={x:r.end.x,y:t.y}),n={start:o,end:a},i="Line"}else n={center:r.getCenter(),radius:ht(r,t),startAngle:r.startAngle,endAngle:r.endAngle},i="Circle";delete(n=Object(s.deepMix)({container:this.getTooltipCrosshairsGroup()},n,Object(s.get)(e,"crosshairs",{}),this.getCrosshairsText("y",t,e))).type;var c=this.yCrosshair;c?r.isRect&&"circle"===c.get("type")||!r.isRect&&"line"===c.get("type")?(c=new W.Crosshair[i](n)).init():c.update(n):(c=new W.Crosshair[i](n)).init(),c.render(),c.show(),this.yCrosshair=c},e.prototype.getCrosshairsText=function(t,e,n){var i=Object(s.get)(n,["crosshairs","text"]),r=Object(s.get)(n,["crosshairs","follow"]),o=this.items;if(i){var a=this.getViewWithGeometry(this.view),c=o[0],l=a.getXScale(),u=a.getYScales()[0],h=void 0,f=void 0;if(r){var p=this.view.getCoordinate().invert(e);h=l.invert(p.x),f=u.invert(p.y)}else h=c.data[l.field],f=c.data[u.field];var d="x"===t?h:f;return Object(s.isFunction)(i)?i=i(t,d,o,e):i.content=d,{text:i}}},e.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},e.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):((t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"})).toFront(),this.tooltipMarkersGroup=t),t},e.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||((t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1})).toBack(),this.tooltipCrosshairsGroup=t),t},e.prototype.findItemsFromView=function(t,e){var n,i;if(!1===t.getOptions().tooltip)return[];var r=rn(t,e,this.getTooltipCfg());try{for(var o=Object(a.__values)(t.views),s=o.next();!s.done;s=o.next()){var c=s.value;r=r.concat(this.findItemsFromView(c,e))}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return r},e.prototype.getViewWithGeometry=function(t){var e=this;return t.geometries.length?t:Object(s.find)(t.views,(function(t){return e.getViewWithGeometry(t)}))},e.prototype.getItemsAfterProcess=function(t){var e=this.getTooltipCfg().customItems;return(e||function(t){return t})(t)},e}(bn),_n={};function On(t){return _n[t.toLowerCase()]}function wn(t,e){_n[t.toLowerCase()]=e}var jn={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Sn={interval:function(t){return{enter:{animation:t.isRect?t.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:t.isPolar&&t.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},Mn={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(t){var e;return t.isRect?e=t.isTransposed?"grow-in-x":"grow-in-y":(e="grow-in-xy",t.isPolar&&t.isTransposed&&(e="wave-in")),{animation:e}},schema:function(t){return{animation:t.isRect?t.isTransposed?"grow-in-x":"grow-in-y":"grow-in-xy"}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function An(t,e,n){var i=Sn[t];return i&&(Object(s.isFunction)(i)&&(i=i(e)),i=Object(s.deepMix)({},jn,i),n)?i[n]:i}function Cn(t,e,n){var i=Object(s.get)(t.get("origin"),"data","_origin"),r=e.animation,o=function(t,e){return{delay:Object(s.isFunction)(t.delay)?t.delay(e):t.delay,easing:Object(s.isFunction)(t.easing)?t.easing(e):t.easing,duration:Object(s.isFunction)(t.duration)?t.duration(e):t.duration,callback:t.callback,repeat:t.repeat}}(e,i);if(r){var a=On(r);a&&a(t,o,n)}else t.animate(n.toAttrs,o)}var En=function(t){function e(e){var n=t.call(this,e)||this;n.labelShape=[],n.states=[];var i=e.shapeFactory,r=e.container,o=e.offscreenGroup,a=e.elementIndex,s=e.visible,c=void 0===s||s;return n.shapeFactory=i,n.container=r,n.offscreenGroup=o,n.visible=c,n.elementIndex=a,n}return Object(a.__extends)(e,t),e.prototype.draw=function(t,e){void 0===e&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),!1===this.visible&&this.changeVisible(!1)},e.prototype.update=function(t){var e=this.shapeFactory,n=this.shape;if(n){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(n,t);var i=this.getOffscreenGroup(),r=e.drawShape(this.shapeType,t,i);r.cfg.data=this.data,r.cfg.origin=t,r.cfg.element=this,this.syncShapeStyle(n,r,this.getStates(),this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var e=this.shapeFactory,n=this.shape;if(n){var i=this.getAnimateCfg("leave");i?Cn(n,i,{coordinate:e.coordinate,toAttrs:Object(a.__assign)({},n.attr())}):n.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=[],this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,t.prototype.destroy.call(this)},e.prototype.changeVisible=function(e){t.prototype.changeVisible.call(this,e),e?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(t){t.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(t){t.hide()})))},e.prototype.setState=function(t,e){var n=this,i=n.states,r=n.shapeFactory,o=n.model,a=n.shape,s=n.shapeType,c=i.indexOf(t);if(e){if(c>-1)return;i.push(t),"active"!==t&&"selected"!==t||null==a||a.toFront()}else{if(-1===c)return;if(i.splice(c,1),"active"===t||"selected"===t){var l=this.geometry,u=l.sortZIndex,h=l.zIndexReversed?this.geometry.elements.length-this.elementIndex:this.elementIndex;u?a.setZIndex(h):a.set("zIndex",h)}}var f=r.drawShape(s,o,this.getOffscreenGroup());i.length?this.syncShapeStyle(a,f,i,null):this.syncShapeStyle(a,f,["reset"],null),f.remove(!0);var p={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",p),Object(W.propagationDelegate)(this.shape,"statechange",p)},e.prototype.clearStates=function(){var t=this,e=this.states;Object(s.each)(e,(function(e){t.setState(e,!1)})),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this.shape,e=this.labelShape,n={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return t&&(n=t.getCanvasBBox()),e&&e.forEach((function(t){var e=t.getCanvasBBox();n.x=Math.min(e.x,n.x),n.y=Math.min(e.y,n.y),n.minX=Math.min(e.minX,n.minX),n.minY=Math.min(e.minY,n.minY),n.maxX=Math.max(e.maxX,n.maxX),n.maxY=Math.max(e.maxY,n.maxY)})),n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this.shapeType,e=this.geometry,n=this.shapeFactory,i=e.stateOption,r=n.defaultShapeType,o=n.theme[t]||n.theme[r];this.statesStyle=Object(s.deepMix)({},o,i)}return this.statesStyle},e.prototype.getStateStyle=function(t,e){var n=this.getStatesStyle(),i=Object(s.get)(n,[t,"style"],{}),r=i[e]||i;return Object(s.isFunction)(r)?r(this):r},e.prototype.getAnimateCfg=function(t){var e=this,n=this.animate;if(n){var i=n[t];return i?Object(a.__assign)(Object(a.__assign)({},i),{callback:function(){var t;Object(s.isFunction)(i.callback)&&i.callback(),null===(t=e.geometry)||void 0===t||t.emit(l.AFTER_DRAW_ANIMATE)}}):i}return null},e.prototype.drawShape=function(t,e){var n;void 0===e&&(e=!1);var i=this.shapeFactory,r=this.container,o=this.shapeType;if(this.shape=i.drawShape(o,t,r),this.shape){this.setShapeInfo(this.shape,t);var c=this.shape.cfg.name;c?Object(s.isString)(c)&&(this.shape.cfg.name=["element",c]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var u=e?"enter":"appear",h=this.getAnimateCfg(u);h&&(null===(n=this.geometry)||void 0===n||n.emit(l.BEFORE_DRAW_ANIMATE),Cn(this.shape,h,{coordinate:i.coordinate,toAttrs:Object(a.__assign)({},this.shape.attr())}))}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var n=this;(t.cfg.origin=e,t.cfg.element=this,t.isGroup())&&t.get("children").forEach((function(t){n.setShapeInfo(t,e)}))},e.prototype.syncShapeStyle=function(t,e,n,i,r){var o,a=this;if(void 0===n&&(n=[]),void 0===r&&(r=0),t&&e){var c=t.get("clipShape"),u=e.get("clipShape");if(this.syncShapeStyle(c,u,n,i),t.isGroup())for(var h=t.get("children"),f=e.get("children"),p=0;p=0?e:n<=0?n:0},e.prototype.createAttrOption=function(t,e,n){if(Object(s.isNil)(e)||Object(s.isObject)(e))Object(s.isObject)(e)&&Object(s.isEqual)(Object.keys(e),["values"])?Object(s.set)(this.attributeOption,t,{fields:e.values}):Object(s.set)(this.attributeOption,t,e);else{var i={};Object(s.isNumber)(e)?i.values=[e]:i.fields=Yn(e),n&&(Object(s.isFunction)(n)?i.callback=n:i.values=n),Object(s.set)(this.attributeOption,t,i)}},e.prototype.initAttributes=function(){var t=this,e=this.attributes,n=this.attributeOption,i=this.theme,r=this.shapeType;this.groupScales=[];var o={},c=function(c){if(n.hasOwnProperty(c)){var l=n[c];if(!l)return{value:void 0};var u=Object(a.__assign)({},l),h=u.callback,f=u.values,p=u.fields,d=(void 0===p?[]:p).map((function(e){var n=t.scales[e];!o[e]&&g.includes(c)&&("cat"===gt(n,Object(s.get)(t.scaleDefs,e),c,t.type)&&(t.groupScales.push(n),o[e]=!0));return n}));u.scales=d,"position"!==c&&1===d.length&&"identity"===d[0].type?u.values=d[0].values:h||f||("size"===c?u.values=i.sizes:"shape"===c?u.values=i.shapes[r]||[]:"color"===c&&(d.length?u.values=d[0].values.length<=10?i.colors10:i.colors20:u.values=i.colors10));var y=k(c);e[c]=new y(u)}};for(var l in n){var u=c(l);if("object"===Xn(u))return u.value}},e.prototype.processData=function(t){var e,n;this.hasSorted=!1;for(var i=this.getAttribute("position").scales.filter((function(t){return t.isCategory})),r=this.groupData(t),o=[],s=0,c=r.length;so&&(o=u)}var h=this.scaleDefs,f={};rt.max&&!Object(s.get)(h,[i,"max"])&&(f.max=o),t.change(f)},e.prototype.beforeMapping=function(t){var e=t;if(this.sortable&&this.sort(e),this.generatePoints)for(var n=0,i=e.length;n1)for(var h=0;h0}))}var Jn=function(){function t(t){this.shapesMap={};var e=t.layout,n=t.container;this.layout=e,this.container=n}return t.prototype.render=function(t,e,n){return void 0===n&&(n=!1),Object(a.__awaiter)(this,void 0,void 0,(function(){var i,r,o,c,l,u,h,f,p=this;return Object(a.__generator)(this,(function(d){switch(d.label){case 0:if(i={},r=this.createOffscreenGroup(),!t.length)return[3,2];try{for(o=Object(a.__values)(t),c=o.next();!c.done;c=o.next())(l=c.value)&&(i[l.id]=this.renderLabel(l,r))}catch(t){h={error:t}}finally{try{c&&!c.done&&(f=o.return)&&f.call(o)}finally{if(h)throw h.error}}return[4,this.doLayout(t,e,i)];case 1:d.sent(),this.renderLabelLine(t,i),this.renderLabelBackground(t,i),this.adjustLabel(t,i),d.label=2;case 2:return u=this.shapesMap,Object(s.each)(i,(function(t,e){if(t.destroyed)delete i[e];else{if(u[e]){var r=t.get("data"),o=t.get("origin"),c=t.get("coordinate"),l=t.get("animateCfg"),h=u[e];!function t(e,n,i){var r=i.data,o=i.origin,a=i.animateCfg,c=i.coordinate,l=Object(s.get)(a,"update");e.set("data",r),e.set("origin",o),e.set("animateCfg",a),e.set("coordinate",c),e.set("visible",n.get("visible")),(e.getChildren()||[]).forEach((function(s,u){var h=n.getChildByIndex(u);if(h){s.set("data",r),s.set("origin",o),s.set("animateCfg",a),s.set("coordinate",c);var f=rt(s,h);l?Cn(s,l,{toAttrs:f,coordinate:c}):s.attr(f),h.isGroup()&&t(s,h,i)}else e.removeChild(s),s.remove(!0)})),Object(s.each)(n.getChildren(),(function(t,n){n>=e.getCount()&&(t.destroyed||e.add(t))}))}(h,i[e],{data:r,origin:o,animateCfg:l,coordinate:c}),i[e]=h}else{if(p.container.destroyed)return;p.container.add(t);var f=Object(s.get)(t.get("animateCfg"),n?"enter":"appear");f&&Cn(t,f,{toAttrs:Object(a.__assign)({},t.attr()),coordinate:t.get("coordinate")})}delete u[e]}})),Object(s.each)(u,(function(t){var e=Object(s.get)(t.get("animateCfg"),"leave");e?Cn(t,e,{toAttrs:null,coordinate:t.get("coordinate")}):t.remove(!0)})),this.shapesMap=i,r.destroy(),[2]}}))}))},t.prototype.clear=function(){this.container.clear(),this.shapesMap={}},t.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},t.prototype.renderLabel=function(t,e){var n,i=t.id,r=t.elementId,o=t.data,c=t.mappingData,l=t.coordinate,u=t.animate,h=t.content,f={id:i,elementId:r,capture:t.capture,data:o,origin:Object(a.__assign)(Object(a.__assign)({},c),{data:c._origin}),coordinate:l},p=e.addGroup(Object(a.__assign)({name:"label",animateCfg:!1!==this.animate&&null!==u&&!1!==u&&Object(s.deepMix)({},this.animate,u)},f));if(h.isGroup&&h.isGroup()||h.isShape&&h.isShape()){var d=h.getCanvasBBox(),g=d.width,y=d.height,v=Object(s.get)(t,"textAlign","left"),m=t.x;"center"===v?m-=g/2:"right"!==v&&"end"!==v||(m-=g),qn(h,m,t.y-y/2),n=h,p.add(h)}else{var b=Object(s.get)(t,["style","fill"]);n=p.addShape("text",Object(a.__assign)({attrs:Object(a.__assign)(Object(a.__assign)({x:t.x,y:t.y,textAlign:t.textAlign,textBaseline:Object(s.get)(t,"textBaseline","middle"),text:t.content},t.style),{fill:Object(s.isNull)(b)?t.color:b})},f))}return t.rotate&&Zn(n,t.rotate),p},t.prototype.doLayout=function(t,e,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,r=this;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return this.layout?(i=Object(s.isArray)(this.layout)?this.layout:[this.layout],[4,Promise.all(i.map((function(i){var o=Ln(Object(s.get)(i,"type",""));if(o){var a=[],c=[];return Object(s.each)(n,(function(t,n){a.push(t),c.push(e[t.get("elementId")])})),o(t,a,c,r.region,i.cfg)}})))]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},t.prototype.renderLabelLine=function(t,e){Object(s.each)(t,(function(t){var n=Object(s.get)(t,"coordinate");if(t&&n){var i=n.getCenter(),r=n.getRadius();if(t.labelLine){var o=Object(s.get)(t,"labelLine",{}),c=t.id,l=o.path;if(!l){var u=tt(i.x,i.y,r,t.angle);l=[["M",u.x,u.y],["L",t.x,t.y]]}var h=e[c];h.destroyed||h.addShape("path",{capture:!1,attrs:Object(a.__assign)({path:l,stroke:t.color?t.color:Object(s.get)(t,["style","fill"],"#000"),fill:null},o.style),id:c,origin:t.mappingData,data:t.data,coordinate:t.coordinate})}}}))},t.prototype.renderLabelBackground=function(t,e){Object(s.each)(t,(function(t){var n=Object(s.get)(t,"coordinate"),i=Object(s.get)(t,"background");if(i&&n){var r=t.id,o=e[r];if(!o.destroyed){var c=o.getChildren()[0];if(c){var l=Kn(o,t,i.padding),u=l.rotation,h=Object(a.__rest)(l,["rotation"]),f=o.addShape("rect",{attrs:Object(a.__assign)(Object(a.__assign)({},h),i.style||{}),id:r,origin:t.mappingData,data:t.data,coordinate:t.coordinate});if(f.setZIndex(-1),u){var p=c.getMatrix();f.setMatrix(p)}}}}}))},t.prototype.createOffscreenGroup=function(){return new(this.container.getGroupBase())({})},t.prototype.adjustLabel=function(t,e){Object(s.each)(t,(function(t){if(t){var n=t.id,i=e[n];if(!i.destroyed){var r=i.findAll((function(t){return"path"!==t.get("type")}));Object(s.each)(r,(function(e){e&&(t.offsetX&&e.attr("x",e.attr("x")+t.offsetX),t.offsetY&&e.attr("y",e.attr("y")+t.offsetY))}))}}}))},t}();function ti(t){var e=0;return Object(s.each)(t,(function(t){e+=t})),e/t.length}var ei=function(){function t(t){this.geometry=t}return t.prototype.getLabelItems=function(t){var e=this,n=[],i=this.getLabelCfgs(t);return Object(s.each)(t,(function(t,r){var o=i[r];if(!o||Object(s.isNil)(t.x)||Object(s.isNil)(t.y))n.push(null);else{var c=Object(s.isArray)(o.content)?o.content:[o.content];o.content=c;var l=c.length;Object(s.each)(c,(function(i,r){if(Object(s.isNil)(i)||""===i)n.push(null);else{var c=Object(a.__assign)(Object(a.__assign)({},o),e.getLabelPoint(o,t,r));c.textAlign||(c.textAlign=e.getLabelAlign(c,r,l)),c.offset<=0&&(c.labelLine=null),n.push(c)}}))}})),n},t.prototype.render=function(t,e){return void 0===e&&(e=!1),Object(a.__awaiter)(this,void 0,void 0,(function(){var n,i,r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return n=this.getLabelItems(t),i=this.getLabelsRenderer(),r=this.getGeometryShapes(),[4,i.render(n,r,e)];case 1:return o.sent(),[2]}}))}))},t.prototype.clear=function(){var t=this.labelsRenderer;t&&t.clear()},t.prototype.destroy=function(){var t=this.labelsRenderer;t&&t.destroy(),this.labelsRenderer=null},t.prototype.getCoordinate=function(){return this.geometry.coordinate},t.prototype.getDefaultLabelCfg=function(t,e){var n=this.geometry,i=n.type,r=n.theme;return"polygon"===i||"interval"===i&&"middle"===e||t<0&&!["line","point","path"].includes(i)?Object(s.get)(r,"innerLabels",{}):Object(s.get)(r,"labels",{})},t.prototype.getThemedLabelCfg=function(t){var e=this.geometry,n=this.getDefaultLabelCfg(),i=e.type,r=e.theme;return"polygon"===i||t.offset<0&&!["line","point","path"].includes(i)?Object(s.deepMix)({},n,r.innerLabels,t):Object(s.deepMix)({},n,r.labels,t)},t.prototype.setLabelPosition=function(t,e,n,i){},t.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=this.getOffsetVector(t);return e.isTransposed?n[0]:n[1]},t.prototype.getLabelOffsetPoint=function(t,e,n){var i=t.offset,r=this.getCoordinate().isTransposed,o=r?"x":"y",a=r?1:-1,s={x:0,y:0};return s[o]=e>0||1===n?i*a:i*a*-1,s},t.prototype.getLabelPoint=function(t,e,n){var i=this.getCoordinate(),r=t.content.length;function o(e,n,i){void 0===i&&(i=!1);var r=e;return Object(s.isArray)(r)&&(r=1===t.content.length?i?ti(r):r.length<=2?r[e.length-1]:ti(r):r[n]),r}var a={content:t.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"},c=Object(s.isArray)(e.shape)?e.shape[0]:e.shape,l="funnel"===c||"pyramid"===c;if("polygon"===this.geometry.type){var u=function(t,e){if(Object(s.isNumber)(t)&&Object(s.isNumber)(e))return[t,e];if(e=e,Q(t=t)||Q(e))return[J(t),J(e)];for(var n,i,r=-1,o=0,a=0,c=t.length-1,l=0;++r1&&0===e&&("right"===i?i="left":"left"===i&&(i="right"))}return i},t.prototype.getLabelId=function(t){var e=this.geometry,n=e.type,i=e.getXScale(),r=e.getYScale(),o=t._origin,a=e.getElementId(t);return"line"===n||"area"===n?a+=" ".concat(o[i.field]):"path"===n&&(a+=" ".concat(o[i.field],"-").concat(o[r.field])),a},t.prototype.getLabelsRenderer=function(){var t=this.geometry,e=t.labelsContainer,n=t.labelOption,i=t.canvasRegion,r=t.animateOption,o=this.geometry.coordinate,a=this.labelsRenderer;return a||(a=new Jn({container:e,layout:Object(s.get)(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=a),a.region=i,a.animate=!!r&&An("label",o),a},t.prototype.getLabelCfgs=function(t){var e=this,n=this.geometry,i=n.labelOption,r=n.scales,o=n.coordinate,c=i,l=c.fields,u=c.callback,h=c.cfg,f=l.map((function(t){return r[t]})),p=[];return Object(s.each)(t,(function(t,n){var i,r=t._origin,c=e.getLabelText(r,f);if(u){var d=l.map((function(t){return r[t]}));if(i=u.apply(void 0,Object(a.__spreadArray)([],Object(a.__read)(d),!1)),Object(s.isNil)(i))return void p.push(null)}var g=Object(a.__assign)(Object(a.__assign)({id:e.getLabelId(t),elementId:e.geometry.getElementId(t),data:r,mappingData:t,coordinate:o},h),i);Object(s.isFunction)(g.position)&&(g.position=g.position(r,t,n));var y=e.getLabelOffset(g.offset||0),v=e.getDefaultLabelCfg(y,g.position);(g=Object(s.deepMix)({},v,g)).offset=e.getLabelOffset(g.offset||0);var m=g.content;Object(s.isFunction)(m)?g.content=m(r,t,n):Object(s.isUndefined)(m)&&(g.content=c[0]),p.push(g)})),p},t.prototype.getLabelText=function(t,e){var n=[];return Object(s.each)(e,(function(e){var i=t[e.field];i=Object(s.isArray)(i)?i.map((function(t){return e.getText(t)})):e.getText(i),Object(s.isNil)(i)||""===i?n.push(null):n.push(i)})),n},t.prototype.getOffsetVector=function(t){void 0===t&&(t=0);var e=this.getCoordinate(),n=0;return Object(s.isNumber)(t)&&(n=t),e.isTransposed?e.applyMatrix(n,0):e.applyMatrix(0,n)},t.prototype.getGeometryShapes=function(){var t=this.geometry,e={};return Object(s.each)(t.elementsMap,(function(t,n){e[n]=t.shape})),Object(s.each)(t.getOffscreenGroup().getChildren(),(function(n){var i=t.getElementId(n.get("origin").mappingData);e[i]=n})),e},t}();function ni(t,e,n){if(!t)return n;var i;if(t.callback&&t.callback.length>1){var r=Array(t.callback.length-1).fill("");i=t.mapping.apply(t,Object(a.__spreadArray)([e],Object(a.__read)(r),!1)).join("")}else i=t.mapping(e).join("");return i||n}var ii={hexagon:function(t,e,n){var i=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+i,e-n/2],["L",t+i,e+n/2],["L",t,e+n],["L",t-i,e+n/2],["L",t-i,e-n/2],["Z"]]},bowtie:function(t,e,n){var i=n-1.5;return[["M",t-n,e-i],["L",t+n,e+i],["L",t+n,e-i],["L",t-n,e+i],["Z"]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},line:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]}},ri=["line","cross","tick","plus","hyphen"];function oi(t){var e=t.symbol;Object(s.isString)(e)&&ii[e]&&(t.symbol=ii[e])}function ai(t){return t.startsWith(r.LEFT)||t.startsWith(r.RIGHT)?"vertical":"horizontal"}function si(t,e,n,i,r){var o=n.getScale(n.type);if(o.isCategory){var c=o.field,l=e.getAttribute("color"),u=e.getAttribute("shape"),h=t.getTheme().defaultColor,f=e.coordinate.isPolar;return o.getTicks().map((function(n,p){var d,g=n.text,y=n.value,v=g,m=o.invert(y),b=0===t.filterFieldData(c,[(d={},d[c]=m,d)]).length;Object(s.each)(t.views,(function(t){var e;t.filterFieldData(c,[(e={},e[c]=m,e)]).length||(b=!0)}));var x,_,O=ni(l,m,h),w=ni(u,m,"point"),j=e.getShapeMarker(w,{color:O,isInPolar:f}),S=r;return Object(s.isFunction)(S)&&(S=S(v,p,Object(a.__assign)({name:v,value:m},Object(s.deepMix)({},i,j)))),function(t,e){var n=t.symbol;if(Object(s.isString)(n)&&-1!==ri.indexOf(n)){var i=Object(s.get)(t,"style",{}),r=Object(s.get)(i,"lineWidth",1),o=i.stroke||i.fill||e;t.style=Object(s.deepMix)({},t.style,{lineWidth:r,stroke:o,fill:null})}}(j=Object(s.deepMix)({},i,j,st(Object(a.__assign)({},S),["style"])),O),S&&S.style&&(j.style=(x=j.style,_=S.style,Object(s.isFunction)(_)?_(x):Object(s.deepMix)({},x,_))),oi(j),{id:m,name:v,value:m,marker:j,unchecked:b}}))}return[]}function ci(t,e){var n=Object(s.get)(t,["components","legend"],{});return Object(s.deepMix)({},Object(s.get)(n,["common"],{}),Object(s.deepMix)({},Object(s.get)(n,[e],{})))}function li(t){return!t&&(null==t||isNaN(t))}function ui(t){if(Object(s.isArray)(t))return li(t[1].y);var e=t.y;return Object(s.isArray)(e)?li(e[0]):li(e)}function hi(t,e,n){if(void 0===e&&(e=!1),void 0===n&&(n=!0),!t.length||1===t.length&&!n)return[];if(e){for(var i=[],r=0,o=t.length;r0&&(l[0][0]="L")),o=o.concat(l)})),o.push(["Z"])}return o}function Vi(t,e,n,i,r){for(var o=di(t,e,!e,"lineWidth"),a=t.connectNulls,s=t.isInCircle,c=hi(t.points,a,t.showSinglePoint),l=[],u=0,h=c.length;ui&&(i=r),r=e[0]})));var d=this.scales[f];try{for(var g=Object(a.__values)(t),y=g.next();!y.done;y=g.next()){var v=y.value,m=this.getDrawCfg(v),b=m.x,x=m.y,_=d.scale(v._origin[f]);this.drawGrayScaleBlurredCircle(b-c.x,x-l.y,n+i,_,p)}}catch(t){r={error:t}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}var O=p.getImageData(0,0,u,h);this.clearShadowCanvasCtx(),this.colorize(O),p.putImageData(O,0,0);var w=this.getImageShape();w.attr("x",c.x),w.attr("y",l.y),w.attr("width",u),w.attr("height",h),w.attr("img",p.canvas),w.set("origin",this.getShapeInfo(t))},e.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),e=this.coordinate;return Math.min(e.getWidth()/(4*t.scales[0].ticks.length),e.getHeight()/(4*t.scales[1].ticks.length))},e.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},e.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},e.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},e.prototype.drawGrayScaleBlurredCircle=function(t,e,n,i,r){var o=this.getGrayScaleBlurredCanvas();r.globalAlpha=i,r.drawImage(o,t-n,e-n)},e.prototype.colorize=function(t){for(var e=this.getAttribute("color"),n=t.data,i=this.paletteCache,r=3;re&&(i=e-(n=n?e/(1+i/n):0)),r+o>e&&(o=e-(r=r?e/(1+o/r):0)),[n||0,i||0,r||0,o||0]}function qi(t,e,n){var i=[];if(n.isRect){var r=n.isTransposed?{x:n.start.x,y:e[0].y}:{x:e[0].x,y:n.start.y},o=n.isTransposed?{x:n.end.x,y:e[2].y}:{x:e[3].x,y:n.end.y},c=Object(s.get)(t,["background","style","radius"]);if(c){var l=n.isTransposed?Math.abs(e[0].y-e[2].y):e[2].x-e[1].x,u=n.isTransposed?n.getWidth():n.getHeight(),h=Object(a.__read)(Ui(c,Math.min(l,u)),4),f=h[0],p=h[1],d=h[2],g=h[3],y=n.isTransposed&&n.isReflect("y"),v=y?0:1,m=function(t){return y?-t:t};i.push(["M",r.x,o.y+m(f)]),0!==f&&i.push(["A",f,f,0,0,v,r.x+f,o.y]),i.push(["L",o.x-p,o.y]),0!==p&&i.push(["A",p,p,0,0,v,o.x,o.y+m(p)]),i.push(["L",o.x,r.y-m(d)]),0!==d&&i.push(["A",d,d,0,0,v,o.x-d,r.y]),i.push(["L",r.x+g,r.y]),0!==g&&i.push(["A",g,g,0,0,v,r.x,r.y-m(g)])}else i.push(["M",r.x,r.y]),i.push(["L",o.x,r.y]),i.push(["L",o.x,o.y]),i.push(["L",r.x,o.y]),i.push(["L",r.x,r.y]);i.push(["z"])}if(n.isPolar){var b=n.getCenter(),x=it(t,n),_=x.startAngle,O=x.endAngle;if("theta"===n.type||n.isTransposed){var w=function(t){return Math.pow(t,2)};f=Math.sqrt(w(b.x-e[0].x)+w(b.y-e[0].y)),p=Math.sqrt(w(b.x-e[2].x)+w(b.y-e[2].y));i=et(b.x,b.y,f,n.startAngle,n.endAngle,p)}else i=et(b.x,b.y,n.getRadius(),_,O)}return i}function Zi(t,e,n){var i=[];return Object(s.isNil)(e)?n?i.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",(t[2].x+t[3].x)/2,(t[2].y+t[3].y)/2],["Z"]):i.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",t[2].x,t[2].y],["L",t[3].x,t[3].y],["Z"]):i.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",e[1].x,e[1].y],["L",e[0].x,e[0].y],["Z"]),i}function $i(t,e){return[e,t]}Rn("interval",{defaultShapeType:"rect",getDefaultPoints:function(t){return Xi(t)}});Vn("interval","rect",{draw:function(t,e){var n,i=di(t,!1,!0),r=e,o=null==t?void 0:t.background;if(o){r=e.addGroup({name:"interval-group"});var s=gi(t),c=qi(t,this.parsePoints(t.points),this.coordinate);r.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},s),{path:c}),capture:!1,zIndex:-1,name:"element-background"})}n=i.radius&&this.coordinate.isRect?function(t,e,n){var i,r,o,s,c,l,u,h=Object(a.__read)(Object(a.__spreadArray)([],Object(a.__read)(t),!1),4),f=h[0],p=h[1],d=h[2],g=h[3],y=Object(a.__read)("number"==typeof n?Array(4).fill(n):n,4),v=y[0],m=y[1],b=y[2],x=y[3];e.isTransposed&&(p=(i=Object(a.__read)($i(p,g),2))[0],g=i[1]),e.isReflect("y")&&(f=(r=Object(a.__read)($i(f,p),2))[0],p=r[1],d=(o=Object(a.__read)($i(d,g),2))[0],g=o[1]),e.isReflect("x")&&(f=(s=Object(a.__read)($i(f,g),2))[0],g=s[1],p=(c=Object(a.__read)($i(p,d),2))[0],d=c[1]);var _=[],O=function(t){return Math.abs(t)};return v=(l=Object(a.__read)(Ui([v,m,b,x],Math.min(O(g.x-f.x),O(p.y-f.y))).map((function(t){return O(t)})),4))[0],m=l[1],b=l[2],x=l[3],e.isTransposed&&(v=(u=Object(a.__read)([x,v,m,b],4))[0],m=u[1],b=u[2],x=u[3]),f.y1){r.sort();var y=function(t,e){var n=t.length,i=t;Object(s.isString)(i[0])&&(i=t.map((function(t){return e.translate(t)})));for(var r=i[1]-i[0],o=2;oa&&(r=a)}return r}(r,i);a=(i.max-i.min)/y,r.length>a&&(a=r.length)}var v=i.range,m=1/a,b=1;(n.isPolar?b=n.isTransposed&&a>1?d:g:(i.isLinear&&(m*=v[1]-v[0]),b=p),!Object(s.isNil)(l)&&l>=0)?m=(1-(a-1)*(l/c))/a:m*=b;if(t.getAdjust("dodge")){var x=function(t,e){if(e){var n=Object(s.flatten)(t);return Object(s.valuesOfKey)(n,e).length}return t.length}(o,t.getAdjust("dodge").dodgeBy);if(!Object(s.isNil)(u)&&u>=0)m=(m-u/c*(x-1))/x;else!Object(s.isNil)(l)&&l>=0?(m*=b,m/=x):m/=x;m=m>=0?m:0}if(!Object(s.isNil)(h)&&h>=0){var _=h/c;m>_&&(m=_)}if(!Object(s.isNil)(f)&&f>=0){var O=f/c;m0&&!Object(s.get)(r,[o,"min"])&&i.change({min:0}),l<=0&&!Object(s.get)(r,[o,"max"])&&i.change({max:0}))}},e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return n.background=this.background,n},e}(Hn),Ji=function(t){function e(e){var n=t.call(this,e)||this;n.type="line";var i=e.sortable,r=void 0!==i&&i;return n.sortable=r,n}return Object(a.__extends)(e,t),e}(Ni),tr=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"];function er(t,e,n,i,r){var o,s,c=di(e,r,!r,"r"),l=t.parsePoints(e.points),u=l[0];if(e.isStack)u=l[1];else if(l.length>1){var h=n.addGroup();try{for(var f=Object(a.__values)(l),p=f.next();!p.done;p=f.next()){var d=p.value;h.addShape({type:"marker",attrs:Object(a.__assign)(Object(a.__assign)(Object(a.__assign)({},c),{symbol:ii[i]||i}),d)})}}catch(t){o={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}return h}return n.addShape({type:"marker",attrs:Object(a.__assign)(Object(a.__assign)(Object(a.__assign)({},c),{symbol:ii[i]||i}),u)})}Rn("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(t){return yi(t)}});Object(s.each)(tr,(function(t){Vn("point","hollow-".concat(t),{draw:function(e,n){return er(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:ii[t]||t,style:{r:4.5,stroke:n,fill:null}}}})}));var nr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="point",e.shapeType="point",e.generatePoints=!0,e}return Object(a.__extends)(e,t),e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return Object(a.__assign)(Object(a.__assign)({},n),{isStack:!!this.getAdjust("stack")})},e}(Hn);Rn("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(t){var e=[];return Object(s.each)(t.x,(function(n,i){var r=t.y[i];e.push({x:n,y:r})})),e}});Vn("polygon","polygon",{draw:function(t,e){if(!Object(s.isEmpty)(t.points)){var n=di(t,!0,!0),i=this.parsePath(function(t){for(var e=t[0],n=1,i=[["M",e.x,e.y]];n2?"weight":"normal";if(t.isInCircle){var s={x:0,y:1};return"normal"===o?n=function(t,e,n){var i=sr(e,n),r=[["M",t.x,t.y]];return r.push(i),r}(r[0],r[1],s):(i.fill=i.stroke,n=function(t,e){var n=sr(t[1],e),i=sr(t[3],e),r=[["M",t[0].x,t[0].y]];return r.push(i),r.push(["L",t[3].x,t[3].y]),r.push(["L",t[2].x,t[2].y]),r.push(n),r.push(["L",t[1].x,t[1].y]),r.push(["L",t[0].x,t[0].y]),r.push(["Z"]),r}(r,s)),n=this.parsePath(n),e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:n})})}if("normal"===o)return n=nt(((r=this.parsePoints(r))[1].x+r[0].x)/2,r[0].y,Math.abs(r[1].x-r[0].x)/2,Math.PI,2*Math.PI),e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:n})});var c=ar(r[1],r[3]),l=ar(r[2],r[0]);return n=[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],c,["L",r[3].x,r[3].y],["L",r[2].x,r[2].y],l,["Z"]],n=this.parsePath(n),i.fill=i.stroke,e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:n})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),Vn("edge","smooth",{draw:function(t,e){var n=di(t,!0,!1,"lineWidth"),i=t.points,r=this.parsePath(function(t,e){var n=ar(t,e),i=[["M",t.x,t.y]];return i.push(n),i}(i[0],i[1]));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}});Vn("edge","vhv",{draw:function(t,e){var n=di(t,!0,!1,"lineWidth"),i=t.points,r=this.parsePath(function(t,e){var n=[];n.push({x:t.x,y:t.y*(1-1/3)+e.y*(1/3)}),n.push({x:e.x,y:t.y*(1-1/3)+e.y*(1/3)}),n.push(e);var i=[["M",t.x,t.y]];return Object(s.each)(n,(function(t){i.push(["L",t.x,t.y])})),i}(i[0],i[1]));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),Vn("interval","funnel",{getPoints:function(t){return t.size=2*t.size,Xi(t)},draw:function(t,e){var n=di(t,!1,!0),i=this.parsePath(Zi(t.points,t.nextPoints,!1));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),Vn("interval","hollow-rect",{draw:function(t,e){var n=di(t,!0,!1),i=e,r=null==t?void 0:t.background;if(r){i=e.addGroup();var o=gi(t),s=qi(t,this.parsePoints(t.points),this.coordinate);i.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},o),{path:s}),capture:!1,zIndex:-1,name:"element-background"})}var c=this.parsePath(Hi(t.points)),l=i.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:c}),name:"interval"});return r?i:l},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}}),Vn("interval","line",{getPoints:function(t){return n=(e=t).x,i=e.y,r=e.y0,Object(s.isArray)(i)?i.map((function(t,e){return{x:Object(s.isArray)(n)?n[e]:n,y:t}})):[{x:n,y:r},{x:n,y:i}];var e,n,i,r},draw:function(t,e){var n=di(t,!0,!1,"lineWidth"),i=st(Object(a.__assign)({},n),["fill"]),r=this.parsePath(Hi(t.points,!1));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]},style:{r:5,stroke:t.color}}}}),Vn("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,Xi(t)},draw:function(t,e){var n=di(t,!1,!0),i=this.parsePath(Zi(t.points,t.nextPoints,!0));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),Vn("interval","tick",{getPoints:function(t){return function(t){var e,n,i,r=t.x,o=t.y,c=t.y0,l=t.size;Object(s.isArray)(o)?(n=(e=Object(a.__read)(o,2))[0],i=e[1]):(n=c,i=o);var u=r+l/2,h=r-l/2;return[{x:r,y:n},{x:r,y:i},{x:h,y:n},{x:u,y:n},{x:h,y:i},{x:u,y:i}]}(t)},draw:function(t,e){var n,i=di(t,!0,!1),r=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y]]);return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},style:{r:5,stroke:t.color}}}});function cr(t,e){var n=hi(t.points,t.connectNulls,t.showSinglePoint),i=[];return Object(s.each)(n,(function(t){var n=function(t,e){var n=[];return Object(s.each)(t,(function(i,r){var o=t[r+1];if(n.push(i),o){var a=function(t,e,n){var i,r=t.x,o=t.y,a=e.x,s=e.y;switch(n){case"hv":i=[{x:a,y:o}];break;case"vh":i=[{x:r,y:s}];break;case"hvh":var c=(a+r)/2;i=[{x:c,y:o},{x:c,y:s}];break;case"vhv":var l=(o+s)/2;i=[{x:r,y:l},{x:a,y:l}]}return i}(i,o,e);n=n.concat(a)}})),n}(t,e);i=i.concat(function(t){return t.map((function(t,e){return 0===e?["M",t.x,t.y]:["L",t.x,t.y]}))}(n))})),Object(a.__assign)(Object(a.__assign)({},di(t,!0,!1,"lineWidth")),{path:i})}function lr(t){var e=Object(s.isArray)(t)?t:[t],n=e[0],i=e[e.length-1],r=e.length>1?e[1]:n;return{min:n,max:i,min1:r,max1:e.length>3?e[3]:i,median:e.length>2?e[2]:r}}function ur(t,e,n){var i,r=n/2;if(Object(s.isArray)(e)){var o=lr(e),a=o.min,c=o.max,l=o.median,u=o.min1,h=t-r,f=t+r;i=[[h,c],[f,c],[t,c],[t,p=o.max1],[h,u],[h,p],[f,p],[f,u],[t,u],[t,a],[h,a],[f,a],[h,l],[f,l]]}else{e=Object(s.isNil)(e)?.5:e;var p,d=lr(t),g=(a=d.min,c=d.max,l=d.median,e-r),y=e+r;i=[[a,g],[a,y],[a,e],[u=d.min1,e],[u,g],[u,y],[p=d.max1,y],[p,g],[p,e],[c,e],[c,g],[c,y],[l,g],[l,y]]}return i.map((function(t){return{x:t[0],y:t[1]}}))}function hr(t){var e=(Object(s.isArray)(t)?t:[t]).sort((function(t,e){return e-t}));return function(t,e,n){if(Object(s.isString)(t))return t.padEnd(e,n);if(Object(s.isArray)(t)){var i=t.length;if(i1){var c=e.addGroup();try{for(var l=Object(a.__values)(o),u=l.next();!u.done;u=l.next()){var h=u.value;c.addShape("image",{attrs:{x:h.x-r/2,y:h.y-r,width:r,height:r,img:t.shape[1]}})}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return c}return e.addShape("image",{attrs:{x:s.x-r/2,y:s.y-r,width:r,height:r,img:t.shape[1]}})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),Object(s.each)(tr,(function(t){Vn("point",t,{draw:function(e,n){return er(this,e,n,t,!1)},getMarker:function(e){var n=e.color;return{symbol:ii[t]||t,style:{r:4.5,fill:n}}}})})),Vn("schema","box",{getPoints:function(t){return ur(t.x,t.y,t.size)},draw:function(t,e){var n,i=di(t,!0,!1),r=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y],["L",n[6].x,n[6].y],["L",n[7].x,n[7].y],["L",n[4].x,n[4].y],["Z"],["M",n[8].x,n[8].y],["L",n[9].x,n[9].y],["M",n[10].x,n[10].y],["L",n[11].x,n[11].y],["M",n[12].x,n[12].y],["L",n[13].x,n[13].y]]);return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:r,name:"schema"})})},getMarker:function(t){return{symbol:function(t,e,n){var i=ur(t,[e-6,e-3,e,e+3,e+6],n);return[["M",i[0].x+1,i[0].y],["L",i[1].x-1,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["M",i[4].x,i[4].y],["L",i[5].x,i[5].y],["L",i[6].x,i[6].y],["L",i[7].x,i[7].y],["L",i[4].x,i[4].y],["Z"],["M",i[8].x,i[8].y],["L",i[9].x,i[9].y],["M",i[10].x+1,i[10].y],["L",i[11].x-1,i[11].y],["M",i[12].x,i[12].y],["L",i[13].x,i[13].y]]},style:{r:6,lineWidth:1,stroke:t.color}}}}),Vn("schema","candle",{getPoints:function(t){return fr(t.x,t.y,t.size)},draw:function(t,e){var n,i=di(t,!0,!0),r=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["L",n[4].x,n[4].y],["L",n[5].x,n[5].y],["Z"],["M",n[6].x,n[6].y],["L",n[7].x,n[7].y]]);return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:r,name:"schema"})})},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){var i=fr(t,[e+7.5,e+3,e-3,e-7.5],n);return[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["L",i[4].x,i[4].y],["L",i[5].x,i[5].y],["Z"],["M",i[6].x,i[6].y],["L",i[7].x,i[7].y]]},style:{lineWidth:1,stroke:e,fill:e,r:6}}}}),Vn("polygon","square",{draw:function(t,e){if(!Object(s.isEmpty)(t.points)){var n=di(t,!0,!0),i=this.parsePoints(t.points);return e.addShape("rect",{attrs:Object(a.__assign)(Object(a.__assign)({},n),pr(i,t.size)),name:"polygon"})}},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),Vn("violin","smooth",{draw:function(t,e){var n=di(t,!0,!0),i=this.parsePath(pi(t.points));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{stroke:null,r:4,fill:t.color}}}}),Vn("violin","hollow",{draw:function(t,e){var n=di(t,!0,!1),i=this.parsePath(fi(t.points));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4,fill:null,stroke:t.color}}}}),Vn("violin","hollow-smooth",{draw:function(t,e){var n=di(t,!0,!1),i=this.parsePath(pi(t.points));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4,fill:null,stroke:t.color}}}});var dr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.getLabelValueDir=function(t){var e=t.points;return e[0].y<=e[2].y?1:-1},e.prototype.getLabelOffsetPoint=function(e,n,i,r){var o,s=t.prototype.getLabelOffsetPoint.call(this,e,n,i),c=this.getCoordinate(),l=c.isTransposed?"x":"y",u=this.getLabelValueDir(e.mappingData);return s=Object(a.__assign)(Object(a.__assign)({},s),((o={})[l]=s[l]*u,o)),c.isReflect("x")&&(s=Object(a.__assign)(Object(a.__assign)({},s),{x:-1*s.x})),c.isReflect("y")&&(s=Object(a.__assign)(Object(a.__assign)({},s),{y:-1*s.y})),s},e.prototype.getThemedLabelCfg=function(t){var e=this.geometry,n=this.getDefaultLabelCfg(),i=e.theme;return Object(s.deepMix)({},n,i.labels,"middle"===t.position?{offset:0}:{},t)},e.prototype.setLabelPosition=function(t,e,n,i){var r,o,a,c,l=this.getCoordinate(),u=l.isTransposed,h=e.points,f=l.convert(h[0]),p=l.convert(h[2]),d=this.getLabelValueDir(e),g=Object(s.isArray)(e.shape)?e.shape[0]:e.shape;if("funnel"===g||"pyramid"===g){var y=Object(s.get)(e,"nextPoints"),v=Object(s.get)(e,"points");if(y){var m=l.convert(v[0]),b=l.convert(v[1]),x=l.convert(y[0]),_=l.convert(y[1]);u?(r=Math.min(x.y,m.y),a=Math.max(x.y,m.y),o=(b.x+_.x)/2,c=(m.x+x.x)/2):(r=Math.min((b.y+_.y)/2,(m.y+x.y)/2),a=Math.max((b.y+_.y)/2,(m.y+x.y)/2),o=_.x,c=m.x)}else r=Math.min(p.y,f.y),a=Math.max(p.y,f.y),o=p.x,c=f.x}else r=Math.min(p.y,f.y),a=Math.max(p.y,f.y),o=p.x,c=f.x;switch(i){case"right":t.x=o,t.y=(r+a)/2,t.textAlign=Object(s.get)(t,"textAlign",d>0?"left":"right");break;case"left":t.x=c,t.y=(r+a)/2,t.textAlign=Object(s.get)(t,"textAlign",d>0?"left":"right");break;case"bottom":u&&(t.x=(o+c)/2),t.y=a,t.textAlign=Object(s.get)(t,"textAlign","center"),t.textBaseline=Object(s.get)(t,"textBaseline",d>0?"bottom":"top");break;case"middle":u&&(t.x=(o+c)/2),t.y=(r+a)/2,t.textAlign=Object(s.get)(t,"textAlign","center"),t.textBaseline=Object(s.get)(t,"textBaseline","middle");break;case"top":u&&(t.x=(o+c)/2),t.y=r,t.textAlign=Object(s.get)(t,"textAlign","center"),t.textBaseline=Object(s.get)(t,"textBaseline",d>0?"bottom":"top")}},e}(ei),gr=Math.PI/2,yr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=0;if(Object(s.isNumber)(t))n=t;else if(Object(s.isString)(t)&&-1!==t.indexOf("%")){var i=e.getRadius();e.innerRadius>0&&(i*=1-e.innerRadius),n=.01*parseFloat(t)*i}return n},e.prototype.getLabelItems=function(e){var n=t.prototype.getLabelItems.call(this,e),i=this.geometry.getYScale();return Object(s.map)(n,(function(t){if(t&&i){var e=i.scale(Object(s.get)(t.data,i.field));return Object(a.__assign)(Object(a.__assign)({},t),{percent:e})}return t}))},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate();if(t.labelEmit)e=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(n.isTransposed){var i=n.getCenter(),r=t.offset;e=Math.abs(t.x-i.x)<1?"center":t.angle>Math.PI||t.angle<=0?r>0?"left":"right":r>0?"right":"left"}else e="center";return e},e.prototype.getLabelPoint=function(t,e,n){var i,r=1,o=t.content[n];this.isToMiddle(e)?i=this.getMiddlePoint(e.points):(1===t.content.length&&0===n?n=1:0===n&&(r=-1),i=this.getArcPoint(e,n));var a=t.offset*r,s=this.getPointAngle(i),c=t.labelEmit,l=this.getCirclePoint(s,a,i,c);return 0===l.r?l.content="":(l.content=o,l.angle=s,l.color=e.color),l.rotate=t.autoRotate?this.getLabelRotate(s,a,c):t.rotate,l.start={x:i.x,y:i.y},l},e.prototype.getArcPoint=function(t,e){return void 0===e&&(e=0),Object(s.isArray)(t.x)||Object(s.isArray)(t.y)?{x:Object(s.isArray)(t.x)?t.x[e]:t.x,y:Object(s.isArray)(t.y)?t.y[e]:t.y}:{x:t.x,y:t.y}},e.prototype.getPointAngle=function(t){return ft(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,e,n,i){var r=this.getCoordinate(),o=r.getCenter(),s=ht(r,n);if(0===s)return Object(a.__assign)(Object(a.__assign)({},o),{r:s});var c=t;r.isTransposed&&s>e&&!i?c=t+2*Math.asin(e/(2*s)):s+=e;return{x:o.x+s*Math.cos(c),y:o.y+s*Math.sin(c),r:s}},e.prototype.getLabelRotate=function(t,e,n){var i=t+gr;return n&&(i-=gr),i&&(i>gr?i-=Math.PI:i<-gr&&(i+=Math.PI)),i},e.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),n=t.length,i={x:0,y:0};return Object(s.each)(t,(function(t){i.x+=t.x,i.y+=t.y})),i.x/=n,i.y/=n,i=e.convert(i)},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(ei),vr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultLayout="distribute",e}return Object(a.__extends)(e,t),e.prototype.getDefaultLabelCfg=function(e,n){var i=t.prototype.getDefaultLabelCfg.call(this,e,n);return Object(s.deepMix)({},i,Object(s.get)(this.geometry.theme,"pieLabels",{}))},e.prototype.getLabelOffset=function(e){return t.prototype.getLabelOffset.call(this,e)||0},e.prototype.getLabelRotate=function(t,e,n){var i;return e<0&&((i=t)>Math.PI/2&&(i-=Math.PI),i<-Math.PI/2&&(i+=Math.PI)),i},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate().getCenter();return e=t.angle<=Math.PI/2&&t.x>=n.x?"left":"right",t.offset<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e,n=this.getCoordinate(),i={x:Object(s.isArray)(t.x)?t.x[0]:t.x,y:t.y[0]},r={x:Object(s.isArray)(t.x)?t.x[1]:t.x,y:t.y[1]},o=ft(n,i);if(t.points&&t.points[0].y===t.points[1].y)e=o;else{var a=ft(n,r);o>=a&&(a+=2*Math.PI),e=o+(a-o)/2}return e},e.prototype.getCirclePoint=function(t,e){var n=this.getCoordinate(),i=n.getCenter(),r=n.getRadius()+e;return Object(a.__assign)(Object(a.__assign)({},tt(i.x,i.y,r,t)),{angle:t,r:r})},e}(yr);function mr(t,e,n){var i=t.filter((function(t){return!t.invisible}));i.sort((function(t,e){return t.y-e.y}));var r,o=!0,a=n.minY,s=n.maxY,c=Math.abs(a-s),l=0,u=Number.MIN_VALUE,h=i.map((function(t){return t.y>l&&(l=t.y),t.yc&&(c=l-a);o;)for(h.forEach((function(t){var e=(Math.min.apply(u,t.targets)+Math.max.apply(u,t.targets))/2;t.pos=Math.min(Math.max(u,e-t.size/2),c-t.size),t.pos=Math.max(0,t.pos)})),o=!1,r=h.length;r--;)if(r>0){var f=h[r-1],p=h[r];f.pos+f.size>p.pos&&(f.size+=p.size,f.targets=f.targets.concat(p.targets),f.pos+f.size>c&&(f.pos=c-f.size),h.splice(r,1),o=!0)}r=0,h.forEach((function(t){var n=a+e/2;t.targets.forEach((function(){i[r].y=t.pos+n,n+=e,r++}))}))}var br=function(){function t(t){void 0===t&&(t={}),this.bitmap={};var e=t.xGap,n=void 0===e?1:e,i=t.yGap,r=void 0===i?8:i;this.xGap=n,this.yGap=r}return t.prototype.hasGap=function(t){for(var e=!0,n=this.bitmap,i=Math.round(t.minX),r=Math.round(t.maxX),o=Math.round(t.minY),a=Math.round(t.maxY),s=i;s<=r;s+=1)if(n[s]){if(s===i||s===r){for(var c=o;c<=a;c++)if(n[s][c]){e=!1;break}}else if(n[s][o]||n[s][a]){e=!1;break}}else n[s]={};return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,n=Math.round(t.minX),i=Math.round(t.maxX),r=Math.round(t.minY),o=Math.round(t.maxY),a=n;a<=i;a+=1)e[a]||(e[a]={});for(a=n;a<=i;a+=this.xGap){for(var s=r;s<=o;s+=this.yGap)e[a][s]=!0;e[a][o]=!0}if(1!==this.yGap)for(a=r;a<=o;a+=1)e[n][a]=!0,e[i][a]=!0;if(1!==this.xGap)for(a=n;a<=i;a+=1)e[a][r]=!0,e[a][o]=!0},t.prototype.destroy=function(){this.bitmap={}},t}();function xr(t,e,n,i){var r=t.getCanvasBBox(),o=r.width,a=r.height,s={x:e,y:n,textAlign:"center"};switch(i){case 0:s.y-=a+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=a+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=a+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=a+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*a+2;break;case 6:s.y+=2*a+2;break;case 7:s.x+=o+1,s.textAlign="left";break;case 8:s.x-=o+1,s.textAlign="right"}return t.attr(s),t.getCanvasBBox()}function _r(t){if(t.length>4)return[];var e=function(t,e){return[e.x-t.x,e.y-t.y]};return[e(t[0],t[1]),e(t[1],t[2])]}function Or(t,e,n){void 0===e&&(e=0),void 0===n&&(n={x:0,y:0});var i=t.x,r=t.y;return{x:(i-n.x)*Math.cos(-e)+(r-n.y)*Math.sin(-e)+n.x,y:(n.x-i)*Math.sin(-e)+(r-n.y)*Math.cos(-e)+n.y}}function wr(t){var e=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],n=t.rotation;return n?[Or(e[0],n,e[0]),Or(e[1],n,e[0]),Or(e[2],n,e[0]),Or(e[3],n,e[0])]:e}function jr(t,e){if(t.length>4)return{min:0,max:0};var n=[];return t.forEach((function(t){var i,r;n.push((i=[t.x,t.y],r=e,(i[0]||0)*(r[0]||0)+(i[1]||0)*(r[1]||0)+(i[2]||0)*(r[2]||0)))})),{min:Math.min.apply(Math,Object(a.__spreadArray)([],Object(a.__read)(n),!1)),max:Math.max.apply(Math,Object(a.__spreadArray)([],Object(a.__read)(n),!1))}}function Sr(t,e){return t.max>e.min&&t.mint.x+t.width+n||e.x+e.widtht.y+t.height+n||e.y+e.height4)return[];var e=function(t,e){return[e.x-t.x,e.y-t.y]};return[e(t[0],t[1]),e(t[1],t[2])]}function e(t,e,n){void 0===e&&(e=0),void 0===n&&(n={x:0,y:0});var i=t.x,r=t.y;return{x:(i-n.x)*Math.cos(-e)+(r-n.y)*Math.sin(-e)+n.x,y:(n.x-i)*Math.sin(-e)+(r-n.y)*Math.cos(-e)+n.y}}function n(t){var n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i=t.rotation;return i?[e(n[0],i,n[0]),e(n[1],i,n[0]),e(n[2],i,n[0]),e(n[3],i,n[0])]:n}function i(t,e){if(t.length>4)return{min:0,max:0};var n=[];return t.forEach((function(t){var i,r;n.push((i=[t.x,t.y],r=e,(i[0]||0)*(r[0]||0)+(i[1]||0)*(r[1]||0)+(i[2]||0)*(r[2]||0)))})),{min:Math.min.apply(null,n),max:Math.max.apply(null,n)}}function r(t,e){return t.max>e.min&&t.mint.x+t.width+n||e.x+e.widtht.y+t.height+n||e.y+e.height=o.height:a.width>=o.width}(t,e,r)}))}function Dr(t,e,n){return t.some((function(t){return n(t,e)}))}function Br(t,e){return Dr(t,e,(function(t,e){var n,i,r,o=$n(t),a=$n(e);return n=o.getCanvasBBox(),i=a.getCanvasBBox(),void 0===(r=2)&&(r=0),Math.max(0,Math.min(n.x+n.width+r,i.x+i.width+r)-Math.max(n.x-r,i.x-r))*Math.max(0,Math.min(n.y+n.height+r,i.y+i.height+r)-Math.max(n.y-r,i.y-r))>0}))}function Nr(t,e,n){return t.some((function(t){return n(t,e)}))}function Rr(t,e){return Nr(t,e,(function(t,e){var n,i,r,o=$n(t),a=$n(e);return n=o.getCanvasBBox(),i=a.getCanvasBBox(),void 0===(r=2)&&(r=0),Math.max(0,Math.min(n.x+n.width+r,i.x+i.width+r)-Math.max(n.x-r,i.x-r))*Math.max(0,Math.min(n.y+n.height+r,i.y+i.height+r)-Math.max(n.y-r,i.y-r))>0}))}var Vr=Object(s.memoize)((function(t,e){void 0===e&&(e={});var n=e.fontSize,i=e.fontFamily,r=e.fontWeight,o=e.fontStyle,a=e.fontVariant,c=(Fr||(Fr=document.createElement("canvas").getContext("2d")),Fr);return c.font=[o,a,r,"".concat(n,"px"),i].join(" "),c.measureText(Object(s.isString)(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),Object(a.__spreadArray)([t],Object(a.__read)(Object(s.values)(e)),!1).join("")}));function zr(t,e,n,i,r){var o,s,c=n.start,l=n.end,u=n.getWidth(),h=n.getHeight();"y"===r?(o=c.x+u/2,s=i.yc.x?i.x:c.x,s=c.y+h/2):"xy"===r&&(n.isPolar?(o=n.getCenter().x,s=n.getCenter().y):(o=(c.x+l.x)/2,s=(c.y+l.y)/2));var f=function(t,e,n){var i,r=Object(a.__read)(e,2),o=r[0],s=r[1];return t.applyToMatrix([o,s,1]),"x"===n?(t.setMatrix(B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]])),i=B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])):"y"===n?(t.setMatrix(B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",1,.01],["t",o,s]])),i=B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",1,100],["t",o,s]])):"xy"===n&&(t.setMatrix(B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",.01,.01],["t",o,s]])),i=B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",100,100],["t",o,s]])),i}(t,[o,s],r);t.animate({matrix:f},e)}function Gr(t,e){var n,i=Object(Di.getArcParams)(t,e),r=i.startAngle,o=i.endAngle;return!Object(s.isNumberEqual)(r,.5*-Math.PI)&&r<.5*-Math.PI&&(r+=2*Math.PI),!Object(s.isNumberEqual)(o,.5*-Math.PI)&&o<.5*-Math.PI&&(o+=2*Math.PI),0===e[5]&&(r=(n=Object(a.__read)([o,r],2))[0],o=n[1]),Object(s.isNumberEqual)(r,1.5*Math.PI)&&(r=-.5*Math.PI),Object(s.isNumberEqual)(o,-.5*Math.PI)&&!Object(s.isNumberEqual)(r,o)&&(o=1.5*Math.PI),{startAngle:r,endAngle:o}}function Yr(t){var e;return"M"===t[0]||"L"===t[0]?e=[t[1],t[2]]:"a"!==t[0]&&"A"!==t[0]&&"C"!==t[0]||(e=[t[t.length-2],t[t.length-1]]),e}function Wr(t){var e,n,i,r=t.filter((function(t){return"A"===t[0]||"a"===t[0]}));if(0===r.length)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var o=r[0],c=r.length>1?r[1]:r[0],l=t.indexOf(o),u=t.indexOf(c),h=Yr(t[l-1]),f=Yr(t[u-1]),p=Gr(h,o),d=p.startAngle,g=p.endAngle,y=Gr(f,c),v=y.startAngle,m=y.endAngle;Object(s.isNumberEqual)(d,v)&&Object(s.isNumberEqual)(g,m)?(n=d,i=g):(n=Math.min(d,v),i=Math.max(g,m));var b=o[1],x=r[r.length-1][1];return b=0;s--){var c=this.getFacetsByLevel(t,s);try{for(var l=(e=void 0,Object(a.__values)(c)),u=l.next();!u.done;u=l.next()){var h=u.value;this.isLeaf(h)||(h.originColIndex=h.columnIndex,h.columnIndex=this.getRegionIndex(h.children),h.columnValuesLength=r.length)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}}},e.prototype.getFacetsByLevel=function(t,e){var n=[];return t.forEach((function(t){t.rowIndex===e&&n.push(t)})),n},e.prototype.getRegionIndex=function(t){var e=t[0];return(t[t.length-1].columnIndex-e.columnIndex)/2+e.columnIndex},e.prototype.isLeaf=function(t){return!t.children||!t.children.length},e.prototype.getRows=function(){return this.cfg.fields.length+1},e.prototype.getChildFacets=function(t,e,n){var i=this,r=this.cfg.fields;if(!(r.length=n){var r=i.parsePosition([t[c],t[a.field]]);r&&f.push(r)}if(t[c]===h)return!1})),f},e.prototype.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,n=parseFloat(t[1])/100,i=this.view.getCoordinate(),r=i.start,o=i.end,a=Math.min(r.x,o.x),s=Math.min(r.y,o.y);return{x:i.getWidth()*e+a,y:i.getHeight()*n+s}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,n=t.end,i=t.getWidth(),r=t.getHeight(),o={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y)};return{x:o.x,y:o.y,minX:o.x,minY:o.y,maxX:o.x+i,maxY:o.y+r,width:i,height:r}},e.prototype.getAnnotationCfg=function(t,e,n){var i=this,r=this.view.getCoordinate(),o=this.view.getCanvas(),c={};if(Object(s.isNil)(e))return null;var l=e.start,u=e.end,h=e.position,f=this.parsePosition(l),p=this.parsePosition(u),d=this.parsePosition(h);if(!(!["arc","image","line","region","regionFilter"].includes(t)||f&&p))return null;if(["text","dataMarker","html"].includes(t)&&!d)return null;if("arc"===t){var g=e,y=(g.start,g.end,Object(a.__rest)(g,["start","end"])),v=ft(r,f),m=ft(r,p);v>m&&(m=2*Math.PI+m),c=Object(a.__assign)(Object(a.__assign)({},y),{center:r.getCenter(),radius:ht(r,f),startAngle:v,endAngle:m})}else if("image"===t){var b=e;b.start,b.end,y=Object(a.__rest)(b,["start","end"]);c=Object(a.__assign)(Object(a.__assign)({},y),{start:f,end:p,src:e.src})}else if("line"===t){var x=e;x.start,x.end,y=Object(a.__rest)(x,["start","end"]);c=Object(a.__assign)(Object(a.__assign)({},y),{start:f,end:p,text:Object(s.get)(e,"text",null)})}else if("region"===t){var _=e;_.start,_.end,y=Object(a.__rest)(_,["start","end"]);c=Object(a.__assign)(Object(a.__assign)({},y),{start:f,end:p})}else if("text"===t){var O=this.view.getData(),w=e,j=(w.position,w.content),S=(y=Object(a.__rest)(w,["position","content"]),j);Object(s.isFunction)(j)&&(S=j(O)),c=Object(a.__assign)(Object(a.__assign)(Object(a.__assign)({},d),y),{content:S})}else if("dataMarker"===t){var M=e,A=(M.position,M.point),C=M.line,E=M.text,I=M.autoAdjust,P=M.direction;y=Object(a.__rest)(M,["position","point","line","text","autoAdjust","direction"]);c=Object(a.__assign)(Object(a.__assign)(Object(a.__assign)({},y),d),{coordinateBBox:this.getCoordinateBBox(),point:A,line:C,text:E,autoAdjust:I,direction:P})}else if("dataRegion"===t){var T=e,F=T.start,L=T.end,k=T.region,D=(E=T.text,T.lineLength);y=Object(a.__rest)(T,["start","end","region","text","lineLength"]);c=Object(a.__assign)(Object(a.__assign)({},y),{points:this.getRegionPoints(F,L),region:k,text:E,lineLength:D})}else if("regionFilter"===t){var B=e,N=(B.start,B.end,B.apply),R=B.color,V=(y=Object(a.__rest)(B,["start","end","apply","color"]),this.view.geometries),z=[],G=function t(e){e&&(e.isGroup()?e.getChildren().forEach((function(e){return t(e)})):z.push(e))};Object(s.each)(V,(function(t){N?Object(s.contains)(N,t.type)&&Object(s.each)(t.elements,(function(t){G(t.shape)})):Object(s.each)(t.elements,(function(t){G(t.shape)}))})),c=Object(a.__assign)(Object(a.__assign)({},y),{color:R,shapes:z,start:f,end:p})}else if("shape"===t){var Y=e,W=Y.render,X=Object(a.__rest)(Y,["render"]);c=Object(a.__assign)(Object(a.__assign)({},X),{render:function(t){if(Object(s.isFunction)(e.render))return W(t,i.view,{parsePosition:i.parsePosition.bind(i)})}})}else if("html"===t){var H=e,U=H.html;H.position,X=Object(a.__rest)(H,["html","position"]);c=Object(a.__assign)(Object(a.__assign)(Object(a.__assign)({},X),d),{parent:o.get("el").parentNode,html:function(t){return Object(s.isFunction)(U)?U(t,i.view):U}})}var q=Object(s.deepMix)({},n,Object(a.__assign)(Object(a.__assign)({},c),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return"html"!==t&&(q.container=this.getComponentContainer(q)),q.animate=this.view.getOptions().animate&&q.animate&&Object(s.get)(e,"animate",q.animate),q.animateOption=Object(s.deepMix)({},jn,q.animateOption,e.animateOption),q},e.prototype.isTop=function(t){return Object(s.get)(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return Object(s.get)(this.view.getTheme(),["components","annotation",t],{})},e.prototype.updateOrCreate=function(t){var e=this.cache.get(this.getCacheKey(t));if(e){var n=t.type,i=this.getAnnotationTheme(n),r=this.getAnnotationCfg(n,t,i);r&&st(r,["container"]),e.component.update(Object(a.__assign)(Object(a.__assign)({},r||{}),{visible:!!r})),Object(s.includes)(no,t.type)&&e.component.render()}else(e=this.createAnnotation(t))&&(e.component.init(),Object(s.includes)(no,t.type)&&e.component.render());return e},e.prototype.syncCache=function(t){var e=this,n=new Map(this.cache);return t.forEach((function(t,e){n.set(e,t)})),n.forEach((function(t,i){Object(s.find)(e.option,(function(t){return i===e.getCacheKey(t)}))||(t.component.destroy(),n.delete(i))})),n},e.prototype.getCacheKey=function(t){return t},e}(bn);function ro(t,e){var n=Object(s.deepMix)({},Object(s.get)(t,["components","axis","common"]),Object(s.get)(t,["components","axis",e]));return Object(s.get)(n,["grid"],{})}function oo(t,e,n,i){var r=[],o=e.getTicks();return t.isPolar&&o.push({value:1,text:"",tickValue:""}),o.reduce((function(e,o,a){var s=o.value;if(i)r.push({points:[t.convert("y"===n?{x:0,y:s}:{x:s,y:0}),t.convert("y"===n?{x:1,y:s}:{x:s,y:1})]});else if(a){var c=(e.value+s)/2;r.push({points:[t.convert("y"===n?{x:0,y:c}:{x:c,y:0}),t.convert("y"===n?{x:1,y:c}:{x:c,y:1})]})}return o}),o[0]),r}function ao(t,e,n,i,r){var o=e.values.length,a=[],c=n.getTicks();return c.reduce((function(e,n){var c=e?e.value:n.value,l=n.value,u=(c+l)/2;return"x"===r?a.push({points:[t.convert({x:i?l:u,y:0}),t.convert({x:i?l:u,y:1})]}):a.push({points:Object(s.map)(Array(o+1),(function(e,n){return t.convert({x:n/o,y:i?l:u})}))}),n}),c[0]),a}function so(t,e){var n=Object(s.get)(e,"grid");if(null===n)return!1;var i=Object(s.get)(t,"grid");return!(void 0===n&&null===i)}var co=["container"],lo=Object(a.__assign)(Object(a.__assign)({},jn),{appear:null}),uo=function(t){function e(e){var n=t.call(this,e)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(i.BG).addGroup(),n.gridForeContainer=n.view.getLayer(i.FORE).addGroup(),n.axisContainer=n.view.getLayer(i.BG).addGroup(),n.axisForeContainer=n.view.getLayer(i.FORE).addGroup(),n}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this,e=this.view.getCoordinate();Object(s.each)(this.getComponents(),(function(n){var i,r=n.component,a=n.direction,s=n.type,c=n.extra,l=c.dim,u=c.scale,h=c.alignTick;if(s===o.AXIS)e.isPolar?"x"===l?i=e.isTransposed?bt(e,a):jt(e):"y"===l&&(i=e.isTransposed?jt(e):bt(e,a)):i=bt(e,a);else if(s===o.GRID)if(e.isPolar){i={items:e.isTransposed?"x"===l?ao(e,t.view.getYScales()[0],u,h,l):oo(e,u,l,h):"x"===l?oo(e,u,l,h):ao(e,t.view.getXScale(),u,h,l),center:t.view.getCoordinate().getCenter()}}else i={items:oo(e,u,l,h)};r.update(i)}))},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach((function(n,i){t.has(i)?e.set(i,n):n.component.destroy()})),this.cache=e},e.prototype.clear=function(){t.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach((function(e){t.push(e)})),t},e.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(e&&!e.isIdentity){var n=St(this.option,e.field);if(!1!==n){var o=Mt(n,r.BOTTOM),a=i.BG,c=this.view.getCoordinate(),l=this.getId("axis",e.field),u=this.getId("grid",e.field);if(c.isRect){if(h=this.cache.get(l))st(p=this.getLineAxisCfg(e,n,o),co),h.component.update(p),t.set(l,h);else h=this.createLineAxis(e,n,a,o,"x"),this.cache.set(l,h),t.set(l,h);if(f=this.cache.get(u))st(p=this.getLineGridCfg(e,n,o,"x"),co),f.component.update(p),t.set(u,f);else(f=this.createLineGrid(e,n,a,o,"x"))&&(this.cache.set(u,f),t.set(u,f))}else if(c.isPolar){var h,f;if(h=this.cache.get(l)){st(p=c.isTransposed?this.getLineAxisCfg(e,n,r.RADIUS):this.getCircleAxisCfg(e,n,o),co),h.component.update(p),t.set(l,h)}else{if(c.isTransposed){if(Object(s.isUndefined)(n))return;h=this.createLineAxis(e,n,a,r.RADIUS,"x")}else h=this.createCircleAxis(e,n,a,o,"x");this.cache.set(l,h),t.set(l,h)}if(f=this.cache.get(u)){var p;st(p=c.isTransposed?this.getCircleGridCfg(e,n,r.RADIUS,"x"):this.getLineGridCfg(e,n,r.CIRCLE,"x"),co),f.component.update(p),t.set(u,f)}else{if(c.isTransposed){if(Object(s.isUndefined)(n))return;f=this.createCircleGrid(e,n,a,r.RADIUS,"x")}else f=this.createLineGrid(e,n,a,r.CIRCLE,"x");f&&(this.cache.set(u,f),t.set(u,f))}}}}},e.prototype.updateYAxes=function(t){var e=this,n=this.view.getYScales();Object(s.each)(n,(function(n,o){if(n&&!n.isIdentity){var a=n.field,c=St(e.option,a);if(!1!==c){var l=i.BG,u=e.getId("axis",a),h=e.getId("grid",a),f=e.view.getCoordinate();if(f.isRect){var p=Mt(c,0===o?r.LEFT:r.RIGHT);if(d=e.cache.get(u))st(y=e.getLineAxisCfg(n,c,p),co),d.component.update(y),t.set(u,d);else d=e.createLineAxis(n,c,l,p,"y"),e.cache.set(u,d),t.set(u,d);if(g=e.cache.get(h))st(y=e.getLineGridCfg(n,c,p,"y"),co),g.component.update(y),t.set(h,g);else(g=e.createLineGrid(n,c,l,p,"y"))&&(e.cache.set(h,g),t.set(h,g))}else if(f.isPolar){var d,g;if(d=e.cache.get(u)){st(y=f.isTransposed?e.getCircleAxisCfg(n,c,r.CIRCLE):e.getLineAxisCfg(n,c,r.RADIUS),co),d.component.update(y),t.set(u,d)}else{if(f.isTransposed){if(Object(s.isUndefined)(c))return;d=e.createCircleAxis(n,c,l,r.CIRCLE,"y")}else d=e.createLineAxis(n,c,l,r.RADIUS,"y");e.cache.set(u,d),t.set(u,d)}if(g=e.cache.get(h)){var y;st(y=f.isTransposed?e.getLineGridCfg(n,c,r.CIRCLE,"y"):e.getCircleGridCfg(n,c,r.RADIUS,"y"),co),g.component.update(y),t.set(h,g)}else{if(f.isTransposed){if(Object(s.isUndefined)(c))return;g=e.createLineGrid(n,c,l,r.CIRCLE,"y")}else g=e.createCircleGrid(n,c,l,r.RADIUS,"y");g&&(e.cache.set(h,g),t.set(h,g))}}}}}))},e.prototype.createLineAxis=function(t,e,n,i,a){var s={component:new X(this.getLineAxisCfg(t,e,i)),layer:n,direction:i===r.RADIUS?r.NONE:i,type:o.AXIS,extra:{dim:a,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createLineGrid=function(t,e,n,i,a){var c=this.getLineGridCfg(t,e,i,a);if(c){var l={component:new U(c),layer:n,direction:r.NONE,type:o.GRID,extra:{dim:a,scale:t,alignTick:Object(s.get)(c,"alignTick",!0)}};return l.component.init(),l}},e.prototype.createCircleAxis=function(t,e,n,i,r){var a={component:new H(this.getCircleAxisCfg(t,e,i)),layer:n,direction:i,type:o.AXIS,extra:{dim:r,scale:t}};return a.component.set("field",t.field),a.component.init(),a},e.prototype.createCircleGrid=function(t,e,n,i,a){var c=this.getCircleGridCfg(t,e,i,a);if(c){var l={component:new q(c),layer:n,direction:r.NONE,type:o.GRID,extra:{dim:a,scale:t,alignTick:Object(s.get)(c,"alignTick",!0)}};return l.component.init(),l}},e.prototype.getLineAxisCfg=function(t,e,n){var i=Object(s.get)(e,["top"])?this.axisForeContainer:this.axisContainer,r=this.view.getCoordinate(),o=bt(r,n),c=At(t,e),l=Ot(this.view.getTheme(),n),u=Object(s.get)(e,["title"])?Object(s.deepMix)({title:{style:{text:c}}},{title:wt(this.view.getTheme(),n,e.title)},e):e,h=Object(s.deepMix)(Object(a.__assign)(Object(a.__assign)({container:i},o),{ticks:t.getTicks().map((function(t){return{id:"".concat(t.tickValue),name:t.text,value:t.value}})),verticalFactor:r.isPolar?-1*_t(o,r.getCenter()):_t(o,r.getCenter()),theme:l}),l,u),f=this.getAnimateCfg(h),p=f.animate,d=f.animateOption;h.animateOption=d,h.animate=p;var g=xt(o),y=Object(s.get)(h,"verticalLimitLength",g?1/3:.5);if(y<=1){var v=this.view.getCanvas().get("width"),m=this.view.getCanvas().get("height");h.verticalLimitLength=y*(g?v:m)}return h},e.prototype.getLineGridCfg=function(t,e,n,i){if(so(Ot(this.view.getTheme(),n),e)){var r=ro(this.view.getTheme(),n),o=Object(s.deepMix)({container:Object(s.get)(e,["top"])?this.gridForeContainer:this.gridContainer},r,Object(s.get)(e,"grid"),this.getAnimateCfg(e));return o.items=oo(this.view.getCoordinate(),t,i,Object(s.get)(o,"alignTick",!0)),o}},e.prototype.getCircleAxisCfg=function(t,e,n){var i=Object(s.get)(e,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),c=t.getTicks().map((function(t){return{id:"".concat(t.tickValue),name:t.text,value:t.value}}));t.isCategory||Math.abs(o.endAngle-o.startAngle)!==2*Math.PI||c.length&&(c[c.length-1].name="");var l=At(t,e),u=Ot(this.view.getTheme(),r.CIRCLE),h=Object(s.get)(e,["title"])?Object(s.deepMix)({title:{style:{text:l}}},{title:wt(this.view.getTheme(),n,e.title)},e):e,f=Object(s.deepMix)(Object(a.__assign)(Object(a.__assign)({container:i},jt(this.view.getCoordinate())),{ticks:c,verticalFactor:1,theme:u}),u,h),p=this.getAnimateCfg(f),d=p.animate,g=p.animateOption;return f.animate=d,f.animateOption=g,f},e.prototype.getCircleGridCfg=function(t,e,n,i){if(so(Ot(this.view.getTheme(),n),e)){var o=ro(this.view.getTheme(),r.RADIUS),a=Object(s.deepMix)({container:Object(s.get)(e,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,Object(s.get)(e,"grid"),this.getAnimateCfg(e)),c=Object(s.get)(a,"alignTick",!0),l="x"===i?this.view.getYScales()[0]:this.view.getXScale();return a.items=ao(this.view.getCoordinate(),l,t,c,i),a}},e.prototype.getId=function(t,e){var n=this.view.getCoordinate();return"".concat(t,"-").concat(e,"-").concat(n.type)},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&Object(s.get)(t,"animate"),animateOption:t&&t.animateOption?Object(s.deepMix)({},lo,t.animateOption):lo}},e}(bn);function ho(t,e,n){return n===r.TOP?[t.minX+t.width/2-e.width/2,t.minY]:n===r.BOTTOM?[t.minX+t.width/2-e.width/2,t.maxY-e.height]:n===r.LEFT?[t.minX,t.minY+t.height/2-e.height/2]:n===r.RIGHT?[t.maxX-e.width,t.minY+t.height/2-e.height/2]:n===r.TOP_LEFT||n===r.LEFT_TOP?[t.tl.x,t.tl.y]:n===r.TOP_RIGHT||n===r.RIGHT_TOP?[t.tr.x-e.width,t.tr.y]:n===r.BOTTOM_LEFT||n===r.LEFT_BOTTOM?[t.bl.x,t.bl.y-e.height]:n===r.BOTTOM_RIGHT||n===r.RIGHT_BOTTOM?[t.br.x-e.width,t.br.y-e.height]:[0,0]}function fo(t,e){return Object(s.isBoolean)(t)?!1!==t&&{}:Object(s.get)(t,[e],t)}function po(t){return Object(s.get)(t,"position",r.BOTTOM)}var go=function(t){function e(e){var n=t.call(this,e)||this;return n.container=n.view.getLayer(i.FORE).addGroup(),n}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,Object(s.each)(this.components,(function(e){var n=e.component,i=e.direction,r=ai(i),o=n.get("maxWidthRatio"),s=n.get("maxHeightRatio"),c=t.getCategoryLegendSizeCfg(r,o,s),l=n.get("maxWidth"),u=n.get("maxHeight");n.update({maxWidth:Math.min(c.maxWidth,l||0),maxHeight:Math.min(c.maxHeight,u||0)});var h=n.get("padding"),f=n.getLayoutBBox(),p=new lt(f.x,f.y,f.width,f.height).expand(h),d=Object(a.__read)(ho(t.view.viewBBox,p,i),2),g=d[0],y=d[1],v=Object(a.__read)(ho(t.layoutBBox,p,i),2),m=v[0],b=v[1],x=0,_=0;i.startsWith("top")||i.startsWith("bottom")?(x=g,_=b):(x=m,_=y),n.setLocation({x:x+h[3],y:_+h[0]}),t.layoutBBox=t.layoutBBox.cut(p,i)}))},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={};if(Object(s.get)(this.option,"custom")){var n="global-custom",r=this.getComponentById(n);if(r){var a=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);st(a,["container"]),r.component.update(a),e[n]=!0}else{var c=this.createCustomLegend(void 0,void 0,void 0,this.option);if(c){c.init();var l=i.FORE,u=po(this.option);this.components.push({id:n,component:c,layer:l,direction:u,type:o.LEGEND,extra:void 0}),e[n]=!0}}}else this.loopLegends((function(n,i,r){var o=t.getId(r.field),a=t.getComponentById(o);if(a){var c=void 0,l=fo(t.option,r.field);!1!==l&&(Object(s.get)(l,"custom")?c=t.getCategoryCfg(n,i,r,l,!0):r.isLinear?c=t.getContinuousCfg(n,i,r,l):r.isCategory&&(c=t.getCategoryCfg(n,i,r,l))),c&&(st(c,["container"]),a.direction=po(l),a.component.update(c),e[o]=!0)}else{var u=t.createFieldLegend(n,i,r);u&&(u.component.init(),t.components.push(u),e[o]=!0)}}));var h=[];Object(s.each)(this.getComponents(),(function(t){e[t.id]?h.push(t):t.component.destroy()})),this.components=h},e.prototype.clear=function(){t.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t){var e=this,n=t.geometries;return Object(s.each)(t.views,(function(t){n=n.concat(e.getGeometries(t))})),n},e.prototype.loopLegends=function(t){if(this.view.getRootView()===this.view){var e=this.getGeometries(this.view),n={};Object(s.each)(e,(function(e){var i=e.getGroupAttributes();Object(s.each)(i,(function(i){var r=i.getScale(i.type);r&&"identity"!==r.type&&!n[r.field]&&(t(e,i,r),n[r.field]=!0)}))}))}},e.prototype.createFieldLegend=function(t,e,n){var r,a=fo(this.option,n.field),c=i.FORE,l=po(a);if(!1!==a&&(Object(s.get)(a,"custom")?r=this.createCustomLegend(t,e,n,a):n.isLinear?r=this.createContinuousLegend(t,e,n,a):n.isCategory&&(r=this.createCategoryLegend(t,e,n,a))),r)return r.set("field",n.field),{id:this.getId(n.field),component:r,layer:c,direction:l,type:o.LEGEND,extra:{scale:n}}},e.prototype.createCustomLegend=function(t,e,n,i){var r=this.getCategoryCfg(t,e,n,i,!0);return new Z(r)},e.prototype.createContinuousLegend=function(t,e,n,i){var r=this.getContinuousCfg(t,e,n,st(i,["value"]));return new $(r)},e.prototype.createCategoryLegend=function(t,e,n,i){var r=this.getCategoryCfg(t,e,n,i);return new Z(r)},e.prototype.getContinuousCfg=function(t,e,n,i){var r=n.getTicks(),o=Object(s.find)(r,(function(t){return 0===t.value})),a=Object(s.find)(r,(function(t){return 1===t.value})),c=r.map((function(t){var i=t.value,r=t.tickValue,o=e.mapping(n.invert(i)).join("");return{value:r,attrValue:o,color:o,scaleValue:i}}));o||c.push({value:n.min,attrValue:e.mapping(n.invert(0)).join(""),color:e.mapping(n.invert(0)).join(""),scaleValue:0}),a||c.push({value:n.max,attrValue:e.mapping(n.invert(1)).join(""),color:e.mapping(n.invert(1)).join(""),scaleValue:1}),c.sort((function(t,e){return t.value-e.value}));var l={min:Object(s.head)(c).value,max:Object(s.last)(c).value,colors:[],rail:{type:e.type},track:{}};"size"===e.type&&(l.track={style:{fill:"size"===e.type?this.view.getTheme().defaultColor:void 0}}),"color"===e.type&&(l.colors=c.map((function(t){return t.attrValue})));var u=this.container,h=ai(po(i)),f=Object(s.get)(i,"title");return f&&(f=Object(s.deepMix)({text:vt(n)},f)),l.container=u,l.layout=h,l.title=f,l.animateOption=jn,this.mergeLegendCfg(l,i,"continuous")},e.prototype.getCategoryCfg=function(t,e,n,i,o){var a=this.container,c=Object(s.get)(i,"position",r.BOTTOM),l=ci(this.view.getTheme(),c),u=Object(s.get)(l,["marker"]),h=Object(s.get)(i,"marker"),f=ai(c),p=Object(s.get)(l,["pageNavigator"]),d=Object(s.get)(i,"pageNavigator"),g=o?function(t,e,n){return n.map((function(n,i){var r=e;Object(s.isFunction)(r)&&(r=r(n.name,i,Object(s.deepMix)({},t,n)));var o=Object(s.isFunction)(n.marker)?n.marker(n.name,i,Object(s.deepMix)({},t,n)):n.marker,a=Object(s.deepMix)({},t,r,o);return oi(a),n.marker=a,n}))}(u,h,i.items):si(this.view,t,e,u,h),y=Object(s.get)(i,"title");y&&(y=Object(s.deepMix)({text:n?vt(n):""},y));var v=Object(s.get)(i,"maxWidthRatio"),m=Object(s.get)(i,"maxHeightRatio"),b=this.getCategoryLegendSizeCfg(f,v,m);b.container=a,b.layout=f,b.items=g,b.title=y,b.animateOption=jn,b.pageNavigator=Object(s.deepMix)({},p,d);var x=this.mergeLegendCfg(b,i,c);x.reversed&&x.items.reverse();var _=Object(s.get)(x,"maxItemWidth");return _&&_<=1&&(x.maxItemWidth=this.view.viewBBox.width*_),x},e.prototype.mergeLegendCfg=function(t,e,n){var i=n.split("-")[0],r=ci(this.view.getTheme(),i);return Object(s.deepMix)({},r,t,e)},e.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},e.prototype.getComponentById=function(t){return Object(s.find)(this.components,(function(e){return e.id===t}))},e.prototype.getCategoryLegendSizeCfg=function(t,e,n){void 0===e&&(e=.25),void 0===n&&(n=.25);var i=this.view.viewBBox,r=i.width,o=i.height;return"vertical"===t?{maxWidth:r*e,maxHeight:o}:{maxWidth:r,maxHeight:o*n}},e}(bn),yo=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=s.noop,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=Object(a.__read)(t,2),i=e[0],r=e[1];n.start=i,n.end=r,n.changeViewData(i,r)},n.container=n.view.getLayer(i.FORE).addGroup(),n.onChangeFn=Object(s.throttle)(n.onValueChange,20,{leading:!0}),n.width=0,n.view.on(c.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(c.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(c.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(c.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),e=t.start,n=t.end;Object(s.isNil)(this.start)&&(this.start=e,this.end=n);var i=this.view.getOptions().data;this.option&&!Object(s.isEmpty)(i)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout((function(){t.view.destroyed||t.changeViewData(t.start,t.end)}),0)),this.slider){var e=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),i=Object(a.__read)(n,4),o=i[0],s=(i[1],i[2],i[3]),c=this.slider.component.getLayoutBBox(),l=new lt(c.x,c.y,Math.min(c.width,e),c.height).expand(n),u=this.getMinMaxText(this.start,this.end),h=u.minText,f=u.maxText,p=Object(a.__read)(ho(this.view.viewBBox,l,r.BOTTOM),2),d=(p[0],p[1]),g=Object(a.__read)(ho(this.view.coordinateBBox,l,r.BOTTOM),2),y=g[0];g[1];this.slider.component.update(Object(a.__assign)(Object(a.__assign)({},this.getSliderCfg()),{x:y+s,y:d+o,width:this.width,start:this.start,end:this.end,minText:h,maxText:f})),this.view.viewBBox=this.view.viewBBox.cut(l,r.BOTTOM)}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new W.Slider(Object(a.__assign)({container:this.container},t));return e.init(),{component:e,layer:i.FORE,direction:r.BOTTOM,type:o.SLIDER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var e=this.getMinMaxText(this.start,this.end),n=e.minText,i=e.maxText;t=Object(a.__assign)(Object(a.__assign)({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:i})}return this.slider.component.update(t),this.slider},e.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},e.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if(Object(s.isObject)(this.option)){var e=Object(a.__assign)({data:this.getData()},Object(s.get)(this.option,"trendCfg",{}));t=Object(s.deepMix)({},t,this.getThemeOptions(),this.option),t=Object(a.__assign)(Object(a.__assign)({},t),{trendCfg:e})}return t.start=Object(s.clamp)(Math.min(Object(s.isNil)(t.start)?0:t.start,Object(s.isNil)(t.end)?1:t.end),0,1),t.end=Object(s.clamp)(Math.max(Object(s.isNil)(t.start)?0:t.start,Object(s.isNil)(t.end)?1:t.end),0,1),t},e.prototype.getData=function(){var t=this.view.getOptions().data,e=Object(a.__read)(this.view.getYScales(),1)[0],n=this.view.getGroupScales();if(n.length){var i=n[0],r=i.field,o=i.ticks;return t.reduce((function(t,n){return n[r]===o[0]&&t.push(n[e.field]),t}),[])}return t.map((function(t){return t[e.field]||0}))},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return Object(s.get)(t,["components","slider","common"],{})},e.prototype.getMinMaxText=function(t,e){var n=this.view.getOptions().data,i=this.view.getXScale(),r=Object(s.valuesOfKey)(n,i.field);i.isLinear&&(r=r.sort());var o=r,a=Object(s.size)(n);if(!i||!a)return{};var c=Object(s.size)(o),l=Math.round(t*(c-1)),u=Math.round(e*(c-1)),h=Object(s.get)(o,[l]),f=Object(s.get)(o,[u]),p=this.getSliderCfg().formatter;return p&&(h=p(h,n[l],l),f=p(f,n[u],u)),{minText:h,maxText:f}},e.prototype.changeViewData=function(t,e){var n=this.view.getOptions().data,i=this.view.getXScale(),r=Object(s.size)(n);if(i&&r){var o=Object(s.valuesOfKey)(n,i.field),a=this.view.getXScale().isLinear?o.sort((function(t,e){return Number(t)-Number(e)})):o,c=a,l=Object(s.size)(c),u=Math.round(t*(l-1)),h=Math.round(e*(l-1));this.view.filter(i.field,(function(t,e){var n=c.indexOf(t);return!(n>-1)||at(n,u,h)})),this.view.render(!0)}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},e}(bn),vo=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=s.noop,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=t.ratio,i=n.getValidScrollbarCfg().animate;n.ratio=Object(s.clamp)(e,0,1);var r=n.view.getOptions().animate;i||n.view.animate(!1),n.changeViewData(n.getScrollRange(),!0),n.view.animate(r)},n.container=n.view.getLayer(i.FORE).addGroup(),n.onChangeFn=Object(s.throttle)(n.onValueChange,20,{leading:!0}),n.trackLen=0,n.thumbLen=0,n.ratio=0,n.view.on(c.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(c.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(c.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(c.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout((function(){t.view.destroyed||t.changeViewData(t.getScrollRange(),!0)}))),this.scrollbar){var e=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),i=this.scrollbar.component.getLayoutBBox(),o=new lt(i.x,i.y,Math.min(i.width,e),i.height).expand(n),s=this.getScrollbarComponentCfg(),c=void 0,l=void 0;if(s.isHorizontal){var u=Object(a.__read)(ho(this.view.viewBBox,o,r.BOTTOM),2),h=(u[0],u[1]),f=Object(a.__read)(ho(this.view.coordinateBBox,o,r.BOTTOM),2),p=f[0];f[1];c=p,l=h}else{var d=Object(a.__read)(ho(this.view.viewBBox,o,r.RIGHT),2),g=(d[0],h=d[1],Object(a.__read)(ho(this.view.viewBBox,o,r.RIGHT),2));p=g[0],g[1];c=p,l=h}c+=n[3],l+=n[0],this.trackLen?this.scrollbar.component.update(Object(a.__assign)(Object(a.__assign)({},s),{x:c,y:l,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update(Object(a.__assign)(Object(a.__assign)({},s),{x:c,y:l})),this.view.viewBBox=this.view.viewBBox.cut(o,s.isHorizontal?r.BOTTOM:r.RIGHT)}},e.prototype.update=function(){this.render()},e.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},e.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},e.prototype.setValue=function(t){this.onValueChange({ratio:t})},e.prototype.getValue=function(){return this.ratio},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return Object(s.get)(t,["components","scrollbar","common"],{})},e.prototype.getScrollbarTheme=function(t){var e=Object(s.get)(this.view.getTheme(),["components","scrollbar"]),n=t||{},i=n.thumbHighlightColor,r=Object(a.__rest)(n,["thumbHighlightColor"]);return{default:Object(s.deepMix)({},Object(s.get)(e,["default","style"],{}),r),hover:Object(s.deepMix)({},Object(s.get)(e,["hover","style"],{}),{thumbColor:i})}},e.prototype.measureScrollbar=function(){var t=this.view.getXScale(),e=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),i=n.trackLen,r=n.thumbLen;this.trackLen=i,this.thumbLen=r,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=e},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*Object(s.clamp)(this.ratio,0,1));return[t,Math.min(t+this.step-1,this.cnt-1)]},e.prototype.changeViewData=function(t,e){var n=this,i=Object(a.__read)(t,2),r=i[0],o=i[1],c="vertical"!==this.getValidScrollbarCfg().type,l=Object(s.valuesOfKey)(this.data,this.xScaleCfg.field),u=this.view.getXScale().isLinear?l.sort((function(t,e){return Number(t)-Number(e)})):l,h=c?u:u.reverse();this.yScalesCfg.forEach((function(t){n.view.scale(t.field,{formatter:t.formatter,type:t.type,min:t.min,max:t.max,tickMethod:t.tickMethod})})),this.view.filter(this.xScaleCfg.field,(function(t){var e=h.indexOf(t);return!(e>-1)||at(e,r,o)})),this.view.render(!0)},e.prototype.createScrollbar=function(){var t="vertical"!==this.getValidScrollbarCfg().type,e=new W.Scrollbar(Object(a.__assign)(Object(a.__assign)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return e.init(),{component:e,layer:i.FORE,direction:t?r.BOTTOM:r.RIGHT,type:o.SCROLLBAR}},e.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),e=this.trackLen?Object(a.__assign)(Object(a.__assign)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):Object(a.__assign)({},t);return this.scrollbar.component.update(e),this.scrollbar},e.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,e=this.getValidScrollbarCfg(),n=e.type,i=e.categorySize,r="vertical"!==n;return Math.floor((r?t.width:t.height)/i)},e.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),e=this.getScrollbarData(),n=Object(s.valuesOfKey)(e,t.field);return Object(s.size)(n)},e.prototype.getScrollbarComponentCfg=function(){var t=this.view,e=t.coordinateBBox,n=t.viewBBox,i=this.getValidScrollbarCfg(),r=i.type,o=i.padding,c=i.width,l=i.height,u=i.style,h="vertical"!==r,f=Object(a.__read)(o,4),p=f[0],d=f[1],g=f[2],y=f[3],v=h?{x:e.minX+y,y:n.maxY-l-g}:{x:n.maxX-c-d,y:e.minY+p},m=this.getStep(),b=this.getCnt(),x=h?e.width-y-d:e.height-p-g,_=Math.max(x*Object(s.clamp)(m/b,0,1),20);return Object(a.__assign)(Object(a.__assign)({},this.getThemeOptions()),{x:v.x,y:v.y,size:h?l:c,isHorizontal:h,trackLen:x,thumbLen:_,thumbOffset:0,theme:this.getScrollbarTheme(u)})},e.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:32,width:8,height:8,padding:[0,0,0,0],animate:!0,style:{}};return Object(s.isObject)(this.option)&&(t=Object(a.__assign)(Object(a.__assign)({},t),this.option)),Object(s.isObject)(this.option)&&this.option.padding||(t.padding=(t.type,[0,0,0,0])),t},e.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),e=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&"vertical"===e.type&&(n=Object(a.__spreadArray)([],Object(a.__read)(n),!1).reverse()),n},e}(bn),mo={fill:"#CCD6EC",opacity:.3};function bo(t,e,n){var i,r,o,c,l,u,h=function(t,e,n){var i,r,o=rn(t,e,n);try{for(var s=Object(a.__values)(t.views),c=s.next();!c.done;c=s.next()){var l=c.value;o=o.concat(rn(l,e,n))}}catch(t){i={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}(t,e,n);if(h.length){h=Object(s.flatten)(h);try{for(var f=Object(a.__values)(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{for(var g=(o=void 0,Object(a.__values)(d)),y=g.next();!y.done;y=g.next()){var v=y.value,m=v.mappingData,b=m.x,x=m.y;v.x=Object(s.isArray)(b)?b[b.length-1]:b,v.y=Object(s.isArray)(x)?x[x.length-1]:x}}catch(t){o={error:t}}finally{try{y&&!y.done&&(c=g.return)&&c.call(g)}finally{if(o)throw o.error}}}}catch(t){i={error:t}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}if(!1===n.shared&&h.length>1){var _=h[0],O=Math.abs(e.y-_[0].y);try{for(var w=Object(a.__values)(h),j=w.next();!j.done;j=w.next()){var S=j.value,M=Math.abs(e.y-S[0].y);M<=O&&(_=S,O=M)}}catch(t){l={error:t}}finally{try{j&&!j.done&&(u=w.return)&&u.call(w)}finally{if(l)throw l.error}}h=[_]}return Object(s.uniq)(Object(s.flatten)(h))}return[]}var xo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.show=function(t){var e=this.context.view,n=this.context.event,i=e.getController("tooltip").getTooltipCfg(),r=bo(e,{x:n.x,y:n.y},i);if(!Object(s.isEqual)(r,this.items)&&(this.items=r,r.length)){var o=e.getXScale().field,c=r[0].data[o],l=[],u=e.geometries;if(Object(s.each)(u,(function(t){if("interval"===t.type||"schema"===t.type){var e=t.getElementsBy((function(t){return t.getData()[o]===c}));l=l.concat(e)}})),l.length){var h=e.getCoordinate(),f=l[0].shape.getCanvasBBox(),p=l[0].shape.getCanvasBBox(),d=f;Object(s.each)(l,(function(t){var e=t.shape.getCanvasBBox();h.isTransposed?(e.minYp.maxY&&(p=e)):(e.minXp.maxX&&(p=e)),d.x=Math.min(e.minX,d.minX),d.y=Math.min(e.minY,d.minY),d.width=Math.max(e.maxX,d.maxX)-d.x,d.height=Math.max(e.maxY,d.maxY)-d.y}));var g=e.backgroundGroup,y=e.coordinateBBox,v=void 0;if(h.isRect){var m=e.getXScale(),b=t||{},x=b.appendRatio,_=b.appendWidth;Object(s.isNil)(_)&&(x=Object(s.isNil)(x)?m.isLinear?0:.25:x,_=h.isTransposed?x*p.height:x*f.width);var O=void 0,w=void 0,j=void 0,S=void 0;h.isTransposed?(O=y.minX,w=Math.min(p.minY,f.minY)-_,j=y.width,S=d.height+2*_):(O=Math.min(f.minX,p.minX)-_,w=y.minY,j=d.width+2*_,S=y.height),v=[["M",O,w],["L",O+j,w],["L",O+j,w+S],["L",O,w+S],["Z"]]}else{var M=Object(s.head)(l),A=Object(s.last)(l),C=it(M.getModel(),h).startAngle,E=it(A.getModel(),h).endAngle,I=h.getCenter(),P=h.getRadius(),T=h.innerRadius*P;v=et(I.x,I.y,P,C,E,T)}if(this.regionPath)this.regionPath.attr("path",v),this.regionPath.show();else{var F=Object(s.get)(t,"style",mo);this.regionPath=g.addShape({type:"path",name:"active-region",capture:!1,attrs:Object(a.__assign)(Object(a.__assign)({},F),{path:v})})}}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),t.prototype.destroy.call(this)},e}(Tt),_o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return Object(a.__extends)(e,t),e.prototype.show=function(){var t=this.context,e=t.event,n=t.view;if(!n.isTooltipLocked()){var i=this.timeStamp,r=+new Date;if(r-i>Object(s.get)(t.view.getOptions(),"tooltip.showDelay",16)){var o=this.location,a={x:e.x,y:e.y};o&&Object(s.isEqual)(o,a)||this.showTooltip(n,a),this.timeStamp=r,this.location=a}}},e.prototype.hide=function(){var t=this.context.view,e=t.getController("tooltip"),n=this.context.event,i=n.clientX,r=n.clientY;e.isCursorEntered({x:i,y:r})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},e.prototype.showTooltip=function(t,e){t.showTooltip(e)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(Tt),Oo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.showTooltip=function(t,e){var n=ge(t);Object(s.each)(n,(function(n){var i=ye(t,n,e);n.showTooltip(i)}))},e.prototype.hideTooltip=function(t){var e=ge(t);Object(s.each)(e,(function(t){t.hideTooltip()}))},e}(_o),wo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return Object(a.__extends)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.show=function(){var t=this.context.event,e=this.timeStamp,n=+new Date;if(n-e>16){var i=this.location,r={x:t.x,y:t.y};i&&Object(s.isEqual)(i,r)||this.showTooltip(r),this.timeStamp=n,this.location=r}},e.prototype.hide=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context.event.target;if(e&&e.get("tip")){this.tooltip||this.renderTooltip();var n=e.get("tip");this.tooltip.update(Object(a.__assign)({title:n},t)),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=this.context.view,n=e.canvas,i={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},r=e.getTheme(),o=Object(s.get)(r,["components","tooltip","domStyles"],{}),c=new K({parent:n.get("el").parentNode,region:i,visible:!1,crosshairs:null,domStyles:Object(a.__assign)({},Object(s.deepMix)({},o,(t={},t[W.TOOLTIP_CSS_CONST.CONTAINER_CLASS]={"max-width":"50%"},t[W.TOOLTIP_CSS_CONST.TITLE_CLASS]={"word-break":"break-all"},t)))});c.init(),c.setCapture(!1),this.tooltip=c},e}(Tt),jo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e}return Object(a.__extends)(e,t),e.prototype.hasState=function(t){return t.hasState(this.stateName)},e.prototype.setElementState=function(t,e){t.setState(this.stateName,e)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},e.prototype.clearViewState=function(t){var e=this,n=se(t,this.stateName);Object(s.each)(n,(function(t){e.setElementState(t,!1)}))},e}(Tt);function So(t){return Object(s.get)(t.get("delegateObject"),"item")}var Mo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreListItemStates=["unchecked"],e}return Object(a.__extends)(e,t),e.prototype.isItemIgnore=function(t,e){return!!this.ignoreListItemStates.filter((function(n){return e.hasState(t,n)})).length},e.prototype.setStateByComponent=function(t,e,n){var i=this.context.view,r=t.get("field"),o=ae(i);this.setElementsStateByItem(o,r,e,n)},e.prototype.setStateByElement=function(t,e){this.setElementState(t,e)},e.prototype.isMathItem=function(t,e,n){var i=me(this.context.view,e),r=ce(t,e);return!Object(s.isNil)(r)&&n.name===i.getText(r)},e.prototype.setElementsStateByItem=function(t,e,n,i){var r=this;Object(s.each)(t,(function(t){r.isMathItem(t,e,n)&&t.setState(r.stateName,i)}))},e.prototype.setStateEnable=function(t){var e=$t(this.context);if(e)Qt(this.context)&&this.setStateByElement(e,t);else{var n=Kt(this.context);if(Jt(n)){var i=n.item,r=n.component;if(i&&r&&!this.isItemIgnore(i,r)){var o=this.context.event.gEvent;if(o&&o.fromShape&&o.toShape&&So(o.fromShape)===So(o.toShape))return;this.setStateByComponent(r,i,t)}}}},e.prototype.toggle=function(){var t=$t(this.context);if(t){var e=t.hasState(this.stateName);this.setElementState(t,!e)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(jo),Ao=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return Object(a.__extends)(e,t),e.prototype.active=function(){this.setState()},e}(Mo),Co=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache={},e}return Object(a.__extends)(e,t),e.prototype.getColorScale=function(t,e){var n=e.geometry.getAttribute("color");return n?t.getScaleByField(n.getFields()[0]):null},e.prototype.getLinkPath=function(t,e){var n=this.context.view.getCoordinate().isTransposed,i=t.shape.getCanvasBBox(),r=e.shape.getCanvasBBox();return n?[["M",i.minX,i.minY],["L",r.minX,r.maxY],["L",r.maxX,r.maxY],["L",i.maxX,i.minY],["Z"]]:[["M",i.maxX,i.minY],["L",r.minX,r.minY],["L",r.minX,r.maxY],["L",i.maxX,i.maxY],["Z"]]},e.prototype.addLinkShape=function(t,e,n,i){var r={opacity:.4,fill:e.shape.attr("fill")};t.addShape({type:"path",attrs:Object(a.__assign)(Object(a.__assign)({},Object(s.deepMix)({},r,Object(s.isFunction)(i)?i(r,e):i)),{path:this.getLinkPath(e,n)})})},e.prototype.linkByElement=function(t,e){var n=this,i=this.context.view,r=this.getColorScale(i,t);if(r){var o=ce(t,r.field);if(!this.cache[o]){var a=function(t,e,n){return ae(t).filter((function(t){return ce(t,e)===n}))}(i,r.field,o),c=this.linkGroup.addGroup();this.cache[o]=c;var l=a.length;Object(s.each)(a,(function(t,i){if(i=0}),e)},e}(Eo),Go=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return Object(a.__extends)(e,t),e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,e){Lo(ae(this.context.view),(function(e){return t===e}),e)},e.prototype.clear=function(){Fo(this.context.view)},e}(Po),Yo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(Eo),Wo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(Mo),Xo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(Po),Ho=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e.ignoreItemStates=[],e}return Object(a.__extends)(e,t),e.prototype.getTriggerListInfo=function(){var t=Kt(this.context),e=null;return Jt(t)&&(e={item:t.item,list:t.component}),e},e.prototype.getAllowComponents=function(){var t=this,e=fe(this.context.view),n=[];return Object(s.each)(e,(function(e){e.isList()&&t.allowSetStateByElement(e)&&n.push(e)})),n},e.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,e=this.getAllowComponents();Object(s.each)(e,(function(e){e.clearItemsState(t.stateName)}))},e.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(-1===this.cfg.componentNames.indexOf(n))return!1}var i=me(this.context.view,e);return i&&i.isCategory},e.prototype.allowSetStateByItem=function(t,e){var n=this.ignoreItemStates;return!n.length||0===n.filter((function(n){return e.hasState(t,n)})).length},e.prototype.setStateByElement=function(t,e,n){var i=t.get("field"),r=me(this.context.view,i),o=ce(e,i),a=r.getText(o);this.setItemsState(t,a,n)},e.prototype.setStateEnable=function(t){var e=this,n=$t(this.context);if(n){var i=this.getAllowComponents();Object(s.each)(i,(function(i){e.setStateByElement(i,n,t)}))}else{var r=Kt(this.context);if(Jt(r)){var o=r.item,a=r.component;this.allowSetStateByElement(a)&&this.allowSetStateByItem(o,a)&&this.setItemState(a,o,t)}}},e.prototype.setItemsState=function(t,e,n){var i=this,r=t.getItems();Object(s.each)(r,(function(r){r.name===e&&i.setItemState(t,r,n)}))},e.prototype.setItemState=function(t,e,n){t.setItemState(e,this.stateName,n)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,i=this.hasState(e,n);this.setItemState(e,n,!i)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(Tt),Uo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return Object(a.__extends)(e,t),e.prototype.active=function(){this.setState()},e}(Ho);var qo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e.ignoreItemStates=["unchecked"],e}return Object(a.__extends)(e,t),e.prototype.setItemsState=function(t,e,n){this.setHighlightBy(t,(function(t){return t.name===e}),n)},e.prototype.setItemState=function(t,e,n){t.getItems();this.setHighlightBy(t,(function(t){return t===e}),n)},e.prototype.setHighlightBy=function(t,e,n){var i=t.getItems();if(n)Object(s.each)(i,(function(n){e(n)?(t.hasState(n,"inactive")&&t.setItemState(n,"inactive",!1),t.setItemState(n,"active",!0)):t.hasState(n,"active")||t.setItemState(n,"inactive",!0)}));else{var r=t.getItemsByState("active"),o=!0;Object(s.each)(r,(function(t){if(!e(t))return o=!1,!1})),o?this.clear():Object(s.each)(i,(function(n){e(n)&&(t.hasState(n,"active")&&t.setItemState(n,"active",!1),t.setItemState(n,"inactive",!0))}))}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t,e,n=this.getTriggerListInfo();if(n)t=n.list,e=t.getItems(),Object(s.each)(e,(function(e){t.hasState(e,"active")&&t.setItemState(e,"active",!1),t.hasState(e,"inactive")&&t.setItemState(e,"inactive",!1)}));else{var i=this.getAllowComponents();Object(s.each)(i,(function(t){t.clearItemsState("active"),t.clearItemsState("inactive")}))}},e}(Ho),Zo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(Ho),$o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="unchecked",e}return Object(a.__extends)(e,t),e.prototype.unchecked=function(){this.setState()},e}(Ho),Ko=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="checked",e}return Object(a.__extends)(e,t),e.prototype.setItemState=function(t,e,n){this.setCheckedBy(t,(function(t){return t===e}),n)},e.prototype.setCheckedBy=function(t,e,n){var i=t.getItems();n&&Object(s.each)(i,(function(n){e(n)?(t.hasState(n,"unchecked")&&t.setItemState(n,"unchecked",!1),t.setItemState(n,"checked",!0)):t.hasState(n,"checked")||t.setItemState(n,"unchecked",!0)}))},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item;!Object(s.some)(e.getItems(),(function(t){return e.hasState(t,"unchecked")}))||e.hasState(n,"unchecked")?this.setItemState(e,n,!0):this.reset()}},e.prototype.checked=function(){this.setState()},e.prototype.reset=function(){var t=this.getAllowComponents();Object(s.each)(t,(function(t){t.clearItemsState("checked"),t.clearItemsState("unchecked")}))},e}(Ho),Qo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.toggle=function(){var t,e,n,i,r,o,s,c,l=this.getTriggerListInfo();if(null==l?void 0:l.item){var u=l.list,h=l.item,f=u.getItems(),p=f.filter((function(t){return!u.hasState(t,"unchecked")})),d=f.filter((function(t){return u.hasState(t,"unchecked")})),g=p[0];if(f.length===p.length)try{for(var y=Object(a.__values)(f),v=y.next();!v.done;v=y.next()){var m=v.value;u.setItemState(m,"unchecked",m.id!==h.id)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(e=y.return)&&e.call(y)}finally{if(t)throw t.error}}else if(f.length-d.length==1)if(g.id===h.id)try{for(var b=Object(a.__values)(f),x=b.next();!x.done;x=b.next()){m=x.value;u.setItemState(m,"unchecked",!1)}}catch(t){n={error:t}}finally{try{x&&!x.done&&(i=b.return)&&i.call(b)}finally{if(n)throw n.error}}else try{for(var _=Object(a.__values)(f),O=_.next();!O.done;O=_.next()){m=O.value;u.setItemState(m,"unchecked",m.id!==h.id)}}catch(t){r={error:t}}finally{try{O&&!O.done&&(o=_.return)&&o.call(_)}finally{if(r)throw r.error}}else try{for(var w=Object(a.__values)(f),j=w.next();!j.done;j=w.next()){m=j.value;u.setItemState(m,"unchecked",m.id!==h.id)}}catch(t){s={error:t}}finally{try{j&&!j.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}}},e}(Ho),Jo="legend-radio-tip",ta=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return Object(a.__extends)(e,t),e.prototype.show=function(){var t=this.getTriggerListInfo();if(null==t?void 0:t.item){var e=t.list,n=t.item;e.setItemState(n,"showRadio",!0)}},e.prototype.hide=function(){var t=this.getTriggerListInfo();if(null==t?void 0:t.item){var e=t.list,n=t.item;e.setItemState(n,"showRadio",!1)}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.showTip=function(){var t=this.context.event,e=this.timeStamp,n=+new Date,i=this.context.event.target;if(n-e>16&&"legend-item-radio"===i.get("name")){var r=this.location,o={x:t.x,y:t.y};this.timeStamp=n,this.location=o,r&&Object(s.isEqual)(r,o)||this.showTooltip(o)}},e.prototype.hideTip=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context,n=e.event.target;if(n&&n.get("tip")){this.tooltip||this.renderTooltip();var i=e.view.getCanvas().get("el").getBoundingClientRect(),r=i.x,o=i.y;this.tooltip.update(Object(a.__assign)(Object(a.__assign)({title:n.get("tip")},t),{x:t.x+r,y:t.y+o})),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=((t={})[W.TOOLTIP_CSS_CONST.CONTAINER_CLASS]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[W.TOOLTIP_CSS_CONST.TITLE_CLASS]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(Jo)&&document.body.removeChild(document.getElementById(Jo));var n=new K({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:e,containerId:Jo});n.init(),n.setCapture(!1),this.tooltip=n},e}(Ho),ea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskShape=null,e.points=[],e.starting=!1,e.moving=!1,e.preMovePoint=null,e.shapeType="path",e}return Object(a.__extends)(e,t),e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var e="mask:".concat(t),n=this.context.view,i=this.context.event;n.emit(e,{target:this.maskShape,shape:this.maskShape,points:this.points,x:i.x,y:i.y})},e.prototype.createMask=function(){var t=this.context.view,e=this.getMaskAttrs();return t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:Object(a.__assign)({fill:"#C5D4EB",opacity:.3},e)})},e.prototype.getMaskPath=function(){return[]},e.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},e.prototype.start=function(t){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(null==t?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},e.prototype.move=function(){if(this.moving&&this.maskShape){var t=this.getCurrentPoint(),e=this.preMovePoint,n=t.x-e.x,i=t.y-e.y,r=this.points;Object(s.each)(r,(function(t){t.x+=n,t.y+=i})),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},e.prototype.updateMask=function(t){var e=Object(s.deepMix)({},this.getMaskAttrs(),t);this.maskShape.attr(e)},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},e.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},e.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},e.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,t.prototype.destroy.call(this)},e}(Tt);function na(t){var e=Object(s.last)(t),n=0,i=0,r=0;if(t.length){var o=t[0];n=pe(o,e)/2,i=(e.x+o.x)/2,r=(e.y+o.y)/2}return{x:i,y:r,r:n}}var ia=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e}return Object(a.__extends)(e,t),e.prototype.getMaskAttrs=function(){return na(this.points)},e}(ea);function ra(t){return{start:Object(s.head)(t),end:Object(s.last)(t)}}function oa(t,e){return{x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y)}}var aa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return Object(a.__extends)(e,t),e.prototype.getRegion=function(){return ra(this.points)},e.prototype.getMaskAttrs=function(){var t=this.getRegion();return oa(t.start,t.end)},e}(ea);function sa(t){t.x=Object(s.clamp)(t.x,0,1),t.y=Object(s.clamp)(t.y,0,1)}function ca(t,e,n,i){var r=null,o=null,a=i.invert(Object(s.head)(t)),c=i.invert(Object(s.last)(t));return n&&(sa(a),sa(c)),"x"===e?(r=i.convert({x:a.x,y:0}),o=i.convert({x:c.x,y:1})):(r=i.convert({x:0,y:a.y}),o=i.convert({x:1,y:c.y})),{start:r,end:o}}var la=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return Object(a.__extends)(e,t),e.prototype.getRegion=function(){var t=this.context.view.getCoordinate();return ca(this.points,this.dim,this.inPlot,t)},e}(aa);function ua(t){var e=[];return t.length&&(Object(s.each)(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e.push(["L",t[0].x,t[0].y])),e}function ha(t){return{path:ua(t)}}var fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.getMaskPath=function(){return ua(this.points)},e.prototype.getMaskAttrs=function(){return ha(this.points)},e.prototype.addPoint=function(){this.resize()},e}(ea);function pa(t){return function(t,e){if(t.length<=2)return zt(t,!1);var n=t[0],i=[];Object(s.each)(t,(function(t){i.push(t.x),i.push(t.y)}));var r=Vt(i,e,null);return r.unshift(["M",n.x,n.y]),r}(t,!0)}function da(t){return{path:pa(t)}}var ga,ya=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.getMaskPath=function(){return pa(this.points)},e.prototype.getMaskAttrs=function(){return da(this.points)},e}(fa),va=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskShapes=[],e.starting=!1,e.moving=!1,e.recordPoints=null,e.preMovePoint=null,e.shapeType="path",e.maskType="multi-mask",e}return Object(a.__extends)(e,t),e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var e="".concat(this.maskType,":").concat(t),n=this.context.view,i=this.context.event,r={type:this.shapeType,name:this.maskType,get:function(t){return r.hasOwnProperty(t)?r[t]:void 0}};n.emit(e,{target:r,maskShapes:this.maskShapes,multiPoints:this.recordPoints,x:i.x,y:i.y})},e.prototype.createMask=function(t){var e=this.context.view,n=this.recordPoints[t],i=this.getMaskAttrs(n),r=e.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:Object(a.__assign)({fill:"#C5D4EB",opacity:.3},i)});this.maskShapes.push(r)},e.prototype.getMaskPath=function(t){return[]},e.prototype.show=function(){this.maskShapes.length>0&&(this.maskShapes.forEach((function(t){return t.show()})),this.emitEvent("show"))},e.prototype.start=function(t){this.recordPointStart(),this.starting=!0,this.moving=!1;var e=this.recordPoints.length-1;this.createMask(e),this.updateShapesCapture(!1),this.updateMask(null==t?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint(),this.updateShapesCapture(!1)},e.prototype.move=function(){if(this.moving&&0!==this.maskShapes.length){var t=this.getCurrentPoint(),e=this.preMovePoint,n=t.x-e.x,i=t.y-e.y,r=this.getCurMaskShapeIndex();r>-1&&(this.recordPoints[r].forEach((function(t){t.x+=n,t.y+=i})),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t)}},e.prototype.updateMask=function(t){var e=this;this.recordPoints.forEach((function(n,i){var r=Object(s.deepMix)({},e.getMaskAttrs(n),t);e.maskShapes[i].attr(r)}))},e.prototype.resize=function(){this.starting&&this.maskShapes.length>0&&(this.recordPointContinue(),this.updateMask(),this.emitEvent("change"))},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null,this.updateShapesCapture(!0)},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.updateShapesCapture(!0)},e.prototype.hide=function(){this.maskShapes.length>0&&(this.maskShapes.forEach((function(t){return t.hide()})),this.emitEvent("hide"))},e.prototype.remove=function(){var t=this.getCurMaskShapeIndex();t>-1&&(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.updateShapesCapture(!0),this.emitEvent("change"))},e.prototype.clearAll=function(){this.recordPointClear(),this.maskShapes.forEach((function(t){return t.remove()})),this.maskShapes=[],this.preMovePoint=null},e.prototype.clear=function(){var t=this.getCurMaskShapeIndex();-1===t?(this.recordPointClear(),this.maskShapes.forEach((function(t){return t.remove()})),this.maskShapes=[],this.emitEvent("clearAll")):(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.emitEvent("clearSingle")),this.preMovePoint=null},e.prototype.destroy=function(){this.clear(),t.prototype.destroy.call(this)},e.prototype.getRecordPoints=function(){var t;return Object(a.__spreadArray)([],Object(a.__read)(null!==(t=this.recordPoints)&&void 0!==t?t:[]),!1)},e.prototype.recordPointStart=function(){var t=this.getRecordPoints(),e=this.getCurrentPoint();this.recordPoints=Object(a.__spreadArray)(Object(a.__spreadArray)([],Object(a.__read)(t),!1),[[e]],!1)},e.prototype.recordPointContinue=function(){var t=this.getRecordPoints(),e=this.getCurrentPoint(),n=t.splice(-1,1)[0]||[];n.push(e),this.recordPoints=Object(a.__spreadArray)(Object(a.__spreadArray)([],Object(a.__read)(t),!1),[n],!1)},e.prototype.recordPointClear=function(){this.recordPoints=[]},e.prototype.updateShapesCapture=function(t){this.maskShapes.forEach((function(e){return e.set("capture",t)}))},e.prototype.getCurMaskShapeIndex=function(){var t=this.getCurrentPoint();return this.maskShapes.findIndex((function(e){var n=e.attrs,i=n.width,r=n.height,o=n.r;return!(0===i||0===r||0===o)&&e.isHit(t.x,t.y)}))},e}(Tt),ma=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return Object(a.__extends)(e,t),e.prototype.getRegion=function(t){return ra(t)},e.prototype.getMaskAttrs=function(t){var e=this.getRegion(t);return oa(e.start,e.end)},e}(va),ba=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return Object(a.__extends)(e,t),e.prototype.getRegion=function(t){var e=this.context.view.getCoordinate();return ca(t,this.dim,this.inPlot,e)},e}(ma),xa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e.getMaskAttrs=na,e}return Object(a.__extends)(e,t),e}(va),_a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getMaskPath=ua,e.getMaskAttrs=ha,e}return Object(a.__extends)(e,t),e.prototype.addPoint=function(){this.resize()},e}(va),Oa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getMaskPath=pa,e.getMaskAttrs=da,e}return Object(a.__extends)(e,t),e}(_a),wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.setCursor=function(t){this.context.view.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e.prototype.zoomIn=function(){this.setCursor("zoom-in")},e.prototype.zoomOut=function(){this.setCursor("zoom-out")},e}(Tt),ja=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.filterView=function(t,e,n){var i=this;t.getScaleByField(e)&&t.filter(e,n),t.views&&t.views.length&&Object(s.each)(t.views,(function(t){i.filterView(t,e,n)}))},e.prototype.filter=function(){var t=Kt(this.context);if(t){var e=this.context.view,n=t.component,i=n.get("field");if(Jt(t)){if(i){var r=n.getItemsByState("unchecked"),o=me(e,i),s=r.map((function(t){return t.name}));s.length?this.filterView(e,i,(function(t){var e=o.getText(t);return!s.includes(e)})):this.filterView(e,i,null),e.render(!0)}}else if(te(t)){var c=n.getValue(),l=Object(a.__read)(c,2),u=l[0],h=l[1];this.filterView(e,i,(function(t){return t>=u&&t<=h})),e.render(!0)}}},e}(Tt);function Sa(t,e,n,i){var r=Math.min(n[e],i[e]),o=Math.max(n[e],i[e]),s=Object(a.__read)(t.range,2),c=s[0],l=s[1];if(rl&&(o=l),r===l&&o===l)return null;var u=t.invert(r),h=t.invert(o);if(t.isCategory){var f=t.values.indexOf(u),p=t.values.indexOf(h),d=t.values.slice(f,p+1);return function(t){return d.includes(t)}}return function(t){return t>=u&&t<=h}}!function(t){t.FILTER="brush-filter-processing",t.RESET="brush-filter-reset",t.BEFORE_FILTER="brush-filter:beforefilter",t.AFTER_FILTER="brush-filter:afterfilter",t.BEFORE_RESET="brush-filter:beforereset",t.AFTER_RESET="brush-filter:afterreset"}(ga||(ga={}));var Ma=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return Object(a.__extends)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,e;if(ee(this.context)){var n=this.context.event.target.getCanvasBBox();t={x:n.x,y:n.y},e={x:n.maxX,y:n.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var i=this.context,r=i.view,o={view:r,event:i.event,dims:this.dims};r.emit(ga.BEFORE_FILTER,ln.fromData(r,ga.BEFORE_FILTER,o));var a=r.getCoordinate(),s=a.invert(e),c=a.invert(t);if(this.hasDim("x")){var l=r.getXScale(),u=Sa(l,"x",s,c);this.filterView(r,l.field,u)}if(this.hasDim("y")){var h=r.getYScales()[0];u=Sa(h,"y",s,c);this.filterView(r,h.field,u)}this.reRender(r,{source:ga.FILTER}),r.emit(ga.AFTER_FILTER,ln.fromData(r,ga.AFTER_FILTER,o))}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(t.emit(ga.BEFORE_RESET,ln.fromData(t,ga.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:ga.RESET}),t.emit(ga.AFTER_RESET,ln.fromData(t,ga.AFTER_RESET,{}))},e.prototype.filterView=function(t,e,n){t.filter(e,n)},e.prototype.reRender=function(t,e){t.render(!0,e)},e}(Tt),Aa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.filterView=function(t,e,n){var i=ge(t);Object(s.each)(i,(function(t){t.filter(e,n)}))},e.prototype.reRender=function(t){var e=ge(t);Object(s.each)(e,(function(t){t.render(!0)}))},e}(Ma),Ca=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.filter=function(){var t=Kt(this.context),e=this.context.view,n=ae(e);if(ee(this.context)){var i=ie(this.context,10);i&&Object(s.each)(n,(function(t){i.includes(t)?t.show():t.hide()}))}else if(t){var r=t.component,o=r.get("field");if(Jt(t)){if(o){var c=r.getItemsByState("unchecked"),l=me(e,o),u=c.map((function(t){return t.name}));Object(s.each)(n,(function(t){var e=ce(t,o),n=l.getText(e);u.indexOf(n)>=0?t.hide():t.show()}))}}else if(te(t)){var h=r.getValue(),f=Object(a.__read)(h,2),p=f[0],d=f[1];Object(s.each)(n,(function(t){var e=ce(t,o);e>=p&&e<=d?t.show():t.hide()}))}}},e.prototype.clear=function(){var t=ae(this.context.view);Object(s.each)(t,(function(t){t.show()}))},e.prototype.reset=function(){this.clear()},e}(Tt),Ea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return Object(a.__extends)(e,t),e.prototype.filter=function(){ee(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=ie(this.context,10);if(e){var n=t.getXScale().field,i=t.getYScales()[0].field,r=e.map((function(t){return t.getModel().data})),o=ge(t);Object(s.each)(o,(function(t){var e=ae(t);Object(s.each)(e,(function(t){var e=t.getModel().data;ve(r,e,n,i)?t.show():t.hide()}))}))}},e.prototype.filterByBBox=function(){var t=this,e=ge(this.context.view);Object(s.each)(e,(function(e){var n=re(t.context,e,10),i=ae(e);n&&Object(s.each)(i,(function(t){n.includes(t)?t.show():t.hide()}))}))},e.prototype.reset=function(){var t=ge(this.context.view);Object(s.each)(t,(function(t){var e=ae(t);Object(s.each)(e,(function(t){t.show()}))}))},e}(Tt),Ia=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return Object(a.__extends)(e,t),e.prototype.getButtonCfg=function(){return Object(s.deepMix)(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:Object(a.__assign)({text:t.text},t.textStyle)}).getBBox(),i=on(t.padding),r=e.addShape({type:"rect",name:"button-rect",attrs:Object(a.__assign)({x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},t.style)});r.toBack(),e.on("mouseenter",(function(){r.attr(t.activeStyle)})),e.on("mouseleave",(function(){r.attr(t.style)})),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view.getCoordinate().convert({x:1,y:1}),e=this.buttonGroup,n=e.getBBox(),i=B.ext.transform(null,[["t",t.x-n.width-10,t.y+n.height+5]]);e.setMatrix(i)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(Tt),Pa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return Object(a.__extends)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):pe(t,this.startPoint)>4&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(Tt),Ta=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return Object(a.__extends)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint();if(pe(t,e)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var n=this.context.view,i=B.ext.transform(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);n.backgroundGroup.setMatrix(i),n.foregroundGroup.setMatrix(i),n.middleGroup.setMatrix(i)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(Tt),Fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return Object(a.__extends)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},e}(Tt),La=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return Object(a.__extends)(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var e=this.dims;Object(s.each)(e,(function(e){var n=t.getScale(e),i=n.min,r=n.max,o=n.values;t.startCache[e]={min:i,max:r,values:o}}))},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),i=this.context.getCurrentPoint(),r=n.invert(e),o=n.invert(i),a=o.x-r.x,c=o.y-r.y,l=this.context.view,u=this.dims;Object(s.each)(u,(function(e){t.translateDim(e,{x:-1*a,y:-1*c})})),l.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},e.prototype.translateLinear=function(t,e,n){var i=this.context.view,r=this.startCache[t],o=r.min,a=r.max,s=a-o,c=n[t]*s;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:o,max:a}),i.scale(e.field,{nice:!1,min:o+c,max:a+c})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(Fa),ka=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return Object(a.__extends)(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this,n=this.dims;Object(s.each)(n,(function(n){e.zoomDim(n,t)})),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},e.prototype.zoomLinear=function(t,e,n){var i=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var r=this.cacheScaleDefs[t],o=r.max-r.min,a=e.min,s=e.max,c=n*o,l=a-c,u=s+c,h=(u-l)/o;u>l&&h<100&&h>.01&&i.scale(e.field,{nice:!1,min:a-c,max:s+c})},e}(Fa);var Da=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.scroll=function(t){var e=this.context,n=e.view,i=e.event;if(n.getOptions().scrollbar){var r=(null==t?void 0:t.wheelDelta)||1,o=n.getController("scrollbar"),a=n.getXScale(),c=n.getOptions().data,l=Object(s.size)(Object(s.valuesOfKey)(c,a.field)),u=Object(s.size)(a.values),h=o.getValue(),f=Math.floor((l-u)*h)+(function(t){return t.gEvent.originalEvent.deltaY>0}(i)?r:-r),p=r/(l-u)/1e4,d=Object(s.clamp)(f/(l-u)+p,0,1);o.setValue(d)}},e}(Tt),Ba=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.show=function(){var t=this.context,e=Kt(t).axis.cfg.title,n=e.description,i=e.text,r=e.descriptionTooltipStyle,o=t.event,a=o.x,s=o.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:i||"",customContent:function(){return'\n
\n
\n 字段说明:').concat(n,"\n
\n
\n ")},x:a,y:s}),this.tooltip.show()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=this.context.view.canvas,n={start:{x:0,y:0},end:{x:e.get("width"),y:e.get("height")}},i=new K({parent:e.get("el").parentNode,region:n,visible:!1,containerId:"aixs-description-tooltip",domStyles:Object(a.__assign)({},Object(s.deepMix)({},(t={},t[W.TOOLTIP_CSS_CONST.CONTAINER_CLASS]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[W.TOOLTIP_CSS_CONST.TITLE_CLASS]={"word-break":"break-all","margin-bottom":"3px"},t)))});i.init(),i.setCapture(!1),this.tooltip=i},e}(Tt);function Na(t){return t.isInPlot()}function Ra(t){return t.gEvent.preventDefault(),t.gEvent.originalEvent.deltaY>0}qe("dark",Te(ki)),m("canvas",Di),m("svg",Bi),yn("Polygon",ir),yn("Interval",Qi),yn("Schema",rr),yn("Path",Ni),yn("Point",nr),yn("Line",Ji),yn("Area",Gi),yn("Edge",Yi),yn("Heatmap",Wi),yn("Violin",or),Fn("base",ei),Fn("interval",dr),Fn("pie",vr),Fn("polar",yr),kn("overlap",(function(t,e,n,i){var r=new br;Object(s.each)(e,(function(t){for(var e=t.find((function(t){return"text"===t.get("type")})),n=e.attr(),i=n.x,o=n.y,a=!1,s=0;s<=8;s++){var c=xr(e,i,o,s);if(r.hasGap(c)){r.fillGap(c),a=!0;break}}a||t.remove(!0)})),r.destroy()})),kn("distribute",(function(t,e,n,i){if(t.length&&e.length){var r=t[0]?t[0].offset:0,o=e[0].get("coordinate"),c=o.getRadius(),l=o.getCenter();if(r>0){var u=2*(c+r)+28,h={start:o.start,end:o.end},f=[[],[]];t.forEach((function(t){t&&("right"===t.textAlign?f[0].push(t):f[1].push(t))})),f.forEach((function(t,n){var i=u/14;t.length>i&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(i,t.length-i)),t.sort((function(t,e){return t.y-e.y})),function(t,e,n,i,r,o){var c,l,u,h=!0,f=i.start,p=i.end,d=Math.min(f.y,p.y),g=Math.abs(f.y-p.y),y=0,v=Number.MIN_VALUE,m=e.map((function(t){return t.y>y&&(y=t.y),t.yg&&(g=y-d);h;)for(m.forEach((function(t){var e=(Math.min.apply(v,t.targets)+Math.max.apply(v,t.targets))/2;t.pos=Math.min(Math.max(v,e-t.size/2),g-t.size)})),h=!1,u=m.length;u--;)if(u>0){var b=m[u-1],x=m[u];b.pos+b.size>x.pos&&(b.size+=x.size,b.targets=b.targets.concat(x.targets),b.pos+b.size>g&&(b.pos=g-b.size),m.splice(u,1),h=!0)}u=0,m.forEach((function(t){var i=d+n/2;t.targets.forEach((function(){e[u].y=t.pos+i,i+=n,u++}))}));var _={};try{for(var O=Object(a.__values)(t),w=O.next();!w.done;w=O.next()){var j=w.value;_[j.get("id")]=j}}catch(t){c={error:t}}finally{try{w&&!w.done&&(l=O.return)&&l.call(O)}finally{if(c)throw c.error}}e.forEach((function(t){var e=t.r*t.r,n=Math.pow(Math.abs(t.y-r.y),2);if(er.maxX||i.maxY>r.maxY)&&t.remove(!0)}))})),kn("limit-in-canvas",(function(t,e,n,i){Object(s.each)(e,(function(t){var e=i.minX,n=i.minY,r=i.maxX,o=i.maxY,a=t.getCanvasBBox(),s=a.minX,c=a.minY,l=a.maxX,u=a.maxY,h=a.x,f=a.y,p=a.width,d=a.height,g=h,y=f;(sr?g=r-p:l>r&&(g-=l-r),c>o?y=o-d:u>o&&(y-=u-o),g===h&&y===f||qn(t,g-h,y-f)}))})),kn("limit-in-plot",(function(t,e,n,i,r){if(!(e.length<=0)){var o=(null==r?void 0:r.direction)||["top","right","bottom","left"],a=(null==r?void 0:r.action)||"translate",c=(null==r?void 0:r.margin)||0,l=e[0].get("coordinate");if(l){var u=function(t,e){void 0===e&&(e=0);var n=t.start,i=t.end,r=t.getWidth(),o=t.getHeight(),a=Math.min(n.x,i.x),s=Math.min(n.y,i.y);return lt.fromRange(a-e,s-e,a+r+e,s+o+e)}(l,c),h=u.minX,f=u.minY,p=u.maxX,d=u.maxY;Object(s.each)(e,(function(t){var e=t.getCanvasBBox(),n=e.minX,i=e.minY,r=e.maxX,c=e.maxY,l=e.x,u=e.y,g=e.width,y=e.height,v=l,m=u;if(o.indexOf("left")>=0&&(n=0&&(i=0&&(n>p?v=p-g:r>p&&(v-=r-p)),o.indexOf("bottom")>=0&&(i>d?m=d-y:c>d&&(m-=c-d)),v!==l||m!==u){var b=v-l;if("translate"===a)qn(t,b,m-u);else if("ellipsis"===a){t.findAll((function(t){return"text"===t.get("type")})).forEach((function(t){var e=Object(s.pick)(t.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),n=t.getCanvasBBox(),i=function(t,e,n){var i,r=Vr("...",n);i=Object(s.isString)(t)?t:Object(s.toString)(t);var o,a,c=e,l=[];if(Vr(t,n)<=e)return t;for(;o=i.substr(0,16),!((a=Vr(o,n))+r>c&&a>c);)if(l.push(o),c-=a,!(i=i.substr(16)))return l.join("");for(;o=i.substr(0,1),!((a=Vr(o,n))+r>c);)if(l.push(o),c-=a,!(i=i.substr(1)))return l.join("");return"".concat(l.join(""),"...")}(t.attr("text"),n.width-Math.abs(b),e);t.attr("text",i)}))}else t.hide()}}))}}})),kn("pie-outer",(function(t,e,n,i){var r,o,c=Object(s.filter)(t,(function(t){return!Object(s.isNil)(t)})),l=e[0]&&e[0].get("coordinate");if(l){var u=l.getCenter(),h=l.getRadius(),f={};try{for(var p=Object(a.__values)(e),d=p.next();!d.done;d=p.next()){var g=d.value;f[g.get("id")]=g}}catch(t){r={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}var y=Object(s.get)(c[0],"labelHeight",14),v=Object(s.get)(c[0],"offset",0);if(!(v<=0)){var m=Object(s.groupBy)(c,(function(t){return t.xn&&(t.sort((function(t,e){return e.percent-t.percent})),Object(s.each)(t,(function(t,e){e+1>n&&(f[t.id].set("visible",!1),t.invisible=!0)}))),mr(t,y,w)})),Object(s.each)(m,(function(t,e){Object(s.each)(t,(function(t){var n="right"===e,i=f[t.id].getChildByIndex(0);if(i){var r=h+v,o=t.y-u.y,a=Math.pow(r,2),c=Math.pow(o,2),p=a-c>0?a-c:0,d=Math.sqrt(p),g=Math.abs(Math.cos(t.angle)*r);t.x=n?u.x+Math.max(d,g):u.x-Math.max(d,g)}i&&(i.attr("y",t.y),i.attr("x",t.x)),function(t,e){var n=e.getCenter(),i=e.getRadius();if(t&&t.labelLine){var r=t.angle,o=t.offset,a=tt(n.x,n.y,i,r),c=t.x+Object(s.get)(t,"offsetX",0)*(Math.cos(r)>0?1:-1),l=t.y+Object(s.get)(t,"offsetY",0)*(Math.sin(r)>0?1:-1),u={x:c-4*Math.cos(r),y:l-4*Math.sin(r)},h=t.labelLine.smooth,f=[],p=u.x-n.x,d=u.y-n.y,g=Math.atan(d/p);if(p<0&&(g+=Math.PI),!1===h){Object(s.isObject)(t.labelLine)||(t.labelLine={});var y=0;(r<0&&r>-Math.PI/2||r>1.5*Math.PI)&&u.y>a.y&&(y=1),r>=0&&ra.y&&(y=1),r>=Math.PI/2&&ru.y&&(y=1),(r<-Math.PI/2||r>=Math.PI&&r<1.5*Math.PI)&&a.y>u.y&&(y=1);var v=o/2>4?4:Math.max(o/2-1,0),m=tt(n.x,n.y,i+v,r),b=tt(n.x,n.y,i+o/2,g);f.push("M ".concat(a.x," ").concat(a.y)),f.push("L ".concat(m.x," ").concat(m.y)),f.push("A ".concat(n.x," ").concat(n.y," 0 ").concat(0," ").concat(y," ").concat(b.x," ").concat(b.y)),f.push("L ".concat(u.x," ").concat(u.y))}else{m=tt(n.x,n.y,i+(o/2>4?4:Math.max(o/2-1,0)),r);var x=a.xMath.pow(Math.E,-16)&&f.push.apply(f,["C",u.x+4*x,u.y,2*m.x-a.x,2*m.y-a.y,a.x,a.y]),f.push("L ".concat(a.x," ").concat(a.y))}t.labelLine.path=f.join(" ")}}(t,l)}))}))}}})),kn("adjust-color",(function(t,e,n){if(0!==n.length){var i=n[0].get("element").geometry.theme,r=i.labels||{},o=r.fillColorLight,s=r.fillColorDark;n.forEach((function(t,n){var r=e[n].find((function(t){return"text"===t.get("type")})),c=lt.fromObject(t.getBBox()),l=lt.fromObject(r.getCanvasBBox()),u=!c.contains(l),h=function(t){var e=A.default.toRGB(t).toUpperCase();if(Lr[e])return Lr[e];var n=Object(a.__read)(A.default.rgb2arr(e),3);return(299*n[0]+587*n[1]+114*n[2])/1e3<128}(t.attr("fill"));u?r.attr(i.overflowLabels.style):h?o&&r.attr("fill",o):s&&r.attr("fill",s)}))}})),kn("interval-adjust-position",(function(t,e,n){var i;if(0!==n.length){var r=null===(i=n[0])||void 0===i?void 0:i.get("element"),o=null==r?void 0:r.geometry;if(o&&"interval"===o.type)kr(o,e,n)&&n.forEach((function(t,n){var i=e[n];!function(t,e,n){var i=t.coordinate,r=lt.fromObject(n.getBBox()),o=$n(e);i.isTransposed?o.attr({x:r.minX+r.width/2,textAlign:"center"}):o.attr({y:r.minY+r.height/2,textBaseline:"middle"})}(o,i,t)}))}})),kn("interval-hide-overlap",(function(t,e,n){var i;if(0!==n.length){var r=null===(i=n[0])||void 0===i?void 0:i.get("element"),o=null==r?void 0:r.geometry;if(o&&"interval"===o.type){var c,l=function(t){var e=[],n=Math.max(Math.floor(t.length/500),1);return Object(s.each)(t,(function(t,i){i%n==0?e.push(t):t.set("visible",!1)})),e}(e),u=Object(a.__read)(o.getXYFields(),1)[0],h=[],f=[],p=Object(s.groupBy)(l,(function(t){return t.get("data")[u]})),d=Object(s.uniq)(Object(s.map)(l,(function(t){return t.get("data")[u]})));l.forEach((function(t){t.set("visible",!0)}));var g=function(t){t&&(t.length&&f.push(t.pop()),f.push.apply(f,Object(a.__spreadArray)([],Object(a.__read)(t),!1)))};for(Object(s.size)(d)>0&&(c=d.shift(),g(p[c])),Object(s.size)(d)>0&&(c=d.pop(),g(p[c])),Object(s.each)(d.reverse(),(function(t){g(p[t])}));f.length>0;){var y=f.shift();y.get("visible")&&(Qn(y,h)?y.set("visible",!1):h.push(y))}}}})),kn("point-adjust-position",(function(t,e,n,i,r){var o,c;if(0!==n.length){var l=null===(o=n[0])||void 0===o?void 0:o.get("element"),u=null==l?void 0:l.geometry;if(u&&"point"===u.type){var h=Object(a.__read)(u.getXYFields(),2),f=h[0],p=h[1],d=Object(s.groupBy)(e,(function(t){return t.get("data")[f]})),g=[],y=r&&r.offset||(null===(c=t[0])||void 0===c?void 0:c.offset)||12;Object(s.map)(Object(s.keys)(d).reverse(),(function(t){for(var e=function(t,e){var n=t.getXYFields()[1],i=[],r=e.sort((function(t,e){return t.get("data")[n]-t.get("data")[n]}));return r.length>0&&i.push(r.shift()),r.length>0&&i.push(r.pop()),i.push.apply(i,Object(a.__spreadArray)([],Object(a.__read)(r),!1)),i}(u,d[t]);e.length;){var n=e.shift(),i=$n(n);if(Dr(g,n,(function(t,e){return t.get("data")[f]===e.get("data")[f]&&t.get("data")[p]===e.get("data")[p]})))i.set("visible",!1);else{var r=!1;Br(g,n)&&(i.attr("y",i.attr("y")+2*y),r=Br(g,n)),r?i.set("visible",!1):g.push(n)}}}))}}})),kn("pie-spider",(function(t,e,n,i){var r,o,c=e[0]&&e[0].get("coordinate");if(c){var l=c.getCenter(),u=c.getRadius(),h={};try{for(var f=Object(a.__values)(e),p=f.next();!p.done;p=f.next()){var d=p.value;h[d.get("id")]=d}}catch(t){r={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}var g=Object(s.get)(t[0],"labelHeight",14),y=Math.max(Object(s.get)(t[0],"offset",0),4);Object(s.each)(t,(function(t){if(t&&Object(s.get)(h,[t.id])){var e=t.x>l.x||t.x===l.x&&t.y>l.y,n=Object(s.isNil)(t.offsetX)?4:t.offsetX,i=tt(l.x,l.y,u+4,t.angle),r=y+n;t.x=l.x+(e?1:-1)*(u+r),t.y=i.y}}));var v=c.start,m=c.end,b=Object(s.groupBy)(t,(function(t){return t.xx&&(x=Math.min(e,Math.abs(v.y-m.y)))}));var _={minX:v.x,maxX:m.x,minY:l.y-x/2,maxY:l.y+x/2};Object(s.each)(b,(function(t,e){var n=x/g;t.length>n&&(t.sort((function(t,e){return e.percent-t.percent})),Object(s.each)(t,(function(t,e){e>n&&(h[t.id].set("visible",!1),t.invisible=!0)}))),mr(t,g,_)}));var O=_.minY,w=_.maxY;Object(s.each)(b,(function(t,e){var n="right"===e;Object(s.each)(t,(function(t){var e=Object(s.get)(h,t&&[t.id]);if(e)if(t.yw)e.set("visible",!1);else{var i=e.getChildByIndex(0),r=i.getCanvasBBox(),o=n?r.x:r.maxX,a=r.y+r.height/2;qn(i,t.x-o,t.y-a),t.labelLine&&function(t,e,n){var i,r=e.getCenter(),o=e.getRadius(),a={x:t.x-(n?4:-4),y:t.y},c=tt(r.x,r.y,o+4,t.angle),l={x:a.x,y:a.y},u={x:c.x,y:c.y},h=tt(r.x,r.y,o,t.angle);if(a.y!==c.y){var f=n?4:-4;l.y=a.y,t.angle<0&&t.angle>=-Math.PI/2&&(l.x=Math.max(c.x,a.x-f),a.y0&&t.anglec.y?u.y=l.y:(u.y=c.y,u.x=Math.max(u.x,l.x-f))),t.angle>Math.PI/2&&(l.x=Math.min(c.x,a.x-f),a.y>c.y?u.y=l.y:(u.y=c.y,u.x=Math.min(u.x,l.x-f))),t.angle<-Math.PI/2&&(l.x=Math.min(c.x,a.x-f),a.y0&&i.push(r.shift()),r.length>0&&i.push(r.pop()),i.push.apply(i,Object(a.__spreadArray)([],Object(a.__read)(r),!1)),i}(u,d[t]);e.length;){var n=e.shift(),i=$n(n);if(Nr(g,n,(function(t,e){return t.get("data")[f]===e.get("data")[f]&&t.get("data")[p]===e.get("data")[p]})))i.set("visible",!1);else{var r=!1;Rr(g,n)&&(i.attr("y",i.attr("y")+2*y),r=Rr(g,n)),r?i.set("visible",!1):g.push(n)}}}))}}})),wn("fade-in",(function(t,e,n){var i={fillOpacity:Object(s.isNil)(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),strokeOpacity:Object(s.isNil)(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity"),opacity:Object(s.isNil)(t.attr("opacity"))?1:t.attr("opacity")};t.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),t.animate(i,e)})),wn("fade-out",(function(t,e,n){var i=e.easing,r=e.duration,o=e.delay;t.animate({fillOpacity:0,strokeOpacity:0,opacity:0},r,i,(function(){t.remove(!0)}),o)})),wn("grow-in-x",(function(t,e,n){zr(t,e,n.coordinate,n.minYPoint,"x")})),wn("grow-in-xy",(function(t,e,n){zr(t,e,n.coordinate,n.minYPoint,"xy")})),wn("grow-in-y",(function(t,e,n){zr(t,e,n.coordinate,n.minYPoint,"y")})),wn("scale-in-x",(function(t,e,n){var i=t.getBBox(),r=t.get("origin").mappingData.points,o=r[0].y-r[1].y>0?i.maxX:i.minX,a=(i.minY+i.maxY)/2;t.applyToMatrix([o,a,1]);var s=B.ext.transform(t.getMatrix(),[["t",-o,-a],["s",.01,1],["t",o,a]]);t.setMatrix(s),t.animate({matrix:B.ext.transform(t.getMatrix(),[["t",-o,-a],["s",100,1],["t",o,a]])},e)})),wn("scale-in-y",(function(t,e,n){var i=t.getBBox(),r=t.get("origin").mappingData,o=(i.minX+i.maxX)/2,a=r.points,s=a[0].y-a[1].y<=0?i.maxY:i.minY;t.applyToMatrix([o,s,1]);var c=B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",1,.01],["t",o,s]]);t.setMatrix(c),t.animate({matrix:B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",1,100],["t",o,s]])},e)})),wn("wave-in",(function(t,e,n){var i=pt(n.coordinate,20),r=i.type,o=i.startState,c=i.endState,l=t.setClip({type:r,attrs:o});n.toAttrs&&t.attr(n.toAttrs),l.animate(c,Object(a.__assign)(Object(a.__assign)({},e),{callback:function(){t&&!t.get("destroyed")&&t.set("clipShape",null),l.remove(!0),Object(s.isFunction)(e.callback)&&e.callback()}}))})),wn("zoom-in",(function(t,e,n){Xr(t,e,"zoomIn")})),wn("zoom-out",(function(t,e,n){Xr(t,e,"zoomOut")})),wn("position-update",(function(t,e,n){var i=n.toAttrs,r=i.x,o=i.y;delete i.x,delete i.y,t.attr(i),t.animate({x:r,y:o},e)})),wn("sector-path-update",(function(t,e,n){var i=n.toAttrs,r=n.coordinate,o=i.path||[],c=o.map((function(t){return t[0]}));if(!(o.length<1)){var l=Wr(o),u=l.startAngle,h=l.endAngle,f=l.radius,p=l.innerRadius,d=Wr(t.attr("path")),g=d.startAngle,y=d.endAngle,v=r.getCenter(),m=u-g,b=h-y;0!==m||0!==b?t.animate((function(t){var e=g+t*m,n=y+t*b;return Object(a.__assign)(Object(a.__assign)({},i),{path:Object(s.isEqual)(c,["M","A","A","Z"])?nt(v.x,v.y,f,e,n):et(v.x,v.y,f,e,n,p)})}),Object(a.__assign)(Object(a.__assign)({},e),{callback:function(){t.attr("path",o),Object(s.isFunction)(e.callback)&&e.callback()}})):t.attr("path",o)}})),wn("path-in",(function(t,e,n){var i=t.getTotalLength();t.attr("lineDash",[i]),t.animate((function(t){return{lineDashOffset:(1-t)*i}}),e)})),Pt("rect",Qr),Pt("mirror",Kr),Pt("list",Zr),Pt("matrix",$r),Pt("circle",qr),Pt("tree",Jr),sn("axis",uo),sn("legend",go),sn("tooltip",xn),sn("annotation",io),sn("slider",yo),sn("scrollbar",vo),Dt("tooltip",_o),Dt("sibling-tooltip",Oo),Dt("ellipsis-text",wo),Dt("element-active",Ao),Dt("element-single-active",To),Dt("element-range-active",Io),Dt("element-highlight",No),Dt("element-highlight-by-x",Vo),Dt("element-highlight-by-color",Ro),Dt("element-single-highlight",Go),Dt("element-range-highlight",zo),Dt("element-sibling-highlight",zo,{effectSiblings:!0,effectByRecord:!0}),Dt("element-selected",Wo),Dt("element-single-selected",Xo),Dt("element-range-selected",Yo),Dt("element-link-by-color",Co),Dt("active-region",xo),Dt("list-active",Uo),Dt("list-selected",Zo),Dt("list-highlight",qo),Dt("list-unchecked",$o),Dt("list-checked",Ko),Dt("list-focus",Qo),Dt("list-radio",ta),Dt("legend-item-highlight",qo,{componentNames:["legend"]}),Dt("axis-label-highlight",qo,{componentNames:["axis"]}),Dt("axis-description",Ba),Dt("rect-mask",aa),Dt("x-rect-mask",la,{dim:"x"}),Dt("y-rect-mask",la,{dim:"y"}),Dt("circle-mask",ia),Dt("path-mask",fa),Dt("smooth-path-mask",ya),Dt("rect-multi-mask",ma),Dt("x-rect-multi-mask",ba,{dim:"x"}),Dt("y-rect-multi-mask",ba,{dim:"y"}),Dt("circle-multi-mask",xa),Dt("path-multi-mask",_a),Dt("smooth-path-multi-mask",Oa),Dt("cursor",wa),Dt("data-filter",ja),Dt("brush",Ma),Dt("brush-x",Ma,{dims:["x"]}),Dt("brush-y",Ma,{dims:["y"]}),Dt("sibling-filter",Aa),Dt("sibling-x-filter",Aa,{dims:"x"}),Dt("sibling-y-filter",Aa,{dims:"y"}),Dt("element-filter",Ca),Dt("element-sibling-filter",Ea),Dt("element-sibling-filter-record",Ea,{byRecord:!0}),Dt("view-drag",Pa),Dt("view-move",Ta),Dt("scale-translate",La),Dt("scale-zoom",ka),Dt("reset-button",Ia,{name:"reset-button",text:"reset"}),Dt("mousewheel-scroll",Da),Pe("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),Pe("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),Pe("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Pe("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Pe("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Pe("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Pe("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Pe("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),Pe("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),Pe("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),Pe("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),Pe("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),Pe("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Na,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Na,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Na,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),Pe("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),Pe("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Na,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Na,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Na,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Pe("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Na,action:"path-mask:start"},{trigger:"mousedown",isEnable:Na,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),Pe("brush-x-multi",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"mousedown",isEnable:Na,action:["x-rect-multi-mask:start","x-rect-multi-mask:show"]},{trigger:"mask:dragstart",action:["x-rect-multi-mask:moveStart"]}],processing:[{trigger:"mousemove",isEnable:function(t){return!ne(t)},action:["x-rect-multi-mask:resize"]},{trigger:"multi-mask:change",action:"element-range-highlight:highlight"},{trigger:"mask:drag",action:["x-rect-multi-mask:move"]}],end:[{trigger:"mouseup",action:["x-rect-multi-mask:end"]},{trigger:"mask:dragend",action:["x-rect-multi-mask:moveEnd"]}],rollback:[{trigger:"dblclick",action:["x-rect-multi-mask:clear","cursor:crosshair"]},{trigger:"multi-mask:clearAll",action:["element-range-highlight:clear"]},{trigger:"multi-mask:clearSingle",action:["element-range-highlight:highlight"]}]}),Pe("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Pe("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(t){return!t.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),Pe("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Pe("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Pe("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),Pe("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Pe("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]}),Pe("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(t){return Ra(t.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(t){return!Ra(t.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Pe("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Pe("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]})},function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return m}));var i=n(36);n.d(e,"PathUtil",(function(){return i}));var r=n(102);for(var o in r)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var a=n(103);for(var o in a)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);var s=n(71);n.d(e,"Event",(function(){return s.a}));var c=n(72);n.d(e,"Base",(function(){return c.a}));var l=n(183);n.d(e,"AbstractCanvas",(function(){return l.a}));var u=n(104);n.d(e,"AbstractGroup",(function(){return u.a}));var h=n(105);n.d(e,"AbstractShape",(function(){return h.a}));var f=n(100);n.d(e,"getBBoxMethod",(function(){return f.a})),n.d(e,"registerBBox",(function(){return f.b}));var p=n(41);n.d(e,"getTextHeight",(function(){return p.b})),n.d(e,"assembleFont",(function(){return p.a}));var d=n(16);n.d(e,"isAllowCapture",(function(){return d.b}));var g=n(29);n.d(e,"multiplyVec2",(function(){return g.c})),n.d(e,"invert",(function(){return g.a}));var y=n(74);n.d(e,"getOffScreenContext",(function(){return y.a}));var v=n(76);n.d(e,"registerEasing",(function(){return v.b}));var m="0.5.11"},function(t,e,n){"use strict";function i(t,e,n){if(t){if("function"==typeof t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if("function"==typeof t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}}var r,o,a,s;function c(t){r||(r=document.createElement("table"),o=document.createElement("tr"),a=/^\s*<(\w+|!)[^>]*>/,s={tr:document.createElement("tbody"),tbody:r,thead:r,tfoot:r,td:o,th:o,"*":document.createElement("div")});var e=a.test(t)&&RegExp.$1;e&&e in s||(e="*");var n=s[e];t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,n.innerHTML=""+t;var i=n.childNodes[0];return i&&n.contains(i)&&n.removeChild(i),i}function l(t,e,n){var i;try{i=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(t){}finally{i=void 0===i?n:i}return i}function u(t,e){var n=function(t,e){var n=l(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}(t,e),i=parseFloat(l(t,"borderTopWidth"))||0,r=parseFloat(l(t,"paddingTop"))||0,o=parseFloat(l(t,"paddingBottom"))||0;return n+i+(parseFloat(l(t,"borderBottomWidth"))||0)+r+o+(parseFloat(l(t,"marginTop"))||0)+(parseFloat(l(t,"marginBottom"))||0)}function h(t,e){var n=function(t,e){var n=l(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}(t,e),i=parseFloat(l(t,"borderLeftWidth"))||0,r=parseFloat(l(t,"paddingLeft"))||0,o=parseFloat(l(t,"paddingRight"))||0,a=parseFloat(l(t,"borderRightWidth"))||0,s=parseFloat(l(t,"marginRight"))||0;return n+i+a+r+o+(parseFloat(l(t,"marginLeft"))||0)+s}function f(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return f}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pattern=e.transformations=e.limitInPlot=e.annotation=e.scale=e.scrollbar=e.slider=e.state=e.theme=e.animation=e.interaction=e.tooltip=e.legend=void 0;var i=n(1),r=n(0),o=n(38),a=n(2);e.legend=function(t){var e=t.chart,n=t.options,i=n.legend,r=n.colorField,o=n.seriesField;return!1===i?e.legend(!1):(r||o)&&e.legend(r||o,i),t},e.tooltip=function(t){var e=t.chart,n=t.options.tooltip;return void 0!==n&&e.tooltip(n),t},e.interaction=function(t){var e=t.chart,n=t.options.interactions;return(0,r.each)(n,(function(t){!1===t.enable?e.removeInteraction(t.type):e.interaction(t.type,t.cfg||{})})),t},e.animation=function(t){var e=t.chart,n=t.options.animation;return(0,a.addViewAnimation)(e,n),t},e.theme=function(t){var e=t.chart,n=t.options.theme;return n&&e.theme(n),t},e.state=function(t){var e=t.chart,n=t.options.state;return n&&(0,r.each)(e.geometries,(function(t){t.state(n)})),t},e.slider=function(t){var e=t.chart,n=t.options.slider;return e.option("slider",n),t},e.scrollbar=function(t){var e=t.chart,n=t.options.scrollbar;return e.option("scrollbar",n),t},e.scale=function(t,e){return function(n){var i=n.chart,s=n.options,c={};return(0,r.each)(t,(function(t,e){c[e]=(0,a.pick)(t,o.AXIS_META_CONFIG_KEYS)})),c=(0,a.deepAssign)({},e,s.meta,c),i.scale(c),n}},e.annotation=function(t){return function(e){var n=e.chart,o=e.options,a=n.getController("annotation");return(0,r.each)(i.__spreadArray(i.__spreadArray([],o.annotations||[],!0),t||[],!0),(function(t){a.annotation(t)})),e}},e.limitInPlot=function(t){var e=t.chart,n=t.options,i=n.yAxis,o=n.limitInPlot,s=o;return(0,r.isObject)(i)&&(0,r.isNil)(o)&&(s=!!Object.values((0,a.pick)(i,["min","max","minLimit","maxLimit"])).some((function(t){return!(0,r.isNil)(t)}))),e.limitInPlot=s,t},e.transformations=function(t){return void 0===t&&(t="rect"),function(e){var n=e.chart,i=e.options.coordinate,r=Array.from(i||[]).map((function(t){return"reflectX"===t.type?["reflect","x"]:"reflectY"===t.type?["reflect","y"]:"transpose"===t.type?["transpose"]:null})).filter((function(t){return!!t}));return 0!==r.length&&n.coordinate({type:t,actions:r}),e}};var s=n(46);Object.defineProperty(e,"pattern",{enumerable:!0,get:function(){return s.pattern}})},function(t,e,n){"use strict";var i=n(1),r=n(0),o=n(75),a=n(22),s=n(4),c=n(51),l=["visible","tip","delegateObject"],u=["container","group","shapesMap","isRegister","isUpdating","destroyed"],h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear(),this.get("group").remove()},e.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var e=this.getElementById(t);return e&&e.get("component")},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},e.prototype.getElementsByName=function(t){var e=[];return Object(r.each)(this.get("shapesMap"),(function(n){n.get("name")===t&&e.push(n)})),e},e.prototype.getContainer=function(){return this.get("container")},e.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},e.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){this.get("group").set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),t.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(e=Object(a.a)(n,e)),e},e.prototype.on=function(t,e,n){return this.get("group").on(t,e,n),this},e.prototype.off=function(t,e){var n=this.get("group");return n&&n.off(t,e),this},e.prototype.emit=function(t,e){this.get("group").emit(t,e)},e.prototype.init=function(){t.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,e){var n=this.get("group");e.target=n,n.emit(t,e),Object(o.a)(n,t,e)},e.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},e.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",Object(s.d)(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addComponent=function(t,e){var n=e.id,r=e.component,o=Object(i.__rest)(e,["id","component"]),a=new r(Object(i.__assign)(Object(i.__assign)({},o),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return a.init(),a.render(),this.get("isRegister")&&this.registerElement(a.get("group")),a},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){this.get("group").off()},e.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var n=Object(a.f)(e);t.attr("matrix",n)},e.prototype.addAnimation=function(t,e,n){var i=e.attr("opacity");Object(r.isNil)(i)&&(i=1),e.attr("opacity",0),e.animate({opacity:i},n)},e.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},e.prototype.updateAnimation=function(t,e,n,i){e.animate(n,i)},e.prototype.updateElements=function(t,e){var n,i=this,o=this.get("animate"),a=this.get("animateOption"),c=t.getChildren().slice(0);Object(r.each)(c,(function(t){var c=t.get("id"),h=i.getElementById(c),f=t.get("name");if(h)if(t.get("isComponent")){var p=t.get("component"),d=h.get("component"),g=Object(r.pick)(p.cfg,Object(r.difference)(Object(r.keys)(p.cfg),u));d.update(g),h.set("update_status","update")}else{var y=i.getReplaceAttrs(h,t);o&&a.update?i.updateAnimation(f,h,y,a.update):h.attr(y),t.isGroup()&&i.updateElements(t,h),Object(r.each)(l,(function(e){h.set(e,t.get(e))})),Object(s.m)(h,t),n=h,h.set("update_status","update")}else{e.add(t);var v=e.getChildren();if(v.splice(v.length-1,1),n){var m=v.indexOf(n);v.splice(m+1,0,t)}else v.unshift(t);if(i.registerElement(t),t.set("update_status","add"),t.get("isComponent"))(p=t.get("component")).set("container",e);else t.isGroup()&&i.registerNewGroup(t);if(n=t,o){var b=i.get("isInit")?a.appear:a.enter;b&&i.addAnimation(f,t,b)}}}))},e.prototype.clearUpdateStatus=function(t){var e=t.getChildren();Object(r.each)(e,(function(t){t.set("update_status",null)}))},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t;return(t={})[this.get("name")]=this,t.component=this,t},e.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),Object(r.mix)(e.delegateObject,n)},e.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),i=e.attr();return Object(r.each)(n,(function(t,e){void 0===i[e]&&(i[e]=void 0)})),i},e.prototype.registerNewGroup=function(t){var e=this,n=t.getChildren();Object(r.each)(n,(function(t){e.registerElement(t),t.set("update_status","add"),t.isGroup()&&e.registerNewGroup(t)}))},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];Object(r.each)(e,(function(t,e){!t.get("update_status")||t.destroyed?n.push([e,t]):t.set("update_status",null)}));var i=this.get("animate"),o=this.get("animateOption");Object(r.each)(n,(function(n){var a=n[0],s=n[1];if(!s.destroyed){var c=s.get("name");if(i&&o.leave){var l=Object(r.mix)({callback:function(){t.removeElement(s)}},o.leave);t.removeAnimation(c,s,l)}else t.removeElement(s)}delete e[a]}))},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(c.a);e.a=h},function(t,e,n){"use strict";var i=n(184);n.d(e,"Annotation",(function(){return i}));var r=n(185);n.d(e,"Axis",(function(){return r}));var o=n(187);n.d(e,"Crosshair",(function(){return o}));var a=n(189);n.d(e,"Grid",(function(){return a}));var s=n(190);n.d(e,"Legend",(function(){return s}));var c=n(191);n.d(e,"Tooltip",(function(){return c}));n(51),n(14),n(39);var l=n(188);n.d(e,"Slider",(function(){return l.a}));var u=n(193);n.d(e,"Scrollbar",(function(){return u.a}));n(106),n(107);var h=n(75);n.d(e,"propagationDelegate",(function(){return h.a}));var f=n(21);n.d(e,"TOOLTIP_CSS_CONST",(function(){return f}))},function(t,e,n){"use strict";n.d(e,"j",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"b",(function(){return s}));var i=n(0);function r(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}n.d(e,"e",(function(){return i.isNil})),n.d(e,"d",(function(){return i.isFunction})),n.d(e,"h",(function(){return i.isString})),n.d(e,"f",(function(){return i.isObject})),n.d(e,"i",(function(){return i.mix})),n.d(e,"a",(function(){return i.each})),n.d(e,"k",(function(){return i.upperFirst}));var o="undefined"!=typeof window&&void 0!==window.document;function a(t,e){if(t.isCanvas())return!0;for(var n=e.getParent(),i=!1;n;){if(n===t){i=!0;break}n=n.getParent()}return i}function s(t){return t.cfg.visible&&t.cfg.capture}},function(t,e,n){"use strict";n.d(e,"e",(function(){return v})),n.d(e,"b",(function(){return w})),n.d(e,"a",(function(){return I})),n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return D})),n.d(e,"f",(function(){return i}));var i={};n.r(i),n.d(i,"distance",(function(){return o})),n.d(i,"isNumberEqual",(function(){return a})),n.d(i,"getBBoxByArray",(function(){return s})),n.d(i,"getBBoxRange",(function(){return c})),n.d(i,"piMod",(function(){return l}));var r=n(0);function o(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)}function a(t,e){return Math.abs(t-e)<.001}function s(t,e){var n=Object(r.min)(t),i=Object(r.min)(e);return{x:n,y:i,width:Object(r.max)(t)-n,height:Object(r.max)(e)-i}}function c(t,e,n,i){return{minX:Object(r.min)([t,n]),maxX:Object(r.max)([t,n]),minY:Object(r.min)([e,i]),maxY:Object(r.max)([e,i])}}function l(t){return(t+2*Math.PI)%(2*Math.PI)}var u=n(55),h={box:function(t,e,n,i){return s([t,n],[e,i])},length:function(t,e,n,i){return o(t,e,n,i)},pointAt:function(t,e,n,i,r){return{x:(1-r)*t+r*n,y:(1-r)*e+r*i}},pointDistance:function(t,e,n,i,r,a){var s=(n-t)*(r-t)+(i-e)*(a-e);return s<0?o(t,e,r,a):s>(n-t)*(n-t)+(i-e)*(i-e)?o(n,i,r,a):this.pointToLine(t,e,n,i,r,a)},pointToLine:function(t,e,n,i,r,o){var a=[n-t,i-e];if(u.exactEquals(a,[0,0]))return Math.sqrt((r-t)*(r-t)+(o-e)*(o-e));var s=[-a[1],a[0]];u.normalize(s,s);var c=[r-t,o-e];return Math.abs(u.dot(c,s))},tangentAngle:function(t,e,n,i){return Math.atan2(i-e,n-t)}};function f(t,e,n,i,r,a){var s,c=1/0,l=[n,i],u=20;a&&a>200&&(u=a/10);for(var h=1/u,f=h/10,p=0;p<=u;p++){var d=p*h,g=[r.apply(null,t.concat([d])),r.apply(null,e.concat([d]))];(b=o(l[0],l[1],g[0],g[1]))=0&&b=0?[r]:[]}function g(t,e,n,i){return 2*(1-i)*(e-t)+2*i*(n-e)}function y(t,e,n,i,r,o,a){var s=p(t,n,r,a),c=p(e,i,o,a),l=h.pointAt(t,e,n,i,a),u=h.pointAt(n,i,r,o,a);return[[t,e,l.x,l.y,s,c],[s,c,u.x,u.y,r,o]]}var v={box:function(t,e,n,i,r,o){var a=d(t,n,r)[0],c=d(e,i,o)[0],l=[t,r],u=[e,o];return void 0!==a&&l.push(p(t,n,r,a)),void 0!==c&&u.push(p(e,i,o,c)),s(l,u)},length:function(t,e,n,i,r,a){return function t(e,n,i,r,a,s,c){if(0===c)return(o(e,n,i,r)+o(i,r,a,s)+o(e,n,a,s))/2;var l=y(e,n,i,r,a,s,.5),u=l[0],h=l[1];return u.push(c-1),h.push(c-1),t.apply(null,u)+t.apply(null,h)}(t,e,n,i,r,a,3)},nearestPoint:function(t,e,n,i,r,o,a,s){return f([t,n,r],[e,i,o],a,s,p)},pointDistance:function(t,e,n,i,r,a,s,c){var l=this.nearestPoint(t,e,n,i,r,a,s,c);return o(l.x,l.y,s,c)},interpolationAt:p,pointAt:function(t,e,n,i,r,o,a){return{x:p(t,n,r,a),y:p(e,i,o,a)}},divide:function(t,e,n,i,r,o,a){return y(t,e,n,i,r,o,a)},tangentAngle:function(t,e,n,i,r,o,a){var s=g(t,n,r,a),c=g(e,i,o,a);return l(Math.atan2(c,s))}};function m(t,e,n,i,r){var o=1-r;return o*o*o*t+3*e*r*o*o+3*n*r*r*o+i*r*r*r}function b(t,e,n,i,r){var o=1-r;return 3*(o*o*(e-t)+2*o*r*(n-e)+r*r*(i-n))}function x(t,e,n,i){var r,o,s,c=-3*t+9*e-9*n+3*i,l=6*t-12*e+6*n,u=3*e-3*t,h=[];if(a(c,0))a(l,0)||(r=-u/l)>=0&&r<=1&&h.push(r);else{var f=l*l-4*c*u;a(f,0)?h.push(-l/(2*c)):f>0&&(o=(-l-(s=Math.sqrt(f)))/(2*c),(r=(-l+s)/(2*c))>=0&&r<=1&&h.push(r),o>=0&&o<=1&&h.push(o))}return h}function _(t,e,n,i,r,o,a,s,c){var l=m(t,n,r,a,c),u=m(e,i,o,s,c),f=h.pointAt(t,e,n,i,c),p=h.pointAt(n,i,r,o,c),d=h.pointAt(r,o,a,s,c),g=h.pointAt(f.x,f.y,p.x,p.y,c),y=h.pointAt(p.x,p.y,d.x,d.y,c);return[[t,e,f.x,f.y,g.x,g.y,l,u],[l,u,y.x,y.y,d.x,d.y,a,s]]}function O(t,e,n,i,r,a,s,c,l){if(0===l)return function(t,e){for(var n=0,i=t.length,r=0;r0?n:-1*n}var S=function(t,e,n,i,r,o){var a=n,s=i;if(0===a||0===s)return{x:t,y:e};for(var c,l,u=r-t,h=o-e,f=Math.abs(u),p=Math.abs(h),d=a*a,g=s*s,y=Math.PI/4,v=0;v<4;v++){c=a*Math.cos(y),l=s*Math.sin(y);var m=(d-g)*Math.pow(Math.cos(y),3)/a,b=(g-d)*Math.pow(Math.sin(y),3)/s,x=c-m,_=l-b,O=f-m,w=p-b,S=Math.hypot(_,x),M=Math.hypot(w,O);y+=S*Math.asin((x*w-_*O)/(S*M))/Math.sqrt(d+g-c*c-l*l),y=Math.min(Math.PI/2,Math.max(0,y))}return{x:t+j(c,u),y:e+j(l,h)}};function M(t,e,n,i,r,o){return n*Math.cos(r)*Math.cos(o)-i*Math.sin(r)*Math.sin(o)+t}function A(t,e,n,i,r,o){return n*Math.sin(r)*Math.cos(o)+i*Math.cos(r)*Math.sin(o)+e}function C(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function E(t,e,n){var i=Math.cos(n),r=Math.sin(n);return[t*i-e*r,t*r+e*i]}var I={box:function(t,e,n,i,r,o,a){for(var s=function(t,e,n){return Math.atan(-e/t*Math.tan(n))}(n,i,r),c=1/0,l=-1/0,u=[o,a],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var f=s+h;ol&&(l=p)}var d=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,i,r),g=1/0,y=-1/0,v=[o,a];for(h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var m=d+h;oy&&(y=b)}return{x:c,y:g,width:l-c,height:y-g}},length:function(t,e,n,i,r,o,a){},nearestPoint:function(t,e,n,i,r,o,a,s,c){var l=E(s-t,c-e,-r),u=l[0],h=l[1],f=S(0,0,n,i,u,h),p=function(t,e,n,i){return(Math.atan2(i*t,n*e)+2*Math.PI)%(2*Math.PI)}(n,i,f.x,f.y);pa&&(f=C(n,i,a));var d=E(f.x,f.y,r);return{x:d[0]+t,y:d[1]+e}},pointDistance:function(t,e,n,i,r,a,s,c,l){var u=this.nearestPoint(t,e,n,i,c,l);return o(u.x,u.y,c,l)},pointAt:function(t,e,n,i,r,o,a,s){var c=(a-o)*s+o;return{x:M(t,0,n,i,r,c),y:A(0,e,n,i,r,c)}},tangentAngle:function(t,e,n,i,r,o,a,s){var c=(a-o)*s+o,u=function(t,e,n,i,r,o,a,s){return-1*n*Math.cos(r)*Math.sin(s)-i*Math.sin(r)*Math.cos(s)}(0,0,n,i,r,0,0,c),h=function(t,e,n,i,r,o,a,s){return-1*n*Math.sin(r)*Math.sin(s)+i*Math.cos(r)*Math.cos(s)}(0,0,n,i,r,0,0,c);return l(Math.atan2(h,u))}};function P(t){for(var e=0,n=[],i=0;i1||e<0||t.length<2)return null;var n=P(t),i=n.segments,r=n.totalLength;if(0===r)return{x:t[0][0],y:t[0][1]};for(var o=0,a=null,s=0;s=o&&e<=o+f){var p=(e-o)/f;a=h.pointAt(l[0],l[1],u[0],u[1],p);break}o+=f}return a}function L(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=P(t),i=n.segments,r=n.totalLength,o=0,a=0,s=0;s=o&&e<=o+h){a=Math.atan2(u[1]-l[1],u[0]-l[0]);break}o+=h}return a}function k(t,e,n){for(var i=1/0,r=0;re)n.insertBefore(t,r);else if(oO?_:O,C=_>O?1:_/O,E=_>O?O/_:1;e.translate(b,x),e.rotate(S),e.scale(C,E),e.arc(0,0,A,w,j,1-M),e.scale(1/C,1/E),e.rotate(-S),e.translate(-b,-x)}break;case"Z":e.closePath()}if("Z"===d)l=u;else{var I=p.length;l=[p[I-2],p[I-1]]}}}}function y(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(t.set("hasChanged",!0),t.cfg.parent&&t.cfg.parent.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw())))}function v(t){if(!t.length)return null;var e=[],n=[],r=[],o=[];return Object(i.each)(t,(function(t){var i=function(t){var e;if(t.destroyed)e=t._cacheCanvasBBox;else{var n=t.get("cacheCanvasBBox"),i=n&&!(!n.width||!n.height),r=t.getCanvasBBox(),o=r&&!(!r.width||!r.height);i&&o?e=Object(a.l)(n,r):i?e=n:o&&(e=r)}return e}(t);i&&(e.push(i.minX),n.push(i.minY),r.push(i.maxX),o.push(i.maxY))})),{minX:Object(i.min)(e),minY:Object(i.min)(n),maxX:Object(i.max)(r),maxY:Object(i.max)(o)}}function m(t,e){return t&&e&&Object(a.f)(t,e)?{minX:Math.max(t.minX,e.minX),minY:Math.max(t.minY,e.minY),maxX:Math.min(t.maxX,e.maxX),maxY:Math.min(t.maxY,e.maxY)}:null}},function(t,e,n){"use strict";var i=n(82);function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=i.a||o||Function("return this")();e.a=a},function(t,e,n){"use strict";n.d(e,"c",(function(){return f})),n.d(e,"b",(function(){return p})),n.d(e,"a",(function(){return d}));var i=n(1),r=n(37);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a=Math.sin,s=Math.cos,c=Math.atan2,l=Math.PI;function u(t,e,n,i,o,u,h){var f=e.stroke,p=e.lineWidth,d=c(i-u,n-o),g=new r.Path({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*s(l/6)+","+10*a(l/6)+" L0,0 L"+10*s(l/6)+",-"+10*a(l/6),stroke:f,lineWidth:p}});g.translate(o,u),g.rotateAtPoint(o,u,d),t.set(h?"startArrowShape":"endArrowShape",g)}function h(t,e,n,o,l,u,h){var f=e.startArrow,p=e.endArrow,d=e.stroke,g=e.lineWidth,y=h?f:p,v=y.d,m=y.fill,b=y.stroke,x=y.lineWidth,_=Object(i.__rest)(y,["d","fill","stroke","lineWidth"]),O=c(o-u,n-l);v&&(l-=s(O)*v,u-=a(O)*v);var w=new r.Path({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:Object(i.__assign)(Object(i.__assign)({},_),{stroke:b||d,lineWidth:x||g,fill:m})});w.translate(l,u),w.rotateAtPoint(l,u,O),t.set(h?"startArrowShape":"endArrowShape",w)}function f(t,e,n,i,r){var o=c(i-e,n-t);return{dx:s(o)*r,dy:a(o)*r}}function p(t,e,n,i,r,a){"object"===o(e.startArrow)?h(t,e,n,i,r,a,!0):e.startArrow?u(t,e,n,i,r,a,!0):t.set("startArrowShape",null)}function d(t,e,n,i,r,a){"object"===o(e.endArrow)?h(t,e,n,i,r,a,!1):e.endArrow?u(t,e,n,i,r,a,!1):t.set("startArrowShape",null)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var i=n(20);function r(t,e){var n=t.cfg.el,i=t.attr(),r={dx:i.shadowOffsetX,dy:i.shadowOffsetY,blur:i.shadowBlur,color:i.shadowColor};if(r.dx||r.dy||r.blur||r.color){var o=e.find("filter",r);o||(o=e.addShadow(r)),n.setAttribute("filter","url(#"+o+")")}else n.removeAttribute("filter")}function o(t){var e=t.attr().matrix;if(e){for(var n=t.cfg.el,i=[],r=0;r<9;r+=3)i.push(e[r]+","+e[r+1]);-1===(i=i.join(",")).indexOf("NaN")?n.setAttribute("transform","matrix("+i+")"):console.warn("invalid matrix:",e)}}function a(t,e){var n=t.getClip(),r=t.get("el");if(n){if(n&&!r.hasAttribute("clip-path")){Object(i.a)(n),n.createPath(e);var o=e.addClip(n);r.setAttribute("clip-path","url(#"+o+")")}}else r.removeAttribute("clip-path")}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}Object(i.each)(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0},s=n(7);var c=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var i=!!e,r=[],o=0,a=t.length;o2&&(n.push([i].concat(o.splice(0,2))),a="l",i="m"===i?"l":"L"),"o"===a&&1===o.length&&n.push([i,o[0]]),"r"===a)n.push([i].concat(o));else for(;o.length>=e[a]&&(n.push([i].concat(o.splice(0,e[a]))),e[a]););return""})),n}var p=/[a-z]/;function d(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function g(t){var e=f(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,i=0;i=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,c=0,l=0,u=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(c=a=+h[1],l=s=+h[2],u++,o[0]=["M",a,s]);i=u;for(var g=e.length;i1&&(n*=Math.sqrt(d),r*=Math.sqrt(d));var g=n*n*(p*p)+r*r*(f*f),y=g?Math.sqrt((n*n*(r*r)-g)/g):1;a===s&&(y*=-1),isNaN(y)&&(y=0);var x=r?y*n*p/r:0,_=n?y*-r*f/n:0,O=(c+u)/2+Math.cos(o)*x-Math.sin(o)*_,w=(l+h)/2+Math.sin(o)*x+Math.cos(o)*_,j=[(f-x)/n,(p-_)/r],S=[(-1*f-x)/n,(-1*p-_)/r],M=m([1,0],j),A=m(j,S);return v(j,S)<=-1&&(A=Math.PI),v(j,S)>=1&&(A=0),0===s&&A>0&&(A-=2*Math.PI),1===s&&A<0&&(A+=2*Math.PI),{cx:O,cy:w,rx:b(t,[u,h])?0:n,ry:b(t,[u,h])?0:r,startAngle:M,endAngle:M+A,xRotation:o,arcFlag:a,sweepFlag:s}}function _(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function O(t){for(var e=[],n=null,i=null,r=null,o=0,s=(t=a(t)).length,c=0;c=e&&t<=n};function j(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function S(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function M(t,e,n){var i=!1,r=t.length;if(r<=2)return!1;for(var o=0;o0!=j(s[1]-n)>0&&j(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(i=!i)}return i}function A(t){for(var e=[],n=t.length,i=0;i1){var a=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:a[0],y:a[1]}})}return e}function C(t,e){var n=!1;return Object(i.each)(t,(function(t){if(function(t,e,n,i){var r=n.x-t.x,o=n.y-t.y,a=e.x-t.x,s=e.y-t.y,c=i.x-n.x,l=i.y-n.y,u=a*l-s*c,h=null;if(u*u>.001*(a*a+s*s)*(c*c+l*l)){var f=(r*l-o*c)/u,p=(r*s-o*a)/u;w(f,0,1)&&w(p,0,1)&&(h={x:t.x+f*a,y:t.y+f*s})}return h}(t.from,t.to,e.from,e.to))return n=!0,!1})),n}function E(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function I(t,e){if(t.length<2||e.length<2)return!1;var n,r,o=E(t),a=E(e);if(n=o,(r=a).minX>n.maxX||r.maxXn.maxY||r.maxY0&&t.charCodeAt(e)<128?1:2}function o(t){if(t.length>400)return function(t){for(var e=t.map((function(t){var e=t.attr("text");return Object(i.isNil)(e)?"":""+e})),n=0,r=0,o=0;o=19968&&c<=40869?2:1}a>n&&(n=a,r=o)}return t[r].getBBox().width}(t);var e=0;return Object(i.each)(t,(function(t){var n=t.getBBox().width;e=0?function(t,e,n){void 0===n&&(n="tail");var i=t.length,o="";if("tail"===n){for(var a=0,s=0;a=0},t.prototype.getAdjustRange=function(t,e,n){var i,r,o=this.yField,a=n.indexOf(e),s=n.length;return!o&&this.isAdjust("y")?(i=0,r=1):s>1?(i=n[0===a?0:a-1],r=n[a===s-1?s-1:a+1],0!==a?i+=(e-i)/2:i-=(r-e)/2,a!==s-1?r-=(r-e)/2:r+=(e-n[s-2])/2):(i=0===e?0:e-.5,r=0===e?1:e+.5),{pre:i,next:r}},t.prototype.adjustData=function(t,e){var n=this,r=this.getDimValues(e);i.each(t,(function(t,e){i.each(r,(function(i,r){n.adjustDim(r,i,t,e)}))}))},t.prototype.groupData=function(t,e){return i.each(t,(function(t){void 0===t[e]&&(t[e]=r.a)})),i.groupBy(t,e)},t.prototype.adjustDim=function(t,e,n,i){},t.prototype.getDimValues=function(t){var e=this.xField,n=this.yField,o=i.assign({},this.dimValuesMap),a=[];if(e&&this.isAdjust("x")&&a.push(e),n&&this.isAdjust("y")&&a.push(n),a.forEach((function(e){o&&o[e]||(o[e]=i.valuesOfKey(t,e).sort((function(t,e){return t-e})))})),!n&&this.isAdjust("y")){o.y=[r.a,1]}return o},t}();e.a=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return X})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return et}));var i={};n.r(i),n.d(i,"default",(function(){return k})),n.d(i,"assign",(function(){return g})),n.d(i,"format",(function(){return F})),n.d(i,"parse",(function(){return L})),n.d(i,"defaultI18n",(function(){return b})),n.d(i,"setGlobalDateI18n",(function(){return _})),n.d(i,"setGlobalDateMasks",(function(){return T}));var r=n(0),o={};function a(t,e){o[t]=e}var s=function(){function t(t){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=t,this.initCfg(),this.init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){Object(r.assign)(this.__cfg__,t),this.init()},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return Object(r.map)(this.ticks,(function(e,n){return Object(r.isObject)(e)?e:{text:t.getText(e,n),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var n=this.formatter,i=n?n(t,e):t;return Object(r.isNil)(i)||!Object(r.isFunction)(i.toString)?"":i.toString()},t.prototype.getConfig=function(t){return this.__cfg__[t]},t.prototype.init=function(){Object(r.assign)(this,this.__cfg__),this.setDomain(),Object(r.isEmpty)(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},t.prototype.initCfg=function(){},t.prototype.setDomain=function(){},t.prototype.calculateTicks=function(){var t=this.tickMethod,e=[];if(Object(r.isString)(t)){var n=o[t];if(!n)throw new Error("There is no method to to calculate ticks!");e=n(this)}else Object(r.isFunction)(t)&&(e=t(this));return e},t.prototype.rangeMin=function(){return this.range[0]},t.prototype.rangeMax=function(){return this.range[1]},t.prototype.calcPercent=function(t,e,n){return Object(r.isNumber)(t)?(t-e)/(n-e):NaN},t.prototype.calcValue=function(t,e,n){return e+t*(n-e)},t}(),c=n(1),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cat",e.isCategory=!0,e}return Object(c.__extends)(e,t),e.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;tthis.max?NaN:this.values[i]},e.prototype.getText=function(e){for(var n=[],i=1;i1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},e}(s),u=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,h="[^\\s]+",f=/\[([^]*?)\]/gm;function p(t,e){for(var n=[],i=0,r=t.length;i-1?i:null}};function g(t){for(var e=[],n=1;n3?0:(t-t%10!=10?1:0)*t%10]}},x=g({},b),_=function(t){return x=g(x,t)},O=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},w=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length0?"-":"+")+w(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+w(Math.floor(Math.abs(e)/60),2)+":"+w(Math.abs(e)%60,2)}},S=function(t){return+t-1},M=[null,"\\d\\d?"],A=[null,h],C=["isPm",h,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],E=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?n:-n}return 0}],I={D:["day","\\d\\d?"],DD:["day","\\d\\d"],Do:["day","\\d\\d?"+h,function(t){return parseInt(t,10)}],M:["month","\\d\\d?",S],MM:["month","\\d\\d",S],YY:["year","\\d\\d",function(t){var e=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+t>68?e-1:e)+t)}],h:["hour","\\d\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","\\d\\d?"],HH:["hour","\\d\\d"],m:["minute","\\d\\d?"],mm:["minute","\\d\\d"],s:["second","\\d\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond","\\d\\d",function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:M,dd:M,ddd:A,dddd:A,MMM:["month",h,d("monthNamesShort")],MMMM:["month",h,d("monthNames")],a:C,A:C,ZZ:E,Z:E},P={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},T=function(t){return g(P,t)},F=function(t,e,n){if(void 0===e&&(e=P.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var i=[];e=(e=P[e]||e).replace(f,(function(t,e){return i.push(e),"@@@"}));var r=g(g({},x),n);return(e=e.replace(u,(function(e){return j[e](t,r)}))).replace(/@@@/g,(function(){return i.shift()}))};function L(t,e,n){if(void 0===n&&(n={}),"string"!=typeof e)throw new Error("Invalid format in fecha parse");if(e=P[e]||e,t.length>1e3)return null;var i={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],o=[],a=e.replace(f,(function(t,e){return o.push(O(e)),"@@@"})),s={},c={};a=O(a).replace(u,(function(t){var e=I[t],n=e[0],i=e[1],o=e[3];if(s[n])throw new Error("Invalid format. "+n+" specified twice in format");return s[n]=!0,o&&(c[o]=!0),r.push(e),"("+i+")"})),Object.keys(c).forEach((function(t){if(!s[t])throw new Error("Invalid format. "+t+" is required in specified format")})),a=a.replace(/@@@/g,(function(){return o.shift()}));var l=t.match(new RegExp(a,"i"));if(!l)return null;for(var h,p=g(g({},x),n),d=1;d11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return h}var k={format:F,parse:L,defaultI18n:b,setGlobalDateI18n:_,setGlobalDateMasks:T};function D(t,e){return(i.format||k.format)(t,e)}function B(t){return Object(r.isString)(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),Object(r.isDate)(t)&&(t=t.getTime()),t}var N=36e5,R=24*N,V=31*R,z=[["HH:mm:ss",1e3],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",6e4],["HH:mm",6e5],["HH:mm",18e5],["HH",N],["HH",6*N],["HH",12*N],["YYYY-MM-DD",R],["YYYY-MM-DD",4*R],["YYYY-WW",7*R],["YYYY-MM",V],["YYYY-MM",4*V],["YYYY-MM",6*V],["YYYY",380*R]];function G(t,e,n){var i,o=(i=function(t){return t[1]},function(t,e,n,o){for(var a=Object(r.isNil)(n)?0:n,s=Object(r.isNil)(o)?t.length:o;a>>1;i(t[c])>e?s=c:a=c+1}return a})(z,(e-t)/n)-1,a=z[o];return o<0?a=z[0]:o>=z.length&&(a=Object(r.last)(z)),a}var Y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="timeCat",e}return Object(c.__extends)(e,t),e.prototype.translate=function(t){t=B(t);var e=this.values.indexOf(t);return-1===e&&(e=Object(r.isNumber)(t)&&t-1){var i=this.values[n],r=this.formatter;return i=r?r(i,e):D(i,this.mask)}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;Object(r.each)(e,(function(t,n){e[n]=B(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(l),W=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return Object(c.__extends)(e,t),e.prototype.scale=function(t){if(Object(r.isNil)(t))return NaN;var e=this.rangeMin(),n=this.rangeMax();return this.max===this.min?e:e+this.getScalePercent(t)*(n-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,n=Object(r.head)(e),i=Object(r.last)(e);nthis.max&&(this.max=i),Object(r.isNil)(this.minLimit)||(this.min=n),Object(r.isNil)(this.maxLimit)||(this.max=i)},e.prototype.setDomain=function(){var t=Object(r.getRange)(this.values),e=t.min,n=t.max;Object(r.isNil)(this.min)&&(this.min=e),Object(r.isNil)(this.max)&&(this.max=n),this.min>this.max&&(this.min=e,this.max=n)},e.prototype.calculateTicks=function(){var e=this,n=t.prototype.calculateTicks.call(this);return this.nice||(n=Object(r.filter)(n,(function(t){return t>=e.min&&t<=e.max}))),n},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;return(t-n)/(e-n)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(s),X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(W);function H(t,e){var n=Math.E;return e>=0?Math.pow(n,Math.log(e)/t):-1*Math.pow(n,Math.log(-e)/t)}function U(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function q(t,e,n){Object(r.isNil)(n)&&(n=Math.max.apply(null,t));var i=n;return Object(r.each)(t,(function(t){t>0&&t1&&(i=1),i}var Z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e,n=this.base,i=U(n,this.max),r=this.rangeMin(),o=this.rangeMax()-r,a=this.positiveMin;if(a){if(0===t)return 0;var s=1/(i-(e=U(n,a/n)))*o;if(t=0?1:-1;return Math.pow(o,n)*a},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var i=this.exponent;return(H(i,t)-H(i,n))/(H(i,e)-H(i,n))},e}(W),K=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return Object(c.__extends)(e,t),e.prototype.getText=function(t,e){var n=this.translate(t),i=this.formatter;return i?i(n,e):D(n,this.mask)},e.prototype.scale=function(e){var n=e;return(Object(r.isString)(n)||Object(r.isDate)(n))&&(n=this.translate(n)),t.prototype.scale.call(this,n)},e.prototype.translate=function(t){return B(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if(Object(r.isNil)(e)&&Object(r.isNumber)(e)||(this.min=this.translate(this.min)),Object(r.isNil)(n)&&Object(r.isNumber)(n)||(this.max=this.translate(this.max)),t&&t.length){var i=[],o=1/0,a=o,s=0;Object(r.each)(t,(function(t){var e=B(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");o>e?(a=o,o=e):a>e&&(a=e),s1&&(this.minTickInterval=a-o),Object(r.isNil)(e)&&(this.min=o),Object(r.isNil)(n)&&(this.max=s)}},e}(X),Q=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return Object(c.__extends)(e,t),e.prototype.invert=function(t){var e=this.ticks,n=e.length,i=this.getInvertPercent(t),o=Math.floor(i*(n-1));if(o>=n-1)return Object(r.last)(e);if(o<0)return Object(r.head)(e);var a=e[o],s=o/(n-1);return a+(i-s)/((o+1)/(n-1)-s)*(e[o+1]-a)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||(Object(r.last)(e)!==this.max&&e.push(this.max),Object(r.head)(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(tObject(r.last)(e))return 1;var n=0;return Object(r.each)(e,(function(e,i){if(!(t>=e))return!1;n=i})),n/(e.length-1)},e}(W),J=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return Object(c.__extends)(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(Q),tt={};function et(t){return tt[t]}function nt(t,e){if(et(t))throw new Error("type '"+t+"' existed.");tt[t]=e}var it=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return Object(c.__extends)(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&Object(r.isNumber)(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},e}(s);function rt(t){var e=t.values,n=t.tickInterval,i=t.tickCount,o=t.showLast;if(Object(r.isNumber)(n)){var a=Object(r.filter)(e,(function(t,e){return e%n==0})),s=Object(r.last)(e);return o&&Object(r.last)(a)!==s&&a.push(s),a}var c=e.length,l=t.min,u=t.max;if(Object(r.isNil)(l)&&(l=0),Object(r.isNil)(u)&&(u=e.length-1),!Object(r.isNumber)(i)||i>=c)return e.slice(l,u+1);if(i<=0||u<=0)return[];for(var h=1===i?c:Math.floor(c/(i-1)),f=[],p=l,d=0;d=u);d++)p=Math.min(l+d*h,u),d===i-1&&o?f.push(e[u]):f.push(e[p]);return f}var ot=Math.sqrt(50),at=Math.sqrt(10),st=Math.sqrt(2),ct=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,n;void 0===t&&(t=5);var i,r=this._domain.slice(),o=0,a=this._domain.length-1,s=this._domain[o],c=this._domain[a];return c0?i=lt(s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i,t):i<0&&(i=lt(s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i,t)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(c/i)*i,this.domain(r)):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(c*i)/i,this.domain(r)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,n){var i,r,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];(i=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(r=Math.ceil(e-t+1));++s=0?(o>=ot?10:o>=at?5:o>=st?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=ot?10:o>=at?5:o>=st?2:1)}function ut(t,e,n){return("ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e))*e}function ht(t,e,n){var i=ut(t,n,"floor"),o=ut(e,n,"ceil");i=Object(r.fixedBase)(i,n),o=Object(r.fixedBase)(o,n);for(var a=[],s=Math.max((o-i)/(Math.pow(2,12)-1),n),c=i;c<=o;c+=s){var l=Object(r.fixedBase)(c,s);a.push(l)}return{min:i,max:o,ticks:a}}function ft(t,e,n){var i,o=t.minLimit,a=t.maxLimit,s=t.min,c=t.max,l=t.tickCount,u=void 0===l?5:l,h=Object(r.isNil)(o)?Object(r.isNil)(e)?s:e:o,f=Object(r.isNil)(a)?Object(r.isNil)(n)?c:n:a;if(h>f&&(f=(i=[h,f])[0],h=i[1]),u<=2)return[h,f];for(var p=(f-h)/(u-1),d=[],g=0;g=0&&(l=1),1-c/(s-1)-n+l}function vt(t,e,n){var i=Object(r.size)(e);return 1-Object(r.indexOf)(e,t)/(i-1)-n+1}function mt(t,e,n,i,r,o){var a=(t-1)/(o-r),s=(e-1)/(Math.max(o,i)-Math.min(n,r));return 2-Math.max(a/s,s/a)}function bt(t,e){return t>=e?2-(t-1)/(e-1):1}function xt(t,e,n,i){var r=e-t;return 1-.5*(Math.pow(e-i,2)+Math.pow(t-n,2))/Math.pow(.1*r,2)}function _t(t,e,n){var i=e-t;if(n>i){var r=(n-i)/2;return 1-Math.pow(r,2)/Math.pow(.1*i,2)}return 1}function Ot(t,e,n,i,o,a){void 0===n&&(n=5),void 0===i&&(i=!0),void 0===o&&(o=dt),void 0===a&&(a=[.25,.2,.5,.05]);var s=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!s)return{min:0,max:0,ticks:[]};if(e-t<1e-15||1===s)return{min:t,max:e,ticks:[t]};if(e-t>1e148){var c=(e-t)/(O=n||5);return{min:t,max:e,ticks:Array(O).fill(null).map((function(e,n){return pt(t+c*n)}))}}for(var l={score:-2,lmin:0,lmax:0,lstep:0},u=1;u<1/0;){for(var h=0;hl.score&&(!i||j<=t&&S>=e)&&(l.lmin=j,l.lmax=S,l.lstep=M,l.score=I)}v+=1}d+=1}}u+=1}var P=pt(l.lmax),T=pt(l.lmin),F=pt(l.lstep),L=Math.floor(function(t){return Math.round(1e12*t)/1e12}((P-T)/F))+1,k=new Array(L);k[0]=pt(T);for(h=1;h1&&(r*=Math.ceil(a)),i&&r31536e6)for(var c=St(n),l=Math.ceil(o/31536e6),u=s;u<=c+l;u+=l)a.push(Mt(u));else if(o>V){var h=Math.ceil(o/V),f=At(e),p=function(t,e){var n=St(t),i=St(e),r=At(t);return 12*(i-n)+(At(e)-r)%12}(e,n);for(u=0;u<=p+h;u+=h)a.push(Ct(s,u+f))}else if(o>R){var d=(b=new Date(e)).getFullYear(),g=b.getMonth(),y=b.getDate(),v=Math.ceil(o/R),m=function(t,e){return Math.ceil((e-t)/R)}(e,n);for(u=0;uN){d=(b=new Date(e)).getFullYear(),g=b.getMonth(),v=b.getDate();var b,x=b.getHours(),_=Math.ceil(o/N),O=function(t,e){return Math.ceil((e-t)/N)}(e,n);for(u=0;u<=O+_;u+=_)a.push(new Date(d,g,v,x+u).getTime())}else if(o>6e4){var w=function(t,e){return Math.ceil((e-t)/6e4)}(e,n),j=Math.ceil(o/6e4);for(u=0;u<=w+j;u+=j)a.push(e+6e4*u)}else{var S=o;S<1e3&&(S=1e3);var M=1e3*Math.floor(e/1e3),A=Math.ceil((n-e)/1e3),C=Math.ceil(S/1e3);for(u=0;u=512&&console.warn("Notice: current ticks length("+a.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+o+") is too small, increase the value to solve the problem!"),a})),a("log",(function(t){var e,n=t.base,i=t.tickCount,r=t.min,o=t.max,a=t.values,s=U(n,o);if(r>0)e=Math.floor(U(n,r));else{var c=q(a,n,o);e=Math.floor(U(n,c))}for(var l=s-e,u=Math.ceil(l/i),h=[],f=e;f=0?1:-1;return Math.pow(t,e)*n}))})),a("quantile",(function(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var i=n.slice().sort((function(t,e){return t-e})),r=[],o=0;o1?1:Number(e),i=t.length-1,r=Math.floor(i*n),o=i*n-r,a=t[r],s=r===i?a:t[r+1];return l([c(a,s,o,0),c(a,s,o,1),c(a,s,o,2)])}(n,t)}},toRGB:Object(i.memoize)(p),toCSSGradient:function(t){if(/^[r,R,L,l]{1}[\s]*\(/.test(t)){var e,n=void 0;if("l"===t[0]){var r=+(c=o.exec(t))[1]+90;n=c[2],e="linear-gradient("+r+"deg, "}else if("r"===t[0]){var c;e="radial-gradient(",n=(c=a.exec(t))[4]}var l=n.match(s);return Object(i.each)(l,(function(t,n){var i=t.split(":");e+=i[1]+" "+100*i[0]+"%",n!==l.length-1&&(e+=", ")})),e+=")"}return t}}},function(t,e,n){"use strict";n.r(e),n.d(e,"catmullRomToBezier",(function(){return c})),n.d(e,"fillPath",(function(){return I})),n.d(e,"fillPathByDiff",(function(){return F})),n.d(e,"formatPath",(function(){return D})),n.d(e,"intersection",(function(){return A})),n.d(e,"parsePathArray",(function(){return y})),n.d(e,"parsePathString",(function(){return s})),n.d(e,"pathToAbsolute",(function(){return u})),n.d(e,"pathToCurve",(function(){return d})),n.d(e,"rectPath",(function(){return O}));var i=n(0),r="\t\n\v\f\r   ᠎              \u2028\u2029",o=new RegExp("([a-z])["+r+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+r+"]*,?["+r+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+r+"]*,?["+r+"]*","ig"),s=function(t){if(!t)return null;if(Object(i.isArray)(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(o,(function(i,r,o){var s=[],c=r.toLowerCase();if(o.replace(a,(function(t,e){e&&s.push(+e)})),"m"===c&&s.length>2&&(n.push([r].concat(s.splice(0,2))),c="l",r="m"===r?"l":"L"),"o"===c&&1===s.length&&n.push([r,s[0]]),"r"===c)n.push([r].concat(s));else for(;s.length>=e[c]&&(n.push([r].concat(s.splice(0,e[c]))),e[c]););return t})),n},c=function(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4===i?o[3]={x:+t[0],y:+t[1]}:r-2===i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},l=function(t,e,n,i,r){var o=[];if(null===r&&null===i&&(i=n),t=+t,e=+e,n=+n,i=+i,null!==r){var a=Math.PI/180,s=t+n*Math.cos(-i*a),c=t+n*Math.cos(-r*a);o=[["M",s,e+n*Math.sin(-i*a)],["A",n,n,0,+(r-i>180),0,c,e+n*Math.sin(-r*a)]]}else o=[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]];return o},u=function(t){if(!(t=s(t))||!t.length)return[["M",0,0]];var e,n,i=[],r=0,o=0,a=0,u=0,h=0;"M"===t[0][0]&&(a=r=+t[0][1],u=o=+t[0][2],h++,i[0]=["M",r,o]);for(var f=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),p=void 0,d=void 0,g=h,y=t.length;g1&&(i*=O=Math.sqrt(O),r*=O);var w=i*i,j=r*r,S=(a===s?-1:1)*Math.sqrt(Math.abs((w*j-w*_*_-j*x*x)/(w*_*_+j*x*x)));d=S*i*_/r+(e+c)/2,g=S*-r*x/i+(n+l)/2,f=Math.asin(((n-g)/r).toFixed(9)),p=Math.asin(((l-g)/r).toFixed(9)),f=ep&&(f-=2*Math.PI),!s&&p>f&&(p-=2*Math.PI)}var M=p-f;if(Math.abs(M)>y){var A=p,C=c,E=l;p=f+y*(s&&p>f?1:-1),m=t(c=d+i*Math.cos(p),l=g+r*Math.sin(p),i,r,o,0,s,C,E,[p,A,d,g])}M=p-f;var I=Math.cos(f),P=Math.sin(f),T=Math.cos(p),F=Math.sin(p),L=Math.tan(M/4),k=4/3*i*L,D=4/3*r*L,B=[e,n],N=[e+k*P,n-D*I],R=[c+k*F,l-D*T],V=[c,l];if(N[0]=2*B[0]-N[0],N[1]=2*B[1]-N[1],u)return[N,R,V].concat(m);for(var z=[],G=0,Y=(m=[N,R,V].concat(m).join().split(",")).length;G7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(c[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(i.length,r&&r.length||0)}},v=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],n=Math.max(i.length,r&&r.length||0))};n=Math.max(i.length,r&&r.length||0);for(var m=0;m1?1:c<0?0:c)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=l*u[p]+l,g=v(d,t,n,r,a),y=v(d,e,i,o,s),m=g*g+y*y;f+=h[p]*Math.sqrt(m)}return l*f},b=function(t,e,n,i,r,o,a,s){for(var c,l,u,h,f=[],p=[[],[]],d=0;d<2;++d)if(0===d?(l=6*t-12*n+6*r,c=-3*t+9*n-9*r+3*a,u=3*n-3*t):(l=6*e-12*i+6*o,c=-3*e+9*i-9*o+3*s,u=3*i-3*e),Math.abs(c)<1e-12){if(Math.abs(l)<1e-12)continue;(h=-u/l)>0&&h<1&&f.push(h)}else{var g=l*l-4*u*c,y=Math.sqrt(g);if(!(g<0)){var v=(-l+y)/(2*c);v>0&&v<1&&f.push(v);var m=(-l-y)/(2*c);m>0&&m<1&&f.push(m)}}for(var b,x=f.length,_=x;x--;)b=1-(h=f[x]),p[0][x]=b*b*b*t+3*b*b*h*n+3*b*h*h*r+h*h*h*a,p[1][x]=b*b*b*e+3*b*b*h*i+3*b*h*h*o+h*h*h*s;return p[0][_]=t,p[1][_]=e,p[0][_+1]=a,p[1][_+1]=s,p[0].length=p[1].length=_+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},x=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var c=(t-n)*(o-s)-(e-i)*(r-a);if(c){var l=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/c,u=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/c,h=+l.toFixed(2),f=+u.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||f<+Math.min(e,i).toFixed(2)||f>+Math.max(e,i).toFixed(2)||f<+Math.min(o,s).toFixed(2)||f>+Math.max(o,s).toFixed(2)))return{x:l,y:u}}}},_=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},O=function(t,e,n,i,r){if(r)return[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]];var o=[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]];return o.parsePathArray=y,o},w=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:O(t,e,n,i),vb:[t,e,n,i].join(" ")}},j=function(t,e,n,r,o,a,s,c){Object(i.isArray)(t)||(t=[t,e,n,r,o,a,s,c]);var l=b.apply(null,t);return w(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},S=function(t,e,n,i,r,o,a,s,c){var l=1-c,u=Math.pow(l,3),h=Math.pow(l,2),f=c*c,p=f*c,d=t+2*c*(n-t)+f*(r-2*n+t),g=e+2*c*(i-e)+f*(o-2*i+e),y=n+2*c*(r-n)+f*(a-2*r+n),v=i+2*c*(o-i)+f*(s-2*o+i);return{x:u*t+3*h*c*n+3*l*c*c*r+p*a,y:u*e+3*h*c*i+3*l*c*c*o+p*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:l*t+c*n,y:l*e+c*i},end:{x:l*r+c*a,y:l*o+c*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},M=function(t,e,n){if(!function(t,e){return t=w(t),e=w(e),_(e,t.x,t.y)||_(e,t.x2,t.y)||_(e,t.x,t.y2)||_(e,t.x2,t.y2)||_(t,e.x,e.y)||_(t,e.x2,e.y)||_(t,e.x,e.y2)||_(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(j(t),j(e)))return n?0:[];for(var i=~~(m.apply(0,t)/8),r=~~(m.apply(0,e)/8),o=[],a=[],s={},c=n?0:[],l=0;l=0&&O<=1&&M>=0&&M<=1&&(n?c+=1:c.push({x:b.x,y:b.y,t1:O,t2:M}))}}return c},A=function(t,e){return function(t,e,n){var i,r,o,a,s,c,l,u,h,f;t=d(t),e=d(e);for(var p=n?0:[],g=0,y=t.length;g=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i},I=function(t,e){if(1===t.length)return t;var n=t.length-1,i=e.length-1,r=n/i,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a=0;c--)a=o[c].index,"add"===o[c].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(i=t.length);if(i0)){t[i]=e[i];break}n=L(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=L(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=L(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t}},function(t,e,n){"use strict";n.r(e),n.d(e,"Base",(function(){return l})),n.d(e,"Circle",(function(){return u})),n.d(e,"Ellipse",(function(){return f})),n.d(e,"Image",(function(){return d})),n.d(e,"Line",(function(){return m})),n.d(e,"Marker",(function(){return O})),n.d(e,"Path",(function(){return F})),n.d(e,"Polygon",(function(){return k})),n.d(e,"Polyline",(function(){return D})),n.d(e,"Rect",(function(){return N})),n.d(e,"Text",(function(){return R}));var i={};n.r(i),n.d(i,"Base",(function(){return l})),n.d(i,"Circle",(function(){return u})),n.d(i,"Ellipse",(function(){return f})),n.d(i,"Image",(function(){return d})),n.d(i,"Line",(function(){return m})),n.d(i,"Marker",(function(){return O})),n.d(i,"Path",(function(){return F})),n.d(i,"Polygon",(function(){return k})),n.d(i,"Polyline",(function(){return D})),n.d(i,"Rect",(function(){return N})),n.d(i,"Text",(function(){return R}));var r=n(1),o=n(11),a=n(6),s=n(23),c=n(52),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return i},e.prototype.getGroupBase=function(){return c.a},e.prototype.onCanvasChange=function(t){Object(s.h)(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=Object(o.getBBoxMethod)(t)(this),i=e/2,r=n.x-i,a=n.y-i,s=n.x+n.width+i,c=n.y+n.height+i;return{x:r,minX:r,y:a,minY:a,width:n.width+e,height:n.height+e,maxX:s,maxY:c}},e.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs.stroke},e.prototype._applyClip=function(t,e){e&&(t.save(),Object(s.a)(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.draw=function(t,e){var n=this.cfg.clipShape;if(e){if(!1===this.cfg.refresh)return void this.set("hasChanged",!1);var i=this.getCanvasBBox();if(!Object(a.f)(e,i))return this.set("hasChanged",!1),void(this.cfg.isInView&&this._afterDraw())}t.save(),Object(s.a)(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},e.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var e=this.getCanvasBBox(),n=Object(a.f)(e,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",e):this.set("cacheCanvasBBox",null)}},e.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,i=e.opacity,r=e.strokeOpacity,o=e.fillOpacity;this.isFill()&&(Object(a.i)(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=i)),this.isStroke()&&n>0&&(Object(a.i)(r)||1===r||(t.globalAlpha=r),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),i=this.isFill(),r=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(o.AbstractShape),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){var o=this.attr(),s=o.x,c=o.y,l=o.r,u=r/2,h=Object(a.b)(s,c,t,e);return i&&n?h<=l+u:i?h<=l:!!n&&(h>=l-u&&h<=l+u)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.r;t.beginPath(),t.arc(n,i,r,0,2*Math.PI,!1),t.closePath()},e}(l);function h(t,e,n,i){return t/(n*n)+e/(i*i)}var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){var o=this.attr(),a=r/2,s=o.x,c=o.y,l=o.rx,u=o.ry,f=(t-s)*(t-s),p=(e-c)*(e-c);return i&&n?h(f,p,l+a,u+a)<=1:i?h(f,p,l,u)<=1:!!n&&(h(f,p,l-a,u-a)>=1&&h(f,p,l+a,u+a)<=1)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,i,r,o,0,0,2*Math.PI,!1);else{var a=r>o?r:o,s=r>o?1:r/o,c=r>o?o/r:1;t.save(),t.translate(n,i),t.scale(s,c),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(l);function p(t){return t instanceof HTMLElement&&Object(a.k)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if(Object(a.k)(t)){var i=new Image;i.onload=function(){if(e.destroyed)return!1;e.attr("img",i),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},i.crossOrigin="Anonymous",i.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):p(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,i=e.y,r=e.width,o=e.height,s=e.sx,c=e.sy,l=e.swidth,u=e.sheight,h=e.img;(h instanceof Image||p(h))&&(Object(a.i)(s)||Object(a.i)(c)||Object(a.i)(l)||Object(a.i)(u)?t.drawImage(h,n,i,r,o):t.drawImage(h,s,c,l,u,n,i,r,o))},e}(l),g=n(17);function y(t,e,n,i,r,o,a){var s=Math.min(t,n),c=Math.max(t,n),l=Math.min(e,i),u=Math.max(e,i),h=r/2;return o>=s-h&&o<=c+h&&a>=l-h&&a<=u+h&&g.c.pointToLine(t,e,n,i,o,a)<=r/2}var v=n(25),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2,o=t.startArrow,a=t.endArrow;o&&v.b(this,t,i,r,e,n),a&&v.a(this,t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){if(!n||!r)return!1;var o=this.attr();return y(o.x1,o.y1,o.x2,o.y2,r,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.startArrow,s=e.endArrow,c={dx:0,dy:0},l={dx:0,dy:0};a&&a.d&&(c=v.c(n,i,r,o,e.startArrow.d)),s&&s.d&&(l=v.c(n,i,r,o,e.endArrow.d)),t.beginPath(),t.moveTo(n+c.dx,i+c.dy),t.lineTo(r-l.dx,o-l.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2;return g.c.length(e,n,i,r)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2;return g.c.pointAt(n,i,r,o,t)},e}(l),b=n(0),x=n(30),_={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+i],["L",t,e-i],["L",t+n,e+i],["Z"]]},"triangle-down":function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-i],["L",t+n,e-i],["L",t,e+i],["Z"]]}},O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return Object(b.isNil)(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,i=this.attr(),r=i.x,o=i.y,s=i.symbol||"circle",c=this._getR(i);if(Object(a.h)(s))n=(t=s)(r,o,c),n=Object(x.d)(n);else{if(!(t=e.Symbols[s]))return console.warn(s+" marker is not supported."),null;n=t(r,o,c)}return n},e.prototype.createPath=function(t){var e=this._getPath(),n=this.get("paramsCache");Object(s.e)(this,t,{path:e},n)},e.Symbols=_,e}(l);function w(t,e,n){var i=Object(o.getOffScreenContext)();return t.createPath(i),i.isPointInPath(e,n)}function j(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function S(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function M(t,e,n){var i=!1,r=t.length;if(r<=2)return!1;for(var o=0;o0!=j(s[1]-n)>0&&j(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(i=!i)}return i}var A=n(3),C=n(73);function E(t,e,n,i,r,o,s,c){var l=(Math.atan2(c-e,s-t)+2*Math.PI)%(2*Math.PI);if(lr)return!1;var u={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return Object(a.b)(u.x,u.y,s,c)<=o/2}var I=A.ext.transform;var P=Object(r.__assign)({hasArc:function(t){for(var e=!1,n=t.length,i=0;i0&&i.push(r),{polygons:n,polylines:i}},isPointInStroke:function(t,e,n,i,r){for(var o=!1,s=e/2,c=0;cx?b:x,M=I(null,[["t",-v,-m],["r",-w],["s",1/(b>x?1:b/x),1/(b>x?x/b:1)]]);C.transformMat3(j,j,M),o=E(0,0,S,_,O,e,j[0],j[1])}if(o)break}}return o}},o.PathUtil);function T(t,e,n){for(var i=!1,r=0;r=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)}));var o=r[n];if(Object(b.isNil)(o)||Object(b.isNil)(n))return null;var a=o.length,s=r[n+1];return g.b.pointAt(o[a-2],o[a-1],s[1],s[2],s[3],s[4],s[5],s[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",P.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,i,r=0,o=0,a=[],s=this.get("curve");s&&(Object(b.each)(s,(function(t,e){n=s[e+1],i=t.length,n&&(r+=g.b.length(t[i-2],t[i-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",r),0!==r?(Object(b.each)(s,(function(c,l){n=s[l+1],i=c.length,n&&((t=[])[0]=o/r,e=g.b.length(c[i-2],c[i-1],n[1],n[2],n[3],n[4],n[5],n[6]),o+=e||0,t[1]=o/r,a.push(t))})),this.set("tCache",a)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,i=e[1].currentPoint,r=e[1].startTangent;t=[],r?(t.push([n[0]-r[0],n[1]-r[1]]),t.push([n[0],n[1]])):(t.push([i[0],i[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var i=e[n-2].currentPoint,r=e[n-1].currentPoint,o=e[n-1].endTangent;t=[],o?(t.push([r[0]-o[0],r[1]-o[1]]),t.push([r[0],r[1]])):(t.push([i[0],i[1]]),t.push([r[0],r[1]]))}return t},e}(l);function L(t,e,n,i,r){var o=t.length;if(o<2)return!1;for(var a=0;a=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)})),g.c.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,i,r=0,o=[];Object(b.each)(t,(function(a,s){t[s+1]&&((n=[])[0]=r/e,i=g.c.length(a[0],a[1],t[s+1][0],t[s+1][1]),r+=i,n[1]=r/e,o.push(n))})),this.set("tCache",o)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(l),B=n(81);var N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){var o=this.attr(),s=o.x,c=o.y,l=o.width,u=o.height,h=o.radius;if(h){var f=!1;return n&&(f=function(t,e,n,i,r,o,a,s){return y(t+r,e,t+n-r,e,o,a,s)||y(t+n,e+r,t+n,e+i-r,o,a,s)||y(t+n-r,e+i,t+r,e+i,o,a,s)||y(t,e+i-r,t,e+r,o,a,s)||E(t+n-r,e+r,r,1.5*Math.PI,2*Math.PI,o,a,s)||E(t+n-r,e+i-r,r,0,.5*Math.PI,o,a,s)||E(t+r,e+i-r,r,.5*Math.PI,Math.PI,o,a,s)||E(t+r,e+r,r,Math.PI,1.5*Math.PI,o,a,s)}(s,c,l,u,h,r,t,e)),!f&&i&&(f=w(this,t,e)),f}var p=r/2;return i&&n?Object(a.e)(s-p,c-p,l+p,u+p,t,e):i?Object(a.e)(s,c,l,u,t,e):n?function(t,e,n,i,r,o,s){var c=r/2;return Object(a.e)(t-c,e-c,n,r,o,s)||Object(a.e)(t+n-c,e-c,r,i,o,s)||Object(a.e)(t+c,e+i-c,n,r,o,s)||Object(a.e)(t-c,e+c,r,i,o,s)}(s,c,l,u,r,t,e):void 0},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.width,o=e.height,a=e.radius;if(t.beginPath(),0===a)t.rect(n,i,r,o);else{var s=Object(B.a)(a),c=s[0],l=s[1],u=s[2],h=s[3];t.moveTo(n+c,i),t.lineTo(n+r-l,i),0!==l&&t.arc(n+r-l,i+l,l,-Math.PI/2,0),t.lineTo(n+r,i+o-u),0!==u&&t.arc(n+r-u,i+o-u,u,0,Math.PI/2),t.lineTo(n+h,i+o),0!==h&&t.arc(n+h,i+o-h,h,Math.PI/2,Math.PI),t.lineTo(n,i+c),0!==c&&t.arc(n+c,i+c,c,Math.PI,1.5*Math.PI),t.closePath()}},e}(l),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=Object(o.assembleFont)(t)},e.prototype._setText=function(t){var e=null;Object(a.k)(t)&&-1!==t.indexOf("\n")&&(e=t.split("\n")),this.set("textArr",e)},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),e.startsWith("font")&&this._assembleFont(),"text"===e&&this._setText(n)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},e.prototype._drawTextArr=function(t,e,n){var i,r=this.attrs,s=r.textBaseline,c=r.x,l=r.y,u=1*r.fontSize,h=this._getSpaceingY(),f=Object(o.getTextHeight)(r.text,r.fontSize,r.lineHeight);Object(a.c)(e,(function(e,r){i=l+r*(h+u)-f+u,"middle"===s&&(i+=f-u-(f-u)/2),"top"===s&&(i+=f-u),Object(a.i)(e)||(n?t.fillText(e,c,i):t.strokeText(e,c,i))}))},e.prototype._drawText=function(t,e){var n=this.attr(),i=n.x,r=n.y,o=this.get("textArr");if(o)this._drawTextArr(t,o,e);else{var s=n.text;Object(a.i)(s)||(e?t.fillText(s,i,r):t.strokeText(s,i,r))}},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,i=e.opacity,r=e.strokeOpacity,o=e.fillOpacity;this.isStroke()&&n>0&&(Object(a.i)(r)||1===r||(t.globalAlpha=i),this.stroke(t)),this.isFill()&&(Object(a.i)(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=i)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AXIS_META_CONFIG_KEYS=void 0,e.AXIS_META_CONFIG_KEYS=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"]},function(t,e,n){"use strict";var i=n(1),r=n(12),o=n(0),a=n(4),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer(),e=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return Object(a.b)(e,n,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){var t=this.get("container");Object(a.a)(t)},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if(Object(o.isNil)(t)){t=this.createDom();var e=this.get("parent");Object(o.isString)(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else Object(o.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?Object(o.deepMix)({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var e=this.getContainer();this.applyChildrenStyles(e,t);var n=this.get("containerClassName");if(n&&Object(a.h)(e,n)){var i=t[n];Object(r.e)(e,i)}}},e.prototype.applyChildrenStyles=function(t,e){Object(o.each)(e,(function(e,n){var i=t.getElementsByClassName(n);Object(o.each)(i,(function(t){Object(r.e)(t,e)}))}))},e.prototype.applyStyle=function(t,e){var n=this.get("domStyles");Object(r.e)(e,n[t])},e.prototype.createDom=function(){var t=this.get("containerTpl");return Object(r.b)(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){Object(o.hasKey)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(n(51).a);e.a=s},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a}));var i=0,r=.5,o=.5,a=.05},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s}));var i=n(16),r=n(74);function o(t,e,n){var r=1;return Object(i.h)(t)&&(r=t.split("\n").length),r>1?e*r+function(t,e){return e?e-t:.14*t}(e,n)*(r-1):e}function a(t,e){var n=Object(r.a)(),o=0;if(Object(i.e)(t)||""===t)return o;if(n.save(),n.font=e,Object(i.h)(t)&&t.includes("\n")){var a=t.split("\n");Object(i.a)(a,(function(t){var e=n.measureText(t).width;o0&&(n=n.map((function(t,n){return e.forEach((function(i,r){t+=e[r][n]})),t}))),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pattern=void 0;var i=n(1),r=n(10),o=n(0),a=n(2),s=n(112);e.pattern=function(t){var e=this;return function(n){var c,l=n.options,u=n.chart,h=l.pattern;if(!h)return n;return(0,a.deepAssign)({},n,{options:(c={},c[t]=function(n){for(var c,f,p,d=[],g=1;g0&&(e?"stroke"in n?this._setColor(t,"stroke",o):"strokeStyle"in n&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),c&&h.setAttribute(l.b.strokeOpacity,c),u&&h.setAttribute(l.b.lineWidth,u))},e.prototype._setColor=function(t,e,n){var i=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n))(r=t.find("gradient",n))||(r=t.addGradient(n)),i.setAttribute(l.b[e],"url(#"+r+")");else if(/^[p,P]{1}[\s]*\(/.test(n)){var r;(r=t.find("pattern",n))||(r=t.addPattern(n)),i.setAttribute(l.b[e],"url(#"+r+")")}else i.setAttribute(l.b[e],n);else i.setAttribute(l.b[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),i=e||n,r=i.shadowOffsetX,o=i.shadowOffsetY,s=i.shadowBlur,c=i.shadowColor;(r||o||s||c)&&Object(a.b)(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&Object(a.c)(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),i=this.get("canvas").get("el").getBoundingClientRect(),r=t+i.left,o=e+i.top,a=document.elementFromPoint(r,o);return!(!a||!a.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(o.AbstractShape),f=n(0),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,r:0})},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");Object(f.each)(e||n,(function(t,e){"x"===e||"y"===e?i.setAttribute("c"+e,t):l.b[e]&&i.setAttribute(l.b[e],t)}))},e}(h),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dom",e.canFill=!1,e.canStroke=!1,e}return Object(r.__extends)(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");if(Object(f.each)(e||n,(function(t,e){l.b[e]&&i.setAttribute(l.b[e],t)})),"function"==typeof n.html){var r=n.html.call(this,n);if(r instanceof Element||r instanceof HTMLDocument){for(var o=i.childNodes,a=o.length-1;a>=0;a--)i.removeChild(o[a]);i.appendChild(r)}else i.innerHTML=r}else i.innerHTML=n.html},e}(h),g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ellipse",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");Object(f.each)(e||n,(function(t,e){"x"===e||"y"===e?i.setAttribute("c"+e,t):l.b[e]&&i.setAttribute(l.b[e],t)}))},e}(h),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="image",e.canFill=!1,e.canStroke=!1,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el");Object(f.each)(e||i,(function(t,e){"img"===e?n._setImage(i.img):l.b[e]&&r.setAttribute(l.b[e],t)}))},e.prototype.setAttr=function(t,e){this.attrs[t]=e,"img"===t&&this._setImage(e)},e.prototype._setImage=function(t){var e=this.attr(),n=this.get("el");if(Object(f.isString)(t))n.setAttribute("href",t);else if(t instanceof window.Image)e.width||(n.setAttribute("width",t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",t.height),this.attr("height",t.height)),n.setAttribute("href",t.src);else if(t instanceof HTMLElement&&Object(f.isString)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase())n.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var i=document.createElement("canvas");i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.getContext("2d").putImageData(t,0,0),e.width||(n.setAttribute("width",""+t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",""+t.height),this.attr("height",t.height)),n.setAttribute("href",i.toDataURL())}},e}(h),v=n(17),m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.canFill=!1,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");Object(f.each)(e||n,(function(e,r){if("startArrow"===r||"endArrow"===r)if(e){var o=Object(f.isObject)(e)?t.addArrow(n,l.b[r]):t.getDefaultArrow(n,l.b[r]);i.setAttribute(l.b[r],"url(#"+o+")")}else i.removeAttribute(l.b[r]);else l.b[r]&&i.setAttribute(l.b[r],e)}))},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2;return v.c.length(e,n,i,r)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2;return v.c.pointAt(n,i,r,o,t)},e}(h),b={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+i],["L",t,e-i],["L",t+n,e+i],["z"]]},triangleDown:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-i],["L",t+n,e-i],["L",t,e+i],["Z"]]}},x={get:function(t){return b[t]},register:function(t,e){b[t]=e},remove:function(t){delete b[t]},getAll:function(){return b}},_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="marker",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.createPath=function(t){this.get("el").setAttribute("d",this._assembleMarker())},e.prototype._assembleMarker=function(){var t=this._getPath();return Object(f.isArray)(t)?t.map((function(t){return t.join(" ")})).join(""):t},e.prototype._getPath=function(){var t,e=this.attr(),n=e.x,i=e.y,r=e.r||e.radius,o=e.symbol||"circle";return(t=Object(f.isFunction)(o)?o:x.get(o))?t(n,i,r):(console.warn(t+" symbol is not exist."),null)},e.symbolsFactory=x,e}(h),O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="path",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el");Object(f.each)(e||i,(function(e,o){if("path"===o&&Object(f.isArray)(e))r.setAttribute("d",n._formatPath(e));else if("startArrow"===o||"endArrow"===o)if(e){var a=Object(f.isObject)(e)?t.addArrow(i,l.b[o]):t.getDefaultArrow(i,l.b[o]);r.setAttribute(l.b[o],"url(#"+a+")")}else r.removeAttribute(l.b[o]);else l.b[o]&&r.setAttribute(l.b[o],e)}))},e.prototype._formatPath=function(t){var e=t.map((function(t){return t.join(" ")})).join("");return~e.indexOf("NaN")?"":e},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var e=this.get("el"),n=this.getTotalLength();if(0===n)return null;var i=e?e.getPointAtLength(t*n):null;return i?{x:i.x,y:i.y}:null},e}(h),w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");Object(f.each)(e||n,(function(t,e){"points"===e&&Object(f.isArray)(t)&&t.length>=2?i.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):l.b[e]&&i.setAttribute(l.b[e],t)}))},e}(h),j=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");Object(f.each)(e||n,(function(t,e){"points"===e&&Object(f.isArray)(t)&&t.length>=2?i.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):l.b[e]&&i.setAttribute(l.b[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return Object(f.isNil)(e)?(this.set("totalLength",v.d.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,i=this.attr().points,r=this.get("tCache");return r||(this._setTcache(),r=this.get("tCache")),Object(f.each)(r,(function(i,r){t>=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)})),v.c.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,i,r=0,o=[];Object(f.each)(t,(function(a,s){t[s+1]&&((n=[])[0]=r/e,i=v.c.length(a[0],a[1],t[s+1][0],t[s+1][1]),r+=i,n[1]=r/e,o.push(n))})),this.set("tCache",o)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(h);var S=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rect",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el"),o=!1,a=["x","y","width","height","radius"];Object(f.each)(e||i,(function(t,e){-1===a.indexOf(e)||o?-1===a.indexOf(e)&&l.b[e]&&r.setAttribute(l.b[e],t):(r.setAttribute("d",n._assembleRect(i)),o=!0)}))},e.prototype._assembleRect=function(t){var e=t.x,n=t.y,i=t.width,r=t.height,o=t.radius;if(!o)return"M "+e+","+n+" l "+i+",0 l 0,"+r+" l"+-i+" 0 z";var a=function(t){var e=0,n=0,i=0,r=0;return Object(f.isArray)(t)?1===t.length?e=n=i=r=t[0]:2===t.length?(e=i=t[0],n=r=t[1]):3===t.length?(e=t[0],n=r=t[1],i=t[2]):(e=t[0],n=t[1],i=t[2],r=t[3]):e=n=i=r=t,{r1:e,r2:n,r3:i,r4:r}}(o);return Object(f.isArray)(o)?1===o.length?a.r1=a.r2=a.r3=a.r4=o[0]:2===o.length?(a.r1=a.r3=o[0],a.r2=a.r4=o[1]):3===o.length?(a.r1=o[0],a.r2=a.r4=o[1],a.r3=o[2]):(a.r1=o[0],a.r2=o[1],a.r3=o[2],a.r4=o[3]):a.r1=a.r2=a.r3=a.r4=o,[["M "+(e+a.r1)+","+n],["l "+(i-a.r1-a.r2)+",0"],["a "+a.r2+","+a.r2+",0,0,1,"+a.r2+","+a.r2],["l 0,"+(r-a.r2-a.r3)],["a "+a.r3+","+a.r3+",0,0,1,"+-a.r3+","+a.r3],["l "+(a.r3+a.r4-i)+",0"],["a "+a.r4+","+a.r4+",0,0,1,"+-a.r4+","+-a.r4],["l 0,"+(a.r4+a.r1-r)],["a "+a.r1+","+a.r1+",0,0,1,"+a.r1+","+-a.r1],["z"]].join(" ")},e}(h),M=n(79),A={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},C={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},E={left:"left",start:"left",center:"middle",right:"end",end:"end"},I=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el");this._setFont(),Object(f.each)(e||i,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?Object(a.c)(n):l.b[e]&&r.setAttribute(l.b[e],t)})),r.setAttribute("paint-order","stroke"),r.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.textBaseline,i=e.textAlign,r=Object(M.a)();r&&"firefox"===r.name?t.setAttribute("dominant-baseline",C[n]||"alphabetic"):t.setAttribute("alignment-baseline",A[n]||"baseline"),t.setAttribute("text-anchor",E[i]||"left")},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),i=n.x,r=n.textBaseline,o=void 0===r?"bottom":r;if(t)if(~t.indexOf("\n")){var a=t.split("\n"),s=a.length-1,c="";Object(f.each)(a,(function(t,e){0===e?"alphabetic"===o?c+=''+t+"":"top"===o?c+=''+t+"":"middle"===o?c+=''+t+"":"bottom"===o?c+=''+t+"":"hanging"===o&&(c+=''+t+""):c+=''+t+""})),e.innerHTML=c}else e.innerHTML=t;else e.innerHTML=""},e}(h)},function(t,e,n){"use strict";n.r(e),n.d(e,"create",(function(){return r})),n.d(e,"clone",(function(){return o})),n.d(e,"fromValues",(function(){return a})),n.d(e,"copy",(function(){return s})),n.d(e,"set",(function(){return c})),n.d(e,"add",(function(){return l})),n.d(e,"subtract",(function(){return u})),n.d(e,"multiply",(function(){return h})),n.d(e,"divide",(function(){return f})),n.d(e,"ceil",(function(){return p})),n.d(e,"floor",(function(){return d})),n.d(e,"min",(function(){return g})),n.d(e,"max",(function(){return y})),n.d(e,"round",(function(){return v})),n.d(e,"scale",(function(){return m})),n.d(e,"scaleAndAdd",(function(){return b})),n.d(e,"distance",(function(){return x})),n.d(e,"squaredDistance",(function(){return _})),n.d(e,"length",(function(){return O})),n.d(e,"squaredLength",(function(){return w})),n.d(e,"negate",(function(){return j})),n.d(e,"inverse",(function(){return S})),n.d(e,"normalize",(function(){return M})),n.d(e,"dot",(function(){return A})),n.d(e,"cross",(function(){return C})),n.d(e,"lerp",(function(){return E})),n.d(e,"random",(function(){return I})),n.d(e,"transformMat2",(function(){return P})),n.d(e,"transformMat2d",(function(){return T})),n.d(e,"transformMat3",(function(){return F})),n.d(e,"transformMat4",(function(){return L})),n.d(e,"rotate",(function(){return k})),n.d(e,"angle",(function(){return D})),n.d(e,"zero",(function(){return B})),n.d(e,"str",(function(){return N})),n.d(e,"exactEquals",(function(){return R})),n.d(e,"equals",(function(){return V})),n.d(e,"len",(function(){return G})),n.d(e,"sub",(function(){return Y})),n.d(e,"mul",(function(){return W})),n.d(e,"div",(function(){return X})),n.d(e,"dist",(function(){return H})),n.d(e,"sqrDist",(function(){return U})),n.d(e,"sqrLen",(function(){return q})),n.d(e,"forEach",(function(){return Z}));var i=n(18);function r(){var t=new i.a(2);return i.a!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t){var e=new i.a(2);return e[0]=t[0],e[1]=t[1],e}function a(t,e){var n=new i.a(2);return n[0]=t,n[1]=e,n}function s(t,e){return t[0]=e[0],t[1]=e[1],t}function c(t,e,n){return t[0]=e,t[1]=n,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function h(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function p(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function d(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function g(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function y(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function v(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function m(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function b(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function x(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.hypot(n,i)}function _(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i}function O(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function w(t){var e=t[0],n=t[1];return e*e+n*n}function j(t,e){return t[0]=-e[0],t[1]=-e[1],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function M(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r)),t[0]=e[0]*r,t[1]=e[1]*r,t}function A(t,e){return t[0]*e[0]+t[1]*e[1]}function C(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t}function E(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t}function I(t,e){e=e||1;var n=2*i.c()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function P(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t}function T(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function F(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t}function L(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t}function k(t,e,n,i){var r=e[0]-n[0],o=e[1]-n[1],a=Math.sin(i),s=Math.cos(i);return t[0]=r*s-o*a+n[0],t[1]=r*a+o*s+n[1],t}function D(t,e){var n=t[0],i=t[1],r=e[0],o=e[1],a=Math.sqrt(n*n+i*i)*Math.sqrt(r*r+o*o),s=a&&(n*r+i*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function B(t){return t[0]=0,t[1]=0,t}function N(t){return"vec2("+t[0]+", "+t[1]+")"}function R(t,e){return t[0]===e[0]&&t[1]===e[1]}function V(t,e){var n=t[0],r=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=i.b*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=i.b*Math.max(1,Math.abs(r),Math.abs(a))}var z,G=O,Y=u,W=h,X=f,H=x,U=_,q=w,Z=(z=r(),function(t,e,n,i,r,o){var a,s;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a
',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},e.DEFAULT_OPTIONS={appendPadding:2,tooltip:i.__assign({},e.DEFAULT_TOOLTIP_OPTIONS),animation:{}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAllNodes=e.getField=e.NODE_ANCESTORS_FIELD=e.CHILD_NODE_COUNT=e.NODE_INDEX_FIELD=void 0;var i=n(0);e.NODE_INDEX_FIELD="nodeIndex",e.CHILD_NODE_COUNT="childNodeCount",e.NODE_ANCESTORS_FIELD="nodeAncestor";e.getField=function(t,e){var n=t.field,r=t.fields;if((0,i.isString)(n))return n;if((0,i.isArray)(n))return console.warn("Invalid field: it must be a string!"),n[0];if(console.warn("".concat("Invalid field: it must be a string!"," will try to get fields instead.")),(0,i.isString)(r))return r;if((0,i.isArray)(r)&&r.length)return r[0];if(e)return e;throw new TypeError("Invalid field: it must be a string!")},e.getAllNodes=function(t){var n,r,o=[];return t&&t.each?t.each((function(t){var a,s;t.parent!==n?(n=t.parent,r=0):r+=1;var c=(0,i.filter)(((null===(a=t.ancestors)||void 0===a?void 0:a.call(t))||[]).map((function(t){return o.find((function(e){return e.name===t.name}))||t})),(function(e){var n=e.depth;return n>0&&n1&&(n*=Math.sqrt(y),r*=Math.sqrt(y));var v=n*n*(g*g)+r*r*(d*d),m=v?Math.sqrt((n*n*(r*r)-v)/v):1;c===l&&(m*=-1),isNaN(m)&&(m=0);var b=r?m*n*g/r:0,x=n?m*-r*d/n:0,_=(u+f)/2+Math.cos(s)*b-Math.sin(s)*x,O=(h+p)/2+Math.sin(s)*b+Math.cos(s)*x,w=[(d-b)/n,(g-x)/r],j=[(-1*d-b)/n,(-1*g-x)/r],S=a([1,0],w),M=a(w,j);return o(w,j)<=-1&&(M=Math.PI),o(w,j)>=1&&(M=0),0===l&&M>0&&(M-=2*Math.PI),1===l&&M<0&&(M+=2*Math.PI),{cx:_,cy:O,rx:Object(i.j)(t,[f,p])?0:n,ry:Object(i.j)(t,[f,p])?0:r,startAngle:S,endAngle:S+M,xRotation:s,arcFlag:c,sweepFlag:l}}},function(t,e,n){"use strict";(function(t){var i=n(24),r=n(199);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a="object"==("undefined"==typeof exports?"undefined":o(exports))&&exports&&!exports.nodeType&&exports,s=a&&"object"==o(t)&&t&&!t.nodeType&&t,c=s&&s.exports===a?i.a.Buffer:void 0,l=(c?c.isBuffer:void 0)||r.a;e.a=l}).call(this,n(175)(t))},,function(t,e){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processIllegalData=e.transformDataToNodeLinkData=e.adjustYMetaByZero=void 0;var i=n(1),r=n(0),o=n(108),a=n(83);e.adjustYMetaByZero=function(t,e){if(!t)return{};var n=t.filter((function(t){var n=(0,r.get)(t,[e]);return(0,r.isNumber)(n)&&!isNaN(n)})),i=n.every((function(t){return(0,r.get)(t,[e])>=0})),o=n.every((function(t){return(0,r.get)(t,[e])<=0}));return i?{min:0}:o?{max:0}:{}},e.transformDataToNodeLinkData=function(t,e,n,r,o){if(void 0===o&&(o=[]),!Array.isArray(t))return{nodes:[],links:[]};var s=[],c={},l=-1;return t.forEach((function(t){var u=t[e],h=t[n],f=t[r],p=(0,a.pick)(t,o);c[u]||(c[u]=i.__assign({id:++l,name:u},p)),c[h]||(c[h]=i.__assign({id:++l,name:h},p)),s.push(i.__assign({source:c[u].id,target:c[h].id,value:f},p))})),{nodes:Object.values(c).sort((function(t,e){return t.id-e.id})),links:s}},e.processIllegalData=function(t,e){var n=(0,r.filter)(t,(function(t){var n=t[e];return null===n||"number"==typeof n&&!isNaN(n)}));return(0,o.log)(o.LEVEL.WARN,n.length===t.length,"illegal data existed in chart data."),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addViewAnimation=e.getSiblingViews=e.getViews=e.findViewById=void 0;var i=n(0);function r(t){var e=t.parent;return e?e.views:[]}e.findViewById=function(t,e){return t.views.find((function(t){return t.id===e}))},e.getViews=r,e.getSiblingViews=function(t){return r(t).filter((function(e){return e!==t}))},e.addViewAnimation=function(t,e,n){void 0===n&&(n=t.geometries),"boolean"==typeof e?t.animate(e):t.animate(!0),(0,i.each)(n,(function(t){var n;n=(0,i.isFunction)(e)?e(t.type||t.shapeType,t)||!0:e,t.animate(n)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLocale=e.registerLocale=void 0;var i=n(0),r=n(2),o=n(113),a={};e.registerLocale=function(t,e){a[t]=e},e.getLocale=function(t){return{get:function(e,n){return(0,r.template)((0,i.get)(a[t],e)||(0,i.get)(a[o.GLOBAL.locale],e)||(0,i.get)(a["en-US"],e)||e,n)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conversionTagComponent=e.transformData=e.CONVERSION_TAG_NAME=void 0;var i=n(1),r=n(0),o=n(48);e.CONVERSION_TAG_NAME="CONVERSION_TAG_NAME",e.transformData=function(t,e,n){var i=n.yField,a=n.maxSize,s=n.minSize,c=(0,r.get)((0,r.maxBy)(e,i),[i]),l=(0,r.isNumber)(a)?a:1,u=(0,r.isNumber)(s)?s:0;return(0,r.map)(t,(function(e,n){var a=(e[i]||0)/c;return e[o.FUNNEL_PERCENT]=a,e[o.FUNNEL_MAPPING_VALUE]=(l-u)*a+u,e[o.FUNNEL_CONVERSATION]=[(0,r.get)(t,[n-1,i]),e[i]],e}))},e.conversionTagComponent=function(t){return function(n){var a=n.chart,s=n.options,c=s.conversionTag,l=s.filteredData||a.getOptions().data;if(c){var u=c.formatter;l.forEach((function(n,s){if(!(s<=0||Number.isNaN(n[o.FUNNEL_MAPPING_VALUE]))){var h=t(n,s,l,{top:!0,name:e.CONVERSION_TAG_NAME,text:{content:(0,r.isFunction)(u)?u(n,l):u,offsetX:c.offsetX,offsetY:c.offsetY,position:"end",autoRotate:!1,style:i.__assign({textAlign:"start",textBaseline:"middle"},c.style)}});a.annotation().line(h)}}))}return n}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.meta=void 0;var i=n(13),r=n(19),o=n(2),a=n(64),s=n(57),c=n(49);function l(t){var e=t.chart,n=t.options,i=n.data,a=n.color,l=n.areaStyle,u=n.point,h=n.line,f=null==u?void 0:u.state,p=(0,c.getTinyData)(i);e.data(p);var d=(0,o.deepAssign)({},t,{options:{xField:s.X_FIELD,yField:s.Y_FIELD,area:{color:a,style:l},line:h,point:u}}),g=(0,o.deepAssign)({},d,{options:{tooltip:!1}}),y=(0,o.deepAssign)({},d,{options:{tooltip:!1,state:f}});return(0,r.area)(d),(0,r.line)(g),(0,r.point)(y),e.axis(!1),e.legend(!1),t}function u(t){var e,n,r=t.options,l=r.xAxis,u=r.yAxis,h=r.data,f=(0,c.getTinyData)(h);return(0,o.flow)((0,i.scale)(((e={})[s.X_FIELD]=l,e[s.Y_FIELD]=u,e),((n={})[s.X_FIELD]={type:"cat"},n[s.Y_FIELD]=(0,a.adjustYMetaByZero)(f,s.Y_FIELD),n)))(t)}e.meta=u,e.adaptor=function(t){return(0,o.flow)((0,i.pattern)("areaStyle"),l,u,i.tooltip,i.theme,i.animation,(0,i.annotation)())(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrillDownAction=e.HIERARCHY_DATA_TRANSFORM_PARAMS=e.DEFAULT_BREAD_CRUMB_CONFIG=e.BREAD_CRUMB_NAME=e.PADDING_TOP=void 0;var i=n(1),r=n(10),o=n(0),a=n(109);e.PADDING_TOP=5,e.BREAD_CRUMB_NAME="drilldown-bread-crumb",e.DEFAULT_BREAD_CRUMB_CONFIG={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},e.HIERARCHY_DATA_TRANSFORM_PARAMS="hierarchy-data-transform-params";var s=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.name="drill-down",n.historyCache=[],n.breadCrumbGroup=null,n.breadCrumbCfg=e.DEFAULT_BREAD_CRUMB_CONFIG,n}return i.__extends(n,t),n.prototype.click=function(){var t=(0,o.get)(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},n.prototype.resetPosition=function(){if(this.breadCrumbGroup){var t=this.context.view.getCoordinate(),n=this.breadCrumbGroup,i=n.getBBox(),o=this.getButtonCfg().position,a={x:t.start.x,y:t.end.y-(i.height+2*e.PADDING_TOP)};t.isPolar&&(a={x:0,y:0}),"bottom-left"===o&&(a={x:t.start.x,y:t.start.y});var s=r.Util.transform(null,[["t",a.x+0,a.y+i.height+e.PADDING_TOP]]);n.setMatrix(s)}},n.prototype.back=function(){(0,o.size)(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},n.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},n.prototype.drill=function(t){var n=this.context.view,r=(0,o.get)(n,["interactions","drill-down","cfg","transformData"],(function(t){return t})),a=r(i.__assign({data:t.data},t[e.HIERARCHY_DATA_TRANSFORM_PARAMS]));n.changeData(a);for(var s=[],c=t;c;){var l=c.data;s.unshift({id:"".concat(l.name,"_").concat(c.height,"_").concat(c.depth),name:l.name,children:r(i.__assign({data:l},t[e.HIERARCHY_DATA_TRANSFORM_PARAMS]))}),c=c.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(s)},n.prototype.backTo=function(t){if(t&&!(t.length<=0)){var e=this.context.view,n=(0,o.last)(t).children;e.changeData(n),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},n.prototype.getButtonCfg=function(){var t=this.context.view,e=(0,o.get)(t,["interactions","drill-down","cfg","drillDownConfig"]);return(0,a.deepAssign)(this.breadCrumbCfg,null==e?void 0:e.breadCrumb,this.cfg)},n.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},n.prototype.drawBreadCrumbGroup=function(){var t=this,n=this.getButtonCfg(),r=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:e.BREAD_CRUMB_NAME});var a=0;r.forEach((function(s,c){var l=t.breadCrumbGroup.addShape({type:"text",id:s.id,name:"".concat(e.BREAD_CRUMB_NAME,"_").concat(s.name,"_text"),attrs:i.__assign(i.__assign({text:0!==c||(0,o.isNil)(n.rootText)?s.name:n.rootText},n.textStyle),{x:a,y:0})}),u=l.getBBox();if(a+=u.width+4,l.on("click",(function(e){var n,i=e.target.get("id");if(i!==(null===(n=(0,o.last)(r))||void 0===n?void 0:n.id)){var a=r.slice(0,r.findIndex((function(t){return t.id===i}))+1);t.backTo(a)}})),l.on("mouseenter",(function(t){var e;t.target.get("id")!==(null===(e=(0,o.last)(r))||void 0===e?void 0:e.id)?l.attr(n.activeTextStyle):l.attr({cursor:"default"})})),l.on("mouseleave",(function(){l.attr(n.textStyle)})),c0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function A(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function C(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=r*c-o*s,t[1]=o*a-i*c,t[2]=i*s-r*a,t}function E(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t}function I(t,e,n,i,r,o){var a=o*o,s=a*(2*o-3)+1,c=a*(o-2)+o,l=a*(o-1),u=a*(3-2*o);return t[0]=e[0]*s+n[0]*c+i[0]*l+r[0]*u,t[1]=e[1]*s+n[1]*c+i[1]*l+r[1]*u,t[2]=e[2]*s+n[2]*c+i[2]*l+r[2]*u,t}function P(t,e,n,i,r,o){var a=1-o,s=a*a,c=o*o,l=s*a,u=3*o*s,h=3*c*a,f=c*o;return t[0]=e[0]*l+n[0]*u+i[0]*h+r[0]*f,t[1]=e[1]*l+n[1]*u+i[1]*h+r[1]*f,t[2]=e[2]*l+n[2]*u+i[2]*h+r[2]*f,t}function T(t,e){e=e||1;var n=2*i.c()*Math.PI,r=2*i.c()-1,o=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=r*e,t}function F(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t}function L(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function k(t,e,n){var i=n[0],r=n[1],o=n[2],a=n[3],s=e[0],c=e[1],l=e[2],u=r*l-o*c,h=o*s-i*l,f=i*c-r*s,p=r*f-o*h,d=o*u-i*f,g=i*h-r*u,y=2*a;return u*=y,h*=y,f*=y,p*=2,d*=2,g*=2,t[0]=s+u+p,t[1]=c+h+d,t[2]=l+f+g,t}function D(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function B(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function N(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function R(t,e){var n=t[0],i=t[1],r=t[2],o=e[0],a=e[1],s=e[2],c=Math.sqrt(n*n+i*i+r*r)*Math.sqrt(o*o+a*a+s*s),l=c&&A(t,e)/c;return Math.acos(Math.min(Math.max(l,-1),1))}function V(t){return t[0]=0,t[1]=0,t[2]=0,t}function z(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Y(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],s=e[1],c=e[2];return Math.abs(n-a)<=i.b*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=i.b*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-c)<=i.b*Math.max(1,Math.abs(o),Math.abs(c))}var W,X=h,H=f,U=p,q=_,Z=O,$=a,K=w,Q=(W=r(),function(t,e,n,i,r,o){var a,s;for(e||(e=3),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a0)}));return r.length>0?Object(o.a)(r,(function(r){var o=r.getBBox(),a=o.minX,s=o.maxX,c=o.minY,l=o.maxY;ae&&(e=s),ci&&(i=l)})):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,i=-1/0,r=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return r.length>0?Object(o.a)(r,(function(r){var o=r.getCanvasBBox(),a=o.minX,s=o.maxX,c=o.minY,l=o.maxY;ae&&(e=s),ci&&(i=l)})):(t=0,e=0,n=0,i=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:i,width:e-t,height:i-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,i){if(t.prototype.onAttrChange.call(this,e,n,i),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();Object(o.a)(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;a--){var s=t[a];if(Object(o.b)(s)&&(s.isGroup()?r=s.getShape(e,n,i):s.isHit(e,n)&&(r=s)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),i=this.get("timeline"),r=t.getParent();r&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),Object(o.j)(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,n){if(e.set("canvas",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,e),i&&function t(e,n){if(e.set("timeline",n),e.isGroup()){var i=e.get("children");i.length&&i.forEach((function(e){t(e,n)}))}}(t,i),n.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();Object(o.a)(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var i=t(e,n);return 0===i?e._INDEX-n._INDEX:i})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return Object(o.a)(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return Object(o.a)(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(r.a);e.a=s},function(t,e,n){"use strict";var i=n(1),r=n(0),o=n(3),a=n(16),s=n(29),c=n(72),l=o.ext.transform,u=["zIndex","capture","visible","type"],h=["repeat"];function f(t,e){var n={},i=e.attrs;for(var r in t)n[r]=i[r];return n}function p(t,e){var n={},i=e.attr();return Object(r.each)(t,(function(t,e){-1!==h.indexOf(e)||Object(r.isEqual)(i[e],t)||(n[e]=t)})),n}function d(t,e){if(e.onFrame)return t;var n=e.startTime,i=e.delay,o=e.duration,a=Object.prototype.hasOwnProperty;return Object(r.each)(t,(function(t){n+it.delay&&Object(r.each)(e.toAttrs,(function(e,n){a.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var g=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var i=n.getDefaultAttrs();return Object(r.mix)(i,e.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?i=d(i,O):n.addAnimator(this),i.push(O),this.set("animations",i),this.set("_pause",{isPaused:!1})}},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");Object(r.each)(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),n=t.getTime();return Object(r.each)(e,(function(t){t._paused=!0,t._pauseTime=n,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return Object(r.each)(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){var n,i=this,o=e.propagationPath;this.getEvents();"mouseenter"===t?n=e.fromShape:"mouseleave"===t&&(n=e.toShape);for(var s=function(t){var s=o[t],l=s.get("name");if(l){if((s.isGroup()||s.isCanvas&&s.isCanvas())&&n&&Object(a.g)(s,n))return"break";Object(r.isArray)(l)?Object(r.each)(l,(function(t){i.emitDelegateEvent(s,t,e)})):c.emitDelegateEvent(s,l,e)}},c=this,l=0;l=0&&s<.5*Math.PI?(i={x:u.minX,y:u.minY},o={x:u.maxX,y:u.maxY}):.5*Math.PI<=s&&s=i&&t<=r}},function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(){return"object"===("undefined"==typeof window?"undefined":i(window))?null===window||void 0===window?void 0:window.devicePixelRatio:2}Object.defineProperty(e,"__esModule",{value:!0}),e.transformMatrix=e.getSymbolsPosition=e.getUnitPatternSize=e.drawBackground=e.initCanvas=e.getPixelRatio=void 0,e.getPixelRatio=r,e.initCanvas=function(t,e){void 0===e&&(e=t);var n=document.createElement("canvas"),i=r();return n.width=t*i,n.height=e*i,n.style.width="".concat(t,"px"),n.style.height="".concat(e,"px"),n.getContext("2d").scale(i,i),n},e.drawBackground=function(t,e,n,i){void 0===i&&(i=n);var r=e.backgroundColor,o=e.opacity;t.globalAlpha=o,t.fillStyle=r,t.beginPath(),t.fillRect(0,0,n,i),t.closePath()},e.getUnitPatternSize=function(t,e,n){var i=t+e;return n?2*i:i},e.getSymbolsPosition=function(t,e){return e?[[t*(1/4),t*(1/4)],[t*(3/4),t*(3/4)]]:[[.5*t,.5*t]]},e.transformMatrix=function(t,e){var n=e*Math.PI/180;return{a:Math.cos(n)*(1/t),b:Math.sin(n)*(1/t),c:-Math.sin(n)*(1/t),d:Math.cos(n)*(1/t),e:0,f:0}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.adjust=e.legend=e.axis=e.meta=void 0;var i=n(1),r=n(0),o=n(13),a=n(19),s=n(2),c=n(64);function l(t){var e=t.chart,n=t.options,r=n.data,o=n.color,c=n.lineStyle,l=n.lineShape,u=n.point,h=n.area,f=n.seriesField,p=null==u?void 0:u.state,d=null==h?void 0:h.state;e.data(r);var g=(0,s.deepAssign)({},t,{options:{shapeField:f,line:{color:o,style:c,shape:l},point:u&&i.__assign({color:o,shape:"circle"},u),area:h&&i.__assign({color:o},h),label:void 0}}),y=(0,s.deepAssign)({},g,{options:{tooltip:!1,state:p}}),v=(0,s.deepAssign)({},g,{options:{tooltip:!1,state:d}});return(0,a.line)(g),(0,a.point)(y),(0,a.area)(v),t}function u(t){var e,n,i=t.options,r=i.xAxis,a=i.yAxis,l=i.xField,u=i.yField,h=i.data;return(0,s.flow)((0,o.scale)(((e={})[l]=r,e[u]=a,e),((n={})[l]={type:"cat"},n[u]=(0,c.adjustYMetaByZero)(h,u),n)))(t)}function h(t){var e=t.chart,n=t.options.reflect;if(n){var i=n;(0,r.isArray)(i)||(i=[i]);var o=i.map((function(t){return["reflect",t]}));e.coordinate({type:"rect",actions:o})}return t}function f(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return!1===i?e.axis(o,!1):e.axis(o,i),!1===r?e.axis(a,!1):e.axis(a,r),t}function p(t){var e=t.chart,n=t.options,i=n.legend,r=n.seriesField;return i&&r?e.legend(r,i):!1===i&&e.legend(!1),t}function d(t){var e=t.chart,n=t.options,r=n.label,o=n.yField,a=(0,s.findGeometry)(e,"line");if(r){var c=r.callback,l=i.__rest(r,["callback"]);a.label({fields:[o],callback:c,cfg:i.__assign({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},(0,s.transformLabel)(l))})}else a.label(!1);return t}function g(t){var e=t.chart;return t.options.isStack&&(0,r.each)(e.geometries,(function(t){t.adjust("stack")})),t}e.meta=u,e.axis=f,e.legend=p,e.adjust=g,e.adaptor=function(t){return(0,s.flow)(l,u,g,o.theme,h,f,p,o.tooltip,d,o.slider,o.scrollbar,o.interaction,o.animation,(0,o.annotation)(),o.limitInPlot)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.basicFunnel=e.conversionTag=void 0;var i=n(1),r=n(0),o=n(28),a=n(2),s=n(32),c=n(48),l=n(67);function u(t){var e=t.chart,n=t.options,i=n.data,r=void 0===i?[]:i,o=n.yField,a=n.maxSize,s=n.minSize,c=(0,l.transformData)(r,r,{yField:o,maxSize:a,minSize:s});return e.data(c),t}function h(t){var e=t.chart,n=t.options,i=n.xField,l=n.yField,u=n.color,h=n.tooltip,f=n.label,p=n.shape,d=void 0===p?"funnel":p,g=n.funnelStyle,y=n.state,v=(0,s.getTooltipMapping)(h,[i,l]),m=v.fields,b=v.formatter;return(0,o.geometry)({chart:e,options:{type:"interval",xField:i,yField:c.FUNNEL_MAPPING_VALUE,colorField:i,tooltipFields:(0,r.isArray)(m)&&m.concat([c.FUNNEL_PERCENT,c.FUNNEL_CONVERSATION]),mapping:{shape:d,tooltip:b,color:u,style:g},label:f,state:y}}),(0,a.findGeometry)(t.chart,"interval").adjust("symmetric"),t}function f(t){var e=t.chart,n=t.options.isTransposed;return e.coordinate({type:"rect",actions:n?[]:[["transpose"],["scale",1,-1]]}),t}function p(t){var e=t.options,n=t.chart,o=e.maxSize,a=(0,r.get)(n,["geometries","0","dataArray"],[]),s=(0,r.get)(n,["options","data","length"]),u=(0,r.map)(a,(function(t){return(0,r.get)(t,["0","nextPoints","0","x"])*s-.5}));return(0,l.conversionTagComponent)((function(t,e,n,r){var a=o-(o-t[c.FUNNEL_MAPPING_VALUE])/2;return i.__assign(i.__assign({},r),{start:[u[e-1]||e-.5,a],end:[u[e-1]||e-.5,a+.05]})}))(t),t}e.conversionTag=p,e.basicFunnel=function(t){return(0,a.flow)(u,h,f,p)(t)}},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.RANGE_VIEW_ID=e.INDICATEOR_VIEW_ID=e.DEFAULT_COLOR=e.PERCENT=e.RANGE_TYPE=e.RANGE_VALUE=void 0,e.RANGE_VALUE="range",e.RANGE_TYPE="type",e.PERCENT="percent",e.DEFAULT_COLOR="#f0f0f0",e.INDICATEOR_VIEW_ID="indicator-view",e.RANGE_VIEW_ID="range-view",e.DEFAULT_OPTIONS={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(i={},i[e.RANGE_VALUE]={sync:"v"},i[e.PERCENT]={sync:"v",tickCount:5,tickInterval:.2},i),animation:!1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.geometry=void 0;var i=n(0),r=n(13),o=n(19),a=n(2),s=n(147),c=n(90);function l(t){var e=t.chart,n=t.options,r=n.percent,l=n.progressStyle,u=n.color,h=n.barWidthRatio;e.data((0,c.getProgressData)(r));var f=(0,a.deepAssign)({},t,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:h,interval:{style:l,color:(0,i.isString)(u)?[u,s.DEFAULT_COLOR[1]]:u},args:{zIndexReversed:!0,sortZIndex:!0}}});return(0,o.interval)(f),e.tooltip(!1),e.axis(!1),e.legend(!1),t}function u(t){return t.chart.coordinate("rect").transpose(),t}e.geometry=l,e.adaptor=function(t){return(0,a.flow)(l,(0,r.scale)({}),u,r.animation,r.theme,(0,r.annotation)())(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getProgressData=void 0;var i=n(0),r=n(84);e.getProgressData=function(t){var e=(0,i.clamp)((0,r.isRealNumber)(t)?t:0,0,1);return[{current:"".concat(e),type:"current",percent:e},{current:"".concat(e),type:"target",percent:1}]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.DEFAULT_TOOLTIP_OPTIONS=e.TREND_DOWN=e.TREND_UP=e.TREND_FIELD=e.Y_FIELD=void 0;var i=n(8),r=n(2);e.Y_FIELD="$$stock-range$$",e.TREND_FIELD="trend",e.TREND_UP="up",e.TREND_DOWN="down",e.DEFAULT_TOOLTIP_OPTIONS={showMarkers:!1,showCrosshairs:!0,shared:!0,crosshairs:{type:"xy",follow:!0,text:function(t,e,n){var i;if("x"===t){var r=n[0];i=r?r.title:e}else i=e;return{position:"y"===t?"start":"end",content:i,style:{fill:"#dfdfdf"}}},textBackground:{padding:[2,4],style:{fill:"#666"}}}},e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{tooltip:e.DEFAULT_TOOLTIP_OPTIONS,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"})},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.OUTLIERS_VIEW_ID=e.BOX_SYNC_NAME=e.BOX_RANGE_ALIAS=e.BOX_RANGE=void 0;var r=n(8),o=n(2);e.BOX_RANGE="$$range$$",e.BOX_RANGE_ALIAS="low-q1-median-q3-high",e.BOX_SYNC_NAME="$$y_outliers$$",e.OUTLIERS_VIEW_ID="outliers_view",e.DEFAULT_OPTIONS=(0,o.deepAssign)({},r.Plot.getDefaultOptions(),{meta:(i={},i[e.BOX_RANGE]={min:0,alias:e.BOX_RANGE_ALIAS},i),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isParentNode=void 0;var i=n(10),r=n(0),o=n(69);function a(t){var e=(0,r.get)(t,["event","data","data"],{});return(0,r.isArray)(e.children)&&e.children.length>0}function s(t){var e=t.view.getCoordinate(),n=e.innerRadius;if(n){var i=t.event,r=i.x,o=i.y,a=e.center,s=a.x,c=a.y,l=e.getRadius()*n;return Math.sqrt(Math.pow(s-r,2)+Math.pow(c-o,2))=0;)e+=n[i].value;else e=1;t.value=e}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;M(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}var d=p().mark(g);function g(){var t,e,n,i,r,o;return p().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=[t=this];case 1:e=n.reverse(),n=[];case 2:if(!(t=e.pop())){a.next=8;break}return a.next=5,t;case 5:if(i=t.children)for(r=0,o=i.length;r=0;--o)c.push(i=r[o]=new O(r[o])),i.parent=n,i.depth=n.depth+1;return s.eachBefore(_)}function m(t){return t.children}function b(t){return Array.isArray(t)?t[1]:null}function x(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function _(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function O(t){this.data=t,this.depth=this.height=0,this.parent=null}function w(t){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}O.prototype=v.prototype=function(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==y(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==y(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===y(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({constructor:O,count:function(){return this.eachAfter(s)},each:function(t,e){var n,i=-1,r=c(this);try{for(r.s();!(n=r.n()).done;){var o=n.value;t.call(e,o,++i,this)}}catch(t){r.e(t)}finally{r.f()}return this},eachAfter:function(t,e){for(var n,i,r,o=this,a=[o],s=[],c=-1;o=a.pop();)if(s.push(o),n=o.children)for(i=0,r=n.length;i=0;--i)o.push(n[i]);return this},find:function(t,e){var n,i=-1,r=u(this);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(t.call(e,o,++i,this))return o}}catch(t){r.e(t)}finally{r.f()}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;t=n.pop(),e=i.pop();for(;t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return v(this).eachBefore(x)}},Symbol.iterator,g);var j=function(t){for(var e,n,i=0,r=(t=function(t){for(var e,n,i=t.length;i;)n=Math.random()*i--|0,e=t[i],t[i]=t[n],t[n]=e;return t}(Array.from(t))).length,o=[];i0&&n*n>i*i+r*r}function C(t,e){for(var n=0;n(a*=a)?(i=(l+a-r)/(2*l),o=Math.sqrt(Math.max(0,a/l-i*i)),n.x=t.x-i*s-o*c,n.y=t.y-i*c+o*s):(i=(l+r-a)/(2*l),o=Math.sqrt(Math.max(0,r/l-i*i)),n.x=e.x+i*s-o*c,n.y=e.y+i*c+o*s)):(n.x=e.x+n.r,n.y=e.y)}function F(t,e){var n=t.r+e.r-1e-6,i=e.x-t.x,r=e.y-t.y;return n>0&&n*n>i*i+r*r}function L(t){var e=t._,n=t.next._,i=e.r+n.r,r=(e.x*n.r+n.x*e.r)/i,o=(e.y*n.r+n.y*e.r)/i;return r*r+o*o}function k(t){this._=t,this.next=null,this.previous=null}function D(t){if(!(o=(e=t,t="object"===w(e)&&"length"in e?e:Array.from(e)).length))return 0;var e,n,i,r,o,a,s,c,l,u,h,f;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(i=t[1],n.x=-i.r,i.x=n.r,i.y=0,!(o>2))return n.r+i.r;T(i,n,r=t[2]),n=new k(n),i=new k(i),r=new k(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;t:for(c=3;c0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=R(e),n):t},n.parentId=function(t){return arguments.length?(e=R(t),n):e},n};function et(t,e){return t.parent===e.parent?1:2}function nt(t){var e=t.children;return e?e[0]:t.t}function it(t){var e=t.children;return e?e[e.length-1]:t.t}function rt(t,e,n){var i=n/(e.i-t.i);e.c-=i,e.s+=n,t.c+=i,e.z+=n,e.m+=n}function ot(t,e,n){return t.a.parent===e.parent?t.a:n}function at(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}at.prototype=Object.create(O.prototype);var st=function(){var t=et,e=1,n=1,i=null;function r(r){var c=function(t){for(var e,n,i,r,o,a=new at(t,0),s=[a];e=s.pop();)if(i=e._.children)for(e.children=new Array(o=i.length),r=o-1;r>=0;--r)s.push(n=e.children[r]=new at(i[r],r)),n.parent=e;return(a.parent=new at(null,0)).children=[a],a}(r);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),i)r.eachBefore(s);else{var l=r,u=r,h=r;r.eachBefore((function(t){t.xu.x&&(u=t),t.depth>h.depth&&(h=t)}));var f=l===u?1:t(l,u)/2,p=f-l.x,d=e/(u.x+f+p),g=n/(h.depth||1);r.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return r}function o(e){var n=e.children,i=e.parent.children,r=e.i?i[e.i-1]:null;if(n){!function(t){for(var e,n=0,i=0,r=t.children,o=r.length;--o>=0;)(e=r[o]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;r?(e.z=r.z+t(e._,r._),e.m=e.z-o):e.z=o}else r&&(e.z=r.z+t(e._,r._));e.parent.A=function(e,n,i){if(n){for(var r,o=e,a=e,s=n,c=o.parent.children[0],l=o.m,u=a.m,h=s.m,f=c.m;s=it(s),o=nt(o),s&&o;)c=nt(c),(a=it(a)).a=e,(r=s.z+h-o.z-l+t(s._,o._))>0&&(rt(ot(s,e,i),e,r),l+=r,u+=r),h+=s.m,l+=o.m,f+=c.m,u+=a.m;s&&!it(a)&&(a.t=s,a.m+=h-u),o&&!nt(c)&&(c.t=o,c.m+=l-f,i=e)}return i}(e,r,e.parent.A||i[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(t){return arguments.length?(i=!1,e=+t[0],n=+t[1],r):i?null:[e,n]},r.nodeSize=function(t){return arguments.length?(i=!0,e=+t[0],n=+t[1],r):i?[e,n]:null},r},ct=function(t,e,n,i,r){for(var o,a=t.children,s=-1,c=a.length,l=t.value&&(r-n)/t.value;++sf&&(f=s),y=u*u*g,(p=Math.max(f/y,y/h))>d){u-=s;break}d=p}v.push(a={value:u,dice:c1?e:1)},n}(lt),ft=function(){var t=ht,e=!1,n=1,i=1,r=[0],o=V,a=V,s=V,c=V,l=V;function u(t){return t.x0=t.y0=0,t.x1=n,t.y1=i,t.eachBefore(h),r=[0],e&&t.eachBefore(U),t}function h(e){var n=r[e.depth],i=e.x0+n,u=e.y0+n,h=e.x1-n,f=e.y1-n;h=n-1){var u=s[e];return u.x0=r,u.y0=o,u.x1=a,void(u.y1=c)}var h=l[e],f=i/2+h,p=e+1,d=n-1;for(;p>>1;l[g]c-o){var m=i?(r*v+a*y)/i:a;t(e,p,y,r,o,m,c),t(p,n,v,m,o,a,c)}else{var b=i?(o*v+c*y)/i:c;t(e,p,y,r,o,a,b),t(p,n,v,r,b,a,c)}}(0,c,t.value,e,n,i,r)},dt=function(t,e,n,i,r){(1&t.depth?ct:q)(t,e,n,i,r)},gt=function t(e){function n(t,n,i,r,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,c,l,u,h=-1,f=a.length,p=t.value;++h1?e:1)},n}(lt)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return r}));var i=new Map;function r(t,e){i.set(t,e)}function o(t){return i.get(t)}var a=function(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}},s=function(t){var e=t.attr(),n=e.x,i=e.y,r=e.r;return{x:n-r,y:i-r,width:2*r,height:2*r}},c=n(17);function l(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}function u(t,e){var n=t.get("startArrowShape"),i=t.get("endArrowShape");return n&&(e=l(e,n.getCanvasBBox())),i&&(e=l(e,i.getCanvasBBox())),e}var h=n(41),f=n(30),p=n(0);function d(t,e){var n=t.prePoint,i=t.currentPoint,r=t.nextPoint,o=Math.pow(i[0]-n[0],2)+Math.pow(i[1]-n[1],2),a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),s=Math.pow(n[0]-r[0],2)+Math.pow(n[1]-r[1],2),c=Math.acos((o+a-s)/(2*Math.sqrt(o)*Math.sqrt(a)));if(!c||0===Math.sin(c)||Object(p.isNumberEqual)(c,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(r[1]-i[1],r[0]-i[0])),u=Math.abs(Math.atan2(r[0]-i[0],r[1]-i[1]));return l=l>Math.PI/2?Math.PI-l:l,u=u>Math.PI/2?Math.PI-u:u,{xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(u-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0}}r("rect",a),r("image",a),r("circle",s),r("marker",s),r("polyline",(function(t){for(var e=t.attr().points,n=[],i=[],r=0;r=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,i=t.minY,r=t.maxX,a=t.maxY;if(e){var s=Object(o.c)(e,[t.minX,t.minY]),c=Object(o.c)(e,[t.maxX,t.minY]),l=Object(o.c)(e,[t.minX,t.maxY]),u=Object(o.c)(e,[t.maxX,t.maxY]);n=Math.min(s[0],c[0],l[0],u[0]),r=Math.max(s[0],c[0],l[0],u[0]),i=Math.min(s[1],c[1],l[1],u[1]),a=Math.max(s[1],c[1],l[1],u[1])}var h=this.attrs;if(h.shadowColor){var f=h.shadowBlur,p=void 0===f?0:f,d=h.shadowOffsetX,g=void 0===d?0:d,y=h.shadowOffsetY,v=void 0===y?0:y,m=n-p+g,b=r+p+g,x=i-p+v,_=a+p+v;n=Math.min(n,m),r=Math.max(r,b),i=Math.min(i,x),a=Math.max(a,_)}return{x:n,y:i,minX:n,minY:i,maxX:r,maxY:a,width:r-n,height:a-i}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),i=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(n&&n.isHit(o,a))return!0;if(i&&i.isHit(o,a))return!0}return!1},e}(r.a);e.a=a},function(t,e){},function(t,e){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.invariant=e.LEVEL=void 0;var i=n(1);!function(t){t.ERROR="error",t.WARN="warn",t.INFO="log"}(e.LEVEL||(e.LEVEL={}));var r="AntV/G2Plot";function o(t){for(var e=[],n=1;n"},key:"".concat(0===o?"top":"bottom","-statistic")},(0,a.pick)(e,["offsetX","offsetY","rotate","style","formatter"])))}}))};e.renderGaugeStatistic=function(t,e,n){var o=e.statistic;[o.title,o.content].forEach((function(e){if(e){var o=(0,r.isFunction)(e.style)?e.style(n):e.style;t.annotation().html(i.__assign({position:["50%","100%"],html:function(t,a){var l=a.getCoordinate(),u=a.views[0].getCoordinate(),h=u.getCenter(),f=u.getRadius(),p=Math.max(Math.sin(u.startAngle),Math.sin(u.endAngle))*f,d=h.y+p-l.y.start-parseFloat((0,r.get)(o,"fontSize",0)),g=l.getRadius()*l.innerRadius*2;c(t,i.__assign({width:"".concat(g,"px"),transform:"translate(-50%, ".concat(d,"px)")},s(o)));var y=a.getData();if(e.customHtml)return e.customHtml(t,a,n,y);var v=e.content;return e.formatter&&(v=e.formatter(n,y)),v?(0,r.isString)(v)?v:"".concat(v):"
"}},(0,a.pick)(e,["offsetX","offsetY","rotate","style","formatter"])))}}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCanvasPattern=void 0;var i=n(217),r=n(218),o=n(219);e.getCanvasPattern=function(t){var e,n=t.type,a=t.cfg;switch(n){case"dot":e=(0,i.createDotPattern)(a);break;case"line":e=(0,r.createLinePattern)(a);break;case"square":e=(0,o.createSquarePattern)(a)}return e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setGlobal=e.GLOBAL=void 0;var i=n(0);e.GLOBAL={locale:"en-US"},e.setGlobal=function(t){(0,i.each)(t,(function(t,n){return e.GLOBAL[n]=t}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.point=void 0;var i=n(1),r=n(2),o=n(32),a=n(28);e.point=function(t){var e=t.options,n=e.point,s=e.xField,c=e.yField,l=e.seriesField,u=e.sizeField,h=e.shapeField,f=e.tooltip,p=e.useDeferredLabel,d=(0,o.getTooltipMapping)(f,[s,c,l,u,h]),g=d.fields,y=d.formatter;return n?(0,a.geometry)((0,r.deepAssign)({},t,{options:{type:"point",colorField:l,shapeField:h,tooltipFields:g,mapping:i.__assign({tooltip:y},n),args:{useDeferredLabel:p}}})):t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.polygon=void 0;var i=n(1),r=n(2),o=n(32),a=n(28);e.polygon=function(t){var e=t.options,n=e.polygon,s=e.xField,c=e.yField,l=e.seriesField,u=e.tooltip,h=e.useDeferredLabel,f=(0,o.getTooltipMapping)(u,[s,c,l]),p=f.fields,d=f.formatter;return n?(0,a.geometry)((0,r.deepAssign)({},t,{options:{type:"polygon",colorField:l,tooltipFields:p,mapping:i.__assign({tooltip:d},n),args:{useDeferredLabel:h}}})):t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,n=null;return function(){for(var i=this,r=arguments.length,o=new Array(r),a=0;a
',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(t,e){var n=(0,r.get)(e,[0,"data",l.PERCENT],0);return"".concat((100*n).toFixed(2),"%")}},n)):e.tooltip(!1),t}function g(t){return t.chart.legend(!1),t}e.statistic=p,e.adaptor=function(t){return(0,c.flow)(o.theme,o.animation,h,f,d,p,o.interaction,(0,o.annotation)(),g)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRangeData=e.getIndicatorData=e.processRangeData=void 0;var i=n(0),r=n(88);function o(t,e){return t.map((function(n,i){var o;return(o={})[r.RANGE_VALUE]=n-(t[i-1]||0),o[r.RANGE_TYPE]="".concat(i),o[r.PERCENT]=e,o}))}e.processRangeData=o,e.getIndicatorData=function(t){var e;return[(e={},e[r.PERCENT]=(0,i.clamp)(t,0,1),e)]},e.getRangeData=function(t,e){var n=(0,i.get)(e,["ticks"],[]),r=(0,i.size)(n)?(0,i.uniq)(n):[0,(0,i.clamp)(t,0,1),1];return r[0]||r.shift(),o(r,t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Histogram=void 0;var i=n(1),r=n(8),o=n(136),a=n(137),s=n(138),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e}return i.__extends(e,t),e.getDefaultOptions=function(){return s.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.options,n=e.binField,i=e.binNumber,r=e.binWidth,a=e.stackField;this.chart.changeData((0,o.binHistogram)(t,n,r,i,a))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return a.adaptor},e}(r.Plot);e.Histogram=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.binHistogram=void 0;var i=n(0);function r(t,e,n){if(1===n)return[0,e];var i=Math.floor(t/e);return[e*i,e*(i+1)]}e.binHistogram=function(t,e,n,o,a){var s=(0,i.clone)(t);(0,i.sortBy)(s,e);var c=(0,i.valuesOfKey)(s,e),l=(0,i.getRange)(c),u=l.max-l.min,h=n;if(!n&&o&&(h=o>1?u/(o-1):l.max),!n&&!o){var f=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}(c);h=u/f}var p={},d=(0,i.groupBy)(s,a);(0,i.isEmpty)(d)?(0,i.each)(s,(function(t){var n=r(t[e],h,o),a="".concat(n[0],"-").concat(n[1]);(0,i.hasKey)(p,a)||(p[a]={range:n,count:0}),p[a].count+=1})):Object.keys(d).forEach((function(t){(0,i.each)(d[t],(function(n){var s=r(n[e],h,o),c="".concat(s[0],"-").concat(s[1]),l="".concat(c,"-").concat(t);(0,i.hasKey)(p,l)||(p[l]={range:s,count:0},p[l][a]=t),p[l].count+=1}))}));var g=[];return(0,i.each)(p,(function(t){g.push(t)})),g}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=void 0;var i=n(1),r=n(13),o=n(19),a=n(46),s=n(2),c=n(136),l=n(138);function u(t){var e=t.chart,n=t.options,i=n.data,r=n.binField,a=n.binNumber,u=n.binWidth,h=n.color,f=n.stackField,p=n.legend,d=n.columnStyle,g=(0,c.binHistogram)(i,r,u,a,f);e.data(g);var y=(0,s.deepAssign)({},t,{options:{xField:l.HISTOGRAM_X_FIELD,yField:l.HISTOGRAM_Y_FIELD,seriesField:f,isStack:!0,interval:{color:h,style:d}}});return(0,o.interval)(y),p&&f?e.legend(f,p):e.legend(!1),t}function h(t){var e,n=t.options,i=n.xAxis,o=n.yAxis;return(0,s.flow)((0,r.scale)(((e={})[l.HISTOGRAM_X_FIELD]=i,e[l.HISTOGRAM_Y_FIELD]=o,e)))(t)}function f(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis;return!1===i?e.axis(l.HISTOGRAM_X_FIELD,!1):e.axis(l.HISTOGRAM_X_FIELD,i),!1===r?e.axis(l.HISTOGRAM_Y_FIELD,!1):e.axis(l.HISTOGRAM_Y_FIELD,r),t}function p(t){var e=t.chart,n=t.options.label,r=(0,s.findGeometry)(e,"interval");if(n){var o=n.callback,a=i.__rest(n,["callback"]);r.label({fields:[l.HISTOGRAM_Y_FIELD],callback:o,cfg:(0,s.transformLabel)(a)})}else r.label(!1);return t}e.adaptor=function(t){return(0,s.flow)(r.theme,(0,a.pattern)("columnStyle"),u,h,f,r.state,p,r.tooltip,r.interaction,r.animation)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.HISTOGRAM_Y_FIELD=e.HISTOGRAM_X_FIELD=void 0;var i=n(8),r=n(2);e.HISTOGRAM_X_FIELD="range",e.HISTOGRAM_Y_FIELD="count",e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;var i=n(1),r=n(8),o=n(86),a=n(247);n(248);var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.chart,n=this.options;(0,o.meta)({chart:e,options:n}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e}(r.Plot);e.Line=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pie=void 0;var i=n(1),r=n(10),o=n(8),a=n(2),s=n(141),c=n(142);n(143);var l=n(145),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return i.__extends(e,t),e.getDefaultOptions=function(){return c.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.chart.emit(r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null));var e=this.options,n=this.options.angleField,i=(0,a.processIllegalData)(e.data,n),o=(0,a.processIllegalData)(t,n);(0,l.isAllZero)(i,n)||(0,l.isAllZero)(o,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),(0,s.pieAnnotation)({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return s.adaptor},e}(o.Plot);e.Pie=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.interaction=e.pieAnnotation=e.transformStatisticOptions=void 0;var i=n(1),r=n(0),o=n(13),a=n(19),s=n(28),c=n(46),l=n(66),u=n(2),h=n(142),f=n(143),p=n(145);function d(t){var e=t.chart,n=t.options,r=n.data,o=n.angleField,s=n.colorField,c=n.color,l=n.pieStyle,h=n.shape,f=(0,u.processIllegalData)(r,o);if((0,p.isAllZero)(f,o)){f=f.map((function(t){var e;return i.__assign(i.__assign({},t),((e={}).$$percentage$$=1/f.length,e))})),e.data(f);var d=(0,u.deepAssign)({},t,{options:{xField:"1",yField:"$$percentage$$",seriesField:s,isStack:!0,interval:{color:c,shape:h,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}});(0,a.interval)(d)}else{e.data(f);d=(0,u.deepAssign)({},t,{options:{xField:"1",yField:o,seriesField:s,isStack:!0,interval:{color:c,shape:h,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}});(0,a.interval)(d)}return t}function g(t){var e,n=t.chart,i=t.options,r=i.meta,o=i.colorField,a=(0,u.deepAssign)({},r);return n.scale(a,((e={})[o]={type:"cat"},e)),t}function y(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"theta",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}),t}function v(t){var e=t.chart,n=t.options,o=n.label,a=n.colorField,s=n.angleField,c=e.geometries[0];if(o){var l=o.callback,h=i.__rest(o,["callback"]),f=(0,u.transformLabel)(h);if(f.content){var d=f.content;f.content=function(t,n,o){var c=t[a],l=t[s],h=e.getScaleByField(s),f=null==h?void 0:h.scale(l);return(0,r.isFunction)(d)?d(i.__assign(i.__assign({},t),{percent:f}),n,o):(0,r.isString)(d)?(0,u.template)(d,{value:l,name:c,percentage:(0,r.isNumber)(f)&&!(0,r.isNil)(l)?"".concat((100*f).toFixed(2),"%"):null}):d}}var g=f.type?{inner:"",outer:"pie-outer",spider:"pie-spider"}[f.type]:"pie-outer",y=f.layout?(0,r.isArray)(f.layout)?f.layout:[f.layout]:[];f.layout=(g?[{type:g}]:[]).concat(y),c.label({fields:a?[s,a]:[s],callback:l,cfg:i.__assign(i.__assign({},f),{offset:(0,p.adaptOffset)(f.type,f.offset),type:"pie"})})}else c.label(!1);return t}function m(t){var e=t.innerRadius,n=t.statistic,i=t.angleField,o=t.colorField,a=t.meta,s=t.locale,c=(0,l.getLocale)(s);if(e&&n){var f=(0,u.deepAssign)({},h.DEFAULT_OPTIONS.statistic,n),d=f.title,g=f.content;return!1!==d&&(d=(0,u.deepAssign)({},{formatter:function(t){var e=t?t[o]:(0,r.isNil)(d.content)?c.get(["statistic","total"]):d.content;return((0,r.get)(a,[o,"formatter"])||function(t){return t})(e)}},d)),!1!==g&&(g=(0,u.deepAssign)({},{formatter:function(t,e){var n=t?t[i]:(0,p.getTotalValue)(e,i),o=(0,r.get)(a,[i,"formatter"])||function(t){return t};return t||(0,r.isNil)(g.content)?o(n):g.content}},g)),(0,u.deepAssign)({},{statistic:{title:d,content:g}},t)}return t}function b(t){var e=t.chart,n=m(t.options),i=n.innerRadius,r=n.statistic;return e.getController("annotation").clear(!0),(0,u.flow)((0,o.annotation)())(t),i&&r&&(0,u.renderStatistic)(e,{statistic:r,plotType:"pie"}),t}function x(t){var e=t.chart,n=t.options,i=n.tooltip,o=n.colorField,a=n.angleField,c=n.data;if(!1===i)e.tooltip(i);else if(e.tooltip((0,u.deepAssign)({},i,{shared:!1})),(0,p.isAllZero)(c,a)){var l=(0,r.get)(i,"fields"),h=(0,r.get)(i,"formatter");(0,r.isEmpty)((0,r.get)(i,"fields"))&&(l=[o,a],h=h||function(t){return{name:t[o],value:(0,r.toString)(t[a])}}),e.geometries[0].tooltip(l.join("*"),(0,s.getMappingFunction)(l,h))}return t}function _(t){var e=t.chart,n=m(t.options),o=n.interactions,a=n.statistic,s=n.annotations;return(0,r.each)(o,(function(t){var n,o;if(!1===t.enable)e.removeInteraction(t.type);else if("pie-statistic-active"===t.type){var c=[];(null===(n=t.cfg)||void 0===n?void 0:n.start)||(c=[{trigger:"element:mouseenter",action:"".concat(f.PIE_STATISTIC,":change"),arg:{statistic:a,annotations:s}}]),(0,r.each)(null===(o=t.cfg)||void 0===o?void 0:o.start,(function(t){c.push(i.__assign(i.__assign({},t),{arg:{statistic:a,annotations:s}}))})),e.interaction(t.type,(0,u.deepAssign)({},t.cfg,{start:c}))}else e.interaction(t.type,t.cfg||{})})),t}e.transformStatisticOptions=m,e.pieAnnotation=b,e.interaction=_,e.adaptor=function(t){return(0,u.flow)((0,c.pattern)("pieStyle"),d,g,o.theme,y,o.legend,x,v,o.state,b,_,o.animation)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(8),r=n(2);e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PIE_STATISTIC=void 0;var i=n(10),r=n(250),o=n(251);e.PIE_STATISTIC="pie-statistic",(0,i.registerAction)(e.PIE_STATISTIC,o.StatisticAction),(0,i.registerInteraction)("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),(0,i.registerAction)("pie-legend",r.PieLegendAction),(0,i.registerInteraction)("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transform=void 0;var i=n(1),r=n(10),o=[1,0,0,0,1,0,0,0,1];e.transform=function(t,e){var n=e?i.__spreadArray([],e,!0):i.__spreadArray([],o,!0);return r.Util.transform(n,t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAllZero=e.adaptOffset=e.getTotalValue=void 0;var i=n(0),r=n(2);e.getTotalValue=function(t,e){var n=null;return(0,i.each)(t,(function(t){"number"==typeof t[e]&&(n+=t[e])})),n},e.adaptOffset=function(t,e){var n;switch(t){case"inner":return n="-30%",(0,i.isString)(e)&&e.endsWith("%")?.01*parseFloat(e)>0?n:e:e<0?e:n;case"outer":return n=12,(0,i.isString)(e)&&e.endsWith("%")?.01*parseFloat(e)<0?n:e:e>0?e:n;default:return e}},e.isAllZero=function(t,e){return(0,i.every)((0,r.processIllegalData)(t,e),(function(t){return 0===t[e]}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Progress=void 0;var i=n(1),r=n(8),o=n(89),a=n(147),s=n(90),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="process",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData((0,s.getProgressData)(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e}(r.Plot);e.Progress=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=["#FAAD14","#E8EDF3"],e.DEFAULT_OPTIONS={percent:.2,color:e.DEFAULT_COLOR,animation:{}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RingProgress=void 0;var i=n(1),r=n(10),o=n(8),a=n(90),s=n(149),c=n(253),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ring-process",e}return i.__extends(e,t),e.getDefaultOptions=function(){return c.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.chart.emit(r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data((0,a.getProgressData)(t)),(0,s.statistic)({chart:this.chart,options:this.options},!0),this.chart.emit(r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return s.adaptor},e}(o.Plot);e.RingProgress=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.statistic=void 0;var i=n(1),r=n(0),o=n(13),a=n(2),s=n(89);function c(t){var e=t.chart,n=t.options,i=n.innerRadius,r=n.radius;return e.coordinate("theta",{innerRadius:i,radius:r}),t}function l(t,e){var n=t.chart,o=t.options,s=o.innerRadius,c=o.statistic,l=o.percent,u=o.meta;if(n.getController("annotation").clear(!0),s&&c){var h=(0,r.get)(u,["percent","formatter"])||function(t){return"".concat((100*t).toFixed(2),"%")},f=c.content;f&&(f=(0,a.deepAssign)({},f,{content:(0,r.isNil)(f.content)?h(l):f.content})),(0,a.renderStatistic)(n,{statistic:i.__assign(i.__assign({},c),{content:f}),plotType:"ring-progress"},{percent:l})}return e&&n.render(!0),t}e.statistic=l,e.adaptor=function(t){return(0,a.flow)(s.geometry,(0,o.scale)({}),c,l,o.animation,o.theme,(0,o.annotation)())(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scatter=void 0;var i=n(1),r=n(10),o=n(8),a=n(2),s=n(151),c=n(256);n(257);var l=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.type="scatter",o.on(r.VIEW_LIFE_CIRCLE.BEFORE_RENDER,(function(t){var e,n,a=o,c=a.options,l=a.chart;if((null===(e=t.data)||void 0===e?void 0:e.source)===r.BRUSH_FILTER_EVENTS.FILTER){var u=o.chart.filterData(o.chart.getData());(0,s.meta)({chart:l,options:i.__assign(i.__assign({},c),{data:u})})}(null===(n=t.data)||void 0===n?void 0:n.source)===r.BRUSH_FILTER_EVENTS.RESET&&(0,s.meta)({chart:l,options:c})})),o}return i.__extends(e,t),e.getDefaultOptions=function(){return c.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.updateOption((0,s.transformOptions)((0,a.deepAssign)({},this.options,{data:t})));var e=this.options,n=this.chart;(0,s.meta)({chart:n,options:e}),this.chart.changeData(t)},e.prototype.getSchemaAdaptor=function(){return s.adaptor},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(o.Plot);e.Scatter=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.tooltip=e.meta=e.transformOptions=void 0;var i=n(1),r=n(0),o=n(124),a=n(13),s=n(19),c=n(2),l=n(254);function u(t){var e=t.data,n=void 0===e?[]:e,i=t.xField,r=t.yField;if(n.length){for(var o=!0,a=!0,s=n[0],u=void 0,h=1;h=s.left?a.left:s.left;i.autoPadding=n.instance(a.top,a.right,a.bottom/2+5,h),o.autoPadding=n.instance(a.bottom/2+5,s.right,s.bottom,h)}if(!r(l)&&"top"===u){h=a.left>=s.left?a.left:s.left;i.autoPadding=n.instance(a.top,a.right,0,h),o.autoPadding=n.instance(0,s.right,a.top,h)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformData=void 0;var i=n(0),r=n(92);e.transformData=function(t,e){var n=t;if(Array.isArray(e)){var o=e[0],a=e[1],s=e[2],c=e[3],l=e[4];n=(0,i.map)(t,(function(t){return t[r.BOX_RANGE]=[t[o],t[a],t[s],t[c],t[l]],t}))}return n}},function(t,e,n){"use strict";function i(t,e,n){return t.length>1?"".concat(e,"_").concat(n):"".concat(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.transformData=void 0,e.transformData=function(t){var e=t.data,n=t.xField,r=t.measureField,o=t.rangeField,a=t.targetField,s=t.layout,c=[],l=[];e.forEach((function(t,e){var s=[t[o]].flat();s.sort((function(t,e){return t-e})),s.forEach((function(i,r){var a,l=0===r?i:s[r]-s[r-1];c.push(((a={rKey:"".concat(o,"_").concat(r)})[n]=n?t[n]:String(e),a[o]=l,a))}));var u=[t[r]].flat();u.forEach((function(o,a){var s;c.push(((s={mKey:i(u,r,a)})[n]=n?t[n]:String(e),s[r]=o,s))}));var h=[t[a]].flat();h.forEach((function(r,o){var s;c.push(((s={tKey:i(h,a,o)})[n]=n?t[n]:String(e),s[a]=r,s))})),l.push(t[o],t[r],t[a])}));var u=Math.min.apply(Math,l.flat(1/0)),h=Math.max.apply(Math,l.flat(1/0));return u=u>0?0:u,"vertical"===s&&c.reverse(),{min:u,max:h,ds:c}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.EDGE_COLOR_FIELD=e.NODE_COLOR_FIELD=e.Y_FIELD=e.X_FIELD=void 0;var i=n(0);e.X_FIELD="x",e.Y_FIELD="y",e.NODE_COLOR_FIELD="name",e.EDGE_COLOR_FIELD="source",e.DEFAULT_OPTIONS={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(t,e){return{offsetX:(t[0]+t[1])/2>.5?-4:4,content:e}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(t){return!(0,i.get)(t,[0,"data","isNode"])},formatter:function(t){var e=t.source,n=t.target,i=t.value;return{name:"".concat(e," -> ").concat(n),value:i}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.RAW_FIELDS=void 0,e.RAW_FIELDS=["x","y","r","name","value","path","depth"],e.DEFAULT_OPTIONS={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_RIGHT_YAXIS_CONFIG=e.DEFAULT_LEFT_YAXIS_CONFIG=e.DEFAULT_YAXIS_CONFIG=e.RIGHT_AXES_VIEW=e.LEFT_AXES_VIEW=void 0;var i=n(1);e.LEFT_AXES_VIEW="left-axes-view",e.RIGHT_AXES_VIEW="right-axes-view",e.DEFAULT_YAXIS_CONFIG={nice:!0,label:{autoHide:!0,autoRotate:!1}},e.DEFAULT_LEFT_YAXIS_CONFIG=i.__assign(i.__assign({},e.DEFAULT_YAXIS_CONFIG),{position:"left"}),e.DEFAULT_RIGHT_YAXIS_CONFIG=i.__assign(i.__assign({},e.DEFAULT_YAXIS_CONFIG),{position:"right",grid:null})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DualAxesGeometry=e.AxisType=void 0,function(t){t.Left="Left",t.Right="Right"}(e.AxisType||(e.AxisType={})),function(t){t.Line="line",t.Column="column"}(e.DualAxesGeometry||(e.DualAxesGeometry={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLiquidData=void 0;e.getLiquidData=function(t){return[{percent:t,type:"liquid"}]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addWaterWave=void 0;var i=n(1),r=n(10),o=n(0),a=n(144);function s(t,e,n){return t+(e-t)*n}function c(t,e,n,i){return 0===e?[[t+.5*n/Math.PI/2,i/2],[t+.5*n/Math.PI,i],[t+n/4,i]]:1===e?[[t+.5*n/Math.PI/2*(Math.PI-2),i],[t+.5*n/Math.PI/2*(Math.PI-1),i/2],[t+n/4,0]]:2===e?[[t+.5*n/Math.PI/2,-i/2],[t+.5*n/Math.PI,-i],[t+n/4,-i]]:[[t+.5*n/Math.PI/2*(Math.PI-2),-i],[t+.5*n/Math.PI/2*(Math.PI-1),-i/2],[t+n/4,0]]}function l(t,e,n,i,r,o,a){for(var s=4*Math.ceil(2*t/n*4),l=[],u=i;u<2*-Math.PI;)u+=2*Math.PI;for(;u>0;)u-=2*Math.PI;var h=o-t+(u=u/Math.PI/2*n)-2*t;l.push(["M",h,e]);for(var f=0,p=0;p0){var E=e.addGroup({name:"waves"}),I=E.setClip({type:"path",attrs:{path:C}});u(_.x,_.y,1-t.points[1].y,m,S,E,I,2*j,b,p)}return e.addShape("path",{name:"distance",attrs:{path:C,fill:"transparent",lineWidth:y+2*v,stroke:"transparent"===f?"#fff":f}}),e.addShape("path",{name:"wrap",attrs:(0,o.mix)(M,{path:C,fill:"transparent",lineWidth:y})}),e}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformToViewsData=e.getNodePaddingRatio=e.getNodeWidthRatio=void 0;var i=n(1),r=n(2),o=n(64),a=n(308),s=n(309);function c(t,e,n){return(0,r.isRealNumber)(t)?t/n:e}function l(t,e,n){return(0,r.isRealNumber)(t)?t/n:e}e.getNodeWidthRatio=c,e.getNodePaddingRatio=l,e.transformToViewsData=function(t,e,n){var u,h=t.dataType,f=t.data,p=t.sourceField,d=t.targetField,g=t.weightField,y=t.nodeAlign,v=t.nodeSort,m=t.nodePadding,b=t.nodePaddingRatio,x=t.nodeWidth,_=t.nodeWidthRatio,O=t.nodeDepth,w=t.rawFields,j=void 0===w?[]:w;u=function(t){return"node-link"===t}(h)?f:(0,o.transformDataToNodeLinkData)((0,a.cutoffCircle)(f,p,d),p,d,g,j);var S=(0,s.sankeyLayout)({nodeAlign:y,nodePadding:l(m,b,n),nodeWidth:c(x,_,e),nodeSort:v,nodeDepth:O},u),M=S.nodes,A=S.links;return{nodes:M.map((function(t){return i.__assign(i.__assign({},(0,r.pick)(t,i.__spreadArray(["x","y","name"],j,!0))),{isNode:!0})})),edges:A.map((function(t){return i.__assign(i.__assign({source:t.source.name,target:t.target.name,name:t.source.name||t.target.name},(0,r.pick)(t,i.__spreadArray(["x","y","value"],j,!0))),{isNode:!1})}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.center=e.justify=e.right=e.left=void 0;var i=n(0);function r(t){return t.target.depth}e.left=function(t){return t.depth},e.right=function(t,e){return e-1-t.height},e.justify=function(t,e){return t.sourceLinks.length?t.depth:e-1},e.center=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?(0,i.minBy)(t.sourceLinks,r)-1:0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.treemap=e.getTileMethod=void 0;var i=n(1),r=n(0),o=i.__importStar(n(99)),a=n(58),s={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(t,e){return e.value-t.value},ratio:.5*(1+Math.sqrt(5))};function c(t,e){return"treemapSquarify"===t?o[t].ratio(e):o[t]}e.getTileMethod=c,e.treemap=function(t,e){var n,i=(e=(0,r.assign)({},s,e)).as;if(!(0,r.isArray)(i)||2!==i.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=(0,a.getField)(e)}catch(t){console.warn(t)}var l=c(e.tile,e.ratio),u=function(t){return o.treemap().tile(l).size(e.size).round(e.round).padding(e.padding).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(o.hierarchy(t).sum((function(t){return e.ignoreParentValue&&t.children?0:t[n]})).sort(e.sort))}(t),h=i[0],f=i[1];return u.each((function(t){t[h]=[t.x0,t.x1,t.x1,t.x0],t[f]=[t.y1,t.y1,t.y0,t.y0],["x0","x1","y0","y1"].forEach((function(e){-1===i.indexOf(e)&&delete t[e]}))})),(0,a.getAllNodes)(u)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformData=e.resetDrillDown=e.enableDrillInteraction=e.enableInteraction=e.findInteraction=void 0;var i=n(1),r=n(0),o=n(69),a=n(173);function s(t,e){if((0,r.isArray)(t))return t.find((function(t){return t.type===e}))}function c(t,e){var n=s(t,e);return n&&!1!==n.enable}e.findInteraction=s,e.enableInteraction=c,e.enableDrillInteraction=function(t){var e=t.interactions,n=t.drilldown;return(0,r.get)(n,"enabled")||c(e,"treemap-drill-down")},e.resetDrillDown=function(t){var e=t.interactions["drill-down"];e&&e.context.actions.find((function(t){return"drill-down-action"===t.name})).reset()},e.transformData=function(t){var e=t.data,n=t.colorField,s=t.enableDrillDown,c=t.hierarchyConfig,l=(0,a.treemap)(e,i.__assign(i.__assign({},c),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),u=[];return l.forEach((function(t){if(0===t.depth)return null;if(s&&1!==t.depth)return null;if(!s&&t.children)return null;var a=t.ancestors().map((function(t){return{data:t.data,height:t.height,value:t.value}})),l=s&&(0,r.isArray)(e.path)?a.concat(e.path.slice(1)):a,h=Object.assign({},t.data,i.__assign({x:t.x,y:t.y,depth:t.depth,value:t.value,path:l},t));if(!t.data[n]&&t.parent){var f=t.ancestors().find((function(t){return t.data[n]}));h[n]=null==f?void 0:f.data[n]}else h[n]=t.data[n];h[o.HIERARCHY_DATA_TRANSFORM_PARAMS]={hierarchyConfig:c,colorField:n,enableDrillDown:s},u.push(h)})),u}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);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}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){var i,r,o,a;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(t){"use strict";function e(t){for(var e=new Array(t),n=0;nl+s*a*u||h>=g)d=a;else{if(Math.abs(p)<=-c*u)return a;p*(d-f)>=0&&(d=f),f=a,g=h}return 0}a=a||1,s=s||1e-6,c=c||.1;for(var y=0;y<10;++y){if(o(r.x,1,i.x,a,e),h=r.fx=t(r.x,r.fxprime),p=n(r.fxprime,e),h>l+s*a*u||y&&h>=f)return g(d,a,f);if(Math.abs(p)<=-c*u)return a;if(p>=0)return g(a,d,h);f=h,d=a,a*=2}return a}t.bisect=function(t,e,n,i){var r=(i=i||{}).maxIterations||100,o=i.tolerance||1e-10,a=t(e),s=t(n),c=n-e;if(a*s>0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===s)return n;for(var l=0;l=0&&(e=u),Math.abs(c)=g[d-1].fx){var C=!1;if(_.fx>A.fx?(o(O,1+f,x,-f,A),O.fx=t(O),O.fx=1)break;for(y=1;ye[n].radius+1e-10)return!1;return!0}function r(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function o(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function a(t,e){var n=o(t,e),i=t.radius,r=e.radius;if(n>=i+r||n<=Math.abs(i-r))return[];var a=(i*i-r*r+n*n)/(2*n),s=Math.sqrt(i*i-a*a),c=t.x+a*(e.x-t.x)/n,l=t.y+a*(e.y-t.y)/n,u=-(e.y-t.y)*(s/n),h=-(e.x-t.x)*(s/n);return[{x:c+u,y:l-h},{x:c-u,y:l+h}]}function s(t){for(var e={x:0,y:0},n=0;n1){var p=s(l);for(n=0;n-1){var x=t[y.parentIndex[b]],_=Math.atan2(y.x-x.x,y.y-x.y),O=Math.atan2(g.x-x.x,g.y-x.y),w=O-_;w<0&&(w+=2*Math.PI);var j=O-w/2,S=o(v,{x:x.x+x.radius*Math.sin(j),y:x.y+x.radius*Math.cos(j)});S>2*x.radius&&(S=2*x.radius),(null===m||m.width>S)&&(m={circle:x,width:S,p1:y,p2:g})}null!==m&&(f.push(m),u+=r(m.circle.radius,m.width),g=y)}}else{var M=t[0];for(n=1;nMath.abs(M.radius-t[n].radius)){A=!0;break}A?u=h=0:(u=M.radius*M.radius*Math.PI,f.push({circle:M,p1:{x:M.x,y:M.y+M.radius},p2:{x:M.x-1e-10,y:M.y+M.radius},width:2*M.radius}))}return h/=2,e&&(e.area=u+h,e.arcArea=u,e.polygonArea=h,e.arcs=f,e.innerPoints=l,e.intersectionPoints=c),u+h},e.containedInCircles=i,e.circleArea=r,e.distance=o,e.circleOverlap=function(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);var i=e-(n*n-t*t+e*e)/(2*n);return r(t,t-(n*n-e*e+t*t)/(2*n))+r(e,i)},e.circleCircleIntersection=a,e.getCenter=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.MEDIAN_VIEW_ID=e.QUANTILE_VIEW_ID=e.MIN_MAX_VIEW_ID=e.VIOLIN_VIEW_ID=e.MEDIAN_FIELD=e.QUANTILE_FIELD=e.MIN_MAX_FIELD=e.VIOLIN_SIZE_FIELD=e.VIOLIN_Y_FIELD=e.X_FIELD=void 0;var i=n(8),r=n(2);e.X_FIELD="x",e.VIOLIN_Y_FIELD="violinY",e.VIOLIN_SIZE_FIELD="violinSize",e.MIN_MAX_FIELD="minMax",e.QUANTILE_FIELD="quantile",e.MEDIAN_FIELD="median",e.VIOLIN_VIEW_ID="violin_view",e.MIN_MAX_VIEW_ID="min_max_view",e.QUANTILE_VIEW_ID="quantile_view",e.MEDIAN_VIEW_ID="median_view",e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{syncViewPadding:!0,kde:{type:"triangular",sampleSize:32,width:3},violinStyle:{lineWidth:1,fillOpacity:.3,strokeOpacity:.75},xAxis:{grid:{line:null},tickLine:{alignTick:!1}},yAxis:{grid:{line:{style:{lineWidth:.5,lineDash:[4,4]}}}},legend:{position:"top-left"},tooltip:{showMarkers:!1}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformViolinData=e.toViolinValue=e.toBoxValue=void 0;var i=n(1),r=n(0),o=i.__importDefault(n(340)),a=n(342);e.toBoxValue=function(t){return{low:(0,r.min)(t),high:(0,r.max)(t),q1:(0,a.quantile)(t,.25),q3:(0,a.quantile)(t,.75),median:(0,a.quantile)(t,[.5]),minMax:[(0,r.min)(t),(0,r.max)(t)],quantile:[(0,a.quantile)(t,.25),(0,a.quantile)(t,.75)]}};e.toViolinValue=function(t,e){var n=o.default.create(t,e);return{violinSize:n.map((function(t){return t.y})),violinY:n.map((function(t){return t.x}))}};e.transformViolinData=function(t){var n=t.xField,o=t.yField,a=t.seriesField,s=t.data,c=t.kde,l={min:c.min,max:c.max,size:c.sampleSize,width:c.width};if(!a){var u=(0,r.groupBy)(s,n);return Object.keys(u).map((function(t){var n=u[t].map((function(t){return t[o]}));return i.__assign(i.__assign({x:t},(0,e.toViolinValue)(n,l)),(0,e.toBoxValue)(n))}))}var h=[],f=(0,r.groupBy)(s,a);return Object.keys(f).forEach((function(t){var s=(0,r.groupBy)(f[t],n);return Object.keys(s).forEach((function(n){var r,c=s[n].map((function(t){return t[o]}));h.push(i.__assign(i.__assign(((r={x:n})[a]=t,r),(0,e.toViolinValue)(c,l)),(0,e.toBoxValue)(c)))}))})),h}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformData=e.processData=void 0;var i=n(1),r=n(0),o=n(2),a=n(98);function s(t,e,n,a,s){var c,l=[];if((0,r.reduce)(t,(function(t,e){var s;(0,o.log)(o.LEVEL.WARN,(0,r.isNumber)(e[n]),"".concat(e[n]," is not a valid number"));var c=(0,r.isUndefined)(e[n])?null:e[n];return l.push(i.__assign(i.__assign({},e),((s={})[a]=[t,t+c],s))),t+c}),0),l.length&&s){var u=(0,r.get)(l,[[t.length-1],a,[1]]);l.push(((c={})[e]=s.label,c[n]=u,c[a]=[0,u],c))}return l}e.processData=s,e.transformData=function(t,e,n,o){return s(t,e,n,a.Y_FIELD,o).map((function(e,n){var o;return(0,r.isObject)(e)?i.__assign(i.__assign({},e),((o={})[a.ABSOLUTE_FIELD]=e[a.Y_FIELD][1],o[a.DIFF_FIELD]=e[a.Y_FIELD][1]-e[a.Y_FIELD][0],o[a.IS_TOTAL]=n===t.length,o)):e}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.WORD_CLOUD_COLOR_FIELD=void 0;var i=n(8),r=n(2);e.WORD_CLOUD_COLOR_FIELD="color",e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",e.WORD_CLOUD_COLOR_FIELD],formatter:function(t){return{name:t.text,value:t.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingleKeyValues=e.getFontSizeMapping=e.processImageMask=e.getSize=e.transform=void 0;var i=n(1),r=n(0),o=n(2),a=n(45),s=n(348);function c(t){var e=t.width,n=t.height,i=t.container,r=t.autoFit,s=t.padding,c=t.appendPadding;if(r){var l=(0,o.getContainerSize)(i);e=l.width,n=l.height}e=e||400,n=n||400;var u=function(t){var e=(0,a.normalPadding)(t.padding),n=(0,a.normalPadding)(t.appendPadding),i=e[0]+n[0],r=e[1]+n[1],o=e[2]+n[2],s=e[3]+n[3];return[i,r,o,s]}({padding:s,appendPadding:c}),h=u[0],f=u[1],p=u[2];return[e-(u[3]+f),n-(h+p)]}function l(t,e){if((0,r.isFunction)(t))return t;if((0,r.isArray)(t)){var n=t[0],i=t[1];if(!e)return function(){return(i+n)/2};var o=e[0],a=e[1];return a===o?function(){return(i+n)/2}:function(t){var e=t.value;return(i-n)/(a-o)*(e-o)+n}}return function(){return t}}function u(t,e){return t.map((function(t){return t[e]})).filter((function(t){return"number"==typeof t&&!isNaN(t)}))}function h(t){var e=function(t){var e=t.wordStyle.rotationSteps;e<1&&((0,o.log)(o.LEVEL.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),e=1);return{rotation:t.wordStyle.rotation,rotationSteps:e}}(t),n=e.rotation,i=e.rotationSteps;if(!(0,r.isArray)(n))return n;var a=n[0],s=n[1],c=1===i?0:(s-a)/(i-1);return function(){return s===a?s:Math.floor(Math.random()*i)*c}}function f(t){return Math.max.apply(Math,t)}e.transform=function(t){var e=t.options,n=t.chart,o=n,a=o.width,p=o.height,d=o.padding,g=o.appendPadding,y=o.ele,v=e.data,m=e.imageMask,b=e.wordField,x=e.weightField,_=e.colorField,O=e.wordStyle,w=e.timeInterval,j=e.random,S=e.spiral,M=e.autoFit,A=void 0===M||M,C=e.placementStrategy;if(!v||!v.length)return[];var E,I=O.fontFamily,P=O.fontWeight,T=O.padding,F=O.fontSize,L=u(v,x),k=[(E=L,Math.min.apply(Math,E)),f(L)],D=v.map((function(t){return{text:t[b],value:t[x],color:t[_],datum:t}})),B={imageMask:m,font:I,fontSize:l(F,k),fontWeight:P,size:c({width:a,height:p,padding:d,appendPadding:g,autoFit:A,container:y}),padding:T,timeInterval:w,random:j,spiral:S,rotate:h(e)};if((0,r.isFunction)(C)){var N=D.map((function(t,e,r){return i.__assign(i.__assign(i.__assign({},t),{hasText:!!t.text,font:(0,s.functor)(B.font)(t,e,r),weight:(0,s.functor)(B.fontWeight)(t,e,r),rotate:(0,s.functor)(B.rotate)(t,e,r),size:(0,s.functor)(B.fontSize)(t,e,r),style:"normal"}),C.call(n,t,e,r))}));return N.push({text:"",value:0,x:0,y:0,opacity:0}),N.push({text:"",value:0,x:B.size[0],y:B.size[1],opacity:0}),N}return(0,s.wordCloud)(D,B)},e.getSize=c,e.processImageMask=function(t){return new Promise((function(e,n){if(t instanceof HTMLImageElement)e(t);else{if((0,r.isString)(t)){var i=new Image;return i.crossOrigin="anonymous",i.src=t,i.onload=function(){e(i)},void(i.onerror=function(){(0,o.log)(o.LEVEL.ERROR,!1,"image %s load failed !!!",t),n()})}(0,o.log)(o.LEVEL.WARN,void 0===t,"The type of imageMask option must be String or HTMLImageElement."),n()}}))},e.getFontSizeMapping=l,e.getSingleKeyValues=u},function(t,e,n){"use strict";var i=n(1),r=n(79),o=n(77),a=n(16),s=n(0);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l,u,h=0,f=0,p=0,d=0,g=0,y=0,v="object"===("undefined"==typeof performance?"undefined":c(performance))&&performance.now?performance:Date,m="object"===("undefined"==typeof window?"undefined":c(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function b(){return g||(m(x),g=v.now()+y)}function x(){g=0}function _(){this._call=this._time=this._next=null}function O(t,e,n){var i=new _;return i.restart(t,e,n),i}function w(){g=(d=v.now())+y,h=f=0;try{!function(){b(),++h;for(var t,e=l;e;)(t=g-e._time)>=0&&e._call.call(null,t),e=e._next;--h}()}finally{h=0,function(){var t,e,n=l,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:l=e);u=t,S(i)}(),g=0}}function j(){var t=v.now(),e=t-d;e>1e3&&(y-=e,d=t)}function S(t){h||(f&&(f=clearTimeout(f)),t-g>24?(t<1/0&&(f=setTimeout(w,t-v.now()-y)),p&&(p=clearInterval(p))):(p||(d=v.now(),p=setInterval(j,1e3)),h=1,m(w)))}_.prototype=O.prototype={constructor:_,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?b():+n)+(null==e?0:+e),this._next||u===this||(u?u._next=this:l=this,u=this),this._call=t,this._time=n,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};var M=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function A(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function C(){}var E="\\s*([+-]?\\d+)\\s*",I="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",P="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",T=/^#([0-9a-f]{3,8})$/,F=new RegExp("^rgb\\(".concat(E,",").concat(E,",").concat(E,"\\)$")),L=new RegExp("^rgb\\(".concat(P,",").concat(P,",").concat(P,"\\)$")),k=new RegExp("^rgba\\(".concat(E,",").concat(E,",").concat(E,",").concat(I,"\\)$")),D=new RegExp("^rgba\\(".concat(P,",").concat(P,",").concat(P,",").concat(I,"\\)$")),B=new RegExp("^hsl\\(".concat(I,",").concat(P,",").concat(P,"\\)$")),N=new RegExp("^hsla\\(".concat(I,",").concat(P,",").concat(P,",").concat(I,"\\)$")),R={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function V(){return this.rgb().formatHex()}function z(){return this.rgb().formatRgb()}function G(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=T.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Y(e):3===n?new U(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?W(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?W(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=F.exec(t))?new U(e[1],e[2],e[3],1):(e=L.exec(t))?new U(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=k.exec(t))?W(e[1],e[2],e[3],e[4]):(e=D.exec(t))?W(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=B.exec(t))?J(e[1],e[2]/100,e[3]/100,1):(e=N.exec(t))?J(e[1],e[2]/100,e[3]/100,e[4]):R.hasOwnProperty(t)?Y(R[t]):"transparent"===t?new U(NaN,NaN,NaN,0):null}function Y(t){return new U(t>>16&255,t>>8&255,255&t,1)}function W(t,e,n,i){return i<=0&&(t=e=n=NaN),new U(t,e,n,i)}function X(t){return t instanceof C||(t=G(t)),t?new U((t=t.rgb()).r,t.g,t.b,t.opacity):new U}function H(t,e,n,i){return 1===arguments.length?X(t):new U(t,e,n,null==i?1:i)}function U(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function q(){return"#".concat(Q(this.r)).concat(Q(this.g)).concat(Q(this.b))}function Z(){var t=$(this.opacity);return"".concat(1===t?"rgb(":"rgba(").concat(K(this.r),", ").concat(K(this.g),", ").concat(K(this.b)).concat(1===t?")":", ".concat(t,")"))}function $(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function K(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Q(t){return((t=K(t))<16?"0":"")+t.toString(16)}function J(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new et(t,e,n,i)}function tt(t){if(t instanceof et)return new et(t.h,t.s,t.l,t.opacity);if(t instanceof C||(t=G(t)),!t)return new et;if(t instanceof et)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,c=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n0&&c<1?0:a,new et(a,s,c,t.opacity)}function et(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function nt(t){return(t=(t||0)%360)<0?t+360:t}function it(t){return Math.max(0,Math.min(1,t||0))}function rt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ot(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}M(C,G,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:V,formatHex:V,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return tt(this).formatHsl()},formatRgb:z,toString:z}),M(U,H,A(C,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new U(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new U(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new U(K(this.r),K(this.g),K(this.b),$(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:q,formatHex:q,formatHex8:function(){return"#".concat(Q(this.r)).concat(Q(this.g)).concat(Q(this.b)).concat(Q(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:Z,toString:Z})),M(et,(function(t,e,n,i){return 1===arguments.length?tt(t):new et(t,e,n,null==i?1:i)}),A(C,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new et(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new et(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new U(rt(t>=240?t-240:t+120,r,i),rt(t,r,i),rt(t<120?t+240:t-120,r,i),this.opacity)},clamp:function(){return new et(nt(this.h),it(this.s),it(this.l),$(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=$(this.opacity);return"".concat(1===t?"hsl(":"hsla(").concat(nt(this.h),", ").concat(100*it(this.s),"%, ").concat(100*it(this.l),"%").concat(1===t?")":", ".concat(t,")"))}}));var at=function(t){return function(){return t}};function st(t,e){return function(n){return t+n*e}}function ct(t){return 1==(t=+t)?lt:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):at(isNaN(e)?n:e)}}function lt(t,e){var n=e-t;return n?st(t,n):at(isNaN(t)?e:t)}var ut=function t(e){var n=ct(e);function i(t,e){var i=n((t=H(t)).r,(e=H(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=lt(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function ht(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=io&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:yt(n,i)})),o=xt.lastIndex;return op.length?(f=St.parsePathString(o[h]),p=St.parsePathString(r[h]),p=St.fillPathByDiff(p,f),p=St.formatPath(p,f),e.fromAttrs.path=p,e.toAttrs.path=f):e.pathFormatted||(f=St.parsePathString(o[h]),p=St.parsePathString(r[h]),p=St.formatPath(p,f),e.fromAttrs.path=p,e.toAttrs.path=f,e.pathFormatted=!0),i[h]=[];for(var d=0;d0){for(var o=i.animators.length-1;o>=0;o--)if((t=i.animators[o]).destroyed)i.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],At(t,n,r)&&(e.splice(a,1),!1,n.callback&&n.callback());0===e.length&&i.removeAnimator(o)}i.canvas.get("autoDraw")||i.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Et=n(71),It=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function Pt(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function Tt(t,e,n){if(n.bubbles){var i=void 0,r=!1;if("mouseenter"===e?(i=n.fromShape,r=!0):"mouseleave"===e&&(r=!0,i=n.toShape),t.isCanvas()&&r)return;if(i&&Object(a.g)(t,i))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var Ft=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){if(e.canvas.get("el")!==t.target&&(e.dragging||e.currentShape)){var n=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,n,e.draggingShape)}},this._onDocumentMouseUp=function(t){if(e.canvas.get("el")!==t.target&&e.dragging){var n=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,n,null),e._emitEvent("dragend",t,n,e.draggingShape),e._afterDrag(e.draggingShape,n,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");Object(a.a)(It,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");Object(a.a)(It,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,i,r,o){var a=new Et.a(t,e);return a.fromShape=r,a.toShape=o,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.propagationPath.push(i),a},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e=this.canvas,n=e.getClientByEvent(t),i=e.getPointByEvent(t);return{x:i.x,y:i.y,clientX:n.x,clientY:n.y}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),i=this._getShape(n,e),r=this["_on"+t],o=!1;if(r)r.call(this,n,i,e);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,i),i&&this._emitEvent(t,e,n,i,null,i),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,e,n,a,a,null),this._emitEvent(t,e,n,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,i,null,null)}if(o||(this.currentShape=i),i&&!i.get("destroyed")){var s=this.canvas;s.get("el").style.cursor=i.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,n){0===n.button&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,i){var r=this.canvas.get("el");n!==i&&(n&&(this._emitEvent("mouseout",t,e,n,n,i),this._emitEvent("mouseleave",t,e,n,n,i),i&&!i.get("destroyed")||(r.style.cursor=this.canvas.get("cursor"))),i&&(this._emitEvent("mouseover",t,e,i,n,i),this._emitEvent("mouseenter",t,e,i,n,i)))},t.prototype._emitDragoverEvents=function(t,e,n,i,r){i?(i!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,i),this._emitEvent("dragenter",t,e,i,n,i)),r||this._emitEvent("dragover",t,e,i)):n&&this._emitEvent("dragleave",t,e,n,n,i),r&&this._emitEvent("dragover",t,e,i)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var i=this._getShape(e,n);i!==t&&this._emitMouseoverEvents(n,e,t,i),this.currentShape=i},t.prototype._onmouseup=function(t,e,n){if(0===n.button){var i=this.draggingShape;this.dragging?(i&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,i),this._afterDrag(i,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var i=this.currentShape;this._emitDragoverEvents(n,t,i,e,!0)},t.prototype._onmousemove=function(t,e,n){var i=this.canvas,r=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(n,t,r,e,!1),this._emitEvent("drag",n,t,o);else{var a=this.mousedownPoint;if(a){var s=this.mousedownShape,c=n.timeStamp-this.mousedownTimeStamp,l=a.clientX-t.clientX,u=a.clientY-t.clientY;c>120||l*l+u*u>40?s&&s.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,r,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,i,r,o){var a=this._getEventObj(t,e,n,i,r,o);if(i){a.shape=i,Pt(i,t,a);for(var s=i.getParent();s;)s.emitDelegation(t,a),a.propagationStopped||Tt(s,t,a),a.propagationPath.push(s),s=s.getParent()}else{Pt(this.canvas,t,a)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),Lt=Object(r.a)(),kt=Lt&&"firefox"===Lt.name,Dt=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e.supportCSSTransform=!1,e},e.prototype.initContainer=function(){var t=this.get("container");Object(a.h)(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){var t=new Ft({canvas:this});t.init(),this.set("eventController",t)},e.prototype.initTimeline=function(){var t=new Ct(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");a.c&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");a.c&&e&&(e.style.cursor=t)},e.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(kt&&!Object(a.e)(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!Object(a.e)(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var e=this.getClientByEvent(t),n=e.x,i=e.y;return this.getPointByClient(n,i)},e.prototype.getClientByEvent=function(t){var e=t;return t.touches&&(e="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:e.clientX,y:e.clientY}},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){this.get("eventController").destroy()},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(o.a);e.a=Dt},function(t,e,n){"use strict";n.r(e),n.d(e,"Line",(function(){return h})),n.d(e,"Text",(function(){return f})),n.d(e,"Arc",(function(){return p})),n.d(e,"Region",(function(){return d})),n.d(e,"Image",(function(){return g})),n.d(e,"DataMarker",(function(){return y})),n.d(e,"DataRegion",(function(){return v})),n.d(e,"RegionFilter",(function(){return m})),n.d(e,"Shape",(function(){return b})),n.d(e,"Html",(function(){return _}));var i=n(1),r=n(0),o=n(14),a=n(31),s=n(22),c=n(4);function l(t,e){var n=e.x,o=e.y,l=e.content,u=e.style,h=e.id,f=e.name,p=e.rotate,d=e.maxLength,g=e.autoEllipsis,y=e.isVertical,v=e.ellipsisPosition,m=e.background,b=t.addGroup({id:h+"-group",name:f+"-group",attrs:{x:n,y:o}}),x=b.addShape({type:"text",id:h,name:f,attrs:Object(i.__assign)({x:0,y:0,text:l},u)}),_=Object(c.c)(Object(r.get)(m,"padding",0));if(d&&g){var O=d-(_[1]+_[3]);Object(a.a)(!y,x,O,v)}if(m){var w=Object(r.get)(m,"style",{}),j=x.getCanvasBBox(),S=j.minX,M=j.minY,A=j.width,C=j.height;b.addShape("rect",{id:h+"-bg",name:h+"-bg",attrs:Object(i.__assign)({x:S-_[3],y:M-_[0],width:A+_[1]+_[3],height:C+_[0]+_[2]},w)}).toBack()}Object(s.c)(b,n,o),Object(s.b)(b,p,n,o)}var u=n(5),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:u.a.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:u.a.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:u.a.lineColor,lineWidth:1}}}})},e.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},e.prototype.renderLine=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:Object(i.__assign)({x1:e.x,y1:e.y,x2:n.x,y2:n.y},r)})},e.prototype.getLabelPoint=function(t,e,n){var i;return((i="start"===n?0:"center"===n?.5:Object(r.isString)(n)&&-1!==n.indexOf("%")?parseInt(n,10)/100:Object(r.isNumber)(n)?n:1)>1||i<0)&&(i=1),{x:Object(c.g)(t.x,e.x,i),y:Object(c.g)(t.y,e.y,i)}},e.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),i=this.get("end"),r=e.position,o=e.content,a=e.style,s=e.offsetX,c=e.offsetY,u=e.autoRotate,h=e.maxLength,f=e.autoEllipsis,p=e.ellipsisPosition,d=e.background,g=e.isVertical,y=void 0!==g&&g,v=this.getLabelPoint(n,i,r),m=v.x+s,b=v.y+c,x={id:this.getElementId("line-text"),name:"annotation-line-text",x:m,y:b,content:o,style:a,maxLength:h,autoEllipsis:f,ellipsisPosition:p,background:d,isVertical:y};if(u){var _=[i.x-n.x,i.y-n.y];x.rotate=Math.atan2(_[1],_[0])}l(t,x)},e}(o.a),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:u.a.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:u.a.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){var e=this.getLocation(),n=e.x,i=e.y,r=this.get("content"),o=this.get("style");l(t,{id:this.getElementId("text"),name:this.get("name")+"-text",x:n,y:i,content:r,style:o,maxLength:this.get("maxLength"),autoEllipsis:this.get("autoEllipsis"),isVertical:this.get("isVertical"),ellipsisPosition:this.get("ellipsisPosition"),background:this.get("background"),rotate:this.get("rotate")})},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var e=this.getLocation(),n=e.x,i=e.y,r=this.get("rotate");Object(s.c)(t,n,i),Object(s.b)(t,r,n,i)}},e}(o.a),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=Object(c.e)(e,n,i),a=Object(c.e)(e,n,r),s=r-i>Math.PI?1:0,l=[["M",o.x,o.y]];if(r-i==2*Math.PI){var u=Object(c.e)(e,n,i+Math.PI);l.push(["A",n,n,0,s,1,u.x,u.y]),l.push(["A",n,n,0,s,1,a.x,a.y])}else l.push(["A",n,n,0,s,1,a.x,a.y]);return l},e.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:Object(i.__assign)({path:e},n)})},e}(o.a),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:u.a.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style"),o=Object(c.k)({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:Object(i.__assign)({x:o.x,y:o.y,width:o.width,height:o.height},r)})},e}(o.a),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),r=Object(c.k)({start:t,end:e}),o=this.get("src");return Object(i.__assign)({x:r.x,y:r.y,img:o,width:r.width,height:r.height},n)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(o.a),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:u.a.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:u.a.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:u.a.fontFamily}}}})},e.prototype.renderInner=function(t){Object(r.get)(this.get("line"),"display")&&this.renderLine(t),Object(r.get)(this.get("text"),"display")&&this.renderText(t),Object(r.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text,n=e.x,r=e.y,o=e.text,a=Object(i.__rest)(e,["x","y","text"]),s=this.get("text"),c=s.background,u=s.maxLength,h=s.autoEllipsis,f=s.isVertival,p=s.ellipsisPosition;l(t,{x:n,y:r,id:this.getElementId("text"),name:"annotation-text",content:o,style:a,background:c,maxLength:u,autoEllipsis:h,isVertival:f,ellipsisPosition:p})},e.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),i=this.get("y"),o=Object(r.get)(this.get("line"),"length",0),a=this.get("coordinateBBox"),c=t.getBBox(),l=c.minX,u=c.maxX,h=c.minY,f=c.maxY,p=t.findById(this.getElementId("text-group")),d=t.findById(this.getElementId("text")),g=t.findById(this.getElementId("line"));if(a&&p){var y=p.attr("x"),v=p.attr("y"),m=d.getCanvasBBox(),b=m.width,x=m.height,_=0,O=0;if(n+l<=a.minX)if("leftward"===e)_=1;else{var w=a.minX-(n+l);y=p.attr("x")+w}else if(n+u>=a.maxX)if("rightward"===e)_=-1;else{w=n+u-a.maxX;y=p.attr("x")-w}if(_&&(g&&g.attr("path",[["M",0,0],["L",o*_,0]]),y=(o+2+b)*_),i+h<=a.minY)if("upward"===e)O=1;else{w=a.minY-(i+h);v=p.attr("y")+w}else if(i+f>=a.maxY)if("downward"===e)O=-1;else{w=i+f-a.maxY;v=p.attr("y")-w}O&&(g&&g.attr("path",[["M",0,0],["L",0,o*O]]),v=(o+2+x)*O),y===p.attr("x")&&v===p.attr("y")||Object(s.c)(p,y,v)}},e.prototype.getShapeAttrs=function(){var t=Object(r.get)(this.get("line"),"display"),e=Object(r.get)(this.get("point"),"style",{}),n=Object(r.get)(this.get("line"),"style",{}),o=Object(r.get)(this.get("text"),"style",{}),a=this.get("direction"),s=t?Object(r.get)(this.get("line"),"length",0):0,c=0,l=0,u="top",h="start";switch(a){case"upward":l=-1,u="bottom";break;case"downward":l=1,u="top";break;case"leftward":c=-1,h="end";break;case"rightward":c=1,h="start"}return{point:Object(i.__assign)({x:0,y:0},e),line:Object(i.__assign)({path:[["M",0,0],["L",s*c,s*l]]},n),text:Object(i.__assign)({x:(s+2)*c,y:(s+2)*l,text:Object(r.get)(this.get("text"),"content",""),textBaseline:u,textAlign:h},o)}},e}(o.a),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:u.a.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:u.a.textColor,fontFamily:u.a.fontFamily}}}})},e.prototype.renderInner=function(t){var e=Object(r.get)(this.get("region"),"style",{}),n=(Object(r.get)(this.get("text"),"style",{}),this.get("lineLength")||0),o=this.get("points");if(o.length){var a=Object(c.j)(o),s=[];s.push(["M",o[0].x,a.minY-n]),o.forEach((function(t){s.push(["L",t.x,t.y])})),s.push(["L",o[o.length-1].x,o[o.length-1].y-n]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:Object(i.__assign)({path:s},e)}),l(t,Object(i.__assign)({id:this.getElementId("text"),name:"annotation-text",x:(a.minX+a.maxX)/2,y:a.minY-n},this.get("text")))}},e}(o.a),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,n=this.get("start"),i=this.get("end"),o=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});Object(r.each)(this.get("shapes"),(function(t,n){var i=t.get("type"),a=Object(r.clone)(t.attr());e.adjustShapeAttrs(a),e.addShape(o,{id:e.getElementId("shape-"+i+"-"+n),capture:!1,type:i,attrs:a})}));var a=Object(c.k)({start:n,end:i});o.setClip({type:"rect",attrs:{x:a.minX,y:a.minY,width:a.width,height:a.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e}(o.a),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"shape",draw:r.noop})},e.prototype.renderInner=function(t){var e=this.get("render");Object(r.isFunction)(e)&&e(t)},e}(o.a),x=n(12),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},e.prototype.render=function(){var t=this.getContainer(),e=this.get("html");Object(c.a)(t);var n=Object(r.isFunction)(e)?e(t):e;if(Object(r.isElement)(n))t.appendChild(n);else if(Object(r.isString)(n)||Object(r.isNumber)(n)){var i=Object(x.b)(""+n);i&&t.appendChild(i)}this.resetPosition()},e.prototype.resetPosition=function(){var t=this.getContainer(),e=this.getLocation(),n=e.x,i=e.y,r=this.get("alignX"),o=this.get("alignY"),a=this.get("offsetX"),s=this.get("offsetY"),c=Object(x.d)(t),l=Object(x.c)(t),u={x:n,y:i};"middle"===r?u.x-=Math.round(c/2):"right"===r&&(u.x-=Math.round(c)),"middle"===o?u.y-=Math.round(l/2):"bottom"===o&&(u.y-=Math.round(l)),a&&(u.x+=a),s&&(u.y+=s),Object(x.e)(t,{position:"absolute",left:u.x+"px",top:u.y+"px",zIndex:this.get("zIndex")})},e}(n(39).a)},function(t,e,n){"use strict";n.r(e),n.d(e,"Line",(function(){return D})),n.d(e,"Circle",(function(){return B})),n.d(e,"Base",(function(){return d}));var i={};n.r(i),n.d(i,"getDefault",(function(){return v})),n.d(i,"ellipsisHead",(function(){return m})),n.d(i,"ellipsisTail",(function(){return b})),n.d(i,"ellipsisMiddle",(function(){return x}));var r={};n.r(r),n.d(r,"getDefault",(function(){return M})),n.d(r,"reserveFirst",(function(){return A})),n.d(r,"reserveLast",(function(){return C})),n.d(r,"reserveBoth",(function(){return E})),n.d(r,"equidistance",(function(){return I})),n.d(r,"equidistanceWithReverseBoth",(function(){return P}));var o={};n.r(o),n.d(o,"getDefault",(function(){return F})),n.d(o,"fixedAngle",(function(){return L})),n.d(o,"unfixedAngle",(function(){return k}));var a={};n.r(a),n.d(a,"autoHide",(function(){return r})),n.d(a,"autoRotate",(function(){return o})),n.d(a,"autoEllipsis",(function(){return i}));var s=n(1),c=n(3),l=n(0),u=n(14),h=n(22),f=n(44),p=n(5),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(s.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(s.__assign)(Object(s.__assign)({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:p.a.lineColor}},tickLine:{style:{lineWidth:1,stroke:p.a.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:p.a.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:p.a.textColor,fontFamily:p.a.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:p.a.textColor,textBaseline:"middle",fontFamily:p.a.fontFamily,textAlign:"center"},iconStyle:{fill:p.a.descriptionIconFill,stroke:p.a.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:p.a.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){Object(l.mix)(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return Object(l.each)(e,(function(e,i){t[i]&&n.push(i)})),n},e.prototype.clearItemsState=function(t){var e=this,n=this.getItemsByState(t);Object(l.each)(n,(function(n){e.setItemState(n,t,!1)}))},e.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return Object(l.filter)(n,(function(n){return e.hasState(n,t)}))},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTextAnchor=function(t){var e;return Object(l.isNumberEqual)(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.getTextBaseline=function(t){var e;return Object(l.isNumberEqual)(t[1],0)?e="middle":t[1]>0?e="top":t[1]<0&&(e="bottom"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:Object(l.mix)({path:e},n.style)})},e.prototype.getTickLineItems=function(t){var e=this,n=[],i=this.get("tickLine"),r=i.alignTick,o=i.length,a=1;return t.length>=2&&(a=t[1].value-t[0].value),Object(l.each)(t,(function(t){var i=t.point;r||(i=e.getTickPoint(t.value-a/2));var s=e.getSidePoint(i,o);n.push({startPoint:i,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})})),n},e.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),i=n.count,r=t.length;if(r>=2)for(var o=0;o0){var n=Object(l.size)(e);if(n>t.threshold){var i=Math.ceil(n/t.threshold),r=e.filter((function(t,e){return e%i==0}));this.set("ticks",r),this.set("originalTicks",e)}}},e.prototype.getLabelAttrs=function(t,e,n){var i=this.get("label"),r=i.offset,o=i.offsetX,a=i.offsetY,s=i.rotate,c=i.formatter,u=this.getSidePoint(t.point,r),f=this.getSideVector(r,u),p=c?c(t.name,t,e):t.name,d=i.style;d=Object(l.isFunction)(d)?Object(l.get)(this.get("theme"),["label","style"],{}):d;var g=Object(l.mix)({x:u.x+o,y:u.y+a,text:p,textAlign:this.getTextAnchor(f),textBaseline:this.getTextBaseline(f)},d);return s&&(g.matrix=Object(h.e)(u,s)),g},e.prototype.drawLabels=function(t){var e=this,n=this.get("ticks"),i=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});Object(l.each)(n,(function(t,r){e.addShape(i,{type:"text",name:"axis-label",id:e.getElementId("label-"+t.id),attrs:e.getLabelAttrs(t,r,n),delegateObject:{tick:t,item:t,index:r}})})),this.processOverlap(i);var r=i.getChildren(),o=Object(l.get)(this.get("theme"),["label","style"],{}),a=this.get("label"),s=a.style,c=a.formatter;if(Object(l.isFunction)(s)){var u=r.map((function(t){return Object(l.get)(t.get("delegateObject"),"tick")}));Object(l.each)(r,(function(t,e){var n=t.get("delegateObject").tick,i=c?c(n.name,n,e):n.name,r=Object(l.mix)({},o,s(i,e,u));t.attr(r)}))}},e.prototype.getTitleAttrs=function(){var t=this.get("title"),e=t.style,n=t.position,i=t.offset,r=t.spacing,o=void 0===r?0:r,a=t.autoRotate,s=e.fontSize,u=.5;"start"===n?u=0:"end"===n&&(u=1);var f=this.getTickPoint(u),p=this.getSidePoint(f,i||o+s/2),d=Object(l.mix)({x:p.x,y:p.y,text:t.text},e),g=t.rotate,y=g;if(Object(l.isNil)(g)&&a){var v=this.getAxisVector(f);y=c.ext.angleTo(v,[1,0],!0)}if(y){var m=Object(h.e)(p,y);d.matrix=m}return d},e.prototype.drawTitle=function(t){var e,n=this.getTitleAttrs(),i=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});(null===(e=this.get("title"))||void 0===e?void 0:e.description)&&this.drawDescriptionIcon(t,i,n.matrix)},e.prototype.drawDescriptionIcon=function(t,e,n){var i=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),r=e.getBBox(),o=r.maxX,a=r.maxY,c=r.height,l=this.get("title").iconStyle,u=c/2,h=u/6,f=o+4,p=a-c/2,d=[f+u,p-u],g=d[0],y=d[1],v=[g+u,y+u],m=v[0],b=v[1],x=[g,b+u],_=x[0],O=x[1],w=[f,y+u],j=w[0],S=w[1],M=[f+u,p-c/4],A=M[0],C=M[1],E=[A,C+h],I=E[0],P=E[1],T=[I,P+h],F=T[0],L=T[1],k=[F,L+3*u/4],D=k[0],B=k[1];this.addShape(i,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:Object(s.__assign)({path:[["M",g,y],["A",u,u,0,0,1,m,b],["A",u,u,0,0,1,_,O],["A",u,u,0,0,1,j,S],["A",u,u,0,0,1,g,y],["M",A,C],["L",I,P],["M",F,L],["L",D,B]],lineWidth:h,matrix:n},l)}),this.addShape(i,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:f,y:p-c/2,width:c,height:c,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},e.prototype.applyTickStates=function(t,e){if(this.getItemStates(t).length){var n=this.get("tickStates"),i=this.getElementId("label-"+t.id),r=e.findById(i);if(r){var o=Object(f.a)(t,"label",n);o&&r.attr(o)}var a=this.getElementId("tickline-"+t.id),s=e.findById(a);if(s){var c=Object(f.a)(t,"tickLine",n);c&&s.attr(c)}}},e.prototype.updateTickStates=function(t){var e=this.getItemStates(t),n=this.get("tickStates"),i=this.get("label"),r=this.getElementByLocalId("label-"+t.id),o=this.get("tickLine"),a=this.getElementByLocalId("tickline-"+t.id);if(e.length){if(r){var s=Object(f.a)(t,"label",n);s&&r.attr(s)}if(a){var c=Object(f.a)(t,"tickLine",n);c&&a.attr(c)}}else r&&r.attr(i.style),a&&a.attr(o.style)},e}(u.a),g=n(31);function y(t,e,n,i){var r=e.getChildren(),o=!1;return Object(l.each)(r,(function(e){var r=Object(g.a)(t,e,n,i);o=o||r})),o}function v(){return b}function m(t,e,n){return y(t,e,n,"head")}function b(t,e,n){return y(t,e,n,"tail")}function x(t,e,n){return y(t,e,n,"middle")}var _=n(4);function O(t){return(function(t){var e=t.attr("matrix");return e&&1!==e[0]}(t)?Object(h.d)(t.attr("matrix")):0)%360}function w(t,e,n,i){var r=!1,o=O(e),a=t?Math.abs(n.attr("y")-e.attr("y")):Math.abs(n.attr("x")-e.attr("x")),s=(t?n.attr("y")>e.attr("y"):n.attr("x")>e.attr("x"))?e.getBBox():n.getBBox();if(t){var c=Math.abs(Math.cos(o));r=Object(_.i)(c,0,Math.PI/180)?s.width+i>a:s.height/c+i>a}else{c=Math.abs(Math.sin(o));r=Object(_.i)(c,0,Math.PI/180)?s.width+i>a:s.height/c+i>a}return r}function j(t,e,n,i){var r=(null==i?void 0:i.minGap)||0,o=e.getChildren().slice().filter((function(t){return t.get("visible")}));if(!o.length)return!1;var a=!1;n&&o.reverse();for(var s=o.length,c=o[0],l=1;l1){f=Math.ceil(f);for(var d=0;d2){var a=r[0],s=r[r.length-1];a.get("visible")||(a.show(),j(t,e,!1,i)&&(o=!0)),s.get("visible")||(s.show(),j(t,e,!0,i)&&(o=!0))}return o}function T(t,e,n,i){var r=e.getChildren();if(!r.length)return!1;if(!t&&r.length<2)return!1;var o=Object(g.b)(r),a=!1;t?a=!!n&&o>n:a=o>Math.abs(r[1].attr("x")-r[0].attr("x"));a&&function(t,e){Object(l.each)(t,(function(t){var n=t.attr("x"),i=t.attr("y"),r=Object(h.e)({x:n,y:i},e);t.attr("matrix",r)}))}(r,i(n,o));return a}function F(){return L}function L(t,e,n,i){return T(t,e,n,(function(){return Object(l.isNumber)(i)?i:t?p.a.verticalAxisRotate:p.a.horizontalAxisRotate}))}function k(t,e,n){return T(t,e,n,(function(e,n){if(!e)return t?p.a.verticalAxisRotate:p.a.horizontalAxisRotate;if(t)return-Math.acos(e/n);var i=0;return(e>n||(i=Math.asin(e/n))>Math.PI/4)&&(i=Math.PI/4),i}))}var D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(s.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(s.__assign)(Object(s.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),i=t.prototype.getInnerLayoutBBox.call(this),r=Math.min(e.x,n.x,i.x),o=Math.min(e.y,n.y,i.y),a=Math.max(e.x,n.x,i.maxX),s=Math.max(e.y,n.y,i.maxY);return{x:r,y:o,minX:r,minY:o,maxX:a,maxY:s,width:a-r,height:s-o}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return Object(l.isNumberEqual)(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return Object(l.isNumberEqual)(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),i=n.x-e.x,r=n.y-e.y;return{x:e.x+i*t,y:e.y+r*t}},e.prototype.getSideVector=function(t){var e=this.getAxisVector(),n=c.vec2.normalize([0,0],e),i=this.get("verticalFactor"),r=[n[1],-1*n[0]];return c.vec2.scale([0,0],r,t*i)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),i=this.isHorizontal();if(n||i){var r=this.get("label"),o=this.get("title"),a=this.get("verticalLimitLength"),s=r.offset,c=a,u=0,h=0;o&&(u=o.style.fontSize,h=o.spacing),c&&(c=c-s-h-u);var f=this.get("overlapOrder");if(Object(l.each)(f,(function(n){r[n]&&e.canProcessOverlap(n)&&e.autoProcessOverlap(n,r[n],t,c)})),o&&Object(l.isNil)(o.offset)){var p=t.getCanvasBBox(),d=n?p.width:p.height;o.offset=s+d+h+u/2}}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||Object(l.isNil)(e.rotate)},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=this.isVertical(),s=!1,c=a[t];if(!0===e){this.get("label");s=c.getDefault()(o,n,i)}else if(Object(l.isFunction)(e))s=e(o,n,i);else if(Object(l.isObject)(e)){var u=e;c[u.type]&&(s=c[u.type](o,n,i,u.cfg))}else c[e]&&(s=c[e](o,n,i));if("autoRotate"===t){if(s){var h=n.getChildren(),f=this.get("verticalFactor");Object(l.each)(h,(function(t){if("center"===t.attr("textAlign")){var e=f>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){var p=n.getChildren().slice(0);Object(l.each)(p,(function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())}))}},e}(d),B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(s.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(s.__assign)(Object(s.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,i=this.get("radius"),r=i,o=this.get("startAngle"),a=this.get("endAngle"),s=[];if(Math.abs(a-o)===2*Math.PI)s=[["M",e,n-r],["A",i,r,0,1,1,e,n+r],["A",i,r,0,1,1,e,n-r],["Z"]];else{var c=this.getCirclePoint(o),l=this.getCirclePoint(a),u=Math.abs(a-o)>Math.PI?1:0,h=o>a?0:1;s=[["M",e,n],["L",c.x,c.y],["A",i,r,0,u,h,l.x,l.y],["L",e,n]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this.getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),i=[e.x-n.x,e.y-n.y],r=this.get("verticalFactor"),o=c.vec2.length(i);return c.vec2.scale(i,i,r*t/o),i},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||Object(l.isNil)(e.rotate)},e.prototype.processOverlap=function(t){var e=this,n=this.get("label"),i=this.get("title"),r=this.get("verticalLimitLength"),o=n.offset,a=r,s=0,c=0;i&&(s=i.style.fontSize,c=i.spacing),a&&(a=a-o-c-s);var u=this.get("overlapOrder");if(Object(l.each)(u,(function(i){n[i]&&e.canProcessOverlap(i)&&e.autoProcessOverlap(i,n[i],t,a)})),i&&Object(l.isNil)(i.offset)){var h=t.getCanvasBBox().height;i.offset=o+h+c+s/2}},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=!1,s=a[t];if(i>0)if(!0===e)o=s.getDefault()(!1,n,i);else if(Object(l.isFunction)(e))o=e(!1,n,i);else if(Object(l.isObject)(e)){var c=e;s[c.type]&&(o=s[c.type](!1,n,i,c.cfg))}else s[e]&&(o=s[e](!1,n,i));if("autoRotate"===t){if(o){var u=n.getChildren(),h=this.get("verticalFactor");Object(l.each)(u,(function(t){if("center"===t.attr("textAlign")){var e=h>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){var f=n.getChildren().slice(0);Object(l.each)(f,(function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())}))}},e}(d)},function(t,e,n){"use strict";var i=n(1),r=n(11),o=n(9),a=n(43),s=n(26),c=n(20),l=n(54),u=n(53),h=n(0),f=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,p=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,d=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function g(t){var e=t.match(d);if(!e)return"";var n="";return e.sort((function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])})),Object(h.each)(e,(function(t){t=t.split(":"),n+=''})),n}var y=function(){function t(t){this.cfg={};var e=null,n=Object(h.uniqueId)("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,i,r=f.exec(t),o=Object(h.mod)(Object(h.toRadian)(parseFloat(r[1])),2*Math.PI),a=r[2];o>=0&&o<.5*Math.PI?(n={x:0,y:0},i={x:1,y:1}):.5*Math.PI<=o&&o';e.innerHTML=n},t}(),x=function(){function t(t,e){this.cfg={};var n=Object(c.b)("marker"),i=Object(h.uniqueId)("marker_");n.setAttribute("id",i);var r=Object(c.b)("path");r.setAttribute("stroke",t.stroke||"none"),r.setAttribute("fill",t.fill||"none"),n.appendChild(r),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=r,this.id=i;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,r):(this.cfg=o,this._setMarker(t.lineWidth,r)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,i=this.cfg.path,r=this.cfg.d;Object(h.isArray)(i)&&(i=i.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",i),n.appendChild(e),r&&n.setAttribute("refX",""+r/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}(),_=function(){function t(t){this.type="clip",this.cfg={};var e=Object(c.b)("clipPath");this.el=e,this.id=Object(h.uniqueId)("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}(),O=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,w=function(){function t(t){this.cfg={};var e=Object(c.b)("pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=Object(c.b)("image");e.appendChild(n);var i=Object(h.uniqueId)("pattern_");e.id=i,this.el=e,this.id=i,this.cfg=t;var r=O.exec(t)[2];n.setAttribute("href",r);var o=new Image;function a(){e.setAttribute("width",""+o.width),e.setAttribute("height",""+o.height)}return r.match(/^data:/i)||(o.crossOrigin="Anonymous"),o.src=r,o.complete?a():(o.onload=a,o.src=o.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}(),j=function(){function t(t){var e=Object(c.b)("defs"),n=Object(h.uniqueId)("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,i=null,r=0;rMath.PI?1:0,f=i>r?0:1;a=[["M",l.x,l.y],["A",n,n,0,h,f,u.x,u.y]]}return a},e}(u),p=n(12),d=n(39),g=((i={})["g2-crosshair"]={position:"relative"},i["g2-crosshair-line"]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},i["g2-crosshair-text"]={position:"absolute",color:l.a.textColor,fontFamily:l.a.fontFamily},i),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:"g2-crosshair",defaultStyles:g,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),e=this.get("crosshairTpl"),n=Object(p.b)(e);t.appendChild(n),this.applyStyle("g2-crosshair-line",n),this.set("crosshairEl",n)},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text"),r=i.position,a=i.offset;return Object(o.f)(e,n,r,a)},e.prototype.resetText=function(){var t=this.get("text"),e=this.get("textEl");if(t){var n=t.content;if(!e){var i=this.getContainer(),r=Object(a.substitute)(this.get("textTpl"),t);e=Object(p.b)(r),i.appendChild(e),this.applyStyle("g2-crosshair-text",e),this.set("textEl",e)}e.innerHTML=n}else e&&e.remove()},e.prototype.isVertical=function(t,e){return t.x===e.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var e=this.get("start"),n=this.get("end"),i=Math.min(e.x,n.x),r=Math.min(e.y,n.y);this.isVertical(e,n)?Object(p.e)(t,{width:"1px",height:Object(o.l)(Math.abs(n.y-e.y))}):Object(p.e)(t,{height:"1px",width:Object(o.l)(Math.abs(n.x-e.x))}),Object(p.e)(t,{top:Object(o.l)(r),left:Object(o.l)(i)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var e=this.get("text").align,n=t.clientWidth,i=this.getTextPoint();switch(e){case"center":i.x=i.x-n/2;break;case"right":i.x=i.x-n}Object(p.e)(t,{top:Object(o.l)(i.y),left:Object(o.l)(i.x)})}},e.prototype.updateInner=function(e){Object(a.hasKey)(e,"text")&&this.resetText(),t.prototype.updateInner.call(this,e)},e}(d.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return _}));var i=n(1),r=n(0),o=n(14),a={opacity:0},s={stroke:"#C5C5C5",strokeOpacity:.85},c={fill:"#CACED4",opacity:.85},l=n(30),u=n(34);function h(t){return function(t){return Object(r.map)(t,(function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t)}function f(t,e,n,i){void 0===i&&(i=!0);var o=new u.b({values:t}),a=new u.a({values:Object(r.map)(t,(function(t,e){return e}))}),s=Object(r.map)(t,(function(t,i){return[a.scale(i)*e,n-o.scale(t)*n]}));return i?function(t){if(t.length<=2)return h(t);var e=[];Object(r.each)(t,(function(t){Object(r.isEqual)(t,e.slice(e.length-2))||e.push(t[0],t[1])}));var n=Object(l.a)(e,!1),i=Object(r.head)(t),o=i[0],a=i[1];return n.unshift(["M",o,a]),n}(s):h(s)}function p(t,e,n,r){var o=Object(i.__spreadArrays)(t),a=function(t,e){var n=new u.b({values:t}),i=n.max<0?n.max:Math.max(0,n.min);return e-n.scale(i)*e}(r,n);return o.push(["L",e,a]),o.push(["L",0,a]),o.push(["Z"]),o}var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:a,lineStyle:s,areaStyle:c})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,o=e.data,a=e.smooth,s=e.isArea,c=e.backgroundStyle,l=e.lineStyle,u=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(i.__assign)({x:0,y:0,width:n,height:r},c)});var h=f(o,n,r,a);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:Object(i.__assign)({path:h},l)}),s){var d=p(h,n,r,o);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:Object(i.__assign)({path:d},u)})}},e.prototype.applyOffset=function(){var t=this.cfg,e=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:e,y:n})},e}(o.a),g={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"handler",x:0,y:0,width:10,height:24,style:g})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,i=e.height,r=e.style,o=r.fill,a=r.stroke,s=r.radius,c=r.opacity,l=r.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:i,fill:o,stroke:a,radius:s,opacity:c,cursor:l}});var u=1/3*n,h=2/3*n,f=1/4*i,p=3/4*i;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:u,y1:f,x2:u,y2:p,stroke:a,cursor:l}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:h,y1:f,x2:h,y2:p,stroke:a,cursor:l}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",(function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()})),this.get("group").on("mouseleave",(function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()}))},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(o.a),v={fill:"#416180",opacity:.05},m={fill:"#5B8FF9",opacity:.15,cursor:"move"},b={width:10,height:24},x={textBaseline:"middle",fill:"#000",opacity:.45},_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){return function(n){e.currentTarget=t;var i=n.originalEvent;i.stopPropagation(),i.preventDefault(),e.prevX=Object(r.get)(i,"touches.0.pageX",i.pageX),e.prevY=Object(r.get)(i,"touches.0.pageY",i.pageY);var o=e.getContainerDOM();o.addEventListener("mousemove",e.onMouseMove),o.addEventListener("mouseup",e.onMouseUp),o.addEventListener("mouseleave",e.onMouseUp),o.addEventListener("touchmove",e.onMouseMove),o.addEventListener("touchend",e.onMouseUp),o.addEventListener("touchcancel",e.onMouseUp)}},e.onMouseMove=function(t){var n=e.cfg.width,i=[e.get("start"),e.get("end")];t.stopPropagation(),t.preventDefault();var o=Object(r.get)(t,"touches.0.pageX",t.pageX),a=Object(r.get)(t,"touches.0.pageY",t.pageY),s=o-e.prevX,c=e.adjustOffsetRange(s/n);e.updateStartEnd(c),e.updateUI(e.getElementByLocalId("foreground"),e.getElementByLocalId("minText"),e.getElementByLocalId("maxText")),e.prevX=o,e.prevY=a,e.draw(),e.emit("sliderchange",[e.get("start"),e.get("end")].sort()),e.delegateEmit("valuechanged",{originValue:i,value:[e.get("start"),e.get("end")]})},e.onMouseUp=function(){e.currentTarget&&(e.currentTarget=void 0);var t=e.getContainerDOM();t&&(t.removeEventListener("mousemove",e.onMouseMove),t.removeEventListener("mouseup",e.onMouseUp),t.removeEventListener("mouseleave",e.onMouseUp),t.removeEventListener("touchmove",e.onMouseMove),t.removeEventListener("touchend",e.onMouseUp),t.removeEventListener("touchcancel",e.onMouseUp))},e}return Object(i.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.get("start"),i=this.get("end"),o=Object(r.clamp)(n,t,e),a=Object(r.clamp)(i,t,e);this.get("isInit")||n===o&&i===a||this.setValue([o,a])},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange();if(Object(r.isArray)(t)&&2===t.length){var n=[this.get("start"),this.get("end")];this.update({start:Object(r.clamp)(t[0],e.min,e.max),end:Object(r.clamp)(t[1],e.min,e.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:v,foregroundStyle:m,handlerStyle:b,textStyle:x}})},e.prototype.update=function(e){var n=e.start,o=e.end,a=Object(i.__assign)({},e);Object(r.isNil)(n)||(a.start=Object(r.clamp)(n,0,1)),Object(r.isNil)(o)||(a.end=Object(r.clamp)(o,0,1)),t.prototype.update.call(this,a),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},e.prototype.init=function(){this.set("start",Object(r.clamp)(this.get("start"),0,1)),this.set("end",Object(r.clamp)(this.get("end"),0,1)),t.prototype.init.call(this)},e.prototype.render=function(){t.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},e.prototype.renderInner=function(t){var e=this.cfg,n=(e.start,e.end,e.width),o=e.height,a=e.trendCfg,s=void 0===a?{}:a,c=e.minText,l=e.maxText,u=e.backgroundStyle,h=void 0===u?{}:u,f=e.foregroundStyle,p=void 0===f?{}:f,v=e.textStyle,m=void 0===v?{}:v,b=Object(r.deepMix)({},g,this.cfg.handlerStyle);Object(r.size)(Object(r.get)(s,"data"))&&(this.trend=this.addComponent(t,Object(i.__assign)({component:d,id:this.getElementId("trend"),x:0,y:0,width:n,height:o},s))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(i.__assign)({x:0,y:0,width:n,height:o},h)});this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:Object(i.__assign)({y:o/2,textAlign:"right",text:c,silent:!1},m)}),this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:Object(i.__assign)({y:o/2,textAlign:"left",text:l,silent:!1},m)}),this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:Object(i.__assign)({y:0,height:o},p)});var x=Object(r.get)(b,"width",10),_=Object(r.get)(b,"height",24);this.minHandler=this.addComponent(t,{component:y,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(o-_)/2,width:x,height:_,cursor:"ew-resize",style:b}),this.maxHandler=this.addComponent(t,{component:y,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(o-_)/2,width:x,height:_,cursor:"ew-resize",style:b})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,e,n){var i=this.cfg,o=i.start,a=i.end,s=i.width,c=i.minText,l=i.maxText,u=i.handlerStyle,h=i.height,f=o*s,p=a*s;this.trend&&(this.trend.update({width:s,height:h}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",f),t.attr("width",p-f);var d=Object(r.get)(u,"width",10);e.attr("text",c),n.attr("text",l);var g=this._dodgeText([f,p],e,n),y=g[0],v=g[1];this.minHandler&&(this.minHandler.update({x:f-d/2}),this.get("updateAutoRender")||this.minHandler.render()),Object(r.each)(y,(function(t,n){return e.attr(n,t)})),this.maxHandler&&(this.maxHandler.update({x:p-d/2}),this.get("updateAutoRender")||this.maxHandler.render()),Object(r.each)(v,(function(t,e){return n.attr(e,t)}))},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var e=this.cfg,n=e.start,i=e.end;switch(this.currentTarget){case"minHandler":var r=0-n,o=1-n;return Math.min(o,Math.max(r,t));case"maxHandler":r=0-i,o=1-i;return Math.min(o,Math.max(r,t));case"foreground":r=0-n,o=1-i;return Math.min(o,Math.max(r,t))}},e.prototype.updateStartEnd=function(t){var e=this.cfg,n=e.start,i=e.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":i+=t;break;case"foreground":n+=t,i+=t}this.set("start",n),this.set("end",i)},e.prototype._dodgeText=function(t,e,n){var i,o,a=this.cfg,s=a.handlerStyle,c=a.width,l=Object(r.get)(s,"width",10),u=t[0],h=t[1],f=!1;u>h&&(u=(i=[h,u])[0],h=i[1],e=(o=[n,e])[0],n=o[1],f=!0);var p=e.getBBox(),d=n.getBBox(),g=p.width>u-2?{x:u+l/2+2,textAlign:"left"}:{x:u-l/2-2,textAlign:"right"},y=d.width>c-h-2?{x:h-l/2-2,textAlign:"right"}:{x:h+l/2+2,textAlign:"left"};return f?[y,g]:[g,y]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(o.a)},function(t,e,n){"use strict";n.r(e),n.d(e,"Base",(function(){return s})),n.d(e,"Circle",(function(){return c})),n.d(e,"Line",(function(){return l}));var i=n(1),r=n(0),o=n(14),a=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:a.a.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),i=e.slice(0).reverse(),r=this.getGridPath(i,!0);return this.get("closed")?n=n.concat(r):(r[0][0]="L",(n=n.concat(r)).push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),i=this.get("items"),o=this.get("alternateColor"),a=null;Object(r.each)(i,(function(s,c){var l=s.id||c;if(n){var u=e.getPathStyle();u=Object(r.isFunction)(u)?u(s,c,i):u;var h=e.getElementId("line-"+l),f=e.getGridPath(s.points);e.addShape(t,{type:"path",name:"grid-line",id:h,attrs:Object(r.mix)({path:f},u)})}if(o&&c>0){var p=e.getElementId("region-"+l),d=c%2==0;if(Object(r.isString)(o))d&&e.drawAlternateRegion(p,t,a.points,s.points,o);else{var g=d?o[1]:o[0];e.drawAlternateRegion(p,t,a.points,s.points,g)}}a=s}))},e.prototype.drawAlternateRegion=function(t,e,n,i,r){var o=this.getAlternatePath(n,i);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:o,fill:r}})},e}(o.a);var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n,i,o,a,s,c,l=this.getLineType(),u=this.get("closed"),h=[];if(t.length)if("circle"===l){var f=this.get("center"),p=t[0],d=(n=f.x,i=f.y,o=p.x,a=p.y,s=o-n,c=a-i,Math.sqrt(s*s+c*c)),g=e?0:1;u?(h.push(["M",f.x,f.y-d]),h.push(["A",d,d,0,0,g,f.x,f.y+d]),h.push(["A",d,d,0,0,g,f.x,f.y-d]),h.push(["Z"])):Object(r.each)(t,(function(t,e){0===e?h.push(["M",t.x,t.y]):h.push(["A",d,d,0,0,g,t.x,t.y])}))}else Object(r.each)(t,(function(t,e){0===e?h.push(["M",t.x,t.y]):h.push(["L",t.x,t.y])})),u&&h.push(["Z"]);return h},e}(s),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return Object(r.each)(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e},e}(s)},function(t,e,n){"use strict";n.r(e),n.d(e,"Category",(function(){return g})),n.d(e,"Continuous",(function(){return y})),n.d(e,"Base",(function(){return h}));var i=n(1),r=n(0),o=n(31),a=n(22),s=n(44),c=n(5),l=n(14),u=n(4),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("maxWidth"),i=this.get("maxHeight"),r=e.width,o=e.height;return n&&(r=Math.min(r,n)),i&&(o=Math.min(o,i)),Object(u.b)(e.minX,e.minY,r,o)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+i})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),r=Object(u.c)(e.padding),o=Object(i.__assign)({x:0,y:0,width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:o}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),r=n.spacing,o=n.style,a=n.text,s=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:Object(i.__assign)({text:a,x:e.x,y:e.y},o)}).getBBox();this.set("currentPoint",{x:e.x,y:s.maxY+r})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=Object(u.c)(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(l.a),f={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},p={fill:c.a.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:c.a.fontFamily,fontWeight:"normal",lineHeight:12},d={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexg&&(g=m),"horizontal"===f?(y&&yc}(t,v))&&(1===m&&(b=v.x+h,n.moveElementTo(g,{x:S,y:v.y+p/2-y.height/2-y.minY})),m+=1,v.x=i,v.y+=j),n.moveElementTo(t,v),t.getParent().setClip({type:"rect",attrs:{x:v.x,y:v.y,width:r+h,height:p}}),v.x+=r+h}))}else{Object(r.each)(s,(function(t){var e=t.getBBox();e.width>x&&(x=e.width)})),_=x,x+=h,c&&(x=Math.min(c,x),_=Math.min(c,_)),this.pageWidth=x,this.pageHeight=l-Math.max(y.height,p+O);var M=Math.floor(this.pageHeight/(p+O));Object(r.each)(s,(function(t,e){0!==e&&e%M==0&&(m+=1,v.x+=x,v.y=o),n.moveElementTo(t,v),t.getParent().setClip({type:"rect",attrs:{x:v.x,y:v.y,width:x,height:p}}),v.y+=p+O})),this.totalPagesCnt=m,this.moveElementTo(g,{x:i+_/2-y.width/2-y.minX,y:l-y.height-y.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),"horizontal"===a&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(m/this.get("maxRow")):this.totalPagesCnt=m,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(g),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,n,o){var a={x:0,y:0},s=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),c=Object(r.get)(o.marker,"style",{}),l=c.size,u=void 0===l?12:l,h=Object(i.__rest)(c,["size"]),f=this.drawArrow(s,a,"navigation-arrow-left","horizontal"===e?"up":"left",u,h);f.on("click",this.onNavigationBack);var p=f.getBBox();a.x+=p.width+2;var d=this.addShape(s,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:Object(i.__assign)({x:a.x,y:a.y+u/2,text:n,textBaseline:"middle"},Object(r.get)(o.text,"style"))}).getBBox();return a.x+=d.width+2,this.drawArrow(s,a,"navigation-arrow-right","horizontal"===e?"down":"right",u,h).on("click",this.onNavigationAfter),s},e.prototype.updateNavigation=function(t){var e=Object(r.deepMix)({},f,this.get("pageNavigator")).marker.style,n=e.fill,i=e.opacity,o=e.inactiveFill,a=e.inactiveOpacity,s=this.currentPageIndex+"/"+this.totalPagesCnt,c=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),l=t?t.findById(this.getElementId("navigation-arrow-left")):this.getElementByLocalId("navigation-arrow-left"),u=t?t.findById(this.getElementId("navigation-arrow-right")):this.getElementByLocalId("navigation-arrow-right");c.attr("text",s),l.attr("opacity",1===this.currentPageIndex?a:i),l.attr("fill",1===this.currentPageIndex?o:n),l.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),u.attr("opacity",this.currentPageIndex===this.totalPagesCnt?a:i),u.attr("fill",this.currentPageIndex===this.totalPagesCnt?o:n),u.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var h=l.getBBox().maxX+2;c.attr("x",h),h+=c.getBBox().width+2,this.updateArrowPath(u,{x:h,y:0})},e.prototype.drawArrow=function(t,e,n,r,o,s){var c=e.x,l=e.y,u=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:Object(i.__assign)({size:o,direction:r,path:[["M",c+o/2,l],["L",c,l+o],["L",c+o,l+o],["Z"]],cursor:"pointer"},s)});return u.attr("matrix",Object(a.e)({x:c+o/2,y:l+o/2},d[r])),u},e.prototype.updateArrowPath=function(t,e){var n=e.x,i=e.y,r=t.attr(),o=r.size,s=r.direction,c=Object(a.e)({x:n+o/2,y:i+o/2},d[s]);t.attr("path",[["M",n+o/2,i],["L",n,i+o],["L",n+o,i+o],["Z"]]),t.attr("matrix",c)},e.prototype.getCurrentNavigationMatrix=function(){var t=this.currentPageIndex,e=this.pageWidth,n=this.pageHeight,i="horizontal"===this.get("layout")?{x:0,y:n*(1-t)}:{x:e*(1-t),y:0};return Object(a.f)(i)},e.prototype.applyItemStates=function(t,e){if(this.getItemStates(t).length>0){var n=e.getChildren(),i=this.get("itemStates");Object(r.each)(n,(function(e){var n=e.get("name").split("-")[2],r=Object(s.a)(t,n,i);r&&(e.attr(r),"marker"!==n||e.get("isStroke")&&e.get("isFill")||(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))}))}},e.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),e=this.get("maxItemWidth");return e?t&&(e=t<=e?t:e):t&&(e=t),e},e}(h),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:c.a.textColor,textBaseline:"middle",fontFamily:c.a.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:c.a.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",(function(t){var n=e.getValueByCanvasPoint(t.x,t.y),i=e.getCurrentValue()[1];in&&(i=n),e.setValue([i,n])}))},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",(function(t){n={x:t.x,y:t.y}})),t.on("legend-track:drag",(function(t){if(n){var i=e.getValueByCanvasPoint(n.x,n.y),r=e.getValueByCanvasPoint(t.x,t.y),o=e.getCurrentValue(),a=o[1]-o[0],s=e.getRange(),c=r-i;c<0?o[0]+c>s.min?e.setValue([o[0]+c,o[1]+c]):e.setValue([s.min,s.min+a]):c>0&&(c>0&&o[1]+co&&(l=o),l0&&this.changeRailLength(i,o,n[o]-u)}},e.prototype.changeRailLength=function(t,e,n){var i,r=t.getBBox();i="height"===e?this.getRailPath(r.x,r.y,r.width,n):this.getRailPath(r.x,r.y,n,r.height),t.attr("path",i)},e.prototype.changeRailPosition=function(t,e,n){var i=t.getBBox(),r=this.getRailPath(e,n,i.width,i.height);t.attr("path",r)},e.prototype.fixedHorizontal=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),c=t.getBBox(),l=e.getBBox(),u=s.height;this.fitRailLength(c,l,s,n),s=n.getBBox(),"rail"===o?(t.attr({x:i.x,y:i.y+u/2}),this.changeRailPosition(n,i.x+c.width+a,i.y),e.attr({x:i.x+c.width+s.width+2*a,y:i.y+u/2})):"top"===o?(t.attr({x:i.x,y:i.y}),e.attr({x:i.x+s.width,y:i.y}),this.changeRailPosition(n,i.x,i.y+c.height+a)):(this.changeRailPosition(n,i.x,i.y),t.attr({x:i.x,y:i.y+s.height+a}),e.attr({x:i.x+s.width,y:i.y+s.height+a}))},e.prototype.fixedVertail=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),c=t.getBBox(),l=e.getBBox();if(this.fitRailLength(c,l,s,n),s=n.getBBox(),"rail"===o)t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x,i.y+c.height+a),e.attr({x:i.x,y:i.y+c.height+s.height+2*a});else if("right"===o)t.attr({x:i.x+s.width+a,y:i.y}),this.changeRailPosition(n,i.x,i.y),e.attr({x:i.x+s.width+a,y:i.y+s.height});else{var u=Math.max(c.width,l.width);t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x+u+a,i.y),e.attr({x:i.x,y:i.y+s.height})}},e}(h)},function(t,e,n){"use strict";n.r(e),n.d(e,"Html",(function(){return p}));var i,r=n(1),o=n(35),a=n(12),s=n(0),c=n(39),l=n(4),u=n(21),h=n(5),f=((i={})[""+u.CONTAINER_CLASS]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:h.a.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},i[""+u.TITLE_CLASS]={marginBottom:"4px"},i[""+u.LIST_CLASS]={margin:"0px",listStyleType:"none",padding:"0px"},i[""+u.LIST_ITEM_CLASS]={listStyleType:"none",marginBottom:"4px"},i[""+u.MARKER_CLASS]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},i[""+u.VALUE_CLASS]={display:"inline-block",float:"right",marginLeft:"30px"},i[""+u.CROSSHAIR_X]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},i[""+u.CROSSHAIR_Y]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},i);var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • \n \n {name}:\n {value}\n
  • ',xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:u.CONTAINER_CLASS,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:f})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),Object(a.e)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),Object(a.e)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");n&&Object(a.e)(n,{display:e}),i&&Object(a.e)(i,{display:e})},e.prototype.initContainer=function(){if(t.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var e=this.getHtmlContentNode();this.get("parent").appendChild(e),this.set("container",e),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(e){var n,i,r;this.get("customContent")?this.renderCustomContent():(n=e,i=["title","showTitle"],r=!1,Object(s.each)(i,(function(t){if(Object(s.hasKey)(n,t))return r=!0,!1})),r&&this.resetTitle(),Object(s.hasKey)(e,"items")&&this.renderItems()),t.prototype.updateInner.call(this,e)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),i=this.get("offset"),r=this.getOffset(),o=r.offsetX,s=r.offsetY,c=this.get("position"),u=this.get("region"),h=this.getContainer(),f=this.getBBox(),p=f.width,d=f.height;u&&(t=Object(l.k)(u));var g=function(t,e,n,i,r,o,a){var s=function(t,e,n,i,r,o){var a=t,s=e;switch(o){case"left":a=t-i-n,s=e-r/2;break;case"right":a=t+n,s=e-r/2;break;case"top":a=t-i/2,s=e-r-n;break;case"bottom":a=t-i/2,s=e+n;break;default:a=t+n,s=e-r-n}return{x:a,y:s}}(t,e,n,i,r,o);if(a){var c=function(t,e,n,i,r){return{left:tr.x+r.width,top:er.y+r.height}}(s.x,s.y,i,r,a);"auto"===o?(c.right&&(s.x=Math.max(0,t-i-n)),c.top&&(s.y=Math.max(0,e-r-n))):"top"===o||"bottom"===o?(c.left&&(s.x=a.x),c.right&&(s.x=a.x+a.width-i),"top"===o&&c.top&&(s.y=e+n),"bottom"===o&&c.bottom&&(s.y=e-r-n)):(c.top&&(s.y=a.y),c.bottom&&(s.y=a.y+a.height-r),"left"===o&&c.left&&(s.x=t+n),"right"===o&&c.right&&(s.x=t-i-n))}return s}(e,n,i,p,d,c,t);Object(a.e)(h,{left:Object(l.l)(g.x+o),top:Object(l.l)(g.y+s)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),e=this.get("parent"),n=this.get("container");n&&n.parentNode===e?e.replaceChild(t,n):e.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,e=this.get("customContent");if(e){var n=e(this.get("title"),this.get("items"));t=Object(s.isElement)(n)?n:Object(a.b)(n)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(u.TITLE_CLASS)[0],n=t.getElementsByClassName(u.LIST_CLASS)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=Object(l.k)(t),i=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),r&&(r.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),i&&(i.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),i=this.get(t);"x"===t?Object(a.e)(n,{left:Object(l.l)(i),top:Object(l.l)(e.y),height:Object(l.l)(e.height)}):Object(a.e)(n,{top:Object(l.l)(i),left:Object(l.l)(e.x),width:Object(l.l)(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",i="CROSSHAIR_"+t.toUpperCase(),r=u[i],o=this.get(e),s=this.get("parent");return o||(o=Object(a.b)(this.get(n)),this.applyStyle(r,o),s.appendChild(o),this.set(e,o)),o},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");n&&(Object(s.each)(t,(function(t){var i=o.default.toCSSGradient(t.color),c=Object(r.__assign)(Object(r.__assign)({},t),{color:i}),l=Object(s.substitute)(e,c),u=Object(a.b)(l);n.appendChild(u)})),this.applyChildrenStyles(n,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&Object(l.a)(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(c.a)},function(t,e,n){"use strict";var i=n(1),r=n(11);function o(t,e,n){var i=t.getTotalMatrix();if(i){var o=function(t,e){if(e){var n=Object(r.invert)(e);return Object(r.multiplyVec2)(n,t)}return t}([e,n,1],i);return[o[0],o[1]]}return[e,n]}function a(t,e,n){if(t.isCanvas&&t.isCanvas())return!0;if(!Object(r.isAllowCapture)(t)||!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var i=o(t,e,n),a=i[0],s=i[1];if(t.isClipped(a,s))return!1}var c=t.cfg.cacheCanvasBBox||t.getCanvasBBox();return e>=c.minX&&e<=c.maxX&&n>=c.minY&&n<=c.maxY}var s=n(37),c=n(52),l=n(6),u=n(23),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e.clipView=!0,e.quickHit=!1,e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return s},e.prototype.getGroupBase=function(){return c.a},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||Object(l.d)();return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var i=this.get("context"),r=this.get("el"),o=this.getPixelRatio();r.width=o*e,r.height=o*n,o>1&&i.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype.getShape=function(e,n){return this.get("quickHit")?function t(e,n,i){if(!a(e,n,i))return null;for(var r=null,s=e.getChildren(),c=s.length-1;c>=0;c--){var l=s[c];if(l.isGroup())r=t(l,n,i);else if(a(l,n,i)){var u=l,h=o(l,n,i),f=h[0],p=h[1];u.isInShape(f,p)&&(r=l)}if(r)break}return r}(this,e,n):t.prototype.getShape.call(this,e,n,null)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements"),n=this.getViewRange();e.length&&e[0]===this?t=n:(t=Object(u.f)(e))&&(t.minX=Math.floor(t.minX),t.minY=Math.floor(t.minY),t.maxX=Math.ceil(t.maxX),t.maxY=Math.ceil(t.maxY),t.maxY+=1,this.get("clipView")&&(t=Object(u.g)(t,n)));return t},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(Object(l.a)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),Object(u.a)(t,this),Object(u.d)(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.get("refreshElements"),n=this.getChildren(),i=this._getRefreshRegion();i?(t.clearRect(i.minX,i.minY,i.maxX-i.minX,i.maxY-i.minY),t.save(),t.beginPath(),t.rect(i.minX,i.minY,i.maxX-i.minX,i.maxY-i.minY),t.clip(),Object(u.a)(t,this),Object(u.b)(this,n,i),Object(u.d)(t,n,i),t.restore()):e.length&&Object(u.c)(e),Object(l.c)(e,(function(t){t.get("hasChanged")&&t.set("hasChanged",!1)})),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=Object(l.n)((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",e))},e.prototype.skipDraw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},e}(r.AbstractCanvas);e.a=h},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(1),r=n(12),o=n(0),a=n(14),s={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=o.noop,e.onStartEvent=function(t){return function(n){e.isMobile=t,n.originalEvent.preventDefault();var i=t?Object(o.get)(n.originalEvent,"touches.0.clientX"):n.clientX,r=t?Object(o.get)(n.originalEvent,"touches.0.clientY"):n.clientY;e.startPos=e.cfg.isHorizontal?i:r,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),n=[];n=e.isMobile?[Object(r.a)(t,"touchmove",e.onMouseMove),Object(r.a)(t,"touchend",e.onMouseUp),Object(r.a)(t,"touchcancel",e.onMouseUp)]:[Object(r.a)(t,"mousemove",e.onMouseMove),Object(r.a)(t,"mouseup",e.onMouseUp),Object(r.a)(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){n.forEach((function(t){t.remove()}))}},e.onMouseMove=function(t){var n=e.cfg,i=n.isHorizontal,r=n.thumbOffset;t.preventDefault();var a=e.isMobile?Object(o.get)(t,"touches.0.clientX"):t.clientX,s=e.isMobile?Object(o.get)(t,"touches.0.clientY"):t.clientY,c=i?a:s,l=c-e.startPos;e.startPos=c,e.updateThumbOffset(r+l)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var n=e.cfg,i=n.isHorizontal,r=n.x,o=n.y,a=n.thumbLen,s=e.getContainerDOM().getBoundingClientRect(),c=t.clientX,l=t.clientY,u=i?c-s.left-r-a/2:l-s.top-o-a/2,h=e.validateRange(u);e.updateThumbOffset(h)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return Object(i.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.getValue(),i=Object(o.clamp)(n,t,e);n===i||this.get("isInit")||this.setValue(i)},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*Object(o.clamp)(t,e.min,e.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},e.prototype.getValue=function(){return Object(o.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(i.__assign)(Object(i.__assign)({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:s})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,i=e.theme,r=void 0===i?{default:{}}:i,a=Object(o.deepMix)({},s,r).default,c=a.lineCap,l=a.trackColor,u=a.size,h=Object(o.get)(this.cfg,"size",u),f=this.get("isHorizontal")?{x1:0+h/2,y1:h/2,x2:n-h/2,y2:h/2,lineWidth:h,stroke:l,lineCap:c}:{x1:h/2,y1:0+h/2,x2:h/2,y2:n-h/2,lineWidth:h,stroke:l,lineCap:c};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:f})},e.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,i=e.thumbLen,r=e.theme,a=Object(o.deepMix)({},s,r).default,c=a.size,l=a.lineCap,u=a.thumbColor,h=Object(o.get)(this.cfg,"size",c),f=this.get("isHorizontal")?{x1:n+h/2,y1:h/2,x2:n+i-h/2,y2:h/2,lineWidth:h,stroke:u,lineCap:l,cursor:"default"}:{x1:h/2,y1:n+h/2,x2:h/2,y2:n+i-h/2,lineWidth:h,stroke:u,lineCap:l,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:f})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var e=t.findById(this.getElementId("thumb"));e.on("mouseover",this.onThumbMouseOver),e.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,i=e.trackLen,r=t;return t+n>i?r=i-n:t+n=0)i=l+this.getIntervalOnlyOffset(n,e);else if(!r.isNil(c)&&r.isNil(s)&&c>=0){i=l+this.getDodgeOnlyOffset(n,e)}else if(!r.isNil(s)&&!r.isNil(c)&&s>=0&&c>=0){i=l+this.getIntervalAndDodgeOffset(n,e)}else{var f=h*o/n,p=a*f;i=(l+u)/2+(.5*(h-n*f-(n-1)*p)+((e+1)*f+e*p)-.5*f-.5*h)}return i},e.prototype.getIntervalOnlyOffset=function(t,e){var n=this,i=n.defaultSize,o=n.intervalPadding,a=n.xDimensionLegenth,s=n.groupNum,c=n.dodgeRatio,l=n.maxColumnWidth,u=n.minColumnWidth,h=n.columnWidthRatio,f=o/a,p=(1-(s-1)*f)/s*c/(t-1),d=((1-f*(s-1))/s-p*(t-1))/t;if(d=r.isNil(h)?d:1/s/t*h,!r.isNil(l)){var g=l/a;d=Math.min(d,g)}if(!r.isNil(u)){var y=u/a;d=Math.max(d,y)}return((.5+e)*(d=i?i/a:d)+e*(p=((1-(s-1)*f)/s-t*d)/(t-1))+.5*f)*s-f/2},e.prototype.getDodgeOnlyOffset=function(t,e){var n=this,i=n.defaultSize,o=n.dodgePadding,a=n.xDimensionLegenth,s=n.groupNum,c=n.marginRatio,l=n.maxColumnWidth,u=n.minColumnWidth,h=n.columnWidthRatio,f=o/a,p=1*c/(s-1),d=((1-p*(s-1))/s-f*(t-1))/t;if(d=h?1/s/t*h:d,!r.isNil(l)){var g=l/a;d=Math.min(d,g)}if(!r.isNil(u)){var y=u/a;d=Math.max(d,y)}return((.5+e)*(d=i?i/a:d)+e*f+.5*(p=(1-(d*t+f*(t-1))*s)/(s-1)))*s-p/2},e.prototype.getIntervalAndDodgeOffset=function(t,e){var n=this.intervalPadding,i=this.dodgePadding,r=this.xDimensionLegenth,o=this.groupNum,a=n/r,s=i/r;return((.5+e)*(((1-a*(o-1))/o-s*(t-1))/t)+e*s+.5*a)*o-a/2},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,n=this.cacheMap,i=n[t];return i||(i={},r.each(e,(function(e,n){var o=r.valuesOfKey(e,t);o.length||o.push(0),r.each(o,(function(t){i[t]||(i[t]=[]),i[t].push(n)}))})),n[t]=i),i},e}(n(33).a);e.a=a},function(t,e,n){"use strict";var i=n(27),r=n(0),o=n(40);var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.b)(e,t),e.prototype.process=function(t){var e=r.clone(t),n=r.flatten(e);return this.adjustData(e,n),e},e.prototype.adjustDim=function(t,e,n){var i=this,o=this.groupData(n,t);return r.each(o,(function(n,r){return i.adjustGroup(n,t,parseFloat(r),e)}))},e.prototype.getAdjustOffset=function(t){var e,n=t.pre,i=t.next,r=(i-n)*o.c;return(i-r-(e=n+r))*Math.random()+e},e.prototype.adjustGroup=function(t,e,n,i){var o=this,a=this.getAdjustRange(e,n,i);return r.each(t,(function(t){t[e]=o.getAdjustOffset(a)})),t},e}(n(33).a);e.a=a},function(t,e,n){"use strict";var i=n(27),r=n(0),o=n(33),a=r.Cache,s=function(t){function e(e){var n=t.call(this,e)||this,i=e.adjustNames,r=void 0===i?["y"]:i,o=e.height,a=void 0===o?NaN:o,s=e.size,c=void 0===s?10:s,l=e.reverseOrder,u=void 0!==l&&l;return n.adjustNames=r,n.height=a,n.size=c,n.reverseOrder=u,n}return Object(i.b)(e,t),e.prototype.process=function(t){var e=this.yField,n=this.reverseOrder,i=e?this.processStack(t):this.processOneDimStack(t);return n?this.reverse(i):i},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this.xField,n=this.yField,o=this.reverseOrder?this.reverse(t):t,s=new a,c=new a;return o.map((function(t){return t.map((function(t){var o,a=r.get(t,e,0),l=r.get(t,[n]),u=a.toString();if(l=r.isArray(l)?l[1]:l,!r.isNil(l)){var h=l>=0?s:c;h.has(u)||h.set(u,0);var f=h.get(u),p=l+f;return h.set(u,p),Object(i.a)(Object(i.a)({},t),((o={})[n]=[f,p],o))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,n=this.xField,r=this.height,o=this.reverseOrder,s=o?this.reverse(t):t,c=new a;return s.map((function(t){return t.map((function(t){var o,a=e.size,s=t[n],l=2*a/r;c.has(s)||c.set(s,l/2);var u=c.get(s);return c.set(s,u+l),Object(i.a)(Object(i.a)({},t),((o={}).y=u,o))}))}))},e}(o.a);e.a=s},function(t,e,n){"use strict";var i=n(27),r=n(0),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.b)(e,t),e.prototype.process=function(t){var e=r.flatten(t),n=this.xField,o=this.yField,a=this.getXValuesMaxMap(e),s=Math.max.apply(Math,Object.keys(a).map((function(t){return a[t]})));return r.map(t,(function(t){return r.map(t,(function(t){var e,c,l=t[o],u=t[n];if(r.isArray(l)){var h=(s-a[u])/2;return Object(i.a)(Object(i.a)({},t),((e={})[o]=r.map(l,(function(t){return h+t})),e))}var f=(s-l)/2;return Object(i.a)(Object(i.a)({},t),((c={})[o]=[f,l+f],c))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,n=this.xField,i=this.yField,o=r.groupBy(t,(function(t){return t[n]}));return r.mapValues(o,(function(t){return e.getDimMaxValue(t,i)}))},e.prototype.getDimMaxValue=function(t,e){var n=r.map(t,(function(t){return r.get(t,e,[])})),i=r.flatten(n);return Math.max.apply(Math,i)},e}(n(33).a);e.a=o},function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return c}));var i=n(54);n.d(e,"Shape",(function(){return i}));var r=n(11);for(var o in r)["default","Canvas","Group","Shape","version"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var a=n(186);n.d(e,"Canvas",(function(){return a.a}));var s=n(53);n.d(e,"Group",(function(){return s.a}));var c="0.5.6"},function(t,e,n){"use strict";e.a=function(){return!1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flow=e.P=e.WordCloud=e.Waterfall=e.Violin=e.Venn=e.Treemap=e.TinyLine=e.TinyColumn=e.TinyArea=e.Sunburst=e.Stock=e.Scatter=e.Sankey=e.Rose=e.RingProgress=e.RadialBar=e.Radar=e.Progress=e.Pie=e.MultiView=e.Mix=e.Liquid=e.addWaterWave=e.Line=e.Histogram=e.Heatmap=e.Gauge=e.FUNNEL_CONVERSATION_FIELD=e.Funnel=e.Facet=e.DualAxes=e.Column=e.CirclePacking=e.Chord=e.Bullet=e.Box=e.BidirectionalBar=e.Bar=e.Area=e.Lab=e.Plot=e.setGlobal=e.schema=e.polygon=e.point=e.line=e.interval=e.area=e.version=void 0,e.adaptors=e.registerLocale=e.G2=e.getCanvasPattern=e.measureTextWidth=void 0;var i=n(1);e.version="2.4.31";var r=i.__importStar(n(10));e.G2=r;var o=n(13),a=n(66);Object.defineProperty(e,"registerLocale",{enumerable:!0,get:function(){return a.registerLocale}});var s=n(220),c=n(221),l=n(19);Object.defineProperty(e,"area",{enumerable:!0,get:function(){return l.area}}),Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return l.interval}}),Object.defineProperty(e,"line",{enumerable:!0,get:function(){return l.line}}),Object.defineProperty(e,"point",{enumerable:!0,get:function(){return l.point}}),Object.defineProperty(e,"polygon",{enumerable:!0,get:function(){return l.polygon}}),Object.defineProperty(e,"schema",{enumerable:!0,get:function(){return l.schema}});var u=n(113);Object.defineProperty(e,"setGlobal",{enumerable:!0,get:function(){return u.setGlobal}});var h=n(8);Object.defineProperty(e,"Plot",{enumerable:!0,get:function(){return h.Plot}});var f=n(234);Object.defineProperty(e,"Lab",{enumerable:!0,get:function(){return f.Lab}});var p=n(120);Object.defineProperty(e,"Area",{enumerable:!0,get:function(){return p.Area}});var d=n(122);Object.defineProperty(e,"Bar",{enumerable:!0,get:function(){return d.Bar}});var g=n(263);Object.defineProperty(e,"BidirectionalBar",{enumerable:!0,get:function(){return g.BidirectionalBar}});var y=n(265);Object.defineProperty(e,"Box",{enumerable:!0,get:function(){return y.Box}});var v=n(267);Object.defineProperty(e,"Bullet",{enumerable:!0,get:function(){return v.Bullet}});var m=n(270);Object.defineProperty(e,"Chord",{enumerable:!0,get:function(){return m.Chord}});var b=n(273);Object.defineProperty(e,"CirclePacking",{enumerable:!0,get:function(){return b.CirclePacking}});var x=n(127);Object.defineProperty(e,"Column",{enumerable:!0,get:function(){return x.Column}});var _=n(278);Object.defineProperty(e,"DualAxes",{enumerable:!0,get:function(){return _.DualAxes}});var O=n(283);Object.defineProperty(e,"Facet",{enumerable:!0,get:function(){return O.Facet}});var w=n(128);Object.defineProperty(e,"Funnel",{enumerable:!0,get:function(){return w.Funnel}}),Object.defineProperty(e,"FUNNEL_CONVERSATION_FIELD",{enumerable:!0,get:function(){return w.FUNNEL_CONVERSATION_FIELD}});var j=n(132);Object.defineProperty(e,"Gauge",{enumerable:!0,get:function(){return j.Gauge}});var S=n(287);Object.defineProperty(e,"Heatmap",{enumerable:!0,get:function(){return S.Heatmap}});var M=n(135);Object.defineProperty(e,"Histogram",{enumerable:!0,get:function(){return M.Histogram}});var A=n(139);Object.defineProperty(e,"Line",{enumerable:!0,get:function(){return A.Line}});var C=n(292);Object.defineProperty(e,"addWaterWave",{enumerable:!0,get:function(){return C.addWaterWave}}),Object.defineProperty(e,"Liquid",{enumerable:!0,get:function(){return C.Liquid}});var E=n(118);Object.defineProperty(e,"Mix",{enumerable:!0,get:function(){return E.Mix}}),Object.defineProperty(e,"MultiView",{enumerable:!0,get:function(){return E.Mix}});var I=n(140);Object.defineProperty(e,"Pie",{enumerable:!0,get:function(){return I.Pie}});var P=n(146);Object.defineProperty(e,"Progress",{enumerable:!0,get:function(){return P.Progress}});var T=n(295);Object.defineProperty(e,"Radar",{enumerable:!0,get:function(){return T.Radar}});var F=n(299);Object.defineProperty(e,"RadialBar",{enumerable:!0,get:function(){return F.RadialBar}});var L=n(148);Object.defineProperty(e,"RingProgress",{enumerable:!0,get:function(){return L.RingProgress}});var k=n(303);Object.defineProperty(e,"Rose",{enumerable:!0,get:function(){return k.Rose}});var D=n(306);Object.defineProperty(e,"Sankey",{enumerable:!0,get:function(){return D.Sankey}});var B=n(150);Object.defineProperty(e,"Scatter",{enumerable:!0,get:function(){return B.Scatter}});var N=n(153);Object.defineProperty(e,"Stock",{enumerable:!0,get:function(){return N.Stock}});var R=n(316);Object.defineProperty(e,"Sunburst",{enumerable:!0,get:function(){return R.Sunburst}});var V=n(156);Object.defineProperty(e,"TinyArea",{enumerable:!0,get:function(){return V.TinyArea}});var z=n(157);Object.defineProperty(e,"TinyColumn",{enumerable:!0,get:function(){return z.TinyColumn}});var G=n(159);Object.defineProperty(e,"TinyLine",{enumerable:!0,get:function(){return G.TinyLine}});var Y=n(321);Object.defineProperty(e,"Treemap",{enumerable:!0,get:function(){return Y.Treemap}});var W=n(325);Object.defineProperty(e,"Venn",{enumerable:!0,get:function(){return W.Venn}});var X=n(338);Object.defineProperty(e,"Violin",{enumerable:!0,get:function(){return X.Violin}});var H=n(343);Object.defineProperty(e,"Waterfall",{enumerable:!0,get:function(){return H.Waterfall}});var U=n(346);Object.defineProperty(e,"WordCloud",{enumerable:!0,get:function(){return U.WordCloud}});var q=n(350);Object.defineProperty(e,"P",{enumerable:!0,get:function(){return q.P}}),i.__exportStar(n(351),e);var Z=n(2);Object.defineProperty(e,"flow",{enumerable:!0,get:function(){return Z.flow}}),Object.defineProperty(e,"measureTextWidth",{enumerable:!0,get:function(){return Z.measureTextWidth}});var $=n(112);Object.defineProperty(e,"getCanvasPattern",{enumerable:!0,get:function(){return $.getCanvasPattern}}),(0,a.registerLocale)("en-US",s.EN_US_LOCALE),(0,a.registerLocale)("zh-CN",c.ZH_CN_LOCALE),e.adaptors={scale:o.scale,legend:o.legend,tooltip:o.tooltip,annotation:o.annotation,interaction:o.interaction,theme:o.theme,animation:o.animation}},,,,,,,,function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,l=[],u=!1,h=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!u){var t=s(f);u=!0;for(var e=l.length;e;){for(c=l,l=[];++h1)for(var n=1;n_){var w=O/v.length,j=Math.max(1,Math.ceil(_/w)-1),S="".concat(v.slice(0,j),"...");x.attr("text",S)}}}}(t,e,n)}e.conversionTag=function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!1),function(i){var s=i.options,l=i.chart,h=s.conversionTag,f=s.theme;return h&&!n&&(l.theme((0,a.deepAssign)({},(0,o.isObject)(f)?f:(0,r.getTheme)(f),{columnWidthRatio:1/3})),l.annotation().shape({render:function(n,i){var r=n.addGroup({id:"".concat(l.id,"-conversion-tag-group"),name:"conversion-tag-group"}),a=(0,o.find)(l.geometries,(function(t){return"interval"===t.type})),s={view:i,geometry:a,group:r,field:t,horizontal:e,options:c(h,e)},f=a.elements;(0,o.each)(f,(function(t,e){e>0&&u(s,f[e-1],t)}))}})),i}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(8),r=n(2);e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(8),r=n(2);e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicHeightFunnel=void 0;var i=n(1),r=n(0),o=n(28),a=n(2),s=n(32),c=n(48),l=n(67);function u(t){var e=t.chart,n=t.options,i=n.data,o=void 0===i?[]:i,a=n.yField,s=(0,r.reduce)(o,(function(t,e){return t+(e[a]||0)}),0),l=(0,r.maxBy)(o,a)[a],u=(0,r.map)(o,(function(t,e){var n=[],i=[];if(t[c.FUNNEL_TOTAL_PERCENT]=(t[a]||0)/s,e){var u=o[e-1][c.PLOYGON_X],h=o[e-1][c.PLOYGON_Y];n[0]=u[3],i[0]=h[3],n[1]=u[2],i[1]=h[2]}else n[0]=-.5,i[0]=1,n[1]=.5,i[1]=1;return i[2]=i[1]-t[c.FUNNEL_TOTAL_PERCENT],n[2]=(i[2]+1)/4,i[3]=i[2],n[3]=-n[2],t[c.PLOYGON_X]=n,t[c.PLOYGON_Y]=i,t[c.FUNNEL_PERCENT]=(t[a]||0)/l,t[c.FUNNEL_CONVERSATION]=[(0,r.get)(o,[e-1,a]),t[a]],t}));return e.data(u),t}function h(t){var e=t.chart,n=t.options,i=n.xField,a=n.yField,l=n.color,u=n.tooltip,h=n.label,f=n.funnelStyle,p=n.state,d=(0,s.getTooltipMapping)(u,[i,a]),g=d.fields,y=d.formatter;return(0,o.geometry)({chart:e,options:{type:"polygon",xField:c.PLOYGON_X,yField:c.PLOYGON_Y,colorField:i,tooltipFields:(0,r.isArray)(g)&&g.concat([c.FUNNEL_PERCENT,c.FUNNEL_CONVERSATION]),label:h,state:p,mapping:{tooltip:y,color:l,style:f}}}),t}function f(t){var e=t.chart,n=t.options.isTransposed;return e.coordinate({type:"rect",actions:n?[["transpose"],["reflect","x"]]:[]}),t}function p(t){return(0,l.conversionTagComponent)((function(t,e,n,r){return i.__assign(i.__assign({},r),{start:[t[c.PLOYGON_X][1],t[c.PLOYGON_Y][1]],end:[t[c.PLOYGON_X][1]+.05,t[c.PLOYGON_Y][1]]})}))(t),t}e.dynamicHeightFunnel=function(t){return(0,a.flow)(u,h,f,p)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.facetFunnel=void 0;var i=n(2),r=n(87);function o(t){var e,n=t.chart,i=t.options,r=i.data,o=void 0===r?[]:r,a=i.yField;return n.data(o),n.scale(((e={})[a]={sync:!0},e)),t}function a(t){var e=t.chart,n=t.options,o=n.seriesField,a=n.isTransposed,s=n.showFacetTitle;return e.facet("rect",{fields:[o],padding:[a?0:32,10,0,10],showTitle:s,eachView:function(e,n){(0,r.basicFunnel)((0,i.deepAssign)({},t,{chart:e,options:{data:n.data}}))}}),t}e.facetFunnel=function(t){return(0,i.flow)(o,a)(t)}},function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.ConversionTagAction=void 0;var r=n(1),o=n(10),a=n(0),s=n(87),c=n(67),l=n(130),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rendering=!1,e}return r.__extends(e,t),e.prototype.change=function(t){var e=this;if(!this.rendering){var n=t.seriesField,o=t.compareField,u=o?l.compareConversionTag:s.conversionTag,h=this.context.view,f=n||o?h.views:[h];(0,a.map)(f,(function(n,o){var s=n.getController("annotation"),l=(0,a.filter)((0,a.get)(s,["option"],[]),(function(t){return t.name!==c.CONVERSION_TAG_NAME}));s.clear(!0),(0,a.each)(l,(function(t){"object"===i(t)&&n.annotation()[t.type](t)}));var h=(0,a.get)(n,["filteredData"],n.getOptions().data);u({chart:n,index:o,options:r.__assign(r.__assign({},t),{filteredData:(0,c.transformData)(h,h,t)})}),n.filterData(h),e.rendering=!0,n.render(!0)}))}this.rendering=!1},e}(o.Action);e.ConversionTagAction=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);(0,n(10).registerShape)("point","gauge-indicator",{draw:function(t,e){var n=t.customInfo,r=n.indicator,o=n.defaultColor,a=r,s=a.pointer,c=a.pin,l=e.addGroup(),u=this.parsePoint({x:0,y:0});return s&&l.addShape("line",{name:"pointer",attrs:i.__assign({x1:u.x,y1:u.y,x2:t.x,y2:t.y,stroke:o},s.style)}),c&&l.addShape("circle",{name:"pin",attrs:i.__assign({x:u.x,y:u.y,stroke:o},c.style)}),l}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(10),r=n(0);(0,i.registerShape)("interval","meter-gauge",{draw:function(t,e){var n=t.customInfo.meter,o=void 0===n?{}:n,a=o.steps,s=void 0===a?50:a,c=o.stepRatio,l=void 0===c?.5:c;s=s<1?1:s,l=(0,r.clamp)(l,0,1);var u=this.coordinate,h=u.startAngle,f=u.endAngle,p=0;l>0&&l<1&&(p=(f-h)/s/(l/(1-l)+1-1/s));for(var d=p/(1-l)*l,g=e.addGroup(),y=this.coordinate.getCenter(),v=this.coordinate.getRadius(),m=i.Util.getAngle(t,this.coordinate),b=m.startAngle,x=m.endAngle,_=b;_r&&(t.splice(o+1,0,f),i=!0)}return i}}function l(t,e,n,i){var r=i-t*t,o=Math.abs(r)<1e-24?0:(n-t*e)/r;return[e-o*t,o]}function u(){var t,e=function(t){return t[0]},n=function(t){return t[1]};function r(r){var s=0,u=0,h=0,f=0,p=0,d=0,g=t?+t[0]:1/0,y=t?+t[1]:-1/0;o(r,e,n,(function(e,n){var i=Math.log(n),r=e*n;++s,u+=(n-u)/s,f+=(r-f)/s,d+=(e*r-d)/s,h+=(n*i-h)/s,p+=(r*i-p)/s,t||(ey&&(y=e))}));var v=i(l(f/u,h/u,p/u,d/u),2),m=v[0],b=v[1];m=Math.exp(m);var x=function(t){return m*Math.exp(b*t)},_=c(g,y,x);return _.a=m,_.b=b,_.predict=x,_.rSquared=a(r,e,n,u,x),_}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r}function h(){var t,e=function(t){return t[0]},n=function(t){return t[1]};function r(r){var s=0,c=0,u=0,h=0,f=0,p=t?+t[0]:1/0,d=t?+t[1]:-1/0;o(r,e,n,(function(e,n){++s,c+=(e-c)/s,u+=(n-u)/s,h+=(e*n-h)/s,f+=(e*e-f)/s,t||(ed&&(d=e))}));var g=i(l(c,u,h,f),2),y=g[0],v=g[1],m=function(t){return v*t+y},b=[[p,m(p)],[d,m(d)]];return b.a=v,b.b=y,b.predict=m,b.rSquared=a(r,e,n,u,m),b}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r}function f(t){t.sort((function(t,e){return t-e}));var e=t.length/2;return e%1==0?(t[e-1]+t[e])/2:t[Math.floor(e)]}n.r(e),n.d(e,"regressionExp",(function(){return u})),n.d(e,"regressionLinear",(function(){return h})),n.d(e,"regressionLoess",(function(){return p})),n.d(e,"regressionLog",(function(){return y})),n.d(e,"regressionPoly",(function(){return m})),n.d(e,"regressionPow",(function(){return b})),n.d(e,"regressionQuad",(function(){return v}));function p(){var t=function(t){return t[0]},e=function(t){return t[1]},n=.3;function o(o){for(var a=i(r(o,t,e,!0),4),s=a[0],c=a[1],u=a[2],h=a[3],p=s.length,y=Math.max(2,~~(n*p)),v=new Float64Array(p),m=new Float64Array(p),b=new Float64Array(p).fill(1),x=-1;++x<=2;){for(var _=[0,y-1],O=0;Os[S]-w?j:S,A=0,C=0,E=0,I=0,P=0,T=1/Math.abs(s[M]-w||1),F=j;F<=S;++F){var L=s[F],k=c[F],D=d(Math.abs(w-L)*T)*b[F],B=L*D;A+=D,C+=B,E+=k*D,I+=k*B,P+=L*B}var N=i(l(C/A,E/A,I/A,P/A),2),R=N[0],V=N[1];v[O]=R+V*w,m[O]=Math.abs(c[O]-v[O]),g(s,O+1,_)}if(2===x)break;var z=f(m);if(Math.abs(z)<1e-12)break;for(var G,Y,W=0;W=1?1e-12:(Y=1-G*G)*Y}return function(t,e,n,i){for(var r,o=t.length,a=[],s=0,c=0,l=[];s=t.length))for(;e>r&&t[o]-i<=i-t[r];)n[0]=++r,n[1]=o,++o}function y(){var t,e=function(t){return t[0]},n=function(t){return t[1]},r=Math.E;function s(s){var u=0,h=0,f=0,p=0,d=0,g=t?+t[0]:1/0,y=t?+t[1]:-1/0,v=Math.log(r);o(s,e,n,(function(e,n){var i=Math.log(e)/v;++u,h+=(i-h)/u,f+=(n-f)/u,p+=(i*n-p)/u,d+=(i*i-d)/u,t||(ey&&(y=e))}));var m=i(l(h,f,p,d),2),b=m[0],x=m[1],_=function(t){return x*Math.log(t)/v+b},O=c(g,y,_);return O.a=x,O.b=b,O.predict=_,O.rSquared=a(s,e,n,f,_),O}return s.domain=function(e){return arguments.length?(t=e,s):t},s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(n=t,s):n},s.base=function(t){return arguments.length?(r=t,s):r},s}function v(){var t,e=function(t){return t[0]},n=function(t){return t[1]};function s(s){var l,u,h,f,p=i(r(s,e,n),4),d=p[0],g=p[1],y=p[2],v=p[3],m=d.length,b=0,x=0,_=0,O=0,w=0;for(l=0;lA&&(A=e))}));var C=_-b*b,E=b*C-x*x,I=(w*b-O*x)/E,P=(O*C-w*x)/E,T=-I*b,F=function(t){return I*(t-=y)*t+P*t+T+v},L=c(M,A,F);return L.a=I,L.b=P-2*I*y,L.c=T-P*y+I*y*y+v,L.predict=F,L.rSquared=a(s,e,n,j,F),L}return s.domain=function(e){return arguments.length?(t=e,s):t},s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(n=t,s):n},s}function m(){var t,e=function(t){return t[0]},n=function(t){return t[1]},s=3;function l(l){if(1===s){var u=h().x(e).y(n).domain(t)(l);return u.coefficients=[u.b,u.a],delete u.a,delete u.b,u}if(2===s){var f=v().x(e).y(n).domain(t)(l);return f.coefficients=[f.c,f.b,f.a],delete f.a,delete f.b,delete f.c,f}var p,d,g,y,m,b=i(r(l,e,n),4),x=b[0],_=b[1],O=b[2],w=b[3],j=x.length,S=[],M=[],A=s+1,C=0,E=0,I=t?+t[0]:1/0,P=t?+t[1]:-1/0;for(o(l,e,n,(function(e,n){++E,C+=(n-C)/E,t||(eP&&(P=e))})),p=0;pMath.abs(t[e][r])&&(r=n);for(i=e;i=e;i--)t[i][n]-=t[i][e]*t[e][n]/t[e][e]}for(n=a-1;n>=0;--n){for(o=0,i=n+1;i=0;--r)for(a=e[r],s=1,c[r]+=a,o=1;o<=r;++o)s*=(r+1-o)/o,c[r-o]+=a*Math.pow(n,o)*s;return c[0]+=i,c}(A,T,-O,w),L.predict=F,L.rSquared=a(l,e,n,C,F),L}return l.domain=function(e){return arguments.length?(t=e,l):t},l.x=function(t){return arguments.length?(e=t,l):e},l.y=function(t){return arguments.length?(n=t,l):n},l.order=function(t){return arguments.length?(s=t,l):s},l}function b(){var t,e=function(t){return t[0]},n=function(t){return t[1]};function r(r){var s=0,u=0,h=0,f=0,p=0,d=0,g=t?+t[0]:1/0,y=t?+t[1]:-1/0;o(r,e,n,(function(e,n){var i=Math.log(e),r=Math.log(n);++s,u+=(i-u)/s,h+=(r-h)/s,f+=(i*r-f)/s,p+=(i*i-p)/s,d+=(n-d)/s,t||(ey&&(y=e))}));var v=i(l(u,h,f,p),2),m=v[0],b=v[1];m=Math.exp(m);var x=function(t){return m*Math.pow(t,b)},_=c(g,y,x);return _.a=m,_.b=b,_.predict=x,_.rSquared=a(r,e,n,d,x),_}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(8),r=n(2);e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(152)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(1),r=n(57);e.DEFAULT_OPTIONS={appendPadding:2,tooltip:i.__assign({},r.DEFAULT_TOOLTIP_OPTIONS),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=e.DEFAULT_TOOLTIP_OPTIONS=void 0;var i=n(1),r=n(0);e.DEFAULT_TOOLTIP_OPTIONS={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(t,e){return"".concat((0,r.get)(e,[0,"data","y"],0))},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},e.DEFAULT_OPTIONS={appendPadding:2,tooltip:i.__assign({},e.DEFAULT_TOOLTIP_OPTIONS),animation:{}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(261)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(10),o=n(0),a=n(2),s=n(262),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getAssociationItems=function(t,e){var n,i=this.context.event,r=e||{},c=r.linkField,l=r.dim,u=[];if(null===(n=i.data)||void 0===n?void 0:n.data){var h=i.data.data;(0,o.each)(t,(function(t){var e,n,i=c;if("x"===l?i=t.getXScale().field:"y"===l?i=null===(e=t.getYScales().find((function(t){return t.field===i})))||void 0===e?void 0:e.field:i||(i=null===(n=t.getGroupScales()[0])||void 0===n?void 0:n.field),i){var r=(0,o.map)((0,a.getAllElements)(t),(function(e){var n=!1,r=!1,a=(0,o.isArray)(h)?(0,o.get)(h[0],i):(0,o.get)(h,i);return(0,s.getElementValue)(e,i)===a?n=!0:r=!0,{element:e,view:t,active:n,inactive:r}}));u.push.apply(u,r)}}))}return u},e.prototype.showTooltip=function(t){var e=(0,a.getSiblingViews)(this.context.view),n=this.getAssociationItems(e,t);(0,o.each)(n,(function(t){if(t.active){var e=t.element.shape.getCanvasBBox();t.view.showTooltip({x:e.minX+e.width/2,y:e.minY+e.height/2})}}))},e.prototype.hideTooltip=function(){var t=(0,a.getSiblingViews)(this.context.view);(0,o.each)(t,(function(t){t.hideTooltip()}))},e.prototype.active=function(t){var e=(0,a.getViews)(this.context.view),n=this.getAssociationItems(e,t);(0,o.each)(n,(function(t){var e=t.active,n=t.element;e&&n.setState("active",!0)}))},e.prototype.selected=function(t){var e=(0,a.getViews)(this.context.view),n=this.getAssociationItems(e,t);(0,o.each)(n,(function(t){var e=t.active,n=t.element;e&&n.setState("selected",!0)}))},e.prototype.highlight=function(t){var e=(0,a.getViews)(this.context.view),n=this.getAssociationItems(e,t);(0,o.each)(n,(function(t){var e=t.inactive,n=t.element;e&&n.setState("inactive",!0)}))},e.prototype.reset=function(){var t=(0,a.getViews)(this.context.view);(0,o.each)(t,(function(t){(0,s.clearHighlight)(t)}))},e}(r.Action);(0,r.registerAction)("association",c),(0,r.registerInteraction)("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),(0,r.registerInteraction)("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),(0,r.registerInteraction)("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),(0,r.registerInteraction)("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clearHighlight=e.getElementValue=void 0;var i=n(0),r=n(2);e.getElementValue=function(t,e){var n=t.getModel().data;return(0,i.isArray)(n)?n[0][e]:n[e]},e.clearHighlight=function(t){var e=(0,r.getAllElements)(t);(0,i.each)(e,(function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BidirectionalBar=void 0;var i=n(1),r=n(10),o=n(8),a=n(2),s=n(264),c=n(161),l=n(162),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bidirectional-bar",e}return i.__extends(e,t),e.getDefaultOptions=function(){return(0,a.deepAssign)({},t.getDefaultOptions.call(this),{syncViewPadding:l.syncViewPadding})},e.prototype.changeData=function(t){void 0===t&&(t=[]),this.chart.emit(r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var e=this.options,n=e.xField,i=e.yField,o=e.layout,s=(0,l.transformData)(n,i,c.SERIES_FIELD_KEY,t,(0,l.isHorizontal)(o)),u=s[0],h=s[1],f=(0,a.findViewById)(this.chart,c.FIRST_AXES_VIEW),p=(0,a.findViewById)(this.chart,c.SECOND_AXES_VIEW);f.data(u),p.data(h),this.chart.render(!0),this.chart.emit(r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return s.adaptor},e.SERIES_FIELD_KEY=c.SERIES_FIELD_KEY,e}(o.Plot);e.BidirectionalBar=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.animation=e.theme=e.limitInPlot=e.interaction=void 0;var i=n(1),r=n(0),o=n(13),a=n(19),s=n(2),c=n(161),l=n(162);function u(t){var e,n,i=t.chart,r=t.options,o=r.data,u=r.xField,h=r.yField,f=r.color,p=r.barStyle,d=r.widthRatio,g=r.legend,y=r.layout,v=(0,l.transformData)(u,h,c.SERIES_FIELD_KEY,o,(0,l.isHorizontal)(y));g?i.legend(c.SERIES_FIELD_KEY,g):!1===g&&i.legend(!1);var m=v[0],b=v[1];(0,l.isHorizontal)(y)?((e=i.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:c.FIRST_AXES_VIEW})).coordinate().transpose().reflect("x"),(n=i.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:c.SECOND_AXES_VIEW})).coordinate().transpose(),e.data(m),n.data(b)):(e=i.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:c.FIRST_AXES_VIEW}),(n=i.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:c.SECOND_AXES_VIEW})).coordinate().reflect("y"),e.data(m),n.data(b));var x=(0,s.deepAssign)({},t,{chart:e,options:{widthRatio:d,xField:u,yField:h[0],seriesField:c.SERIES_FIELD_KEY,interval:{color:f,style:p}}});(0,a.interval)(x);var _=(0,s.deepAssign)({},t,{chart:n,options:{xField:u,yField:h[1],seriesField:c.SERIES_FIELD_KEY,widthRatio:d,interval:{color:f,style:p}}});return(0,a.interval)(_),t}function h(t){var e,n,i,a=t.options,l=t.chart,u=a.xAxis,h=a.yAxis,f=a.xField,p=a.yField,d=(0,s.findViewById)(l,c.FIRST_AXES_VIEW),g=(0,s.findViewById)(l,c.SECOND_AXES_VIEW),y={};return(0,r.keys)((null==a?void 0:a.meta)||{}).map((function(t){(0,r.get)(null==a?void 0:a.meta,[t,"alias"])&&(y[t]=a.meta[t].alias)})),l.scale(((e={})[c.SERIES_FIELD_KEY]={sync:!0,formatter:function(t){return(0,r.get)(y,t,t)}},e)),(0,o.scale)(((n={})[f]=u,n[p[0]]=h[p[0]],n))((0,s.deepAssign)({},t,{chart:d})),(0,o.scale)(((i={})[f]=u,i[p[1]]=h[p[1]],i))((0,s.deepAssign)({},t,{chart:g})),t}function f(t){var e=t.chart,n=t.options,r=n.xAxis,o=n.yAxis,a=n.xField,u=n.yField,h=n.layout,f=(0,s.findViewById)(e,c.FIRST_AXES_VIEW),p=(0,s.findViewById)(e,c.SECOND_AXES_VIEW);return"bottom"===(null==r?void 0:r.position)?p.axis(a,i.__assign(i.__assign({},r),{label:{formatter:function(){return""}}})):p.axis(a,!1),!1===r?f.axis(a,!1):f.axis(a,i.__assign({position:(0,l.isHorizontal)(h)?"top":"bottom"},r)),!1===o?(f.axis(u[0],!1),p.axis(u[1],!1)):(f.axis(u[0],o[u[0]]),p.axis(u[1],o[u[1]])),e.__axisPosition={position:f.getOptions().axes[a].position,layout:h},t}function p(t){var e=t.chart;return(0,o.interaction)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.FIRST_AXES_VIEW)})),(0,o.interaction)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.SECOND_AXES_VIEW)})),t}function d(t){var e=t.chart,n=t.options,i=n.yField,r=n.yAxis;return(0,o.limitInPlot)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.FIRST_AXES_VIEW),options:{yAxis:r[i[0]]}})),(0,o.limitInPlot)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.SECOND_AXES_VIEW),options:{yAxis:r[i[1]]}})),t}function g(t){var e=t.chart;return(0,o.theme)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.FIRST_AXES_VIEW)})),(0,o.theme)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.SECOND_AXES_VIEW)})),(0,o.theme)(t),t}function y(t){var e=t.chart;return(0,o.animation)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.FIRST_AXES_VIEW)})),(0,o.animation)((0,s.deepAssign)({},t,{chart:(0,s.findViewById)(e,c.SECOND_AXES_VIEW)})),t}function v(t){var e,n,r=this,o=t.chart,a=t.options,u=a.label,h=a.yField,f=a.layout,p=(0,s.findViewById)(o,c.FIRST_AXES_VIEW),d=(0,s.findViewById)(o,c.SECOND_AXES_VIEW),g=(0,s.findGeometry)(p,"interval"),y=(0,s.findGeometry)(d,"interval");if(u){var v=u.callback,m=i.__rest(u,["callback"]);m.position||(m.position="middle"),void 0===m.offset&&(m.offset=2);var b=i.__assign({},m);if((0,l.isHorizontal)(f)){var x=(null===(e=b.style)||void 0===e?void 0:e.textAlign)||("middle"===m.position?"center":"left");m.style=(0,s.deepAssign)({},m.style,{textAlign:x});b.style=(0,s.deepAssign)({},b.style,{textAlign:{left:"right",right:"left",center:"center"}[x]})}else{var _={top:"bottom",bottom:"top",middle:"middle"};"string"==typeof m.position?m.position=_[m.position]:"function"==typeof m.position&&(m.position=function(){for(var t=[],e=0;e=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var r=i/(2*n),o=e.nodeWidthRatio;if(o<=0||o>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var a=0;t.forEach((function(t){a+=t.value})),t.forEach((function(t){t.weight=t.value/a,t.width=t.weight*(1-i),t.height=o})),t.forEach((function(n,i){for(var a=0,s=i-1;s>=0;s--)a+=t[s].width+2*r;var c=n.minX=r+a,l=n.maxX=n.minX+n.width,u=n.minY=e.y-o/2,h=n.maxY=u+o;n.x=[c,l,l,c],n.y=[u,u,h,h]}))}else{var s=1/n;t.forEach((function(t,n){t.x=(n+.5)*s,t.y=e.y}))}return t}(a,n),links:function(t,e,n){if(n.weight){var r={};(0,i.forIn)(t,(function(t,e){r[e]=t.value})),e.forEach((function(e){var i=n.source(e),o=n.target(e),a=t[i],s=t[o];if(a&&s){var c=r[i],l=n.sourceWeight(e),u=a.minX+(a.value-c)/a.value*a.width,h=u+l/a.value*a.width;r[i]-=l;var f=r[o],p=n.targetWeight(e),d=s.minX+(s.value-f)/s.value*s.width,g=d+p/s.value*s.width;r[o]-=p;var y=n.y;e.x=[u,h,d,g],e.y=[y,y,y,y],e.source=a,e.target=s}}))}else e.forEach((function(e){var i=t[n.source(e)],r=t[n.target(e)];i&&r&&(e.x=[i.x,r.x],e.y=[i.y,r.y],e.source=i,e.target=r)}));return e}(r,s,n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CirclePacking=void 0;var i=n(1),r=n(8),o=n(274),a=n(166);n(277);var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-packing",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},e}(r.Plot);e.CirclePacking=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.meta=void 0;var i=n(1),r=n(0),o=n(13),a=n(114),s=n(2),c=n(45),l=n(166),u=n(275);function h(t){var e=t.chart,n=Math.min(e.viewBBox.width,e.viewBBox.height);return(0,s.deepAssign)({options:{size:function(t){return t.r*n}}},t)}function f(t){var e=t.options,n=t.chart,i=n.viewBBox,o=e.padding,a=e.appendPadding,s=e.drilldown,l=a;if(null==s?void 0:s.enabled){var h=(0,c.getAdjustAppendPadding)(n.appendPadding,(0,r.get)(s,["breadCrumb","position"]));l=(0,c.resolveAllPadding)([h,a])}var f=(0,u.resolvePaddingForCircle)(o,l,i).finalPadding;return n.padding=f,n.appendPadding=0,t}function p(t){var e=t.chart,n=t.options,r=e.padding,o=e.appendPadding,c=n.color,h=n.colorField,f=n.pointStyle,p=n.hierarchyConfig,d=n.sizeField,g=n.rawFields,y=void 0===g?[]:g,v=n.drilldown,m=(0,u.transformData)({data:n.data,hierarchyConfig:p,enableDrillDown:null==v?void 0:v.enabled,rawFields:y});e.data(m);var b=e.viewBBox,x=(0,u.resolvePaddingForCircle)(r,o,b).finalSize,_=function(t){return t.r*x};return d&&(_=function(t){return t[d]*x}),(0,a.point)((0,s.deepAssign)({},t,{options:{xField:"x",yField:"y",seriesField:h,sizeField:d,rawFields:i.__spreadArray(i.__spreadArray([],l.RAW_FIELDS,!0),y,!0),point:{color:c,style:f,shape:"circle",size:_}}})),t}function d(t){return(0,s.flow)((0,o.scale)({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(t)}function g(t){var e=t.chart,n=t.options.tooltip;if(!1===n)e.tooltip(!1);else{var o=n;(0,r.get)(n,"fields")||(o=(0,s.deepAssign)({},{customItems:function(t){return t.map((function(t){var n=(0,r.get)(e.getOptions(),"scales"),o=(0,r.get)(n,["name","formatter"],(function(t){return t})),a=(0,r.get)(n,["value","formatter"],(function(t){return t}));return i.__assign(i.__assign({},t),{name:o(t.data.name),value:a(t.data.value)})}))}},o)),e.tooltip(o)}return t}function y(t){return t.chart.axis(!1),t}function v(t){var e=t.drilldown,n=t.interactions,r=void 0===n?[]:n;return(null==e?void 0:e.enabled)?(0,s.deepAssign)({},t,{interactions:i.__spreadArray(i.__spreadArray([],r,!0),[{type:"drill-down",cfg:{drillDownConfig:e,transformData:u.transformData,enableDrillDown:!0}}],!1)}):t}function m(t){var e=t.chart,n=t.options;return(0,o.interaction)({chart:e,options:v(n)}),t}e.meta=d,e.adaptor=function(t){return(0,s.flow)((0,o.pattern)("pointStyle"),h,f,o.theme,d,p,y,o.legend,g,m,o.animation,(0,o.annotation)())(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolvePaddingForCircle=e.transformData=void 0;var i=n(1),r=n(69),o=n(2),a=n(276),s=n(45);e.transformData=function(t){var e=t.data,n=t.hierarchyConfig,s=t.rawFields,c=void 0===s?[]:s,l=t.enableDrillDown,u=(0,a.pack)(e,i.__assign(i.__assign({},n),{field:"value",as:["x","y","r"]})),h=[];return u.forEach((function(t){for(var e,a=t.data.name,s=i.__assign({},t);s.depth>1;)a="".concat(null===(e=s.parent.data)||void 0===e?void 0:e.name," / ").concat(a),s=s.parent;if(l&&t.depth>2)return null;var u=(0,o.deepAssign)({},t.data,i.__assign(i.__assign(i.__assign({},(0,o.pick)(t.data,c)),{path:a}),t));u.ext=n,u[r.HIERARCHY_DATA_TRANSFORM_PARAMS]={hierarchyConfig:n,rawFields:c,enableDrillDown:l},h.push(u)})),h},e.resolvePaddingForCircle=function(t,e,n){var i=(0,s.resolveAllPadding)([t,e]),r=i[0],o=i[1],a=i[2],c=i[3],l=n.width-(c+o),u=n.height-(r+a),h=Math.min(l,u),f=(l-h)/2,p=(u-h)/2;return{finalPadding:[r+p,o+f,a+p,c+f],finalSize:h<0?0:h}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pack=void 0;var i=n(1),r=n(0),o=i.__importStar(n(99)),a=n(58),s={field:"value",as:["x","y","r"],sort:function(t,e){return e.value-t.value}};e.pack=function(t,e){var n,i=(e=(0,r.assign)({},s,e)).as;if(!(0,r.isArray)(i)||3!==i.length)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');try{n=(0,a.getField)(e)}catch(t){console.warn(t)}var c=function(t){return o.pack().size(e.size).padding(e.padding)(o.hierarchy(t).sum((function(t){return t[n]})).sort(e.sort))}(t),l=i[0],u=i[1],h=i[2];return c.each((function(t){t[l]=t.x,t[u]=t.y,t[h]=t.r})),(0,a.getAllNodes)(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(93)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DualAxes=void 0;var i=n(1),r=n(8),o=n(2),a=n(279),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dual-axes",e}return i.__extends(e,t),e.prototype.getDefaultOptions=function(){return(0,o.deepAssign)({},t.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},e.prototype.getSchemaAdaptor=function(){return a.adaptor},e}(r.Plot);e.DualAxes=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.slider=e.legend=e.limitInPlot=e.animation=e.theme=e.annotation=e.interaction=e.tooltip=e.axis=e.meta=e.color=e.transformOptions=void 0;var i=n(1),r=n(0),o=n(13),a=n(2),s=n(47),c=n(65),l=n(167),u=n(168),h=n(280),f=n(281),p=n(94),d=n(282);function g(t){var e,n=t.options,i=n.geometryOptions,o=void 0===i?[]:i,s=n.xField,c=n.yField,l=(0,r.every)(o,(function(t){var e=t.geometry;return e===u.DualAxesGeometry.Line||void 0===e}));return(0,a.deepAssign)({},{options:{geometryOptions:[],meta:(e={},e[s]={type:"cat",sync:!0,range:l?[0,1]:void 0},e),tooltip:{showMarkers:l,showCrosshairs:l,shared:!0,crosshairs:{type:"x"}},interactions:l?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},t,{options:{yAxis:(0,p.transformObjectToArray)(c,n.yAxis),geometryOptions:[(0,p.getGeometryOption)(s,c[0],o[0]),(0,p.getGeometryOption)(s,c[1],o[1])],annotations:(0,p.transformObjectToArray)(c,n.annotations)}})}function y(t){var e,n,i=t.chart,r=t.options.geometryOptions,o={line:0,column:1};return[{type:null===(e=r[0])||void 0===e?void 0:e.geometry,id:l.LEFT_AXES_VIEW},{type:null===(n=r[1])||void 0===n?void 0:n.geometry,id:l.RIGHT_AXES_VIEW}].sort((function(t,e){return-o[t.type]+o[e.type]})).forEach((function(t){return i.createView({id:t.id})})),t}function v(t){var e=t.chart,n=t.options,r=n.xField,o=n.yField,a=n.geometryOptions,u=n.data,f=n.tooltip;return[i.__assign(i.__assign({},a[0]),{id:l.LEFT_AXES_VIEW,data:u[0],yField:o[0]}),i.__assign(i.__assign({},a[1]),{id:l.RIGHT_AXES_VIEW,data:u[1],yField:o[1]})].forEach((function(t){var n=t.id,o=t.data,a=t.yField,l=(0,p.isColumn)(t)&&t.isPercent,u=l?(0,s.percent)(o,a,r,a):o,d=(0,c.findViewById)(e,n).data(u),g=l?i.__assign({formatter:function(e){return{name:e[t.seriesField]||a,value:(100*Number(e[a])).toFixed(2)+"%"}}},f):f;(0,h.drawSingleGeometry)({chart:d,options:{xField:r,yField:a,tooltip:g,geometryOption:t}})})),t}function m(t){var e,n=t.chart,i=t.options.geometryOptions,o=(null===(e=n.getTheme())||void 0===e?void 0:e.colors10)||[],a=0;return n.once("beforepaint",(function(){(0,r.each)(i,(function(t,e){var i=(0,c.findViewById)(n,0===e?l.LEFT_AXES_VIEW:l.RIGHT_AXES_VIEW);if(!t.color){var s=i.getGroupScales(),u=(0,r.get)(s,[0,"values","length"],1),h=o.slice(a,a+u).concat(0===e?[]:o);i.geometries.forEach((function(e){t.seriesField?e.color(t.seriesField,h):e.color(h[0])})),a+=u}})),n.render(!0)})),t}function b(t){var e,n,i=t.chart,r=t.options,s=r.xAxis,u=r.yAxis,h=r.xField,f=r.yField;return(0,o.scale)(((e={})[h]=s,e[f[0]]=u[0],e))((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(i,l.LEFT_AXES_VIEW)})),(0,o.scale)(((n={})[h]=s,n[f[1]]=u[1],n))((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(i,l.RIGHT_AXES_VIEW)})),t}function x(t){var e=t.chart,n=t.options,i=(0,c.findViewById)(e,l.LEFT_AXES_VIEW),r=(0,c.findViewById)(e,l.RIGHT_AXES_VIEW),o=n.xField,a=n.yField,s=n.xAxis,h=n.yAxis;return e.axis(o,!1),e.axis(a[0],!1),e.axis(a[1],!1),i.axis(o,s),i.axis(a[0],(0,p.getYAxisWithDefault)(h[0],u.AxisType.Left)),r.axis(o,!1),r.axis(a[1],(0,p.getYAxisWithDefault)(h[1],u.AxisType.Right)),t}function _(t){var e=t.chart,n=t.options.tooltip,i=(0,c.findViewById)(e,l.LEFT_AXES_VIEW),r=(0,c.findViewById)(e,l.RIGHT_AXES_VIEW);return e.tooltip(n),i.tooltip({shared:!0}),r.tooltip({shared:!0}),t}function O(t){var e=t.chart;return(0,o.interaction)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.LEFT_AXES_VIEW)})),(0,o.interaction)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.RIGHT_AXES_VIEW)})),t}function w(t){var e=t.chart,n=t.options.annotations,i=(0,r.get)(n,[0]),s=(0,r.get)(n,[1]);return(0,o.annotation)(i)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.LEFT_AXES_VIEW),options:{annotations:i}})),(0,o.annotation)(s)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.RIGHT_AXES_VIEW),options:{annotations:s}})),t}function j(t){var e=t.chart;return(0,o.theme)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.LEFT_AXES_VIEW)})),(0,o.theme)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.RIGHT_AXES_VIEW)})),(0,o.theme)(t),t}function S(t){var e=t.chart;return(0,o.animation)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.LEFT_AXES_VIEW)})),(0,o.animation)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.RIGHT_AXES_VIEW)})),t}function M(t){var e=t.chart,n=t.options.yAxis;return(0,o.limitInPlot)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.LEFT_AXES_VIEW),options:{yAxis:n[0]}})),(0,o.limitInPlot)((0,a.deepAssign)({},t,{chart:(0,c.findViewById)(e,l.RIGHT_AXES_VIEW),options:{yAxis:n[1]}})),t}function A(t){var e=t.chart,n=t.options,i=n.legend,o=n.geometryOptions,s=n.yField,u=n.data,h=(0,c.findViewById)(e,l.LEFT_AXES_VIEW),p=(0,c.findViewById)(e,l.RIGHT_AXES_VIEW);if(!1===i)e.legend(!1);else if((0,r.isObject)(i)&&!0===i.custom)e.legend(i);else{var d=(0,r.get)(o,[0,"legend"],i),g=(0,r.get)(o,[1,"legend"],i);e.once("beforepaint",(function(){var t=u[0].length?(0,f.getViewLegendItems)({view:h,geometryOption:o[0],yField:s[0],legend:d}):[],n=u[1].length?(0,f.getViewLegendItems)({view:p,geometryOption:o[1],yField:s[1],legend:g}):[];e.legend((0,a.deepAssign)({},i,{custom:!0,items:t.concat(n)}))})),o[0].seriesField&&h.legend(o[0].seriesField,d),o[1].seriesField&&p.legend(o[1].seriesField,g),e.on("legend-item:click",(function(t){var n=(0,r.get)(t,"gEvent.delegateObject",{});if(n&&n.item){var i=n.item,o=i.value,a=i.isGeometry,l=i.viewId;if(a){if((0,r.findIndex)(s,(function(t){return t===o}))>-1){var u=(0,r.get)((0,c.findViewById)(e,l),"geometries");(0,r.each)(u,(function(t){t.changeVisible(!n.item.unchecked)}))}}else{var h=(0,r.get)(e.getController("legend"),"option.items",[]);(0,r.each)(e.views,(function(t){var n=t.getGroupScales();(0,r.each)(n,(function(e){e.values&&e.values.indexOf(o)>-1&&t.filter(e.field,(function(t){return!(0,r.find)(h,(function(e){return e.value===t})).unchecked}))})),e.render(!0)}))}}}))}return t}function C(t){var e=t.chart,n=t.options.slider,i=(0,c.findViewById)(e,l.LEFT_AXES_VIEW),o=(0,c.findViewById)(e,l.RIGHT_AXES_VIEW);return n&&(i.option("slider",n),i.on("slider:valuechanged",(function(t){var e=t.event,n=e.value,i=e.originValue;(0,r.isEqual)(n,i)||(0,d.doSliderFilter)(o,n)})),e.once("afterpaint",(function(){if(!(0,r.isBoolean)(n)){var t=n.start,e=n.end;(t||e)&&(0,d.doSliderFilter)(o,[t,e])}}))),t}e.transformOptions=g,e.color=m,e.meta=b,e.axis=x,e.tooltip=_,e.interaction=O,e.annotation=w,e.theme=j,e.animation=S,e.limitInPlot=M,e.legend=A,e.slider=C,e.adaptor=function(t){return(0,a.flow)(g,y,j,v,b,x,M,_,O,w,S,m,A,C)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.drawSingleGeometry=void 0;var i=n(1),r=n(0),o=n(19),a=n(2),s=n(56),c=n(94);e.drawSingleGeometry=function(t){var e=t.options,n=t.chart,l=e.geometryOption,u=l.isStack,h=l.color,f=l.seriesField,p=l.groupField,d=l.isGroup,g=["xField","yField"];if((0,c.isLine)(l)){(0,o.line)((0,a.deepAssign)({},t,{options:i.__assign(i.__assign(i.__assign({},(0,a.pick)(e,g)),l),{line:{color:l.color,style:l.lineStyle}})})),(0,o.point)((0,a.deepAssign)({},t,{options:i.__assign(i.__assign(i.__assign({},(0,a.pick)(e,g)),l),{point:l.point&&i.__assign({color:h,shape:"circle"},l.point)})}));var y=[];d&&y.push({type:"dodge",dodgeBy:p||f,customOffset:0}),u&&y.push({type:"stack"}),y.length&&(0,r.each)(n.geometries,(function(t){t.adjust(y)}))}return(0,c.isColumn)(l)&&(0,s.adaptor)((0,a.deepAssign)({},t,{options:i.__assign(i.__assign(i.__assign({},(0,a.pick)(e,g)),l),{widthRatio:l.columnWidthRatio,interval:i.__assign(i.__assign({},(0,a.pick)(l,["color"])),{style:l.columnStyle})})})),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getViewLegendItems=void 0;var i=n(10),r=n(0),o=n(2),a=n(94);e.getViewLegendItems=function(t){var e=t.view,n=t.geometryOption,s=t.yField,c=t.legend,l=(0,r.get)(c,"marker"),u=(0,o.findGeometry)(e,(0,a.isLine)(n)?"line":"interval");if(!n.seriesField){var h=(0,r.get)(e,"options.scales.".concat(s,".alias"))||s,f=u.getAttribute("color"),p=e.getTheme().defaultColor;return f&&(p=i.Util.getMappingValue(f,h,(0,r.get)(f,["values",0],p))),[{value:s,name:h,marker:((0,r.isFunction)(l)?l:!(0,r.isEmpty)(l)&&(0,o.deepAssign)({},{style:{stroke:p,fill:p}},l))||((0,a.isLine)(n)?{symbol:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},style:{lineWidth:2,r:6,stroke:p}}:{symbol:"square",style:{fill:p}}),isGeometry:!0,viewId:e.id}]}var d=u.getGroupAttributes();return(0,r.reduce)(d,(function(t,n){var r=i.Util.getLegendItems(e,u,n,e.getTheme(),l);return t.concat(r)}),[])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.doSliderFilter=void 0;var i=n(0),r=n(2);e.doSliderFilter=function(t,e){var n=e[0],o=e[1],a=t.getOptions().data,s=t.getXScale(),c=(0,i.size)(a);if(s&&c){var l=(0,i.valuesOfKey)(a,s.field),u=l,h=(0,i.size)(u),f=Math.floor(n*(h-1)),p=Math.floor(o*(h-1));t.filter(s.field,(function(t){var e=u.indexOf(t);return!(e>-1)||(0,r.isBetween)(e,f,p)})),t.getRootView().render(!0)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Facet=void 0;var i=n(1),r=n(8),o=n(284),a=n(286),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e}(r.Plot);e.Facet=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=void 0;var i=n(1),r=n(0),o=n(13),a=n(38),s=n(2),c=n(119),l=n(285);function u(t){var e=t.chart,n=t.options,o=n.type,a=n.data,s=n.fields,u=n.eachView,h=(0,r.omit)(n,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return e.data(a),e.facet(o,i.__assign(i.__assign({},h),{fields:s,eachView:function(t,e){var n=u(t,e);if(n.geometries)(0,l.execViewAdaptor)(t,n);else{var i=n,r=i.options;r.tooltip&&t.interaction("tooltip"),(0,c.execPlotAdaptor)(i.type,t,r)}}})),t}function h(t){var e=t.chart,n=t.options,o=n.axes,c=n.meta,l=n.tooltip,u=n.coordinate,h=n.theme,f=n.legend,p=n.interactions,d=n.annotations,g={};return o&&(0,r.each)(o,(function(t,e){g[e]=(0,s.pick)(t,a.AXIS_META_CONFIG_KEYS)})),g=(0,s.deepAssign)({},c,g),e.scale(g),e.coordinate(u),o?(0,r.each)(o,(function(t,n){e.axis(n,t)})):e.axis(!1),l?(e.interaction("tooltip"),e.tooltip(l)):!1===l&&e.removeInteraction("tooltip"),e.legend(f),h&&e.theme(h),(0,r.each)(p,(function(t){!1===t.enable?e.removeInteraction(t.type):e.interaction(t.type,t.cfg)})),(0,r.each)(d,(function(t){e.annotation()[t.type](i.__assign({},t))})),t}e.adaptor=function(t){return(0,s.flow)(o.theme,u,h)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.execViewAdaptor=void 0;var i=n(1),r=n(0),o=n(28),a=n(38),s=n(2);e.execViewAdaptor=function(t,e){var n=e.data,c=e.coordinate,l=e.interactions,u=e.annotations,h=e.animation,f=e.tooltip,p=e.axes,d=e.meta,g=e.geometries;n&&t.data(n);var y={};p&&(0,r.each)(p,(function(t,e){y[e]=(0,s.pick)(t,a.AXIS_META_CONFIG_KEYS)})),y=(0,s.deepAssign)({},d,y),t.scale(y),c&&t.coordinate(c),!1===p?t.axis(!1):(0,r.each)(p,(function(e,n){t.axis(n,e)})),(0,r.each)(g,(function(e){var n=(0,o.geometry)({chart:t,options:e}).ext,i=e.adjust;i&&n.geometry.adjust(i)})),(0,r.each)(l,(function(e){!1===e.enable?t.removeInteraction(e.type):t.interaction(e.type,e.cfg)})),(0,r.each)(u,(function(e){t.annotation()[e.type](i.__assign({},e))})),(0,s.addViewAnimation)(t,h),f?(t.interaction("tooltip"),t.tooltip(f)):!1===f&&t.removeInteraction("tooltip")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0,e.DEFAULT_OPTIONS={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Heatmap=void 0;var i=n(1),r=n(8),o=n(288),a=n(289);n(290),n(291);var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(r.Plot);e.Heatmap=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=void 0;var i=n(1),r=n(0),o=n(13),a=n(28),s=n(2),c=n(32);function l(t){var e=t.chart,n=t.options,i=n.data,o=n.type,l=n.xField,u=n.yField,h=n.colorField,f=n.sizeField,p=n.sizeRatio,d=n.shape,g=n.color,y=n.tooltip,v=n.heatmapStyle,m=n.meta;e.data(i);var b="polygon";"density"===o&&(b="heatmap");var x=(0,c.getTooltipMapping)(y,[l,u,h]),_=x.fields,O=x.formatter,w=1;return(p||0===p)&&(d||f?p<0||p>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):w=p:console.warn("sizeRatio is not in effect: Must define shape or sizeField first")),(0,a.geometry)((0,s.deepAssign)({},t,{options:{type:b,colorField:h,tooltipFields:_,shapeField:f||"",label:void 0,mapping:{tooltip:O,shape:d&&(f?function(t){var e=i.map((function(t){return t[f]})),n=(null==m?void 0:m[f])||{},o=n.min,a=n.max;return o=(0,r.isNumber)(o)?o:Math.min.apply(Math,e),a=(0,r.isNumber)(a)?a:Math.max.apply(Math,e),[d,((0,r.get)(t,f)-o)/(a-o),w]}:function(){return[d,1,w]}),color:g||h&&e.getTheme().sequenceColors.join("-"),style:v}}})),t}function u(t){var e,n=t.options,i=n.xAxis,r=n.yAxis,a=n.xField,c=n.yField;return(0,s.flow)((0,o.scale)(((e={})[a]=i,e[c]=r,e)))(t)}function h(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return!1===i?e.axis(o,!1):e.axis(o,i),!1===r?e.axis(a,!1):e.axis(a,r),t}function f(t){var e=t.chart,n=t.options,i=n.legend,r=n.colorField,o=n.sizeField,a=n.sizeLegend,s=!1!==i;return r&&e.legend(r,!!s&&i),o&&e.legend(o,void 0===a?i:a),s||a||e.legend(!1),t}function p(t){var e=t.chart,n=t.options,r=n.label,o=n.colorField,a=n.type,c=(0,s.findGeometry)(e,"density"===a?"heatmap":"polygon");if(r){if(o){var l=r.callback,u=i.__rest(r,["callback"]);c.label({fields:[o],callback:l,cfg:(0,s.transformLabel)(u)})}}else c.label(!1);return t}function d(t){var e,n,i=t.chart,r=t.options,o=r.coordinate,a=r.reflect,c=(0,s.deepAssign)({actions:[]},null!=o?o:{type:"rect"});return a&&(null===(n=null===(e=c.actions)||void 0===e?void 0:e.push)||void 0===n||n.call(e,["reflect",a])),i.coordinate(c),t}e.adaptor=function(t){return(0,s.flow)(o.theme,(0,o.pattern)("heatmapStyle"),u,d,l,h,f,o.tooltip,p,(0,o.annotation)(),o.interaction,o.animation,o.state)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(8),r=n(2);e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);(0,n(10).registerShape)("polygon","circle",{draw:function(t,e){var n,r,o=t.x,a=t.y,s=this.parsePoints(t.points),c=Math.abs(s[2].x-s[1].x),l=Math.abs(s[1].y-s[0].y),u=Math.min(c,l)/2,h=Number(t.shape[1]),f=Number(t.shape[2]),p=u*Math.sqrt(f)*Math.sqrt(h),d=(null===(n=t.style)||void 0===n?void 0:n.fill)||t.color||(null===(r=t.defaultStyle)||void 0===r?void 0:r.fill);return e.addShape("circle",{attrs:i.__assign(i.__assign(i.__assign({x:o,y:a,r:p},t.defaultStyle),t.style),{fill:d})})}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);(0,n(10).registerShape)("polygon","square",{draw:function(t,e){var n,r,o=t.x,a=t.y,s=this.parsePoints(t.points),c=Math.abs(s[2].x-s[1].x),l=Math.abs(s[1].y-s[0].y),u=Math.min(c,l),h=Number(t.shape[1]),f=Number(t.shape[2]),p=u*Math.sqrt(f)*Math.sqrt(h),d=(null===(n=t.style)||void 0===n?void 0:n.fill)||t.color||(null===(r=t.defaultStyle)||void 0===r?void 0:r.fill);return e.addShape("rect",{attrs:i.__assign(i.__assign(i.__assign({x:o-p/2,y:a-p/2,width:p,height:p},t.defaultStyle),t.style),{fill:d})})}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Liquid=e.addWaterWave=void 0;var i=n(1),r=n(10),o=n(8),a=n(293),s=n(294);n(170);var c=n(169),l=n(170);Object.defineProperty(e,"addWaterWave",{enumerable:!0,get:function(){return l.addWaterWave}});var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="liquid",e}return i.__extends(e,t),e.getDefaultOptions=function(){return s.DEFAULT_OPTIONS},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.changeData=function(t){this.chart.emit(r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data((0,c.getLiquidData)(t)),(0,a.statistic)({chart:this.chart,options:this.options},!0),this.chart.emit(r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,r.Event.fromData(this.chart,r.VIEW_LIFE_CIRCLE.AFTER_CHANGE_DATA,null))},e.prototype.getSchemaAdaptor=function(){return a.adaptor},e}(o.Plot);e.Liquid=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.statistic=void 0;var i=n(1),r=n(0),o=n(13),a=n(19),s=n(2),c=n(169);function l(t){var e=t.chart,n=t.options,i=n.percent,r=n.liquidStyle,o=n.radius,l=n.outline,u=n.wave,h=n.shape,f=n.shapeStyle,p=n.animation;e.scale({percent:{min:0,max:1}}),e.data((0,c.getLiquidData)(i));var d=n.color||e.getTheme().defaultColor,g=(0,s.deepAssign)({},t,{options:{xField:"type",yField:"percent",widthRatio:o,interval:{color:d,style:r,shape:"liquid-fill-gauge"}}}),y=(0,a.interval)(g).ext.geometry,v={percent:i,radius:o,outline:l,wave:u,shape:h,shapeStyle:f,background:e.getTheme().background,animation:p};return y.customInfo(v),e.legend(!1),e.axis(!1),e.tooltip(!1),t}function u(t,e){var n=t.chart,o=t.options,a=o.statistic,c=o.percent,l=o.meta;n.getController("annotation").clear(!0);var u=(0,r.get)(l,["percent","formatter"])||function(t){return"".concat((100*t).toFixed(2),"%")},h=a.content;return h&&(h=(0,s.deepAssign)({},h,{content:(0,r.isNil)(h.content)?u(c):h.content})),(0,s.renderStatistic)(n,{statistic:i.__assign(i.__assign({},a),{content:h}),plotType:"liquid"},{percent:c}),e&&n.render(!0),t}e.statistic=u,e.adaptor=function(t){return(0,s.flow)(o.theme,(0,o.pattern)("liquidStyle"),l,u,(0,o.scale)({}),o.animation,o.interaction)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0,e.DEFAULT_OPTIONS={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Radar=void 0;var i=n(1),r=n(8),o=n(2),a=n(296);n(297);var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}return i.__extends(e,t),e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return(0,o.deepAssign)({},t.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},e.prototype.getSchemaAdaptor=function(){return a.adaptor},e}(r.Plot);e.Radar=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=void 0;var i=n(1),r=n(13),o=n(19),a=n(2);function s(t){var e=t.chart,n=t.options,r=n.data,s=n.lineStyle,c=n.color,l=n.point,u=n.area;e.data(r);var h=(0,a.deepAssign)({},t,{options:{line:{style:s,color:c},point:l?i.__assign({color:c},l):l,area:u?i.__assign({color:c},u):u,label:void 0}}),f=(0,a.deepAssign)({},h,{options:{tooltip:!1}}),p=(null==l?void 0:l.state)||n.state,d=(0,a.deepAssign)({},h,{options:{tooltip:!1,state:p}});return(0,o.line)(h),(0,o.point)(d),(0,o.area)(f),t}function c(t){var e,n=t.options,i=n.xAxis,o=n.yAxis,s=n.xField,c=n.yField;return(0,a.flow)((0,r.scale)(((e={})[s]=i,e[c]=o,e)))(t)}function l(t){var e=t.chart,n=t.options,i=n.radius,r=n.startAngle,o=n.endAngle;return e.coordinate("polar",{radius:i,startAngle:r,endAngle:o}),t}function u(t){var e=t.chart,n=t.options,i=n.xField,r=n.xAxis,o=n.yField,a=n.yAxis;return e.axis(i,r),e.axis(o,a),t}function h(t){var e=t.chart,n=t.options,r=n.label,o=n.yField,s=(0,a.findGeometry)(e,"line");if(r){var c=r.callback,l=i.__rest(r,["callback"]);s.label({fields:[o],callback:c,cfg:(0,a.transformLabel)(l)})}else s.label(!1);return t}e.adaptor=function(t){return(0,a.flow)(s,c,r.theme,l,u,r.legend,r.tooltip,h,r.interaction,r.animation,(0,r.annotation)())(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(10),r=n(298);(0,i.registerAction)("radar-tooltip",r.RadarTooltipAction),(0,i.registerInteraction)("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RadarTooltipAction=e.RadarTooltipController=void 0;var i=n(1),r=n(10),o=n(0),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),e.prototype.getTooltipItems=function(e){var n=this.getTooltipCfg(),a=n.shared,s=n.title,c=t.prototype.getTooltipItems.call(this,e);if(c.length>0){var l=this.view.geometries[0],u=l.dataArray,h=c[0].name,f=[];return u.forEach((function(t){t.forEach((function(t){var e=r.Util.getTooltipItems(t,l)[0];if(!a&&e&&e.name===h){var n=(0,o.isNil)(s)?h:s;f.push(i.__assign(i.__assign({},e),{name:e.title,title:n}))}else if(a&&e){n=(0,o.isNil)(s)?e.name||h:s;f.push(i.__assign(i.__assign({},e),{name:e.title,title:n}))}}))})),f}return[]},e}(r.TooltipController);e.RadarTooltipController=a,(0,r.registerComponentController)("radar-tooltip",a);var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.init=function(){this.context.view.removeInteraction("tooltip")},e.prototype.show=function(){var t=this.context.event;this.getTooltipController().showTooltip({x:t.x,y:t.y})},e.prototype.hide=function(){this.getTooltipController().hideTooltip()},e.prototype.getTooltipController=function(){return this.context.view.getController("radar-tooltip")},e}(r.Action);e.RadarTooltipAction=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RadialBar=void 0;var i=n(1),r=n(8),o=n(300),a=n(302),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial-bar",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.updateOption({data:t}),(0,o.meta)({chart:this.chart,options:this.options}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e}(r.Plot);e.RadialBar=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.axis=e.meta=void 0;var i=n(1),r=n(13),o=n(19),a=n(46),s=n(2),c=n(301);function l(t){var e=t.chart,n=t.options,i=n.barStyle,r=n.color,a=n.tooltip,c=n.colorField,l=n.type,u=n.xField,h=n.yField,f=n.data,p=n.shape,d=(0,s.processIllegalData)(f,h);e.data(d);var g=(0,s.deepAssign)({},t,{options:{tooltip:a,seriesField:c,interval:{style:i,color:r,shape:p||("line"===l?"line":"intervel")},minColumnWidth:n.minBarWidth,maxColumnWidth:n.maxBarWidth,columnBackground:n.barBackground}});return(0,o.interval)(g),"line"===l&&(0,o.point)({chart:e,options:{xField:u,yField:h,seriesField:c,point:{shape:"circle",color:r}}}),t}function u(t){var e,n=t.options,i=n.yField,o=n.xField,a=n.data,l=n.isStack,u=n.isGroup,h=n.colorField,f=n.maxAngle,p=l&&!u&&h?(0,c.getStackedData)(a,o,i):a,d=(0,s.processIllegalData)(p,i);return(0,s.flow)((0,r.scale)(((e={})[i]={min:0,max:(0,c.getScaleMax)(f,i,d)},e)))(t)}function h(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}).transpose(),t}function f(t){var e=t.chart,n=t.options,i=n.xField,r=n.xAxis;return e.axis(i,r),t}function p(t){var e=t.chart,n=t.options,r=n.label,o=n.yField,a=(0,s.findGeometry)(e,"interval");if(r){var c=r.callback,l=i.__rest(r,["callback"]);a.label({fields:[o],callback:c,cfg:i.__assign(i.__assign({},(0,s.transformLabel)(l)),{type:"polar"})})}else a.label(!1);return t}e.meta=u,e.axis=f,e.adaptor=function(t){return(0,s.flow)((0,a.pattern)("barStyle"),l,u,f,h,r.interaction,r.animation,r.theme,r.tooltip,r.legend,(0,r.annotation)(),p)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getStackedData=e.getScaleMax=void 0;var i=n(1);e.getScaleMax=function(t,e,n){var i=n.map((function(t){return t[e]})).filter((function(t){return void 0!==t})),r=i.length>0?Math.max.apply(Math,i):0,o=Math.abs(t)%360;return o?360*r/o:r},e.getStackedData=function(t,e,n){var r=[];return t.forEach((function(t){var o=r.find((function(n){return n[e]===t[e]}));o?o[n]+=t[n]||null:r.push(i.__assign({},t))})),r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(8),r=n(2);e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rose=void 0;var i=n(1),r=n(8),o=n(304),a=n(305),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e}(r.Plot);e.Rose=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.legend=void 0;var i=n(1),r=n(0),o=n(13),a=n(19),s=n(2);function c(t){var e=t.chart,n=t.options,i=n.data,r=n.sectorStyle,o=n.shape,c=n.color;return e.data(i),(0,s.flow)(a.interval)((0,s.deepAssign)({},t,{options:{marginRatio:1,interval:{style:r,color:c,shape:o}}})),t}function l(t){var e=t.chart,n=t.options,o=n.label,a=n.xField,c=(0,s.findGeometry)(e,"interval");if(!1===o)c.label(!1);else if((0,r.isObject)(o)){var l=o.callback,u=o.fields,h=i.__rest(o,["callback","fields"]),f=h.offset,p=h.layout;(void 0===f||f>=0)&&(p=p?(0,r.isArray)(p)?p:[p]:[],h.layout=(0,r.filter)(p,(function(t){return"limit-in-shape"!==t.type})),h.layout.length||delete h.layout),c.label({fields:u||[a],callback:l,cfg:(0,s.transformLabel)(h)})}else(0,s.log)(s.LEVEL.WARN,null===o,"the label option must be an Object."),c.label({fields:[a]});return t}function u(t){var e=t.chart,n=t.options,i=n.legend,r=n.seriesField;return!1===i?e.legend(!1):r&&e.legend(r,i),t}function h(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}),t}function f(t){var e,n=t.options,i=n.xAxis,r=n.yAxis,a=n.xField,c=n.yField;return(0,s.flow)((0,o.scale)(((e={})[a]=i,e[c]=r,e)))(t)}function p(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return i?e.axis(o,i):e.axis(o,!1),r?e.axis(a,r):e.axis(a,!1),t}e.legend=u,e.adaptor=function(t){(0,s.flow)((0,o.pattern)("sectorStyle"),c,f,l,h,p,u,o.tooltip,o.interaction,o.animation,o.theme,(0,o.annotation)(),o.state)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0;var i=n(8),r=n(2);e.DEFAULT_OPTIONS=(0,r.deepAssign)({},i.Plot.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sankey=void 0;var i=n(1),r=n(0),o=n(8),a=n(2),s=n(307),c=n(95),l=n(171);n(313);var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="sankey",e}return i.__extends(e,t),e.getDefaultOptions=function(){return{appendPadding:8,syncViewPadding:!0,nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.3,lineWidth:0},edgeState:{active:{style:{opacity:.8,lineWidth:0}}},label:{formatter:function(t){return t.name},callback:function(t){var e=1===t[1];return{style:{fill:"#545454",textAlign:e?"end":"start"},offsetX:e?-8:8}},layout:[{type:"hide-overlap"}]},tooltip:{showTitle:!1,showMarkers:!1,shared:!1,showContent:function(t){return!(0,r.get)(t,[0,"data","isNode"])},formatter:function(t){return{name:t.source+" -> "+t.target,value:t.value}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},e.prototype.changeData=function(t){this.updateOption({data:t});var e=(0,l.transformToViewsData)(this.options,this.chart.width,this.chart.height),n=e.nodes,i=e.edges,r=(0,a.findViewById)(this.chart,c.NODES_VIEW_ID),o=(0,a.findViewById)(this.chart,c.EDGES_VIEW_ID);r.changeData(n),o.changeData(i)},e.prototype.getSchemaAdaptor=function(){return s.adaptor},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(o.Plot);e.Sankey=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.nodeDraggable=e.animation=void 0;var i=n(1),r=n(0),o=n(13),a=n(19),s=n(2),c=n(65),l=n(95),u=n(171);function h(t){var e=t.options.rawFields,n=void 0===e?[]:e;return(0,s.deepAssign)({},{options:{tooltip:{fields:(0,r.uniq)(i.__spreadArray(["name","source","target","value","isNode"],n,!0))},label:{fields:(0,r.uniq)(i.__spreadArray(["x","name"],n,!0))}}},t)}function f(t){var e=t.chart,n=t.options,r=n.color,o=n.nodeStyle,s=n.edgeStyle,c=n.label,h=n.tooltip,f=n.nodeState,p=n.edgeState,d=n.rawFields,g=void 0===d?[]:d;e.legend(!1),e.tooltip(h),e.axis(!1),e.coordinate().reflect("y");var y=(0,u.transformToViewsData)(n,e.width,e.height),v=y.nodes,m=y.edges,b=e.createView({id:l.EDGES_VIEW_ID});b.data(m),(0,a.edge)({chart:b,options:{xField:l.X_FIELD,yField:l.Y_FIELD,seriesField:l.COLOR_FIELD,rawFields:i.__spreadArray(["source","target"],g,!0),edge:{color:r,style:s,shape:"arc"},tooltip:h,state:p}});var x=e.createView({id:l.NODES_VIEW_ID});return x.data(v),(0,a.polygon)({chart:x,options:{xField:l.X_FIELD,yField:l.Y_FIELD,seriesField:l.COLOR_FIELD,polygon:{color:r,style:o},label:c,tooltip:h,state:f}}),e.interaction("element-active"),e.scale({x:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},y:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},name:{sync:"color",type:"cat"}}),t}function p(t){var e=t.chart,n=t.options.animation,r=i.__spreadArray(i.__spreadArray([],e.views[0].geometries,!0),e.views[1].geometries,!0);return(0,c.addViewAnimation)(e,n,r),t}function d(t){var e=t.chart;return t.options.nodeDraggable?e.interaction("sankey-node-draggable"):e.removeInteraction("sankey-node-draggable"),t}function g(t){var e=t.chart,n=t.options,i=n.interactions,r=void 0===i?[]:i,o=[].concat(r,n.nodeInteractions||[]),a=[].concat(r,n.edgeInteractions||[]),c=(0,s.findViewById)(e,l.NODES_VIEW_ID),u=(0,s.findViewById)(e,l.EDGES_VIEW_ID);return o.forEach((function(t){!1===(null==t?void 0:t.enable)?c.removeInteraction(t.type):c.interaction(t.type,t.cfg||{})})),a.forEach((function(t){!1===(null==t?void 0:t.enable)?u.removeInteraction(t.type):u.interaction(t.type,t.cfg||{})})),t}e.animation=p,e.nodeDraggable=d,e.adaptor=function(t){return(0,s.flow)(h,f,g,d,p,o.theme)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cutoffCircle=e.getMatrix=e.getNodes=void 0;var i=n(0);function r(t,e,n){var i=[];return t.forEach((function(t){var r=t[e],o=t[n];i.includes(r)||i.push(r),i.includes(o)||i.push(o)})),i}function o(t,e,n,i){var r={};return e.forEach((function(t){r[t]={},e.forEach((function(e){r[t][e]=0}))})),t.forEach((function(t){r[t[n]][t[i]]=1})),r}e.getNodes=r,e.getMatrix=o,e.cutoffCircle=function(t,e,n){if(!(0,i.isArray)(t))return[];var a=[],s=r(t,e,n),c=o(t,s,e,n),l={};return s.forEach((function(t){l[t]=0})),s.forEach((function(t){-1!=l[t]&&function t(e){l[e]=1,s.forEach((function(n){if(0!=c[e][n])if(1==l[n])a.push("".concat(e,"_").concat(n));else{if(-1==l[n])return;t(n)}})),l[e]=-1}(t)})),0!==a.length&&console.warn("sankey data contains circle, ".concat(a.length," records removed."),a),t.filter((function(t){return a.findIndex((function(i){return i==="".concat(t[e],"_").concat(t[n])}))<0}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sankeyLayout=e.getDefaultOptions=e.getNodeAlignFunction=void 0;var i=n(0),r=n(310),o={left:r.left,right:r.right,center:r.center,justify:r.justify},a={nodeId:function(t){return t.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function s(t){return((0,i.isString)(t)?o[t]:(0,i.isFunction)(t)?t:null)||r.justify}function c(t){return(0,i.assign)({},a,t)}e.getNodeAlignFunction=s,e.getDefaultOptions=c,e.sankeyLayout=function(t,e){var n=c(t),i=n.nodeId,o=n.nodeSort,a=n.nodeAlign,l=n.nodeWidth,u=n.nodePadding,h=n.nodeDepth,f=(0,r.sankey)().nodeSort(o).nodeWidth(l).nodePadding(u).nodeDepth(h).nodeAlign(s(a)).extent([[0,0],[1,1]]).nodeId(i)(e);return{nodes:f.nodes.map((function(t){var e=t.x0,n=t.x1,i=t.y0,r=t.y1;return t.x=[e,n,n,e],t.y=[i,i,r,r],t})).filter((function(t){return null!==t.name})),links:f.links.map((function(t){var e=t.source,n=t.target,i=e.x1,r=n.x0;t.x=[i,i,r,r];var o=t.width/2;return t.y=[t.y0+o,t.y0-o,t.y1+o,t.y1-o],t})).filter((function(t){var e=t.source,n=t.target;return null!==e.name&&null!==n.name}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sankey=e.right=e.left=e.justify=e.center=void 0;var i=n(311);Object.defineProperty(e,"sankey",{enumerable:!0,get:function(){return i.Sankey}});var r=n(172);Object.defineProperty(e,"center",{enumerable:!0,get:function(){return r.center}}),Object.defineProperty(e,"justify",{enumerable:!0,get:function(){return r.justify}}),Object.defineProperty(e,"left",{enumerable:!0,get:function(){return r.left}}),Object.defineProperty(e,"right",{enumerable:!0,get:function(){return r.right}})},function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Sankey=void 0;var r=n(172),o=n(312);function a(t,e){return c(t.source,e.source)||t.index-e.index}function s(t,e){return c(t.target,e.target)||t.index-e.index}function c(t,e){return t.y0-e.y0}function l(t){return t.value}function u(t){return t.index}function h(t){return t.nodes}function f(t){return t.links}function p(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function d(t){for(var e=0,n=t.nodes;ei)throw new Error("circular link");r=a,a=new Set}if(e)for(var c=Math.max((0,o.maxValueBy)(n,(function(t){return t.depth}))+1,0),l=void 0,u=0;un)throw new Error("circular link");i=r,r=new Set}}(a),function(e){var i=function(t){for(var e=t.nodes,i=Math.max((0,o.maxValueBy)(e,(function(t){return t.depth}))+1,0),r=(m-y-x)/(i-1),a=new Array(i).fill(0).map((function(){return[]})),s=0,c=e;s0){var m=(h/f-u.y0)*e;u.y0+=m,u.y1+=m,F(u)}}void 0===n&&a.sort(c),a.length&&I(a,i)}}function E(t,e,i){for(var r=t.length-2;r>=0;--r){for(var o=t[r],a=0,s=o;a0){var v=(u/h-l.y0)*e;l.y0+=v,l.y1+=v,F(l)}}void 0===n&&o.sort(c),o.length&&I(o,i)}}function I(e,n){var i=e.length>>1,r=e[i];T(e,r.y0-t,i-1,n),P(e,r.y1+t,i+1,n),T(e,b,e.length-1,n),P(e,v,0,n)}function P(e,n,i,r){for(;i1e-6&&(o.y0+=a,o.y1+=a),n=o.y1+t}}function T(e,n,i,r){for(;i>=0;--i){var o=e[i],a=(o.y1-n)*r;a>1e-6&&(o.y0-=a,o.y1-=a),n=o.y0-t}}function F(t){var e=t.sourceLinks,n=t.targetLinks;if(void 0===g){for(var i=0,r=n;i0&&t.depth>p)return null;for(var y=t.data.name,v=i.__assign({},t);v.depth>1;)y="".concat(null===(r=v.parent.data)||void 0===r?void 0:r.name," / ").concat(y),v=v.parent;var b=i.__assign(i.__assign(i.__assign({},(0,a.pick)(t.data,i.__spreadArray(i.__spreadArray([],u||[],!0),[f.field],!1))),((e={})[l.SUNBURST_PATH_FIELD]=y,e[l.SUNBURST_ANCESTOR_FIELD]=v.data.name,e)),t);g&&(b[g]=t.data[g]||(null===(c=null===(s=t.parent)||void 0===s?void 0:s.data)||void 0===c?void 0:c[g])),n&&(b[n]=t.data[n]||(null===(d=null===(h=t.parent)||void 0===h?void 0:h.data)||void 0===d?void 0:d[n])),b.ext=f,b[o.HIERARCHY_DATA_TRANSFORM_PARAMS]={hierarchyConfig:f,colorField:n,rawFields:u},m.push(b)})),m}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var i=n(1),r=n(0),o=i.__importStar(n(99)),a=n(58),s={field:"value",size:[1,1],round:!1,padding:0,sort:function(t,e){return e.value-t.value},as:["x","y"],ignoreParentValue:!0};e.partition=function(t,e){var n,i=(e=(0,r.assign)({},s,e)).as;if(!(0,r.isArray)(i)||2!==i.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=(0,a.getField)(e)}catch(t){console.warn(t)}var c=function(t){return o.partition().size(e.size).round(e.round).padding(e.padding)(o.hierarchy(t).sum((function(t){return(0,r.size)(t.children)?e.ignoreParentValue?0:t[n]-(0,r.reduce)(t.children,(function(t,e){return t+e[n]}),0):t[n]})).sort(e.sort))}(t),l=i[0],u=i[1];return c.each((function(t){var e,n;t[l]=[t.x0,t.x1,t.x1,t.x0],t[u]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null===(e=t.data)||void 0===e?void 0:e.name)||(null===(n=t.data)||void 0===n?void 0:n.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach((function(e){-1===i.indexOf(e)&&delete t[e]}))})),(0,a.getAllNodes)(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(93)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Treemap=void 0;var i=n(1),r=n(8),o=n(322),a=n(323);n(324);var s=n(174),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.changeData=function(t){var e=this.options,n=e.colorField,i=e.interactions,r=e.hierarchyConfig;this.updateOption({data:t});var o=(0,s.transformData)({data:t,colorField:n,enableDrillDown:(0,s.enableInteraction)(i,"treemap-drill-down"),hierarchyConfig:r});this.chart.changeData(o),(0,s.resetDrillDown)(this.chart)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e}(r.Plot);e.Treemap=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.interaction=void 0;var i=n(1),r=n(0),o=n(13),a=n(115),s=n(46),c=n(2),l=n(45),u=n(174);function h(t){var e=t.options.colorField;return(0,c.deepAssign)({options:{rawFields:["value"],tooltip:{fields:["name","value",e,"path"],formatter:function(t){return{name:t.name,value:t.value}}}}},t)}function f(t){var e=t.chart,n=t.options,i=n.color,r=n.colorField,o=n.rectStyle,s=n.hierarchyConfig,l=n.rawFields,h=(0,u.transformData)({data:n.data,colorField:n.colorField,enableDrillDown:(0,u.enableDrillInteraction)(n),hierarchyConfig:s});return e.data(h),(0,a.polygon)((0,c.deepAssign)({},t,{options:{xField:"x",yField:"y",seriesField:r,rawFields:l,polygon:{color:i,style:o}}})),e.coordinate().reflect("y"),t}function p(t){return t.chart.axis(!1),t}function d(t){var e=t.drilldown,n=t.interactions,r=void 0===n?[]:n;return(0,u.enableDrillInteraction)(t)?(0,c.deepAssign)({},t,{interactions:i.__spreadArray(i.__spreadArray([],r,!0),[{type:"drill-down",cfg:{drillDownConfig:e,transformData:u.transformData}}],!1)}):t}function g(t){var e=t.chart,n=t.options,i=n.interactions,a=n.drilldown;(0,o.interaction)({chart:e,options:d(n)});var s=(0,u.findInteraction)(i,"view-zoom");return s&&(!1!==s.enable?e.getCanvas().on("mousewheel",(function(t){t.preventDefault()})):e.getCanvas().off("mousewheel")),(0,u.enableDrillInteraction)(n)&&(e.appendPadding=(0,l.getAdjustAppendPadding)(e.appendPadding,(0,r.get)(a,["breadCrumb","position"]))),t}e.interaction=g,e.adaptor=function(t){return(0,c.flow)(h,o.theme,(0,s.pattern)("rectStyle"),f,p,o.legend,o.tooltip,g,o.animation,(0,o.annotation)())(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OPTIONS=void 0,e.DEFAULT_OPTIONS={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"初始",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(152),n(93)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Venn=void 0;var i=n(1),r=n(8),o=n(326),a=n(70),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="venn",e}return i.__extends(e,t),e.getDefaultOptions=function(){return a.DEFAULT_OPTIONS},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return o.adaptor},e.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},e}(r.Plot);e.Venn=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.adaptor=e.axis=e.legend=e.LEGEND_SPACE=void 0;var i=n(1),r=n(0),o=n(13),a=n(19),s=n(2),c=n(70);n(327),n(331),n(332);var l=n(334);function u(t,e,n){var i=t.chart,o=t.options,a=o.blendMode,s=o.setsField,c=i.getTheme(),u=c.colors10,h=c.colors20,f=n;(0,r.isArray)(f)||(f=e.filter((function(t){return 1===t[s].length})).length<=10?u:h);var p=(0,l.getColorMap)(f,e,a,s);return function(t){return p.get(t)||f[0]}}function h(t){var n=t.chart,i=t.options,o=i.legend,a=i.appendPadding,c=i.padding,l=(0,s.normalPadding)(a);return!1!==o&&(l=(0,s.getAdjustAppendPadding)(a,(0,r.get)(o,"position"),e.LEGEND_SPACE)),n.appendPadding=(0,s.resolveAllPadding)([l,c]),t}function f(t){var e=t.options.data;e||((0,s.log)(s.LEVEL.WARN,!1,"warn: %s","数据不能为空"),e=[]);var n=e.filter((function(t){return 1===t.sets.length})).map((function(t){return t.sets[0]})),i=e.filter((function(t){var e=t.sets;return(0,l.islegalSets)(n,e)}));return(0,r.isEqual)(i,e)||(0,s.log)(s.LEVEL.WARN,!1,"warn: %s","交集中不能出现不存在的集合, 请输入合法数据"),(0,r.deepMix)({},t,{options:{data:i}})}function p(t){var e=t.chart,n=t.options,i=n.pointStyle,r=n.setsField,o=n.sizeField,h=(0,s.normalPadding)(e.appendPadding),f=h[0],p=h[1],d=h[2],g=h[3],y={offsetX:g,offsetY:f},v=e.viewBBox,m=v.width,b=v.height,x=(0,l.layoutVennData)(n,Math.max(m-(p+g),0),Math.max(b-(f+d),0),0);e.data(x);var _=(0,a.schema)((0,s.deepAssign)({},t,{options:{xField:"x",yField:"y",sizeField:o,seriesField:c.ID_FIELD,rawFields:[r,o],schema:{shape:"venn",style:i}}})).ext.geometry;_.customInfo(y);var O=function(t,e){var n=t.options.color;if("function"!=typeof n){var i=u(t,e,"string"==typeof n?[n]:n);return function(t){return i(t[c.ID_FIELD])}}return n}(t,x);return"function"==typeof O&&_.color(c.ID_FIELD,(function(e){var n=x.find((function(t){return t[c.ID_FIELD]===e})),i=u(t,x)(e);return O(n,i)})),t}function d(t){var e=t.chart,n=t.options.label,o=(0,s.normalPadding)(e.appendPadding),a=o[0],c={offsetX:o[3],offsetY:a},l=(0,s.findGeometry)(e,"schema");if(n){var u=n.callback,h=i.__rest(n,["callback"]);l.label({fields:["id"],callback:u,cfg:(0,r.deepMix)({},(0,s.transformLabel)(h),{type:"venn",customLabelInfo:c})})}else l.label(!1);return t}function g(t){var e=t.chart,n=t.options,i=n.legend,r=n.sizeField;return e.legend(c.ID_FIELD,i),e.legend(r,!1),t}function y(t){return t.chart.axis(!1),t}function v(t){var e=t.options,n=t.chart,r=e.interactions;if(r){var a={"legend-active":"venn-legend-active","legend-highlight":"venn-legend-highlight"};(0,o.interaction)((0,s.deepAssign)({},t,{options:{interactions:r.map((function(t){return i.__assign(i.__assign({},t),{type:a[t.type]||t.type})}))}}))}return n.removeInteraction("legend-active"),n.removeInteraction("legend-highlight"),t}e.LEGEND_SPACE=40,e.legend=g,e.axis=y,e.adaptor=function(t){return(0,s.flow)(h,o.theme,f,p,d,(0,o.scale)({}),g,y,o.tooltip,v,o.animation)(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(10),r=n(328),o=n(329),a=n(330);(0,i.registerAction)("venn-element-active",r.VennElementActive),(0,i.registerAction)("venn-element-highlight",o.VennElementHighlight),(0,i.registerAction)("venn-element-selected",a.VennElementSelected),(0,i.registerAction)("venn-element-single-selected",a.VennElementSingleSelected),(0,i.registerInteraction)("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),(0,i.registerInteraction)("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),(0,i.registerInteraction)("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),(0,i.registerInteraction)("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),(0,i.registerInteraction)("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]}),(0,i.registerInteraction)("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VennElementActive=void 0;var i=n(1),r=n(10),o=n(97),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.syncElementsPos=function(){(0,o.placeElementsOrdered)(this.context.view)},e.prototype.active=function(){t.prototype.active.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}((0,r.getActionClass)("element-active"));e.VennElementActive=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VennElementHighlight=void 0;var i=n(1),r=n(10),o=n(97),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.syncElementsPos=function(){(0,o.placeElementsOrdered)(this.context.view)},e.prototype.highlight=function(){t.prototype.highlight.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.clear=function(){t.prototype.clear.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}((0,r.getActionClass)("element-highlight"));e.VennElementHighlight=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VennElementSingleSelected=e.VennElementSelected=void 0;var i=n(1),r=n(10),o=n(97),a=(0,r.getActionClass)("element-selected"),s=(0,r.getActionClass)("element-single-selected"),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.syncElementsPos=function(){(0,o.placeElementsOrdered)(this.context.view)},e.prototype.selected=function(){t.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}(a);e.VennElementSelected=c;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.syncElementsPos=function(){(0,o.placeElementsOrdered)(this.context.view)},e.prototype.selected=function(){t.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}(s);e.VennElementSingleSelected=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(10),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.getLabelPoint=function(t,e,n){var i=t.data,r=i.x,o=i.y,a=t.customLabelInfo,s=a.offsetX,c=a.offsetY;return{content:t.content[n],x:r+s,y:o+c}},e}(r.GeometryLabel);(0,r.registerGeometryLabel)("venn",o)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(10),o=n(363),a=n(2),s=n(70);(0,r.registerShape)("schema","venn",{draw:function(t,e){var n=t.data,c=(0,o.parsePathString)(n[s.PATH_FIELD]),l=function(t){return(0,a.deepAssign)({},t.defaultStyle,{fill:t.color},t.style)}(t),u=e.addGroup({name:"venn-shape"});u.addShape("path",{attrs:i.__assign(i.__assign({},l),{path:c}),name:"venn-path"});var h=t.customInfo,f=h.offsetX,p=h.offsetY,d=r.Util.transform(null,[["t",f,p]]);return u.setMatrix(d),u},getMarker:function(t){var e=t.color;return{symbol:"circle",style:{lineWidth:0,stroke:e,fill:e,r:4}}}})},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":n(window))&&(i=window)}t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.islegalSets=e.layoutVennData=e.getColorMap=void 0;var i=n(1),r=n(0),o=n(2),a=n(335),s=n(70),c=n(336),l=n(337);e.getColorMap=(0,r.memoize)((function(t,e,n,i){var r=new Map,o=t.length;return e.forEach((function(e,c){if(1===e[i].length)r.set(e[s.ID_FIELD],t[(c+o)%o]);else{var l=e[i].map((function(t){return r.get(t)}));r.set(e[s.ID_FIELD],l.slice(1).reduce((function(t,e){return(0,a.blend)(t,e,n)}),l[0]))}})),r}),(function(){for(var t=[],e=0;ee?e:t},lighten:function(t,e){return t>e?t:e},dodge:function(t,e){return 255===t||(t=e/255*255/(1-t/255))>255?255:t},burn:function(t,e){return 255===e?255:0===t?0:255*(1-Math.min(1,(1-e/255)/(t/255)))}};function o(t){var e,n=t.replace("/s+/g","");return"string"!=typeof n||n.startsWith("rgba")||n.startsWith("#")?(n.startsWith("rgba")&&(e=n.replace("rgba(","").replace(")","").split(",")),n.startsWith("#")&&(e=i.default.rgb2arr(n).concat([1])),e.map((function(t,e){return 3===e?Number(t):0|t}))):i.default.rgb2arr(i.default.toRGB(n)).concat([1])}e.innerBlend=function(t){if(!r[t])throw new Error("unknown blend mode "+t);return r[t]},e.blend=function(t,n,i){void 0===i&&(i="normal");var r,a=(r=(0,e.innerBlend)(i),function(t,e){var n=[];return n[0]=r(t[0],e[0]),n[1]=r(t[1],e[1]),n[2]=r(t[2],e[2]),n})(o(t),o(n)),s=o(t),c=s[0],l=s[1],u=s[2],h=s[3],f=o(n),p=f[0],d=f[1],g=f[2],y=f[3],v=Number((h+y*(1-h)).toFixed(2)),m=Math.round((h*(1-y)*(c/255)+h*y*(a[0]/255)+(1-h)*y*(p/255))/v*255),b=Math.round((h*(1-y)*(l/255)+h*y*(a[1]/255)+(1-h)*y*(d/255))/v*255),x=Math.round((h*(1-y)*(u/255)+h*y*(a[2]/255)+(1-h)*y*(g/255))/v*255);return"rgba(".concat(m,", ").concat(b,", ").concat(x,", ").concat(v,")")},e.colorToArr=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intersectionAreaPath=e.circleFromPath=e.circlePath=e.computeTextCentres=e.computeTextCentre=void 0;var i=n(176),r=n(177);function o(t,e,n){var i,o,a=e[0].radius-(0,r.distance)(e[0],t);for(i=1;i=u&&(l=s[n],u=h)}var f=(0,i.nelderMead)((function(n){return-1*o({x:n[0],y:n[1]},t,e)}),[l.x,l.y],{maxIterations:500,minErrorDelta:1e-10}).x,p={x:f[0],y:f[1]},d=!0;for(n=0;nt[n].radius){d=!1;break}for(n=0;n0&&console.log("WARNING: area "+s+" not represented on screen")}return n},e.circlePath=s,e.circleFromPath=function(t){var e=t.split(" ");return{x:parseFloat(e[1]),y:parseFloat(e[2]),radius:-parseFloat(e[4])}},e.intersectionAreaPath=function(t){var e={};(0,r.intersectionArea)(t,e);var n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){var i=n[0].circle;return s(i.x,i.y,i.radius)}for(var o=["\nM",n[0].p2.x,n[0].p2.y],a=0;al;o.push("\nA",l,l,0,u?1:0,1,c.p1.x,c.p1.y)}return o.join(" ")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.scaleSolution=e.normalizeSolution=e.disjointCluster=e.lossFunction=e.greedyLayout=e.constrainedMDSLayout=e.bestInitialLayout=e.getDistanceMatrices=e.distanceFromIntersectArea=e.venn=void 0;var i=n(176),r=n(177);e.venn=function(t,e){(e=e||{}).maxIterations=e.maxIterations||500;var n,r=e.initialLayout||s,o=e.lossFunction||u,a=r(t=function(t){t=t.slice();var e,n,i,r,o=[],a={};for(e=0;ee?1:-1})),e=0;e=Math.min(e[i].size,e[s].size)?l=1:t.size<=1e-10&&(l=-1),a[i][s]=a[s][i]=l})),{distances:r,constraints:a}}function s(t,e){var n=l(t,e),i=e.lossFunction||u;if(t.length>=8){var r=c(t,e);i(r,t)+1e-80&&d<=h||f<0&&d>=h||(o+=2*g*g,e[2*r]+=4*g*(a-l),e[2*r+1]+=4*g*(s-u),e[2*c]+=4*g*(l-a),e[2*c+1]+=4*g*(u-s))}return o}(t,e,u,h)};for(n=0;n=Math.min(a[p].size,a[d].size)&&(f=0),s[p].push({set:d,size:h.size,weight:f}),s[d].push({set:p,size:h.size,weight:f})}var g=[];for(n in s)if(s.hasOwnProperty(n)){var y=0;for(c=0;c0){var o=t[0].x,a=t[0].y;for(i=0;i1){var s=Math.atan2(t[1].x,t[1].y)-e,c=void 0,l=void 0,u=Math.cos(s),h=Math.sin(s);for(i=0;i2){for(var f=Math.atan2(t[2].x,t[2].y)-e;f<0;)f+=2*Math.PI;for(;f>2*Math.PI;)f-=2*Math.PI;if(f>Math.PI){var p=t[1].y/(1e-10+t[1].x);for(i=0;i=h.length)){var n=Math.max(e-i,0),r=e,a=Math.min(e+i,h.length-1),s=n-(e-i),l=e+i-a,f=p[-i-1+s]||0,v=p[-i-1+l]||0,m=d/(d-f-v);s>0&&(y+=m*(s-1)*g);var b=Math.max(0,e-i+1);o.inside(0,h.length-1,b)&&(h[b].y+=1*m*g),o.inside(0,h.length-1,r+1)&&(h[r+1].y-=2*m*g),o.inside(0,h.length-1,a+1)&&(h[a+1].y+=1*m*g)}}));var v=y,m=0,b=0;return h.forEach((function(t){m+=t.y,v+=m,t.y=v,b+=v})),b>0&&h.forEach((function(t){t.y/=b})),h},t.exports.getExpectedValueFromPdf=function(t){if(t&&0!==t.length){var e=0;return t.forEach((function(t){e+=t.x*t.y})),e}},t.exports.getXWithLeftTailArea=function(t,e){if(t&&0!==t.length){for(var n=0,i=0,r=0;r=e));r++);return t[i].x}},t.exports.getPerplexity=function(t){if(t&&0!==t.length){var e=0;return t.forEach((function(t){var n=Math.log(t.y);isFinite(n)&&(e+=t.y*n)})),e=-e/i,Math.pow(2,e)}}},function(t,e,n){"use strict";var i=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n1)throw new Error("quantiles must be between 0 and 1");return 1===e?t[t.length-1]:0===e?t[0]:n%1!=0?t[Math.ceil(n)-1]:t.length%2==0?(t[n-1]+t[n])/2:t[n]}function r(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function o(t,e,n,i){for(n=n||0,i=i||t.length-1;i>n;){if(i-n>600){var a=i-n+1,s=e-n+1,c=Math.log(a),l=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*l*(a-l)/a);s-a/2<0&&(u*=-1),o(t,e,Math.max(n,Math.floor(e-s*l/a+u)),Math.min(i,Math.floor(e+(a-s)*l/a+u)))}var h=t[e],f=n,p=i;for(r(t,n,e),t[i]>h&&r(t,n,i);fh;)p--}t[n]===h?r(t,n,p):r(t,++p,i),p<=e&&(n=p+1),e<=p&&(i=p-1)}}function a(t,e,n,i){e%1==0?o(t,e,n,i):(o(t,e=Math.floor(e),n,i),o(t,e+1,e+1,i))}function s(t,e){return t-e}function c(t,e){var n=t*e;return 1===e?t-1:0===e?0:n%1!=0?Math.ceil(n)-1:t%2==0?n-.5:n}Object.defineProperty(e,"__esModule",{value:!0}),e.quantile=e.quickselect=e.swap=e.quantileSorted=void 0,e.quantileSorted=i,e.swap=r,e.quickselect=o,e.quantile=function(t,e){var n=t.slice();if(Array.isArray(e)){!function(t,e){for(var n=[0],i=0;i0?y:v},O=(0,c.deepAssign)({},t,{options:{xField:s,yField:l.Y_FIELD,seriesField:s,rawFields:[h,l.DIFF_FIELD,l.IS_TOTAL,l.Y_FIELD],widthRatio:d,interval:{style:g,shape:b||"waterfall",color:_}}});return(0,a.interval)(O).ext.geometry.customInfo(i.__assign(i.__assign({},x),{leaderLine:p})),t}function p(t){var e,n,i=t.options,a=i.xAxis,s=i.yAxis,u=i.xField,h=i.yField,f=i.meta,p=(0,c.deepAssign)({},{alias:h},(0,r.get)(f,h));return(0,c.flow)((0,o.scale)(((e={})[u]=a,e[h]=s,e[l.Y_FIELD]=s,e),(0,c.deepAssign)({},f,((n={})[l.Y_FIELD]=p,n[l.DIFF_FIELD]=p,n[l.ABSOLUTE_FIELD]=p,n))))(t)}function d(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return!1===i?e.axis(o,!1):e.axis(o,i),!1===r?(e.axis(a,!1),e.axis(l.Y_FIELD,!1)):(e.axis(a,r),e.axis(l.Y_FIELD,r)),t}function g(t){var e=t.chart,n=t.options,i=n.legend,o=n.total,a=n.risingFill,l=n.fallingFill,u=n.locale,h=(0,s.getLocale)(u);if(!1===i)e.legend(!1);else{var f=[{name:h.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:h.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:l}}}];o&&f.push({name:o.label||"",value:"total",marker:{symbol:"square",style:(0,c.deepAssign)({},{r:5},(0,r.get)(o,"style"))}}),e.legend((0,c.deepAssign)({},{custom:!0,position:"top",items:f},i)),e.removeInteraction("legend-filter")}return t}function y(t){var e=t.chart,n=t.options,r=n.label,o=n.labelMode,a=n.xField,s=(0,c.findGeometry)(e,"interval");if(r){var u=r.callback,h=i.__rest(r,["callback"]);s.label({fields:"absolute"===o?[l.ABSOLUTE_FIELD,a]:[l.DIFF_FIELD,a],callback:u,cfg:(0,c.transformLabel)(h)})}else s.label(!1);return t}function v(t){var e=t.chart,n=t.options,r=n.tooltip,o=n.xField,a=n.yField;if(!1!==r){e.tooltip(i.__assign({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},r));var s=e.geometries[0];(null==r?void 0:r.formatter)?s.tooltip("".concat(o,"*").concat(a),r.formatter):s.tooltip(a)}else e.tooltip(!1);return t}e.tooltip=v,e.adaptor=function(t){return(0,c.flow)(h,o.theme,f,p,d,g,v,y,o.state,o.interaction,o.animation,(0,o.annotation)())(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(10),o=n(0),a=n(2);(0,r.registerShape)("interval","waterfall",{draw:function(t,e){var n=t.customInfo,r=t.points,s=t.nextPoints,c=e.addGroup(),l=this.parsePath(function(t){for(var e=[],n=0;n=f));)if(n.x=u+o,n.y=h+s,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||i&&d(n,e,t[0])||i&&(l=i,!((c=n).x+c.x1>l[0].x&&c.x+c.x0l[0].y&&c.y+c.y0>5,b=t[0]>>5,x=n.x-(m<<4),O=127&x,w=32-O,j=n.y1-n.y0,S=void 0,M=(n.y+n.y0)*b+(x>>5),A=0;A>>O:0);M+=b}return delete n.sprite,!0}return!1}return A.start=function(){var a=t[0],s=t[1],c=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;var n=t.getContext("2d",{willReadFrequently:!0});return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(M()),l=A.board?A.board:v((t[0]>>5)*t[1]),u=O.length,h=[],f=O.map((function(t,a,s){return t.text=j.call(this,t,a,s),t.font=e.call(this,t,a,s),t.style=S.call(this,t,a,s),t.weight=i.call(this,t,a,s),t.rotate=r.call(this,t,a,s),t.size=~~n.call(this,t,a,s),t.padding=o.call(this,t,a,s),t})).sort((function(t,e){return e.size-t.size})),d=-1,y=A.board?[{x:0,y:0},{x:a,y:s}]:null;return function(){var e=Date.now();for(;Date.now()-e>1,n.y=s*(_()+.5)>>1,p(c,n,f,d),n.hasText&&C(l,n,y)&&(h.push(n),y?A.hasImage||g(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}A._tags=h,A._bounds=y}(),A},A.createMask=function(e){var n=document.createElement("canvas"),i=t[0],r=t[1];if(i&&r){var o=i>>5,a=v((i>>5)*r);n.width=i,n.height=r;var s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,i,r);for(var c=s.getImageData(0,0,i,r).data,l=0;l>5),f=l*i+u<<2,p=c[f]>=250&&c[f+1]>=250&&c[f+2]>=250?1<<31-u%32:0;a[h]|=p}A.board=a,A.hasImage=!0}},A.timeInterval=function(t){w=null==t?1/0:t},A.words=function(t){O=t},A.size=function(e){t=[+e[0],+e[1]]},A.font=function(t){e=b(t)},A.fontWeight=function(t){i=b(t)},A.rotate=function(t){r=b(t)},A.spiral=function(t){a=x[t]||t},A.fontSize=function(t){n=b(t)},A.padding=function(t){o=b(t)},A.random=function(t){_=b(t)},A}();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach((function(t){(0,i.isNil)(e[t])||n[t](e[t])})),n.words(t),e.imageMask&&n.createMask(e.imageMask);var r=n.start()._tags;r.forEach((function(t){t.x+=e.size[0]/2,t.y+=e.size[1]/2}));var o=e.size,a=o[0],_=o[1];return r.push({text:"",value:0,x:0,y:0,opacity:0}),r.push({text:"",value:0,x:a,y:_,opacity:0}),r}e.wordCloud=function(t,e){return o(t,e=(0,i.assign)({},r,e))},e.transform=o;var a=Math.PI/180;function s(t){return t.text}function c(){return"serif"}function l(){return"normal"}function u(t){return t.value}function h(){return 90*~~(2*Math.random())}function f(){return 1}function p(t,e,n,i){if(!e.sprite){var r=t.context,o=t.ratio;r.clearRect(0,0,2048/o,2048/o);var s=0,c=0,l=0,u=n.length;for(--i;++i>5<<5,f=~~Math.max(Math.abs(y+v),Math.abs(y-v))}else h=h+31>>5<<5;if(f>l&&(l=f),s+h>=2048&&(s=0,c+=l,l=0),c+f>=2048)break;r.translate((s+(h>>1))/o,(c+(f>>1))/o),e.rotate&&r.rotate(e.rotate*a),r.fillText(e.text,0,0),e.padding&&(r.lineWidth=2*e.padding,r.strokeText(e.text,0,0)),r.restore(),e.width=h,e.height=f,e.xoff=s,e.yoff=c,e.x1=h>>1,e.y1=f>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,s+=h}for(var b=r.getImageData(0,0,2048/o,2048/o).data,x=[];--i>=0;)if((e=n[i]).hasText){for(var _=(h=e.width)>>5,O=(f=e.y1-e.y0,0);O>5),A=b[2048*(c+S)+(s+O)<<2]?1<<31-O%32:0;x[M]|=A,w|=A}w?j=S:(e.y0++,f--,S--,c++)}e.y1=e.y0+j,e.sprite=x.slice(0,(e.y1-e.y0)*_)}}}function d(t,e,n){n>>=5;for(var i,r=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,c=32-s,l=t.y1-t.y0,u=(t.y+t.y0)*n+(a>>5),h=0;h>>s:0))&e[u+f])return!0;u+=n}return!1}function g(t,e){var n=t[0],i=t[1];e.x+e.x0i.x&&(i.x=e.x+e.x1),e.y+e.y1>i.y&&(i.y=e.y+e.y1)}function y(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function v(t){for(var e=[],n=-1;++n-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},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["[object Arguments]"]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object Boolean]"]=P["[object DataView]"]=P["[object Date]"]=P["[object Error]"]=P["[object Function]"]=P["[object Map]"]=P["[object Number]"]=P["[object Object]"]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object WeakMap]"]=!1;var T=function(t){return y(t)&&I(t.length)&&!!P[d(t)]};var F=function(t){return function(e){return t(e)}},L=n(101),k=L.a&&L.a.isTypedArray,D=k?F(k):T,B=Object.prototype.hasOwnProperty;var N=function(t,e){var n=i(t),r=!n&&S(t),o=!n&&!r&&Object(M.a)(t),a=!n&&!r&&!o&&D(t),s=n||r||o||a,c=s?x(t.length,String):[],l=c.length;for(var u in t)!e&&!B.call(t,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||E(u,l))||c.push(u);return c},R=Object.prototype;var V=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||R)};var z=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),G=Object.prototype.hasOwnProperty;var Y=function(t){if(!V(t))return z(t);var e=[];for(var n in Object(t))G.call(t,n)&&"constructor"!=n&&e.push(n);return e};function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var X=function(t){var e=W(t);return null!=t&&("object"==e||"function"==e)};var H=function(t){if(!X(t))return!1;var e=d(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};var U=function(t){return null!=t&&I(t.length)&&!H(t)};var q=function(t){return U(t)?N(t):Y(t)};var Z=function(t,e){return function(n,i){if(null==n)return n;if(!U(n))return t(n,i);for(var r=n.length,o=e?r:-1,a=Object(n);(e?o--:++o1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}Q(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0},nt=n(7);var it=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var i=!!e,r=[],o=0,a=t.length;o=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])}))}(t,e,n));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=n-1;o++)i.push(r)}return i}function at(t,e){if(1===t.length)return t;var n=t.length-1,i=e.length-1,r=n/i,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a-1};var dt=function(t,e){var n=this.__data__,i=lt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function gt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++es))return!1;var l=o.get(t),u=o.get(e);if(l&&u)return l==e&&u==t;var h=-1,f=!0,p=2&n?new le:void 0;for(o.set(t,e),o.set(e,t);++h=0;c--)a=o[c].index,"add"===o[c].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}if((i=t.length)0)){t[i]=e[i];break}n=Ue(n,t[i-1],1)}t[i]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[i]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(i>0)){t[i]=e[i];break}n=Ue(n,t[i-1],2)}t[i]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(i>0)){t[i]=e[i];break}n=Ue(n,t[i-1],1)}t[i]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[i]=e[i]}return t}function Ze(t,e,n,i,r){return r?[["M",+t+ +r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]]:[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]]}var $e="\t\n\v\f\r   ᠎              \u2028\u2029",Ke=new RegExp("([a-z])["+$e+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+$e+"]*,?["+$e+"]*)+)","ig"),Qe=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+$e+"]*,?["+$e+"]*","ig");function Je(t){if(!t)return null;if(i(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(Ke,(function(t,i,r){var o=[],a=i.toLowerCase();if(r.replace(Qe,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([i].concat(o.splice(0,2))),a="l",i="m"===i?"l":"L"),"o"===a&&1===o.length&&n.push([i,o[0]]),"r"===a)n.push([i].concat(o));else for(;o.length>=e[a]&&(n.push([i].concat(o.splice(0,e[a]))),e[a]););return""})),n}var tn=/[a-z]/;function en(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function nn(t){var e=Je(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,i=0;i=0){n=!0;break}}if(!n)return e;var o=[],a=0,s=0,c=0,l=0,u=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(c=a=+h[1],l=s=+h[2],u++,o[0]=["M",a,s]);i=u;for(var f=e.length;i1&&(r=1),r<-1&&(r=-1),(t*i-e*n<0?-1:1)*Math.acos(r)},cn=function(t){var e=t.px,n=t.py,i=t.cx,r=t.cy,o=t.rx,a=t.ry,s=t.xAxisRotation,c=void 0===s?0:s,l=t.largeArcFlag,u=void 0===l?0:l,h=t.sweepFlag,f=void 0===h?0:h,p=[];if(0===o||0===a)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:r}];var d=Math.sin(c*rn/360),g=Math.cos(c*rn/360),y=g*(e-i)/2+d*(n-r)/2,v=-d*(e-i)/2+g*(n-r)/2;if(0===y&&0===v)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:r}];o=Math.abs(o),a=Math.abs(a);var m=Math.pow(y,2)/Math.pow(o,2)+Math.pow(v,2)/Math.pow(a,2);m>1&&(o*=Math.sqrt(m),a*=Math.sqrt(m));var b=function(t,e,n,i,r,o,a,s,c,l,u,h){var f=Math.pow(r,2),p=Math.pow(o,2),d=Math.pow(u,2),g=Math.pow(h,2),y=f*p-f*g-p*d;y<0&&(y=0),y/=f*g+p*d;var v=(y=Math.sqrt(y)*(a===s?-1:1))*r/o*h,m=y*-o/r*u,b=l*v-c*m+(t+n)/2,x=c*v+l*m+(e+i)/2,_=(u-v)/r,O=(h-m)/o,w=(-u-v)/r,j=(-h-m)/o,S=sn(1,0,_,O),M=sn(_,O,w,j);return 0===s&&M>0&&(M-=rn),1===s&&M<0&&(M+=rn),[b,x,S,M]}(e,n,i,r,o,a,u,f,d,g,y,v),x=b[0],_=b[1],O=b[2],w=b[3],j=Math.abs(w)/(rn/4);Math.abs(1-j)<1e-7&&(j=1);var S=Math.max(Math.ceil(j),1);w/=S;for(var M=0;M7){t[n].shift();for(var i=t[n],r=n;i.length;)e[n]="A",t.splice(r+=1,0,["C"].concat(i.splice(0,6)));t.splice(n,1)}}var gn=function(t,e,n,i,r){return t*(t*(-3*e+9*n-9*i+3*r)+6*e-12*n+6*i)-3*e+3*n},yn=function(t,e,n,i,r,o,a,s,c){null===c&&(c=1);for(var l=(c=c>1?1:c<0?0:c)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=l*u[p]+l,g=gn(d,t,n,r,a),y=gn(d,e,i,o,s),v=g*g+y*y;f+=h[p]*Math.sqrt(v)}return l*f},vn=function(t,e,n,i,r,o,a,s){for(var c,l,u,h,f=[],p=[[],[]],d=0;d<2;++d)if(0===d?(l=6*t-12*n+6*r,c=-3*t+9*n-9*r+3*a,u=3*n-3*t):(l=6*e-12*i+6*o,c=-3*e+9*i-9*o+3*s,u=3*i-3*e),Math.abs(c)<1e-12){if(Math.abs(l)<1e-12)continue;(h=-u/l)>0&&h<1&&f.push(h)}else{var g=l*l-4*u*c,y=Math.sqrt(g);if(!(g<0)){var v=(-l+y)/(2*c);v>0&&v<1&&f.push(v);var m=(-l-y)/(2*c);m>0&&m<1&&f.push(m)}}for(var b,x=f.length,_=x;x--;)b=1-(h=f[x]),p[0][x]=b*b*b*t+3*b*b*h*n+3*b*h*h*r+h*h*h*a,p[1][x]=b*b*b*e+3*b*b*h*i+3*b*h*h*o+h*h*h*s;return p[0][_]=t,p[1][_]=e,p[0][_+1]=a,p[1][_+1]=s,p[0].length=p[1].length=_+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},mn=function(t,e,n,i,r,o,a,s){if(!(Math.max(t,n)Math.max(r,a)||Math.max(e,i)Math.max(o,s))){var c=(t-n)*(o-s)-(e-i)*(r-a);if(c){var l=((t*i-e*n)*(r-a)-(t-n)*(r*s-o*a))/c,u=((t*i-e*n)*(o-s)-(e-i)*(r*s-o*a))/c,h=+l.toFixed(2),f=+u.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||f<+Math.min(e,i).toFixed(2)||f>+Math.max(e,i).toFixed(2)||f<+Math.min(o,s).toFixed(2)||f>+Math.max(o,s).toFixed(2)))return{x:l,y:u}}}},bn=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},xn=function(t,e,n,i){return null===t&&(t=e=n=i=0),null===e&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:i,h:i,x2:t+n,y2:e+i,cx:t+n/2,cy:e+i/2,r1:Math.min(n,i)/2,r2:Math.max(n,i)/2,r0:Math.sqrt(n*n+i*i)/2,path:Ze(t,e,n,i),vb:[t,e,n,i].join(" ")}},_n=function(t,e,n,r,o,a,s,c){i(t)||(t=[t,e,n,r,o,a,s,c]);var l=vn.apply(null,t);return xn(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},On=function(t,e,n,i,r,o,a,s,c){var l=1-c,u=Math.pow(l,3),h=Math.pow(l,2),f=c*c,p=f*c,d=t+2*c*(n-t)+f*(r-2*n+t),g=e+2*c*(i-e)+f*(o-2*i+e),y=n+2*c*(r-n)+f*(a-2*r+n),v=i+2*c*(o-i)+f*(s-2*o+i);return{x:u*t+3*h*c*n+3*l*c*c*r+p*a,y:u*e+3*h*c*i+3*l*c*c*o+p*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:l*t+c*n,y:l*e+c*i},end:{x:l*r+c*a,y:l*o+c*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},wn=function(t,e,n){if(!function(t,e){return t=xn(t),e=xn(e),bn(e,t.x,t.y)||bn(e,t.x2,t.y)||bn(e,t.x,t.y2)||bn(e,t.x2,t.y2)||bn(t,e.x,e.y)||bn(t,e.x2,e.y)||bn(t,e.x,e.y2)||bn(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(_n(t),_n(e)))return n?0:[];for(var i=~~(yn.apply(0,t)/8),r=~~(yn.apply(0,e)/8),o=[],a=[],s={},c=n?0:[],l=0;l=0&&b<=1&&x>=0&&x<=1&&(n?c++:c.push({x:m.x,y:m.y,t1:b,t2:x}))}}return c};function jn(t,e){return function(t,e,n){var i,r,o,a,s,c,l,u,h,f;t=pn(t),e=pn(e);for(var p=n?0:[],d=0,g=t.length;d1&&(r*=Math.sqrt(g),o*=Math.sqrt(g));var y=r*r*(d*d)+o*o*(p*p),v=y?Math.sqrt((r*r*(o*o)-y)/y):1;s===c&&(v*=-1),isNaN(v)&&(v=0);var m=o?v*r*d/o:0,b=r?v*-o*p/r:0,x=(l+h)/2+Math.cos(a)*m-Math.sin(a)*b,_=(u+f)/2+Math.sin(a)*m+Math.cos(a)*b,O=[(p-m)/r,(d-b)/o],w=[(-1*p-m)/r,(-1*d-b)/o],j=En([1,0],O),S=En(O,w);return Cn(O,w)<=-1&&(S=Math.PI),Cn(O,w)>=1&&(S=0),0===c&&S>0&&(S-=2*Math.PI),1===c&&S<0&&(S+=2*Math.PI),{cx:x,cy:_,rx:In(t,[h,f])?0:r,ry:In(t,[h,f])?0:o,startAngle:j,endAngle:j+S,xRotation:a,arcFlag:s,sweepFlag:c}}function Tn(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Fn(t){for(var e=[],n=null,i=null,r=null,o=0,a=(t=et(t)).length,s=0;s=e&&t<=n};function kn(t,e,n,i){var r=n.x-t.x,o=n.y-t.y,a=e.x-t.x,s=e.y-t.y,c=i.x-n.x,l=i.y-n.y,u=a*l-s*c,h=null;if(u*u>.001*(a*a+s*s)*(c*c+l*l)){var f=(r*l-o*c)/u,p=(r*s-o*a)/u;Ln(f,0,1)&&Ln(p,0,1)&&(h={x:t.x+f*a,y:t.y+f*s})}return h}function Dn(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Bn(t,e,n){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function Nn(t,e,n){var i=!1,r=t.length;if(r<=2)return!1;for(var o=0;o0!=Dn(s[1]-n)>0&&Dn(e-(n-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(i=!i)}return i}function Rn(t){for(var e=[],n=t.length,i=0;i1){var a=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:a[0],y:a[1]}})}return e}function Vn(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function zn(t,e){if(t.length<2||e.length<2)return!1;var n,i,r=Vn(t),o=Vn(e);if(n=r,(i=o).minX>n.maxX||i.maxXn.maxY||i.maxY