@logicflow/core 0.4.1-alpha.1 → 0.4.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -0
- package/dist/logic-flow-cjs.js +2 -0
- package/dist/logic-flow-cjs.js.LICENSE.txt +23 -0
- package/dist/logic-flow.js +2 -2
- package/dist/logic-flow.js.LICENSE.txt +23 -0
- package/dist/style/index.css +124 -8
- package/es/index.js +69 -0
- package/package.json +20 -5
- package/types/LogicFlow.d.ts +63 -19
- package/types/constant/DefaultTheme.d.ts +12 -0
- package/types/constant/constant.d.ts +13 -2
- package/types/event/eventEmitter.d.ts +8 -8
- package/types/model/BaseModel.d.ts +60 -1
- package/types/model/EditConfigModel.d.ts +74 -2
- package/types/model/GraphModel.d.ts +34 -6
- package/types/model/TransformModel.d.ts +16 -3
- package/types/model/edge/BaseEdgeModel.d.ts +19 -1
- package/types/model/edge/BezierEdgeModel.d.ts +11 -1
- package/types/model/edge/LineEdgeModel.d.ts +1 -1
- package/types/model/edge/PolylineEdgeModel.d.ts +19 -1
- package/types/model/node/BaseNodeModel.d.ts +71 -23
- package/types/model/node/CircleNodeModel.d.ts +5 -2
- package/types/model/node/HtmlNodeModel.d.ts +11 -0
- package/types/model/node/PolygonNodeModel.d.ts +5 -0
- package/types/model/node/index.d.ts +1 -0
- package/types/options.d.ts +79 -9
- package/types/tool/MultipleSelectTool.d.ts +2 -2
- package/types/tool/TextEditTool.d.ts +3 -4
- package/types/tool/index.d.ts +1 -0
- package/types/type/index.d.ts +74 -5
- package/types/util/drag.d.ts +2 -0
- package/types/util/edge.d.ts +2 -1
- package/types/util/graph.d.ts +4 -0
- package/types/util/node.d.ts +20 -2
- package/types/util/theme.d.ts +12 -0
- package/types/util/uuid.d.ts +5 -0
- package/types/util/zIndex.d.ts +2 -0
- package/types/view/Anchor.d.ts +6 -4
- package/types/view/Graph.d.ts +0 -4
- package/types/view/basic-shape/LinearGradient.d.ts +1 -0
- package/types/view/basic-shape/Polygon.d.ts +1 -9
- package/types/view/behavior/DnD.d.ts +1 -1
- package/types/view/edge/AdjustPoint.d.ts +43 -0
- package/types/view/edge/BaseEdge.d.ts +3 -1
- package/types/view/edge/PolylineEdge.d.ts +1 -0
- package/types/view/node/BaseNode.d.ts +11 -7
- package/types/view/node/CircleNode.d.ts +3 -1
- package/types/view/node/DiamondNode.d.ts +3 -1
- package/types/view/node/EllipseNode.d.ts +3 -1
- package/types/view/node/HtmlNode.d.ts +11 -0
- package/types/view/node/PolygonNode.d.ts +3 -1
- package/types/view/node/RectNode.d.ts +3 -1
- package/types/view/node/TextNode.d.ts +1 -0
- package/types/view/node/index.d.ts +2 -1
- package/types/view/overlay/CanvasOverlay.d.ts +30 -2
- package/types/view/overlay/Grid.d.ts +10 -0
- package/types/view/overlay/HtmlOverlay.d.ts +5 -46
- package/types/view/overlay/ModificationOverlay.d.ts +9 -0
- package/CHANGELOG.md +0 -415
- package/LICENSE +0 -433
- package/dist/style/background.css +0 -8
- package/dist/style/html-overlay.css +0 -33
- package/dist/style/tool.css +0 -29
package/dist/logic-flow.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=204)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return er})),r.d(e,"c",(function(){return Ft})),r.d(e,"d",(function(){return xt})),r.d(e,"e",(function(){return dt})),r.d(e,"f",(function(){return yt})),r.d(e,"g",(function(){return _t})),r.d(e,"h",(function(){return dr})),r.d(e,"i",(function(){return at})),r.d(e,"j",(function(){return wt})),r.d(e,"k",(function(){return Qt})),r.d(e,"l",(function(){return ne})),r.d(e,"m",(function(){return rt})),r.d(e,"n",(function(){return se})),r.d(e,"o",(function(){return j})),r.d(e,"p",(function(){return Se})),r.d(e,"q",(function(){return le})),r.d(e,"r",(function(){return be})),r.d(e,"s",(function(){return yr})),r.d(e,"t",(function(){return ye})),r.d(e,"u",(function(){return ee})),r.d(e,"v",(function(){return Oe})),r.d(e,"w",(function(){return we})),r.d(e,"x",(function(){return xe})),r.d(e,"y",(function(){return Je})),r.d(e,"z",(function(){return rr})),r.d(e,"A",(function(){return pr})),r.d(e,"B",(function(){return je})),r.d(e,"C",(function(){return Z})),r.d(e,"D",(function(){return Pe})),r.d(e,"E",(function(){return ue})),r.d(e,"F",(function(){return ae})),r.d(e,"G",(function(){return te})),r.d(e,"H",(function(){return $t})),r.d(e,"I",(function(){return De})),r.d(e,"J",(function(){return Me})),r.d(e,"K",(function(){return lt})),r.d(e,"L",(function(){return Ee})),r.d(e,"M",(function(){return Ne}));var o=[];Object.freeze(o);var i={};function a(){return++Rt.mobxGuid}function u(t){throw c(!1,t),"X"}function c(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(i);function s(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var l=function(){};function f(t){return null!==t&&"object"==typeof t}function p(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function y(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function d(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return f(t)&&!0===t[r]}}function h(t){return t instanceof Map}function v(t){return t instanceof Set}function b(t){var e=new Set;for(var r in t)e.add(r);return Object.getOwnPropertySymbols(t).forEach((function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)})),Array.from(e)}function g(t){return t&&t.toString?t.toString():new String(t).toString()}function m(t){return null===t?null:"object"==typeof t?""+t:t}var O="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,w=Symbol("mobx administration"),_=function(){function t(t){void 0===t&&(t="Atom@"+a()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=J.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.reportObserved=function(){return Xt(this)},t.prototype.reportChanged=function(){Bt(),function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.isTracing!==Q.NONE&&Ut(e,t),e.onBecomeStale()),e.dependenciesState=J.STALE}))}(this),Ht()},t.prototype.toString=function(){return this.name},t}(),x=d("Atom",_);function j(t,e,r){void 0===e&&(e=l),void 0===r&&(r=l);var n,o=new _(t);return e!==l&&ce("onBecomeObserved",o,e,n),r!==l&&ue(o,r),o}var E={identity:function(t,e){return t===e},structural:function(t,e){return vr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return vr(t,e,1)}},S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -12,4 +12,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
12
12
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
|
-
***************************************************************************** */var P=function(){return(P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function k(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function D(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function A(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(D(arguments[e]));return t}var T=Symbol("mobx did run lazy initializers"),M=Symbol("mobx pending decorators"),N={},C={};function R(t,e){var r=e?N:C;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return I(this),this[t]},set:function(e){I(this),this[t]=e}})}function I(t){var e,r;if(!0!==t[T]){var n=t[M];if(n){y(t,T,!0);var o=A(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var i=k(o),a=i.next();!a.done;a=i.next()){var u=n[a.value];u.propertyCreator(t,u.prop,u.descriptor,u.decoratorTarget,u.decoratorArguments)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}function L(t,e){return function(){var r,n=function(n,o,i,a){if(!0===a)return e(n,o,i,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,M)){var u=n[M];y(n,M,P({},u))}return n[M][o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},R(o,t)};return z(arguments)?(r=o,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function z(t){return(2===t.length||3===t.length)&&("string"==typeof t[1]||"symbol"==typeof t[1])||4===t.length&&!0===t[3]}function B(t,e,r){return we(t)?t:Array.isArray(t)?q.array(t,{name:r}):p(t)?q.object(t,void 0,{name:r}):d(t)?q.map(t,{name:r}):v(t)?q.set(t,{name:r}):t}function X(t){return t}function H(e){c(e);var r=L(!0,(function(t,r,n,o,i){var a=n?n.initializer?n.initializer.call(t):n.value:void 0;ur(t).addObservableProp(r,a,e)})),n=(void 0!==t&&t.env,r);return n.enhancer=e,n}var U={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Y(t){return null==t?U:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(U);var V=H(B),F=H((function(t,e,r){return null==t||pr(t)||Je(t)||rr(t)||ir(t)?t:Array.isArray(t)?q.array(t,{name:r,deep:!1}):p(t)?q.object(t,void 0,{name:r,deep:!1}):d(t)?q.map(t,{name:r,deep:!1}):v(t)?q.set(t,{name:r,deep:!1}):u(!1)})),G=H(X),W=H((function(t,e,r){return vr(t,e)?e:t}));function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?X:B}var $={box:function(t,e){arguments.length>2&&Z("box");var r=Y(e);return new St(t,K(r),r.name,!0,r.equals)},array:function(t,e){arguments.length>2&&Z("array");var r=Y(e);return We(t,K(r),r.name)},map:function(t,e){arguments.length>2&&Z("map");var r=Y(e);return new er(t,K(r),r.name)},set:function(t,e){arguments.length>2&&Z("set");var r=Y(e);return new or(t,K(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&Z("object");var n=Y(r);if(!1===n.proxy)return le({},t,e,n);var o=fe(n),i=le({},void 0,void 0,n),a=Be(i);return pe(a,t,e,o),a},ref:G,shallow:F,deep:V,struct:W},q=function(t,e,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return V.apply(null,arguments);if(we(t))return t;var n=p(t)?q.object(t,e,r):Array.isArray(t)?q.array(t,e):d(t)?q.map(t,e):v(t)?q.set(t,e):t;if(n!==t)return n;u(!1)};function Z(t){u("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys($).forEach((function(t){return q[t]=$[t]}));var J,Q,tt=L(!1,(function(t,e,r,n,o){var i=r.get,a=r.set,u=o[0]||{};ur(t).addComputedProp(t,e,P({get:i,set:a,context:t},u))})),et=tt({equals:E.structural}),rt=function(t,e,r){if("string"==typeof e)return tt.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return tt.apply(null,arguments);var n="object"==typeof e?e:{};return n.get=t,n.set="function"==typeof e?e:n.set,n.name=n.name||t.name||"",new kt(n)};rt.struct=et,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(J||(J={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Q||(Q={}));var nt=function(t){this.cause=t};function ot(t){return t instanceof nt}function it(t){switch(t.dependenciesState){case J.UP_TO_DATE:return!1;case J.NOT_TRACKING:case J.STALE:return!0;case J.POSSIBLY_STALE:for(var e=yt(!0),r=ft(),n=t.observing,o=n.length,i=0;i<o;i++){var a=n[i];if(Dt(a)){if(Rt.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return pt(r),ht(e),!0}if(t.dependenciesState===J.STALE)return pt(r),ht(e),!0}}return dt(t),pt(r),ht(e),!1}}function at(){return null!==Rt.trackingDerivation}function ut(t){var e=t.observers.size>0;Rt.computationDepth>0&&e&&u(!1),Rt.allowStateChanges||!e&&"strict"!==Rt.enforceActions||u(!1)}function ct(t,e,r){var n=yt(!0);dt(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Rt.runId;var o,i=Rt.trackingDerivation;if(Rt.trackingDerivation=t,!0===Rt.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new nt(t)}return Rt.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=J.UP_TO_DATE,o=0,i=t.unboundDepsCount,a=0;a<i;a++){0===(u=r[a]).diffValue&&(u.diffValue=1,o!==a&&(r[o]=u),o++),u.dependenciesState>n&&(n=u.dependenciesState)}r.length=o,t.newObserving=null,i=e.length;for(;i--;){0===(u=e[i]).diffValue&&Lt(u,t),u.diffValue=0}for(;o--;){var u;1===(u=r[o]).diffValue&&(u.diffValue=0,It(u,t))}n!==J.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),ht(n),o}function st(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)Lt(e[r],t);t.dependenciesState=J.NOT_TRACKING}function lt(t){var e=ft();try{return t()}finally{pt(e)}}function ft(){var t=Rt.trackingDerivation;return Rt.trackingDerivation=null,t}function pt(t){Rt.trackingDerivation=t}function yt(t){var e=Rt.allowStateReads;return Rt.allowStateReads=t,e}function ht(t){Rt.allowStateReads=t}function dt(t){if(t.dependenciesState!==J.UP_TO_DATE){t.dependenciesState=J.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=J.UP_TO_DATE}}var vt=0,bt=1,gt=Object.getOwnPropertyDescriptor((function(){}),"name");gt&>.configurable;function mt(t,e,r){var n=function(){return Ot(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,r,n){var o=jt(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{_t(o)}}function jt(t,e,r){var n=0,o=ft();Bt();var i={prevDerivation:o,prevAllowStateChanges:xt(!0),prevAllowStateReads:yt(!0),notifySpy:!1,startTime:n,actionId:bt++,parentActionId:vt};return vt=i.actionId,i}function _t(t){vt!==t.actionId&&u("invalid action stack. did you forget to finish an action?"),vt=t.parentActionId,void 0!==t.error&&(Rt.suppressReactionErrors=!0),Et(t.prevAllowStateChanges),ht(t.prevAllowStateReads),Xt(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function wt(t,e){var r,n=xt(t);try{r=e()}finally{Et(n)}return r}function xt(t){var e=Rt.allowStateChanges;return Rt.allowStateChanges=t,e}function Et(t){Rt.allowStateChanges=t}var St=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+a()),void 0===o&&(o=!0),void 0===i&&(i=E.default);var u=t.call(this,n)||this;return u.enhancer=r,u.name=n,u.equals=i,u.hasUnreportedChange=!1,u.value=r(e,void 0,n),u}return function(t,e){function r(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){this.value;if((t=this.prepareNewValue(t))!==Rt.UNCHANGED){0,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(ut(this),Xe(this)){var e=Ue(this,{object:this,type:"update",newValue:t});if(!e)return Rt.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Rt.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),Ye(this)&&Fe(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return He(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ve(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(_),Pt=h("ObservableValue",St),kt=function(){function t(t){this.dependenciesState=J.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=J.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+a(),this.value=new nt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Q.NONE,c(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+a(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?E.structural:E.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==J.UP_TO_DATE)return;t.lowestObserverState=J.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.dependenciesState=J.POSSIBLY_STALE,e.isTracing!==Q.NONE&&Ut(e,t),e.onBecomeStale())}))}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.get=function(){this.isComputing&&u("Cycle detected in computation "+this.name+": "+this.derivation),0!==Rt.inBatch||0!==this.observers.size||this.keepAlive?(Ht(this),it(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.POSSIBLY_STALE?e.dependenciesState=J.STALE:e.dependenciesState===J.UP_TO_DATE&&(t.lowestObserverState=J.UP_TO_DATE)}))}(this)):it(this)&&(this.warnAboutUntrackedRead(),Bt(),this.value=this.computeValue(!1),Xt());var t=this.value;if(ot(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ot(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else c(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===J.NOT_TRACKING,r=this.computeValue(!0),n=e||ot(t)||ot(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Rt.computationDepth++,t)e=ct(this,this.derivation,this.scope);else if(!0===Rt.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new nt(t)}return Rt.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(st(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,o=void 0;return ne((function(){var i=r.get();if(!n||e){var a=ft();t({type:"update",object:r,newValue:i,oldValue:o}),pt(a)}n=!1,o=i}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return m(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),Dt=h("ComputedValue",kt),At=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Tt={};function Mt(){return"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:Tt}var Nt=!0,Ct=!1,Rt=function(){var t=Mt();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Nt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new At).version&&(Nt=!1),Nt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new At):(setTimeout((function(){Ct||u("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new At)}();function It(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Lt(t,e){t.observers.delete(e),0===t.observers.size&&zt(t)}function zt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Rt.pendingUnobservations.push(t))}function Bt(){Rt.inBatch++}function Xt(){if(0==--Rt.inBatch){Ft();for(var t=Rt.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof kt&&r.suspend())}Rt.pendingUnobservations=[]}}function Ht(t){var e=Rt.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.size&&Rt.inBatch>0&&zt(t),!1)}function Ut(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Q.BREAK){var r=[];!function t(e,r,n){if(r.length>=1e3)return void r.push("(and many more)");r.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return t(e,r,n+1)}))}(ye(t),r,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof kt?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}var Yt=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+a()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=J.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Q.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Rt.pendingReactions.push(this),Ft())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Bt(),this._isScheduled=!1,it(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Xt()}},t.prototype.track=function(t){if(!this.isDisposed){Bt();0,this._isRunning=!0;var e=ct(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&st(this),ot(e)&&this.reportExceptionInDerivation(e.cause),Xt()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Rt.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Rt.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,t),Rt.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),st(this),Xt()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[j]=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=!1;"boolean"==typeof t[t.length-1]&&(r=t.pop());var n=Te(t);if(!n)return u(!1);n.isTracing===Q.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled");n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Vt=function(t){return t()};function Ft(){Rt.inBatch>0||Rt.isRunningReactions||Vt(Gt)}function Gt(){Rt.isRunningReactions=!0;for(var t=Rt.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Rt.isRunningReactions=!1}var Wt=h("Reaction",Yt);function Kt(t){var e=Vt;Vt=function(r){return t((function(){return e(r)}))}}function $t(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function qt(){u(!1)}function Zt(t){return function(e,r,n){if(n){if(n.value)return{value:mt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,o.call(this))}}}return Jt(t).apply(this,arguments)}}function Jt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){y(this,r,Qt(t,e))}})}}var Qt=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?mt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?mt(t,e):1===arguments.length&&"string"==typeof t?Zt(t):!0!==n?Zt(e).apply(null,arguments):void y(t,e,mt(t.name||e,r.value,this))};function te(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function ee(t){return"function"==typeof t&&!0===t.isMobxAction}function re(t,e,r){y(t,e,mt(e,r.bind(t)))}function ne(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+a();if(!e.scheduler&&!e.delay)r=new Yt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ie(e),u=!1;r=new Yt(n,(function(){u||(u=!0,o((function(){u=!1,r.isDisposed||r.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(r)}return r.schedule(),r.getDisposer()}Qt.bound=function(t,e,r,n){return!0===n?(re(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return re(this,e,r.value||r.initializer.call(this)),this[e]},set:qt}:{enumerable:!1,configurable:!0,set:function(t){re(this,e,t)},get:function(){}}};var oe=function(t){return t()};function ie(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:oe}function ae(t,e,r){void 0===r&&(r=i);var n,o,u,c=r.name||"Reaction@"+a(),s=Qt(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),l=!r.scheduler&&!r.delay,f=ie(r),p=!0,y=!1,h=r.compareStructural?E.structural:r.equals||E.default,d=new Yt(c,(function(){p||l?v():y||(y=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(y=!1,!d.isDisposed){var e=!1;d.track((function(){var r=t(d);e=p||!h(u,r),u=r})),p&&r.fireImmediately&&s(u,d),p||!0!==e||s(u,d),p&&(p=!1)}}return d.schedule(),d.getDisposer()}function ue(t,e,r){return ce("onBecomeUnobserved",t,e,r)}function ce(t,e,r,n){var o="function"==typeof n?yr(e,r):yr(e),i="function"==typeof n?n:r,a=t+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[t]?u(!1):function(){var t=o[a];t&&(t.delete(i),0===t.size&&delete o[a])}}function se(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,a=t.reactionRequiresObservable,c=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Rt.pendingReactions.length||Rt.inBatch||Rt.isRunningReactions)&&u("isolateGlobalState should be called before MobX is running any reactions"),Ct=!0,Nt&&(0==--Mt().__mobxInstanceCount&&(Mt().__mobxGlobals=void 0),Rt=new At)),void 0!==e){var s=void 0;switch(e){case!0:case"observed":s=!0;break;case!1:case"never":s=!1;break;case"strict":case"always":s="strict";break;default:u("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Rt.enforceActions=s,Rt.allowStateChanges=!0!==s&&"strict"!==s}void 0!==r&&(Rt.computedRequiresReaction=!!r),void 0!==a&&(Rt.reactionRequiresObservable=!!a),void 0!==c&&(Rt.observableRequiresReaction=!!c,Rt.allowStateReads=!Rt.observableRequiresReaction),void 0!==n&&(Rt.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Rt.disableErrorBoundaries=!!o),i&&Kt(i)}function le(t,e,r,n){var o=fe(n=Y(n));return I(t),ur(t,n.name,o.enhancer),e&&pe(t,e,r,o),t}function fe(t){return t.defaultDecorator||(!1===t.deep?G:V)}function pe(t,e,r,n){var o,i;Bt();try{var a=O(e);try{for(var u=k(a),c=u.next();!c.done;c=u.next()){var s=c.value,l=Object.getOwnPropertyDescriptor(e,s);0;var f=(r&&s in r?r[s]:l.get?tt:n)(t,s,l,!0);f&&Object.defineProperty(t,s,f)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}finally{Xt()}}function ye(t,e){return he(yr(t,e))}function he(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(he)),n}var de=0;function ve(){this.message="FLOW_CANCELLED"}function be(t){1!==arguments.length&&u("Flow expects 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=this,o=arguments,i=++de,a=Qt(e+" - runid: "+i+" - init",t).apply(n,o),u=void 0,c=new Promise((function(t,n){var o=0;function c(t){var r;u=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,a.next).call(a,t)}catch(t){return n(t)}l(r)}function s(t){var r;u=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,a.throw).call(a,t)}catch(t){return n(t)}l(r)}function l(e){if(!e||"function"!=typeof e.then)return e.done?t(e.value):(u=Promise.resolve(e.value)).then(c,s);e.then(l,n)}r=n,c(void 0)}));return c.cancel=Qt(e+" - runid: "+i+" - cancel",(function(){try{u&&ge(u);var t=a.return(void 0),e=Promise.resolve(t.value);e.then(l,l),ge(e),r(new ve)}catch(t){r(t)}})),c}}function ge(t){"function"==typeof t.cancel&&t.cancel()}function me(t,e){if(null==t)return!1;if(void 0!==e){if(!1===pr(t))return!1;if(!t[j].values.has(e))return!1;var r=yr(t,e);return Dt(r)}return Dt(t)}function Oe(t){return arguments.length>1?u(!1):me(t)}function je(t,e){return"string"!=typeof e?u(!1):me(t,e)}function _e(t,e){return null!=t&&(void 0!==e?!!pr(t)&&t[j].values.has(e):pr(t)||!!t[j]||w(t)||Wt(t)||Dt(t))}function we(t){return 1!==arguments.length&&u(!1),_e(t)}function xe(t){return pr(t)?t[j].getKeys():rr(t)||ir(t)?Array.from(t.keys()):Je(t)?t.map((function(t,e){return e})):u(!1)}function Ee(t){return pr(t)?xe(t).map((function(e){return t[e]})):rr(t)?xe(t).map((function(e){return t.get(e)})):ir(t)?Array.from(t.values()):Je(t)?t.slice():u(!1)}function Se(t){return pr(t)?xe(t).map((function(e){return[e,t[e]]})):rr(t)?xe(t).map((function(e){return[e,t.get(e)]})):ir(t)?Array.from(t.entries()):Je(t)?t.map((function(t,e){return[e,t]})):u(!1)}function Pe(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return hr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return hr(t).observe(e,r)}(t,e,r)}ve.prototype=Object.create(Error.prototype);var ke={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function De(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Ae(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=ke),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),function t(e,r,n){if(!r.recurseEverything&&!we(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(Pt(e))return t(e.get(),r,n);if(we(e)&&xe(e),!0===r.detectCycles&&null!==e&&n.has(e))return n.get(e);if(Je(e)||Array.isArray(e)){var o=De(n,e,[],r),i=e.map((function(e){return t(e,r,n)}));o.length=i.length;for(var a=0,u=i.length;a<u;a++)o[a]=i[a];return o}if(ir(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===r.exportMapsAsObjects){var c=De(n,e,new Set,r);return e.forEach((function(e){c.add(t(e,r,n))})),c}var s=De(n,e,[],r);return e.forEach((function(e){s.push(t(e,r,n))})),s}if(rr(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===r.exportMapsAsObjects){var l=De(n,e,new Map,r);return e.forEach((function(e,o){l.set(o,t(e,r,n))})),l}var f=De(n,e,{},r);return e.forEach((function(e,o){f[o]=t(e,r,n)})),f}var p=De(n,e,{},r);return b(e).forEach((function(o){p[o]=t(e[o],r,n)})),p}(t,e,r)}function Te(t){switch(t.length){case 0:return Rt.trackingDerivation;case 1:return yr(t[0]);case 2:return yr(t[0],t[1])}}function Me(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Xt()}}function Ne(t,e,r){return 1===arguments.length||e&&"object"==typeof e?Re(t,e):Ce(t,e,r||{})}function Ce(t,e,r){var n;"number"==typeof r.timeout&&(n=setTimeout((function(){if(!i[j].isDisposed){i();var t=new Error("WHEN_TIMEOUT");if(!r.onError)throw t;r.onError(t)}}),r.timeout)),r.name=r.name||"When@"+a();var o=mt(r.name+"-effect",e),i=ne((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function Re(t,e){var r;var n=new Promise((function(n,o){var i=Ce(t,n,P(P({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Ie(t){return t[j]}function Le(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var ze={has:function(t,e){if(e===j||"constructor"===e||e===T)return!0;var r=Ie(t);return Le(e)?r.has(e):e in t},get:function(t,e){if(e===j||"constructor"===e||e===T)return t[e];var r=Ie(t),n=r.values.get(e);if(n instanceof _){var o=n.get();return void 0===o&&r.has(e),o}return Le(e)&&r.has(e),t[e]},set:function(t,e,r){return!!Le(e)&&(function t(e,r,n){if(2!==arguments.length||ir(e))if(pr(e)){var o=e[j],i=o.values.get(r);i?o.write(r,n):o.addObservableProp(r,n,o.defaultEnhancer)}else if(rr(e))e.set(r,n);else if(ir(e))e.add(r);else{if(!Je(e))return u(!1);"number"!=typeof r&&(r=parseInt(r,10)),c(r>=0,"Not a valid index: '"+r+"'"),Bt(),r>=e.length&&(e.length=r+1),e[r]=n,Xt()}else{Bt();var a=r;try{for(var s in a)t(e,s,a[s])}finally{Xt()}}}(t,e,r),!0)},deleteProperty:function(t,e){return!!Le(e)&&(Ie(t).remove(e),!0)},ownKeys:function(t){return Ie(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return u("Dynamic observable objects cannot be frozen"),!1}};function Be(t){var e=new Proxy(t,ze);return t[j].proxy=e,e}function Xe(t){return void 0!==t.interceptors&&t.interceptors.length>0}function He(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ue(t,e){var r=ft();try{for(var n=A(t.interceptors||[]),o=0,i=n.length;o<i&&(c(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{pt(r)}}function Ye(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function Ve(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Fe(t,e){var r=ft(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);pt(r)}}var Ge={get:function(t,e){return e===j?t[j]:"length"===e?t[j].getArrayLength():"number"==typeof e?$e.get.call(t,e):"string"!=typeof e||isNaN(e)?$e.hasOwnProperty(e)?$e[e]:t[e]:$e.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[j].setArrayLength(r),"number"==typeof e&&$e.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:$e.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return u("Observable arrays cannot be frozen"),!1}};function We(t,e,r,n){void 0===r&&(r="ObservableArray@"+a()),void 0===n&&(n=!1);var o,i,u,c=new Ke(r,e,n);o=c.values,i=j,u=c,Object.defineProperty(o,i,{enumerable:!1,writable:!1,configurable:!0,value:u});var s=new Proxy(c.values,Ge);if(c.proxy=s,t&&t.length){var l=xt(!0);c.spliceWithArray(0,0,t),Et(l)}return s}var Ke=function(){function t(t,e,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(t||"ObservableArray@"+a()),this.enhancer=function(r,n){return e(r,n,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return He(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ve(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var r=new Array(t-e),n=0;n<t-e;n++)r[n]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=e},t.prototype.spliceWithArray=function(t,e,r){var n=this;ut(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:null==e?0:Math.max(0,Math.min(e,i-t)),void 0===r&&(r=o),Xe(this)){var a=Ue(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:r});if(!a)return o;e=a.removedCount,r=a.added}r=0===r.length?r:r.map((function(t){return n.enhancer(t,void 0)}));var u=this.spliceItemsIntoValues(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice(t,r,u),this.dehanceValues(u)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,A([t,e],r));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,r){var n=!this.owned&&!1,o=Ye(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Fe(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Ye(this),i=o||n?{object:this.proxy,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom.reportChanged(),o&&Fe(this,i)},t}(),$e={intercept:function(t){return this[j].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[j].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[j];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[j];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(t);case 2:return o.spliceWithArray(t,e)}return o.spliceWithArray(t,e,r)},spliceWithArray:function(t,e,r){return this[j].spliceWithArray(t,e,r)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[j];return r.spliceWithArray(r.values.length,0,t),r.values.length},pop:function(){return this.splice(Math.max(this[j].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[j];return r.spliceWithArray(0,0,t),r.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[j],r=e.dehanceValues(e.values).indexOf(t);return r>-1&&(this.splice(r,1),!0)},get:function(t){var e=this[j];if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(t,e){var r=this[j],n=r.values;if(t<n.length){ut(r.atom);var o=n[t];if(Xe(r)){var i=Ue(r,{type:"update",object:r.proxy,index:t,newValue:e});if(!i)return;e=i.newValue}(e=r.enhancer(e,o))!==o&&(n[t]=e,r.notifyArrayChildUpdate(t,e,o))}else{if(t!==n.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+n.length);r.spliceWithArray(t,0,[e])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){"function"==typeof Array.prototype[t]&&($e[t]=function(){var e=this[j];e.atom.reportObserved();var r=e.dehanceValues(e.values);return r[t].apply(r,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(t){"function"==typeof Array.prototype[t]&&($e[t]=function(e,r){var n=this,o=this[j];return o.atom.reportObserved(),o.dehanceValues(o.values)[t]((function(t,o){return e.call(r,t,o,n)}),r)})})),["reduce","reduceRight"].forEach((function(t){$e[t]=function(){var e=this,r=this[j];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(t,o,i){return o=r.dehanceValue(o),n(t,o,i,e)},r.values[t].apply(r.values,arguments)}}));var qe,Ze=h("ObservableArrayAdministration",Ke);function Je(t){return f(t)&&Ze(t[j])}var Qe,tr={},er=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+a()),this.enhancer=e,this.name=r,this[qe]=tr,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Rt.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new St(this._has(t),X,this.name+"."+g(t)+"?",!1);this._hasMap.set(t,n),ue(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(Xe(this)){var n=Ue(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!n)return this;e=n.newValue}return r?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if((ut(this._keysAtom),Xe(this))&&!(n=Ue(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Ye(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Me((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Fe(this,n),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);r&&r.setNewValue(e)},t.prototype._updateValue=function(t,e){var r=this._data.get(t);if((e=r.prepareNewValue(e))!==Rt.UNCHANGED){var n=Ye(this),o=n?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;0,r.setNewValue(e),n&&Fe(this,o)}},t.prototype._addValue=function(t,e){var r=this;ut(this._keysAtom),Me((function(){var n=new St(e,r.enhancer,r.name+"."+g(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=Ye(this),o=n?{type:"add",object:this,name:t,newValue:e}:null;n&&Fe(this,o)},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:t.get(o)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(qe=j,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var r,n;try{for(var o=k(this),i=o.next();!i.done;i=o.next()){var a=D(i.value,2),u=a[0],c=a[1];t.call(e,c,u,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(t){var e=this;return rr(t)&&(t=t.toJS()),Me((function(){var r=xt(!0);try{p(t)?b(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=D(t,2),n=r[0],o=r[1];return e.set(n,o)})):d(t)?(t.constructor!==Map&&u("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,r){return e.set(r,t)}))):null!=t&&u("Cannot initialize map from "+t)}finally{Et(r)}})),this},t.prototype.clear=function(){var t=this;Me((function(){lt((function(){var e,r;try{for(var n=k(t.keys()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return Me((function(){var r,n,o,i,a=function(t){if(d(t)||rr(t))return t;if(Array.isArray(t))return new Map(t);if(p(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return u("Cannot convert to map from '"+t+"'")}(t),c=new Map,s=!1;try{for(var l=k(e._data.keys()),f=l.next();!f.done;f=l.next()){var y=f.value;if(!a.has(y))if(e.delete(y))s=!0;else{var h=e._data.get(y);c.set(y,h)}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}try{for(var v=k(a.entries()),b=v.next();!b.done;b=v.next()){var g=D(b.value,2),m=(y=g[0],h=g[1],e._data.has(y));if(e.set(y,h),e._data.has(y)){var O=e._data.get(y);c.set(y,O),m||(s=!0)}}}catch(t){o={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}if(!s)if(e._data.size!==c.size)e._keysAtom.reportChanged();else for(var j=e._data.keys(),_=c.keys(),w=j.next(),x=_.next();!w.done;){if(w.value!==x.value){e._keysAtom.reportChanged();break}w=j.next(),x=_.next()}e._data=c})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,r={};try{for(var n=k(this),o=n.next();!o.done;o=n.next()){var i=D(o.value,2),a=i[0],u=i[1];r["symbol"==typeof a?a:g(a)]=u}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map((function(e){return g(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return Ve(this,t)},t.prototype.intercept=function(t){return He(this,t)},t}(),rr=h("ObservableMap",er),nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+a()),this.name=r,this[Qe]=nr,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Me((function(){lt((function(){var e,r;try{for(var n=k(t._data.values()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.forEach=function(t,e){var r,n;try{for(var o=k(this),i=o.next();!i.done;i=o.next()){var a=i.value;t.call(e,a,a,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((ut(this._atom),Xe(this))&&!(n=Ue(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Me((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=Ye(this),n=r?{type:"add",object:this,newValue:t}:null;0,r&&Fe(this,n)}return this},t.prototype.delete=function(t){var e=this;if(Xe(this)&&!(n=Ue(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Ye(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Me((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Fe(this,n),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=Array.from(this.keys()),r=Array.from(this.values());return mr({next:function(){var n=t;return t+=1,n<r.length?{value:[e[n],r[n]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t=this,e=0,r=Array.from(this._data.values());return mr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return ir(t)&&(t=t.toJS()),Me((function(){var r=xt(!0);try{Array.isArray(t)||v(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&u("Cannot initialize set from "+t)}finally{Et(r)}})),this},t.prototype.observe=function(t,e){return Ve(this,t)},t.prototype.intercept=function(t){return He(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(Qe=j,Symbol.iterator)]=function(){return this.values()},t}(),ir=h("ObservableSet",or),ar=function(){function t(t,e,r,n){void 0===e&&(e=new Map),this.target=t,this.values=e,this.name=r,this.defaultEnhancer=n,this.keysAtom=new _(r+".keys")}return t.prototype.read=function(t){return this.values.get(t).get()},t.prototype.write=function(t,e){var r=this.target,n=this.values.get(t);if(n instanceof kt)n.set(e);else{if(Xe(this)){if(!(i=Ue(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=i.newValue}if((e=n.prepareNewValue(e))!==Rt.UNCHANGED){var o=Ye(this),i=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;0,n.setNewValue(e),o&&Fe(this,i)}}},t.prototype.has=function(t){var e=this.pendingKeys||(this.pendingKeys=new Map),r=e.get(t);if(r)return r.get();var n=!!this.values.get(t);return r=new St(n,X,this.name+"."+g(t)+"?",!1),e.set(t,r),r.get()},t.prototype.addObservableProp=function(t,e,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(Xe(this)){var o=Ue(this,{object:this.proxy||n,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new St(e,r,this.name+"."+g(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return cr[t]||(cr[t]={configurable:!0,enumerable:!0,get:function(){return this[j].read(t)},set:function(e){this[j].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,r){var n,o,i,a=this.target;r.name=r.name||this.name+"."+g(e),this.values.set(e,new kt(r)),(t===a||(n=t,o=e,!(i=Object.getOwnPropertyDescriptor(n,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return sr[t]||(sr[t]={configurable:Rt.computedConfigurable,enumerable:!1,get:function(){return lr(this).read(t)},set:function(e){lr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Xe(this))if(!(a=Ue(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Ye(this),n=this.values.get(t),o=n&&n.get();if(n&&n.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var i=this.pendingKeys.get(t);i&&i.set(!1)}delete this.target[t];var a=r?{type:"remove",object:this.proxy||e,oldValue:o,name:t}:null;0,r&&Fe(this,a)}finally{Xt()}}},t.prototype.illegalAccess=function(t,e){console.warn("Property '"+e+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(t,e){return Ve(this,t)},t.prototype.intercept=function(t){return He(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Ye(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Fe(this,n),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var r=[];try{for(var n=k(this.values),o=n.next();!o.done;o=n.next()){var i=D(o.value,2),a=i[0];i[1]instanceof St&&r.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t}();function ur(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=B),Object.prototype.hasOwnProperty.call(t,j))return t[j];p(t)||(e=(t.constructor.name||"ObservableObject")+"@"+a()),e||(e="ObservableObject@"+a());var n=new ar(t,new Map,g(e),r);return y(t,j,n),n}var cr=Object.create(null),sr=Object.create(null);function lr(t){var e=t[j];return e||(I(t),t[j])}var fr=h("ObservableObjectAdministration",ar);function pr(t){return!!f(t)&&(I(t),fr(t[j]))}function yr(t,e){if("object"==typeof t&&null!==t){if(Je(t))return void 0!==e&&u(!1),t[j].atom;if(ir(t))return t[j];if(rr(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||u(!1),n)}var n;if(I(t),e&&!t[j]&&t[e],pr(t))return e?((n=t[j].values.get(e))||u(!1),n):u(!1);if(w(t)||Dt(t)||Wt(t))return t}else if("function"==typeof t&&Wt(t[j]))return t[j];return u(!1)}function hr(t,e){return t||u("Expecting some object"),void 0!==e?hr(yr(t,e)):w(t)||Dt(t)||Wt(t)||rr(t)||ir(t)?t:(I(t),t[j]?t[j]:void u(!1))}var dr=Object.prototype.toString;function vr(t,e,r){return void 0===r&&(r=-1),function t(e,r,n,o,i){if(e===r)return 0!==e||1/e==1/r;if(null==e||null==r)return!1;if(e!=e)return r!=r;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof r)return!1;var u=dr.call(e);if(u!==dr.call(r))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:0==+e?1/+e==1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(r);case"[object Map]":case"[object Set]":n>=0&&n++}e=br(e),r=br(r);var c="[object Array]"===u;if(!c){if("object"!=typeof e||"object"!=typeof r)return!1;var s=e.constructor,l=r.constructor;if(s!==l&&!("function"==typeof s&&s instanceof s&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in r)return!1}if(0===n)return!1;n<0&&(n=-1);i=i||[];var f=(o=o||[]).length;for(;f--;)if(o[f]===e)return i[f]===r;if(o.push(e),i.push(r),c){if((f=e.length)!==r.length)return!1;for(;f--;)if(!t(e[f],r[f],n-1,o,i))return!1}else{var p=Object.keys(e),y=void 0;if(f=p.length,Object.keys(r).length!==f)return!1;for(;f--;)if(y=p[f],!gr(r,y)||!t(e[y],r[y],n-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,r)}function br(t){return Je(t)?t.slice():d(t)||rr(t)||v(t)||ir(t)?Array.from(t.entries()):t}function gr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function mr(t){return t[Symbol.iterator]=Or,t}function Or(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:$t,extras:{getDebugName:function(t,e){return(void 0!==e?yr(t,e):pr(t)||rr(t)||ir(t)?hr(t):yr(t)).name}},$mobx:j})}).call(this,r(188),r(97))},function(t,e,r){"use strict";r.d(e,"j",(function(){return L})),r.d(e,"h",(function(){return z})),r.d(e,"e",(function(){return h})),r.d(e,"g",(function(){return h})),r.d(e,"b",(function(){return b})),r.d(e,"f",(function(){return v})),r.d(e,"a",(function(){return g})),r.d(e,"c",(function(){return B})),r.d(e,"d",(function(){return X})),r.d(e,"k",(function(){return E})),r.d(e,"i",(function(){return n}));var n,o,i,a,u,c,s={},l=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(t,e){for(var r in e)t[r]=e[r];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,r){var n,o,i,a=arguments,u={};for(i in e)"key"==i?n=e[i]:"ref"==i?o=e[i]:u[i]=e[i];if(arguments.length>3)for(r=[r],i=3;i<arguments.length;i++)r.push(a[i]);if(null!=r&&(u.children=r),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===u[i]&&(u[i]=t.defaultProps[i]);return d(t,u,n,o,null)}function d(t,e,r,o,i){var a={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++n.__v:i};return null!=n.vnode&&n.vnode(a),a}function v(){return{current:null}}function b(t){return t.children}function g(t,e){this.props=t,this.context=e}function m(t,e){if(null==e)return t.__?m(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?m(t):null}function O(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return O(t)}}function j(t){(!t.__d&&(t.__d=!0)&&o.push(t)&&!_.__r++||a!==n.debounceRendering)&&((a=n.debounceRendering)||i)(_)}function _(){for(var t;_.__r=o.length;)t=o.sort((function(t,e){return t.__v.__b-e.__v.__b})),o=[],t.some((function(t){var e,r,n,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(r=[],(n=p({},o)).__v=o.__v+1,T(a,o,n,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?m(o):i,o.__h),M(r,o),o.__e!=i&&O(o)))}))}function w(t,e,r,n,o,i,a,u,c,f){var p,h,v,g,O,j,_,w=n&&n.__k||l,E=w.length;for(c==s&&(c=null!=a?a[0]:E?m(n,0):null),r.__k=[],p=0;p<e.length;p++)if(null!=(g=r.__k[p]=null==(g=e[p])||"boolean"==typeof g?null:"string"==typeof g||"number"==typeof g?d(null,g,null,null,g):Array.isArray(g)?d(b,{children:g},null,null,null):g.__b>0?d(g.type,g.props,g.key,null,g.__v):g)){if(g.__=r,g.__b=r.__b+1,null===(v=w[p])||v&&g.key==v.key&&g.type===v.type)w[p]=void 0;else for(h=0;h<E;h++){if((v=w[h])&&g.key==v.key&&g.type===v.type){w[h]=void 0;break}v=null}T(t,g,v=v||s,o,i,a,u,c,f),O=g.__e,(h=g.ref)&&v.ref!=h&&(_||(_=[]),v.ref&&_.push(v.ref,null,g),_.push(h,g.__c||O,g)),null!=O?(null==j&&(j=O),"function"==typeof g.type&&g.__k===v.__k?g.__d=c=x(g,c,t):c=S(t,g,v,w,a,O,c),f||"option"!==r.type?"function"==typeof r.type&&(r.__d=c):t.value=""):c&&v.__e==c&&c.parentNode!=t&&(c=m(v))}if(r.__e=j,null!=a&&"function"!=typeof r.type)for(p=a.length;p--;)null!=a[p]&&y(a[p]);for(p=E;p--;)null!=w[p]&&("function"==typeof r.type&&null!=w[p].__e&&w[p].__e==r.__d&&(r.__d=m(n,p+1)),R(w[p],w[p]));if(_)for(p=0;p<_.length;p++)C(_[p],_[++p],_[++p])}function x(t,e,r){var n,o;for(n=0;n<t.__k.length;n++)(o=t.__k[n])&&(o.__=t,"function"==typeof o.type?x(o,e,r):e=S(r,o,o,t.__k,null,o.__e,e));return e}function E(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){E(t,e)})):e.push(t)),e}function S(t,e,r,n,o,i,a){var u,c,s;if(void 0!==e.__d)u=e.__d,e.__d=void 0;else if(o==r||i!=a||null==i.parentNode)t:if(null==a||a.parentNode!==t)t.appendChild(i),u=null;else{for(c=a,s=0;(c=c.nextSibling)&&s<n.length;s+=2)if(c==i)break t;t.insertBefore(i,a),u=a}return void 0!==u?u:i.nextSibling}function P(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||f.test(e)?r:r+"px"}function k(t,e,r,n,o){var i,a,u;if(o&&"className"==e&&(e="class"),"style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||P(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||P(t.style,e,r[e])}else"o"===e[0]&&"n"===e[1]?(i=e!==(e=e.replace(/Capture$/,"")),(a=e.toLowerCase())in t&&(e=a),e=e.slice(2),t.l||(t.l={}),t.l[e+i]=r,u=i?A:D,r?n||t.addEventListener(e,u,i):t.removeEventListener(e,u,i)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&"size"!==e&&"download"!==e&&"href"!==e&&!o&&e in t?t[e]=null==r?"":r:"function"!=typeof r&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/xlink:?/,""))?null==r||!1===r?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),r):null==r||!1===r&&!/^ar/.test(e)?t.removeAttribute(e):t.setAttribute(e,r))}function D(t){this.l[t.type+!1](n.event?n.event(t):t)}function A(t){this.l[t.type+!0](n.event?n.event(t):t)}function T(t,e,r,o,i,a,u,c,s){var l,f,y,h,d,v,m,O,j,_,x,E=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(s=r.__h,c=e.__e=r.__e,e.__h=null,a=[c]),(l=n.__b)&&l(e);try{t:if("function"==typeof E){if(O=e.props,j=(l=E.contextType)&&o[l.__c],_=l?j?j.props.value:l.__:o,r.__c?m=(f=e.__c=r.__c).__=f.__E:("prototype"in E&&E.prototype.render?e.__c=f=new E(O,_):(e.__c=f=new g(O,_),f.constructor=E,f.render=I),j&&j.sub(f),f.props=O,f.state||(f.state={}),f.context=_,f.__n=o,y=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=E.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,E.getDerivedStateFromProps(O,f.__s))),h=f.props,d=f.state,y)null==E.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==E.getDerivedStateFromProps&&O!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(O,_),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(O,f.__s,_)||e.__v===r.__v){f.props=O,f.state=f.__s,e.__v!==r.__v&&(f.__d=!1),f.__v=e,e.__e=r.__e,e.__k=r.__k,f.__h.length&&u.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(O,f.__s,_),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,d,v)}))}f.context=_,f.props=O,f.state=f.__s,(l=n.__r)&&l(e),f.__d=!1,f.__v=e,f.__P=t,l=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(o=p(p({},o),f.getChildContext())),y||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(h,d)),x=null!=l&&l.type===b&&null==l.key?l.props.children:l,w(t,Array.isArray(x)?x:[x],e,r,o,i,a,u,c,s),f.base=e.__e,e.__h=null,f.__h.length&&u.push(f),m&&(f.__E=f.__=null),f.__e=!1}else null==a&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=N(r.__e,e,r,o,i,a,u,s);(l=n.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=c,e.__h=!!s,a[a.indexOf(c)]=null),n.__e(t,e,r)}}function M(t,e){n.__c&&n.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){n.__e(t,e.__v)}}))}function N(t,e,r,n,o,i,a,u){var c,f,p,y,h,d=r.props,v=e.props;if(o="svg"===e.type||o,null!=i)for(c=0;c<i.length;c++)if(null!=(f=i[c])&&((null===e.type?3===f.nodeType:f.localName===e.type)||t==f)){t=f,i[c]=null;break}if(null==t){if(null===e.type)return document.createTextNode(v);t=o?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,v.is&&{is:v.is}),i=null,u=!1}if(null===e.type)d===v||u&&t.data===v||(t.data=v);else{if(null!=i&&(i=l.slice.call(t.childNodes)),p=(d=r.props||s).dangerouslySetInnerHTML,y=v.dangerouslySetInnerHTML,!u){if(null!=i)for(d={},h=0;h<t.attributes.length;h++)d[t.attributes[h].name]=t.attributes[h].value;(y||p)&&(y&&(p&&y.__html==p.__html||y.__html===t.innerHTML)||(t.innerHTML=y&&y.__html||""))}(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||k(t,i,null,r[i],n);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===e[i]||k(t,i,e[i],r[i],n)})(t,v,d,o,u),y?e.__k=[]:(c=e.props.children,w(t,Array.isArray(c)?c:[c],e,r,n,"foreignObject"!==e.type&&o,i,a,s,u)),u||("value"in v&&void 0!==(c=v.value)&&(c!==t.value||"progress"===e.type&&!c)&&k(t,"value",c,d.value,!1),"checked"in v&&void 0!==(c=v.checked)&&c!==t.checked&&k(t,"checked",c,d.checked,!1))}return t}function C(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){n.__e(t,r)}}function R(t,e,r){var o,i,a;if(n.unmount&&n.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||C(o,null,e)),r||"function"==typeof t.type||(r=null!=(i=t.__e)),t.__e=t.__d=void 0,null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){n.__e(t,e)}o.base=o.__P=null}if(o=t.__k)for(a=0;a<o.length;a++)o[a]&&R(o[a],e,r);null!=i&&y(i)}function I(t,e,r){return this.constructor(t,r)}function L(t,e,r){var o,i,a;n.__&&n.__(t,e),i=(o=r===u)?null:r&&r.__k||e.__k,t=h(b,null,[t]),a=[],T(e,(o?e:r||e).__k=t,i||s,s,void 0!==e.ownerSVGElement,r&&!o?[r]:i?null:e.childNodes.length?l.slice.call(e.childNodes):null,a,r||s,o),M(a,t)}function z(t,e){L(t,e,u)}function B(t,e,r){var n,o,i,a=arguments,u=p({},t.props);for(i in e)"key"==i?n=e[i]:"ref"==i?o=e[i]:u[i]=e[i];if(arguments.length>3)for(r=[r],i=3;i<arguments.length;i++)r.push(a[i]);return null!=r&&(u.children=r),d(t.type,u,n||t.key,o||t.ref,null)}function X(t,e){var r={__c:e="__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(j)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n={__e:function(t,e){for(var r,n,o,i=e.__h;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t),o=r.__d),o)return e.__h=i,r.__E=r}catch(e){t=e}throw t},__v:0},g.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof t&&(t=t(p({},r),this.props)),t&&p(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),j(this))},g.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),j(this))},g.prototype.render=b,o=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_.__r=0,u=s,c=0},function(t,e,r){"use strict";var n,o,i,a,u,c;r.d(e,"b",(function(){return n})),r.d(e,"e",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"d",(function(){return u})),r.d(e,"f",(function(){return c})),r.d(e,"a",(function(){return s})),function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(n||(n={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(o||(o={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(i||(i={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(a||(a={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_DND_ADD="node:dnd-add",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change"}(u||(u={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(c||(c={}));var s=999},function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"l",(function(){return u})),r.d(e,"a",(function(){return s})),r.d(e,"j",(function(){return l})),r.d(e,"h",(function(){return p})),r.d(e,"c",(function(){return y})),r.d(e,"d",(function(){return h})),r.d(e,"i",(function(){return d})),r.d(e,"e",(function(){return v})),r.d(e,"f",(function(){return b})),r.d(e,"k",(function(){return g})),r.d(e,"g",(function(){return m}));r(22),r(230),r(93),r(94),r(191),r(23);var n=r(45),o=r(68),i=r(2),a=function(t){return t.anchors},u=function(t,e){for(var r,n=e.length-1;n>=0;n--){if(f(t,e[n])){var o=c(t,e[n]);if(o){r={node:e[n],anchorIndex:o.index,anchorPosition:o.anchor};break}}}return r},c=function(t,e){for(var r,n=a(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var u=s(t.x,t.y,n[i].x,n[i].y);u<o&&(o=u,r={index:i,anchor:{x:n[i].x,y:n[i].y}})}return r},s=function(t,e,r,n){return Math.hypot(t-r,e-n)},l=function(t,e){var r=!1,n=p(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},f=function(t,e){var r=!1,n=p(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},p=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{minX:e-n/2,minY:r-o/2,maxX:e+n/2,maxY:r+o/2,x:e,y:r,width:n,height:o,centerX:e,centerY:r}},y=function(t,e,r){var n,o=function(t){var e=t,r=e.x,n=e.y,o=e.width,i=e.height,a=e.radius;return[{x:r-o/2+a,y:n-i/2+a,r:a},{x:r+o/2-a,y:n-i/2+a,r:a},{x:r-o/2+a,y:n+i/2-a,r:a},{x:r+o/2-a,y:n+i/2-a,r:a}]}(r),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var r=s(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),h(t,e,n)},h=function(t,e,r){var n,o=r,a=o.x,u=o.y,c=o.r;if(e===i.f.HORIZONTAL){var s=a-Math.sqrt(c*c-(t.y-u)*(t.y-u)),l=a+Math.sqrt(c*c-(t.y-u)*(t.y-u));n={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===i.f.VERTICAL){var f=u-Math.sqrt(c*c-(t.x-a)*(t.x-a)),p=u+Math.sqrt(c*c-(t.x-a)*(t.x-a)),y=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:y}}return n},d=function(t,e){var r=e,n=!1,o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,a=r.y-r.height/2+r.radius,u=r.y+r.height/2-r.radius,c=r.x,s=r.y,l=r.width,f=r.height;return t.y===s+f/2||t.y===s-f/2?n=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(n=t.y>a&&t.y<u),n},v=function(t,e,r){var n,o=r,a=o.x,u=o.y,c=o.rx,s=o.ry;if(e===i.f.HORIZONTAL){var l=a-Math.sqrt(c*c-(t.y-u)*(t.y-u)*c*c/(s*s)),f=a+Math.sqrt(c*c-(t.y-u)*(t.y-u)*c*c/(s*s));n={x:Math.abs(l-t.x)<Math.abs(f-t.x)?l:f,y:t.y}}else if(e===i.f.VERTICAL){var p=u-Math.sqrt(s*s-(t.x-a)*(t.x-a)*s*s/(c*c)),y=u+Math.sqrt(s*s-(t.x-a)*(t.x-a)*s*s/(c*c)),h=Math.abs(p-t.y)<Math.abs(y-t.y)?p:y;n={x:t.x,y:h}}return n},b=function(t,e,r){for(var n,a=r.pointsPosition,u=Number.MAX_SAFE_INTEGER,c=[],l=0;l<a.length;l++)c.push({start:a[l],end:a[(l+1)%a.length]});return c.forEach((function(r){var a=r.start,c=r.end,l=a,f=c;a.x>c.x&&(l=c,f=a);var p,y=(f.y-l.y)/(f.x-l.x),h=(l.x*f.y-f.x*l.y)/(l.x-f.x);if(y>Number.MAX_SAFE_INTEGER||h>Number.MAX_SAFE_INTEGER?p={x:t.x,y:t.y}:e===i.f.HORIZONTAL?p={x:(t.y-h)/y,y:t.y}:e===i.f.VERTICAL&&(p={x:t.x,y:y*t.x+h}),Object(o.b)(p,a,c)){var d=s(p.x,p.y,t.x,t.y);d<u&&(u=d,n=p)}})),n},g=function(t){return Object(n.a)(t,["id","type","x","y","text","properties"])},m=function(t,e,r,n){var o=t.x,i=t.y;return e.x>t.x?o=t.x+r/2:e.x<t.x&&(o=t.x-r/2),e.y>t.y?i=t.y+n/2:e.y<t.y&&(i=t.y-n/2),{x:o,y:i}}},function(t,e,r){"use strict";r.d(e,"j",(function(){return d})),r.d(e,"i",(function(){return b})),r.d(e,"h",(function(){return O})),r.d(e,"c",(function(){return a.e})),r.d(e,"a",(function(){return a.a})),r.d(e,"b",(function(){return D})),r.d(e,"f",(function(){return A})),r.d(e,"e",(function(){return N})),r.d(e,"g",(function(){return ot}));var n,o,i,a=r(1),u=0,c=[],s=a.i.__b,l=a.i.__r,f=a.i.diffed,p=a.i.__c,y=a.i.unmount;function h(t,e){a.i.__h&&a.i.__h(o,t,u||e),u=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function d(t){return u=1,v(S,t)}function v(t,e,r){var i=h(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):S(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function b(t,e){var r=h(n++,3);!a.i.__s&&E(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function g(t,e){var r=h(n++,4);!a.i.__s&&E(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=h(n++,7);return E(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function O(t,e){return u=8,m((function(){return t}),e)}function j(){c.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(w),t.__H.__h.forEach(x),t.__H.__h=[]}catch(e){t.__H.__h=[],a.i.__e(e,t.__v)}})),c=[]}a.i.__b=function(t){o=null,s&&s(t)},a.i.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(w),e.__h.forEach(x),e.__h=[])},a.i.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===a.i.requestAnimationFrame||((i=a.i.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),_&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);_&&(e=requestAnimationFrame(r))})(j)),o=void 0},a.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(w),t.__h=t.__h.filter((function(t){return!t.__||x(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.i.__e(r,t.__v)}})),p&&p(t,e)},a.i.unmount=function(t){y&&y(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(w)}catch(t){a.i.__e(t,e.__v)}};var _="function"==typeof requestAnimationFrame;function w(t){var e=o;"function"==typeof t.__c&&t.__c(),o=e}function x(t){var e=o;t.__c=t.__(),o=e}function E(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function S(t,e){return"function"==typeof e?e(t):e}function P(t,e){for(var r in e)t[r]=e[r];return t}function k(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function D(t){this.props=t}function A(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:k(this.props,t)}function n(e){return this.shouldComponentUpdate=r,Object(a.e)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(D.prototype=new a.a).isPureReactComponent=!0,D.prototype.shouldComponentUpdate=function(t,e){return k(this.props,t)||k(this.state,e)};var T=a.i.__b;a.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),T&&T(t)};var M="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(t){function e(e,r){var n=P({},e);return delete n.ref,t(n,(r=e.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return e.$$typeof=M,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var C=function(t,e){return null==t?null:Object(a.k)(Object(a.k)(t).map(e))},R={map:C,forEach:C,count:function(t){return t?Object(a.k)(t).length:0},only:function(t){var e=Object(a.k)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:a.k},I=a.i.__e;function L(t){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),(t=P({},t)).__c=null,t.__k=t.__k&&t.__k.map(L)),t}function z(t){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(z)),t}function B(){this.__u=0,this.t=null,this.__b=null}function X(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function H(){this.u=null,this.o=null}a.i.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e);I(t,e,r)},(B.prototype=new a.a).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=X(n.__v),i=!1,a=function(){i||(i=!0,r.componentWillUnmount=r.__c,o?o(u):u())};r.__c=r.componentWillUnmount,r.componentWillUnmount=function(){a(),r.__c&&r.__c()};var u=function(){var t;if(!--n.__u)for(n.__v.__k[0]=z(n.state.__e),n.setState({__e:n.__b=null});t=n.t.pop();)t.forceUpdate()};!0===e.__h||n.__u++||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(a,a)},B.prototype.componentWillUnmount=function(){this.t=[]},B.prototype.render=function(t,e){this.__b&&(this.__v.__k&&(this.__v.__k[0]=L(this.__b)),this.__b=null);var r=e.__e&&Object(a.e)(a.b,null,t.fallback);return r&&(r.__h=null),[Object(a.e)(a.b,null,e.__e?null:t.children),r]};var U=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Y(t){return this.getChildContext=function(){return t.context},t.children}function V(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(a.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={parentNode:r,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,r){this.childNodes.push(t),e.i.appendChild(t,r)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),Object(a.j)(Object(a.e)(Y,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(H.prototype=new a.a).__e=function(t){var e=this,r=X(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),U(e,t,n)):o()};r?r(i):i()}},H.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(a.k)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},H.prototype.componentDidUpdate=H.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){U(t,r,e)}))};var F="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,W=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};a.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(a.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var K=a.i.event;function $(){}function q(){return this.cancelBubble}function Z(){return this.defaultPrevented}a.i.event=function(t){return K&&(t=K(t)),t.persist=$,t.isPropagationStopped=q,t.isDefaultPrevented=Z,t.nativeEvent=t};var J,Q={configurable:!0,get:function(){return this.class}},tt=a.i.vnode;a.i.vnode=function(t){var e=t.type,r=t.props,n=r;if("string"==typeof e){for(var o in n={},r){var i=r[o];"defaultValue"===o&&"value"in r&&null==r.value?o="value":"download"===o&&!0===i?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+e)&&!W(r.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():G.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===i&&(i=void 0),n[o]=i}"select"==e&&n.multiple&&Array.isArray(n.value)&&(n.value=Object(a.k)(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=Object(a.k)(r.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),t.props=n}e&&r.class!=r.className&&(Q.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",Q)),t.$$typeof=F,tt&&tt(t)};var et=a.i.__r;a.i.__r=function(t){et&&et(t),J=t.__c};var rt={ReactCurrentDispatcher:{current:{readContext:function(t){return J.__n[t.__c].props.value}}}};function nt(t){return!!t&&t.$$typeof===F}var ot=function(t,e){return t(e)};a.b,e.d={useState:d,useReducer:v,useEffect:b,useLayoutEffect:g,useRef:function(t){return u=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){u=6,g((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:m,useCallback:O,useContext:function(t){var e=o.context[t.__c],r=h(n++,9);return r.__c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__},useDebugValue:function(t,e){a.i.useDebugValue&&a.i.useDebugValue(e?e(t):t)},version:"16.8.0",Children:R,render:function(t,e,r){return null==e.__k&&(e.textContent=""),Object(a.j)(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return Object(a.h)(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(Object(a.j)(null,t),!0)},createPortal:function(t,e){return Object(a.e)(V,{__v:t,i:e})},createElement:a.e,createContext:a.d,createFactory:function(t){return a.e.bind(null,t)},cloneElement:function(t){return nt(t)?a.c.apply(null,arguments):t},createRef:a.f,Fragment:a.b,isValidElement:nt,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:a.a,PureComponent:D,memo:A,forwardRef:N,unstable_batchedUpdates:ot,StrictMode:a.b,Suspense:B,SuspenseList:H,lazy:function(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return Object(a.e)(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:rt}},function(t,e,r){"use strict";r.d(e,"b",(function(){return O})),r.d(e,"o",(function(){return D})),r.d(e,"j",(function(){return A})),r.d(e,"i",(function(){return T})),r.d(e,"l",(function(){return M})),r.d(e,"k",(function(){return N})),r.d(e,"g",(function(){return C})),r.d(e,"p",(function(){return R})),r.d(e,"n",(function(){return I})),r.d(e,"e",(function(){return B})),r.d(e,"a",(function(){return X})),r.d(e,"c",(function(){return H})),r.d(e,"d",(function(){return U})),r.d(e,"h",(function(){return V})),r.d(e,"f",(function(){return F})),r.d(e,"m",(function(){return G})),r.d(e,"q",(function(){return W}));r(48),r(223),r(22),r(144),r(111),r(93),r(94),r(189),r(79),r(190),r(158),r(23);var n=r(45),o=(r(95),r(116),r(68)),i=r(2),a=r(3),u=r(64);function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){l(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||h(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var v=function(t){var e=[],r={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,r[e]=t})),Object.keys(r).forEach((function(t){e.push(r[t])})),e},b=function(t,e){return 0===t.width&&0===t.height?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},g=function(t,e){return function(t,e){var r=Math.abs(t.x-e.centerX),n=Math.abs(t.y-e.centerY);return r/e.width>n/e.height?i.f.HORIZONTAL:i.f.VERTICAL}(e,t)===i.f.HORIZONTAL?{x:e.x>t.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},m=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(r+o)/2,centerY:(n+i)/2,minX:r,minY:n,maxX:o,maxY:i,height:i-n,width:o-r}},O=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach((function(t){r.push(t.x),n.push(t.y)}));var o=Math.min.apply(Math,r),i=Math.max.apply(Math,r),a=Math.min.apply(Math,n),u=Math.max.apply(Math,n),c=i-o,s=u-a;return e&&(c+=e,s+=e),{centerX:(o+i)/2,centerY:(a+u)/2,maxX:i,maxY:u,minX:o,minY:a,x:(o+i)/2,y:(a+u)/2,height:s,width:c}},j=function(t){var e=t.minX,r=t.minY,n=t.maxX,o=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:o},{x:e,y:o}]},_=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},w=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},x=function(t,e,r,n,o){return w(t,e)+w(t,r)+function(t,e){var r=0;return e.forEach((function(e){e&&(t.x===e.x&&(r+=-2),t.y===e.y&&(r+=-2))})),r}(t,[e,r,n,o])},E=function(t,e,r,n){var o=e.x-t.x,i=e.y-t.y,a=n.x-r.x,u=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-a*i+o*u),s=(a*(t.y-r.y)-u*(t.x-r.x))/(-a*i+o*u);return c>=0&&c<=1&&s>=0&&s<=1},S=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=y(j(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return E(t,e,o,i)||E(t,e,o,u)||E(t,e,i,a)||E(t,e,a,u)},P=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=x(e,r,e);var y={};t.forEach((function(t){y[t.id]=t}));for(var h=function(){var p,h,d,b=void 0,g=1/0;if(c.forEach((function(t){f[t.id]<g&&(g=f[t.id],b=t)})),b===r){var m=[];return function t(e,r,n,o,i){i||(i=0),e.unshift(r[o]),n[o]&&n[o]!==o&&i<=100&&t(e,r,n,n[o],i+1)}(m,y,s,r.id),{v:m}}h=b,(d=(p=c).indexOf(h))>-1&&p.splice(d,1),u.push(b),function(t,e,r,n){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||S(t,e,r)||S(t,e,n)||o.push(t))})),v(o)}(t,b,n,o).forEach((function(t){if(-1===u.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var n=f[b.id]+w(b,t);l[t.id]&&n>=l[t.id]||(s[t.id]=b.id,l[t.id]=n,f[t.id]=l[t.id]+x(t,r,e,i,a))}}))};c.length;){var d=h();if("object"===p(d))return d.v}return[e,r]},k=function(t){return Object(a.h)(t)},D=function(t){for(var e=t,r=1;r<e.length-1;){var n=e[r-1],o=e[r],i=e[r+1];n.x===o.x&&o.x===i.x||n.y===o.y&&o.y===i.y?e.splice(r,1):r++}return e},A=function(t,e,r,n,o){var i,a,u=k(r),c=k(n),s=b(u,o),l=b(c,o),p=g(s,t),y=g(l,e);if(i=s,a=l,2*Math.abs(i.centerX-a.centerX)<i.width+a.width&&2*Math.abs(i.centerY-a.centerY)<i.height+a.height){var h=L(t,e,p,y);return[t,p].concat(f(h),[y,e])}var d=O([p,y]),w=m(s,d),x=m(l,d),E=[];E=(E=E.concat(j(w))).concat(j(x));var S={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[d,w,x].forEach((function(t){E=E.concat(function(t,e){return function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]}(t,e.x).concat(function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]}(t,e.y))}(t,S).filter((function(t){return _(t,s)&&_(t,l)})))})),[{x:p.x,y:y.y},{x:y.x,y:p.y}].forEach((function(t){_(t,s)&&_(t,l)&&E.push(t)})),E.unshift(p),E.push(y),E=v(E);var A=P(E,p,y,u,c,t,e);return A.unshift(t),A.push(e),A.length>2&&(A=D(A)),v(A)},T=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],o=Object(a.a)(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var u=t[i],c=t[i+1],s=Object(a.a)(u.x,u.y,c.x,c.y);s>o&&(o=s,r=u,n=c)}e=[r,n]}return e},M=function(t,e,r){var n=Object(a.j)(t,r),o=Object(a.j)(e,r);return n&&o},N=function(t,e,r){var n=Object(a.j)(t,r),o=Object(a.j)(e,r);return!(n&&o)&&(n||o)},C=function(t,e,r){for(var n,i,u=Object(a.h)(r),c=j(u),s=0;s<c.length;s++){E(t,e,c[s],c[(s+1)%c.length])&&(i=[c[s],c[(s+1)%c.length]])}return i&&(n=Object(o.a)(t,e,i[0],i[1])),n},R=function(t,e){var r;return t.x===e.x?r=i.f.VERTICAL:t.y===e.y&&(r=i.f.HORIZONTAL),r},I=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=y(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},L=function(t,e,r,n){var i=[];if(R(t,r)===R(e,n))t.y===r.y?(i.push({x:r.x,y:(r.y+n.y)/2}),i.push({x:n.x,y:(r.y+n.y)/2})):(i.push({x:(r.x+n.x)/2,y:r.y}),i.push({x:(r.x+n.x)/2,y:n.y}));else{var a={x:r.x,y:n.y},u=Object(o.b)(a,t,r),c=Object(o.b)(a,e,n);if(u||c)a={x:n.x,y:r.y};else{var s=z(a,t,r),l=z(a,e,n);s&&l&&(a={x:n.x,y:r.y})}i.push(a)}return i},z=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},B=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},X=function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Object(u.a)(s(s({},o),{},{type:"start"})),a=Object(u.a)(s(s({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},H=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,u=Object(a.h)(n),c=Object(a.h)(o),s=b(u,i),l=b(c,i);return{sNext:g(s,e),ePre:g(l,r)}},U=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Y(e[0]),Y(e[1]),Y(e[2]),Y(e[3])]},Y=function(t){var e=y(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},V=function(t){var e=U(t);return[e[2],e[3]]},F=function(t,e){for(var r,n=t.x,i=t.y,a=I(e),u=Number.MAX_SAFE_INTEGER,c=[],s=0;s<a.length;s++)c.push({start:a[s],end:a[(s+1)%a.length]});if(c.forEach((function(t){var e=t.start,a=t.end;if(e.x===a.x){var c={x:e.x,y:i};if(Object(o.b)(c,e,a)){var s=Math.abs(e.x-n);s<u&&(u=s,r=c)}}else if(e.y===a.y){var l={x:n,y:e.y};if(Object(o.b)(l,e,a)){var f=Math.abs(e.y-i);f<u&&(u=f,r=l)}}})),!r){var l=c[0],f=l.start,p=l.end;r={x:f.x+(p.x-f.x)/2,y:f.y+(p.y-f.y)/2}}return r},G=function(t){return Object(n.a)(t,["id","type","sourceNodeId","targetNodeId","pointsList","startPoint","endPoint","text","properties"])},W=function(t,e){var r=Math.abs(t.x),n=Math.abs(t.y),o=Math.abs(e.x),i=Math.abs(e.y);return Math.sqrt(Math.pow(r-o,2)+Math.pow(n-i,2))}},function(t,e,r){var n=r(20),o=r(98).f,i=r(47),a=r(53),u=r(134),c=r(203),s=r(141);t.exports=function(t,e){var r,l,f,p,y,h=t.target,d=t.global,v=t.stat;if(r=d?n:v?n[h]||u(h,{}):(n[h]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(y=o(r,l))&&y.value:r[l],!s(d?l:h+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(r,l,p,t)}}},function(t,e,r){"use strict";var n=Array.isArray;e.a=n},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return g}));var a={fill:"#FFFFFF",stroke:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,opacity:1,outlineColor:"#000000",outlineStrokeDashArray:"3,3",hoverOutlineColor:"#000000",hoverOutlineStrokeDashArray:"3,3"},u=o(o({},a),{},{width:100,height:80,radius:0}),c=o(o({},a),{},{r:50}),s=o(o({},a),{},{rx:55,ry:45}),l=o(o({},a),{},{rx:50,ry:50}),f=o({},a),p=o(o({},a),{},{stroke:"#000000",strokeWidth:1,r:4}),y={stroke:"#000000",strokeWidth:2,hoverStroke:"#000000",selectedStroke:"#000000",strokeDashArray:"1,0",outlineColor:"#000000",outlineStrokeDashArray:"3,3"},h=o({},y),d=o(o({},y),{},{offset:30}),v=o(o({},y),{},{offset:100,adjustLineColor:"#4169E1",adjustAnchorStroke:"#4169E1",adjustAnchorFill:"#1E90FF",adjustAnchorFillOpacity:.5}),b={color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:""},g={rect:u,circle:c,diamond:l,ellipse:s,polygon:f,anchor:p,text:b,nodeText:o({},b),edgeText:{color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:"",background:{fill:"transparent",height:20,stroke:"transparent",radius:0},hoverBackground:null},line:h,polyline:d,bezier:v,arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},anchorHover:{fill:"#1E90FF",fillOpacity:.5,stroke:"#4169E1",strokeWidth:1,r:10},snapline:{stroke:"#1E90FF",strokeWidth:1}}},function(t,e,r){"use strict";r.r(e);var n=r(196);r.d(e,"BaseEdgeModel",(function(){return n.a})),r.d(e,"BezierEdgeModel",(function(){return n.b})),r.d(e,"LineEdgeModel",(function(){return n.c})),r.d(e,"PolylineEdgeModel",(function(){return n.d}));var o=r(195);r.d(e,"BaseNodeModel",(function(){return o.a})),r.d(e,"CircleNodeModel",(function(){return o.b})),r.d(e,"DiamondNodeModel",(function(){return o.c})),r.d(e,"EllipseNodeModel",(function(){return o.d})),r.d(e,"PolygonNodeModel",(function(){return o.e})),r.d(e,"RectNodeModel",(function(){return o.f})),r.d(e,"TextNodeModel",(function(){return o.g}));var i=r(192);for(var a in i)["default","BaseEdgeModel","BezierEdgeModel","LineEdgeModel","PolylineEdgeModel","BaseNodeModel","CircleNodeModel","DiamondNodeModel","EllipseNodeModel","PolygonNodeModel","RectNodeModel","TextNodeModel"].indexOf(a)<0&&function(t){r.d(e,t,(function(){return i[t]}))}(a);var u=r(114);r.d(e,"EditConfigModel",(function(){return u.a}));var c=r(121);r.d(e,"GraphModel",(function(){return c.a}));var s=r(118);r.d(e,"SnaplineModel",(function(){return s.a}));r(115)},function(t,e,r){"use strict";r.d(e,"c",(function(){return W})),r.d(e,"k",(function(){return at})),r.d(e,"e",(function(){return gt})),r.d(e,"i",(function(){return Tt})),r.d(e,"f",(function(){return Yt})),r.d(e,"g",(function(){return oe})),r.d(e,"l",(function(){return pe})),r.d(e,"b",(function(){return Ze})),r.d(e,"h",(function(){return sr})),r.d(e,"j",(function(){return Er})),r.d(e,"d",(function(){return Br})),r.d(e,"a",(function(){return ke}));r(41),r(144),r(14),r(15),r(191);var n=r(1),o=r(242),i=(r(71),r(109),r(72),r(110),r(78),r(21)),a=r(3),u=r(74),c=r(44),s=r(2);function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(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 d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=g(t);if(e){var o=g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b(this,r)}}function b(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(y,t);var e,r,o,l=v(y);function y(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),(t=l.call(this)).preTargetNode=void 0,t.dragHandler=void 0,t.sourceRuleResults=void 0,t.targetRuleResults=void 0,t.onDragStart=function(){var e=t.props,r=e.x,n=e.y,o=e.nodeModel,i=e.graphModel;i.selectNodeById(o.id),i.toFront(o.id),t.setState({startX:r,startY:n,endX:r,endY:n})},t.onDraging=function(e){var r=e.deltaX,n=e.deltaY,o=t.state,i=o.endX,u=o.endY,c=t.props,l=c.graphModel,f=c.nodeModel,y=l.transformMatrix,h=l.nodes,d=p(y.moveCanvasPointByHtml([i,u],r,n),2),v=d[0],b=d[1];t.setState({endX:v,endY:b,draging:!0});var g=Object(a.l)({x:i,y:u},h);if(g){var m=g.node;if(t.preTargetNode=m,!t.targetRuleResults.has(m.id)){var O=f.isAllowConnectedAsSource(m),j=m.isAllowConnectedAsTarget(f);t.sourceRuleResults.set(m.id,O),t.targetRuleResults.set(m.id,j)}var _=t.sourceRuleResults.get(m.id).isAllPass,w=t.targetRuleResults.get(m.id).isAllPass;_&&w?m.setElementState(s.b.ALLOW_CONNECT):m.setElementState(s.b.NOT_ALLOW_CONNECT)}else t.preTargetNode&&t.preTargetNode.state!==s.b.DEFAULT&&t.preTargetNode.setElementState(s.b.DEFAULT)},t.onDragEnd=function(){t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1})},t.onDblClick=function(){var e=t.props,r=e.graphModel,n=e.nodeModel;r.setElementStateById(n.id,s.b.TEXT_EDIT)},t.checkEnd=function(){var e=t.props,r=e.graphModel,n=e.nodeModel,o=e.x,i=e.y,u=e.eventCenter,c=r.nodes,l=r.edgeType,f=t.state,p=f.endX,y=f.endY,h=f.draging,d=Object(a.l)({x:p,y:y},c);if(t.preTargetNode&&t.preTargetNode.state!==s.b.DEFAULT&&t.preTargetNode.setElementState(s.b.DEFAULT),h&&d&&d.node){var v=d.node,b=t.sourceRuleResults.get(v.id)||{},g=b.isAllPass,m=b.msg,O=t.targetRuleResults.get(v.id)||{},j=O.isAllPass,_=O.msg;if(g&&j)v.setElementState(s.b.ALLOW_CONNECT),o===d.anchorPosition.x&&i===d.anchorPosition.y||r.createEdge({type:l,sourceNodeId:n.id,startPoint:{x:o,y:i},targetNodeId:d.node.id,endPoint:{x:d.anchorPosition.x,y:d.anchorPosition.y}});else{var w=v.getData();u.emit(s.d.CONNECTION_NOT_ALLOWED,{data:w,msg:_||m})}}},t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,draging:!1},t.dragHandler=Object(i.b)({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=y,(r=[{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return Object(a.a)(e,r,n,o)>10}},{key:"render",value:function(){var t=this.state,e=t.startX,r=t.startY,o=t.endX,i=t.endY,a=this.props,s=a.x,l=a.y,p=a.style,y=a.edgeStyle,h=a.hoverStyle;return Object(n.g)("g",{className:"lf-anchor",onDblClick:this.onDblClick},Object(n.g)(u.a,f({className:"lf-node-anchor-hover"},{x:s,y:l},h,{onMouseDown:this.dragHandler})),Object(n.g)(u.a,f({className:"lf-node-anchor"},{x:s,y:l},p,{onMouseDown:this.dragHandler})),this.isShowLine()&&Object(n.g)(c.a,f({x1:e,y1:r,x2:o,y2:i,"pointer-events":"none"},y)))}}])&&h(e.prototype,r),o&&h(e,o),y}(n.a);r(38),r(79),r(158);function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function j(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _(t){var e=t.x,r=void 0===e?0:e,o=t.y,i=void 0===o?0:o,a=t.value,u=t.fontSize,c=t.fill,s=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({textAnchor:"middle","dominant-baseline":"middle",x:r,y:i,fill:void 0===c?"currentColor":c},t);if(a){var l=String(a).split(/[\r\n]/g),f=l.length;if(f>1){var p=l.map((function(t,e){var o=(e-(f-1)/2)*(u+2);return Object(n.g)("tspan",{className:"lf-text-tspan",x:r,y:i+o},t)}));return Object(n.g)("text",s,p)}return Object(n.g)("text",s,a)}}function w(t){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function P(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 k(t,e){return(k=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function D(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=T(t);if(e){var o=T(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return A(this,r)}}function A(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function T(t){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var M=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&k(t,e)}(u,t);var e,r,o,a=D(u);function u(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=a.call(this)).dragHandler=void 0,e.sumDeltaX=0,e.sumDeltaY=0,e.stepDrag=void 0,e.onDraging=function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=E(o.graphModel.transformMatrix.fixDeltaXY(r,n),2),u=a[0],c=a[1];i.moveText(u,c)},e.dblClickHandler=function(){e.props.editable&&e.props.model.setElementState(s.b.TEXT_EDIT)},e.mouseDownHandle=function(t){var r=e.props,n=r.draggable,o=r.graphModel.editConfig.nodeTextDraggable;(n||o)&&e.stepDrag.handleMouseDown(t)};var r=t.model,n=t.draggable;return e.stepDrag=new i.a({onDraging:e.onDraging,step:1,model:r,isStopPropagation:n}),e}return e=u,(r=[{key:"getShape",value:function(){var t=this.props,e=t.model.text,r=t.style,o=e.value,i={x:e.x,y:e.y,className:"lf-element-text",value:o};return Object(n.g)(_,x({},i,r))}},{key:"render",value:function(){if(this.props.model.text)return Object(n.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&P(e.prototype,r),o&&P(e,o),u}(n.a),N=(r(236),null!==window.navigator.userAgent.match(/MSIE|Trident/));function C(t){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(){return(R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?I(Object(r),!0).forEach((function(e){z(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return X(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function H(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 U(t,e,r){return e&&H(t.prototype,e),r&&H(t,r),t}function Y(t,e){return(Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function V(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=G(t);if(e){var o=G(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return F(this,r)}}function F(t,e){return!e||"object"!==C(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function G(t){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var W=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Y(t,e)}(r,t);var e=V(r);function r(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(n=e.call(this)).stepDrag=void 0,n.startTime=void 0,n.preStartTime=void 0,n.contextMenuTime=void 0,n.clickTimer=void 0,n.onDragStart=function(){},n.onDraging=function(t){var e=t.deltaX,r=t.deltaY,o=n.props,i=o.model,a=o.graphModel;n.state.isDraging||n.setState({isDraging:!0});var u=B(a.transformMatrix.fixDeltaXY(e,r),2),c=u[0],s=u[1];i.modelType.indexOf("node")>-1&&a.moveNode(i.id,c,s)},n.onDragEnd=function(){n.setState({isDraging:!1})},n.handleClick=function(t){if(n.startTime&&!((new Date).getTime()-n.startTime>200)){var e=n.props,r=e.model,o=e.eventCenter,i=e.graphModel,a=r.getData(),u=i.getPointByClient({x:t.clientX,y:t.clientY});if(n.preStartTime&&n.startTime-n.preStartTime<200)n.clickTimer&&window.clearTimeout(n.clickTimer),i.editConfig.nodeTextEdit&&r.text.editable&&(r.setSelected(!1),i.setElementStateById(r.id,s.b.TEXT_EDIT)),o.emit(s.d.NODE_DBCLICK,{data:a,e:t,position:u});else n.clickTimer=window.setTimeout((function(){(!n.contextMenuTime||n.startTime>n.contextMenuTime)&&(o.emit(s.d.ELEMENT_CLICK,{data:a,e:t,position:u}),o.emit(s.d.NODE_CLICK,{data:a,e:t,position:u}))}),400);i.toFront(r.id);var c=i.editConfig.metaKeyMultipleSelected;i.selectNodeById(r.id,t.metaKey&&c),n.preStartTime=n.startTime}},n.handleContextMenu=function(t){t.preventDefault(),n.contextMenuTime=(new Date).getTime(),n.clickTimer&&clearTimeout(n.clickTimer);var e=n.props,r=e.model,o=e.eventCenter,i=e.graphModel,a=r.getData(),u=i.getPointByClient({x:t.clientX,y:t.clientY});i.setElementStateById(r.id,s.b.SHOW_MENU,u.domOverlayPosition),i.toFront(r.id),i.selectNodeById(r.id),o.emit(s.d.NODE_CONTEXTMENU,{data:a,e:t,position:u})},n.handleMouseDown=function(t){var e=n.props,r=e.model;e.graphModel.toFront(r.id),n.startTime=(new Date).getTime(),n.stepDrag&&n.stepDrag.handleMouseDown(t)},n.setHoverON=function(t){if(!n.state.isHovered){n.setState({isHovered:!0});var e=n.props,r=e.model,o=e.eventCenter,i=r.getData();r.setHovered(!0),o.emit(s.d.NODE_MOUSEENTER,{data:i,e:t})}},n.setHoverOFF=function(t){n.setState({isHovered:!1});var e=n.props,r=e.model,o=e.eventCenter,i=r.getData();r.setHovered(!1),o.emit(s.d.NODE_MOUSELEAVE,{data:i,e:t})},n.onMouseOut=function(t){N&&n.setHoverOFF(t)};var o=t.graphModel,a=o.gridSize,u=o.editConfig,c=t.eventCenter,l=t.model;return u.adjustNodePosition&&l.draggable&&(n.stepDrag=new i.a({onDragStart:n.onDragStart,onDraging:n.onDraging,onDragEnd:n.onDragEnd,step:a,eventType:"NODE",eventCenter:c,model:l})),n.state={isDraging:!1,isHovered:!1},n}return U(r,null,[{key:"getModel",value:function(t){return t}}]),U(r,[{key:"getShapeStyle",value:function(){var t=this.props.model;return{width:t.width,height:t.height,fill:t.fill,fillOpacity:t.fillOpacity,strokeWidth:t.strokeWidth,stroke:t.stroke,strokeOpacity:t.strokeOpacity,opacity:t.opacity,outlineColor:t.outlineColor}}},{key:"getAttributes",value:function(){var t=this.props.model,e=t.id,r=t.properties,n=void 0===r?{}:r,o=t.type,i=t.x,a=t.y,u=t.isSelected,c=t.isHovered,s=t.text,l=this.getShapeStyle();return L({id:e,properties:L({},n),type:o,x:i,y:a,isSelected:u,isHovered:c,text:L({},s)},l)}},{key:"getProperties",value:function(){return this.props.model.getProperties()}},{key:"getAnchorStyle",value:function(){return this.props.graphModel.theme.anchor}},{key:"getAnchorHoverStyle",value:function(){return this.props.graphModel.theme.anchorHover}},{key:"getNewEdgeStyle",value:function(){return this.props.graphModel.theme.anchorLine}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,i=e.graphModel,a=e.eventCenter,u=r.isSelected,c=r.isHitable,s=this.state,l=s.isHovered,f=s.isDraging;if(c&&(u||l)){var p=this.getAnchorStyle(),y=this.getAnchorHoverStyle(),h=this.getNewEdgeStyle();return Object(o.a)(r.anchors,(function(e,o){return Object(n.g)(m,R({},e,{nodeDraging:f,style:p,hoverStyle:y,edgeStyle:h,anchorIndex:o,nodeModel:r,eventCenter:a,graphModel:i,setHoverOFF:t.setHoverOFF}))}))}return[]}},{key:"getTextStyle",value:function(){return this.props.graphModel.theme.nodeText}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===s.b.TEXT_EDIT)return"";var o=this.getTextStyle();if(e.text){var i=r.editConfig,a=!1;return(e.text.draggable||i.nodeTextDraggable)&&(a=!0),Object(n.g)(M,{editable:i.nodeTextEdit&&e.text.editable,style:o,model:e,graphModel:r,draggable:a})}}},{key:"getStateClassName",value:function(){var t="lf-node";switch(this.props.model.state){case s.b.ALLOW_CONNECT:t+=" lf-node-allow";break;case s.b.NOT_ALLOW_CONNECT:t+=" lf-node-not-allow";break;default:t+=" lf-node-default"}return this.state.isDraging&&(t+=" lf-dragging"),t}},{key:"render",value:function(){var t,e=this.props,r=e.model,o=e.graphModel,i=o.editConfig,a=i.hideAnchors,u=i.adjustNodePosition,c=o.gridSize,s=o.transformMatrix.SCALE_X,l=r.isHitable,f=r.draggable,p=Object(n.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),a?null:this.getAnchors());return l?(u&&f&&this.stepDrag.setStep(c*s),t=Object(n.g)("g",{className:this.getStateClassName(),id:r.id,onMouseDown:this.handleMouseDown,onMouseUp:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},p)):t=Object(n.g)("g",{className:this.getStateClassName(),id:r.id},p),t}}]),r}(n.a),K=r(51);function $(t){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Z(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){J(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function J(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(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 et(t,e,r){return(et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=it(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function rt(t,e){return(rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var o=it(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ot(this,r)}}function ot(t,e){return!e||"object"!==$(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function it(t){return(it=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var at=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rt(t,e)}(a,t);var e,r,o,i=nt(a);function a(){return Q(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getShapeStyle",value:function(){var t=et(it(a.prototype),"getShapeStyle",this).call(this),e=this.props.model.radius;return Z(Z({},t),{},{radius:e})}},{key:"getAttributes",value:function(){var t=et(it(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Z(Z({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(n.g)(K.a,t)}}])&&tt(e.prototype,r),o&&tt(e,o),a}(W);function ut(t){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function st(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(r),!0).forEach((function(e){lt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ct(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function lt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pt(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 yt(t,e,r){return(yt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=bt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function ht(t,e){return(ht=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=bt(t);if(e){var o=bt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vt(this,r)}}function vt(t,e){return!e||"object"!==ut(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function bt(t){return(bt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ht(t,e)}(a,t);var e,r,o,i=dt(a);function a(){return ft(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getShapeStyle",value:function(){var t=yt(bt(a.prototype),"getShapeStyle",this).call(this),e=this.props.model.r;return st(st({},t),{},{r:e})}},{key:"getAttributes",value:function(){var t=yt(bt(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return st(st({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(n.g)(u.a,t)}}])&&pt(e.prototype,r),o&&pt(e,o),a}(W);r(48),r(113);function mt(t){var e=t.fillOpacity,r=void 0===e?1:e,o=t.strokeWidth,i=void 0===o?1:o,a=t.strokeOpacity,u=void 0===a?1:a,c=t.fill,s=void 0===c?"transparent":c,l=t.stroke,f=void 0===l?"#000":l,p=t.points,y=t.className,h={fill:s,fillOpacity:r,strokeWidth:i,stroke:f,strokeOpacity:u,points:"",className:void 0===y?"lf-basic-shape":y};return h.points=p.map((function(t){return t.join(",")})).join(" "),Object(n.g)("polygon",h)}function Ot(t){return(Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach((function(e){wt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Et(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 St(t,e,r){return(St="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=At(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function Pt(t,e){return(Pt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=At(t);if(e){var o=At(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dt(this,r)}}function Dt(t,e){return!e||"object"!==Ot(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function At(t){return(At=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pt(t,e)}(a,t);var e,r,o,i=kt(a);function a(){return xt(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getShapeStyle",value:function(){var t=St(At(a.prototype),"getShapeStyle",this).call(this),e=this.props.model.points;return _t(_t({},t),{},{points:e})}},{key:"getAttributes",value:function(){var t=St(At(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return _t(_t({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.width,r=t.height,o=t.x,i=t.y,a=t.fill,u=t.fillOpacity,c=t.strokeWidth,s=t.stroke,l=t.strokeOpacity,f=t.points,p={transform:"matrix(1 0 0 1 ".concat(o-e/2," ").concat(i-r/2,")")},y={fill:a,fillOpacity:u,strokeWidth:c,stroke:s,strokeOpacity:l,points:f};return Object(n.g)("g",p,Object(n.g)(mt,y))}}])&&Et(e.prototype,r),o&&Et(e,o),a}(W);function Mt(t){return(Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(r),!0).forEach((function(e){Rt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Rt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function It(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lt(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 zt(t,e,r){return(zt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ut(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function Bt(t,e){return(Bt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ut(t);if(e){var o=Ut(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ht(this,r)}}function Ht(t,e){return!e||"object"!==Mt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ut(t){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Yt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bt(t,e)}(a,t);var e,r,o,i=Xt(a);function a(){return It(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getShapeStyle",value:function(){var t=this.props.model.points;return Ct(Ct({},zt(Ut(a.prototype),"getShapeStyle",this).call(this)),{},{points:t})}},{key:"getAttributes",value:function(){var t=zt(Ut(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Ct(Ct({},t),e)}},{key:"getShape",value:function(){var t=this.props.model.points,e=this.getAttributes(),r={fill:e.fill,fillOpacity:e.fillOpacity,strokeWidth:e.strokeWidth,stroke:e.stroke,strokeOpacity:e.strokeOpacity,points:t};return Object(n.g)("g",null,Object(n.g)(mt,r))}}])&&Lt(e.prototype,r),o&&Lt(e,o),a}(W);function Vt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ft(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gt(t){var e=t.x,r=void 0===e?0:e,o=t.y,i=void 0===o?0:o,a=t.rx,u=void 0===a?4:a,c=t.ry,s=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vt(Object(r),!0).forEach((function(e){Ft(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({cx:r,cy:i,rx:u,ry:void 0===c?4:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1},t);return Object(n.g)("ellipse",s)}function Wt(t){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Kt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(r),!0).forEach((function(e){qt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function qt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jt(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 Qt(t,e,r){return(Qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ne(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function te(t,e){return(te=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ee(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ne(t);if(e){var o=ne(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return re(this,r)}}function re(t,e){return!e||"object"!==Wt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ne(t){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var oe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&te(t,e)}(a,t);var e,r,o,i=ee(a);function a(){return Zt(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getAttributes",value:function(){var t=Qt(ne(a.prototype),"getAttributes",this).call(this),e=this.props.model,r=e.rx,n=e.ry;return $t($t({},t),{},{rx:r,ry:n})}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(n.g)(Gt,t)}}])&&Jt(e.prototype,r),o&&Jt(e,o),a}(W);function ie(t){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ae(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ue(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 ce(t,e){return(ce=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function se(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fe(t);if(e){var o=fe(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return le(this,r)}}function le(t,e){return!e||"object"!==ie(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function fe(t){return(fe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ce(t,e)}(a,t);var e,r,o,i=se(a);function a(){return ae(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getShape",value:function(){var t=this.getAttributes();return Object(n.g)(_,t)}}])&&ue(e.prototype,r),o&&ue(e,o),a}(W),ye=r(29);function he(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function de(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ve(t){var e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?he(Object(r),!0).forEach((function(e){de(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:""},t);return Object(n.g)("path",e)}ve.defaultProps={strokeDasharray:""};var be=ve,ge=r(64);function me(t){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function je(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function we(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 xe(t,e){return(xe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ee(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pe(t);if(e){var o=Pe(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Se(this,r)}}function Se(t,e){return!e||"object"!==me(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Pe(t){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ke=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xe(t,e)}(a,t);var e,r,o,i=Ee(a);function a(){return _e(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getArrowAttibutes",value:function(){var t=this.props,e=t.arrowInfo,r=t.style,n=e.start,o=e.end,i={start:n,end:o,offset:r.offset,verticalLength:r.verticalLength,type:"end"},a=Object(ge.a)(i),u=a.leftX,c=a.leftY,s=a.rightX,l=a.rightY;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(r),!0).forEach((function(e){je(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(u," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},r)}},{key:"getShape",value:function(){var t=this.getArrowAttibutes(),e=t.d,r=t.strokeWidth,o=t.stroke,i=t.fill;return Object(n.g)(be,{d:e,fill:i,strokeWidth:r,stroke:o})}},{key:"render",value:function(){return Object(n.g)("g",{className:"lf-arrow"},this.getShape())}}])&&we(e.prototype,r),o&&we(e,o),a}(n.a),De=(r(22),r(23),r(45)),Ae=r(5);function Te(t){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Me(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Me(Object(r),!0).forEach((function(e){Ce(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Me(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ce(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Re(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 Ie(t,e){return(Ie=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Le(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Be(t);if(e){var o=Be(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ze(this,r)}}function ze(t,e){return!e||"object"!==Te(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Be(t){return(Be=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Xe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ie(t,e)}(a,t);var e,r,o,i=Le(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this,t)).setHoverON=function(){e.setState({isHoverd:!0})},e.setHoverOFF=function(){e.setState({isHoverd:!1})},e.state={isHoverd:!1},e}return e=a,(r=[{key:"getBackgroud",value:function(){var t=this.props,e=t.model.text,r=t.style,o=Object(De.a)(r.background,"fill","stroke","radius","height");if(this.state.isHoverd&&r.hoverBackground&&(o=Ne(Ne({},o),r.hoverBackground)),e&&e.value&&"transparnet"!==o.fill){var i=r.fontSize,a=e.value,u=e.x,c=e.y,s=String(a).split(/[\r\n]/g),l=s.length,f=0;s&&s.forEach((function(t){var e=Object(Ae.e)(t);f=e>f?e:f}));var p=Ne({x:u-1,y:c-1,width:Math.ceil(f/2)*i+i/4,height:l*(i+2)+i/4},o);return Object(n.g)(K.a,p)}}},{key:"getShape",value:function(){var t=this.props,e=t.model.text,r=t.style,o=e.value,i=Ne({x:e.x,y:e.y,className:"lf-element-text",value:o},Object(De.a)(r,"color","fontSize","fontWeight","fontFamily"));return Object(n.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(n.g)(_,i))}}])&&Re(e.prototype,r),o&&Re(e,o),a}(M);function He(t){return(He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ue(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ye(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ue(Object(r),!0).forEach((function(e){Ve(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ue(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ve(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ge(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 We(t,e){return(We=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ke(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=qe(t);if(e){var o=qe(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $e(this,r)}}function $e(t,e){return!e||"object"!==He(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function qe(t){return(qe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ze=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&We(t,e)}(a,t);var e,r,o,i=Ke(a);function a(){var t;Fe(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=i.call.apply(i,[this].concat(r))).startTime=void 0,t.preStartTime=void 0,t.contextMenuTime=void 0,t.clickTimer=void 0,t.handleHover=function(e,r){var n=t.props,o=n.model,i=n.eventCenter;o.setHovered(e);var a=e?s.d.EDGE_MOUSEENTER:s.d.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})},t.setHoverON=function(e){t.handleHover(!0,e)},t.setHoverOFF=function(e){t.handleHover(!1,e)},t.handleContextMenu=function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var r=t.props,n=r.model,o=r.graphModel,i=r.eventCenter,a=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,s.b.SHOW_MENU,a.domOverlayPosition),o.toFront(n.id),o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();i.emit(s.d.EDGE_CONTEXTMENU,{data:u,e:e,position:a})},t.handleMouseDown=function(e){e.stopPropagation(),t.startTime=(new Date).getTime()},t.handleMouseUp=function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200)){var r=t.props,n=r.model,o=r.graphModel,i=r.eventCenter,a=null==n?void 0:n.getData(),u=o.getPointByClient({x:e.clientX,y:e.clientY});if(t.preStartTime&&t.startTime-t.preStartTime<200){t.clickTimer&&window.clearTimeout(t.clickTimer);var c=o.editConfig,l=o.textEditElement;if(l&&l.id===n.id&&o.setElementStateById(n.id,s.b.DEFAULT),c.edgeTextEdit&&n.text.editable&&o.setElementStateById(n.id,s.b.TEXT_EDIT),n.modelType===s.e.POLYLINE_EDGE){var f=n,p=o.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,y=p.x,h=p.y,d=Object(Ae.f)({x:y,y:h},f.points);f.dbClickPosition=d}i.emit(s.d.EDGE_DBCLICK,{data:a,e:e,position:u})}else t.clickTimer=window.setTimeout((function(){(!t.contextMenuTime||t.startTime>t.contextMenuTime)&&(i.emit(s.d.ELEMENT_CLICK,{data:a,e:e,position:u}),i.emit(s.d.EDGE_CLICK,{data:a,e:e,position:u}))}),400);o.toFront(n.id);var v=o.editConfig.metaKeyMultipleSelected;o.selectEdgeById(n.id,e.metaKey&&v),t.preStartTime=t.startTime}},t}return e=a,(r=[{key:"getAttributes",value:function(){var t=this.props.model,e=t.strokeWidth,r=t.strokeOpacity,n=t.strokeDashArray,o=t.isSelected,i=t.isHovered,a=t.hoverStroke,u=t.selectedStroke,c=t.properties,s=this.props.model.stroke;return i?s=a:o&&(s=u),{stroke:s,strokeWidth:e,strokeOpacity:r,strokeDashArray:n,isSelected:o,isHovered:i,hoverStroke:a,selectedStroke:u,properties:Ye({},c)}}},{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===s.b.TEXT_EDIT)return"";var o=r.theme.edgeText,i=this.getTextStyle(),a=Object(ye.a)({},o,i),u=!1,c=r.editConfig;return(e.text.draggable||c.edgeTextDraggable)&&(u=!0),Object(n.g)(Xe,{editable:c.edgeTextEdit&&e.text.editable,model:e,graphModel:r,style:a,draggable:u})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isSelected;return{start:e,end:r,hover:this.state.hover,isSelected:n}}},{key:"getArrowStyle",value:function(){var t=this.getAttributes().stroke,e=this.props.graphModel.theme.arrow;return{stroke:t,strokeWidth:1,fill:t,offset:e.offset,verticalLength:e.verticalLength}}},{key:"getArrow",value:function(){var t=this.getArrowInfo(),e=t.start,r=t.end;if(e&&r&&(e.x!==r.x||e.y!==r.y)){var o=this.getArrowStyle();return Object(n.g)(ke,{arrowInfo:t,style:o})}}},{key:"getAppendWidth",value:function(){return Object(n.g)("g",null)}},{key:"getAppend",value:function(){return Object(n.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"render",value:function(){var t=this.props.model;return Object(n.g)("g",{className:"lf-edge",id:t.id,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow())}}])&&Ge(e.prototype,r),o&&Ge(e,o),a}(n.a);function Je(t){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qe(Object(r),!0).forEach((function(e){er(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function er(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nr(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 or(t,e,r){return(or="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=cr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function ir(t,e){return(ir=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ar(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=cr(t);if(e){var o=cr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ur(this,r)}}function ur(t,e){return!e||"object"!==Je(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function cr(t){return(cr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var sr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ir(t,e)}(a,t);var e,r,o,i=ar(a);function a(){return rr(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getAttributes",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint;return tr(tr({},or(cr(a.prototype),"getAttributes",this).call(this)),{},{startPoint:e,endPoint:r})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.stroke,r=t.startPoint,o=t.endPoint,i=t.strokeWidth,a=t.strokeOpacity,u=t.strokeDashArray;return Object(n.g)(c.a,{x1:r.x,y1:r.y,x2:o.x,y2:o.y,strokeOpacity:a,strokeWidth:i,stroke:e,strokeDasharray:u})}},{key:"getShape",value:function(){return Object(n.g)("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.props.model,e={start:t.startPoint,end:t.endPoint},r=Object(Ae.a)(e),o=r.d,i=r.strokeWidth,a=r.fill,u=r.strokeDasharray,c=r.stroke;return Object(n.g)(be,{d:o,fill:a,strokeWidth:i,stroke:c,strokeDasharray:u})}}])&&nr(e.prototype,r),o&&nr(e,o),a}(Ze);function lr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pr=function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?lr(Object(r),!0).forEach((function(e){fr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({points:"",fill:"none"},t);return Object(n.g)("polyline",e)};function yr(t){return(yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?hr(Object(r),!0).forEach((function(e){vr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function vr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function br(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mr(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 Or(t,e,r){return(Or="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function jr(t,e){return(jr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _r(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=xr(t);if(e){var o=xr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wr(this,r)}}function wr(t,e){return!e||"object"!==yr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function xr(t){return(xr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Er=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jr(t,e)}(u,t);var e,r,o,a=_r(u);function u(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this)).drag=void 0,t.isDraging=void 0,t.appendInfo=void 0,t.dragHandler=void 0,t.onDragStart=function(){t.props.model.dragAppendStart()},t.onDraging=function(e){var r=e.deltaX,n=e.deltaY,o=t.props,i=o.model,a=o.graphModel;t.isDraging=!0;var u=br(a.transformMatrix.fixDeltaXY(r,n),2),c=u[0],s=u[1],l=i;t.appendInfo=l.dragAppend(t.appendInfo,{x:c,y:s})},t.onDragEnd=function(){t.props.model.dragAppendEnd(),t.isDraging=!1,t.appendInfo=void 0},t.beforeDragStart=function(e,r){t.dragHandler(e),t.appendInfo=r},t.drag=Object(i.b)({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=u,(r=[{key:"getAttributes",value:function(){var t=Or(xr(u.prototype),"getAttributes",this).call(this),e=this.props.model.points;return dr(dr({},t),{},{points:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.points,r=t.strokeWidth,o=t.stroke,i=t.strokeDashArray;return Object(n.g)(pr,{points:e,strokeWidth:r,stroke:o,strokeDasharray:i})}},{key:"getShape",value:function(){return Object(n.g)("g",null,this.getEdge())}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,r=t.isSelected,n={start:null,end:null,hover:this.state.hover,isSelected:r},o=Object(Ae.n)(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getAppendAttibutes",value:function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Object(ge.a)(dr(dr({},o),{},{type:"start"})),a=Object(ge.a)(dr(dr({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(t){var e=this.getAppendAttibutes(t),r=e.d,o=e.strokeWidth,i=e.fill,a=e.strokeDasharray,u=e.stroke;return Object(n.g)(be,{d:r,fill:i,strokeWidth:o,stroke:u,strokeDasharray:a})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,r=e.model,o=e.graphModel,i=r.pointsList,a=r.draggable,u=[],c=function(e){var r="lf-polyline-append",c={start:{x:i[e].x,y:i[e].y},end:{x:i[e+1].x,y:i[e+1].y},startIndex:e,endIndex:e+1,direction:""},l=Object(n.g)("g",{className:r},t.getAppendShape(c));o.editConfig.adjustEdge&&a?(t.dragHandler=t.drag,c.start.x===c.end.x?(r+="-ew-resize",c.direction=s.f.VERTICAL):c.start.y===c.end.y&&(r+="-ns-resize",c.direction=s.f.HORIZONTAL),l=Object(n.g)("g",{className:t.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Object(n.g)("g",{className:r},t.getAppendShape(c)))):t.dragHandler=function(){},u.push(l)},l=0;l<i.length-1;l++)c(l);return Object(n.g)("g",null,u)}}])&&mr(e.prototype,r),o&&mr(e,o),u}(Ze);function Sr(t){return(Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return kr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ar(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dr(Object(r),!0).forEach((function(e){Tr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nr(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 Cr(t,e,r){return(Cr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function Rr(t,e){return(Rr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ir(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zr(t);if(e){var o=zr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lr(this,r)}}function Lr(t,e){return!e||"object"!==Sr(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function zr(t){return(zr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Br=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rr(t,e)}(a,t);var e,r,o,i=Ir(a);function a(){return Mr(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getAttributes",value:function(){var t=Cr(zr(a.prototype),"getAttributes",this).call(this),e=this.props.model.path;return Ar(Ar({},t),{},{path:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.path,r=t.strokeWidth,o=t.stroke,i=t.strokeDashArray;return Object(n.g)(be,{d:e,strokeWidth:r,stroke:o,fill:"none",strokeDasharray:i})}},{key:"getShape",value:function(){return Object(n.g)("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.getAttributes().path;return Object(n.g)(be,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,r=t,n=r.path,o=r.isSelected,i=Pr(Object(Ae.h)(n),2);return{start:i[0],end:i[1],hover:e,isSelected:o}}}])&&Nr(e.prototype,r),o&&Nr(e,o),a}(Ze)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";var n=r(122),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e,r){"use strict";e.a=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(6),o=r(11),i=r(37),a=r(148),u=r(174);n({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,r){r(6)({target:"Object",stat:!0},{setPrototypeOf:r(150)})},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return p}));var n=r(65),o=r(1);r.d(e,"h",(function(){return o.g}));var i=r(120);r.d(e,"LogicFlow",(function(){return i.a}));var a=r(193);r.d(e,"LogicFlowUtil",(function(){return a}));r(194);var u=r(10);r.d(e,"BaseNode",(function(){return u.c})),r.d(e,"RectNode",(function(){return u.k})),r.d(e,"CircleNode",(function(){return u.e})),r.d(e,"PolygonNode",(function(){return u.i})),r.d(e,"DiamondNode",(function(){return u.f})),r.d(e,"EllipseNode",(function(){return u.g})),r.d(e,"TextNode",(function(){return u.l})),r.d(e,"BaseEdge",(function(){return u.b})),r.d(e,"LineEdge",(function(){return u.h})),r.d(e,"PolylineEdge",(function(){return u.j})),r.d(e,"BezierEdge",(function(){return u.d})),r.d(e,"Arrow",(function(){return u.a}));var c=r(9);for(var s in c)["default","observer","LogicFlow","h","LogicFlowUtil","BaseNode","RectNode","CircleNode","PolygonNode","DiamondNode","EllipseNode","TextNode","BaseEdge","LineEdge","PolylineEdge","BezierEdge","Arrow"].indexOf(s)<0&&function(t){r.d(e,t,(function(){return c[t]}))}(s);var l=r(119);r.d(e,"Keyboard",(function(){return l.a}));var f=r(117);function p(t){return Object(n.c)(t)}r.d(e,"get",(function(){return f.b})),r.d(e,"defaults",(function(){return f.a})),e.default=i.a},function(t,e,r){"use strict";var n=r(12).a.Symbol;e.a=n},function(t,e,r){var n=r(20),o=r(165),i=r(31),a=r(138),u=r(172),c=r(206),s=o("wks"),l=n.Symbol,f=c?l:l&&l.withoutSetter||a;t.exports=function(t){return i(s,t)||(u&&i(l,t)?s[t]=l[t]:s[t]=f("Symbol."+t)),s[t]}},,function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(97))},function(t,e,r){"use strict";r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return c}));var n=function(){},o=r(2);function i(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)}}var a=window.document;function u(t){var e=t.onDragStart,r=void 0===e?n:e,o=t.onDraging,i=void 0===o?n:o,u=t.onDragEnd,c=void 0===u?n:u,s=t.step,l=void 0===s?1:s,f=t.isStopPropagation,p=void 0===f||f,y=!1,h=0,d=0,v=0,b=0;function g(t){if(p&&t.stopPropagation(),y&&(v+=t.clientX-h,b+=t.clientY-d,h=t.clientX,d=t.clientY,Math.abs(v)>l||Math.abs(b)>l)){var e=v%l,r=b%l,n=v-e,o=b-r;v=e,b=r,i({deltaX:n,deltaY:o,event:t})}}function m(t){return p&&t.stopPropagation(),y=!1,a.removeEventListener("mousemove",g,!1),a.removeEventListener("mouseup",m,!1),c({event:t})}return function(t){if(0===t.button)return p&&t.stopPropagation(),y=!0,h=t.clientX,d=t.clientY,a.addEventListener("mousemove",g,!1),a.addEventListener("mouseup",m,!1),r({event:t})}}var c=function(){function t(e){var r=this,i=e.onDragStart,u=void 0===i?n:i,c=e.onDraging,s=void 0===c?n:c,l=e.onDragEnd,f=void 0===l?n:l,p=e.eventType,y=void 0===p?"":p,h=e.eventCenter,d=void 0===h?null:h,v=e.step,b=void 0===v?1:v,g=e.isStopPropagation,m=void 0===g||g,O=e.model,j=void 0===O?null:O;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.onDragStart=void 0,this.onDraging=void 0,this.onDragEnd=void 0,this.step=void 0,this.isStopPropagation=void 0,this.isDraging=!1,this.startX=0,this.startY=0,this.sumDeltaX=0,this.sumDeltaY=0,this.eventType=void 0,this.eventCenter=void 0,this.model=void 0,this.startTime=void 0,this.handleMouseDown=function(t){var e,n,i;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isDraging=!0,r.startX=t.clientX,r.startY=t.clientY,a.addEventListener("mousemove",r.handleMouseMove,!1),a.addEventListener("mouseup",r.handleMouseUp,!1),r.onDragStart({event:t});var u=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(o.d["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:u}),null===(i=r.eventCenter)||void 0===i||i.emit(o.d["".concat(r.eventType,"_DRAGSTART")],{e:t,data:u}),r.startTime=(new Date).getTime()}},this.handleMouseMove=function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isDraging&&(r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n,i=r.sumDeltaX%r.step,a=r.sumDeltaY%r.step,u=r.sumDeltaX-i,c=r.sumDeltaY-a;r.sumDeltaX=i,r.sumDeltaY=a,r.onDraging({deltaX:u,deltaY:c,event:t});var s,l=null===(e=r.model)||void 0===e?void 0:e.getData();if(null===(n=r.eventCenter)||void 0===n||n.emit(o.d["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:l}),(new Date).getTime()-r.startTime>200)null===(s=r.eventCenter)||void 0===s||s.emit(o.d["".concat(r.eventType,"_DRAG")],{e:t,data:l})}},this.handleMouseUp=function(t){var e,n;r.isStopPropagation&&t.stopPropagation(),r.isDraging=!1,a.removeEventListener("mousemove",r.handleMouseMove,!1),a.removeEventListener("mouseup",r.handleMouseUp,!1),r.onDragEnd({event:t});var i,u=null===(e=r.model)||void 0===e?void 0:e.getData();(null===(n=r.eventCenter)||void 0===n||n.emit(o.d["".concat(r.eventType,"_MOUSEUP")],{e:t,data:u}),(new Date).getTime()-r.startTime>200)&&(null===(i=r.eventCenter)||void 0===i||i.emit(o.d["".concat(r.eventType,"_DROP")],{e:t,data:u}))},this.onDragStart=u,this.onDraging=s,this.onDragEnd=f,this.step=b,this.isStopPropagation=m,this.eventType=y,this.eventCenter=d,this.model=j}var e,r,u;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}}])&&i(e.prototype,r),u&&i(e,u),t}()},function(t,e,r){"use strict";var n=r(6),o=r(170);n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,e,r){var n=r(20),o=r(185),i=r(170),a=r(47);for(var u in o){var c=n[u],s=c&&c.prototype;if(s&&s.forEach!==i)try{a(s,"forEach",i)}catch(t){s.forEach=i}}},function(t,e,r){var n=r(6),o=r(11),i=r(76),a=r(98).f,u=r(30),c=o((function(){a(1)}));n({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},function(t,e,r){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){var n=r(34);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,r){"use strict";var n,o=r(123),i=r(12).a["__core-js_shared__"],a=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";var u=function(t){return!!a&&a in t},c=r(13),s=r(52),l=/^\[object .+?Constructor\]$/,f=Function.prototype,p=Object.prototype,y=f.toString,h=p.hasOwnProperty,d=RegExp("^"+y.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var v=function(t){return!(!Object(c.a)(t)||u(t))&&(Object(o.a)(t)?d:l).test(Object(s.a)(t))};var b=function(t,e){return null==t?void 0:t[e]};e.a=function(t,e){var r=b(t,e);return v(r)?r:void 0}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}},function(t,e,r){"use strict";var n=r(59),o=r(42),i=r(80),a=r(133),u=r(129);var c=function(t,e){return Object(u.a)(Object(a.a)(t,e,i.a),t+"")},s=r(57),l=r(32),f=r(56),p=r(13);var y=function(t,e,r){if(!Object(p.a)(r))return!1;var n=typeof e;return!!("number"==n?Object(l.a)(r)&&Object(f.a)(e,r.length):"string"==n&&e in r)&&Object(s.a)(r[e],t)};var h=function(t){return c((function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,a&&y(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,i)}return e}))},d=r(58),v=r(33),b=Object.prototype.hasOwnProperty,g=h((function(t,e){if(Object(d.a)(e)||Object(l.a)(e))Object(o.a)(e,Object(v.a)(e),t);else for(var r in e)b.call(e,r)&&Object(n.a)(t,r,e[r])}));e.a=g},function(t,e,r){var n=r(11);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){"use strict";var n=r(123),o=r(81);e.a=function(t){return null!=t&&Object(o.a)(t.length)&&!Object(n.a)(t)}},function(t,e,r){"use strict";var n=r(132),o=r(58),i=r(125),a=Object(i.a)(Object.keys,Object),u=Object.prototype.hasOwnProperty;var c=function(t){if(!Object(o.a)(t))return a(t);var e=[];for(var r in Object(t))u.call(t,r)&&"constructor"!=r&&e.push(r);return e},s=r(32);e.a=function(t){return Object(s.a)(t)?Object(n.a)(t):c(t)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(30),o=r(162),i=r(26),a=r(100),u=Object.defineProperty;e.f=n?u:function(t,e,r){if(i(t),e=a(e,!0),i(r),o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(77),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(46);t.exports=function(t){return Object(n(t))}},function(t,e,r){"use strict";var n=r(6),o=r(104).map,i=r(108),a=r(70),u=i("map"),c=a("map");n({target:"Array",proto:!0,forced:!u||!c},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return s}));var n=r(4),o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function i(){var t=o(Object(n.j)(0),2)[1];return Object(n.h)((function(){t((function(t){return t+1}))}),[])}function a(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}function u(t){return"function"==typeof Symbol?Symbol.for(t):"__$mobx-react "+t+"__"}var c={};function s(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:c}}).call(this,r(97))},function(t,e,r){"use strict";var n=r(17),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n.a?n.a.toStringTag:void 0;var c=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o},s=Object.prototype.toString;var l=function(t){return s.call(t)},f=n.a?n.a.toStringTag:void 0;e.a=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":f&&f in Object(t)?c(t):l(t)}},function(t,e,r){var n=r(6),o=r(235),i=r(145);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e,r){"use strict";var n=r(59),o=r(124);e.a=function(t,e,r,i){var a=!r;r||(r={});for(var u=-1,c=e.length;++u<c;){var s=e[u],l=i?i(r[s],t[s],s,r,t):void 0;void 0===l&&(l=t[s]),a?Object(o.a)(r,s,l):Object(n.a)(r,s,l)}return r}},function(t,e,r){"use strict";var n=r(60);e.a=function(t){if("string"==typeof t||Object(n.a)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,r){"use strict";var n=r(1);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}e.a=function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({x1:10,y1:10,x2:20,y2:20,stroke:"black"},t);return Object(n.g)("line",e)}},function(t,e,r){"use strict";var n=r(84),o=r(59),i=r(62),a=r(56),u=r(13),c=r(43);var s=function(t,e,r,n){if(!Object(u.a)(t))return t;for(var s=-1,l=(e=Object(i.a)(e,t)).length,f=l-1,p=t;null!=p&&++s<l;){var y=Object(c.a)(e[s]),h=r;if("__proto__"===y||"constructor"===y||"prototype"===y)return t;if(s!=f){var d=p[y];void 0===(h=n?n(d,y,p):void 0)&&(h=Object(u.a)(d)?d:Object(a.a)(e[s+1])?[]:{})}Object(o.a)(p,y,h),p=p[y]}return t};var l=function(t,e,r){for(var o=-1,a=e.length,u={};++o<a;){var c=e[o],l=Object(n.a)(t,c);r(l,c)&&s(u,Object(i.a)(c,t),l)}return u},f=r(130);var p=function(t,e){return l(t,e,(function(e,r){return Object(f.a)(t,r)}))},y=r(83),h=r(17),d=r(87),v=r(7),b=h.a?h.a.isConcatSpreadable:void 0;var g=function(t){return Object(v.a)(t)||Object(d.a)(t)||!!(b&&t&&t[b])};var m=function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=g),i||(i=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Object(y.a)(i,c):o||(i[i.length]=c)}return i};var O=function(t){return(null==t?0:t.length)?m(t,1):[]},j=r(133),_=r(129);var w=function(t){return Object(_.a)(Object(j.a)(t,void 0,O),t+"")}((function(t,e){return null==t?{}:p(t,e)}));e.a=w},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(30),o=r(35),i=r(99);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){"use strict";var n=r(6),o=r(11),i=r(171),a=r(34),u=r(37),c=r(36),s=r(153),l=r(143),f=r(108),p=r(18),y=r(151),h=p("isConcatSpreadable"),d=y>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),v=f("concat"),b=function(t){if(!a(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)};n({target:"Array",proto:!0,forced:!d||!v},{concat:function(t){var e,r,n,o,i,a=u(this),f=l(a,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(b(i=-1===e?a:arguments[e])){if(p+(o=c(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<o;r++,p++)r in i&&s(f,p,i[r])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(f,p++,i)}return f.length=p,f}})},function(t,e,r){"use strict";var n=r(27),o=r(12),i=Object(n.a)(o.a,"DataView"),a=r(63),u=Object(n.a)(o.a,"Promise"),c=Object(n.a)(o.a,"Set"),s=Object(n.a)(o.a,"WeakMap"),l=r(40),f=r(52),p=Object(f.a)(i),y=Object(f.a)(a.a),h=Object(f.a)(u),d=Object(f.a)(c),v=Object(f.a)(s),b=l.a;(i&&"[object DataView]"!=b(new i(new ArrayBuffer(1)))||a.a&&"[object Map]"!=b(new a.a)||u&&"[object Promise]"!=b(u.resolve())||c&&"[object Set]"!=b(new c)||s&&"[object WeakMap]"!=b(new s))&&(b=function(t){var e=Object(l.a)(t),r="[object Object]"==e?t.constructor:void 0,n=r?Object(f.a)(r):"";if(n)switch(n){case p:return"[object DataView]";case y:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case v:return"[object WeakMap]"}return e});e.a=b},function(t,e,r){"use strict";(function(t){var n=r(122),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.a.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=u}).call(this,r(154)(t))},function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var n=r(1);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){var e=t.x,r=t.y,o=t.width,a=t.height,u=t.radius,c=t.className,s=e-o/2,l=r-a/2,f=i(i({width:10,height:10,cx:0,cy:0,rx:u||0,ry:u||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape ".concat(c)},t),{},{x:s,y:l});return Object(n.g)("rect",f)}u.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""}},function(t,e,r){"use strict";var n=Function.prototype.toString;e.a=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,r){var n=r(20),o=r(47),i=r(31),a=r(134),u=r(164),c=r(101),s=c.get,l=c.enforce,f=String(String).split("String");(t.exports=function(t,e,r,u){var c,s=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,y=!!u&&!!u.noTargetGet;"function"==typeof r&&("string"!=typeof e||i(r,"name")||o(r,"name",e),(c=l(r)).source||(c.source=f.join("string"==typeof e?e:""))),t!==n?(s?!y&&t[e]&&(p=!0):delete t[e],p?t[e]=r:o(t,e,r)):p?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||u(this)}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return Y}));r(22),r(159),r(24),r(72),r(186),r(23);var n,o,i,a,u,c,s,l,f,p,y,h,d,v,b,g,m,O,j,_,w,x,E,S,P=r(0),k=r(29),D=r(45),A=r(55),T=r(3),M=r(2),N=r(8),C=r(28),R=r(5);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function z(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 B(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}function X(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function H(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var U=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?X(Object(r),!0).forEach((function(e){H(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({sourceNodeId:"",targetNodeId:"",startPoint:null,endPoint:null,zIndex:0,isSelected:!1,isHovered:!1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},points:"",pointsList:[],strokeOpacity:1},N.a.line),Y=(o=B((n=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=Object(A.a)(),this.BaseType=M.c.EDGE,L(this,"state",o,this),this.modelType=M.e.EDGE,this.additionStateData=void 0,this.graphModel=void 0,this.menu=void 0,L(this,"text",i,this),L(this,"type",a,this),L(this,"properties",u,this),L(this,"sourceNodeId",c,this),L(this,"targetNodeId",s,this),L(this,"startPoint",l,this),L(this,"endPoint",f,this),L(this,"strokeWidth",p,this),L(this,"stroke",y,this),L(this,"strokeDashArray",h,this),L(this,"outlineColor",d,this),L(this,"outlineStrokeDashArray",v,this),L(this,"strokeOpacity",b,this),L(this,"zIndex",g,this),L(this,"isSelected",m,this),L(this,"isHovered",O,this),L(this,"isHitable",j,this),L(this,"hoverStroke",_,this),L(this,"selectedStroke",w,this),L(this,"points",x,this),L(this,"pointsList",E,this),L(this,"draggable",S,this),this.graphModel=r,this.setStyleFromTheme(n,r),this.initEdgeData(e),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(e)}var e,r,n;return e=t,(r=[{key:"initEdgeData",value:function(t){t.properties||(t.properties={}),Object(k.a)(this,Object(R.m)(t))}},{key:"setAttributes",value:function(){}},{key:"move",value:function(){}},{key:"getBeginAnchor",value:function(t,e){var r,n;return Object(T.b)(t).forEach((function(t){var o=Object(R.q)(t,e);n?o<n&&(n=o,r=t):(n=o,r=t)})),r}},{key:"getEndAnchor",value:function(t){var e,r,n=this;return Object(T.b)(t).forEach((function(t){var o=Object(R.q)(t,n.startPoint);r?o<r&&(r=o,e=t):(r=o,e=t)})),e}},{key:"getProperties",value:function(){return Object(P.I)(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,o={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(P.I)(this.properties)};return n&&(o.text={x:e,y:r,value:n}),o}},{key:"setProperty",value:function(t,e){this.properties[t]=Object(C.a)(e)}},{key:"setProperties",value:function(t){this.properties=Object.assign(this.properties,t)}},{key:"updateData",value:function(t){var e=Object(C.a)(Object(D.a)(t,"type","sourceNodeId","targetNodeId","startPoint","endPoint","text","properties")),r=this.text,n=r.x,o=r.y,i=r.draggable,a=r.editable;if(e.text&&"string"==typeof e.text){var u={value:e.text,draggable:i,editable:a},c=this.textPosition;e.text=n||o?Object.assign({},u,{x:n,y:o}):Object.assign({},u,c)}else if("object"===I(e.text)){var s=Object.assign({},this.text,e.text);e.text=Object(D.a)(s,"x","y","value","draggable","editable")}Object(k.a)(this,e)}},{key:"formatText",value:function(t){var e=this.textPosition,r=e.x,n=e.y;t.text?"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||r,y:t.text.y||n,value:t.text.value,draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:r,y:n,draggable:!1,editable:!0}:this.text={value:"",x:r,y:n,draggable:!1,editable:!0}}},{key:"moveText",value:function(t,e){if(this.text){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,draggable:a,x:n+t,y:o+e,editable:u}}}},{key:"setText",value:function(t){t&&(this.text=Object(k.a)(this.text,t))}},{key:"updateText",value:function(t){var e=this.text,r=e.x,n=e.y,o=e.draggable,i=e.editable;this.text={x:r,y:n,draggable:o,editable:i,value:t}}},{key:"setAnchors",value:function(){if(!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint=t}if(!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint=e}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStroke",value:function(t){this.stroke=t}},{key:"updateStrokeWidth",value:function(t){this.strokeWidth=t}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"setStyleFromTheme",value:function(t,e){var r=e.theme;r[t]&&Object(k.a)(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U.zIndex;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Object(k.a)(this,t)}},{key:"sourceNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}},{key:"targetNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}},{key:"textPosition",get:function(){return{x:0,y:0}}}])&&z(e.prototype,r),n&&z(e,n),t}()).prototype,"state",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),i=B(n.prototype,"text",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.text}}),a=B(n.prototype,"type",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),u=B(n.prototype,"properties",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),c=B(n.prototype,"sourceNodeId",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.sourceNodeId}}),s=B(n.prototype,"targetNodeId",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.targetNodeId}}),l=B(n.prototype,"startPoint",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.startPoint}}),f=B(n.prototype,"endPoint",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.endPoint}}),p=B(n.prototype,"strokeWidth",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.strokeWidth}}),y=B(n.prototype,"stroke",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.stroke}}),h=B(n.prototype,"strokeDashArray",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.strokeDashArray}}),d=B(n.prototype,"outlineColor",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.outlineColor}}),v=B(n.prototype,"outlineStrokeDashArray",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.outlineStrokeDashArray}}),b=B(n.prototype,"strokeOpacity",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.strokeOpacity}}),g=B(n.prototype,"zIndex",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.zIndex}}),m=B(n.prototype,"isSelected",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.isSelected}}),O=B(n.prototype,"isHovered",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.isHovered}}),j=B(n.prototype,"isHitable",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),_=B(n.prototype,"hoverStroke",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.hoverStroke}}),w=B(n.prototype,"selectedStroke",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.selectedStroke}}),x=B(n.prototype,"points",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.points}}),E=B(n.prototype,"pointsList",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return U.pointsList}}),S=B(n.prototype,"draggable",[P.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),B(n.prototype,"sourceNode",[P.m],Object.getOwnPropertyDescriptor(n.prototype,"sourceNode"),n.prototype),B(n.prototype,"targetNode",[P.m],Object.getOwnPropertyDescriptor(n.prototype,"targetNode"),n.prototype),B(n.prototype,"textPosition",[P.m],Object.getOwnPropertyDescriptor(n.prototype,"textPosition"),n.prototype),B(n.prototype,"setProperty",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setProperty"),n.prototype),B(n.prototype,"setProperties",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setProperties"),n.prototype),B(n.prototype,"updateData",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"updateData"),n.prototype),B(n.prototype,"formatText",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"formatText"),n.prototype),B(n.prototype,"moveText",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"moveText"),n.prototype),B(n.prototype,"setText",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setText"),n.prototype),B(n.prototype,"updateText",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"updateText"),n.prototype),B(n.prototype,"setAnchors",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setAnchors"),n.prototype),B(n.prototype,"setSelected",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setSelected"),n.prototype),B(n.prototype,"setHovered",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setHovered"),n.prototype),B(n.prototype,"setHitable",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setHitable"),n.prototype),B(n.prototype,"setElementState",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setElementState"),n.prototype),B(n.prototype,"updateStroke",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"updateStroke"),n.prototype),B(n.prototype,"updateStrokeWidth",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"updateStrokeWidth"),n.prototype),B(n.prototype,"updateStartPoint",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"updateStartPoint"),n.prototype),B(n.prototype,"updateEndPoint",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"updateEndPoint"),n.prototype),B(n.prototype,"setStyleFromTheme",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setStyleFromTheme"),n.prototype),B(n.prototype,"setZIndex",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"setZIndex"),n.prototype),B(n.prototype,"initPoints",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"initPoints"),n.prototype),B(n.prototype,"updateAttributes",[P.k],Object.getOwnPropertyDescriptor(n.prototype,"updateAttributes"),n.prototype),n);e.b=Y},function(t,e,r){"use strict";var n;r.d(e,"a",(function(){return p}));var o=new Uint8Array(16);function i(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(t){return"string"==typeof t&&a.test(t)},c=[],s=0;s<256;++s)c.push((s+256).toString(16).substr(1));var l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase();if(!u(r))throw TypeError("Stringified UUID is invalid");return r};var f=function(t,e,r){var n=(t=t||{}).random||(t.rng||i)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return l(n)},p=function(){return f()}},function(t,e,r){"use strict";var n=/^(?:0|[1-9]\d*)$/;e.a=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,r){"use strict";e.a=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){"use strict";var n=Object.prototype;e.a=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,r){"use strict";var n=r(124),o=r(57),i=Object.prototype.hasOwnProperty;e.a=function(t,e,r){var a=t[e];i.call(t,e)&&Object(o.a)(a,r)&&(void 0!==r||e in t)||Object(n.a)(t,e,r)}},function(t,e,r){"use strict";var n=r(40),o=r(25);e.a=function(t){return"symbol"==typeof t||Object(o.a)(t)&&"[object Symbol]"==Object(n.a)(t)}},function(t,e,r){"use strict";var n=function(){this.__data__=[],this.size=0},o=r(57);var i=function(t,e){for(var r=t.length;r--;)if(Object(o.a)(t[r][0],e))return r;return-1},a=Array.prototype.splice;var u=function(t){var e=this.__data__,r=i(e,t);return!(r<0)&&(r==e.length-1?e.pop():a.call(e,r,1),--this.size,!0)};var c=function(t){var e=this.__data__,r=i(e,t);return r<0?void 0:e[r][1]};var s=function(t){return i(this.__data__,t)>-1};var l=function(t,e){var r=this.__data__,n=i(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function f(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}f.prototype.clear=n,f.prototype.delete=u,f.prototype.get=c,f.prototype.has=s,f.prototype.set=l;e.a=f},function(t,e,r){"use strict";var n=r(7),o=r(85),i=r(75);function a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(a.Cache||i.a),r}a.Cache=i.a;var u=a;var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,l=function(t){var e=u(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(c,(function(t,r,n,o){e.push(n?o.replace(s,"$1"):r||t)})),e})),f=r(17),p=r(126),y=r(60),h=f.a?f.a.prototype:void 0,d=h?h.toString:void 0;var v=function t(e){if("string"==typeof e)return e;if(Object(n.a)(e))return Object(p.a)(e,t)+"";if(Object(y.a)(e))return d?d.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};var b=function(t){return null==t?"":v(t)};e.a=function(t,e){return Object(n.a)(t)?t:Object(o.a)(t,e)?[t]:l(b(t))}},function(t,e,r){"use strict";var n=r(27),o=r(12),i=Object(n.a)(o.a,"Map");e.a=i},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n=function(t){var e=t.start,r=t.end,n=t.offset,o=t.verticalLength,i=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},u=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),s=Math.sqrt(o*o+n*n);return"start"===i?r.x>=e.x?(a.leftX=e.x+s*Math.sin(u+c),a.leftY=e.y-s*Math.cos(u+c),a.rightX=e.x-s*Math.sin(u-c),a.rightY=e.y+s*Math.cos(u-c)):(a.leftX=e.x-s*Math.sin(u+c),a.leftY=e.y+s*Math.cos(u+c),a.rightX=e.x+s*Math.sin(u-c),a.rightY=e.y-s*Math.cos(u-c)):"end"===i&&(r.x>=e.x?(a.leftX=r.x+s*Math.sin(u-c),a.leftY=r.y-s*Math.cos(u-c),a.rightX=r.x-s*Math.sin(u+c),a.rightY=r.y+s*Math.cos(u+c)):(a.leftX=r.x-s*Math.sin(u-c),a.leftY=r.y+s*Math.cos(u-c),a.rightX=r.x+s*Math.sin(u+c),a.rightY=r.y-s*Math.cos(u+c))),a}},function(t,e,r){"use strict";r.d(e,"a",(function(){return et})),r.d(e,"b",(function(){return ot})),r.d(e,"c",(function(){return J}));var n=r(0),o=r(4);if(!o.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var i=r(39),a=Object(i.b)("observerBatching");function u(t){t()}var c=!1;function s(){return c}function l(t){return Object(n.t)(t)}var f,p=1e4,y=new Set;function h(){void 0===f&&(f=setTimeout(d,1e4))}function d(){f=void 0;var t=Date.now();y.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,y.delete(e))})),y.size>0&&h()}var v=!1,b=[];var g={};function m(t){return"observer"+t}function O(t,e,r){if(void 0===e&&(e="observed"),void 0===r&&(r=g),s())return t();var a,u=function(t){return function(){v?b.push(t):t()}}((r.useForceUpdate||i.d)()),c=o.d.useRef(null);if(!c.current){var f=new n.c(m(e),(function(){d.mounted?u():(f.dispose(),c.current=null)})),d=function(t){return{cleanAt:Date.now()+p,reaction:t}}(f);c.current=d,a=c,y.add(a),h()}var O=c.current.reaction;return o.d.useDebugValue(O,l),o.d.useEffect((function(){var t;return t=c,y.delete(t),c.current?c.current.mounted=!0:(c.current={reaction:new n.c(m(e),(function(){u()})),cleanAt:1/0},u()),function(){c.current.reaction.dispose(),c.current=null}}),[]),function(t){v=!0,b=[];try{var e=t();v=!1;var r=b.length>0?b:void 0;return o.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{v=!1}}((function(){var e,r;if(O.track((function(){try{e=t()}catch(t){r=t}})),r)throw r;return e}))}var j=function(){return(j=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function _(t,e){if(s())return t;var r,n,i,a=j({forwardRef:!1},e),u=t.displayName||t.name,c=function(e,r){return O((function(){return t(e,r)}),u)};return c.displayName=u,r=a.forwardRef?Object(o.f)(Object(o.e)(c)):Object(o.f)(c),n=t,i=r,Object.keys(n).forEach((function(t){w[t]||Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=u,r}var w={$$typeof:!0,render:!0,compare:!0,type:!0};function x(t){var e=t.children,r=t.render,n=e||r;return"function"!=typeof n?null:O(n)}function E(t,e,r,n,o){var i="children"===e?"render":"children",a="function"==typeof t[e],u="function"==typeof t[i];return a&&u?new Error("MobX Observer: Do not use children and render in the same time in`"+r):a||u?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}x.propTypes={children:E,render:E},x.displayName="Observer";var S;(S=o.g)||(S=u),Object(n.n)({reactionScheduler:S}),Object(i.a)()[a]=!0;var P=0;var k={};function D(t){return k[t]||(k[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+P+")";return P++,e}(t)),k[t]}function A(t,e){if(T(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(e,r[o])||!T(t[r[o]],e[r[o]]))return!1;return!0}function T(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}var M={$$typeof:1,render:1,compare:1,type:1,childContextTypes:1,contextType:1,contextTypes:1,defaultProps:1,getDefaultProps:1,getDerivedStateFromError:1,getDerivedStateFromProps:1,mixins:1,propTypes:1};function N(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}var C=D("patchMixins"),R=D("patchedDefinition");function I(t,e){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];e.locks++;try{var a;return null!=t&&(a=t.apply(this,o)),a}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(r,o)}))}}function L(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];I.call.apply(I,[this,t,e].concat(n))}}function z(t,e,r){var n=function(t,e){var r=t[C]=t[C]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[R]){var i=t[e],a=function t(e,r,n,o,i){var a,u=L(i,o);return(a={})[R]=!0,a.get=function(){return u},a.set=function(i){if(this===e)u=L(i,o);else{var a=t(this,r,n,o,i);Object.defineProperty(this,r,a)}},a.configurable=!0,a.enumerable=n,a}(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,a)}}var B=n.a||"$mobx",X=D("isMobXReactObserver"),H=D("isUnmounted"),U=D("skipRender"),Y=D("isForcingUpdate");function V(t){var e=t.prototype;if(t[X]){var r=F(e);console.warn("The provided component class ("+r+") \n has already been declared as an observer component.")}else t[X]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==o.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==W)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=W;K(e,"props"),K(e,"state");var n=e.render;return e.render=function(){return G.call(this,n)},z(e,"componentWillUnmount",(function(){var t;if(!0!==s()&&(null===(t=this.render[B])||void 0===t||t.dispose(),this[H]=!0,!this.render[B])){var e=F(this);console.warn("The reactive render of an observer class component ("+e+") \n was overriden after MobX attached. This may result in a memory leak if the \n overriden reactive render was not properly disposed.")}})),t}function F(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function G(t){var e=this;if(!0===s())return t.call(this);N(this,U,!1),N(this,Y,!1);var r=F(this),i=t.bind(this),a=!1,u=new n.c(r+".render()",(function(){if(!a&&(a=!0,!0!==e[H])){var t=!0;try{N(e,Y,!0),e[U]||o.a.prototype.forceUpdate.call(e),t=!1}finally{N(e,Y,!1),t&&u.dispose()}}}));function c(){a=!1;var t=void 0,e=void 0;if(u.track((function(){try{e=Object(n.d)(!1,i)}catch(e){t=e}})),t)throw t;return e}return u.reactComponent=this,c[B]=u,this.render=c,c.call(this)}function W(t,e){return s()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==e||!A(this.props,t)}function K(t,e){var r=D("reactProp_"+e+"_valueHolder"),o=D("reactProp_"+e+"_atomHolder");function i(){return this[o]||N(this,o,Object(n.o)("reactive "+e)),this[o]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return n.f&&n.e&&(t=Object(n.f)(!0)),i.call(this).reportObserved(),n.f&&n.e&&Object(n.e)(t),this[r]},set:function(t){this[Y]||A(this[r],t)?N(this,r,t):(N(this,r,t),N(this,U,!0),i.call(this).reportChanged(),N(this,U,!1))}})}var $="function"==typeof Symbol&&Symbol.for,q=$?Symbol.for("react.forward_ref"):"function"==typeof o.e&&Object(o.e)((function(t){return null})).$$typeof,Z=$?Symbol.for("react.memo"):"function"==typeof o.f&&Object(o.f)((function(t){return null})).$$typeof;function J(t){if(!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),Z&&t.$$typeof===Z)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(q&&t.$$typeof===q){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(o.e)((function(){var t=arguments;return Object(o.c)(x,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(o.a,t)?V(t):_(t)}function Q(){return(Q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var tt=o.d.createContext({});function et(t){var e=t.children,r=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,["children"]),n=o.d.useContext(tt),i=o.d.useRef(Q({},n,r)).current;return o.d.createElement(tt.Provider,{value:i},e)}function rt(t,e,r,n){var i,a,u,c=o.d.forwardRef((function(r,n){var i=Q({},r),a=o.d.useContext(tt);return Object.assign(i,t(a||{},i)||{}),n&&(i.ref=n),o.d.createElement(e,i)}));return n&&(c=J(c)),c.isMobxInjector=!0,i=e,a=c,u=Object.getOwnPropertyNames(Object.getPrototypeOf(i)),Object.getOwnPropertyNames(i).forEach((function(t){M[t]||-1!==u.indexOf(t)||Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(i,t))})),c.wrappedComponent=e,c.displayName=function(t,e){var r,n=t.displayName||t.name||t.constructor&&t.constructor.name||"Component";r=e?"inject-with-"+e+"("+n+")":"inject("+n+")";return r}(e,r),c}function nt(t){return function(e,r){return t.forEach((function(t){if(!(t in r)){if(!(t in e))throw new Error("MobX injector: Store '"+t+"' is not available! Make sure it is provided by some Provider");r[t]=e[t]}})),r}}function ot(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if("function"==typeof arguments[0]){var n=arguments[0];return function(t){return rt(n,t,n.name,!0)}}return function(t){return rt(nt(e),t,e.join("-"),!1)}}et.displayName="MobXProvider";if(!o.a)throw new Error("mobx-react requires React to be available");if(!n.C)throw new Error("mobx-react requires mobx to be available")},function(t,e,r){"use strict";var n=r(61);var o=function(){this.__data__=new n.a,this.size=0};var i=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var a=function(t){return this.__data__.get(t)};var u=function(t){return this.__data__.has(t)},c=r(63),s=r(75);var l=function(t,e){var r=this.__data__;if(r instanceof n.a){var o=r.__data__;if(!c.a||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new s.a(o)}return r.set(t,e),this.size=r.size,this};function f(t){var e=this.__data__=new n.a(t);this.size=e.size}f.prototype.clear=o,f.prototype.delete=i,f.prototype.get=a,f.prototype.has=u,f.prototype.set=l;e.a=f},function(t,e,r){"use strict";function n(t,e){return e*Math.round(t/e)||t}function o(t,e){return t%e}r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return o}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return o}));var n=function(t,e,r,n){var o=(e.y-t.y)*(n.x-r.x)-(t.x-e.x)*(r.y-n.y);if(0===o)return!1;var i=((e.x-t.x)*(n.x-r.x)*(r.y-t.y)+(e.y-t.y)*(n.x-r.x)*t.x-(n.y-r.y)*(e.x-t.x)*r.x)/o,a=-((e.y-t.y)*(n.y-r.y)*(r.x-t.x)+(e.x-t.x)*(n.y-r.y)*t.y-(n.x-r.x)*(e.y-t.y)*r.y)/o;return(i-t.x)*(i-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(a-r.y)*(a-n.y)<=0&&{x:i,y:a}},o=function(t,e,r){var n=t.x,o=t.y;return(n-e.x)*(n-r.x)<=0&&(o-e.y)*(o-r.y)<=0}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(30),o=r(11),i=r(31),a=Object.defineProperty,u={},c=function(t){throw t};t.exports=function(t,e){if(i(u,t))return u[t];e||(e={});var r=[][t],s=!!i(e,"ACCESSORS")&&e.ACCESSORS,l=i(e,0)?e[0]:c,f=i(e,1)?e[1]:void 0;return u[t]=!!r&&!o((function(){if(s&&!n)return!0;var t={length:-1};s?a(t,1,{enumerable:!0,get:c}):t[1]=1,r.call(t,l,f)}))}},function(t,e,r){"use strict";var n=r(76),o=r(145),i=r(92),a=r(101),u=r(147),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){var n=r(152),o=r(53),i=r(218);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";(function(t){var n=r(12),o=r(197),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?n.a.Buffer:void 0,c=(u?u.isBuffer:void 0)||o.a;e.a=c}).call(this,r(154)(t))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(1);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t){var e=t.x,r=void 0===e?0:e,a=t.y,u=void 0===a?0:a,c=t.r,s=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({cx:r,cy:u,r:void 0===c?4:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape"},t);return Object(n.g)("circle",s)}},function(t,e,r){"use strict";var n=r(27),o=Object(n.a)(Object,"create");var i=function(){this.__data__=o?o(null):{},this.size=0};var a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},u=Object.prototype.hasOwnProperty;var c=function(t){var e=this.__data__;if(o){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return u.call(e,t)?e[t]:void 0},s=Object.prototype.hasOwnProperty;var l=function(t){var e=this.__data__;return o?void 0!==e[t]:s.call(e,t)};var f=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=o&&void 0===e?"__lodash_hash_undefined__":e,this};function p(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}p.prototype.clear=i,p.prototype.delete=a,p.prototype.get=c,p.prototype.has=l,p.prototype.set=f;var y=p,h=r(61),d=r(63);var v=function(){this.size=0,this.__data__={hash:new y,map:new(d.a||h.a),string:new y}};var b=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var g=function(t,e){var r=t.__data__;return b(e)?r["string"==typeof e?"string":"hash"]:r.map};var m=function(t){var e=g(this,t).delete(t);return this.size-=e?1:0,e};var O=function(t){return g(this,t).get(t)};var j=function(t){return g(this,t).has(t)};var _=function(t,e){var r=g(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function w(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}w.prototype.clear=v,w.prototype.delete=m,w.prototype.get=O,w.prototype.has=j,w.prototype.set=_;e.a=w},function(t,e,r){var n=r(91),o=r(46);t.exports=function(t){return n(o(t))}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){var n=r(20),o=r(185),i=r(71),a=r(47),u=r(18),c=u("iterator"),s=u("toStringTag"),l=i.values;for(var f in o){var p=n[f],y=p&&p.prototype;if(y){if(y[c]!==l)try{a(y,c,l)}catch(t){y[c]=l}if(y[s]||a(y,s,f),o[f])for(var h in i)if(y[h]!==i[h])try{a(y,h,i[h])}catch(t){y[h]=i[h]}}}},function(t,e,r){"use strict";var n=r(6),o=r(112);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){"use strict";e.a=function(t){return t}},function(t,e,r){"use strict";e.a=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){"use strict";e.a=function(t){return function(e){return t(e)}}},function(t,e,r){"use strict";e.a=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){"use strict";var n=r(62),o=r(43);e.a=function(t,e){for(var r=0,i=(e=Object(n.a)(e,t)).length;null!=t&&r<i;)t=t[Object(o.a)(e[r++])];return r&&r==i?t:void 0}},function(t,e,r){"use strict";var n=r(7),o=r(60),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.a=function(t,e){if(Object(n.a)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Object(o.a)(t))||(a.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,r){"use strict";var n=r(66),o=r(75);var i=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var a=function(t){return this.__data__.has(t)};function u(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new o.a;++e<r;)this.add(t[e])}u.prototype.add=u.prototype.push=i,u.prototype.has=a;var c=u;var s=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var l=function(t,e){return t.has(e)};var f=function(t,e,r,n,o,i){var a=1&r,u=t.length,f=e.length;if(u!=f&&!(a&&f>u))return!1;var p=i.get(t),y=i.get(e);if(p&&y)return p==e&&y==t;var h=-1,d=!0,v=2&r?new c:void 0;for(i.set(t,e),i.set(e,t);++h<u;){var b=t[h],g=e[h];if(n)var m=a?n(g,b,h,e,t,i):n(b,g,h,t,e,i);if(void 0!==m){if(m)continue;d=!1;break}if(v){if(!s(e,(function(t,e){if(!l(v,e)&&(b===t||o(b,t,r,n,i)))return v.push(e)}))){d=!1;break}}else if(b!==g&&!o(b,g,r,n,i)){d=!1;break}}return i.delete(t),i.delete(e),d},p=r(17),y=r(90),h=r(57);var d=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var v=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},b=p.a?p.a.prototype:void 0,g=b?b.valueOf:void 0;var m=function(t,e,r,n,o,i,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new y.a(t),new y.a(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Object(h.a)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=d;case"[object Set]":var c=1&n;if(u||(u=v),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=2,a.set(t,e);var l=f(u(t),u(e),n,o,i,a);return a.delete(t),l;case"[object Symbol]":if(g)return g.call(t)==g.call(e)}return!1},O=r(96),j=Object.prototype.hasOwnProperty;var _=function(t,e,r,n,o,i){var a=1&r,u=Object(O.a)(t),c=u.length;if(c!=Object(O.a)(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:j.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var y=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var d=t[l=u[s]],v=e[l];if(n)var b=a?n(v,d,l,e,t,i):n(d,v,l,t,e,i);if(!(void 0===b?d===v||o(d,v,r,n,i):b)){y=!1;break}h||(h="constructor"==l)}if(y&&!h){var g=t.constructor,m=e.constructor;g==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m||(y=!1)}return i.delete(t),i.delete(e),y},w=r(49),x=r(7),E=r(73),S=r(131),P="[object Object]",k=Object.prototype.hasOwnProperty;var D=function(t,e,r,o,i,a){var u=Object(x.a)(t),c=Object(x.a)(e),s=u?"[object Array]":Object(w.a)(t),l=c?"[object Array]":Object(w.a)(e),p=(s="[object Arguments]"==s?P:s)==P,y=(l="[object Arguments]"==l?P:l)==P,h=s==l;if(h&&Object(E.a)(t)){if(!Object(E.a)(e))return!1;u=!0,p=!1}if(h&&!p)return a||(a=new n.a),u||Object(S.a)(t)?f(t,e,r,o,i,a):m(t,e,s,r,o,i,a);if(!(1&r)){var d=p&&k.call(t,"__wrapped__"),v=y&&k.call(e,"__wrapped__");if(d||v){var b=d?t.value():t,g=v?e.value():e;return a||(a=new n.a),i(b,g,r,o,a)}}return!!h&&(a||(a=new n.a),_(t,e,r,o,i,a))},A=r(25);e.a=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Object(A.a)(e)&&!Object(A.a)(r)?e!=e&&r!=r:D(e,r,n,o,t,i))}},function(t,e,r){"use strict";var n=r(40),o=r(25);var i=function(t){return Object(o.a)(t)&&"[object Arguments]"==Object(n.a)(t)},a=Object.prototype,u=a.hasOwnProperty,c=a.propertyIsEnumerable,s=i(function(){return arguments}())?i:function(t){return Object(o.a)(t)&&u.call(t,"callee")&&!c.call(t,"callee")};e.a=s},function(t,e,r){"use strict";var n=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i},o=r(127),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(t){return null==t?[]:(t=Object(t),n(a(t),(function(e){return i.call(t,e)})))}:o.a;e.a=u},function(t,e,r){"use strict";var n=r(27),o=function(){try{var t=Object(n.a)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();e.a=o},function(t,e,r){"use strict";var n=r(12).a.Uint8Array;e.a=n},function(t,e,r){var n=r(11),o=r(69),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,e){t.exports={}},function(t,e,r){"use strict";var n=r(30),o=r(20),i=r(141),a=r(53),u=r(31),c=r(69),s=r(183),l=r(100),f=r(11),p=r(107),y=r(166).f,h=r(98).f,d=r(35).f,v=r(224).trim,b=o.Number,g=b.prototype,m="Number"==c(p(g)),O=function(t){var e,r,n,o,i,a,u,c,s=l(t,!1);if("string"==typeof s&&s.length>2)if(43===(e=(s=v(s)).charCodeAt(0))||45===e){if(88===(r=s.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(s.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,u=0;u<a;u++)if((c=i.charCodeAt(u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(i("Number",!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var j,_=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof _&&(m?f((function(){g.valueOf.call(r)})):"Number"!=c(r))?s(new b(O(e)),r,_):O(e)},w=n?y(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),x=0;w.length>x;x++)u(b,j=w[x])&&!u(_,j)&&d(_,j,h(b,j));_.prototype=g,g.constructor=_,a(o,"Number",_)}},function(t,e,r){r(6)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){"use strict";r.d(e,"a",(function(){return O})),r.d(e,"b",(function(){return O}));r(24);var n,o,i=r(0),a=r(54),u=r(2);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(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 l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h,d,v,b,g,m,O=(o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,t);var e,r,n,o=f(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"line")).modelType=u.e.LINE_EDGE,r}return e=i,(r=[{key:"textPosition",get:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&s(e.prototype,r),n&&s(e,n),i}(a.b),h=(n=o).prototype,d="textPosition",v=[i.m],b=Object.getOwnPropertyDescriptor(n.prototype,"textPosition"),g=n.prototype,m={},Object.keys(b).forEach((function(t){m[t]=b[t]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=v.slice().reverse().reduce((function(t,e){return e(h,d,t)||t}),m),g&&void 0!==m.initializer&&(m.value=m.initializer?m.initializer.call(g):void 0,m.initializer=void 0),void 0===m.initializer&&(Object.defineProperty(h,d,m),m=null),n)},function(t,e,r){"use strict";var n=r(128),o=r(88),i=r(33);e.a=function(t){return Object(n.a)(t,i.a,o.a)}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(30),o=r(161),i=r(99),a=r(76),u=r(100),c=r(31),s=r(162),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=a(t),e=u(e,!0),s)try{return l(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(34);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n,o,i,a=r(202),u=r(20),c=r(34),s=r(47),l=r(31),f=r(135),p=r(136),y=r(102),h=u.WeakMap;if(a){var d=f.state||(f.state=new h),v=d.get,b=d.has,g=d.set;n=function(t,e){return e.facade=t,g.call(d,t,e),e},o=function(t){return v.call(d,t)||{}},i=function(t){return b.call(d,t)}}else{var m=p("state");y[m]=!0,n=function(t,e){return e.facade=t,s(t,m,e),e},o=function(t){return l(t,m)?t[m]:{}},i=function(t){return l(t,m)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},function(t,e){t.exports={}},function(t,e,r){var n=r(205),o=r(20),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},function(t,e,r){var n=r(105),o=r(91),i=r(37),a=r(36),u=r(143),c=[].push,s=function(t){var e=1==t,r=2==t,s=3==t,l=4==t,f=6==t,p=7==t,y=5==t||f;return function(h,d,v,b){for(var g,m,O=i(h),j=o(O),_=n(d,v,3),w=a(j.length),x=0,E=b||u,S=e?E(h,w):r||p?E(h,0):void 0;w>x;x++)if((y||x in j)&&(m=_(g=j[x],x,O),t))if(e)S[x]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return x;case 2:c.call(S,g)}else switch(t){case 4:return!1;case 7:c.call(S,g)}return f?-1:s||l?l:S}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},function(t,e,r){var n=r(142);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){"use strict";var n=r(11);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e,r){var n,o=r(26),i=r(207),a=r(140),u=r(102),c=r(208),s=r(163),l=r(136),f=l("IE_PROTO"),p=function(){},y=function(t){return"<script>"+t+"<\/script>"},h=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;h=n?function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F);for(var r=a.length;r--;)delete h.prototype[a[r]];return h()};u[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[f]=t):r=h(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(11),o=r(18),i=r(151),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){"use strict";var n=r(213),o=r(215);t.exports=n("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},function(t,e,r){"use strict";var n=r(184).charAt,o=r(101),i=r(147),a=o.set,u=o.getterFor("String Iterator");i(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=u(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){"use strict";var n=r(6),o=r(139),i=r(77),a=r(36),u=r(37),c=r(143),s=r(153),l=r(108),f=r(70),p=l("splice"),y=f("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,d=Math.min;n({target:"Array",proto:!0,forced:!p||!y},{splice:function(t,e){var r,n,l,f,p,y,v=u(this),b=a(v.length),g=o(t,b),m=arguments.length;if(0===m?r=n=0:1===m?(r=0,n=b-g):(r=m-2,n=d(h(i(e),0),b-g)),b+r-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=c(v,n),f=0;f<n;f++)(p=g+f)in v&&s(l,f,v[p]);if(l.length=n,r<n){for(f=g;f<b-n;f++)y=f+r,(p=f+n)in v?v[y]=v[p]:delete v[y];for(f=b;f>b-n+r;f--)delete v[f-1]}else if(r>n)for(f=b-n;f>g;f--)y=f+r-1,(p=f+n-1)in v?v[y]=v[p]:delete v[y];for(f=0;f<r;f++)v[f+g]=arguments[f+2];return v.length=b-n+r,l}})},function(t,e,r){"use strict";var n,o,i=r(187),a=r(226),u=RegExp.prototype.exec,c=String.prototype.replace,s=u,l=(n=/a/,o=/b*/g,u.call(n,"a"),u.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),f=a.UNSUPPORTED_Y||a.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(l||p||f)&&(s=function(t){var e,r,n,o,a=this,s=f&&a.sticky,y=i.call(a),h=a.source,d=0,v=t;return s&&(-1===(y=y.replace("y","")).indexOf("g")&&(y+="g"),v=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(h="(?: "+h+")",v=" "+v,d++),r=new RegExp("^(?:"+h+")",y)),p&&(r=new RegExp("^"+h+"$(?!\\s)",y)),l&&(e=a.lastIndex),n=u.call(s?r:a,v),s?n?(n.input=n.input.slice(d),n[0]=n[0].slice(d),n.index=a.lastIndex,a.lastIndex+=n[0].length):a.lastIndex=0:l&&n&&(a.lastIndex=a.global?n.index+n[0].length:e),p&&n&&n.length>1&&c.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n}),t.exports=s},function(t,e,r){"use strict";var n=r(6),o=r(91),i=r(76),a=r(106),u=[].join,c=o!=Object,s=a("join",",");n({target:"Array",proto:!0,forced:c||!s},{join:function(t){return u.call(i(this),void 0===t?",":t)}})},function(t,e,r){"use strict";r.d(e,"b",(function(){return w})),r.d(e,"a",(function(){return w}));r(71),r(24),r(72),r(78);var n,o,i,a,u,c,s,l,f,p,y,h,d,v=r(0),b=r(29),g=r(45);function m(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function O(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 j(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var _={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1,metaKeyMultipleSelected:!1},w=(o=j((n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),m(this,"stopZoomGraph",o,this),m(this,"stopScrollGraph",i,this),m(this,"stopMoveGraph",a,this),m(this,"adjustEdge",u,this),m(this,"adjustNodePosition",c,this),m(this,"hideAnchors",s,this),m(this,"hoverOutline",l,this),m(this,"nodeTextEdit",f,this),m(this,"edgeTextEdit",p,this),m(this,"nodeTextDraggable",y,this),m(this,"edgeTextDraggable",h,this),m(this,"metaKeyMultipleSelected",d,this),this.extraConf={},this.keys=void 0,this.keys=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","metaKeyMultipleSelected","extraConf"];var r=e.isSilentMode,n=e.textEdit;r?Object(b.a)(this,Object(g.a)(_,this.keys),Object(g.a)(e,["stopZoomGraph","stopScrollGraph","stopMoveGraph","hideAnchors","hoverOutline","extraConf"])):n?Object(b.a)(this,Object(g.a)(e,this.keys)):Object(b.a)(this,Object(g.a)(e,this.keys),{nodeTextEdit:!1,edgeTextEdit:!1})}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){Object(b.a)(this,Object(g.a)(t,this.keys))}},{key:"getConfig",value:function(){return Object(g.a)(this,this.keys)}}])&&O(e.prototype,r),n&&O(e,n),t}()).prototype,"stopZoomGraph",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),i=j(n.prototype,"stopScrollGraph",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),a=j(n.prototype,"stopMoveGraph",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),u=j(n.prototype,"adjustEdge",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),c=j(n.prototype,"adjustNodePosition",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),s=j(n.prototype,"hideAnchors",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),l=j(n.prototype,"hoverOutline",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),f=j(n.prototype,"nodeTextEdit",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),p=j(n.prototype,"edgeTextEdit",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),y=j(n.prototype,"nodeTextDraggable",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),h=j(n.prototype,"edgeTextDraggable",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),d=j(n.prototype,"metaKeyMultipleSelected",[v.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),j(n.prototype,"updateEditConfig",[v.k],Object.getOwnPropertyDescriptor(n.prototype,"updateEditConfig"),n.prototype),n)},function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));r(24);var n,o,i,a,u,c,s,l,f=r(0);function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function d(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 v(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var b=(o=v((n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.MINI_SCALE_SIZE=.2,this.MAX_SCALE_SIZE=16,h(this,"SCALE_X",o,this),h(this,"SKEW_Y",i,this),h(this,"SKEW_X",a,this),h(this,"SCALE_Y",u,this),h(this,"TRANSLATE_X",c,this),h(this,"TRANSLATE_Y",s,this),h(this,"ZOOM_SIZE",l,this)}var e,r,n;return e=t,(r=[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var e=p(t,2),r=e[0],n=e[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(n-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=p(t,2),r=e[0],n=e[1];return[r*this.SCALE_X+this.TRANSLATE_X,n*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,r){var n=p(t,2),o=n[0],i=n[1];return[o+e/this.SCALE_X,i+r/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,r=t?this.ZOOM_SIZE:-this.ZOOM_SIZE;return!(r<0&&this.SCALE_X<=this.MINI_SCALE_SIZE||r>0&&this.SCALE_X>=this.MAX_SCALE_SIZE||(this.SCALE_X+=r,this.SCALE_Y+=r,e&&(this.TRANSLATE_X-=r*e[0],this.TRANSLATE_Y-=r*e[1]),0))}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1}},{key:"translate",value:function(t,e){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=e}},{key:"focusOn",value:function(t,e,r,n){var o=p(this.CanvasPointToHtmlPoint([t,e]),2),i=r/2-o[0],a=n/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=a}}])&&d(e.prototype,r),n&&d(e,n),t}()).prototype,"SCALE_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),i=v(n.prototype,"SKEW_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),a=v(n.prototype,"SKEW_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),u=v(n.prototype,"SCALE_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),c=v(n.prototype,"TRANSLATE_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),s=v(n.prototype,"TRANSLATE_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),l=v(n.prototype,"ZOOM_SIZE",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),v(n.prototype,"zoom",[f.k],Object.getOwnPropertyDescriptor(n.prototype,"zoom"),n.prototype),v(n.prototype,"resetZoom",[f.k],Object.getOwnPropertyDescriptor(n.prototype,"resetZoom"),n.prototype),v(n.prototype,"translate",[f.k],Object.getOwnPropertyDescriptor(n.prototype,"translate"),n.prototype),v(n.prototype,"focusOn",[f.k],Object.getOwnPropertyDescriptor(n.prototype,"focusOn"),n.prototype),n)},function(t,e,r){"use strict";r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return _}));r(48),r(22),r(113),r(38),r(111),r(159),r(24),r(23);var n,o,i,a=r(0),u=r(2),c=r(8),s=r(3),l=r(5);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(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 d(t,e,r){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=O(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O(t);if(e){var o=O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return g(this,r)}}function g(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?m(t):e}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O(t){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var _=(i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(a,t);var e,r,n,i=b(a);function a(t,e){var r,n,s,l,f;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t,e,"polyline")).modelType=u.e.POLYLINE_EDGE,r.offset=c.a.polyline.offset,r.draginngPointList=void 0,n=r,s="dbClickPosition",l=o,f=m(r),l&&Object.defineProperty(n,s,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(f):void 0}),r}return e=a,(r=[{key:"getAfterAnchor",value:function(t,e,r){var n,o;return r.forEach((function(r){var i;t===u.f.HORIZONTAL?i=Math.abs(e.y-r.y):t===u.f.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)})),n}},{key:"getCorssPoint",value:function(t,e,r){var n;return t===u.f.HORIZONTAL?n={x:r.x,y:e.y}:t===u.f.VERTICAL&&(n={x:e.x,y:r.y}),n}},{key:"removeCrossPoints",value:function(t,e,r){var n=r.map((function(t){return t}));if(1===t){var o=n[t],i=n[e],a=n[t-1];if(Object(l.l)(a,o,this.sourceNode)){if(Object(l.k)(o,i,this.sourceNode)){var u=Object(l.g)(o,i,this.sourceNode);u&&(n[t]=u,n.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===a.x&&e.x===o.x||e.y===a.y&&e.y===o.y)&&Object(s.a)(e.x,e.y,o.x,o.y)<Object(s.a)(a.x,a.y,o.x,o.y)&&(n[t-1]=e)}))}if(e===r.length-2){var c=n[t],f=n[e],p=n[e+1];if(Object(l.l)(f,p,this.targetNode)){if(Object(l.k)(c,f,this.targetNode)){var y=Object(l.g)(c,f,this.targetNode);y&&(n[e]=y,n.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===p.x&&t.x===f.x||t.y===p.y&&t.y===f.y)&&Object(s.a)(t.x,t.y,f.x,f.y)<Object(s.a)(p.x,p.y,f.x,f.y)&&(n[e+1]=t)}))}return n}},{key:"getDragingPoints",value:function(t,e,r,n,o){var i=o.map((function(t){return t})),a=this.getAfterAnchor(t,r,n),u=this.getCorssPoint(t,r,a);return"start"===e?(i.unshift(u),i.unshift(a)):(i.push(u),i.push(a)),i}},{key:"updateCrossPoints",value:function(t){var e=t.map((function(t){return t})),r=t[0],n=t[1],o=t[e.length-2],i=t[e.length-1],a=this.sourceNode,c=this.targetNode,f=a.modelType,p=c.modelType,y=Object(l.p)(r,n),h=e[0];switch(f){case u.e.RECT_NODE:0!==a.radius&&(Object(s.i)(r,a)||(h=Object(s.c)(r,y,a)));break;case u.e.CIRCLE_NODE:h=Object(s.d)(r,y,a);break;case u.e.ELLIPSE_NODE:h=Object(s.e)(r,y,a);break;case u.e.DIAMOND_NODE:case u.e.POLYGON_NODE:h=Object(s.f)(r,y,a)}e[0]=h;var d=Object(l.p)(o,i),v=e[e.length-1];switch(p){case u.e.RECT_NODE:0!==c.radius&&(Object(s.i)(i,c)||(v=Object(s.c)(i,d,c)));break;case u.e.CIRCLE_NODE:v=Object(s.d)(i,d,c);break;case u.e.ELLIPSE_NODE:v=Object(s.e)(i,d,c);break;case u.e.DIAMOND_NODE:case u.e.POLYGON_NODE:v=Object(s.f)(i,d,c)}return e[e.length-1]=v,e}},{key:"getData",value:function(){var t=d(O(a.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Object.assign({},t,{pointsList:e})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var t=Object(l.j)({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppend",value:function(t,e){var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,c=this.pointsList;if(a===u.f.HORIZONTAL){c[o]={x:r.x,y:r.y+e.y},c[i]={x:n.x,y:n.y+e.y};var f=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(f=this.removeCrossPoints(o,i,f)),0===o){var p={x:r.x,y:r.y+e.y};if(!Object(s.j)(p,this.sourceNode)){var y=this.sourceNode.anchors;f=this.getDragingPoints(a,"start",p,y,f)}}if(i===this.pointsList.length-1){var h={x:n.x,y:n.y+e.y};if(!Object(s.j)(h,this.targetNode)){var d=this.targetNode.anchors;f=this.getDragingPoints(a,"end",h,d,f)}}f=Object(l.o)(f),this.updatePointsAfterDrage(f),this.draginngPointList=f}else if(a===u.f.VERTICAL){c[o]={x:r.x+e.x,y:r.y},c[i]={x:n.x+e.x,y:n.y};var v=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(v=this.removeCrossPoints(o,i,v)),0===o){var b={x:r.x+e.x,y:r.y};if(!Object(s.j)(b,this.sourceNode)){var g=this.sourceNode.anchors;v=this.getDragingPoints(a,"start",b,g,v)}}if(i===this.pointsList.length-1){var m={x:n.x+e.x,y:n.y};if(!Object(s.j)(m,this.targetNode)){var O=this.targetNode.anchors;v=this.getDragingPoints(a,"end",m,O,v)}}v=Object(l.o)(v),this.updatePointsAfterDrage(v),this.draginngPointList=v}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},c[o]),end:Object.assign({},c[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppendEnd",value:function(){if(this.draginngPointList){var t=Object(l.n)(this.points);this.pointsList=t.map((function(t){return t})),this.draginngPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var r=t[t.length-1];this.endPoint=Object.assign({},r)}}},{key:"updatePointsAfterDrage",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"textPosition",get:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var r=this.dbClickPosition;return{x:r.x,y:r.y}}var n=Object(l.n)(this.points),o=p(Object(l.i)(n),2),i=o[0],a=o[1];return{x:(i.x+a.x)/2,y:(i.y+a.y)/2}}}])&&h(e.prototype,r),n&&h(e,n),a}(r(54).b),o=j((n=i).prototype,"dbClickPosition",[a.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j(n.prototype,"textPosition",[a.m],Object.getOwnPropertyDescriptor(n.prototype,"textPosition"),n.prototype),j(n.prototype,"initPoints",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"initPoints"),n.prototype),j(n.prototype,"updatePoints",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"updatePoints"),n.prototype),j(n.prototype,"updateStartPoint",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"updateStartPoint"),n.prototype),j(n.prototype,"updateEndPoint",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"updateEndPoint"),n.prototype),j(n.prototype,"dragAppendStart",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"dragAppendStart"),n.prototype),j(n.prototype,"dragAppend",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"dragAppend"),n.prototype),j(n.prototype,"dragAppendEnd",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"dragAppendEnd"),n.prototype),j(n.prototype,"updatePointsAfterDrage",[a.k],Object.getOwnPropertyDescriptor(n.prototype,"updatePointsAfterDrage"),n.prototype),n)},function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return i}));var n=r(29);function o(t){var e=t.container,r=t.grid;if(!e)throw new Error("请检查 container 参数是否有效");return r&&(t.grid=Object(n.a)({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Object(n.a)({},i,t)}var i={background:!1,grid:!1,textEdit:!0}},function(t,e,r){"use strict";r.d(e,"b",(function(){return v})),r.d(e,"a",(function(){return v}));r(24);var n,o,i,a,u=r(0),c=r(29),s=r(8),l=r(3);function f(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function p(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 y(t,e,r){return e&&p(t.prototype,e),r&&p(t,r),t}function h(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var d=s.a.snapline,v=(o=h((n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.graphModel=void 0,f(this,"isShowHorizontal",o,this),f(this,"isShowVertical",i,this),f(this,"position",a,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}return y(t,[{key:"stroke",get:function(){return this.graphModel.theme.snapline.stroke||d.stroke}},{key:"strokeWidth",get:function(){return this.graphModel.theme.snapline.strokeWidth||d.strokeWidth}}]),y(t,[{key:"getCenterSnapLine",value:function(t,e){for(var r=t.x,n=t.y,o=!1,i=!1,a=0;a<e.length;a++){var u=e[a];if(u.id!==t.id&&(r===u.x&&(o=!0),n===u.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:r,y:n}}}},{key:"getHorizontalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=Object(l.h)(a);else{var u=this.graphModel.getNodeModel(i);n=Object(l.h)(u)}}for(var s=0;s<e.length;s++){var f=e[s];if(f.id!==t.id){var p=Object(l.h)(f);if(p.minY===n.minY||p.maxY===n.minY){o=!0,r=n.minY;break}if(p.minY===n.maxY||p.maxY===n.maxY){o=!0,r=n.maxY;break}}}return Object(c.a)({isShowHorizontal:o,position:{y:r}})}},{key:"getVerticalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=Object(l.h)(a);else{var u=this.graphModel.getNodeModel(i);n=Object(l.h)(u)}}for(var s=0;s<e.length;s++){var f=e[s];if(f.id!==t.id){var p=Object(l.h)(f);if(p.minX===n.minX||p.maxX===n.minX){o=!0,r=n.minX;break}if(p.minX===n.maxX||p.maxX===n.maxX){o=!0,r=n.maxX;break}}}return Object(c.a)({isShowVertical:o,position:{x:r}})}},{key:"getSnapLinePosition",value:function(t,e){var r=this.getCenterSnapLine(t,e),n=r.isShowHorizontal,o=r.isShowVertical;if(!n){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(r.isShowHorizontal=i.isShowHorizontal,r.position.y=i.position.y)}if(!o){var a=this.getVerticalSnapline(t,e);a.isShowVertical&&(r.isShowVertical=a.isShowVertical,r.position.x=a.position.x)}return r}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,r=t.isShowVertical,n=t.position;this.position=n,this.isShowHorizontal=e,this.isShowVertical=r}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var e=this.graphModel.nodes,r=this.getSnapLinePosition(t,e);this.setSnaplineInfo(r)}}]),t}()).prototype,"isShowHorizontal",[u.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),i=h(n.prototype,"isShowVertical",[u.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),a=h(n.prototype,"position",[u.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),h(n.prototype,"stroke",[u.m],Object.getOwnPropertyDescriptor(n.prototype,"stroke"),n.prototype),h(n.prototype,"strokeWidth",[u.m],Object.getOwnPropertyDescriptor(n.prototype,"strokeWidth"),n.prototype),h(n.prototype,"clearSnapline",[u.k],Object.getOwnPropertyDescriptor(n.prototype,"clearSnapline"),n.prototype),h(n.prototype,"setNodeSnapLine",[u.k],Object.getOwnPropertyDescriptor(n.prototype,"setNodeSnapLine"),n.prototype),n)},function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));r(22),r(71),r(38),r(72),r(79),r(190),r(23),r(78);var n=r(7),o=r(201),i=r.n(o);function a(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)}}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mousetrap=void 0,this.options=void 0,this.target=void 0,e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new i.a(this.target),e.keyboard.enabled&&this.enable(!0)}var e,r,o;return e=t,(r=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(Object(n.a)(e))e.forEach((function(e){var r=e.keys,n=e.callback,o=e.action;return t.on(r,n,o)}));else{var r=e.keys,o=e.callback,i=e.action;this.on(r,o,i)}}},{key:"on",value:function(t,e,r){this.mousetrap.bind(this.getKeys(t),e,r)}},{key:"off",value:function(t,e){this.mousetrap.unbind(this.getKeys(t),e)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var e=this;return(Array.isArray(t)?t:[t]).map((function(t){return e.formatkey(t)}))}},{key:"formatkey",value:function(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}},{key:"disabled",get:function(){return!0!==this.options.keyboard.enabled}}])&&a(e.prototype,r),o&&a(e,o),t}();e.b=u},function(t,e,r){"use strict";r.d(e,"a",(function(){return ar}));r(22),r(144),r(71),r(38),r(212),r(109),r(72),r(110),r(23),r(78);var n=r(1),o=r(65),i=r(121),a=r(242),u=(r(14),r(15),r(2)),c=r(21);r(113);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){return(l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(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 y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=r(16);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(){return(m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function O(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 j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=x(t);if(e){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w(this,r)}}function w(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E,S,P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(a,t);var e,r,o,i=_(a);function a(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this)).stepDrag=void 0,e.stepScrollX=0,e.stepScrollY=0,e.onDraging=function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDraging:!0});var o=e.props.graphModel,i=o.transformMatrix;o.editConfig.stopMoveGraph||(i.TRANSLATE_X+=r,i.TRANSLATE_Y+=n)},e.onDragEnd=function(){e.setState({isDraging:!1})},e.zoomHandler=function(t){var r=e.props,n=r.graphModel,o=n.editConfig,i=n.transformMatrix,a=n.gridSize,u=r.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){t.preventDefault();var l=u.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,p=l.y;i.zoom(t.deltaY<0,[f,p])}}else{if(t.preventDefault(),e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=a){var y=e.stepScrollX%a,h=e.stepScrollX-y;i.TRANSLATE_X-=h*i.SCALE_X,e.stepScrollX=y}if(Math.abs(e.stepScrollY)>=a){var d=e.stepScrollY%a,v=e.stepScrollY-d;i.TRANSLATE_Y-=v*i.SCALE_Y,e.stepScrollY=d}}},e.clickHandler=function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props,n=r.graphModel,o=r.eventCenter,i=n.textEditElement;n.selectElements.size>0&&n.clearSelectElements(),i&&i.setElementState(u.b.DEFAULT),o.emit(u.d.BLANK_CLICK,{e:t})}},e.handleContextMenu=function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props,n=r.graphModel,o=r.eventCenter,i=n.getPointByClient({x:t.clientX,y:t.clientY});n.setElementState(u.b.SHOW_MENU,i.domOverlayPosition),o.emit(u.d.BLANK_CONTEXTMENU,{e:t,position:i})}},e.mouseDownHandler=function(t){var r=e.props,n=r.eventCenter,o=r.graphModel,i=o.editConfig,a=o.transformMatrix.SCALE_X,c=o.gridSize;i.stopMoveGraph?n.emit(u.d.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(c*a),e.stepDrag.handleMouseDown(t)),e.clickHandler(t)};var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new c.a({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:r,eventType:"BLANK",eventCenter:n,model:null}),e.state={isDraging:!1},e}return e=a,(r=[{key:"render",value:function(){var t=this.InjectedProps.transformStyle.transform,e=this.props,r=e.children,o=e.dnd,i=this.state.isDraging;return Object(n.g)("svg",m({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:i?"lf-dragging":"lf-drag-able"},o.eventMap()),Object(n.g)("g",{transform:t},r))}},{key:"InjectedProps",get:function(){return this.props}}])&&O(e.prototype,r),o&&O(e,o),a}(n.a),k=Object(b.observer)((E=P,function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(a,t);var e,r,o,i=h(a);function a(){return f(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getMatrixString",value:function(){var t=this.props.graphModel.transformMatrix,e=[t.SCALE_X,t.SKEW_Y,t.SKEW_X,t.SCALE_Y,t.TRANSLATE_X,t.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(e,")"),transformOrigin:"left top"}}},{key:"render",value:function(){return Object(n.g)(E,l({},this.props,{transformStyle:this.getMatrixString()}))}}])&&p(e.prototype,r),o&&p(e,o),a}(n.a)));r(48);function D(t){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(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 M(t,e){return(M=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return C(this,r)}}function C(t,e){return!e||"object"!==D(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var I=Object(b.observer)(S=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&M(t,e)}(a,t);var e,r,o,i=N(a);function a(){var t;A(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=i.call.apply(i,[this].concat(r))).setToolOverlayRef=function(e){var r=t.props.tool.getInstance();r.components.forEach((function(t){return t(r,e)})),r.components=[]},t}return e=a,(r=[{key:"getTools",value:function(){var t=this.props,e=t.tool,r=t.graphModel,o=e.getTools().map((function(t){return Object(n.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=o,o}},{key:"render",value:function(){return Object(n.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&T(e.prototype,r),o&&T(e,o),a}(n.a))||S;r(233);function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(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 X(t,e){return(X=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function H(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Y(t);if(e){var o=Y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return U(this,r)}}function U(t,e){return!e||"object"!==L(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Y(t){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var V,F=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&X(t,e)}(a,t);var e,r,o,i=H(a);function a(){return z(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getAttributes",value:function(){var t=this.props.background,e=t.image,r=void 0===e?"":e,n=t.color,o=void 0===n?"":n,i=t.repeat,a=void 0===i?"no-repeat":i,u=t.position,c=void 0===u?"center":u,s=t.size,l=void 0===s?"auto auto":s,f=t.opacity,p=void 0===f?1:f;return o?{color:o,opacity:p,image:"none"}:r?{image:"url(".concat(r,")"),repeat:a,position:c,size:l,opacity:p}:{}}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.image,r=t.color,o=t.repeat,i=t.size,a={backgroundImage:e,backgroundColor:r,backgroundRepeat:o,backgroundPosition:t.position,backgroundSize:i,opacity:t.opacity};return Object(n.g)("div",{style:a,className:"lf-background"})}},{key:"render",value:function(){return this.getShape()}}])&&B(e.prototype,r),o&&B(e,o),a}(n.a),G=r(55);function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function K(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $(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 q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Q(t);if(e){var o=Q(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return J(this,r)}}function J(t,e){return!e||"object"!==W(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Q(t){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tt=Object(b.observer)(V=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(a,t);var e,r,o,i=Z(a);function a(){var t;K(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=i.call.apply(i,[this].concat(r))).id=Object(G.a)(),t}return e=a,(r=[{key:"renderDot",value:function(){var t=this.props,e=t.config,r=e.color,o=e.thickness,i=void 0===o?2:o,a=t.size,u=t.visible,c=Math.min(Math.max(2,i),a/2),s=1;return u||(s=0),Object(n.g)("rect",{width:c,height:c,rx:c/2,ry:c/2,fill:r,opacity:s})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,r=e.color,o=e.thickness,i=void 0===o?1:o,a=t.size,u=t.visible,c=Math.min(Math.max(1,i),a/2),s="M ".concat(a," 0 H0 M0 0 V0 ").concat(a),l=1;return u||(l=0),Object(n.g)("path",{d:s,stroke:r,strokeWidth:c,opacity:l})}},{key:"render",value:function(){var t=this.props,e=t.type,r=t.size,o=t.graphModel.transformMatrix,i=[o.SCALE_X,o.SKEW_Y,o.SKEW_X,o.SCALE_Y,o.TRANSLATE_X,o.TRANSLATE_Y].join(","),a="matrix(".concat(i,")");return Object(n.g)("div",{className:"lf-grid"},Object(n.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(n.g)("defs",null,Object(n.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:a,x:"0",y:"0",width:r,height:r,style:{transition:"all 0.1s ease"}},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Object(n.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&$(e.prototype,r),o&&$(e,o),a}(n.a))||V;tt.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};var et,rt=r(44);function nt(t){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ot(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function it(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 at(t,e){return(at=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=st(t);if(e){var o=st(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ct(this,r)}}function ct(t,e){return!e||"object"!==nt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function st(t){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var lt,ft=Object(b.observer)(et=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&at(t,e)}(a,t);var e,r,o,i=ut(a);function a(){return ot(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,r=t.isShowHorizontal,o=t.isShowVertical,i=t.stroke,a=t.strokeWidth,u=e.x,c=void 0===u?0:u,s=e.y,l=void 0===s?0:s,f={x1:-1e5,y1:l,x2:1e5,y2:l,stroke:r?i:"none",strokeWidth:a},p={x1:c,y1:-1e5,x2:c,y2:1e5,stroke:o?i:"none",strokeWidth:a};return Object(n.g)("g",{className:"lf-snapline"},Object(n.g)(rt.a,f),Object(n.g)(rt.a,p))}}])&&it(e.prototype,r),o&&it(e,o),a}(n.a))||et,pt=r(5),yt=r(51);function ht(t){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dt(){return(dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bt(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 gt(t,e){return(gt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=jt(t);if(e){var o=jt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ot(this,r)}}function Ot(t,e){return!e||"object"!==ht(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function jt(t){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _t,wt=Object(b.observer)(lt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&>(t,e)}(a,t);var e,r,o,i=mt(a);function a(){return vt(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getNodeOutline",value:function(){for(var t=this.props.graphModel,e=t.nodes,r=t.editConfig.hoverOutline,o=[],i=0;i<e.length;i++){var a=e[i],u=a.isHovered,c=a.isSelected,s=a.x,l=a.y,f=a.width,p=a.height,y=a.outlineColor,h=a.hoverOutlineColor,d=a.outlineStrokeDashArray,v=a.hoverOutlineStrokeDashArray;if(c||r&&u){var b=c?y:h,g=c?d:v;o.push(Object(n.g)(yt.a,dt({className:"lf-outline-node"},{x:s,y:l,width:f+10,height:p+10},{radius:0,fill:"none",stroke:b,strokeDasharray:g})))}}return o}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel.edges,e=[],r=0;r<t.length;r++){var n=t[r];n.isSelected&&(n.modelType===u.e.LINE_EDGE?e.push(this.getLineOutline(n)):n.modelType===u.e.POLYLINE_EDGE?e.push(this.getPolylineOutline(n)):n.modelType===u.e.BEZIER_EDGE&&e.push(this.getBezierOutline(n)))}return e}},{key:"getLineOutline",value:function(t){var e=t.startPoint,r=t.endPoint,o=(e.x+r.x)/2,i=(e.y+r.y)/2,a=Math.abs(e.x-r.x)+10,u=Math.abs(e.y-r.y)+10,c=this.props.graphModel.theme.line,s=c.outlineColor,l=c.outlineStrokeDashArray;return Object(n.g)(yt.a,dt({className:"lf-outline-edge"},{x:o,y:i,width:a,height:u},{radius:0,fill:"none",stroke:s,strokeDasharray:l}))}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=Object(pt.n)(e),o=Object(pt.b)(r,8),i=o.x,a=o.y,u=o.width,c=o.height,s=this.props.graphModel.theme.polyline,l=s.outlineColor,f=s.outlineStrokeDashArray;return Object(n.g)(yt.a,dt({className:"lf-outline"},{x:i,y:a,width:u,height:c},{radius:0,fill:"none",stroke:l,strokeDasharray:f}))}},{key:"getBezierOutline",value:function(t){var e=t.path,r=Object(pt.d)(e),o=Object(pt.b)(r,8),i=o.x,a=o.y,u=o.width,c=o.height,s=this.props.graphModel.theme.bezier,l=s.outlineColor,f=s.outlineStrokeDashArray;return Object(n.g)(yt.a,dt({className:"lf-outline"},{x:i,y:a,width:u,height:c},{radius:0,fill:"none",stroke:l,strokeDasharray:f}))}},{key:"render",value:function(){return Object(n.g)("g",{className:"lf-outline"},this.getNodeOutline(),this.getEdgeOutline())}}])&&bt(e.prototype,r),o&&bt(e,o),a}(n.a))||lt,xt=r(74);function Et(t){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function St(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dt(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 At(t,e,r){return e&&Dt(t.prototype,e),r&&Dt(t,r),t}function Tt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Mt(t,e)}function Mt(t,e){return(Mt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Rt(t);if(e){var o=Rt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ct(this,r)}}function Ct(t,e){return!e||"object"!==Et(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Rt(t){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var It,Lt=function(t){Tt(r,t);var e=Nt(r);function r(t){var n;kt(this,r),(n=e.call(this)).dragHandler=void 0,n.onDraging=function(t){var e=t.deltaX,r=t.deltaY,o=n.props,i=o.graphModel,a=o.bezierModel,u=o.type,c=i.transformMatrix,s=n.state,l=s.endX,f=s.endY,p=St(c.moveCanvasPointByHtml([l,f],e,r),2),y=p[0],h=p[1];n.setState({endX:y,endY:h}),a.updateAdjustAnchor({x:y,y:h},u)},n.onDragEnd=function(){var t=n.state,e=t.endX,r=t.endY,o=n.props,i=o.bezierModel,a=o.type;i.updateAdjustAnchor({x:e,y:r},a)},n.dragHandler=Object(c.b)({onDraging:n.onDraging,onDragEnd:n.onDragEnd});var o=t.position;return n.state={endX:o.x,endY:o.y},n}return At(r,[{key:"render",value:function(){var t,e,r,o=this.props.position,i=o.x,a=o.y,u=null===(t=this.props)||void 0===t||null===(e=t.graphModel)||void 0===e||null===(r=e.theme)||void 0===r?void 0:r.bezier,c=u.adjustAnchorStroke,s=u.adjustAnchorFill,l=u.adjustAnchorFillOpacity;return Object(n.g)(xt.a,{className:"lf-bezier-adjust-anchor",x:i,y:a,r:4,stroke:c,fill:s,fillOpacity:l,onMouseDown:this.dragHandler})}}]),r}(n.a),zt=Object(b.observer)(_t=function(t){Tt(r,t);var e=Nt(r);function r(){return kt(this,r),e.apply(this,arguments)}return At(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,o=St(Object(pt.d)(r),4),i=o[0],a=o[1],u=o[2],c=o[3],s=e.theme.bezier.adjustLineColor,l=[];return l.push(Object(n.g)(rt.a,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,stroke:s})),l.push(Object(n.g)(Lt,{position:a,bezierModel:t,graphModel:e,type:"sNext"})),l.push(Object(n.g)(rt.a,{x1:c.x,y1:c.y,x2:u.x,y2:u.y,stroke:s})),l.push(Object(n.g)(Lt,{position:u,bezierModel:t,graphModel:e,type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,r=[],n=0;n<e.length;n++){var o=e[n];o.isSelected&&o.modelType===u.e.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(n.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(n.a))||_t;function Bt(t){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xt(){return(Xt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ut(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 Yt(t,e){return(Yt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Gt(t);if(e){var o=Gt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ft(this,r)}}function Ft(t,e){return!e||"object"!==Bt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Gt(t){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wt=Object(o.b)("graphModel")(It=Object(b.observer)(It=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Yt(t,e)}(u,t);var e,r,o,i=Vt(u);function u(){return Ht(this,u),i.apply(this,arguments)}return e=u,(r=[{key:"getComponent",value:function(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"canvas-overlay",i=this.props.getView,a=i(t.type);return Object(n.g)(a,{key:t.id,model:t,graphModel:e,overlay:o,eventCenter:r})}},{key:"render",value:function(){var t=this,e=this.InjectedProps,r=e.graphModel,o=e.tool,i=e.options,u=e.eventCenter,c=e.dnd,s=e.snaplineModel,l={};i.width&&(l.width="".concat(i.width,"px")),i.height&&(l.height="".concat(i.height,"px"));var f=r.fakerNode,p=r.editConfig.adjustEdge;return Object(n.g)("div",{className:"lf-graph",style:l},Object(n.g)(k,{graphModel:r,eventCenter:u,dnd:c},Object(n.g)("g",{className:"lf-base"},Object(a.a)(r.sortElements,(function(e){return t.getComponent(e,r,u)}))),f?this.getComponent(f,r,u):"",p?Object(n.g)(zt,{graphModel:r}):"",Object(n.g)(wt,{graphModel:r}),i.isSilentMode||!1===i.snapline?"":Object(n.g)(ft,{snaplineModel:s})),Object(n.g)(I,{graphModel:r,tool:o}),i.background&&Object(n.g)(F,{background:i.background}),i.grid&&Object(n.g)(tt,Xt({},i.grid,{graphModel:r})))}},{key:"InjectedProps",get:function(){return this.props}}])&&Ut(e.prototype,r),o&&Ut(e,o),u}(n.a))||It)||It,Kt=r(199),$t=r(67);function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Zt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(r),!0).forEach((function(e){Jt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Jt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qt(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)}}var te=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.nodeConfig=void 0,this.lf=void 0,this.options=void 0,this.fakerNode=void 0,this.stopDrag=function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)},this.dragEnter=function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(Zt(Zt({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))},this.onDragOver=function(t){if(t.preventDefault(),r.fakerNode){var e=r.clientToLocalPoint({x:t.clientX,y:t.clientY}),n=e.x,o=e.y;r.fakerNode.moveTo(n,o);var i=r.fakerNode.getData();r.lf.setNodeSnapLine(i)}return!1},this.onDragLeave=function(){r.fakerNode&&(console.log("leave"),r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)},this.onDrop=function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(Zt(Zt({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY})));t.preventDefault(),t.stopPropagation(),r.nodeConfig=null,r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null;var n=e.getData();r.lf.eventCenter.emit(u.d.NODE_DND_ADD,{data:n})}};var n=e.options,o=e.lf;this.lf=o,this.options=n}var e,r,n;return e=t,(r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=Object(Kt.a)(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,a=o.y;return{x:Object($t.b)(i,n),y:Object($t.b)(a,n)}}},{key:"startDrag",value:function(t){this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&Qt(e.prototype,r),n&&Qt(e,n),t}(),ee=r(117),re=r(9),ne=r(10),oe=r(86);var ie=function(t,e){return Object(oe.a)(t,e)};var ae=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},ue=r(241),ce=r(13),se=r(12),le=function(){return se.a.Date.now()},fe=r(60),pe=/^\s+|\s+$/g,ye=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,de=/^0o[0-7]+$/i,ve=parseInt;var be=function(t){if("number"==typeof t)return t;if(Object(fe.a)(t))return NaN;if(Object(ce.a)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Object(ce.a)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(pe,"");var r=he.test(t);return r||de.test(t)?ve(t.slice(2),r?2:8):ye.test(t)?NaN:+t},ge=Math.max,me=Math.min;var Oe=function(t,e,r){var n,o,i,a,u,c,s=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function h(t){return s=t,u=setTimeout(v,e),l?y(t):a}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=le();if(d(t))return b(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?me(r,i-(t-s)):r}(t))}function b(t){return u=void 0,p&&n?y(t):(n=o=void 0,a)}function g(){var t=le(),r=d(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return h(c);if(f)return clearTimeout(u),u=setTimeout(v,e),y(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=be(e)||0,Object(ce.a)(r)&&(l=!!r.leading,i=(f="maxWait"in r)?ge(be(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:b(le())},g},je=r(200);function _e(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)}}var we,xe=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.undos=[],this.redos=[],this.callbacks=[],this.stopWatch=null,this.curData=null,this.maxSize=50,this.waitTime=100,this.eventCenter=void 0,this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){ie(ae(this.undos),t)||(this.undos.push(t),ie(this.curData,t)||(this.redos=[]),this.eventCenter.emit(u.d.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var t=this.undos.pop();this.redos.push(t);var e=this.undos.pop();return this.curData=Object(ue.a)(e),e}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=Object(ue.a)(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(je.a)(t,Oe((function(){var r=t.modelToGraphData();e.add(r)}),this.waitTime))}}])&&_e(e.prototype,r),n&&_e(e,n),t}();r(237);function Ee(t){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Se(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pe(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ke(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 De(t,e){return(De=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ae(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Me(t);if(e){var o=Me(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Te(this,r)}}function Te(t,e){return!e||"object"!==Ee(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Me(t){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ne,Ce=Object(b.observer)(we=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&De(t,e)}(a,t);var e,r,o,i=Ae(a);function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this)).ref=Object(n.f)(),t.__prevText={text:"",id:""},t.keyupHandler=function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;13===e.keyCode&&e.altKey&&n.setElementState(0),t.__prevText={text:r,id:n.id}},t.state={style:{left:0,top:0}},t}return e=a,o=[{key:"getDerivedStateFromProps",value:function(t){var e=t.graphModel,r=e.transformMatrix,n=e.textEditElement;if(n){var o;if(null===(o=n.text)||void 0===o||!o.value)if(n.BaseType===u.c.EDGE){var i=(n=n).text,a=n.textPosition,c=a.x,s=a.y;i.x=c,i.y=s,n.setText(i)}else n=n;var l=n.text,f=l.x,p=l.y,y=Se(r.CanvasPointToHtmlPoint([f,p]),2);return{style:{left:y[0],top:y[1]}}}}}],(r=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current))}},{key:"componentDidUpdate",value:function(){var t=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){var e=this.__prevText,r=e.text,n=e.id;t.setElementTextById(n,r),this.__prevText.id="",this.__prevText.text=""}}},{key:"placeCaretAtEnd",value:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var r=window.getSelection();r.removeAllRanges(),r.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,r=this.state.style;return e?Object(n.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&ke(e.prototype,r),o&&ke(e,o),a}(n.a))||we,Re=(r(93),r(94),r(160),function(t){return t.modelType===u.e.LINE_EDGE?function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,a=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-a/2,x1:n+i/2,y1:o+a/2}}(t):t.modelType===u.e.POLYLINE_EDGE?function(t){var e=t.points,r=Object(pt.n)(e),n=Object(pt.b)(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):t.modelType===u.e.BEZIER_EDGE?function(t){var e=t.path,r=Object(pt.d)(e),n=Object(pt.b)(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):void 0});function Ie(t){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Le(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ze(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ze(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Be(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 Xe(t,e){return(Xe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function He(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ye(t);if(e){var o=Ye(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ue(this,r)}}function Ue(t,e){return!e||"object"!==Ie(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ye(t){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ve=Object(b.observer)(Ne=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xe(t,e)}(a,t);var e,r,o,i=He(a);function a(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this)).stepDrag=void 0,e.handleMouseDown=function(t){e.stepDrag.handleMouseDown(t)},e.onDragStart=function(){},e.onDraging=function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel;o.moveElements(o.getSelectElements(!0),r,n)},e.onDragEnd=function(){};var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new c.a({onDragStart:e.onDragStart,onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:r,eventType:"multiple:select",eventCenter:n}),e}return e=a,(r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.selectElementSize,o=t.transformMatrix;if(r>1){var i=Number.MAX_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===u.c.NODE&&(e=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{x:e-n/2,y:r-o/2,x1:e+n/2,y1:r+o/2}}(t)),t.BaseType===u.c.EDGE&&(e=Re(t)),i=Math.min(i,e.x),a=Math.min(a,e.y),c=Math.max(c,e.x1),s=Math.max(s,e.y1)}));var l=Le(o.CanvasPointToHtmlPoint([i,a]),2);i=l[0],a=l[1];var f=Le(o.CanvasPointToHtmlPoint([c,s]),2);c=f[0],s=f[1];var p={left:"".concat(i-10,"px"),top:"".concat(a-10,"px"),width:"".concat(c-i+20,"px"),height:"".concat(s-a+20,"px")};return Object(n.g)("div",{className:"lf-multiple-select",style:p,onMouseDown:this.handleMouseDown})}}}])&&Be(e.prototype,r),o&&Be(e,o),a}(n.a))||Ne;function Fe(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)}}var Ge=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tools=void 0,this.components=void 0,this.toolMap=new Map,this.instance=void 0,this.instance=e,this.registerTool("textEdit",Ce),this.registerTool("multipleSelect",Ve)}var e,r,n;return e=t,(r=[{key:"registerTool",value:function(t,e){this.toolMap.set(t,e)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&Fe(e.prototype,r),n&&Fe(e,n),t}();r(111);function We(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)}}var Ke=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events={}}var e,r,n;return e=t,(r=[{key:"on",value:function(t,e,r){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!r}),this}},{key:"once",value:function(t,e){return this.on(t,e,!0)}},{key:"emit",value:function(t,e){var r=this,n=this._events[t]||[],o=this._events["*"]||[],i=function(n){for(var o=n.length,i=0;i<o;i++)if(n[i]){var a=n[i],u=a.callback;a.once&&(n.splice(i,1),0===n.length&&delete r._events[t],o--,i--),u.apply(r,[e])}};i(n),i(o)}},{key:"off",value:function(t,e){if(t)if(e){for(var r=this._events[t]||[],n=r.length,o=0;o<n;o++)r[o].callback===e&&(r.splice(o,1),n--,o--);0===r.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this}},{key:"getEvents",value:function(){return this._events}}])&&We(e.prototype,r),n&&We(e,n),t}(),$e=r(119),qe=r(28),Ze=null;function Je(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Qe(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach((function(t){t.x+=e,t.y+=e})),t.text&&(t.text.x+=e,t.text.y+=e),t}var tr=r(118);function er(t){return(er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rr(Object(r),!0).forEach((function(e){or(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rr(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function or(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ir(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)}}var ar=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=void 0,this.width=void 0,this.height=void 0,this.graphModel=void 0,this.history=void 0,this.viewMap=new Map,this.tool=void 0,this.keyboard=void 0,this.dnd=void 0,this.options=void 0,this.getSnapshot=void 0,this.eventCenter=void 0,this.snaplineModel=void 0,this.components=[],this.adapterIn=void 0,this.adapterOut=void 0,this.getView=function(t){return r.viewMap.get(t)};var n,o,a=e.container,u=e.width,c=e.height,s=e.dndOptions,l=e.keyboard,f=e.isSilentMode,p=e.snapline;this.options=ee.b(e),this.container=a,this.width=u||a.getBoundingClientRect().width,this.height=c||a.getBoundingClientRect().height,this.tool=new Ge(this),this.eventCenter=new Ke,this.history=new xe(this.eventCenter),this.dnd=new te({options:s,lf:this}),this.keyboard=new $e.b({lf:this,keyboard:l}),this.graphModel=new i.b(nr(nr({},this.options),{},{eventCenter:this.eventCenter,rootEl:this.container,width:this.width,height:this.height})),f||!1===p||(this.snaplineModel=new tr.b(this.graphModel),n=this.eventCenter,o=this.snaplineModel,n.on("node:mousemove",(function(t){var e=t.data;o.setNodeSnapLine(e)})),n.on("node:mouseup",(function(){o.clearSnapline()}))),this.defaultRegister(),this.installPlugins(e.disabledPlugins),function(t,e){var r=t.keyboard,n=r.options.keyboard;r.on(["cmd + c","ctrl + c"],(function(){if(n.enabled&&!e.textEditElement){var r=t.options.guards,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)||((Ze=o).nodes.forEach((function(t){return Je(t,40)})),Ze.edges.forEach((function(t){return Qe(t,40)}))),!1}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(Ze&&(Ze.nodes||Ze.edges)){t.clearSelectElements();var r=t.addElements(Ze);if(!r)return;r.nodes.forEach((function(e){return t.select(e.id,!0)})),r.edges.forEach((function(e){return t.select(e.id,!0)})),Ze.nodes.forEach((function(t){return Je(t,40)})),Ze.edges.forEach((function(t){return Qe(t,40)}))}return!1}})),r.on(["cmd + z","ctrl + z"],(function(){if(n.enabled&&!e.textEditElement)return t.undo(),!1})),r.on(["cmd + y","ctrl + y"],(function(){if(n.enabled&&!e.textEditElement)return t.redo(),!1})),r.on(["backspace"],(function(){if(n.enabled&&!e.textEditElement){var r=e.getSelectElements(!0);return t.clearSelectElements(),r.edges.forEach((function(e){return t.deleteEdge(e.id)})),r.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}}))}(this,this.graphModel),this.keyboard.initShortcuts()}var e,r,a;return e=t,a=[{key:"use",value:function(t){var e=this.extensions.get(t.name);e&&e.destroy&&e.destroy(),this.extensions.set(t.name,t)}}],(r=[{key:"on",value:function(t,e){this.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.eventCenter.off(t,e)}},{key:"emit",value:function(t,e){this.eventCenter.emit(t,e)}},{key:"installPlugins",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.extensions.forEach((function(t){-1===r.indexOf(t.name)&&e.__installPlugin(t)}))}},{key:"__installPlugin",value:function(e){if("object"===er(e)){var r=e.install,n=e.render;return r&&r.call(e,this,t),void(n&&this.components.push(n.bind(e)))}var o=new e({lf:this,LogicFlow:t});o.render&&this.components.push(o.render)}},{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var i={BaseEdge:ne.b,BaseEdgeModel:re.BaseEdgeModel,BaseNode:ne.c,BaseNodeModel:re.BaseNodeModel,RectNode:ne.k,RectNodeModel:re.RectNodeModel,CircleNode:ne.e,CircleNodeModel:re.CircleNodeModel,PolygonNode:ne.i,PolygonNodeModel:re.PolygonNodeModel,TextNode:ne.l,TextNodeModel:re.TextNodeModel,LineEdge:ne.h,LineEdgeModel:re.LineEdgeModel,DiamondNode:ne.f,DiamondNodeModel:re.DiamondNodeModel,PolylineEdge:ne.j,PolylineEdgeModel:re.PolylineEdgeModel,BezierEdge:ne.d,BezierEdgeModel:re.BezierEdgeModel,EllipseNode:ne.g,EllipseNodeModel:re.EllipseNodeModel,h:n.g,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(i[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(i[e]=t)}));var a=e(i),u=a.view,c=a.model,s=u;r&&!s.isObervered&&(s.isObervered=!0,s=Object(o.c)(s)),this.setView(t,s),this.graphModel.setModel(t,c)}else this._registerElement(t)}},{key:"_registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=Object(o.c)(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"defaultRegister",value:function(){this._registerElement({view:ne.k,model:re.RectNodeModel,type:"rect"}),this._registerElement({type:"circle",view:ne.e,model:re.CircleNodeModel}),this._registerElement({type:"polygon",view:ne.i,model:re.PolygonNodeModel}),this._registerElement({type:"line",view:ne.h,model:re.LineEdgeModel}),this._registerElement({type:"polyline",view:ne.j,model:re.PolylineEdgeModel}),this._registerElement({type:"bezier",view:ne.d,model:re.BezierEdgeModel}),this._registerElement({type:"text",view:ne.l,model:re.TextNodeModel}),this._registerElement({type:"ellipse",view:ne.g,model:re.EllipseNodeModel}),this._registerElement({type:"diamond",view:ne.f,model:re.DiamondNodeModel})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=Object(qe.a)(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=Object(qe.a)(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.graphModel.transformMatrix;return e.zoom(t),"".concat(100*e.SCALE_X,"%")}},{key:"resetZoom",value:function(){this.graphModel.transformMatrix.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformMatrix.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformMatrix.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformMatrix;return{SCALE_X:t.SCALE_X,SCALE_Y:t.SCALE_Y,TRANSLATE_X:t.TRANSLATE_X,TRANSLATE_Y:t.TRANSLATE_Y}}},{key:"translate",value:function(t,e){this.graphModel.transformMatrix.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformMatrix,e=t.TRANSLATE_X,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{key:"select",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformMatrix,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModel(n);o&&(r=o.getData());var i=this.getEdgeModelById(n);i&&(r=i.textPosition)}var a=r,u=a.x,c=a.y;e.focusOn(u,c,this.width,this.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"setDefaultEdgeType",value:function(t){this.options.edgeType=t,this.graphModel.changeEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.setElementTextById(t,e)}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){return this.graphModel.addNode(t)}},{key:"deleteNode",value:function(t){var e=this.graphModel.getNodeModel(t).getData(),r=this.options.guards;(!r||!r.beforeDelete||r.beforeDelete(e))&&this.graphModel.deleteNode(t)}},{key:"editNodeText",value:function(t){this.graphModel.setTextEditable(t)}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModel(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"createEdge",value:function(t){this.graphModel.createEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,r=this.graphModel.edgesMap[t];if(r){var n=r.model.getData();(!e||!e.beforeDelete||e.beforeDelete(n))&&this.graphModel.removeEdgeById(t)}else console.warn("不存在id为".concat(t,"的边"))}},{key:"removeEdge",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.removeEdge(e,r):e?this.graphModel.removeEdgeBySource(e):r&&this.graphModel.removeEdgeByTarget(r)}},{key:"getEdge",value:function(t){var e=this.graphModel,r=e.edges,n=e.edgesMap,o=t.id,i=t.sourceNodeId,a=t.targetNodeId;if(o)return n[o]?[n[o].model]:void console.warn("不存在id为".concat(o,"的边"));if(i&&a){var u=[];return r.forEach((function(t){t.sourceNodeId===i&&t.targetNodeId===a&&u.push(t)})),u}if(i){var c=[];return r.forEach((function(t){t.sourceNodeId===i&&c.push(t)})),c}if(a){var s=[];return r.forEach((function(t){t.targetNodeId===a&&s.push(t)})),s}return[]}},{key:"getNodeModel",value:function(t){return this.graphModel.getNodeModel(t)}},{key:"getNodeData",value:function(t){return this.graphModel.getNodeModel(t).getData()}},{key:"setNodeData",value:function(t){var e=t.id;this.graphModel.getNodeModel(e).updateData(t)}},{key:"getEdgeData",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"setEdgeData",value:function(t){var e,r=t.id;return null===(e=this.getEdgeModelById(r))||void 0===e?void 0:e.updateData(t)}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(t):t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(Object(qe.a)(e))}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfig.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfig.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.graphModel.getSelectElements(t)}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"addElements",value:function(t){for(var e=this,r=t.nodes,n=t.edges,o={},i={nodes:[],edges:[]},a=0;a<r.length;a++){var u=r[a],c=u.id,s=this.addNode(u);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return n.forEach((function(t){var r=t.sourceNodeId,n=t.targetNodeId;o[r]&&(t.sourceNodeId=o[r]),o[n]&&(t.targetNodeId=o[n]);var a=e.graphModel.createEdge(t);i.edges.push(a)})),i}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var r=new e(t,this.graphModel);return this.graphModel.setFakerNode(r),r}console.warn("不存在为".concat(t.type,"类型的节点"))}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"getAreaElement",value:function(t,e){return this.graphModel.getAreaElement(t,e).map((function(t){return t.getData()}))}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.graphModel.graphDataToModel(Object(qe.a)(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Object(n.j)(Object(n.g)(o.a,{graphModel:this.graphModel},Object(n.g)(Wt,{eventCenter:this.eventCenter,getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,components:this.components})),this.container)}}])&&ir(e.prototype,r),a&&ir(e,a),t}();ar.extensions=new Map},function(t,e,r){"use strict";r.d(e,"a",(function(){return W}));r(219),r(22),r(71),r(38),r(220),r(111),r(109),r(24),r(72),r(186),r(110),r(23),r(78);var n=r(0),o=r(242),i=r(114),a=r(115),u=r(2),c=(r(189),r(241)),s=r(8);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var y=function(t){var e=Object(c.a)(s.a);return t&&Object.keys(t).forEach((function(r){e[r]=f(f({},e[r]),t[r])})),e},h=r(67);function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var b,g,m,O,j,_,w,x,E,S,P,k,D,A,T,M,N,C,R=function(t,e,r){var n=d(t,2),o=n[0],i=n[1],a=d(e,2),u=a[0],c=a[1],s=d(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},I=r(5),L=r(28),z=r(3);function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function X(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?B(Object(r),!0).forEach((function(e){H(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function H(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function V(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function F(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 G(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var W=(g=G((b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.BaseType=u.c.GRAPH,this.modelType=u.e.GRAPH,this.rootEl=void 0,this.theme=void 0,this.eventCenter=void 0,this.modelMap=new Map,this.width=void 0,this.height=void 0,this.topElement=void 0,this.selectElement=void 0,this.selectElements=new Map,V(this,"selectElementSize",g,this),V(this,"edgeType",m,this),V(this,"nodes",O,this),V(this,"activeElement",j,this),V(this,"activeElementState",_,this),V(this,"state",w,this),V(this,"additionStateData",x,this),V(this,"edges",E,this),V(this,"isSlient",S,this),V(this,"plugins",P,this),V(this,"tools",k,this),V(this,"background",D,this),V(this,"transformMatrix",A,this),V(this,"editConfig",T,this),V(this,"gridSize",M,this),V(this,"partial",N,this),V(this,"fakerNode",C,this);var r=e.container,n=e.background,o=void 0===n?{}:n,a=e.grid,c=(a=void 0===a?{}:a).size,s=void 0===c?1:c,l=e.isSilentMode,f=void 0!==l&&l,p=e.eventCenter;this.background=o,this.isSlient=f,this.gridSize=s,this.rootEl=r,this.editConfig=new i.b(e),this.eventCenter=p,this.theme=y(e.style),this.edgeType=e.edgeType||"polyline",this.width=e.width,this.height=e.height,this.partial=e.partial}var e,r,n;return e=t,(r=[{key:"getAreaElement",value:function(t,e){var r=[],n=[];this.nodes.forEach((function(t){return n.push(t)})),this.edges.forEach((function(t){return n.push(t)}));for(var o=0;o<n.length;o++){var i=n[o];this.isElementInArea(i,t,e)&&r.push(i)}return r}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModel",value:function(t){var e;return null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}},{key:"getPointByClient",value:function(t){var e=t.x,r=t.y,n=this.rootEl.getBoundingClientRect(),o={x:e-n.left,y:r-n.top},i=U(this.transformMatrix.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.BaseType===u.c.NODE){var o=t=t,i=o.x,a=o.y,c=this.transformMatrix.CanvasPointToHtmlPoint([i,a]),s=U(c,2);if(i=s[0],a=s[1],R([i,a],e,r))return!0}if(t.BaseType===u.c.EDGE){var l=t=t,f=l.startPoint,p=l.endPoint,y=this.transformMatrix.CanvasPointToHtmlPoint([f.x,f.y]),h=this.transformMatrix.CanvasPointToHtmlPoint([p.x,p.y]),d=R(y,e,r),v=R(h,e,r);return n?d&&v:d||v}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=Object(o.a)(t.nodes,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的节点。"));var n=t.x,o=t.y;return n&&o&&(t.x=Object(h.b)(n,e.gridSize),t.y=Object(h.b)(o,e.gridSize),"[object Object]"===Object.prototype.toString.call(t.text)&&(t.text.x-=Object(h.a)(n,e.gridSize),t.text.y-=Object(h.a)(o,e.gridSize))),new r(t,e)})),this.edges=Object(o.a)(t.edges,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的边。"));return new r(t,e)}))}},{key:"modelToGraphData",value:function(){var t=this.edges.map((function(t){return t.getData()}));return{nodes:this.nodes.map((function(t){return t.getData()})),edges:t}}},{key:"getEdgeModel",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){var e=this.getNodeModel(t);return e||this.getEdgeModel(t)}},{key:"getNodeEdges",value:function(t){for(var e=[],r=0;r<this.edges.length;r++){var n=this.edges[r],o=this.edges[r].sourceNodeId===t,i=this.edges[r].targetNodeId===t;(o||i)&&e.push(n)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,r={nodes:[],edges:[]};return e.forEach((function(n){if(n.BaseType===u.c.NODE&&r.nodes.push(n.getData()),n.BaseType===u.c.EDGE){var o=n.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&r.edges.push(o)}})),r}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"updateEdgeByIndex",value:function(t,e){this.edges[t]=X(X({},this.edges[t]),e)}},{key:"toFront",value:function(t){var e,r,n,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);o&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),this.topElement=o,o.setZIndex(u.a))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.removeEdgeBySource(t),this.removeEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(u.d.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=Object(L.a)(t);e.id&&this.nodesMap[t.id]&&delete e.id;var r=this.getModel(e.type);if(!r)throw new Error("找不到".concat(e.type,"对应的节点,请确认是否已注册此类型节点。"));var n=new r(e,this);this.nodes.push(n);var o=n.getData();return this.eventCenter.emit(u.d.NODE_ADD,{data:o}),n}},{key:"cloneNode",value:function(t){var e=this.getNodeModel(t),r=e.getData();r.x+=30,r.y+=30,delete r.id,r.text&&(r.text.x+=30,r.text.y+=30);var n=this.addNode(r);return n.setSelected(!0),e.setSelected(!1),n.getData()}},{key:"moveNode",value:function(t,e,r){var n=this.nodesMap[t];n?(n.model.move(e,r),this.moveEdge(t,e,r)):console.warn("不存在id为".concat(t,"的节点"))}},{key:"setTextEditable",value:function(t){this.setElementStateById(t,u.b.TEXT_EDIT)}},{key:"createEdge",value:function(t){var e=Object(L.a)(t),r=e.type;r||(r=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var n=this.getModel(r);if(!n)throw new Error("找不到".concat(r,"对应的连线,请确认是否已注册此类型连线。"));var o=new n(X(X({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(u.d.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,r){for(var n=0;n<this.edges.length;n++){var o,i=this.edges[n],a=i.textPosition,c=a.x,s=a.y,l=this.edges[n].sourceNodeId===t,f=this.edges[n].targetNodeId===t;if(l&&i.updateStartPoint({x:i.startPoint.x+e,y:i.startPoint.y+r}),f&&i.updateEndPoint({x:i.endPoint.x+e,y:i.endPoint.y+r}),l||f)if(i.modelType===u.e.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var p=i.text,y=Object(I.f)(p,i.points);i.moveText(y.x-p.x,y.y-p.y)}else{var h=i.textPosition,d=h.x,v=h.y;i.moveText(d-c,v-s)}}}},{key:"removeEdge",value:function(t,e){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===t&&this.edges[r].targetNodeId===e){var n=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(u.d.EDGE_DELETE,{data:n})}}},{key:"removeEdgeById",value:function(t){var e=this.edgesMap[t].index;if(this.edgesMap[t]){var r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(u.d.EDGE_DELETE,{data:r})}else console.warn("不存在id为".concat(t,"的边"))}},{key:"removeEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(u.d.EDGE_DELETE,{data:r})}}},{key:"removeEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(u.d.EDGE_DELETE,{data:r})}}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"setElementStateById",value:function(t,e,r){this.resetElementState(),this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(u.b.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(u.b.DEFAULT)}))}},{key:"setElementTextById",value:function(t,e){this.nodes.forEach((function(r){r.id===t&&r.updateText(e)})),this.edges.forEach((function(r){r.id===t&&r.updateText(e)}))}},{key:"resetElementState",value:function(){}},{key:"selectNodeById",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o||(null===(n=this.selectElement)||void 0===n||n.setSelected(!1),this.clearSelectElements()),this.selectElement=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model,null===(r=this.selectElement)||void 0===r||r.setSelected(!0),this.selectElements.set(t,this.selectElement),this.selectElementSize=this.selectElements.size}},{key:"selectEdgeById",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o||(null===(n=this.selectElement)||void 0===n||n.setSelected(!1),this.clearSelectElements()),this.selectElement=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model,null===(r=this.selectElement)||void 0===r||r.setSelected(!0),this.selectElements.set(t,this.selectElement),this.selectElementSize=this.selectElements.size}},{key:"selectElementById",value:function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||(null===(r=this.selectElement)||void 0===r||r.setSelected(!1),this.clearSelectElements()),this.selectElement=this.getElement(t),null===(e=this.selectElement)||void 0===e||e.setSelected(!0),this.selectElements.set(t,this.selectElement),this.selectElementSize=this.selectElements.size}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),null===(t=this.topElement)||void 0===t||t.setZIndex(),this.selectElementSize=this.selectElements.size}},{key:"moveElements",value:function(t,e,r){var n=this;t.nodes.forEach((function(t){return n.moveNode(t.id,e,r)}))}},{key:"changeEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,e){var r=this.getNodeModel(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var r=Object(z.g)(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=Object(z.g)(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}else console.warn("找不到id为".concat(t,"的节点"))}},{key:"setTheme",value:function(t){this.theme=y(X(X({},this.theme),t))}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)}));for(var e=[],r=-1,n=[-200,-200],o=[this.width+200,this.height+200],i=0;i<t.length;i++){var a=t[i];this.partial&&!this.isElementInArea(a,n,o,!1)||(a.zIndex===u.a&&(r=e.length),e.push(a))}if(-1!==r){var c=e[e.length-1];e[e.length-1]=e[r],e[r]=c}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===u.b.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===u.b.TEXT_EDIT}));return t||e}}])&&F(e.prototype,r),n&&F(e,n),t}()).prototype,"selectElementSize",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),m=G(b.prototype,"edgeType",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=G(b.prototype,"nodes",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),j=G(b.prototype,"activeElement",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_=G(b.prototype,"activeElementState",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=G(b.prototype,"state",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),x=G(b.prototype,"additionStateData",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),E=G(b.prototype,"edges",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),S=G(b.prototype,"isSlient",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),P=G(b.prototype,"plugins",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),k=G(b.prototype,"tools",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),D=G(b.prototype,"background",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=G(b.prototype,"transformMatrix",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new a.a}}),T=G(b.prototype,"editConfig",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=G(b.prototype,"gridSize",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),N=G(b.prototype,"partial",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),C=G(b.prototype,"fakerNode",[n.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G(b.prototype,"nodesMap",[n.m],Object.getOwnPropertyDescriptor(b.prototype,"nodesMap"),b.prototype),G(b.prototype,"edgesMap",[n.m],Object.getOwnPropertyDescriptor(b.prototype,"edgesMap"),b.prototype),G(b.prototype,"sortElements",[n.m],Object.getOwnPropertyDescriptor(b.prototype,"sortElements"),b.prototype),G(b.prototype,"textEditElement",[n.m],Object.getOwnPropertyDescriptor(b.prototype,"textEditElement"),b.prototype),G(b.prototype,"setFakerNode",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"setFakerNode"),b.prototype),G(b.prototype,"removeFakerNode",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"removeFakerNode"),b.prototype),G(b.prototype,"setModel",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"setModel"),b.prototype),G(b.prototype,"updateEdgeByIndex",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"updateEdgeByIndex"),b.prototype),G(b.prototype,"toFront",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"toFront"),b.prototype),G(b.prototype,"deleteNode",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"deleteNode"),b.prototype),G(b.prototype,"addNode",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"addNode"),b.prototype),G(b.prototype,"cloneNode",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"cloneNode"),b.prototype),G(b.prototype,"moveNode",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"moveNode"),b.prototype),G(b.prototype,"setTextEditable",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"setTextEditable"),b.prototype),G(b.prototype,"createEdge",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"createEdge"),b.prototype),G(b.prototype,"moveEdge",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"moveEdge"),b.prototype),G(b.prototype,"removeEdge",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"removeEdge"),b.prototype),G(b.prototype,"removeEdgeById",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"removeEdgeById"),b.prototype),G(b.prototype,"removeEdgeBySource",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"removeEdgeBySource"),b.prototype),G(b.prototype,"removeEdgeByTarget",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"removeEdgeByTarget"),b.prototype),G(b.prototype,"setElementState",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"setElementState"),b.prototype),G(b.prototype,"setElementStateById",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"setElementStateById"),b.prototype),G(b.prototype,"setElementTextById",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"setElementTextById"),b.prototype),G(b.prototype,"resetElementState",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"resetElementState"),b.prototype),G(b.prototype,"selectNodeById",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"selectNodeById"),b.prototype),G(b.prototype,"selectEdgeById",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"selectEdgeById"),b.prototype),G(b.prototype,"selectElementById",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"selectElementById"),b.prototype),G(b.prototype,"clearSelectElements",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"clearSelectElements"),b.prototype),G(b.prototype,"moveElements",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"moveElements"),b.prototype),G(b.prototype,"changeEdgeType",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"changeEdgeType"),b.prototype),G(b.prototype,"changeNodeType",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"changeNodeType"),b.prototype),G(b.prototype,"setTheme",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"setTheme"),b.prototype),G(b.prototype,"clearData",[n.k],Object.getOwnPropertyDescriptor(b.prototype,"clearData"),b.prototype),b);e.b=W},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(97))},function(t,e,r){"use strict";var n=r(40),o=r(13);e.a=function(t){if(!Object(o.a)(t))return!1;var e=Object(n.a)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,r){"use strict";var n=r(89);e.a=function(t,e,r){"__proto__"==e&&n.a?Object(n.a)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){"use strict";e.a=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){"use strict";e.a=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},function(t,e,r){"use strict";e.a=function(){return[]}},function(t,e,r){"use strict";var n=r(83),o=r(7);e.a=function(t,e,r){var i=e(t);return Object(o.a)(t)?i:Object(n.a)(i,r(t))}},function(t,e,r){"use strict";var n=function(t){return function(){return t}},o=r(89),i=r(80),a=o.a?function(t,e){return Object(o.a)(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i.a,u=Date.now;var c=function(t){var e=0,r=0;return function(){var n=u(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(a);e.a=c},function(t,e,r){"use strict";var n=function(t,e){return null!=t&&e in Object(t)},o=r(62),i=r(87),a=r(7),u=r(56),c=r(81),s=r(43);var l=function(t,e,r){for(var n=-1,l=(e=Object(o.a)(e,t)).length,f=!1;++n<l;){var p=Object(s.a)(e[n]);if(!(f=null!=t&&r(t,p)))break;t=t[p]}return f||++n!=l?f:!!(l=null==t?0:t.length)&&Object(c.a)(l)&&Object(u.a)(p,l)&&(Object(a.a)(t)||Object(i.a)(t))};e.a=function(t,e){return null!=t&&l(t,e,n)}},function(t,e,r){"use strict";var n=r(40),o=r(81),i=r(25),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var u=function(t){return Object(i.a)(t)&&Object(o.a)(t.length)&&!!a[Object(n.a)(t)]},c=r(82),s=r(50),l=s.a&&s.a.isTypedArray,f=l?Object(c.a)(l):u;e.a=f},function(t,e,r){"use strict";var n=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},o=r(87),i=r(7),a=r(73),u=r(56),c=r(131),s=Object.prototype.hasOwnProperty;e.a=function(t,e){var r=Object(i.a)(t),l=!r&&Object(o.a)(t),f=!r&&!l&&Object(a.a)(t),p=!r&&!l&&!f&&Object(c.a)(t),y=r||l||f||p,h=y?n(t.length,String):[],d=h.length;for(var v in t)!e&&!s.call(t,v)||y&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||Object(u.a)(v,d))||h.push(v);return h}},function(t,e,r){"use strict";var n=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},o=Math.max;e.a=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a<u;)c[a]=i[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=i[a];return s[e]=r(c),n(t,this,s)}}},function(t,e,r){var n=r(20),o=r(47);t.exports=function(t,e){try{o(n,t,e)}catch(r){n[t]=e}return e}},function(t,e,r){var n=r(20),o=r(134),i=n["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,r){var n=r(165),o=r(138),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports=!1},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+n).toString(36)}},function(t,e,r){var n=r(77),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var n=r(11),o=/#|\.prototype\./,i=function(t,e){var r=u[a(t)];return r==s||r!=c&&("function"==typeof e?n(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,r){var n=r(34),o=r(171),i=r(18)("species");t.exports=function(t,e){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?n(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},function(t,e,r){"use strict";var n=r(6),o=r(168).indexOf,i=r(106),a=r(70),u=[].indexOf,c=!!u&&1/[1].indexOf(1,-0)<0,s=i("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:c||!s||!l},{indexOf:function(t){return c?u.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(18),o=r(107),i=r(35),a=n("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,e,r){var n=r(167),o=r(140);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){"use strict";var n=r(6),o=r(209),i=r(148),a=r(150),u=r(149),c=r(47),s=r(53),l=r(18),f=r(137),p=r(92),y=r(173),h=y.IteratorPrototype,d=y.BUGGY_SAFARI_ITERATORS,v=l("iterator"),b=function(){return this};t.exports=function(t,e,r,l,y,g,m){o(r,e,l);var O,j,_,w=function(t){if(t===y&&k)return k;if(!d&&t in S)return S[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},x=e+" Iterator",E=!1,S=t.prototype,P=S[v]||S["@@iterator"]||y&&S[y],k=!d&&P||w(y),D="Array"==e&&S.entries||P;if(D&&(O=i(D.call(new t)),h!==Object.prototype&&O.next&&(f||i(O)===h||(a?a(O,h):"function"!=typeof O[v]&&c(O,v,b)),u(O,x,!0,!0),f&&(p[x]=b))),"values"==y&&P&&"values"!==P.name&&(E=!0,k=function(){return P.call(this)}),f&&!m||S[v]===k||c(S,v,k),p[e]=k,y)if(j={values:w("values"),keys:g?k:w("keys"),entries:w("entries")},m)for(_ in j)(d||E||!(_ in S))&&s(S,_,j[_]);else n({target:e,proto:!0,forced:d||E},j);return j}},function(t,e,r){var n=r(31),o=r(37),i=r(136),a=r(174),u=i("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),n(t,u)?t[u]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,r){var n=r(35).f,o=r(31),i=r(18)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(26),o=r(210);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return n(r),o(i),e?t.call(r,i):r.__proto__=i,r}}():void 0)},function(t,e,r){var n,o,i=r(20),a=r(211),u=i.process,c=u&&u.versions,s=c&&c.v8;s?o=(n=s.split("."))[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=n[1]),t.exports=o&&+o},function(t,e,r){var n={};n[r(18)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){"use strict";var n=r(100),o=r(35),i=r(99);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";r(79);var n=r(53),o=r(11),i=r(18),a=r(112),u=r(47),c=i("species"),s=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),f=i("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),y=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,e,r,f){var h=i(t),d=!o((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),v=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return e=!0,null},r[h](""),!e}));if(!d||!v||"replace"===t&&(!s||!l||p)||"split"===t&&!y){var b=/./[h],g=r(h,""[t],(function(t,e,r,n,o){return e.exec===a?d&&!o?{done:!0,value:b.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),m=g[0],O=g[1];n(String.prototype,t,m),n(RegExp.prototype,h,2==e?function(t,e){return O.call(t,this,e)}:function(t){return O.call(t,this)})}f&&u(RegExp.prototype[h],"sham",!0)}},function(t,e,r){"use strict";var n=r(184).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(69),o=r(112);t.exports=function(t,e){var r=t.exec;if("function"==typeof r){var i=r.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,r){"use strict";var n=r(155),o=r(227),i=r(26),a=r(46),u=r(228),c=r(156),s=r(36),l=r(157),f=r(112),p=r(11),y=[].push,h=Math.min,d=!p((function(){return!RegExp(4294967295,"y")}));n("split",2,(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=String(a(this)),i=void 0===r?4294967295:r>>>0;if(0===i)return[];if(void 0===t)return[n];if(!o(t))return e.call(n,t,i);for(var u,c,s,l=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,d=new RegExp(t.source,p+"g");(u=f.call(d,n))&&!((c=d.lastIndex)>h&&(l.push(n.slice(h,u.index)),u.length>1&&u.index<n.length&&y.apply(l,u.slice(1)),s=u[0].length,h=c,l.length>=i));)d.lastIndex===u.index&&d.lastIndex++;return h===n.length?!s&&d.test("")||l.push(""):l.push(n.slice(h)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=a(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(String(o),e,r)},function(t,o){var a=r(n,t,this,o,n!==e);if(a.done)return a.value;var f=i(t),p=String(this),y=u(f,RegExp),v=f.unicode,b=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(d?"y":"g"),g=new y(d?f:"^(?:"+f.source+")",b),m=void 0===o?4294967295:o>>>0;if(0===m)return[];if(0===p.length)return null===l(g,p)?[p]:[];for(var O=0,j=0,_=[];j<p.length;){g.lastIndex=d?j:0;var w,x=l(g,d?p:p.slice(j));if(null===x||(w=h(s(g.lastIndex+(d?0:j)),p.length))===O)j=c(p,j,v);else{if(_.push(p.slice(O,j)),_.length===m)return _;for(var E=1;E<=x.length-1;E++)if(_.push(x[E]),_.length===m)return _;j=O=w}}return _.push(p.slice(O)),_}]}),!d)},function(t,e,r){var n=r(6),o=r(229);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,r){r(6)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e,r){var n=r(30),o=r(11),i=r(163);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(20),o=r(34),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,r){var n=r(135),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},function(t,e,r){var n=r(137),o=r(135);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.1",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){var n=r(167),o=r(140).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(31),o=r(76),i=r(168).indexOf,a=r(102);t.exports=function(t,e){var r,u=o(t),c=0,s=[];for(r in u)!n(a,r)&&n(u,r)&&s.push(r);for(;e.length>c;)n(u,r=e[c++])&&(~i(s,r)||s.push(r));return s}},function(t,e,r){var n=r(76),o=r(36),i=r(139),a=function(t){return function(e,r,a){var u,c=n(e),s=o(c.length),l=i(a,s);if(t&&r!=r){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){"use strict";var n=r(104).forEach,o=r(106),i=r(70),a=o("forEach"),u=i("forEach");t.exports=a&&u?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,r){var n=r(69);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(11);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(t,e,r){"use strict";var n,o,i,a=r(148),u=r(47),c=r(31),s=r(18),l=r(137),f=s("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(n=o):p=!0),null==n&&(n={}),l||c(n,f)||u(n,f,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},function(t,e,r){var n=r(11);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(102),o=r(34),i=r(31),a=r(35).f,u=r(138),c=r(214),s=u("meta"),l=0,f=Object.isExtensible||function(){return!0},p=function(t){a(t,s,{value:{objectID:"O"+ ++l,weakData:{}}})},y=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,s)){if(!f(t))return"F";if(!e)return"E";p(t)}return t[s].objectID},getWeakData:function(t,e){if(!i(t,s)){if(!f(t))return!0;if(!e)return!1;p(t)}return t[s].weakData},onFreeze:function(t){return c&&y.REQUIRED&&f(t)&&!i(t,s)&&p(t),t}};n[s]=!0},function(t,e,r){var n=r(26),o=r(177),i=r(36),a=r(105),u=r(178),c=r(180),s=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var l,f,p,y,h,d,v,b=r&&r.that,g=!(!r||!r.AS_ENTRIES),m=!(!r||!r.IS_ITERATOR),O=!(!r||!r.INTERRUPTED),j=a(e,b,1+g+O),_=function(t){return l&&c(l),new s(!0,t)},w=function(t){return g?(n(t),O?j(t[0],t[1],_):j(t[0],t[1])):O?j(t,_):j(t)};if(m)l=t;else{if("function"!=typeof(f=u(t)))throw TypeError("Target is not iterable");if(o(f)){for(p=0,y=i(t.length);y>p;p++)if((h=w(t[p]))&&h instanceof s)return h;return new s(!1)}l=f.call(t)}for(d=l.next;!(v=d.call(l)).done;){try{h=w(v.value)}catch(t){throw c(l),t}if("object"==typeof h&&h&&h instanceof s)return h}return new s(!1)}},function(t,e,r){var n=r(18),o=r(92),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,r){var n=r(179),o=r(92),i=r(18)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){var n=r(152),o=r(69),i=r(18)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:a?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},function(t,e,r){var n=r(26);t.exports=function(t){var e=t.return;if(void 0!==e)return n(e.call(t)).value}},function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},function(t,e,r){var n=r(18)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},function(t,e,r){var n=r(34),o=r(150);t.exports=function(t,e,r){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==r&&n(a=i.prototype)&&a!==r.prototype&&o(t,a),t}},function(t,e,r){var n=r(77),o=r(46),i=function(t){return function(e,r){var i,a,u=String(o(e)),c=n(r),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,r){"use strict";var n=r(53),o=r(26),i=r(11),a=r(187),u=RegExp.prototype,c=u.toString,s=i((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),l="toString"!=c.name;(s||l)&&n(RegExp.prototype,"toString",(function(){var t=o(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in u)?a.call(t):r)}),{unsafe:!0})},function(t,e,r){"use strict";var n=r(26);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,s=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&y())}function y(){if(!l){var t=u(p);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function d(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new h(t,e)),1!==s.length||l||u(y)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(6),o=r(37),i=r(146);n({target:"Object",stat:!0,forced:r(11)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){"use strict";var n=r(155),o=r(26),i=r(37),a=r(36),u=r(77),c=r(46),s=r(156),l=r(157),f=Math.max,p=Math.min,y=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,d=/\$([$&'`]|\d\d?)/g;n("replace",2,(function(t,e,r,n){var v=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=n.REPLACE_KEEPS_$0,g=v?"$":"$0";return[function(r,n){var o=c(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,n){if(!v&&b||"string"==typeof n&&-1===n.indexOf(g)){var i=r(e,t,this,n);if(i.done)return i.value}var c=o(t),y=String(this),h="function"==typeof n;h||(n=String(n));var d=c.global;if(d){var O=c.unicode;c.lastIndex=0}for(var j=[];;){var _=l(c,y);if(null===_)break;if(j.push(_),!d)break;""===String(_[0])&&(c.lastIndex=s(y,a(c.lastIndex),O))}for(var w,x="",E=0,S=0;S<j.length;S++){_=j[S];for(var P=String(_[0]),k=f(p(u(_.index),y.length),0),D=[],A=1;A<_.length;A++)D.push(void 0===(w=_[A])?w:String(w));var T=_.groups;if(h){var M=[P].concat(D,k,y);void 0!==T&&M.push(T);var N=String(n.apply(void 0,M))}else N=m(P,y,k,D,T,n);k>=E&&(x+=y.slice(E,k)+N,E=k+P.length)}return x+y.slice(E)}];function m(t,r,n,o,a,u){var c=n+t.length,s=o.length,l=d;return void 0!==a&&(a=i(a),l=h),e.call(u,l,(function(e,i){var u;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(c);case"<":u=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return e;if(l>s){var f=y(l/10);return 0===f?e:f<=s?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):e}u=o[l-1]}return void 0===u?"":u}))}}))},function(t,e,r){"use strict";var n=r(6),o=r(231);n({target:"String",proto:!0,forced:r(232)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e){},function(t,e,r){"use strict";r.r(e);var n=r(55);r.d(e,"createUuid",(function(){return n.a}));var o=r(21);r.d(e,"createDrag",(function(){return o.b})),r.d(e,"StepDrag",(function(){return o.a}))},function(t,e,r){"use strict";r(120)},function(t,e,r){"use strict";r.d(e,"a",(function(){return W})),r.d(e,"b",(function(){return it})),r.d(e,"c",(function(){return xt})),r.d(e,"d",(function(){return It})),r.d(e,"e",(function(){return $t})),r.d(e,"f",(function(){return ce})),r.d(e,"g",(function(){return ge}));r(41),r(38),r(159),r(24);var n,o,i,a,u,c,s,l,f,p,y,h,d,v,b,g,m,O,j,_,w,x,E,S,P,k=r(0),D=r(29),A=r(45),T=r(55),M=r(8),N=r(2),C=r(28),R=r(3);function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?I(Object(r),!0).forEach((function(e){z(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function H(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 U(t,e,r){return e&&H(t.prototype,e),r&&H(t,r),t}function Y(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var V,F,G=Object(D.a)({x:0,y:0,zIndex:1,text:{value:"",x:0,y:0,draggable:!1,editable:!0}},M.a.rect,M.a.circle),W=(o=Y((n=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=Object(T.a)(),this.BaseType=N.c.NODE,this.modelType=N.e.NODE,this.additionStateData=void 0,this.menu=void 0,this.targetRules=[],this.sourceRules=[],this.hasSetTargetRules=!1,this.hasSetSourceRules=!1,X(this,"properties",o,this),X(this,"type",i,this),X(this,"x",a,this),X(this,"y",u,this),X(this,"_width",c,this),X(this,"_height",s,this),X(this,"fill",l,this),X(this,"fillOpacity",f,this),X(this,"strokeWidth",p,this),X(this,"stroke",y,this),X(this,"strokeOpacity",h,this),X(this,"opacity",d,this),X(this,"outlineColor",v,this),X(this,"hoverOutlineColor",b,this),X(this,"outlineStrokeDashArray",g,this),X(this,"hoverOutlineStrokeDashArray",m,this),X(this,"isSelected",O,this),X(this,"isHovered",j,this),X(this,"isHitable",_,this),X(this,"zIndex",w,this),X(this,"anchorsOffset",x,this),X(this,"state",E,this),X(this,"text",S,this),X(this,"draggable",P,this),this.setStyleFromTheme(n,r),this.initNodeData(e),this.setAttributes()}return U(t,[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}}]),U(t,[{key:"initNodeData",value:function(t){t.properties||(t.properties={}),this.formatText(t),Object(D.a)(this,Object(R.k)(t))}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&"string"==typeof t.text?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&void 0===t.text.editable&&(t.text.editable=!0)}},{key:"setAttributes",value:function(){}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,o=this.properties;Object(k.x)(o)&&(o=Object(k.I)(o));var i={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return n&&(i.text={x:e,y:r,value:n}),i}},{key:"getProperties",value:function(){return Object(k.I)(this.properties)}},{key:"isAllowConnectedAsSource",value:function(t){var e=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var r,n=!0,o=0;o<e.length;o++){var i=e[o];if(!i.validate.call(this,this,t)){n=!1,r=i.message;break}}return{isAllPass:n,msg:r}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t){var e=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var r,n=!0,o=0;o<e.length;o++){var i=e[o];if(!i.validate.call(this,t,this)){n=!1,r=i.message;break}}return{isAllPass:n,msg:r}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.x,r=this.y;return t.map((function(t){return{x:e+t[0],y:r+t[1]}}))}},{key:"move",value:function(t,e){this.x+=t,this.y+=e,this.text&&this.moveText(t,e)}},{key:"moveTo",value:function(t,e){if(this.text){var r=t-this.x,n=e-this.y;this.text&&this.moveText(r,n)}this.x=t,this.y=e}},{key:"moveText",value:function(t,e){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,editable:u,draggable:a,x:n+t,y:o+e}}},{key:"updateText",value:function(t){this.text.value=t}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStroke",value:function(t){this.stroke=t}},{key:"updateData",value:function(t){var e=Object(C.a)(Object(A.a)(t,"type","x","y","text","properties")),r=this.text,n=r.x,o=r.y,i=r.draggable,a=r.editable;if(e.text&&"string"==typeof e.text)e.text={x:n,y:o,value:e.text,draggable:i,editable:a};else if("object"===B(e.text)){var u=L(L({},this.text),e.text);e.text=Object(A.a)(u,"x","y","value","draggable","editable")}Object(D.a)(this,e)}},{key:"setProperty",value:function(t,e){this.properties[t]=Object(C.a)(e)}},{key:"setProperties",value:function(t){this.properties=Object.assign(this.properties,t)}},{key:"setStyleFromTheme",value:function(t,e){var r=e.theme;r[t]&&Object(D.a)(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G.zIndex;this.zIndex=t}},{key:"updateAttributes",value:function(t){Object(D.a)(this,t)}},{key:"anchors",get:function(){var t=this.anchorsOffset;return Array.isArray(t)&&t.length>0?this.getAnchorsByOffset():[]}}]),t}()).prototype,"properties",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),i=Y(n.prototype,"type",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),a=Y(n.prototype,"x",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.x}}),u=Y(n.prototype,"y",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.y}}),c=Y(n.prototype,"_width",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.width}}),s=Y(n.prototype,"_height",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.height}}),l=Y(n.prototype,"fill",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.fill}}),f=Y(n.prototype,"fillOpacity",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.fillOpacity}}),p=Y(n.prototype,"strokeWidth",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.strokeWidth}}),y=Y(n.prototype,"stroke",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.stroke}}),h=Y(n.prototype,"strokeOpacity",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.strokeOpacity}}),d=Y(n.prototype,"opacity",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.opacity}}),v=Y(n.prototype,"outlineColor",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.outlineColor}}),b=Y(n.prototype,"hoverOutlineColor",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.hoverOutlineColor}}),g=Y(n.prototype,"outlineStrokeDashArray",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.outlineStrokeDashArray}}),m=Y(n.prototype,"hoverOutlineStrokeDashArray",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.hoverOutlineStrokeDashArray}}),O=Y(n.prototype,"isSelected",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),j=Y(n.prototype,"isHovered",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_=Y(n.prototype,"isHitable",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),w=Y(n.prototype,"zIndex",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.zIndex}}),x=Y(n.prototype,"anchorsOffset",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),E=Y(n.prototype,"state",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),S=Y(n.prototype,"text",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return G.text}}),P=Y(n.prototype,"draggable",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Y(n.prototype,"move",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"move"),n.prototype),Y(n.prototype,"moveTo",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"moveTo"),n.prototype),Y(n.prototype,"moveText",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"moveText"),n.prototype),Y(n.prototype,"updateText",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"updateText"),n.prototype),Y(n.prototype,"setSelected",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setSelected"),n.prototype),Y(n.prototype,"setHovered",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setHovered"),n.prototype),Y(n.prototype,"setHitable",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setHitable"),n.prototype),Y(n.prototype,"setElementState",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setElementState"),n.prototype),Y(n.prototype,"updateStroke",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"updateStroke"),n.prototype),Y(n.prototype,"updateData",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"updateData"),n.prototype),Y(n.prototype,"setProperty",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setProperty"),n.prototype),Y(n.prototype,"setProperties",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setProperties"),n.prototype),Y(n.prototype,"setStyleFromTheme",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setStyleFromTheme"),n.prototype),Y(n.prototype,"setZIndex",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"setZIndex"),n.prototype),Y(n.prototype,"updateAttributes",[k.k],Object.getOwnPropertyDescriptor(n.prototype,"updateAttributes"),n.prototype),n);function K(t){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $(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 q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=tt(t);if(e){var o=tt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return J(this,r)}}function J(t,e){return!e||"object"!==K(e)&&"function"!=typeof e?Q(t):e}function Q(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tt(t){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function et(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var rt,nt,ot,it=(F=et((V=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(i,t);var e,r,n,o=Z(i);function i(t,e){var r,n,a,u,c;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"circle")).modelType=N.e.CIRCLE_NODE,n=r,a="r",u=F,c=Q(r),u&&Object.defineProperty(n,a,{enumerable:u.enumerable,configurable:u.configurable,writable:u.writable,value:u.initializer?u.initializer.call(c):void 0}),r}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.r;return Array.isArray(t)&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-n},{x:e+n,y:r},{x:e,y:r+n},{x:e-n,y:r}]}}])&&$(e.prototype,r),n&&$(e,n),i}(W)).prototype,"r",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.a.circle.r}}),et(V.prototype,"width",[k.m],Object.getOwnPropertyDescriptor(V.prototype,"width"),V.prototype),et(V.prototype,"height",[k.m],Object.getOwnPropertyDescriptor(V.prototype,"height"),V.prototype),et(V.prototype,"anchors",[k.m],Object.getOwnPropertyDescriptor(V.prototype,"anchors"),V.prototype),V);r(22),r(93),r(94),r(160),r(23);function at(t){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ut(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ct(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ct(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function st(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?st(Object(r),!0).forEach((function(e){ft(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ft(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pt(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function yt(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 ht(t,e,r){return(ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function dt(t,e){return(dt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=mt(t);if(e){var o=mt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bt(this,r)}}function bt(t,e){return!e||"object"!==at(e)&&"function"!=typeof e?gt(t):e}function gt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mt(t){return(mt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ot(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var jt,_t,wt,xt=(nt=Ot((rt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dt(t,e)}(i,t);var e,r,n,o=vt(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"diamond")).modelType=N.e.DIAMOND_NODE,pt(r,"rx",nt,gt(r)),pt(r,"ry",ot,gt(r)),r}return e=i,(r=[{key:"getData",value:function(){var t=this.rx,e=this.ry;return lt(lt({},ht(mt(i.prototype),"getData",this).call(this)),{},{rx:t,ry:e})}},{key:"points",get:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[[t,e-n],[t+r,e],[t,e+n],[t-r,e]]}},{key:"pointsPosition",get:function(){return this.points.map((function(t){return{x:t[0],y:t[1]}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=ut(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=ut(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.points;return Array.isArray(t)&&t.length>0?this.getAnchorsByOffset():e.map((function(t){var e=ut(t,2);return{x:e[0],y:e[1]}}))}}])&&yt(e.prototype,r),n&&yt(e,n),i}(W)).prototype,"rx",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ot=Ot(rt.prototype,"ry",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ot(rt.prototype,"points",[k.m],Object.getOwnPropertyDescriptor(rt.prototype,"points"),rt.prototype),Ot(rt.prototype,"pointsPosition",[k.m],Object.getOwnPropertyDescriptor(rt.prototype,"pointsPosition"),rt.prototype),Ot(rt.prototype,"width",[k.m],Object.getOwnPropertyDescriptor(rt.prototype,"width"),rt.prototype),Ot(rt.prototype,"height",[k.m],Object.getOwnPropertyDescriptor(rt.prototype,"height"),rt.prototype),Ot(rt.prototype,"anchors",[k.m],Object.getOwnPropertyDescriptor(rt.prototype,"anchors"),rt.prototype),rt);function Et(t){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function St(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Pt(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 kt(t,e){return(kt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Dt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Mt(t);if(e){var o=Mt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return At(this,r)}}function At(t,e){return!e||"object"!==Et(e)&&"function"!=typeof e?Tt(t):e}function Tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mt(t){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Nt(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Ct,Rt,It=(_t=Nt((jt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kt(t,e)}(i,t);var e,r,n,o=Dt(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"ellipse")).modelType=N.e.ELLIPSE_NODE,St(r,"rx",_t,Tt(r)),St(r,"ry",wt,Tt(r)),r}return e=i,(r=[{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.rx,o=this.ry;return Array.isArray(t)&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o},{x:e+n,y:r},{x:e,y:r+o},{x:e-n,y:r}]}}])&&Pt(e.prototype,r),n&&Pt(e,n),i}(W)).prototype,"rx",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.a.ellipse.rx}}),wt=Nt(jt.prototype,"ry",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.a.ellipse.ry}}),Nt(jt.prototype,"width",[k.m],Object.getOwnPropertyDescriptor(jt.prototype,"width"),jt.prototype),Nt(jt.prototype,"height",[k.m],Object.getOwnPropertyDescriptor(jt.prototype,"height"),jt.prototype),Nt(jt.prototype,"anchors",[k.m],Object.getOwnPropertyDescriptor(jt.prototype,"anchors"),jt.prototype),jt);function Lt(t){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Bt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xt(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 Ht(t,e){return(Ht=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ft(t);if(e){var o=Ft(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yt(this,r)}}function Yt(t,e){return!e||"object"!==Lt(e)&&"function"!=typeof e?Vt(t):e}function Vt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ft(t){return(Ft=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gt(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Wt,Kt,$t=(Rt=Gt((Ct=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ht(t,e)}(i,t);var e,r,n,o=Ut(i);function i(t,e){var r,n,a,u,c;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"polygon")).modelType=N.e.POLYGON_NODE,n=r,a="points",u=Rt,c=Vt(r),u&&Object.defineProperty(n,a,{enumerable:u.enumerable,configurable:u.configurable,writable:u.writable,value:u.initializer?u.initializer.call(c):void 0}),r}return e=i,(r=[{key:"pointsPosition",get:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return this.points.map((function(o){return{x:o[0]+t-r/2,y:o[1]+e-n/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=zt(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=zt(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.width,o=this.height,i=this.points;return Array.isArray(t)&&t.length>0?this.getAnchorsByOffset():i.map((function(t){var i=zt(t,2),a=i[0],u=i[1];return{x:e+a-n/2,y:r+u-o/2}}))}}])&&Xt(e.prototype,r),n&&Xt(e,n),i}(W)).prototype,"points",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Gt(Ct.prototype,"pointsPosition",[k.m],Object.getOwnPropertyDescriptor(Ct.prototype,"pointsPosition"),Ct.prototype),Gt(Ct.prototype,"width",[k.m],Object.getOwnPropertyDescriptor(Ct.prototype,"width"),Ct.prototype),Gt(Ct.prototype,"height",[k.m],Object.getOwnPropertyDescriptor(Ct.prototype,"height"),Ct.prototype),Gt(Ct.prototype,"anchors",[k.m],Object.getOwnPropertyDescriptor(Ct.prototype,"anchors"),Ct.prototype),Ct);function qt(t){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zt(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 Jt(t,e){return(Jt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=re(t);if(e){var o=re(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return te(this,r)}}function te(t,e){return!e||"object"!==qt(e)&&"function"!=typeof e?ee(t):e}function ee(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function re(t){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ne(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var oe,ie,ae,ue,ce=(Kt=ne((Wt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jt(t,e)}(i,t);var e,r,n,o=Qt(i);function i(t,e){var r,n,a,u,c;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"rect")).modelType=N.e.RECT_NODE,n=r,a="radius",u=Kt,c=ee(r),u&&Object.defineProperty(n,a,{enumerable:u.enumerable,configurable:u.configurable,writable:u.writable,value:u.initializer?u.initializer.call(c):void 0}),r}return e=i,(r=[{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.width,o=this.height;return Array.isArray(t)&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o/2},{x:e+n/2,y:r},{x:e,y:r+o/2},{x:e-n/2,y:r}]}}])&&Zt(e.prototype,r),n&&Zt(e,n),i}(W)).prototype,"radius",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.a.rect.radius}}),ne(Wt.prototype,"anchors",[k.m],Object.getOwnPropertyDescriptor(Wt.prototype,"anchors"),Wt.prototype),Wt);function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function le(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function fe(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 pe(t,e){return(pe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ye(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ve(t);if(e){var o=ve(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return he(this,r)}}function he(t,e){return!e||"object"!==se(e)&&"function"!=typeof e?de(t):e}function de(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ve(t){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function be(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ge=(ie=be((oe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&pe(t,e)}(i,t);var e,r,n,o=ye(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"text")).modelType=N.e.TEXT_NODE,le(r,"fontSize",ie,de(r)),le(r,"fontFamily",ae,de(r)),le(r,"fontWeight",ue,de(r)),r}return e=i,(r=[{key:"width",get:function(){return this.fontSize*this.text.value.length}},{key:"height",get:function(){return 1.5*this.fontSize}}])&&fe(e.prototype,r),n&&fe(e,n),i}(W)).prototype,"fontSize",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.a.text.fontSize}}),ae=be(oe.prototype,"fontFamily",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.a.text.fontFamily}}),ue=be(oe.prototype,"fontWeight",[k.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return M.a.text.fontWeight}}),be(oe.prototype,"width",[k.m],Object.getOwnPropertyDescriptor(oe.prototype,"width"),oe.prototype),be(oe.prototype,"height",[k.m],Object.getOwnPropertyDescriptor(oe.prototype,"height"),oe.prototype),oe)},function(t,e,r){"use strict";r.d(e,"a",(function(){return a.a})),r.d(e,"b",(function(){return E})),r.d(e,"c",(function(){return S.a})),r.d(e,"d",(function(){return P.a}));var n,o,i,a=r(54),u=(r(48),r(22),r(38),r(24),r(23),r(0)),c=r(2),s=r(5),l=r(8);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){v(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function v(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(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 g(t,e,r){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?_(t):e}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function x(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var E=(i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(a,t);var e,r,n,i=O(a);function a(t,e){var r,n,u,s,f;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(r=i.call(this,t,e,"bezier")).modelType=c.e.BEZIER_EDGE,r.offset=l.a.bezier.offset,n=r,u="path",s=o,f=_(r),s&&Object.defineProperty(n,u,{enumerable:s.enumerable,configurable:s.configurable,writable:s.writable,value:s.initializer?s.initializer.call(f):void 0}),r}return e=a,(r=[{key:"getData",value:function(){var t=g(w(a.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return d(d({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Object(s.c)({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=p(t,4),r=e[0],n=e[1],o=e[2],i=e[3];return"M ".concat(r.x," ").concat(r.y," \n C ").concat(n.x," ").concat(n.y,",\n ").concat(o.x," ").concat(o.y,",\n ").concat(i.x," ").concat(i.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var t={x:this.startPoint.x,y:this.startPoint.y},e={x:this.endPoint.x,y:this.endPoint.y},r=this.getControls(),n=r.sNext,o=r.ePre;this.pointsList=[t,n,o,e],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList)}},{key:"textPosition",get:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(r){var n=r.x,o=r.y;t+=n,e+=o})),{x:t/this.pointsList.length,y:e/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&b(e.prototype,r),n&&b(e,n),a}(a.b),o=x((n=i).prototype,"path",[u.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),x(n.prototype,"textPosition",[u.m],Object.getOwnPropertyDescriptor(n.prototype,"textPosition"),n.prototype),x(n.prototype,"initPoints",[u.k],Object.getOwnPropertyDescriptor(n.prototype,"initPoints"),n.prototype),x(n.prototype,"updatePoints",[u.k],Object.getOwnPropertyDescriptor(n.prototype,"updatePoints"),n.prototype),x(n.prototype,"updateStartPoint",[u.k],Object.getOwnPropertyDescriptor(n.prototype,"updateStartPoint"),n.prototype),x(n.prototype,"updateEndPoint",[u.k],Object.getOwnPropertyDescriptor(n.prototype,"updateEndPoint"),n.prototype),x(n.prototype,"updateAdjustAnchor",[u.k],Object.getOwnPropertyDescriptor(n.prototype,"updateAdjustAnchor"),n.prototype),n),S=r(95),P=r(116)},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){var n=r(12),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.a.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(154)(t))},function(t,e,r){"use strict";var n=r(84);e.a=function(t,e,r){var o=null==t?void 0:Object(n.a)(t,e);return void 0===o?r:o}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return v}));var n=r(0);function o(t){throw new Error("[mobx-utils] "+t)}function i(t,e){void 0===e&&(e="Illegal state"),t||o(e)}var a=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(a(Object.getPrototypeOf(t))||[])},u=function(t){return function(t){var e=a(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))};function c(t){switch(this.state){case"pending":return t.pending&&t.pending(this.value);case"rejected":return t.rejected&&t.rejected(this.value);case"fulfilled":return t.fulfilled?t.fulfilled(this.value):this.value}}function s(t,e){if(i(arguments.length<=2,"fromPromise expects up to two arguments"),i("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var r=t;t.then(Object(n.k)("observableFromPromise-resolve",(function(t){r.value=t,r.state="fulfilled"})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state="rejected"}))),r.isPromiseBasedObservable=!0,r.case=c;var o=e&&"fulfilled"===e.state?e.value:void 0;return Object(n.q)(r,{value:o,state:"pending"},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state="rejected",r.value=e,r})),t.resolve=Object(n.k)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var r=t(Promise.resolve(e));return r.state="fulfilled",r.value=e,r}))}(s||(s={}));var l=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};!function(){function t(t,e){var r=this;Object(n.G)((function(){r.current=e,r.subscription=t.subscribe(r)}))}t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(t){this.current=t},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(t){this.current=t,this.dispose()},l([n.C.ref],t.prototype,"current",void 0),l([n.k.bound],t.prototype,"next",null),l([n.k.bound],t.prototype,"complete",null),l([n.k.bound],t.prototype,"error",null)}();var f=function(){return(f=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},y=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;this.model=t,this.localValues=n.C.map({}),this.localComputedValues=n.C.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},i(Object(n.A)(t),"createViewModel expects an observable object"),u(t).forEach((function(r){if(r!==n.a&&"__mobxDidRunLazyInitializers"!==r){if(i(-1===y.indexOf(r),"The propertyname "+r+" is reserved and cannot be used with viewModels"),Object(n.w)(t,r)){var o=Object(n.h)(t,r).derivation;e.localComputedValues.set(r,Object(n.m)(o.bind(e)))}var a=Object.getOwnPropertyDescriptor(t,r),u=a?{enumerable:a.enumerable}:{};Object.defineProperty(e,r,f(f({},u),{configurable:!0,get:function(){return Object(n.w)(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:Object(n.k)((function(t){t!==e.model[r]?e.localValues.set(r,t):e.localValues.delete(r)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var t=this;Object(n.B)(this.localValues).forEach((function(e){var r=t.localValues.get(e),o=t.model[e];Object(n.y)(o)?o.replace(r):Object(n.z)(o)?(o.clear(),o.merge(r)):Object(n.v)(r)||(t.model[e]=r)})),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(t){this.localValues.delete(t)},p([n.m],t.prototype,"isDirty",null),p([n.m],t.prototype,"changedValues",null),p([n.k.bound],t.prototype,"submit",null),p([n.k.bound],t.prototype,"reset",null),p([n.k.bound],t.prototype,"resetProperty",null)}();function h(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function d(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function v(t,e){var r=new WeakMap;function o(n){var o=r.get(n.object);!function(t,e){switch(t.type){case"add":i(t.newValue,e,t.name);break;case"update":a(t.oldValue),i(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":a(t.oldValue);break;case"splice":t.removed.map(a),t.added.forEach((function(r,n){return i(r,e,""+(t.index+n))}));for(var n=t.index+t.addedCount;n<t.object.length;n++)if(d(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,h(o),t)}function i(t,e,a){if(d(t)){var u=r.get(t);if(u){if(u.parent!==e||u.path!==a)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+h(e)+"/"+a+"', but it already exists at '"+h(u.parent)+"/"+u.path+"'")}else{var c={parent:e,path:a,dispose:Object(n.D)(t,o)};r.set(t,c),Object(n.p)(t).forEach((function(t){var e=t[0];return i(t[1],c,e)}))}}}function a(t){if(d(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),Object(n.L)(t).forEach(a)}}return i(t,void 0,""),function(){a(t)}}var b,g=(b=function(t,e){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),m=(function(t){function e(e,r,o){var i=void 0===o?{}:o,a=i.name,u=void 0===a?"ogm"+(1e3*Math.random()|0):a,c=i.keyToName,s=void 0===c?function(t){return""+t}:c,l=t.call(this)||this;l._keyToName=s,l._groupBy=r,l._ogmInfoKey="function"==typeof Symbol?Symbol("ogmInfo"+u):"__ogmInfo"+u,l._base=e;for(var f=0;f<e.length;f++)l._addItem(e[f]);return l._disposeBaseObserver=Object(n.D)(l._base,(function(t){if("splice"===t.type)Object(n.J)((function(){for(var e=0,r=t.removed;e<r.length;e++){var n=r[e];l._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var a=i[o];l._addItem(a)}}));else{if("update"!==t.type)throw new Error("illegal state");Object(n.J)((function(){l._removeItem(t.oldValue),l._addItem(t.newValue)}))}})),l}g(e,t),e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(t){throw new Error("not supported")},e.prototype.set=function(t,e){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var t=0;t<this._base.length;t++){var e=this._base[t];e[this._ogmInfoKey].reaction(),delete e[this._ogmInfoKey]}},e.prototype._getGroupArr=function(e){var r=t.prototype.get.call(this,e);return void 0===r&&(r=Object(n.C)([],{name:"GroupArray["+this._keyToName(e)+"]"}),t.prototype.set.call(this,e,r)),r},e.prototype._removeFromGroupArr=function(e,r){var n=t.prototype.get.call(this,e);1===n.length?t.prototype.delete.call(this,e):(r===n.length-1||(n[r]=n[n.length-1],n[r][this._ogmInfoKey].groupArrIndex=r),n.length--)},e.prototype._addItem=function(t){var e=this,r=this._groupBy(t),o=this._getGroupArr(r),i={groupByValue:r,groupArrIndex:o.length,reaction:Object(n.F)((function(){return e._groupBy(t)}),(function(r,n){console.log("new group by value ",r);var o=t[e._ogmInfoKey];e._removeFromGroupArr(o.groupByValue,o.groupArrIndex);var i=e._getGroupArr(r),a=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=a}))};Object.defineProperty(t,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:i}),o.push(t)},e.prototype._removeItem=function(t){var e=t[this._ogmInfoKey];this._removeFromGroupArr(e.groupByValue,e.groupArrIndex),e.reaction(),delete t[this._ogmInfoKey]}}(n.b),function(){function t(t,e){this.base=t,this.args=e,this.closestIdx=0,this.isDisposed=!1;for(var r=this.closest=this.root=t,n=0;n<this.args.length-1&&(r=r.get(e[n]));n++)this.closest=r;this.closestIdx=n}return t.prototype.exists=function(){this.assertNotDisposed();var t=this.args.length;return this.closestIdx>=t-1&&this.closest.has(this.args[t-1])},t.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},t.prototype.set=function(t){this.assertNotDisposed();for(var e=this.args.length,r=this.closest,n=this.closestIdx;n<e-1;n++){var o=new Map;r.set(this.args[n],o),r=o}this.closestIdx=e-1,this.closest=r,r.set(this.args[e-1],t)},t.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var t=this.args.length;this.closest.delete(this.args[t-1]);for(var e=this.root,r=[e],n=0;n<t-1;n++)e=e.get(this.args[n]),r.push(e);for(n=r.length-1;n>0;n--)0===r[n].size&&r[n-1].delete(this.args[n-1]);this.isDisposed=!0},t.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},t}());!function(){function t(){this.store=new Map,this.argsLength=-1}t.prototype.entry=function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new m(this.store,t)}}();new Set,new Set;var O,j=Promise.resolve();O="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var _=function(){return new Promise((function(t){O(t)}))}}).call(this,r(188))},function(t,e,r){var n;!function(o,i,a){if(o){for(var u,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();g.prototype.bind=function(t,e,r){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,r),this},g.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},g.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},g.prototype.reset=function(){return this._callbacks={},this._directMap={},this},g.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,r){return null!==e&&e!==i&&(e===r||t(e.parentNode,r))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var r=t.composedPath()[0];r!==t.target&&(e=r)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},g.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},g.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},g.init=function(){var t=g(i);for(var e in t)"_"!==e.charAt(0)&&(g[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},g.init(),o.Mousetrap=g,t.exports&&(t.exports=g),void 0===(n=function(){return g}.call(e,r,e,t))||(t.exports=n)}function y(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:s[t.which]?s[t.which]:String.fromCharCode(t.which).toLowerCase()}function d(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,r){return r||(r=function(){if(!u)for(var t in u={},c)t>95&&t<112||c.hasOwnProperty(t)&&(u[c[t]]=t);return u}()[t]?"keydown":"keypress"),"keypress"==r&&e.length&&(r="keydown"),r}function b(t,e){var r,n,o,i=[];for(r=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<r.length;++o)n=r[o],f[n]&&(n=f[n]),e&&"keypress"!=e&&l[n]&&(n=l[n],i.push("shift")),d(n)&&i.push(n);return{key:n,modifiers:i,action:e=v(n,i,e)}}function g(t){var e=this;if(t=t||i,!(e instanceof g))return new g(t);e.target=t,e._callbacks={},e._directMap={};var r,n={},o=!1,a=!1,u=!1;function c(t){t=t||{};var e,r=!1;for(e in n)t[e]?r=!0:n[e]=0;r||(u=!1)}function s(t,r,o,i,a,u){var c,s,l,f,p=[],y=o.type;if(!e._callbacks[t])return[];for("keyup"==y&&d(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||n[s.seq]==s.level)&&y==s.action&&("keypress"==y&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var h=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(h||v)&&e._callbacks[t].splice(c,1),p.push(s)}return p}function l(t,r,n,o){e.stopCallback(r,r.target||r.srcElement,n,o)||!1===t(r,n)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(r),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(r))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var r=h(t);r&&("keyup"!=t.type||o!==r?e.handleKey(r,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function p(t,e,i,a){function s(e){return function(){u=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==a&&(o=h(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var y=p+1===e.length?f:s(a||b(e[p+1]).action);v(e[p],y,a,t,p)}}function v(t,r,n,o,i){e._directMap[t+":"+n]=r;var a,u=(t=t.replace(/\s+/g," ")).split(" ");u.length>1?p(t,u,r,n):(a=b(t,n),e._callbacks[a.key]=e._callbacks[a.key]||[],s(a.key,a.modifiers,{type:a.action},o,t,i),e._callbacks[a.key][o?"unshift":"push"]({callback:r,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,r){var n,o=s(t,e,r),i={},f=0,p=!1;for(n=0;n<o.length;++n)o[n].seq&&(f=Math.max(f,o[n].level));for(n=0;n<o.length;++n)if(o[n].seq){if(o[n].level!=f)continue;p=!0,i[o[n].seq]=1,l(o[n].callback,r,o[n].combo,o[n].seq)}else p||l(o[n].callback,r,o[n].combo);var y="keypress"==r.type&&a;r.type!=u||d(t)||y||c(i),a=p&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)v(t[n],e,r)},y(t,"keypress",f),y(t,"keydown",f),y(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){var n=r(20),o=r(164),i=n.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},function(t,e,r){var n=r(31),o=r(204),i=r(98),a=r(35);t.exports=function(t,e){for(var r=o(e),u=a.f,c=i.f,s=0;s<r.length;s++){var l=r[s];n(t,l)||u(t,l,c(e,l))}}},function(t,e,r){var n=r(103),o=r(166),i=r(169),a=r(26);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=i.f;return r?e.concat(r(t)):e}},function(t,e,r){var n=r(20);t.exports=n},function(t,e,r){var n=r(172);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(30),o=r(35),i=r(26),a=r(146);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=a(e),u=n.length,c=0;u>c;)o.f(t,r=n[c++],e[r]);return t}},function(t,e,r){var n=r(103);t.exports=n("document","documentElement")},function(t,e,r){"use strict";var n=r(173).IteratorPrototype,o=r(107),i=r(99),a=r(149),u=r(92),c=function(){return this};t.exports=function(t,e,r){var s=e+" Iterator";return t.prototype=o(n,{next:i(1,r)}),a(t,s,!1,!0),u[s]=c,t}},function(t,e,r){var n=r(34);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,r){var n=r(103);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(30),o=r(35).f,i=Function.prototype,a=i.toString,u=/^\s*function ([^ (]*)/;n&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(t){return""}}})},function(t,e,r){"use strict";var n=r(6),o=r(20),i=r(141),a=r(53),u=r(175),c=r(176),s=r(181),l=r(34),f=r(11),p=r(182),y=r(149),h=r(183);t.exports=function(t,e,r){var d=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),b=d?"set":"add",g=o[t],m=g&&g.prototype,O=g,j={},_=function(t){var e=m[t];a(m,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(i(t,"function"!=typeof g||!(v||m.forEach&&!f((function(){(new g).entries().next()})))))O=r.getConstructor(e,t,d,b),u.REQUIRED=!0;else if(i(t,!0)){var w=new O,x=w[b](v?{}:-0,1)!=w,E=f((function(){w.has(1)})),S=p((function(t){new g(t)})),P=!v&&f((function(){for(var t=new g,e=5;e--;)t[b](e,e);return!t.has(-0)}));S||((O=e((function(e,r){s(e,O,t);var n=h(new g,e,O);return null!=r&&c(r,n[b],{that:n,AS_ENTRIES:d}),n}))).prototype=m,m.constructor=O),(E||P)&&(_("delete"),_("has"),d&&_("get")),(P||x)&&_(b),v&&m.clear&&delete m.clear}return j[t]=O,n({global:!0,forced:O!=g},j),y(O,t),v||r.setStrong(O,t,d),O}},function(t,e,r){var n=r(11);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(35).f,o=r(107),i=r(216),a=r(105),u=r(181),c=r(176),s=r(147),l=r(217),f=r(30),p=r(175).fastKey,y=r(101),h=y.set,d=y.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){u(t,l,e),h(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&c(n,t[s],{that:t,AS_ENTRIES:r})})),y=d(e),v=function(t,e,r){var n,o,i=y(t),a=b(t,e);return a?a.value=r:(i.last=a={index:o=p(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),f?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var r,n=y(t),o=p(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(l.prototype,{clear:function(){for(var t=y(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=y(this),r=b(this,t);if(r){var n=r.next,o=r.previous;delete e.index[r.index],r.removed=!0,o&&(o.next=n),n&&(n.previous=o),e.first==r&&(e.first=n),e.last==r&&(e.last=o),f?e.size--:this.size--}return!!r},forEach:function(t){for(var e,r=y(this),n=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(l.prototype,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),f&&n(l.prototype,"size",{get:function(){return y(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",o=d(e),i=d(n);s(t,e,(function(t,e){h(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},function(t,e,r){var n=r(53);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(103),o=r(35),i=r(18),a=r(30),u=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[u]&&r(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,r){"use strict";var n=r(152),o=r(179);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(6),o=r(104).find,i=r(145),a=r(70),u=!0,c=a("find");"find"in[]&&Array(1).find((function(){u=!1})),n({target:"Array",proto:!0,forced:u||!c},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(t,e,r){"use strict";var n=r(6),o=r(221).left,i=r(106),a=r(70),u=r(151),c=r(222),s=i("reduce"),l=a("reduce",{1:0});n({target:"Array",proto:!0,forced:!s||!l||!c&&u>79&&u<83},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(142),o=r(37),i=r(91),a=r(36),u=function(t){return function(e,r,u,c){n(r);var s=o(e),l=i(s),f=a(s.length),p=t?f-1:0,y=t?-1:1;if(u<2)for(;;){if(p in l){c=l[p],p+=y;break}if(p+=y,t?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:f>p;p+=y)p in l&&(c=r(c,l[p],p,s));return c}};t.exports={left:u(!1),right:u(!0)}},function(t,e,r){var n=r(69),o=r(20);t.exports="process"==n(o.process)},function(t,e,r){"use strict";var n=r(6),o=r(104).filter,i=r(108),a=r(70),u=i("filter"),c=a("filter");n({target:"Array",proto:!0,forced:!u||!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(46),o="["+r(225)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),u=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(i,"")),2&t&&(r=r.replace(a,"")),r}};t.exports={start:u(1),end:u(2),trim:u(3)}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,r){"use strict";var n=r(11);function o(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,r){var n=r(34),o=r(69),i=r(18)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,r){var n=r(26),o=r(142),i=r(18)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?e:o(r)}},function(t,e,r){"use strict";var n=r(30),o=r(11),i=r(146),a=r(169),u=r(161),c=r(37),s=r(91),l=Object.assign,f=Object.defineProperty;t.exports=!l||o((function(){if(n&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=l({},t)[r]||"abcdefghijklmnopqrst"!=i(l({},e)).join("")}))?function(t,e){for(var r=c(t),o=arguments.length,l=1,f=a.f,p=u.f;o>l;)for(var y,h=s(arguments[l++]),d=f?i(h).concat(f(h)):i(h),v=d.length,b=0;v>b;)y=d[b++],n&&!p.call(h,y)||(r[y]=h[y]);return r}:l},function(t,e,r){var n=r(6),o=Math.hypot,i=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,u=0,c=arguments.length,s=0;u<c;)s<(r=i(arguments[u++]))?(o=o*(n=s/r)*n+1,s=r):o+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*a(o)}})},function(t,e,r){var n=r(46),o=/"/g;t.exports=function(t,e,r,i){var a=String(n(t)),u="<"+e;return""!==r&&(u+=" "+r+'="'+String(i).replace(o,""")+'"'),u+">"+a+"</"+e+">"}},function(t,e,r){var n=r(11);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,r){r(6)({target:"String",proto:!0},{repeat:r(234)})},function(t,e,r){"use strict";var n=r(77),o=r(46);t.exports="".repeat||function(t){var e=String(o(this)),r="",i=n(t);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(r+=e);return r}},function(t,e,r){"use strict";var n=r(37),o=r(139),i=r(36);t.exports=function(t){for(var e=n(this),r=i(e.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,s=void 0===c?r:o(c,r);s>u;)e[u++]=t;return e}},function(t,e,r){"use strict";var n=r(155),o=r(26),i=r(36),a=r(46),u=r(156),c=r(157);n("match",1,(function(t,e,r){return[function(e){var r=a(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var a=o(t),s=String(this);if(!a.global)return c(a,s);var l=a.unicode;a.lastIndex=0;for(var f,p=[],y=0;null!==(f=c(a,s));){var h=String(f[0]);p[y]=h,""===h&&(a.lastIndex=u(s,i(a.lastIndex),l)),y++}return 0===y?null:p}]}))},function(t,e,r){var n=r(6),o=r(238);n({target:"Array",stat:!0,forced:!r(182)((function(t){Array.from(t)}))},{from:o})},function(t,e,r){"use strict";var n=r(105),o=r(37),i=r(239),a=r(177),u=r(36),c=r(153),s=r(178);t.exports=function(t){var e,r,l,f,p,y,h=o(t),d="function"==typeof this?this:Array,v=arguments.length,b=v>1?arguments[1]:void 0,g=void 0!==b,m=s(h),O=0;if(g&&(b=n(b,v>2?arguments[2]:void 0,2)),null==m||d==Array&&a(m))for(r=new d(e=u(h.length));e>O;O++)y=g?b(h[O],O):h[O],c(r,O,y);else for(p=(f=m.call(h)).next,r=new d;!(l=p.call(f)).done;O++)y=g?i(f,b,[l.value,O],!0):l.value,c(r,O,y);return r.length=O,r}},function(t,e,r){var n=r(26),o=r(180);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){throw o(t),e}}},,function(t,e,r){"use strict";var n=r(66);var o=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t},i=r(59),a=r(42),u=r(33);var c=function(t,e){return t&&Object(a.a)(e,Object(u.a)(e),t)},s=r(132),l=r(13),f=r(58);var p=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},y=Object.prototype.hasOwnProperty;var h=function(t){if(!Object(l.a)(t))return p(t);var e=Object(f.a)(t),r=[];for(var n in t)("constructor"!=n||!e&&y.call(t,n))&&r.push(n);return r},d=r(32);var v=function(t){return Object(d.a)(t)?Object(s.a)(t,!0):h(t)};var b=function(t,e){return t&&Object(a.a)(e,v(e),t)},g=r(198);var m=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e},O=r(88);var j=function(t,e){return Object(a.a)(t,Object(O.a)(t),e)},_=r(83),w=r(125),x=Object(w.a)(Object.getPrototypeOf,Object),E=r(127),S=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Object(_.a)(e,Object(O.a)(t)),t=x(t);return e}:E.a;var P=function(t,e){return Object(a.a)(t,S(t),e)},k=r(96),D=r(128);var A=function(t){return Object(D.a)(t,v,S)},T=r(49),M=Object.prototype.hasOwnProperty;var N=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&M.call(t,"index")&&(r.index=t.index,r.input=t.input),r},C=r(90);var R=function(t){var e=new t.constructor(t.byteLength);return new C.a(e).set(new C.a(t)),e};var I=function(t,e){var r=e?R(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},L=/\w*$/;var z=function(t){var e=new t.constructor(t.source,L.exec(t));return e.lastIndex=t.lastIndex,e},B=r(17),X=B.a?B.a.prototype:void 0,H=X?X.valueOf:void 0;var U=function(t){return H?Object(H.call(t)):{}};var Y=function(t,e){var r=e?R(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var V=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return R(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return I(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Y(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return z(t);case"[object Set]":return new n;case"[object Symbol]":return U(t)}},F=Object.create,G=function(){function t(){}return function(e){if(!Object(l.a)(e))return{};if(F)return F(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var W=function(t){return"function"!=typeof t.constructor||Object(f.a)(t)?{}:G(x(t))},K=r(7),$=r(73),q=r(25);var Z=function(t){return Object(q.a)(t)&&"[object Map]"==Object(T.a)(t)},J=r(82),Q=r(50),tt=Q.a&&Q.a.isMap,et=tt?Object(J.a)(tt):Z;var rt=function(t){return Object(q.a)(t)&&"[object Set]"==Object(T.a)(t)},nt=Q.a&&Q.a.isSet,ot=nt?Object(J.a)(nt):rt,it={};it["[object Arguments]"]=it["[object Array]"]=it["[object ArrayBuffer]"]=it["[object DataView]"]=it["[object Boolean]"]=it["[object Date]"]=it["[object Float32Array]"]=it["[object Float64Array]"]=it["[object Int8Array]"]=it["[object Int16Array]"]=it["[object Int32Array]"]=it["[object Map]"]=it["[object Number]"]=it["[object Object]"]=it["[object RegExp]"]=it["[object Set]"]=it["[object String]"]=it["[object Symbol]"]=it["[object Uint8Array]"]=it["[object Uint8ClampedArray]"]=it["[object Uint16Array]"]=it["[object Uint32Array]"]=!0,it["[object Error]"]=it["[object Function]"]=it["[object WeakMap]"]=!1;var at=function t(e,r,a,s,f,p){var y,h=1&r,d=2&r,O=4&r;if(a&&(y=f?a(e,s,f,p):a(e)),void 0!==y)return y;if(!Object(l.a)(e))return e;var _=Object(K.a)(e);if(_){if(y=N(e),!h)return m(e,y)}else{var w=Object(T.a)(e),x="[object Function]"==w||"[object GeneratorFunction]"==w;if(Object($.a)(e))return Object(g.a)(e,h);if("[object Object]"==w||"[object Arguments]"==w||x&&!f){if(y=d||x?{}:W(e),!h)return d?P(e,b(y,e)):j(e,c(y,e))}else{if(!it[w])return f?e:{};y=V(e,w,h)}}p||(p=new n.a);var E=p.get(e);if(E)return E;p.set(e,y),ot(e)?e.forEach((function(n){y.add(t(n,r,a,n,e,p))})):et(e)&&e.forEach((function(n,o){y.set(o,t(n,r,a,o,e,p))}));var S=O?d?A:k.a:d?v:u.a,D=_?void 0:S(e);return o(D||e,(function(n,o){D&&(n=e[o=n]),Object(i.a)(y,o,t(n,r,a,o,e,p))})),y};e.a=function(t){return at(t,5)}},function(t,e,r){"use strict";var n=r(126),o=r(66),i=r(86);var a=function(t,e,r,n){var a=r.length,u=a,c=!n;if(null==t)return!u;for(t=Object(t);a--;){var s=r[a];if(c&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<u;){var l=(s=r[a])[0],f=t[l],p=s[1];if(c&&s[2]){if(void 0===f&&!(l in t))return!1}else{var y=new o.a;if(n)var h=n(f,p,l,t,e,y);if(!(void 0===h?Object(i.a)(p,f,3,n,y):h))return!1}}return!0},u=r(13);var c=function(t){return t==t&&!Object(u.a)(t)},s=r(33);var l=function(t){for(var e=Object(s.a)(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,c(o)]}return e};var f=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var p=function(t){var e=l(t);return 1==e.length&&e[0][2]?f(e[0][0],e[0][1]):function(r){return r===t||a(r,t,e)}},y=r(199),h=r(130),d=r(85),v=r(43);var b=function(t,e){return Object(d.a)(t)&&c(e)?f(Object(v.a)(t),e):function(r){var n=Object(y.a)(r,t);return void 0===n&&n===e?Object(h.a)(r,t):Object(i.a)(e,n,3)}},g=r(80),m=r(7);var O=function(t){return function(e){return null==e?void 0:e[t]}},j=r(84);var _=function(t){return function(e){return Object(j.a)(e,t)}};var w=function(t){return Object(d.a)(t)?O(Object(v.a)(t)):_(t)};var x=function(t){return"function"==typeof t?t:null==t?g.a:"object"==typeof t?Object(m.a)(t)?b(t[0],t[1]):p(t):w(t)};var E=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var S=function(t,e){return t&&E(t,e,s.a)},P=r(32);var k=function(t,e){return function(r,n){if(null==r)return r;if(!Object(P.a)(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(S);var D=function(t,e){var r=-1,n=Object(P.a)(t)?Array(t.length):[];return k(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};e.a=function(t,e){return(Object(m.a)(t)?n.a:D)(t,x(e,3))}}])}));
|
|
15
|
+
***************************************************************************** */var P=function(){return(P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function k(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function A(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(A(arguments[e]));return t}var T=Symbol("mobx did run lazy initializers"),M=Symbol("mobx pending decorators"),N={},C={};function R(t,e){var r=e?N:C;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return I(this),this[t]},set:function(e){I(this),this[t]=e}})}function I(t){var e,r;if(!0!==t[T]){var n=t[M];if(n){y(t,T,!0);var o=D(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var i=k(o),a=i.next();!a.done;a=i.next()){var u=n[a.value];u.propertyCreator(t,u.prop,u.descriptor,u.decoratorTarget,u.decoratorArguments)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}function L(t,e){return function(){var r,n=function(n,o,i,a){if(!0===a)return e(n,o,i,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,M)){var u=n[M];y(n,M,P({},u))}return n[M][o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},R(o,t)};return z(arguments)?(r=o,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function z(t){return(2===t.length||3===t.length)&&("string"==typeof t[1]||"symbol"==typeof t[1])||4===t.length&&!0===t[3]}function B(t,e,r){return xe(t)?t:Array.isArray(t)?Z.array(t,{name:r}):p(t)?Z.object(t,void 0,{name:r}):h(t)?Z.map(t,{name:r}):v(t)?Z.set(t,{name:r}):t}function H(t){return t}function X(e){c(e);var r=L(!0,(function(t,r,n,o,i){var a=n?n.initializer?n.initializer.call(t):n.value:void 0;ur(t).addObservableProp(r,a,e)})),n=(void 0!==t&&t.env,r);return n.enhancer=e,n}var U={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function F(t){return null==t?U:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(U);var G=X(B),Y=X((function(t,e,r){return null==t||pr(t)||Je(t)||rr(t)||ir(t)?t:Array.isArray(t)?Z.array(t,{name:r,deep:!1}):p(t)?Z.object(t,void 0,{name:r,deep:!1}):h(t)?Z.map(t,{name:r,deep:!1}):v(t)?Z.set(t,{name:r,deep:!1}):u(!1)})),V=X(H),W=X((function(t,e,r){return vr(t,e)?e:t}));function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?H:B}var $={box:function(t,e){arguments.length>2&&q("box");var r=F(e);return new St(t,K(r),r.name,!0,r.equals)},array:function(t,e){arguments.length>2&&q("array");var r=F(e);return We(t,K(r),r.name)},map:function(t,e){arguments.length>2&&q("map");var r=F(e);return new er(t,K(r),r.name)},set:function(t,e){arguments.length>2&&q("set");var r=F(e);return new or(t,K(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&q("object");var n=F(r);if(!1===n.proxy)return le({},t,e,n);var o=fe(n),i=le({},void 0,void 0,n),a=Be(i);return pe(a,t,e,o),a},ref:V,shallow:Y,deep:G,struct:W},Z=function(t,e,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return G.apply(null,arguments);if(xe(t))return t;var n=p(t)?Z.object(t,e,r):Array.isArray(t)?Z.array(t,e):h(t)?Z.map(t,e):v(t)?Z.set(t,e):t;if(n!==t)return n;u(!1)};function q(t){u("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys($).forEach((function(t){return Z[t]=$[t]}));var J,Q,tt=L(!1,(function(t,e,r,n,o){var i=r.get,a=r.set,u=o[0]||{};ur(t).addComputedProp(t,e,P({get:i,set:a,context:t},u))})),et=tt({equals:E.structural}),rt=function(t,e,r){if("string"==typeof e)return tt.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return tt.apply(null,arguments);var n="object"==typeof e?e:{};return n.get=t,n.set="function"==typeof e?e:n.set,n.name=n.name||t.name||"",new kt(n)};rt.struct=et,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(J||(J={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Q||(Q={}));var nt=function(t){this.cause=t};function ot(t){return t instanceof nt}function it(t){switch(t.dependenciesState){case J.UP_TO_DATE:return!1;case J.NOT_TRACKING:case J.STALE:return!0;case J.POSSIBLY_STALE:for(var e=yt(!0),r=ft(),n=t.observing,o=n.length,i=0;i<o;i++){var a=n[i];if(At(a)){if(Rt.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return pt(r),dt(e),!0}if(t.dependenciesState===J.STALE)return pt(r),dt(e),!0}}return ht(t),pt(r),dt(e),!1}}function at(){return null!==Rt.trackingDerivation}function ut(t){var e=t.observers.size>0;Rt.computationDepth>0&&e&&u(!1),Rt.allowStateChanges||!e&&"strict"!==Rt.enforceActions||u(!1)}function ct(t,e,r){var n=yt(!0);ht(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Rt.runId;var o,i=Rt.trackingDerivation;if(Rt.trackingDerivation=t,!0===Rt.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new nt(t)}return Rt.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=J.UP_TO_DATE,o=0,i=t.unboundDepsCount,a=0;a<i;a++){0===(u=r[a]).diffValue&&(u.diffValue=1,o!==a&&(r[o]=u),o++),u.dependenciesState>n&&(n=u.dependenciesState)}r.length=o,t.newObserving=null,i=e.length;for(;i--;){0===(u=e[i]).diffValue&&Lt(u,t),u.diffValue=0}for(;o--;){var u;1===(u=r[o]).diffValue&&(u.diffValue=0,It(u,t))}n!==J.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),dt(n),o}function st(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)Lt(e[r],t);t.dependenciesState=J.NOT_TRACKING}function lt(t){var e=ft();try{return t()}finally{pt(e)}}function ft(){var t=Rt.trackingDerivation;return Rt.trackingDerivation=null,t}function pt(t){Rt.trackingDerivation=t}function yt(t){var e=Rt.allowStateReads;return Rt.allowStateReads=t,e}function dt(t){Rt.allowStateReads=t}function ht(t){if(t.dependenciesState!==J.UP_TO_DATE){t.dependenciesState=J.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=J.UP_TO_DATE}}var vt=0,bt=1,gt=Object.getOwnPropertyDescriptor((function(){}),"name");gt&>.configurable;function mt(t,e,r){var n=function(){return Ot(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,r,n){var o=wt(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{_t(o)}}function wt(t,e,r){var n=0,o=ft();Bt();var i={prevDerivation:o,prevAllowStateChanges:jt(!0),prevAllowStateReads:yt(!0),notifySpy:!1,startTime:n,actionId:bt++,parentActionId:vt};return vt=i.actionId,i}function _t(t){vt!==t.actionId&&u("invalid action stack. did you forget to finish an action?"),vt=t.parentActionId,void 0!==t.error&&(Rt.suppressReactionErrors=!0),Et(t.prevAllowStateChanges),dt(t.prevAllowStateReads),Ht(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function xt(t,e){var r,n=jt(t);try{r=e()}finally{Et(n)}return r}function jt(t){var e=Rt.allowStateChanges;return Rt.allowStateChanges=t,e}function Et(t){Rt.allowStateChanges=t}var St=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+a()),void 0===o&&(o=!0),void 0===i&&(i=E.default);var u=t.call(this,n)||this;return u.enhancer=r,u.name=n,u.equals=i,u.hasUnreportedChange=!1,u.value=r(e,void 0,n),u}return function(t,e){function r(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){this.value;if((t=this.prepareNewValue(t))!==Rt.UNCHANGED){0,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(ut(this),He(this)){var e=Ue(this,{object:this,type:"update",newValue:t});if(!e)return Rt.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Rt.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),Fe(this)&&Ye(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return Xe(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ge(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(_),Pt=d("ObservableValue",St),kt=function(){function t(t){this.dependenciesState=J.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=J.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+a(),this.value=new nt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Q.NONE,c(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+a(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?E.structural:E.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==J.UP_TO_DATE)return;t.lowestObserverState=J.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.dependenciesState=J.POSSIBLY_STALE,e.isTracing!==Q.NONE&&Ut(e,t),e.onBecomeStale())}))}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.get=function(){this.isComputing&&u("Cycle detected in computation "+this.name+": "+this.derivation),0!==Rt.inBatch||0!==this.observers.size||this.keepAlive?(Xt(this),it(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.POSSIBLY_STALE?e.dependenciesState=J.STALE:e.dependenciesState===J.UP_TO_DATE&&(t.lowestObserverState=J.UP_TO_DATE)}))}(this)):it(this)&&(this.warnAboutUntrackedRead(),Bt(),this.value=this.computeValue(!1),Ht());var t=this.value;if(ot(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ot(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else c(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===J.NOT_TRACKING,r=this.computeValue(!0),n=e||ot(t)||ot(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Rt.computationDepth++,t)e=ct(this,this.derivation,this.scope);else if(!0===Rt.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new nt(t)}return Rt.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(st(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,o=void 0;return ne((function(){var i=r.get();if(!n||e){var a=ft();t({type:"update",object:r,newValue:i,oldValue:o}),pt(a)}n=!1,o=i}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return m(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),At=d("ComputedValue",kt),Dt=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Tt={};function Mt(){return"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:Tt}var Nt=!0,Ct=!1,Rt=function(){var t=Mt();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Nt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new Dt).version&&(Nt=!1),Nt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Dt):(setTimeout((function(){Ct||u("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Dt)}();function It(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Lt(t,e){t.observers.delete(e),0===t.observers.size&&zt(t)}function zt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Rt.pendingUnobservations.push(t))}function Bt(){Rt.inBatch++}function Ht(){if(0==--Rt.inBatch){Yt();for(var t=Rt.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof kt&&r.suspend())}Rt.pendingUnobservations=[]}}function Xt(t){var e=Rt.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.size&&Rt.inBatch>0&&zt(t),!1)}function Ut(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Q.BREAK){var r=[];!function t(e,r,n){if(r.length>=1e3)return void r.push("(and many more)");r.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return t(e,r,n+1)}))}(ye(t),r,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof kt?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}var Ft=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+a()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=J.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Q.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Rt.pendingReactions.push(this),Yt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Bt(),this._isScheduled=!1,it(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Ht()}},t.prototype.track=function(t){if(!this.isDisposed){Bt();0,this._isRunning=!0;var e=ct(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&st(this),ot(e)&&this.reportExceptionInDerivation(e.cause),Ht()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Rt.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Rt.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,t),Rt.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),st(this),Ht()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[w]=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=!1;"boolean"==typeof t[t.length-1]&&(r=t.pop());var n=Te(t);if(!n)return u(!1);n.isTracing===Q.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled");n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Gt=function(t){return t()};function Yt(){Rt.inBatch>0||Rt.isRunningReactions||Gt(Vt)}function Vt(){Rt.isRunningReactions=!0;for(var t=Rt.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Rt.isRunningReactions=!1}var Wt=d("Reaction",Ft);function Kt(t){var e=Gt;Gt=function(r){return t((function(){return e(r)}))}}function $t(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Zt(){u(!1)}function qt(t){return function(e,r,n){if(n){if(n.value)return{value:mt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,o.call(this))}}}return Jt(t).apply(this,arguments)}}function Jt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){y(this,r,Qt(t,e))}})}}var Qt=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?mt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?mt(t,e):1===arguments.length&&"string"==typeof t?qt(t):!0!==n?qt(e).apply(null,arguments):void y(t,e,mt(t.name||e,r.value,this))};function te(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function ee(t){return"function"==typeof t&&!0===t.isMobxAction}function re(t,e,r){y(t,e,mt(e,r.bind(t)))}function ne(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+a();if(!e.scheduler&&!e.delay)r=new Ft(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ie(e),u=!1;r=new Ft(n,(function(){u||(u=!0,o((function(){u=!1,r.isDisposed||r.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(r)}return r.schedule(),r.getDisposer()}Qt.bound=function(t,e,r,n){return!0===n?(re(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return re(this,e,r.value||r.initializer.call(this)),this[e]},set:Zt}:{enumerable:!1,configurable:!0,set:function(t){re(this,e,t)},get:function(){}}};var oe=function(t){return t()};function ie(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:oe}function ae(t,e,r){void 0===r&&(r=i);var n,o,u,c=r.name||"Reaction@"+a(),s=Qt(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),l=!r.scheduler&&!r.delay,f=ie(r),p=!0,y=!1,d=r.compareStructural?E.structural:r.equals||E.default,h=new Ft(c,(function(){p||l?v():y||(y=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(y=!1,!h.isDisposed){var e=!1;h.track((function(){var r=t(h);e=p||!d(u,r),u=r})),p&&r.fireImmediately&&s(u,h),p||!0!==e||s(u,h),p&&(p=!1)}}return h.schedule(),h.getDisposer()}function ue(t,e,r){return ce("onBecomeUnobserved",t,e,r)}function ce(t,e,r,n){var o="function"==typeof n?yr(e,r):yr(e),i="function"==typeof n?n:r,a=t+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[t]?u(!1):function(){var t=o[a];t&&(t.delete(i),0===t.size&&delete o[a])}}function se(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,a=t.reactionRequiresObservable,c=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Rt.pendingReactions.length||Rt.inBatch||Rt.isRunningReactions)&&u("isolateGlobalState should be called before MobX is running any reactions"),Ct=!0,Nt&&(0==--Mt().__mobxInstanceCount&&(Mt().__mobxGlobals=void 0),Rt=new Dt)),void 0!==e){var s=void 0;switch(e){case!0:case"observed":s=!0;break;case!1:case"never":s=!1;break;case"strict":case"always":s="strict";break;default:u("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Rt.enforceActions=s,Rt.allowStateChanges=!0!==s&&"strict"!==s}void 0!==r&&(Rt.computedRequiresReaction=!!r),void 0!==a&&(Rt.reactionRequiresObservable=!!a),void 0!==c&&(Rt.observableRequiresReaction=!!c,Rt.allowStateReads=!Rt.observableRequiresReaction),void 0!==n&&(Rt.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Rt.disableErrorBoundaries=!!o),i&&Kt(i)}function le(t,e,r,n){var o=fe(n=F(n));return I(t),ur(t,n.name,o.enhancer),e&&pe(t,e,r,o),t}function fe(t){return t.defaultDecorator||(!1===t.deep?V:G)}function pe(t,e,r,n){var o,i;Bt();try{var a=O(e);try{for(var u=k(a),c=u.next();!c.done;c=u.next()){var s=c.value,l=Object.getOwnPropertyDescriptor(e,s);0;var f=(r&&s in r?r[s]:l.get?tt:n)(t,s,l,!0);f&&Object.defineProperty(t,s,f)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}finally{Ht()}}function ye(t,e){return de(yr(t,e))}function de(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(de)),n}var he=0;function ve(){this.message="FLOW_CANCELLED"}function be(t){1!==arguments.length&&u("Flow expects 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=this,o=arguments,i=++he,a=Qt(e+" - runid: "+i+" - init",t).apply(n,o),u=void 0,c=new Promise((function(t,n){var o=0;function c(t){var r;u=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,a.next).call(a,t)}catch(t){return n(t)}l(r)}function s(t){var r;u=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,a.throw).call(a,t)}catch(t){return n(t)}l(r)}function l(e){if(!e||"function"!=typeof e.then)return e.done?t(e.value):(u=Promise.resolve(e.value)).then(c,s);e.then(l,n)}r=n,c(void 0)}));return c.cancel=Qt(e+" - runid: "+i+" - cancel",(function(){try{u&&ge(u);var t=a.return(void 0),e=Promise.resolve(t.value);e.then(l,l),ge(e),r(new ve)}catch(t){r(t)}})),c}}function ge(t){"function"==typeof t.cancel&&t.cancel()}function me(t,e){if(null==t)return!1;if(void 0!==e){if(!1===pr(t))return!1;if(!t[w].values.has(e))return!1;var r=yr(t,e);return At(r)}return At(t)}function Oe(t){return arguments.length>1?u(!1):me(t)}function we(t,e){return"string"!=typeof e?u(!1):me(t,e)}function _e(t,e){return null!=t&&(void 0!==e?!!pr(t)&&t[w].values.has(e):pr(t)||!!t[w]||x(t)||Wt(t)||At(t))}function xe(t){return 1!==arguments.length&&u(!1),_e(t)}function je(t){return pr(t)?t[w].getKeys():rr(t)||ir(t)?Array.from(t.keys()):Je(t)?t.map((function(t,e){return e})):u(!1)}function Ee(t){return pr(t)?je(t).map((function(e){return t[e]})):rr(t)?je(t).map((function(e){return t.get(e)})):ir(t)?Array.from(t.values()):Je(t)?t.slice():u(!1)}function Se(t){return pr(t)?je(t).map((function(e){return[e,t[e]]})):rr(t)?je(t).map((function(e){return[e,t.get(e)]})):ir(t)?Array.from(t.entries()):Je(t)?t.map((function(t,e){return[e,t]})):u(!1)}function Pe(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return dr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return dr(t).observe(e,r)}(t,e,r)}ve.prototype=Object.create(Error.prototype);var ke={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Ae(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function De(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=ke),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),function t(e,r,n){if(!r.recurseEverything&&!xe(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(Pt(e))return t(e.get(),r,n);if(xe(e)&&je(e),!0===r.detectCycles&&null!==e&&n.has(e))return n.get(e);if(Je(e)||Array.isArray(e)){var o=Ae(n,e,[],r),i=e.map((function(e){return t(e,r,n)}));o.length=i.length;for(var a=0,u=i.length;a<u;a++)o[a]=i[a];return o}if(ir(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===r.exportMapsAsObjects){var c=Ae(n,e,new Set,r);return e.forEach((function(e){c.add(t(e,r,n))})),c}var s=Ae(n,e,[],r);return e.forEach((function(e){s.push(t(e,r,n))})),s}if(rr(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===r.exportMapsAsObjects){var l=Ae(n,e,new Map,r);return e.forEach((function(e,o){l.set(o,t(e,r,n))})),l}var f=Ae(n,e,{},r);return e.forEach((function(e,o){f[o]=t(e,r,n)})),f}var p=Ae(n,e,{},r);return b(e).forEach((function(o){p[o]=t(e[o],r,n)})),p}(t,e,r)}function Te(t){switch(t.length){case 0:return Rt.trackingDerivation;case 1:return yr(t[0]);case 2:return yr(t[0],t[1])}}function Me(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Ht()}}function Ne(t,e,r){return 1===arguments.length||e&&"object"==typeof e?Re(t,e):Ce(t,e,r||{})}function Ce(t,e,r){var n;"number"==typeof r.timeout&&(n=setTimeout((function(){if(!i[w].isDisposed){i();var t=new Error("WHEN_TIMEOUT");if(!r.onError)throw t;r.onError(t)}}),r.timeout)),r.name=r.name||"When@"+a();var o=mt(r.name+"-effect",e),i=ne((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function Re(t,e){var r;var n=new Promise((function(n,o){var i=Ce(t,n,P(P({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Ie(t){return t[w]}function Le(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var ze={has:function(t,e){if(e===w||"constructor"===e||e===T)return!0;var r=Ie(t);return Le(e)?r.has(e):e in t},get:function(t,e){if(e===w||"constructor"===e||e===T)return t[e];var r=Ie(t),n=r.values.get(e);if(n instanceof _){var o=n.get();return void 0===o&&r.has(e),o}return Le(e)&&r.has(e),t[e]},set:function(t,e,r){return!!Le(e)&&(function t(e,r,n){if(2!==arguments.length||ir(e))if(pr(e)){var o=e[w],i=o.values.get(r);i?o.write(r,n):o.addObservableProp(r,n,o.defaultEnhancer)}else if(rr(e))e.set(r,n);else if(ir(e))e.add(r);else{if(!Je(e))return u(!1);"number"!=typeof r&&(r=parseInt(r,10)),c(r>=0,"Not a valid index: '"+r+"'"),Bt(),r>=e.length&&(e.length=r+1),e[r]=n,Ht()}else{Bt();var a=r;try{for(var s in a)t(e,s,a[s])}finally{Ht()}}}(t,e,r),!0)},deleteProperty:function(t,e){return!!Le(e)&&(Ie(t).remove(e),!0)},ownKeys:function(t){return Ie(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return u("Dynamic observable objects cannot be frozen"),!1}};function Be(t){var e=new Proxy(t,ze);return t[w].proxy=e,e}function He(t){return void 0!==t.interceptors&&t.interceptors.length>0}function Xe(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ue(t,e){var r=ft();try{for(var n=D(t.interceptors||[]),o=0,i=n.length;o<i&&(c(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{pt(r)}}function Fe(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function Ge(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ye(t,e){var r=ft(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);pt(r)}}var Ve={get:function(t,e){return e===w?t[w]:"length"===e?t[w].getArrayLength():"number"==typeof e?$e.get.call(t,e):"string"!=typeof e||isNaN(e)?$e.hasOwnProperty(e)?$e[e]:t[e]:$e.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[w].setArrayLength(r),"number"==typeof e&&$e.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:$e.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return u("Observable arrays cannot be frozen"),!1}};function We(t,e,r,n){void 0===r&&(r="ObservableArray@"+a()),void 0===n&&(n=!1);var o,i,u,c=new Ke(r,e,n);o=c.values,i=w,u=c,Object.defineProperty(o,i,{enumerable:!1,writable:!1,configurable:!0,value:u});var s=new Proxy(c.values,Ve);if(c.proxy=s,t&&t.length){var l=jt(!0);c.spliceWithArray(0,0,t),Et(l)}return s}var Ke=function(){function t(t,e,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(t||"ObservableArray@"+a()),this.enhancer=function(r,n){return e(r,n,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return Xe(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ge(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var r=new Array(t-e),n=0;n<t-e;n++)r[n]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=e},t.prototype.spliceWithArray=function(t,e,r){var n=this;ut(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:null==e?0:Math.max(0,Math.min(e,i-t)),void 0===r&&(r=o),He(this)){var a=Ue(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:r});if(!a)return o;e=a.removedCount,r=a.added}r=0===r.length?r:r.map((function(t){return n.enhancer(t,void 0)}));var u=this.spliceItemsIntoValues(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice(t,r,u),this.dehanceValues(u)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,D([t,e],r));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,r){var n=!this.owned&&!1,o=Fe(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Ye(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Fe(this),i=o||n?{object:this.proxy,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom.reportChanged(),o&&Ye(this,i)},t}(),$e={intercept:function(t){return this[w].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[w].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[w];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[w];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(t);case 2:return o.spliceWithArray(t,e)}return o.spliceWithArray(t,e,r)},spliceWithArray:function(t,e,r){return this[w].spliceWithArray(t,e,r)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[w];return r.spliceWithArray(r.values.length,0,t),r.values.length},pop:function(){return this.splice(Math.max(this[w].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[w];return r.spliceWithArray(0,0,t),r.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[w],r=e.dehanceValues(e.values).indexOf(t);return r>-1&&(this.splice(r,1),!0)},get:function(t){var e=this[w];if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(t,e){var r=this[w],n=r.values;if(t<n.length){ut(r.atom);var o=n[t];if(He(r)){var i=Ue(r,{type:"update",object:r.proxy,index:t,newValue:e});if(!i)return;e=i.newValue}(e=r.enhancer(e,o))!==o&&(n[t]=e,r.notifyArrayChildUpdate(t,e,o))}else{if(t!==n.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+n.length);r.spliceWithArray(t,0,[e])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){"function"==typeof Array.prototype[t]&&($e[t]=function(){var e=this[w];e.atom.reportObserved();var r=e.dehanceValues(e.values);return r[t].apply(r,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(t){"function"==typeof Array.prototype[t]&&($e[t]=function(e,r){var n=this,o=this[w];return o.atom.reportObserved(),o.dehanceValues(o.values)[t]((function(t,o){return e.call(r,t,o,n)}),r)})})),["reduce","reduceRight"].forEach((function(t){$e[t]=function(){var e=this,r=this[w];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(t,o,i){return o=r.dehanceValue(o),n(t,o,i,e)},r.values[t].apply(r.values,arguments)}}));var Ze,qe=d("ObservableArrayAdministration",Ke);function Je(t){return f(t)&&qe(t[w])}var Qe,tr={},er=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+a()),this.enhancer=e,this.name=r,this[Ze]=tr,this._keysAtom=j(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Rt.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new St(this._has(t),H,this.name+"."+g(t)+"?",!1);this._hasMap.set(t,n),ue(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(He(this)){var n=Ue(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!n)return this;e=n.newValue}return r?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if((ut(this._keysAtom),He(this))&&!(n=Ue(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Fe(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Me((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Ye(this,n),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);r&&r.setNewValue(e)},t.prototype._updateValue=function(t,e){var r=this._data.get(t);if((e=r.prepareNewValue(e))!==Rt.UNCHANGED){var n=Fe(this),o=n?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;0,r.setNewValue(e),n&&Ye(this,o)}},t.prototype._addValue=function(t,e){var r=this;ut(this._keysAtom),Me((function(){var n=new St(e,r.enhancer,r.name+"."+g(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=Fe(this),o=n?{type:"add",object:this,name:t,newValue:e}:null;n&&Ye(this,o)},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:t.get(o)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(Ze=w,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var r,n;try{for(var o=k(this),i=o.next();!i.done;i=o.next()){var a=A(i.value,2),u=a[0],c=a[1];t.call(e,c,u,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(t){var e=this;return rr(t)&&(t=t.toJS()),Me((function(){var r=jt(!0);try{p(t)?b(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=A(t,2),n=r[0],o=r[1];return e.set(n,o)})):h(t)?(t.constructor!==Map&&u("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,r){return e.set(r,t)}))):null!=t&&u("Cannot initialize map from "+t)}finally{Et(r)}})),this},t.prototype.clear=function(){var t=this;Me((function(){lt((function(){var e,r;try{for(var n=k(t.keys()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return Me((function(){var r,n,o,i,a=function(t){if(h(t)||rr(t))return t;if(Array.isArray(t))return new Map(t);if(p(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return u("Cannot convert to map from '"+t+"'")}(t),c=new Map,s=!1;try{for(var l=k(e._data.keys()),f=l.next();!f.done;f=l.next()){var y=f.value;if(!a.has(y))if(e.delete(y))s=!0;else{var d=e._data.get(y);c.set(y,d)}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}try{for(var v=k(a.entries()),b=v.next();!b.done;b=v.next()){var g=A(b.value,2),m=(y=g[0],d=g[1],e._data.has(y));if(e.set(y,d),e._data.has(y)){var O=e._data.get(y);c.set(y,O),m||(s=!0)}}}catch(t){o={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}if(!s)if(e._data.size!==c.size)e._keysAtom.reportChanged();else for(var w=e._data.keys(),_=c.keys(),x=w.next(),j=_.next();!x.done;){if(x.value!==j.value){e._keysAtom.reportChanged();break}x=w.next(),j=_.next()}e._data=c})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,r={};try{for(var n=k(this),o=n.next();!o.done;o=n.next()){var i=A(o.value,2),a=i[0],u=i[1];r["symbol"==typeof a?a:g(a)]=u}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map((function(e){return g(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return Ge(this,t)},t.prototype.intercept=function(t){return Xe(this,t)},t}(),rr=d("ObservableMap",er),nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+a()),this.name=r,this[Qe]=nr,this._data=new Set,this._atom=j(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Me((function(){lt((function(){var e,r;try{for(var n=k(t._data.values()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.forEach=function(t,e){var r,n;try{for(var o=k(this),i=o.next();!i.done;i=o.next()){var a=i.value;t.call(e,a,a,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((ut(this._atom),He(this))&&!(n=Ue(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Me((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=Fe(this),n=r?{type:"add",object:this,newValue:t}:null;0,r&&Ye(this,n)}return this},t.prototype.delete=function(t){var e=this;if(He(this)&&!(n=Ue(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Fe(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Me((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Ye(this,n),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=Array.from(this.keys()),r=Array.from(this.values());return mr({next:function(){var n=t;return t+=1,n<r.length?{value:[e[n],r[n]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t=this,e=0,r=Array.from(this._data.values());return mr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return ir(t)&&(t=t.toJS()),Me((function(){var r=jt(!0);try{Array.isArray(t)||v(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&u("Cannot initialize set from "+t)}finally{Et(r)}})),this},t.prototype.observe=function(t,e){return Ge(this,t)},t.prototype.intercept=function(t){return Xe(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(Qe=w,Symbol.iterator)]=function(){return this.values()},t}(),ir=d("ObservableSet",or),ar=function(){function t(t,e,r,n){void 0===e&&(e=new Map),this.target=t,this.values=e,this.name=r,this.defaultEnhancer=n,this.keysAtom=new _(r+".keys")}return t.prototype.read=function(t){return this.values.get(t).get()},t.prototype.write=function(t,e){var r=this.target,n=this.values.get(t);if(n instanceof kt)n.set(e);else{if(He(this)){if(!(i=Ue(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=i.newValue}if((e=n.prepareNewValue(e))!==Rt.UNCHANGED){var o=Fe(this),i=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;0,n.setNewValue(e),o&&Ye(this,i)}}},t.prototype.has=function(t){var e=this.pendingKeys||(this.pendingKeys=new Map),r=e.get(t);if(r)return r.get();var n=!!this.values.get(t);return r=new St(n,H,this.name+"."+g(t)+"?",!1),e.set(t,r),r.get()},t.prototype.addObservableProp=function(t,e,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(He(this)){var o=Ue(this,{object:this.proxy||n,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new St(e,r,this.name+"."+g(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return cr[t]||(cr[t]={configurable:!0,enumerable:!0,get:function(){return this[w].read(t)},set:function(e){this[w].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,r){var n,o,i,a=this.target;r.name=r.name||this.name+"."+g(e),this.values.set(e,new kt(r)),(t===a||(n=t,o=e,!(i=Object.getOwnPropertyDescriptor(n,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return sr[t]||(sr[t]={configurable:Rt.computedConfigurable,enumerable:!1,get:function(){return lr(this).read(t)},set:function(e){lr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(He(this))if(!(a=Ue(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Fe(this),n=this.values.get(t),o=n&&n.get();if(n&&n.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var i=this.pendingKeys.get(t);i&&i.set(!1)}delete this.target[t];var a=r?{type:"remove",object:this.proxy||e,oldValue:o,name:t}:null;0,r&&Ye(this,a)}finally{Ht()}}},t.prototype.illegalAccess=function(t,e){console.warn("Property '"+e+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(t,e){return Ge(this,t)},t.prototype.intercept=function(t){return Xe(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Fe(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Ye(this,n),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var r=[];try{for(var n=k(this.values),o=n.next();!o.done;o=n.next()){var i=A(o.value,2),a=i[0];i[1]instanceof St&&r.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t}();function ur(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=B),Object.prototype.hasOwnProperty.call(t,w))return t[w];p(t)||(e=(t.constructor.name||"ObservableObject")+"@"+a()),e||(e="ObservableObject@"+a());var n=new ar(t,new Map,g(e),r);return y(t,w,n),n}var cr=Object.create(null),sr=Object.create(null);function lr(t){var e=t[w];return e||(I(t),t[w])}var fr=d("ObservableObjectAdministration",ar);function pr(t){return!!f(t)&&(I(t),fr(t[w]))}function yr(t,e){if("object"==typeof t&&null!==t){if(Je(t))return void 0!==e&&u(!1),t[w].atom;if(ir(t))return t[w];if(rr(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||u(!1),n)}var n;if(I(t),e&&!t[w]&&t[e],pr(t))return e?((n=t[w].values.get(e))||u(!1),n):u(!1);if(x(t)||At(t)||Wt(t))return t}else if("function"==typeof t&&Wt(t[w]))return t[w];return u(!1)}function dr(t,e){return t||u("Expecting some object"),void 0!==e?dr(yr(t,e)):x(t)||At(t)||Wt(t)||rr(t)||ir(t)?t:(I(t),t[w]?t[w]:void u(!1))}var hr=Object.prototype.toString;function vr(t,e,r){return void 0===r&&(r=-1),function t(e,r,n,o,i){if(e===r)return 0!==e||1/e==1/r;if(null==e||null==r)return!1;if(e!=e)return r!=r;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof r)return!1;var u=hr.call(e);if(u!==hr.call(r))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:0==+e?1/+e==1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(r);case"[object Map]":case"[object Set]":n>=0&&n++}e=br(e),r=br(r);var c="[object Array]"===u;if(!c){if("object"!=typeof e||"object"!=typeof r)return!1;var s=e.constructor,l=r.constructor;if(s!==l&&!("function"==typeof s&&s instanceof s&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in r)return!1}if(0===n)return!1;n<0&&(n=-1);i=i||[];var f=(o=o||[]).length;for(;f--;)if(o[f]===e)return i[f]===r;if(o.push(e),i.push(r),c){if((f=e.length)!==r.length)return!1;for(;f--;)if(!t(e[f],r[f],n-1,o,i))return!1}else{var p=Object.keys(e),y=void 0;if(f=p.length,Object.keys(r).length!==f)return!1;for(;f--;)if(y=p[f],!gr(r,y)||!t(e[y],r[y],n-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,r)}function br(t){return Je(t)?t.slice():h(t)||rr(t)||v(t)||ir(t)?Array.from(t.entries()):t}function gr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function mr(t){return t[Symbol.iterator]=Or,t}function Or(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:$t,extras:{getDebugName:function(t,e){return(void 0!==e?yr(t,e):pr(t)||rr(t)||ir(t)?dr(t):yr(t)).name}},$mobx:w})}).call(this,r(149),r(74))},function(t,e,r){"use strict";r.d(e,"j",(function(){return z})),r.d(e,"h",(function(){return B})),r.d(e,"e",(function(){return h})),r.d(e,"g",(function(){return h})),r.d(e,"b",(function(){return g})),r.d(e,"f",(function(){return b})),r.d(e,"a",(function(){return m})),r.d(e,"c",(function(){return H})),r.d(e,"d",(function(){return X})),r.d(e,"k",(function(){return S})),r.d(e,"i",(function(){return o}));var n,o,i,a,u,c,s,l={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function y(t,e){for(var r in e)t[r]=e[r];return t}function d(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,r){var o,i,a,u={};for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:u[a]=e[a];if(arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===u[a]&&(u[a]=t.defaultProps[a]);return v(t,u,o,i,null)}function v(t,e,r,n,a){var u={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=o.vnode&&o.vnode(u),u}function b(){return{current:null}}function g(t){return t.children}function m(t,e){this.props=t,this.context=e}function O(t,e){if(null==e)return t.__?O(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?O(t):null}function w(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return w(t)}}function _(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!x.__r++||c!==o.debounceRendering)&&((c=o.debounceRendering)||u)(x)}function x(){for(var t;x.__r=a.length;)t=a.sort((function(t,e){return t.__v.__b-e.__v.__b})),a=[],t.some((function(t){var e,r,n,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(r=[],(n=y({},o)).__v=o.__v+1,M(a,o,n,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?O(o):i,o.__h),N(r,o),o.__e!=i&&w(o)))}))}function j(t,e,r,n,o,i,a,u,c,s){var p,y,d,h,b,m,w,_=n&&n.__k||f,x=_.length;for(r.__k=[],p=0;p<e.length;p++)if(null!=(h=r.__k[p]=null==(h=e[p])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?v(null,h,null,null,h):Array.isArray(h)?v(g,{children:h},null,null,null):h.__b>0?v(h.type,h.props,h.key,null,h.__v):h)){if(h.__=r,h.__b=r.__b+1,null===(d=_[p])||d&&h.key==d.key&&h.type===d.type)_[p]=void 0;else for(y=0;y<x;y++){if((d=_[y])&&h.key==d.key&&h.type===d.type){_[y]=void 0;break}d=null}M(t,h,d=d||l,o,i,a,u,c,s),b=h.__e,(y=h.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,h),w.push(y,h.__c||b,h)),null!=b?(null==m&&(m=b),"function"==typeof h.type&&h.__k===d.__k?h.__d=c=E(h,c,t):c=P(t,h,d,_,b,c),"function"==typeof r.type&&(r.__d=c)):c&&d.__e==c&&c.parentNode!=t&&(c=O(d))}for(r.__e=m,p=x;p--;)null!=_[p]&&("function"==typeof r.type&&null!=_[p].__e&&_[p].__e==r.__d&&(r.__d=O(n,p+1)),I(_[p],_[p]));if(w)for(p=0;p<w.length;p++)R(w[p],w[++p],w[++p])}function E(t,e,r){for(var n,o=t.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=t,e="function"==typeof n.type?E(n,e,r):P(r,n,n,o,n.__e,e));return e}function S(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){S(t,e)})):e.push(t)),e}function P(t,e,r,n,o,i){var a,u,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==r||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),a=null;else{for(u=i,c=0;(u=u.nextSibling)&&c<n.length;c+=2)if(u==o)break t;t.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function k(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||p.test(e)?r:r+"px"}function A(t,e,r,n,o){var i;t:if("style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||k(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||k(t.style,e,r[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n||t.addEventListener(e,i?T:D,i):t.removeEventListener(e,i?T:D,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==r?"":r;break t}catch(t){}"function"==typeof r||(null!=r&&(!1!==r||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,r):t.removeAttribute(e))}}function D(t){this.l[t.type+!1](o.event?o.event(t):t)}function T(t){this.l[t.type+!0](o.event?o.event(t):t)}function M(t,e,r,n,i,a,u,c,s){var l,f,p,d,h,v,b,O,w,_,x,E=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(s=r.__h,c=e.__e=r.__e,e.__h=null,a=[c]),(l=o.__b)&&l(e);try{t:if("function"==typeof E){if(O=e.props,w=(l=E.contextType)&&n[l.__c],_=l?w?w.props.value:l.__:n,r.__c?b=(f=e.__c=r.__c).__=f.__E:("prototype"in E&&E.prototype.render?e.__c=f=new E(O,_):(e.__c=f=new m(O,_),f.constructor=E,f.render=L),w&&w.sub(f),f.props=O,f.state||(f.state={}),f.context=_,f.__n=n,p=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=E.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=y({},f.__s)),y(f.__s,E.getDerivedStateFromProps(O,f.__s))),d=f.props,h=f.state,p)null==E.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==E.getDerivedStateFromProps&&O!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(O,_),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(O,f.__s,_)||e.__v===r.__v){f.props=O,f.state=f.__s,e.__v!==r.__v&&(f.__d=!1),f.__v=e,e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),f.__h.length&&u.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(O,f.__s,_),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(d,h,v)}))}f.context=_,f.props=O,f.state=f.__s,(l=o.__r)&&l(e),f.__d=!1,f.__v=e,f.__P=t,l=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(n=y(y({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(d,h)),x=null!=l&&l.type===g&&null==l.key?l.props.children:l,j(t,Array.isArray(x)?x:[x],e,r,n,i,a,u,c,s),f.base=e.__e,e.__h=null,f.__h.length&&u.push(f),b&&(f.__E=f.__=null),f.__e=!1}else null==a&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=C(r.__e,e,r,n,i,a,u,s);(l=o.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=c,e.__h=!!s,a[a.indexOf(c)]=null),o.__e(t,e,r)}}function N(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function C(t,e,r,o,i,a,u,c){var s,f,p,y=r.props,h=e.props,v=e.type,b=0;if("svg"===v&&(i=!0),null!=a)for(;b<a.length;b++)if((s=a[b])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,a[b]=null;break}if(null==t){if(null===v)return document.createTextNode(h);t=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,h.is&&h),a=null,c=!1}if(null===v)y===h||c&&t.data===h||(t.data=h);else{if(a=a&&n.call(t.childNodes),f=(y=r.props||l).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!c){if(null!=a)for(y={},b=0;b<t.attributes.length;b++)y[t.attributes[b].name]=t.attributes[b].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||A(t,i,null,r[i],n);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===e[i]||A(t,i,e[i],r[i],n)}(t,h,y,i,c),p)e.__k=[];else if(b=e.props.children,j(t,Array.isArray(b)?b:[b],e,r,o,i&&"foreignObject"!==v,a,u,a?a[0]:r.__k&&O(r,0),c),null!=a)for(b=a.length;b--;)null!=a[b]&&d(a[b]);c||("value"in h&&void 0!==(b=h.value)&&(b!==y.value||b!==t.value||"progress"===v&&!b)&&A(t,"value",b,y.value,!1),"checked"in h&&void 0!==(b=h.checked)&&b!==t.checked&&A(t,"checked",b,y.checked,!1))}return t}function R(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,r)}}function I(t,e,r){var n,i;if(o.unmount&&o.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||R(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){o.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&I(n[i],e,"function"!=typeof t.type);r||null==t.__e||d(t.__e),t.__e=t.__d=void 0}function L(t,e,r){return this.constructor(t,r)}function z(t,e,r){var i,a,u;o.__&&o.__(t,e),a=(i="function"==typeof r)?null:r&&r.__k||e.__k,u=[],M(e,t=(!i&&r||e).__k=h(g,null,[t]),a||l,l,void 0!==e.ownerSVGElement,!i&&r?[r]:a?null:e.firstChild?n.call(e.childNodes):null,u,!i&&r?r:a?a.__e:e.firstChild,i),N(u,t)}function B(t,e){z(t,e,B)}function H(t,e,r){var o,i,a,u=y({},t.props);for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:u[a]=e[a];return arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),v(t.type,u,o||t.key,i||t.ref,null)}function X(t,e){var r={__c:e="__cC"+s++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(_)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n=f.slice,o={__e:function(t,e){for(var r,n,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t),o=r.__d),o)return r.__E=r}catch(e){t=e}throw t}},i=0,m.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof t&&(t=t(y({},r),this.props)),t&&y(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),_(this))},m.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),_(this))},m.prototype.render=g,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,x.__r=0,s=0},function(t,e,r){var n=r(113),o=r(47),i=r(172);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";var n=r(39),o=r(75),i=r(66),a=r(59),u=r(107),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){"use strict";var n=r(19),o=r(10),i=r(49),a=r(95),u=r(34),c=r(17),s=r(77),l=r(33),f=r(103),p=r(21),y=r(32),d=r(93),h=r(28),v=r(30),b=r(56),g=r(82),m=r(29),O=r(37),w=r(39),_=r(81),x=r(38),j=r(67),E=r(52),S=r(63),P=r(68),k=r(132),A=r(108),D=r(54),T=r(35),M=r(86),N=r(116),C=r(47),R=r(76),I=r(85),L=r(65),z=r(78),B=r(26),H=r(143),X=r(144),U=r(89),F=r(59),G=r(69).forEach,Y=I("hidden"),V=B("toPrimitive"),W=F.set,K=F.getterFor("Symbol"),$=Object.prototype,Z=o.Symbol,q=Z&&Z.prototype,J=o.TypeError,Q=o.QObject,tt=i("JSON","stringify"),et=D.f,rt=T.f,nt=k.f,ot=M.f,it=c([].push),at=R("symbols"),ut=R("op-symbols"),ct=R("string-to-symbol-registry"),st=R("symbol-to-string-registry"),lt=R("wks"),ft=!Q||!Q.prototype||!Q.prototype.findChild,pt=l&&p((function(){return 7!=E(rt({},"a",{get:function(){return rt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=et($,e);n&&delete $[e],rt(t,e,r),n&&t!==$&&rt($,e,n)}:rt,yt=function(t,e){var r=at[t]=E(q);return W(r,{type:"Symbol",tag:t,description:e}),l||(r.description=e),r},dt=function(t,e,r){t===$&&dt(ut,e,r),m(t);var n=_(e);return m(r),y(at,n)?(r.enumerable?(y(t,Y)&&t[Y][n]&&(t[Y][n]=!1),r=E(r,{enumerable:j(0,!1)})):(y(t,Y)||rt(t,Y,j(1,{})),t[Y][n]=!0),pt(t,n,r)):rt(t,n,r)},ht=function(t,e){m(t);var r=w(e),n=S(r).concat(mt(r));return G(n,(function(e){l&&!u(vt,r,e)||dt(t,e,r[e])})),t},vt=function(t){var e=_(t),r=u(ot,this,e);return!(this===$&&y(at,e)&&!y(ut,e))&&(!(r||!y(this,e)||!y(at,e)||y(this,Y)&&this[Y][e])||r)},bt=function(t,e){var r=w(t),n=_(e);if(r!==$||!y(at,n)||y(ut,n)){var o=et(r,n);return!o||!y(at,n)||y(r,Y)&&r[Y][n]||(o.enumerable=!0),o}},gt=function(t){var e=nt(w(t)),r=[];return G(e,(function(t){y(at,t)||y(L,t)||it(r,t)})),r},mt=function(t){var e=t===$,r=nt(e?ut:w(t)),n=[];return G(r,(function(t){!y(at,t)||e&&!y($,t)||it(n,at[t])})),n};(f||(C(q=(Z=function(){if(b(q,this))throw J("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?x(arguments[0]):void 0,e=z(t),r=function(t){this===$&&u(r,ut,t),y(this,Y)&&y(this[Y],e)&&(this[Y][e]=!1),pt(this,e,j(1,t))};return l&&ft&&pt($,e,{configurable:!0,set:r}),yt(e,t)}).prototype,"toString",(function(){return K(this).tag})),C(Z,"withoutSetter",(function(t){return yt(z(t),t)})),M.f=vt,T.f=dt,D.f=bt,P.f=k.f=gt,A.f=mt,H.f=function(t){return yt(B(t),t)},l&&(rt(q,"description",{configurable:!0,get:function(){return K(this).description}}),s||C($,"propertyIsEnumerable",vt,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:Z}),G(S(lt),(function(t){X(t)})),n({target:"Symbol",stat:!0,forced:!f},{for:function(t){var e=x(t);if(y(ct,e))return ct[e];var r=Z(e);return ct[e]=r,st[r]=e,r},keyFor:function(t){if(!g(t))throw J(t+" is not a symbol");if(y(st,t))return st[t]},useSetter:function(){ft=!0},useSimple:function(){ft=!1}}),n({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?E(t):ht(E(t),e)},defineProperty:dt,defineProperties:ht,getOwnPropertyDescriptor:bt}),n({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:gt,getOwnPropertySymbols:mt}),n({target:"Object",stat:!0,forced:p((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(O(t))}}),tt)&&n({target:"JSON",stat:!0,forced:!f||p((function(){var t=Z();return"[null]"!=tt([t])||"{}"!=tt({a:t})||"{}"!=tt(Object(t))}))},{stringify:function(t,e,r){var n=N(arguments),o=e;if((v(e)||void 0!==t)&&!g(t))return d(e)||(e=function(t,e){if(h(o)&&(e=u(o,this,t,e)),!g(e))return e}),n[1]=e,a(tt,null,n)}});if(!q[V]){var Ot=q.valueOf;C(q,V,(function(t){return u(Ot,this)}))}U(Z,"Symbol"),L[Y]=!0},function(t,e,r){var n=r(10),o=r(141),i=r(142),a=r(3),u=r(53),c=r(26),s=c("iterator"),l=c("toStringTag"),f=a.values,p=function(t,e){if(t){if(t[s]!==f)try{u(t,s,f)}catch(e){t[s]=f}if(t[l]||u(t,l,e),o[e])for(var r in a)if(t[r]!==a[r])try{u(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var y in o)p(n[y]&&n[y].prototype,y);p(i,"DOMTokenList")},function(t,e,r){"use strict";var n=r(140).charAt,o=r(38),i=r(59),a=r(107),u=i.set,c=i.getterFor("String Iterator");a(String,"String",(function(t){u(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=c(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){"use strict";var n=r(19),o=r(33),i=r(10),a=r(17),u=r(32),c=r(28),s=r(56),l=r(38),f=r(35).f,p=r(127),y=i.Symbol,d=y&&y.prototype;if(o&&c(y)&&(!("description"in d)||void 0!==y().description)){var h={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(d,this)?new y(t):void 0===t?y():y(t);return""===t&&(h[e]=!0),e};p(v,y),v.prototype=d,d.constructor=v;var b="Symbol(test)"==String(y("test")),g=a(d.toString),m=a(d.valueOf),O=/^Symbol\((.*)\)[^)]+$/,w=a("".replace),_=a("".slice);f(d,"description",{configurable:!0,get:function(){var t=m(this),e=g(t);if(u(h,t))return"";var r=b?_(e,7,-1):w(e,O,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},function(t,e,r){r(144)("iterator")},function(t,e,r){var n=r(10),o=r(141),i=r(142),a=r(173),u=r(53),c=function(t){if(t&&t.forEach!==a)try{u(t,"forEach",a)}catch(e){t.forEach=a}};for(var s in o)o[s]&&c(n[s]&&n[s].prototype);c(i)},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(74))},function(t,e,r){"use strict";r.d(e,"j",(function(){return h})),r.d(e,"i",(function(){return b})),r.d(e,"h",(function(){return O})),r.d(e,"c",(function(){return a.e})),r.d(e,"a",(function(){return a.a})),r.d(e,"b",(function(){return A})),r.d(e,"f",(function(){return D})),r.d(e,"e",(function(){return N})),r.d(e,"g",(function(){return ot}));var n,o,i,a=r(1),u=0,c=[],s=a.i.__b,l=a.i.__r,f=a.i.diffed,p=a.i.__c,y=a.i.unmount;function d(t,e){a.i.__h&&a.i.__h(o,t,u||e),u=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function h(t){return u=1,v(S,t)}function v(t,e,r){var i=d(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):S(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function b(t,e){var r=d(n++,3);!a.i.__s&&E(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function g(t,e){var r=d(n++,4);!a.i.__s&&E(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=d(n++,7);return E(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function O(t,e){return u=8,m((function(){return t}),e)}function w(){c.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(x),t.__H.__h.forEach(j),t.__H.__h=[]}catch(e){t.__H.__h=[],a.i.__e(e,t.__v)}})),c=[]}a.i.__b=function(t){o=null,s&&s(t)},a.i.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(x),e.__h.forEach(j),e.__h=[])},a.i.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===a.i.requestAnimationFrame||((i=a.i.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),_&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);_&&(e=requestAnimationFrame(r))})(w)),o=null},a.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(x),t.__h=t.__h.filter((function(t){return!t.__||j(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.i.__e(r,t.__v)}})),p&&p(t,e)},a.i.unmount=function(t){y&&y(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{x(t)}catch(t){e=t}})),e&&a.i.__e(e,r.__v))};var _="function"==typeof requestAnimationFrame;function x(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function j(t){var e=o;t.__c=t.__(),o=e}function E(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function S(t,e){return"function"==typeof e?e(t):e}function P(t,e){for(var r in e)t[r]=e[r];return t}function k(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function A(t){this.props=t}function D(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:k(this.props,t)}function n(e){return this.shouldComponentUpdate=r,Object(a.e)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(A.prototype=new a.a).isPureReactComponent=!0,A.prototype.shouldComponentUpdate=function(t,e){return k(this.props,t)||k(this.state,e)};var T=a.i.__b;a.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),T&&T(t)};var M="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(t){function e(e,r){var n=P({},e);return delete n.ref,t(n,(r=e.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return e.$$typeof=M,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var C=function(t,e){return null==t?null:Object(a.k)(Object(a.k)(t).map(e))},R={map:C,forEach:C,count:function(t){return t?Object(a.k)(t).length:0},only:function(t){var e=Object(a.k)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:a.k},I=a.i.__e;a.i.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e);I(t,e,r)};var L=a.i.unmount;function z(){this.__u=0,this.t=null,this.__b=null}function B(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function H(){this.u=null,this.o=null}a.i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),L&&L(t)},(z.prototype=new a.a).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=B(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(u):u())};r.__R=a;var u=function(){if(!--n.__u){if(n.state.__e){var t=n.state.__e;n.__v.__k[0]=function t(e,r,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)})),e.__c&&e.__c.__P===r&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__e:n.__b=null});e=n.t.pop();)e.forceUpdate()}},c=!0===e.__h;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(a,a)},z.prototype.componentWillUnmount=function(){this.t=[]},z.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,r,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),e.__c.__H=null),null!=(e=P({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=r),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)}))),e}(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&Object(a.e)(a.b,null,t.fallback);return o&&(o.__h=null),[Object(a.e)(a.b,null,e.__e?null:t.children),o]};var X=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function U(t){return this.getChildContext=function(){return t.context},t.children}function F(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(a.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,r){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),Object(a.j)(Object(a.e)(U,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(H.prototype=new a.a).__e=function(t){var e=this,r=B(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),X(e,t,n)):o()};r?r(i):i()}},H.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(a.k)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},H.prototype.componentDidUpdate=H.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){X(t,r,e)}))};var G="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Y=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,V="undefined"!=typeof document,W=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};a.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(a.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var K=a.i.event;function $(){}function Z(){return this.cancelBubble}function q(){return this.defaultPrevented}a.i.event=function(t){return K&&(t=K(t)),t.persist=$,t.isPropagationStopped=Z,t.isDefaultPrevented=q,t.nativeEvent=t};var J,Q={configurable:!0,get:function(){return this.class}},tt=a.i.vnode;a.i.vnode=function(t){var e=t.type,r=t.props,n=r;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in n={},r){var u=r[i];V&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==u||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===u?u="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!W(r.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&Y.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===u&&(u=void 0),n[i]=u)}"select"==e&&n.multiple&&Array.isArray(n.value)&&(n.value=Object(a.k)(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=Object(a.k)(r.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),t.props=n,r.class!=r.className&&(Q.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",Q))}t.$$typeof=G,tt&&tt(t)};var et=a.i.__r;a.i.__r=function(t){et&&et(t),J=t.__c};var rt={ReactCurrentDispatcher:{current:{readContext:function(t){return J.__n[t.__c].props.value}}}};function nt(t){return!!t&&t.$$typeof===G}var ot=function(t,e){return t(e)};a.b,e.d={useState:h,useReducer:v,useEffect:b,useLayoutEffect:g,useRef:function(t){return u=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){u=6,g((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:m,useCallback:O,useContext:function(t){var e=o.context[t.__c],r=d(n++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__},useDebugValue:function(t,e){a.i.useDebugValue&&a.i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:R,render:function(t,e,r){return null==e.__k&&(e.textContent=""),Object(a.j)(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return Object(a.h)(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(Object(a.j)(null,t),!0)},createPortal:function(t,e){return Object(a.e)(F,{__v:t,i:e})},createElement:a.e,createContext:a.d,createFactory:function(t){return a.e.bind(null,t)},cloneElement:function(t){return nt(t)?a.c.apply(null,arguments):t},createRef:a.f,Fragment:a.b,isValidElement:nt,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:a.a,PureComponent:A,memo:D,forwardRef:N,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:ot,StrictMode:a.b,Suspense:z,SuspenseList:H,lazy:function(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return Object(a.e)(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:rt}},function(t,e,r){r(19)({target:"Object",stat:!0},{setPrototypeOf:r(110)})},function(t,e,r){var n=r(19),o=r(21),i=r(37),a=r(88),u=r(130);n({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,r){var n=r(19),o=r(49),i=r(95),a=r(192),u=r(150),c=r(29),s=r(30),l=r(52),f=r(21),p=o("Reflect","construct"),y=Object.prototype,d=[].push,h=f((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!f((function(){p((function(){}))})),b=h||v;n({target:"Reflect",stat:!0,forced:b,sham:b},{construct:function(t,e){u(t),c(e);var r=arguments.length<3?t:u(arguments[2]);if(v&&!h)return p(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return i(d,n,e),new(i(a,t,n))}var o=r.prototype,f=l(s(o)?o:y),b=i(t,f,e);return s(b)?b:f}})},function(t,e,r){var n=r(19),o=r(37),i=r(63);n({target:"Object",stat:!0,forced:r(21)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){var n=r(19),o=r(21),i=r(39),a=r(54).f,u=r(33),c=o((function(){a(1)}));n({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},function(t,e){var r=Function.prototype,n=r.bind,o=r.call,i=n&&n.bind(o);t.exports=n?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,r){"use strict";var n=r(19),o=r(10),i=r(93),a=r(94),u=r(30),c=r(64),s=r(45),l=r(39),f=r(60),p=r(26),y=r(70),d=r(116),h=y("slice"),v=p("species"),b=o.Array,g=Math.max;n({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var r,n,o,p=l(this),y=s(p),h=c(t,y),m=c(void 0===e?y:e,y);if(i(p)&&(r=p.constructor,(a(r)&&(r===b||i(r.prototype))||u(r)&&null===(r=r[v]))&&(r=void 0),r===b||void 0===r))return d(p,h,m);for(n=new(void 0===r?b:r)(g(m-h,0)),o=0;h<m;h++,o++)h in p&&f(n,o,p[h]);return n.length=o,n}})},function(t,e,r){var n=r(10),o=r(54).f,i=r(53),a=r(47),u=r(102),c=r(127),s=r(109);t.exports=function(t,e){var r,l,f,p,y,d=t.target,h=t.global,v=t.stat;if(r=h?n:v?n[d]||u(d,{}):(n[d]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(y=o(r,l))&&y.value:r[l],!s(h?l:d+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(r,l,p,t)}}},function(t,e,r){"use strict";var n=r(19),o=r(96);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(33),o=r(87).EXISTS,i=r(17),a=r(35).f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);n&&!o&&a(u,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},function(t,e,r){var n=r(19),o=r(176);n({target:"Array",stat:!0,forced:!r(138)((function(t){Array.from(t)}))},{from:o})},function(t,e,r){"use strict";var n=r(19),o=r(69).filter;n({target:"Array",proto:!0,forced:!r(70)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(19),o=r(33),i=r(128),a=r(39),u=r(54),c=r(60);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=a(t),o=u.f,s=i(n),l={},f=0;s.length>f;)void 0!==(r=o(n,e=s[f++]))&&c(l,e,r);return l}})},function(t,e,r){var n=r(10),o=r(76),i=r(32),a=r(78),u=r(103),c=r(122),s=o("wks"),l=n.Symbol,f=l&&l.for,p=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):p(e)}return s[t]}},function(t,e,r){"use strict";var n=r(100),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,r){var n=r(10),o=r(30),i=n.String,a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},function(t,e,r){var n=r(28);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},,function(t,e,r){var n=r(17),o=r(37),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,r){var n=r(21);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){var r=Function.prototype.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,r){var n=r(10),o=r(33),i=r(123),a=r(29),u=r(81),c=n.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,r){if(a(t),e=u(e),a(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){"use strict";var n=r(19),o=r(10),i=r(21),a=r(93),u=r(30),c=r(37),s=r(45),l=r(60),f=r(114),p=r(70),y=r(26),d=r(79),h=y("isConcatSpreadable"),v=o.TypeError,b=d>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),g=p("concat"),m=function(t){if(!u(t))return!1;var e=t[h];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,forced:!b||!g},{concat:function(t){var e,r,n,o,i,a=c(this),u=f(a,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(m(i=-1===e?a:arguments[e])){if(p+(o=s(i))>9007199254740991)throw v("Maximum allowed index exceeded");for(r=0;r<o;r++,p++)r in i&&l(u,p,i[r])}else{if(p>=9007199254740991)throw v("Maximum allowed index exceeded");l(u,p++,i)}return u.length=p,u}})},function(t,e,r){var n=r(10),o=r(44),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(10),o=r(92),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,r){var n=r(73),o=r(44);t.exports=function(t){return n(o(t))}},function(t,e,r){"use strict";var n=r(19),o=r(69).map;n({target:"Array",proto:!0,forced:!r(70)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(19),o=r(193);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,r){var n=r(19),o=r(34),i=r(30),a=r(29),u=r(197),c=r(54),s=r(88);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,l,f=arguments.length<3?e:arguments[2];return a(e)===f?e[r]:(n=c.f(e,r))?u(n)?n.value:void 0===n.get?void 0:o(n.get,f):i(l=s(e))?t(l,r,f):void 0}})},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return s}));var n=r(11),o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function i(){var t=o(Object(n.j)(0),2)[1];return Object(n.h)((function(){t((function(t){return t+1}))}),[])}function a(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}function u(t){return"function"==typeof Symbol?Symbol.for(t):"__$mobx-react "+t+"__"}var c={};function s(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:c}}).call(this,r(74))},function(t,e,r){var n=r(10).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},function(t,e,r){var n=r(84);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(19),o=r(201),i=r(75);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e,r){var n=r(10),o=r(28),i=r(32),a=r(53),u=r(102),c=r(106),s=r(59),l=r(87).CONFIGURABLE,f=s.get,p=s.enforce,y=String(String).split("String");(t.exports=function(t,e,r,c){var s,f=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,h=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||l&&r.name!==v)&&a(r,"name",v),(s=p(r)).source||(s.source=y.join("string"==typeof v?v:""))),t!==n?(f?!h&&t[e]&&(d=!0):delete t[e],d?t[e]=r:a(t,e,r)):d?t[e]=r:u(e,r)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||c(this)}))},function(t,e,r){"use strict";(function(t){var n=r(100),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.a.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=u}).call(this,r(117)(t))},function(t,e,r){var n=r(10),o=r(28),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},function(t,e,r){var n=r(19),o=r(200).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(17),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){var n,o=r(29),i=r(159),a=r(105),u=r(65),c=r(161),s=r(104),l=r(85),f=l("IE_PROTO"),p=function(){},y=function(t){return"<script>"+t+"<\/script>"},d=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},h=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;h="undefined"!=typeof document?document.domain&&n?d(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F):d(n);for(var r=a.length;r--;)delete h.prototype[a[r]];return h()};u[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[f]=t):r=h(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(33),o=r(35),i=r(67);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(33),o=r(34),i=r(86),a=r(67),u=r(39),c=r(81),s=r(32),l=r(123),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=u(t),e=c(e),l)try{return f(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},function(t,e,r){"use strict";(function(t){var n=r(27),o=r(155),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?n.a.Buffer:void 0,c=(u?u.isBuffer:void 0)||o.a;e.a=c}).call(this,r(117)(t))},function(t,e,r){var n=r(17);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(62);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?n:r)(e)}},function(t,e,r){var n,o,i,a=r(162),u=r(10),c=r(17),s=r(30),l=r(53),f=r(32),p=r(101),y=r(85),d=r(65),h=u.TypeError,v=u.WeakMap;if(a||p.state){var b=p.state||(p.state=new v),g=c(b.get),m=c(b.has),O=c(b.set);n=function(t,e){if(m(b,t))throw new h("Object already initialized");return e.facade=t,O(b,t,e),e},o=function(t){return g(b,t)||{}},i=function(t){return m(b,t)}}else{var w=y("state");d[w]=!0,n=function(t,e){if(f(t,w))throw new h("Object already initialized");return e.facade=t,l(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){"use strict";var n=r(81),o=r(35),i=r(67);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},function(t,e,r){"use strict";var n=r(95),o=r(34),i=r(17),a=r(118),u=r(148),c=r(29),s=r(44),l=r(189),f=r(119),p=r(84),y=r(38),d=r(57),h=r(111),v=r(120),b=r(96),g=r(145),m=r(21),O=g.UNSUPPORTED_Y,w=Math.min,_=[].push,x=i(/./.exec),j=i(_),E=i("".slice);a("split",(function(t,e,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var i=y(s(this)),a=void 0===r?4294967295:r>>>0;if(0===a)return[];if(void 0===t)return[i];if(!u(t))return o(e,i,t,a);for(var c,l,f,p=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=new RegExp(t.source,d+"g");(c=o(b,g,i))&&!((l=g.lastIndex)>v&&(j(p,E(i,v,c.index)),c.length>1&&c.index<i.length&&n(_,p,h(c,1)),f=c[0].length,v=l,p.length>=a));)g.lastIndex===c.index&&g.lastIndex++;return v===i.length?!f&&x(g,"")||j(p,""):j(p,E(i,v)),p.length>a?h(p,0,a):p}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=s(this),a=null==e?void 0:d(e,t);return a?o(a,e,n,r):o(i,y(n),e,r)},function(t,n){var o=c(this),a=y(t),u=r(i,o,a,n,i!==e);if(u.done)return u.value;var s=l(o,RegExp),d=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),b=new s(O?"^(?:"+o.source+")":o,h),g=void 0===n?4294967295:n>>>0;if(0===g)return[];if(0===a.length)return null===v(b,a)?[a]:[];for(var m=0,_=0,x=[];_<a.length;){b.lastIndex=O?0:_;var S,P=v(b,O?E(a,_):a);if(null===P||(S=w(p(b.lastIndex+(O?_:0)),a.length))===m)_=f(a,_,d);else{if(j(x,E(a,m,_)),x.length===g)return x;for(var k=1;k<=P.length-1;k++)if(j(x,P[k]),x.length===g)return x;_=m=S}}return j(x,E(a,m)),x}]}),!!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),O)},function(t,e,r){var n=r(10),o=r(28),i=r(83),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},function(t,e,r){var n=r(125),o=r(105);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(58),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e){t.exports={}},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(125),o=r(105).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(91),o=r(17),i=r(73),a=r(37),u=r(45),c=r(114),s=o([].push),l=function(t){var e=1==t,r=2==t,o=3==t,l=4==t,f=6==t,p=7==t,y=5==t||f;return function(d,h,v,b){for(var g,m,O=a(d),w=i(O),_=n(h,v),x=u(w),j=0,E=b||c,S=e?E(d,x):r||p?E(d,0):void 0;x>j;j++)if((y||j in w)&&(m=_(g=w[j],j,O),t))if(e)S[j]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return j;case 2:s(S,g)}else switch(t){case 4:return!1;case 7:s(S,g)}return f?-1:o||l?l:S}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,r){var n=r(21),o=r(26),i=r(79),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){"use strict";var n=r(33),o=r(10),i=r(17),a=r(109),u=r(47),c=r(32),s=r(139),l=r(56),f=r(82),p=r(124),y=r(21),d=r(68).f,h=r(54).f,v=r(35).f,b=r(190),g=r(151).trim,m=o.Number,O=m.prototype,w=o.TypeError,_=i("".slice),x=i("".charCodeAt),j=function(t){var e=p(t,"number");return"bigint"==typeof e?e:E(e)},E=function(t){var e,r,n,o,i,a,u,c,s=p(t,"number");if(f(s))throw w("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=g(s),43===(e=x(s,0))||45===e){if(88===(r=x(s,2))||120===r)return NaN}else if(48===e){switch(x(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=_(s,2)).length,u=0;u<a;u++)if((c=x(i,u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(a("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var S,P=function(t){var e=arguments.length<1?0:m(j(t)),r=this;return l(O,r)&&y((function(){b(r)}))?s(Object(e),r,P):e},k=n?d(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),A=0;k.length>A;A++)c(m,S=k[A])&&!c(P,S)&&v(P,S,h(m,S));P.prototype=O,O.constructor=P,u(o,"Number",P)}},function(t,e,r){r(19)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(10),o=r(17),i=r(21),a=r(51),u=n.Object,c=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):u(t)}:u},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(26),o=r(52),i=r(35),a=n("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,e,r){var n=r(77),o=r(101);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,r){var n=r(17),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e,r){var n,o,i=r(10),a=r(80),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,l=s&&s.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},function(t,e,r){var n=r(49);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(124),o=r(82);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(10),o=r(49),i=r(28),a=r(56),u=r(122),c=n.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},function(t,e,r){var n=r(10).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(58),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(76),o=r(78),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e,r){var n=r(33),o=r(32),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},function(t,e,r){var n=r(10),o=r(32),i=r(28),a=r(37),u=r(85),c=r(130),s=u("IE_PROTO"),l=n.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?f:null}},function(t,e,r){var n=r(35).f,o=r(32),i=r(26)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){"use strict";r(165)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(169))},function(t,e,r){var n=r(17),o=r(62),i=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(10),o=r(113),i=r(28),a=r(51),u=r(26)("toStringTag"),c=n.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?r:s?a(e):"Object"==(n=a(e))&&i(e.callee)?"Arguments":n}},function(t,e,r){var n=r(51);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(17),o=r(21),i=r(28),a=r(92),u=r(49),c=r(106),s=function(){},l=[],f=u("Reflect","construct"),p=/^\s*(?:class|function)\b/,y=n(p.exec),d=!p.exec(s),h=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}};t.exports=!f||o((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return d||!!y(p,c(t))}:h},function(t,e){var r=Function.prototype,n=r.apply,o=r.bind,i=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(n):function(){return i.apply(n,arguments)})},function(t,e,r){"use strict";var n,o,i=r(34),a=r(17),u=r(38),c=r(178),s=r(145),l=r(76),f=r(52),p=r(59).get,y=r(179),d=r(180),h=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,b=v,g=a("".charAt),m=a("".indexOf),O=a("".replace),w=a("".slice),_=(o=/b*/g,i(v,n=/a/,"a"),i(v,o,"a"),0!==n.lastIndex||0!==o.lastIndex),x=s.BROKEN_CARET,j=void 0!==/()??/.exec("")[1];(_||j||x||y||d)&&(b=function(t){var e,r,n,o,a,s,l,y=this,d=p(y),E=u(t),S=d.raw;if(S)return S.lastIndex=y.lastIndex,e=i(b,S,E),y.lastIndex=S.lastIndex,e;var P=d.groups,k=x&&y.sticky,A=i(c,y),D=y.source,T=0,M=E;if(k&&(A=O(A,"y",""),-1===m(A,"g")&&(A+="g"),M=w(E,y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&"\n"!==g(E,y.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,T++),r=new RegExp("^(?:"+D+")",A)),j&&(r=new RegExp("^"+D+"$(?!\\s)",A)),_&&(n=y.lastIndex),o=i(v,k?r:y,M),k?o?(o.input=w(o.input,T),o[0]=w(o[0],T),o.index=y.lastIndex,y.lastIndex+=o[0].length):y.lastIndex=0:_&&o&&(y.lastIndex=y.global?o.index+o[0].length:n),j&&o&&o.length>1&&i(h,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&P)for(o.groups=s=f(null),a=0;a<P.length;a++)s[(l=P[a])[0]]=o[l[1]];return o}),t.exports=b},function(t,e,r){"use strict";var n=r(19),o=r(10),i=r(64),a=r(58),u=r(45),c=r(37),s=r(114),l=r(60),f=r(70)("splice"),p=o.TypeError,y=Math.max,d=Math.min;n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,o,f,h,v,b=c(this),g=u(b),m=i(t,g),O=arguments.length;if(0===O?r=n=0:1===O?(r=0,n=g-m):(r=O-2,n=d(y(a(e),0),g-m)),g+r-n>9007199254740991)throw p("Maximum allowed length exceeded");for(o=s(b,n),f=0;f<n;f++)(h=m+f)in b&&l(o,f,b[h]);if(o.length=n,r<n){for(f=m;f<g-n;f++)v=f+r,(h=f+n)in b?b[v]=b[h]:delete b[v];for(f=g;f>g-n+r;f--)delete b[f-1]}else if(r>n)for(f=g-n;f>m;f--)v=f+r-1,(h=f+n-1)in b?b[v]=b[h]:delete b[v];for(f=0;f<r;f++)b[f+m]=arguments[f+2];return b.length=g-n+r,o}})},function(t,e,r){"use strict";var n=r(19),o=r(17),i=r(73),a=r(39),u=r(115),c=o([].join),s=i!=Object,l=u("join",",");n({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(a(this),void 0===t?",":t)}})},function(t,e,r){"use strict";var n=r(19),o=r(194);n({target:"String",proto:!0,forced:r(195)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(74))},function(t,e,r){var n=r(10),o=r(102),i=n["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,r){var n=r(10),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},function(t,e,r){var n=r(79),o=r(21);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e,r){var n=r(10),o=r(30),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var n=r(17),o=r(28),i=r(101),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},function(t,e,r){"use strict";var n=r(19),o=r(34),i=r(77),a=r(87),u=r(28),c=r(163),s=r(88),l=r(110),f=r(89),p=r(53),y=r(47),d=r(26),h=r(66),v=r(129),b=a.PROPER,g=a.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,w=d("iterator"),_=function(){return this};t.exports=function(t,e,r,a,d,v,x){c(r,e,a);var j,E,S,P=function(t){if(t===d&&M)return M;if(!O&&t in D)return D[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},k=e+" Iterator",A=!1,D=t.prototype,T=D[w]||D["@@iterator"]||d&&D[d],M=!O&&T||P(d),N="Array"==e&&D.entries||T;if(N&&(j=s(N.call(new t)))!==Object.prototype&&j.next&&(i||s(j)===m||(l?l(j,m):u(j[w])||y(j,w,_)),f(j,k,!0,!0),i&&(h[k]=_)),b&&"values"==d&&T&&"values"!==T.name&&(!i&&g?p(D,"name","values"):(A=!0,M=function(){return o(T,this)})),d)if(E={values:P("values"),keys:v?M:P("keys"),entries:P("entries")},x)for(S in E)(O||A||!(S in D))&&y(D,S,E[S]);else n({target:e,proto:!0,forced:O||A},E);return i&&!x||D[w]===M||y(D,w,M,{name:d}),h[e]=M,E}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(21),o=r(28),i=/#|\.prototype\./,a=function(t,e){var r=c[u(t)];return r==l||r!=s&&(o(e)?n(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},function(t,e,r){var n=r(17),o=r(29),i=r(164);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},function(t,e,r){var n=r(10),o=r(64),i=r(45),a=r(60),u=n.Array,c=Math.max;t.exports=function(t,e,r){for(var n=i(t),s=o(e,n),l=o(void 0===r?n:r,n),f=u(c(l-s,0)),p=0;s<l;s++,p++)a(f,p,t[s]);return f.length=p,f}},function(t,e,r){var n=r(92),o=r(57),i=r(66),a=r(26)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},function(t,e,r){var n={};n[r(26)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(174);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(21);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e,r){var n=r(17);t.exports=n([].slice)},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";r(20);var n=r(17),o=r(47),i=r(96),a=r(21),u=r(26),c=r(53),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,r,f){var p=u(t),y=!a((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=y&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!y||!d||r){var h=n(/./[p]),v=e(p,""[t],(function(t,e,r,o,a){var u=n(t),c=e.exec;return c===i||c===l.exec?y&&!a?{done:!0,value:h(e,r,o)}:{done:!0,value:u(r,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(l,p,v[1])}f&&c(l[p],"sham",!0)}},function(t,e,r){"use strict";var n=r(140).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(10),o=r(34),i=r(29),a=r(28),u=r(51),c=r(96),s=n.TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var n=o(r,t,e);return null!==n&&i(n),n}if("RegExp"===u(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},function(t,e,r){r(19)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(103);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(33),o=r(21),i=r(104);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(10),o=r(34),i=r(30),a=r(82),u=r(57),c=r(160),s=r(26),l=n.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,n=u(t,f);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||a(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,r){var n=r(17),o=r(32),i=r(39),a=r(126).indexOf,u=r(65),c=n([].push);t.exports=function(t,e){var r,n=i(t),s=0,l=[];for(r in n)!o(u,r)&&o(n,r)&&c(l,r);for(;e.length>s;)o(n,r=e[s++])&&(~a(l,r)||c(l,r));return l}},function(t,e,r){var n=r(39),o=r(64),i=r(45),a=function(t){return function(e,r,a){var u,c=n(e),s=i(c),l=o(a,s);if(t&&r!=r){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,r){var n=r(32),o=r(128),i=r(54),a=r(35);t.exports=function(t,e){for(var r=o(e),u=a.f,c=i.f,s=0;s<r.length;s++){var l=r[s];n(t,l)||u(t,l,c(e,l))}}},function(t,e,r){var n=r(49),o=r(17),i=r(68),a=r(108),u=r(29),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(u(t)),r=a.f;return r?c(e,r(t)):e}},function(t,e,r){"use strict";var n,o,i,a=r(21),u=r(28),c=r(52),s=r(88),l=r(47),f=r(26),p=r(77),y=f("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):d=!0),null==n||a((function(){var t={};return n[y].call(t)!==t}))?n={}:p&&(n=c(n)),u(n[y])||l(n,y,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},function(t,e,r){var n=r(21);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(19),o=r(17),i=r(65),a=r(30),u=r(32),c=r(35).f,s=r(68),l=r(132),f=r(166),p=r(78),y=r(168),d=!1,h=p("meta"),v=0,b=function(t){c(t,h,{value:{objectID:"O"+v++,weakData:{}}})},g=t.exports={enable:function(){g.enable=function(){},d=!0;var t=s.f,e=o([].splice),r={};r[h]=1,t(r).length&&(s.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===h){e(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,h)){if(!f(t))return"F";if(!e)return"E";b(t)}return t[h].objectID},getWeakData:function(t,e){if(!u(t,h)){if(!f(t))return!0;if(!e)return!1;b(t)}return t[h].weakData},onFreeze:function(t){return y&&d&&f(t)&&!u(t,h)&&b(t),t}};i[h]=!0},function(t,e,r){var n=r(51),o=r(39),i=r(68).f,a=r(111),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return a(u)}}(t):i(o(t))}},function(t,e,r){var n=r(10),o=r(91),i=r(34),a=r(29),u=r(83),c=r(134),s=r(45),l=r(56),f=r(135),p=r(112),y=r(136),d=n.TypeError,h=function(t,e){this.stopped=t,this.result=e},v=h.prototype;t.exports=function(t,e,r){var n,b,g,m,O,w,_,x=r&&r.that,j=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),P=o(e,x),k=function(t){return n&&y(n,"normal",t),new h(!0,t)},A=function(t){return j?(a(t),S?P(t[0],t[1],k):P(t[0],t[1])):S?P(t,k):P(t)};if(E)n=t;else{if(!(b=p(t)))throw d(u(t)+" is not iterable");if(c(b)){for(g=0,m=s(t);m>g;g++)if((O=A(t[g]))&&l(v,O))return O;return new h(!1)}n=f(t,b)}for(w=n.next;!(_=i(w,n)).done;){try{O=A(_.value)}catch(t){y(n,"throw",t)}if("object"==typeof O&&O&&l(v,O))return O}return new h(!1)}},function(t,e,r){var n=r(26),o=r(66),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,r){var n=r(10),o=r(34),i=r(62),a=r(29),u=r(83),c=r(112),s=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?c(t):e;if(i(r))return a(o(r,t));throw s(u(t)+" is not iterable")}},function(t,e,r){var n=r(34),o=r(29),i=r(57);t.exports=function(t,e,r){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw r;if(u)throw a;return o(a),r}},function(t,e,r){var n=r(10),o=r(56),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,r){var n=r(26)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},function(t,e,r){var n=r(28),o=r(30),i=r(110);t.exports=function(t,e,r){var a,u;return i&&n(a=e.constructor)&&a!==r&&o(u=a.prototype)&&u!==r.prototype&&i(t,u),t}},function(t,e,r){var n=r(17),o=r(58),i=r(38),a=r(44),u=n("".charAt),c=n("".charCodeAt),s=n("".slice),l=function(t){return function(e,r){var n,l,f=i(a(e)),p=o(r),y=f.length;return p<0||p>=y?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===y||(l=c(f,p+1))<56320||l>57343?t?u(f,p):n:t?s(f,p,p+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,r){var n=r(104)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,r){var n=r(26);e.f=n},function(t,e,r){var n=r(175),o=r(32),i=r(143),a=r(35).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},function(t,e,r){var n=r(21),o=r(10).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),u=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:i}},function(t,e,r){"use strict";var n=r(19),o=r(126).includes,i=r(75);n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,r){"use strict";var n=r(19),o=r(17),i=r(187),a=r(44),u=r(38),c=r(188),s=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(u(a(this)),u(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(30),o=r(51),i=r(26)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,s=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&y())}function y(){if(!l){var t=u(p);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new d(t,e)),1!==s.length||l||u(y)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(10),o=r(94),i=r(83),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},function(t,e,r){var n=r(17),o=r(44),i=r(38),a=r(152),u=n("".replace),c="["+a+"]",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=u(r,s,"")),2&t&&(r=u(r,l,"")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,r){"use strict";var n=r(34),o=r(118),i=r(29),a=r(84),u=r(38),c=r(44),s=r(57),l=r(119),f=r(120);o("match",(function(t,e,r){return[function(e){var r=c(this),o=null==e?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](u(r))},function(t){var n=i(this),o=u(t),c=r(e,n,o);if(c.done)return c.value;if(!n.global)return f(n,o);var s=n.unicode;n.lastIndex=0;for(var p,y=[],d=0;null!==(p=f(n,o));){var h=u(p[0]);y[d]=h,""===h&&(n.lastIndex=l(o,a(n.lastIndex),s)),d++}return 0===d?null:y}]}))},function(t,e,r){"use strict";var n=r(95),o=r(34),i=r(17),a=r(118),u=r(21),c=r(29),s=r(28),l=r(58),f=r(84),p=r(38),y=r(44),d=r(119),h=r(57),v=r(191),b=r(120),g=r(26)("replace"),m=Math.max,O=Math.min,w=i([].concat),_=i([].push),x=i("".indexOf),j=i("".slice),E="$0"==="a".replace(/./,"$0"),S=!!/./[g]&&""===/./[g]("a","$0");a("replace",(function(t,e,r){var i=S?"$":"$0";return[function(t,r){var n=y(this),i=null==t?void 0:h(t,g);return i?o(i,t,n,r):o(e,p(n),t,r)},function(t,o){var a=c(this),u=p(t);if("string"==typeof o&&-1===x(o,i)&&-1===x(o,"$<")){var y=r(e,a,u,o);if(y.done)return y.value}var h=s(o);h||(o=p(o));var g=a.global;if(g){var E=a.unicode;a.lastIndex=0}for(var S=[];;){var P=b(a,u);if(null===P)break;if(_(S,P),!g)break;""===p(P[0])&&(a.lastIndex=d(u,f(a.lastIndex),E))}for(var k,A="",D=0,T=0;T<S.length;T++){for(var M=p((P=S[T])[0]),N=m(O(l(P.index),u.length),0),C=[],R=1;R<P.length;R++)_(C,void 0===(k=P[R])?k:String(k));var I=P.groups;if(h){var L=w([M],C,N,u);void 0!==I&&_(L,I);var z=p(n(o,void 0,L))}else z=v(M,u,N,C,I,o);N>=D&&(A+=j(u,D,N)+z,D=N+M.length)}return A+j(u,D)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||S)},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){var n=r(27),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.a.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(117)(t))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return v}));var n=r(0);function o(t){throw new Error("[mobx-utils] "+t)}function i(t,e){void 0===e&&(e="Illegal state"),t||o(e)}var a=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(a(Object.getPrototypeOf(t))||[])},u=function(t){return function(t){var e=a(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))};function c(t){switch(this.state){case"pending":return t.pending&&t.pending(this.value);case"rejected":return t.rejected&&t.rejected(this.value);case"fulfilled":return t.fulfilled?t.fulfilled(this.value):this.value}}function s(t,e){if(i(arguments.length<=2,"fromPromise expects up to two arguments"),i("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var r=t;t.then(Object(n.k)("observableFromPromise-resolve",(function(t){r.value=t,r.state="fulfilled"})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state="rejected"}))),r.isPromiseBasedObservable=!0,r.case=c;var o=e&&"fulfilled"===e.state?e.value:void 0;return Object(n.q)(r,{value:o,state:"pending"},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state="rejected",r.value=e,r})),t.resolve=Object(n.k)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var r=t(Promise.resolve(e));return r.state="fulfilled",r.value=e,r}))}(s||(s={}));var l=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};!function(){function t(t,e){var r=this;Object(n.G)((function(){r.current=e,r.subscription=t.subscribe(r)}))}t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(t){this.current=t},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(t){this.current=t,this.dispose()},l([n.C.ref],t.prototype,"current",void 0),l([n.k.bound],t.prototype,"next",null),l([n.k.bound],t.prototype,"complete",null),l([n.k.bound],t.prototype,"error",null)}();var f=function(){return(f=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},y=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;this.model=t,this.localValues=n.C.map({}),this.localComputedValues=n.C.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},i(Object(n.A)(t),"createViewModel expects an observable object"),u(t).forEach((function(r){if(r!==n.a&&"__mobxDidRunLazyInitializers"!==r){if(i(-1===y.indexOf(r),"The propertyname "+r+" is reserved and cannot be used with viewModels"),Object(n.w)(t,r)){var o=Object(n.h)(t,r).derivation;e.localComputedValues.set(r,Object(n.m)(o.bind(e)))}var a=Object.getOwnPropertyDescriptor(t,r),u=a?{enumerable:a.enumerable}:{};Object.defineProperty(e,r,f(f({},u),{configurable:!0,get:function(){return Object(n.w)(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:Object(n.k)((function(t){t!==e.model[r]?e.localValues.set(r,t):e.localValues.delete(r)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var t=this;Object(n.B)(this.localValues).forEach((function(e){var r=t.localValues.get(e),o=t.model[e];Object(n.y)(o)?o.replace(r):Object(n.z)(o)?(o.clear(),o.merge(r)):Object(n.v)(r)||(t.model[e]=r)})),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(t){this.localValues.delete(t)},p([n.m],t.prototype,"isDirty",null),p([n.m],t.prototype,"changedValues",null),p([n.k.bound],t.prototype,"submit",null),p([n.k.bound],t.prototype,"reset",null),p([n.k.bound],t.prototype,"resetProperty",null)}();function d(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function h(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function v(t,e){var r=new WeakMap;function o(n){var o=r.get(n.object);!function(t,e){switch(t.type){case"add":i(t.newValue,e,t.name);break;case"update":a(t.oldValue),i(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":a(t.oldValue);break;case"splice":t.removed.map(a),t.added.forEach((function(r,n){return i(r,e,""+(t.index+n))}));for(var n=t.index+t.addedCount;n<t.object.length;n++)if(h(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,d(o),t)}function i(t,e,a){if(h(t)){var u=r.get(t);if(u){if(u.parent!==e||u.path!==a)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+d(e)+"/"+a+"', but it already exists at '"+d(u.parent)+"/"+u.path+"'")}else{var c={parent:e,path:a,dispose:Object(n.D)(t,o)};r.set(t,c),Object(n.p)(t).forEach((function(t){var e=t[0];return i(t[1],c,e)}))}}}function a(t){if(h(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),Object(n.L)(t).forEach(a)}}return i(t,void 0,""),function(){a(t)}}var b,g=(b=function(t,e){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),m=(function(t){function e(e,r,o){var i=void 0===o?{}:o,a=i.name,u=void 0===a?"ogm"+(1e3*Math.random()|0):a,c=i.keyToName,s=void 0===c?function(t){return""+t}:c,l=t.call(this)||this;l._keyToName=s,l._groupBy=r,l._ogmInfoKey=Symbol("ogmInfo"+u),l._base=e;for(var f=0;f<e.length;f++)l._addItem(e[f]);return l._disposeBaseObserver=Object(n.D)(l._base,(function(t){if("splice"===t.type)Object(n.J)((function(){for(var e=0,r=t.removed;e<r.length;e++){var n=r[e];l._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var a=i[o];l._addItem(a)}}));else{if("update"!==t.type)throw new Error("illegal state");Object(n.J)((function(){l._removeItem(t.oldValue),l._addItem(t.newValue)}))}})),l}g(e,t),e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(t){throw new Error("not supported")},e.prototype.set=function(t,e){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var t=0;t<this._base.length;t++){var e=this._base[t];e[this._ogmInfoKey].reaction(),delete e[this._ogmInfoKey]}},e.prototype._getGroupArr=function(e){var r=t.prototype.get.call(this,e);return void 0===r&&(r=Object(n.C)([],{name:"GroupArray["+this._keyToName(e)+"]",deep:!1}),t.prototype.set.call(this,e,r)),r},e.prototype._removeFromGroupArr=function(e,r){var n=t.prototype.get.call(this,e);1===n.length?t.prototype.delete.call(this,e):(r===n.length-1||(n[r]=n[n.length-1],n[r][this._ogmInfoKey].groupArrIndex=r),n.length--)},e.prototype._addItem=function(t){var e=this,r=this._groupBy(t),o=this._getGroupArr(r),i={groupByValue:r,groupArrIndex:o.length,reaction:Object(n.F)((function(){return e._groupBy(t)}),(function(r,n){var o=t[e._ogmInfoKey];e._removeFromGroupArr(o.groupByValue,o.groupArrIndex);var i=e._getGroupArr(r),a=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=a}))};Object.defineProperty(t,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:i}),o.push(t)},e.prototype._removeItem=function(t){var e=t[this._ogmInfoKey];this._removeFromGroupArr(e.groupByValue,e.groupArrIndex),e.reaction(),delete t[this._ogmInfoKey]}}(n.b),function(){function t(t,e){this.base=t,this.args=e,this.closestIdx=0,this.isDisposed=!1;for(var r=this.closest=this.root=t,n=0;n<this.args.length-1&&(r=r.get(e[n]));n++)this.closest=r;this.closestIdx=n}return t.prototype.exists=function(){this.assertNotDisposed();var t=this.args.length;return this.closestIdx>=t-1&&this.closest.has(this.args[t-1])},t.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},t.prototype.set=function(t){this.assertNotDisposed();for(var e=this.args.length,r=this.closest,n=this.closestIdx;n<e-1;n++){var o=new Map;r.set(this.args[n],o),r=o}this.closestIdx=e-1,this.closest=r,r.set(this.args[e-1],t)},t.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var t=this.args.length;this.closest.delete(this.args[t-1]);for(var e=this.root,r=[e],n=0;n<t-1;n++)e=e.get(this.args[n]),r.push(e);for(n=r.length-1;n>0;n--)0===r[n].size&&r[n-1].delete(this.args[n-1]);this.isDisposed=!0},t.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},t}());!function(){function t(){this.store=new Map,this.argsLength=-1}t.prototype.entry=function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new m(this.store,t)}}();new Set,new Set;var O,w=Promise.resolve();O="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var _=function(){return new Promise((function(t){O(t)}))}}).call(this,r(149))},function(t,e,r){var n;!function(o,i,a){if(o){for(var u,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();g.prototype.bind=function(t,e,r){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,r),this},g.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},g.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},g.prototype.reset=function(){return this._callbacks={},this._directMap={},this},g.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,r){return null!==e&&e!==i&&(e===r||t(e.parentNode,r))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var r=t.composedPath()[0];r!==t.target&&(e=r)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},g.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},g.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},g.init=function(){var t=g(i);for(var e in t)"_"!==e.charAt(0)&&(g[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},g.init(),o.Mousetrap=g,t.exports&&(t.exports=g),void 0===(n=function(){return g}.call(e,r,e,t))||(t.exports=n)}function y(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function d(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:s[t.which]?s[t.which]:String.fromCharCode(t.which).toLowerCase()}function h(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,r){return r||(r=function(){if(!u)for(var t in u={},c)t>95&&t<112||c.hasOwnProperty(t)&&(u[c[t]]=t);return u}()[t]?"keydown":"keypress"),"keypress"==r&&e.length&&(r="keydown"),r}function b(t,e){var r,n,o,i=[];for(r=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<r.length;++o)n=r[o],f[n]&&(n=f[n]),e&&"keypress"!=e&&l[n]&&(n=l[n],i.push("shift")),h(n)&&i.push(n);return{key:n,modifiers:i,action:e=v(n,i,e)}}function g(t){var e=this;if(t=t||i,!(e instanceof g))return new g(t);e.target=t,e._callbacks={},e._directMap={};var r,n={},o=!1,a=!1,u=!1;function c(t){t=t||{};var e,r=!1;for(e in n)t[e]?r=!0:n[e]=0;r||(u=!1)}function s(t,r,o,i,a,u){var c,s,l,f,p=[],y=o.type;if(!e._callbacks[t])return[];for("keyup"==y&&h(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||n[s.seq]==s.level)&&y==s.action&&("keypress"==y&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var d=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(d||v)&&e._callbacks[t].splice(c,1),p.push(s)}return p}function l(t,r,n,o){e.stopCallback(r,r.target||r.srcElement,n,o)||!1===t(r,n)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(r),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(r))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var r=d(t);r&&("keyup"!=t.type||o!==r?e.handleKey(r,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function p(t,e,i,a){function s(e){return function(){u=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==a&&(o=d(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var y=p+1===e.length?f:s(a||b(e[p+1]).action);v(e[p],y,a,t,p)}}function v(t,r,n,o,i){e._directMap[t+":"+n]=r;var a,u=(t=t.replace(/\s+/g," ")).split(" ");u.length>1?p(t,u,r,n):(a=b(t,n),e._callbacks[a.key]=e._callbacks[a.key]||[],s(a.key,a.modifiers,{type:a.action},o,t,i),e._callbacks[a.key][o?"unshift":"push"]({callback:r,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,r){var n,o=s(t,e,r),i={},f=0,p=!1;for(n=0;n<o.length;++n)o[n].seq&&(f=Math.max(f,o[n].level));for(n=0;n<o.length;++n)if(o[n].seq){if(o[n].level!=f)continue;p=!0,i[o[n].seq]=1,l(o[n].callback,r,o[n].combo,o[n].seq)}else p||l(o[n].callback,r,o[n].combo);var y="keypress"==r.type&&a;r.type!=u||h(t)||y||c(i),a=p&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)v(t[n],e,r)},y(t,"keypress",f),y(t,"keydown",f),y(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){var n=r(33),o=r(35),i=r(29),a=r(39),u=r(63);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=a(e),c=u(e),s=c.length,l=0;s>l;)o.f(t,r=c[l++],n[r]);return t}},function(t,e,r){var n=r(10),o=r(34),i=r(28),a=r(30),u=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!a(n=o(r,t)))return n;if(i(r=t.valueOf)&&!a(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!a(n=o(r,t)))return n;throw u("Can't convert object to primitive value")}},function(t,e,r){var n=r(49);t.exports=n("document","documentElement")},function(t,e,r){var n=r(10),o=r(28),i=r(106),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,r){"use strict";var n=r(129).IteratorPrototype,o=r(52),i=r(67),a=r(89),u=r(66),c=function(){return this};t.exports=function(t,e,r,s){var l=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),a(t,l,!1,!0),u[l]=c,t}},function(t,e,r){var n=r(10),o=r(28),i=n.String,a=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},function(t,e,r){"use strict";var n=r(19),o=r(10),i=r(17),a=r(109),u=r(47),c=r(131),s=r(133),l=r(137),f=r(28),p=r(30),y=r(21),d=r(138),h=r(89),v=r(139);t.exports=function(t,e,r){var b=-1!==t.indexOf("Map"),g=-1!==t.indexOf("Weak"),m=b?"set":"add",O=o[t],w=O&&O.prototype,_=O,x={},j=function(t){var e=i(w[t]);u(w,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(g&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return g&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!p(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(a(t,!f(O)||!(g||w.forEach&&!y((function(){(new O).entries().next()})))))_=r.getConstructor(e,t,b,m),c.enable();else if(a(t,!0)){var E=new _,S=E[m](g?{}:-0,1)!=E,P=y((function(){E.has(1)})),k=d((function(t){new O(t)})),A=!g&&y((function(){for(var t=new O,e=5;e--;)t[m](e,e);return!t.has(-0)}));k||((_=e((function(t,e){l(t,w);var r=v(new O,t,_);return null!=e&&s(e,r[m],{that:r,AS_ENTRIES:b}),r}))).prototype=w,w.constructor=_),(P||A)&&(j("delete"),j("has"),b&&j("get")),(A||S)&&j(m),g&&w.clear&&delete w.clear}return x[t]=_,n({global:!0,forced:_!=O},x),h(_,t),g||r.setStrong(_,t,b),_}},function(t,e,r){var n=r(21),o=r(30),i=r(51),a=r(167),u=Object.isExtensible,c=n((function(){u(1)}));t.exports=c||a?function(t){return!!o(t)&&((!a||"ArrayBuffer"!=i(t))&&(!u||u(t)))}:u},function(t,e,r){var n=r(21);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e,r){var n=r(21);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(35).f,o=r(52),i=r(170),a=r(91),u=r(137),c=r(133),s=r(107),l=r(171),f=r(33),p=r(131).fastKey,y=r(59),d=y.set,h=y.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){u(t,y),d(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&c(n,t[s],{that:t,AS_ENTRIES:r})})),y=l.prototype,v=h(e),b=function(t,e,r){var n,o,i=v(t),a=g(t,e);return a?a.value=r:(i.last=a={index:o=p(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),f?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},g=function(t,e){var r,n=v(t),o=p(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(y,{clear:function(){for(var t=v(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=v(this),r=g(this,t);if(r){var n=r.next,o=r.previous;delete e.index[r.index],r.removed=!0,o&&(o.next=n),n&&(n.previous=o),e.first==r&&(e.first=n),e.last==r&&(e.last=o),f?e.size--:this.size--}return!!r},forEach:function(t){for(var e,r=v(this),n=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!g(this,t)}}),i(y,r?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(this,t=0===t?0:t,t)}}),f&&n(y,"size",{get:function(){return v(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",o=h(e),i=h(n);s(t,e,(function(t,e){d(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},function(t,e,r){var n=r(47);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(49),o=r(35),i=r(26),a=r(33),u=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[u]&&r(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,r){"use strict";var n=r(113),o=r(92);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(69).forEach,o=r(115)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,r){var n=r(10),o=r(93),i=r(94),a=r(30),u=r(26)("species"),c=n.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||a(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?c:e}},function(t,e,r){var n=r(10);t.exports=n},function(t,e,r){"use strict";var n=r(10),o=r(91),i=r(34),a=r(37),u=r(177),c=r(134),s=r(94),l=r(45),f=r(60),p=r(135),y=r(112),d=n.Array;t.exports=function(t){var e=a(t),r=s(this),n=arguments.length,h=n>1?arguments[1]:void 0,v=void 0!==h;v&&(h=o(h,n>2?arguments[2]:void 0));var b,g,m,O,w,_,x=y(e),j=0;if(!x||this==d&&c(x))for(b=l(e),g=r?new this(b):d(b);b>j;j++)_=v?h(e[j],j):e[j],f(g,j,_);else for(w=(O=p(e,x)).next,g=r?new this:[];!(m=i(w,O)).done;j++)_=v?u(O,h,[m.value,j],!0):m.value,f(g,j,_);return g.length=j,g}},function(t,e,r){var n=r(29),o=r(136);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},function(t,e,r){"use strict";var n=r(29);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){var n=r(21),o=r(10).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,r){var n=r(21),o=r(10).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,r){"use strict";var n=r(19),o=r(17),i=r(62),a=r(37),u=r(45),c=r(38),s=r(21),l=r(182),f=r(115),p=r(183),y=r(184),d=r(79),h=r(185),v=[],b=o(v.sort),g=o(v.push),m=s((function(){v.sort(void 0)})),O=s((function(){v.sort(null)})),w=f("sort"),_=!s((function(){if(d)return d<70;if(!(p&&p>3)){if(y)return!0;if(h)return h<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:e+n,v:r})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:m||!O||!w||!_},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(_)return void 0===t?b(e):b(e,t);var r,n,o=[],s=u(e);for(n=0;n<s;n++)n in e&&g(o,e[n]);for(l(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=o.length,n=0;n<r;)e[n]=o[n++];for(;n<s;)delete e[n++];return e}})},function(t,e,r){var n=r(111),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?a(t,e):u(t,i(n(t,0,c),e),i(n(t,c),e),e)},a=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},u=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?n(e[a],r[u])<=0?e[a++]:r[u++]:a<o?e[a++]:r[u++];return t};t.exports=i},function(t,e,r){var n=r(80).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(80);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(80).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){"use strict";var n=r(19),o=r(69).find,i=r(75),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(t,e,r){var n=r(10),o=r(148),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(26)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,r){var n=r(29),o=r(150),i=r(26)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?e:o(r)}},function(t,e,r){var n=r(17);t.exports=n(1..valueOf)},function(t,e,r){var n=r(17),o=r(37),i=Math.floor,a=n("".charAt),u=n("".replace),c=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,f,p){var y=r+t.length,d=n.length,h=l;return void 0!==f&&(f=o(f),h=s),u(p,h,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,y);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>d){var p=i(l/10);return 0===p?o:p<=d?void 0===n[p-1]?a(u,1):n[p-1]+a(u,1):o}s=n[l-1]}return void 0===s?"":s}))}},function(t,e,r){"use strict";var n=r(10),o=r(17),i=r(62),a=r(30),u=r(32),c=r(116),s=n.Function,l=o([].concat),f=o([].join),p={},y=function(t,e,r){if(!u(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=s("C,a","return new C("+f(n,",")+")")}return p[e](t,r)};t.exports=s.bind||function(t){var e=i(this),r=e.prototype,n=c(arguments,1),o=function(){var r=l(n,c(arguments));return this instanceof o?y(e,r.length,r):e.apply(t,r)};return a(r)&&(o.prototype=r),o}},function(t,e,r){"use strict";var n=r(33),o=r(17),i=r(34),a=r(21),u=r(63),c=r(108),s=r(86),l=r(37),f=r(73),p=Object.assign,y=Object.defineProperty,d=o([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(y({},"a",{enumerable:!0,get:function(){y(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||"abcdefghijklmnopqrst"!=u(p({},e)).join("")}))?function(t,e){for(var r=l(t),o=arguments.length,a=1,p=c.f,y=s.f;o>a;)for(var h,v=f(arguments[a++]),b=p?d(u(v),p(v)):u(v),g=b.length,m=0;g>m;)h=b[m++],n&&!i(y,v,h)||(r[h]=v[h]);return r}:p},function(t,e,r){var n=r(17),o=r(44),i=r(38),a=/"/g,u=n("".replace);t.exports=function(t,e,r,n){var c=i(o(t)),s="<"+e;return""!==r&&(s+=" "+r+'="'+u(i(n),a,""")+'"'),s+">"+c+"</"+e+">"}},function(t,e,r){var n=r(21);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,r){var n=r(19),o=Math.hypot,i=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,u=0,c=arguments.length,s=0;u<c;)s<(r=i(arguments[u++]))?(o=o*(n=s/r)*n+1,s=r):o+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*a(o)}})},function(t,e,r){var n=r(32);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){r(19)({target:"String",proto:!0},{repeat:r(199)})},function(t,e,r){"use strict";var n=r(10),o=r(58),i=r(38),a=r(44),u=n.RangeError;t.exports=function(t){var e=i(a(this)),r="",n=o(t);if(n<0||n==1/0)throw u("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r}},function(t,e,r){var n=r(33),o=r(17),i=r(63),a=r(39),u=o(r(86).f),c=o([].push),s=function(t){return function(e){for(var r,o=a(e),s=i(o),l=s.length,f=0,p=[];l>f;)r=s[f++],n&&!u(o,r)||c(p,t?[r,o[r]]:o[r]);return p}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,r){"use strict";var n=r(37),o=r(64),i=r(45);t.exports=function(t){for(var e=n(this),r=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,s=void 0===c?r:o(c,r);s>u;)e[u++]=t;return e}},function(t,e,r){"use strict";var n=r(19),o=r(151).trim;n({target:"String",proto:!0,forced:r(203)("trim")},{trim:function(){return o(this)}})},function(t,e,r){var n=r(87).PROPER,o=r(21),i=r(152);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||n&&i[t].name!==t}))}},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return Yg})),r.d(e,"LogicFlow",(function(){return Gg})),r.d(e,"h",(function(){return Q.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return od})),r.d(e,"RectNode",(function(){return bd})),r.d(e,"CircleNode",(function(){return Dd})),r.d(e,"PolygonNode",(function(){return Wd})),r.d(e,"DiamondNode",(function(){return ah})),r.d(e,"EllipseNode",(function(){return xh})),r.d(e,"TextNode",(function(){return Ch})),r.d(e,"HtmlNode",(function(){return Uh})),r.d(e,"BaseEdge",(function(){return Hv})),r.d(e,"LineEdge",(function(){return Qv})),r.d(e,"PolylineEdge",(function(){return bb})),r.d(e,"BezierEdge",(function(){return Mb})),r.d(e,"Arrow",(function(){return nv})),r.d(e,"BaseEdgeModel",(function(){return Fa})),r.d(e,"BezierEdgeModel",(function(){return gf})),r.d(e,"LineEdgeModel",(function(){return Qa})),r.d(e,"PolylineEdgeModel",(function(){return pu})),r.d(e,"BaseNodeModel",(function(){return Tf})),r.d(e,"CircleNodeModel",(function(){return Ff})),r.d(e,"DiamondNodeModel",(function(){return sp})),r.d(e,"EllipseNodeModel",(function(){return wp})),r.d(e,"PolygonNodeModel",(function(){return Cp})),r.d(e,"RectNodeModel",(function(){return Wp})),r.d(e,"TextNodeModel",(function(){return oy})),r.d(e,"HtmlNodeModel",(function(){return hy})),r.d(e,"EditConfigModel",(function(){return oo})),r.d(e,"GraphModel",(function(){return Dc})),r.d(e,"SnaplineModel",(function(){return Oy})),r.d(e,"Keyboard",(function(){return Cg})),r.d(e,"get",(function(){return Sl})),r.d(e,"defaults",(function(){return Al}));var n={};r.r(n),r.d(n,"createUuid",(function(){return zi})),r.d(n,"refreshGraphId",(function(){return Bi})),r.d(n,"createDrag",(function(){return ec})),r.d(n,"StepDrag",(function(){return Oc}));var o=r(0),i=r(11);if(!i.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!o.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var a=r(43),u=Object(a.b)("observerBatching");function c(t){t()}var s=!1;function l(){return s}function f(t){return Object(o.t)(t)}var p,y=1e4,d=new Set;function h(){void 0===p&&(p=setTimeout(v,1e4))}function v(){p=void 0;var t=Date.now();d.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,d.delete(e))})),d.size>0&&h()}var b=!1,g=[];var m={};function O(t){return"observer"+t}function w(t,e,r){if(void 0===e&&(e="observed"),void 0===r&&(r=m),l())return t();var n,u=function(t){return function(){b?g.push(t):t()}}((r.useForceUpdate||a.d)()),c=i.d.useRef(null);if(!c.current){var s=new o.c(O(e),(function(){p.mounted?u():(s.dispose(),c.current=null)})),p=function(t){return{cleanAt:Date.now()+y,reaction:t}}(s);c.current=p,n=c,d.add(n),h()}var v=c.current.reaction;return i.d.useDebugValue(v,f),i.d.useEffect((function(){var t;return t=c,d.delete(t),c.current?c.current.mounted=!0:(c.current={reaction:new o.c(O(e),(function(){u()})),cleanAt:1/0},u()),function(){c.current.reaction.dispose(),c.current=null}}),[]),function(t){b=!0,g=[];try{var e=t();b=!1;var r=g.length>0?g:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{b=!1}}((function(){var e,r;if(v.track((function(){try{e=t()}catch(t){r=t}})),r)throw r;return e}))}var _=function(){return(_=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function x(t,e){if(l())return t;var r,n,o,a=_({forwardRef:!1},e),u=t.displayName||t.name,c=function(e,r){return w((function(){return t(e,r)}),u)};return c.displayName=u,r=a.forwardRef?Object(i.f)(Object(i.e)(c)):Object(i.f)(c),n=t,o=r,Object.keys(n).forEach((function(t){j[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=u,r}var j={$$typeof:!0,render:!0,compare:!0,type:!0};function E(t){var e=t.children,r=t.render,n=e||r;return"function"!=typeof n?null:w(n)}function S(t,e,r,n,o){var i="children"===e?"render":"children",a="function"==typeof t[e],u="function"==typeof t[i];return a&&u?new Error("MobX Observer: Do not use children and render in the same time in`"+r):a||u?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}E.propTypes={children:S,render:S},E.displayName="Observer";var P;(P=i.g)||(P=c),Object(o.n)({reactionScheduler:P}),Object(a.a)()[u]=!0;var k=0;var A={};function D(t){return A[t]||(A[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+k+")";return k++,e}(t)),A[t]}function T(t,e){if(M(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(e,r[o])||!M(t[r[o]],e[r[o]]))return!1;return!0}function M(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function N(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}var C=D("patchMixins"),R=D("patchedDefinition");function I(t,e){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];e.locks++;try{var a;return null!=t&&(a=t.apply(this,o)),a}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(r,o)}))}}function L(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];I.call.apply(I,[this,t,e].concat(n))}}function z(t,e,r){var n=function(t,e){var r=t[C]=t[C]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[R]){var i=t[e],a=function t(e,r,n,o,i){var a,u=L(i,o);return(a={})[R]=!0,a.get=function(){return u},a.set=function(i){if(this===e)u=L(i,o);else{var a=t(this,r,n,o,i);Object.defineProperty(this,r,a)}},a.configurable=!0,a.enumerable=n,a}(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,a)}}var B=o.a||"$mobx",H=D("isMobXReactObserver"),X=D("isUnmounted"),U=D("skipRender"),F=D("isForcingUpdate");function G(t){var e=t.prototype;if(t[H]){var r=Y(e);console.warn("The provided component class ("+r+") \n has already been declared as an observer component.")}else t[H]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==i.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==W)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=W;K(e,"props"),K(e,"state");var n=e.render;return e.render=function(){return V.call(this,n)},z(e,"componentWillUnmount",(function(){var t;if(!0!==l()&&(null===(t=this.render[B])||void 0===t||t.dispose(),this[X]=!0,!this.render[B])){var e=Y(this);console.warn("The reactive render of an observer class component ("+e+") \n was overriden after MobX attached. This may result in a memory leak if the \n overriden reactive render was not properly disposed.")}})),t}function Y(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function V(t){var e=this;if(!0===l())return t.call(this);N(this,U,!1),N(this,F,!1);var r=Y(this),n=t.bind(this),a=!1,u=new o.c(r+".render()",(function(){if(!a&&(a=!0,!0!==e[X])){var t=!0;try{N(e,F,!0),e[U]||i.a.prototype.forceUpdate.call(e),t=!1}finally{N(e,F,!1),t&&u.dispose()}}}));function c(){a=!1;var t=void 0,e=void 0;if(u.track((function(){try{e=Object(o.d)(!1,n)}catch(e){t=e}})),t)throw t;return e}return u.reactComponent=this,c[B]=u,this.render=c,c.call(this)}function W(t,e){return l()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==e||!T(this.props,t)}function K(t,e){var r=D("reactProp_"+e+"_valueHolder"),n=D("reactProp_"+e+"_atomHolder");function i(){return this[n]||N(this,n,Object(o.o)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return o.f&&o.e&&(t=Object(o.f)(!0)),i.call(this).reportObserved(),o.f&&o.e&&Object(o.e)(t),this[r]},set:function(t){this[F]||T(this[r],t)?N(this,r,t):(N(this,r,t),N(this,U,!0),i.call(this).reportChanged(),N(this,U,!1))}})}var $="function"==typeof Symbol&&Symbol.for,Z=$?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,q=$?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function J(t){if(!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),q&&t.$$typeof===q)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(Z&&t.$$typeof===Z){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(i.e)((function(){var t=arguments;return Object(i.c)(E,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.a,t)?G(t):x(t)}if(!i.a)throw new Error("mobx-react requires React to be available");if(!o.C)throw new Error("mobx-react requires mobx to be available");var Q=r(1);r(3),r(90),r(2),r(6),r(5),r(9),r(22),r(40),r(15),r(4),r(24),r(16),r(25),r(7),r(8),r(18),r(23),r(20),r(181),r(186),r(97),r(146),r(147);var tt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o};var et=function(){this.__data__=[],this.size=0};var rt=function(t,e){return t===e||t!=t&&e!=e};var nt=function(t,e){for(var r=t.length;r--;)if(rt(t[r][0],e))return r;return-1},ot=Array.prototype.splice;var it=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ot.call(e,r,1),--this.size,!0)};var at=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]};var ut=function(t){return nt(this.__data__,t)>-1};var ct=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function st(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}st.prototype.clear=et,st.prototype.delete=it,st.prototype.get=at,st.prototype.has=ut,st.prototype.set=ct;var lt=st;var ft=function(){this.__data__=new lt,this.size=0};var pt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var yt=function(t){return this.__data__.get(t)};var dt=function(t){return this.__data__.has(t)},ht=r(27),vt=ht.a.Symbol,bt=Object.prototype,gt=bt.hasOwnProperty,mt=bt.toString,Ot=vt?vt.toStringTag:void 0;var wt=function(t){var e=gt.call(t,Ot),r=t[Ot];try{t[Ot]=void 0;var n=!0}catch(t){}var o=mt.call(t);return n&&(e?t[Ot]=r:delete t[Ot]),o},_t=Object.prototype.toString;var xt=function(t){return _t.call(t)},jt=vt?vt.toStringTag:void 0;var Et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":jt&&jt in Object(t)?wt(t):xt(t)};var St=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Pt,kt=function(t){if(!St(t))return!1;var e=Et(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},At=ht.a["__core-js_shared__"],Dt=(Pt=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||""))?"Symbol(src)_1."+Pt:"";var Tt=function(t){return!!Dt&&Dt in t},Mt=Function.prototype.toString;var Nt=function(t){if(null!=t){try{return Mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Ct=/^\[object .+?Constructor\]$/,Rt=Function.prototype,It=Object.prototype,Lt=Rt.toString,zt=It.hasOwnProperty,Bt=RegExp("^"+Lt.call(zt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ht=function(t){return!(!St(t)||Tt(t))&&(kt(t)?Bt:Ct).test(Nt(t))};var Xt=function(t,e){return null==t?void 0:t[e]};var Ut=function(t,e){var r=Xt(t,e);return Ht(r)?r:void 0},Ft=Ut(ht.a,"Map"),Gt=Ut(Object,"create");var Yt=function(){this.__data__=Gt?Gt(null):{},this.size=0};var Vt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wt=Object.prototype.hasOwnProperty;var Kt=function(t){var e=this.__data__;if(Gt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Wt.call(e,t)?e[t]:void 0},$t=Object.prototype.hasOwnProperty;var Zt=function(t){var e=this.__data__;return Gt?void 0!==e[t]:$t.call(e,t)};var qt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Gt&&void 0===e?"__lodash_hash_undefined__":e,this};function Jt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jt.prototype.clear=Yt,Jt.prototype.delete=Vt,Jt.prototype.get=Kt,Jt.prototype.has=Zt,Jt.prototype.set=qt;var Qt=Jt;var te=function(){this.size=0,this.__data__={hash:new Qt,map:new(Ft||lt),string:new Qt}};var ee=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var re=function(t,e){var r=t.__data__;return ee(e)?r["string"==typeof e?"string":"hash"]:r.map};var ne=function(t){var e=re(this,t).delete(t);return this.size-=e?1:0,e};var oe=function(t){return re(this,t).get(t)};var ie=function(t){return re(this,t).has(t)};var ae=function(t,e){var r=re(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ue(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ue.prototype.clear=te,ue.prototype.delete=ne,ue.prototype.get=oe,ue.prototype.has=ie,ue.prototype.set=ae;var ce=ue;var se=function(t,e){var r=this.__data__;if(r instanceof lt){var n=r.__data__;if(!Ft||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ce(n)}return r.set(t,e),this.size=r.size,this};function le(t){var e=this.__data__=new lt(t);this.size=e.size}le.prototype.clear=ft,le.prototype.delete=pt,le.prototype.get=yt,le.prototype.has=dt,le.prototype.set=se;var fe=le;var pe=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var ye=function(t){return this.__data__.has(t)};function de(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ce;++e<r;)this.add(t[e])}de.prototype.add=de.prototype.push=pe,de.prototype.has=ye;var he=de;var ve=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var be=function(t,e){return t.has(e)};var ge=function(t,e,r,n,o,i){var a=1&r,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,p=!0,y=2&r?new he:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var d=t[f],h=e[f];if(n)var v=a?n(h,d,f,e,t,i):n(d,h,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(y){if(!ve(e,(function(t,e){if(!be(y,e)&&(d===t||o(d,t,r,n,i)))return y.push(e)}))){p=!1;break}}else if(d!==h&&!o(d,h,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},me=ht.a.Uint8Array;var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var we=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},_e=vt?vt.prototype:void 0,xe=_e?_e.valueOf:void 0;var je=function(t,e,r,n,o,i,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new me(t),new me(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return rt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=Oe;case"[object Set]":var c=1&n;if(u||(u=we),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=2,a.set(t,e);var l=ge(u(t),u(e),n,o,i,a);return a.delete(t),l;case"[object Symbol]":if(xe)return xe.call(t)==xe.call(e)}return!1};var Ee=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Se=Array.isArray;var Pe=function(t,e,r){var n=e(t);return Se(t)?n:Ee(n,r(t))};var ke=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var Ae=function(){return[]},De=Object.prototype.propertyIsEnumerable,Te=Object.getOwnPropertySymbols,Me=Te?function(t){return null==t?[]:(t=Object(t),ke(Te(t),(function(e){return De.call(t,e)})))}:Ae;var Ne=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Ce=function(t){return null!=t&&"object"==typeof t};var Re=function(t){return Ce(t)&&"[object Arguments]"==Et(t)},Ie=Object.prototype,Le=Ie.hasOwnProperty,ze=Ie.propertyIsEnumerable,Be=Re(function(){return arguments}())?Re:function(t){return Ce(t)&&Le.call(t,"callee")&&!ze.call(t,"callee")},He=r(55),Xe=/^(?:0|[1-9]\d*)$/;var Ue=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Xe.test(t))&&t>-1&&t%1==0&&t<e};var Fe=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge["[object Arguments]"]=Ge["[object Array]"]=Ge["[object ArrayBuffer]"]=Ge["[object Boolean]"]=Ge["[object DataView]"]=Ge["[object Date]"]=Ge["[object Error]"]=Ge["[object Function]"]=Ge["[object Map]"]=Ge["[object Number]"]=Ge["[object Object]"]=Ge["[object RegExp]"]=Ge["[object Set]"]=Ge["[object String]"]=Ge["[object WeakMap]"]=!1;var Ye=function(t){return Ce(t)&&Fe(t.length)&&!!Ge[Et(t)]};var Ve=function(t){return function(e){return t(e)}},We=r(48),Ke=We.a&&We.a.isTypedArray,$e=Ke?Ve(Ke):Ye,Ze=Object.prototype.hasOwnProperty;var qe=function(t,e){var r=Se(t),n=!r&&Be(t),o=!r&&!n&&Object(He.a)(t),i=!r&&!n&&!o&&$e(t),a=r||n||o||i,u=a?Ne(t.length,String):[],c=u.length;for(var s in t)!e&&!Ze.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ue(s,c))||u.push(s);return u},Je=Object.prototype;var Qe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Je)};var tr=function(t,e){return function(r){return t(e(r))}},er=tr(Object.keys,Object),rr=Object.prototype.hasOwnProperty;var nr=function(t){if(!Qe(t))return er(t);var e=[];for(var r in Object(t))rr.call(t,r)&&"constructor"!=r&&e.push(r);return e};var or=function(t){return null!=t&&Fe(t.length)&&!kt(t)};var ir=function(t){return or(t)?qe(t):nr(t)};var ar=function(t){return Pe(t,ir,Me)},ur=Object.prototype.hasOwnProperty;var cr=function(t,e,r,n,o,i){var a=1&r,u=ar(t),c=u.length;if(c!=ar(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:ur.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var y=!0;i.set(t,e),i.set(e,t);for(var d=a;++s<c;){var h=t[l=u[s]],v=e[l];if(n)var b=a?n(v,h,l,e,t,i):n(h,v,l,t,e,i);if(!(void 0===b?h===v||o(h,v,r,n,i):b)){y=!1;break}d||(d="constructor"==l)}if(y&&!d){var g=t.constructor,m=e.constructor;g==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m||(y=!1)}return i.delete(t),i.delete(e),y},sr=Ut(ht.a,"DataView"),lr=Ut(ht.a,"Promise"),fr=Ut(ht.a,"Set"),pr=Ut(ht.a,"WeakMap"),yr=Nt(sr),dr=Nt(Ft),hr=Nt(lr),vr=Nt(fr),br=Nt(pr),gr=Et;(sr&&"[object DataView]"!=gr(new sr(new ArrayBuffer(1)))||Ft&&"[object Map]"!=gr(new Ft)||lr&&"[object Promise]"!=gr(lr.resolve())||fr&&"[object Set]"!=gr(new fr)||pr&&"[object WeakMap]"!=gr(new pr))&&(gr=function(t){var e=Et(t),r="[object Object]"==e?t.constructor:void 0,n=r?Nt(r):"";if(n)switch(n){case yr:return"[object DataView]";case dr:return"[object Map]";case hr:return"[object Promise]";case vr:return"[object Set]";case br:return"[object WeakMap]"}return e});var mr=gr,Or=Object.prototype.hasOwnProperty;var wr=function(t,e,r,n,o,i){var a=Se(t),u=Se(e),c=a?"[object Array]":mr(t),s=u?"[object Array]":mr(e),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),p=c==s;if(p&&Object(He.a)(t)){if(!Object(He.a)(e))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new fe),a||$e(t)?ge(t,e,r,n,o,i):je(t,e,c,r,n,o,i);if(!(1&r)){var y=l&&Or.call(t,"__wrapped__"),d=f&&Or.call(e,"__wrapped__");if(y||d){var h=y?t.value():t,v=d?e.value():e;return i||(i=new fe),o(h,v,r,n,i)}}return!!p&&(i||(i=new fe),cr(t,e,r,n,o,i))};var _r=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Ce(e)&&!Ce(r)?e!=e&&r!=r:wr(e,r,n,o,t,i))};var xr=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new fe;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?_r(l,s,3,n,f):p))return!1}}return!0};var jr=function(t){return t==t&&!St(t)};var Er=function(t){for(var e=ir(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,jr(o)]}return e};var Sr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Pr=function(t){var e=Er(t);return 1==e.length&&e[0][2]?Sr(e[0][0],e[0][1]):function(r){return r===t||xr(r,t,e)}};var kr=function(t){return"symbol"==typeof t||Ce(t)&&"[object Symbol]"==Et(t)},Ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dr=/^\w*$/;var Tr=function(t,e){if(Se(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!kr(t))||(Dr.test(t)||!Ar.test(t)||null!=e&&t in Object(e))};function Mr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Mr.Cache||ce),r}Mr.Cache=ce;var Nr=Mr;var Cr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rr=/\\(\\)?/g,Ir=function(t){var e=Nr(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Cr,(function(t,r,n,o){e.push(n?o.replace(Rr,"$1"):r||t)})),e})),Lr=vt?vt.prototype:void 0,zr=Lr?Lr.toString:void 0;var Br=function t(e){if("string"==typeof e)return e;if(Se(e))return tt(e,t)+"";if(kr(e))return zr?zr.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};var Hr=function(t){return null==t?"":Br(t)};var Xr=function(t,e){return Se(t)?t:Tr(t,e)?[t]:Ir(Hr(t))};var Ur=function(t){if("string"==typeof t||kr(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var Fr=function(t,e){for(var r=0,n=(e=Xr(e,t)).length;null!=t&&r<n;)t=t[Ur(e[r++])];return r&&r==n?t:void 0};var Gr=function(t,e,r){var n=null==t?void 0:Fr(t,e);return void 0===n?r:n};var Yr=function(t,e){return null!=t&&e in Object(t)};var Vr=function(t,e,r){for(var n=-1,o=(e=Xr(e,t)).length,i=!1;++n<o;){var a=Ur(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Fe(o)&&Ue(a,o)&&(Se(t)||Be(t))};var Wr=function(t,e){return null!=t&&Vr(t,e,Yr)};var Kr=function(t,e){return Tr(t)&&jr(e)?Sr(Ur(t),e):function(r){var n=Gr(r,t);return void 0===n&&n===e?Wr(r,t):_r(e,n,3)}};var $r=function(t){return t};var Zr=function(t){return function(e){return null==e?void 0:e[t]}};var qr=function(t){return function(e){return Fr(e,t)}};var Jr=function(t){return Tr(t)?Zr(Ur(t)):qr(t)};var Qr=function(t){return"function"==typeof t?t:null==t?$r:"object"==typeof t?Se(t)?Kr(t[0],t[1]):Pr(t):Jr(t)};var tn=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var en=function(t,e){return function(r,n){if(null==r)return r;if(!or(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}((function(t,e){return t&&tn(t,e,ir)}));var rn=function(t,e){var r=-1,n=or(t)?Array(t.length):[];return en(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var nn=function(t,e){return(Se(t)?tt:rn)(t,Qr(e,3))},on=function(){try{var t=Ut(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var an=function(t,e,r){"__proto__"==e&&on?on(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},un=Object.prototype.hasOwnProperty;var cn=function(t,e,r){var n=t[e];un.call(t,e)&&rt(n,r)&&(void 0!==r||e in t)||an(t,e,r)};var sn=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var u=e[i],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),o?an(r,u,c):cn(r,u,c)}return r};var ln=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},fn=Math.max;var pn=function(t,e,r){return e=fn(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=fn(n.length-e,0),a=Array(i);++o<i;)a[o]=n[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=n[o];return u[e]=r(a),ln(t,this,u)}};var yn=function(t){return function(){return t}},dn=on?function(t,e){return on(t,"toString",{configurable:!0,enumerable:!1,value:yn(e),writable:!0})}:$r,hn=Date.now;var vn=function(t){var e=0,r=0;return function(){var n=hn(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(dn);var bn=function(t,e){return vn(pn(t,e,$r),t+"")};var gn=function(t,e,r){if(!St(r))return!1;var n=typeof e;return!!("number"==n?or(r)&&Ue(e,r.length):"string"==n&&e in r)&&rt(r[e],t)};var mn=function(t){return bn((function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,a&&gn(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,i)}return e}))},On=Object.prototype.hasOwnProperty,wn=mn((function(t,e){if(Qe(e)||or(e))sn(e,ir(e),t);else for(var r in e)On.call(e,r)&&cn(t,r,e[r])}));var _n=function(t,e,r,n){if(!St(t))return t;for(var o=-1,i=(e=Xr(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=Ur(e[o]),s=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var l=u[c];void 0===(s=n?n(l,c,u):void 0)&&(s=St(l)?l:Ue(e[o+1])?[]:{})}cn(u,c,s),u=u[c]}return t};var xn=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],u=Fr(t,a);r(u,a)&&_n(i,Xr(a,t),u)}return i};var jn=function(t,e){return xn(t,e,(function(e,r){return Wr(t,r)}))},En=vt?vt.isConcatSpreadable:void 0;var Sn=function(t){return Se(t)||Be(t)||!!(En&&t&&t[En])};var Pn=function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=Sn),i||(i=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Ee(i,c):o||(i[i.length]=c)}return i};var kn=function(t){return(null==t?0:t.length)?Pn(t,1):[]};var An,Dn,Tn,Mn,Nn,Cn,Rn,In,Ln,zn,Bn,Hn,Xn,Un,Fn,Gn,Yn,Vn=function(t){return vn(pn(t,void 0,kn),t+"")}((function(t,e){return null==t?{}:jn(t,e)}));function Wn(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Kn(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 $n(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Zn,qn,Jn,Qn,to,eo,ro={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1,metaKeyMultipleSelected:!1},no=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","metaKeyMultipleSelected","multipleSelectKey","extraConf"],oo=(Dn=$n((An=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Wn(this,"stopZoomGraph",Dn,this),Wn(this,"stopScrollGraph",Tn,this),Wn(this,"stopMoveGraph",Mn,this),Wn(this,"adjustEdge",Nn,this),Wn(this,"adjustEdgeMiddle",Cn,this),Wn(this,"adjustEdgeStartAndEnd",Rn,this),Wn(this,"adjustNodePosition",In,this),Wn(this,"hideAnchors",Ln,this),Wn(this,"hoverOutline",zn,this),Wn(this,"nodeSelectedOutline",Bn,this),Wn(this,"edgeSelectedOutline",Hn,this),Wn(this,"nodeTextEdit",Xn,this),Wn(this,"edgeTextEdit",Un,this),Wn(this,"nodeTextDraggable",Fn,this),Wn(this,"edgeTextDraggable",Gn,this),Wn(this,"metaKeyMultipleSelected",Yn,this),this.multipleSelectKey="",this.extraConf={},this.defaultConfig={},wn(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);wn(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&wn(n,this.defaultConfig),!0===e){var o=Vn(ro,no);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,metaKeyMultipleSelected:this.metaKeyMultipleSelected},wn(n,o)}!1===r&&wn(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=Vn(t,no);return wn(n,i)}},{key:"getConfig",value:function(){return Vn(this,no)}}])&&Kn(e.prototype,r),n&&Kn(e,n),t}()).prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tn=$n(An.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mn=$n(An.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nn=$n(An.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Cn=$n(An.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rn=$n(An.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),In=$n(An.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ln=$n(An.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zn=$n(An.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Bn=$n(An.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hn=$n(An.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xn=$n(An.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Un=$n(An.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Fn=$n(An.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=$n(An.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yn=$n(An.prototype,"metaKeyMultipleSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$n(An.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(An.prototype,"updateEditConfig"),An.prototype),An);r(98);!function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(Zn||(Zn={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(qn||(qn={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(Jn||(Jn={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(Qn||(Qn={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform"}(to||(to={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(eo||(eo={}));var io,ao,uo,co,so,lo,fo,po,yo;function ho(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return vo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vo(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bo(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function go(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 mo(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(io||(io={}));var Oo=(uo=mo((ao=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.MINI_SCALE_SIZE=.2,this.MAX_SCALE_SIZE=16,bo(this,"SCALE_X",uo,this),bo(this,"SKEW_Y",co,this),bo(this,"SKEW_X",so,this),bo(this,"SCALE_Y",lo,this),bo(this,"TRANSLATE_X",fo,this),bo(this,"TRANSLATE_Y",po,this),bo(this,"ZOOM_SIZE",yo,this),this.eventCenter=void 0,this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var e=ho(t,2),r=e[0],n=e[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(n-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=ho(t,2),r=e[0],n=e[1];return[r*this.SCALE_X+this.TRANSLATE_X,n*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,r){var n=ho(t,2),o=n[0],i=n[1];return[o+e/this.SCALE_X,i+r/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var t=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(t,")")}}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,r=this.SCALE_X,n=this.SCALE_Y;return!0===t?(r+=this.ZOOM_SIZE,n+=this.ZOOM_SIZE):!1===t?(r-=this.ZOOM_SIZE,n-=this.ZOOM_SIZE):"number"==typeof t&&(r=t,n=t),!(r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(r-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(n-this.SCALE_Y)*e[1]),this.SCALE_X=r,this.SCALE_Y=n,this.emitGraphTransform("zoom"),0))}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(to.GRAPH_TRANSFORM,{type:t,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(t,e){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=e,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,e,r,n){var o=ho(this.CanvasPointToHtmlPoint([t,e]),2),i=r/2-o[0],a=n/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=a,this.emitGraphTransform("focusOn")}}])&&go(e.prototype,r),n&&go(e,n),t}()).prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),co=mo(ao.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),so=mo(ao.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),lo=mo(ao.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),fo=mo(ao.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),po=mo(ao.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),yo=mo(ao.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),mo(ao.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"zoom"),ao.prototype),mo(ao.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"resetZoom"),ao.prototype),mo(ao.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"translate"),ao.prototype),mo(ao.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"focusOn"),ao.prototype),ao);var wo=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var _o=function(t,e){return t&&sn(e,ir(e),t)};var xo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},jo=Object.prototype.hasOwnProperty;var Eo=function(t){if(!St(t))return xo(t);var e=Qe(t),r=[];for(var n in t)("constructor"!=n||!e&&jo.call(t,n))&&r.push(n);return r};var So=function(t){return or(t)?qe(t,!0):Eo(t)};var Po=function(t,e){return t&&sn(e,So(e),t)},ko=r(156);var Ao=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var Do=function(t,e){return sn(t,Me(t),e)},To=tr(Object.getPrototypeOf,Object),Mo=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ee(e,Me(t)),t=To(t);return e}:Ae;var No=function(t,e){return sn(t,Mo(t),e)};var Co=function(t){return Pe(t,So,Mo)},Ro=Object.prototype.hasOwnProperty;var Io=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Ro.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var Lo=function(t){var e=new t.constructor(t.byteLength);return new me(e).set(new me(t)),e};var zo=function(t,e){var r=e?Lo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Bo=/\w*$/;var Ho=function(t){var e=new t.constructor(t.source,Bo.exec(t));return e.lastIndex=t.lastIndex,e},Xo=vt?vt.prototype:void 0,Uo=Xo?Xo.valueOf:void 0;var Fo=function(t){return Uo?Object(Uo.call(t)):{}};var Go=function(t,e){var r=e?Lo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var Yo=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Lo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return zo(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Go(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Ho(t);case"[object Set]":return new n;case"[object Symbol]":return Fo(t)}},Vo=Object.create,Wo=function(){function t(){}return function(e){if(!St(e))return{};if(Vo)return Vo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Ko=function(t){return"function"!=typeof t.constructor||Qe(t)?{}:Wo(To(t))};var $o=function(t){return Ce(t)&&"[object Map]"==mr(t)},Zo=We.a&&We.a.isMap,qo=Zo?Ve(Zo):$o;var Jo=function(t){return Ce(t)&&"[object Set]"==mr(t)},Qo=We.a&&We.a.isSet,ti=Qo?Ve(Qo):Jo,ei={};ei["[object Arguments]"]=ei["[object Array]"]=ei["[object ArrayBuffer]"]=ei["[object DataView]"]=ei["[object Boolean]"]=ei["[object Date]"]=ei["[object Float32Array]"]=ei["[object Float64Array]"]=ei["[object Int8Array]"]=ei["[object Int16Array]"]=ei["[object Int32Array]"]=ei["[object Map]"]=ei["[object Number]"]=ei["[object Object]"]=ei["[object RegExp]"]=ei["[object Set]"]=ei["[object String]"]=ei["[object Symbol]"]=ei["[object Uint8Array]"]=ei["[object Uint8ClampedArray]"]=ei["[object Uint16Array]"]=ei["[object Uint32Array]"]=!0,ei["[object Error]"]=ei["[object Function]"]=ei["[object WeakMap]"]=!1;var ri=function t(e,r,n,o,i,a){var u,c=1&r,s=2&r,l=4&r;if(n&&(u=i?n(e,o,i,a):n(e)),void 0!==u)return u;if(!St(e))return e;var f=Se(e);if(f){if(u=Io(e),!c)return Ao(e,u)}else{var p=mr(e),y="[object Function]"==p||"[object GeneratorFunction]"==p;if(Object(He.a)(e))return Object(ko.a)(e,c);if("[object Object]"==p||"[object Arguments]"==p||y&&!i){if(u=s||y?{}:Ko(e),!c)return s?No(e,Po(u,e)):Do(e,_o(u,e))}else{if(!ei[p])return i?e:{};u=Yo(e,p,c)}}a||(a=new fe);var d=a.get(e);if(d)return d;a.set(e,u),ti(e)?e.forEach((function(o){u.add(t(o,r,n,o,e,a))})):qo(e)&&e.forEach((function(o,i){u.set(i,t(o,r,n,i,e,a))}));var h=f?void 0:(l?s?Co:ar:s?So:ir)(e);return wo(h||e,(function(o,i){h&&(o=e[i=o]),cn(u,i,t(o,r,n,i,e,a))})),u};var ni=function(t){return ri(t,5)};function oi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ii(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?oi(Object(r),!0).forEach((function(e){ai(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ai(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ui={fill:"#FFFFFF",stroke:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,opacity:1,outlineColor:"#000000",outlineStrokeDashArray:"3,3",hoverOutlineColor:"#000000",hoverOutlineStrokeDashArray:"3,3"},ci=ii(ii({},ui),{},{width:100,height:80,radius:0}),si=ii(ii({},ui),{},{r:50}),li=ii(ii({},ui),{},{rx:55,ry:45}),fi=ii(ii({},ui),{},{rx:50,ry:50}),pi=ii({},ui),yi=ii(ii({},ui),{},{stroke:"#000000",strokeWidth:1,r:4}),di={stroke:"#000000",strokeWidth:2,hoverStroke:"#000000",selectedStroke:"#000000",strokeDashArray:"1,0",outlineColor:"#000000",outlineStrokeDashArray:"3,3"},hi=ii({},di),vi=ii(ii({},di),{},{offset:30}),bi=ii(ii({},di),{},{offset:100,adjustLineColor:"#4169E1",adjustAnchorStroke:"#4169E1",adjustAnchorFill:"#1E90FF",adjustAnchorFillOpacity:.5}),gi={color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:""},mi={rect:ci,circle:si,diamond:fi,ellipse:li,polygon:pi,anchor:yi,text:gi,nodeText:ii(ii({},gi),{},{autoWrap:!1,lineHeight:1.2,wrapPadding:"2px 3px"}),edgeText:{color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:"",background:{fill:"transparent",height:20,stroke:"transparent",radius:0},hoverBackground:null,autoWrap:!1,lineHeight:1.2,wrapPadding:"2px 3px"},line:hi,polyline:vi,bezier:bi,arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},anchorHover:{fill:"#1E90FF",fillOpacity:.5,stroke:"#4169E1",strokeWidth:1,r:10},snapline:{stroke:"#1E90FF",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#373738",strokeWidth:"2px"}};function Oi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Oi(Object(r),!0).forEach((function(e){_i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xi=function(t){var e=ni(mi);return t&&Object.keys(t).forEach((function(r){e[r]=wi(wi({},e[r]),t[r])})),e};function ji(t,e){return e*Math.round(t/e)||t}function Ei(t,e){return t%e}function Si(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pi(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ki,Ai=function(t,e,r){var n=Si(t,2),o=n[0],i=n[1],a=Si(e,2),u=a[0],c=a[1],s=Si(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},Di=(r(36),r(61),r(71),r(153),r(154),r(72),r(12),r(13),r(14),r(41),new Uint8Array(16));function Ti(){if(!ki&&!(ki="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ki(Di)}var Mi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ni=function(t){return"string"==typeof t&&Mi.test(t)},Ci=[],Ri=0;Ri<256;++Ri)Ci.push((Ri+256).toString(16).substr(1));var Ii=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ci[t[e+0]]+Ci[t[e+1]]+Ci[t[e+2]]+Ci[t[e+3]]+"-"+Ci[t[e+4]]+Ci[t[e+5]]+"-"+Ci[t[e+6]]+Ci[t[e+7]]+"-"+Ci[t[e+8]]+Ci[t[e+9]]+"-"+Ci[t[e+10]]+Ci[t[e+11]]+Ci[t[e+12]]+Ci[t[e+13]]+Ci[t[e+14]]+Ci[t[e+15]]).toLowerCase();if(!Ni(r))throw TypeError("Stringified UUID is invalid");return r};var Li=function(t,e,r){var n=(t=t||{}).random||(t.rng||Ti)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return Ii(n)},zi=function(){return Li()},Bi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.nodes.reduce((function(t,r){return t[r.id]=e+Li(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+Li(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},Hi=(r(99),r(196),function(t,e,r){var n=t.x,o=t.y;return(n-e.x)*(n-r.x)<=0&&(o-e.y)*(o-r.y)<=0});function Xi(t){return(Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ui(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ui(Object(r),!0).forEach((function(e){Gi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ui(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yi,Vi,Wi,Ki,$i,Zi,qi,Ji,Qi,ta,ea,ra,na,oa,ia,aa,ua,ca,sa,la,fa,pa,ya,da,ha,va=function(t){return t.anchors},ba=function(t,e){for(var r,n=e.length-1;n>=0;n--){if(wa(t,e[n])){var o=ga(t,e[n]);if(o){r={node:e[n],anchorIndex:o.index,anchor:o.anchor};break}}}return r},ga=function(t,e){for(var r,n=va(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var a=ma(t.x,t.y,n[i].x,n[i].y);a<o&&(o=a,r={index:i,anchor:Fi(Fi({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r},ma=function(t,e,r,n){return Math.hypot(t-r,e-n)},Oa=function(t,e){var r=!1,n=_a(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},wa=function(t,e){var r=!1,n=_a(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},_a=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{minX:e-n/2,minY:r-o/2,maxX:e+n/2,maxY:r+o/2,x:e,y:r,width:n,height:o,centerX:e,centerY:r}},xa=function(t,e,r){var n,o=function(t){var e=t,r=e.x,n=e.y,o=e.width,i=e.height,a=e.radius;return[{x:r-o/2+a,y:n-i/2+a,r:a},{x:r+o/2-a,y:n-i/2+a,r:a},{x:r-o/2+a,y:n+i/2-a,r:a},{x:r+o/2-a,y:n+i/2-a,r:a}]}(r),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var r=ma(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),ja(t,e,n)},ja=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.r;if(e===eo.HORIZONTAL){var c=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)),s=i+Math.sqrt(u*u-(t.y-a)*(t.y-a));n={x:Math.abs(c-t.x)<Math.abs(s-t.x)?c:s,y:t.y}}else if(e===eo.VERTICAL){var l=a-Math.sqrt(u*u-(t.x-i)*(t.x-i)),f=a+Math.sqrt(u*u-(t.x-i)*(t.x-i)),p=Math.abs(l-t.y)<Math.abs(f-t.y)?l:f;n={x:t.x,y:p}}return n},Ea=function(t,e){var r=e,n=!1,o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,a=r.y-r.height/2+r.radius,u=r.y+r.height/2-r.radius,c=r.x,s=r.y,l=r.width,f=r.height;return t.y===s+f/2||t.y===s-f/2?n=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(n=t.y>a&&t.y<u),n},Sa=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===eo.HORIZONTAL){var s=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c)),l=i+Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c));n={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===eo.VERTICAL){var f=a-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),p=a+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),y=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:y}}return n},Pa=function(t,e,r){for(var n,o=r.pointsPosition,i=Number.MAX_SAFE_INTEGER,a=[],u=0;u<o.length;u++)a.push({start:o[u],end:o[(u+1)%o.length]});return a.forEach((function(r){var o=r.start,a=r.end,u=o,c=a;o.x>a.x&&(u=a,c=o);var s,l=(c.y-u.y)/(c.x-u.x),f=(u.x*c.y-c.x*u.y)/(u.x-c.x);if(l>Number.MAX_SAFE_INTEGER||f>Number.MAX_SAFE_INTEGER?s={x:t.x,y:t.y}:e===eo.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===eo.VERTICAL&&(s={x:t.x,y:l*t.x+f}),Hi(s,o,a)){var p=ma(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},ka=function(t,e,r,n){var o=t.x,i=t.y;return e.x>t.x?o=t.x+r/2:e.x<t.x&&(o=t.x-r/2),e.y>t.y?i=t.y+n/2:e.y<t.y&&(i=t.y-n/2),{x:o,y:i}},Aa=function(t){var e=t.rows,r=t.style,n=t.rowsLength,o=t.className,i=document.createElement("div");i.style.fontSize=r.fontSize,i.style.width=r.width,i.className=o,i.style.lineHeight=r.lineHeight,i.style.padding=r.padding,r.fontFamily&&(i.style.fontFamily=r.fontFamily),n>1?e.forEach((function(t){var e=document.createElement("div");e.textContent=t,i.appendChild(e)})):i.textContent=e,document.body.appendChild(i);var a=i.clientHeight;return document.body.removeChild(i),a},Da=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=Yu(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},Ta=function(t){return"object"!==Xi(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},Ma=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},Na=1e3,Ca=999,Ra=function(){return++Na};function Ia(t){return(Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function La(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function za(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 Ba(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}function Ha(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ua=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ha(Object(r),!0).forEach((function(e){Xa(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ha(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({sourceNodeId:"",sourceAnchorId:"",targetNodeId:"",targetAnchorId:"",startPoint:null,endPoint:null,zIndex:0,isSelected:!1,isHovered:!1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},points:"",pointsList:[],strokeOpacity:1,hideOutline:!1},mi.line),Fa=(Vi=Ba((Yi=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=zi(),this.BaseType=Qn.EDGE,La(this,"state",Vi,this),this.modelType=Jn.EDGE,this.additionStateData=void 0,this.graphModel=void 0,this.menu=void 0,this.sourceAnchorId=Ua.sourceAnchorId,this.targetAnchorId=Ua.targetAnchorId,this.customTextPosition=!1,La(this,"text",Wi,this),La(this,"type",Ki,this),La(this,"properties",$i,this),La(this,"sourceNodeId",Zi,this),La(this,"targetNodeId",qi,this),La(this,"startPoint",Ji,this),La(this,"endPoint",Qi,this),La(this,"strokeWidth",ta,this),La(this,"stroke",ea,this),La(this,"strokeDashArray",ra,this),La(this,"outlineColor",na,this),La(this,"hideOutline",oa,this),La(this,"outlineStrokeDashArray",ia,this),La(this,"strokeOpacity",aa,this),La(this,"zIndex",ua,this),La(this,"isSelected",ca,this),La(this,"isHovered",sa,this),La(this,"isHitable",la,this),La(this,"hoverStroke",fa,this),La(this,"selectedStroke",pa,this),La(this,"points",ya,this),La(this,"pointsList",da,this),La(this,"draggable",ha,this),this.graphModel=r,this.setStyleFromTheme(n,r),this.initEdgeData(e),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(e)}var e,r,n;return e=t,(r=[{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type);r&&(t.id=r);var n=this.createId();n&&(t.id=n)}wn(this,Zu(t)),this.graphModel.overlapMode===io.INCREASE&&(this.zIndex=t.zIndex||Ra())}},{key:"createId",value:function(){return null}},{key:"setAttributes",value:function(){}},{key:"sourceNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}},{key:"targetNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"move",value:function(){}},{key:"getBeginAnchor",value:function(t,e){var r,n;return va(t).forEach((function(t){var o=qu(t,e);n?o<n&&(n=o,r=t):(n=o,r=t)})),r}},{key:"getEndAnchor",value:function(t){var e,r,n=this;return va(t).forEach((function(t){var o=qu(t,n.startPoint);r?o<r&&(r=o,e=t):(r=o,e=t)})),e}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,i={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(o.I)(this.properties)};return n&&(i.text={x:e,y:r,value:n}),this.graphModel.overlapMode===io.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"setProperty",value:function(t,e){this.properties[t]=Ma(e),this.setAttributes()}},{key:"setProperties",value:function(t){Object.assign(this.properties,Ma(t)),this.setAttributes()}},{key:"updateData",value:function(t){var e=Ma(Vn(t,"type","sourceNodeId","targetNodeId","startPoint","endPoint","text","properties")),r=this.text,n=r.x,o=r.y,i=r.draggable,a=r.editable;if(e.text&&"string"==typeof e.text){var u={value:e.text,draggable:i,editable:a},c=this.textPosition;e.text=n||o?Object.assign({},u,{x:n,y:o}):Object.assign({},u,c)}else if("object"===Ia(e.text)){var s=Object.assign({},this.text,e.text);e.text=Vn(s,"x","y","value","draggable","editable")}wn(this,e)}},{key:"formatText",value:function(t){var e=this.textPosition,r=e.x,n=e.y;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||r,y:t.text.y||n,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:r,y:n,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var t=this.textPosition,e=t.x,r=t.y;this.text.x=e,this.text.y=r}},{key:"moveText",value:function(t,e){if(this.text){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,draggable:a,x:n+t,y:o+e,editable:u}}}},{key:"setText",value:function(t){t&&wn(this.text,t)}},{key:"updateText",value:function(t){var e=this.text,r=e.x,n=e.y,o=e.draggable,i=e.editable;this.text={x:r,y:n,draggable:o,editable:i,value:t}}},{key:"setAnchors",value:function(){if(!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint=t}if(!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint=e}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStroke",value:function(t){this.stroke=t}},{key:"updateStrokeWidth",value:function(t){this.strokeWidth=t}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"setStyleFromTheme",value:function(t,e){var r=e.theme;r[t]&&wn(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ua.zIndex;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){wn(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:r.x,y:r.y})}}])&&za(e.prototype,r),n&&za(e,n),t}()).prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Wi=Ba(Yi.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.text}}),Ki=Ba(Yi.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),$i=Ba(Yi.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Zi=Ba(Yi.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.sourceNodeId}}),qi=Ba(Yi.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.targetNodeId}}),Ji=Ba(Yi.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.startPoint}}),Qi=Ba(Yi.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.endPoint}}),ta=Ba(Yi.prototype,"strokeWidth",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.strokeWidth}}),ea=Ba(Yi.prototype,"stroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.stroke}}),ra=Ba(Yi.prototype,"strokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.strokeDashArray}}),na=Ba(Yi.prototype,"outlineColor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.outlineColor}}),oa=Ba(Yi.prototype,"hideOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.hideOutline}}),ia=Ba(Yi.prototype,"outlineStrokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.outlineStrokeDashArray}}),aa=Ba(Yi.prototype,"strokeOpacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.strokeOpacity}}),ua=Ba(Yi.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.zIndex}}),ca=Ba(Yi.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.isSelected}}),sa=Ba(Yi.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.isHovered}}),la=Ba(Yi.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),fa=Ba(Yi.prototype,"hoverStroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.hoverStroke}}),pa=Ba(Yi.prototype,"selectedStroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.selectedStroke}}),ya=Ba(Yi.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.points}}),da=Ba(Yi.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ua.pointsList}}),ha=Ba(Yi.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ba(Yi.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(Yi.prototype,"sourceNode"),Yi.prototype),Ba(Yi.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(Yi.prototype,"targetNode"),Yi.prototype),Ba(Yi.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(Yi.prototype,"textPosition"),Yi.prototype),Ba(Yi.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setProperty"),Yi.prototype),Ba(Yi.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setProperties"),Yi.prototype),Ba(Yi.prototype,"updateData",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateData"),Yi.prototype),Ba(Yi.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"formatText"),Yi.prototype),Ba(Yi.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"resetTextPosition"),Yi.prototype),Ba(Yi.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"moveText"),Yi.prototype),Ba(Yi.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setText"),Yi.prototype),Ba(Yi.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateText"),Yi.prototype),Ba(Yi.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setAnchors"),Yi.prototype),Ba(Yi.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setSelected"),Yi.prototype),Ba(Yi.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setHovered"),Yi.prototype),Ba(Yi.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setHitable"),Yi.prototype),Ba(Yi.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setElementState"),Yi.prototype),Ba(Yi.prototype,"updateStroke",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateStroke"),Yi.prototype),Ba(Yi.prototype,"updateStrokeWidth",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateStrokeWidth"),Yi.prototype),Ba(Yi.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateStartPoint"),Yi.prototype),Ba(Yi.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateEndPoint"),Yi.prototype),Ba(Yi.prototype,"setStyleFromTheme",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setStyleFromTheme"),Yi.prototype),Ba(Yi.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"setZIndex"),Yi.prototype),Ba(Yi.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"initPoints"),Yi.prototype),Ba(Yi.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateAttributes"),Yi.prototype),Ba(Yi.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"getAdjustStart"),Yi.prototype),Ba(Yi.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"getAdjustEnd"),Yi.prototype),Ba(Yi.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Yi.prototype,"updateAfterAdjustStartAndEnd"),Yi.prototype),Yi),Ga=Fa;function Ya(t){return(Ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Va(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 Wa(t,e){return(Wa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ka(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Za(t);if(e){var o=Za(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $a(this,r)}}function $a(t,e){if(e&&("object"===Ya(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Za(t){return(Za=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qa,Ja,Qa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wa(t,e)}(i,t);var e,r,n,o=Ka(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"line")).modelType=Jn.LINE_EDGE,r}return e=i,(r=[{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Va(e.prototype,r),n&&Va(e,n),i}(Ga);r(42);function tu(t){return(tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ru(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ru(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ru(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nu(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 ou(){return(ou="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=iu(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function iu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lu(t)););return t}function au(t,e){return(au=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function uu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lu(t);if(e){var o=lu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cu(this,r)}}function cu(t,e){if(e&&("object"===tu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return su(t)}function su(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lu(t){return(lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var pu=(Ja=fu((qa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&au(t,e)}(i,t);var e,r,n,o=uu(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"polyline")).modelType=Jn.POLYLINE_EDGE,r.offset=mi.polyline.offset,r.draginngPointList=void 0,function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(r,"dbClickPosition",Ja,su(r)),r}return e=i,(r=[{key:"getTextPosition",value:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var r=this.dbClickPosition;return{x:r.x,y:r.y}}var n=Uu(this.points),o=eu(Lu(n),2),i=o[0],a=o[1];return{x:(i.x+a.x)/2,y:(i.y+a.y)/2}}},{key:"getAfterAnchor",value:function(t,e,r){var n,o;return r.forEach((function(r){var i;t===eo.HORIZONTAL?i=Math.abs(e.y-r.y):t===eo.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)})),n}},{key:"getCorssPoint",value:function(t,e,r){var n;return t===eo.HORIZONTAL?n={x:r.x,y:e.y}:t===eo.VERTICAL&&(n={x:e.x,y:r.y}),n}},{key:"removeCrossPoints",value:function(t,e,r){var n=r.map((function(t){return t}));if(1===t){var o=n[t],i=n[e],a=n[t-1];if(zu(a,o,this.sourceNode)){if(Bu(o,i,this.sourceNode)){var u=Hu(o,i,this.sourceNode);u&&(n[t]=u,n.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===a.x&&e.x===o.x||e.y===a.y&&e.y===o.y)&&ma(e.x,e.y,o.x,o.y)<ma(a.x,a.y,o.x,o.y)&&(n[t-1]=e)}))}if(e===r.length-2){var c=n[t],s=n[e],l=n[e+1];if(zu(s,l,this.targetNode)){if(Bu(c,s,this.targetNode)){var f=Hu(c,s,this.targetNode);f&&(n[e]=f,n.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===l.x&&t.x===s.x||t.y===l.y&&t.y===s.y)&&ma(t.x,t.y,s.x,s.y)<ma(l.x,l.y,s.x,s.y)&&(n[e+1]=t)}))}return n}},{key:"getDragingPoints",value:function(t,e,r,n,o){var i=o.map((function(t){return t})),a=this.getAfterAnchor(t,r,n),u=this.getCorssPoint(t,r,a);return"start"===e?(i.unshift(u),i.unshift(a)):(i.push(u),i.push(a)),i}},{key:"updateCrossPoints",value:function(t){var e=t.map((function(t){return t})),r=t[0],n=t[1],o=t[e.length-2],i=t[e.length-1],a=this.sourceNode,u=this.targetNode,c=a.modelType,s=u.modelType,l=Xu(r,n),f=e[0];switch(c){case Jn.RECT_NODE:0!==a.radius&&(Ea(r,a)||(f=xa(r,l,a)));break;case Jn.CIRCLE_NODE:f=ja(r,l,a);break;case Jn.ELLIPSE_NODE:f=Sa(r,l,a);break;case Jn.DIAMOND_NODE:case Jn.POLYGON_NODE:f=Pa(r,l,a)}e[0]=f;var p=Xu(o,i),y=e[e.length-1];switch(s){case Jn.RECT_NODE:0!==u.radius&&(Ea(i,u)||(y=xa(i,p,u)));break;case Jn.CIRCLE_NODE:y=ja(i,p,u);break;case Jn.ELLIPSE_NODE:y=Sa(i,p,u);break;case Jn.DIAMOND_NODE:case Jn.POLYGON_NODE:y=Pa(i,p,u)}return e[e.length-1]=y,e}},{key:"getData",value:function(){var t=ou(lu(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Object.assign({},t,{pointsList:e})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var t=Iu({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList,c=u;return a===eo.HORIZONTAL?(u[o]={x:r.x,y:r.y+e.y},u[i]={x:n.x,y:n.y+e.y},c=this.pointsList.map((function(t){return t}))):a===eo.VERTICAL&&(u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y},c=this.pointsList.map((function(t){return t}))),this.updatePointsAfterDrage(c),this.draginngPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppend",value:function(t,e){var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList;if(a===eo.HORIZONTAL){u[o]={x:r.x,y:r.y+e.y},u[i]={x:n.x,y:n.y+e.y};var c=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(c=this.removeCrossPoints(o,i,c)),0===o){var s={x:r.x,y:r.y+e.y};if(!Oa(s,this.sourceNode)){var l=this.sourceNode.anchors;c=this.getDragingPoints(a,"start",s,l,c)}}if(i===this.pointsList.length-1){var f={x:n.x,y:n.y+e.y};if(!Oa(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDragingPoints(a,"end",f,p,c)}}c=Ru(c),this.updatePointsAfterDrage(c),this.draginngPointList=c}else if(a===eo.VERTICAL){u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y};var y=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(y=this.removeCrossPoints(o,i,y)),0===o){var d={x:r.x+e.x,y:r.y};if(!Oa(d,this.sourceNode)){var h=this.sourceNode.anchors;y=this.getDragingPoints(a,"start",d,h,y)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!Oa(v,this.targetNode)){var b=this.targetNode.anchors;y=this.getDragingPoints(a,"end",v,b,y)}}y=Ru(y),this.updatePointsAfterDrage(y),this.draginngPointList=y}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppendEnd",value:function(){if(this.draginngPointList){var t=Uu(this.points);this.pointsList=t.map((function(t){return t})),this.draginngPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var r=t[t.length-1];this.endPoint=Object.assign({},r)}}},{key:"updatePointsAfterDrage",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=Iu({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&nu(e.prototype,r),n&&nu(e,n),i}(Ga)).prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),fu(qa.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"initPoints"),qa.prototype),fu(qa.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"updatePoints"),qa.prototype),fu(qa.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"updateStartPoint"),qa.prototype),fu(qa.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"updateEndPoint"),qa.prototype),fu(qa.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"dragAppendStart"),qa.prototype),fu(qa.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"dragAppendSimple"),qa.prototype),fu(qa.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"dragAppend"),qa.prototype),fu(qa.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"dragAppendEnd"),qa.prototype),fu(qa.prototype,"updatePointsAfterDrage",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"updatePointsAfterDrage"),qa.prototype),fu(qa.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"getAdjustStart"),qa.prototype),fu(qa.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"getAdjustEnd"),qa.prototype),fu(qa.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(qa.prototype,"updateAfterAdjustStartAndEnd"),qa.prototype),qa),yu=function(t){var e=t.start,r=t.end,n=t.offset,o=t.verticalLength,i=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},u=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),s=Math.sqrt(o*o+n*n);return"start"===i?r.x>=e.x?(a.leftX=e.x+s*Math.sin(u+c),a.leftY=e.y-s*Math.cos(u+c),a.rightX=e.x-s*Math.sin(u-c),a.rightY=e.y+s*Math.cos(u-c)):(a.leftX=e.x-s*Math.sin(u+c),a.leftY=e.y+s*Math.cos(u+c),a.rightX=e.x+s*Math.sin(u-c),a.rightY=e.y-s*Math.cos(u-c)):"end"===i&&(r.x>=e.x?(a.leftX=r.x+s*Math.sin(u-c),a.leftY=r.y-s*Math.cos(u-c),a.rightX=r.x-s*Math.sin(u+c),a.rightY=r.y+s*Math.cos(u+c)):(a.leftX=r.x-s*Math.sin(u-c),a.leftY=r.y+s*Math.cos(u-c),a.rightX=r.x+s*Math.sin(u+c),a.rightY=r.y-s*Math.cos(u+c))),a};function du(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function hu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?du(Object(r),!0).forEach((function(e){vu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):du(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function vu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bu(t){return function(t){if(Array.isArray(t))return wu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ou(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gu(t){return(gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||Ou(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ou(t,e){if(t){if("string"==typeof t)return wu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wu(t,e):void 0}}function wu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var _u=function(t){var e=[],r={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,r[e]=t})),Object.keys(r).forEach((function(t){e.push(r[t])})),e},xu=function(t,e){return 0===t.width&&0===t.height?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},ju=function(t,e){return function(t,e){var r=Math.abs(t.x-e.centerX),n=Math.abs(t.y-e.centerY);return r/e.width>n/e.height?eo.HORIZONTAL:eo.VERTICAL}(e,t)===eo.HORIZONTAL?{x:e.x>t.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},Eu=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(r+o)/2,centerY:(n+i)/2,minX:r,minY:n,maxX:o,maxY:i,height:i-n,width:o-r}},Su=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach((function(t){r.push(t.x),n.push(t.y)}));var o=Math.min.apply(Math,r),i=Math.max.apply(Math,r),a=Math.min.apply(Math,n),u=Math.max.apply(Math,n),c=i-o,s=u-a;return e&&(c+=e,s+=e),{centerX:(o+i)/2,centerY:(a+u)/2,maxX:i,maxY:u,minX:o,minY:a,x:(o+i)/2,y:(a+u)/2,height:s,width:c}},Pu=function(t){var e=t.minX,r=t.minY,n=t.maxX,o=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:o},{x:e,y:o}]},ku=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Au=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Du=function(t,e,r,n,o){return Au(t,e)+Au(t,r)+function(t,e){var r=0;return e.forEach((function(e){e&&(t.x===e.x&&(r+=-2),t.y===e.y&&(r+=-2))})),r}(t,[e,r,n,o])},Tu=function(t,e,r,n){var o=e.x-t.x,i=e.y-t.y,a=n.x-r.x,u=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-a*i+o*u),s=(a*(t.y-r.y)-u*(t.x-r.x))/(-a*i+o*u);return c>=0&&c<=1&&s>=0&&s<=1},Mu=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=mu(Pu(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return Tu(t,e,o,i)||Tu(t,e,o,u)||Tu(t,e,i,a)||Tu(t,e,a,u)},Nu=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=Du(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var y=function(){var y,d,h,v=void 0,b=1/0;if(c.forEach((function(t){f[t.id]<b&&(b=f[t.id],v=t)})),v===r){var g=[];return function t(e,r,n,o,i){i||(i=0),e.unshift(r[o]),n[o]&&n[o]!==o&&i<=100&&t(e,r,n,n[o],i+1)}(g,p,s,r.id),{v:g}}d=v,(h=(y=c).indexOf(d))>-1&&y.splice(h,1),u.push(v),function(t,e,r,n){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||Mu(t,e,r)||Mu(t,e,n)||o.push(t))})),_u(o)}(t,v,n,o).forEach((function(t){if(-1===u.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var n=f[v.id]+Au(v,t);l[t.id]&&n>=l[t.id]||(s[t.id]=v.id,l[t.id]=n,f[t.id]=l[t.id]+Du(t,r,e,i,a))}}))};c.length;){var d=y();if("object"===gu(d))return d.v}return[e,r]},Cu=function(t){return _a(t)},Ru=function(t){for(var e=t,r=1;r<e.length-1;){var n=e[r-1],o=e[r],i=e[r+1];n.x===o.x&&o.x===i.x||n.y===o.y&&o.y===i.y?e.splice(r,1):r++}return e},Iu=function(t,e,r,n,o){var i,a,u=Cu(r),c=Cu(n),s=xu(u,o),l=xu(c,o),f=ju(s,t),p=ju(l,e);if(i=s,a=l,2*Math.abs(i.centerX-a.centerX)<i.width+a.width&&2*Math.abs(i.centerY-a.centerY)<i.height+a.height){var y=Fu(t,e,f,p);return[t,f].concat(bu(y),[p,e])}var d=Su([f,p]),h=Eu(s,d),v=Eu(l,d),b=[];b=(b=b.concat(Pu(h))).concat(Pu(v));var g={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[d,h,v].forEach((function(t){b=b.concat(function(t,e){return function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]}(t,e.x).concat(function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]}(t,e.y))}(t,g).filter((function(t){return ku(t,s)&&ku(t,l)})))})),[{x:f.x,y:p.y},{x:p.x,y:f.y}].forEach((function(t){ku(t,s)&&ku(t,l)&&b.push(t)})),b.unshift(f),b.push(p),b=_u(b);var m=Nu(b,f,p,u,c,t,e);return m.unshift(t),m.push(e),m.length>2&&(m=Ru(m)),_u(m)},Lu=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],o=ma(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=ma(a.x,a.y,u.x,u.y);c>o&&(o=c,r=a,n=u)}e=[r,n]}return e},zu=function(t,e,r){var n=Oa(t,r),o=Oa(e,r);return n&&o},Bu=function(t,e,r){var n=Oa(t,r),o=Oa(e,r);return!(n&&o)&&(n||o)},Hu=function(t,e,r){for(var n,o,i=_a(r),a=Pu(i),u=0;u<a.length;u++){Tu(t,e,a[u],a[(u+1)%a.length])&&(o=[a[u],a[(u+1)%a.length]])}return o&&(n=function(t,e,r,n){var o=(e.y-t.y)*(n.x-r.x)-(t.x-e.x)*(r.y-n.y);if(0===o)return!1;var i=((e.x-t.x)*(n.x-r.x)*(r.y-t.y)+(e.y-t.y)*(n.x-r.x)*t.x-(n.y-r.y)*(e.x-t.x)*r.x)/o,a=-((e.y-t.y)*(n.y-r.y)*(r.x-t.x)+(e.x-t.x)*(n.y-r.y)*t.y-(n.x-r.x)*(e.y-t.y)*r.y)/o;return(i-t.x)*(i-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(a-r.y)*(a-n.y)<=0&&{x:i,y:a}}(t,e,o[0],o[1])),n},Xu=function(t,e){var r;return t.x===e.x?r=eo.VERTICAL:t.y===e.y&&(r=eo.HORIZONTAL),r},Uu=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=mu(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},Fu=function(t,e,r,n){var o=[];if(Xu(t,r)===Xu(e,n))t.y===r.y?(o.push({x:r.x,y:(r.y+n.y)/2}),o.push({x:n.x,y:(r.y+n.y)/2})):(o.push({x:(r.x+n.x)/2,y:r.y}),o.push({x:(r.x+n.x)/2,y:n.y}));else{var i={x:r.x,y:n.y},a=Hi(i,t,r),u=Hi(i,e,n);if(a||u)i={x:n.x,y:r.y};else{var c=Gu(i,t,r),s=Gu(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},Gu=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},Yu=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},Vu=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,a=_a(n),u=_a(o),c=xu(a,i),s=xu(u,i);return{sNext:ju(c,e),ePre:ju(s,r)}},Wu=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Ku(e[0]),Ku(e[1]),Ku(e[2]),Ku(e[3])]},Ku=function(t){var e=mu(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},$u=function(t,e){for(var r,n=t.x,o=t.y,i=Uu(e),a=Number.MAX_SAFE_INTEGER,u=[],c=0;c<i.length;c++)u.push({start:i[c],end:i[(c+1)%i.length]});if(u.forEach((function(t){var e=t.start,i=t.end;if(e.x===i.x){var u={x:e.x,y:o};if(Hi(u,e,i)){var c=Math.abs(e.x-n);c<a&&(a=c,r=u)}}else if(e.y===i.y){var s={x:n,y:e.y};if(Hi(s,e,i)){var l=Math.abs(e.y-o);l<a&&(a=l,r=s)}}})),!r){var s=u[0],l=s.start,f=s.end;r={x:l.x+(f.x-l.x)/2,y:l.y+(f.y-l.y)/2}}return r},Zu=function(t){return Vn(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},qu=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};var Ju=function(){};function Qu(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)}}var tc=window.document;function ec(t){var e=t.onDragStart,r=void 0===e?Ju:e,n=t.onDraging,o=void 0===n?Ju:n,i=t.onDragEnd,a=void 0===i?Ju:i,u=t.step,c=void 0===u?1:u,s=t.isStopPropagation,l=void 0===s||s,f=!1,p=!1,y=0,d=0,h=0,v=0;function b(t){if(l&&t.stopPropagation(),p&&(f=!0,h+=t.clientX-y,v+=t.clientY-d,y=t.clientX,d=t.clientY,Math.abs(h)>c||Math.abs(v)>c)){var e=h%c,r=v%c,n=h-e,i=v-r;h=e,v=r,o({deltaX:n,deltaY:i,event:t})}}function g(t){if(l&&t.stopPropagation(),p=!1,tc.removeEventListener("mousemove",b,!1),tc.removeEventListener("mouseup",g,!1),f)return f=!1,a({event:t})}return function(t){if(0===t.button)return l&&t.stopPropagation(),p=!0,y=t.clientX,d=t.clientY,tc.addEventListener("mousemove",b,!1),tc.addEventListener("mouseup",g,!1),r({event:t})}}var rc,nc,oc,ic,ac,uc,cc,sc,lc,fc,pc,yc,dc,hc,vc,bc,gc,mc,Oc=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?Ju:n,i=e.onDraging,a=void 0===i?Ju:i,u=e.onDragEnd,c=void 0===u?Ju:u,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,p=void 0===f?null:f,y=e.step,d=void 0===y?1:y,h=e.isStopPropagation,v=void 0===h||h,b=e.model,g=void 0===b?null:b;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.onDragStart=void 0,this.onDraging=void 0,this.onDragEnd=void 0,this.step=void 0,this.isStopPropagation=void 0,this.isDraging=!1,this.isStartDraging=!1,this.startX=0,this.startY=0,this.sumDeltaX=0,this.sumDeltaY=0,this.eventType=void 0,this.eventCenter=void 0,this.model=void 0,this.startTime=void 0,this.isGrag=void 0,this.handleMouseDown=function(t){var e,n,o;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isStartDraging=!0,r.startX=t.clientX,r.startY=t.clientY,tc.addEventListener("mousemove",r.handleMouseMove,!1),tc.addEventListener("mouseup",r.handleMouseUp,!1),r.onDragStart({event:t});var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(to["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(to["".concat(r.eventType,"_DRAGSTART")],{e:t,data:i}),r.startTime=(new Date).getTime()}},this.handleMouseMove=function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDraging&&(r.isDraging=!0,r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n,o,i=r.sumDeltaX%r.step,a=r.sumDeltaY%r.step,u=r.sumDeltaX-i,c=r.sumDeltaY-a;r.sumDeltaX=i,r.sumDeltaY=a,r.onDraging({deltaX:u,deltaY:c,event:t});var s=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(to["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:s}),null===(o=r.eventCenter)||void 0===o||o.emit(to["".concat(r.eventType,"_DRAG")],{e:t,data:s})}},this.handleMouseUp=function(t){var e,n,o;if(r.isStartDraging=!1,r.isStopPropagation&&t.stopPropagation(),tc.removeEventListener("mousemove",r.handleMouseMove,!1),tc.removeEventListener("mouseup",r.handleMouseUp,!1),r.isDraging){r.isDraging=!1,r.onDragEnd({event:t});var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(to["".concat(r.eventType,"_MOUSEUP")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(to["".concat(r.eventType,"_DROP")],{e:t,data:i})}},this.onDragStart=o,this.onDraging=a,this.onDragEnd=c,this.step=d,this.isStopPropagation=v,this.eventType=l,this.eventCenter=p,this.model=g}var e,r,n;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}}])&&Qu(e.prototype,r),n&&Qu(e,n),t}();function wc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wc(Object(r),!0).forEach((function(e){xc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ec(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ec(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ec(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Sc(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Pc(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 kc(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Ac,Dc=(nc=kc((rc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.BaseType=Qn.GRAPH,this.modelType=Jn.GRAPH,this.rootEl=void 0,this.theme=void 0,this.eventCenter=void 0,this.modelMap=new Map,this.width=void 0,this.height=void 0,this.topElement=void 0,this.selectElement=void 0,this.idGenerator=void 0,this.nodeMoveRules=[],Sc(this,"edgeType",nc,this),Sc(this,"nodes",oc,this),Sc(this,"activeElement",ic,this),Sc(this,"activeElementState",ac,this),Sc(this,"state",uc,this),Sc(this,"additionStateData",cc,this),Sc(this,"edges",sc,this),Sc(this,"isSlient",lc,this),Sc(this,"overlapMode",fc,this),Sc(this,"plugins",pc,this),Sc(this,"tools",yc,this),Sc(this,"background",dc,this),Sc(this,"transformMatrix",hc,this),Sc(this,"editConfig",vc,this),Sc(this,"gridSize",bc,this),Sc(this,"partial",gc,this),Sc(this,"fakerNode",mc,this);var r=e.container,n=e.background,o=void 0===n?{}:n,i=e.grid,a=(i=void 0===i?{}:i).size,u=void 0===a?1:a,c=e.isSilentMode,s=void 0!==c&&c,l=e.eventCenter,f=e.idGenerator;this.background=o,this.isSlient=s,this.gridSize=u,this.rootEl=r,this.editConfig=new oo(e),this.eventCenter=l,this.transformMatrix=new Oo(l),this.theme=xi(e.style),this.edgeType=e.edgeType||"polyline",this.width=e.width,this.height=e.height,this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=f}var e,r,n;return e=t,(r=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)})),t=t.sort((function(t,e){return t.zIndex-e.zIndex}));for(var e=[],r=-1,n=[-200,-200],o=[this.width+200,this.height+200],i=0;i<t.length;i++){var a=t[i];this.partial&&!this.isElementInArea(a,n,o,!1)||(9999===a.zIndex&&(r=e.length),e.push(a))}if(-1!==r){var u=e[e.length-1];e[e.length-1]=e[r],e[r]=u}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===Zn.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===Zn.TEXT_EDIT}));return t||e}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach((function(e){e.isSelected&&t.set(e.id,e)})),this.edges.forEach((function(e){e.isSelected&&t.set(e.id,e)})),t}},{key:"getAreaElement",value:function(t,e){var r=[],n=[];this.nodes.forEach((function(t){return n.push(t)})),this.edges.forEach((function(t){return n.push(t)}));for(var o=0;o<n.length;o++){var i=n[o];this.isElementInArea(i,t,e)&&r.push(i)}return r}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModel",value:function(t){var e;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}},{key:"getPointByClient",value:function(t){var e=t.x,r=t.y,n=this.rootEl.getBoundingClientRect(),o={x:e-n.left,y:r-n.top},i=jc(this.transformMatrix.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.BaseType===Qn.NODE){for(var o=_a(t=t),i=o.minX,a=o.minY,u=o.maxX,c=o.maxY,s=[{x:i,y:a},{x:u,y:a},{x:u,y:c},{x:i,y:c}],l=!0,f=0;f<s.length;f++){var p=s[f],y=p.x,d=p.y,h=this.transformMatrix.CanvasPointToHtmlPoint([y,d]),v=jc(h,2);if(y=v[0],d=v[1],!Ai([y,d],e,r)){l=!1;break}}return l}if(t.BaseType===Qn.EDGE){var b=t=t,g=b.startPoint,m=b.endPoint,O=this.transformMatrix.CanvasPointToHtmlPoint([g.x,g.y]),w=this.transformMatrix.CanvasPointToHtmlPoint([m.x,m.y]),_=Ai(O,e,r),x=Ai(w,e,r);return n?_&&x:_||x}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=nn(t.nodes,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的节点。"));var n=t.x,o=t.y;return n&&o&&(t.x=ji(n,e.gridSize),t.y=ji(o,e.gridSize),"[object Object]"===Object.prototype.toString.call(t.text)&&(t.text.x-=Ei(n,e.gridSize),t.text.y-=Ei(o,e.gridSize))),new r(t,e)})),this.edges=nn(t.edges,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的边。"));return new r(t,e)}))}},{key:"modelToGraphData",value:function(){var t=this.edges.map((function(t){return t.getData()}));return{nodes:this.nodes.map((function(t){return t.getData()})),edges:t}}},{key:"getEdgeModel",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){var e=this.getNodeModel(t);return e||this.getEdgeModel(t)}},{key:"getNodeEdges",value:function(t){for(var e=[],r=0;r<this.edges.length;r++){var n=this.edges[r],o=this.edges[r].sourceNodeId===t,i=this.edges[r].targetNodeId===t;(o||i)&&e.push(n)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,r={nodes:[],edges:[]};return e.forEach((function(n){if(n.BaseType===Qn.NODE&&r.nodes.push(n.getData()),n.BaseType===Qn.EDGE){var o=n.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&r.edges.push(o)}})),r}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"changeNodeId",value:function(t,e){return e||(e=zi()),this.nodesMap[e]?(console.warn("当前流程图已存在节点".concat(e,", 修改失败")),!1):this.nodesMap[t]?(this.edges.forEach((function(r){r.sourceNodeId===t&&(r.sourceNodeId=e),r.targetNodeId===t&&(r.targetNodeId=e)})),this.nodesMap[t].model.id=e,e):(console.warn("当前流程图找不到节点".concat(e,", 修改失败")),!1)}},{key:"changeEdgeId",value:function(t,e){return e||(e=zi()),this.edgesMap[e]?(console.warn("当前流程图已存在连线: ".concat(e,", 修改失败")),!1):this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&(r.id=e)})),e):(console.warn("当前流程图找不到连线: ".concat(e,", 修改失败")),!1)}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"updateEdgeByIndex",value:function(t,e){this.edges[t]=_c(_c({},this.edges[t]),e)}},{key:"toFront",value:function(t){var e,r,n,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);o&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),this.topElement=o,o.setZIndex(9999))}},{key:"setElementZIndex",value:function(t,e){var r,n,o,i=(null===(r=this.nodesMap[t])||void 0===r?void 0:r.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);i&&("number"==typeof e&&(o=e),"top"===e&&(o=Ra()),"bottom"===e&&(o=--Ca),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.removeEdgeBySource(t),this.removeEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(to.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=Ma(t);e.id&&this.nodesMap[t.id]&&delete e.id;var r=this.getModel(e.type);if(!r)throw new Error("找不到".concat(e.type,"对应的节点,请确认是否已注册此类型节点。"));var n=new r(e,this);this.nodes.push(n);var o=n.getData();return this.eventCenter.emit(to.NODE_ADD,{data:o}),n}},{key:"cloneNode",value:function(t){var e=this.getNodeModel(t),r=e.getData();r.x+=30,r.y+=30,delete r.id,r.text&&(r.text.x+=30,r.text.y+=30);var n=this.addNode(r);return n.setSelected(!0),e.setSelected(!1),n.getData()}},{key:"moveNode",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model;i.move(e,r,n),this.moveEdge(t,e,r)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"moveNode2Coordinate",value:function(t,e,r){var n=this.nodesMap[t];if(n){var o=n.model,i=e-o.x,a=r-o.y;this.moveNode(t,i,a)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"setTextEditable",value:function(t){this.setElementStateById(t,Zn.TEXT_EDIT)}},{key:"createEdge",value:function(t){var e=Ma(t),r=e.type;r||(r=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var n=this.getModel(r);if(!n)throw new Error("找不到".concat(r,"对应的连线,请确认是否已注册此类型连线。"));var o=new n(_c(_c({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(to.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,r){for(var n=0;n<this.edges.length;n++){var o,i=this.edges[n],a=i.textPosition,u=a.x,c=a.y,s=this.edges[n].sourceNodeId===t,l=this.edges[n].targetNodeId===t;if(s&&i.updateStartPoint({x:i.startPoint.x+e,y:i.startPoint.y+r}),l&&i.updateEndPoint({x:i.endPoint.x+e,y:i.endPoint.y+r}),s||l)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===Jn.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,p=$u(f,i.points);i.moveText(p.x-f.x,p.y-f.y)}else{var y=i.textPosition,d=y.x,h=y.y;i.moveText(d-u,h-c)}}}},{key:"removeEdge",value:function(t,e){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===t&&this.edges[r].targetNodeId===e){var n=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(to.EDGE_DELETE,{data:n})}}},{key:"removeEdgeById",value:function(t){var e=this.edgesMap[t].index;if(this.edgesMap[t]){var r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(to.EDGE_DELETE,{data:r})}}},{key:"removeEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(to.EDGE_DELETE,{data:r})}}},{key:"removeEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(to.EDGE_DELETE,{data:r})}}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"setElementStateById",value:function(t,e,r){this.resetElementState(),this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(Zn.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(Zn.DEFAULT)}))}},{key:"setElementTextById",value:function(t,e){this.nodes.forEach((function(r){r.id===t&&r.updateText(e)})),this.edges.forEach((function(r){r.id===t&&r.updateText(e)}))}},{key:"resetElementState",value:function(){}},{key:"selectNodeById",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o||(null===(n=this.selectElement)||void 0===n||n.setSelected(!1),this.clearSelectElements()),this.selectElement=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model,null===(r=this.selectElement)||void 0===r||r.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o||(null===(n=this.selectElement)||void 0===n||n.setSelected(!1),this.clearSelectElements()),this.selectElement=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model,null===(r=this.selectElement)||void 0===r||r.setSelected(!0)}},{key:"selectElementById",value:function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||(null===(r=this.selectElement)||void 0===r||r.setSelected(!1),this.clearSelectElements()),this.selectElement=this.getElement(t),null===(e=this.selectElement)||void 0===e||e.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode!==io.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveElements",value:function(t,e,r){var n=this;t.nodes.forEach((function(t){return n.moveNode(t.id,e,r)}))}},{key:"moveNodes",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.forEach((function(t){return n.moveNode(t,e,r,o)}))}},{key:"addNodeMoveRules",value:function(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}},{key:"setDefaultEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,e){var r=this.getNodeModel(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var r=ka(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=ka(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}else console.warn("找不到id为".concat(t,"的节点"))}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModel(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}else console.warn("找不到id为".concat(t,"的连线"))}},{key:"setTheme",value:function(t){this.theme=xi(_c(_c({},this.theme),t))}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}}])&&Pc(e.prototype,r),n&&Pc(e,n),t}()).prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),oc=kc(rc.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ic=kc(rc.prototype,"activeElement",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ac=kc(rc.prototype,"activeElementState",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),uc=kc(rc.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),cc=kc(rc.prototype,"additionStateData",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sc=kc(rc.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),lc=kc(rc.prototype,"isSlient",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),fc=kc(rc.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),pc=kc(rc.prototype,"plugins",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),yc=kc(rc.prototype,"tools",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),dc=kc(rc.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hc=kc(rc.prototype,"transformMatrix",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vc=kc(rc.prototype,"editConfig",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bc=kc(rc.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),gc=kc(rc.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),mc=kc(rc.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kc(rc.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(rc.prototype,"nodesMap"),rc.prototype),kc(rc.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(rc.prototype,"edgesMap"),rc.prototype),kc(rc.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(rc.prototype,"sortElements"),rc.prototype),kc(rc.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(rc.prototype,"textEditElement"),rc.prototype),kc(rc.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(rc.prototype,"selectElements"),rc.prototype),kc(rc.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setFakerNode"),rc.prototype),kc(rc.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"removeFakerNode"),rc.prototype),kc(rc.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setModel"),rc.prototype),kc(rc.prototype,"updateEdgeByIndex",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"updateEdgeByIndex"),rc.prototype),kc(rc.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"toFront"),rc.prototype),kc(rc.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setElementZIndex"),rc.prototype),kc(rc.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"deleteNode"),rc.prototype),kc(rc.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"addNode"),rc.prototype),kc(rc.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"cloneNode"),rc.prototype),kc(rc.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"moveNode"),rc.prototype),kc(rc.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"moveNode2Coordinate"),rc.prototype),kc(rc.prototype,"setTextEditable",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setTextEditable"),rc.prototype),kc(rc.prototype,"createEdge",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"createEdge"),rc.prototype),kc(rc.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"moveEdge"),rc.prototype),kc(rc.prototype,"removeEdge",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"removeEdge"),rc.prototype),kc(rc.prototype,"removeEdgeById",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"removeEdgeById"),rc.prototype),kc(rc.prototype,"removeEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"removeEdgeBySource"),rc.prototype),kc(rc.prototype,"removeEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"removeEdgeByTarget"),rc.prototype),kc(rc.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setElementState"),rc.prototype),kc(rc.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setElementStateById"),rc.prototype),kc(rc.prototype,"setElementTextById",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setElementTextById"),rc.prototype),kc(rc.prototype,"resetElementState",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"resetElementState"),rc.prototype),kc(rc.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"selectNodeById"),rc.prototype),kc(rc.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"selectEdgeById"),rc.prototype),kc(rc.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"selectElementById"),rc.prototype),kc(rc.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"clearSelectElements"),rc.prototype),kc(rc.prototype,"moveElements",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"moveElements"),rc.prototype),kc(rc.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"moveNodes"),rc.prototype),kc(rc.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setDefaultEdgeType"),rc.prototype),kc(rc.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"changeNodeType"),rc.prototype),kc(rc.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"changeEdgeType"),rc.prototype),kc(rc.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"setTheme"),rc.prototype),kc(rc.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(rc.prototype,"clearData"),rc.prototype),rc),Tc=Dc;function Mc(t){return(Mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nc(){return(Nc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Cc(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 Rc(t,e){return(Rc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ic(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zc(t);if(e){var o=zc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lc(this,r)}}function Lc(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zc(t){return(zc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Bc,Hc=Yg(Ac=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rc(t,e)}(i,t);var e,r,n,o=Ic(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).stepDrag=void 0,e.stepScrollX=0,e.stepScrollY=0,e.onDraging=function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDraging:!0});var o=e.props.graphModel,i=o.transformMatrix;o.editConfig.stopMoveGraph||i.translate(r,n)},e.onDragEnd=function(){e.setState({isDraging:!1})},e.zoomHandler=function(t){var r=e.props,n=r.graphModel,o=n.editConfig,i=n.transformMatrix,a=n.gridSize,u=r.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){t.preventDefault();var l=u.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,p=l.y;i.zoom(t.deltaY<0,[f,p])}}else{if(t.preventDefault(),e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=a){var y=e.stepScrollX%a,d=e.stepScrollX-y;i.translate(-d*i.SCALE_X,0),e.stepScrollX=y}if(Math.abs(e.stepScrollY)>=a){var h=e.stepScrollY%a,v=e.stepScrollY-h;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=h}}},e.clickHandler=function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props,n=r.graphModel,o=r.eventCenter,i=n.textEditElement;n.selectElements.size>0&&n.clearSelectElements(),i&&i.setElementState(Zn.DEFAULT),o.emit(to.BLANK_CLICK,{e:t})}},e.handleContextMenu=function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props,n=r.graphModel,o=r.eventCenter,i=n.getPointByClient({x:t.clientX,y:t.clientY});n.setElementState(Zn.SHOW_MENU,i.domOverlayPosition),o.emit(to.BLANK_CONTEXTMENU,{e:t,position:i})}},e.mouseDownHandler=function(t){var r=e.props,n=r.eventCenter,o=r.graphModel,i=o.editConfig,a=o.transformMatrix.SCALE_X,u=o.gridSize;i.stopMoveGraph?n.emit(to.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(u*a),e.stepDrag.handleMouseDown(t)),e.clickHandler(t)};var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new Oc({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:r,eventType:"BLANK",eventCenter:n,model:null}),e.state={isDraging:!1},e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformMatrix.getTransformStyle().transform,e=this.props,r=e.children,n=e.dnd,o=this.state.isDraging;return Object(Q.g)("svg",Nc({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:o?"lf-dragging":"lf-drag-able"},n.eventMap()),Object(Q.g)("g",{transform:t},r))}}])&&Cc(e.prototype,r),n&&Cc(e,n),i}(Q.a))||Ac;function Xc(t){return(Xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Uc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fc(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 Gc(t,e){return(Gc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Wc(t);if(e){var o=Wc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vc(this,r)}}function Vc(t,e){if(e&&("object"===Xc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wc(t){return(Wc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Kc=Yg(Bc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Gc(t,e)}(i,t);var e,r,n,o=Yc(i);function i(){var t;Uc(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=o.call.apply(o,[this].concat(r))).setToolOverlayRef=function(e){var r=t.props.tool.getInstance();r.components.forEach((function(t){return t(r,e)})),r.components=[]},t}return e=i,(r=[{key:"getTools",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=e.getTools().map((function(t){return Object(Q.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"render",value:function(){return Object(Q.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&Fc(e.prototype,r),n&&Fc(e,n),i}(Q.a))||Bc;r(198);function $c(t){return($c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qc(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 Jc(t,e){return(Jc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=es(t);if(e){var o=es(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ts(this,r)}}function ts(t,e){if(e&&("object"===$c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function es(t){return(es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rs,ns=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jc(t,e)}(i,t);var e,r,n,o=Qc(i);function i(){return Zc(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=this.props.background,e=t.image,r=void 0===e?"":e,n=t.color,o=void 0===n?"":n,i=t.repeat,a=void 0===i?"no-repeat":i,u=t.position,c=void 0===u?"center":u,s=t.size,l=void 0===s?"auto auto":s,f=t.opacity,p=void 0===f?1:f;return o?{color:o,opacity:p,image:"none"}:r?{image:"url(".concat(r,")"),repeat:a,position:c,size:l,opacity:p}:{}}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.image,r=t.color,n=t.repeat,o=t.size,i={backgroundImage:e,backgroundColor:r,backgroundRepeat:n,backgroundPosition:t.position,backgroundSize:o,opacity:t.opacity};return Object(Q.g)("div",{className:"lf-background"},Object(Q.g)("div",{style:i,className:"lf-background-area"}))}},{key:"render",value:function(){return this.getShape()}}])&&qc(e.prototype,r),n&&qc(e,n),i}(Q.a);function os(t){return(os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function is(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function as(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 us(t,e){return(us=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ls(t);if(e){var o=ls(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ss(this,r)}}function ss(t,e){if(e&&("object"===os(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ls(t){return(ls=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fs=Yg(rs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&us(t,e)}(i,t);var e,r,n,o=cs(i);function i(){var t;is(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=o.call.apply(o,[this].concat(r))).id=zi(),t}return e=i,(r=[{key:"renderDot",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?2:n,i=t.size,a=t.visible,u=Math.min(Math.max(2,o),i/2),c=1;return a||(c=0),Object(Q.g)("rect",{width:u,height:u,rx:u/2,ry:u/2,fill:r,opacity:c})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?1:n,i=t.size,a=t.visible,u=Math.min(Math.max(1,o),i/2),c="M ".concat(i," 0 H0 M0 0 V0 ").concat(i),s=1;return a||(s=0),Object(Q.g)("path",{d:c,stroke:r,strokeWidth:u,opacity:s})}},{key:"render",value:function(){var t=this.props,e=t.type,r=t.size,n=t.graphModel.transformMatrix,o=[n.SCALE_X,n.SKEW_Y,n.SKEW_X,n.SCALE_Y,n.TRANSLATE_X,n.TRANSLATE_Y].join(","),i="matrix(".concat(o,")");return Object(Q.g)("div",{className:"lf-grid"},Object(Q.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(Q.g)("defs",null,Object(Q.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:r,height:r,style:{transition:"all 0.1s ease"}},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Object(Q.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&as(e.prototype,r),n&&as(e,n),i}(Q.a))||rs;fs.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(50);function ps(t){return(ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ys(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ds(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ds(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ds(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var hs,vs=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=ys(t,2),n=r[0],o=r[1];"object"!==ps(o)&&(e[n]=o)})),Object(Q.g)("line",e)};function bs(t){return(bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ms(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 Os(t,e){return(Os=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ws(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=xs(t);if(e){var o=xs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _s(this,r)}}function _s(t,e){if(e&&("object"===bs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xs(t){return(xs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var js,Es=Yg(hs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Os(t,e)}(i,t);var e,r,n,o=ws(i);function i(){return gs(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,r=t.isShowHorizontal,n=t.isShowVertical,o=t.stroke,i=t.strokeWidth,a=e.x,u=void 0===a?0:a,c=e.y,s=void 0===c?0:c,l={x1:-1e5,y1:s,x2:1e5,y2:s,stroke:r?o:"none",strokeWidth:i},f={x1:u,y1:-1e5,x2:u,y2:1e5,stroke:n?o:"none",strokeWidth:i};return Object(Q.g)("g",{className:"lf-snapline"},Object(Q.g)(vs,l),Object(Q.g)(vs,f))}}])&&ms(e.prototype,r),n&&ms(e,n),i}(Q.a))||hs;function Ss(t){return(Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ps(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ks(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ks(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ks(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function As(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.radius,a=t.className,u=e-n/2,c=r-o/2,s={width:10,height:10,cx:0,cy:0,rx:i||0,ry:i||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape ".concat(a),x:0,y:0};return Object.entries(t).forEach((function(t){var e=Ps(t,2),r=e[0],n=e[1];"object"!==Ss(n)&&(s[r]=n)})),s.x=u,s.y=c,Object(Q.g)("rect",s)}function Ds(t){return(Ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ts(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ms(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 Ns(t,e){return(Ns=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Cs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Is(t);if(e){var o=Is(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rs(this,r)}}function Rs(t,e){if(e&&("object"===Ds(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Is(t){return(Is=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}As.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Ls,zs=Yg(js=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ns(t,e)}(i,t);var e,r,n,o=Cs(i);function i(){return Ts(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getNodeOutline",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.editConfig,n=r.hoverOutline,o=r.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.BaseType===Qn.NODE){var e=t.isHovered,r=t.isSelected,a=t.x,u=t.y,c=t.width,s=t.height,l=t.hideOutline,f=t.outlineColor,p=t.hoverOutlineColor,y=t.outlineStrokeDashArray,d=t.hoverOutlineStrokeDashArray;if(!l&&(o||n&&e)){var h=r?f:p,v=r?y:d;i.push(Object(Q.g)(As,{className:"lf-outline-node",x:a,y:u,width:c+10,height:s+10,radius:0,fill:"none",stroke:h,strokeDasharray:v}))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,r=t.editConfig.edgeSelectedOutline,n=[],o=0;o<e.length;o++){var i=e[o];!i.hideOutline&&i.isSelected&&r&&(i.modelType===Jn.LINE_EDGE?n.push(this.getLineOutline(i)):i.modelType===Jn.POLYLINE_EDGE?n.push(this.getPolylineOutline(i)):i.modelType===Jn.BEZIER_EDGE&&n.push(this.getBezierOutline(i)))}return n}},{key:"getLineOutline",value:function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,a=Math.abs(e.y-r.y)+10,u=this.props.graphModel.theme.line,c=u.outlineColor,s=u.outlineStrokeDashArray;return Object(Q.g)(As,{className:"lf-outline-edge",x:n,y:o,width:i,height:a,radius:0,fill:"none",stroke:c,strokeDasharray:s})}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=Uu(e),n=Su(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=this.props.graphModel.theme.polyline,s=c.outlineColor,l=c.outlineStrokeDashArray;return Object(Q.g)(As,{className:"lf-outline",x:o,y:i,width:a,height:u,radius:0,fill:"none",stroke:s,strokeDasharray:l})}},{key:"getBezierOutline",value:function(t){var e=t.path,r=Wu(e),n=Su(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=this.props.graphModel.theme.bezier,s=c.outlineColor,l=c.outlineStrokeDashArray;return Object(Q.g)(As,{className:"lf-outline",x:o,y:i,width:a,height:u,radius:0,fill:"none",stroke:s,strokeDasharray:l})}},{key:"render",value:function(){return Object(Q.g)("g",{className:"lf-outline"},this.getNodeOutline(),this.getEdgeOutline())}}])&&Ms(e.prototype,r),n&&Ms(e,n),i}(Q.a))||js;function Bs(t){return(Bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Xs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xs(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Us(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,a={cx:r,cy:o,r:void 0===i?4:i,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape"};return Object.entries(t).forEach((function(t){var e=Hs(t,2),r=e[0],n=e[1];"object"!==Bs(n)&&(a[r]=n)})),Object(Q.g)("circle",a)}function Fs(t){return(Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ys(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ys(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ys(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ws(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 Ks(t,e,r){return e&&Ws(t.prototype,e),r&&Ws(t,r),t}function $s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Zs(t,e)}function Zs(t,e){return(Zs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Qs(t);if(e){var o=Qs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Js(this,r)}}function Js(t,e){if(e&&("object"===Fs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qs(t){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tl,el=function(t){$s(r,t);var e=qs(r);function r(t){var n;Vs(this,r),(n=e.call(this)).dragHandler=void 0,n.onDraging=function(t){var e=t.deltaX,r=t.deltaY,o=n.props,i=o.graphModel,a=o.bezierModel,u=o.type,c=i.transformMatrix,s=n.state,l=s.endX,f=s.endY,p=Gs(c.moveCanvasPointByHtml([l,f],e,r),2),y=p[0],d=p[1];n.setState({endX:y,endY:d}),a.updateAdjustAnchor({x:y,y:d},u)},n.onDragEnd=function(){var t=n.state,e=t.endX,r=t.endY,o=n.props,i=o.bezierModel,a=o.type;i.updateAdjustAnchor({x:e,y:r},a)},n.dragHandler=ec({onDraging:n.onDraging,onDragEnd:n.onDragEnd});var o=t.position;return n.state={endX:o.x,endY:o.y},n}return Ks(r,[{key:"render",value:function(){var t,e,r,n=this.props.position,o=n.x,i=n.y,a=null===(t=this.props)||void 0===t||null===(e=t.graphModel)||void 0===e||null===(r=e.theme)||void 0===r?void 0:r.bezier,u=a.adjustAnchorStroke,c=a.adjustAnchorFill,s=a.adjustAnchorFillOpacity;return Object(Q.g)(Us,{className:"lf-bezier-adjust-anchor",x:o,y:i,r:4,stroke:u,fill:c,fillOpacity:s,onMouseDown:this.dragHandler})}}]),r}(Q.a),rl=Yg(Ls=function(t){$s(r,t);var e=qs(r);function r(){return Vs(this,r),e.apply(this,arguments)}return Ks(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=Gs(Wu(r),4),i=o[0],a=o[1],u=o[2],c=o[3],s=e.theme.bezier.adjustLineColor,l=[];return l.push(Object(Q.g)(vs,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,stroke:s})),l.push(Object(Q.g)(el,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(Q.g)(vs,{x1:c.x,y1:c.y,x2:u.x,y2:u.y,stroke:s})),l.push(Object(Q.g)(el,{position:u,bezierModel:t,graphModel:e,key:"".concat(n,"_sNext"),type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,r=[],n=0;n<e.length;n++){var o=e[n];o.isSelected&&o.modelType===Jn.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(Q.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(Q.a))||Ls;function nl(t){return(nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ol(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function il(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 al(t,e){return(al=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ul(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=sl(t);if(e){var o=sl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cl(this,r)}}function cl(t,e){if(e&&("object"===nl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sl(t){return(sl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ll,fl=Yg(tl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&al(t,e)}(i,t);var e,r,n,o=ul(i);function i(){return ol(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformMatrix.getTransformStyle().transform,e=this.props.children;return Object(Q.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(Q.g)("g",{transform:t},e))}}])&&il(e.prototype,r),n&&il(e,n),i}(Q.a))||tl;function pl(t){return(pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yl(){return(yl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function dl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hl(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 vl(t,e){return(vl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ml(t);if(e){var o=ml(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gl(this,r)}}function gl(t,e){if(e&&("object"===pl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ml(t){return(ml=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ol=Yg(ll=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vl(t,e)}(i,t);var e,r,n,o=bl(i);function i(){return dl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getComponent",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"canvas-overlay",o=this.props.getView,i=o(t.type);return Object(Q.g)(i,{key:t.id,model:t,graphModel:e,overlay:n,eventCenter:r})}},{key:"render",value:function(){var t=this,e=this.props,r=e.graphModel,n=e.tool,o=e.options,i=e.eventCenter,a=e.dnd,u=e.snaplineModel,c={};o.width&&(c.width="".concat(o.width,"px")),o.height&&(c.height="".concat(o.height,"px"));var s=r.fakerNode,l=r.editConfig.adjustEdge;return Object(Q.g)("div",{className:"lf-graph",style:c},Object(Q.g)(Hc,{graphModel:r,eventCenter:i,dnd:a},Object(Q.g)("g",{className:"lf-base"},nn(r.sortElements,(function(e){return t.getComponent(e,r,i)}))),s?this.getComponent(s,r,i):""),Object(Q.g)(fl,{graphModel:r},o.hideOutline?"":Object(Q.g)(zs,{graphModel:r}),l?Object(Q.g)(rl,{graphModel:r}):"",o.isSilentMode||!1===o.snapline?"":Object(Q.g)(Es,{snaplineModel:u})),Object(Q.g)(Kc,{graphModel:r,tool:n}),o.background&&Object(Q.g)(ns,{background:o.background}),o.grid&&Object(Q.g)(fs,yl({},o.grid,{graphModel:r})))}}])&&hl(e.prototype,r),n&&hl(e,n),i}(Q.a))||ll;function wl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wl(Object(r),!0).forEach((function(e){xl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jl(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)}}var El=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.nodeConfig=void 0,this.lf=void 0,this.options=void 0,this.fakerNode=void 0,this.stopDrag=function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)},this.dragEnter=function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(_l(_l({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))},this.onDragOver=function(t){if(t.preventDefault(),r.fakerNode){var e=r.clientToLocalPoint({x:t.clientX,y:t.clientY}),n=e.x,o=e.y;r.fakerNode.moveTo(n,o);var i=r.fakerNode.getData();r.lf.setNodeSnapLine(i),r.lf.eventCenter.emit(to.NODE_DND_DRAG,{data:i})}return!1},this.onDragLeave=function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)},this.onDrop=function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(_l(_l({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY})));t.preventDefault(),t.stopPropagation(),r.nodeConfig=null,r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null;var n=e.getData();r.lf.eventCenter.emit(to.NODE_DND_ADD,{data:n})}};var n=e.options,o=e.lf;this.lf=o,this.options=n}var e,r,n;return e=t,(r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=Gr(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,a=o.y;return{x:ji(i,n),y:ji(a,n)}}},{key:"startDrag",value:function(t){this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&jl(e.prototype,r),n&&jl(e,n),t}();function Sl(t){var e=t.container,r=t.grid;if(!e)throw new Error("请检查 container 参数是否有效");return r&&(t.grid=wn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),wn({},Al,t)}var Pl,kl,Al={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Dl(t){return(Dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ml(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ml(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ml(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Nl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Cl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nl(Object(r),!0).forEach((function(e){Rl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Rl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Il(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 Ll(){return(Ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=zl(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function zl(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fl(t)););return t}function Bl(t,e){return(Bl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Fl(t);if(e){var o=Fl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xl(this,r)}}function Xl(t,e){if(e&&("object"===Dl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ul(t)}function Ul(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fl(t){return(Fl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gl(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Yl,Vl,Wl,Kl,$l,Zl,ql,Jl,Ql,tf,ef,rf,nf,of,af,uf,cf,sf,lf,ff,pf,yf,df,hf,vf,bf,gf=(kl=Gl((Pl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bl(t,e)}(i,t);var e,r,n,o=Hl(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"bezier")).modelType=Jn.BEZIER_EDGE,r.offset=mi.bezier.offset,function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(r,"path",kl,Ul(r)),r}return e=i,(r=[{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(r){var n=r.x,o=r.y;t+=n,e+=o})),{x:t/this.pointsList.length,y:e/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},{key:"getData",value:function(){var t=Ll(Fl(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Cl(Cl({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Vu({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=Tl(t,4),r=e[0],n=e[1],o=e[2],i=e[3];return"M ".concat(r.x," ").concat(r.y,"\n C ").concat(n.x," ").concat(n.y,",\n ").concat(o.x," ").concat(o.y,",\n ").concat(i.x," ").concat(i.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var t={x:this.startPoint.x,y:this.startPoint.y},e={x:this.endPoint.x,y:this.endPoint.y},r=this.getControls(),n=r.sNext,o=r.ePre;this.pointsList=[t,n,o,e],this.path=this.getPath(this.pointsList)}},{key:"updatePath",value:function(){var t={x:this.startPoint.x,y:this.startPoint.y},e={x:this.endPoint.x,y:this.endPoint.y},r=Tl(this.pointsList,3),n=r[1],o=r[2];this.pointsList=[t,n,o,e],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePath()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePath()}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=Vu({start:e,end:r,sourceNode:n,targetNode:o,offset:this.offset}),a=i.sNext,u=i.ePre;this.pointsList=[e,a,u,r],this.initPoints()}}])&&Il(e.prototype,r),n&&Il(e,n),i}(Ga)).prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Gl(Pl.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"initPoints"),Pl.prototype),Gl(Pl.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"updatePoints"),Pl.prototype),Gl(Pl.prototype,"updatePath",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"updatePath"),Pl.prototype),Gl(Pl.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"updateStartPoint"),Pl.prototype),Gl(Pl.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"updateEndPoint"),Pl.prototype),Gl(Pl.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"updateAdjustAnchor"),Pl.prototype),Gl(Pl.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"getAdjustStart"),Pl.prototype),Gl(Pl.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"getAdjustEnd"),Pl.prototype),Gl(Pl.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Pl.prototype,"updateAfterAdjustStartAndEnd"),Pl.prototype),Pl);r(46);function mf(t){return(mf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Of(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Of(Object(r),!0).forEach((function(e){_f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Of(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xf(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return jf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jf(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function jf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ef(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Sf(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 Pf(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var kf,Af,Df=wn({x:0,y:0,zIndex:1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},hideOutline:!1},mi.rect,mi.circle),Tf=(Vl=Pf((Yl=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=zi(),this.BaseType=Qn.NODE,this.modelType=Jn.NODE,this.additionStateData=void 0,this.targetRules=[],this.sourceRules=[],this.moveRules=[],this.hasSetTargetRules=!1,this.hasSetSourceRules=!1,Ef(this,"properties",Vl,this),Ef(this,"type",Wl,this),Ef(this,"x",Kl,this),Ef(this,"y",$l,this),Ef(this,"_width",Zl,this),this.graphModel=void 0,Ef(this,"_height",ql,this),Ef(this,"fill",Jl,this),Ef(this,"fillOpacity",Ql,this),Ef(this,"strokeWidth",tf,this),Ef(this,"stroke",ef,this),Ef(this,"strokeOpacity",rf,this),Ef(this,"opacity",nf,this),Ef(this,"outlineColor",of,this),Ef(this,"hideOutline",af,this),Ef(this,"hoverOutlineColor",uf,this),Ef(this,"outlineStrokeDashArray",cf,this),Ef(this,"hoverOutlineStrokeDashArray",sf,this),Ef(this,"isSelected",lf,this),Ef(this,"isHovered",ff,this),Ef(this,"isHitable",pf,this),Ef(this,"zIndex",yf,this),Ef(this,"anchorsOffset",df,this),Ef(this,"state",hf,this),Ef(this,"text",vf,this),Ef(this,"draggable",bf,this),this.graphModel=r,this.setStyleFromTheme(n,r),this.initNodeData(e),this.setAttributes()}var e,r,n;return e=t,(r=[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type);r&&(t.id=r);var n=this.createId();n&&(t.id=n)}this.formatText(t),wn(this,function(t){return Vn(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===io.INCREASE&&(this.zIndex=t.zIndex||Ra())}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&"string"==typeof t.text?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&void 0===t.text.editable&&(t.text.editable=!0)}},{key:"setAttributes",value:function(){}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,i=this.properties;Object(o.x)(i)&&(i=Object(o.I)(i));var a={id:this.id,type:this.type,x:this.x,y:this.y,properties:i};return this.graphModel.overlapMode===io.INCREASE&&(a.zIndex=this.zIndex),n&&(a.text={x:e,y:r,value:n}),a}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"isAllowConnectedAsSource",value:function(t,e,r){var n=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var o,i=!0,a=0;a<n.length;a++){var u=n[a];if(!u.validate.call(this,this,t,e,r)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,r){var n=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var o,i=!0,a=0;a<n.length;a++){var u=n[a];if(!u.validate.call(this,t,this,e,r)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"isAllowMoveNode",value:function(t,e){var r,n=xf(this.moveRules);try{for(n.s();!(r=n.n()).done;)if(!(0,r.value)(this,t,e))return!1}catch(t){n.e(t)}finally{n.f()}var o,i=xf(this.graphModel.nodeMoveRules);try{for(i.s();!(o=i.n()).done;)if(!(0,o.value)(this,t,e))return!1}catch(t){i.e(t)}finally{i.f()}return!0}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.id,r=this.x,n=this.y;return t&&t.length>0?t.map((function(t,o){return t.length?(t=t,{id:"".concat(e,"_").concat(o),x:r+t[0],y:n+t[1]}):wf(wf({},t=t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDetaultAnchor()}},{key:"getDetaultAnchor",value:function(){return[]}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){return this.getAnchorsByOffset()}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r||this.isAllowMoveNode(t,e)){var n=this.x+t,o=this.y+e;this.x=n,this.y=o,this.text&&this.moveText(t,e)}}},{key:"moveTo",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t-this.x,o=e-this.y;(r||this.isAllowMoveNode(n,o))&&(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e)}},{key:"moveText",value:function(t,e){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,editable:u,draggable:a,x:n+t,y:o+e}}},{key:"updateText",value:function(t){this.text.value=t}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStroke",value:function(t){this.stroke=t}},{key:"updateData",value:function(t){var e=Ma(Vn(t,"type","x","y","text","properties")),r=this.text,n=r.x,o=r.y,i=r.draggable,a=r.editable;if(e.text&&"string"==typeof e.text)e.text={x:n,y:o,value:e.text,draggable:i,editable:a};else if("object"===mf(e.text)){var u=wf(wf({},this.text),e.text);e.text=Vn(u,"x","y","value","draggable","editable")}wn(this,e)}},{key:"setProperty",value:function(t,e){this.properties=wf(wf({},this.properties),{},_f({},t,Ma(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=wf(wf({},this.properties),Ma(t)),this.setAttributes()}},{key:"setStyleFromTheme",value:function(t,e){var r=e.theme;r[t]&&wn(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Df.zIndex;this.zIndex=t}},{key:"updateAttributes",value:function(t){wn(this,t)}}])&&Sf(e.prototype,r),n&&Sf(e,n),t}()).prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Wl=Pf(Yl.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Kl=Pf(Yl.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.x}}),$l=Pf(Yl.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.y}}),Zl=Pf(Yl.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.width}}),ql=Pf(Yl.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.height}}),Jl=Pf(Yl.prototype,"fill",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.fill}}),Ql=Pf(Yl.prototype,"fillOpacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.fillOpacity}}),tf=Pf(Yl.prototype,"strokeWidth",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.strokeWidth}}),ef=Pf(Yl.prototype,"stroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.stroke}}),rf=Pf(Yl.prototype,"strokeOpacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.strokeOpacity}}),nf=Pf(Yl.prototype,"opacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.opacity}}),of=Pf(Yl.prototype,"outlineColor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.outlineColor}}),af=Pf(Yl.prototype,"hideOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.hideOutline}}),uf=Pf(Yl.prototype,"hoverOutlineColor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.hoverOutlineColor}}),cf=Pf(Yl.prototype,"outlineStrokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.outlineStrokeDashArray}}),sf=Pf(Yl.prototype,"hoverOutlineStrokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.hoverOutlineStrokeDashArray}}),lf=Pf(Yl.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ff=Pf(Yl.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),pf=Pf(Yl.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),yf=Pf(Yl.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.zIndex}}),df=Pf(Yl.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),hf=Pf(Yl.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),vf=Pf(Yl.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Df.text}}),bf=Pf(Yl.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Pf(Yl.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"addNodeMoveRules"),Yl.prototype),Pf(Yl.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"move"),Yl.prototype),Pf(Yl.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"moveTo"),Yl.prototype),Pf(Yl.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"moveText"),Yl.prototype),Pf(Yl.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"updateText"),Yl.prototype),Pf(Yl.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setSelected"),Yl.prototype),Pf(Yl.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setHovered"),Yl.prototype),Pf(Yl.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setHitable"),Yl.prototype),Pf(Yl.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setElementState"),Yl.prototype),Pf(Yl.prototype,"updateStroke",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"updateStroke"),Yl.prototype),Pf(Yl.prototype,"updateData",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"updateData"),Yl.prototype),Pf(Yl.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setProperty"),Yl.prototype),Pf(Yl.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setProperties"),Yl.prototype),Pf(Yl.prototype,"setStyleFromTheme",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setStyleFromTheme"),Yl.prototype),Pf(Yl.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"setZIndex"),Yl.prototype),Pf(Yl.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(Yl.prototype,"updateAttributes"),Yl.prototype),Yl);function Mf(t){return(Mf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nf(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 Cf(t,e){return(Cf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Rf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=zf(t);if(e){var o=zf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return If(this,r)}}function If(t,e){if(e&&("object"===Mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Lf(t)}function Lf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zf(t){return(zf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bf(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Hf,Xf,Uf,Ff=(Af=Bf((kf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Cf(t,e)}(i,t);var e,r,n,o=Rf(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"circle")).modelType=Jn.CIRCLE_NODE,function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(r,"r",Af,Lf(r)),r}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getDetaultAnchor",value:function(){var t=this.x,e=this.y,r=this.r;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&Nf(e.prototype,r),n&&Nf(e,n),i}(Tf)).prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mi.circle.r}}),Bf(kf.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(kf.prototype,"width"),kf.prototype),Bf(kf.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(kf.prototype,"height"),kf.prototype),kf);r(121);function Gf(t){return(Gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vf(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Kf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Wf(Object(r),!0).forEach((function(e){$f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zf(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function qf(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 Jf(){return(Jf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Qf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Qf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=op(t)););return t}function tp(t,e){return(tp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ep(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=op(t);if(e){var o=op(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rp(this,r)}}function rp(t,e){if(e&&("object"===Gf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return np(t)}function np(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function op(t){return(op=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ip(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ap,up,cp,sp=(Xf=ip((Hf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&tp(t,e)}(i,t);var e,r,n,o=ep(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"diamond")).modelType=Jn.DIAMOND_NODE,Zf(r,"rx",Xf,np(r)),Zf(r,"ry",Uf,np(r)),r}return e=i,(r=[{key:"getData",value:function(){var t=this.rx,e=this.ry;return Kf(Kf({},Jf(op(i.prototype),"getData",this).call(this)),{},{rx:t,ry:e})}},{key:"points",get:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[[t,e-n],[t+r,e],[t,e+n],[t-r,e]]}},{key:"pointsPosition",get:function(){return this.points.map((function(t){return{x:t[0],y:t[1]}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Yf(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Yf(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"anchors",get:function(){var t=this,e=this.anchorsOffset,r=this.points;return e&&e.length>0?this.getAnchorsByOffset():r.map((function(e,r){var n=Yf(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&qf(e.prototype,r),n&&qf(e,n),i}(Tf)).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Uf=ip(Hf.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ip(Hf.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(Hf.prototype,"points"),Hf.prototype),ip(Hf.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Hf.prototype,"pointsPosition"),Hf.prototype),ip(Hf.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Hf.prototype,"width"),Hf.prototype),ip(Hf.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Hf.prototype,"height"),Hf.prototype),ip(Hf.prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(Hf.prototype,"anchors"),Hf.prototype),Hf);function lp(t){return(lp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fp(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function pp(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 yp(t,e){return(yp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=bp(t);if(e){var o=bp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hp(this,r)}}function hp(t,e){if(e&&("object"===lp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vp(t)}function vp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bp(t){return(bp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function gp(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var mp,Op,wp=(up=gp((ap=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yp(t,e)}(i,t);var e,r,n,o=dp(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"ellipse")).modelType=Jn.ELLIPSE_NODE,fp(r,"rx",up,vp(r)),fp(r,"ry",cp,vp(r)),r}return e=i,(r=[{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.rx,o=this.ry;return t&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o,id:"".concat(this.id,"_0")},{x:e+n,y:r,id:"".concat(this.id,"_1")},{x:e,y:r+o,id:"".concat(this.id,"_2")},{x:e-n,y:r,id:"".concat(this.id,"_3")}]}}])&&pp(e.prototype,r),n&&pp(e,n),i}(Tf)).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mi.ellipse.rx}}),cp=gp(ap.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mi.ellipse.ry}}),gp(ap.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(ap.prototype,"width"),ap.prototype),gp(ap.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(ap.prototype,"height"),ap.prototype),gp(ap.prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(ap.prototype,"anchors"),ap.prototype),ap);function _p(t){return(_p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return jp(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jp(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ep(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 Sp(t,e){return(Sp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Dp(t);if(e){var o=Dp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kp(this,r)}}function kp(t,e){if(e&&("object"===_p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ap(t)}function Ap(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Dp(t){return(Dp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Tp(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Mp,Np,Cp=(Op=Tp((mp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sp(t,e)}(i,t);var e,r,n,o=Pp(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"polygon")).modelType=Jn.POLYGON_NODE,function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(r,"points",Op,Ap(r)),r}return e=i,(r=[{key:"pointsPosition",get:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return this.points.map((function(o){return{x:o[0]+t-r/2,y:o[1]+e-n/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=xp(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=xp(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"anchors",get:function(){var t=this,e=this.anchorsOffset,r=this.x,n=this.y,o=this.width,i=this.height,a=this.points;return e&&e.length>0?this.getAnchorsByOffset():a.map((function(e,a){var u=xp(e,2),c=u[0],s=u[1];return{x:r+c-o/2,y:n+s-i/2,id:"".concat(t.id,"_").concat(a)}}))}}])&&Ep(e.prototype,r),n&&Ep(e,n),i}(Tf)).prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Tp(mp.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(mp.prototype,"pointsPosition"),mp.prototype),Tp(mp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(mp.prototype,"width"),mp.prototype),Tp(mp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(mp.prototype,"height"),mp.prototype),Tp(mp.prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(mp.prototype,"anchors"),mp.prototype),mp);function Rp(t){return(Rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ip(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 Lp(t,e){return(Lp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function zp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xp(t);if(e){var o=Xp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Bp(this,r)}}function Bp(t,e){if(e&&("object"===Rp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hp(t)}function Hp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xp(t){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Up(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Fp,Gp,Yp,Vp,Wp=(Np=Up((Mp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lp(t,e)}(i,t);var e,r,n,o=zp(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"rect")).modelType=Jn.RECT_NODE,function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(r,"radius",Np,Hp(r)),r}return e=i,(r=[{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.width,o=this.height;return t&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o/2,id:"".concat(this.id,"_0")},{x:e+n/2,y:r,id:"".concat(this.id,"_1")},{x:e,y:r+o/2,id:"".concat(this.id,"_2")},{x:e-n/2,y:r,id:"".concat(this.id,"_3")}]}}])&&Ip(e.prototype,r),n&&Ip(e,n),i}(Tf)).prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mi.rect.radius}}),Up(Mp.prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(Mp.prototype,"anchors"),Mp.prototype),Mp);function Kp(t){return(Kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $p(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Zp(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 qp(t,e){return(qp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Jp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ey(t);if(e){var o=ey(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Qp(this,r)}}function Qp(t,e){if(e&&("object"===Kp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ty(t)}function ty(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ey(t){return(ey=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ry(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ny,oy=(Gp=ry((Fp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qp(t,e)}(i,t);var e,r,n,o=Jp(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"text")).modelType=Jn.TEXT_NODE,$p(r,"fontSize",Gp,ty(r)),$p(r,"fontFamily",Yp,ty(r)),$p(r,"fontWeight",Vp,ty(r)),r}return e=i,(r=[{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=Da({rows:t,fontSize:this.fontSize,rowsLength:t.length}).width;return e>100?e:100}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=Da({rows:t,fontSize:this.fontSize,rowsLength:t.length}).height;return e>20?e:20}}])&&Zp(e.prototype,r),n&&Zp(e,n),i}(Tf)).prototype,"fontSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mi.text.fontSize}}),Yp=ry(Fp.prototype,"fontFamily",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mi.text.fontFamily}}),Vp=ry(Fp.prototype,"fontWeight",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mi.text.fontWeight}}),ry(Fp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Fp.prototype,"width"),Fp.prototype),ry(Fp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Fp.prototype,"height"),Fp.prototype),Fp);function iy(t){return(iy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ay(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 uy(t,e){return(uy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ly(t);if(e){var o=ly(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sy(this,r)}}function sy(t,e){if(e&&("object"===iy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ly(t){return(ly=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fy,py,yy,dy,hy=(function(t,e,r,n,o){var i={};Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null)}((ny=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&uy(t,e)}(i,t);var e,r,n,o=cy(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t,e,"html")).modelType=Jn.HTML_NODE,r}return e=i,(r=[{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.width,o=this.height;return t&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o/2,id:"".concat(this.id,"_0")},{x:e+n/2,y:r,id:"".concat(this.id,"_1")},{x:e,y:r+o/2,id:"".concat(this.id,"_2")},{x:e-n/2,y:r,id:"".concat(this.id,"_3")}]}}])&&ay(e.prototype,r),n&&ay(e,n),i}(Tf)).prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(ny.prototype,"anchors"),ny.prototype),ny);function vy(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function by(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 gy(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var my=mi.snapline,Oy=(py=gy((fy=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.graphModel=void 0,vy(this,"isShowHorizontal",py,this),vy(this,"isShowVertical",yy,this),vy(this,"position",dy,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}var e,r,n;return e=t,(r=[{key:"stroke",get:function(){return this.graphModel.theme.snapline.stroke||my.stroke}},{key:"strokeWidth",get:function(){return this.graphModel.theme.snapline.strokeWidth||my.strokeWidth}},{key:"getCenterSnapLine",value:function(t,e){for(var r=t.x,n=t.y,o=!1,i=!1,a=0;a<e.length;a++){var u=e[a];if(u.id!==t.id&&(r===u.x&&(o=!0),n===u.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:r,y:n}}}},{key:"getHorizontalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=_a(a);else{var u=this.graphModel.getNodeModel(i);n=_a(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=_a(s);if(l.minY===n.minY||l.maxY===n.minY){o=!0,r=n.minY;break}if(l.minY===n.maxY||l.maxY===n.maxY){o=!0,r=n.maxY;break}}}return wn({isShowHorizontal:o,position:{y:r}})}},{key:"getVerticalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=_a(a);else{var u=this.graphModel.getNodeModel(i);n=_a(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=_a(s);if(l.minX===n.minX||l.maxX===n.minX){o=!0,r=n.minX;break}if(l.minX===n.maxX||l.maxX===n.maxX){o=!0,r=n.maxX;break}}}return wn({isShowVertical:o,position:{x:r}})}},{key:"getSnapLinePosition",value:function(t,e){var r=this.getCenterSnapLine(t,e),n=r.isShowHorizontal,o=r.isShowVertical;if(!n){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(r.isShowHorizontal=i.isShowHorizontal,r.position.y=i.position.y)}if(!o){var a=this.getVerticalSnapline(t,e);a.isShowVertical&&(r.isShowVertical=a.isShowVertical,r.position.x=a.position.x)}return r}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,r=t.isShowVertical,n=t.position;this.position=n,this.isShowHorizontal=e,this.isShowVertical=r}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var e=this.graphModel.nodes,r=this.getSnapLinePosition(t,e);this.setSnaplineInfo(r)}}])&&by(e.prototype,r),n&&by(e,n),t}()).prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yy=gy(fy.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dy=gy(fy.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),gy(fy.prototype,"stroke",[o.m],Object.getOwnPropertyDescriptor(fy.prototype,"stroke"),fy.prototype),gy(fy.prototype,"strokeWidth",[o.m],Object.getOwnPropertyDescriptor(fy.prototype,"strokeWidth"),fy.prototype),gy(fy.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(fy.prototype,"clearSnapline"),fy.prototype),gy(fy.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(fy.prototype,"setNodeSnapLine"),fy.prototype),fy);function wy(t){return(wy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _y(){return(_y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function xy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return jy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jy(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ey(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 Sy(t,e){return(Sy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Py(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ay(t);if(e){var o=Ay(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ky(this,r)}}function ky(t,e){if(e&&("object"===wy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ay(t){return(Ay=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Dy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sy(t,e)}(i,t);var e,r,n,o=Py(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).preTargetNode=void 0,t.dragHandler=void 0,t.sourceRuleResults=void 0,t.targetRuleResults=void 0,t.onDragStart=function(){var e=t.props,r=e.x,n=e.y,o=e.nodeModel,i=e.graphModel,a=i.overlapMode;i.selectNodeById(o.id),a!==io.INCREASE&&i.toFront(o.id),t.setState({startX:r,startY:n,endX:r,endY:n})},t.onDraging=function(e){var r=e.deltaX,n=e.deltaY,o=t.state,i=o.endX,a=o.endY,u=t.props,c=u.graphModel,s=u.nodeModel,l=c.transformMatrix,f=c.nodes,p=xy(l.moveCanvasPointByHtml([i,a],r,n),2),y=p[0],d=p[1];t.setState({endX:y,endY:d,draging:!0});var h=ba({x:i,y:a},f);if(h){var v=h.node;t.preTargetNode=v;var b=h.anchor.id,g="".concat(v.id,"_").concat(b);if(!t.targetRuleResults.has(g)){var m=t.props.anchorData,O=h.anchor,w=s.isAllowConnectedAsSource(v,m,O),_=v.isAllowConnectedAsTarget(s,m,O);t.sourceRuleResults.set(v.id,Ta(w)),t.targetRuleResults.set(g,Ta(_))}var x=t.sourceRuleResults.get(v.id).isAllPass,j=t.targetRuleResults.get(g).isAllPass;x&&j?v.setElementState(Zn.ALLOW_CONNECT):v.setElementState(Zn.NOT_ALLOW_CONNECT)}else t.preTargetNode&&t.preTargetNode.state!==Zn.DEFAULT&&t.preTargetNode.setElementState(Zn.DEFAULT)},t.onDragEnd=function(){t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear()},t.checkEnd=function(){var e=t.props,r=e.graphModel,n=e.nodeModel,o=e.x,i=e.y,a=e.eventCenter,u=e.id,c=r.nodes,s=r.edgeType,l=t.state,f=l.endX,p=l.endY,y=l.draging,d=ba({x:f,y:p},c);if(t.preTargetNode&&t.preTargetNode.state!==Zn.DEFAULT&&t.preTargetNode.setElementState(Zn.DEFAULT),y&&d&&d.node){var h=d.node,v=t.sourceRuleResults.get(h.id)||{},b=v.isAllPass,g=v.msg,m=d.anchor.id,O="".concat(h.id,"_").concat(m),w=t.targetRuleResults.get(O)||{},_=w.isAllPass,x=w.msg;if(b&&_)h.setElementState(Zn.ALLOW_CONNECT),o===d.anchor.x&&i===d.anchor.y||r.createEdge({type:s,sourceNodeId:n.id,sourceAnchorId:u,startPoint:{x:o,y:i},targetNodeId:d.node.id,targetAnchorId:d.anchor.id,endPoint:{x:d.anchor.x,y:d.anchor.y}});else{var j=h.getData();a.emit(to.CONNECTION_NOT_ALLOWED,{data:j,msg:x||g})}}},t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,draging:!1},t.dragHandler=ec({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return ma(e,r,n,o)>10}},{key:"render",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY,i=this.props,a=i.x,u=i.y,c=i.style,s=i.edgeStyle,l=i.hoverStyle;return Object(Q.g)("g",{className:"lf-anchor"},Object(Q.g)(Us,_y({className:"lf-node-anchor-hover",x:a,y:u},l,{onMouseDown:this.dragHandler})),Object(Q.g)(Us,_y({className:"lf-node-anchor",x:a,y:u},c,{onMouseDown:this.dragHandler})),this.isShowLine()&&Object(Q.g)(vs,_y({x1:e,y1:r,x2:n,y2:o,"pointer-events":"none"},s)))}}])&&Ey(e.prototype,r),n&&Ey(e,n),i}(Q.a);function Ty(t){return(Ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function My(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ny(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ny(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ny(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Cy(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.value,a=t.color,u=void 0===a?"#000000":a,c=t.fontSize,s=t.fill,l=void 0===s?"currentColor":s,f=t.model,p=t.fontFamily,y=void 0===p?"":p,d=t.lineHeight,h=t.autoWrap,v=void 0!==h&&h,b=t.wrapPadding,g=void 0===b?"0, 0":b,m={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:l};if(Object.entries(t).forEach((function(t){var e=My(t,2),r=e[0],n=e[1];"object"!==Ty(n)&&(m[r]=n)})),i){var O=String(i).split(/[\r\n]/g),w=O.length,_=f.BaseType,x=f.width,j=f.textWidth,E=f.textHeight,S=f.modelType;if(_===Qn.NODE&&S!==Jn.TEXT_NODE&&v||_===Qn.EDGE&&v&&j){var P=j||x,k=Aa({rows:O,style:{fontSize:"".concat(c,"px"),width:"".concat(P,"px"),fontFamily:y,lineHeight:d,padding:g},rowsLength:w,className:"lf-get-text-height"}),A=f.height>k?f.height:k;return E&&(A=E),Object(Q.g)("g",null,Object(Q.g)("foreignObject",{width:P,height:A,x:m.x-P/2,y:m.y-A/2},Object(Q.g)("div",{className:"lf-node-text-auto-wrap",style:{boxSizing:"border-box",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid transparent",minHeight:A,width:P,color:u,padding:g}},Object(Q.g)("div",{className:"lf-node-text-auto-wrap-content",style:{fontSize:c,fontFamily:y,lineHeight:d,background:"transparent",textAlign:"center",wordBreak:"break-all"}},O.map((function(t){return Object(Q.g)("div",null,t)}))))))}if(w>1){var D=O.map((function(t,e){var n=(e-(w-1)/2)*(c+2);return Object(Q.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(Q.g)("text",m,D)}return Object(Q.g)("text",m,i)}}function Ry(t){return(Ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Iy(){return(Iy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Ly(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return zy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zy(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function By(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 Hy(t,e){return(Hy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Fy(t);if(e){var o=Fy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uy(this,r)}}function Uy(t,e){if(e&&("object"===Ry(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Fy(t){return(Fy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Gy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Hy(t,e)}(i,t);var e,r,n,o=Xy(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).dragHandler=void 0,e.sumDeltaX=0,e.sumDeltaY=0,e.stepDrag=void 0,e.onDraging=function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=Ly(o.graphModel.transformMatrix.fixDeltaXY(r,n),2),u=a[0],c=a[1];i.moveText(u,c)},e.dblClickHandler=function(){e.props.editable&&e.props.model.setElementState(Zn.TEXT_EDIT)},e.mouseDownHandle=function(t){var r=e.props,n=r.draggable,o=r.graphModel.editConfig.nodeTextDraggable;(n||o)&&e.stepDrag.handleMouseDown(t)};var r=t.model,n=t.draggable;return e.stepDrag=new Oc({onDraging:e.onDraging,step:1,model:r,isStopPropagation:n}),e}return e=i,(r=[{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.style,n=e.text,o=n.value,i={x:n.x,y:n.y,className:"lf-element-text",value:o};return Object(Q.g)(Cy,Iy({},i,r,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return Object(Q.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&By(e.prototype,r),n&&By(e,n),i}(Q.a),Yy=null!==window.navigator.userAgent.match(/MSIE|Trident/);function Vy(t){return(Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wy(){return(Wy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Ky(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ky(Object(r),!0).forEach((function(e){Zy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ky(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Zy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Jy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jy(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qy(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 td(t,e){return(td=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ed(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nd(t);if(e){var o=nd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rd(this,r)}}function rd(t,e){if(e&&("object"===Vy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function nd(t){return(nd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var od=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&td(t,e)}(i,t);var e,r,n,o=ed(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).stepDrag=void 0,e.contextMenuTime=void 0,e.startTime=void 0,e.clickTimer=void 0,e.onDraging=function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=o.graphModel;e.state.isDraging||e.setState({isDraging:!0});var u=qy(a.transformMatrix.fixDeltaXY(r,n),2),c=u[0],s=u[1];a.moveNode(i.id,c,s)},e.onDragEnd=function(){e.setState({isDraging:!1})},e.handleClick=function(t){if(e.startTime&&!((new Date).getTime()-e.startTime>200)){var r=e.props,n=r.model,o=r.eventCenter,i=r.graphModel,a={data:n.getData(),e:t,position:i.getPointByClient({x:t.clientX,y:t.clientY})},u=2===t.button,c=2===t.detail;if(!u){var s=i.editConfig;i.selectNodeById(n.id,function(t,e){var r=e.multipleSelectKey;if(e.metaKeyMultipleSelected&&t.metaKey)return!0;var n=!1;switch(r){case"meta":n=t.metaKey;break;case"alt":n=t.altKey;break;case"shift":n=t.shiftKey;break;default:n=!1}return n}(t,s)),e.toFront(),c?(s.nodeTextEdit&&n.text.editable&&(n.setSelected(!1),i.setElementStateById(n.id,Zn.TEXT_EDIT)),o.emit(to.NODE_DBCLICK,a)):(o.emit(to.ELEMENT_CLICK,a),o.emit(to.NODE_CLICK,a))}}},e.handleContextMenu=function(t){t.preventDefault();var r=e.props,n=r.model,o=r.eventCenter,i=r.graphModel,a=n.getData(),u=i.getPointByClient({x:t.clientX,y:t.clientY});i.setElementStateById(n.id,Zn.SHOW_MENU,u.domOverlayPosition),i.selectNodeById(n.id),o.emit(to.NODE_CONTEXTMENU,{data:a,e:t,position:u}),e.toFront()},e.handleMouseDown=function(t){var r=e.props,n=r.model,o=r.graphModel;e.toFront(),e.startTime=(new Date).getTime(),o.editConfig.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)},e.setHoverON=function(t){if(!e.state.isHovered){e.setState({isHovered:!0});var r=e.props,n=r.model,o=r.eventCenter,i=n.getData();n.setHovered(!0),o.emit(to.NODE_MOUSEENTER,{data:i,e:t})}},e.setHoverOFF=function(t){e.setState({isHovered:!1});var r=e.props,n=r.model,o=r.eventCenter,i=n.getData();n.setHovered(!1),o.emit(to.NODE_MOUSELEAVE,{data:i,e:t})},e.onMouseOut=function(t){Yy&&e.setHoverOFF(t)};var r=t.graphModel.gridSize,n=t.eventCenter,a=t.model;return e.stepDrag=new Oc({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:r,eventType:"NODE",eventCenter:n,model:a}),e.state={isDraging:!1,isHovered:!1},e}return e=i,n=[{key:"getModel",value:function(t){return t}}],(r=[{key:"getShapeStyle",value:function(){var t=this.props.model;return{width:t.width,height:t.height,fill:t.fill,fillOpacity:t.fillOpacity,strokeWidth:t.strokeWidth,stroke:t.stroke,strokeOpacity:t.strokeOpacity,opacity:t.opacity,outlineColor:t.outlineColor}}},{key:"getAttributes",value:function(){var t=this.props.model,e=t.id,r=t.properties,n=void 0===r?{}:r,o=t.type,i=t.x,a=t.y,u=t.isSelected,c=t.isHovered,s=t.text,l=this.getShapeStyle();return $y({id:e,properties:$y({},n),type:o,x:i,y:a,isSelected:u,isHovered:c,text:$y({},s)},l)}},{key:"getProperties",value:function(){return this.props.model.getProperties()}},{key:"getAnchorStyle",value:function(){return $y({},this.props.graphModel.theme.anchor)}},{key:"getAnchorHoverStyle",value:function(){return $y({},this.props.graphModel.theme.anchorHover)}},{key:"getNewEdgeStyle",value:function(){return $y({},this.props.graphModel.theme.anchorLine)}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=e.eventCenter,i=r.isSelected,a=r.isHitable,u=this.state,c=u.isHovered,s=u.isDraging;if(a&&(i||c)){var l=this.getAnchorStyle(),f=this.getAnchorHoverStyle(),p=this.getNewEdgeStyle();return nn(r.anchors,(function(e,i){return Object(Q.g)(Dy,Wy({},e,{anchorData:e,nodeDraging:s,style:l,hoverStyle:f,edgeStyle:p,anchorIndex:i,nodeModel:r,eventCenter:o,graphModel:n,setHoverOFF:t.setHoverOFF}))}))}return[]}},{key:"getTextStyle",value:function(){return $y({},this.props.graphModel.theme.nodeText)}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===Zn.TEXT_EDIT)return"";var n=this.getTextStyle();if(e.text){var o=r.editConfig,i=!1;return(e.text.draggable||o.nodeTextDraggable)&&(i=!0),Object(Q.g)(Gy,{editable:o.nodeTextEdit&&e.text.editable,style:n,model:e,graphModel:r,draggable:i})}}},{key:"getStateClassName",value:function(){var t="lf-node";switch(this.props.model.state){case Zn.ALLOW_CONNECT:t+=" lf-node-allow";break;case Zn.NOT_ALLOW_CONNECT:t+=" lf-node-not-allow";break;default:t+=" lf-node-default"}return this.state.isDraging&&(t+=" lf-dragging"),t}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;r.overlapMode!==io.INCREASE&&r.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,r=e.model,n=e.graphModel,o=n.editConfig,i=o.hideAnchors,a=o.adjustNodePosition,u=n.gridSize,c=n.transformMatrix.SCALE_X,s=r.isHitable,l=r.draggable,f=Object(Q.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),i?null:this.getAnchors());return s?(a&&l&&this.stepDrag.setStep(u*c),t=Object(Q.g)("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onMouseUp:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},f)):t=Object(Q.g)("g",{className:this.getStateClassName()},f),t}}])&&Qy(e.prototype,r),n&&Qy(e,n),i}(Q.a);function id(t){return(id="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ad(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ud(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ad(Object(r),!0).forEach((function(e){cd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ad(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ld(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 fd(){return(fd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=pd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function pd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vd(t)););return t}function yd(t,e){return(yd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function dd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=vd(t);if(e){var o=vd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hd(this,r)}}function hd(t,e){if(e&&("object"===id(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vd(t){return(vd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var bd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yd(t,e)}(i,t);var e,r,n,o=dd(i);function i(){return sd(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=fd(vd(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.radius;return ud(ud({},t),{},{radius:e})}},{key:"getAttributes",value:function(){var t=fd(vd(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return ud(ud({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)(As,t)}}])&&ld(e.prototype,r),n&&ld(e,n),i}(od);function gd(t){return(gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function md(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Od(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?md(Object(r),!0).forEach((function(e){wd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):md(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xd(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 jd(){return(jd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ed(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Ed(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ad(t)););return t}function Sd(t,e){return(Sd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ad(t);if(e){var o=Ad(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kd(this,r)}}function kd(t,e){if(e&&("object"===gd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ad(t){return(Ad=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Dd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sd(t,e)}(i,t);var e,r,n,o=Pd(i);function i(){return _d(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=jd(Ad(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.r;return Od(Od({},t),{},{r:e})}},{key:"getAttributes",value:function(){var t=jd(Ad(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Od(Od({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)(Us,t)}}])&&xd(e.prototype,r),n&&xd(e,n),i}(od);function Td(t){return(Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Md(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Nd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nd(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Cd(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:"",className:"lf-basic-shape ".concat(r)};return Object.entries(t).forEach((function(t){var e=Md(t,2),r=e[0],o=e[1];"object"!==Td(o)&&(n[r]=o)})),n.points=e.map((function(t){return t.join(",")})).join(" "),Object(Q.g)("polygon",n)}function Rd(t){return(Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Id(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ld(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Id(Object(r),!0).forEach((function(e){zd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Id(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function zd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hd(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 Xd(){return(Xd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ud(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Ud(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vd(t)););return t}function Fd(t,e){return(Fd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Gd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Vd(t);if(e){var o=Vd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yd(this,r)}}function Yd(t,e){if(e&&("object"===Rd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Vd(t){return(Vd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fd(t,e)}(i,t);var e,r,n,o=Gd(i);function i(){return Bd(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=Xd(Vd(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.points;return Ld(Ld({},t),{},{points:e})}},{key:"getAttributes",value:function(){var t=Xd(Vd(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Ld(Ld({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.width,r=t.height,n=t.x,o=t.y,i=t.fill,a=t.fillOpacity,u=t.strokeWidth,c=t.stroke,s=t.strokeOpacity,l=t.points,f={transform:"matrix(1 0 0 1 ".concat(n-e/2," ").concat(o-r/2,")")},p={fill:i,fillOpacity:a,strokeWidth:u,stroke:c,strokeOpacity:s,points:l};return Object(Q.g)("g",f,Object(Q.g)(Cd,p))}}])&&Hd(e.prototype,r),n&&Hd(e,n),i}(od);function Kd(t){return(Kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Zd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$d(Object(r),!0).forEach((function(e){qd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function qd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qd(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 th(){return(th="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=eh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function eh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ih(t)););return t}function rh(t,e){return(rh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ih(t);if(e){var o=ih(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oh(this,r)}}function oh(t,e){if(e&&("object"===Kd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ih(t){return(ih=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ah=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rh(t,e)}(i,t);var e,r,n,o=nh(i);function i(){return Jd(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=this.props.model.points;return Zd(Zd({},th(ih(i.prototype),"getShapeStyle",this).call(this)),{},{points:t})}},{key:"getAttributes",value:function(){var t=th(ih(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Zd(Zd({},t),e)}},{key:"getShape",value:function(){var t=this.props.model.points,e=this.getAttributes(),r={fill:e.fill,fillOpacity:e.fillOpacity,strokeWidth:e.strokeWidth,stroke:e.stroke,strokeOpacity:e.strokeOpacity,points:t};return Object(Q.g)("g",null,Object(Q.g)(Cd,r))}}])&&Qd(e.prototype,r),n&&Qd(e,n),i}(od);function uh(t){return(uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ch(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return sh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sh(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lh(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.rx,a=void 0===i?4:i,u=t.ry,c={cx:r,cy:o,rx:a,ry:void 0===u?4:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=ch(t,2),r=e[0],n=e[1];"object"!==uh(n)&&(c[r]=n)})),Object(Q.g)("ellipse",c)}function fh(t){return(fh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ph(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function yh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ph(Object(r),!0).forEach((function(e){dh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vh(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 bh(){return(bh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=gh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function gh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_h(t)););return t}function mh(t,e){return(mh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Oh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=_h(t);if(e){var o=_h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wh(this,r)}}function wh(t,e){if(e&&("object"===fh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _h(t){return(_h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&mh(t,e)}(i,t);var e,r,n,o=Oh(i);function i(){return hh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=bh(_h(i.prototype),"getAttributes",this).call(this),e=this.props.model,r=e.rx,n=e.ry;return yh(yh({},t),{},{rx:r,ry:n})}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)(lh,t)}}])&&vh(e.prototype,r),n&&vh(e,n),i}(od);function jh(t){return(jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Eh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Sh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Eh(Object(r),!0).forEach((function(e){Ph(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Eh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ph(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ah(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 Dh(t,e){return(Dh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Th(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Nh(t);if(e){var o=Nh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mh(this,r)}}function Mh(t,e){if(e&&("object"===jh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Nh(t){return(Nh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ch=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dh(t,e)}(i,t);var e,r,n,o=Th(i);function i(){return kh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getBackgroud",value:function(){var t=this.getAttributes().text,e=this.getTextStyle();if(t&&t.value&&e.backgroundStyle&&"transparnet"!==e.backgroundStyle.fill){var r=e.fontSize,n=t.value,o=t.x,i=t.y,a=String(n).split(/[\r\n]/g),u=a.length,c=0;a&&a.forEach((function(t){var e=Yu(t);c=e>c?e:c}));var s=Da({rows:a,fontSize:r,rowsLength:u}),l=s.width,f=s.height,p=Sh(Sh({},e.backgroundStyle),{},{x:o-1,y:i-1,width:l,height:f});return Object(Q.g)(As,p)}}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)("g",null,this.getBackgroud(),Object(Q.g)(Cy,t))}}])&&Ah(e.prototype,r),n&&Ah(e,n),i}(od);function Rh(t){return(Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ih(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lh(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 zh(t,e){return(zh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Bh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xh(t);if(e){var o=Xh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Hh(this,r)}}function Hh(t,e){if(e&&("object"===Rh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xh(t){return(Xh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Uh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&zh(t,e)}(i,t);var e,r,n,o=Bh(i);function i(){var t;Ih(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=o.call.apply(o,[this].concat(r))).ref=void 0,t.setRef=function(e){t.ref=e},t}return e=i,(r=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(t){t.appendChild(document.createElement("div"))}},{key:"componentDidMount",value:function(){this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.x,r=t.y,n=t.width,o=t.height;return Object(Q.g)("foreignObject",{x:e-n/2,y:r-o/2,width:n,height:o,ref:this.setRef})}}])&&Lh(e.prototype,r),n&&Lh(e,n),i}(od);function Fh(t){return(Fh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Yh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yh(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vh(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=Gh(t,2),n=r[0],o=r[1];"object"!==Fh(o)&&(e[n]=o)})),Object(Q.g)("path",e)}Vh.defaultProps={strokeDasharray:""};var Wh=Vh;function Kh(t){return(Kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Zh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jh(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 Qh(t,e){return(Qh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rv(t);if(e){var o=rv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ev(this,r)}}function ev(t,e){if(e&&("object"===Kh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rv(t){return(rv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Qh(t,e)}(i,t);var e,r,n,o=tv(i);function i(){return qh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getArrowAttibutes",value:function(){var t=this.props,e=t.arrowInfo,r=t.style,n=e.start,o=e.end,i={start:n,end:o,offset:r.offset,verticalLength:r.verticalLength,type:"end"},a=yu(i),u=a.leftX,c=a.leftY,s=a.rightX,l=a.rightY;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$h(Object(r),!0).forEach((function(e){Zh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(u," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},r)}},{key:"getShape",value:function(){var t=this.getArrowAttibutes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Object(Q.g)(Wh,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(Q.g)("g",{className:"lf-arrow"},this.getShape())}}])&&Jh(e.prototype,r),n&&Jh(e,n),i}(Q.a);function ov(t){return(ov="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function iv(){return(iv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function av(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?av(Object(r),!0).forEach((function(e){cv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):av(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sv(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 lv(t,e){return(lv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yv(t);if(e){var o=yv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pv(this,r)}}function pv(t,e){if(e&&("object"===ov(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yv(t){return(yv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var dv,hv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&lv(t,e)}(i,t);var e,r,n,o=fv(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).setHoverON=function(){e.setState({isHoverd:!0})},e.setHoverOFF=function(){e.setState({isHoverd:!1})},e.state={isHoverd:!1},e}return e=i,(r=[{key:"getBackgroud",value:function(){var t=this.props.model,e=this.props.style,r=t.text,n=t.textWidth,o=Vn(e.background,"fill","stroke","radius","height");if(this.state.isHoverd&&e.hoverBackground&&(o=uv(uv({},o),e.hoverBackground)),r&&r.value&&"transparnet"!==o.fill){var i,a=e.fontSize,u=e.autoWrap,c=e.lineHeight,s=e.wrapPadding,l=r.value,f=r.x,p=r.y,y=String(l).split(/[\r\n]/g),d=y.length;if(u&&n){var h=Aa({rows:y,style:{fontSize:"".concat(a,"px"),width:"".concat(n,"px"),lineHeight:c,padding:s},rowsLength:d,className:"lf-get-text-height"});i=uv(uv({},o),{},{x:f-1,y:p-1,width:n,height:h})}else{var v=0;y&&y.forEach((function(t){var e=Yu(t);v=e>v?e:v}));var b=Da({rows:y,fontSize:a,rowsLength:d}),g=b.width,m=b.height;i=uv(uv({},o),{},{x:f-1,y:p-1,width:g,height:m})}return Object(Q.g)(As,i)}}},{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.style,n=e.text,o=n.value,i=uv({x:n.x,y:n.y,className:"lf-element-text",value:o},r);return Object(Q.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(Q.g)(Cy,iv({},i,{model:e})))}}])&&sv(e.prototype,r),n&&sv(e,n),i}(Gy);function vv(t){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bv(){return(bv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function gv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gv(Object(r),!0).forEach((function(e){Ov(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ov(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xv(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 jv(t,e){return(jv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ev(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pv(t);if(e){var o=Pv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sv(this,r)}}function Sv(t,e){if(e&&("object"===vv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pv(t){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(dv||(dv={}));var kv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jv(t,e)}(i,t);var e,r,n,o=Ev(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).dragHandler=void 0,t.oldEdge=void 0,t.onDragStart=function(){var e=t.props,r=e.x,n=e.y,o=e.edgeModel,i=o.startPoint,a=o.endPoint,u=o.pointsList;t.oldEdge={startPoint:i,endPoint:a,pointsList:u},t.setState({endX:r,endY:n,draging:!0})},t.onDraging=function(e){var r=e.deltaX,n=e.deltaY,o=t.state,i=o.endX,a=o.endY,u=t.props,c=u.graphModel,s=u.type,l=wv(c.transformMatrix.moveCanvasPointByHtml([i,a],r,n),2),f=l[0],p=l[1];t.setState({endX:f,endY:p,draging:!0});var y=t.props.edgeModel,d=c.nodes,h=ba({x:i,y:a},d);if(h&&h.node){var v,b=y.startPoint,g=y.endPoint,m=y.sourceNode,O=y.targetNode;s===dv.SOURCE?v={startPoint:{x:h.anchor.x,y:h.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:h.node,targetNode:O}:s===dv.TARGET&&(v={startPoint:{x:b.x,y:b.y},endPoint:{x:h.anchor.x,y:h.anchor.y},sourceNode:m,targetNode:h.node}),y.updateAfterAdjustStartAndEnd(v)}else s===dv.SOURCE?y.updateStartPoint({x:f,y:p}):s===dv.TARGET&&y.updateEndPoint({x:f,y:p})},t.onDragEnd=function(){t.setState({draging:!1});var e=t.props,r=e.graphModel,n=e.edgeModel,o=e.type,i=e.eventCenter,a=r.nodes,u=t.state,c=u.endX,s=u.endY,l=u.draging,f=ba({x:c,y:s},a);if(l)if(f&&f.node){var p,y=n.getData(),d=mv(mv({},y),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==y||null===(p=y.text)||void 0===p?void 0:p.value)||""});o===dv.SOURCE?d=mv(mv({},d),{},{sourceNodeId:f.node.id,sourceAnchorId:f.anchor.id,startPoint:{x:f.anchor.x,y:f.anchor.y},targetNodeId:n.targetNodeId,endPoint:mv({},n.endPoint)}):o===dv.TARGET&&(d=mv(mv({},d),{},{sourceNodeId:n.sourceNodeId,startPoint:mv({},n.startPoint),targetNodeId:f.node.id,targetAnchorId:f.anchor.id,endPoint:{x:f.anchor.x,y:f.anchor.y}})),r.removeEdgeById(n.id);var h=r.createEdge(mv({},d));i.emit(to.EDGE_EXCHANGE_NODE,{data:{newEdge:h.getData(),oldEdge:n.getData()}})}else t.recoveryEdge()},t.recoveryEdge=function(){var e=t.props.edgeModel,r=t.oldEdge,n=r.startPoint,o=r.endPoint,i=r.pointsList;e.updateStartPoint(n),e.updateEndPoint(o),e.modelType!==Jn.LINE_EDGE&&(e.pointsList=i,e.initPoints())},t.getAdjustPointStyle=function(){return t.props.graphModel.theme.edgeAdjust},t.state={draging:!1,endX:0,endY:0},t.dragHandler=ec({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=this.state.draging,o=this.getAdjustPointStyle();return Object(Q.g)("g",null,Object(Q.g)(Us,bv({className:"lf-edge-adjust-point"},o,{x:e,y:r,onMouseDown:this.dragHandler,"pointer-events":n?"none":""})))}}])&&xv(e.prototype,r),n&&xv(e,n),i}(Q.a);function Av(t){return(Av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dv(){return(Dv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Tv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tv(Object(r),!0).forEach((function(e){Nv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rv(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 Iv(t,e){return(Iv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Bv(t);if(e){var o=Bv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zv(this,r)}}function zv(t,e){if(e&&("object"===Av(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Bv(t){return(Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Iv(t,e)}(i,t);var e,r,n,o=Lv(i);function i(){var t;Cv(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=o.call.apply(o,[this].concat(r))).startTime=void 0,t.contextMenuTime=void 0,t.clickTimer=void 0,t.handleHover=function(e,r){var n=t.props,o=n.model,i=n.eventCenter;o.setHovered(e);var a=e?to.EDGE_MOUSEENTER:to.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})},t.setHoverON=function(e){t.handleHover(!0,e)},t.setHoverOFF=function(e){t.handleHover(!1,e)},t.handleContextMenu=function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var r=t.props,n=r.model,o=r.graphModel,i=r.eventCenter,a=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,Zn.SHOW_MENU,a.domOverlayPosition),t.toFront(),o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();i.emit(to.EDGE_CONTEXTMENU,{data:u,e:e,position:a})},t.handleMouseDown=function(e){e.stopPropagation(),t.startTime=(new Date).getTime()},t.handleMouseUp=function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200||2===e.button)){var r=2===e.detail,n=t.props,o=n.model,i=n.graphModel,a=n.eventCenter,u=null==o?void 0:o.getData(),c=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var s=i.editConfig,l=i.textEditElement;if(l&&l.id===o.id&&i.setElementStateById(o.id,Zn.DEFAULT),s.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,Zn.TEXT_EDIT),o.modelType===Jn.POLYLINE_EDGE){var f=o,p=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,y=p.x,d=p.y,h=$u({x:y,y:d},f.points);f.dbClickPosition=h}a.emit(to.EDGE_DBCLICK,{data:u,e:e,position:c})}else a.emit(to.ELEMENT_CLICK,{data:u,e:e,position:c}),a.emit(to.EDGE_CLICK,{data:u,e:e,position:c});var v=i.editConfig.metaKeyMultipleSelected;i.selectEdgeById(o.id,e.metaKey&&v),t.toFront()}},t.getIsDraging=function(){return!1},t}return e=i,(r=[{key:"getAttributes",value:function(){var t=this.props.model,e=t.strokeWidth,r=t.strokeOpacity,n=t.strokeDashArray,o=t.isSelected,i=t.isHovered,a=t.hoverStroke,u=t.selectedStroke,c=t.properties,s=this.props.model.stroke;return i?s=a:o&&(s=u),{stroke:s,strokeWidth:e,strokeOpacity:r,strokeDashArray:n,isSelected:o,isHovered:i,hoverStroke:a,selectedStroke:u,properties:Mv({},c)}}},{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===Zn.TEXT_EDIT)return"";var n=r.theme.edgeText,o=this.getTextStyle(),i=wn({},n,o),a=!1,u=r.editConfig;return(e.text.draggable||u.edgeTextDraggable)&&(a=!0),Object(Q.g)(hv,{editable:u.edgeTextEdit&&e.text.editable,model:e,graphModel:r,style:i,draggable:a})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isSelected;return{start:e,end:r,hover:this.state.hover,isSelected:n}}},{key:"getArrowStyle",value:function(){var t=this.getAttributes().stroke,e=this.props.graphModel.theme.arrow;return{stroke:t,strokeWidth:1,fill:t,offset:e.offset,verticalLength:e.verticalLength}}},{key:"getArrow",value:function(){var t=this.getArrowInfo(),e=t.start,r=t.end;if(e&&r&&(e.x!==r.x||e.y!==r.y)){var n=this.getArrowStyle();return Object(Q.g)(nv,{arrowInfo:t,style:n})}}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=t.eventCenter,o=e.getAdjustStart(),i=e.getAdjustEnd();return Object(Q.g)("g",null,Object(Q.g)(kv,Dv({type:"SOURCE"},o,{edgeModel:e,graphModel:r,eventCenter:n})),Object(Q.g)(kv,Dv({type:"TARGET"},i,{edgeModel:e,graphModel:r,eventCenter:n})))}},{key:"getAppendWidth",value:function(){return Object(Q.g)("g",null)}},{key:"getAppend",value:function(){return Object(Q.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.overlapMode!==io.INCREASE&&e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model.isSelected,r=t.graphModel.editConfig,n=this.getIsDraging(),o=r.adjustEdgeStartAndEnd;return Object(Q.g)("g",{className:"lf-edge",onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow(),o&&e&&!n?this.getAdjustPoints():"")}}])&&Rv(e.prototype,r),n&&Rv(e,n),i}(Q.a);function Xv(t){return(Xv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Uv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Uv(Object(r),!0).forEach((function(e){Gv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vv(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 Wv(){return(Wv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Kv(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Kv(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jv(t)););return t}function $v(t,e){return($v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Jv(t);if(e){var o=Jv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qv(this,r)}}function qv(t,e){if(e&&("object"===Xv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Jv(t){return(Jv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$v(t,e)}(i,t);var e,r,n,o=Zv(i);function i(){return Yv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint;return Fv(Fv({},Wv(Jv(i.prototype),"getAttributes",this).call(this)),{},{startPoint:e,endPoint:r})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.stroke,r=t.startPoint,n=t.endPoint,o=t.strokeWidth,i=t.strokeOpacity,a=t.strokeDashArray;return Object(Q.g)(vs,{x1:r.x,y1:r.y,x2:n.x,y2:n.y,strokeOpacity:i,strokeWidth:o,stroke:e,strokeDasharray:a})}},{key:"getShape",value:function(){return Object(Q.g)("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=yu(hu(hu({},o),{},{type:"start"})),a=yu(hu(hu({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:t.startPoint,end:t.endPoint}),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Object(Q.g)(Wh,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}}])&&Vv(e.prototype,r),n&&Vv(e,n),i}(Hv);function tb(t){return(tb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return rb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rb(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var nb=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=eb(t,2),n=r[0],o=r[1];"object"!==tb(o)&&(e[n]=o)})),Object(Q.g)("polyline",e)};function ob(t){return(ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ib(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ab(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ib(Object(r),!0).forEach((function(e){ub(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ib(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ub(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return sb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sb(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lb(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 fb(){return(fb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=pb(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function pb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vb(t)););return t}function yb(t,e){return(yb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function db(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=vb(t);if(e){var o=vb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hb(this,r)}}function hb(t,e){if(e&&("object"===ob(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vb(t){return(vb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var bb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yb(t,e)}(i,t);var e,r,n,o=db(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).drag=void 0,t.isDraging=void 0,t.appendInfo=void 0,t.dragHandler=void 0,t.onDragStart=function(){t.props.model.dragAppendStart()},t.onDraging=function(e){var r=e.deltaX,n=e.deltaY,o=t.props,i=o.model,a=o.graphModel;t.isDraging=!0;var u=a.transformMatrix,c=a.editConfig,s=cb(u.fixDeltaXY(r,n),2),l=s[0],f=s[1],p=i,y=c.adjustEdgeMiddle;t.appendInfo=y?p.dragAppendSimple(t.appendInfo,{x:l,y:f}):p.dragAppend(t.appendInfo,{x:l,y:f})},t.onDragEnd=function(){var e=t.props,r=e.model,n=e.eventCenter,o=r;o.dragAppendEnd(),t.isDraging=!1,t.appendInfo=void 0,n.emit(to.EDGE_ADJUST,{data:o.getData()})},t.beforeDragStart=function(e,r){r.dragAble&&t.dragHandler(e),t.appendInfo=r},t.getIsDraging=function(){return t.isDraging},t.drag=ec({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getAttributes",value:function(){var t=fb(vb(i.prototype),"getAttributes",this).call(this),e=this.props.model.points;return ab(ab({},t),{},{points:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.points,r=t.strokeWidth,n=t.stroke,o=t.strokeDashArray;return Object(Q.g)(nb,{points:e,strokeWidth:r,stroke:n,strokeDasharray:o})}},{key:"getShape",value:function(){return Object(Q.g)("g",null,this.getEdge())}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,r=t.isSelected,n={start:null,end:null,hover:this.state.hover,isSelected:r},o=Uu(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getAppendAttibutes",value:function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=yu(ab(ab({},o),{},{type:"start"})),a=yu(ab(ab({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(t){var e=this.getAppendAttibutes(t),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Object(Q.g)(Wh,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.pointsList,i=r.draggable,a=[],u=o.length,c=function(e){var r="lf-polyline-append",c={start:{x:o[e].x,y:o[e].y},end:{x:o[e+1].x,y:o[e+1].y},startIndex:e,endIndex:e+1,direction:"",dragAble:!0},s=Object(Q.g)("g",{className:r},t.getAppendShape(c)),l=n.editConfig,f=l.adjustEdge,p=l.adjustEdgeMiddle;if(f&&i){t.dragHandler=t.drag;var y=c.startIndex,d=c.endIndex,h=p&&(0===y||d===u-1);c.dragAble=!h,c.start.x===c.end.x?(c.dragAble&&(r+="-ew-resize"),c.direction=eo.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=eo.HORIZONTAL),s=Object(Q.g)("g",{className:t.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Object(Q.g)("g",{className:r},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return Object(Q.g)("g",null,a)}}])&&lb(e.prototype,r),n&&lb(e,n),i}(Hv);function gb(t){return(gb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ob(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ob(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ob(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wb(Object(r),!0).forEach((function(e){xb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eb(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 Sb(){return(Sb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Pb(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Pb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Tb(t)););return t}function kb(t,e){return(kb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ab(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tb(t);if(e){var o=Tb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Db(this,r)}}function Db(t,e){if(e&&("object"===gb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tb(t){return(Tb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Mb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kb(t,e)}(i,t);var e,r,n,o=Ab(i);function i(){return jb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=Sb(Tb(i.prototype),"getAttributes",this).call(this),e=this.props.model.path;return _b(_b({},t),{},{path:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.path,r=t.strokeWidth,n=t.stroke,o=t.strokeDashArray;return Object(Q.g)(Wh,{d:e,strokeWidth:r,stroke:n,fill:"none",strokeDasharray:o})}},{key:"getShape",value:function(){return Object(Q.g)("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.getAttributes().path;return Object(Q.g)(Wh,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,r=t,n=r.path,o=r.isSelected,i=mb(function(t){var e=Wu(t);return[e[2],e[3]]}(n),2);return{start:i[0],end:i[1],hover:e,isSelected:o}}}])&&Eb(e.prototype,r),n&&Eb(e,n),i}(Hv);var Nb=function(t,e){return _r(t,e)};var Cb=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},Rb=function(){return ht.a.Date.now()},Ib=/\s/;var Lb=function(t){for(var e=t.length;e--&&Ib.test(t.charAt(e)););return e},zb=/^\s+/;var Bb=function(t){return t?t.slice(0,Lb(t)+1).replace(zb,""):t},Hb=/^[-+]0x[0-9a-f]+$/i,Xb=/^0b[01]+$/i,Ub=/^0o[0-7]+$/i,Fb=parseInt;var Gb=function(t){if("number"==typeof t)return t;if(kr(t))return NaN;if(St(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=St(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Bb(t);var r=Xb.test(t);return r||Ub.test(t)?Fb(t.slice(2),r?2:8):Hb.test(t)?NaN:+t},Yb=Math.max,Vb=Math.min;var Wb=function(t,e,r){var n,o,i,a,u,c,s=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function d(t){return s=t,u=setTimeout(v,e),l?y(t):a}function h(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=Rb();if(h(t))return b(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?Vb(r,i-(t-s)):r}(t))}function b(t){return u=void 0,p&&n?y(t):(n=o=void 0,a)}function g(){var t=Rb(),r=h(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return d(c);if(f)return clearTimeout(u),u=setTimeout(v,e),y(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=Gb(e)||0,St(r)&&(l=!!r.leading,i=(f="maxWait"in r)?Yb(Gb(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:b(Rb())},g},Kb=r(157);function $b(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)}}var Zb,qb,Jb,Qb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.undos=[],this.redos=[],this.callbacks=[],this.stopWatch=null,this.curData=null,this.maxSize=50,this.waitTime=100,this.eventCenter=void 0,this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){Nb(Cb(this.undos),t)||(this.undos.push(t),Nb(this.curData,t)||(this.redos=[]),this.eventCenter.emit(to.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var t=this.undos.pop();this.redos.push(t);var e=this.undos.pop();return this.curData=ni(e),e}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=ni(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(Kb.a)(t,Wb((function(){var r=t.modelToGraphData();e.add(r)}),this.waitTime))}}])&&$b(e.prototype,r),n&&$b(e,n),t}();function tg(t){return(tg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return rg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rg(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ng(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function og(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ng(Object(r),!0).forEach((function(e){ig(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ng(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ig(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ag(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 ug(t,e){return(ug=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lg(t);if(e){var o=lg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sg(this,r)}}function sg(t,e){if(e&&("object"===tg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lg(t){return(lg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fg,pg,yg,dg=Yg((Jb=qb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ug(t,e)}(i,t);var e,r,n,o=cg(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).ref=Object(Q.f)(),t.__prevText={type:"",text:"",id:""},t.keyupHandler=function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;13===e.keyCode&&e.altKey&&n.setElementState(0),t.__prevText={type:n.type,text:r,id:n.id}},t.state={style:{left:0,top:0}},t}return e=i,n=[{key:"getDerivedStateFromProps",value:function(t){var e,r=t.graphModel,n=r.transformMatrix,o=r.theme,i=r.textEditElement;if(i){var a;if(null===(a=i.text)||void 0===a||!a.value)if(i.BaseType===Qn.EDGE){var u=(i=i).text,c=i.textPosition,s=c.x,l=c.y;u.x=s,u.y=l,i.setText(u)}else i=i;var f={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(i.BaseType===Qn.EDGE){var p=o.edgeText,y=p.autoWrap,d=p.lineHeight,h=p.wrapPadding,v=i.textWidth;y&&v&&(e=og(og({},f),{},{width:v,minWidth:v,lineHeight:d,padding:h}))}else if(i.BaseType===Qn.NODE){var b=o.nodeText,g=b.autoWrap,m=b.lineHeight,O=b.wrapPadding,w=i,_=w.width,x=w.textWidth,j=w.modelType;(j!==Jn.TEXT_NODE&&g||j===Jn.TEXT_NODE&&g&&x)&&(e=og(og({},f),{},{width:x||_,minWidth:x||_,lineHeight:m,padding:O}))}var E=i.text,S=E.x,P=E.y,k=eg(n.CanvasPointToHtmlPoint([S,P]),2);return{style:og({left:k[0],top:k[1]},e)}}}}],(r=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var t=this.props.graphModel,e=t.eventCenter,r=t.editConfig,n=r.edgeTextEdit,o=r.nodeTextEdit;(n||o)&&e.on(to.GRAPH_TRANSFORM,(function(){t.textEditElement&&t.textEditElement.setElementState(Zn.DEFAULT)}))}},{key:"componentDidUpdate",value:function(){var t=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){var e=this.__prevText,r=e.text,n=e.id;t.setElementTextById(n,r),t.eventCenter.emit(to.TEXT_UPDATE,og({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var r=window.getSelection();r.removeAllRanges(),r.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,r=this.state.style;return e?Object(Q.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&ag(e.prototype,r),n&&ag(e,n),i}(Q.a),qb.toolName="textEdit",Zb=Jb))||Zb,hg=function(t){return t.modelType===Jn.LINE_EDGE?function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,a=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-a/2,x1:n+i/2,y1:o+a/2}}(t):t.modelType===Jn.POLYLINE_EDGE?function(t){var e=t.points,r=Uu(e),n=Su(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):t.modelType===Jn.BEZIER_EDGE?function(t){var e=t.path,r=Wu(e),n=Su(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):void 0};function vg(t){return(vg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||mg(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gg(t){return function(t){if(Array.isArray(t))return Og(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||mg(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mg(t,e){if(t){if("string"==typeof t)return Og(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Og(t,e):void 0}}function Og(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wg(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 _g(t,e){return(_g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Eg(t);if(e){var o=Eg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jg(this,r)}}function jg(t,e){if(e&&("object"===vg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Eg(t){return(Eg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sg=Yg((yg=pg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_g(t,e)}(i,t);var e,r,n,o=xg(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).stepDrag=void 0,e.handleMouseDown=function(t){e.stepDrag.handleMouseDown(t)},e.onDraging=function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel;o.moveElements(o.getSelectElements(!0),r,n)},e.handleContextMenu=function(t){t.preventDefault();var r=e.props,n=r.graphModel,o=r.graphModel,i=o.eventCenter,a=o.selectElements,u=n.getPointByClient({x:t.clientX,y:t.clientY}),c={nodes:[],edges:[]};gg(a.values()).forEach((function(t){t.BaseType===Qn.NODE&&c.nodes.push(t.getData()),t.BaseType===Qn.EDGE&&c.edges.push(t.getData())})),i.emit(to.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})};var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new Oc({onDraging:e.onDraging,step:r,eventType:"multiple:select",eventCenter:n}),e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.transformMatrix;if(!(e.size<=1)){var n=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===Qn.NODE&&(e=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{x:e-n/2,y:r-o/2,x1:e+n/2,y1:r+o/2}}(t)),t.BaseType===Qn.EDGE&&(e=hg(t)),n=Math.min(n,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),a=Math.max(a,e.y1)}));var u=bg(r.CanvasPointToHtmlPoint([n,o]),2);n=u[0],o=u[1];var c=bg(r.CanvasPointToHtmlPoint([i,a]),2);i=c[0],a=c[1];var s={left:"".concat(n-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-n+20,"px"),height:"".concat(a-o+20,"px")};return Object(Q.g)("div",{className:"lf-multiple-select",style:s,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&wg(e.prototype,r),n&&wg(e,n),i}(Q.a),pg.toolName="multipleSelect",fg=yg))||fg;function Pg(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)}}var kg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tools=void 0,this.components=void 0,this.toolMap=new Map,this.instance=void 0,this.instance=e,this.isDisabledTool(dg.toolName)||this.registerTool(dg.toolName,dg),this.isDisabledTool(Sg.toolName)||this.registerTool(Sg.toolName,Sg)}var e,r,n;return e=t,(r=[{key:"isDisabledTool",value:function(t){return-1!==this.instance.options.disabledTools.indexOf(t)}},{key:"registerTool",value:function(t,e){this.toolMap.set(t,e)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&Pg(e.prototype,r),n&&Pg(e,n),t}();r(202);function Ag(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)}}var Dg=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events={}}var e,r,n;return e=t,(r=[{key:"on",value:function(t,e,r){var n=this;return t.split(",").forEach((function(t){t=t.trim(),n._events[t]||(n._events[t]=[]),n._events[t].push({callback:e,once:!!r})})),this}},{key:"once",value:function(t,e){var r=this;t.split(",").forEach((function(t){return t=t.trim(),r.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var r=this;t.split(",").forEach((function(t){var n=r._events[t]||[],o=r._events["*"]||[],i=function(n){for(var o=n.length,i=0;i<o;i++)if(n[i]){var a=n[i],u=a.callback;a.once&&(n.splice(i,1),0===n.length&&delete r._events[t],o--,i--),u.apply(r,[e])}};i(n),i(o)}))}},{key:"off",value:function(t,e){var r=this;return t||(this._events={}),t.split(",").forEach((function(t){if(e){for(var n=r._events[t]||[],o=n.length,i=0;i<o;i++)n[i].callback===e&&(n.splice(i,1),o--,i--);0===n.length&&delete r._events[t]}else delete r._events[t]})),this}},{key:"getEvents",value:function(){return this._events}}])&&Ag(e.prototype,r),n&&Ag(e,n),t}(),Tg=r(158),Mg=r.n(Tg);function Ng(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)}}var Cg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mousetrap=void 0,this.options=void 0,this.target=void 0,e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new Mg.a(this.target),e.keyboard.enabled&&this.enable(!0)}var e,r,n;return e=t,(r=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(Se(e))e.forEach((function(e){var r=e.keys,n=e.callback,o=e.action;return t.on(r,n,o)}));else{var r=e.keys,n=e.callback,o=e.action;this.on(r,n,o)}}},{key:"on",value:function(t,e,r){this.mousetrap.bind(this.getKeys(t),e,r)}},{key:"disabled",get:function(){return!0!==this.options.keyboard.enabled}},{key:"off",value:function(t,e){this.mousetrap.unbind(this.getKeys(t),e)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var e=this;return(Array.isArray(t)?t:[t]).map((function(t){return e.formatkey(t)}))}},{key:"formatkey",value:function(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&Ng(e.prototype,r),n&&Ng(e,n),t}(),Rg=Cg,Ig=null;function Lg(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function zg(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach((function(t){t.x+=e,t.y+=e})),t.text&&(t.text.x+=e,t.text.y+=e),t}function Bg(t){return(Bg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hg(Object(r),!0).forEach((function(e){Ug(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ug(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fg(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)}}var Gg=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=void 0,this.width=void 0,this.height=void 0,this.graphModel=void 0,this.history=void 0,this.viewMap=new Map,this.tool=void 0,this.keyboard=void 0,this.dnd=void 0,this.options=void 0,this.getSnapshot=void 0,this.eventCenter=void 0,this.snaplineModel=void 0,this.components=[],this.adapterIn=void 0,this.adapterOut=void 0,this.getView=function(t){return r.viewMap.get(t)};var n,o,i=e.container,a=e.width,u=e.height,c=e.dndOptions,s=e.keyboard,l=e.isSilentMode,f=e.snapline;this.options=Sl(e),this.container=i,this.width=a||i.getBoundingClientRect().width,this.height=u||i.getBoundingClientRect().height,this.tool=new kg(this),this.eventCenter=new Dg,this.history=new Qb(this.eventCenter),this.dnd=new El({options:c,lf:this}),this.keyboard=new Rg({lf:this,keyboard:s}),this.graphModel=new Tc(Xg(Xg({},this.options),{},{eventCenter:this.eventCenter,rootEl:this.container,width:this.width,height:this.height})),l||!1===f||(this.snaplineModel=new Oy(this.graphModel),n=this.eventCenter,o=this.snaplineModel,n.on("node:mousemove",(function(t){var e=t.data;o.setNodeSnapLine(e)})),n.on("node:mouseup",(function(){o.clearSnapline()}))),function(t,e){var r=t.keyboard,n=r.options.keyboard;r.on(["cmd + c","ctrl + c"],(function(){if(n.enabled&&!e.textEditElement){var r=t.options.guards,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)?(Ig=null,!1):((Ig=o).nodes.forEach((function(t){return Lg(t,40)})),Ig.edges.forEach((function(t){return zg(t,40)})),!1)}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(Ig&&(Ig.nodes||Ig.edges)){t.clearSelectElements();var r=t.addElements(Ig);if(!r)return;r.nodes.forEach((function(e){return t.select(e.id,!0)})),r.edges.forEach((function(e){return t.select(e.id,!0)})),Ig.nodes.forEach((function(t){return Lg(t,40)})),Ig.edges.forEach((function(t){return zg(t,40)}))}return!1}})),r.on(["cmd + z","ctrl + z"],(function(){if(n.enabled&&!e.textEditElement)return t.undo(),!1})),r.on(["cmd + y","ctrl + y"],(function(){if(n.enabled&&!e.textEditElement)return t.redo(),!1})),r.on(["backspace"],(function(){if(n.enabled&&!e.textEditElement){var r=e.getSelectElements(!0);return t.clearSelectElements(),r.edges.forEach((function(e){return t.deleteEdge(e.id)})),r.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}}))}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(e.disabledPlugins)}var e,r,n;return e=t,n=[{key:"use",value:function(t){var e=t.pluginName;e||(console.warn("请给插件".concat(t.name||t.constructor.name,"指定pluginName!")),e=t.name);var r=this.extensions.get(e);r&&r.destroy&&r.destroy(),this.extensions.set(e,t)}}],(r=[{key:"on",value:function(t,e){this.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.eventCenter.emit(t,e)}},{key:"installPlugins",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.extensions.forEach((function(t){var n=t.pluginName||t.name;-1===r.indexOf(n)&&e.__installPlugin(t)}))}},{key:"__installPlugin",value:function(e){if("object"===Bg(e)){var r=e.install,n=e.render;return r&&r.call(e,this,t),void(n&&this.components.push(n.bind(e)))}var o=new e({lf:this,LogicFlow:t});o.render&&this.components.push(o.render.bind(o))}},{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var n={BaseEdge:Hv,BaseEdgeModel:Fa,BaseNode:od,BaseNodeModel:Tf,RectNode:bd,RectNodeModel:Wp,CircleNode:Dd,CircleNodeModel:Ff,PolygonNode:Wd,PolygonNodeModel:Cp,TextNode:Ch,TextNodeModel:oy,LineEdge:Qv,LineEdgeModel:Qa,DiamondNode:ah,DiamondNodeModel:sp,PolylineEdge:bb,PolylineEdgeModel:pu,BezierEdge:Mb,BezierEdgeModel:gf,EllipseNode:xh,EllipseNodeModel:wp,HtmlNode:Uh,HtmlNodeModel:hy,h:Q.g,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)}));var o=e(n),i=o.view,a=o.model,u=i;r&&!u.isObervered&&(u.isObervered=!0,u=J(u)),this.setView(t,u),this.graphModel.setModel(t,a)}else this._registerElement(t)}},{key:"_registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=J(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"defaultRegister",value:function(){this._registerElement({view:bd,model:Wp,type:"rect"}),this._registerElement({type:"circle",view:Dd,model:Ff}),this._registerElement({type:"polygon",view:Wd,model:Cp}),this._registerElement({type:"line",view:Qv,model:Qa}),this._registerElement({type:"polyline",view:bb,model:pu}),this._registerElement({type:"bezier",view:Mb,model:gf}),this._registerElement({type:"text",view:Ch,model:oy}),this._registerElement({type:"ellipse",view:xh,model:wp}),this._registerElement({type:"diamond",view:ah,model:sp}),this._registerElement({type:"html",view:Uh,model:hy})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=Ma(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=Ma(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){var r=this.graphModel.transformMatrix;return r.zoom(t,e),"".concat(100*r.SCALE_X,"%")}},{key:"resetZoom",value:function(){this.graphModel.transformMatrix.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformMatrix.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformMatrix.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformMatrix;return{SCALE_X:t.SCALE_X,SCALE_Y:t.SCALE_Y,TRANSLATE_X:t.TRANSLATE_X,TRANSLATE_Y:t.TRANSLATE_Y}}},{key:"translate",value:function(t,e){this.graphModel.transformMatrix.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformMatrix,e=t.TRANSLATE_X,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{key:"select",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformMatrix,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModel(n);o&&(r=o.getData());var i=this.getEdgeModelById(n);i&&(r=i.textPosition)}var a=r,u=a.x,c=a.y;e.focusOn(u,c,this.width,this.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"setDefaultEdgeType",value:function(t){this.options.edgeType=t,this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.setElementTextById(t,e)}},{key:"deleteElement",value:function(t){return this.graphModel.getNodeModel(t)?this.deleteNode(t):!!this.graphModel.getEdgeModel(t)&&this.deleteEdge(t)}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){return this.graphModel.addNode(t)}},{key:"deleteNode",value:function(t){var e=this.graphModel.getNodeModel(t);if(!e)return!1;var r=e.getData(),n=this.options.guards,o=!n||!n.beforeDelete||n.beforeDelete(r);return o&&this.graphModel.deleteNode(t),o}},{key:"editNodeText",value:function(t){this.graphModel.setTextEditable(t)}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModel(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"createEdge",value:function(t){this.graphModel.createEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,r=this.graphModel.edgesMap[t];if(!r)return!1;var n=r.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(n);return o&&this.graphModel.removeEdgeById(t),o}},{key:"removeEdge",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.removeEdge(e,r):e?this.graphModel.removeEdgeBySource(e):r&&this.graphModel.removeEdgeByTarget(r)}},{key:"getNodeModel",value:function(t){return this.graphModel.getNodeModel(t)}},{key:"getNodeData",value:function(t){return this.graphModel.getNodeModel(t).getData()}},{key:"setNodeData",value:function(t){var e=t.id;this.graphModel.getNodeModel(e).updateData(t)}},{key:"getEdgeModel",value:function(t){return this.getEdge(t)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdge",value:function(t){var e=this.graphModel,r=e.edges,n=e.edgesMap,o=t.id,i=t.sourceNodeId,a=t.targetNodeId;if(o)return n[o]?[n[o].model]:void console.warn("不存在id为".concat(o,"的边"));if(i&&a){var u=[];return r.forEach((function(t){t.sourceNodeId===i&&t.targetNodeId===a&&u.push(t)})),u}if(i){var c=[];return r.forEach((function(t){t.sourceNodeId===i&&c.push(t)})),c}if(a){var s=[];return r.forEach((function(t){t.targetNodeId===a&&s.push(t)})),s}return[]}},{key:"getEdgeData",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"setEdgeData",value:function(t){var e,r=t.id;return null===(e=this.getEdgeModelById(r))||void 0===e?void 0:e.updateData(t)}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(t):t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(Ma(e))}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfig.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfig.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"setElementZIndex",value:function(t,e){return this.graphModel.setElementZIndex(t,e)}},{key:"addElements",value:function(t){for(var e=this,r=t.nodes,n=t.edges,o={},i={nodes:[],edges:[]},a=0;a<r.length;a++){var u=r[a],c=u.id,s=this.addNode(u);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return n.forEach((function(t){var r=t.sourceNodeId,n=t.targetNodeId;o[r]&&(t.sourceNodeId=o[r]),o[n]&&(t.targetNodeId=o[n]);var a=e.graphModel.createEdge(t);i.edges.push(a)})),i}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var r=new e(t,this.graphModel);return this.graphModel.setFakerNode(r),r}console.warn("不存在为".concat(t.type,"类型的节点"))}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"getAreaElement",value:function(t,e){return this.graphModel.getAreaElement(t,e).map((function(t){return t.getData()}))}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.graphModel.graphDataToModel(Ma(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Object(Q.j)(Object(Q.g)(Ol,{eventCenter:this.eventCenter,getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container)}}])&&Fg(e.prototype,r),n&&Fg(e,n),t}();function Yg(t){return J(t)}Gg.extensions=new Map;e.default=Gg}])}));
|