jmgraph 3.2.17 → 3.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(i){var t;t=function(t,e,n){var r=function r(i,o,s){function a(e,t){if(!o[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(u)return u(e,!0);throw(n=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",n}n=o[e]={exports:{}},i[e][0].call(n.exports,function(t){return a(i[e][1][t]||t)},n,n.exports,r,i,o,s)}return o[e].exports}for(var u="function"==typeof require&&require,t=0;t<s.length;t++)a(s[t]);return a}({1:[function(t,e,n){"use strict";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)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmArc",{enumerable:!0,get:function(){return i.jmArc}}),Object.defineProperty(n,"jmArrow",{enumerable:!0,get:function(){return o.jmArrow}}),Object.defineProperty(n,"jmBezier",{enumerable:!0,get:function(){return s.jmBezier}}),Object.defineProperty(n,"jmCircle",{enumerable:!0,get:function(){return a.jmCircle}}),Object.defineProperty(n,"jmHArc",{enumerable:!0,get:function(){return u.jmHArc}}),Object.defineProperty(n,"jmLine",{enumerable:!0,get:function(){return c.jmLine}}),Object.defineProperty(n,"jmPrismatic",{enumerable:!0,get:function(){return l.jmPrismatic}}),Object.defineProperty(n,"jmRect",{enumerable:!0,get:function(){return h.jmRect}}),Object.defineProperty(n,"jmArrowLine",{enumerable:!0,get:function(){return f.jmArrowLine}}),Object.defineProperty(n,"jmImage",{enumerable:!0,get:function(){return p.jmImage}}),Object.defineProperty(n,"jmLabel",{enumerable:!0,get:function(){return y.jmLabel}}),Object.defineProperty(n,"jmResize",{enumerable:!0,get:function(){return d.jmResize}}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return v.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return v.jmList}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return v.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return v.jmGradient}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return v.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return v.jmPath}}),n.create=n.jmGraph=n.default=void 0;var i=t("./src/shapes/jmArc.js"),o=t("./src/shapes/jmArrow.js"),s=t("./src/shapes/jmBezier.js"),a=t("./src/shapes/jmCircle.js"),u=t("./src/shapes/jmHArc.js"),c=t("./src/shapes/jmLine.js"),l=t("./src/shapes/jmPrismatic.js"),h=t("./src/shapes/jmRect.js"),f=t("./src/shapes/jmArrowLine.js"),p=t("./src/shapes/jmImage.js"),y=t("./src/shapes/jmLabel.js"),d=t("./src/shapes/jmResize.js"),v=t("./src/core/jmGraph.js");function m(t,e,n){return(m=j()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&b(r,n.prototype),r}).apply(null,arguments)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _={arc:i.jmArc,arrow:o.jmArrow,bezier:s.jmBezier,circle:a.jmCircle,harc:u.jmHArc,line:c.jmLine,prismatic:l.jmPrismatic,rect:h.jmRect,arrowline:f.jmArrowLine,image:p.jmImage,img:p.jmImage,label:y.jmLabel,resize:d.jmResize},P=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(a,v.jmGraph);var n,r,t,e,i,s=(n=a,r=j(),function(){var t,e=w(n);return x(this,r?(t=w(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function a(r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var t=this instanceof a?this.constructor:void 0;return(i=Object.assign({},i)).shapes=Object.assign(_,i.shapes||{}),t&&t.prototype instanceof v.jmGraph?("function"==typeof i&&(o=i,i={}),s.call(this,r,i,o)):x(void 0,new Promise(function(t,e){var n=new a(r,i,o);t&&t(n)}))}return t=a,i=[{key:"create",value:function(){return O.apply(void 0,arguments)}}],(e=null)&&g(t.prototype,e),i&&g(t,i),a}();n.jmGraph=n.default=P;var O=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return m(P,e)};n.create=O},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":22,"./src/shapes/jmArrow.js":23,"./src/shapes/jmArrowLine.js":24,"./src/shapes/jmBezier.js":25,"./src/shapes/jmCircle.js":26,"./src/shapes/jmHArc.js":27,"./src/shapes/jmImage.js":28,"./src/shapes/jmLabel.js":29,"./src/shapes/jmLine.js":30,"./src/shapes/jmPrismatic.js":31,"./src/shapes/jmRect.js":32,"./src/shapes/jmResize.js":33}],2:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmControl=n.default=void 0;var r,h=t("./jmUtils.js"),o=t("./jmList.js"),u=t("./jmGradient.js"),c=t("./jmShadow.js"),s=t("./jmProperty.js"),a=(r=t("../lib/webgl/path.js"))&&r.__esModule?r:{default:r};function l(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function p(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=d(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function d(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function v(t){return(v="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 m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=j(n);return t=r?(t=j(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==v(t)&&"function"!=typeof t?x(e):t}}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w={fill:"fillStyle",fillImage:"fillImage",stroke:"strokeStyle","shadow.blur":"shadowBlur","shadow.x":"shadowOffsetX","shadow.y":"shadowOffsetY","shadow.color":"shadowColor",lineWidth:"lineWidth",miterLimit:"miterLimit",fillStyle:"fillStyle",strokeStyle:"strokeStyle",font:"font",opacity:"globalAlpha",textAlign:"textAlign",textBaseline:"textBaseline",shadowBlur:"shadowBlur",shadowOffsetX:"shadowOffsetX",shadowOffsetY:"shadowOffsetY",shadowColor:"shadowColor",lineJoin:"lineJoin",lineCap:"lineCap"},_=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(i,s.jmProperty);var t,e,n,r=b(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this,t=t||{})).property("type",e||(this instanceof i?this.constructor:void 0).name),n.style=t&&t.style?t.style:{},n.width=t.width||0,n.height=t.height||0,n.hitArea=t.hitArea||null,t.position&&(n.position=t.position),n.graph=t.graph||null,n.zIndex=t.zIndex||0,n.interactive=void 0!==t.interactive&&t.interactive,"webgl"===n.mode&&(n.webglControl=new a.default(n.graph,{style:n.style,control:x(n),isRegular:t.isRegular,needCut:t.needCut})),n.initializing(),n.on=n.bind,n.option=t,n}return t=i,(e=[{key:"type",get:function(){return this.property("type")}},{key:"context",get:function(){var t=this.property("context");if(t)return t;if(this.is("jmGraph")&&this.canvas&&this.canvas.getContext)return this.context=this.canvas.getContext(this.mode||"2d");t=this.graph;return t?t.context:t.canvas.getContext(this.mode||"2d")},set:function(t){return this.property("context",t)}},{key:"style",get:function(){return this.property("style")||this.property("style",{})},set:function(t){return this.needUpdate=!0,this.property("style",t)}},{key:"visible",get:function(){var t=this.property("visible");return t=void 0===t?this.property("visible",!0):t},set:function(t){return this.needUpdate=!0,this.property("visible",t)}},{key:"interactive",get:function(){return this.property("interactive")},set:function(t){return this.property("interactive",t)}},{key:"hitArea",get:function(){return this.property("hitArea")},set:function(t){return this.property("hitArea",t)}},{key:"children",get:function(){return this.property("children")||this.property("children",new o.jmList)},set:function(t){return this.needUpdate=!0,this.property("children",t)}},{key:"width",get:function(){var t=this.property("width");return t=void 0===t?this.property("width",0):t},set:function(t){return this.needUpdate=!0,this.property("width",t)}},{key:"height",get:function(){var t=this.property("height");return t=void 0===t?this.property("height",0):t},set:function(t){return this.needUpdate=!0,this.property("height",t)}},{key:"zIndex",get:function(){return this.property("zIndex")||this.property("zIndex",0)},set:function(t){return this.property("zIndex",t),this.children.sort(),this.needUpdate=!0,t}},{key:"cursor",get:function(){var t=this.graph;if(t)return t.css("cursor")},set:function(t){var e=this.graph;e&&e.css("cursor",t)}},{key:"initializing",value:function(){var e=this;this.children=this.children||new o.jmList;var n=this.children.add;this.children.add=function(t){if("object"===v(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),n.call(this,t),t.emit("add",t),e.needUpdate=!0,e.graph&&(t.graph=e.graph),this.sort(),t},this.children.oremove=this.children.remove,this.children.remove=function(t){"object"===v(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var t,r={};for(t in this.each(function(t,e){var n;e&&(!(n=e.zIndex)&&e.style&&e.style.zIndex&&(n=Number(e.style.zIndex),isNaN(n)&&(n=e.style.zIndex||0)),(r[n]||(r[n]=[])).push(e))}),this.splice(0,this.length),r)n.call(this,r[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var a=this;if(t=t||h.jmUtils.clone(this.style,!0)){var e,n,r=function t(e,n,r){if(e){var i=e;if("function"==typeof i)try{i=i.call(a)}catch(t){return void console.warn(t)}var o=v(i),r=w[r||n];if(i instanceof u.jmGradient||"string"==o&&-1<i.indexOf("-gradient"))t((i="string"==o&&-1<i.indexOf("-gradient")?new u.jmGradient(i):i).toGradient(a),r||n);else if(r)a.webglControl?a.webglControl.setStyle(r,i):("string"==o&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(r)&&(i=h.jmUtils.toColor(i)),a.context[r]=i);else switch(n){case"shadow":if("string"==o){t(new c.jmShadow(i),n);break}for(var s in i)t(i[s],s,n+"."+s);break;case"translate":break;case"rotation":if(void 0===i.angle||isNaN(i.angle))break;i=a.getRotation(i),a.__translateAbsolutePosition=a.toAbsolutePoint({x:i.x,y:i.y}),a.context.translate&&a.context.translate(a.__translateAbsolutePosition.x,a.__translateAbsolutePosition.y),a.context.rotate&&a.context.rotate(i.angle),a.context.translate&&a.context.translate(-a.__translateAbsolutePosition.x,-a.__translateAbsolutePosition.y);break;case"transform":if(!a.context.transform)break;Array.isArray(i)?a.context.transform.apply(a.context,i):"object"==v(i)&&a.context.transform(i.scaleX||1,i.skewX||0,i.skewY||0,i.scaleY||1,i.offsetX||0,i.offsetY||0);break;case"cursor":a.cursor=i}}};for(e in this.translate&&r(this.translate,"translate"),this.transform&&r(this.transform,"transform"),t)"constructor"!==e&&("string"==(n=v(t[e]))&&-1<t[e].indexOf("-gradient")?t[e]=new u.jmGradient(t[e]):"string"==n&&"shadow"==e&&(t[e]=new c.jmShadow(t[e])),r(t[e],e))}}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};if("jmGraph"==this.type&&this.canvas)"function"==typeof this.canvas.width?e.right=this.canvas.width():this.width&&(e.right=this.width),"function"==typeof this.canvas.height?e.bottom=this.canvas.height():this.height&&(e.bottom=this.height);else if(this.points&&0<this.points.length){var n,r=y(this.points);try{for(r.s();!(n=r.n()).done;){var i=n.value;(void 0===e.left||e.left>i.x)&&(e.left=i.x),(void 0===e.top||e.top>i.y)&&(e.top=i.y),(void 0===e.right||e.right<i.x)&&(e.right=i.x),(void 0===e.bottom||e.bottom<i.y)&&(e.bottom=i.y)}}catch(t){r.e(t)}finally{r.f()}}else!this.getLocation||(t=this.getLocation())&&(e.left=t.left,e.top=t.top,e.right=t.left+t.width,e.bottom=t.top+t.height);return e.left||(e.left=0),e.top||(e.top=0),e.right||(e.right=0),e.bottom||(e.bottom=0),e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"getRotationBounds",value:function(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null)||this.getRotation(),e=this.getBounds();if(!t||!t.angle)return e;var n,r={width:0,height:0,oldBounds:e},i=[];this.points&&0<this.points.length?i=h.jmUtils.clone(this.points,!0):!this.getLocation||(n=this.getLocation())&&i.push({x:n.left,y:n.top},{x:n.left+n.width,y:n.top},{x:n.left+n.width,y:n.top+n.height},{x:n.left,y:n.top+n.height});var o,s=y(i=h.jmUtils.rotatePoints(i,{x:t.x+e.left,y:t.y+e.top},t.angle));try{for(s.s();!(o=s.n()).done;){var a=o.value;(void 0===r.left||r.left>a.x)&&(r.left=a.x),(void 0===r.top||r.top>a.y)&&(r.top=a.y),(void 0===r.right||r.right<a.x)&&(r.right=a.x),(void 0===r.bottom||r.bottom<a.y)&&(r.bottom=a.y)}}catch(t){s.e(t)}finally{s.f()}return r.left||(r.left=0),r.top||(r.top=0),r.right||(r.right=0),r.bottom||(r.bottom=0),r.width=r.right-r.left,r.height=r.bottom-r.top,r}},{key:"getLocation",value:function(){var t=this.location={left:0,top:0,width:0,height:0};t.position="function"==typeof this.position?this.position():h.jmUtils.clone(this.position),t.center=this.center&&"function"==typeof this.center?this.center():h.jmUtils.clone(this.center),t.start=this.start&&"function"==typeof this.start?this.start():h.jmUtils.clone(this.start),t.end=this.end&&"function"==typeof this.end?this.end():h.jmUtils.clone(this.end),t.radius=this.radius,t.width=this.width,t.height=this.height;var e=h.jmUtils.clone(this.style.margin,{});return e.left=e.left||0,e.top=e.top||0,e.right=e.right||0,e.bottom=e.bottom||0,t.position?(t.left=t.position.x,t.top=t.position.y):(t.left=e.left,t.top=e.top),this.parent&&(e=this.parent.getBounds(),h.jmUtils.checkPercent(t.left)&&(t.left=h.jmUtils.percentToNumber(t.left)*e.width),h.jmUtils.checkPercent(t.top)&&(t.top=h.jmUtils.percentToNumber(t.top)*e.height),h.jmUtils.checkPercent(t.width)&&(t.width=h.jmUtils.percentToNumber(t.width)*e.width),h.jmUtils.checkPercent(t.height)&&(t.height=h.jmUtils.percentToNumber(t.height)*e.height),t.center&&(h.jmUtils.checkPercent(t.center.x)&&(t.center.x=h.jmUtils.percentToNumber(t.center.x)*e.width),h.jmUtils.checkPercent(t.center.y)&&(t.center.y=h.jmUtils.percentToNumber(t.center.y)*e.height)),t.radius&&h.jmUtils.checkPercent(t.radius)&&(t.radius=h.jmUtils.percentToNumber(t.radius)*Math.min(e.width,e.height))),t}},{key:"getRotation",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return(t=t||h.jmUtils.clone(this.style.rotation))?(e=e||this.getBounds(),void 0===t.x&&(t.x="50%"),void 0===t.y&&(t.y="50%"),h.jmUtils.checkPercent(t.x)&&(t.x=h.jmUtils.percentToNumber(t.x)*e.width),h.jmUtils.checkPercent(t.y)&&(t.y=h.jmUtils.percentToNumber(t.y)*e.height)):(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null)&&(e=e||this.getBounds(),t.x-=e.left,t.y-=e.top),p(p({},t),{},{bounds:e})}},{key:"getTranslate",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(!(t=t||this.style.translate))return{x:0,y:0};t={x:t.x||0,y:t.y||0};return h.jmUtils.checkPercent(t.x)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.x=h.jmUtils.percentToNumber(t.x)*e.width),h.jmUtils.checkPercent(t.y)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.y=h.jmUtils.percentToNumber(t.y)*e.height),t}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,n,r){n=!1!==n;var i=this.getLocation(!0),o=!1;if(i.position&&(i.left+=t,i.top+=e,this.position.x=i.left,this.position.y=i.top,o=!0),i.center&&(this.center.x=i.center.x+t,this.center.y=i.center.y+e,o=!0),i.start&&"object"==v(i.start)&&(this.start.x=i.start.x+t,this.start.y=i.start.y+e,o=!0),i.end&&"object"==v(i.end)&&(this.end.x=i.end.x+t,this.end.y=i.end.y+e,o=!0),0==o&&this.cpoints){var s=(this.cpoints,this.cpoints);if(s){for(var a=s.length,u=0;u<a;u++)s[u].x+=t,s[u].y+=e;o=!0}}if(0==o&&this.points){for(var c=this.points.length,l=0;l<c;l++)this.points[l].x+=t,this.points[l].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:n,evt:r}),this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t=this.getBounds();if(this.parent&&this.parent.absoluteBounds){var e=this.parent.absoluteBounds||this.parent.getAbsoluteBounds();return{left:e.left+t.left,top:e.top+t.top,right:e.left+t.right,bottom:e.top+t.bottom,width:t.width,height:t.height}}return t}},{key:"toAbsolutePoint",value:function(t){var e;return(t.x||t.y)&&(e=this.absoluteBounds||this.getAbsoluteBounds(),t.x=(t.x||0)+e.left,t.y=(t.y||0)+e.top),t}},{key:"toLocalPosition",value:function(t){var e=this.absoluteBounds||this.getAbsoluteBounds();return!!e&&{x:t.x-e.left,y:t.y-e.top}}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath&&this.context.beginPath(),this.webglControl&&this.webglControl.beginDraw&&this.webglControl.beginDraw()}},{key:"endDraw",value:function(){this.style.close&&(this.webglControl&&this.webglControl.closePath(),this.context.closePath&&this.context.closePath());var t,e=this.style.fill||this.style.fillStyle;e&&(this.webglControl&&(t=this.getBounds(),this.webglControl.fill(t)),this.context.fill&&this.context.fill()),!this.style.stroke&&(e||this.is("jmGraph"))||(this.webglControl&&this.webglControl.stroke(),this.context.stroke&&this.context.stroke()),this.webglControl&&this.webglControl.endDraw&&this.webglControl.endDraw(),this.needUpdate=!1}},{key:"draw",value:function(){if(this.points&&0<this.points.length){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(this.webglControl)this.webglControl.setParentBounds(t),this.webglControl.draw(l(this.points));else if(this.context&&this.context.moveTo){this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,n=1;n<e;n++){var r=this.points[n];r.m?this.context.moveTo(r.x+t.left,r.y+t.top):this.context.lineTo(r.x+t.left,r.y+t.top)}}}}},{key:"paint",value:function(t){!1!==t&&!1!==this.visible&&(this.initPoints&&this.initPoints(),this.bounds=null,this.absoluteBounds=this.getAbsoluteBounds(),t=!0,!this.is("jmGraph")&&this.graph&&(this.absoluteBounds.left>=this.graph.width||this.absoluteBounds.top>=this.graph.height||this.absoluteBounds.right<=0||this.absoluteBounds.bottom<=0)&&(t=!1),this.context.save&&this.context.save(),this.emit("beginDraw",this),this.setStyle(),t&&this.beginDraw&&this.beginDraw(),t&&this.draw&&this.draw(),t&&this.endDraw&&this.endDraw(),this.children&&this.children.each(function(t,e){e&&e.paint&&e.paint()}),this.emit("endDraw",this),this.context.restore&&this.context.restore(),this.needUpdate=!1)}},{key:"getEvent",value:function(t){return this.__events?this.__events[t]:null}},{key:"bind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=y(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.bind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t)||function(t,e){return this.__events||(this.__events={}),this.__events[t]=e}.call(this,t,new o.jmList);t.contain(e)||t.add(e)}}},{key:"unbind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=y(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.unbind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t);t&&(e?t.remove(e):t.clear())}}},{key:"emit",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,n){var r,t=this.getEvent(t);return t&&(r=this,Array.isArray(n)||(n=[n]),t.each(function(t,e){!1===e.apply(r,n)&&(n.cancel=!0)})),n.cancel}},{key:"checkPoint",value:function(t,e){if("jmGraph"==this.type){var n=this.getPosition(),r=n.left+this.width,i=n.top+this.height;return t.x>r||t.x<n.left?!1:!(t.y>i||t.y<n.top)}var o=this.getBounds();if(this.hitArea){var r=this.hitArea.x+o.left,s=this.hitArea.y+o.top,i=this.hitArea.width+o.left,n=this.hitArea.height+o.top;return t.x>i||t.x<r?!1:!(t.y>n||t.y<s)}var a=this.points;if(a&&a.length||((a=[]).push({x:o.left,y:o.top}),a.push({x:o.right,y:o.top}),a.push({x:o.right,y:o.bottom}),a.push({x:o.left,y:o.bottom}),a.push({x:o.left,y:o.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),a&&a.length){s=this.getRotation(null,o);if(s&&s.angle&&(a=h.jmUtils.clone(a,!0),a=h.jmUtils.rotatePoints(a,{x:s.x+o.left,y:s.y+o.top},s.angle||0)),2<a.length&&(!this.style.fill||this.style.stroke)){for(var u=0,c=a.length,l=u+1;l<=c;l=++u+1)if(l==c){if(this.style.close)if(h.jmUtils.pointInPolygon(t,[a[u],a[0]],e))return!0}else if(h.jmUtils.pointInPolygon(t,[a[u],a[l]],e))return!0;if(!this.style.fill)return!1}return h.jmUtils.pointInPolygon(t,a,e)}return!(t.x>o.right||t.x<o.left)&&!(t.y>o.bottom||t.y<o.top)}},{key:"raiseEvent",value:function(n,r){if(!1!==this.visible){var t,e;r.position||(o=this.graph,r.isWXMiniApp=o.isWXMiniApp,t=r.srcElement||r.target,e=h.jmUtils.getEventPosition(r),r={position:e,button:0==r.button||e.isTouch?1:r.button,keyCode:r.keyCode||r.charCode||r.which,ctrlKey:r.ctrlKey,cancel:!1,event:r,srcElement:t,isWXMiniApp:o.isWXMiniApp}),r.path=r.path||[];var i=!1;if(this.children&&this.children.each(function(t,e){if(!0!==r.cancel&&(i=!1===e.raiseEvent(n,r)||i))return!1},!0),i)return!1;var o=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(!o)return!1;r.position.x=r.position.offsetX-o.left,r.position.y=r.position.offsetY-o.top;o=!1!==this.interactive&&this.checkPoint(r.position);return o?(r.target||(r.target=this),this.runEventAndPopEvent(n,r),this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!0,this.raiseEvent("mousemove"===n?"mouseover":"touchover",r))):!1===this.interactive||o||!this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!1,this.runEventHandle("mousemove"===n?"mouseleave":"touchleave",r)),!1===r.cancel}}},{key:"runEventAndPopEvent",value:function(t,e){!0!==e.cancel&&(e.path.push(this),this.runEventHandle(t,e))}},{key:"clearEvents",value:function(t){t=this.getEvent(t);t&&t.clear}},{key:"findParent",value:function(t){if("string"==typeof t){if(this.type==t)return this}else if(this.is(t))return this;return this.parent?this.parent.findParent(t):null}},{key:"canMove",value:function(t,e){var o;return this.__mvMonitor||(this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0},(o=this).__mvMonitor.mv=function(t){var e=o;if(e.__mvMonitor.mouseDown){e.parent.bounds=null;var n,r=t.position.offsetX-e.__mvMonitor.curposition.x,i=t.position.offsetY-e.__mvMonitor.curposition.y;return e.option.lockSide&&(n=e.bounds||e.getAbsoluteBounds(),((n=h.jmUtils.checkOutSide(e.option.lockSide,n,{x:r,y:i})).left<0&&r<0||0<n.right&&0<r)&&(r=0),(n.top<0&&i<0||0<n.bottom&&0<i)&&(i=0)),(r||i)&&(e.offset(r,i,!0,t),r&&(e.__mvMonitor.curposition.x=t.position.offsetX),i&&(e.__mvMonitor.curposition.y=t.position.offsetY)),!1}},this.__mvMonitor.mu=function(t){var e=o;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=o;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){if(!this.__mvMonitor.mouseDown)return 0==t.button||1==t.button?(this.__mvMonitor.mouseDown=!0,this.__mvMonitor.curposition.x=t.position.offsetX,this.__mvMonitor.curposition.y=t.position.offsetY,this.emit("movestart",{position:this.__mvMonitor.curposition}),!(t.cancel=!0)):void 0}),e=e||this.graph,!1!==t?(e.bind("mousemove",this.__mvMonitor.mv),e.bind("mouseup",this.__mvMonitor.mu),e.bind("mouseleave",this.__mvMonitor.ml),this.bind("mousedown",this.__mvMonitor.md),e.bind("touchmove",this.__mvMonitor.mv),e.bind("touchend",this.__mvMonitor.mu),this.bind("touchstart",this.__mvMonitor.md)):(e.unbind("mousemove",this.__mvMonitor.mv),e.unbind("mouseup",this.__mvMonitor.mu),e.unbind("mouseleave",this.__mvMonitor.ml),this.unbind("mousedown",this.__mvMonitor.md),e.unbind("touchmove",this.__mvMonitor.mv),e.unbind("touchend",this.__mvMonitor.mu),this.unbind("touchstart",this.__mvMonitor.md)),this.interactive=!0,this}}])&&m(t.prototype,e),n&&m(t,n),i}();n.jmControl=n.default=_},{"../lib/webgl/path.js":21,"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmEvents=n.default=void 0;var o=t("./jmUtils.js");function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}t=function(){function n(t,e){i(this,n),this.container=t,this.target=e||t,this.mouseHandler=new a(this,t,e),this.keyHandler=new u(this,t,e)}return s(n,[{key:"touchStart",value:function(t){if((t=t||window.event).eventName="touchstart",this.container.raiseEvent("touchstart",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchMove",value:function(t){if((t=t||window.event).eventName="touchmove",this.container.raiseEvent("touchmove",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchEnd",value:function(t){if((t=t||window.event).eventName="touchend",this.container.raiseEvent("touchend",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchCancel",value:function(t){if((t=t||window.event).eventName="touchcancel",this.container.raiseEvent("touchcancel",t),(t.target||t.srcElement)==this.target)return!1}},{key:"tap",value:function(t){if((t=t||window.event).eventName="tap",this.container.raiseEvent("tap",t),(t.target||t.srcElement)==this.target)return!1}},{key:"destroy",value:function(){this.mouseHandler.destroy(),this.keyHandler.destroy()}}]),n}();n.jmEvents=n.default=t;var a=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(t,e,n)}return s(r,[{key:"init",value:function(e,n,t){var r=this.target,i="undefined"!=typeof document?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){(t=t||window.event).eventName="mousedown",n.raiseEvent("mousedown",t)}),this.eventEvents.mousemove=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if((t=t||window.event).eventName="mousemove",(t.target||t.srcElement)==r)return n.raiseEvent("mousemove",t),t.preventDefault&&t.preventDefault(),!1}),this.eventEvents.mouseover=o.jmUtils.bindEvent(this.target,"mouseover",function(t){(t=t||window.event).eventName="mouseover",n.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){(t=t||window.event).eventName="mouseleave",n.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){(t=t||window.event).eventName="mouseout",n.raiseEvent("mouseout",t)}),i&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(i,"mouseup",function(t){if(!((t=t||window.event).eventName="mouseup")===n.raiseEvent("mouseup",t))return t.preventDefault&&t.preventDefault(),!1})),this.eventEvents.dblclick=o.jmUtils.bindEvent(this.target,"dblclick",function(t){(t=t||window.event).eventName="dblclick",n.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){(t=t||window.event).eventName="click",n.raiseEvent("click",t)}),i&&(this.eventEvents.resize=o.jmUtils.bindEvent(i,"resize",function(t){return(t=t||window.event).eventName="resize",n.raiseEvent("resize",t)})),this.eventEvents.touchstart=o.jmUtils.bindEvent(this.target,"touchstart",function(t){return t.eventName="touchstart",e.touchStart(t)},{passive:!1}),this.eventEvents.touchmove=o.jmUtils.bindEvent(this.target,"touchmove",function(t){return t.eventName="touchmove",e.touchMove(t)},{passive:!1}),i&&(this.eventEvents.touchend=o.jmUtils.bindEvent(i,"touchend",function(t){return t.eventName="touchend",e.touchEnd(t)},{passive:!1})),i&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(i,"touchcancel",function(t){return t.eventName="touchcancel",e.touchCancel(t)},{passive:!1}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}(),u=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(e,n)}return s(r,[{key:"init",value:function(n,t){function r(t){return!(t=t.srcElement||t.target)||"INPUT"!=t.tagName&&"TEXTAREA"!=t.tagName&&"ANCHOR"!=t.tagName&&"FORM"!=t.tagName&&"FILE"!=t.tagName&&"IMG"!=t.tagName&&"HIDDEN"!=t.tagName&&"RADIO"!=t.tagName&&"TEXT"!=t.tagName}var e="undefined"!=typeof document?document:null;e&&(this.eventEvents.keypress=o.jmUtils.bindEvent(e,"keypress",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keypress",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keydown=o.jmUtils.bindEvent(e,"keydown",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keydown",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keyup=o.jmUtils.bindEvent(e,"keyup",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keyup",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}()},{"./jmUtils.js":11}],4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmGradient=n.default=void 0;var d=t("./jmUtils.js"),i=t("./jmList.js");function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}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)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function r(t){if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.stops=new i.jmList,t&&"object"==s(t)){for(var e in t)"stops"!==e&&(this[e]=t[e]);var n;t.stops&&Array.isArray(t.stops)&&(n=this.stops).push.apply(n,o(t.stops))}else"string"==typeof t&&this.fromString(t)}var t,e,n;return t=r,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var r,e=t.context||t,n=t.absoluteBounds||t.getAbsoluteBounds(),i=this.x1||0,o=this.y1||0,s=this.x2,a=this.y2,u=t.getLocation(),c=0,c=(c=u.radius?2*u.radius:c)||Math.min(u.width,u.height);d.jmUtils.checkPercent(i)&&(i=d.jmUtils.percentToNumber(i)*(n.width||c)),d.jmUtils.checkPercent(s)&&(s=d.jmUtils.percentToNumber(s)*(n.width||c)),d.jmUtils.checkPercent(o)&&(o=d.jmUtils.percentToNumber(o)*(n.height||c)),d.jmUtils.checkPercent(a)&&(a=d.jmUtils.percentToNumber(a)*(n.height||c));var l=Number(i)+n.left,h=Number(o)+n.top,f=Number(s)+n.left,p=Number(a)+n.top;if("linear"===this.type?"webgl"===t.mode&&t.webglControl?(r=t.webglControl.createLinearGradient(i,o,s,a,n)).key=this.toString():e.createLinearGradient&&(r=e.createLinearGradient(l,h,f,p)):"radial"===this.type&&(u=this.r1||0,y=this.r2,d.jmUtils.checkPercent(u)&&(u=d.jmUtils.percentToNumber(u),u*=c),d.jmUtils.checkPercent(y)&&(y=d.jmUtils.percentToNumber(y),y*=c),"webgl"===t.mode&&t.webglControl?(r=t.webglControl.createRadialGradient(i,o,u,s,a,y,n)).key=this.toString():e.createRadialGradient?r=e.createRadialGradient(l,h,u,f,p,y):e.createCircularGradient&&(r=e.createCircularGradient(l,h,y))),r)return this.stops.each(function(t,e){var n=d.jmUtils.toColor(e.color);r&&r.addColorStop(e.offset,n)}),r;var y=this.stops.get(0);return y&&y.color||"#000"}},{key:"fromString",value:function(t){if(t){var e=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(e&&!(e.length<3)){this.type=e[1].toLowerCase();t=d.jmUtils.trim(e[2]).split(/\s+/);"linear"==this.type?t.length<=2?(this.x2=t[0],this.y2=t[1]||0):(this.x1=t[0],this.y1=t[1],this.x2=t[2],this.y2=t[3]):t.length<=3?(this.x2=t[0],this.y2=t[1]||0,this.r2=t[2]||0):(this.x1=t[0],this.y1=t[1],this.r1=t[2],this.x2=t[3],this.y2=t[3],this.r2=t[3]);var n=e[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi);if(n&&n.length)for(var r=0;r<n.length;r++){var i,o=d.jmUtils.trim(n[r]),s=o.lastIndexOf(" ");-1<s&&(i=Number(o.substr(s+1)),s=d.jmUtils.trim(o.substr(0,s)),!isNaN(i)&&s&&this.addStop(i,s))}}}}},{key:"toString",value:function(){var n=this.type+"-gradient(";return"linear"==this.type?n+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:n+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){n+=","+e.color+" "+e.offset}),n+")"}}])&&a(t.prototype,e),n&&a(t,n),r}();n.jmGradient=n.default=t},{"./jmList.js":6,"./jmUtils.js":11}],5:[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(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return a.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return r.jmList}}),Object.defineProperty(n,"jmProperty",{enumerable:!0,get:function(){return o.jmProperty}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return u.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return c.jmGradient}}),Object.defineProperty(n,"jmEvents",{enumerable:!0,get:function(){return l.jmEvents}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return h.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return f.jmPath}}),n.jmGraph=n.default=void 0;var a=t("./jmUtils.js"),r=t("./jmList.js"),o=t("./jmProperty.js"),u=t("./jmShadow.js"),c=t("./jmGradient.js"),l=t("./jmEvents.js"),h=t("./jmControl.js"),f=t("./jmPath.js");function p(t,e,n){return(p=g()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&v(r,n.prototype),r}).apply(null,arguments)}function s(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function y(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(n){var r=g();return function(){var t,e=b(n);return t=r?(t=b(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(s,h.jmControl);var t,e,n,o=m(s);function s(t,e,n){var r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),"function"==typeof e&&(n=e,e={}),(e=e||{}).interactive=!0,e.isRegular=!0,(r=o.call(this,e,"jmGraph")).option=e||{},r.devicePixelRatio=1,r.util=r.utils=a.jmUtils,r.mode=e.mode||"2d","undefined"!=typeof wx&&wx.canIUse&&wx.canIUse("canvas")?("string"==typeof t&&(t=wx.createSelectorQuery().select("#"+t)),r.isWXMiniApp=!0,r.container=t):("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),t.getContext||"undefined"==typeof document?r.container=t.parentElement:(r.container=t,i=document.createElement("canvas"),t.appendChild(i),i.width=t.offsetWidth||t.clientWidth,i.height=t.offsetHeight||t.clientHeight,t=i)),r.canvas=t,r.context=t.getContext(r.mode),r.textureCanvas=e.textureCanvas||null,"webgl"===r.mode&&(r.context.enable(r.context.BLEND),r.context.blendFunc(r.context.SRC_ALPHA,r.context.ONE_MINUS_SRC_ALPHA),a.jmUtils.bindEvent(t,"webglcontextlost",function(t){console.log("canvas webglcontextlost",t),r.emit("webglcontextlost",t)}),a.jmUtils.bindEvent(t,"webglcontextrestored",function(t){console.log("canvas webglcontextrestored",t),r.emit("webglcontextrestored",t)})),r.__init(n),r}return t=s,n=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return p(s,e)}}],(e=[{key:"__init",value:function(t){this.shapes=Object.assign({path:f.jmPath},this.option.shapes),this.on("beginDraw",function(){this.context.translate&&this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate&&this.context.translate(-.5,-.5)});var e="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;this.isWXMiniApp&&(e=wx.getWindowInfo().pixelRatio||1),this.devicePixelRatio=e,this.dprScaleSize=1<this.devicePixelRatio?this.devicePixelRatio:2,0<this.option.width&&(this.width=this.option.width),0<this.option.height&&(this.height=this.option.height),this.resize(),this.eventHandler=new l.jmEvents(this,this.canvas.canvas||this.canvas),this.option.autoRefresh&&this.autoRefresh(),t&&t(this)}},{key:"resize",value:function(t,e){this.canvas&&(this.__normalSize=this.__normalSize||{width:0,height:0},t=t||this.__normalSize.width||this.width,e=e||this.__normalSize.height||this.height,t&&(this.__normalSize.width=t),e&&(this.__normalSize.height=e),this.css("width",t+"px"),this.css("height",e+"px"),"2d"===this.mode?(this.canvas.height=e*this.dprScaleSize,this.canvas.width=t*this.dprScaleSize,1!==this.dprScaleSize&&this.context.scale&&this.context.scale(this.dprScaleSize,this.dprScaleSize)):(this.canvas.width=t,this.canvas.height=e),this.context.viewport&&this.context.viewport(0,0,t,e),this.needUpdate=!0)}},{key:"width",get:function(){return this.__normalSize&&this.__normalSize.width?this.__normalSize.width:this.canvas?this.canvas.width:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(t),t}},{key:"height",get:function(){return this.__normalSize&&this.__normalSize.height?this.__normalSize.height:this.canvas?this.canvas.height:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(0,t),t}},{key:"getPosition",value:function(){var t=this.isWXMiniApp?{left:0,top:0}:a.jmUtils.getElementPosition(this.canvas.canvas||this.canvas);return t.width=this.width,t.height=this.height,t.right=t.left+t.width,t.bottom=t.top+t.height,t}},{key:"registerShape",value:function(t,e){this.shapes[t]=e}},{key:"createShape",value:function(t,e){if(t="string"==typeof t?this.shapes[t]:t)return(e=e||{}).graph=this,new t(e)}},{key:"createShadow",value:function(t,e,n,r){return new u.jmShadow(t,e,n,r)}},{key:"createLinearGradient",value:function(t,e,n,r){return new c.jmGradient({type:"linear",x1:t,y1:e,x2:n,y2:r,stops:4<arguments.length&&void 0!==arguments[4]?arguments[4]:[]})}},{key:"createRadialGradient",value:function(t,e,n,r,i,o){return new c.jmGradient({type:"radial",x1:t,y1:e,r1:n,x2:r,y2:i,r2:o,stops:6<arguments.length&&void 0!==arguments[6]?arguments[6]:[]})}},{key:"refresh",value:function(){this.redraw()}},{key:"redraw",value:function(t,e){this.clear(t||this.width,e||this.height),this.paint()}},{key:"clear",value:function(t,e){t&&e||(t=this.width,e=this.height),this.context.clearRect?(this.style&&this.style.fill&&(this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}],this.style.close=!0),this.context.clearRect(0,0,t,e)):"webgl"===this.mode&&this.context.clear&&(e=this.style&&this.style.fill?this.utils.hexToRGBA(this.style.fill):{r:0,g:0,b:0,a:0},this.context.clearColor(e.r,e.g,e.b,e.a),this.context.clear(this.context.COLOR_BUFFER_BIT))}},{key:"css",value:function(t,e){if(this.canvas&&this.canvas.style)return void 0!==e&&(this.canvas.style[t]=e),this.canvas.style[t]}},{key:"createPath",value:function(t,e){return this.createShape("path",y({points:t,style:e},2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))}},{key:"createLine",value:function(t,e,n){return this.createShape("line",{start:t,end:e,style:n})}},{key:"zoomOut",value:function(){this.scale(.9,.9)}},{key:"zoomIn",value:function(){this.scale(1.1,1.1)}},{key:"zoomActual",value:function(){this.scaleSize?this.scale(1/this.scaleSize.x,1/this.scaleSize.y):this.scale(1,1)}},{key:"scale",value:function(t,e){this.normalSize||(this.normalSize={width:this.canvas.width,height:this.canvas.height}),this.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:1,y:1},this.canvas.style&&(this.canvas.style.transform="scale(".concat(this.scaleSize.x,", ").concat(this.scaleSize.y,")"))}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(n){if(!this.___isAutoRefreshing){var r=this;this.___isAutoRefreshing=!0;var i=Date.now();return r.__requestAnimationFrameFunHandler&&this.cancelAnimationFrame(r.__requestAnimationFrameFunHandler),r.__requestAnimationFrameFunHandler=this.requestAnimationFrame(function t(){var e;r.destroyed?r.___isAutoRefreshing=!1:(r.needUpdate&&r.redraw(),e=Date.now()-i,r.emit("update",e),r.__requestAnimationFrameFunHandler&&r.cancelAnimationFrame(r.__requestAnimationFrameFunHandler),r.__requestAnimationFrameFunHandler=r.requestAnimationFrame(t),n&&n())}),this}}},{key:"destroy",value:function(){this.eventHandler.destroy(),this.destroyed=!0}}])&&d(t.prototype,e),n&&d(t,n),s}();n.jmGraph=n.default=t},{"./jmControl.js":2,"./jmEvents.js":3,"./jmGradient.js":4,"./jmList.js":6,"./jmPath.js":8,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],6:[function(t,e,n){"use strict";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)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function l(t){var n="function"==typeof Map?new Map:void 0;return function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return r(t,arguments,p(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),f(e,t)}(t)}function r(t,e,n){return(r=h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&f(r,n.prototype),r}).apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmList=n.default=void 0;var i=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(a,l(Array));var n,r,t,e,i,s=(n=a,r=h(),function(){var t,e=p(n);return c(this,r?(t=p(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var e=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(r&&r.length&&Array.isArray(r[0])){for(var o=0;o<r[0].length;o++)e.push(r[0][o]);t=s.call.apply(s,[this].concat(e))}else t=s.call(this);return t.option={},t.type="jmList",c(t)}return t=a,(e=[{key:"add",value:function(t){if(t&&Array.isArray(t)){for(var e=0;e<t.length;e++)this.includes(t[e])||this.push(t[e]);return t}return"object"==o(t)&&this.includes(t)||this.push(t),t}},{key:"remove",value:function(t){for(var e=this.length-1;0<=e;e--)this[e]==t&&this.removeAt(e)}},{key:"removeAt",value:function(t){var e;this.length>t&&(e=this[t],this.splice(t,1),this.option.removeHandler&&this.option.removeHandler.call(this,e,t))}},{key:"contain",value:function(t){return this.includes(t)}},{key:"get",value:function(t){return"function"==typeof t?this.find(t):this[t]}},{key:"each",value:function(t,e){if(t&&"function"==typeof t)if(e){for(var n=this.length-1;0<=n;n--)if(!1===t.call(this,n,this[n]))break}else for(var r=this.length,i=0;i<r;i++)if(!1===t.call(this,i,this[i]))break}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,n=this.length,r=0;r<n;r++)t(this[r])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&u(t.prototype,e),i&&u(t,i),a}();n.jmList=n.default=i},{}],7:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmObject=n.default=void 0;var i=t("./jmList.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=0,t=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t&&"jmGraph"==t.type&&(this.graph=t),this.id=++s}var t,n,r;return t=e,(n=[{key:"is",value:function(t){return"string"==typeof t?this.type==t:this instanceof t}},{key:"animate",value:function(){if(this.is("jmGraph")){if(1<arguments.length){this.animateHandles||(this.animateHandles=new i.jmList);var t=[];if(2<arguments.length)for(var e=2;e<arguments.length;e++)t.push(e<0||arguments.length<=e?void 0:arguments[e]);this.animateHandles.add({millisec:(arguments.length<=1?void 0:arguments[1])||20,handle:arguments.length<=0?void 0:arguments[0],params:t})}var o;this.animateHandles&&0<this.animateHandles.count()&&((o=this).dispatcher=setTimeout(function(n){n=n||o;var t,r=[],i=Date.now();for(t in n.animateHandles.each(function(t,e){try{e&&e.handle&&(!e.times||i-e.times>=e.millisec)&&(!1===e.handle.apply(n,e.params)&&r.push(e),e.times=i)}catch(t){e&&r.push(e)}}),r)n.animateHandles.remove(r[t]);n.animate()},10,this))}else{var n=this.graph;n&&n.animate.apply(n,arguments)}}}])&&o(t.prototype,n),r&&o(t,r),e}();n.jmObject=n.default=t},{"./jmList.js":6}],8:[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(n,"__esModule",{value:!0}),n.jmPath=n.default=void 0;var o=t("./jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmControl);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).points=t&&t.points?t.points:[],e}return t=i,(e=[{key:"points",get:function(){return this.property("points")},set:function(t){return this.needUpdate=!0,this.property("points",t)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPath=n.default=t},{"./jmControl.js":2}],9:[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(n,"__esModule",{value:!0}),n.jmProperty=n.default=void 0;var o=t("./jmUtils.js"),s=t("./jmObject.js");function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=l(n);return t=r?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=Symbol("properties"),t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,s.jmObject);var t,e,n,r=c(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this))[h]={},t&&t.mode&&(e.mode=t.mode),e}return t=i,(e=[{key:"property",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e){var r=this[h],i=e[0];if(1<e.length){var o=e[1],o={oldValue:r[i],newValue:o};return r[i]=e[1],this.emit&&this.emit("propertyChange",i,o),e[1]}if(i)return r[i]}}},{key:"needUpdate",get:function(){return this.property("needUpdate")},set:function(t){this.property("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){return this.property("graph")||this.property("graph",this.findParent("jmGraph"))},set:function(t){return this.property("graph",t)}},{key:"mode",get:function(){var t=this.property("mode");return t||(this.is("jmGraph")?this.property("mode"):this.graph.mode)},set:function(t){return this.property("mode",t)}},{key:"requestAnimationFrame",value:function(t){return o.jmUtils.requestAnimationFrame(t,this.graph?this.graph.canvas:null)}},{key:"cancelAnimationFrame",value:function(t){return o.jmUtils.cancelAnimationFrame(t,this.graph?this.graph.canvas:null)}}])&&a(t.prototype,e),n&&a(t,n),i}();n.jmProperty=n.default=t},{"./jmObject.js":7,"./jmUtils.js":11}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmShadow=n.default=void 0;var r=t("./jmUtils.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.jmShadow=n.default=function(){function i(t,e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),"string"!=typeof t||e||n||r?(this.x=t,this.y=e,this.blur=n,this.color=r):this.fromString(t)}var t,e,n;return t=i,(e=[{key:"fromString",value:function(t){if(t){t=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i);return t&&(this.x=t[1]||0,this.y=t[2]||0,t[3]&&(t[3]=r.jmUtils.trim(t[3],", "),0===t[3].indexOf("#")||/^rgb/i.test(t[3])?this.color=t[3]:this.blur=r.jmUtils.trim(t[3],", ")),t[4]&&(this.color=r.jmUtils.trim(t[4],", "))),this}}},{key:"toString",value:function(){var t=this.x+","+this.y;return this.blur&&(t+=","+this.blur),this.color&&(t+=","+this.color),t}}])&&o(t.prototype,e),n&&o(t,n),i}()},{"./jmUtils.js":11}],11:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmUtils=n.default=void 0;var l=t("./jmList.js");function h(t){return(h="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 i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"rgba(0,0,0,0)"},t=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"clone",value:function(t,e){var n,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;if("function"==typeof i){var s=i(t,r,o);if(s)return s}if("boolean"==typeof e&&(r=e,e=void 0),100<++o)return e;if(t&&"object"===h(t)){if(e=e||{},this.isType(t,l.jmList))return new l.jmList(t);if(Array.isArray(t)){if(r){for(var a=[],u=0;u<t.length;u++)a.push(this.clone(t[u],e[u],r,i,o));return a}return t.slice(0)}for(var c in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==c&&((n=t[c])&&(n.tagName||n.getContext)?e[c]=n:"object"!==h(e[c])&&void 0!==e[c]||(e[c]=this.clone(n,e[c],r,i,o)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,n,r){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var i=e.split(" "),o=0;o<i.length;o++)this.bindEvent(t,i[o],n,r);return t.attachEvent?t.attachEvent("on"+e,n,r):t.addEventListener&&t.addEventListener(e,n,r),{name:e,target:t,fun:n}}},{key:"removeEvent",value:function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?(t.detachEvent("on"+e,n),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(!t)return e;if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x?e.left+=t.x:t.x&&(e.top+=t.y);return e}},{key:"getEventPosition",value:function(t,e){var n=(t=t||event).isWXMiniApp,r=!1,i=t.changedTouches||t.targetTouches||t.touches,o=t.target||t.srcElement;i&&i.length&&((t=i[0]).target||(t.target=o),r=!0);var s=t.pageX||t.x;void 0===s&&(s=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var a=t.pageY||t.y;void 0===a&&(a=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var u=t.offsetX,c=t.offsetY;return void 0===u&&void 0===c&&(c=n?(u=t.x,t.y):(u=s-(o=this.getElementPosition(o)).left,a-o.top)),e&&(e.x&&(u/=e.x),e.y&&(c/=e.y)),{pageX:s,pageY:a,clientX:t.clientX,clientY:t.clientY,offsetX:u,offsetY:c,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:u,y:c,isTouch:r,touches:i,isWXMiniApp:n}}},{key:"isType",value:function(t,e){return!(!t||"object"!==h(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,n){n=n||1,n/=2;var r=e.length;if(!e||0==r)return 0;if(1==r)return Math.abs(e[0].x-t.x)<=n&&Math.abs(e[0].y-t.y)<=n?1:0;if(2==r)return this.pointOnLine(t,e[0],e[1],n);for(var i=0;i<r;i++)if(Math.abs(e[i].x-t.x)<=n&&Math.abs(e[i].y-t.y)<=n)return 1;return this.rayCasting(t,e,n)}},{key:"pointOnLine",value:function(t,e,n,r){var i=Math.min(e.x,n.x),o=Math.max(e.x,n.x),s=Math.min(e.y,n.y),a=Math.max(e.y,n.y);if(i-t.x>r||t.x-o>r)return 0;if(s-t.y>r||t.y-a>r)return 0;if(e.x==n.x)return Math.abs(e.x-t.x)<=r&&(t.y-e.y)*(t.y-n.y)<=0?1:0;if(e.y==n.y)return Math.abs(e.y-t.y)<=r&&(t.x-e.x)*(t.x-n.x)<=0?1:0;if(Math.abs(e.x-t.x)<r&&Math.abs(e.y-t.y)<r)return 1;if(Math.abs(n.x-t.x)<r&&Math.abs(n.y-t.y)<r)return 1;if(t.y==e.y||t.y==n.y)return 0;n=(n.x-e.x)/(n.y-e.y)*(t.y-e.y),n=(t.y-e.y)/Math.sqrt(n*n+(t.y-e.y)*(t.y-e.y))*(t.x-e.x-n);return Math.abs(n)<=r?1:0}},{key:"rayCasting",value:function(t,e,n){for(var r=e.length,i=!1,o=t.y,s=t.x,a=0,u=r-1;a<r;u=a++){var c=e[a].y,l=e[u].y,h=e[a].x,f=e[u].x;o<c!=o<l&&s<(f-h)*(o-c)/(l-c)+h&&(i=!i)}return i?2:0}},{key:"checkOutSide",value:function(t,e,n){var r={left:0,right:0,top:0,bottom:0};return n.x<0?r.left=e.left+n.x-t.left:0<n.x&&(r.right=e.right+n.x-t.right),n.y<0?r.top=e.top+n.y-t.top:0<n.y&&(r.bottom=e.bottom+n.y-t.bottom),r}},{key:"rotatePoints",value:function(t,e,n){if(!n||!t)return t;var r=Math.cos(n),i=Math.sin(n);if(Array.isArray(t))for(var o,s,a=0;a<t.length;a++)t[a]&&(o=t[a].x-e.x,s=t[a].y-e.y,t[a].x=o*r-s*i+e.x,t[a].y=o*i+s*r+e.y);else{var u=t.x-e.x,n=t.y-e.y;t.x=u*r-n*i+e.x,t.y=u*i+n*r+e.y}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[0];if(n===e||0<=e.indexOf(n))return t=t.substring(1),this.trimStart(t,e)}return t}},{key:"trimEnd",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[t.length-1];if(n===e||0<=e.indexOf(n))return t=t.substring(0,t.length-1),this.trimStart(t,e)}return t}},{key:"trim",value:function(t,e){return this.trimEnd(this.trimStart(t,e),e)}},{key:"checkPercent",value:function(t){if("string"==typeof t&&"%"==(t=this.trim(t))[t.length-1])return t}},{key:"percentToNumber",value:function(t){var e;return"string"!=typeof t||(e=this.checkPercent(t))&&(t=this.trim(e,"% "),t/=100),t}},{key:"hexToNumber",value:function(t){if("string"!=typeof t)return t;for(var e=0,n=(t=t.toLowerCase()).length,r=0;r<n;r++){var i="0123456789abcdef".indexOf(t[r]);if(0!=i){for(var o=1;o<n-r;o++)i*=16;e+=i}}return e}},{key:"numberToHex",value:function(t){for(var e="";0<t;){e="0123456789abcdef"[t%16]+e;t=Math.floor(t/16)}return e}},{key:"hexToRGBA",value:function(t){if("string"!=typeof t)return t;if(t=this.trim(t),this.__hexToRGBA_Cache=this.__hexToRGBA_Cache||{},this.__hexToRGBA_Cache[t])return this.__hexToRGBA_Cache[t];var e,n=t;return"#"==(n=o[n]?o[n]:n)[0]&&(e={a:1},8<=n.length?(e.a=n.substr(1,2),e.g=n.substr(5,2),e.b=n.substr(7,2),e.r=n.substr(3,2),e.a=Number((this.hexToNumber(e.a)/255).toFixed(4)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),n=e):7===n.length||4===n.length?(4===n.length?(e.g=n.substr(2,1),e.g=e.g+e.g,e.b=n.substr(3,1),e.b=e.b+e.b,e.r=n.substr(1,1),e.r=e.r+e.r):(e.g=n.substr(3,2),e.b=n.substr(5,2),e.r=n.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),n=e):5===n.length&&(e.a=n.substr(1,1),e.g=n.substr(3,1),e.b=n.substr(4,1),e.r=n.substr(2,1),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e.a=Number((this.hexToNumber(e.a)/255).toFixed(4)),n=e)),"string"!=typeof n||(e=n.match(/rgb(a)?\s*\(\s*([\d\.]+)\s*,\s*([\d\.]+)\s*,\s*([\d\.]+)\s*(,\s*[\d\.]+)?\s*\)/i))&&6===e.length&&(n={r:Number(e[2]),g:Number(e[3]),b:Number(e[4]),a:Number(this.trimStart(e[5]||"1",","))}),this.__hexToRGBA_Cache[t]=n}},{key:"rgbToDecimal",value:function(t){return(t=this.clone(t)).r=this.byteToDecimal(t.r),t.g=this.byteToDecimal(t.g),t.b=this.byteToDecimal(t.b),t}},{key:"byteToDecimal",value:function(t){return t/255}},{key:"toColor",value:function(t,e,n,r){if("string"==typeof t&&t){if("#"===(t=this.trim(t))[0]&&(4===t.length||7===t.length))return t;var i=this.hexToRGBA(t);if("string"==typeof i)return i;t=void 0!==i.r?i.r:t,e=void 0!==i.g?i.g:e,n=void 0!==i.b?i.b:n,r=void 0!==i.a?i.a:r}return t&&"object"===h(t)&&(e=t.g,n=t.b,r=t.a||1,t=t.r),void 0!==t&&void 0!==e&&void 0!==n?void 0!==r?"rgba("+t+","+e+","+n+","+r+")":"rgb("+t+","+e+","+n+")":t}},{key:"requestAnimationFrame",value:function(t,e){return(e&&e.requestAnimationFrame?e.requestAnimationFrame:"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:setTimeout)(t,20)}},{key:"cancelAnimationFrame",value:function(t,e){return(e&&e.cancelAnimationFrame?e.cancelAnimationFrame:"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame:clearTimeout)(t)}}],(n=null)&&i(e.prototype,n),r&&i(e,r),t}();n.jmUtils=n.default=t},{"./jmList.js":6}],12:[function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,i,o,s,a,u=e&&e.length,c=u?e[0]*n:t.length,l=d(t,0,c,n,!0),h=[];if(!l||l.next===l.prev)return h;if(u&&(l=function(t,e,n,r){var i,o,s,a,u=[];for(i=0,o=e.length;i<o;i++)s=e[i]*r,a=i<o-1?e[i+1]*r:t.length,(a=d(t,s,a,r,!1))===a.next&&(a.steiner=!0),u.push(function(t){var e=t,n=t;for(;(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next,e!==t;);return n}(a));for(u.sort(g),i=0;i<u.length;i++)n=function(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&s<a&&(s=a,n=r.x<r.next.x?r:r.next,a===i))return n}}while(r=r.next,r!==e);if(!n)return null;var u,c=n,l=n.x,h=n.y,f=1/0;r=n;for(;i>=r.x&&r.x>=l&&i!==r.x&&w(o<h?i:s,o,l,h,o<h?s:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),b(r,t)&&(u<f||u===f&&(r.x>n.x||r.x===n.x&&function(t,e){return _(t.prev,t,e.prev)<0&&_(e.next,t,t.next)<0}(n,r)))&&(n=r,f=u)),r=r.next,r!==c;);return n}(t,e);if(!n)return e;t=x(n,t);return v(t,t.next),v(n,n.next)}(u[i],n);return n}(t,e,l,n)),t.length>80*n){for(var f=r=t[0],p=i=t[1],y=n;y<c;y+=n)(o=t[y])<f&&(f=o),(s=t[y+1])<p&&(p=s),r<o&&(r=o),i<s&&(i=s);a=0!==(a=Math.max(r-f,i-p))?32767/a:0}return m(l,h,n,f,p,a,0),h}function d(t,e,n,r,i){var o,s;if(i===0<P(t,e,n,r))for(o=e;o<n;o+=r)s=a(o,t[o],t[o+1],s);else for(o=n-r;e<=o;o-=r)s=a(o,t[o],t[o+1],s);return s&&l(s,s.next)&&(f(s),s=s.next),s}function v(t,e){if(!t)return t;e=e||t;var n,r=t;do{if(n=!1,r.steiner||!l(r,r.next)&&0!==_(r.prev,r,r.next))r=r.next;else{if(f(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function m(t,e,n,r,i,o,s){if(t){!s&&o&&function(t,e,n,r){var i=t;for(;0===i.z&&(i.z=j(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==t;);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,s,a,u,c=1;do{for(n=t,o=t=null,s=0;n;){for(s++,r=n,e=a=0;e<c&&(a++,r=r.nextZ);e++);for(u=c;0<a||0<u&&r;)0!==a&&(0===u||!r||n.z<=r.z)?(n=(i=n).nextZ,a--):(r=(i=r).nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}}while(o.nextZ=null,c*=2,1<s)}(i)}(t,r,i,o);for(var a,u,c=t;t.prev!==t.next;)if(a=t.prev,u=t.next,o?function(t,e,n,r){var i=t.prev,o=t,s=t.next;if(0<=_(i,o,s))return!1;var a=i.x,u=o.x,c=s.x,l=i.y,h=o.y,f=s.y,p=a<u?a<c?a:c:u<c?u:c,y=l<h?l<f?l:f:h<f?h:f,d=u<a?c<a?a:c:c<u?u:c,v=h<l?f<l?l:f:f<h?h:f,m=j(p,y,e,n,r),g=j(d,v,e,n,r),b=t.prevZ,x=t.nextZ;for(;b&&b.z>=m&&x&&x.z<=g;){if(b.x>=p&&b.x<=d&&b.y>=y&&b.y<=v&&b!==i&&b!==s&&w(a,l,u,h,c,f,b.x,b.y)&&0<=_(b.prev,b,b.next))return!1;if(b=b.prevZ,x.x>=p&&x.x<=d&&x.y>=y&&x.y<=v&&x!==i&&x!==s&&w(a,l,u,h,c,f,x.x,x.y)&&0<=_(x.prev,x,x.next))return!1;x=x.nextZ}for(;b&&b.z>=m;){if(b.x>=p&&b.x<=d&&b.y>=y&&b.y<=v&&b!==i&&b!==s&&w(a,l,u,h,c,f,b.x,b.y)&&0<=_(b.prev,b,b.next))return!1;b=b.prevZ}for(;x&&x.z<=g;){if(x.x>=p&&x.x<=d&&x.y>=y&&x.y<=v&&x!==i&&x!==s&&w(a,l,u,h,c,f,x.x,x.y)&&0<=_(x.prev,x,x.next))return!1;x=x.nextZ}return!0}(t,r,i,o):function(t){var e=t.prev,n=t,t=t.next;if(0<=_(e,n,t))return!1;var r=e.x,i=n.x,o=t.x,s=e.y,a=n.y,u=t.y,c=r<i?r<o?r:o:i<o?i:o,l=s<a?s<u?s:u:a<u?a:u,h=i<r?o<r?r:o:o<i?i:o,f=a<s?u<s?s:u:u<a?a:u,p=t.next;for(;p!==e;){if(p.x>=c&&p.x<=h&&p.y>=l&&p.y<=f&&w(r,s,i,a,o,u,p.x,p.y)&&0<=_(p.prev,p,p.next))return!1;p=p.next}return!0}(t))e.push(a.i/n|0),e.push(t.i/n|0),e.push(u.i/n|0),f(t),t=u.next,c=u.next;else if((t=u)===c){s?1===s?m(t=function(t,e,n){var r=t;do{var i=r.prev,o=r.next.next}while(!l(i,o)&&h(i,r,r.next,o)&&b(i,o)&&b(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),f(r),f(r.next),r=t=o),r=r.next,r!==t);return v(r)}(v(t),e,n),e,n,r,i,o,2):2===s&&function(t,e,n,r,i,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&h(n,n.next,t,e))return!0}while(n=n.next,n!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;for(;n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==t;);return r}(t,e)&&(_(t.prev,t,e.prev)||_(t,e.prev,e))||l(t,e)&&0<_(t.prev,t,t.next)&&0<_(e.prev,e,e.next))}(s,a)){var u=x(s,a);return s=v(s,s.next),u=v(u,u.next),m(s,e,n,r,i,o,0),m(u,e,n,r,i,o,0)}a=a.next}}while(s=s.next,s!==t)}(t,e,n,r,i,o):m(v(t),e,n,r,i,o,1);break}}}function g(t,e){return t.x-e.x}function j(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function w(t,e,n,r,i,o,s,a){return(t-s)*(o-a)<=(i-s)*(e-a)&&(n-s)*(e-a)<=(t-s)*(r-a)&&(i-s)*(r-a)<=(n-s)*(o-a)}function _(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function l(t,e){return t.x===e.x&&t.y===e.y}function h(t,e,n,r){var i=c(_(t,e,n)),o=c(_(t,e,r)),s=c(_(n,r,t)),a=c(_(n,r,e));return i!==o&&s!==a||(0===i&&u(t,n,e)||(0===o&&u(t,r,e)||(0===s&&u(n,t,r)||!(0!==a||!u(n,e,r)))))}function u(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function c(t){return 0<t?1:t<0?-1:0}function b(t,e){return _(t.prev,t,t.next)<0?0<=_(t,e,t.next)&&0<=_(t,t.prev,e):_(t,e,t.prev)<0||_(t,t.next,e)<0}function x(t,e){var n=new s(t.i,t.x,t.y),r=new s(e.i,e.x,e.y),i=t.next,o=e.prev;return(t.next=e).prev=t,(n.next=i).prev=n,(r.next=n).prev=r,(o.next=r).prev=o,r}function a(t,e,n,r){n=new s(t,e,n);return r?(n.next=r.next,(n.prev=r).next.prev=n,r.next=n):(n.prev=n).next=n,n}function f(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function s(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,r){for(var i=0,o=e,s=n-r;o<n;o+=r)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,(n.default=r).deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(P(t,0,o,n));if(i)for(var a=0,u=e.length;a<u;a++){var c=e[a]*n,l=a<u-1?e[a+1]*n:t.length;s-=Math.abs(P(t,c,l,n))}for(var h=0,a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,y=r[a+2]*n;h+=Math.abs((t[f]-t[y])*(t[1+p]-t[1+f])-(t[f]-t[p])*(t[1+y]-t[1+f]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[i][o][s]);0<i&&(r+=t[i-1].length,n.holes.push(r))}return n}},{}],13:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(t("../earcut.js")),a=r(t("./gradient.js")),s=t("./core/program.js"),o=t("./core/buffer.js"),u=t("./core/texture.js");function r(t){return t&&t.__esModule?t:{default:t}}function c(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function p(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var d="\n attribute vec4 a_position;\n attribute vec4 a_color;\n attribute vec2 a_text_coord;\n uniform vec2 a_center_point; // 当前canvas的中心位置\n uniform float a_point_size; // 点的大小\n uniform int a_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n varying float v_type;\n\n ".concat("\n vec4 translatePosition(vec4 point, float x, float y) {\n point.x = (point.x-x)/x;\n point.y = (y-point.y)/y;\n return point;\n }","\n\n void main() {\n gl_PointSize = a_point_size == 0.0? 1.0 : a_point_size;\n v_type = float(a_type);\n vec4 pos = translatePosition(a_position, a_center_point.x, a_center_point.y);\n gl_Position = pos;\n v_color = a_color;\n if(a_type == 2) {\n v_text_coord = a_text_coord;\n }\n }\n"),v="\n precision mediump float;\n uniform sampler2D u_sample;\n uniform vec4 v_texture_bounds; // 纹理的左上坐标和大小 x,y,z,w\n uniform vec4 v_single_color;\n varying float v_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n\n ".concat("\n vec2 translateTexturePosition(in vec2 point, vec4 bounds) {\n point.x = (point.x-bounds.x)/bounds.z; // 离左上角位置的X长比上纹理宽 0-1\n point.y = 1.0-(point.y-bounds.y)/bounds.w; // 离左上角位置的Y长比上高,因为纹理坐标是左下角起,所以要用1-\n return point;\n }","\n\n void main() {\n // 如果是fill,则直接填充颜色\n if(v_type == 1.0) {\n gl_FragColor = v_single_color;\n }\n // 渐变色\n else if(v_type == 3.0) {\n gl_FragColor = v_color;\n }\n else if(v_type == 2.0) {\n vec2 pos = translateTexturePosition(v_text_coord, v_texture_bounds);\n gl_FragColor = texture2D(u_sample, pos);\n }\n else {\n float r = distance(gl_PointCoord, vec2(0.5, 0.5));\n //根据距离设置片元\n if(r <= 0.5){\n // 方形区域片元距离几何中心半径小于0.5,像素颜色设置红色\n gl_FragColor = v_single_color;\n }else {\n // 方形区域距离几何中心半径不小于0.5的片元剪裁舍弃掉:\n discard;\n }\n }\n }\n"),t=function(){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.graph=t,this.option=e||{},this.style={globalAlpha:1}}var t,e,r;return t=n,(e=[{key:"context",get:function(){if(this.graph)return this.graph.context}},{key:"textureCanvas",get:function(){var t=this.graph.textureCanvas;if(!t){if("undefined"==typeof document)return null;t=this.graph.textureCanvas=document.createElement("canvas")}return t}},{key:"textureContext",get:function(){return this.textureCanvas.ctx||(this.textureCanvas.ctx=this.textureCanvas.getContext("2d",{willReadFrequently:!0}))}},{key:"program",get:function(){return this.graph.context.pathProgram||(this.graph.context.pathProgram=this.createProgram(d,v))}},{key:"setStyle",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.style;"string"==typeof e&&((t={})[e]=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",e=t),this.style=p(p({},this.style),e)}},{key:"convertColor",value:function(t){return this.isGradient(t)?t:("string"==typeof t&&(t=this.graph.utils.hexToRGBA(t)),this.graph.utils.rgbToDecimal(t))}},{key:"setTextureStyle",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof t)-1<["fillStyle","strokeStyle","shadowColor"].indexOf(t)&&(e=this.graph.utils.toColor(e)),this.textureContext[t]=e;else for(var n in t)"constructor"!==n&&this.setTextureStyle(n,t[n])}},{key:"createProgram",value:function(t,e){return this.context.lineWidth(1),(0,s.createProgram)(this.context,t,e)}},{key:"useProgram",value:function(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.program).program||t;return this.context.__curent_program===t?t:((0,s.useProgram)(this.context,t.program||t),this.context.__curent_program=t)}},{key:"getAttribLocation",value:function(t){return this.context.getAttribLocation(this.program.program,t)}},{key:"getUniformLocation",value:function(t){return this.context.getUniformLocation(this.program.program,t)}},{key:"writeVertexAttrib",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:2,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:this.context.FLOAT;return t.attr=e,(0,s.writeVertexAttrib)(this.context,t,e,n,r,i,o)}},{key:"disableVertexAttribArray",value:function(t){try{return t?(0,s.disableVertexAttribArray)(this.context,t):t}catch(t){console.error(t)}return t}},{key:"createFloat32Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return p({data:t},(0,o.createFloat32Buffer)(this.context,t,e,n))}},{key:"createUint16Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return p({data:t},(0,o.createUint16Buffer)(this.context,t,e,n))}},{key:"deleteBuffer",value:function(e){try{if(!e)return;var t=e.buffer||e;if(t)return(0,o.deleteBuffer)(this.context,t)}catch(t){console.log(e),console.error(t)}return e}},{key:"create2DTexture",value:function(){return(0,u.create2DTexture)(this.context)}},{key:"createImgTexture",value:function(t){return(0,u.createImgTexture)(this.context,t)}},{key:"createDataTexture",value:function(t){return(0,u.createDataTexture)(this.context,t)}},{key:"deleteTexture",value:function(t){try{return(0,u.deleteTexture)(this.context,t.texture||t)}catch(t){console.error(t)}return t}},{key:"earCutPoints",value:function(t){t=this.pointsToArray(t);return(0,i.default)(t)}},{key:"earCutPointsToTriangles",value:function(t){for(var e=this.earCutPoints(t),n=[],r=0;r<e.length;r+=3){var i=t[e[r]],o=t[e[r+1]],s=t[e[r+2]];n.push([i,o,s])}return n}},{key:"pointsToArray",value:function(t){var e;return(e=[]).concat.apply(e,c(t.map(function(t){return[t.x,t.y]})))}},{key:"arrayToPoints",value:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push({x:t[n],y:t[n+1]});return e}},{key:"createLinearGradient",value:function(t,e,n,r,i){return new a.default("linear",{x1:t,y1:e,x2:n,y2:r,bounds:i,control:this})}},{key:"createRadialGradient",value:function(t,e,n,r,i,o,s){return new a.default("radial",{x1:t,y1:e,r1:n,x2:r,y2:i,r2:o,bounds:s,control:this})}},{key:"isGradient",value:function(t){return t&&t instanceof a.default}},{key:"testSize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style;this.textureContext.save&&this.textureContext.save(),(e.font||e.fontSize)&&(this.textureContext.font=e.font||e.fontSize+"px "+e.fontFamily);t=this.textureContext.measureText?this.textureContext.measureText(t):{width:15};return this.textureContext.restore&&this.textureContext.restore(),t.height=this.style.fontSize||15,t}},{key:"toFillTexture",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=this.textureCanvas;if(!r)return t;if(r.width=e.width,r.height=e.height,!r.width||!r.height)return t;if(this.textureContext.clearRect(0,0,r.width,r.height),this.textureContext.fillStyle=t,this.textureContext.beginPath(),n&&n.length||((n=[]).push({x:e.left,y:e.top}),n.push({x:e.left+e.width,y:e.top}),n.push({x:e.left+e.width,y:e.top+e.height}),n.push({x:e.left,y:e.top+e.height}),n.push({x:e.left,y:e.top})),n&&n.length){var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=l(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(n);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.m?this.textureContext.moveTo(s.x-e.left,s.y-e.top):this.textureContext.lineTo(s.x-e.left,s.y-e.top)}}catch(t){o.e(t)}finally{o.f()}}else this.textureContext.moveTo(0,0),this.textureContext.lineTo(e.width,0),this.textureContext.lineTo(e.width,e.height),this.textureContext.lineTo(0,e.height),this.textureContext.lineTo(0,0);return this.textureContext.closePath(),this.textureContext.fill(),{data:this.textureContext.getImageData(0,0,r.width,r.height),points:n}}}])&&y(t.prototype,e),r&&y(t,r),n}();n.default=t},{"../earcut.js":12,"./core/buffer.js":14,"./core/program.js":17,"./core/texture.js":19,"./gradient.js":20}],14:[function(t,e,n){"use strict";function i(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,i=t.createBuffer();if(!i)throw Error("创建缓冲区对象失败");return t.bindBuffer(n,i),t.bufferData(n,e.buffer||e,r),{type:n,drawType:r,buffer:i,unitSize:e.BYTES_PER_ELEMENT}}Object.defineProperty(n,"__esModule",{value:!0}),n.createBuffer=i,n.createUint16Buffer=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Uint16Array(e);return i(t,e,n,r)},n.createFloat32Buffer=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Float32Array(e);return i(t,e,n,r)},n.deleteBuffer=function(t,e){t.deleteBuffer(e.buffer||e)}},{}],15:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mapSize=void 0;var r={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};n.mapSize=function(t){return r[t]}},{}],16:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mapType=void 0;var o=null,s={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};n.mapType=function(t,e){if(!o){var n=Object.keys(s);o={};for(var r=0;r<n.length;++r){var i=n[r];o[t[i]]=s[i]}}return o[e]}},{}],17:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createProgram=function(t,e,n){var r=(0,i.createShader)(t,t.VERTEX_SHADER,e),e=(0,i.createShader)(t,t.FRAGMENT_SHADER,n),n=t.createProgram();t.attachShader(n,r),t.attachShader(n,e),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||(console.error("PError: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(n,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(n)&&console.warn("Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(n)),t.deleteProgram(n));o(t,n),t.deleteShader(r),t.deleteShader(e);e=s(t,n),t=c(t,n);return{program:n,attrs:e,uniforms:t}},n.useProgram=o,n.getAttribLocation=function(t,e,n){return t.getAttribLocation(e,n)},n.getUniformLocation=function(t,e,n){return t.getUniformLocation(e,n)},n.extractAttributes=s,n.extractUniforms=c,n.writeVertexAttrib=function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:2,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,s=6<arguments.length&&void 0!==arguments[6]?arguments[6]:t.FLOAT;return t.bindBuffer(e.type,e.buffer),t.vertexAttribPointer(n.location,r,s,!1,i*e.unitSize,o),t.enableVertexAttribArray(n.location),e},n.disableVertexAttribArray=function(t,e){return t.disableVertexAttribArray(e.location)};var i=t("./shader.js"),a=t("./mapSize.js"),u=t("./mapType.js");function o(t,e){return t.useProgram(e)}function s(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i),s=(0,u.mapType)(t,o.type);n[o.name]={attribData:o,size:(0,a.mapSize)(s),type:s,location:t.getAttribLocation(e,o.name)}}return n}function c(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;i++){var o=t.getActiveUniform(e,i),s=o.name.replace(/\[.*?\]/,""),a=(0,u.mapType)(t,o.type);n[s]={uniformData:o,type:a,size:o.size,location:t.getUniformLocation(e,s)}}return n}},{"./mapSize.js":15,"./mapType.js":16,"./shader.js":18}],18:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createShader=function(t,e,n){e=t.createShader(e);return t.shaderSource(e,n),t.compileShader(e),e}},{}],19:[function(t,e,n){"use strict";function i(t){var e=t.createTexture();return t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}Object.defineProperty(n,"__esModule",{value:!0}),n.create2DTexture=i,n.createImgTexture=function(t,e){var n=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),{texture:n}},n.createDataTexture=function(t,e){var n=new Uint8Array(e.data||e),r=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e.width||1,e.height||1,0,t.RGBA,t.UNSIGNED_BYTE,n),{texture:r}},n.deleteTexture=function(t,e){return t.deleteTexture(e)}},{}],20:[function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"linear",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.type=t||"linear",this.x1=e.x1||0,this.y1=e.y1||0,this.r1=e.r1||0,this.x2=e.x2||0,this.y2=e.y2||0,this.r2=e.r2||0,this.bounds=e.bounds||{left:0,top:0,width:0,height:0},this.control=e.control,this.stops=[],this.init()}var t,e,r;return t=n,(e=[{key:"init",value:function(){var t=this.x2-this.x1,e=this.y2-this.y1;"radial"===this.type?this.length=this.r2-this.r1:0==t&&0==e?this.length=0:(this.length=Math.sqrt(Math.pow(t,2),Math.pow(e,2)),this.sin=e/this.length,this.cos=t/this.length)}},{key:"addColorStop",value:function(t,e){this.stops.push({offset:t,color:e})}},{key:"toImageData",value:function(r,t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!r.textureContext)return null;var i=null,i="linear"===this.type?r.textureContext.createLinearGradient(this.x1,this.y1,this.x2,this.y2):r.textureContext.createRadialGradient(this.x1,this.y1,this.r1,this.x2,this.y2,this.r2);return this.stops.forEach(function(t,e){var n=r.graph.utils.toColor(t.color);i&&i.addColorStop(t.offset,n)}),r.toFillTexture(i,t,e)}},{key:"toString",value:function(){var e=this.type+"-gradient(";return"linear"==this.type?e+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:e+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.forEach(function(t){e+=","+t.color+" "+t.offset}),e+")"}}])&&i(t.prototype,e),r&&i(t,r),n}();n.default=r},{}],21:[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(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=t("./base.js"))&&r.__esModule?r:{default:r};function u(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=p(n);return t=r?(t=p(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var y=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(i,o["default"]);var t,e,n,r=f(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this,t,e)).isRegular=e.isRegular||!1,t.needCut=e.needCut||!1,t.control=e.control,t.points=[],t}return t=i,(e=[{key:"setParentBounds",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.parentAbsoluteBounds;t&&(this.parentAbsoluteBounds=t),this.context.uniform2f(this.program.uniforms.a_center_point.location,this.graph.width/2,this.graph.height/2)}},{key:"setFragColor",value:function(t){if(!Array.isArray(t))return void 0===(t=this.convertColor(t)).a&&(t.a=1),this.context.uniform4f(this.program.uniforms.v_single_color.location,t.r,t.g,t.b,t.a*this.style.globalAlpha),null;var e,n=[],r=s(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0===(i=this.convertColor(i)).a&&(i.a=1),n.push(i.r,i.g,i.b,i.a*this.style.globalAlpha)}}catch(t){r.e(t)}finally{r.f()}t=this.createFloat32Buffer(n);return this.writeVertexAttrib(t,this.program.attrs.a_color,4,0,0),t.attr=this.program.attrs.a_color,t}},{key:"beginDraw",value:function(){this.useProgram()}},{key:"draw",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.parentAbsoluteBounds;this.setParentBounds(e),this.points=t}},{key:"endDraw",value:function(){this.points&&delete this.points,this.pathPoints&&delete this.pathPoints}},{key:"closePath",value:function(){var t,e;this.points&&2<this.points.length&&this.points[0]!==this.points[this.points.length-1]&&((t=this.points[0])==(e=this.points[this.points.length-1])||t.x===e.x&&t.y===e.y||this.points.push(t))}},{key:"writePoints",value:function(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.program.attrs.a_position,r=[],i=s(t);try{for(i.s();!(e=i.n()).done;){var o=e.value;r.push(o.x+this.parentAbsoluteBounds.left,o.y+this.parentAbsoluteBounds.top)}}catch(t){i.e(t)}finally{i.f()}t=this.createFloat32Buffer(r);return this.writeVertexAttrib(t,n,2,0,0),t.attr=n,t}},{key:"genLinePoints",value:function(t,e){var n=[t],r=e.x-t.x,i=e.y-t.y;if(0!=r||0!=i)for(var o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)),s=r/o,a=i/o,u=.5;u<o;u+=.5){var c=t.x+s*u,l=t.y+a*u;n.push({x:c,y:l})}return n.push(e),n}},{key:"pathToPoints",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,e=null,n=[],r=0;r<t.length;r++){var i,o=t[r];e&&!o.m?(i=this.genLinePoints(e,o),n.push.apply(n,u(i))):e&&!n.includes(e)&&n.push(e),e=o}return n.includes(e)||n.push(e),n}},{key:"equalPoint",value:function(t,e){return t.x===e.x&&t.y===e.y}},{key:"pathToLines",value:function(t){for(var e=null,n=[],r=0;r<t.length;r++){var i=t[r];!e||i.m||e.x==i.x&&e.y==i.y||n.push({start:e,end:i}),e=i}return n}},{key:"cutLines",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(t&&t.length<3)return t;for(n=Math.max(e+1,n);e<t.length;){for(var r=t[e];n<t.length;){var i=t[n];if(this.equalPoint(r.start,i.start)||this.equalPoint(r.end,i.end)||this.equalPoint(r.start,i.end)||this.equalPoint(r.end,i.start))n++;else{var o,s,a=!1,u=this.getIntersection(r,i);if(u&&(this.equalPoint(r.start,u)||this.equalPoint(r.end,u)||(o={start:r.start,end:u},s={start:u,end:r.end},t.splice(e,1,o,s),a=!0,n++),this.equalPoint(i.start,u)||this.equalPoint(i.end,u)||(s={start:i.start,end:u},i={start:u,end:i.end},t.splice(n,1,s,i),n++)),n++,a)return this.cutLines(t,e,n)}}n=++e+1}return t}},{key:"getIntersection",value:function(t,e){if(this.equalPoint(t.start,e.start)||this.equalPoint(t.start,e.end))return t.start;if(this.equalPoint(t.end,e.start)||this.equalPoint(t.end,e.end))return t.end;var n=(t.start.x-e.start.x)*(t.end.y-e.start.y)-(t.start.y-e.start.y)*(t.end.x-e.start.x),r=(t.start.x-e.end.x)*(t.end.y-e.end.y)-(t.start.y-e.end.y)*(t.end.x-e.end.x);if(0<n*r)return null;e=(e.start.x-t.start.x)*(e.end.y-t.start.y)-(e.start.y-t.start.y)*(e.end.x-t.start.x);if(0<e*(e+n-r))return null;if(r==n)return null;r=e/(r-n),n=r*(t.end.x-t.start.x),r*=t.end.y-t.start.y;return{x:t.start.x+n,y:t.start.y+r}}},{key:"getIntersectionLines",value:function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.end,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[],o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,s={line:t,polygons:[]};if(i.push(r),o&&this.equalPoint(o.line.start,r))return i.unshift(o.line.start),o.polygons.push(i),s;for(;n<e.length;n++){var a=e[n];this.equalPoint(r,a.start)?i.includes(a.end)||this.getIntersectionLines(a,e,n+1,a.end,u(i),o||s):this.equalPoint(r,a.end)&&(i.includes(a.start)||this.getIntersectionLines(a,e,n+1,a.start,u(i),o||s))}return s}},{key:"getPolygon",value:function(t){var e=[];if((n=this.pathToLines(t))&&2<n.length)for(var n=this.cutLines(n),r=0;r<n.length-1;r++){var i=n[r],i=this.getIntersectionLines(i,n,r+1);i.polygons.length&&e.push.apply(e,u(i.polygons))}return e}},{key:"getTriangles",value:function(t){var e=[],t=this.getPolygon(t);if(t.length){var n,r=s(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=this.earCutPointsToTriangles(i);e.push.apply(e,u(o))}}catch(t){r.e(t)}finally{r.f()}}return e}},{key:"stroke",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style.strokeStyle,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.style.lineWidth;e&&e.length&&(t=null,n&&(t=this.setFragColor(n)),r&&this.context.uniform1f(this.program.uniforms.a_point_size.location,r),this.program.uniforms.a_type&&this.context.uniform1i(this.program.uniforms.a_type.location,1===e.length?4:1),e&&e.length&&(e=(n=r<=1.2)?e:this.pathToPoints(e),r=this.writePoints(e),this.context.drawArrays(n?this.context.LINE_LOOP:this.context.POINTS,0,e.length),this.deleteBuffer(r)),t&&this.deleteBuffer(t),t&&this.disableVertexAttribArray(t.attr))}},{key:"fill",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{left:0,top:0,width:0,height:0},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.points&&this.points.length&&(this.style.fillStyle&&this.fillColor(this.style.fillStyle,this.points,t,e),this.style.fillImage&&this.fillImage(this.style.fillImage,this.points,t,e))}},{key:"fillColor",value:function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;if(this.isGradient(t)){var i=t.toImageData(this,n,e);return this.fillImage(i.data,i.points,n)}this.context.uniform1i(this.program.uniforms.a_type.location,r);t=this.setFragColor(t);this.fillPolygons(e),t&&this.deleteBuffer(t),t&&this.disableVertexAttribArray(t.attr)}},{key:"fillImage",value:function(t,e,n){t&&(t=t instanceof ImageData?this.createDataTexture(t):this.createImgTexture(t),this.context.uniform1i(this.program.uniforms.u_sample.location,0),this.context.uniform4f(this.program.uniforms.v_texture_bounds.location,n.left+this.parentAbsoluteBounds.left,n.top+this.parentAbsoluteBounds.top,n.width,n.height),this.fillTexture(e),this.deleteTexture(t))}},{key:"fillTexture",value:function(t){t&&t.length&&(this.context.uniform1i(this.program.uniforms.a_type.location,2),this.fillPolygons(t,!0),this.disableVertexAttribArray(this.program.attrs.a_text_coord))}},{key:"fillPolygons",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=this.writePoints(t),e=e?this.writePoints(t,this.program.attrs.a_text_coord):null;this.context.drawArrays(this.context.TRIANGLE_FAN,0,t.length),this.deleteBuffer(n),e&&this.deleteBuffer(e)}},{key:"drawImage",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.width,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:t.height,r=r||t.width,i=i||t.height;this.fillImage(t,this.points,{left:e,top:n,width:r,height:i})}},{key:"drawText",value:function(t,e,n,r){var i=this.textureCanvas;if(!i)return null;if(i.width=r.width,i.height=r.height,!i.width||!i.height)return null;this.textureContext.clearRect(0,0,i.width,i.height),this.textureContext.font=this.style.font||this.style.fontSize+"px "+this.style.fontFamily,e-=r.left,n-=r.top,this.setTextureStyle(this.style),this.style.fillStyle&&this.textureContext.fillText&&(this.style.maxWidth?this.textureContext.fillText(t,e,n,this.style.maxWidth):this.textureContext.fillText(t,e,n)),this.textureContext.strokeText&&(this.style.maxWidth?this.textureContext.strokeText(t,e,n,this.style.maxWidth):this.textureContext.strokeText(t,e,n));i=this.textureContext.getImageData(0,0,i.width,i.height);this.fillImage(i,this.points,r)}}])&&l(t.prototype,e),n&&l(t,n),i}();n.default=y},{"./base.js":13}],22:[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(n,"__esModule",{value:!0}),n.jmArc=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!1!==t.isRegular,t.needCut=!0===t.needCut,(e=r.call(this,t,e)).center=t.center||{x:0,y:0},e.radius=t.radius||0,e.startAngle=t.start||t.startAngle||0,e.endAngle=t.end||t.endAngle||2*Math.PI,e.anticlockwise=t.anticlockwise||0,e.isFan=!!t.isFan,e}return t=i,(e=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"startAngle",get:function(){return this.property("startAngle")},set:function(t){return this.needUpdate=!0,this.property("startAngle",t)}},{key:"endAngle",get:function(){return this.property("endAngle")},set:function(t){return this.needUpdate=!0,this.property("endAngle",t)}},{key:"anticlockwise",get:function(){return this.property("anticlockwise")},set:function(t){return this.needUpdate=!0,this.property("anticlockwise",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=0,n=0,r=t.center.x,i=t.center.y;t.radius?e=n=t.radius:(e=t.width/2,n=t.height/2);var o=this.startAngle,s=this.endAngle;if((0!=e||0!=n)&&o!=s){var a=this.anticlockwise;this.points=[];var u=1/Math.max(e,n);a&&(o=(a=2*Math.PI)-o,s=a-s),s<o&&(u=-u),this.isFan&&this.points.push(t.center);for(var c=o;;c+=u){(0<u&&s<c||u<0&&c<s)&&(c=s);var l={x:Math.cos(c)*e+r,y:Math.sin(c)*n+i};if(this.points.push(l),c==s)break}return this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArc=n.default=t},{"../core/jmPath.js":8}],23:[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(n,"__esModule",{value:!0}),n.jmArrow=n.default=void 0;var o=t("../core/jmPath.js"),u=t("../core/jmUtils.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=l(n);return t=r?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArrow";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.lineJoin="miter",e.style.lineCap="square",e.angle=t.angle||0,e.start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.offsetX=t.offsetX||5,e.offsetY=t.offsetY||8,e}return t=i,(e=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"angle",get:function(){return this.property("angle")},set:function(t){return this.needUpdate=!0,this.property("angle",t)}},{key:"offsetX",get:function(){return this.property("offsetX")},set:function(t){return this.needUpdate=!0,this.property("offsetX",t)}},{key:"offsetY",get:function(){return this.property("offsetY")},set:function(t){return this.needUpdate=!0,this.property("offsetY",t)}},{key:"initPoints",value:function(t){var e=this.angle,n=this.start,r=this.end;if(r){e=e||Math.atan2(r.y-n.y,r.x-n.x),this.points=[];var i=this.offsetX,o=this.offsetY,s=Math.atan2(i,o),a=e+s,n=Math.sin(a),a=Math.cos(a),i=Math.sqrt(i*i+o*o),o={x:r.x-a*i,y:r.y-n*i},s=e-s,n=Math.sin(s),a=Math.cos(s),n={x:r.x-a*i,y:r.y-n*i},i=u.jmUtils.clone(r);return i.m=!0,this.points.push(i),this.points.push(o),t||this.style.fill?(this.points.push(n),this.points.push(r)):(this.points.push(i),this.points.push(n)),this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArrow=n.default=t},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],24:[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(n,"__esModule",{value:!0}),n.jmArrowLine=n.default=void 0;var o=t("./jmLine.js"),s=t("./jmArrow.js");function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n);return t=r?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,o.jmLine);var t,e,n,r=l(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(e=r.call(this,t,e||"jmArrowLine")).style.lineJoin=e.style.lineJoin||"miter",e.arrow=new s.jmArrow(t),e}return t=i,(e=[{key:"initPoints",value:function(){return this.points=u(h(i.prototype),"initPoints",this).call(this),!1!==this.arrowVisible&&(this.points=this.points.concat(this.arrow.initPoints())),this.points}}])&&a(t.prototype,e),n&&a(t,n),i}();n.jmArrowLine=n.default=t},{"./jmArrow.js":23,"./jmLine.js":30}],25:[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(n,"__esModule",{value:!0}),n.jmBezier=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.style&&!0!==typeof t.style.close&&(t.style.close=!1),(e=r.call(this,t,e)).cpoints=t.points||[],e}return t=i,(e=[{key:"cpoints",get:function(){return this.property("cpoints")},set:function(t){return this.needUpdate=!0,this.property("cpoints",t)}},{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var n=this.getPoint(t,e);this.points.push(n)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];if(2==t.length){var n={};return n.x=(t[1].x-t[0].x)*e+t[0].x,n.y=(t[1].y-t[0].y)*e+t[0].y,n}if(2<t.length){for(var r=[],i=0;i<t.length-1;i++){var o=this.getPoint([t[i],t[i+1]],e);o&&r.push(o)}return this.getPoint(r,e)}}},{key:"offset",value:function(t,e,n){var r=this.cpoints;if(r){for(var i=r.length,o=0;o<i;o++)r[o].x+=t,r[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:n}),this.getLocation(!0)}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmBezier=n.default=t},{"../core/jmPath.js":8}],26:[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(n,"__esModule",{value:!0}),n.jmCircle=n.default=void 0;var s=t("./jmArc.js");function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n);return t=r?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmArc);var t,e,n,r=l(o);function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t.isRegular=!0,r.call(this,t,e)}return t=o,(e=[{key:"initPoints",value:function(){if("webgl"===this.graph.mode)return u(h(o.prototype),"initPoints",this).call(this);var t=this.getLocation();t.radius||(t.radius=Math.min(t.width,t.height)/2),this.points=[],this.points.push({x:t.center.x-t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y+t.radius}),this.points.push({x:t.center.x-t.radius,y:t.center.y+t.radius})}},{key:"draw",value:function(){if("webgl"===this.graph.mode)return u(h(o.prototype),"draw",this).call(this);var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=this.getLocation();e.radius||(e.radius=Math.min(e.width,e.height)/2);var n=this.startAngle,r=this.endAngle,i=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,n,r,i)}}])&&a(t.prototype,e),n&&a(t,n),o}();n.jmCircle=n.default=t},{"./jmArc.js":22}],27:[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(n,"__esModule",{value:!0}),n.jmHArc=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmArc);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.isRegular=!0,t.needCut=!0,(e=r.call(this,t,e)).minRadius=t.minRadius||e.style.minRadius||0,e.maxRadius=t.maxRadius||e.style.maxRadius||0,e}return t=i,(e=[{key:"minRadius",get:function(){return this.property("minRadius")},set:function(t){return this.needUpdate=!0,this.property("minRadius",t)}},{key:"maxRadius",get:function(){return this.property("maxRadius")},set:function(t){return this.needUpdate=!0,this.property("maxRadius",t)}},{key:"initPoints",value:function(){var t,e=this.getLocation(),n=this.minRadius,r=this.maxRadius,i=this.startAngle,o=this.endAngle;this.anticlockwise&&(i=(t=2*Math.PI)-i,o=t-o);var s=.1;o<i&&(s=-s);for(var a=[],u=[],c=i;;c+=s){(0<s&&o<c||s<0&&c<o)&&(c=o);var l=Math.cos(c),h=Math.sin(c),f={x:l*n+e.center.x,y:h*n+e.center.y},h={x:l*r+e.center.x,y:h*r+e.center.y};if(a.push(f),u.push(h),c===o)break}u.reverse(),this.style&&this.style.close||(u[0].m=!0),this.points=a.concat(u)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmHArc=n.default=t},{"./jmArc.js":22}],28:[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(n,"__esModule",{value:!0}),n.jmImage=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=l(n);return t=r?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e||"jmImage")).style.fill=e.fill||"transparent",e.sourceWidth=t.sourceWidth,e.sourceHeight=t.sourceHeight,e.sourcePosition=t.sourcePosition,e.image=t.image||e.style.image,e}return t=i,(e=[{key:"sourcePosition",get:function(){return this.property("sourcePosition")},set:function(t){return this.property("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.property("sourceWidth")},set:function(t){return this.needUpdate=!0,this.property("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.property("sourceHeight")},set:function(t){return this.needUpdate=!0,this.property("sourceHeight",t)}},{key:"image",get:function(){return this.property("image")},set:function(t){return this.needUpdate=!0,this.property("image",t)}},{key:"draw",value:function(){try{var t=this.getImage();this.drawImg(t)}catch(t){console.error&&console.error(t)}}},{key:"drawImg",value:function(t){if(t&&t.complete){var e=(e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds)||(this.parent&&this.parent.getAbsoluteBounds?this.parent:this).getAbsoluteBounds(),n=this.getLocation(),r=this.sourcePosition,i=this.sourceWidth,o=this.sourceHeight,s=this.webglControl||this.context;if(this.webglControl){s.setParentBounds&&s.setParentBounds(e);var a=this.getBounds();return s.draw([{x:a.left,y:a.top},{x:a.left+a.width,y:a.top},{x:a.left+a.width,y:a.top+a.height},{x:a.left,y:a.top+a.height}],e),void s.drawImage(t,a.left,a.top,a.width,a.height)}n.left+=e.left,n.top+=e.top,r||void 0!==i||void 0!==o?(void 0===i&&(i=n.width||t.width||0),void 0===o&&(o=n.height||t.height||0),r=r||{x:0,y:0},n.width&&n.height?s.drawImage(t,r.x,r.y,i,o,n.left,n.top,n.width,n.height):n.width?s.drawImage(t,r.x,r.y,i,o,n.left,n.top,n.width,o):n.height?s.drawImage(t,r.x,r.y,i,o,n.left,n.top,i,n.height):s.drawImage(t,r.x,r.y,i,o,n.left,n.top,i,o)):n?n.width&&n.height?s.drawImage(t,n.left,n.top,n.width,n.height):n.width?s.drawImage(t,n.left,n.top,n.width,t.height):n.height?s.drawImage(t,n.left,n.top,t.width,n.height):s.drawImage(t,n.left,n.top):s.drawImage(t)}else console.warn("image is empty")}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={},n=this.getImage()||{width:0,height:0},r=this.getLocation(),t=r.width||n.width,n=r.height||n.height;return e.left=r.left,e.top=r.top,e.right=r.left+t,e.bottom=r.top+n,e.width=t,e.height=n,this.bounds=e}},{key:"getLocation",value:function(){var t=this.getImage(),e=a(l(i.prototype),"getLocation",this).call(this);return e.width&&!e.height?e.height=e.width/t.width*t.height:e.height&&!e.width&&(e.width=e.height/t.height*t.width),e}},{key:"getImage",value:function(){var t=this,e=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(e)||(e&&e.src?this.__img=e:"undefined"!=typeof document&&document.createElement?(this.__img=document.createElement("img"),this.__img.onload=function(){t.needUpdate=!0},e&&"string"==typeof e&&(this.__img.src=e)):this.graph.isWXMiniApp&&this.graph.canvas&&"string"==typeof e?(this.__img=this.graph.canvas.createImage(),this.__img.onload=function(){t.needUpdate=!0},this.__img.src=e):this.__img=e,this.__img&&(this.image=this.__img.src)),this.__img}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmImage=n.default=t},{"../core/jmControl.js":2}],29:[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(n,"__esModule",{value:!0}),n.jmLabel=n.default=void 0;var o=t("../core/jmControl.js");function s(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function a(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return t=r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,o.jmControl);var t,e,n,r=h(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e||"jmLabel")).style.font=e.style.font||"15px Arial",e.style.fontFamily=e.style.fontFamily||"Arial",e.style.fontSize=e.style.fontSize||15,e.style.textAlign=e.style.textAlign||"left",e.style.textBaseline=e.style.textBaseline||"middle",e.text=t.text||"",e.center=t.center||null,e}return t=i,(e=[{key:"text",get:function(){return this.property("text")},set:function(t){return this.needUpdate=!0,this.property("text",t)}},{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getLocation",value:function(){var t=c(f(i.prototype),"getLocation",this).call(this),e=this.testSize();return t.width=t.width||e.width,t.height=t.height||e.height,t.left||t.top||!t.center||(t.left=t.center.x-t.width/2,t.top=t.center.y-t.height/2),t}},{key:"initPoints",value:function(){this.__size=null;var t=this.getLocation();return this.points=[{x:t.left,y:t.top}],this.points.push({x:t.left+t.width,y:t.top}),this.points.push({x:t.left+t.width,y:t.top+t.height}),this.points.push({x:t.left,y:t.top+t.height}),this.points}},{key:"testSize",value:function(){return this.__size||(this.webglControl?this.__size=this.webglControl.testSize(this.text,this.style):(this.context.save&&this.context.save(),this.setStyle({font:this.style.font||this.style.fontSize+"px "+this.style.fontFamily}),this.__size=this.context.measureText?this.context.measureText(this.text):{width:15},this.context.restore&&this.context.restore(),this.__size.height=this.style.fontSize||15),this.width||(this.width=this.__size.width),this.height||(this.height=this.__size.height),this.__size)}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=(this.testSize(),this.location),n=e.left+t.left,r=e.top+t.top;switch(this.style.textAlign){case"right":n+=e.width;break;case"center":n+=e.width/2}switch(this.style.textBaseline){case"bottom":r+=e.height;break;case"hanging":case"alphabetic":case"middle":r+=e.height/2}var i=this.text;void 0!==i&&(this.webglControl?(this.webglControl.draw(this.points,t),this.webglControl.drawText(i,n,r,e)):this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(i,n,r,this.style.maxWidth):this.context.fillText(i,n,r):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(i,n,r,this.style.maxWidth):this.context.strokeText(i,n,r))),this.style.border&&(this.style.border.style&&(this.context.save&&this.context.save(),this.setStyle(this.style.border.style)),"2d"===this.mode?(this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top),this.style.border.top&&this.context.lineTo(this.points[1].x+t.left,this.points[1].y+t.top),this.style.border.right&&(this.context.moveTo(this.points[1].x+t.left,this.points[1].y+t.top),this.context.lineTo(this.points[2].x+t.left,this.points[2].y+t.top)),this.style.border.bottom&&(this.context.moveTo(this.points[2].x+t.left,this.points[2].y+t.top),this.context.lineTo(this.points[3].x+t.left,this.points[3].y+t.top)),this.style.border.left&&(this.context.moveTo(this.points[3].x+t.left,this.points[3].y+t.top),this.context.lineTo(this.points[0].x+t.left,this.points[0].y+t.top))):(t=[],this.style.border.top&&(t.push(this.points[0]),t.push(this.points[1])),this.style.border.right&&(t.push(a(a({},this.points[1]),{},{m:!0})),t.push(this.points[2])),this.style.border.bottom&&(t.push(a(a({},this.points[2]),{},{m:!0})),t.push(this.points[3])),this.style.border.left&&(t.push(a(a({},this.points[3]),{},{m:!0})),t.push(this.points[0])),t.length&&this.webglControl&&this.webglControl.stroke(t)))}},{key:"endDraw",value:function(){"2d"===this.mode&&c(f(i.prototype),"endDraw",this).call(this)}}])&&u(t.prototype,e),n&&u(t,n),i}();n.jmLabel=n.default=t},{"../core/jmControl.js":2}],30:[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(n,"__esModule",{value:!0}),n.jmLine=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.isRegular=!0,(e=r.call(this,t,e)).start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.style.lineType=e.style.lineType||"solid",e.style.dashLength=e.style.dashLength||4,e.style.close=!1,e}return t=i,(e=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);n/=i,r/=i;for(var o=!1,s=this.style.dashLength||5,a=s/2,u=s;u<=i;){var c={x:t.x+n*u,y:t.y+r*u};!1===o?u+=a:(c.m=!0,u+=s),this.points.push(c),o=!o}}return this.points.push(e),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLine=n.default=t},{"../core/jmPath.js":8}],31:[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(n,"__esModule",{value:!0}),n.jmPrismatic=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.isRegular=!0,(e=r.call(this,t,e)).style.close=void 0===e.style.close||e.style.close,e.center=t.center||{x:0,y:0},e.width=t.width||0,e.height=t.height||0,e}return t=i,(e=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,n=t.height/2;this.points=[],this.points.push({x:t.center.x-e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y+n}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-n})}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPrismatic=n.default=t},{"../core/jmPath.js":8}],32:[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(n,"__esModule",{value:!0}),n.jmRect=n.default=void 0;var o=t("../core/jmPath.js"),l=t("./jmArc.js"),h=t("./jmLine.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e)).style.close=!0,e.radius=t.radius||e.style.radius||0,e}return t=i,(e=[{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};this.initPoints();t=this.getLocation();return e.left=t.left,e.top=t.top,e.right=t.left+t.width,e.bottom=t.top+t.height,e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"initPoints",value:function(){var t,e,n,r,i,o=this.getLocation(),s={x:o.left,y:o.top},a={x:o.left+o.width,y:o.top},u={x:o.left+o.width,y:o.top+o.height},c={x:o.left,y:o.top+o.height};return"dotted"!==this.style.lineType||this.dottedLine||(this.dottedLine=this.graph.createShape(h.jmLine,{style:this.style})),o.radius&&o.radius<o.width/2&&o.radius<o.height/2?(t=Math.PI/2,(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:o.left+o.radius,y:o.top+o.radius},i.startAngle=Math.PI,i.endAngle=Math.PI+t,e=i.initPoints(),(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:a.x-o.radius,y:a.y+o.radius},i.startAngle=Math.PI+t,i.endAngle=2*Math.PI,n=i.initPoints(),(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:u.x-o.radius,y:u.y-o.radius},i.startAngle=0,i.endAngle=t,r=i.initPoints(),(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:c.x+o.radius,y:c.y-o.radius},i.startAngle=t,i.endAngle=Math.PI,i=i.initPoints(),this.points=e.concat(n,r,i)):(this.points=[],this.points.push(s),this.dottedLine&&(this.dottedLine.start=s,this.dottedLine.end=a,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(a),this.dottedLine&&(this.dottedLine.start=a,this.dottedLine.end=u,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(u),this.dottedLine&&(this.dottedLine.start=u,this.dottedLine.end=c,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(c),this.dottedLine&&(this.dottedLine.start=c,this.dottedLine.end=s,this.points=this.points.concat(this.dottedLine.initPoints()))),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmRect=n.default=t},{"../core/jmPath.js":8,"./jmArc.js":22,"./jmLine.js":30}],33:[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(n,"__esModule",{value:!0}),n.jmResize=n.default=void 0;var o=t("./jmRect.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmRect);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e)).resizable=!1!==t.resizable,e.movable=t.movable,e.rectSize=t.rectSize||8,e.style.close=e.style.close||!0,e.rectCursors=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"],e.init(t),e}return t=i,(e=[{key:"rectSize",get:function(){return this.property("rectSize")},set:function(t){return this.property("rectSize",t)}},{key:"resizable",get:function(){return this.property("resizable")},set:function(t){return this.property("resizable",t)}},{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,n=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};n.close=!0,n.fill=n.fill||"transparent";for(var r=0;r<8;r++){var i=(this.graph||t.graph).createShape(o.jmRect,{position:{x:0,y:0},width:e,height:e,style:n,interactive:!0});i.index=r,i.visible=!0,this.resizeRects.push(i),this.children.add(i),i.canMove(!0,this.graph)}this.reset(0,0,0,0),this.bindRectEvents()}}},{key:"bindRectEvents",value:function(){for(var t=0;t<this.resizeRects.length;t++){var e=this.resizeRects[t];e.on("move",function(t){t.cancel=!0;var e=0,n=0,r=0,i=0;0==this.index?(r=-t.offsetX,e=t.offsetX):1==this.index?(r=-t.offsetX,e=t.offsetX,i=-t.offsetY,n=t.offsetY):2==this.index?(i=-t.offsetY,n=t.offsetY):3==this.index?(r=t.offsetX,i=-t.offsetY,n=t.offsetY):4==this.index?r=t.offsetX:5==this.index?(r=t.offsetX,i=t.offsetY):6==this.index?i=t.offsetY:7==this.index&&(r=-t.offsetX,r=-t.offsetX,e=t.offsetX,i=t.offsetY),this.parent.reset(e,n,r,i)}),e.bind("mousemove",function(){var t=this.parent.getRotation(),e=this.parent.rectCursors[this.index],n=t&&t.angle?this.graph.utils.rotatePoints(this.graph.utils.clone(this.position),t,t.angle):this.position,r=this.parent.width/2,i=this.parent.height/2;this.rotationAngleByCenter=Math.atan((n.y-i)/(n.x-r));t=Math.atan(i/r)/2,i=2*t+Math.PI/4;n.x<r?this.rotationAngleByCenter>=-t&&this.rotationAngleByCenter<=t?e=this.parent.rectCursors[0]:this.rotationAngleByCenter>t&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[1]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[2]:this.rotationAngleByCenter<=-t&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[7]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[6]):this.rotationAngleByCenter>=-t&&this.rotationAngleByCenter<=t?e=this.parent.rectCursors[4]:this.rotationAngleByCenter>t&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[5]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[6]:this.rotationAngleByCenter<=-t&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[3]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[2]),this.cursor=e}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,n,r){var i,o,s=void 0===this.style.minWidth?5:this.style.minWidth,a=void 0===this.style.minHeight?5:this.style.minHeight,u=this.getLocation();0==n&&0==r||(i=u.width+n,o=u.height+r,(s<=i||a<=o)&&(s<=i?this.width=i:n=t=0,a<=o?this.height=o:r=e=0,!1!==this.movable&&(t||e)&&((o=this.position).x=u.left+t,o.y=u.top+e,this.position=o),this.emit("resize",t,e,n,r)));var c,l=this.getLocation();for(c in this.resizeRects){var h=this.resizeRects[c];switch(h.index){case 0:h.position.x=-h.width/2,h.position.y=(l.height-h.height)/2;break;case 1:h.position.x=-h.width/2,h.position.y=-h.height/2;break;case 2:h.position.x=(l.width-h.width)/2,h.position.y=-h.height/2;break;case 3:h.position.x=l.width-h.width/2,h.position.y=-h.height/2;break;case 4:h.position.x=l.width-h.width/2,h.position.y=(l.height-h.height)/2;break;case 5:h.position.x=l.width-h.width/2,h.position.y=l.height-h.height/2;break;case 6:h.position.x=(l.width-h.height)/2,h.position.y=l.height-h.height/2;break;case 7:h.position.x=-h.width/2,h.position.y=l.height-h.height/2}h.needUpdate=!0}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmResize=n.default=t},{"./jmRect.js":32}]},{},[1])(1);return i.jmGraph=r},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t.bind(i)):t()}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
1
+ !function(i){var t;t=function(t,e,n){var r=function r(i,o,s){function a(e,t){if(!o[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(u)return u(e,!0);throw(n=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",n}n=o[e]={exports:{}},i[e][0].call(n.exports,function(t){return a(i[e][1][t]||t)},n,n.exports,r,i,o,s)}return o[e].exports}for(var u="function"==typeof require&&require,t=0;t<s.length;t++)a(s[t]);return a}({1:[function(t,e,n){"use strict";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)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmArc",{enumerable:!0,get:function(){return i.jmArc}}),Object.defineProperty(n,"jmArrow",{enumerable:!0,get:function(){return o.jmArrow}}),Object.defineProperty(n,"jmBezier",{enumerable:!0,get:function(){return s.jmBezier}}),Object.defineProperty(n,"jmCircle",{enumerable:!0,get:function(){return a.jmCircle}}),Object.defineProperty(n,"jmHArc",{enumerable:!0,get:function(){return u.jmHArc}}),Object.defineProperty(n,"jmLine",{enumerable:!0,get:function(){return c.jmLine}}),Object.defineProperty(n,"jmPrismatic",{enumerable:!0,get:function(){return l.jmPrismatic}}),Object.defineProperty(n,"jmRect",{enumerable:!0,get:function(){return h.jmRect}}),Object.defineProperty(n,"jmArrowLine",{enumerable:!0,get:function(){return f.jmArrowLine}}),Object.defineProperty(n,"jmImage",{enumerable:!0,get:function(){return p.jmImage}}),Object.defineProperty(n,"jmLabel",{enumerable:!0,get:function(){return y.jmLabel}}),Object.defineProperty(n,"jmResize",{enumerable:!0,get:function(){return d.jmResize}}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return m.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return m.jmList}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return m.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return m.jmGradient}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return m.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return m.jmPath}}),n.create=n.jmGraph=n.default=void 0;var i=t("./src/shapes/jmArc.js"),o=t("./src/shapes/jmArrow.js"),s=t("./src/shapes/jmBezier.js"),a=t("./src/shapes/jmCircle.js"),u=t("./src/shapes/jmHArc.js"),c=t("./src/shapes/jmLine.js"),l=t("./src/shapes/jmPrismatic.js"),h=t("./src/shapes/jmRect.js"),f=t("./src/shapes/jmArrowLine.js"),p=t("./src/shapes/jmImage.js"),y=t("./src/shapes/jmLabel.js"),d=t("./src/shapes/jmResize.js"),m=t("./src/core/jmGraph.js");function v(t,e,n){return(v=j()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&b(r,n.prototype),r}).apply(null,arguments)}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _={arc:i.jmArc,arrow:o.jmArrow,bezier:s.jmBezier,circle:a.jmCircle,harc:u.jmHArc,line:c.jmLine,prismatic:l.jmPrismatic,rect:h.jmRect,arrowline:f.jmArrowLine,image:p.jmImage,img:p.jmImage,label:y.jmLabel,resize:d.jmResize},P=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(a,m.jmGraph);var n,r,t,e,i,s=(n=a,r=j(),function(){var t,e=w(n);return x(this,r?(t=w(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function a(r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var t=this instanceof a?this.constructor:void 0;return(i=Object.assign({},i)).shapes=Object.assign(_,i.shapes||{}),t&&t.prototype instanceof m.jmGraph?("function"==typeof i&&(o=i,i={}),s.call(this,r,i,o)):x(void 0,new Promise(function(t,e){var n=new a(r,i,o);t&&t(n)}))}return t=a,i=[{key:"create",value:function(){return O.apply(void 0,arguments)}}],(e=null)&&g(t.prototype,e),i&&g(t,i),a}();n.jmGraph=n.default=P;var O=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v(P,e)};n.create=O},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":22,"./src/shapes/jmArrow.js":23,"./src/shapes/jmArrowLine.js":24,"./src/shapes/jmBezier.js":25,"./src/shapes/jmCircle.js":26,"./src/shapes/jmHArc.js":27,"./src/shapes/jmImage.js":28,"./src/shapes/jmLabel.js":29,"./src/shapes/jmLine.js":30,"./src/shapes/jmPrismatic.js":31,"./src/shapes/jmRect.js":32,"./src/shapes/jmResize.js":33}],2:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmControl=n.default=void 0;var r,h=t("./jmUtils.js"),o=t("./jmList.js"),u=t("./jmGradient.js"),c=t("./jmShadow.js"),s=t("./jmProperty.js"),a=(r=t("../lib/webgl/path.js"))&&r.__esModule?r:{default:r};function l(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function p(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=d(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function d(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(t){return(m="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 v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=j(n);return t=r?(t=j(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==m(t)&&"function"!=typeof t?x(e):t}}function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w={fill:"fillStyle",fillImage:"fillImage",stroke:"strokeStyle","shadow.blur":"shadowBlur","shadow.x":"shadowOffsetX","shadow.y":"shadowOffsetY","shadow.color":"shadowColor",lineWidth:"lineWidth",miterLimit:"miterLimit",fillStyle:"fillStyle",strokeStyle:"strokeStyle",font:"font",opacity:"globalAlpha",textAlign:"textAlign",textBaseline:"textBaseline",shadowBlur:"shadowBlur",shadowOffsetX:"shadowOffsetX",shadowOffsetY:"shadowOffsetY",shadowColor:"shadowColor",lineJoin:"lineJoin",lineCap:"lineCap"},_=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(i,s.jmProperty);var t,e,n,r=b(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this,t=t||{})).property("type",e||(this instanceof i?this.constructor:void 0).name),n.style=t&&t.style?t.style:{},n.width=t.width||0,n.height=t.height||0,n.hitArea=t.hitArea||null,t.position&&(n.position=t.position),n.graph=t.graph||null,n.zIndex=t.zIndex||0,n.interactive=void 0!==t.interactive&&t.interactive,"webgl"===n.mode&&(n.webglControl=new a.default(n.graph,{style:n.style,control:x(n),isRegular:t.isRegular,needCut:t.needCut})),n.initializing(),n.on=n.bind,n.option=t,n}return t=i,(e=[{key:"type",get:function(){return this.property("type")}},{key:"context",get:function(){var t=this.property("context");if(t)return t;if(this.is("jmGraph")&&this.canvas&&this.canvas.getContext)return this.context=this.canvas.getContext(this.mode||"2d");t=this.graph;return t?t.context:t.canvas.getContext(this.mode||"2d")},set:function(t){return this.property("context",t)}},{key:"style",get:function(){return this.property("style")||this.property("style",{})},set:function(t){return this.needUpdate=!0,this.property("style",t)}},{key:"visible",get:function(){var t=this.property("visible");return t=void 0===t?this.property("visible",!0):t},set:function(t){return this.needUpdate=!0,this.property("visible",t)}},{key:"interactive",get:function(){return this.property("interactive")},set:function(t){return this.property("interactive",t)}},{key:"hitArea",get:function(){return this.property("hitArea")},set:function(t){return this.property("hitArea",t)}},{key:"children",get:function(){return this.property("children")||this.property("children",new o.jmList)},set:function(t){return this.needUpdate=!0,this.property("children",t)}},{key:"width",get:function(){var t=this.property("width");return t=void 0===t?this.property("width",0):t},set:function(t){return this.needUpdate=!0,this.property("width",t)}},{key:"height",get:function(){var t=this.property("height");return t=void 0===t?this.property("height",0):t},set:function(t){return this.needUpdate=!0,this.property("height",t)}},{key:"zIndex",get:function(){return this.property("zIndex")||this.property("zIndex",0)},set:function(t){return this.property("zIndex",t),this.children.sort(),this.needUpdate=!0,t}},{key:"cursor",get:function(){var t=this.graph;if(t)return t.css("cursor")},set:function(t){var e=this.graph;e&&e.css("cursor",t)}},{key:"initializing",value:function(){var e=this;this.children=this.children||new o.jmList;var n=this.children.add;this.children.add=function(t){if("object"===m(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),n.call(this,t),t.emit("add",t),e.needUpdate=!0,e.graph&&(t.graph=e.graph),this.sort(),t},this.children.oremove=this.children.remove,this.children.remove=function(t){"object"===m(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var t,r={};for(t in this.each(function(t,e){var n;e&&(!(n=e.zIndex)&&e.style&&e.style.zIndex&&(n=Number(e.style.zIndex),isNaN(n)&&(n=e.style.zIndex||0)),(r[n]||(r[n]=[])).push(e))}),this.splice(0,this.length),r)n.call(this,r[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var a=this;if(t=t||h.jmUtils.clone(this.style,!0)){var e,n,r=function t(e,n,r){if(e){var i=e;if("function"==typeof i)try{i=i.call(a)}catch(t){return void console.warn(t)}var o=m(i),r=w[r||n];if(i instanceof u.jmGradient||"string"==o&&-1<i.indexOf("-gradient"))t((i="string"==o&&-1<i.indexOf("-gradient")?new u.jmGradient(i):i).toGradient(a),r||n);else if(r)a.webglControl?a.webglControl.setStyle(r,i):("string"==o&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(r)&&(i=h.jmUtils.toColor(i)),a.context[r]=i);else switch(n){case"shadow":if("string"==o){t(new c.jmShadow(i),n);break}for(var s in i)t(i[s],s,n+"."+s);break;case"translate":break;case"rotation":if(void 0===i.angle||isNaN(i.angle))break;i=a.getRotation(i),a.__translateAbsolutePosition=a.toAbsolutePoint({x:i.x,y:i.y}),a.context.translate&&a.context.translate(a.__translateAbsolutePosition.x,a.__translateAbsolutePosition.y),a.context.rotate&&a.context.rotate(i.angle),a.context.translate&&a.context.translate(-a.__translateAbsolutePosition.x,-a.__translateAbsolutePosition.y);break;case"transform":if(!a.context.transform)break;Array.isArray(i)?a.context.transform.apply(a.context,i):"object"==m(i)&&a.context.transform(i.scaleX||1,i.skewX||0,i.skewY||0,i.scaleY||1,i.offsetX||0,i.offsetY||0);break;case"cursor":a.cursor=i}}};for(e in this.translate&&r(this.translate,"translate"),this.transform&&r(this.transform,"transform"),t)"constructor"!==e&&("string"==(n=m(t[e]))&&-1<t[e].indexOf("-gradient")?t[e]=new u.jmGradient(t[e]):"string"==n&&"shadow"==e&&(t[e]=new c.jmShadow(t[e])),r(t[e],e))}}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};if("jmGraph"==this.type&&this.canvas)"function"==typeof this.canvas.width?e.right=this.canvas.width():this.width&&(e.right=this.width),"function"==typeof this.canvas.height?e.bottom=this.canvas.height():this.height&&(e.bottom=this.height);else if(this.points&&0<this.points.length){var n,r=y(this.points);try{for(r.s();!(n=r.n()).done;){var i=n.value;(void 0===e.left||e.left>i.x)&&(e.left=i.x),(void 0===e.top||e.top>i.y)&&(e.top=i.y),(void 0===e.right||e.right<i.x)&&(e.right=i.x),(void 0===e.bottom||e.bottom<i.y)&&(e.bottom=i.y)}}catch(t){r.e(t)}finally{r.f()}}else!this.getLocation||(t=this.getLocation())&&(e.left=t.left,e.top=t.top,e.right=t.left+t.width,e.bottom=t.top+t.height);return e.left||(e.left=0),e.top||(e.top=0),e.right||(e.right=0),e.bottom||(e.bottom=0),e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"getRotationBounds",value:function(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null)||this.getRotation(),e=this.getBounds();if(!t||!t.angle)return e;var n,r={width:0,height:0,oldBounds:e},i=[];this.points&&0<this.points.length?i=h.jmUtils.clone(this.points,!0):!this.getLocation||(n=this.getLocation())&&i.push({x:n.left,y:n.top},{x:n.left+n.width,y:n.top},{x:n.left+n.width,y:n.top+n.height},{x:n.left,y:n.top+n.height});var o,s=y(i=h.jmUtils.rotatePoints(i,{x:t.x+e.left,y:t.y+e.top},t.angle));try{for(s.s();!(o=s.n()).done;){var a=o.value;(void 0===r.left||r.left>a.x)&&(r.left=a.x),(void 0===r.top||r.top>a.y)&&(r.top=a.y),(void 0===r.right||r.right<a.x)&&(r.right=a.x),(void 0===r.bottom||r.bottom<a.y)&&(r.bottom=a.y)}}catch(t){s.e(t)}finally{s.f()}return r.left||(r.left=0),r.top||(r.top=0),r.right||(r.right=0),r.bottom||(r.bottom=0),r.width=r.right-r.left,r.height=r.bottom-r.top,r}},{key:"getLocation",value:function(){var t=this.location={left:0,top:0,width:0,height:0};t.position="function"==typeof this.position?this.position():h.jmUtils.clone(this.position),t.center=this.center&&"function"==typeof this.center?this.center():h.jmUtils.clone(this.center),t.start=this.start&&"function"==typeof this.start?this.start():h.jmUtils.clone(this.start),t.end=this.end&&"function"==typeof this.end?this.end():h.jmUtils.clone(this.end),t.radius=this.radius,t.width=this.width,t.height=this.height;var e=h.jmUtils.clone(this.style.margin,{});return e.left=e.left||0,e.top=e.top||0,e.right=e.right||0,e.bottom=e.bottom||0,t.position?(t.left=t.position.x,t.top=t.position.y):(t.left=e.left,t.top=e.top),this.parent&&(e=this.parent.getBounds(),h.jmUtils.checkPercent(t.left)&&(t.left=h.jmUtils.percentToNumber(t.left)*e.width),h.jmUtils.checkPercent(t.top)&&(t.top=h.jmUtils.percentToNumber(t.top)*e.height),h.jmUtils.checkPercent(t.width)&&(t.width=h.jmUtils.percentToNumber(t.width)*e.width),h.jmUtils.checkPercent(t.height)&&(t.height=h.jmUtils.percentToNumber(t.height)*e.height),t.center&&(h.jmUtils.checkPercent(t.center.x)&&(t.center.x=h.jmUtils.percentToNumber(t.center.x)*e.width),h.jmUtils.checkPercent(t.center.y)&&(t.center.y=h.jmUtils.percentToNumber(t.center.y)*e.height)),t.radius&&h.jmUtils.checkPercent(t.radius)&&(t.radius=h.jmUtils.percentToNumber(t.radius)*Math.min(e.width,e.height))),t}},{key:"getRotation",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return(t=t||h.jmUtils.clone(this.style.rotation))?(e=e||this.getBounds(),void 0===t.x&&(t.x="50%"),void 0===t.y&&(t.y="50%"),h.jmUtils.checkPercent(t.x)&&(t.x=h.jmUtils.percentToNumber(t.x)*e.width),h.jmUtils.checkPercent(t.y)&&(t.y=h.jmUtils.percentToNumber(t.y)*e.height)):(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null)&&(e=e||this.getBounds(),t.x-=e.left,t.y-=e.top),p(p({},t),{},{bounds:e})}},{key:"getTranslate",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(!(t=t||this.style.translate))return{x:0,y:0};t={x:t.x||0,y:t.y||0};return h.jmUtils.checkPercent(t.x)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.x=h.jmUtils.percentToNumber(t.x)*e.width),h.jmUtils.checkPercent(t.y)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.y=h.jmUtils.percentToNumber(t.y)*e.height),t}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,n,r){n=!1!==n;var i=this.getLocation(!0),o=!1;if(i.position&&(i.left+=t,i.top+=e,this.position.x=i.left,this.position.y=i.top,o=!0),i.center&&(this.center.x=i.center.x+t,this.center.y=i.center.y+e,o=!0),i.start&&"object"==m(i.start)&&(this.start.x=i.start.x+t,this.start.y=i.start.y+e,o=!0),i.end&&"object"==m(i.end)&&(this.end.x=i.end.x+t,this.end.y=i.end.y+e,o=!0),0==o&&this.cpoints){var s=(this.cpoints,this.cpoints);if(s){for(var a=s.length,u=0;u<a;u++)s[u].x+=t,s[u].y+=e;o=!0}}if(0==o&&this.points){for(var c=this.points.length,l=0;l<c;l++)this.points[l].x+=t,this.points[l].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:n,evt:r}),this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t=this.getBounds();if(this.parent&&this.parent.absoluteBounds){var e=this.parent.absoluteBounds||this.parent.getAbsoluteBounds();return{left:e.left+t.left,top:e.top+t.top,right:e.left+t.right,bottom:e.top+t.bottom,width:t.width,height:t.height}}return t}},{key:"toAbsolutePoint",value:function(t){var e;return(t.x||t.y)&&(e=this.absoluteBounds||this.getAbsoluteBounds(),t.x=(t.x||0)+e.left,t.y=(t.y||0)+e.top),t}},{key:"toLocalPosition",value:function(t){var e=this.absoluteBounds||this.getAbsoluteBounds();return!!e&&{x:t.x-e.left,y:t.y-e.top}}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath&&this.context.beginPath(),this.webglControl&&this.webglControl.beginDraw&&this.webglControl.beginDraw()}},{key:"endDraw",value:function(){this.style.close&&(this.webglControl&&this.webglControl.closePath(),this.context.closePath&&this.context.closePath());var t,e=this.style.fill||this.style.fillStyle;e&&(this.webglControl&&(t=this.getBounds(),this.webglControl.fill(t)),this.context.fill&&this.context.fill()),!this.style.stroke&&(e||this.is("jmGraph"))||(this.webglControl&&this.webglControl.stroke(),this.context.stroke&&this.context.stroke()),this.webglControl&&this.webglControl.endDraw&&this.webglControl.endDraw(),this.needUpdate=!1}},{key:"draw",value:function(){if(this.points&&0<this.points.length){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(this.webglControl)this.webglControl.setParentBounds(t),this.webglControl.draw(l(this.points));else if(this.context&&this.context.moveTo){this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,n=1;n<e;n++){var r=this.points[n];r.m?this.context.moveTo(r.x+t.left,r.y+t.top):this.context.lineTo(r.x+t.left,r.y+t.top)}}}}},{key:"paint",value:function(t){!1!==t&&!1!==this.visible&&(this.initPoints&&this.initPoints(),this.bounds=null,this.absoluteBounds=this.getAbsoluteBounds(),t=!0,!this.is("jmGraph")&&this.graph&&(this.absoluteBounds.left>=this.graph.width||this.absoluteBounds.top>=this.graph.height||this.absoluteBounds.right<=0||this.absoluteBounds.bottom<=0)&&(t=!1),this.context.save&&this.context.save(),this.emit("beginDraw",this),this.setStyle(),t&&this.beginDraw&&this.beginDraw(),t&&this.draw&&this.draw(),t&&this.endDraw&&this.endDraw(),this.children&&this.children.each(function(t,e){e&&e.paint&&e.paint()}),this.emit("endDraw",this),this.context.restore&&this.context.restore(),this.needUpdate=!1)}},{key:"getEvent",value:function(t){return this.__events?this.__events[t]:null}},{key:"bind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=y(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.bind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t)||function(t,e){return this.__events||(this.__events={}),this.__events[t]=e}.call(this,t,new o.jmList);t.contain(e)||t.add(e)}}},{key:"unbind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=y(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.unbind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t);t&&(e?t.remove(e):t.clear())}}},{key:"emit",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,n){var r,t=this.getEvent(t);return t&&(r=this,Array.isArray(n)||(n=[n]),t.each(function(t,e){!1===e.apply(r,n)&&(n.cancel=!0)})),n.cancel}},{key:"checkPoint",value:function(t,e){if("jmGraph"==this.type){var n=this.getPosition(),r=n.left+this.width,i=n.top+this.height;return t.x>r||t.x<n.left?!1:!(t.y>i||t.y<n.top)}var o=this.getBounds();if(this.hitArea){var r=this.hitArea.x+o.left,s=this.hitArea.y+o.top,i=this.hitArea.width+o.left,n=this.hitArea.height+o.top;return t.x>i||t.x<r?!1:!(t.y>n||t.y<s)}var a=this.points;if(a&&a.length||((a=[]).push({x:o.left,y:o.top}),a.push({x:o.right,y:o.top}),a.push({x:o.right,y:o.bottom}),a.push({x:o.left,y:o.bottom}),a.push({x:o.left,y:o.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),a&&a.length){s=this.getRotation(null,o);if(s&&s.angle&&(a=h.jmUtils.clone(a,!0),a=h.jmUtils.rotatePoints(a,{x:s.x+o.left,y:s.y+o.top},s.angle||0)),2<a.length&&(!this.style.fill||this.style.stroke)){for(var u=0,c=a.length,l=u+1;l<=c;l=++u+1)if(l==c){if(this.style.close)if(h.jmUtils.pointInPolygon(t,[a[u],a[0]],e))return!0}else if(h.jmUtils.pointInPolygon(t,[a[u],a[l]],e))return!0;if(!this.style.fill)return!1}return h.jmUtils.pointInPolygon(t,a,e)}return!(t.x>o.right||t.x<o.left)&&!(t.y>o.bottom||t.y<o.top)}},{key:"raiseEvent",value:function(n,r){if(!1!==this.visible){var t,e;r.position||(o=this.graph,r.isWXMiniApp=o.isWXMiniApp,t=r.srcElement||r.target,e=h.jmUtils.getEventPosition(r),r={position:e,button:0==r.button||e.isTouch?1:r.button,keyCode:r.keyCode||r.charCode||r.which,ctrlKey:r.ctrlKey,cancel:!1,event:r,srcElement:t,isWXMiniApp:o.isWXMiniApp}),r.path=r.path||[];var i=!1;if(this.children&&this.children.each(function(t,e){if(!0!==r.cancel&&(i=!1===e.raiseEvent(n,r)||i))return!1},!0),i)return!1;var o=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(!o)return!1;r.position.x=r.position.offsetX-o.left,r.position.y=r.position.offsetY-o.top;o=!1!==this.interactive&&this.checkPoint(r.position);return o?(r.target||(r.target=this),this.runEventAndPopEvent(n,r),this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!0,this.raiseEvent("mousemove"===n?"mouseover":"touchover",r))):!1===this.interactive||o||!this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!1,this.runEventHandle("mousemove"===n?"mouseleave":"touchleave",r)),!1===r.cancel}}},{key:"runEventAndPopEvent",value:function(t,e){!0!==e.cancel&&(e.path.push(this),this.runEventHandle(t,e))}},{key:"clearEvents",value:function(t){t=this.getEvent(t);t&&t.clear}},{key:"findParent",value:function(t){if("string"==typeof t){if(this.type==t)return this}else if(this.is(t))return this;return this.parent?this.parent.findParent(t):null}},{key:"canMove",value:function(t,e){var o;return this.__mvMonitor||(this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0},(o=this).__mvMonitor.mv=function(t){var e=o;if(e.__mvMonitor.mouseDown){e.parent.bounds=null;var n,r=t.position.offsetX-e.__mvMonitor.curposition.x,i=t.position.offsetY-e.__mvMonitor.curposition.y;return e.option.lockSide&&(n=e.bounds||e.getAbsoluteBounds(),((n=h.jmUtils.checkOutSide(e.option.lockSide,n,{x:r,y:i})).left<0&&r<0||0<n.right&&0<r)&&(r=0),(n.top<0&&i<0||0<n.bottom&&0<i)&&(i=0)),(r||i)&&(e.offset(r,i,!0,t),r&&(e.__mvMonitor.curposition.x=t.position.offsetX),i&&(e.__mvMonitor.curposition.y=t.position.offsetY)),!1}},this.__mvMonitor.mu=function(t){var e=o;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=o;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){if(!this.__mvMonitor.mouseDown)return 0==t.button||1==t.button?(this.__mvMonitor.mouseDown=!0,this.__mvMonitor.curposition.x=t.position.offsetX,this.__mvMonitor.curposition.y=t.position.offsetY,this.emit("movestart",{position:this.__mvMonitor.curposition}),!(t.cancel=!0)):void 0}),e=e||this.graph,!1!==t?(e.bind("mousemove",this.__mvMonitor.mv),e.bind("mouseup",this.__mvMonitor.mu),e.bind("mouseleave",this.__mvMonitor.ml),this.bind("mousedown",this.__mvMonitor.md),e.bind("touchmove",this.__mvMonitor.mv),e.bind("touchend",this.__mvMonitor.mu),this.bind("touchstart",this.__mvMonitor.md)):(e.unbind("mousemove",this.__mvMonitor.mv),e.unbind("mouseup",this.__mvMonitor.mu),e.unbind("mouseleave",this.__mvMonitor.ml),this.unbind("mousedown",this.__mvMonitor.md),e.unbind("touchmove",this.__mvMonitor.mv),e.unbind("touchend",this.__mvMonitor.mu),this.unbind("touchstart",this.__mvMonitor.md)),this.interactive=!0,this}}])&&v(t.prototype,e),n&&v(t,n),i}();n.jmControl=n.default=_},{"../lib/webgl/path.js":21,"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmEvents=n.default=void 0;var o=t("./jmUtils.js");function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}t=function(){function n(t,e){i(this,n),this.container=t,this.target=e||t,this.mouseHandler=new a(this,t,e),this.keyHandler=new u(this,t,e)}return s(n,[{key:"touchStart",value:function(t){if((t=t||window.event).eventName="touchstart",this.container.raiseEvent("touchstart",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchMove",value:function(t){if((t=t||window.event).eventName="touchmove",this.container.raiseEvent("touchmove",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchEnd",value:function(t){if((t=t||window.event).eventName="touchend",this.container.raiseEvent("touchend",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchCancel",value:function(t){if((t=t||window.event).eventName="touchcancel",this.container.raiseEvent("touchcancel",t),(t.target||t.srcElement)==this.target)return!1}},{key:"tap",value:function(t){if((t=t||window.event).eventName="tap",this.container.raiseEvent("tap",t),(t.target||t.srcElement)==this.target)return!1}},{key:"destroy",value:function(){this.mouseHandler.destroy(),this.keyHandler.destroy()}}]),n}();n.jmEvents=n.default=t;var a=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(t,e,n)}return s(r,[{key:"init",value:function(e,n,t){var r=this.target,i="undefined"!=typeof document?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){(t=t||window.event).eventName="mousedown",n.raiseEvent("mousedown",t)}),this.eventEvents.mousemove=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if((t=t||window.event).eventName="mousemove",(t.target||t.srcElement)==r)return n.raiseEvent("mousemove",t),t.preventDefault&&t.preventDefault(),!1}),this.eventEvents.mouseover=o.jmUtils.bindEvent(this.target,"mouseover",function(t){(t=t||window.event).eventName="mouseover",n.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){(t=t||window.event).eventName="mouseleave",n.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){(t=t||window.event).eventName="mouseout",n.raiseEvent("mouseout",t)}),i&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(i,"mouseup",function(t){if(!((t=t||window.event).eventName="mouseup")===n.raiseEvent("mouseup",t))return t.preventDefault&&t.preventDefault(),!1})),this.eventEvents.dblclick=o.jmUtils.bindEvent(this.target,"dblclick",function(t){(t=t||window.event).eventName="dblclick",n.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){(t=t||window.event).eventName="click",n.raiseEvent("click",t)}),i&&(this.eventEvents.resize=o.jmUtils.bindEvent(i,"resize",function(t){return(t=t||window.event).eventName="resize",n.raiseEvent("resize",t)})),this.eventEvents.touchstart=o.jmUtils.bindEvent(this.target,"touchstart",function(t){return t.eventName="touchstart",e.touchStart(t)},{passive:!1}),this.eventEvents.touchmove=o.jmUtils.bindEvent(this.target,"touchmove",function(t){return t.eventName="touchmove",e.touchMove(t)},{passive:!1}),i&&(this.eventEvents.touchend=o.jmUtils.bindEvent(i,"touchend",function(t){return t.eventName="touchend",e.touchEnd(t)},{passive:!1})),i&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(i,"touchcancel",function(t){return t.eventName="touchcancel",e.touchCancel(t)},{passive:!1}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}(),u=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(e,n)}return s(r,[{key:"init",value:function(n,t){function r(t){return!(t=t.srcElement||t.target)||"INPUT"!=t.tagName&&"TEXTAREA"!=t.tagName&&"ANCHOR"!=t.tagName&&"FORM"!=t.tagName&&"FILE"!=t.tagName&&"IMG"!=t.tagName&&"HIDDEN"!=t.tagName&&"RADIO"!=t.tagName&&"TEXT"!=t.tagName}var e="undefined"!=typeof document?document:null;e&&(this.eventEvents.keypress=o.jmUtils.bindEvent(e,"keypress",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keypress",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keydown=o.jmUtils.bindEvent(e,"keydown",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keydown",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keyup=o.jmUtils.bindEvent(e,"keyup",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keyup",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}()},{"./jmUtils.js":11}],4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmGradient=n.default=void 0;var d=t("./jmUtils.js"),i=t("./jmList.js");function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}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)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function r(t){if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.stops=new i.jmList,t&&"object"==s(t)){for(var e in t)"stops"!==e&&(this[e]=t[e]);var n;t.stops&&Array.isArray(t.stops)&&(n=this.stops).push.apply(n,o(t.stops))}else"string"==typeof t&&this.fromString(t)}var t,e,n;return t=r,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var r,e=t.context||t,n=t.absoluteBounds||t.getAbsoluteBounds(),i=this.x1||0,o=this.y1||0,s=this.x2,a=this.y2,u=t.getLocation(),c=0,c=(c=u.radius?2*u.radius:c)||Math.min(u.width,u.height);d.jmUtils.checkPercent(i)&&(i=d.jmUtils.percentToNumber(i)*(n.width||c)),d.jmUtils.checkPercent(s)&&(s=d.jmUtils.percentToNumber(s)*(n.width||c)),d.jmUtils.checkPercent(o)&&(o=d.jmUtils.percentToNumber(o)*(n.height||c)),d.jmUtils.checkPercent(a)&&(a=d.jmUtils.percentToNumber(a)*(n.height||c));var l=Number(i)+n.left,h=Number(o)+n.top,f=Number(s)+n.left,p=Number(a)+n.top;if("linear"===this.type?"webgl"===t.mode&&t.webglControl?(r=t.webglControl.createLinearGradient(i,o,s,a,n)).key=this.toString():e.createLinearGradient&&(r=e.createLinearGradient(l,h,f,p)):"radial"===this.type&&(u=this.r1||0,y=this.r2,d.jmUtils.checkPercent(u)&&(u=d.jmUtils.percentToNumber(u),u*=c),d.jmUtils.checkPercent(y)&&(y=d.jmUtils.percentToNumber(y),y*=c),"webgl"===t.mode&&t.webglControl?(r=t.webglControl.createRadialGradient(i,o,u,s,a,y,n)).key=this.toString():e.createRadialGradient?r=e.createRadialGradient(l,h,u,f,p,y):e.createCircularGradient&&(r=e.createCircularGradient(l,h,y))),r)return this.stops.each(function(t,e){var n=d.jmUtils.toColor(e.color);r&&r.addColorStop(e.offset,n)}),r;var y=this.stops.get(0);return y&&y.color||"#000"}},{key:"fromString",value:function(t){if(t){var e=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(e&&!(e.length<3)){this.type=e[1].toLowerCase();t=d.jmUtils.trim(e[2]).split(/\s+/);"linear"==this.type?t.length<=2?(this.x2=t[0],this.y2=t[1]||0):(this.x1=t[0],this.y1=t[1],this.x2=t[2],this.y2=t[3]):t.length<=3?(this.x2=t[0],this.y2=t[1]||0,this.r2=t[2]||0):(this.x1=t[0],this.y1=t[1],this.r1=t[2],this.x2=t[3],this.y2=t[3],this.r2=t[3]);var n=e[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi);if(n&&n.length)for(var r=0;r<n.length;r++){var i,o=d.jmUtils.trim(n[r]),s=o.lastIndexOf(" ");-1<s&&(i=Number(o.substr(s+1)),s=d.jmUtils.trim(o.substr(0,s)),!isNaN(i)&&s&&this.addStop(i,s))}}}}},{key:"toString",value:function(){var n=this.type+"-gradient(";return"linear"==this.type?n+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:n+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){n+=","+e.color+" "+e.offset}),n+")"}}])&&a(t.prototype,e),n&&a(t,n),r}();n.jmGradient=n.default=t},{"./jmList.js":6,"./jmUtils.js":11}],5:[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(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return a.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return r.jmList}}),Object.defineProperty(n,"jmProperty",{enumerable:!0,get:function(){return o.jmProperty}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return u.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return c.jmGradient}}),Object.defineProperty(n,"jmEvents",{enumerable:!0,get:function(){return l.jmEvents}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return h.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return f.jmPath}}),n.jmGraph=n.default=void 0;var a=t("./jmUtils.js"),r=t("./jmList.js"),o=t("./jmProperty.js"),u=t("./jmShadow.js"),c=t("./jmGradient.js"),l=t("./jmEvents.js"),h=t("./jmControl.js"),f=t("./jmPath.js");function p(t,e,n){return(p=g()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&m(r,n.prototype),r}).apply(null,arguments)}function s(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function y(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(n){var r=g();return function(){var t,e=b(n);return t=r?(t=b(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(s,h.jmControl);var t,e,n,o=v(s);function s(t,e,n){var r,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),"function"==typeof e&&(n=e,e={}),(e=e||{}).interactive=!0,e.isRegular=!0,(r=o.call(this,e,"jmGraph")).option=e||{},r.devicePixelRatio=1,r.util=r.utils=a.jmUtils,r.mode=e.mode||"2d","undefined"!=typeof wx&&wx.canIUse&&wx.canIUse("canvas")?("string"==typeof t&&(t=wx.createSelectorQuery().select("#"+t)),r.isWXMiniApp=!0,r.container=t):("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),t.getContext||"undefined"==typeof document?r.container=t.parentElement:(r.container=t,i=document.createElement("canvas"),t.appendChild(i),i.width=t.offsetWidth||t.clientWidth,i.height=t.offsetHeight||t.clientHeight,t=i)),r.canvas=t,"webgl"===r.mode?r.context=t.getContext(r.mode,{preserveDrawingBuffer:!0}):r.context=t.getContext(r.mode),r.textureCanvas=e.textureCanvas||null,"webgl"===r.mode&&(r.context.enable(r.context.BLEND),r.context.blendFunc(r.context.SRC_ALPHA,r.context.ONE_MINUS_SRC_ALPHA),a.jmUtils.bindEvent(t,"webglcontextlost",function(t){console.log("canvas webglcontextlost",t),r.emit("webglcontextlost",t)}),a.jmUtils.bindEvent(t,"webglcontextrestored",function(t){console.log("canvas webglcontextrestored",t),r.emit("webglcontextrestored",t)})),r.__init(n),r}return t=s,n=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return p(s,e)}}],(e=[{key:"__init",value:function(t){this.shapes=Object.assign({path:f.jmPath},this.option.shapes),this.on("beginDraw",function(){this.context.translate&&this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate&&this.context.translate(-.5,-.5)});var e="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;this.isWXMiniApp&&(e=wx.getWindowInfo().pixelRatio||1),this.devicePixelRatio=e,this.dprScaleSize=1<this.devicePixelRatio?this.devicePixelRatio:2,0<this.option.width&&(this.width=this.option.width),0<this.option.height&&(this.height=this.option.height),this.resize(),this.eventHandler=new l.jmEvents(this,this.canvas.canvas||this.canvas),this.option.autoRefresh&&this.autoRefresh(),t&&t(this)}},{key:"resize",value:function(t,e){this.canvas&&(this.__normalSize=this.__normalSize||{width:0,height:0},t=t||this.__normalSize.width||this.width,e=e||this.__normalSize.height||this.height,t&&(this.__normalSize.width=t),e&&(this.__normalSize.height=e),this.css("width",t+"px"),this.css("height",e+"px"),"2d"===this.mode?(this.canvas.height=e*this.dprScaleSize,this.canvas.width=t*this.dprScaleSize,1!==this.dprScaleSize&&this.context.scale&&this.context.scale(this.dprScaleSize,this.dprScaleSize)):(this.canvas.width=t,this.canvas.height=e),this.context.viewport&&this.context.viewport(0,0,t,e),this.needUpdate=!0)}},{key:"width",get:function(){return this.__normalSize&&this.__normalSize.width?this.__normalSize.width:this.canvas?this.canvas.width:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(t),t}},{key:"height",get:function(){return this.__normalSize&&this.__normalSize.height?this.__normalSize.height:this.canvas?this.canvas.height:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(0,t),t}},{key:"getPosition",value:function(){var t=this.isWXMiniApp?{left:0,top:0}:a.jmUtils.getElementPosition(this.canvas.canvas||this.canvas);return t.width=this.width,t.height=this.height,t.right=t.left+t.width,t.bottom=t.top+t.height,t}},{key:"registerShape",value:function(t,e){this.shapes[t]=e}},{key:"createShape",value:function(t,e){if(t="string"==typeof t?this.shapes[t]:t)return(e=e||{}).graph=this,new t(e)}},{key:"createShadow",value:function(t,e,n,r){return new u.jmShadow(t,e,n,r)}},{key:"createLinearGradient",value:function(t,e,n,r){return new c.jmGradient({type:"linear",x1:t,y1:e,x2:n,y2:r,stops:4<arguments.length&&void 0!==arguments[4]?arguments[4]:[]})}},{key:"createRadialGradient",value:function(t,e,n,r,i,o){return new c.jmGradient({type:"radial",x1:t,y1:e,r1:n,x2:r,y2:i,r2:o,stops:6<arguments.length&&void 0!==arguments[6]?arguments[6]:[]})}},{key:"refresh",value:function(){this.redraw()}},{key:"redraw",value:function(t,e){this.clear(t||this.width,e||this.height),this.paint()}},{key:"clear",value:function(t,e){t&&e||(t=this.width,e=this.height),this.context.clearRect?(this.style&&this.style.fill&&(this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}],this.style.close=!0),this.context.clearRect(0,0,t,e)):"webgl"===this.mode&&this.context.clear&&(e=this.style&&this.style.fill?this.utils.hexToRGBA(this.style.fill):{r:0,g:0,b:0,a:0},this.context.clearColor(e.r,e.g,e.b,e.a),this.context.clear(this.context.COLOR_BUFFER_BIT))}},{key:"css",value:function(t,e){if(this.canvas&&this.canvas.style)return void 0!==e&&(this.canvas.style[t]=e),this.canvas.style[t]}},{key:"createPath",value:function(t,e){return this.createShape("path",y({points:t,style:e},2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))}},{key:"createLine",value:function(t,e,n){return this.createShape("line",{start:t,end:e,style:n})}},{key:"zoomOut",value:function(){this.scale(.9,.9)}},{key:"zoomIn",value:function(){this.scale(1.1,1.1)}},{key:"zoomActual",value:function(){this.scaleSize?this.scale(1/this.scaleSize.x,1/this.scaleSize.y):this.scale(1,1)}},{key:"scale",value:function(t,e){this.normalSize||(this.normalSize={width:this.canvas.width,height:this.canvas.height}),this.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:1,y:1},this.canvas.style&&(this.canvas.style.transform="scale(".concat(this.scaleSize.x,", ").concat(this.scaleSize.y,")"))}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(n){if(!this.___isAutoRefreshing){var r=this;this.___isAutoRefreshing=!0;var i=Date.now();return r.__requestAnimationFrameFunHandler&&this.cancelAnimationFrame(r.__requestAnimationFrameFunHandler),r.__requestAnimationFrameFunHandler=this.requestAnimationFrame(function t(){var e;r.destroyed?r.___isAutoRefreshing=!1:(r.needUpdate&&r.redraw(),e=Date.now()-i,r.emit("update",e),r.__requestAnimationFrameFunHandler&&r.cancelAnimationFrame(r.__requestAnimationFrameFunHandler),r.__requestAnimationFrameFunHandler=r.requestAnimationFrame(t),n&&n())}),this}}},{key:"destroy",value:function(){this.eventHandler.destroy(),this.destroyed=!0}}])&&d(t.prototype,e),n&&d(t,n),s}();n.jmGraph=n.default=t},{"./jmControl.js":2,"./jmEvents.js":3,"./jmGradient.js":4,"./jmList.js":6,"./jmPath.js":8,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],6:[function(t,e,n){"use strict";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)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function l(t){var n="function"==typeof Map?new Map:void 0;return function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return r(t,arguments,p(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),f(e,t)}(t)}function r(t,e,n){return(r=h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&f(r,n.prototype),r}).apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmList=n.default=void 0;var i=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(a,l(Array));var n,r,t,e,i,s=(n=a,r=h(),function(){var t,e=p(n);return c(this,r?(t=p(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function a(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var e=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(r&&r.length&&Array.isArray(r[0])){for(var o=0;o<r[0].length;o++)e.push(r[0][o]);t=s.call.apply(s,[this].concat(e))}else t=s.call(this);return t.option={},t.type="jmList",c(t)}return t=a,(e=[{key:"add",value:function(t){if(t&&Array.isArray(t)){for(var e=0;e<t.length;e++)this.includes(t[e])||this.push(t[e]);return t}return"object"==o(t)&&this.includes(t)||this.push(t),t}},{key:"remove",value:function(t){for(var e=this.length-1;0<=e;e--)this[e]==t&&this.removeAt(e)}},{key:"removeAt",value:function(t){var e;this.length>t&&(e=this[t],this.splice(t,1),this.option.removeHandler&&this.option.removeHandler.call(this,e,t))}},{key:"contain",value:function(t){return this.includes(t)}},{key:"get",value:function(t){return"function"==typeof t?this.find(t):this[t]}},{key:"each",value:function(t,e){if(t&&"function"==typeof t)if(e){for(var n=this.length-1;0<=n;n--)if(!1===t.call(this,n,this[n]))break}else for(var r=this.length,i=0;i<r;i++)if(!1===t.call(this,i,this[i]))break}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,n=this.length,r=0;r<n;r++)t(this[r])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&u(t.prototype,e),i&&u(t,i),a}();n.jmList=n.default=i},{}],7:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmObject=n.default=void 0;var i=t("./jmList.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=0,t=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t&&"jmGraph"==t.type&&(this.graph=t),this.id=++s}var t,n,r;return t=e,(n=[{key:"is",value:function(t){return"string"==typeof t?this.type==t:this instanceof t}},{key:"animate",value:function(){if(this.is("jmGraph")){if(1<arguments.length){this.animateHandles||(this.animateHandles=new i.jmList);var t=[];if(2<arguments.length)for(var e=2;e<arguments.length;e++)t.push(e<0||arguments.length<=e?void 0:arguments[e]);this.animateHandles.add({millisec:(arguments.length<=1?void 0:arguments[1])||20,handle:arguments.length<=0?void 0:arguments[0],params:t})}var o;this.animateHandles&&0<this.animateHandles.count()&&((o=this).dispatcher=setTimeout(function(n){n=n||o;var t,r=[],i=Date.now();for(t in n.animateHandles.each(function(t,e){try{e&&e.handle&&(!e.times||i-e.times>=e.millisec)&&(!1===e.handle.apply(n,e.params)&&r.push(e),e.times=i)}catch(t){e&&r.push(e)}}),r)n.animateHandles.remove(r[t]);n.animate()},10,this))}else{var n=this.graph;n&&n.animate.apply(n,arguments)}}}])&&o(t.prototype,n),r&&o(t,r),e}();n.jmObject=n.default=t},{"./jmList.js":6}],8:[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(n,"__esModule",{value:!0}),n.jmPath=n.default=void 0;var o=t("./jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmControl);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).points=t&&t.points?t.points:[],e}return t=i,(e=[{key:"points",get:function(){return this.property("points")},set:function(t){return this.needUpdate=!0,this.property("points",t)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPath=n.default=t},{"./jmControl.js":2}],9:[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(n,"__esModule",{value:!0}),n.jmProperty=n.default=void 0;var o=t("./jmUtils.js"),s=t("./jmObject.js");function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=l(n);return t=r?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=Symbol("properties"),t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,s.jmObject);var t,e,n,r=c(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this))[h]={},t&&t.mode&&(e.mode=t.mode),e}return t=i,(e=[{key:"property",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e){var r=this[h],i=e[0];if(1<e.length){var o=e[1],o={oldValue:r[i],newValue:o};return r[i]=e[1],this.emit&&this.emit("propertyChange",i,o),e[1]}if(i)return r[i]}}},{key:"needUpdate",get:function(){return this.property("needUpdate")},set:function(t){this.property("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){return this.property("graph")||this.property("graph",this.findParent("jmGraph"))},set:function(t){return this.property("graph",t)}},{key:"mode",get:function(){var t=this.property("mode");return t||(this.is("jmGraph")?this.property("mode"):this.graph.mode)},set:function(t){return this.property("mode",t)}},{key:"requestAnimationFrame",value:function(t){return o.jmUtils.requestAnimationFrame(t,this.graph?this.graph.canvas:null)}},{key:"cancelAnimationFrame",value:function(t){return o.jmUtils.cancelAnimationFrame(t,this.graph?this.graph.canvas:null)}}])&&a(t.prototype,e),n&&a(t,n),i}();n.jmProperty=n.default=t},{"./jmObject.js":7,"./jmUtils.js":11}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmShadow=n.default=void 0;var r=t("./jmUtils.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.jmShadow=n.default=function(){function i(t,e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),"string"!=typeof t||e||n||r?(this.x=t,this.y=e,this.blur=n,this.color=r):this.fromString(t)}var t,e,n;return t=i,(e=[{key:"fromString",value:function(t){if(t){t=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i);return t&&(this.x=t[1]||0,this.y=t[2]||0,t[3]&&(t[3]=r.jmUtils.trim(t[3],", "),0===t[3].indexOf("#")||/^rgb/i.test(t[3])?this.color=t[3]:this.blur=r.jmUtils.trim(t[3],", ")),t[4]&&(this.color=r.jmUtils.trim(t[4],", "))),this}}},{key:"toString",value:function(){var t=this.x+","+this.y;return this.blur&&(t+=","+this.blur),this.color&&(t+=","+this.color),t}}])&&o(t.prototype,e),n&&o(t,n),i}()},{"./jmUtils.js":11}],11:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmUtils=n.default=void 0;var l=t("./jmList.js");function h(t){return(h="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 i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"rgba(0,0,0,0)"},t=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"clone",value:function(t,e){var n,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;if("function"==typeof i){var s=i(t,r,o);if(s)return s}if("boolean"==typeof e&&(r=e,e=void 0),100<++o)return e;if(t&&"object"===h(t)){if(e=e||{},this.isType(t,l.jmList))return new l.jmList(t);if(Array.isArray(t)){if(r){for(var a=[],u=0;u<t.length;u++)a.push(this.clone(t[u],e[u],r,i,o));return a}return t.slice(0)}for(var c in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==c&&((n=t[c])&&(n.tagName||n.getContext)?e[c]=n:"object"!==h(e[c])&&void 0!==e[c]||(e[c]=this.clone(n,e[c],r,i,o)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,n,r){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var i=e.split(" "),o=0;o<i.length;o++)this.bindEvent(t,i[o],n,r);return t.attachEvent?t.attachEvent("on"+e,n,r):t.addEventListener&&t.addEventListener(e,n,r),{name:e,target:t,fun:n}}},{key:"removeEvent",value:function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?(t.detachEvent("on"+e,n),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(!t)return e;if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x?e.left+=t.x:t.x&&(e.top+=t.y);return e}},{key:"getEventPosition",value:function(t,e){var n=(t=t||event).isWXMiniApp,r=!1,i=t.changedTouches||t.targetTouches||t.touches,o=t.target||t.srcElement;i&&i.length&&((t=i[0]).target||(t.target=o),r=!0);var s=t.pageX||t.x;void 0===s&&(s=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var a=t.pageY||t.y;void 0===a&&(a=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var u=t.offsetX,c=t.offsetY;return void 0===u&&void 0===c&&(c=n?(u=t.x,t.y):(u=s-(o=this.getElementPosition(o)).left,a-o.top)),e&&(e.x&&(u/=e.x),e.y&&(c/=e.y)),{pageX:s,pageY:a,clientX:t.clientX,clientY:t.clientY,offsetX:u,offsetY:c,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:u,y:c,isTouch:r,touches:i,isWXMiniApp:n}}},{key:"isType",value:function(t,e){return!(!t||"object"!==h(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,n){n=n||1,n/=2;var r=e.length;if(!e||0==r)return 0;if(1==r)return Math.abs(e[0].x-t.x)<=n&&Math.abs(e[0].y-t.y)<=n?1:0;if(2==r)return this.pointOnLine(t,e[0],e[1],n);for(var i=0;i<r;i++)if(Math.abs(e[i].x-t.x)<=n&&Math.abs(e[i].y-t.y)<=n)return 1;return this.rayCasting(t,e,n)}},{key:"pointOnLine",value:function(t,e,n,r){var i=Math.min(e.x,n.x),o=Math.max(e.x,n.x),s=Math.min(e.y,n.y),a=Math.max(e.y,n.y);if(i-t.x>r||t.x-o>r)return 0;if(s-t.y>r||t.y-a>r)return 0;if(e.x==n.x)return Math.abs(e.x-t.x)<=r&&(t.y-e.y)*(t.y-n.y)<=0?1:0;if(e.y==n.y)return Math.abs(e.y-t.y)<=r&&(t.x-e.x)*(t.x-n.x)<=0?1:0;if(Math.abs(e.x-t.x)<r&&Math.abs(e.y-t.y)<r)return 1;if(Math.abs(n.x-t.x)<r&&Math.abs(n.y-t.y)<r)return 1;if(t.y==e.y||t.y==n.y)return 0;n=(n.x-e.x)/(n.y-e.y)*(t.y-e.y),n=(t.y-e.y)/Math.sqrt(n*n+(t.y-e.y)*(t.y-e.y))*(t.x-e.x-n);return Math.abs(n)<=r?1:0}},{key:"rayCasting",value:function(t,e,n){for(var r=e.length,i=!1,o=t.y,s=t.x,a=0,u=r-1;a<r;u=a++){var c=e[a].y,l=e[u].y,h=e[a].x,f=e[u].x;o<c!=o<l&&s<(f-h)*(o-c)/(l-c)+h&&(i=!i)}return i?2:0}},{key:"checkOutSide",value:function(t,e,n){var r={left:0,right:0,top:0,bottom:0};return n.x<0?r.left=e.left+n.x-t.left:0<n.x&&(r.right=e.right+n.x-t.right),n.y<0?r.top=e.top+n.y-t.top:0<n.y&&(r.bottom=e.bottom+n.y-t.bottom),r}},{key:"rotatePoints",value:function(t,e,n){if(!n||!t)return t;var r=Math.cos(n),i=Math.sin(n);if(Array.isArray(t))for(var o,s,a=0;a<t.length;a++)t[a]&&(o=t[a].x-e.x,s=t[a].y-e.y,t[a].x=o*r-s*i+e.x,t[a].y=o*i+s*r+e.y);else{var u=t.x-e.x,n=t.y-e.y;t.x=u*r-n*i+e.x,t.y=u*i+n*r+e.y}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[0];if(n===e||0<=e.indexOf(n))return t=t.substring(1),this.trimStart(t,e)}return t}},{key:"trimEnd",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[t.length-1];if(n===e||0<=e.indexOf(n))return t=t.substring(0,t.length-1),this.trimStart(t,e)}return t}},{key:"trim",value:function(t,e){return this.trimEnd(this.trimStart(t,e),e)}},{key:"checkPercent",value:function(t){if("string"==typeof t&&"%"==(t=this.trim(t))[t.length-1])return t}},{key:"percentToNumber",value:function(t){var e;return"string"!=typeof t||(e=this.checkPercent(t))&&(t=this.trim(e,"% "),t/=100),t}},{key:"hexToNumber",value:function(t){if("string"!=typeof t)return t;for(var e=0,n=(t=t.toLowerCase()).length,r=0;r<n;r++){var i="0123456789abcdef".indexOf(t[r]);if(0!=i){for(var o=1;o<n-r;o++)i*=16;e+=i}}return e}},{key:"numberToHex",value:function(t){for(var e="";0<t;){e="0123456789abcdef"[t%16]+e;t=Math.floor(t/16)}return e}},{key:"hexToRGBA",value:function(t){if("string"!=typeof t)return t;if(t=this.trim(t),this.__hexToRGBA_Cache=this.__hexToRGBA_Cache||{},this.__hexToRGBA_Cache[t])return this.__hexToRGBA_Cache[t];var e,n=t;return"#"==(n=o[n]?o[n]:n)[0]&&(e={a:1},8<=n.length?(e.a=n.substr(1,2),e.g=n.substr(5,2),e.b=n.substr(7,2),e.r=n.substr(3,2),e.a=Number((this.hexToNumber(e.a)/255).toFixed(4)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),n=e):7===n.length||4===n.length?(4===n.length?(e.g=n.substr(2,1),e.g=e.g+e.g,e.b=n.substr(3,1),e.b=e.b+e.b,e.r=n.substr(1,1),e.r=e.r+e.r):(e.g=n.substr(3,2),e.b=n.substr(5,2),e.r=n.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),n=e):5===n.length&&(e.a=n.substr(1,1),e.g=n.substr(3,1),e.b=n.substr(4,1),e.r=n.substr(2,1),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e.a=Number((this.hexToNumber(e.a)/255).toFixed(4)),n=e)),"string"!=typeof n||(e=n.match(/rgb(a)?\s*\(\s*([\d\.]+)\s*,\s*([\d\.]+)\s*,\s*([\d\.]+)\s*(,\s*[\d\.]+)?\s*\)/i))&&6===e.length&&(n={r:Number(e[2]),g:Number(e[3]),b:Number(e[4]),a:Number(this.trimStart(e[5]||"1",","))}),this.__hexToRGBA_Cache[t]=n}},{key:"rgbToDecimal",value:function(t){return(t=this.clone(t)).r=this.byteToDecimal(t.r),t.g=this.byteToDecimal(t.g),t.b=this.byteToDecimal(t.b),t}},{key:"byteToDecimal",value:function(t){return t/255}},{key:"toColor",value:function(t,e,n,r){if("string"==typeof t&&t){if("#"===(t=this.trim(t))[0]&&(4===t.length||7===t.length))return t;var i=this.hexToRGBA(t);if("string"==typeof i)return i;t=void 0!==i.r?i.r:t,e=void 0!==i.g?i.g:e,n=void 0!==i.b?i.b:n,r=void 0!==i.a?i.a:r}return t&&"object"===h(t)&&(e=t.g,n=t.b,r=t.a||1,t=t.r),void 0!==t&&void 0!==e&&void 0!==n?void 0!==r?"rgba("+t+","+e+","+n+","+r+")":"rgb("+t+","+e+","+n+")":t}},{key:"requestAnimationFrame",value:function(t,e){return(e&&e.requestAnimationFrame?e.requestAnimationFrame:"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:setTimeout)(t,20)}},{key:"cancelAnimationFrame",value:function(t,e){return(e&&e.cancelAnimationFrame?e.cancelAnimationFrame:"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame:clearTimeout)(t)}}],(n=null)&&i(e.prototype,n),r&&i(e,r),t}();n.jmUtils=n.default=t},{"./jmList.js":6}],12:[function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,i,o,s,a,u=e&&e.length,c=u?e[0]*n:t.length,l=d(t,0,c,n,!0),h=[];if(!l||l.next===l.prev)return h;if(u&&(l=function(t,e,n,r){var i,o,s,a,u=[];for(i=0,o=e.length;i<o;i++)s=e[i]*r,a=i<o-1?e[i+1]*r:t.length,(a=d(t,s,a,r,!1))===a.next&&(a.steiner=!0),u.push(function(t){var e=t,n=t;for(;(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next,e!==t;);return n}(a));for(u.sort(g),i=0;i<u.length;i++)n=function(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&s<a&&(s=a,n=r.x<r.next.x?r:r.next,a===i))return n}}while(r=r.next,r!==e);if(!n)return null;var u,c=n,l=n.x,h=n.y,f=1/0;r=n;for(;i>=r.x&&r.x>=l&&i!==r.x&&w(o<h?i:s,o,l,h,o<h?s:i,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(i-r.x),b(r,t)&&(u<f||u===f&&(r.x>n.x||r.x===n.x&&function(t,e){return _(t.prev,t,e.prev)<0&&_(e.next,t,t.next)<0}(n,r)))&&(n=r,f=u)),r=r.next,r!==c;);return n}(t,e);if(!n)return e;t=x(n,t);return m(t,t.next),m(n,n.next)}(u[i],n);return n}(t,e,l,n)),t.length>80*n){for(var f=r=t[0],p=i=t[1],y=n;y<c;y+=n)(o=t[y])<f&&(f=o),(s=t[y+1])<p&&(p=s),r<o&&(r=o),i<s&&(i=s);a=0!==(a=Math.max(r-f,i-p))?32767/a:0}return v(l,h,n,f,p,a,0),h}function d(t,e,n,r,i){var o,s;if(i===0<P(t,e,n,r))for(o=e;o<n;o+=r)s=a(o,t[o],t[o+1],s);else for(o=n-r;e<=o;o-=r)s=a(o,t[o],t[o+1],s);return s&&l(s,s.next)&&(f(s),s=s.next),s}function m(t,e){if(!t)return t;e=e||t;var n,r=t;do{if(n=!1,r.steiner||!l(r,r.next)&&0!==_(r.prev,r,r.next))r=r.next;else{if(f(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function v(t,e,n,r,i,o,s){if(t){!s&&o&&function(t,e,n,r){var i=t;for(;0===i.z&&(i.z=j(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==t;);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,s,a,u,c=1;do{for(n=t,o=t=null,s=0;n;){for(s++,r=n,e=a=0;e<c&&(a++,r=r.nextZ);e++);for(u=c;0<a||0<u&&r;)0!==a&&(0===u||!r||n.z<=r.z)?(n=(i=n).nextZ,a--):(r=(i=r).nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}}while(o.nextZ=null,c*=2,1<s)}(i)}(t,r,i,o);for(var a,u,c=t;t.prev!==t.next;)if(a=t.prev,u=t.next,o?function(t,e,n,r){var i=t.prev,o=t,s=t.next;if(0<=_(i,o,s))return!1;var a=i.x,u=o.x,c=s.x,l=i.y,h=o.y,f=s.y,p=a<u?a<c?a:c:u<c?u:c,y=l<h?l<f?l:f:h<f?h:f,d=u<a?c<a?a:c:c<u?u:c,m=h<l?f<l?l:f:f<h?h:f,v=j(p,y,e,n,r),g=j(d,m,e,n,r),b=t.prevZ,x=t.nextZ;for(;b&&b.z>=v&&x&&x.z<=g;){if(b.x>=p&&b.x<=d&&b.y>=y&&b.y<=m&&b!==i&&b!==s&&w(a,l,u,h,c,f,b.x,b.y)&&0<=_(b.prev,b,b.next))return!1;if(b=b.prevZ,x.x>=p&&x.x<=d&&x.y>=y&&x.y<=m&&x!==i&&x!==s&&w(a,l,u,h,c,f,x.x,x.y)&&0<=_(x.prev,x,x.next))return!1;x=x.nextZ}for(;b&&b.z>=v;){if(b.x>=p&&b.x<=d&&b.y>=y&&b.y<=m&&b!==i&&b!==s&&w(a,l,u,h,c,f,b.x,b.y)&&0<=_(b.prev,b,b.next))return!1;b=b.prevZ}for(;x&&x.z<=g;){if(x.x>=p&&x.x<=d&&x.y>=y&&x.y<=m&&x!==i&&x!==s&&w(a,l,u,h,c,f,x.x,x.y)&&0<=_(x.prev,x,x.next))return!1;x=x.nextZ}return!0}(t,r,i,o):function(t){var e=t.prev,n=t,t=t.next;if(0<=_(e,n,t))return!1;var r=e.x,i=n.x,o=t.x,s=e.y,a=n.y,u=t.y,c=r<i?r<o?r:o:i<o?i:o,l=s<a?s<u?s:u:a<u?a:u,h=i<r?o<r?r:o:o<i?i:o,f=a<s?u<s?s:u:u<a?a:u,p=t.next;for(;p!==e;){if(p.x>=c&&p.x<=h&&p.y>=l&&p.y<=f&&w(r,s,i,a,o,u,p.x,p.y)&&0<=_(p.prev,p,p.next))return!1;p=p.next}return!0}(t))e.push(a.i/n|0),e.push(t.i/n|0),e.push(u.i/n|0),f(t),t=u.next,c=u.next;else if((t=u)===c){s?1===s?v(t=function(t,e,n){var r=t;do{var i=r.prev,o=r.next.next}while(!l(i,o)&&h(i,r,r.next,o)&&b(i,o)&&b(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),f(r),f(r.next),r=t=o),r=r.next,r!==t);return m(r)}(m(t),e,n),e,n,r,i,o,2):2===s&&function(t,e,n,r,i,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&h(n,n.next,t,e))return!0}while(n=n.next,n!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;for(;n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==t;);return r}(t,e)&&(_(t.prev,t,e.prev)||_(t,e.prev,e))||l(t,e)&&0<_(t.prev,t,t.next)&&0<_(e.prev,e,e.next))}(s,a)){var u=x(s,a);return s=m(s,s.next),u=m(u,u.next),v(s,e,n,r,i,o,0),v(u,e,n,r,i,o,0)}a=a.next}}while(s=s.next,s!==t)}(t,e,n,r,i,o):v(m(t),e,n,r,i,o,1);break}}}function g(t,e){return t.x-e.x}function j(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function w(t,e,n,r,i,o,s,a){return(t-s)*(o-a)<=(i-s)*(e-a)&&(n-s)*(e-a)<=(t-s)*(r-a)&&(i-s)*(r-a)<=(n-s)*(o-a)}function _(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function l(t,e){return t.x===e.x&&t.y===e.y}function h(t,e,n,r){var i=c(_(t,e,n)),o=c(_(t,e,r)),s=c(_(n,r,t)),a=c(_(n,r,e));return i!==o&&s!==a||(0===i&&u(t,n,e)||(0===o&&u(t,r,e)||(0===s&&u(n,t,r)||!(0!==a||!u(n,e,r)))))}function u(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function c(t){return 0<t?1:t<0?-1:0}function b(t,e){return _(t.prev,t,t.next)<0?0<=_(t,e,t.next)&&0<=_(t,t.prev,e):_(t,e,t.prev)<0||_(t,t.next,e)<0}function x(t,e){var n=new s(t.i,t.x,t.y),r=new s(e.i,e.x,e.y),i=t.next,o=e.prev;return(t.next=e).prev=t,(n.next=i).prev=n,(r.next=n).prev=r,(o.next=r).prev=o,r}function a(t,e,n,r){n=new s(t,e,n);return r?(n.next=r.next,(n.prev=r).next.prev=n,r.next=n):(n.prev=n).next=n,n}function f(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function s(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,r){for(var i=0,o=e,s=n-r;o<n;o+=r)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,(n.default=r).deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(P(t,0,o,n));if(i)for(var a=0,u=e.length;a<u;a++){var c=e[a]*n,l=a<u-1?e[a+1]*n:t.length;s-=Math.abs(P(t,c,l,n))}for(var h=0,a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,y=r[a+2]*n;h+=Math.abs((t[f]-t[y])*(t[1+p]-t[1+f])-(t[f]-t[p])*(t[1+y]-t[1+f]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[i][o][s]);0<i&&(r+=t[i-1].length,n.holes.push(r))}return n}},{}],13:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=r(t("../earcut.js")),a=r(t("./gradient.js")),s=t("./core/program.js"),o=t("./core/buffer.js"),u=t("./core/texture.js");function r(t){return t&&t.__esModule?t:{default:t}}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function l(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?c(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function h(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var m="\n attribute vec4 a_position;\n attribute vec4 a_color;\n attribute vec2 a_text_coord;\n uniform vec2 a_center_point; // 当前canvas的中心位置\n uniform float a_point_size; // 点的大小\n uniform int a_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n varying float v_type;\n\n ".concat("\n vec4 translatePosition(vec4 point, float x, float y) {\n point.x = (point.x-x)/x;\n point.y = (y-point.y)/y;\n return point;\n }","\n\n void main() {\n gl_PointSize = a_point_size == 0.0? 1.0 : a_point_size;\n v_type = float(a_type);\n vec4 pos = translatePosition(a_position, a_center_point.x, a_center_point.y);\n gl_Position = pos;\n v_color = a_color;\n if(a_type == 2) {\n v_text_coord = a_text_coord;\n }\n }\n"),v="\n precision mediump float;\n uniform sampler2D u_sample;\n uniform vec4 v_texture_bounds; // 纹理的左上坐标和大小 x,y,z,w\n uniform vec4 v_single_color;\n varying float v_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n\n ".concat("\n vec2 translateTexturePosition(in vec2 point, vec4 bounds) {\n point.x = (point.x-bounds.x)/bounds.z; // 离左上角位置的X长比上纹理宽 0-1\n point.y = 1.0-(point.y-bounds.y)/bounds.w; // 离左上角位置的Y长比上高,因为纹理坐标是左下角起,所以要用1-\n return point;\n }","\n\n void main() {\n // 如果是fill,则直接填充颜色\n if(v_type == 1.0) {\n gl_FragColor = v_single_color;\n }\n // 渐变色\n else if(v_type == 3.0) {\n gl_FragColor = v_color;\n }\n else if(v_type == 2.0) {\n vec2 pos = translateTexturePosition(v_text_coord, v_texture_bounds);\n gl_FragColor = texture2D(u_sample, pos);\n }\n else {\n float r = distance(gl_PointCoord, vec2(0.5, 0.5));\n //根据距离设置片元\n if(r <= 0.5){\n // 方形区域片元距离几何中心半径小于0.5,像素颜色设置红色\n gl_FragColor = v_single_color;\n }else {\n // 方形区域距离几何中心半径不小于0.5的片元剪裁舍弃掉:\n discard;\n }\n }\n }\n"),t=function(){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.graph=t,this.option=e||{},this.style={globalAlpha:1},this.stateStack=[],this.transformMatrix=[1,0,0,1,0,0]}var t,e,r;return t=n,(e=[{key:"context",get:function(){if(this.graph)return this.graph.context}},{key:"save",value:function(){this.stateStack.push({transformMatrix:h(this.transformMatrix),style:l({},this.style)})}},{key:"restore",value:function(){var t;0<this.stateStack.length&&(t=this.stateStack.pop(),this.transformMatrix=t.transformMatrix,this.style=t.style)}},{key:"translate",value:function(t,e){this.transformMatrix[4]+=t*this.transformMatrix[0]+e*this.transformMatrix[2],this.transformMatrix[5]+=t*this.transformMatrix[1]+e*this.transformMatrix[3]}},{key:"scale",value:function(t,e){this.transformMatrix[0]*=t,this.transformMatrix[1]*=t,this.transformMatrix[2]*=e,this.transformMatrix[3]*=e}},{key:"rotate",value:function(t){var e=Math.cos(t),n=Math.sin(t),r=f(this.transformMatrix,6),i=r[0],o=r[1],s=r[2],t=r[3];r[4],r[5];this.transformMatrix[0]=i*e-o*n,this.transformMatrix[1]=i*n+o*e,this.transformMatrix[2]=s*e-t*n,this.transformMatrix[3]=s*n+t*e}},{key:"transform",value:function(t,e,n,r,i,o){var s=f(this.transformMatrix,6),a=s[0],u=s[1],c=s[2],l=s[3],h=s[4],s=s[5];this.transformMatrix[0]=t*a+e*c,this.transformMatrix[1]=t*u+e*l,this.transformMatrix[2]=n*a+r*c,this.transformMatrix[3]=n*u+r*l,this.transformMatrix[4]=i*a+o*c+h,this.transformMatrix[5]=i*u+o*l+s}},{key:"applyTransform",value:function(t){var e=f(this.transformMatrix,6),n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],e=e[5];return{x:n*t.x+i*t.y+s,y:r*t.x+o*t.y+e}}},{key:"textureCanvas",get:function(){var t=this.graph.textureCanvas;if(!t){if("undefined"==typeof document)return null;t=this.graph.textureCanvas=document.createElement("canvas")}return t}},{key:"textureContext",get:function(){return this.textureCanvas.ctx||(this.textureCanvas.ctx=this.textureCanvas.getContext("2d",{willReadFrequently:!0}))}},{key:"program",get:function(){return this.graph.context.pathProgram||(this.graph.context.pathProgram=this.createProgram(m,v))}},{key:"setStyle",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.style;"string"==typeof e&&((t={})[e]=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",e=t),this.style=l(l({},this.style),e)}},{key:"convertColor",value:function(t){return this.isGradient(t)?t:("string"==typeof t&&(t=this.graph.utils.hexToRGBA(t)),this.graph.utils.rgbToDecimal(t))}},{key:"setTextureStyle",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof t)-1<["fillStyle","strokeStyle","shadowColor"].indexOf(t)&&(e=this.graph.utils.toColor(e)),this.textureContext[t]=e;else for(var n in t)"constructor"!==n&&this.setTextureStyle(n,t[n])}},{key:"createProgram",value:function(t,e){return this.context.lineWidth(1),(0,s.createProgram)(this.context,t,e)}},{key:"useProgram",value:function(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.program).program||t;return this.context.__curent_program===t?t:((0,s.useProgram)(this.context,t.program||t),this.context.__curent_program=t)}},{key:"getAttribLocation",value:function(t){return this.context.getAttribLocation(this.program.program,t)}},{key:"getUniformLocation",value:function(t){return this.context.getUniformLocation(this.program.program,t)}},{key:"writeVertexAttrib",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:2,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:this.context.FLOAT;return t.attr=e,(0,s.writeVertexAttrib)(this.context,t,e,n,r,i,o)}},{key:"disableVertexAttribArray",value:function(t){try{return t?(0,s.disableVertexAttribArray)(this.context,t):t}catch(t){console.error(t)}return t}},{key:"createFloat32Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return l({data:t},(0,o.createFloat32Buffer)(this.context,t,e,n))}},{key:"createUint16Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return l({data:t},(0,o.createUint16Buffer)(this.context,t,e,n))}},{key:"deleteBuffer",value:function(e){try{if(!e)return;var t=e.buffer||e;if(t)return(0,o.deleteBuffer)(this.context,t)}catch(t){console.log(e),console.error(t)}return e}},{key:"create2DTexture",value:function(){return(0,u.create2DTexture)(this.context)}},{key:"createImgTexture",value:function(t){return(0,u.createImgTexture)(this.context,t)}},{key:"createDataTexture",value:function(t){return(0,u.createDataTexture)(this.context,t)}},{key:"deleteTexture",value:function(t){try{return(0,u.deleteTexture)(this.context,t.texture||t)}catch(t){console.error(t)}return t}},{key:"earCutPoints",value:function(t){t=this.pointsToArray(t);return(0,i.default)(t)}},{key:"earCutPointsToTriangles",value:function(t){this.earCutCache=this.earCutCache||(this.earCutCache={});var e=JSON.stringify(t);if(this.earCutCache[e])return this.earCutCache[e];for(var n=this.earCutPoints(t),r=[],i=0;i<n.length;i+=3){var o=t[n[i]],s=t[n[i+1]],a=t[n[i+2]];r.push([o,s,a])}return this.earCutCache[e]=r}},{key:"pointsToArray",value:function(t){var e;return(e=[]).concat.apply(e,h(t.map(function(t){return[t.x,t.y]})))}},{key:"arrayToPoints",value:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push({x:t[n],y:t[n+1]});return e}},{key:"createLinearGradient",value:function(t,e,n,r,i){return new a.default("linear",{x1:t,y1:e,x2:n,y2:r,bounds:i,control:this})}},{key:"createRadialGradient",value:function(t,e,n,r,i,o,s){return new a.default("radial",{x1:t,y1:e,r1:n,x2:r,y2:i,r2:o,bounds:s,control:this})}},{key:"isGradient",value:function(t){return t&&t instanceof a.default}},{key:"testSize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style;this.textureContext.save&&this.textureContext.save(),(e.font||e.fontSize)&&(this.textureContext.font=e.font||e.fontSize+"px "+e.fontFamily);t=this.textureContext.measureText?this.textureContext.measureText(t):{width:15};return this.textureContext.restore&&this.textureContext.restore(),t.height=this.style.fontSize||15,t}},{key:"toFillTexture",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=this.textureCanvas;if(!r)return t;if(r.width=e.width,r.height=e.height,!r.width||!r.height)return t;if(this.textureContext.clearRect(0,0,r.width,r.height),this.textureContext.fillStyle=t,this.textureContext.beginPath(),n&&n.length||((n=[]).push({x:e.left,y:e.top}),n.push({x:e.left+e.width,y:e.top}),n.push({x:e.left+e.width,y:e.top+e.height}),n.push({x:e.left,y:e.top+e.height}),n.push({x:e.left,y:e.top})),n&&n.length){var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=p(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(n);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.m?this.textureContext.moveTo(s.x-e.left,s.y-e.top):this.textureContext.lineTo(s.x-e.left,s.y-e.top)}}catch(t){o.e(t)}finally{o.f()}}else this.textureContext.moveTo(0,0),this.textureContext.lineTo(e.width,0),this.textureContext.lineTo(e.width,e.height),this.textureContext.lineTo(0,e.height),this.textureContext.lineTo(0,0);return this.textureContext.closePath(),this.textureContext.fill(),{data:this.textureContext.getImageData(0,0,r.width,r.height),points:n}}}])&&d(t.prototype,e),r&&d(t,r),n}();n.default=t},{"../earcut.js":12,"./core/buffer.js":14,"./core/program.js":17,"./core/texture.js":19,"./gradient.js":20}],14:[function(t,e,n){"use strict";function i(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,i=t.createBuffer();if(!i)throw Error("创建缓冲区对象失败");return t.bindBuffer(n,i),t.bufferData(n,e.buffer||e,r),{type:n,drawType:r,buffer:i,unitSize:e.BYTES_PER_ELEMENT}}Object.defineProperty(n,"__esModule",{value:!0}),n.createBuffer=i,n.createUint16Buffer=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Uint16Array(e);return i(t,e,n,r)},n.createFloat32Buffer=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Float32Array(e);return i(t,e,n,r)},n.deleteBuffer=function(t,e){t.deleteBuffer(e.buffer||e)}},{}],15:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mapSize=void 0;var r={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};n.mapSize=function(t){return r[t]}},{}],16:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mapType=void 0;var o=null,s={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};n.mapType=function(t,e){if(!o){var n=Object.keys(s);o={};for(var r=0;r<n.length;++r){var i=n[r];o[t[i]]=s[i]}}return o[e]}},{}],17:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createProgram=function(t,e,n){var r=(0,i.createShader)(t,t.VERTEX_SHADER,e),e=(0,i.createShader)(t,t.FRAGMENT_SHADER,n),n=t.createProgram();t.attachShader(n,r),t.attachShader(n,e),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||(console.error("PError: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(n,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(n)&&console.warn("Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(n)),t.deleteProgram(n));o(t,n),t.deleteShader(r),t.deleteShader(e);e=s(t,n),t=c(t,n);return{program:n,attrs:e,uniforms:t}},n.useProgram=o,n.getAttribLocation=function(t,e,n){return t.getAttribLocation(e,n)},n.getUniformLocation=function(t,e,n){return t.getUniformLocation(e,n)},n.extractAttributes=s,n.extractUniforms=c,n.writeVertexAttrib=function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:2,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,s=6<arguments.length&&void 0!==arguments[6]?arguments[6]:t.FLOAT;return t.bindBuffer(e.type,e.buffer),t.vertexAttribPointer(n.location,r,s,!1,i*e.unitSize,o),t.enableVertexAttribArray(n.location),e},n.disableVertexAttribArray=function(t,e){return t.disableVertexAttribArray(e.location)};var i=t("./shader.js"),a=t("./mapSize.js"),u=t("./mapType.js");function o(t,e){return t.useProgram(e)}function s(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i),s=(0,u.mapType)(t,o.type);n[o.name]={attribData:o,size:(0,a.mapSize)(s),type:s,location:t.getAttribLocation(e,o.name)}}return n}function c(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;i++){var o=t.getActiveUniform(e,i),s=o.name.replace(/\[.*?\]/,""),a=(0,u.mapType)(t,o.type);n[s]={uniformData:o,type:a,size:o.size,location:t.getUniformLocation(e,s)}}return n}},{"./mapSize.js":15,"./mapType.js":16,"./shader.js":18}],18:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createShader=function(t,e,n){e=t.createShader(e);return t.shaderSource(e,n),t.compileShader(e),e}},{}],19:[function(t,e,n){"use strict";function i(t){var e=t.createTexture();return t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}Object.defineProperty(n,"__esModule",{value:!0}),n.create2DTexture=i,n.createImgTexture=function(t,e){var n=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),{texture:n}},n.createDataTexture=function(t,e){var n=new Uint8Array(e.data||e),r=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e.width||1,e.height||1,0,t.RGBA,t.UNSIGNED_BYTE,n),{texture:r}},n.deleteTexture=function(t,e){return t.deleteTexture(e)}},{}],20:[function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"linear",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.type=t||"linear",this.x1=e.x1||0,this.y1=e.y1||0,this.r1=e.r1||0,this.x2=e.x2||0,this.y2=e.y2||0,this.r2=e.r2||0,this.bounds=e.bounds||{left:0,top:0,width:0,height:0},this.control=e.control,this.stops=[],this.init()}var t,e,r;return t=n,(e=[{key:"init",value:function(){var t=this.x2-this.x1,e=this.y2-this.y1;"radial"===this.type?this.length=this.r2-this.r1:0==t&&0==e?this.length=0:(this.length=Math.sqrt(Math.pow(t,2),Math.pow(e,2)),this.sin=e/this.length,this.cos=t/this.length)}},{key:"addColorStop",value:function(t,e){this.stops.push({offset:t,color:e})}},{key:"toImageData",value:function(r,t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!r.textureContext)return null;var i=null,i="linear"===this.type?r.textureContext.createLinearGradient(this.x1,this.y1,this.x2,this.y2):r.textureContext.createRadialGradient(this.x1,this.y1,this.r1,this.x2,this.y2,this.r2);return this.stops.forEach(function(t,e){var n=r.graph.utils.toColor(t.color);i&&i.addColorStop(t.offset,n)}),r.toFillTexture(i,t,e)}},{key:"toString",value:function(){var e=this.type+"-gradient(";return"linear"==this.type?e+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:e+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.forEach(function(t){e+=","+t.color+" "+t.offset}),e+")"}}])&&i(t.prototype,e),r&&i(t,r),n}();n.default=r},{}],21:[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(n,"__esModule",{value:!0}),n.default=void 0;var r,o=(r=t("./base.js"))&&r.__esModule?r:{default:r};function u(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=c(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function c(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e,n){return(h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=y(n);return t=r?(t=y(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(i,o["default"]);var t,e,n,r=p(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this,t,e)).isRegular=e.isRegular||!1,t.needCut=e.needCut||!1,t.control=e.control,t.points=[],t}return t=i,(e=[{key:"applyTransform",value:function(t){return h(y(i.prototype),"applyTransform",this).call(this,t)}},{key:"setParentBounds",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.parentAbsoluteBounds;t&&(this.parentAbsoluteBounds=t),this.context.uniform2f(this.program.uniforms.a_center_point.location,this.graph.width/2,this.graph.height/2)}},{key:"setFragColor",value:function(t){if(!Array.isArray(t))return void 0===(t=this.convertColor(t)).a&&(t.a=1),this.context.uniform4f(this.program.uniforms.v_single_color.location,t.r,t.g,t.b,t.a*this.style.globalAlpha),null;var e,n=[],r=a(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0===(i=this.convertColor(i)).a&&(i.a=1),n.push(i.r,i.g,i.b,i.a*this.style.globalAlpha)}}catch(t){r.e(t)}finally{r.f()}t=this.createFloat32Buffer(n);return this.writeVertexAttrib(t,this.program.attrs.a_color,4,0,0),t.attr=this.program.attrs.a_color,t}},{key:"beginDraw",value:function(){this.useProgram()}},{key:"draw",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.parentAbsoluteBounds;this.setParentBounds(e),this.points=t}},{key:"endDraw",value:function(){this.points&&delete this.points,this.pathPoints&&delete this.pathPoints}},{key:"closePath",value:function(){var t,e;this.points&&2<this.points.length&&this.points[0]!==this.points[this.points.length-1]&&((t=this.points[0])==(e=this.points[this.points.length-1])||t.x===e.x&&t.y===e.y||this.points.push(t))}},{key:"writePoints",value:function(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.program.attrs.a_position,r=[],i=a(t);try{for(i.s();!(e=i.n()).done;){var o=e.value,s=this.applyTransform(o);r.push(s.x+this.parentAbsoluteBounds.left,s.y+this.parentAbsoluteBounds.top)}}catch(t){i.e(t)}finally{i.f()}t=this.createFloat32Buffer(r);return this.writeVertexAttrib(t,n,2,0,0),t.attr=n,t}},{key:"genLinePoints",value:function(t,e){var n=[t],r=e.x-t.x,i=e.y-t.y;if(0!=r||0!=i)for(var o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)),s=r/o,a=i/o,u=.5;u<o;u+=.5){var c=t.x+s*u,l=t.y+a*u;n.push({x:c,y:l})}return n.push(e),n}},{key:"pathToPoints",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,e=null,n=[],r=0;r<t.length;r++){var i,o=t[r];e&&!o.m?(i=this.genLinePoints(e,o),n.push.apply(n,u(i))):e&&!n.includes(e)&&n.push(e),e=o}return n.includes(e)||n.push(e),n}},{key:"equalPoint",value:function(t,e){return t.x===e.x&&t.y===e.y}},{key:"pathToLines",value:function(t){for(var e=null,n=[],r=0;r<t.length;r++){var i=t[r];!e||i.m||e.x==i.x&&e.y==i.y||n.push({start:e,end:i}),e=i}return n}},{key:"cutLines",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(t&&t.length<3)return t;for(n=Math.max(e+1,n);e<t.length;){for(var r=t[e];n<t.length;){var i=t[n];if(this.equalPoint(r.start,i.start)||this.equalPoint(r.end,i.end)||this.equalPoint(r.start,i.end)||this.equalPoint(r.end,i.start))n++;else{var o,s,a=!1,u=this.getIntersection(r,i);if(u&&(this.equalPoint(r.start,u)||this.equalPoint(r.end,u)||(o={start:r.start,end:u},s={start:u,end:r.end},t.splice(e,1,o,s),a=!0,n++),this.equalPoint(i.start,u)||this.equalPoint(i.end,u)||(s={start:i.start,end:u},i={start:u,end:i.end},t.splice(n,1,s,i),n++)),n++,a)return this.cutLines(t,e,n)}}n=++e+1}return t}},{key:"getIntersection",value:function(t,e){if(this.equalPoint(t.start,e.start)||this.equalPoint(t.start,e.end))return t.start;if(this.equalPoint(t.end,e.start)||this.equalPoint(t.end,e.end))return t.end;var n=(t.start.x-e.start.x)*(t.end.y-e.start.y)-(t.start.y-e.start.y)*(t.end.x-e.start.x),r=(t.start.x-e.end.x)*(t.end.y-e.end.y)-(t.start.y-e.end.y)*(t.end.x-e.end.x);if(0<n*r)return null;e=(e.start.x-t.start.x)*(e.end.y-t.start.y)-(e.start.y-t.start.y)*(e.end.x-t.start.x);if(0<e*(e+n-r))return null;if(r==n)return null;r=e/(r-n),n=r*(t.end.x-t.start.x),r*=t.end.y-t.start.y;return{x:t.start.x+n,y:t.start.y+r}}},{key:"getIntersectionLines",value:function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.end,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[],o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,s={line:t,polygons:[]};if(i.push(r),o&&this.equalPoint(o.line.start,r))return i.unshift(o.line.start),o.polygons.push(i),s;for(;n<e.length;n++){var a=e[n];this.equalPoint(r,a.start)?i.includes(a.end)||this.getIntersectionLines(a,e,n+1,a.end,u(i),o||s):this.equalPoint(r,a.end)&&(i.includes(a.start)||this.getIntersectionLines(a,e,n+1,a.start,u(i),o||s))}return s}},{key:"getPolygon",value:function(t){var e=[];if((n=this.pathToLines(t))&&2<n.length)for(var n=this.cutLines(n),r=0;r<n.length-1;r++){var i=n[r],i=this.getIntersectionLines(i,n,r+1);i.polygons.length&&e.push.apply(e,u(i.polygons))}return e}},{key:"getTriangles",value:function(t){this.trianglesCache=this.trianglesCache||(this.trianglesCache={});var e=JSON.stringify(t);if(this.trianglesCache[e])return this.trianglesCache[e];var n=[],t=this.getPolygon(t);if(t.length){var r,i=a(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,s=this.earCutPointsToTriangles(o);n.push.apply(n,u(s))}}catch(t){i.e(t)}finally{i.f()}}return this.trianglesCache[e]=n}},{key:"stroke",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style.strokeStyle,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.style.lineWidth;e&&e.length&&(t=null,n&&(t=this.setFragColor(n)),r&&this.context.uniform1f(this.program.uniforms.a_point_size.location,r),this.program.uniforms.a_type&&this.context.uniform1i(this.program.uniforms.a_type.location,1===e.length?4:1),e&&e.length&&(e=(n=r<=1.2)?e:this.pathToPoints(e),r=this.writePoints(e),this.context.drawArrays(n?this.context.LINE_LOOP:this.context.POINTS,0,e.length),this.deleteBuffer(r)),t&&this.deleteBuffer(t),t&&this.disableVertexAttribArray(t.attr))}},{key:"fill",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{left:0,top:0,width:0,height:0},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.points&&this.points.length&&(this.style.fillStyle&&this.fillColor(this.style.fillStyle,this.points,t,e),this.style.fillImage&&this.fillImage(this.style.fillImage,this.points,t,e))}},{key:"fillColor",value:function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;if(this.isGradient(t)){var i=t.toImageData(this,n,e);return this.fillImage(i.data,i.points,n)}this.context.uniform1i(this.program.uniforms.a_type.location,r);t=this.setFragColor(t);this.fillPolygons(e),t&&this.deleteBuffer(t),t&&this.disableVertexAttribArray(t.attr)}},{key:"fillImage",value:function(t,e,n){t&&(t=t instanceof ImageData?this.createDataTexture(t):this.createImgTexture(t),this.context.uniform1i(this.program.uniforms.u_sample.location,0),this.context.uniform4f(this.program.uniforms.v_texture_bounds.location,n.left+this.parentAbsoluteBounds.left,n.top+this.parentAbsoluteBounds.top,n.width,n.height),this.fillTexture(e),this.deleteTexture(t))}},{key:"fillTexture",value:function(t){t&&t.length&&(this.context.uniform1i(this.program.uniforms.a_type.location,2),this.fillPolygons(t,!0),this.disableVertexAttribArray(this.program.attrs.a_text_coord))}},{key:"fillPolygons",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(3<t.length){var n=this.needCut?this.earCutPointsToTriangles(t):this.getTriangles(t);if(n.length){var r,i=a(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;this.fillPolygons(o,e)}}catch(t){i.e(t)}finally{i.f()}}}else{var s=this.writePoints(t),n=e?this.writePoints(t,this.program.attrs.a_text_coord):null;this.context.drawArrays(this.context.TRIANGLE_FAN,0,t.length),this.deleteBuffer(s),n&&this.deleteBuffer(n)}}},{key:"drawImage",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.width,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:t.height,r=r||t.width,i=i||t.height;this.fillImage(t,this.points,{left:e,top:n,width:r,height:i})}},{key:"drawText",value:function(t,e,n,r){var i=this.textureCanvas;if(!i)return null;if(i.width=r.width,i.height=r.height,!i.width||!i.height)return null;this.textureContext.clearRect(0,0,i.width,i.height),this.textureContext.font=this.style.font||this.style.fontSize+"px "+this.style.fontFamily,e-=r.left,n-=r.top,this.setTextureStyle(this.style),this.style.fillStyle&&this.textureContext.fillText&&(this.style.maxWidth?this.textureContext.fillText(t,e,n,this.style.maxWidth):this.textureContext.fillText(t,e,n)),this.textureContext.strokeText&&(this.style.maxWidth?this.textureContext.strokeText(t,e,n,this.style.maxWidth):this.textureContext.strokeText(t,e,n));i=this.textureContext.getImageData(0,0,i.width,i.height);this.fillImage(i,this.points,r)}}])&&l(t.prototype,e),n&&l(t,n),i}();n.default=d},{"./base.js":13}],22:[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(n,"__esModule",{value:!0}),n.jmArc=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!1!==t.isRegular,t.needCut=!0===t.needCut,(e=r.call(this,t,e)).center=t.center||{x:0,y:0},e.radius=t.radius||0,e.startAngle=t.start||t.startAngle||0,e.endAngle=t.end||t.endAngle||2*Math.PI,e.anticlockwise=t.anticlockwise||0,e.isFan=!!t.isFan,e}return t=i,(e=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"startAngle",get:function(){return this.property("startAngle")},set:function(t){return this.needUpdate=!0,this.property("startAngle",t)}},{key:"endAngle",get:function(){return this.property("endAngle")},set:function(t){return this.needUpdate=!0,this.property("endAngle",t)}},{key:"anticlockwise",get:function(){return this.property("anticlockwise")},set:function(t){return this.needUpdate=!0,this.property("anticlockwise",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=0,n=0,r=t.center.x,i=t.center.y;t.radius?e=n=t.radius:(e=t.width/2,n=t.height/2);var o=this.startAngle,s=this.endAngle;if((0!=e||0!=n)&&o!=s){var a=this.anticlockwise;this.points=[];var u=1/Math.max(e,n);a&&(o=(a=2*Math.PI)-o,s=a-s),s<o&&(u=-u),this.isFan&&this.points.push(t.center);for(var c=o;;c+=u){(0<u&&s<c||u<0&&c<s)&&(c=s);var l={x:Math.cos(c)*e+r,y:Math.sin(c)*n+i};if(this.points.push(l),c==s)break}return this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArc=n.default=t},{"../core/jmPath.js":8}],23:[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(n,"__esModule",{value:!0}),n.jmArrow=n.default=void 0;var o=t("../core/jmPath.js"),u=t("../core/jmUtils.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=l(n);return t=r?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArrow";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.lineJoin="miter",e.style.lineCap="square",e.angle=t.angle||0,e.start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.offsetX=t.offsetX||5,e.offsetY=t.offsetY||8,e}return t=i,(e=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"angle",get:function(){return this.property("angle")},set:function(t){return this.needUpdate=!0,this.property("angle",t)}},{key:"offsetX",get:function(){return this.property("offsetX")},set:function(t){return this.needUpdate=!0,this.property("offsetX",t)}},{key:"offsetY",get:function(){return this.property("offsetY")},set:function(t){return this.needUpdate=!0,this.property("offsetY",t)}},{key:"initPoints",value:function(t){var e=this.angle,n=this.start,r=this.end;if(r){e=e||Math.atan2(r.y-n.y,r.x-n.x),this.points=[];var i=this.offsetX,o=this.offsetY,s=Math.atan2(i,o),a=e+s,n=Math.sin(a),a=Math.cos(a),i=Math.sqrt(i*i+o*o),o={x:r.x-a*i,y:r.y-n*i},s=e-s,n=Math.sin(s),a=Math.cos(s),n={x:r.x-a*i,y:r.y-n*i},i=u.jmUtils.clone(r);return i.m=!0,this.points.push(i),this.points.push(o),t||this.style.fill?(this.points.push(n),this.points.push(r)):(this.points.push(i),this.points.push(n)),this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArrow=n.default=t},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],24:[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(n,"__esModule",{value:!0}),n.jmArrowLine=n.default=void 0;var o=t("./jmLine.js"),s=t("./jmArrow.js");function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n);return t=r?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,o.jmLine);var t,e,n,r=l(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(e=r.call(this,t,e||"jmArrowLine")).style.lineJoin=e.style.lineJoin||"miter",e.arrow=new s.jmArrow(t),e}return t=i,(e=[{key:"initPoints",value:function(){return this.points=u(h(i.prototype),"initPoints",this).call(this),!1!==this.arrowVisible&&(this.points=this.points.concat(this.arrow.initPoints())),this.points}}])&&a(t.prototype,e),n&&a(t,n),i}();n.jmArrowLine=n.default=t},{"./jmArrow.js":23,"./jmLine.js":30}],25:[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(n,"__esModule",{value:!0}),n.jmBezier=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.style&&!0!==typeof t.style.close&&(t.style.close=!1),(e=r.call(this,t,e)).cpoints=t.points||[],e}return t=i,(e=[{key:"cpoints",get:function(){return this.property("cpoints")},set:function(t){return this.needUpdate=!0,this.property("cpoints",t)}},{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var n=this.getPoint(t,e);this.points.push(n)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];if(2==t.length){var n={};return n.x=(t[1].x-t[0].x)*e+t[0].x,n.y=(t[1].y-t[0].y)*e+t[0].y,n}if(2<t.length){for(var r=[],i=0;i<t.length-1;i++){var o=this.getPoint([t[i],t[i+1]],e);o&&r.push(o)}return this.getPoint(r,e)}}},{key:"offset",value:function(t,e,n){var r=this.cpoints;if(r){for(var i=r.length,o=0;o<i;o++)r[o].x+=t,r[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:n}),this.getLocation(!0)}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmBezier=n.default=t},{"../core/jmPath.js":8}],26:[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(n,"__esModule",{value:!0}),n.jmCircle=n.default=void 0;var s=t("./jmArc.js");function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n);return t=r?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(o,s.jmArc);var t,e,n,r=l(o);function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),t.isRegular=!0,r.call(this,t,e)}return t=o,(e=[{key:"initPoints",value:function(){if("webgl"===this.graph.mode)return u(h(o.prototype),"initPoints",this).call(this);var t=this.getLocation();t.radius||(t.radius=Math.min(t.width,t.height)/2),this.points=[],this.points.push({x:t.center.x-t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y+t.radius}),this.points.push({x:t.center.x-t.radius,y:t.center.y+t.radius})}},{key:"draw",value:function(){if("webgl"===this.graph.mode)return u(h(o.prototype),"draw",this).call(this);var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=this.getLocation();e.radius||(e.radius=Math.min(e.width,e.height)/2);var n=this.startAngle,r=this.endAngle,i=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,n,r,i)}}])&&a(t.prototype,e),n&&a(t,n),o}();n.jmCircle=n.default=t},{"./jmArc.js":22}],27:[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(n,"__esModule",{value:!0}),n.jmHArc=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmArc);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.isRegular=!0,t.needCut=!0,(e=r.call(this,t,e)).minRadius=t.minRadius||e.style.minRadius||0,e.maxRadius=t.maxRadius||e.style.maxRadius||0,e}return t=i,(e=[{key:"minRadius",get:function(){return this.property("minRadius")},set:function(t){return this.needUpdate=!0,this.property("minRadius",t)}},{key:"maxRadius",get:function(){return this.property("maxRadius")},set:function(t){return this.needUpdate=!0,this.property("maxRadius",t)}},{key:"initPoints",value:function(){var t,e=this.getLocation(),n=this.minRadius,r=this.maxRadius,i=this.startAngle,o=this.endAngle;this.anticlockwise&&(i=(t=2*Math.PI)-i,o=t-o);var s=.1;o<i&&(s=-s);for(var a=[],u=[],c=i;;c+=s){(0<s&&o<c||s<0&&c<o)&&(c=o);var l=Math.cos(c),h=Math.sin(c),f={x:l*n+e.center.x,y:h*n+e.center.y},h={x:l*r+e.center.x,y:h*r+e.center.y};if(a.push(f),u.push(h),c===o)break}u.reverse(),this.style&&this.style.close||(u[0].m=!0),this.points=a.concat(u)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmHArc=n.default=t},{"./jmArc.js":22}],28:[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(n,"__esModule",{value:!0}),n.jmImage=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=l(n);return t=r?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e||"jmImage")).style.fill=e.fill||"transparent",e.sourceWidth=t.sourceWidth,e.sourceHeight=t.sourceHeight,e.sourcePosition=t.sourcePosition,e.image=t.image||e.style.image,e}return t=i,(e=[{key:"sourcePosition",get:function(){return this.property("sourcePosition")},set:function(t){return this.property("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.property("sourceWidth")},set:function(t){return this.needUpdate=!0,this.property("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.property("sourceHeight")},set:function(t){return this.needUpdate=!0,this.property("sourceHeight",t)}},{key:"image",get:function(){return this.property("image")},set:function(t){return this.needUpdate=!0,this.property("image",t)}},{key:"draw",value:function(){try{var t=this.getImage();this.drawImg(t)}catch(t){console.error&&console.error(t)}}},{key:"drawImg",value:function(t){if(t&&t.complete){var e=(e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds)||(this.parent&&this.parent.getAbsoluteBounds?this.parent:this).getAbsoluteBounds(),n=this.getLocation(),r=this.sourcePosition,i=this.sourceWidth,o=this.sourceHeight,s=this.webglControl||this.context;if(this.webglControl){s.setParentBounds&&s.setParentBounds(e);var a=this.getBounds();return s.draw([{x:a.left,y:a.top},{x:a.left+a.width,y:a.top},{x:a.left+a.width,y:a.top+a.height},{x:a.left,y:a.top+a.height}],e),void s.drawImage(t,a.left,a.top,a.width,a.height)}n.left+=e.left,n.top+=e.top,r||void 0!==i||void 0!==o?(void 0===i&&(i=n.width||t.width||0),void 0===o&&(o=n.height||t.height||0),r=r||{x:0,y:0},n.width&&n.height?s.drawImage(t,r.x,r.y,i,o,n.left,n.top,n.width,n.height):n.width?s.drawImage(t,r.x,r.y,i,o,n.left,n.top,n.width,o):n.height?s.drawImage(t,r.x,r.y,i,o,n.left,n.top,i,n.height):s.drawImage(t,r.x,r.y,i,o,n.left,n.top,i,o)):n?n.width&&n.height?s.drawImage(t,n.left,n.top,n.width,n.height):n.width?s.drawImage(t,n.left,n.top,n.width,t.height):n.height?s.drawImage(t,n.left,n.top,t.width,n.height):s.drawImage(t,n.left,n.top):s.drawImage(t)}else console.warn("image is empty")}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={},n=this.getImage()||{width:0,height:0},r=this.getLocation(),t=r.width||n.width,n=r.height||n.height;return e.left=r.left,e.top=r.top,e.right=r.left+t,e.bottom=r.top+n,e.width=t,e.height=n,this.bounds=e}},{key:"getLocation",value:function(){var t=this.getImage(),e=a(l(i.prototype),"getLocation",this).call(this);return e.width&&!e.height?e.height=e.width/t.width*t.height:e.height&&!e.width&&(e.width=e.height/t.height*t.width),e}},{key:"getImage",value:function(){var t=this,e=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(e)||(e&&e.src?this.__img=e:"undefined"!=typeof document&&document.createElement?(this.__img=document.createElement("img"),this.__img.onload=function(){t.needUpdate=!0},e&&"string"==typeof e&&(this.__img.src=e)):this.graph.isWXMiniApp&&this.graph.canvas&&"string"==typeof e?(this.__img=this.graph.canvas.createImage(),this.__img.onload=function(){t.needUpdate=!0},this.__img.src=e):this.__img=e,this.__img&&(this.image=this.__img.src)),this.__img}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmImage=n.default=t},{"../core/jmControl.js":2}],29:[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(n,"__esModule",{value:!0}),n.jmLabel=n.default=void 0;var o=t("../core/jmControl.js");function s(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function a(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach(function(t){var e,n;e=r,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return t=r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,o.jmControl);var t,e,n,r=h(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e||"jmLabel")).style.font=e.style.font||"15px Arial",e.style.fontFamily=e.style.fontFamily||"Arial",e.style.fontSize=e.style.fontSize||15,e.style.textAlign=e.style.textAlign||"left",e.style.textBaseline=e.style.textBaseline||"middle",e.text=t.text||"",e.center=t.center||null,e}return t=i,(e=[{key:"text",get:function(){return this.property("text")},set:function(t){return this.needUpdate=!0,this.property("text",t)}},{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getLocation",value:function(){var t=c(f(i.prototype),"getLocation",this).call(this),e=this.testSize();return t.width=t.width||e.width,t.height=t.height||e.height,t.left||t.top||!t.center||(t.left=t.center.x-t.width/2,t.top=t.center.y-t.height/2),t}},{key:"initPoints",value:function(){this.__size=null;var t=this.getLocation();return this.points=[{x:t.left,y:t.top}],this.points.push({x:t.left+t.width,y:t.top}),this.points.push({x:t.left+t.width,y:t.top+t.height}),this.points.push({x:t.left,y:t.top+t.height}),this.points}},{key:"testSize",value:function(){return this.__size||(this.webglControl?this.__size=this.webglControl.testSize(this.text,this.style):(this.context.save&&this.context.save(),this.setStyle({font:this.style.font||this.style.fontSize+"px "+this.style.fontFamily}),this.__size=this.context.measureText?this.context.measureText(this.text):{width:15},this.context.restore&&this.context.restore(),this.__size.height=this.style.fontSize||15),this.width||(this.width=this.__size.width),this.height||(this.height=this.__size.height),this.__size)}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=(this.testSize(),this.location),n=e.left+t.left,r=e.top+t.top;switch(this.style.textAlign){case"right":n+=e.width;break;case"center":n+=e.width/2}switch(this.style.textBaseline){case"bottom":r+=e.height;break;case"hanging":case"alphabetic":case"middle":r+=e.height/2}var i=this.text;void 0!==i&&(this.webglControl?(this.webglControl.draw(this.points,t),this.webglControl.drawText(i,n,r,e)):this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(i,n,r,this.style.maxWidth):this.context.fillText(i,n,r):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(i,n,r,this.style.maxWidth):this.context.strokeText(i,n,r))),this.style.border&&(this.style.border.style&&(this.context.save&&this.context.save(),this.setStyle(this.style.border.style)),"2d"===this.mode?(this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top),this.style.border.top&&this.context.lineTo(this.points[1].x+t.left,this.points[1].y+t.top),this.style.border.right&&(this.context.moveTo(this.points[1].x+t.left,this.points[1].y+t.top),this.context.lineTo(this.points[2].x+t.left,this.points[2].y+t.top)),this.style.border.bottom&&(this.context.moveTo(this.points[2].x+t.left,this.points[2].y+t.top),this.context.lineTo(this.points[3].x+t.left,this.points[3].y+t.top)),this.style.border.left&&(this.context.moveTo(this.points[3].x+t.left,this.points[3].y+t.top),this.context.lineTo(this.points[0].x+t.left,this.points[0].y+t.top))):(t=[],this.style.border.top&&(t.push(this.points[0]),t.push(this.points[1])),this.style.border.right&&(t.push(a(a({},this.points[1]),{},{m:!0})),t.push(this.points[2])),this.style.border.bottom&&(t.push(a(a({},this.points[2]),{},{m:!0})),t.push(this.points[3])),this.style.border.left&&(t.push(a(a({},this.points[3]),{},{m:!0})),t.push(this.points[0])),t.length&&this.webglControl&&this.webglControl.stroke(t)))}},{key:"endDraw",value:function(){"2d"===this.mode&&c(f(i.prototype),"endDraw",this).call(this)}}])&&u(t.prototype,e),n&&u(t,n),i}();n.jmLabel=n.default=t},{"../core/jmControl.js":2}],30:[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(n,"__esModule",{value:!0}),n.jmLine=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.isRegular=!0,(e=r.call(this,t,e)).start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.style.lineType=e.style.lineType||"solid",e.style.dashLength=e.style.dashLength||4,e.style.close=!1,e}return t=i,(e=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);n/=i,r/=i;for(var o=!1,s=this.style.dashLength||5,a=s/2,u=s;u<=i;){var c={x:t.x+n*u,y:t.y+r*u};!1===o?u+=a:(c.m=!0,u+=s),this.points.push(c),o=!o}}return this.points.push(e),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLine=n.default=t},{"../core/jmPath.js":8}],31:[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(n,"__esModule",{value:!0}),n.jmPrismatic=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.isRegular=!0,(e=r.call(this,t,e)).style.close=void 0===e.style.close||e.style.close,e.center=t.center||{x:0,y:0},e.width=t.width||0,e.height=t.height||0,e}return t=i,(e=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,n=t.height/2;this.points=[],this.points.push({x:t.center.x-e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y+n}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-n})}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPrismatic=n.default=t},{"../core/jmPath.js":8}],32:[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(n,"__esModule",{value:!0}),n.jmRect=n.default=void 0;var o=t("../core/jmPath.js"),l=t("./jmArc.js"),h=t("./jmLine.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmPath);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e)).style.close=!0,e.radius=t.radius||e.style.radius||0,e}return t=i,(e=[{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};this.initPoints();t=this.getLocation();return e.left=t.left,e.top=t.top,e.right=t.left+t.width,e.bottom=t.top+t.height,e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"initPoints",value:function(){var t,e,n,r,i,o=this.getLocation(),s={x:o.left,y:o.top},a={x:o.left+o.width,y:o.top},u={x:o.left+o.width,y:o.top+o.height},c={x:o.left,y:o.top+o.height};return"dotted"!==this.style.lineType||this.dottedLine||(this.dottedLine=this.graph.createShape(h.jmLine,{style:this.style})),o.radius&&o.radius<o.width/2&&o.radius<o.height/2?(t=Math.PI/2,(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:o.left+o.radius,y:o.top+o.radius},i.startAngle=Math.PI,i.endAngle=Math.PI+t,e=i.initPoints(),(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:a.x-o.radius,y:a.y+o.radius},i.startAngle=Math.PI+t,i.endAngle=2*Math.PI,n=i.initPoints(),(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:u.x-o.radius,y:u.y-o.radius},i.startAngle=0,i.endAngle=t,r=i.initPoints(),(i=this.graph.createShape(l.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:c.x+o.radius,y:c.y-o.radius},i.startAngle=t,i.endAngle=Math.PI,i=i.initPoints(),this.points=e.concat(n,r,i)):(this.points=[],this.points.push(s),this.dottedLine&&(this.dottedLine.start=s,this.dottedLine.end=a,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(a),this.dottedLine&&(this.dottedLine.start=a,this.dottedLine.end=u,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(u),this.dottedLine&&(this.dottedLine.start=u,this.dottedLine.end=c,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(c),this.dottedLine&&(this.dottedLine.start=c,this.dottedLine.end=s,this.points=this.points.concat(this.dottedLine.initPoints()))),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmRect=n.default=t},{"../core/jmPath.js":8,"./jmArc.js":22,"./jmLine.js":30}],33:[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(n,"__esModule",{value:!0}),n.jmResize=n.default=void 0;var o=t("./jmRect.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(n);return t=r?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==i(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmRect);var t,e,n,r=u(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=t||{}).isRegular=!0,(e=r.call(this,t,e)).resizable=!1!==t.resizable,e.movable=t.movable,e.rectSize=t.rectSize||8,e.style.close=e.style.close||!0,e.rectCursors=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"],e.init(t),e}return t=i,(e=[{key:"rectSize",get:function(){return this.property("rectSize")},set:function(t){return this.property("rectSize",t)}},{key:"resizable",get:function(){return this.property("resizable")},set:function(t){return this.property("resizable",t)}},{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,n=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};n.close=!0,n.fill=n.fill||"transparent";for(var r=0;r<8;r++){var i=(this.graph||t.graph).createShape(o.jmRect,{position:{x:0,y:0},width:e,height:e,style:n,interactive:!0});i.index=r,i.visible=!0,this.resizeRects.push(i),this.children.add(i),i.canMove(!0,this.graph)}this.reset(0,0,0,0),this.bindRectEvents()}}},{key:"bindRectEvents",value:function(){for(var t=0;t<this.resizeRects.length;t++){var e=this.resizeRects[t];e.on("move",function(t){t.cancel=!0;var e=0,n=0,r=0,i=0;0==this.index?(r=-t.offsetX,e=t.offsetX):1==this.index?(r=-t.offsetX,e=t.offsetX,i=-t.offsetY,n=t.offsetY):2==this.index?(i=-t.offsetY,n=t.offsetY):3==this.index?(r=t.offsetX,i=-t.offsetY,n=t.offsetY):4==this.index?r=t.offsetX:5==this.index?(r=t.offsetX,i=t.offsetY):6==this.index?i=t.offsetY:7==this.index&&(r=-t.offsetX,r=-t.offsetX,e=t.offsetX,i=t.offsetY),this.parent.reset(e,n,r,i)}),e.bind("mousemove",function(){var t=this.parent.getRotation(),e=this.parent.rectCursors[this.index],n=t&&t.angle?this.graph.utils.rotatePoints(this.graph.utils.clone(this.position),t,t.angle):this.position,r=this.parent.width/2,i=this.parent.height/2;this.rotationAngleByCenter=Math.atan((n.y-i)/(n.x-r));t=Math.atan(i/r)/2,i=2*t+Math.PI/4;n.x<r?this.rotationAngleByCenter>=-t&&this.rotationAngleByCenter<=t?e=this.parent.rectCursors[0]:this.rotationAngleByCenter>t&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[1]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[2]:this.rotationAngleByCenter<=-t&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[7]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[6]):this.rotationAngleByCenter>=-t&&this.rotationAngleByCenter<=t?e=this.parent.rectCursors[4]:this.rotationAngleByCenter>t&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[5]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[6]:this.rotationAngleByCenter<=-t&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[3]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[2]),this.cursor=e}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,n,r){var i,o,s=void 0===this.style.minWidth?5:this.style.minWidth,a=void 0===this.style.minHeight?5:this.style.minHeight,u=this.getLocation();0==n&&0==r||(i=u.width+n,o=u.height+r,(s<=i||a<=o)&&(s<=i?this.width=i:n=t=0,a<=o?this.height=o:r=e=0,!1!==this.movable&&(t||e)&&((o=this.position).x=u.left+t,o.y=u.top+e,this.position=o),this.emit("resize",t,e,n,r)));var c,l=this.getLocation();for(c in this.resizeRects){var h=this.resizeRects[c];switch(h.index){case 0:h.position.x=-h.width/2,h.position.y=(l.height-h.height)/2;break;case 1:h.position.x=-h.width/2,h.position.y=-h.height/2;break;case 2:h.position.x=(l.width-h.width)/2,h.position.y=-h.height/2;break;case 3:h.position.x=l.width-h.width/2,h.position.y=-h.height/2;break;case 4:h.position.x=l.width-h.width/2,h.position.y=(l.height-h.height)/2;break;case 5:h.position.x=l.width-h.width/2,h.position.y=l.height-h.height/2;break;case 6:h.position.x=(l.width-h.height)/2,h.position.y=l.height-h.height/2;break;case 7:h.position.x=-h.width/2,h.position.y=l.height-h.height/2}h.needUpdate=!0}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmResize=n.default=t},{"./jmRect.js":32}]},{},[1])(1);return i.jmGraph=r},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t.bind(i)):t()}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);