UNPKG

hzdracom-datav-vue3

Version:
14 lines 255 kB
var g0=Object.defineProperty,p0=Object.defineProperties;var m0=Object.getOwnPropertyDescriptors;var Za=Object.getOwnPropertySymbols;var y0=Object.prototype.hasOwnProperty,b0=Object.prototype.propertyIsEnumerable;var eo=(D,e,re)=>e in D?g0(D,e,{enumerable:!0,configurable:!0,writable:!0,value:re}):D[e]=re,be=(D,e)=>{for(var re in e||(e={}))y0.call(e,re)&&eo(D,re,e[re]);if(Za)for(var re of Za(e))b0.call(e,re)&&eo(D,re,e[re]);return D},Ce=(D,e)=>p0(D,m0(e));(function(D,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(D=typeof globalThis!="undefined"?globalThis:D||self,e(D["hzdracom-datav-vue3"]={},D.Vue))})(this,function(D,e){"use strict";function re(t,o){return arguments.length===1?parseInt((Math.random()*t+1).toString(),10):parseInt((Math.random()*(o-t+1)+t).toString(),10)}function to(t,o,a){let r;return function(){clearTimeout(r),r=setTimeout(()=>{o.call(a,...arguments)},t)}}function ro(t,o){const a=window.MutationObserver,r=new a(o);return r.observe(t,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0}),r}function Ye(t,o){const a=Math.abs(t[0]-o[0]),r=Math.abs(t[1]-o[1]);return Math.sqrt(a*a+r*r)}function Pe(t,o,a,r){return[t+Math.cos(r)*a,o+Math.sin(r)*a]}function no(t){return t.filter(o=>typeof o=="number")}function ao(t){return t=no(t),t.reduce((o,a)=>o+a,0)}function oo(t,o){const a=Math.abs(t.x-o.x),r=Math.abs(t.y-o.y);return Math.sqrt(a*a+r*r)}function Tr(t){const a=new Array(t.length-1).fill(0).map((r,n)=>[t[n],t[n+1]]).map(r=>oo(r[0],r[1]));return ao(a)}function io(t){return`${t.x},${t.y}`}function Wr(t){return t.map(io).join(" ")}function ce(t){return(t?"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx":"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx").replace(/[xy]/g,o=>{const a=Math.random()*16|0;return(o==="x"?a:a&3|8).toString(16)})}function z(t,o){for(const a in o){if(t[a]&&typeof t[a]=="object"){z(t[a],o[a]);continue}if(typeof o[a]=="object"){t[a]=I(o[a],!0);continue}t[a]=o[a]}return t}function I(t,o){if(!t)return t;const{parse:a,stringify:r}=JSON;if(!o)return a(r(t));const n=t instanceof Array?[]:{};if(t&&typeof t=="object")for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]&&typeof t[i]=="object"?n[i]=I(t[i],!0):n[i]=t[i]);return n}const H=(t,o,a)=>{const r=e.ref(0),n=e.ref(0);let i,l=null,s=null;const f=(x=!0)=>new Promise($=>{e.nextTick(()=>{s=t.value,r.value=t.value?t.value.clientWidth:0,n.value=t.value?t.value.clientHeight:0,t.value?(!r.value||!n.value)&&console.warn("DataV: Component width or height is 0px, rendering abnormality may occur!"):console.warn("DataV: Failed to get dom node, component rendering may be abnormal!"),typeof o=="function"&&x&&o(),$(!0)})}),c=()=>{i=to(100,f,globalThis)},u=()=>{l=ro(s,i),window.addEventListener("resize",i)},v=()=>{!l||(l.disconnect(),l.takeRecords(),l=null,window.removeEventListener("resize",i))},m=async()=>{await f(!1),c(),u(),typeof a=="function"&&a()};return e.onMounted(()=>{m()}),e.onUnmounted(()=>{v()}),{width:r,height:n}};var C0="";const lo=["width","height"],so=["d","fill"],fo=["fill","x","y"],co=["xlink:href","width","height","x","y"],uo=["fill","x","y"],jr={props:{config:{type:Object,default:()=>({})}},setup(t){const o=t,a=e.ref(null),{width:r,height:n}=H(a,s,l),i=e.reactive({defaultConfig:{data:[],img:[],fontSize:12,imgSideLength:30,columnColor:"rgba(0, 194, 255, 0.4)",textColor:"#fff",showValue:!1},mergedConfig:null,column:[]});e.watch(()=>o.config,()=>{f()},{deep:!0});function l(){f()}function s(){f()}function f(){c(),u(),v()}function c(){i.mergedConfig=z(I(i.defaultConfig,!0),o.config||{})}function u(){let{data:m}=i.mergedConfig;m=I(m,!0),m.sort(({value:$},{value:S})=>$>S?-1:$<S?1:0);const x=m[0]?m[0].value:10;m=m.map($=>Ce(be({},$),{percent:$.value/x})),i.mergedConfig.data=m}function v(){const{imgSideLength:m,fontSize:x,data:$}=i.mergedConfig,S=$.length,E=r.value/(S+1),B=n.value-m-x-5,A=n.value-x-5;i.column=$.map((_,C)=>{const{percent:d}=_,p=E*(C+1),b=E*C,g=E*(C+2),y=A-B*d,h=B*d*.6+y,P=` M${b}, ${A} Q${p}, ${h} ${p},${y} M${p},${y} Q${p}, ${h} ${g},${A} L${b}, ${A} Z `,k=(A+y)/2+x/2;return Ce(be({},_),{d:P,x:p,y,textY:k})})}return(m,x)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"conicalColumnChart",ref:a,class:"dv-conical-column-chart"},[(e.openBlock(),e.createElementBlock("svg",{width:e.unref(r),height:e.unref(n)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i).column,($,S)=>(e.openBlock(),e.createElementBlock("g",{key:S},[e.createElementVNode("path",{d:$.d,fill:e.unref(i).mergedConfig.columnColor},null,8,so),e.createElementVNode("text",{style:e.normalizeStyle(`fontSize:${e.unref(i).mergedConfig.fontSize}px`),fill:e.unref(i).mergedConfig.textColor,x:$.x,y:e.unref(n)-4},e.toDisplayString($.name),13,fo),e.unref(i).mergedConfig.img.length?(e.openBlock(),e.createElementBlock("image",{key:0,"xlink:href":e.unref(i).mergedConfig.img[S%e.unref(i).mergedConfig.img.length],width:e.unref(i).mergedConfig.imgSideLength,height:e.unref(i).mergedConfig.imgSideLength,x:$.x-e.unref(i).mergedConfig.imgSideLength/2,y:$.y-e.unref(i).mergedConfig.imgSideLength},null,8,co)):e.createCommentVNode("",!0),e.unref(i).mergedConfig.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,style:e.normalizeStyle(`fontSize:${e.unref(i).mergedConfig.fontSize}px`),fill:e.unref(i).mergedConfig.textColor,x:$.x,y:$.textY},e.toDisplayString($.value),13,uo)):e.createCommentVNode("",!0)]))),128))],8,lo))],512))}},Ke={install(t){t.component("DvConicalColumnChart",jr)}};var _0="";const ho=["id"],go=["offset","stop-color"],po=["id","x2"],mo=["offset","stop-color"],yo=["x","y","rx","ry","stroke-width","stroke","width","height"],bo=["stroke-width","stroke-dasharray","stroke","points"],Co=["stroke","fill","x","y"],zr={props:{config:{type:Object,default:()=>({})}},setup(t){const o=t,a=ce(),r=e.ref(null),n=e.reactive({gradientId1:`percent-pond-gradientId1-${a}`,gradientId2:`percent-pond-gradientId2-${a}`,width:0,height:0,defaultConfig:{value:0,colors:["#3DE7C9","#00BAFF"],borderWidth:3,borderGap:3,lineDash:[5,1],textColor:"#fff",borderRadius:5,localGradient:!1,formatter:"{value}%"},mergedConfig:null}),i=e.computed(()=>{if(!n.mergedConfig)return 0;const{borderWidth:E}=n.mergedConfig;return n.width-E}),l=e.computed(()=>{if(!n.mergedConfig)return 0;const{borderWidth:E}=n.mergedConfig;return n.height-E}),s=e.computed(()=>{const E=n.height/2;if(!n.mergedConfig)return`0, ${E} 0, ${E}`;const{borderWidth:B,borderGap:A,value:_}=n.mergedConfig,C=(n.width-(B+A)*2)/100*_;return` ${B+A}, ${E} ${B+A+C}, ${E+.001} `}),f=e.computed(()=>{if(!n.mergedConfig)return 0;const{borderWidth:E,borderGap:B}=n.mergedConfig;return n.height-(E+B)*2}),c=e.computed(()=>{if(!n.mergedConfig)return[];const{colors:E}=n.mergedConfig,B=E.length,A=100/(B-1);return E.map((_,C)=>[A*C,_])}),u=e.computed(()=>n.mergedConfig&&n.mergedConfig.localGradient?n.gradientId1:n.gradientId2),v=e.computed(()=>{if(!n.mergedConfig)return"100%";const{value:E}=n.mergedConfig;return`${200-E}%`}),m=e.computed(()=>{if(!n.mergedConfig)return"";const{value:E,formatter:B}=n.mergedConfig;return B.replace("{value}",E)});e.watch(()=>o.config,()=>{S()},{deep:!0}),e.onMounted(()=>{x()});async function x(){await $(),o.config&&S()}async function $(){await e.nextTick();const{clientWidth:E,clientHeight:B}=r.value;n.width=E,n.height=B}function S(){n.mergedConfig=z(I(n.defaultConfig,!0),o.config||{})}return(E,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"percentPond",ref:r,class:"dv-percent-pond"},[(e.openBlock(),e.createElementBlock("svg",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:e.unref(n).gradientId1,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),A=>(e.openBlock(),e.createElementBlock("stop",{key:A[0],offset:`${A[0]}%`,"stop-color":A[1]},null,8,go))),128))],8,ho),e.createElementVNode("linearGradient",{id:e.unref(n).gradientId2,x1:"0%",y1:"0%",x2:e.unref(v),y2:"0%"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),A=>(e.openBlock(),e.createElementBlock("stop",{key:A[0],offset:`${A[0]}%`,"stop-color":A[1]},null,8,mo))),128))],8,po)]),e.createElementVNode("rect",{x:e.unref(n).mergedConfig?e.unref(n).mergedConfig.borderWidth/2:"0",y:e.unref(n).mergedConfig?e.unref(n).mergedConfig.borderWidth/2:"0",rx:e.unref(n).mergedConfig?e.unref(n).mergedConfig.borderRadius:"0",ry:e.unref(n).mergedConfig?e.unref(n).mergedConfig.borderRadius:"0",fill:"transparent","stroke-width":e.unref(n).mergedConfig?e.unref(n).mergedConfig.borderWidth:"0",stroke:`url(#${e.unref(n).gradientId1})`,width:e.unref(i)>0?e.unref(i):0,height:e.unref(l)>0?e.unref(l):0},null,8,yo),e.createElementVNode("polyline",{"stroke-width":e.unref(f),"stroke-dasharray":e.unref(n).mergedConfig?e.unref(n).mergedConfig.lineDash.join(","):"0",stroke:`url(#${e.unref(u)})`,points:e.unref(s)},null,8,bo),e.createElementVNode("text",{stroke:e.unref(n).mergedConfig?e.unref(n).mergedConfig.textColor:"#fff",fill:e.unref(n).mergedConfig?e.unref(n).mergedConfig.textColor:"#fff",x:e.unref(n).width/2,y:e.unref(n).height/2},e.toDisplayString(e.unref(m)),9,Co)]))],512))}},Je={install(t){t.component("DvPercentPond",zr)}};function Ir(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ze={},U={exports:{}};(function(t){function o(a){return a&&a.__esModule?a:{default:a}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(U);var Hr={},se={exports:{}};(function(t){function o(a,r,n){return r in a?Object.defineProperty(a,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[r]=n,a}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(se);var Z={exports:{}},Ur={exports:{}},fr={exports:{}};(function(t){function o(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=a[n];return i}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(fr),function(t){var o=fr.exports;function a(r){if(Array.isArray(r))return o(r)}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}(Ur);var qr={exports:{}};(function(t){function o(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(qr);var cr={exports:{}};(function(t){var o=fr.exports;function a(r,n){if(!!r){if(typeof r=="string")return o(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return o(r,n)}}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports})(cr);var Xr={exports:{}};(function(t){function o(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(Xr),function(t){var o=Ur.exports,a=qr.exports,r=cr.exports,n=Xr.exports;function i(l){return o(l)||a(l)||r(l)||n()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}(Z);var we={exports:{}};(function(t){function o(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(we);var K={},Qr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=new Map([["transparent","rgba(0,0,0,0)"],["black","#000000"],["silver","#C0C0C0"],["gray","#808080"],["white","#FFFFFF"],["maroon","#800000"],["red","#FF0000"],["purple","#800080"],["fuchsia","#FF00FF"],["green","#008000"],["lime","#00FF00"],["olive","#808000"],["yellow","#FFFF00"],["navy","#000080"],["blue","#0000FF"],["teal","#008080"],["aqua","#00FFFF"],["aliceblue","#f0f8ff"],["antiquewhite","#faebd7"],["aquamarine","#7fffd4"],["azure","#f0ffff"],["beige","#f5f5dc"],["bisque","#ffe4c4"],["blanchedalmond","#ffebcd"],["blueviolet","#8a2be2"],["brown","#a52a2a"],["burlywood","#deb887"],["cadetblue","#5f9ea0"],["chartreuse","#7fff00"],["chocolate","#d2691e"],["coral","#ff7f50"],["cornflowerblue","#6495ed"],["cornsilk","#fff8dc"],["crimson","#dc143c"],["cyan","#00ffff"],["darkblue","#00008b"],["darkcyan","#008b8b"],["darkgoldenrod","#b8860b"],["darkgray","#a9a9a9"],["darkgreen","#006400"],["darkgrey","#a9a9a9"],["darkkhaki","#bdb76b"],["darkmagenta","#8b008b"],["darkolivegreen","#556b2f"],["darkorange","#ff8c00"],["darkorchid","#9932cc"],["darkred","#8b0000"],["darksalmon","#e9967a"],["darkseagreen","#8fbc8f"],["darkslateblue","#483d8b"],["darkslategray","#2f4f4f"],["darkslategrey","#2f4f4f"],["darkturquoise","#00ced1"],["darkviolet","#9400d3"],["deeppink","#ff1493"],["deepskyblue","#00bfff"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1e90ff"],["firebrick","#b22222"],["floralwhite","#fffaf0"],["forestgreen","#228b22"],["gainsboro","#dcdcdc"],["ghostwhite","#f8f8ff"],["gold","#ffd700"],["goldenrod","#daa520"],["greenyellow","#adff2f"],["grey","#808080"],["honeydew","#f0fff0"],["hotpink","#ff69b4"],["indianred","#cd5c5c"],["indigo","#4b0082"],["ivory","#fffff0"],["khaki","#f0e68c"],["lavender","#e6e6fa"],["lavenderblush","#fff0f5"],["lawngreen","#7cfc00"],["lemonchiffon","#fffacd"],["lightblue","#add8e6"],["lightcoral","#f08080"],["lightcyan","#e0ffff"],["lightgoldenrodyellow","#fafad2"],["lightgray","#d3d3d3"],["lightgreen","#90ee90"],["lightgrey","#d3d3d3"],["lightpink","#ffb6c1"],["lightsalmon","#ffa07a"],["lightseagreen","#20b2aa"],["lightskyblue","#87cefa"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#b0c4de"],["lightyellow","#ffffe0"],["limegreen","#32cd32"],["linen","#faf0e6"],["magenta","#ff00ff"],["mediumaquamarine","#66cdaa"],["mediumblue","#0000cd"],["mediumorchid","#ba55d3"],["mediumpurple","#9370db"],["mediumseagreen","#3cb371"],["mediumslateblue","#7b68ee"],["mediumspringgreen","#00fa9a"],["mediumturquoise","#48d1cc"],["mediumvioletred","#c71585"],["midnightblue","#191970"],["mintcream","#f5fffa"],["mistyrose","#ffe4e1"],["moccasin","#ffe4b5"],["navajowhite","#ffdead"],["oldlace","#fdf5e6"],["olivedrab","#6b8e23"],["orange","#ffa500"],["orangered","#ff4500"],["orchid","#da70d6"],["palegoldenrod","#eee8aa"],["palegreen","#98fb98"],["paleturquoise","#afeeee"],["palevioletred","#db7093"],["papayawhip","#ffefd5"],["peachpuff","#ffdab9"],["peru","#cd853f"],["pink","#ffc0cb"],["plum","#dda0dd"],["powderblue","#b0e0e6"],["rosybrown","#bc8f8f"],["royalblue","#4169e1"],["saddlebrown","#8b4513"],["salmon","#fa8072"],["sandybrown","#f4a460"],["seagreen","#2e8b57"],["seashell","#fff5ee"],["sienna","#a0522d"],["skyblue","#87ceeb"],["slateblue","#6a5acd"],["slategray","#708090"],["slategrey","#708090"],["snow","#fffafa"],["springgreen","#00ff7f"],["steelblue","#4682b4"],["tan","#d2b48c"],["thistle","#d8bfd8"],["tomato","#ff6347"],["turquoise","#40e0d0"],["violet","#ee82ee"],["wheat","#f5deb3"],["whitesmoke","#f5f5f5"],["yellowgreen","#9acd32"]]);t.default=o})(Qr),function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),t.getRgbValue=c,t.getRgbaValue=m,t.getOpacity=x,t.toRgb=$,t.toHex=S,t.getColorFromRgbValue=E,t.darken=B,t.lighten=A,t.fade=_,t.default=void 0;var a=o(Z.exports),r=o(Qr),n=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,i=/^(rgb|rgba|RGB|RGBA)/,l=/^(rgba|RGBA)/;function s(d){var p=n.test(d),b=i.test(d);return p||b?d:(d=f(d),d||(console.error("Color: Invalid color!"),!1))}function f(d){return d?r.default.has(d)?r.default.get(d):!1:(console.error("getColorByKeywords: Missing parameters!"),!1)}function c(d){if(!d)return console.error("getRgbValue: Missing parameters!"),!1;if(d=s(d),!d)return!1;var p=n.test(d),b=i.test(d),g=d.toLowerCase();if(p)return u(g);if(b)return v(g)}function u(d){return d=d.replace("#",""),d.length===3&&(d=Array.from(d).map(function(p){return p+p}).join("")),d=d.split(""),new Array(3).fill(0).map(function(p,b){return parseInt("0x".concat(d[b*2]).concat(d[b*2+1]))})}function v(d){return d.replace(/rgb\(|rgba\(|\)/g,"").split(",").slice(0,3).map(function(p){return parseInt(p)})}function m(d){if(!d)return console.error("getRgbaValue: Missing parameters!"),!1;var p=c(d);return p?(p.push(x(d)),p):!1}function x(d){if(!d)return console.error("getOpacity: Missing parameters!"),!1;if(d=s(d),!d)return!1;var p=l.test(d);return p?(d=d.toLowerCase(),Number(d.split(",").slice(-1)[0].replace(/[)|\s]/g,""))):1}function $(d,p){if(!d)return console.error("toRgb: Missing parameters!"),!1;var b=c(d);if(!b)return!1;var g=typeof p=="number";return g?"rgba("+b.join(",")+",".concat(p,")"):"rgb("+b.join(",")+")"}function S(d){return d?n.test(d)?d:(d=c(d),d?"#"+d.map(function(p){return Number(p).toString(16)}).map(function(p){return p==="0"?"00":p}).join(""):!1):(console.error("toHex: Missing parameters!"),!1)}function E(d){if(!d)return console.error("getColorFromRgbValue: Missing parameters!"),!1;var p=d.length;if(p!==3&&p!==4)return console.error("getColorFromRgbValue: Value is illegal!"),!1;var b=p===3?"rgb(":"rgba(";return b+=d.join(",")+")",b}function B(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!d)return console.error("darken: Missing parameters!"),!1;var b=m(d);return b?(b=b.map(function(g,y){return y===3?g:g-Math.ceil(2.55*p)}).map(function(g){return g<0?0:g}),E(b)):!1}function A(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!d)return console.error("lighten: Missing parameters!"),!1;var b=m(d);return b?(b=b.map(function(g,y){return y===3?g:g+Math.ceil(2.55*p)}).map(function(g){return g>255?255:g}),E(b)):!1}function _(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;if(!d)return console.error("fade: Missing parameters!"),!1;var b=c(d);if(!b)return!1;var g=[].concat((0,a.default)(b),[p/100]);return E(g)}var C={fade:_,toHex:S,toRgb:$,darken:B,lighten:A,getOpacity:x,getRgbValue:c,getRgbaValue:m,getColorFromRgbValue:E};t.default=C}(K);var et={},Yr={},ne={exports:{}},Kr={exports:{}};(function(t){function o(a){if(Array.isArray(a))return a}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(Kr);var Jr={exports:{}};(function(t){function o(a,r){var n=a==null?null:typeof Symbol!="undefined"&&a[Symbol.iterator]||a["@@iterator"];if(n!=null){var i=[],l=!0,s=!1,f,c;try{for(n=n.call(a);!(l=(f=n.next()).done)&&(i.push(f.value),!(r&&i.length===r));l=!0);}catch(u){s=!0,c=u}finally{try{!l&&n.return!=null&&n.return()}finally{if(s)throw c}}return i}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(Jr);var Zr={exports:{}};(function(t){function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(Zr),function(t){var o=Kr.exports,a=Jr.exports,r=cr.exports,n=Zr.exports;function i(l,s){return o(l)||a(l,s)||r(l,s)||n()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}(ne),function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),t.bezierCurveToPolyline=B,t.getBezierCurveLength=A,t.default=void 0;var a=o(ne.exports),r=o(Z.exports),n=Math.sqrt,i=Math.pow,l=Math.ceil,s=Math.abs,f=50;function c(C){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,p=C.length-1,b=C[0],g=C[p][2],y=C.slice(1),h=y.map(function(L,O){var G=O===0?b:y[O-1][2];return u.apply(void 0,[G].concat((0,r.default)(L)))}),P=new Array(p).fill(f),k=$(h,P),w=E(k,h,y,d);return w.segmentPoints.push(g),w}function u(C,d,p,b){return function(g){var y=1-g,h=i(y,3),P=i(y,2),k=i(g,3),w=i(g,2);return[C[0]*h+3*d[0]*g*P+3*p[0]*w*y+b[0]*k,C[1]*h+3*d[1]*g*P+3*p[1]*w*y+b[1]*k]}}function v(C,d){var p=(0,a.default)(C,2),b=p[0],g=p[1],y=(0,a.default)(d,2),h=y[0],P=y[1];return n(i(b-h,2)+i(g-P,2))}function m(C){return C.reduce(function(d,p){return d+p},0)}function x(C){return C.map(function(d,p){return new Array(d.length-1).fill(0).map(function(b,g){return v(d[g],d[g+1])})})}function $(C,d){return C.map(function(p,b){var g=1/d[b];return new Array(d[b]).fill("").map(function(y,h){return p(h*g)})})}function S(C,d){return C.map(function(p){return p.map(function(b){return s(b-d)})}).map(function(p){return m(p)}).reduce(function(p,b){return p+b},0)}function E(C,d,p,b){var g=4,y=1,h=function(){var w=C.reduce(function(W,j){return W+j.length},0);C.forEach(function(W,j){return W.push(p[j][2])});var L=x(C),O=L.reduce(function(W,j){return W+j.length},0),G=L.map(function(W){return m(W)}),R=m(G),V=R/O,N=S(L,V);if(N<=b)return"break";w=l(V/b*w*1.1);var M=G.map(function(W){return l(W/R*w)});C=$(d,M),w=C.reduce(function(W,j){return W+j.length},0);var F=JSON.parse(JSON.stringify(C));F.forEach(function(W,j){return W.push(p[j][2])}),L=x(F),O=L.reduce(function(W,j){return W+j.length},0),G=L.map(function(W){return m(W)}),R=m(G),V=R/O;var T=1/w/10;d.forEach(function(W,j){for(var q=M[j],X=new Array(q).fill("").map(function(Xe,Dr){return Dr/M[j]}),Q=0;Q<g;Q++)for(var ae=x([C[j]])[0],ye=ae.map(function(Xe){return Xe-V}),fe=0,le=0;le<q;le++){if(le===0)return;fe+=ye[le-1],X[le]-=T*fe,X[le]>1&&(X[le]=1),X[le]<0&&(X[le]=0),C[j][le]=W(X[le])}}),g*=4,y++};do{var P=h();if(P==="break")break}while(g<=1025);return C=C.reduce(function(k,w){return k.concat(w)},[]),{segmentPoints:C,cycles:y,rounds:g}}function B(C){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;if(!C)return console.error("bezierCurveToPolyline: Missing parameters!"),!1;if(!(C instanceof Array))return console.error("bezierCurveToPolyline: Parameter bezierCurve must be an array!"),!1;if(typeof d!="number")return console.error("bezierCurveToPolyline: Parameter precision must be a number!"),!1;var p=c(C,d),b=p.segmentPoints;return b}function A(C){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;if(!C)return console.error("getBezierCurveLength: Missing parameters!"),!1;if(!(C instanceof Array))return console.error("getBezierCurveLength: Parameter bezierCurve must be an array!"),!1;if(typeof d!="number")return console.error("getBezierCurveLength: Parameter precision must be a number!"),!1;var p=c(C,d),b=p.segmentPoints,g=x([b])[0],y=m(g);return y}var _=B;t.default=_}(Yr);var en={};(function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(ne.exports),r=o(Z.exports);function n(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.25,m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25;if(!(c instanceof Array))return console.error("polylineToBezierCurve: Parameter polyline must be an array!"),!1;if(c.length<=2)return console.error("polylineToBezierCurve: Converting to a curve requires at least 3 points!"),!1;var x=c[0],$=c.length-1,S=new Array($).fill(0).map(function(E,B){return[].concat((0,r.default)(i(c,B,u,v,m)),[c[B+1]])});return u&&l(S,x),S.unshift(c[0]),S}function i(c,u){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25,x=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.25,$=c.length;if(!($<3||u>=$)){var S=u-1;S<0&&(S=v?$+S:0);var E=u+1;E>=$&&(E=v?E-$:$-1);var B=u+2;B>=$&&(B=v?B-$:$-1);var A=c[S],_=c[u],C=c[E],d=c[B];return[[_[0]+m*(C[0]-A[0]),_[1]+m*(C[1]-A[1])],[C[0]-x*(d[0]-_[0]),C[1]-x*(d[1]-_[1])]]}}function l(c,u){var v=c[0],m=c.slice(-1)[0];return c.push([s(m[1],m[2]),s(v[0],u),u]),c}function s(c,u){var v=(0,a.default)(c,2),m=v[0],x=v[1],$=(0,a.default)(u,2),S=$[0],E=$[1],B=S-m,A=E-x;return[S+B,E+A]}var f=n;t.default=f})(en),function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bezierCurveToPolyline",{enumerable:!0,get:function(){return a.bezierCurveToPolyline}}),Object.defineProperty(t,"getBezierCurveLength",{enumerable:!0,get:function(){return a.getBezierCurveLength}}),Object.defineProperty(t,"polylineToBezierCurve",{enumerable:!0,get:function(){return r.default}}),t.default=void 0;var a=Yr,r=o(en),n={bezierCurveToPolyline:a.bezierCurveToPolyline,getBezierCurveLength:a.getBezierCurveLength,polylineToBezierCurve:r.default};t.default=n}(et);var ee={},oe={exports:{}};(function(t){function o(a){return t.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t.exports.__esModule=!0,t.exports.default=t.exports,o(a)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(oe),function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=m,t.eliminateBlur=x,t.checkPointIsInCircle=$,t.getTwoPointDistance=S,t.checkPointIsInPolygon=E,t.checkPointIsInSector=B,t.checkPointIsNearPolyline=_,t.checkPointIsInRect=C,t.getRotatePointPos=d,t.getScalePointPos=p,t.getTranslatePointPos=b,t.getDistanceBetweenPointAndLine=g,t.getCircleRadianPoint=y,t.getRegularPolygonPoints=h,t.default=void 0;var a=o(Z.exports),r=o(ne.exports),n=o(oe.exports),i=Math.abs,l=Math.sqrt,s=Math.sin,f=Math.cos,c=Math.max,u=Math.min,v=Math.PI;function m(k){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!k)return k;var L=JSON.parse,O=JSON.stringify;if(!w)return L(O(k));var G=k instanceof Array?[]:{};if(k&&(0,n.default)(k)==="object")for(var R in k)k.hasOwnProperty(R)&&(k[R]&&(0,n.default)(k[R])==="object"?G[R]=m(k[R],!0):G[R]=k[R]);return G}function x(k){return k.map(function(w){var L=(0,r.default)(w,2),O=L[0],G=L[1];return[parseInt(O)+.5,parseInt(G)+.5]})}function $(k,w,L,O){return S(k,[w,L])<=O}function S(k,w){var L=(0,r.default)(k,2),O=L[0],G=L[1],R=(0,r.default)(w,2),V=R[0],N=R[1],M=i(O-V),F=i(G-N);return l(M*M+F*F)}function E(k,w){for(var L=0,O=(0,r.default)(k,2),G=O[0],R=O[1],V=w.length,N=1,M=w[0];N<=V;N++){var F=w[N%V];if(G>u(M[0],F[0])&&G<=c(M[0],F[0])&&R<=c(M[1],F[1])&&M[0]!==F[0]){var T=(G-M[0])*(F[1]-M[1])/(F[0]-M[0])+M[1];(M[1]===F[1]||R<=T)&&L++}M=F}return L%2===1}function B(k,w,L,O,G,R,V){if(!k||S(k,[w,L])>O)return!1;if(!V){var N=m([R,G]),M=(0,r.default)(N,2);G=M[0],R=M[1]}var F=G>R;if(F){var T=[R,G];G=T[0],R=T[1]}var W=R-G;if(W>=v*2)return!0;var j=(0,r.default)(k,2),q=j[0],X=j[1],Q=y(w,L,O,G),ae=(0,r.default)(Q,2),ye=ae[0],fe=ae[1],le=y(w,L,O,R),Xe=(0,r.default)(le,2),Dr=Xe[0],u0=Xe[1],Ya=[q-w,X-L],Fr=[ye-w,fe-L],Rr=[Dr-w,u0-L],Ka=W>v;if(Ka){var h0=m([Rr,Fr]),Ja=(0,r.default)(h0,2);Fr=Ja[0],Rr=Ja[1]}var Qe=A(Fr,Ya)&&!A(Rr,Ya);return Ka&&(Qe=!Qe),F&&(Qe=!Qe),Qe}function A(k,w){var L=(0,r.default)(k,2),O=L[0],G=L[1],R=(0,r.default)(w,2),V=R[0],N=R[1];return-G*V+O*N>0}function _(k,w,L){var O=L/2,G=w.map(function(N){var M=(0,r.default)(N,2),F=M[0],T=M[1];return[F,T-O]}),R=w.map(function(N){var M=(0,r.default)(N,2),F=M[0],T=M[1];return[F,T+O]}),V=[].concat((0,a.default)(G),(0,a.default)(R.reverse()));return E(k,V)}function C(k,w,L,O,G){var R=(0,r.default)(k,2),V=R[0],N=R[1];return!(V<w||N<L||V>w+O||N>L+G)}function d(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,w=arguments.length>1?arguments[1]:void 0,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0];if(!w)return!1;if(k%360===0)return w;var O=(0,r.default)(w,2),G=O[0],R=O[1],V=(0,r.default)(L,2),N=V[0],M=V[1];return k*=v/180,[(G-N)*f(k)-(R-M)*s(k)+N,(G-N)*s(k)+(R-M)*f(k)+M]}function p(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[1,1],w=arguments.length>1?arguments[1]:void 0,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0];if(!w)return!1;if(k===1)return w;var O=(0,r.default)(w,2),G=O[0],R=O[1],V=(0,r.default)(L,2),N=V[0],M=V[1],F=(0,r.default)(k,2),T=F[0],W=F[1],j=G-N,q=R-M;return[j*T+N,q*W+M]}function b(k,w){if(!k||!w)return!1;var L=(0,r.default)(w,2),O=L[0],G=L[1],R=(0,r.default)(k,2),V=R[0],N=R[1];return[O+V,G+N]}function g(k,w,L){if(!k||!w||!L)return!1;var O=(0,r.default)(k,2),G=O[0],R=O[1],V=(0,r.default)(w,2),N=V[0],M=V[1],F=(0,r.default)(L,2),T=F[0],W=F[1],j=W-M,q=N-T,X=M*(T-N)-N*(W-M),Q=i(j*G+q*R+X),ae=l(j*j+q*q);return Q/ae}function y(k,w,L,O){return[k+f(O)*L,w+s(O)*L]}function h(k,w,L,O){var G=arguments.length>4&&arguments[4]!==void 0?arguments[4]:v*-.5,R=v*2/O,V=new Array(O).fill("").map(function(N,M){return M*R+G});return V.map(function(N){return y(k,w,L,N)})}var P={deepClone:m,eliminateBlur:x,checkPointIsInCircle:$,checkPointIsInPolygon:E,checkPointIsInSector:B,checkPointIsNearPolyline:_,getTwoPointDistance:S,getRotatePointPos:d,getScalePointPos:p,getTranslatePointPos:b,getCircleRadianPoint:y,getRegularPolygonPoints:h,getDistanceBetweenPointAndLine:g};t.default=P}(ee);var tt={},tn={};(function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),t.drawPolylinePath=r,t.drawBezierCurvePath=n,t.default=void 0;var a=o(Z.exports);function r(l,s){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!l||s.length<2)return!1;f&&l.beginPath(),s.forEach(function(u,v){return u&&(v===0?l.moveTo.apply(l,(0,a.default)(u)):l.lineTo.apply(l,(0,a.default)(u)))}),c&&l.closePath()}function n(l,s){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(!l||!s)return!1;c&&l.beginPath(),f&&l.moveTo.apply(l,(0,a.default)(f)),s.forEach(function(v){return v&&l.bezierCurveTo.apply(l,(0,a.default)(v[0]).concat((0,a.default)(v[1]),(0,a.default)(v[2])))}),u&&l.closePath()}var i={drawPolylinePath:r,drawBezierCurvePath:n};t.default=i})(tn),function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),t.extendNewGraph=p,t.default=t.text=t.bezierCurve=t.smoothline=t.polyline=t.regPolygon=t.sector=t.arc=t.ring=t.rect=t.ellipse=t.circle=void 0;var a=o(Z.exports),r=o(ne.exports),n=o(et),i=ee,l=tn,s=n.default.polylineToBezierCurve,f=n.default.bezierCurveToPolyline,c={shape:{rx:0,ry:0,r:0},validator:function(g){var y=g.shape,h=y.rx,P=y.ry,k=y.r;return typeof h!="number"||typeof P!="number"||typeof k!="number"?(console.error("Circle shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,P=y.shape;h.beginPath();var k=P.rx,w=P.ry,L=P.r;h.arc(k,w,L>0?L:.01,0,Math.PI*2),h.fill(),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,P=h.rx,k=h.ry,w=h.r;return(0,i.checkPointIsInCircle)(g,P,k,w)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry;P.graphCenter=[k,w]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+P})}};t.circle=c;var u={shape:{rx:0,ry:0,hr:0,vr:0},validator:function(g){var y=g.shape,h=y.rx,P=y.ry,k=y.hr,w=y.vr;return typeof h!="number"||typeof P!="number"||typeof k!="number"||typeof w!="number"?(console.error("Ellipse shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,P=y.shape;h.beginPath();var k=P.rx,w=P.ry,L=P.hr,O=P.vr;h.ellipse(k,w,L>0?L:.01,O>0?O:.01,0,0,Math.PI*2),h.fill(),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,P=h.rx,k=h.ry,w=h.hr,L=h.vr,O=Math.max(w,L),G=Math.min(w,L),R=Math.sqrt(O*O-G*G),V=[P-R,k],N=[P+R,k],M=(0,i.getTwoPointDistance)(g,V)+(0,i.getTwoPointDistance)(g,N);return M<=2*O},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry;P.graphCenter=[k,w]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+P})}};t.ellipse=u;var v={shape:{x:0,y:0,w:0,h:0},validator:function(g){var y=g.shape,h=y.x,P=y.y,k=y.w,w=y.h;return typeof h!="number"||typeof P!="number"||typeof k!="number"||typeof w!="number"?(console.error("Rect shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,P=y.shape;h.beginPath();var k=P.x,w=P.y,L=P.w,O=P.h;h.rect(k,w,L,O),h.fill(),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,P=h.x,k=h.y,w=h.w,L=h.h;return(0,i.checkPointIsInRect)(g,P,k,w,L)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.x,w=h.y,L=h.w,O=h.h;P.graphCenter=[k+L/2,w+O/2]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape;this.attr("shape",{x:k.x+h,y:k.y+P})}};t.rect=v;var m={shape:{rx:0,ry:0,r:0},validator:function(g){var y=g.shape,h=y.rx,P=y.ry,k=y.r;return typeof h!="number"||typeof P!="number"||typeof k!="number"?(console.error("Ring shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,P=y.shape;h.beginPath();var k=P.rx,w=P.ry,L=P.r;h.arc(k,w,L>0?L:.01,0,Math.PI*2),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry,L=h.r,O=P.lineWidth,G=O/2,R=L-G,V=L+G,N=(0,i.getTwoPointDistance)(g,[k,w]);return N>=R&&N<=V},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry;P.graphCenter=[k,w]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+P})}};t.ring=m;var x={shape:{rx:0,ry:0,r:0,startAngle:0,endAngle:0,clockWise:!0},validator:function(g){var y=g.shape,h=["rx","ry","r","startAngle","endAngle"];return h.find(function(P){return typeof y[P]!="number"})?(console.error("Arc shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,P=y.shape;h.beginPath();var k=P.rx,w=P.ry,L=P.r,O=P.startAngle,G=P.endAngle,R=P.clockWise;h.arc(k,w,L>0?L:.001,O,G,!R),h.stroke(),h.closePath()},hoverCheck:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry,L=h.r,O=h.startAngle,G=h.endAngle,R=h.clockWise,V=P.lineWidth,N=V/2,M=L-N,F=L+N;return!(0,i.checkPointIsInSector)(g,k,w,M,O,G,R)&&(0,i.checkPointIsInSector)(g,k,w,F,O,G,R)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry;P.graphCenter=[k,w]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape;this.attr("shape",{rx:k.rx+h,ry:k.ry+P})}};t.arc=x;var $={shape:{rx:0,ry:0,r:0,startAngle:0,endAngle:0,clockWise:!0},validator:function(g){var y=g.shape,h=["rx","ry","r","startAngle","endAngle"];return h.find(function(P){return typeof y[P]!="number"})?(console.error("Sector shape configuration is abnormal!"),!1):!0},draw:function(g,y){var h=g.ctx,P=y.shape;h.beginPath();var k=P.rx,w=P.ry,L=P.r,O=P.startAngle,G=P.endAngle,R=P.clockWise;h.arc(k,w,L>0?L:.01,O,G,!R),h.lineTo(k,w),h.closePath(),h.stroke(),h.fill()},hoverCheck:function(g,y){var h=y.shape,P=h.rx,k=h.ry,w=h.r,L=h.startAngle,O=h.endAngle,G=h.clockWise;return(0,i.checkPointIsInSector)(g,P,k,w,L,O,G)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry;P.graphCenter=[k,w]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape,w=k.rx,L=k.ry;this.attr("shape",{rx:w+h,ry:L+P})}};t.sector=$;var S={shape:{rx:0,ry:0,r:0,side:0},validator:function(g){var y=g.shape,h=y.side,P=["rx","ry","r","side"];return P.find(function(k){return typeof y[k]!="number"})?(console.error("RegPolygon shape configuration is abnormal!"),!1):h<3?(console.error("RegPolygon at least trigon!"),!1):!0},draw:function(g,y){var h=g.ctx,P=y.shape,k=y.cache;h.beginPath();var w=P.rx,L=P.ry,O=P.r,G=P.side;if(!k.points||k.rx!==w||k.ry!==L||k.r!==O||k.side!==G){var R=(0,i.getRegularPolygonPoints)(w,L,O,G);Object.assign(k,{points:R,rx:w,ry:L,r:O,side:G})}var V=k.points;(0,l.drawPolylinePath)(h,V),h.closePath(),h.stroke(),h.fill()},hoverCheck:function(g,y){var h=y.cache,P=h.points;return(0,i.checkPointIsInPolygon)(g,P)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.rx,w=h.ry;P.graphCenter=[k,w]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape,w=y.cache,L=k.rx,O=k.ry;w.rx+=h,w.ry+=P,this.attr("shape",{rx:L+h,ry:O+P}),w.points=w.points.map(function(G){var R=(0,r.default)(G,2),V=R[0],N=R[1];return[V+h,N+P]})}};t.regPolygon=S;var E={shape:{points:[],close:!1},validator:function(g){var y=g.shape,h=y.points;return h instanceof Array?!0:(console.error("Polyline points should be an array!"),!1)},draw:function(g,y){var h=g.ctx,P=y.shape,k=y.style.lineWidth;h.beginPath();var w=P.points,L=P.close;k===1&&(w=(0,i.eliminateBlur)(w)),(0,l.drawPolylinePath)(h,w),L&&(h.closePath(),h.fill()),h.stroke()},hoverCheck:function(g,y){var h=y.shape,P=y.style,k=h.points,w=h.close,L=P.lineWidth;return w?(0,i.checkPointIsInPolygon)(g,k):(0,i.checkPointIsNearPolyline)(g,k,L)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.points;P.graphCenter=k[0]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape,w=k.points,L=w.map(function(O){var G=(0,r.default)(O,2),R=G[0],V=G[1];return[R+h,V+P]});this.attr("shape",{points:L})}};t.polyline=E;var B={shape:{points:[],close:!1},validator:function(g){var y=g.shape,h=y.points;return h instanceof Array?!0:(console.error("Smoothline points should be an array!"),!1)},draw:function(g,y){var h=g.ctx,P=y.shape,k=y.cache,w=P.points,L=P.close;if(!k.points||k.points.toString()!==w.toString()){var O=s(w,L),G=f(O);Object.assign(k,{points:(0,i.deepClone)(w,!0),bezierCurve:O,hoverPoints:G})}var R=k.bezierCurve;h.beginPath(),(0,l.drawBezierCurvePath)(h,R.slice(1),R[0]),L&&(h.closePath(),h.fill()),h.stroke()},hoverCheck:function(g,y){var h=y.cache,P=y.shape,k=y.style,w=h.hoverPoints,L=P.close,O=k.lineWidth;return L?(0,i.checkPointIsInPolygon)(g,w):(0,i.checkPointIsNearPolyline)(g,w,O)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.points;P.graphCenter=k[0]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape,w=y.cache,L=k.points,O=L.map(function(M){var F=(0,r.default)(M,2),T=F[0],W=F[1];return[T+h,W+P]});w.points=O;var G=(0,r.default)(w.bezierCurve[0],2),R=G[0],V=G[1],N=w.bezierCurve.slice(1);w.bezierCurve=[[R+h,V+P]].concat((0,a.default)(N.map(function(M){return M.map(function(F){var T=(0,r.default)(F,2),W=T[0],j=T[1];return[W+h,j+P]})}))),w.hoverPoints=w.hoverPoints.map(function(M){var F=(0,r.default)(M,2),T=F[0],W=F[1];return[T+h,W+P]}),this.attr("shape",{points:O})}};t.smoothline=B;var A={shape:{points:[],close:!1},validator:function(g){var y=g.shape,h=y.points;return h instanceof Array?!0:(console.error("BezierCurve points should be an array!"),!1)},draw:function(g,y){var h=g.ctx,P=y.shape,k=y.cache,w=P.points,L=P.close;if(!k.points||k.points.toString()!==w.toString()){var O=f(w,20);Object.assign(k,{points:(0,i.deepClone)(w,!0),hoverPoints:O})}h.beginPath(),(0,l.drawBezierCurvePath)(h,w.slice(1),w[0]),L&&(h.closePath(),h.fill()),h.stroke()},hoverCheck:function(g,y){var h=y.cache,P=y.shape,k=y.style,w=h.hoverPoints,L=P.close,O=k.lineWidth;return L?(0,i.checkPointIsInPolygon)(g,w):(0,i.checkPointIsNearPolyline)(g,w,O)},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.points;P.graphCenter=k[0]},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape,w=y.cache,L=k.points,O=(0,r.default)(L[0],2),G=O[0],R=O[1],V=L.slice(1),N=[[G+h,R+P]].concat((0,a.default)(V.map(function(M){return M.map(function(F){var T=(0,r.default)(F,2),W=T[0],j=T[1];return[W+h,j+P]})})));w.points=N,w.hoverPoints=w.hoverPoints.map(function(M){var F=(0,r.default)(M,2),T=F[0],W=F[1];return[T+h,W+P]}),this.attr("shape",{points:N})}};t.bezierCurve=A;var _={shape:{content:"",position:[],maxWidth:void 0,rowGap:0},validator:function(g){var y=g.shape,h=y.content,P=y.position,k=y.rowGap;return typeof h!="string"?(console.error("Text content should be a string!"),!1):P instanceof Array?typeof k!="number"?(console.error("Text rowGap should be a number!"),!1):!0:(console.error("Text position should be an array!"),!1)},draw:function(g,y){var h=g.ctx,P=y.shape,k=P.content,w=P.position,L=P.maxWidth,O=P.rowGap,G=h.textBaseline,R=h.font,V=parseInt(R.replace(/\D/g,"")),N=w,M=(0,r.default)(N,2),F=M[0],T=M[1];k=k.split(` `);var W=k.length,j=V+O,q=W*j-O,X=0;G==="middle"&&(X=q/2,T+=V/2),G==="bottom"&&(X=q,T+=V),w=new Array(W).fill(0).map(function(Q,ae){return[F,T+ae*j-X]}),h.beginPath(),k.forEach(function(Q,ae){h.fillText.apply(h,[Q].concat((0,a.default)(w[ae]),[L])),h.strokeText.apply(h,[Q].concat((0,a.default)(w[ae]),[L]))}),h.closePath()},hoverCheck:function(g,y){return y.shape,y.style,!1},setGraphCenter:function(g,y){var h=y.shape,P=y.style,k=h.position;P.graphCenter=(0,a.default)(k)},move:function(g,y){var h=g.movementX,P=g.movementY,k=y.shape,w=(0,r.default)(k.position,2),L=w[0],O=w[1];this.attr("shape",{position:[L+h,O+P]})}};t.text=_;var C=new Map([["circle",c],["ellipse",u],["rect",v],["ring",m],["arc",x],["sector",$],["regPolygon",S],["polyline",E],["smoothline",B],["bezierCurve",A],["text",_]]),d=C;t.default=d;function p(b,g){if(!b||!g){console.error("ExtendNewGraph Missing Parameters!");return}if(!g.shape){console.error("Required attribute of shape to extendNewGraph!");return}if(!g.validator){console.error("Required function of validator to extendNewGraph!");return}if(!g.draw){console.error("Required function of draw to extendNewGraph!");return}C.set(b,g)}}(tt);var rn={},nn={exports:{}};(function(t){var o=function(a){var r=Object.prototype,n=r.hasOwnProperty,i,l=typeof Symbol=="function"?Symbol:{},s=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function u(V,N,M){return Object.defineProperty(V,N,{value:M,enumerable:!0,configurable:!0,writable:!0}),V[N]}try{u({},"")}catch{u=function(N,M,F){return N[M]=F}}function v(V,N,M,F){var T=N&&N.prototype instanceof A?N:A,W=Object.create(T.prototype),j=new O(F||[]);return W._invoke=P(V,M,j),W}a.wrap=v;function m(V,N,M){try{return{type:"normal",arg:V.call(N,M)}}catch(F){return{type:"throw",arg:F}}}var x="suspendedStart",$="suspendedYield",S="executing",E="completed",B={};function A(){}function _(){}function C(){}var d={};u(d,s,function(){return this});var p=Object.getPrototypeOf,b=p&&p(p(G([])));b&&b!==r&&n.call(b,s)&&(d=b);var g=C.prototype=A.prototype=Object.create(d);_.prototype=C,u(g,"constructor",C),u(C,"constructor",_),_.displayName=u(C,c,"GeneratorFunction");function y(V){["next","throw","return"].forEach(function(N){u(V,N,function(M){return this._invoke(N,M)})})}a.isGeneratorFunction=function(V){var N=typeof V=="function"&&V.constructor;return N?N===_||(N.displayName||N.name)==="GeneratorFunction":!1},a.mark=function(V){return Object.setPrototypeOf?Object.setPrototypeOf(V,C):(V.__proto__=C,u(V,c,"GeneratorFunction")),V.prototype=Object.create(g),V},a.awrap=function(V){return{__await:V}};function h(V,N){function M(W,j,q,X){var Q=m(V[W],V,j);if(Q.type==="throw")X(Q.arg);else{var ae=Q.arg,ye=ae.value;return ye&&typeof ye=="object"&&n.call(ye,"__await")?N.resolve(ye.__await).then(function(fe){M("next",fe,q,X)},function(fe){M("throw",fe,q,X)}):N.resolve(ye).then(function(fe){ae.value=fe,q(ae)},function(fe){return M("throw",fe,q,X)})}}var F;function T(W,j){function q(){return new N(function(X,Q){M(W,j,X,Q)})}return F=F?F.then(q,q):q()}this._invoke=T}y(h.prototype),u(h.prototype,f,function(){return this}),a.AsyncIterator=h,a.async=function(V,N,M,F,T){T===void 0&&(T=Promise);var W=new h(v(V,N,M,F),T);return a.isGeneratorFunction(N)?W:W.next().then(function(j){return j.done?j.value:W.next()})};function P(V,N,M){var F=x;return function(W,j){if(F===S)throw new Error("Generator is already running");if(F===E){if(W==="throw")throw j;return R()}for(M.method=W,M.arg=j;;){var q=M.delegate;if(q){var X=k(q,M);if(X){if(X===B)continue;return X}}if(M.method==="next")M.sent=M._sent=M.arg;else if(M.method==="throw"){if(F===x)throw F=E,M.arg;M.dispatchException(M.arg)}else M.method==="return"&&M.abrupt("return",M.arg);F=S;var Q=m(V,N,M);if(Q.type==="normal"){if(F=M.done?E:$,Q.arg===B)continue;return{value:Q.arg,done:M.done}}else Q.type==="throw"&&(F=E,M.method="throw",M.arg=Q.arg)}}}function k(V,N){var M=V.iterator[N.method];if(M===i){if(N.delegate=null,N.method==="throw"){if(V.iterator.return&&(N.method="return",N.arg=i,k(V,N),N.method==="throw"))return B;N.method="throw",N.arg=new TypeError("The iterator does not provide a 'throw' method")}return B}var F=m(M,V.iterator,N.arg);if(F.type==="throw")return N.method="throw",N.arg=F.arg,N.delegate=null,B;var T=F.arg;if(!T)return N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,B;if(T.done)N[V.resultName]=T.value,N.next=V.nextLoc,N.method!=="return"&&(N.method="next",N.arg=i);else return T;return N.delegate=null,B}y(g),u(g,c,"Generator"),u(g,s,function(){return this}),u(g,"toString",function(){return"[object Generator]"});function w(V){var N={tryLoc:V[0]};1 in V&&(N.catchLoc=V[1]),2 in V&&(N.finallyLoc=V[2],N.afterLoc=V[3]),this.tryEntries.push(N)}function L(V){var N=V.completion||{};N.type="normal",delete N.arg,V.completion=N}function O(V){this.tryEntries=[{tryLoc:"root"}],V.forEach(w,this),this.reset(!0)}a.keys=function(V){var N=[];for(var M in V)N.push(M);return N.reverse(),function F(){for(;N.length;){var T=N.pop();if(T in V)return F.value=T,F.done=!1,F}return F.done=!0,F}};function G(V){if(V){var N=V[s];if(N)return N.call(V);if(typeof V.next=="function")return V;if(!isNaN(V.length)){var M=-1,F=function T(){for(;++M<V.length;)if(n.call(V,M))return T.value=V[M],T.done=!1,T;return T.value=i,T.done=!0,T};return F.next=F}}return{next:R}}a.values=G;function R(){return{value:i,done:!0}}return O.prototype={constructor:O,reset:function(V){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(L),!V)for(var N in this)N.charAt(0)==="t"&&n.call(this,N)&&!isNaN(+N.slice(1))&&(this[N]=i)},stop:function(){this.done=!0;var V=this.tryEntries[0],N=V.completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(V){if(this.done)throw V;var N=this;function M(X,Q){return W.type="throw",W.arg=V,N.next=X,Q&&(N.method="next",N.arg=i),!!Q}for(var F=this.tryEntries.length-1;F>=0;--F){var T=this.tryEntries[F],W=T.completion;if(T.tryLoc==="root")return M("end");if(T.tryLoc<=this.prev){var j=n.call(T,"catchLoc"),q=n.call(T,"finallyLoc");if(j&&q){if(this.prev<T.catchLoc)return M(T.catchLoc,!0);if(this.prev<T.finallyLoc)return M(T.finallyLoc)}else if(j){if(this.prev<T.catchLoc)return M(T.catchLoc,!0)}else if(q){if(this.prev<T.finallyLoc)return M(T.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(V,N){for(var M=this.tryEntries.length-1;M>=0;--M){var F=this.tryEntries[M];if(F.tryLoc<=this.prev&&n.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var T=F;break}}T&&(V==="break"||V==="continue")&&T.tryLoc<=N&&N<=T.finallyLoc&&(T=null);var W=T?T.completion:{};return W.type=V,W.arg=N,T?(this.method="next",this.next=T.finallyLoc,B):this.complete(W)},complete:function(V,N){if(V.type==="throw")throw V.arg;return V.type==="break"||V.type==="continue"?this.next=V.arg:V.type==="return"?(this.rval=this.arg=V.arg,this.method="return",this.next="end"):V.type==="normal"&&N&&(this.next=N),B},finish:function(V){for(var N=this.tryEntries.length-1;N>=0;--N){var M=this.tryEntries[N];if(M.finallyLoc===V)return this.complete(M.completion,M.afterLoc),L(M),B}},catch:function(V){for(var N=this.tryEntries.length-1;N>=0;--N){var M=this.tryEntries[N];if(M.tryLoc===V){var F=M.completion;if(F.type==="throw"){var T=F.arg;L(M)}return T}}throw new Error("illegal catch attempt")},delegateYield:function(V,N,M){return this.delegate={iterator:G(V),resultName:N,nextLoc:M},this.method==="next"&&(this.arg=i),B}},a}(t.exports);try{regeneratorRuntime=o}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}})(nn);var _o=nn.exports,an={exports:{}};(function(t){function o(r,n,i,l,s,f,c){try{var u=r[f](c),v=u.value}catch(m){i(m);return}u.done?n(v):Promise.resolve(v).then(l,s)}function a(r){return function(){var n=this,i=arguments;return new Promise(function(l,s){var f=r.apply(n,i);function c(v){o(f,l,s,c,u,"next",v)}function u(v){o(f,l,s,c,u,"throw",v)}c(void 0)})}}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports})(an);var on={};(function(t){var o=U.exports;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(Z.exports),r=o(we.exports),n=K,i=ee,l=function x($){(0,r.default)(this,x),this.colorProcessor($);var S={fill:[0,0,0,1],stroke:[0,0,0,0],opacity:1,lineCap:null,lineJoin:null,lineDash:null,lineDashOffset:null,shadowBlur:0,shadowColor:[0,0,0,0],shadowOffsetX:0,shadowOffsetY:0,lineWidth:0,graphCenter:null,scale:null,rotate:null,translate:null,hoverCursor:"pointer",fontStyle:"normal",fontVarient:"normal",fontWeight:"normal",fontSize:10,fontFamily:"Arial",textAlign:"center",textBaseline:"middle",gradientColor:null,gradientType:"linear",gradientParams:null,gradientWith:"stroke",gradientStops:"auto",colors:null};Object.assign(this,S,$)};t.default=l,l.prototype.colorProcessor=function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=$?n.getColorFromRgbValue:n.getRgbaValue,E=["fill","stroke","shadowColor"],B=Object.keys(x),A=B.filter(function(p){return E.find(function(b){return b===p})});A.forEach(function(p){return x[p]=S(x[p])});var _=x.gradientColor,C=x.colors;if(_&&(x.gradientColor=_.map(function(p){return S(p)})),C){var d=Object.keys(C);d.forEach(function(p){return C[p]=S(C[p])})}},l.prototype.initStyle=function(x){s(x,this),c(x,this),u(x,this)};function s(x,$){x.save();var S=$.graphCenter,E=$.rotate,B=$.scale,A=$.translate;S instanceof Array&&(x.translate.apply(x,(0,a.default)(S)),E&&x.rotate(E*Math.PI/180),B instanceof Array&&x.scale.apply(x,(0,a.default)(B)),A&&x.translate.apply(x,(0,a.default)(A)),x.translate(-S[0],-S[1]))}var f=["lineCap","lineJoin","lineDashOffset","shadowOffsetX","shadowOffsetY","lineWidth","textAlign","textBaseline"];function c(x,$){var S=$.fill,E=$.stroke,B=$.shadowColor,A=$.opacity;f.forEach(function(h){(h||typeof h=="number")&&(x[h]=$[h])}),S=(0,a.default)(S),E=(0,a.default)(E),B=(0,a.default)(B),S[3]*=A,E[3]*=A,B[3]*=A,x.fillStyle=(0,n.getColorFromRgbValue)(S),x.strokeStyle=(0,n.getColorFromRgbValue)(E),x.shadowColor=(0,n.getColorFromRgbValue)(B);var _=$.lineDash,C=$.shadowBlur;_&&(_=_.map(function(h){return h>=0?h:0}),x.setLineDash(_)),typeof C=="number"&&(x.shadowBlur=C>0?C:.001);var d=$.fontStyle,p=$.fontVarient,b=$.fontWeight,g=$.fontSize,y=$.fontFamily;x.font=d+" "+p+" "+b+" "+g+"px "+y}function u(