1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0a330c8d","chunk-314d29b9","chunk-e5b5563c","chunk-2d21b4e6"],{"0518":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r("9ab4"),i=c(r("72fb")),o=c(r("28f9")),a=c(r("503e")),s=r("0dfa"),u=c(r("f694"));function c(t){return t&&t.__esModule?t:{default:t}}var l="anchorPointsCache",f="bboxCache",g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,n.__extends)(e,t),e.prototype.getNearestPoint=function(t,e){for(var r=0,n=t[0],i=(0,s.distance)(t[0],e),o=0;o<t.length;o++){var a=t[o],u=(0,s.distance)(a,e);u<i&&(n=a,i=u,r=o)}return n.anchorIndex=r,n},e.prototype.getDefaultCfg=function(){return{type:"node",edges:[]}},e.prototype.getEdges=function(){return this.get("edges")},e.prototype.getInEdges=function(){var t=this;return this.get("edges").filter((function(e){return e.get("target")===t}))},e.prototype.getOutEdges=function(){var t=this;return this.get("edges").filter((function(e){return e.get("source")===t}))},e.prototype.getNeighbors=function(){var t=this,e=this.get("edges"),r=function(e){return e.getSource()===t?e.getTarget():e.getSource()};return e.map(r)},e.prototype.getSourceNeighbors=function(){var t=this,e=this.get("edges"),r=function(e){return e.getSource()===t};return e.filter(r).map((function(t){return t.getTarget()}))},e.prototype.getTargetNeighbors=function(){var t=this,e=this.get("edges"),r=function(e){return e.getTarget()===t};return e.filter(r).map((function(t){return t.getSource()}))},e.prototype.getLinkPointByAnchor=function(t){var e=this.getAnchorPoints();return e[t]},e.prototype.getLinkPoint=function(t){var e,r=this.get("keyShape"),n=r.get("type"),i=this.getBBox(),o=i.centerX,a=i.centerY,u=this.getAnchorPoints();switch(n){case"circle":e=(0,s.getCircleIntersectByPoint)({x:o,y:a,r:i.width/2},t);break;case"ellipse":e=(0,s.getEllipseIntersectByPoint)({x:o,y:a,rx:i.width/2,ry:i.height/2},t);break;default:e=(0,s.getRectIntersectByPoint)(i,t)}var c=e;return u.length&&(c||(c=t),c=this.getNearestPoint(u,c)),c||(c={x:o,y:a}),c},e.prototype.getAnchorPoints=function(){var t=this.get(l);if(!t){t=[];var e=this.get("shapeFactory"),r=this.getBBox(),n=this.get("model"),o=this.getShapeCfg(n),s=n.shape||n.type,u=e.getAnchorPoints(s,o)||[];(0,i.default)(u,(function(e,n){var i=(0,a.default)({x:r.minX+e[0]*r.width,y:r.minY+e[1]*r.height},e[2],{index:n});t.push(i)})),this.set(l,t)}return t},e.prototype.addEdge=function(t){this.get("edges").push(t)},e.prototype.lock=function(){this.set("locked",!0)},e.prototype.unlock=function(){this.set("locked",!1)},e.prototype.hasLocked=function(){return this.get("locked")},e.prototype.removeEdge=function(t){var e=this.getEdges(),r=e.indexOf(t);r>-1&&e.splice(r,1)},e.prototype.clearCache=function(){this.set(f,null),this.set(l,null)},e.prototype.isOnlyMove=function(t){if(!t)return!1;var e=!(0,o.default)(t.x),r=!(0,o.default)(t.y),n=Object.keys(t);return 1===n.length&&(e||r)||2===n.length&&e&&r},e}(u.default),d=g;e.default=d},"06ef":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return"object"===typeof t&&null!==t};e.default=n},"28f9":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return null===t||void 0===t};e.default=n},"2b81":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r("9ab4"),i=s(r("28f9")),o=s(r("cdca")),a=s(r("f694"));function s(t){return t&&t.__esModule?t:{default:t}}var u={source:"start",target:"end"},c="Node",l="Point",f="Anchor",g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,n.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{type:"edge",sourceNode:null,targetNode:null,startPoint:null,endPoint:null,linkCenter:!1}},e.prototype.setEnd=function(t,e){var r=u[t]+l,n=t+c,i=this.get(n);i&&i.removeEdge(this),(0,o.default)(e)?(this.set(r,e),this.set(n,null)):(e.addEdge(this),this.set(n,e),this.set(r,null))},e.prototype.getLinkPoint=function(t,e,r){var n=u[t]+l,o=t+c,a=this.get(n);if(!a){var s=this.get(o),g=t+f,d=this.getPrePoint(t,r),h=e[g];(0,i.default)(h)||(a=s.getLinkPointByAnchor(h)),a=a||s.getLinkPoint(d),(0,i.default)(a.index)||this.set(t+"AnchorIndex",a.index)}return a},e.prototype.getPrePoint=function(t,e){if(e&&e.length){var r="source"===t?0:e.length-1;return e[r]}var n="source"===t?"target":"source";return this.getEndPoint(n)},e.prototype.getEndPoint=function(t){var e=t+c,r=u[t]+l,n=this.get(e);return n?n.get("model"):this.get(r)},e.prototype.getControlPointsByCenter=function(t){var e=this.getEndPoint("source"),r=this.getEndPoint("target"),n=this.get("shapeFactory"),i=t.shape||t.type;return n.getControlPoints(i,{startPoint:e,endPoint:r})},e.prototype.getEndCenter=function(t){var e=t+c,r=u[t]+l,n=this.get(e);if(n){var i=n.getBBox();return{x:i.centerX,y:i.centerY}}return this.get(r)},e.prototype.init=function(){t.prototype.init.call(this),this.setSource(this.get("source")),this.setTarget(this.get("target"))},e.prototype.getShapeCfg=function(e){var r=this,n=r.get("linkCenter"),i=t.prototype.getShapeCfg.call(this,e);if(n)i.startPoint=r.getEndCenter("source"),i.endPoint=r.getEndCenter("target");else{var o=i.controlPoints||r.getControlPointsByCenter(i);i.startPoint=r.getLinkPoint("source",e,o),i.endPoint=r.getLinkPoint("target",e,o)}return i.sourceNode=r.get("sourceNode"),i.targetNode=r.get("targetNode"),i},e.prototype.getModel=function(){var t=this.get("model"),e=this.get("source"+c),r=this.get("target"+c);return e?delete t["source"+c]:t.source=this.get("start"+l),r?delete t["target"+c]:t.target=this.get("end"+l),t},e.prototype.setSource=function(t){this.setEnd("source",t),this.set("source",t)},e.prototype.setTarget=function(t){this.setEnd("target",t),this.set("target",t)},e.prototype.getSource=function(){return this.get("source")},e.prototype.getTarget=function(){return this.get("target")},e.prototype.updatePosition=function(){},e.prototype.update=function(t){var e=this.get("model");Object.assign(e,t),this.updateShape(),this.afterUpdate(),this.clearCache()},e.prototype.destroy=function(){var e=this.get("source"+c),r=this.get("target"+c);e&&!e.destroyed&&e.removeEdge(this),r&&!r.destroyed&&r.removeEdge(this),t.prototype.destroy.call(this)},e}(a.default),d=g;e.default=d},"503e":function(t,e,r){"use strict";function n(t,e){for(var r in e)e.hasOwnProperty(r)&&"constructor"!==r&&void 0!==e[r]&&(t[r]=e[r])}function i(t,e,r,i){return e&&n(t,e),r&&n(t,r),i&&n(t,i),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},"6a23":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shapeBase=e.CLS_LABEL_BG_SUFFIX=void 0;var n=r("9ab4"),i=s(r("067f")),o=r("e897"),a=r("8937");function s(t){return t&&t.__esModule?t:{default:t}}var u="-shape",c="-label",l="-label-bg";e.CLS_LABEL_BG_SUFFIX=l;var f={options:{},itemType:"",type:"",draw:function(t,e){var r=this.drawShape(t,e);if(r.set("className",this.itemType+u),t.label){var n=this.drawLabel(t,e);n.set("className",this.itemType+c)}return r},afterDraw:function(t,e,r){},drawShape:function(t,e){return null},drawLabel:function(t,e){var r=this.options.labelCfg,n=(0,a.mix)({},r,t.labelCfg),i=this.getLabelStyle(t,n,e),s=i.rotate;delete i.rotate;var u=e.addShape("text",{attrs:i,draggable:!0,className:"text-shape",name:"text-shape"});if(s){var c=u.getBBox(),f=u.getMatrix();if(f||(f=o.mat3.create()),i.rotateCenter)switch(i.rotateCenter){case"center":f=(0,o.transform)(f,[["t",-c.width/2,-c.height/2],["r",s],["t",c.width/2,c.height/2]]);break;case"lefttop":f=(0,o.transform)(f,[["t",-i.x,-i.y],["r",s],["t",i.x,i.y]]);break;case"leftcenter":f=(0,o.transform)(f,[["t",-i.x,-i.y-c.height/2],["r",s],["t",i.x,i.y+c.height/2]]);break;default:f=(0,o.transform)(f,[["t",-c.width/2,-c.height/2],["r",s],["t",c.width/2,c.height/2]]);break}else f=(0,o.transform)(f,[["t",-i.x,-i.y-c.height/2],["r",s],["t",i.x,i.y+c.height/2]]);u.setMatrix(f)}if(i.background){var g=this.drawLabelBg(t,e,u),d=this.itemType+l;g.set("classname",d),u.toFront()}return u},drawLabelBg:function(t,e,r){var n=this.options.labelCfg,i=(0,a.mix)({},n,t.labelCfg),o=this.getLabelBgStyleByPosition(r,t,i,e),s=e.addShape("rect",{name:"text-bg-shape",attrs:o});return s},getLabelStyleByPosition:function(t,e,r){return{text:t.label}},getLabelBgStyleByPosition:function(t,e,r,n){return{}},getLabelStyle:function(t,e,r){var n=this.getLabelStyleByPosition(t,e,r),o=this.itemType+"Label",a=i.default[o]?i.default[o].style:null,s=Object.assign({},a,n,e.style);return s},getShapeStyle:function(t){return t.style},update:function(t,e){this.updateShapeStyle(t,e),this.updateLabel(t,e)},updateShapeStyle:function(t,e){var r=e.getContainer(),n=e.getKeyShape(),i=(0,a.mix)({},n.attr(),t.style),o=function(t){var e,o=i[t];if((0,a.isPlainObject)(o)){var s=r.find((function(e){return e.get("name")===t}));s&&s.attr(o)}else n.attr((e={},e[t]=o,e))};for(var s in i)o(s)},updateLabel:function(t,e){var r=e.getContainer(),i=this.options.labelCfg,s=this.itemType+c,u=r.find((function(t){return t.get("className")===s})),f=this.itemType+l,g=r.find((function(t){return t.get("classname")===f}));if(t.label||""===t.label)if(u){var d={};e.getModel&&(d=e.getModel().labelCfg);var h=(0,a.deepMix)({},i,d,t.labelCfg),p=this.getLabelStyleByPosition(t,h,r),y=t.labelCfg?t.labelCfg.style:void 0,v=h.style&&h.style.background,b=Object.assign({},u.attr(),p,y),P=b.rotate;if(delete b.rotate,P){var m=o.mat3.create();m=(0,o.transform)(m,[["t",-b.x,-b.y],["r",P],["t",b.x,b.y]]),u.resetMatrix(),u.attr((0,n.__assign)((0,n.__assign)({},b),{matrix:m}))}else u.resetMatrix(),u.attr(b);if(g)if(b.background){var x=this.getLabelBgStyleByPosition(u,t,h,r),S=Object.assign({},x,v);g.resetMatrix(),P&&g.rotateAtStart(P),g.attr(S)}else r.removeChild(g);else b.background&&(g=this.drawLabelBg(t,r,u),g.set("classname",f),u.toFront())}else{var C=this.drawLabel(t,r);C.set("className",s)}},afterUpdate:function(t,e){},setState:function(t,e,r){var n,i,o=r.get("keyShape");if(o){var s=r.getType(),u=(0,a.isBoolean)(e)?t:t+":"+e,c=this.getStateStyle(u,!0,r),l=r.getStateStyle(u),f=(0,a.mix)({},l||c),g=r.getContainer();if(e){var d=function(t){var e,r=f[t];if((0,a.isPlainObject)(r)){var n=g.find((function(e){return e.get("name")===t}));n&&n.attr(r)}else o.attr((e={},e[t]=r,e))};for(var h in f)d(h)}else{var p=(0,a.clone)(r.getCurrentStatesStyle()),y=(0,a.clone)(r.getOriginStyle()),v=o.get("name"),b=o.attr(),P={},m=function(t){var e=f[t];if((0,a.isPlainObject)(e)){var r=g.find((function(e){return e.get("name")===t}));if(r){var n=r.attr();(0,a.each)(e,(function(t,e){n[e]&&delete n[e]})),P[t]=n}}else{var i=["x","y","cx","cy"];!b[t]||i.indexOf(t)>-1||delete b[t]}};for(var x in f)m(x);for(var h in v?P[v]=b:(0,a.mix)(P,b),p){var S=p[h];(0,a.isPlainObject)(S)||(v?(0,a.mix)(y[v],(i={},i[h]=S,i)):(0,a.mix)(y,(n={},n[h]=S,n)),delete p[h])}var C={};(0,a.deepMix)(C,y,P,p);var _=function(t){var e,r,n=C[t];if((0,a.isPlainObject)(n)){var i=g.find((function(e){return e.get("name")===t}));i&&i.attr(n)}else"combo"===s?v||o.attr((e={},e[t]=n,e)):o.attr((r={},r[t]=n,r))};for(var k in C)_(k)}}},getStateStyle:function(t,e,r){var n=r.getModel();if(e){var i=n.stateStyles?n.stateStyles[t]:this.options.stateStyles&&this.options.stateStyles[t];return(0,a.mix)({},n.style,i)}return{}},getControlPoints:function(t){return t.controlPoints},getAnchorPoints:function(t){var e=this.options.anchorPoints,r=t.anchorPoints||e;return r}};e.shapeBase=f},"72fb":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("01f9"),i=r("9ab4f");function o(t,e){var r;if(t)if(n.default(t)){for(var o=0,a=t.length;o<a;o++)if(r=e(t[o],o),!1===r)break}else if(i.default(t))for(var s in t)if(t.hasOwnProperty(s)&&(r=e(t[s],s),!1===r))break}e.default=o},"7db0":function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").find,o=r("44d2"),a=r("ae40"),s="find",u=!0,c=a(s);s in[]&&Array(1)[s]((function(){u=!1})),n({target:"Array",proto:!0,forced:u||!c},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},"81d5":function(t,e,r){"use strict";var n=r("7b0b"),i=r("23cb"),o=r("50c4");t.exports=function(t){var e=n(this),r=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,r),u=a>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);while(c>s)e[s++]=t;return e}},"9ab4f":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},a434:function(t,e,r){"use strict";var n=r("23e7"),i=r("23cb"),o=r("a691"),a=r("50c4"),s=r("7b0b"),u=r("65f0"),c=r("8418"),l=r("1dde"),f=r("ae40"),g=l("splice"),d=f("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,p=Math.min,y=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!g||!d},{splice:function(t,e){var r,n,l,f,g,d,b=s(this),P=a(b.length),m=i(t,P),x=arguments.length;if(0===x?r=n=0:1===x?(r=0,n=P-m):(r=x-2,n=p(h(o(e),0),P-m)),P+r-n>y)throw TypeError(v);for(l=u(b,n),f=0;f<n;f++)g=m+f,g in b&&c(l,f,b[g]);if(l.length=n,r<n){for(f=m;f<P-n;f++)g=f+n,d=f+r,g in b?b[d]=b[g]:delete b[d];for(f=P;f>P-n+r;f--)delete b[f-1]}else if(r>n)for(f=P-n;f>m;f--)g=f+n-1,d=f+r-1,g in b?b[d]=b[g]:delete b[d];for(f=0;f<r;f++)b[f+m]=arguments[f+2];return b.length=P-n+r,l}})},bee2:function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}r.d(e,"a",(function(){return i}))},c740:function(t,e,r){"use strict";var n=r("23e7"),i=r("b727").findIndex,o=r("44d2"),a=r("ae40"),s="findIndex",u=!0,c=a(s);s in[]&&Array(1)[s]((function(){u=!1})),n({target:"Array",proto:!0,forced:u||!c},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},cb29:function(t,e,r){var n=r("23e7"),i=r("81d5"),o=r("44d2");n({target:"Array",proto:!0},{fill:i}),o("fill")},cdca:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("06ef"),i=r("bd8b"),o=function(t){if(!n.default(t)||!i.default(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;var e=t;while(null!==Object.getPrototypeOf(e))e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};e.default=o}}]);
|