!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.G=n():t.G=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=55)}([function(t,n,e){"use strict";e.d(n,"g",(function(){return y})),e.d(n,"j",(function(){return l})),e.d(n,"k",(function(){return p})),e.d(n,"m",(function(){return m})),e.d(n,"o",(function(){return b})),e.d(n,"q",(function(){return P})),e.d(n,"b",(function(){return c})),e.d(n,"d",(function(){return o})),e.d(n,"e",(function(){return u})),e.d(n,"f",(function(){return g})),e.d(n,"h",(function(){return s})),e.d(n,"i",(function(){return v})),e.d(n,"a",(function(){return f})),e.d(n,"c",(function(){return C})),e.d(n,"l",(function(){return A})),e.d(n,"p",(function(){return j})),e.d(n,"n",(function(){return k}));var r=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i={}.toString,a=function(t,n){return i.call(t)==="[object "+n+"]"},o=function(t){return a(t,"Function")},u=function(t){return null==t},c=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},s=function(t){var n=typeof t;return null!==t&&"object"===n||"function"===n};var f=function(t,n){if(t)if(c(t))for(var e=0,r=t.length;e0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t}function ct(t,n){return t[0]*n[0]+t[1]*n[1]}function st(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t}function ft(t,n,e,r){var i=n[0],a=n[1];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t}function ht(t,n){n=n||1;var e=2*o()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t}function lt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i,t[1]=e[1]*r+e[3]*i,t}function pt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i+e[4],t[1]=e[1]*r+e[3]*i+e[5],t}function dt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[3]*i+e[6],t[1]=e[1]*r+e[4]*i+e[7],t}function vt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[4]*i+e[12],t[1]=e[1]*r+e[5]*i+e[13],t}function gt(t,n,e,r){var i=n[0]-e[0],a=n[1]-e[1],o=Math.sin(r),u=Math.cos(r);return t[0]=i*u-a*o+e[0],t[1]=i*o+a*u+e[1],t}function yt(t,n){var e=t[0],r=t[1],i=n[0],a=n[1],o=Math.sqrt(e*e+r*r)*Math.sqrt(i*i+a*a),u=o&&(e*i+r*a)/o;return Math.acos(Math.min(Math.max(u,-1),1))}function mt(t){return t[0]=0,t[1]=0,t}function xt(t){return"vec2("+t[0]+", "+t[1]+")"}function bt(t,n){return t[0]===n[0]&&t[1]===n[1]}function Mt(t,n){var e=t[0],r=t[1],i=n[0],a=n[1];return Math.abs(e-i)<=1e-6*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))}var wt,Pt=rt,_t=$,At=V,Ot=H,Ct=nt,St=et,jt=it,kt=(wt=N(),function(t,n,e,r,i,a){var o,u;for(n||(n=2),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,o=e;o0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t}function ut(t,n){return t[0]*n[0]+t[1]*n[1]}function ct(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t}function st(t,n,e,r){var i=n[0],a=n[1];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t}function ft(t,n){n=n||1;var e=2*a.c()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t}function ht(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i,t[1]=e[1]*r+e[3]*i,t}function lt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i+e[4],t[1]=e[1]*r+e[3]*i+e[5],t}function pt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[3]*i+e[6],t[1]=e[1]*r+e[4]*i+e[7],t}function dt(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[4]*i+e[12],t[1]=e[1]*r+e[5]*i+e[13],t}function vt(t,n,e,r){var i=n[0]-e[0],a=n[1]-e[1],o=Math.sin(r),u=Math.cos(r);return t[0]=i*u-a*o+e[0],t[1]=i*o+a*u+e[1],t}function gt(t,n){var e=t[0],r=t[1],i=n[0],a=n[1],o=Math.sqrt(e*e+r*r)*Math.sqrt(i*i+a*a),u=o&&(e*i+r*a)/o;return Math.acos(Math.min(Math.max(u,-1),1))}function yt(t){return t[0]=0,t[1]=0,t}function mt(t){return"vec2("+t[0]+", "+t[1]+")"}function xt(t,n){return t[0]===n[0]&&t[1]===n[1]}function bt(t,n){var e=t[0],r=t[1],i=n[0],o=n[1];return Math.abs(e-i)<=a.b*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-o)<=a.b*Math.max(1,Math.abs(r),Math.abs(o))}var Mt,wt=et,Pt=W,_t=$,At=V,Ot=tt,Ct=nt,St=rt,jt=(Mt=X(),function(t,n,e,r,i,a){var o,u;for(n||(n=2),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,o=e;o-1},a=function(t,n){if(!r(t))return t;for(var e=[],i=0;i-1;)S.call(t,a,1);return t},T=Array.prototype.splice,E=function(t,n){if(!r(t))return[];for(var e=t?n.length:0,i=e-1;e--;){var a=void 0,o=n[e];e!==i&&o===a||(a=o,T.call(t,o,1))}return t},B=function(t,n,e){if(!h(t)&&!y(t))return t;var r=e;return p(t,(function(t,e){r=n(r,t,e)})),r},I=function(t,n){var e=[];if(!r(t))return e;for(var i=-1,a=[],o=t.length;++in[i])return 1;if(t[i]e?e:t},et=function(t,n){var e=n.toString(),r=e.indexOf(".");if(-1===r)return Math.round(t);var i=e.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},rt=function(t){return c(t,"Number")},it=function(t){return rt(t)&&t%1!=0},at=function(t){return rt(t)&&t%2==0},ot=Number.isInteger?Number.isInteger:function(t){return rt(t)&&t%1==0},ut=function(t){return rt(t)&&t<0};function ct(t,n,e){return void 0===e&&(e=1e-5),Math.abs(t-n)0},ht=function(t,n){if(h(t)){for(var e,r=-1/0,i=0;ir&&(e=a,r=o)}return e}},lt=function(t,n){if(h(t)){for(var e,r=1/0,i=0;in?(r&&(clearTimeout(r),r=null),u=s,o=t.apply(i,a),r||(i=a=null)):r||!1===e.trailing||(r=setTimeout(c,f)),o};return s.cancel=function(){clearTimeout(r),u=0,r=i=a=null},s},yn=function(t){return r(t)?Array.prototype.slice.call(t):[]},mn={},xn=function(t){return mn[t=t||"g"]?mn[t]+=1:mn[t]=1,t+mn[t]},bn=function(){},Mn=function(t){return t};function wn(t){return f(t)?0:r(t)?t.length:Object.keys(t).length}var Pn,_n=e(6),An=Ut((function(t,n){void 0===n&&(n={});var e=n.fontSize,r=n.fontFamily,i=n.fontWeight,a=n.fontStyle,o=n.fontVariant;return Pn||(Pn=document.createElement("canvas").getContext("2d")),Pn.font=[a,o,i,e+"px",r].join(" "),Pn.measureText(F(t)?t:"").width}),(function(t,n){return void 0===n&&(n={}),Object(_n.__spreadArrays)([t],wt(n)).join("")})),On=function(t,n,e,r){void 0===r&&(r="...");var i,a,o=An(r,e),u=F(t)?t:_t(t),c=n,s=[];if(An(t,e)<=n)return t;for(;i=u.substr(0,16),!((a=An(i,e))+o>c&&a>c);)if(s.push(i),c-=a,!(u=u.substr(16)))return s.join("");for(;i=u.substr(0,1),!((a=An(i,e))+o>c);)if(s.push(i),c-=a,!(u=u.substr(1)))return s.join("");return""+s.join("")+r},Cn=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,n){var e=this.map[t];return void 0===e?n:e},t.prototype.set=function(t,n){this.map[t]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}()},function(t,n,e){"use strict";e.r(n),e.d(n,"__extends",(function(){return i})),e.d(n,"__assign",(function(){return a})),e.d(n,"__rest",(function(){return o})),e.d(n,"__decorate",(function(){return u})),e.d(n,"__param",(function(){return c})),e.d(n,"__esDecorate",(function(){return s})),e.d(n,"__runInitializers",(function(){return f})),e.d(n,"__propKey",(function(){return h})),e.d(n,"__setFunctionName",(function(){return l})),e.d(n,"__metadata",(function(){return p})),e.d(n,"__awaiter",(function(){return d})),e.d(n,"__generator",(function(){return v})),e.d(n,"__createBinding",(function(){return g})),e.d(n,"__exportStar",(function(){return y})),e.d(n,"__values",(function(){return m})),e.d(n,"__read",(function(){return x})),e.d(n,"__spread",(function(){return b})),e.d(n,"__spreadArrays",(function(){return M})),e.d(n,"__spreadArray",(function(){return w})),e.d(n,"__await",(function(){return P})),e.d(n,"__asyncGenerator",(function(){return _})),e.d(n,"__asyncDelegator",(function(){return A})),e.d(n,"__asyncValues",(function(){return O})),e.d(n,"__makeTemplateObject",(function(){return C})),e.d(n,"__importStar",(function(){return j})),e.d(n,"__importDefault",(function(){return k})),e.d(n,"__classPrivateFieldGet",(function(){return T})),e.d(n,"__classPrivateFieldSet",(function(){return E})),e.d(n,"__classPrivateFieldIn",(function(){return B}));var r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function i(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var a=function(){return(a=Object.assign||function(t){for(var n,e=1,r=arguments.length;e=0;u--)(i=t[u])&&(o=(a<3?i(o):a>3?i(n,e,o):i(n,e))||o);return a>3&&o&&Object.defineProperty(n,e,o),o}function c(t,n){return function(e,r){n(e,r,t)}}function s(t,n,e,r,i,a){function o(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var u,c=r.kind,s="getter"===c?"get":"setter"===c?"set":"value",f=!n&&t?r.static?t:t.prototype:null,h=n||(f?Object.getOwnPropertyDescriptor(f,r.name):{}),l=!1,p=e.length-1;p>=0;p--){var d={};for(var v in r)d[v]="access"===v?{}:r[v];for(var v in r.access)d.access[v]=r.access[v];d.addInitializer=function(t){if(l)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(t||null))};var g=(0,e[p])("accessor"===c?{get:h.get,set:h.set}:h[s],d);if("accessor"===c){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(u=o(g.get))&&(h.get=u),(u=o(g.set))&&(h.set=u),(u=o(g.init))&&i.push(u)}else(u=o(g))&&("field"===c?i.push(u):h[s]=u)}f&&Object.defineProperty(f,r.name,h),l=!0}function f(t,n,e){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,a=e.call(t),o=[];try{for(;(void 0===n||n-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=a.return)&&e.call(a)}finally{if(i)throw i.error}}return o}function b(){for(var t=[],n=0;n1||u(t,n)}))})}function u(t,n){try{(e=i[t](n)).value instanceof P?Promise.resolve(e.value.v).then(c,s):f(a[0][2],e)}catch(t){f(a[0][3],t)}var e}function c(t){u("next",t)}function s(t){u("throw",t)}function f(t,n){t(n),a.shift(),a.length&&u(a[0][0],a[0][1])}}function A(t){var n,e;return n={},r("next"),r("throw",(function(t){throw t})),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,i){n[r]=t[r]?function(n){return(e=!e)?{value:P(t[r](n)),done:!1}:i?i(n):n}:i}}function O(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=m(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(e){n[e]=t[e]&&function(n){return new Promise((function(r,i){(function(t,n,e,r){Promise.resolve(r).then((function(n){t({value:n,done:e})}),n)})(r,i,(n=t[e](n)).done,n.value)}))}}}function C(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var S=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n};function j(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&g(n,t,e);return S(n,t),n}function k(t){return t&&t.__esModule?t:{default:t}}function T(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)}function E(t,n,e,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!i:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,e):i?i.value=e:n.set(t,e),e}function B(t,n){if(null===n||"object"!=typeof n&&"function"!=typeof n)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?n===t:t.has(n)}},function(t,n,e){"use strict";e.r(n),e.d(n,"Quad",(function(){return T})),e.d(n,"Cubic",(function(){return q})),e.d(n,"Arc",(function(){return W})),e.d(n,"Line",(function(){return A})),e.d(n,"Polygon",(function(){return K})),e.d(n,"Polyline",(function(){return Z})),e.d(n,"Util",(function(){return r}));var r={};e.r(r),e.d(r,"distance",(function(){return y})),e.d(r,"isNumberEqual",(function(){return m})),e.d(r,"getBBoxByArray",(function(){return x})),e.d(r,"getBBoxRange",(function(){return b})),e.d(r,"piMod",(function(){return M}));var i={}.toString,a=function(t,n){return i.call(t)==="[object "+n+"]"},o=function(t){return a(t,"Function")},u=function(t){return Array.isArray?Array.isArray(t):a(t,"Array")},c=function(t){var n=typeof t;return null!==t&&"object"===n||"function"===n};var s=function(t,n){if(t)if(u(t))for(var e=0,r=t.length;e(e-t)*(e-t)+(r-n)*(r-n)?y(e,r,i,a):this.pointToLine(t,n,e,r,i,a)},pointToLine:function(t,n,e,r,i,a){var o=[e-t,r-n];if(function(t,n){return t[0]===n[0]&&t[1]===n[1]}(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-n)*(a-n));var u=[-o[1],o[0]];!function(t,n){var e=n[0],r=n[1],i=e*e+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i}(u,u);var c=[i-t,a-n];return Math.abs(function(t,n){return t[0]*n[0]+t[1]*n[1]}(c,u))},tangentAngle:function(t,n,e,r){return Math.atan2(r-n,e-t)}};function O(t,n,e,r,i,a){var o,u=1/0,c=[e,r],s=20;a&&a>200&&(s=a/10);for(var f=1/s,h=f/10,l=0;l<=s;l++){var p=l*f,d=[i.apply(null,t.concat([p])),i.apply(null,n.concat([p]))];(x=y(c[0],c[1],d[0],d[1]))=0&&x=0?[i]:[]}function j(t,n,e,r){return 2*(1-r)*(n-t)+2*r*(e-n)}function k(t,n,e,r,i,a,o){var u=C(t,e,i,o),c=C(n,r,a,o),s=A.pointAt(t,n,e,r,o),f=A.pointAt(e,r,i,a,o);return[[t,n,s.x,s.y,u,c],[u,c,f.x,f.y,i,a]]}var T={box:function(t,n,e,r,i,a){var o=S(t,e,i)[0],u=S(n,r,a)[0],c=[t,i],s=[n,a];return void 0!==o&&c.push(C(t,e,i,o)),void 0!==u&&s.push(C(n,r,a,u)),x(c,s)},length:function(t,n,e,r,i,a){return function t(n,e,r,i,a,o,u){if(0===u)return(y(n,e,r,i)+y(r,i,a,o)+y(n,e,a,o))/2;var c=k(n,e,r,i,a,o,.5),s=c[0],f=c[1];return s.push(u-1),f.push(u-1),t.apply(null,s)+t.apply(null,f)}(t,n,e,r,i,a,3)},nearestPoint:function(t,n,e,r,i,a,o,u){return O([t,e,i],[n,r,a],o,u,C)},pointDistance:function(t,n,e,r,i,a,o,u){var c=this.nearestPoint(t,n,e,r,i,a,o,u);return y(c.x,c.y,o,u)},interpolationAt:C,pointAt:function(t,n,e,r,i,a,o){return{x:C(t,e,i,o),y:C(n,r,a,o)}},divide:function(t,n,e,r,i,a,o){return k(t,n,e,r,i,a,o)},tangentAngle:function(t,n,e,r,i,a,o){var u=j(t,e,i,o),c=j(n,r,a,o);return M(Math.atan2(c,u))}};function E(t,n,e,r,i){var a=1-i;return a*a*a*t+3*n*i*a*a+3*e*i*i*a+r*i*i*i}function B(t,n,e,r,i){var a=1-i;return 3*(a*a*(n-t)+2*a*i*(e-n)+i*i*(r-e))}function I(t,n,e,r){var i,a,o,u=-3*t+9*n-9*e+3*r,c=6*t-12*n+6*e,s=3*n-3*t,f=[];if(m(u,0))m(c,0)||(i=-s/c)>=0&&i<=1&&f.push(i);else{var h=c*c-4*u*s;m(h,0)?f.push(-c/(2*u)):h>0&&(a=(-c-(o=Math.sqrt(h)))/(2*u),(i=(-c+o)/(2*u))>=0&&i<=1&&f.push(i),a>=0&&a<=1&&f.push(a))}return f}function F(t,n,e,r,i,a,o,u,c){var s=E(t,e,i,o,c),f=E(n,r,a,u,c),h=A.pointAt(t,n,e,r,c),l=A.pointAt(e,r,i,a,c),p=A.pointAt(i,a,o,u,c),d=A.pointAt(h.x,h.y,l.x,l.y,c),v=A.pointAt(l.x,l.y,p.x,p.y,c);return[[t,n,h.x,h.y,d.x,d.y,s,f],[s,f,v.x,v.y,p.x,p.y,o,u]]}function D(t,n,e,r,i,a,o,u,c){if(0===c)return function(t,n){for(var e=0,r=t.length,i=0;i0?e:-1*e}var N=function(t,n,e,r,i,a){var o=e,u=r;if(0===o||0===u)return{x:t,y:n};for(var c,s,f=i-t,h=a-n,l=Math.abs(f),p=Math.abs(h),d=o*o,v=u*u,g=Math.PI/4,y=0;y<4;y++){c=o*Math.cos(g),s=u*Math.sin(g);var m=(d-v)*Math.pow(Math.cos(g),3)/o,x=(v-d)*Math.pow(Math.sin(g),3)/u,b=c-m,M=s-x,w=l-m,P=p-x,_=Math.hypot(M,b),A=Math.hypot(P,w);g+=_*Math.asin((b*P-M*w)/(_*A))/Math.sqrt(d+v-c*c-s*s),g=Math.min(Math.PI/2,Math.max(0,g))}return{x:t+X(c,f),y:n+X(s,h)}};function R(t,n,e,r,i,a){return e*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function L(t,n,e,r,i,a){return e*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+n}function Y(t,n,e){return{x:t*Math.cos(e),y:n*Math.sin(e)}}function z(t,n,e){var r=Math.cos(e),i=Math.sin(e);return[t*r-n*i,t*i+n*r]}var W={box:function(t,n,e,r,i,a,o){for(var u=function(t,n,e){return Math.atan(-n/t*Math.tan(e))}(e,r,i),c=1/0,s=-1/0,f=[a,o],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var l=u+h;as&&(s=p)}var d=function(t,n,e){return Math.atan(n/(t*Math.tan(e)))}(e,r,i),v=1/0,g=-1/0,y=[a,o];for(h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var m=d+h;ag&&(g=x)}return{x:c,y:v,width:s-c,height:g-v}},length:function(t,n,e,r,i,a,o){},nearestPoint:function(t,n,e,r,i,a,o,u,c){var s=z(u-t,c-n,-i),f=s[0],h=s[1],l=N(0,0,e,r,f,h),p=function(t,n,e,r){return(Math.atan2(r*t,e*n)+2*Math.PI)%(2*Math.PI)}(e,r,l.x,l.y);po&&(l=Y(e,r,o));var d=z(l.x,l.y,i);return{x:d[0]+t,y:d[1]+n}},pointDistance:function(t,n,e,r,i,a,o,u,c){var s=this.nearestPoint(t,n,e,r,u,c);return y(s.x,s.y,u,c)},pointAt:function(t,n,e,r,i,a,o,u){var c=(o-a)*u+a;return{x:R(t,0,e,r,i,c),y:L(0,n,e,r,i,c)}},tangentAngle:function(t,n,e,r,i,a,o,u){var c=(o-a)*u+a,s=function(t,n,e,r,i,a,o,u){return-1*e*Math.cos(i)*Math.sin(u)-r*Math.sin(i)*Math.cos(u)}(0,0,e,r,i,0,0,c),f=function(t,n,e,r,i,a,o,u){return-1*e*Math.sin(i)*Math.sin(u)+r*Math.cos(i)*Math.cos(u)}(0,0,e,r,i,0,0,c);return M(Math.atan2(f,s))}};function $(t){for(var n=0,e=[],r=0;r1||n<0||t.length<2)return null;var e=$(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,u=0;u=a&&n<=a+h){var l=(n-a)/h;o=A.pointAt(s[0],s[1],f[0],f[1],l);break}a+=h}return o}function Q(t,n){if(n>1||n<0||t.length<2)return 0;for(var e=$(t),r=e.segments,i=e.totalLength,a=0,o=0,u=0;u=a&&n<=a+h){o=Math.atan2(f[1]-s[1],f[0]-s[0]);break}a+=h}return o}function G(t,n,e){for(var r=1/0,i=0;i=t&&i<=t+e&&a>=n&&a<=n+r},n.intersectRect=function(t,n){return!(n.minX>t.maxX||n.maxXt.maxY||n.maxY0&&((0,a.isNil)(i)||1===i||(t.globalAlpha=i),this.stroke(t)),this.afterDrawPath(t)},n.prototype.createPath=function(t){},n.prototype.afterDrawPath=function(t){},n.prototype.isInShape=function(t,n){var e=this.isStroke(),r=this.isFill(),i=this.getHitLineWidth();return this.isInStrokeOrPath(t,n,e,r,i)},n.prototype.isInStrokeOrPath=function(t,n,e,r,i){return!1},n.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},n}(i.AbstractShape);n.default=f},function(t,n,e){"use strict";e.r(n),e.d(n,"version",(function(){return m}));var r=e(13);e.d(n,"PathUtil",(function(){return r}));var i=e(28);for(var a in i)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);var o=e(29);for(var a in o)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);var u=e(19);e.d(n,"Event",(function(){return u.a}));var c=e(22);e.d(n,"Base",(function(){return c.a}));var s=e(39);e.d(n,"AbstractCanvas",(function(){return s.a}));var f=e(30);e.d(n,"AbstractGroup",(function(){return f.a}));var h=e(31);e.d(n,"AbstractShape",(function(){return h.a}));var l=e(27);e.d(n,"getBBoxMethod",(function(){return l.a})),e.d(n,"registerBBox",(function(){return l.b}));var p=e(14);e.d(n,"getTextHeight",(function(){return p.b})),e.d(n,"assembleFont",(function(){return p.a}));var d=e(1);e.d(n,"isAllowCapture",(function(){return d.b}));var v=e(10);e.d(n,"multiplyVec2",(function(){return v.c})),e.d(n,"invert",(function(){return v.a}));var g=e(20);e.d(n,"getOffScreenContext",(function(){return g.a}));var y=e(21);e.d(n,"registerEasing",(function(){return y.b}));var m="0.5.11"},function(t,n,e){"use strict";e.r(n),e.d(n,"catmullRomToBezier",(function(){return c})),e.d(n,"fillPath",(function(){return k})),e.d(n,"fillPathByDiff",(function(){return B})),e.d(n,"formatPath",(function(){return D})),e.d(n,"intersection",(function(){return C})),e.d(n,"parsePathArray",(function(){return g})),e.d(n,"parsePathString",(function(){return u})),e.d(n,"pathToAbsolute",(function(){return f})),e.d(n,"pathToCurve",(function(){return d})),e.d(n,"rectPath",(function(){return w}));var r=e(0),i="\t\n\v\f\r   ᠎              \u2028\u2029",a=new RegExp("([a-z])["+i+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+i+"]*,?["+i+"]*)+)","ig"),o=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+i+"]*,?["+i+"]*","ig"),u=function(t){if(!t)return null;if(Object(r.b)(t))return t;var n={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},e=[];return String(t).replace(a,(function(r,i,a){var u=[],c=i.toLowerCase();if(a.replace(o,(function(t,n){n&&u.push(+n)})),"m"===c&&u.length>2&&(e.push([i].concat(u.splice(0,2))),c="l",i="m"===i?"l":"L"),"o"===c&&1===u.length&&e.push([i,u[0]]),"r"===c)e.push([i].concat(u));else for(;u.length>=n[c]&&(e.push([i].concat(u.splice(0,n[c]))),n[c]););return t})),e},c=function(t,n){for(var e=[],r=0,i=t.length;i-2*!n>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];n?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),e.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return e},s=function(t,n,e,r,i){var a=[];if(null===i&&null===r&&(r=e),t=+t,n=+n,e=+e,r=+r,null!==i){var o=Math.PI/180,u=t+e*Math.cos(-r*o),c=t+e*Math.cos(-i*o);a=[["M",u,n+e*Math.sin(-r*o)],["A",e,e,0,+(i-r>180),0,c,n+e*Math.sin(-i*o)]]}else a=[["M",t,n],["m",0,-r],["a",e,r,0,1,1,0,2*r],["a",e,r,0,1,1,0,-2*r],["z"]];return a},f=function(t){if(!(t=u(t))||!t.length)return[["M",0,0]];var n,e,r=[],i=0,a=0,o=0,f=0,h=0;"M"===t[0][0]&&(o=i=+t[0][1],f=a=+t[0][2],h++,r[0]=["M",i,a]);for(var l=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),p=void 0,d=void 0,v=h,g=t.length;v1&&(e*=w=Math.sqrt(w),r*=w);var P=e*e,_=r*r,A=(a===o?-1:1)*Math.sqrt(Math.abs((P*_-P*M*M-_*b*b)/(P*M*M+_*b*b)));d=A*e*M/r+(t+u)/2,v=A*-r*b/e+(n+c)/2,h=Math.asin(((n-v)/r).toFixed(9)),l=Math.asin(((c-v)/r).toFixed(9)),h=tl&&(h-=2*Math.PI),!o&&l>h&&(l-=2*Math.PI)}var O=l-h;if(Math.abs(O)>g){var C=l,S=u,j=c;l=h+g*(o&&l>h?1:-1),u=d+e*Math.cos(l),c=v+r*Math.sin(l),m=p(u,c,e,r,i,0,o,S,j,[l,C,d,v])}O=l-h;var k=Math.cos(h),T=Math.sin(h),E=Math.cos(l),B=Math.sin(l),I=Math.tan(O/4),F=4/3*e*I,D=4/3*r*I,q=[t,n],X=[t+F*T,n-D*k],N=[u+F*B,c-D*E],R=[u,c];if(X[0]=2*q[0]-X[0],X[1]=2*q[1]-X[1],s)return[X,N,R].concat(m);for(var L=[],Y=0,z=(m=[X,N,R].concat(m).join().split(",")).length;Y7){t[n].shift();for(var a=t[n];a.length;)u[n]="A",i&&(c[n]="A"),t.splice(n++,0,["C"].concat(a.splice(0,6)));t.splice(n,1),e=Math.max(r.length,i&&i.length||0)}},y=function(t,n,a,o,u){t&&n&&"M"===t[u][0]&&"M"!==n[u][0]&&(n.splice(u,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[u][1],a.y=t[u][2],e=Math.max(r.length,i&&i.length||0))};e=Math.max(r.length,i&&i.length||0);for(var m=0;m1?1:c<0?0:c)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],l=0,p=0;p<12;p++){var d=s*f[p]+s,v=y(d,t,e,i,o),g=y(d,n,r,a,u),m=v*v+g*g;l+=h[p]*Math.sqrt(m)}return s*l},x=function(t,n,e,r,i,a,o,u){for(var c,s,f,h,l=[],p=[[],[]],d=0;d<2;++d)if(0===d?(s=6*t-12*e+6*i,c=-3*t+9*e-9*i+3*o,f=3*e-3*t):(s=6*n-12*r+6*a,c=-3*n+9*r-9*a+3*u,f=3*r-3*n),Math.abs(c)<1e-12){if(Math.abs(s)<1e-12)continue;(h=-f/s)>0&&h<1&&l.push(h)}else{var v=s*s-4*f*c,g=Math.sqrt(v);if(!(v<0)){var y=(-s+g)/(2*c);y>0&&y<1&&l.push(y);var m=(-s-g)/(2*c);m>0&&m<1&&l.push(m)}}for(var x,b=l.length,M=b;b--;)x=1-(h=l[b]),p[0][b]=x*x*x*t+3*x*x*h*e+3*x*h*h*i+h*h*h*o,p[1][b]=x*x*x*n+3*x*x*h*r+3*x*h*h*a+h*h*h*u;return p[0][M]=t,p[1][M]=n,p[0][M+1]=o,p[1][M+1]=u,p[0].length=p[1].length=M+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},b=function(t,n,e,r,i,a,o,u){if(!(Math.max(t,e)Math.max(i,o)||Math.max(n,r)Math.max(a,u))){var c=(t-e)*(a-u)-(n-r)*(i-o);if(c){var s=((t*r-n*e)*(i-o)-(t-e)*(i*u-a*o))/c,f=((t*r-n*e)*(a-u)-(n-r)*(i*u-a*o))/c,h=+s.toFixed(2),l=+f.toFixed(2);if(!(h<+Math.min(t,e).toFixed(2)||h>+Math.max(t,e).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||l<+Math.min(n,r).toFixed(2)||l>+Math.max(n,r).toFixed(2)||l<+Math.min(a,u).toFixed(2)||l>+Math.max(a,u).toFixed(2)))return{x:s,y:f}}}},M=function(t,n,e){return n>=t.x&&n<=t.x+t.width&&e>=t.y&&e<=t.y+t.height},w=function(t,n,e,r,i){if(i)return[["M",+t+ +i,n],["l",e-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-e,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,n],["l",e,0],["l",0,r],["l",-e,0],["z"]];return a.parsePathArray=g,a},P=function(t,n,e,r){return null===t&&(t=n=e=r=0),null===n&&(n=t.y,e=t.width,r=t.height,t=t.x),{x:t,y:n,width:e,w:e,height:r,h:r,x2:t+e,y2:n+r,cx:t+e/2,cy:n+r/2,r1:Math.min(e,r)/2,r2:Math.max(e,r)/2,r0:Math.sqrt(e*e+r*r)/2,path:w(t,n,e,r),vb:[t,n,e,r].join(" ")}},_=function(t,n,e,i,a,o,u,c){Object(r.b)(t)||(t=[t,n,e,i,a,o,u,c]);var s=x.apply(null,t);return P(s.min.x,s.min.y,s.max.x-s.min.x,s.max.y-s.min.y)},A=function(t,n,e,r,i,a,o,u,c){var s=1-c,f=Math.pow(s,3),h=Math.pow(s,2),l=c*c,p=l*c,d=t+2*c*(e-t)+l*(i-2*e+t),v=n+2*c*(r-n)+l*(a-2*r+n),g=e+2*c*(i-e)+l*(o-2*i+e),y=r+2*c*(a-r)+l*(u-2*a+r);return{x:f*t+3*h*c*e+3*s*c*c*i+p*o,y:f*n+3*h*c*r+3*s*c*c*a+p*u,m:{x:d,y:v},n:{x:g,y:y},start:{x:s*t+c*e,y:s*n+c*r},end:{x:s*i+c*o,y:s*a+c*u},alpha:90-180*Math.atan2(d-g,v-y)/Math.PI}},O=function(t,n,e){if(!function(t,n){return t=P(t),n=P(n),M(n,t.x,t.y)||M(n,t.x2,t.y)||M(n,t.x,t.y2)||M(n,t.x2,t.y2)||M(t,n.x,n.y)||M(t,n.x2,n.y)||M(t,n.x,n.y2)||M(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)}(_(t),_(n)))return e?0:[];for(var r=~~(m.apply(0,t)/8),i=~~(m.apply(0,n)/8),a=[],o=[],u={},c=e?0:[],s=0;s=0&&w<=1&&O>=0&&O<=1&&(e?c+=1:c.push({x:x.x,y:x.y,t1:w,t2:O}))}}return c},C=function(t,n){return function(t,n,e){var r,i,a,o,u,c,s,f,h,l;t=d(t),n=d(n);for(var p=e?0:[],v=0,g=t.length;v=3&&(3===t.length&&n.push("Q"),n=n.concat(t[1])),2===t.length&&n.push("L"),n=n.concat(t[t.length-1])}))}(t,n,e));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=e-1;a++)r.push(i)}return r},k=function(t,n){if(1===t.length)return t;var e=t.length-1,r=n.length-1,i=e/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;c--)o=a[c].index,"add"===a[c].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var h=i-(r=t.length);if(r0)){t[r]=n[r];break}e=I(e,t[r-1],1)}t[r]=["Q"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"T":t[r]=["T"].concat(e[0]);break;case"C":if(e.length<3){if(!(r>0)){t[r]=n[r];break}e=I(e,t[r-1],2)}t[r]=["C"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"S":if(e.length<2){if(!(r>0)){t[r]=n[r];break}e=I(e,t[r-1],1)}t[r]=["S"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;default:t[r]=n[r]}return t}},function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return u}));var r=e(1),i=e(20);function a(t,n,e){var i=1;return Object(r.h)(t)&&(i=t.split("\n").length),i>1?n*i+function(t,n){return n?n-t:.14*t}(n,e)*(i-1):n}function o(t,n){var e=Object(i.a)(),a=0;if(Object(r.e)(t)||""===t)return a;if(e.save(),e.font=n,Object(r.h)(t)&&t.includes("\n")){var o=t.split("\n");Object(r.a)(o,(function(t){var n=e.measureText(t).width;aw?M:w,S=M>w?1:M/w,j=M>w?w/M:1;n.translate(x,b),n.rotate(A),n.scale(S,j),n.arc(0,0,C,P,_,1-O),n.scale(1/S,1/j),n.rotate(-A),n.translate(-x,-b)}break;case"Z":n.closePath()}if("Z"===d)s=f;else{var k=p.length;s=[p[k-2],p[k-1]]}}}},n.refreshElement=function(t,n){var e=t.get("canvas");e&&("remove"===n&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(t.set("hasChanged",!0),t.cfg.parent&&t.cfg.parent.get("hasChanged")||(e.refreshElement(t,n,e),e.get("autoDraw")&&e.draw())))},n.getRefreshRegion=l,n.getMergedRegion=function(t){if(!t.length)return null;var n=[],e=[],i=[],a=[];return(0,r.each)(t,(function(t){var r=l(t);r&&(n.push(r.minX),e.push(r.minY),i.push(r.maxX),a.push(r.maxY))})),{minX:(0,r.min)(n),minY:(0,r.min)(e),maxX:(0,r.max)(i),maxY:(0,r.max)(a)}},n.mergeView=function(t,n){return t&&n&&(0,o.intersectRect)(t,n)?{minX:Math.max(t.minX,n.minX),minY:Math.max(t.minY,n.minY),maxX:Math.min(t.maxX,n.maxX),maxY:Math.min(t.maxY,n.maxY)}:null}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addEndArrow=n.addStartArrow=n.getShortenOffset=void 0;var r=e(6),i=e(15),a=Math.sin,o=Math.cos,u=Math.atan2,c=Math.PI;function s(t,n,e,r,s,f,h){var l=n.stroke,p=n.lineWidth,d=u(r-f,e-s),v=new i.Path({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:{path:"M".concat(10*o(c/6),",").concat(10*a(c/6)," L0,0 L").concat(10*o(c/6),",-").concat(10*a(c/6)),stroke:l,lineWidth:p}});v.translate(s,f),v.rotateAtPoint(s,f,d),t.set(h?"startArrowShape":"endArrowShape",v)}function f(t,n,e,c,s,f,h){var l=n.startArrow,p=n.endArrow,d=n.stroke,v=n.lineWidth,g=h?l:p,y=g.d,m=g.fill,x=g.stroke,b=g.lineWidth,M=r.__rest(g,["d","fill","stroke","lineWidth"]),w=u(c-f,e-s);y&&(s-=o(w)*y,f-=a(w)*y);var P=new i.Path({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:r.__assign(r.__assign({},M),{stroke:x||d,lineWidth:b||v,fill:m})});P.translate(s,f),P.rotateAtPoint(s,f,w),t.set(h?"startArrowShape":"endArrowShape",P)}n.getShortenOffset=function(t,n,e,r,i){var c=u(r-n,e-t);return{dx:o(c)*i,dy:a(c)*i}},n.addStartArrow=function(t,n,e,r,i,a){"object"==typeof n.startArrow?f(t,n,e,r,i,a,!0):n.startArrow?s(t,n,e,r,i,a,!0):t.set("startArrowShape",null)},n.addEndArrow=function(t,n,e,r,i,a){"object"==typeof n.endArrow?f(t,n,e,r,i,a,!1):n.endArrow?s(t,n,e,r,i,a,!1):t.set("startArrowShape",null)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(7);n.default=function(t,n,e,i,a,o,u){var c=Math.min(t,e),s=Math.max(t,e),f=Math.min(n,i),h=Math.max(n,i),l=a/2;return o>=c-l&&o<=s+l&&u>=f-l&&u<=h+l&&r.Line.pointToLine(t,n,e,i,o,u)<=a/2}},function(t,n,e){"use strict";var r=function(){function t(t,n){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=n,this.timeStamp=n.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();n.a=r},function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=null;function i(){if(!r){var t=document.createElement("canvas");t.width=1,t.height=1,r=t.getContext("2d")}return r}},function(t,n,e){"use strict";e.d(n,"a",(function(){return X})),e.d(n,"b",(function(){return N}));var r={};function i(t){return+t}function a(t){return t*t}function o(t){return t*(2-t)}function u(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function c(t){return t*t*t}function s(t){return--t*t*t+1}function f(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}e.r(r),e.d(r,"easeLinear",(function(){return i})),e.d(r,"easeQuad",(function(){return u})),e.d(r,"easeQuadIn",(function(){return a})),e.d(r,"easeQuadOut",(function(){return o})),e.d(r,"easeQuadInOut",(function(){return u})),e.d(r,"easeCubic",(function(){return f})),e.d(r,"easeCubicIn",(function(){return c})),e.d(r,"easeCubicOut",(function(){return s})),e.d(r,"easeCubicInOut",(function(){return f})),e.d(r,"easePoly",(function(){return p})),e.d(r,"easePolyIn",(function(){return h})),e.d(r,"easePolyOut",(function(){return l})),e.d(r,"easePolyInOut",(function(){return p})),e.d(r,"easeSin",(function(){return m})),e.d(r,"easeSinIn",(function(){return g})),e.d(r,"easeSinOut",(function(){return y})),e.d(r,"easeSinInOut",(function(){return m})),e.d(r,"easeExp",(function(){return w})),e.d(r,"easeExpIn",(function(){return b})),e.d(r,"easeExpOut",(function(){return M})),e.d(r,"easeExpInOut",(function(){return w})),e.d(r,"easeCircle",(function(){return A})),e.d(r,"easeCircleIn",(function(){return P})),e.d(r,"easeCircleOut",(function(){return _})),e.d(r,"easeCircleInOut",(function(){return A})),e.d(r,"easeBounce",(function(){return S})),e.d(r,"easeBounceIn",(function(){return C})),e.d(r,"easeBounceOut",(function(){return S})),e.d(r,"easeBounceInOut",(function(){return j})),e.d(r,"easeBack",(function(){return E})),e.d(r,"easeBackIn",(function(){return k})),e.d(r,"easeBackOut",(function(){return T})),e.d(r,"easeBackInOut",(function(){return E})),e.d(r,"easeElastic",(function(){return F})),e.d(r,"easeElasticIn",(function(){return I})),e.d(r,"easeElasticOut",(function(){return F})),e.d(r,"easeElasticInOut",(function(){return D}));var h=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),l=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),p=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),d=Math.PI,v=d/2;function g(t){return 1==+t?1:1-Math.cos(t*v)}function y(t){return Math.sin(t*v)}function m(t){return(1-Math.cos(d*t))/2}function x(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function b(t){return x(1-+t)}function M(t){return 1-x(t)}function w(t){return((t*=2)<=1?x(1-t):2-x(t-1))/2}function P(t){return 1-Math.sqrt(1-t*t)}function _(t){return Math.sqrt(1- --t*t)}function A(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var O=7.5625;function C(t){return 1-S(1-t)}function S(t){return(t=+t)<4/11?O*t*t:t<8/11?O*(t-=6/11)*t+3/4:t<10/11?O*(t-=9/11)*t+15/16:O*(t-=21/22)*t+63/64}function j(t){return((t*=2)<=1?1-S(1-t):S(t-1)+1)/2}var k=function t(n){function e(t){return(t=+t)*t*(n*(t-1)+t)}return n=+n,e.overshoot=t,e}(1.70158),T=function t(n){function e(t){return--t*t*((t+1)*n+t)+1}return n=+n,e.overshoot=t,e}(1.70158),E=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),B=2*Math.PI,I=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=B);function i(t){return n*x(- --t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*B)},i.period=function(e){return t(n,e)},i}(1,.3),F=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=B);function i(t){return 1-n*x(t=+t)*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*B)},i.period=function(e){return t(n,e)},i}(1,.3),D=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=B);function i(t){return((t=2*t-1)<0?n*x(-t)*Math.sin((r-t)/e):2-n*x(t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*B)},i.period=function(e){return t(n,e)},i}(1,.3),q={};function X(t){return q[t.toLowerCase()]||r[t]}function N(t,n){q[t.toLowerCase()]=n}},function(t,n,e){"use strict";var r=e(9),i=function(){function t(){this._events={}}return t.prototype.on=function(t,n,e){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:n,once:!!e}),this},t.prototype.once=function(t,n){return this.on(t,n,!0)},t.prototype.emit=function(t){for(var n=this,e=[],r=1;r0)}));return i.length>0?Object(a.a)(i,(function(i){var a=i.getBBox(),o=a.minX,u=a.maxX,c=a.minY,s=a.maxY;on&&(n=u),cr&&(r=s)})):(t=0,n=0,e=0,r=0),{x:t,y:e,minX:t,minY:e,maxX:n,maxY:r,width:n-t,height:r-e}},n.prototype.getCanvasBBox=function(){var t=1/0,n=-1/0,e=1/0,r=-1/0,i=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return i.length>0?Object(a.a)(i,(function(i){var a=i.getCanvasBBox(),o=a.minX,u=a.maxX,c=a.minY,s=a.maxY;on&&(n=u),cr&&(r=s)})):(t=0,n=0,e=0,r=0),{x:t,y:e,minX:t,minY:e,maxX:n,maxY:r,width:n-t,height:r-e}},n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.children=[],n},n.prototype.onAttrChange=function(n,e,r){if(t.prototype.onAttrChange.call(this,n,e,r),"matrix"===n){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},n.prototype.applyMatrix=function(n){var e=this.getTotalMatrix();t.prototype.applyMatrix.call(this,n);var r=this.getTotalMatrix();r!==e&&this._applyChildrenMarix(r)},n.prototype._applyChildrenMarix=function(t){var n=this.getChildren();Object(a.a)(n,(function(n){n.applyMatrix(t)}))},n.prototype.addShape=function(){for(var t=[],n=0;n=0;o--){var u=t[o];if(Object(a.b)(u)&&(u.isGroup()?i=u.getShape(n,e,r):u.isHit(n,e)&&(i=u)),i)break}return i},n.prototype.add=function(t){var n=this.getCanvas(),e=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,n,e){void 0===e&&(e=!0),e?n.destroy():(n.set("parent",null),n.set("canvas",null)),Object(a.j)(t.getChildren(),n)}(i,t,!1),t.set("parent",this),n&&function t(n,e){if(n.set("canvas",e),n.isGroup()){var r=n.get("children");r.length&&r.forEach((function(n){t(n,e)}))}}(t,n),r&&function t(n,e){if(n.set("timeline",e),n.isGroup()){var r=n.get("children");r.length&&r.forEach((function(n){t(n,e)}))}}(t,r),e.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},n.prototype._applyElementMatrix=function(t){var n=this.getTotalMatrix();n&&t.applyMatrix(n)},n.prototype.getChildren=function(){return this.get("children")||[]},n.prototype.sort=function(){var t,n=this.getChildren();Object(a.a)(n,(function(t,n){return t._INDEX=n,t})),n.sort((t=function(t,n){return t.get("zIndex")-n.get("zIndex")},function(n,e){var r=t(n,e);return 0===r?n._INDEX-e._INDEX:r})),this.onCanvasChange("sort")},n.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),n=t.length-1;n>=0;n--)t[n].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},n.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},n.prototype.getFirst=function(){return this.getChildByIndex(0)},n.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},n.prototype.getChildByIndex=function(t){return this.getChildren()[t]},n.prototype.getCount=function(){return this.getChildren().length},n.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},n.prototype.removeChild=function(t,n){void 0===n&&(n=!0),this.contain(t)&&t.remove(n)},n.prototype.findAll=function(t){var n=[],e=this.getChildren();return Object(a.a)(e,(function(e){t(e)&&n.push(e),e.isGroup()&&(n=n.concat(e.findAll(t)))})),n},n.prototype.find=function(t){var n=null,e=this.getChildren();return Object(a.a)(e,(function(e){if(t(e)?n=e:e.isGroup()&&(n=e.find(t)),n)return!1})),n},n.prototype.findById=function(t){return this.find((function(n){return n.get("id")===t}))},n.prototype.findByClassName=function(t){return this.find((function(n){return n.get("className")===t}))},n.prototype.findAllByName=function(t){return this.findAll((function(n){return n.get("name")===t}))},n}(i.a);n.a=u},function(t,n,e){"use strict";var r={};e.r(r),e.d(r,"leftTranslate",(function(){return u})),e.d(r,"leftRotate",(function(){return c})),e.d(r,"leftScale",(function(){return s})),e.d(r,"transform",(function(){return f})),e.d(r,"direction",(function(){return h})),e.d(r,"angleTo",(function(){return l})),e.d(r,"vertical",(function(){return p}));var i=e(9),a=e(0),o=e(3);function u(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return o.a.fromTranslation(r,e),o.a.multiply(t,r,n)}function c(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return o.a.fromRotation(r,e),o.a.multiply(t,r,n)}function s(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return o.a.fromScaling(r,e),o.a.multiply(t,r,n)}function f(t,n){for(var e,r,i,a=t?[].concat(t):[1,0,0,0,1,0,0,0,1],f=0,h=n.length;f=0;return e?i?2*Math.PI-r:r:i?r:2*Math.PI-r}function p(t,n,e){return e?(t[0]=n[1],t[1]=-1*n[0]):(t[0]=-1*n[1],t[1]=n[0]),t}var d=e(1),v=e(10),g=e(22),y=r.transform,m=["zIndex","capture","visible","type"],x=["repeat"];function b(t,n){var e={},r=n.attrs;for(var i in t)e[i]=r[i];return e}function M(t,n){var e={},r=n.attr();return Object(a.a)(t,(function(t,n){-1!==x.indexOf(n)||Object(a.c)(r[n],t)||(e[n]=t)})),e}function w(t,n){if(n.onFrame)return t;var e=n.startTime,r=n.delay,i=n.duration,o=Object.prototype.hasOwnProperty;return Object(a.a)(t,(function(t){e+rt.delay&&Object(a.a)(n.toAttrs,(function(n,e){o.call(t.toAttrs,e)&&(delete t.toAttrs[e],delete t.fromAttrs[e])}))})),t}var P=function(t){function n(n){var e=t.call(this,n)||this;e.attrs={};var r=e.getDefaultAttrs();return Object(a.l)(r,n.attrs),e.attrs=r,e.initAttrs(r),e.initAnimate(),e}return Object(i.a)(n,t),n.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},n.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},n.prototype.onCanvasChange=function(t){},n.prototype.initAttrs=function(t){},n.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},n.prototype.isGroup=function(){return!1},n.prototype.getParent=function(){return this.get("parent")},n.prototype.getCanvas=function(){return this.get("canvas")},n.prototype.attr=function(){for(var t,n=[],e=0;e0?r=w(r,x):e.addAnimator(this),r.push(x),this.set("animations",r),this.set("_pause",{isPaused:!1})}},n.prototype.stopAnimate=function(t){var n=this;void 0===t&&(t=!0);var e=this.get("animations");Object(a.a)(e,(function(e){t&&(e.onFrame?n.attr(e.onFrame(1)):n.attr(e.toAttrs)),e.callback&&e.callback()})),this.set("animating",!1),this.set("animations",[])},n.prototype.pauseAnimate=function(){var t=this.get("timeline"),n=this.get("animations"),e=t.getTime();return Object(a.a)(n,(function(t){t._paused=!0,t._pauseTime=e,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:e}),this},n.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),n=this.get("animations"),e=this.get("_pause").pauseTime;return Object(a.a)(n,(function(n){n.startTime=n.startTime+(t-e),n._paused=!1,n._pauseTime=null,n.resumeCallback&&n.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",n),this},n.prototype.emitDelegation=function(t,n){var e,r=this,i=n.propagationPath;this.getEvents();"mouseenter"===t?e=n.fromShape:"mouseleave"===t&&(e=n.toShape);for(var o=function(t){var o=i[t],c=o.get("name");if(c){if((o.isGroup()||o.isCanvas&&o.isCanvas())&&e&&Object(d.g)(o,e))return"break";Object(a.b)(c)?Object(a.a)(c,(function(t){r.emitDelegateEvent(o,t,n)})):u.emitDelegateEvent(o,c,n)}},u=this,c=0;c0&&(a=1/Math.sqrt(a)),t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function C(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function S(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[0],u=e[1],c=e[2];return t[0]=i*c-a*u,t[1]=a*o-r*c,t[2]=r*u-i*o,t}function j(t,n,e,r){var i=n[0],a=n[1],o=n[2];return t[0]=i+r*(e[0]-i),t[1]=a+r*(e[1]-a),t[2]=o+r*(e[2]-o),t}function k(t,n,e,r,i,a){var o=a*a,u=o*(2*a-3)+1,c=o*(a-2)+a,s=o*(a-1),f=o*(3-2*a);return t[0]=n[0]*u+e[0]*c+r[0]*s+i[0]*f,t[1]=n[1]*u+e[1]*c+r[1]*s+i[1]*f,t[2]=n[2]*u+e[2]*c+r[2]*s+i[2]*f,t}function T(t,n,e,r,i,a){var o=1-a,u=o*o,c=a*a,s=u*o,f=3*a*u,h=3*c*o,l=c*a;return t[0]=n[0]*s+e[0]*f+r[0]*h+i[0]*l,t[1]=n[1]*s+e[1]*f+r[1]*h+i[1]*l,t[2]=n[2]*s+e[2]*f+r[2]*h+i[2]*l,t}function E(t,n){n=n||1;var e=2*r.c()*Math.PI,i=2*r.c()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(e)*a,t[1]=Math.sin(e)*a,t[2]=i*n,t}function B(t,n,e){var r=n[0],i=n[1],a=n[2],o=e[3]*r+e[7]*i+e[11]*a+e[15];return o=o||1,t[0]=(e[0]*r+e[4]*i+e[8]*a+e[12])/o,t[1]=(e[1]*r+e[5]*i+e[9]*a+e[13])/o,t[2]=(e[2]*r+e[6]*i+e[10]*a+e[14])/o,t}function I(t,n,e){var r=n[0],i=n[1],a=n[2];return t[0]=r*e[0]+i*e[3]+a*e[6],t[1]=r*e[1]+i*e[4]+a*e[7],t[2]=r*e[2]+i*e[5]+a*e[8],t}function F(t,n,e){var r=e[0],i=e[1],a=e[2],o=e[3],u=n[0],c=n[1],s=n[2],f=i*s-a*c,h=a*u-r*s,l=r*c-i*u,p=i*l-a*h,d=a*f-r*l,v=r*h-i*f,g=2*o;return f*=g,h*=g,l*=g,p*=2,d*=2,v*=2,t[0]=u+f+p,t[1]=c+h+d,t[2]=s+l+v,t}function D(t,n,e,r){var i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t}function q(t,n,e,r){var i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t}function X(t,n,e,r){var i=[],a=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+e[0],t[1]=a[1]+e[1],t[2]=a[2]+e[2],t}function N(t,n){var e=t[0],r=t[1],i=t[2],a=n[0],o=n[1],u=n[2],c=Math.sqrt(e*e+r*r+i*i)*Math.sqrt(a*a+o*o+u*u),s=c&&C(t,n)/c;return Math.acos(Math.min(Math.max(s,-1),1))}function R(t){return t[0]=0,t[1]=0,t[2]=0,t}function L(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Y(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function z(t,n){var e=t[0],i=t[1],a=t[2],o=n[0],u=n[1],c=n[2];return Math.abs(e-o)<=r.b*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(i-u)<=r.b*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-c)<=r.b*Math.max(1,Math.abs(a),Math.abs(c))}var W,$=h,V=l,H=p,Q=M,G=w,Z=o,U=P,K=(W=i(),function(t,n,e,r,i,a){var o,u;for(n||(n=3),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,o=e;o1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}Object(l.a)(t,(function(n,e){isNaN(n)||(t[e]=+n)})),n[e]=t})),n):void 0};e(3);var g="\t\n\v\f\r   ᠎              \u2028\u2029";new RegExp("([a-z])["+g+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+g+"]*,?["+g+"]*)+)","ig"),new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+g+"]*,?["+g+"]*","ig");Math.PI;function y(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function m(t,n){return y(t)*y(n)?(t[0]*n[0]+t[1]*n[1])/(y(t)*y(n)):1}function x(t,n){return(t[0]*n[1]1&&(e*=Math.sqrt(d),r*=Math.sqrt(d));var v=e*e*(p*p)+r*r*(h*h),g=v?Math.sqrt((e*e*(r*r)-v)/v):1;a===o&&(g*=-1),isNaN(g)&&(g=0);var y=r?g*e*p/r:0,M=e?g*-r*h/e:0,w=(u+s)/2+Math.cos(i)*y-Math.sin(i)*M,P=(c+f)/2+Math.sin(i)*y+Math.cos(i)*M,_=[(h-y)/e,(p-M)/r],A=[(-1*h-y)/e,(-1*p-M)/r],O=x([1,0],_),C=x(_,A);return m(_,A)<=-1&&(C=Math.PI),m(_,A)>=1&&(C=0),0===o&&C>0&&(C-=2*Math.PI),1===o&&C<0&&(C+=2*Math.PI),{cx:w,cy:P,rx:b(t,[s,f])?0:e,ry:b(t,[s,f])?0:r,startAngle:O,endAngle:O+C,xRotation:i,arcFlag:a,sweepFlag:o}}function w(t,n){return[n[0]+(n[0]-t[0]),n[1]+(n[1]-t[1])]}function P(t,n){var e=t.prePoint,r=t.currentPoint,i=t.nextPoint,a=Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2),o=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),u=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),c=Math.acos((a+o-u)/(2*Math.sqrt(a)*Math.sqrt(o)));if(!c||0===Math.sin(c)||Object(l.g)(c,0))return{xExtra:0,yExtra:0};var s=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),f=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));return s=s>Math.PI/2?Math.PI-s:s,f=f>Math.PI/2?Math.PI-f:f,{xExtra:Math.cos(c/2-s)*(n/2*(1/Math.sin(c/2)))-n/2||0,yExtra:Math.cos(f-c/2)*(n/2*(1/Math.sin(c/2)))-n/2||0}}i("rect",o),i("image",o),i("circle",u),i("marker",u),i("polyline",(function(t){for(var n=t.attr().points,e=[],r=[],i=0;i=t&&e.minY<=n&&e.maxY>=n},n.prototype.afterAttrsChange=function(n){t.prototype.afterAttrsChange.call(this,n),this.clearCacheBBox()},n.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},n.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},n.prototype.applyMatrix=function(n){t.prototype.applyMatrix.call(this,n),this.set("canvasBBox",null)},n.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),n=this.getTotalMatrix(),e=t.minX,r=t.minY,i=t.maxX,o=t.maxY;if(n){var u=Object(a.c)(n,[t.minX,t.minY]),c=Object(a.c)(n,[t.maxX,t.minY]),s=Object(a.c)(n,[t.minX,t.maxY]),f=Object(a.c)(n,[t.maxX,t.maxY]);e=Math.min(u[0],c[0],s[0],f[0]),i=Math.max(u[0],c[0],s[0],f[0]),r=Math.min(u[1],c[1],s[1],f[1]),o=Math.max(u[1],c[1],s[1],f[1])}var h=this.attrs;if(h.shadowColor){var l=h.shadowBlur,p=void 0===l?0:l,d=h.shadowOffsetX,v=void 0===d?0:d,g=h.shadowOffsetY,y=void 0===g?0:g,m=e-p+v,x=i+p+v,b=r-p+y,M=o+p+y;e=Math.min(e,m),i=Math.max(i,x),r=Math.min(r,b),o=Math.max(o,M)}return{x:e,y:r,minX:e,minY:r,maxX:i,maxY:o,width:i-e,height:o-r}},n.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},n.prototype.isClipShape=function(){return this.get("isClipShape")},n.prototype.isInShape=function(t,n){return!1},n.prototype.isOnlyHitBox=function(){return!1},n.prototype.isHit=function(t,n){var e=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,n,1],a=(i=this.invertFromMatrix(i))[0],o=i[1],u=this._isInBBox(a,o);if(this.isOnlyHitBox())return u;if(u&&!this.isClipped(a,o)){if(this.isInShape(a,o))return!0;if(e&&e.isHit(a,o))return!0;if(r&&r.isHit(a,o))return!0}return!1},n}(i.a);n.a=o},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRadius=n.parseStyle=n.parsePattern=n.parseRadialGradient=n.parseLineGradient=void 0;var r=e(8),i=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,a=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,o=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,u=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function c(t,n){var e=t.match(u);(0,r.each)(e,(function(t){var e=t.split(":");n.addColorStop(e[0],e[1])}))}function s(t,n,e){var r,a,o=i.exec(e),u=parseFloat(o[1])%360*(Math.PI/180),s=o[2],f=n.getBBox();u>=0&&u<.5*Math.PI?(r={x:f.minX,y:f.minY},a={x:f.maxX,y:f.maxY}):.5*Math.PI<=u&&u1&&(e*=Math.sqrt(g),i*=Math.sqrt(g));var y=e*e*(v*v)+i*i*(d*d),m=y?Math.sqrt((e*e*(i*i)-y)/y):1;c===s&&(m*=-1),isNaN(m)&&(m=0);var x=i?m*e*v/i:0,b=e?m*-i*d/e:0,M=(f+l)/2+Math.cos(u)*x-Math.sin(u)*b,w=(h+p)/2+Math.sin(u)*x+Math.cos(u)*b,P=[(d-x)/e,(v-b)/i],_=[(-1*d-x)/e,(-1*v-b)/i],A=o([1,0],P),O=o(P,_);return a(P,_)<=-1&&(O=Math.PI),a(P,_)>=1&&(O=0),0===s&&O>0&&(O-=2*Math.PI),1===s&&O<0&&(O+=2*Math.PI),{cx:M,cy:w,rx:(0,r.isSamePoint)(t,[l,p])?0:e,ry:(0,r.isSamePoint)(t,[l,p])?0:i,startAngle:A,endAngle:A+O,xRotation:u,arcFlag:c,sweepFlag:s}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(12);n.default=function(t,n,e){var i=(0,r.getOffScreenContext)();return t.createPath(i),i.isPointInPath(n,e)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function i(t,n,e){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])&&Math.min(t[0],n[0])<=e[0]&&e[0]<=Math.max(t[0],n[0])&&Math.min(t[1],n[1])<=e[1]&&e[1]<=Math.max(t[1],n[1])}n.default=function(t,n,e){var a=!1,o=t.length;if(o<=2)return!1;for(var u=0;u0!=r(s[1]-e)>0&&r(n-(e-c[1])*(c[0]-s[0])/(c[1]-s[1])-c[0])<0&&(a=!a)}return a}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(8);n.default=function(t,n,e,i,a,o,u,c){var s=(Math.atan2(c-n,u-t)+2*Math.PI)%(2*Math.PI);if(sa)return!1;var f={x:t+e*Math.cos(s),y:n+e*Math.sin(s)};return(0,r.distance)(f.x,f.y,u,c)<=o/2}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(18);n.default=function(t,n,e,i,a){var o=t.length;if(o<2)return!1;for(var u=0;u1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}Object(r.each)(t,(function(n,e){isNaN(n)||(t[e]=+n)})),n[e]=t})),n):void 0},u=e(4);var c=function(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=[[0,0],[1,1]]);for(var r=!!n,i=[],a=0,o=t.length;a=3&&(3===t.length&&n.push("Q"),n=n.concat(t[1])),2===t.length&&n.push("L"),n=n.concat(t[t.length-1])}))}(t,n,e));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=e-1;a++)r.push(i)}return r}function h(t,n){if(1===t.length)return t;var e=t.length-1,r=n.length-1,i=e/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;s--)u=o[s].index,"add"===o[s].type?t.splice(u,0,[].concat(t[u])):t.splice(u,1)}if((i=t.length)0)){t[r]=n[r];break}e=v(e,t[r-1],1)}t[r]=["Q"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"T":t[r]=["T"].concat(e[0]);break;case"C":if(e.length<3){if(!(r>0)){t[r]=n[r];break}e=v(e,t[r-1],2)}t[r]=["C"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;case"S":if(e.length<2){if(!(r>0)){t[r]=n[r];break}e=v(e,t[r-1],1)}t[r]=["S"].concat(e.reduce((function(t,n){return t.concat(n)}),[]));break;default:t[r]=n[r]}return t}function y(t,n,e,r,i){return i?[["M",+t+ +i,n],["l",e-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-e,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",t,n],["l",e,0],["l",0,r],["l",-e,0],["z"]]}var m="\t\n\v\f\r   ᠎              \u2028\u2029",x=new RegExp("([a-z])["+m+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+m+"]*,?["+m+"]*)+)","ig"),b=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+m+"]*,?["+m+"]*","ig");function M(t){if(!t)return null;if(Object(r.isArray)(t))return t;var n={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},e=[];return String(t).replace(x,(function(t,r,i){var a=[],o=r.toLowerCase();if(i.replace(b,(function(t,n){n&&a.push(+n)})),"m"===o&&a.length>2&&(e.push([r].concat(a.splice(0,2))),o="l",r="m"===r?"l":"L"),"o"===o&&1===a.length&&e.push([r,a[0]]),"r"===o)e.push([r].concat(a));else for(;a.length>=n[o]&&(e.push([r].concat(a.splice(0,n[o]))),n[o]););return""})),e}var w=/[a-z]/;function P(t,n){return[n[0]+(n[0]-t[0]),n[1]+(n[1]-t[1])]}function _(t){var n=M(t);if(!n||!n.length)return[["M",0,0]];for(var e=!1,r=0;r=0){e=!0;break}}if(!e)return n;var a=[],o=0,u=0,c=0,s=0,f=0,h=n[0];"M"!==h[0]&&"m"!==h[0]||(c=o=+h[1],s=u=+h[2],f++,a[0]=["M",o,u]);r=f;for(var l=n.length;r1&&(i=1),i<-1&&(i=-1),(t*r-n*e<0?-1:1)*Math.acos(i)},j=function(t){var n=t.px,e=t.py,r=t.cx,i=t.cy,a=t.rx,o=t.ry,u=t.xAxisRotation,c=void 0===u?0:u,s=t.largeArcFlag,f=void 0===s?0:s,h=t.sweepFlag,l=void 0===h?0:h,p=[];if(0===a||0===o)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];var d=Math.sin(c*A/360),v=Math.cos(c*A/360),g=v*(n-r)/2+d*(e-i)/2,y=-d*(n-r)/2+v*(e-i)/2;if(0===g&&0===y)return[{x1:0,y1:0,x2:0,y2:0,x:r,y:i}];a=Math.abs(a),o=Math.abs(o);var m=Math.pow(g,2)/Math.pow(a,2)+Math.pow(y,2)/Math.pow(o,2);m>1&&(a*=Math.sqrt(m),o*=Math.sqrt(m));var x=function(t,n,e,r,i,a,o,u,c,s,f,h){var l=Math.pow(i,2),p=Math.pow(a,2),d=Math.pow(f,2),v=Math.pow(h,2),g=l*p-l*v-p*d;g<0&&(g=0),g/=l*v+p*d;var y=(g=Math.sqrt(g)*(o===u?-1:1))*i/a*h,m=g*-a/i*f,x=s*y-c*m+(t+e)/2,b=c*y+s*m+(n+r)/2,M=(f-y)/i,w=(h-m)/a,P=(-f-y)/i,_=(-h-m)/a,O=S(1,0,M,w),C=S(M,w,P,_);return 0===u&&C>0&&(C-=A),1===u&&C<0&&(C+=A),[x,b,O,C]}(n,e,r,i,a,o,f,l,d,v,g,y),b=x[0],M=x[1],w=x[2],P=x[3],_=Math.abs(P)/(A/4);Math.abs(1-_)<1e-7&&(_=1);var j=Math.max(Math.ceil(_),1);P/=j;for(var k=0;k7){t[e].shift();for(var r=t[e],i=e;r.length;)n[e]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(e,1)}}var D=function(t,n,e,r,i){return t*(t*(-3*n+9*e-9*r+3*i)+6*n-12*e+6*r)-3*n+3*e},q=function(t,n,e,r,i,a,o,u,c){null===c&&(c=1);for(var s=(c=c>1?1:c<0?0:c)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],l=0,p=0;p<12;p++){var d=s*f[p]+s,v=D(d,t,e,i,o),g=D(d,n,r,a,u),y=v*v+g*g;l+=h[p]*Math.sqrt(y)}return s*l},X=function(t,n,e,r,i,a,o,u){for(var c,s,f,h,l=[],p=[[],[]],d=0;d<2;++d)if(0===d?(s=6*t-12*e+6*i,c=-3*t+9*e-9*i+3*o,f=3*e-3*t):(s=6*n-12*r+6*a,c=-3*n+9*r-9*a+3*u,f=3*r-3*n),Math.abs(c)<1e-12){if(Math.abs(s)<1e-12)continue;(h=-f/s)>0&&h<1&&l.push(h)}else{var v=s*s-4*f*c,g=Math.sqrt(v);if(!(v<0)){var y=(-s+g)/(2*c);y>0&&y<1&&l.push(y);var m=(-s-g)/(2*c);m>0&&m<1&&l.push(m)}}for(var x,b=l.length,M=b;b--;)x=1-(h=l[b]),p[0][b]=x*x*x*t+3*x*x*h*e+3*x*h*h*i+h*h*h*o,p[1][b]=x*x*x*n+3*x*x*h*r+3*x*h*h*a+h*h*h*u;return p[0][M]=t,p[1][M]=n,p[0][M+1]=o,p[1][M+1]=u,p[0].length=p[1].length=M+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},N=function(t,n,e,r,i,a,o,u){if(!(Math.max(t,e)Math.max(i,o)||Math.max(n,r)Math.max(a,u))){var c=(t-e)*(a-u)-(n-r)*(i-o);if(c){var s=((t*r-n*e)*(i-o)-(t-e)*(i*u-a*o))/c,f=((t*r-n*e)*(a-u)-(n-r)*(i*u-a*o))/c,h=+s.toFixed(2),l=+f.toFixed(2);if(!(h<+Math.min(t,e).toFixed(2)||h>+Math.max(t,e).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||l<+Math.min(n,r).toFixed(2)||l>+Math.max(n,r).toFixed(2)||l<+Math.min(a,u).toFixed(2)||l>+Math.max(a,u).toFixed(2)))return{x:s,y:f}}}},R=function(t,n,e){return n>=t.x&&n<=t.x+t.width&&e>=t.y&&e<=t.y+t.height},L=function(t,n,e,r){return null===t&&(t=n=e=r=0),null===n&&(n=t.y,e=t.width,r=t.height,t=t.x),{x:t,y:n,width:e,w:e,height:r,h:r,x2:t+e,y2:n+r,cx:t+e/2,cy:n+r/2,r1:Math.min(e,r)/2,r2:Math.max(e,r)/2,r0:Math.sqrt(e*e+r*r)/2,path:y(t,n,e,r),vb:[t,n,e,r].join(" ")}},Y=function(t,n,e,i,a,o,u,c){Object(r.isArray)(t)||(t=[t,n,e,i,a,o,u,c]);var s=X.apply(null,t);return L(s.min.x,s.min.y,s.max.x-s.min.x,s.max.y-s.min.y)},z=function(t,n,e,r,i,a,o,u,c){var s=1-c,f=Math.pow(s,3),h=Math.pow(s,2),l=c*c,p=l*c,d=t+2*c*(e-t)+l*(i-2*e+t),v=n+2*c*(r-n)+l*(a-2*r+n),g=e+2*c*(i-e)+l*(o-2*i+e),y=r+2*c*(a-r)+l*(u-2*a+r);return{x:f*t+3*h*c*e+3*s*c*c*i+p*o,y:f*n+3*h*c*r+3*s*c*c*a+p*u,m:{x:d,y:v},n:{x:g,y:y},start:{x:s*t+c*e,y:s*n+c*r},end:{x:s*i+c*o,y:s*a+c*u},alpha:90-180*Math.atan2(d-g,v-y)/Math.PI}},W=function(t,n,e){if(!function(t,n){return t=L(t),n=L(n),R(n,t.x,t.y)||R(n,t.x2,t.y)||R(n,t.x,t.y2)||R(n,t.x2,t.y2)||R(t,n.x,n.y)||R(t,n.x2,n.y)||R(t,n.x,n.y2)||R(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)}(Y(t),Y(n)))return e?0:[];for(var r=~~(q.apply(0,t)/8),i=~~(q.apply(0,n)/8),a=[],o=[],u={},c=e?0:[],s=0;s=0&&x<=1&&b>=0&&b<=1&&(e?c++:c.push({x:m.x,y:m.y,t1:x,t2:b}))}}return c};function $(t,n){return function(t,n,e){var r,i,a,o,u,c,s,f,h,l;t=I(t),n=I(n);for(var p=e?0:[],d=0,v=t.length;d1&&(e*=Math.sqrt(d),i*=Math.sqrt(d));var v=e*e*(p*p)+i*i*(l*l),g=v?Math.sqrt((e*e*(i*i)-v)/v):1;o===u&&(g*=-1),isNaN(g)&&(g=0);var y=i?g*e*p/i:0,m=e?g*-i*l/e:0,x=(c+f)/2+Math.cos(a)*y-Math.sin(a)*m,b=(s+h)/2+Math.sin(a)*y+Math.cos(a)*m,M=[(l-y)/e,(p-m)/i],w=[(-1*l-y)/e,(-1*p-m)/i],P=Z([1,0],M),_=Z(M,w);return G(M,w)<=-1&&(_=Math.PI),G(M,w)>=1&&(_=0),0===u&&_>0&&(_-=2*Math.PI),1===u&&_<0&&(_+=2*Math.PI),{cx:x,cy:b,rx:U(t,[f,h])?0:e,ry:U(t,[f,h])?0:i,startAngle:P,endAngle:P+_,xRotation:a,arcFlag:o,sweepFlag:u}}function J(t,n){return[n[0]+(n[0]-t[0]),n[1]+(n[1]-t[1])]}function tt(t){for(var n=[],e=null,r=null,i=null,a=0,u=(t=o(t)).length,c=0;c=n&&t<=e};function et(t,n,e,r){var i=e.x-t.x,a=e.y-t.y,o=n.x-t.x,u=n.y-t.y,c=r.x-e.x,s=r.y-e.y,f=o*s-u*c,h=null;if(f*f>.001*(o*o+u*u)*(c*c+s*s)){var l=(i*s-a*c)/f,p=(i*u-a*o)/f;nt(l,0,1)&&nt(p,0,1)&&(h={x:t.x+l*o,y:t.y+l*u})}return h}function rt(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function it(t,n,e){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])&&Math.min(t[0],n[0])<=e[0]&&e[0]<=Math.max(t[0],n[0])&&Math.min(t[1],n[1])<=e[1]&&e[1]<=Math.max(t[1],n[1])}function at(t,n,e){var r=!1,i=t.length;if(i<=2)return!1;for(var a=0;a0!=rt(u[1]-e)>0&&rt(n-(e-o[1])*(o[0]-u[0])/(o[1]-u[1])-o[0])<0&&(r=!r)}return r}function ot(t){for(var n=[],e=t.length,r=0;r1){var o=t[0],u=t[e-1];n.push({from:{x:u[0],y:u[1]},to:{x:o[0],y:o[1]}})}return n}function ut(t){var n=t.map((function(t){return t[0]})),e=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,n),maxX:Math.max.apply(null,n),minY:Math.min.apply(null,e),maxY:Math.max.apply(null,e)}}function ct(t,n){if(t.length<2||n.length<2)return!1;var e,i,a=ut(t),o=ut(n);if(e=a,(i=o).minX>e.maxX||i.maxXe.maxY||i.maxY=0&&n._call.call(null,t),n=n._next;--f}()}finally{f=0,function(){var t,n,e=r,a=1/0;for(;e;)e._call?(a>e._time&&(a=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:r=n);i=t,_(a)}(),d=0}}function P(){var t=g.now(),n=t-p;n>1e3&&(v-=n,p=t)}function _(t){f||(h&&(h=clearTimeout(h)),t-d>24?(t<1/0&&(h=setTimeout(w,t-g.now()-v)),l&&(l=clearInterval(l))):(l||(p=g.now(),l=setInterval(P,1e3)),f=1,y(w)))}b.prototype=M.prototype={constructor:b,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?m():+e)+(null==n?0:+n),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=e,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}};var A=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function O(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function C(){}var S="\\s*([+-]?\\d+)\\s*",j="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",k="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",T=/^#([0-9a-f]{3,8})$/,E=new RegExp(`^rgb\\(${S},${S},${S}\\)$`),B=new RegExp(`^rgb\\(${k},${k},${k}\\)$`),I=new RegExp(`^rgba\\(${S},${S},${S},${j}\\)$`),F=new RegExp(`^rgba\\(${k},${k},${k},${j}\\)$`),D=new RegExp(`^hsl\\(${j},${k},${k}\\)$`),q=new RegExp(`^hsla\\(${j},${k},${k},${j}\\)$`),X={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function N(){return this.rgb().formatHex()}function R(){return this.rgb().formatRgb()}function L(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=T.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?Y(n):3===e?new V(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?z(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?z(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=E.exec(t))?new V(n[1],n[2],n[3],1):(n=B.exec(t))?new V(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=I.exec(t))?z(n[1],n[2],n[3],n[4]):(n=F.exec(t))?z(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=D.exec(t))?K(n[1],n[2]/100,n[3]/100,1):(n=q.exec(t))?K(n[1],n[2]/100,n[3]/100,n[4]):X.hasOwnProperty(t)?Y(X[t]):"transparent"===t?new V(NaN,NaN,NaN,0):null}function Y(t){return new V(t>>16&255,t>>8&255,255&t,1)}function z(t,n,e,r){return r<=0&&(t=n=e=NaN),new V(t,n,e,r)}function W(t){return t instanceof C||(t=L(t)),t?new V((t=t.rgb()).r,t.g,t.b,t.opacity):new V}function $(t,n,e,r){return 1===arguments.length?W(t):new V(t,n,e,null==r?1:r)}function V(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function H(){return`#${U(this.r)}${U(this.g)}${U(this.b)}`}function Q(){const t=G(this.opacity);return`${1===t?"rgb(":"rgba("}${Z(this.r)}, ${Z(this.g)}, ${Z(this.b)}${1===t?")":`, ${t})`}`}function G(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Z(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function U(t){return((t=Z(t))<16?"0":"")+t.toString(16)}function K(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new tt(t,n,e,r)}function J(t){if(t instanceof tt)return new tt(t.h,t.s,t.l,t.opacity);if(t instanceof C||(t=L(t)),!t)return new tt;if(t instanceof tt)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,u=a-i,c=(a+i)/2;return u?(o=n===a?(e-r)/u+6*(e0&&c<1?0:o,new tt(o,u,c,t.opacity)}function tt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function nt(t){return(t=(t||0)%360)<0?t+360:t}function et(t){return Math.max(0,Math.min(1,t||0))}function rt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function it(t,n,e,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*n+(4-6*a+3*o)*e+(1+3*t+3*a-3*o)*r+o*i)/6}A(C,L,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:N,formatHex:N,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return J(this).formatHsl()},formatRgb:R,toString:R}),A(V,$,O(C,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new V(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new V(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new V(Z(this.r),Z(this.g),Z(this.b),G(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:H,formatHex:H,formatHex8:function(){return`#${U(this.r)}${U(this.g)}${U(this.b)}${U(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Q,toString:Q})),A(tt,(function(t,n,e,r){return 1===arguments.length?J(t):new tt(t,n,e,null==r?1:r)}),O(C,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new tt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new tt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new V(rt(t>=240?t-240:t+120,i,r),rt(t,i,r),rt(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new tt(nt(this.h),et(this.s),et(this.l),G(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=G(this.opacity);return`${1===t?"hsl(":"hsla("}${nt(this.h)}, ${100*et(this.s)}%, ${100*et(this.l)}%${1===t?")":`, ${t})`}`}}));var at=t=>()=>t;function ot(t,n){return function(e){return t+e*n}}function ut(t){return 1==(t=+t)?ct:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):at(isNaN(n)?e:n)}}function ct(t,n){var e=n-t;return e?ot(t,e):at(isNaN(t)?n:t)}var st=function t(n){var e=ut(n);function r(t,n){var r=e((t=$(t)).r,(n=$(n)).r),i=e(t.g,n.g),a=e(t.b,n.b),o=ct(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=a(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function ft(t){return function(n){var e,r,i=n.length,a=new Array(i),o=new Array(i),u=new Array(i);for(e=0;e=1?(e=1,n-1):Math.floor(e*n),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,u=ra&&(i=n.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(e=e[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,c.push({i:o,x:vt(e,r)})),a=mt.lastIndex;return ap.length?(l=wt.parsePathString(a[h]),p=wt.parsePathString(i[h]),p=wt.fillPathByDiff(p,l),p=wt.formatPath(p,l),n.fromAttrs.path=p,n.toAttrs.path=l):n.pathFormatted||(l=wt.parsePathString(a[h]),p=wt.parsePathString(i[h]),p=wt.formatPath(p,l),n.fromAttrs.path=p,n.toAttrs.path=l,n.pathFormatted=!0),r[h]=[];for(var d=0;d0){for(var a=r.animators.length-1;a>=0;a--)if((t=r.animators[a]).destroyed)r.removeAnimator(a);else{if(!t.isAnimatePaused())for(var o=(n=t.get("animations")).length-1;o>=0;o--)e=n[o],_t(t,e,i)&&(n.splice(o,1),!1,e.callback&&e.callback());0===n.length&&r.removeAnimator(a)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(n){n.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Ot=e(19),Ct=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function St(t,n,e){e.name=n,e.target=t,e.currentTarget=t,e.delegateTarget=t,t.emit(n,e)}function jt(t,n,e){if(e.bubbles){var r=void 0,i=!1;if("mouseenter"===n?(r=e.fromShape,i=!0):"mouseleave"===n&&(i=!0,r=e.toShape),t.isCanvas()&&i)return;if(r&&Object(c.g)(t,r))return void(e.bubbles=!1);e.name=n,e.currentTarget=t,e.delegateTarget=t,t.emit(n,e)}}var kt=function(){function t(t){var n=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var e=t.type;n._triggerEvent(e,t)},this._onDocumentMove=function(t){if(n.canvas.get("el")!==t.target&&(n.dragging||n.currentShape)){var e=n._getPointInfo(t);n.dragging&&n._emitEvent("drag",t,e,n.draggingShape)}},this._onDocumentMouseUp=function(t){if(n.canvas.get("el")!==t.target&&n.dragging){var e=n._getPointInfo(t);n.draggingShape&&n._emitEvent("drop",t,e,null),n._emitEvent("dragend",t,e,n.draggingShape),n._afterDrag(n.draggingShape,e,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,n=this.canvas.get("el");Object(c.a)(Ct,(function(e){n.addEventListener(e,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,n=this.canvas.get("el");Object(c.a)(Ct,(function(e){n.removeEventListener(e,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,n,e,r,i,a){var o=new Ot.a(t,n);return o.fromShape=i,o.toShape=a,o.x=e.x,o.y=e.y,o.clientX=e.clientX,o.clientY=e.clientY,o.propagationPath.push(r),o},t.prototype._getShape=function(t,n){return this.canvas.getShape(t.x,t.y,n)},t.prototype._getPointInfo=function(t){var n=this.canvas,e=n.getClientByEvent(t),r=n.getPointByEvent(t);return{x:r.x,y:r.y,clientX:e.x,clientY:e.y}},t.prototype._triggerEvent=function(t,n){var e=this._getPointInfo(n),r=this._getShape(e,n),i=this["_on"+t],a=!1;if(i)i.call(this,e,r,n);else{var o=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,n,e,null,null,r),r&&this._emitEvent(t,n,e,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",n,e,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(a=!0,o&&this._emitEvent(t,n,e,o,o,null),this._emitEvent(t,n,e,null,o,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",n,e,null)):this._emitEvent(t,n,e,r,null,null)}if(a||(this.currentShape=r),r&&!r.get("destroyed")){var u=this.canvas;u.get("el").style.cursor=r.attr("cursor")||u.get("cursor")}},t.prototype._onmousedown=function(t,n,e){0===e.button&&(this.mousedownShape=n,this.mousedownPoint=t,this.mousedownTimeStamp=e.timeStamp),this._emitEvent("mousedown",e,t,n,null,null)},t.prototype._emitMouseoverEvents=function(t,n,e,r){var i=this.canvas.get("el");e!==r&&(e&&(this._emitEvent("mouseout",t,n,e,e,r),this._emitEvent("mouseleave",t,n,e,e,r),r&&!r.get("destroyed")||(i.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,n,r,e,r),this._emitEvent("mouseenter",t,n,r,e,r)))},t.prototype._emitDragoverEvents=function(t,n,e,r,i){r?(r!==e&&(e&&this._emitEvent("dragleave",t,n,e,e,r),this._emitEvent("dragenter",t,n,r,e,r)),i||this._emitEvent("dragover",t,n,r)):e&&this._emitEvent("dragleave",t,n,e,e,r),i&&this._emitEvent("dragover",t,n,r)},t.prototype._afterDrag=function(t,n,e){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(n,e);r!==t&&this._emitMouseoverEvents(e,n,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,n,e){if(0===e.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",e,t,n),this._emitEvent("dragend",e,t,r),this._afterDrag(r,t,e)):(this._emitEvent("mouseup",e,t,n),n===this.mousedownShape&&this._emitEvent("click",e,t,n),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,n,e){e.preventDefault();var r=this.currentShape;this._emitDragoverEvents(e,t,r,n,!0)},t.prototype._onmousemove=function(t,n,e){var r=this.canvas,i=this.currentShape,a=this.draggingShape;if(this.dragging)a&&this._emitDragoverEvents(e,t,i,n,!1),this._emitEvent("drag",e,t,a);else{var o=this.mousedownPoint;if(o){var u=this.mousedownShape,c=e.timeStamp-this.mousedownTimeStamp,s=o.clientX-t.clientX,f=o.clientY-t.clientY;c>120||s*s+f*f>40?u&&u.get("draggable")?((a=this.mousedownShape).set("capture",!1),this.draggingShape=a,this.dragging=!0,this._emitEvent("dragstart",e,t,a),this.mousedownShape=null,this.mousedownPoint=null):!u&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",e,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(e,t,i,n),this._emitEvent("mousemove",e,t,n)):(this._emitMouseoverEvents(e,t,i,n),this._emitEvent("mousemove",e,t,n))}else this._emitMouseoverEvents(e,t,i,n),this._emitEvent("mousemove",e,t,n)}},t.prototype._emitEvent=function(t,n,e,r,i,a){var o=this._getEventObj(t,n,e,r,i,a);if(r){o.shape=r,St(r,t,o);for(var u=r.getParent();u;)u.emitDelegation(t,o),o.propagationStopped||jt(u,t,o),o.propagationPath.push(u),u=u.getParent()}else{St(this.canvas,t,o)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),Tt=Object(o.a)(),Et=Tt&&"firefox"===Tt.name,Bt=function(t){function n(n){var e=t.call(this,n)||this;return e.initContainer(),e.initDom(),e.initEvents(),e.initTimeline(),e}return Object(a.a)(n,t),n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.cursor="default",n.supportCSSTransform=!1,n},n.prototype.initContainer=function(){var t=this.get("container");Object(c.h)(t)&&(t=document.getElementById(t),this.set("container",t))},n.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},n.prototype.initEvents=function(){var t=new kt({canvas:this});t.init(),this.set("eventController",t)},n.prototype.initTimeline=function(){var t=new At(this);this.set("timeline",t)},n.prototype.setDOMSize=function(t,n){var e=this.get("el");c.c&&(e.style.width=t+"px",e.style.height=n+"px")},n.prototype.changeSize=function(t,n){this.setDOMSize(t,n),this.set("width",t),this.set("height",n),this.onCanvasChange("changeSize")},n.prototype.getRenderer=function(){return this.get("renderer")},n.prototype.getCursor=function(){return this.get("cursor")},n.prototype.setCursor=function(t){this.set("cursor",t);var n=this.get("el");c.c&&n&&(n.style.cursor=t)},n.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(Et&&!Object(c.e)(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!Object(c.e)(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var n=this.getClientByEvent(t),e=n.x,r=n.y;return this.getPointByClient(e,r)},n.prototype.getClientByEvent=function(t){var n=t;return t.touches&&(n="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:n.clientX,y:n.clientY}},n.prototype.getPointByClient=function(t,n){var e=this.get("el").getBoundingClientRect();return{x:t-e.left,y:n-e.top}},n.prototype.getClientByPoint=function(t,n){var e=this.get("el").getBoundingClientRect();return{x:t+e.left,y:n+e.top}},n.prototype.draw=function(){},n.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},n.prototype.clearEvents=function(){this.get("eventController").destroy()},n.prototype.isCanvas=function(){return!0},n.prototype.getParent=function(){return null},n.prototype.destroy=function(){var n=this.get("timeline");this.get("destroyed")||(this.clear(),n&&n.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},n}(u.a);n.a=Bt},function(t,n,e){"use strict";(function(t){e.d(n,"a",(function(){return l}));var r=function(t,n,e){if(e||2===arguments.length)for(var r,i=0,a=n.length;i1)for(var e=1;e=s-f&&h<=s+f)},n.prototype.createPath=function(t){var n=this.attr(),e=n.x,r=n.y,i=n.r;t.beginPath(),t.arc(e,r,i,0,2*Math.PI,!1),t.closePath()},n}(i.default);n.default=o},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6);function i(t,n,e,r){return t/(e*e)+n/(r*r)}var a=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,rx:0,ry:0})},n.prototype.isInStrokeOrPath=function(t,n,e,r,a){var o=this.attr(),u=a/2,c=o.x,s=o.y,f=o.rx,h=o.ry,l=(t-c)*(t-c),p=(n-s)*(n-s);return r&&e?i(l,p,f+u,h+u)<=1:r?i(l,p,f,h)<=1:!!e&&(i(l,p,f-u,h-u)>=1&&i(l,p,f+u,h+u)<=1)},n.prototype.createPath=function(t){var n=this.attr(),e=n.x,r=n.y,i=n.rx,a=n.ry;if(t.beginPath(),t.ellipse)t.ellipse(e,r,i,a,0,0,2*Math.PI,!1);else{var o=i>a?i:a,u=i>a?1:i/a,c=i>a?a/i:1;t.save(),t.translate(e,r),t.scale(u,c),t.arc(0,0,o,0,2*Math.PI),t.restore(),t.closePath()}},n}(e(11).default);n.default=a},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(11),a=e(8);function o(t){return t instanceof HTMLElement&&(0,a.isString)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,width:0,height:0})},n.prototype.initAttrs=function(t){this._setImage(t.img)},n.prototype.isStroke=function(){return!1},n.prototype.isOnlyHitBox=function(){return!0},n.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},n.prototype._setImage=function(t){var n=this,e=this.attrs;if((0,a.isString)(t)){var r=new Image;r.onload=function(){if(n.destroyed)return!1;n.attr("img",r),n.set("loading",!1),n._afterLoading();var t=n.get("callback");t&&t.call(n)},r.crossOrigin="Anonymous",r.src=t,this.set("loading",!0)}else t instanceof Image?(e.width||(e.width=t.width),e.height||(e.height=t.height)):o(t)&&(e.width||(e.width=Number(t.getAttribute("width"))),e.height||(e.height,Number(t.getAttribute("height"))))},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),"img"===n&&this._setImage(e)},n.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var n=this.attr(),e=n.x,r=n.y,i=n.width,u=n.height,c=n.sx,s=n.sy,f=n.swidth,h=n.sheight,l=n.img;(l instanceof Image||o(l))&&((0,a.isNil)(c)||(0,a.isNil)(s)||(0,a.isNil)(f)||(0,a.isNil)(h)?t.drawImage(l,e,r,i,u):t.drawImage(l,c,s,f,h,e,r,i,u))},n}(i.default);n.default=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(7),a=e(11),o=e(18),u=e(17),c=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},n.prototype.initAttrs=function(t){this.setArrow()},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),this.setArrow()},n.prototype.setArrow=function(){var t=this.attr(),n=t.x1,e=t.y1,r=t.x2,i=t.y2,a=t.startArrow,o=t.endArrow;a&&u.addStartArrow(this,t,r,i,n,e),o&&u.addEndArrow(this,t,n,e,r,i)},n.prototype.isInStrokeOrPath=function(t,n,e,r,i){if(!e||!i)return!1;var a=this.attr(),u=a.x1,c=a.y1,s=a.x2,f=a.y2;return(0,o.default)(u,c,s,f,i,t,n)},n.prototype.createPath=function(t){var n=this.attr(),e=n.x1,r=n.y1,i=n.x2,a=n.y2,o=n.startArrow,c=n.endArrow,s={dx:0,dy:0},f={dx:0,dy:0};o&&o.d&&(s=u.getShortenOffset(e,r,i,a,n.startArrow.d)),c&&c.d&&(f=u.getShortenOffset(e,r,i,a,n.endArrow.d)),t.beginPath(),t.moveTo(e+s.dx,r+s.dy),t.lineTo(i-f.dx,a-f.dy)},n.prototype.afterDrawPath=function(t){var n=this.get("startArrowShape"),e=this.get("endArrowShape");n&&n.draw(t),e&&e.draw(t)},n.prototype.getTotalLength=function(){var t=this.attr(),n=t.x1,e=t.y1,r=t.x2,a=t.y2;return i.Line.length(n,e,r,a)},n.prototype.getPoint=function(t){var n=this.attr(),e=n.x1,r=n.y1,a=n.x2,o=n.y2;return i.Line.pointAt(e,r,a,o,t)},n}(a.default);n.default=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(5),a=e(38),o=e(11),u=e(8),c=e(16),s={circle:function(t,n,e){return[["M",t-e,n],["A",e,e,0,1,0,t+e,n],["A",e,e,0,1,0,t-e,n]]},square:function(t,n,e){return[["M",t-e,n-e],["L",t+e,n-e],["L",t+e,n+e],["L",t-e,n+e],["Z"]]},diamond:function(t,n,e){return[["M",t-e,n],["L",t,n-e],["L",t+e,n],["L",t,n+e],["Z"]]},triangle:function(t,n,e){var r=e*Math.sin(1/3*Math.PI);return[["M",t-e,n+r],["L",t,n-r],["L",t+e,n+r],["Z"]]},"triangle-down":function(t,n,e){var r=e*Math.sin(1/3*Math.PI);return[["M",t-e,n-r],["L",t+e,n-r],["L",t,n+r],["Z"]]}},f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.initAttrs=function(t){this._resetParamsCache()},n.prototype._resetParamsCache=function(){this.set("paramsCache",{})},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),-1!==["symbol","x","y","r","radius"].indexOf(n)&&this._resetParamsCache()},n.prototype.isOnlyHitBox=function(){return!0},n.prototype._getR=function(t){return(0,i.isNil)(t.r)?t.radius:t.r},n.prototype._getPath=function(){var t,e,r=this.attr(),i=r.x,o=r.y,c=r.symbol||"circle",s=this._getR(r);if((0,u.isFunction)(c))e=(t=c)(i,o,s),e=(0,a.path2Absolute)(e);else{if(!(t=n.Symbols[c]))return console.warn("".concat(c," marker is not supported.")),null;e=t(i,o,s)}return e},n.prototype.createPath=function(t){var n=this._getPath(),e=this.get("paramsCache");(0,c.drawPath)(this,t,{path:n},e)},n.Symbols=s,n}(o.default);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(7),a=e(5),o=e(11),u=e(38),c=e(16),s=e(34),f=e(35),h=e(63),l=e(17);function p(t,n,e){for(var r=!1,i=0;i=r[0]&&t<=r[1]&&(n=(t-r[0])/(r[1]-r[0]),e=i)}));var u=o[e];if((0,a.isNil)(u)||(0,a.isNil)(e))return null;var c=u.length,s=o[e+1];return i.Cubic.pointAt(u[c-2],u[c-1],s[1],s[2],s[3],s[4],s[5],s[6],n)},n.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",h.default.pathToCurve(t))},n.prototype._setTcache=function(){var t,n,e,r,o=0,u=0,c=[],s=this.get("curve");s&&((0,a.each)(s,(function(t,n){e=s[n+1],r=t.length,e&&(o+=i.Cubic.length(t[r-2],t[r-1],e[1],e[2],e[3],e[4],e[5],e[6])||0)})),this.set("totalLength",o),0!==o?((0,a.each)(s,(function(a,f){e=s[f+1],r=a.length,e&&((t=[])[0]=u/o,n=i.Cubic.length(a[r-2],a[r-1],e[1],e[2],e[3],e[4],e[5],e[6]),u+=n||0,t[1]=u/o,c.push(t))})),this.set("tCache",c)):this.set("tCache",[]))},n.prototype.getStartTangent=function(){var t,n=this.getSegments();if(n.length>1){var e=n[0].currentPoint,r=n[1].currentPoint,i=n[1].startTangent;t=[],i?(t.push([e[0]-i[0],e[1]-i[1]]),t.push([e[0],e[1]])):(t.push([r[0],r[1]]),t.push([e[0],e[1]]))}return t},n.prototype.getEndTangent=function(){var t,n=this.getSegments(),e=n.length;if(e>1){var r=n[e-2].currentPoint,i=n[e-1].currentPoint,a=n[e-1].endTangent;t=[],a?(t.push([i[0]-a[0],i[1]-a[1]]),t.push([i[0],i[1]])):(t.push([r[0],r[1]]),t.push([i[0],i[1]]))}return t},n}(o.default);n.default=d},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(12),a=e(7),o=e(7),u=e(74),c=e(26),s=e(8),f=e(18),h=e(36),l=u.ext.transform;n.default=r.__assign({hasArc:function(t){for(var n=!1,e=t.length,r=0;r0&&r.push(i),{polygons:e,polylines:r}},isPointInStroke:function(t,n,e,r,i){for(var u=!1,p=n/2,d=0;d_?P:_,k=l(null,[["t",-M,-w],["r",-C],["s",1/(P>_?1:P/_),1/(P>_?_/P:1)]]);c.transformMat3(S,S,k),u=(0,h.default)(0,0,j,A,O,n,S[0],S[1])}if(u)break}}return u}},i.PathUtil)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(11),a=e(37),o=e(35),u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.isInStrokeOrPath=function(t,n,e,r,i){var u=this.attr().points,c=!1;return e&&(c=(0,a.default)(u,i,t,n,!0)),!c&&r&&(c=(0,o.default)(u,t,n)),c},n.prototype.createPath=function(t){var n=this.attr().points;if(!(n.length<2)){t.beginPath();for(var e=0;e=r[0]&&t<=r[1]&&(n=(t-r[0])/(r[1]-r[0]),e=i)})),i.Line.pointAt(r[e][0],r[e][1],r[e+1][0],r[e+1][1],n)},n.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var n=this.getTotalLength();if(!(n<=0)){var e,r,a=0,u=[];(0,o.each)(t,(function(o,c){t[c+1]&&((e=[])[0]=a/n,r=i.Line.length(o[0],o[1],t[c+1][0],t[c+1][1]),a+=r,e[1]=a/n,u.push(e))})),this.set("tCache",u)}}},n.prototype.getStartTangent=function(){var t=this.attr().points,n=[];return n.push([t[1][0],t[1][1]]),n.push([t[0][0],t[0][1]]),n},n.prototype.getEndTangent=function(){var t=this.attr().points,n=t.length-1,e=[];return e.push([t[n-1][0],t[n-1][1]]),e.push([t[n][0],t[n][1]]),e},n}(u.default);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(11),a=e(32),o=e(8),u=e(67),c=e(68),s=e(34),f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,width:0,height:0,radius:0})},n.prototype.isInStrokeOrPath=function(t,n,e,r,i){var a=this.attr(),f=a.x,h=a.y,l=a.width,p=a.height,d=a.radius;if(d){var v=!1;return e&&(v=(0,c.default)(f,h,l,p,d,i,t,n)),!v&&r&&(v=(0,s.default)(this,t,n)),v}var g=i/2;return r&&e?(0,o.inBox)(f-g,h-g,l+g,p+g,t,n):r?(0,o.inBox)(f,h,l,p,t,n):e?(0,u.default)(f,h,l,p,i,t,n):void 0},n.prototype.createPath=function(t){var n=this.attr(),e=n.x,r=n.y,i=n.width,o=n.height,u=n.radius;if(t.beginPath(),0===u)t.rect(e,r,i,o);else{var c=(0,a.parseRadius)(u),s=c[0],f=c[1],h=c[2],l=c[3];t.moveTo(e+s,r),t.lineTo(e+i-f,r),0!==f&&t.arc(e+i-f,r+f,f,-Math.PI/2,0),t.lineTo(e+i,r+o-h),0!==h&&t.arc(e+i-h,r+o-h,h,0,Math.PI/2),t.lineTo(e+l,r+o),0!==l&&t.arc(e+l,r+o-l,l,Math.PI/2,Math.PI),t.lineTo(e,r+s),0!==s&&t.arc(e+s,r+s,s,Math.PI,1.5*Math.PI),t.closePath()}},n}(i.default);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(8);n.default=function(t,n,e,i,a,o,u){var c=a/2;return(0,r.inBox)(t-c,n-c,e,a,o,u)||(0,r.inBox)(t+e-c,n-c,a,i,o,u)||(0,r.inBox)(t+c,n+i-c,e,a,o,u)||(0,r.inBox)(t-c,n+c,a,i,o,u)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(18),i=e(36);n.default=function(t,n,e,a,o,u,c,s){return(0,r.default)(t+o,n,t+e-o,n,u,c,s)||(0,r.default)(t+e,n+o,t+e,n+a-o,u,c,s)||(0,r.default)(t+e-o,n+a,t+o,n+a,u,c,s)||(0,r.default)(t,n+a-o,t,n+o,u,c,s)||(0,i.default)(t+e-o,n+o,o,1.5*Math.PI,2*Math.PI,u,c,s)||(0,i.default)(t+e-o,n+a-o,o,0,.5*Math.PI,u,c,s)||(0,i.default)(t+o,n+a-o,o,.5*Math.PI,Math.PI,u,c,s)||(0,i.default)(t+o,n+o,o,Math.PI,1.5*Math.PI,u,c,s)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(11),a=e(8),o=e(12),u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultAttrs=function(){var n=t.prototype.getDefaultAttrs.call(this);return r.__assign(r.__assign({},n),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},n.prototype.isOnlyHitBox=function(){return!0},n.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},n.prototype._assembleFont=function(){var t=this.attrs;t.font=(0,o.assembleFont)(t)},n.prototype._setText=function(t){var n=null;(0,a.isString)(t)&&-1!==t.indexOf("\n")&&(n=t.split("\n")),this.set("textArr",n)},n.prototype.onAttrChange=function(n,e,r){t.prototype.onAttrChange.call(this,n,e,r),n.startsWith("font")&&this._assembleFont(),"text"===n&&this._setText(e)},n.prototype._getSpaceingY=function(){var t=this.attrs,n=t.lineHeight,e=1*t.fontSize;return n?n-e:.14*e},n.prototype._drawTextArr=function(t,n,e){var r,i=this.attrs,u=i.textBaseline,c=i.x,s=i.y,f=1*i.fontSize,h=this._getSpaceingY(),l=(0,o.getTextHeight)(i.text,i.fontSize,i.lineHeight);(0,a.each)(n,(function(n,i){r=s+i*(h+f)-l+f,"middle"===u&&(r+=l-f-(l-f)/2),"top"===u&&(r+=l-f),(0,a.isNil)(n)||(e?t.fillText(n,c,r):t.strokeText(n,c,r))}))},n.prototype._drawText=function(t,n){var e=this.attr(),r=e.x,i=e.y,o=this.get("textArr");if(o)this._drawTextArr(t,o,n);else{var u=e.text;(0,a.isNil)(u)||(n?t.fillText(u,r,i):t.strokeText(u,r,i))}},n.prototype.strokeAndFill=function(t){var n=this.attrs,e=n.lineWidth,r=n.opacity,i=n.strokeOpacity,o=n.fillOpacity;this.isStroke()&&e>0&&((0,a.isNil)(i)||1===i||(t.globalAlpha=r),this.stroke(t)),this.isFill()&&((0,a.isNil)(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=r)),this.afterDrawPath(t)},n.prototype.fill=function(t){this._drawText(t,!0)},n.prototype.stroke=function(t){this._drawText(t,!1)},n}(i.default);n.default=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e(6).__exportStar(e(12),n)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e(6).__exportStar(e(12),n)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(6),i=e(12),a=e(73),o=e(15),u=e(25),c=e(8),s=e(16),f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.renderer="canvas",n.autoDraw=!0,n.localRefresh=!0,n.refreshElements=[],n.clipView=!0,n.quickHit=!1,n},n.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},n.prototype.getShapeBase=function(){return o},n.prototype.getGroupBase=function(){return u.default},n.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||(0,c.getPixelRatio)();return t>=1?Math.ceil(t):1},n.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},n.prototype.createDom=function(){var t=document.createElement("canvas"),n=t.getContext("2d");return this.set("context",n),t},n.prototype.setDOMSize=function(n,e){t.prototype.setDOMSize.call(this,n,e);var r=this.get("context"),i=this.get("el"),a=this.getPixelRatio();i.width=a*n,i.height=a*e,a>1&&r.scale(a,a)},n.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var n=this.get("context"),e=this.get("el");n.clearRect(0,0,e.width,e.height)},n.prototype.getShape=function(n,e){return this.get("quickHit")?(0,a.getShape)(this,n,e):t.prototype.getShape.call(this,n,e,null)},n.prototype._getRefreshRegion=function(){var t,n=this.get("refreshElements"),e=this.getViewRange();n.length&&n[0]===this?t=e:(t=(0,s.getMergedRegion)(n))&&(t.minX=Math.floor(t.minX),t.minY=Math.floor(t.minY),t.maxX=Math.ceil(t.maxX),t.maxY=Math.ceil(t.maxY),t.maxY+=1,this.get("clipView")&&(t=(0,s.mergeView)(t,e)));return t},n.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},n.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&((0,c.clearAnimationFrame)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},n.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},n.prototype._drawAll=function(){var t=this.get("context"),n=this.get("el"),e=this.getChildren();t.clearRect(0,0,n.width,n.height),(0,s.applyAttrsToContext)(t,this),(0,s.drawChildren)(t,e),this.set("refreshElements",[])},n.prototype._drawRegion=function(){var t=this.get("context"),n=this.get("refreshElements"),e=this.getChildren(),r=this._getRefreshRegion();r?(t.clearRect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.save(),t.beginPath(),t.rect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.clip(),(0,s.applyAttrsToContext)(t,this),(0,s.checkRefresh)(this,e,r),(0,s.drawChildren)(t,e,r),t.restore()):n.length&&(0,s.clearChanged)(n),(0,c.each)(n,(function(t){t.get("hasChanged")&&t.set("hasChanged",!1)})),this.set("refreshElements",[])},n.prototype._startDraw=function(){var t=this,n=this.get("drawFrame"),e=this.get("drawFrameCallback");n||(n=(0,c.requestAnimationFrame)((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null),e&&e()})),this.set("drawFrame",n))},n.prototype.skipDraw=function(){},n.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},n}(i.AbstractCanvas);n.default=f},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getShape=void 0;var r=e(12);function i(t,n,e){var i=t.getTotalMatrix();if(i){var a=function(t,n){if(n){var e=(0,r.invert)(n);return(0,r.multiplyVec2)(e,t)}return t}([n,e,1],i);return[a[0],a[1]]}return[n,e]}function a(t,n,e){if(t.isCanvas&&t.isCanvas())return!0;if(!(0,r.isAllowCapture)(t)||!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var a=i(t,n,e),o=a[0],u=a[1];if(t.isClipped(o,u))return!1}var c=t.cfg.cacheCanvasBBox||t.getCanvasBBox();return n>=c.minX&&n<=c.maxX&&e>=c.minY&&e<=c.maxY}n.getShape=function t(n,e,r){if(!a(n,e,r))return null;for(var o=null,u=n.getChildren(),c=u.length-1;c>=0;c--){var s=u[c];if(s.isGroup())o=t(s,e,r);else if(a(s,e,r)){var f=s,h=i(s,e,r),l=h[0],p=h[1];f.isInShape(l,p)&&(o=s)}if(o)break}return o}},function(t,n,e){"use strict";e.r(n),e.d(n,"mat3",(function(){return i.a})),e.d(n,"vec2",(function(){return i.b})),e.d(n,"vec3",(function(){return i.c})),e.d(n,"ext",(function(){return r}));var r={};e.r(r),e.d(r,"leftTranslate",(function(){return a})),e.d(r,"leftRotate",(function(){return o})),e.d(r,"leftScale",(function(){return u})),e.d(r,"transform",(function(){return c})),e.d(r,"direction",(function(){return s})),e.d(r,"angleTo",(function(){return f})),e.d(r,"vertical",(function(){return h}));var i=e(4);function a(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return i.a.fromTranslation(r,e),i.a.multiply(t,r,n)}function o(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return i.a.fromRotation(r,e),i.a.multiply(t,r,n)}function u(t,n,e){var r=[0,0,0,0,0,0,0,0,0];return i.a.fromScaling(r,e),i.a.multiply(t,r,n)}function c(t,n){for(var e,r,c,s=t?[].concat(t):[1,0,0,0,1,0,0,0,1],f=0,h=n.length;f=0;return e?a?2*Math.PI-r:r:a?r:2*Math.PI-r}function h(t,n,e){return e?(t[0]=n[1],t[1]=-1*n[0]):(t[0]=-1*n[1],t[1]=n[0]),t}}])})); //# sourceMappingURL=g.min.js.map