@logicflow/core 1.0.0-alpha.0 → 1.0.0-alpha.1
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/dist/logic-flow.js +2 -11
- package/dist/style/index.css +14 -0
- package/package.json +3 -3
- package/types/view/node/BaseNode.d.ts +29 -38
- package/types/view/node/CircleNode.d.ts +13 -16
- package/types/view/node/DiamondNode.d.ts +13 -16
- package/types/view/node/EllipseNode.d.ts +12 -15
- package/types/view/node/PolygonNode.d.ts +13 -35
- package/types/view/node/RectNode.d.ts +13 -16
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 jt})),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 x})),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 je})),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 xe})),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}(),j=d("Atom",_);function x(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,13 +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
|
-
***************************************************************************** */function R(t,e){function r(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var I=function(){return(I=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 L(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 z(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L(arguments[e]));return t}var B={},H={};function U(t,e){var r=e?B:H;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return X(this),this[t]},set:function(e){X(this),this[t]=e}})}function X(t){if(!0!==t.__mobxDidRunLazyInitializers){var e=t.__mobxDecorators;if(e)for(var r in h(t,"__mobxDidRunLazyInitializers",!0),e){var n=e[r];n.propertyCreator(t,n.prop,n.descriptor,n.decoratorTarget,n.decoratorArguments)}}}function F(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,"__mobxDecorators")){var u=n.__mobxDecorators;h(n,"__mobxDecorators",I({},u))}return n.__mobxDecorators[o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},U(o,t)};return G(arguments)?(r=o,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function G(t){return(2===t.length||3===t.length)&&"string"==typeof t[1]||4===t.length&&!0===t[3]}function Y(t,e,r){return De(t)?t:Array.isArray(t)?nt.array(t,{name:r}):d(t)?nt.object(t,void 0,{name:r}):g(t)?nt.map(t,{name:r}):m(t)?nt.set(t,{name:r}):t}function V(t){return t}function W(t){l(t);var e=F(!0,(function(e,r,n,o,i){mr(e,r,n?n.initializer?n.initializer.call(e):n.value:void 0,t)})),r=(void 0!==n&&n.env,e);return r.enhancer=t,r}var $={deep:!0,name:void 0,defaultDecorator:void 0},K={deep:!1,name:void 0,defaultDecorator:void 0};function Z(t){return null==t?$:"string"==typeof t?{name:t,deep:!0}:t}function q(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?V:Y}Object.freeze($),Object.freeze(K);var J=W(Y),Q=W((function(t,e,r){return null==t||Er(t)||sr(t)||yr(t)||vr(t)?t:Array.isArray(t)?nt.array(t,{name:r,deep:!1}):d(t)?nt.object(t,void 0,{name:r,deep:!1}):g(t)?nt.map(t,{name:r,deep:!1}):m(t)?nt.set(t,{name:r,deep:!1}):s(!1)})),tt=W(V),et=W((function(t,e,r){return kr(t,e)?e:t}));var rt={box:function(t,e){arguments.length>2&&ot("box");var r=Z(e);return new Nt(t,q(r),r.name,!0,r.equals)},shallowBox:function(t,e){return arguments.length>2&&ot("shallowBox"),nt.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ot("array");var r=Z(e);return new nr(t,q(r),r.name)},shallowArray:function(t,e){return arguments.length>2&&ot("shallowArray"),nt.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ot("map");var r=Z(e);return new fr(t,q(r),r.name)},shallowMap:function(t,e){return arguments.length>2&&ot("shallowMap"),nt.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ot("set");var r=Z(e);return new hr(t,q(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&ot("object");var n=Z(r);return Oe({},t,e,n)},shallowObject:function(t,e){return"string"==typeof arguments[1]&&ot("shallowObject"),nt.object(t,{},{name:e,deep:!1})},ref:tt,shallow:Q,deep:J,struct:et},nt=function(t,e,r){if("string"==typeof arguments[1])return J.apply(null,arguments);if(De(t))return t;var n=d(t)?nt.object(t,e,r):Array.isArray(t)?nt.array(t,e):g(t)?nt.map(t,e):m(t)?nt.set(t,e):t;if(n!==t)return n;s(!1)};function ot(t){s("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys(rt).forEach((function(t){return nt[t]=rt[t]}));var it,at,ut=F(!1,(function(t,e,r,n,o){var i=r.get,a=r.set,u=o[0]||{};!function(t,e,r){var n=gr(t);r.name=n.name+"."+e,r.context=t,n.values[e]=new Rt(r),Object.defineProperty(t,e,function(t){return wr[t]||(wr[t]={configurable:Ht.computedConfigurable,enumerable:!1,get:function(){return _r(this).read(this,t)},set:function(e){_r(this).write(this,t,e)}})}(e))}(t,e,I({get:i,set:a},u))})),ct=ut({equals:N.structural}),st=function(t,e,r){if("string"==typeof e)return ut.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return ut.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 Rt(n)};st.struct=ct,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"}(it||(it={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(at||(at={}));var lt=function(t){this.cause=t};function ft(t){return t instanceof lt}function pt(t){switch(t.dependenciesState){case it.UP_TO_DATE:return!1;case it.NOT_TRACKING:case it.STALE:return!0;case it.POSSIBLY_STALE:for(var e=Ot(!0),r=gt(),n=t.observing,o=n.length,i=0;i<o;i++){var a=n[i];if(It(a)){if(Ht.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return mt(r),wt(e),!0}if(t.dependenciesState===it.STALE)return mt(r),wt(e),!0}}return _t(t),mt(r),wt(e),!1}}function yt(){return null!==Ht.trackingDerivation}function dt(t){var e=t.observers.length>0;Ht.computationDepth>0&&e&&s(!1),Ht.allowStateChanges||!e&&"strict"!==Ht.enforceActions||s(!1)}function ht(t,e,r){var n=Ot(!0);_t(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Ht.runId;var o,i=Ht.trackingDerivation;if(Ht.trackingDerivation=t,!0===Ht.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new lt(t)}return Ht.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=it.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&&Xt(u,t),u.diffValue=0}for(;o--;){var u;1===(u=r[o]).diffValue&&(u.diffValue=0,Ut(u,t))}n!==it.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),t.observing.length,wt(n),o}function vt(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)Xt(e[r],t);t.dependenciesState=it.NOT_TRACKING}function bt(t){var e=gt(),r=t();return mt(e),r}function gt(){var t=Ht.trackingDerivation;return Ht.trackingDerivation=null,t}function mt(t){Ht.trackingDerivation=t}function Ot(t){var e=Ht.allowStateReads;return Ht.allowStateReads=t,e}function wt(t){Ht.allowStateReads=t}function _t(t){if(t.dependenciesState!==it.UP_TO_DATE){t.dependenciesState=it.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=it.UP_TO_DATE}}var xt=0,Et=1,jt=Object.getOwnPropertyDescriptor((function(){}),"name");jt&&jt.configurable;function St(t,e){var r=function(){return Pt(t,e,this,arguments)};return r.isMobxAction=!0,r}function Pt(t,e,r,n){var o=At(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{kt(o)}}function At(t,e,r){var n=te()&&!!t,o=0;if(n){o=Date.now();var i=r&&r.length||0,a=new Array(i);if(i>0)for(var u=0;u<i;u++)a[u]=r[u];re({type:"action",name:t,object:e,arguments:a})}var c=gt();Gt();var s={prevDerivation:c,prevAllowStateChanges:Tt(!0),prevAllowStateReads:Ot(!0),notifySpy:n,startTime:o,actionId:Et++,parentActionId:xt};return xt=s.actionId,s}function kt(t){xt!==t.actionId&&s("invalid action stack. did you forget to finish an action?"),xt=t.parentActionId,void 0!==t.error&&(Ht.suppressReactionErrors=!0),Mt(t.prevAllowStateChanges),wt(t.prevAllowStateReads),Yt(),mt(t.prevDerivation),t.notifySpy&&oe({time:Date.now()-t.startTime}),Ht.suppressReactionErrors=!1}function Dt(t,e){var r,n=Tt(t);try{r=e()}finally{Mt(n)}return r}function Tt(t){var e=Ht.allowStateChanges;return Ht.allowStateChanges=t,e}function Mt(t){Ht.allowStateChanges=t}var Nt=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+c()),void 0===o&&(o=!0),void 0===i&&(i=N.default);var a=t.call(this,n)||this;return a.enhancer=r,a.name=n,a.equals=i,a.hasUnreportedChange=!1,a.value=r(e,void 0,n),o&&te()&&ee({type:"create",name:a.name,newValue:""+a.value}),a}return R(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){var e=this.value;if((t=this.prepareNewValue(t))!==Ht.UNCHANGED){var r=te();r&&re({type:"update",name:this.name,newValue:t,oldValue:e}),this.setNewValue(t),r&&oe()}},e.prototype.prepareNewValue=function(t){if(dt(this),Fe(this)){var e=Ye(this,{object:this,type:"update",newValue:t});if(!e)return Ht.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Ht.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),Ve(this)&&$e(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 Ge(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),We(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return _(this.get())},e}(k);Nt.prototype[w()]=Nt.prototype.valueOf;var Ct=b("ObservableValue",Nt),Rt=function(){function t(t){this.dependenciesState=it.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=it.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+c(),this.value=new lt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=at.NONE,l(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+c(),t.set&&(this.setter=St(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?N.structural:N.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==it.UP_TO_DATE)return;t.lowestObserverState=it.POSSIBLY_STALE;var e=t.observers,r=e.length;for(;r--;){var n=e[r];n.dependenciesState===it.UP_TO_DATE&&(n.dependenciesState=it.POSSIBLY_STALE,n.isTracing!==at.NONE&&Wt(n,t),n.onBecomeStale())}}(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&s("Cycle detected in computation "+this.name+": "+this.derivation),0!==Ht.inBatch||0!==this.observers.length||this.keepAlive?(Vt(this),pt(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===it.STALE)return;t.lowestObserverState=it.STALE;var e=t.observers,r=e.length;for(;r--;){var n=e[r];n.dependenciesState===it.POSSIBLY_STALE?n.dependenciesState=it.STALE:n.dependenciesState===it.UP_TO_DATE&&(t.lowestObserverState=it.UP_TO_DATE)}}(this)):pt(this)&&(this.warnAboutUntrackedRead(),Gt(),this.value=this.computeValue(!1),Yt());var t=this.value;if(ft(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ft(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){l(!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 l(!1,!1)},t.prototype.trackAndCompute=function(){te()&&ee({object:this.scope,type:"compute",name:this.name});var t=this.value,e=this.dependenciesState===it.NOT_TRACKING,r=this.computeValue(!0),n=e||ft(t)||ft(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Ht.computationDepth++,t)e=ht(this,this.derivation,this.scope);else if(!0===Ht.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new lt(t)}return Ht.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(vt(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,o=void 0;return ye((function(){var i=r.get();if(!n||e){var a=gt();t({type:"update",object:r,newValue:i,oldValue:o}),mt(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 _(this.get())},t}();Rt.prototype[w()]=Rt.prototype.valueOf;var It=b("ComputedValue",Rt),Lt=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},zt=!0,Bt=!1,Ht=function(){var t=u();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(zt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new Lt).version&&(zt=!1),zt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Lt):(setTimeout((function(){Bt||s("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Lt)}();function Ut(t,e){var r=t.observers.length;r&&(t.observersIndexes[e.__mapid]=r),t.observers[r]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Xt(t,e){if(1===t.observers.length)t.observers.length=0,Ft(t);else{var r=t.observers,n=t.observersIndexes,o=r.pop();if(o!==e){var i=n[e.__mapid]||0;i?n[o.__mapid]=i:delete n[o.__mapid],r[i]=o}delete n[e.__mapid]}}function Ft(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Ht.pendingUnobservations.push(t))}function Gt(){Ht.inBatch++}function Yt(){if(0==--Ht.inBatch){Zt();for(var t=Ht.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.length&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof Rt&&r.suspend())}Ht.pendingUnobservations=[]}}function Vt(t){var e=Ht.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.length&&Ht.inBatch>0&&Ft(t),!1)}function Wt(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===at.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)}))}((n=t,we(jr(n,o))),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 Rt?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}var n,o}var $t=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+c()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=it.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+c(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=at.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ht.pendingReactions.push(this),Zt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Gt(),this._isScheduled=!1,pt(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&te()&&ee({name:this.name,type:"scheduled-reaction"})}catch(t){this.reportExceptionInDerivation(t)}}Yt()}},t.prototype.track=function(t){Gt();var e,r=te();r&&(e=Date.now(),re({name:this.name,type:"reaction"})),this._isRunning=!0;var n=ht(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&vt(this),ft(n)&&this.reportExceptionInDerivation(n.cause),r&&oe({time:Date.now()-e}),Yt()},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Ht.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ht.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,t),te()&&ee({type:"error",name:this.name,message:r,error:""+t}),Ht.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Gt(),vt(this),Yt()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t.$mobx=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=ze(t);if(!n)return s(!1);n.isTracing===at.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled");n.isTracing=r?at.BREAK:at.LOG}(this,t)},t}();var Kt=function(t){return t()};function Zt(){Ht.inBatch>0||Ht.isRunningReactions||Kt(qt)}function qt(){Ht.isRunningReactions=!0;for(var t=Ht.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()}Ht.isRunningReactions=!1}var Jt=b("Reaction",$t);function Qt(t){var e=Kt;Kt=function(r){return t((function(){return e(r)}))}}function te(){return!!Ht.spyListeners.length}function ee(t){if(Ht.spyListeners.length)for(var e=Ht.spyListeners,r=0,n=e.length;r<n;r++)e[r](t)}function re(t){ee(I(I({},t),{spyReportStart:!0}))}var ne={spyReportEnd:!0};function oe(t){ee(t?I(I({},t),{spyReportEnd:!0}):ne)}function ie(t){return Ht.spyListeners.push(t),f((function(){Ht.spyListeners=Ht.spyListeners.filter((function(e){return e!==t}))}))}function ae(){s(!1)}function ue(t){return function(e,r,n){if(n){if(n.value)return{value:St(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return St(t,o.call(this))}}}return ce(t).apply(this,arguments)}}function ce(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){h(this,r,se(t,e))}})}}var se=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?St(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?St(t,e):1===arguments.length&&"string"==typeof t?ue(t):!0!==n?ue(e).apply(null,arguments):void(t[e]=St(t.name||e,r.value))};function le(t,e){return Pt("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function fe(t){return"function"==typeof t&&!0===t.isMobxAction}function pe(t,e,r){h(t,e,St(e,r.bind(t)))}function ye(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+c();if(!e.scheduler&&!e.delay)r=new $t(n,(function(){this.track(u)}),e.onError,e.requiresObservable);else{var o=he(e),a=!1;r=new $t(n,(function(){a||(a=!0,o((function(){a=!1,r.isDisposed||r.track(u)})))}),e.onError,e.requiresObservable)}function u(){t(r)}return r.schedule(),r.getDisposer()}se.bound=function(t,e,r,n){return!0===n?(pe(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return pe(this,e,r.value||r.initializer.call(this)),this[e]},set:ae}:{enumerable:!1,configurable:!0,set:function(t){pe(this,e,t)},get:function(){}}};var de=function(t){return t()};function he(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:de}function ve(t,e,r){void 0===r&&(r=i),"boolean"==typeof r&&(r={fireImmediately:r});var n,o,a,u=r.name||"Reaction@"+c(),s=se(u,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=he(r),p=!0,y=!1,d=r.compareStructural?N.structural:r.equals||N.default,h=new $t(u,(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(a,r),a=r})),p&&r.fireImmediately&&s(a,h),p||!0!==e||s(a,h),p&&(p=!1)}}return h.schedule(),h.getDisposer()}function be(t,e,r){return ge("onBecomeUnobserved",t,e,r)}function ge(t,e,r,n){var o="function"==typeof n?jr(e,r):jr(e),i="function"==typeof n?n:r,a=o[t];return"function"!=typeof a?s(!1):(o[t]=function(){a.call(this),i.call(this)},function(){o[t]=a})}function me(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.arrayBuffer,a=t.reactionScheduler,c=t.reactionRequiresObservable,l=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Ht.pendingReactions.length||Ht.inBatch||Ht.isRunningReactions)&&s("isolateGlobalState should be called before MobX is running any reactions"),Bt=!0,zt&&(0==--u().__mobxInstanceCount&&(u().__mobxGlobals=void 0),Ht=new Lt)),void 0!==e){var f=void 0;switch(e){case!0:case"observed":f=!0;break;case!1:case"never":f=!1;break;case"strict":case"always":f="strict";break;default:s("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Ht.enforceActions=f,Ht.allowStateChanges=!0!==f&&"strict"!==f}void 0!==r&&(Ht.computedRequiresReaction=!!r),void 0!==c&&(Ht.reactionRequiresObservable=!!c),void 0!==l&&(Ht.observableRequiresReaction=!!l,Ht.allowStateReads=!Ht.observableRequiresReaction),void 0!==n&&(Ht.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."),Ht.disableErrorBoundaries=!!o),"number"==typeof i&&ur(i),a&&Qt(a)}function Oe(t,e,r,n){var o=(n=Z(n)).defaultDecorator||(!1===n.deep?tt:J);X(t),gr(t,n.name,o.enhancer),Gt();try{for(var i=Object.getOwnPropertyNames(e),a=0,u=i.length;a<u;a++){var c=i[a],s=Object.getOwnPropertyDescriptor(e,c);0;var l=(r&&c in r?r[c]:s.get?ut:o)(t,c,s,!0);l&&Object.defineProperty(t,c,l)}}finally{Yt()}return t}function we(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(we)),n}var _e=0;function xe(){this.message="FLOW_CANCELLED"}function Ee(t){1!==arguments.length&&s("Flow expects one 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=this,o=arguments,i=++_e,a=se(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=se(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=se(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=se(e+" - runid: "+i+" - cancel",(function(){try{u&&je(u);var t=a.return(void 0),e=Promise.resolve(t.value);e.then(p,p),je(e),r(new xe)}catch(t){r(t)}})),c}}function je(t){"function"==typeof t.cancel&&t.cancel()}function Se(t,e){if(null==t)return!1;if(void 0!==e){if(!1===Er(t))return!1;if(!t.$mobx.values[e])return!1;var r=jr(t,e);return It(r)}return It(t)}function Pe(t){return arguments.length>1?s(!1):Se(t)}function Ae(t,e){return"string"!=typeof e?s(!1):Se(t,e)}function ke(t,e){if(null==t)return!1;if(void 0!==e){if(Er(t)){var r=t.$mobx;return r.values&&!!r.values[e]}return!1}return Er(t)||!!t.$mobx||D(t)||Jt(t)||It(t)}function De(t){return 1!==arguments.length&&s(!1),ke(t)}function Te(t){return Er(t)?t.$mobx.getKeys():yr(t)||vr(t)?O(t.keys()):sr(t)?t.map((function(t,e){return e})):s(!1)}function Me(t){return Er(t)?Te(t).map((function(e){return t[e]})):yr(t)?Te(t).map((function(e){return t.get(e)})):vr(t)?O(t.values()):sr(t)?t.slice():s(!1)}function Ne(t){return Er(t)?Te(t).map((function(e){return[e,t[e]]})):yr(t)?Te(t).map((function(e){return[e,t.get(e)]})):vr(t)?O(t.entries()):sr(t)?t.map((function(t,e){return[e,t]})):s(!1)}function Ce(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return Sr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return Sr(t).observe(e,r)}(t,e,r)}xe.prototype=Object.create(Error.prototype);var Re={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Ie(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Le(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=Re),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&&!De(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(Ct(e))return t(e.get(),r,n);if(De(e)&&Te(e),!0===r.detectCycles&&null!==e&&n.has(e))return n.get(e);if(sr(e)||Array.isArray(e)){var o=Ie(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(vr(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===r.exportMapsAsObjects){var c=Ie(n,e,new Set,r);return e.forEach((function(e){c.add(t(e,r,n))})),c}var s=Ie(n,e,[],r);return e.forEach((function(e){s.push(t(e,r,n))})),s}if(yr(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===r.exportMapsAsObjects){var l=Ie(n,e,new Map,r);return e.forEach((function(e,o){l.set(o,t(e,r,n))})),l}var f=Ie(n,e,{},r);return e.forEach((function(e,o){f[o]=t(e,r,n)})),f}var p=Ie(n,e,{},r);for(var y in e)p[y]=t(e[y],r,n);return p}(t,e,r)}function ze(t){switch(t.length){case 0:return Ht.trackingDerivation;case 1:return jr(t[0]);case 2:return jr(t[0],t[1])}}function Be(t,e){void 0===e&&(e=void 0),Gt();try{return t.apply(e)}finally{Yt()}}function He(t,e,r){return 1===arguments.length||e&&"object"==typeof e?Xe(t,e):Ue(t,e,r||{})}function Ue(t,e,r){var n;"number"==typeof r.timeout&&(n=setTimeout((function(){if(!i.$mobx.isDisposed){i();var t=new Error("WHEN_TIMEOUT");if(!r.onError)throw t;r.onError(t)}}),r.timeout)),r.name=r.name||"When@"+c();var o=St(r.name+"-effect",e),i=ye((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function Xe(t,e){var r;var n=new Promise((function(n,o){var i=Ue(t,n,I(I({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Fe(t){return void 0!==t.interceptors&&t.interceptors.length>0}function Ge(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),f((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ye(t,e){var r=gt();try{var n=t.interceptors;if(n)for(var o=0,i=n.length;o<i&&(l(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{mt(r)}}function Ve(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function We(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),f((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function $e(t,e){var r=gt(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);mt(r)}}var Ke,Ze,qe,Je,Qe=(Ke=!1,Ze={},Object.defineProperty(Ze,"0",{set:function(){Ke=!0}}),Object.create(Ze)[0]=1,!1===Ke),tr=0,er=function(){};qe=er,Je=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(qe.prototype,Je):void 0!==qe.prototype.__proto__?qe.prototype.__proto__=Je:qe.prototype=Je,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach((function(t){Object.defineProperty(er.prototype,t,{configurable:!0,writable:!0,value:Array.prototype[t]})}));var rr=function(){function t(t,e,r,n){this.array=r,this.owned=n,this.values=[],this.lastKnownLength=0,this.atom=new k(t||"ObservableArray@"+c()),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 Ge(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),We(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. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>tr&&ur(t+e+1)},t.prototype.spliceWithArray=function(t,e,r){var n=this;dt(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),Fe(this)){var a=Ye(this,{object:this.array,type:"splice",index:t,removedCount:e,added:r});if(!a)return o;e=a.removedCount,r=a.added}var u=(r=0===r.length?r:r.map((function(t){return n.enhancer(t,void 0)}))).length-e;this.updateArrayLength(i,u);var c=this.spliceItemsIntoValues(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice(t,r,c),this.dehanceValues(c)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,z([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&&te(),o=Ve(this),i=o||n?{object:this.array,type:"update",index:t,newValue:e,oldValue:r}:null;n&&re(I(I({},i),{name:this.atom.name})),this.atom.reportChanged(),o&&$e(this,i),n&&oe()},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&te(),o=Ve(this),i=o||n?{object:this.array,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;n&&re(I(I({},i),{name:this.atom.name})),this.atom.reportChanged(),o&&$e(this,i),n&&oe()},t}(),nr=function(t){function e(e,r,n,o){void 0===n&&(n="ObservableArray@"+c()),void 0===o&&(o=!1);var i=t.call(this)||this,a=new rr(n,r,i,o);if(v(i,"$mobx",a),e&&e.length){var u=Tt(!0);i.spliceWithArray(0,0,e),Mt(u)}return Qe&&Object.defineProperty(a.array,"0",or),i}return R(e,t),e.prototype.intercept=function(t){return this.$mobx.intercept(t)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),t.map((function(t){return sr(t)?t.peek():t})))},e.prototype.replace=function(t){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,t)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},e.prototype.find=function(t,e,r){void 0===r&&(r=0);var n=this.findIndex.apply(this,arguments);return-1===n?void 0:this.get(n)},e.prototype.findIndex=function(t,e,r){void 0===r&&(r=0);for(var n=this.peek(),o=n.length,i=r;i<o;i++)if(t.call(e,n[i],i,this))return i;return-1},e.prototype.splice=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,e)}return this.$mobx.spliceWithArray(t,e,r)},e.prototype.spliceWithArray=function(t,e,r){return this.$mobx.spliceWithArray(t,e,r)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this.$mobx;return r.spliceWithArray(r.values.length,0,t),r.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this.$mobx;return r.spliceWithArray(0,0,t),r.values.length},e.prototype.reverse=function(){var t=this.slice();return t.reverse.apply(t,arguments)},e.prototype.sort=function(t){var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.dehanceValues(this.$mobx.values).indexOf(t);return e>-1&&(this.splice(e,1),!0)},e.prototype.move=function(t,e){function r(t){if(t<0)throw new Error("[mobx.array] Index out of bounds: "+t+" is negative");var e=this.$mobx.values.length;if(t>=e)throw new Error("[mobx.array] Index out of bounds: "+t+" is not smaller than "+e)}if(r.call(this,t),r.call(this,e),t!==e){var n,o=this.$mobx.values;n=t<e?z(o.slice(0,t),o.slice(t+1,e+1),[o[t]],o.slice(e+1)):z(o.slice(0,e),[o[t]],o.slice(e,t),o.slice(t+1)),this.replace(n)}},e.prototype.get=function(t){var e=this.$mobx;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")}},e.prototype.set=function(t,e){var r=this.$mobx,n=r.values;if(t<n.length){dt(r.atom);var o=n[t];if(Fe(r)){var i=Ye(r,{type:"update",object:this,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])}},e}(er);j(nr.prototype,(function(){this.$mobx.atom.reportObserved();var t=this,e=0;return S({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})})),Object.defineProperty(nr.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(t){this.$mobx.setArrayLength(t)}}),h(nr.prototype,P(),"Array"),["indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){var e=Array.prototype[t];l("function"==typeof e,"Base function not defined on Array prototype: '"+t+"'"),h(nr.prototype,t,(function(){return e.apply(this.peek(),arguments)}))})),["every","filter","forEach","map","some"].forEach((function(t){l("function"==typeof Array.prototype[t],"Base function not defined on Array prototype: '"+t+"'"),h(nr.prototype,t,(function(e,r){var n=this,o=this.$mobx;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){h(nr.prototype,t,(function(){var e=this,r=this.$mobx;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)}))})),function(t,e){for(var r=0;r<e.length;r++)h(t,e[r],t[e[r]])}(nr.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var or=ir(0);function ir(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(e){this.set(t,e)}}}function ar(t){Object.defineProperty(nr.prototype,""+t,ir(t))}function ur(t){for(var e=tr;e<t;e++)ar(e);tr=t}ur(1e3);var cr=b("ObservableArrayAdministration",rr);function sr(t){return y(t)&&cr(t.$mobx)}var lr={},fr=function(){function t(t,e,r){if(void 0===e&&(e=Y),void 0===r&&(r="ObservableMap@"+c()),this.enhancer=e,this.name=r,this.$mobx=lr,this._keysAtom=T(this.name+".keys()"),"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(!Ht.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new Nt(this._has(t),V,this.name+"."+pr(t)+"?",!1);this._hasMap.set(t,n),be(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(Fe(this)){var n=Ye(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((dt(this._keysAtom),Fe(this))&&!(o=Ye(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=te(),n=Ve(this),o=n||r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return r&&re(I(I({},o),{name:this.name,key:t})),Be((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),n&&$e(this,o),r&&oe(),!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))!==Ht.UNCHANGED){var n=te(),o=Ve(this),i=o||n?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;n&&re(I(I({},i),{name:this.name,key:t})),r.setNewValue(e),o&&$e(this,i),n&&oe()}},t.prototype._addValue=function(t,e){var r=this;dt(this._keysAtom),Be((function(){var n=new Nt(e,r.enhancer,r.name+"."+pr(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=te(),o=Ve(this),i=o||n?{type:"add",object:this,name:t,newValue:e}:null;n&&re(I(I({},i),{name:this.name,key:t})),o&&$e(this,i),n&&oe()},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 S({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 S({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.forEach=function(t,e){var r=this;this._keysAtom.reportObserved(),this._data.forEach((function(n,o){return t.call(e,r.get(o),o,r)}))},t.prototype.merge=function(t){var e=this;return yr(t)&&(t=t.toJS()),Be((function(){var r=Tt(!0);try{d(t)?Object.keys(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=L(t,2),n=r[0],o=r[1];return e.set(n,o)})):g(t)?t.constructor!==Map?s("Cannot initialize from classes that inherit from Map: "+t.constructor.name):t.forEach((function(t,r){return e.set(r,t)})):null!=t&&s("Cannot initialize map from "+t)}finally{Mt(r)}})),this},t.prototype.clear=function(){var t=this;Be((function(){bt((function(){t._data.forEach((function(e,r){return t.delete(r)}))}))}))},t.prototype.replace=function(t){var e=this;return Be((function(){var r=function(t){if(g(t)||yr(t))return t;if(Array.isArray(t))return new Map(t);if(d(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return s("Cannot convert to map from '"+t+"'")}(t),n=new Map,o=!1;if(x(e._data.keys(),(function(t){if(!r.has(t))if(e.delete(t))o=!0;else{var i=e._data.get(t);n.set(t,i)}})),x(r.entries(),(function(t){var r=L(t,2),i=r[0],a=r[1],u=e._data.has(i);if(e.set(i,a),e._data.has(i)){var c=e._data.get(i);n.set(i,c),u||(o=!0)}})),!o)if(e._data.size!==n.size)e._keysAtom.reportChanged();else for(var i=e._data.keys(),a=n.keys(),u=i.next(),c=a.next();!u.done;){if(u.value!==c.value){e._keysAtom.reportChanged();break}u=i.next(),c=a.next()}e._data=n})),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=this,e={};return this.forEach((function(r,n){return e["symbol"==typeof n?n:pr(n)]=t.get(n)})),e},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+"[{ "+O(this.keys()).map((function(e){return pr(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t}();function pr(t){return t&&t.toString?t.toString():new String(t).toString()}j(fr.prototype,(function(){return this.entries()})),v(fr.prototype,P(),"Map");var yr=b("ObservableMap",fr),dr={},hr=function(){function t(t,e,r){if(void 0===e&&(e=Y),void 0===r&&(r="ObservableSet@"+c()),this.name=r,this.$mobx=dr,this._data=new Set,this._atom=T(this.name),"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;Be((function(){bt((function(){t._data.forEach((function(e){t.delete(e)}))}))}))},t.prototype.forEach=function(t,e){var r=this;this._atom.reportObserved(),this._data.forEach((function(n){t.call(e,n,n,r)}))},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((dt(this._atom),Fe(this))&&!(o=Ye(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Be((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=te(),n=Ve(this),o=n||r?{type:"add",object:this,newValue:t}:null;0,n&&$e(this,o)}return this},t.prototype.delete=function(t){var e=this;if(Fe(this)&&!(o=Ye(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=te(),n=Ve(this),o=n||r?{type:"delete",object:this,oldValue:t}:null;return Be((function(){e._atom.reportChanged(),e._data.delete(t)})),n&&$e(this,o),!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=O(this.keys()),r=O(this.values());return S({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,e=this,r=0;return void 0!==this._data.values?t=O(this._data.values()):(t=[],this._data.forEach((function(e){return t.push(e)}))),S({next:function(){return r<t.length?{value:e.dehanceValue(t[r++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return vr(t)&&(t=t.toJS()),Be((function(){var r=Tt(!0);try{Array.isArray(t)||m(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&s("Cannot initialize set from "+t)}finally{Mt(r)}})),this},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+O(this.keys()).join(", ")+" ]"},t}();j(hr.prototype,(function(){return this.values()})),v(hr.prototype,P(),"Set");var vr=b("ObservableSet",hr),br=function(){function t(t,e,r){this.target=t,this.name=e,this.defaultEnhancer=r,this.values={}}return t.prototype.read=function(t,e){if(this.target===t||(this.illegalAccess(t,e),this.values[e]))return this.values[e].get()},t.prototype.write=function(t,e,r){var n=this.target;n!==t&&this.illegalAccess(t,e);var o=this.values[e];if(o instanceof Rt)o.set(r);else{if(Fe(this)){if(!(u=Ye(this,{type:"update",object:n,name:e,newValue:r})))return;r=u.newValue}if((r=o.prepareNewValue(r))!==Ht.UNCHANGED){var i=Ve(this),a=te(),u=i||a?{type:"update",object:n,oldValue:o.value,name:e,newValue:r}:null;a&&re(I(I({},u),{name:this.name,key:e})),o.setNewValue(r),i&&$e(this,u),a&&oe()}}},t.prototype.remove=function(t){if(this.values[t]){var e=this.target;if(Fe(this))if(!(i=Ye(this,{object:e,name:t,type:"remove"})))return;try{Gt();var r=Ve(this),n=te(),o=this.values[t].get();this.keys&&this.keys.remove(t),delete this.values[t],delete this.target[t];var i=r||n?{type:"remove",object:e,oldValue:o,name:t}:null;n&&re(I(I({},i),{name:this.name,key:t})),r&&$e(this,i),n&&oe()}finally{Yt()}}},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 We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.getKeys=function(){var t=this;return void 0===this.keys&&(this.keys=new nr(Object.keys(this.values).filter((function(e){return t.values[e]instanceof Nt})),V,"keys("+this.name+")",!0)),this.keys.slice()},t}();function gr(t,e,r){void 0===e&&(e=""),void 0===r&&(r=Y);var n=t.$mobx;return n||(d(t)||(e=(t.constructor.name||"ObservableObject")+"@"+c()),e||(e="ObservableObject@"+c()),v(t,"$mobx",n=new br(t,e,r)),n)}function mr(t,e,r,n){var o=gr(t);if(Fe(o)){var i=Ye(o,{object:t,name:e,type:"add",newValue:r});if(!i)return;r=i.newValue}r=(o.values[e]=new Nt(r,n,o.name+"."+e,!1)).value,Object.defineProperty(t,e,function(t){return Or[t]||(Or[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,t)},set:function(e){this.$mobx.write(this,t,e)}})}(e)),o.keys&&o.keys.push(e),function(t,e,r,n){var o=Ve(t),i=te(),a=o||i?{type:"add",object:e,name:r,newValue:n}:null;i&&re(I(I({},a),{name:t.name,key:r}));o&&$e(t,a);i&&oe()}(o,t,e,r)}var Or=Object.create(null),wr=Object.create(null);function _r(t){var e=t.$mobx;return e||(X(t),t.$mobx)}var xr=b("ObservableObjectAdministration",br);function Er(t){return!!y(t)&&(X(t),xr(t.$mobx))}function jr(t,e){if("object"==typeof t&&null!==t){if(sr(t))return void 0!==e&&s(!1),t.$mobx.atom;if(vr(t))return t.$mobx;if(yr(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||s(!1),n)}var n;if(X(t),e&&!t.$mobx&&t[e],Er(t))return e?((n=t.$mobx.values[e])||s(!1),n):s(!1);if(D(t)||It(t)||Jt(t))return t}else if("function"==typeof t&&Jt(t.$mobx))return t.$mobx;return s(!1)}function Sr(t,e){return t||s("Expecting some object"),void 0!==e?Sr(jr(t,e)):D(t)||It(t)||Jt(t)||yr(t)||vr(t)?t:(X(t),t.$mobx?t.$mobx:void s(!1))}function Pr(t,e){return(void 0!==e?jr(t,e):Er(t)||yr(t)||vr(t)?Sr(t):jr(t)).name}var Ar=Object.prototype.toString;function kr(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;e=Dr(e),r=Dr(r);var u=Ar.call(e);if(u!==Ar.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)}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],!Tr(r,y)||!t(e[y],r[y],n-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,r)}function Dr(t){return sr(t)?t.peek():g(t)||yr(t)||m(t)||vr(t)?O(t.entries()):t}function Tr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Mr="$mobx";"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:ie,extras:{getDebugName:Pr},$mobx:Mr})}).call(this,r(86),r(104))},function(t,e,r){"use strict";var n=r(34),o=r(66),i=r(56),a=r(51),u=r(91),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(15),o=r(23),i=r(45),a=r(68),u=r(28),c=r(89),s=r(16),l=r(27),f=r(80),p=r(24),y=r(53),d=r(25),h=r(31),v=r(34),b=r(72),g=r(33),m=r(57),O=r(46),w=r(54),_=r(58),x=r(117),E=r(92),j=r(47),S=r(29),P=r(75),A=r(40),k=r(43),D=r(67),T=r(74),M=r(55),N=r(69),C=r(21),R=r(128),I=r(129),L=r(77),z=r(51),B=r(60).forEach,H=T("hidden"),U=C("toPrimitive"),X=z.set,F=z.getterFor("Symbol"),G=Object.prototype,Y=o.Symbol,V=i("JSON","stringify"),W=j.f,$=S.f,K=x.f,Z=P.f,q=D("symbols"),J=D("op-symbols"),Q=D("string-to-symbol-registry"),tt=D("symbol-to-string-registry"),et=D("wks"),rt=o.QObject,nt=!rt||!rt.prototype||!rt.prototype.findChild,ot=u&&s((function(){return 7!=O($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=W(G,e);n&&delete G[e],$(t,e,r),n&&t!==G&&$(G,e,n)}:$,it=function(t,e){var r=q[t]=O(Y.prototype);return X(r,{type:"Symbol",tag:t,description:e}),u||(r.description=e),r},at=function(t,e,r){t===G&&at(J,e,r),d(t);var n=b(e);return d(r),l(q,n)?(r.enumerable?(l(t,H)&&t[H][n]&&(t[H][n]=!1),r=O(r,{enumerable:m(0,!1)})):(l(t,H)||$(t,H,m(1,{})),t[H][n]=!0),ot(t,n,r)):$(t,n,r)},ut=function(t,e){d(t);var r=v(e),n=w(r).concat(ft(r));return B(n,(function(e){u&&!ct.call(r,e)||at(t,e,r[e])})),t},ct=function(t){var e=b(t),r=Z.call(this,e);return!(this===G&&l(q,e)&&!l(J,e))&&(!(r||!l(this,e)||!l(q,e)||l(this,H)&&this[H][e])||r)},st=function(t,e){var r=v(t),n=b(e);if(r!==G||!l(q,n)||l(J,n)){var o=W(r,n);return!o||!l(q,n)||l(r,H)&&r[H][n]||(o.enumerable=!0),o}},lt=function(t){var e=K(v(t)),r=[];return B(e,(function(t){l(q,t)||l(M,t)||r.push(t)})),r},ft=function(t){var e=t===G,r=K(e?J:v(t)),n=[];return B(r,(function(t){!l(q,t)||e&&!l(G,t)||n.push(q[t])})),n};(c||(k((Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=N(t),r=function(t){this===G&&r.call(J,t),l(this,H)&&l(this[H],e)&&(this[H][e]=!1),ot(this,e,m(1,t))};return u&&nt&&ot(G,e,{configurable:!0,set:r}),it(e,t)}).prototype,"toString",(function(){return F(this).tag})),k(Y,"withoutSetter",(function(t){return it(N(t),t)})),P.f=ct,S.f=at,j.f=st,_.f=x.f=lt,E.f=ft,R.f=function(t){return it(C(t),t)},u&&($(Y.prototype,"description",{configurable:!0,get:function(){return F(this).description}}),a||k(G,"propertyIsEnumerable",ct,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:Y}),B(w(et),(function(t){I(t)})),n({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=g(t);if(l(Q,e))return Q[e];var r=Y(e);return Q[e]=r,tt[r]=e,r},keyFor:function(t){if(!y(t))throw TypeError(t+" is not a symbol");if(l(tt,t))return tt[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?O(t):ut(O(t),e)},defineProperty:at,defineProperties:ut,getOwnPropertyDescriptor:st}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:lt,getOwnPropertySymbols:ft}),n({target:"Object",stat:!0,forced:s((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(h(t))}}),V)&&n({target:"JSON",stat:!0,forced:!c||s((function(){var t=Y();return"[null]"!=V([t])||"{}"!=V({a:t})||"{}"!=V(Object(t))}))},{stringify:function(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(p(e)||void 0!==t)&&!y(t))return f(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!y(e))return e}),o[1]=e,V.apply(null,o)}});Y.prototype[U]||A(Y.prototype,U,Y.prototype.valueOf),L(Y,"Symbol"),M[H]=!0},function(t,e,r){var n=r(96),o=r(43),i=r(153);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){var n=r(23),o=r(127),i=r(1),a=r(40),u=r(21),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 d in i)if(y[d]!==i[d])try{a(y,d,i[d])}catch(t){y[d]=i[d]}}}},function(t,e,r){"use strict";var n=r(126).charAt,o=r(33),i=r(51),a=r(91),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(15),o=r(28),i=r(23),a=r(27),u=r(24),c=r(29).f,s=r(112),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var f={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new l(t):void 0===t?l():l(t);return""===t&&(f[e]=!0),e};s(p,l);var y=p.prototype=l.prototype;y.constructor=p;var d=y.toString,h="Symbol(test)"==String(l("test")),v=/^Symbol\((.*)\)[^)]+$/;c(y,"description",{configurable:!0,get:function(){var t=u(this)?this.valueOf():this,e=d.call(t);if(a(f,t))return"";var r=h?e.slice(7,-1):e.replace(v,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:p})}},function(t,e,r){r(129)("iterator")},function(t,e,r){var n=r(23),o=r(127),i=r(154),a=r(40);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){r(15)({target:"Object",stat:!0},{setPrototypeOf:r(94)})},function(t,e,r){var n=r(15),o=r(16),i=r(31),a=r(76),u=r(115);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(15),o=r(45),i=r(59),a=r(25),u=r(24),c=r(46),s=r(172),l=r(16),f=o("Reflect","construct"),p=l((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),y=!l((function(){f((function(){}))})),d=p||y;n({target:"Reflect",stat:!0,forced:d,sham:d},{construct:function(t,e){i(t),a(e);var r=arguments.length<3?t:i(arguments[2]);if(y&&!p)return f(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 n.push.apply(n,e),new(s.apply(t,n))}var o=r.prototype,l=c(u(o)?o:Object.prototype),d=Function.apply.call(t,l,e);return u(d)?d:l}})},function(t,e,r){var n=r(15),o=r(31),i=r(54);n({target:"Object",stat:!0,forced:r(16)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){var n=r(15),o=r(16),i=r(34),a=r(47).f,u=r(28),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";var n=r(15),o=r(24),i=r(80),a=r(73),u=r(32),c=r(34),s=r(62),l=r(21),f=r(61)("slice"),p=l("species"),y=[].slice,d=Math.max;n({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var r,n,l,f=c(this),h=u(f.length),v=a(t,h),b=a(void 0===e?h:e,h);if(i(f)&&("function"!=typeof(r=f.constructor)||r!==Array&&!i(r.prototype)?o(r)&&null===(r=r[p])&&(r=void 0):r=void 0,r===Array||void 0===r))return y.call(f,v,b);for(n=new(void 0===r?Array:r)(d(b-v,0)),l=0;v<b;v++,l++)v in f&&s(n,l,f[v]);return n.length=l,n}})},function(t,e,r){var n=r(23),o=r(47).f,i=r(40),a=r(43),u=r(88),c=r(112),s=r(93);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){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(28),o=r(29).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){var n=r(15),o=r(157);n({target:"Array",stat:!0,forced:!r(124)((function(t){Array.from(t)}))},{from:o})},function(t,e,r){"use strict";var n=r(15),o=r(60).filter;n({target:"Array",proto:!0,forced:!r(61)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(15),o=r(28),i=r(113),a=r(34),u=r(47),c=r(62);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(23),o=r(67),i=r(27),a=r(69),u=r(89),c=r(105),s=o("wks"),l=n.Symbol,f=c?l:l&&l.withoutSetter||a;t.exports=function(t){return i(s,t)&&(u||"string"==typeof s[t])||(u&&i(l,t)?s[t]=l[t]:s[t]=f("Symbol."+t)),s[t]}},function(t,e,r){"use strict";var n=r(85),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=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(86))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(24);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},,function(t,e,r){var n=r(31),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(n(t),e)}},function(t,e,r){var n=r(16);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var n=r(28),o=r(106),i=r(25),a=r(72),u=Object.defineProperty;e.f=n?u:function(t,e,r){if(i(t),e=a(e),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){"use strict";var n=r(15),o=r(16),i=r(80),a=r(24),u=r(31),c=r(32),s=r(62),l=r(97),f=r(61),p=r(21),y=r(70),d=p("isConcatSpreadable"),h=y>=51||!o((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),v=f("concat"),b=function(t){if(!a(t))return!1;var e=t[d];return void 0!==e?!!e:i(t)};n({target:"Array",proto:!0,forced:!h||!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){var n=r(38);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n=r(50),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(53);t.exports=function(t){if(n(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},function(t,e,r){var n=r(65),o=r(38);t.exports=function(t){return n(o(t))}},function(t,e,r){"use strict";var n=r(15),o=r(60).map;n({target:"Array",proto:!0,forced:!r(61)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(15),o=r(173);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,r){var n=r(15),o=r(24),i=r(25),a=r(177),u=r(47),c=r(76);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,s,l=arguments.length<3?e:arguments[2];return i(e)===l?e[r]:(n=u.f(e,r))?a(n)?n.value:void 0===n.get?void 0:n.get.call(l):o(s=c(e))?t(s,r,l):void 0}})},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(15),o=r(181),i=r(66);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e,r){var n=r(28),o=r(29),i=r(57);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(15),o=r(83);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){"use strict";(function(t){var n=r(85),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(99)(t))},function(t,e,r){var n=r(23),o=r(40),i=r(27),a=r(88),u=r(111),c=r(51),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){var n=r(15),o=r(180).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(23),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},function(t,e,r){var n,o=r(25),i=r(142),a=r(90),u=r(55),c=r(144),s=r(107),l=r(74),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(28),o=r(75),i=r(57),a=r(34),u=r(72),c=r(27),s=r(106),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=a(t),e=u(e),s)try{return l(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,r){"use strict";(function(t){var n=r(22),o=r(138),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(99)(t))},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},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,o,i,a=r(145),u=r(23),c=r(24),s=r(40),l=r(27),f=r(87),p=r(74),y=r(55),d=u.WeakMap;if(a||f.state){var h=f.state||(f.state=new d),v=h.get,b=h.has,g=h.set;n=function(t,e){if(b.call(h,t))throw new TypeError("Object already initialized");return e.facade=t,g.call(h,t,e),e},o=function(t){return v.call(h,t)||{}},i=function(t){return b.call(h,t)}}else{var m=p("state");y[m]=!0,n=function(t,e){if(l(t,m))throw new TypeError("Object already initialized");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,r){"use strict";var n=r(100),o=r(132),i=r(25),a=r(38),u=r(170),c=r(101),s=r(32),l=r(33),f=r(102),p=r(83),y=r(133),d=r(16),h=y.UNSUPPORTED_Y,v=[].push,b=Math.min;n("split",(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=l(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,f=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,h=new RegExp(t.source,y+"g");(u=p.call(h,n))&&!((c=h.lastIndex)>d&&(f.push(n.slice(d,u.index)),u.length>1&&u.index<n.length&&v.apply(f,u.slice(1)),s=u[0].length,d=c,f.length>=i));)h.lastIndex===u.index&&h.lastIndex++;return d===n.length?!s&&h.test("")||f.push(""):f.push(n.slice(d)),f.length>i?f.slice(0,i):f}:"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(l(o),e,r)},function(t,o){var a=i(this),p=l(t),y=r(n,a,p,o,n!==e);if(y.done)return y.value;var d=u(a,RegExp),v=a.unicode,g=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(h?"g":"y"),m=new d(h?"^(?:"+a.source+")":a,g),O=void 0===o?4294967295:o>>>0;if(0===O)return[];if(0===p.length)return null===f(m,p)?[p]:[];for(var w=0,_=0,x=[];_<p.length;){m.lastIndex=h?0:_;var E,j=f(m,h?p.slice(_):p);if(null===j||(E=b(s(m.lastIndex+(h?_:0)),p.length))===w)_=c(p,_,v);else{if(x.push(p.slice(w,_)),x.length===O)return x;for(var S=1;S<=j.length-1;S++)if(x.push(j[S]),x.length===O)return x;_=w=E}}return x.push(p.slice(w)),x}]}),!!d((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]})),h)},function(t,e,r){var n=r(45),o=r(105);t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return"function"==typeof e&&Object(t)instanceof e}},function(t,e,r){var n=r(109),o=r(90);t.exports=Object.keys||function(t){return n(t,o)}},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(109),o=r(90).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},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(79),o=r(65),i=r(31),a=r(32),u=r(97),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(d,h,v,b){for(var g,m,O=i(d),w=o(O),_=n(h,v,3),x=a(w.length),E=0,j=b||u,S=e?j(d,x):r||p?j(d,0):void 0;x>E;E++)if((y||E in w)&&(m=_(g=w[E],E,O),t))if(e)S[E]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return E;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),filterReject:s(7)}},function(t,e,r){var n=r(16),o=r(21),i=r(70),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(72),o=r(29),i=r(57);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(28),o=r(23),i=r(93),a=r(43),u=r(27),c=r(49),s=r(125),l=r(53),f=r(108),p=r(16),y=r(46),d=r(58).f,h=r(47).f,v=r(29).f,b=r(134).trim,g=o.Number,m=g.prototype,O="Number"==c(y(m)),w=function(t){if(l(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,o,i,a,u,c,s=f(t,"number");if("string"==typeof s&&s.length>2)if(43===(e=(s=b(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",!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var _,x=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof x&&(O?p((function(){m.valueOf.call(r)})):"Number"!=c(r))?s(new g(w(e)),r,x):w(e)},E=n?d(g):"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(","),j=0;E.length>j;j++)u(g,_=E[j])&&!u(x,_)&&v(x,_,h(g,_));x.prototype=m,m.constructor=x,a(o,"Number",x)}},function(t,e,r){r(15)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(16),o=r(49),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,r){var n=r(21),o=r(46),i=r(29),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(68),o=r(87);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.2",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},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,o,i=r(23),a=r(71),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,l=s&&s.v8;l?o=(n=l.split("."))[0]<4?1:n[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=r(45);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(108),o=r(53);t.exports=function(t){var e=n(t,"string");return o(e)?e:String(e)}},function(t,e,r){var n=r(50),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,r){var n=r(67),o=r(69),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(27),o=r(31),i=r(74),a=r(115),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(29).f,o=r(27),i=r(21)("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";var n=r(148),o=r(150);t.exports=n("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},function(t,e,r){var n=r(59);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){var n=r(49);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){"use strict";var n=r(15),o=r(73),i=r(50),a=r(32),u=r(31),c=r(97),s=r(62),l=r(61)("splice"),f=Math.max,p=Math.min;n({target:"Array",proto:!0,forced:!l},{splice:function(t,e){var r,n,l,y,d,h,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=p(f(i(e),0),b-g)),b+r-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=c(v,n),y=0;y<n;y++)(d=g+y)in v&&s(l,y,v[d]);if(l.length=n,r<n){for(y=g;y<b-n;y++)h=y+r,(d=y+n)in v?v[h]=v[d]:delete v[h];for(y=b;y>b-n+r;y--)delete v[y-1]}else if(r>n)for(y=b-n;y>g;y--)h=y+r-1,(d=y+n-1)in v?v[h]=v[d]:delete v[h];for(y=0;y<r;y++)v[y+g]=arguments[y+2];return v.length=b-n+r,l}})},function(t,e,r){"use strict";var n=r(15),o=r(65),i=r(34),a=r(98),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";var n,o,i=r(33),a=r(167),u=r(133),c=r(67),s=r(46),l=r(51).get,f=r(168),p=r(169),y=RegExp.prototype.exec,d=c("native-string-replace",String.prototype.replace),h=y,v=(n=/a/,o=/b*/g,y.call(n,"a"),y.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),b=u.UNSUPPORTED_Y||u.BROKEN_CARET,g=void 0!==/()??/.exec("")[1];(v||g||b||f||p)&&(h=function(t){var e,r,n,o,u,c,f,p=this,m=l(p),O=i(t),w=m.raw;if(w)return w.lastIndex=p.lastIndex,e=h.call(w,O),p.lastIndex=w.lastIndex,e;var _=m.groups,x=b&&p.sticky,E=a.call(p),j=p.source,S=0,P=O;if(x&&(-1===(E=E.replace("y","")).indexOf("g")&&(E+="g"),P=O.slice(p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==O.charAt(p.lastIndex-1))&&(j="(?: "+j+")",P=" "+P,S++),r=new RegExp("^(?:"+j+")",E)),g&&(r=new RegExp("^"+j+"$(?!\\s)",E)),v&&(n=p.lastIndex),o=y.call(x?r:p,P),x?o?(o.input=o.input.slice(S),o[0]=o[0].slice(S),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:v&&o&&(p.lastIndex=p.global?o.index+o[0].length:n),g&&o&&o.length>1&&d.call(o[0],r,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&_)for(o.groups=c=s(null),u=0;u<_.length;u++)c[(f=_[u])[0]]=o[f[1]];return o}),t.exports=h},function(t,e,r){"use strict";var n=r(15),o=r(174);n({target:"String",proto:!0,forced:r(175)("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(86))},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(23),o=r(88),i=n["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,r){var n=r(23);t.exports=function(t,e){try{Object.defineProperty(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},function(t,e,r){var n=r(70),o=r(16);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){"use strict";var n=r(15),o=r(146),i=r(76),a=r(94),u=r(77),c=r(40),s=r(43),l=r(21),f=r(68),p=r(56),y=r(114),d=y.IteratorPrototype,h=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,w,_,x=function(t){if(t===y&&A)return A;if(!h&&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)}},E=e+" Iterator",j=!1,S=t.prototype,P=S[v]||S["@@iterator"]||y&&S[y],A=!h&&P||x(y),k="Array"==e&&S.entries||P;if(k&&(O=i(k.call(new t)),d!==Object.prototype&&O.next&&(f||i(O)===d||(a?a(O,d):"function"!=typeof O[v]&&c(O,v,b)),u(O,E,!0,!0),f&&(p[E]=b))),"values"==y&&P&&"values"!==P.name&&(j=!0,A=function(){return P.call(this)}),f&&!m||S[v]===A||c(S,v,A),p[e]=A,y)if(w={values:x("values"),keys:g?A:x("keys"),entries:x("entries")},m)for(_ in w)(h||j||!(_ in S))&&s(S,_,w[_]);else n({target:e,proto:!0,forced:h||j},w);return w}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(16),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,r){var n=r(25),o=r(147);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=r(121),o=r(56),i=r(21)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){var n={};n[r(21)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(155);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(16);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},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(41);var n=r(43),o=r(83),i=r(16),a=r(21),u=r(40),c=a("species"),s=RegExp.prototype;t.exports=function(t,e,r,l){var f=a(t),p=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),y=p&&!i((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!p||!y||r){var d=/./[f],h=e(f,""[t],(function(t,e,r,n,i){var a=e.exec;return a===o||a===s.exec?p&&!i?{done:!0,value:d.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));n(String.prototype,t,h[0]),n(s,f,h[1])}l&&u(s[f],"sham",!0)}},function(t,e,r){"use strict";var n=r(126).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(49),o=r(83);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){r(15)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},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(89);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(28),o=r(16),i=r(107);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(23),o=r(24),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(24),o=r(53),i=r(143),a=r(21)("toPrimitive");t.exports=function(t,e){if(!n(t)||o(t))return t;var r,u=t[a];if(void 0!==u){if(void 0===e&&(e="default"),r=u.call(t,e),!n(r)||o(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),i(t,e)}},function(t,e,r){var n=r(27),o=r(34),i=r(110).indexOf,a=r(55);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(34),o=r(32),i=r(73),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,r){var n=r(87),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(27),o=r(113),i=r(47),a=r(29);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(45),o=r(58),i=r(92),a=r(25);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){"use strict";var n,o,i,a=r(16),u=r(76),c=r(40),s=r(27),l=r(21),f=r(68),p=l("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(n=o):y=!0);var d=null==n||a((function(){var t={};return n[p].call(t)!==t}));d&&(n={}),f&&!d||s(n,p)||c(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},function(t,e,r){var n=r(16);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(15),o=r(55),i=r(24),a=r(27),u=r(29).f,c=r(58),s=r(117),l=r(69),f=r(149),p=!1,y=l("meta"),d=0,h=Object.isExtensible||function(){return!0},v=function(t){u(t,y,{value:{objectID:"O"+d++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},p=!0;var t=c.f,e=[].splice,r={};r[y]=1,t(r).length&&(c.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===y){e.call(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,y)){if(!h(t))return"F";if(!e)return"E";v(t)}return t[y].objectID},getWeakData:function(t,e){if(!a(t,y)){if(!h(t))return!0;if(!e)return!1;v(t)}return t[y].weakData},onFreeze:function(t){return f&&p&&h(t)&&!a(t,y)&&v(t),t}};o[y]=!0},function(t,e,r){var n=r(34),o=r(58).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(n(t))}},function(t,e,r){var n=r(25),o=r(119),i=r(32),a=r(79),u=r(120),c=r(95),s=r(122),l=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var f,p,y,d,h,v,b,g=r&&r.that,m=!(!r||!r.AS_ENTRIES),O=!(!r||!r.IS_ITERATOR),w=!(!r||!r.INTERRUPTED),_=a(e,g,1+m+w),x=function(t){return f&&s(f,"normal",t),new l(!0,t)},E=function(t){return m?(n(t),w?_(t[0],t[1],x):_(t[0],t[1])):w?_(t,x):_(t)};if(O)f=t;else{if("function"!=typeof(p=c(t)))throw TypeError("Target is not iterable");if(o(p)){for(y=0,d=i(t.length);d>y;y++)if((h=E(t[y]))&&h instanceof l)return h;return new l(!1)}f=u(t,p)}for(v=f.next;!(b=v.call(f)).done;){try{h=E(b.value)}catch(t){s(f,"throw",t)}if("object"==typeof h&&h&&h instanceof l)return h}return new l(!1)}},function(t,e,r){var n=r(21),o=r(56),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(25),o=r(95);t.exports=function(t,e){var r=arguments.length<2?o(t):e;if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return n(r.call(t))}},function(t,e,r){var n=r(96),o=r(49),i=r(21)("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(25);t.exports=function(t,e,r){var o,i;n(t);try{if(void 0===(o=t.return)){if("throw"===e)throw r;return r}o=o.call(t)}catch(t){i=!0,o=t}if("throw"===e)throw r;if(i)throw o;return n(o),r}},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(21)("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(24),o=r(94);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(50),o=r(33),i=r(38),a=function(t){return function(e,r){var a,u,c=o(i(e)),s=n(r),l=c.length;return s<0||s>=l?t?"":void 0:(a=c.charCodeAt(s))<55296||a>56319||s+1===l||(u=c.charCodeAt(s+1))<56320||u>57343?t?c.charAt(s):a:t?c.slice(s,s+2):u-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!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(21);e.f=n},function(t,e,r){var n=r(156),o=r(27),i=r(128),a=r(29).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){"use strict";var n=r(15),o=r(110).includes,i=r(66);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(15),o=r(165),i=r(38),a=r(33);n({target:"String",proto:!0,forced:!r(166)("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(o(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(24),o=r(49),i=r(21)("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(16),o=r(23).RegExp;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(38),o=r(33),i="["+r(135)+"]",a=RegExp("^"+i+i+"*"),u=RegExp(i+i+"*$"),c=function(t){return function(e){var r=o(n(e));return 1&t&&(r=r.replace(a,"")),2&t&&(r=r.replace(u,"")),r}};t.exports={start:c(1),end:c(2),trim:c(3)}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,r){"use strict";var n=r(100),o=r(25),i=r(32),a=r(33),u=r(38),c=r(101),s=r(102);n("match",(function(t,e,r){return[function(e){var r=u(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](a(r))},function(t){var n=o(this),u=a(t),l=r(e,n,u);if(l.done)return l.value;if(!n.global)return s(n,u);var f=n.unicode;n.lastIndex=0;for(var p,y=[],d=0;null!==(p=s(n,u));){var h=a(p[0]);y[d]=h,""===h&&(n.lastIndex=c(u,i(n.lastIndex),f)),d++}return 0===d?null:y}]}))},function(t,e,r){"use strict";var n=r(100),o=r(16),i=r(25),a=r(50),u=r(32),c=r(33),s=r(38),l=r(101),f=r(171),p=r(102),y=r(21)("replace"),d=Math.max,h=Math.min,v="$0"==="a".replace(/./,"$0"),b=!!/./[y]&&""===/./[y]("a","$0");n("replace",(function(t,e,r){var n=b?"$":"$0";return[function(t,r){var n=s(this),o=null==t?void 0:t[y];return void 0!==o?o.call(t,n,r):e.call(c(n),t,r)},function(t,o){var s=i(this),y=c(t);if("string"==typeof o&&-1===o.indexOf(n)&&-1===o.indexOf("$<")){var v=r(e,s,y,o);if(v.done)return v.value}var b="function"==typeof o;b||(o=c(o));var g=s.global;if(g){var m=s.unicode;s.lastIndex=0}for(var O=[];;){var w=p(s,y);if(null===w)break;if(O.push(w),!g)break;""===c(w[0])&&(s.lastIndex=l(y,u(s.lastIndex),m))}for(var _,x="",E=0,j=0;j<O.length;j++){w=O[j];for(var S=c(w[0]),P=d(h(a(w.index),y.length),0),A=[],k=1;k<w.length;k++)A.push(void 0===(_=w[k])?_:String(_));var D=w.groups;if(b){var T=[S].concat(A,P,y);void 0!==D&&T.push(D);var M=c(o.apply(void 0,T))}else M=f(S,y,P,A,D,o);P>=E&&(x+=y.slice(E,P)+M,E=P+S.length)}return x+y.slice(E)}]}),!!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!v||b)},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){var n=r(22),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(99)(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.i)("observableFromPromise-resolve",(function(t){r.value=t,r.state="fulfilled"})),Object(n.i)("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.o)(r,{value:o,state:"pending"},{},{deep:!1}),r}!function(t){t.reject=Object(n.i)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state="rejected",r.value=e,r})),t.resolve=Object(n.i)("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.E)((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.A.ref],t.prototype,"current",void 0),l([n.i.bound],t.prototype,"next",null),l([n.i.bound],t.prototype,"complete",null),l([n.i.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.A.map({}),this.localComputedValues=n.A.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},i(Object(n.y)(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.u)(t,r)){var o=Object(n.f)(t,r).derivation;e.localComputedValues.set(r,Object(n.k)(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.u)(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:Object(n.i)((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.z)(this.localValues).forEach((function(e){var r=t.localValues.get(e),o=t.model[e];Object(n.w)(o)?o.replace(r):Object(n.x)(o)?(o.clear(),o.merge(r)):Object(n.t)(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.k],t.prototype,"isDirty",null),p([n.k],t.prototype,"changedValues",null),p([n.i.bound],t.prototype,"submit",null),p([n.i.bound],t.prototype,"reset",null),p([n.i.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.y)(t)||Object(n.w)(t)||Object(n.x)(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.B)(t,o)};r.set(t,c),Object(n.n)(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.J)(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.B)(l._base,(function(t){if("splice"===t.type)Object(n.H)((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.H)((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.A)([],{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.D)((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(104))},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(28),o=r(29),i=r(25),a=r(54);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(24);t.exports=function(t,e){var r,o;if("string"===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("string"!==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=r(45);t.exports=n("document","documentElement")},function(t,e,r){var n=r(23),o=r(111),i=n.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},function(t,e,r){"use strict";var n=r(114).IteratorPrototype,o=r(46),i=r(57),a=r(77),u=r(56),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(24);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){"use strict";var n=r(15),o=r(23),i=r(93),a=r(43),u=r(116),c=r(118),s=r(123),l=r(24),f=r(16),p=r(124),y=r(77),d=r(125);t.exports=function(t,e,r){var h=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),b=h?"set":"add",g=o[t],m=g&&g.prototype,O=g,w={},_=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,h,b),u.enable();else if(i(t,!0)){var x=new O,E=x[b](v?{}:-0,1)!=x,j=f((function(){x.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=d(new g,e,O);return null!=r&&c(r,n[b],{that:n,AS_ENTRIES:h}),n}))).prototype=m,m.constructor=O),(j||P)&&(_("delete"),_("has"),h&&_("get")),(P||E)&&_(b),v&&m.clear&&delete m.clear}return w[t]=O,n({global:!0,forced:O!=g},w),y(O,t),v||r.setStrong(O,t,h),O}},function(t,e,r){var n=r(16);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(29).f,o=r(46),i=r(151),a=r(79),u=r(123),c=r(118),s=r(91),l=r(152),f=r(28),p=r(116).fastKey,y=r(51),d=y.set,h=y.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){u(t,l,e),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=h(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=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(43);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(45),o=r(29),i=r(21),a=r(28),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(96),o=r(121);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(60).forEach,o=r(98)("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(24),o=r(80),i=r(21)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)?n(e)&&null===(e=e[i])&&(e=void 0):e=void 0),void 0===e?Array:e}},function(t,e,r){var n=r(23);t.exports=n},function(t,e,r){"use strict";var n=r(79),o=r(31),i=r(158),a=r(119),u=r(32),c=r(62),s=r(120),l=r(95);t.exports=function(t){var e,r,f,p,y,d,h=o(t),v="function"==typeof this?this:Array,b=arguments.length,g=b>1?arguments[1]:void 0,m=void 0!==g,O=l(h),w=0;if(m&&(g=n(g,b>2?arguments[2]:void 0,2)),null==O||v==Array&&a(O))for(r=new v(e=u(h.length));e>w;w++)d=m?g(h[w],w):h[w],c(r,w,d);else for(y=(p=s(h,O)).next,r=new v;!(f=y.call(p)).done;w++)d=m?i(p,g,[f.value,w],!0):f.value,c(r,w,d);return r.length=w,r}},function(t,e,r){var n=r(25),o=r(122);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(15),o=r(59),i=r(31),a=r(32),u=r(33),c=r(16),s=r(160),l=r(98),f=r(161),p=r(162),y=r(70),d=r(163),h=[],v=h.sort,b=c((function(){h.sort(void 0)})),g=c((function(){h.sort(null)})),m=l("sort"),O=!c((function(){if(y)return y<70;if(!(f&&f>3)){if(p)return!0;if(d)return d<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++)h.push({k:e+n,v:r})}for(h.sort((function(t,e){return e.v-t.v})),n=0;n<h.length;n++)e=h[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:b||!g||!m||!O},{sort:function(t){void 0!==t&&o(t);var e=i(this);if(O)return void 0===t?v.call(e):v.call(e,t);var r,n,c=[],l=a(e.length);for(n=0;n<l;n++)n in e&&c.push(e[n]);for(r=(c=s(c,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:u(e)>u(r)?1:-1}}(t))).length,n=0;n<r;)e[n]=c[n++];for(;n<l;)delete e[n++];return e}})},function(t,e){var r=Math.floor,n=function(t,e){var a=t.length,u=r(a/2);return a<8?o(t,e):i(n(t.slice(0,u),e),n(t.slice(u),e),e)},o=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},i=function(t,e,r){for(var n=t.length,o=e.length,i=0,a=0,u=[];i<n||a<o;)i<n&&a<o?u.push(r(t[i],e[a])<=0?t[i++]:e[a++]):u.push(i<n?t[i++]:e[a++]);return u};t.exports=n},function(t,e,r){var n=r(71).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(71);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(71).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){"use strict";var n=r(15),o=r(60).find,i=r(66),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(132);t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(21)("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){"use strict";var n=r(25);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(16),o=r(23).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(16),o=r(23).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){var n=r(25),o=r(59),i=r(21)("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(31),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,c,s,l){var f=r+t.length,p=c.length,y=u;return void 0!==s&&(s=n(s),y=a),i.call(l,y,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(f);case"<":a=s[i.slice(1,-1)];break;default:var u=+i;if(0===u)return n;if(u>p){var l=o(u/10);return 0===l?n:l<=p?void 0===c[l-1]?i.charAt(1):c[l-1]+i.charAt(1):n}a=c[u-1]}return void 0===a?"":a}))}},function(t,e,r){"use strict";var n=r(59),o=r(24),i=[].slice,a={},u=function(t,e,r){if(!(e in a)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";a[e]=Function("C,a","return new C("+n.join(",")+")")}return a[e](t,r)};t.exports=Function.bind||function(t){var e=n(this),r=i.call(arguments,1),a=function(){var n=r.concat(i.call(arguments));return this instanceof a?u(e,n.length,n):e.apply(t,n)};return o(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e,r){"use strict";var n=r(28),o=r(16),i=r(54),a=r(92),u=r(75),c=r(31),s=r(65),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,d=s(arguments[l++]),h=f?i(d).concat(f(d)):i(d),v=h.length,b=0;v>b;)y=h[b++],n&&!p.call(d,y)||(r[y]=d[y]);return r}:l},function(t,e,r){var n=r(38),o=r(33),i=/"/g;t.exports=function(t,e,r,a){var u=o(n(t)),c="<"+e;return""!==r&&(c+=" "+r+'="'+o(a).replace(i,""")+'"'),c+">"+u+"</"+e+">"}},function(t,e,r){var n=r(16);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(15),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(27);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){r(15)({target:"String",proto:!0},{repeat:r(179)})},function(t,e,r){"use strict";var n=r(50),o=r(33),i=r(38);t.exports=function(t){var e=o(i(this)),r="",a=n(t);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(r+=e);return r}},function(t,e,r){var n=r(28),o=r(54),i=r(34),a=r(75).f,u=function(t){return function(e){for(var r,u=i(e),c=o(u),s=c.length,l=0,f=[];s>l;)r=c[l++],n&&!a.call(u,r)||f.push(t?[r,u[r]]:u[r]);return f}};t.exports={entries:u(!0),values:u(!1)}},function(t,e,r){"use strict";var n=r(31),o=r(73),i=r(32);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(15),o=r(134).trim;n({target:"String",proto:!0,forced:r(183)("trim")},{trim:function(){return o(this)}})},function(t,e,r){var n=r(16),o=r(135);t.exports=function(t){return n((function(){return!!o[t]()||"
"!="
"[t]()||o[t].name!==t}))}},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return mw})),r.d(e,"LogicFlow",(function(){return gw})),r.d(e,"h",(function(){return b})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return Av})),r.d(e,"RectNode",(function(){return Hv})),r.d(e,"CircleNode",(function(){return Jv})),r.d(e,"PolygonNode",(function(){return db})),r.d(e,"DiamondNode",(function(){return Sb})),r.d(e,"EllipseNode",(function(){return Xb})),r.d(e,"TextNode",(function(){return Qb})),r.d(e,"HtmlNode",(function(){return sg})),r.d(e,"BaseEdge",(function(){return lm})),r.d(e,"LineEdge",(function(){return _m})),r.d(e,"PolylineEdge",(function(){return Hm})),r.d(e,"BezierEdge",(function(){return tO})),r.d(e,"Arrow",(function(){return Eg})),r.d(e,"BaseEdgeModel",(function(){return Qc})),r.d(e,"BezierEdgeModel",(function(){return Ly})),r.d(e,"LineEdgeModel",(function(){return ls})),r.d(e,"PolylineEdgeModel",(function(){return xs})),r.d(e,"BaseNodeModel",(function(){return Zy})),r.d(e,"CircleNodeModel",(function(){return cd})),r.d(e,"DiamondNodeModel",(function(){return Pd})),r.d(e,"EllipseNodeModel",(function(){return Bd})),r.d(e,"PolygonNodeModel",(function(){return Jd})),r.d(e,"RectNodeModel",(function(){return fh})),r.d(e,"TextNodeModel",(function(){return _h})),r.d(e,"HtmlNodeModel",(function(){return Ch})),r.d(e,"EditConfigModel",(function(){return da})),r.d(e,"GraphModel",(function(){return Xl})),r.d(e,"SnaplineModel",(function(){return Bh})),r.d(e,"Keyboard",(function(){return cw})),r.d(e,"get",(function(){return Wp})),r.d(e,"defaults",(function(){return Zp}));var n={};r.r(n),r.d(n,"createUuid",(function(){return $u})),r.d(n,"refreshGraphId",(function(){return Ku})),r.d(n,"createDrag",(function(){return yl})),r.d(n,"StepDrag",(function(){return Ml}));var o,i,a,u,c,s,l,f=r(0),p={},y=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var r in e)t[r]=e[r];return t}function v(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,r){var n,i,a,u={};for(a in e)"key"==a?n=e[a]:"ref"==a?i=e[a]:u[a]=e[a];if(arguments.length>2&&(u.children=arguments.length>3?o.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 g(t,u,n,i,null)}function g(t,e,r,n,o){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==o?++a:o};return null!=i.vnode&&i.vnode(u),u}function m(){return{current:null}}function O(t){return t.children}function w(t,e){this.props=t,this.context=e}function _(t,e){if(null==e)return t.__?_(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?_(t):null}function x(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 x(t)}}function E(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!j.__r++||s!==i.debounceRendering)&&((s=i.debounceRendering)||c)(j)}function j(){for(var t;j.__r=u.length;)t=u.sort((function(t,e){return t.__v.__b-e.__v.__b})),u=[],t.some((function(t){var e,r,n,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(r=[],(n=h({},o)).__v=o.__v+1,C(a,o,n,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?_(o):i,o.__h),R(r,o),o.__e!=i&&x(o)))}))}function S(t,e,r,n,o,i,a,u,c,s){var l,f,d,h,v,b,m,w=n&&n.__k||y,x=w.length;for(r.__k=[],l=0;l<e.length;l++)if(null!=(h=r.__k[l]=null==(h=e[l])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?g(null,h,null,null,h):Array.isArray(h)?g(O,{children:h},null,null,null):h.__b>0?g(h.type,h.props,h.key,null,h.__v):h)){if(h.__=r,h.__b=r.__b+1,null===(d=w[l])||d&&h.key==d.key&&h.type===d.type)w[l]=void 0;else for(f=0;f<x;f++){if((d=w[f])&&h.key==d.key&&h.type===d.type){w[f]=void 0;break}d=null}C(t,h,d=d||p,o,i,a,u,c,s),v=h.__e,(f=h.ref)&&d.ref!=f&&(m||(m=[]),d.ref&&m.push(d.ref,null,h),m.push(f,h.__c||v,h)),null!=v?(null==b&&(b=v),"function"==typeof h.type&&null!=h.__k&&h.__k===d.__k?h.__d=c=P(h,c,t):c=k(t,h,d,w,v,c),s||"option"!==r.type?"function"==typeof r.type&&(r.__d=c):t.value=""):c&&d.__e==c&&c.parentNode!=t&&(c=_(d))}for(r.__e=b,l=x;l--;)null!=w[l]&&("function"==typeof r.type&&null!=w[l].__e&&w[l].__e==r.__d&&(r.__d=_(n,l+1)),z(w[l],w[l]));if(m)for(l=0;l<m.length;l++)L(m[l],m[++l],m[++l])}function P(t,e,r){var n,o;for(n=0;n<t.__k.length;n++)(o=t.__k[n])&&(o.__=t,e="function"==typeof o.type?P(o,e,r):k(r,o,o,t.__k,o.__e,e));return e}function A(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){A(t,e)})):e.push(t)),e}function k(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 D(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||d.test(e)?r:r+"px"}function T(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||D(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||D(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?N:M,i):t.removeEventListener(e,i?N:M,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 M(t){this.l[t.type+!1](i.event?i.event(t):t)}function N(t){this.l[t.type+!0](i.event?i.event(t):t)}function C(t,e,r,n,o,a,u,c,s){var l,f,p,y,d,v,b,g,m,_,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=i.__b)&&l(e);try{t:if("function"==typeof E){if(g=e.props,m=(l=E.contextType)&&n[l.__c],_=l?m?m.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(g,_):(e.__c=f=new w(g,_),f.constructor=E,f.render=B),m&&m.sub(f),f.props=g,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=h({},f.__s)),h(f.__s,E.getDerivedStateFromProps(g,f.__s))),y=f.props,d=f.state,p)null==E.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==E.getDerivedStateFromProps&&g!==y&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,_),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,_)||e.__v===r.__v){f.props=g,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(g,f.__s,_),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(y,d,v)}))}f.context=_,f.props=g,f.state=f.__s,(l=i.__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=h(h({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(y,d)),x=null!=l&&l.type===O&&null==l.key?l.props.children:l,S(t,Array.isArray(x)?x:[x],e,r,n,o,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=I(r.__e,e,r,n,o,a,u,s);(l=i.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=c,e.__h=!!s,a[a.indexOf(c)]=null),i.__e(t,e,r)}}function R(t,e){i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function I(t,e,r,n,i,a,u,c){var s,l,f,y=r.props,d=e.props,h=e.type,b=0;if("svg"===h&&(i=!0),null!=a)for(;b<a.length;b++)if((s=a[b])&&(s===t||(h?s.localName==h:3==s.nodeType))){t=s,a[b]=null;break}if(null==t){if(null===h)return document.createTextNode(d);t=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),a=null,c=!1}if(null===h)y===d||c&&t.data===d||(t.data=d);else{if(a=a&&o.call(t.childNodes),l=(y=r.props||p).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!c){if(null!=a)for(y={},b=0;b<t.attributes.length;b++)y[t.attributes[b].name]=t.attributes[b].value;(f||l)&&(f&&(l&&f.__html==l.__html||f.__html===t.innerHTML)||(t.innerHTML=f&&f.__html||""))}if(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||T(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]||T(t,i,e[i],r[i],n)}(t,d,y,i,c),f)e.__k=[];else if(b=e.props.children,S(t,Array.isArray(b)?b:[b],e,r,n,i&&"foreignObject"!==h,a,u,a?a[0]:r.__k&&_(r,0),c),null!=a)for(b=a.length;b--;)null!=a[b]&&v(a[b]);c||("value"in d&&void 0!==(b=d.value)&&(b!==t.value||"progress"===h&&!b)&&T(t,"value",b,y.value,!1),"checked"in d&&void 0!==(b=d.checked)&&b!==t.checked&&T(t,"checked",b,y.checked,!1))}return t}function L(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,r)}}function z(t,e,r){var n,o;if(i.unmount&&i.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||L(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){i.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&z(n[o],e,"function"!=typeof t.type);r||null==t.__e||v(t.__e),t.__e=t.__d=void 0}function B(t,e,r){return this.constructor(t,r)}function H(t,e,r){var n,a,u;i.__&&i.__(t,e),a=(n="function"==typeof r)?null:r&&r.__k||e.__k,u=[],C(e,t=(!n&&r||e).__k=b(O,null,[t]),a||p,p,void 0!==e.ownerSVGElement,!n&&r?[r]:a?null:e.firstChild?o.call(e.childNodes):null,u,!n&&r?r:a?a.__e:e.firstChild,n),R(u,t)}function U(t,e){H(t,e,U)}function X(t,e,r){var n,i,a,u=h({},t.props);for(a in e)"key"==a?n=e[a]:"ref"==a?i=e[a]:u[a]=e[a];return arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):r),g(t.type,u,n||t.key,i||t.ref,null)}o=y.slice,i={__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}},a=0,w.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof t&&(t=t(h({},r),this.props)),t&&h(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),E(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},w.prototype.render=O,u=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j.__r=0,l=0;var F,G,Y,V=0,W=[],$=i.__b,K=i.__r,Z=i.diffed,q=i.__c,J=i.unmount;function Q(t,e){i.__h&&i.__h(G,t,V||e),V=0;var r=G.__H||(G.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function tt(t){return V=1,et(st,t)}function et(t,e,r){var n=Q(F++,2);return n.t=t,n.__c||(n.__=[r?r(e):st(void 0,e),function(t){var e=n.t(n.__[0],t);n.__[0]!==e&&(n.__=[e,n.__[1]],n.__c.setState({}))}],n.__c=G),n.__}function rt(t,e){var r=Q(F++,4);!i.__s&&ct(r.__H,e)&&(r.__=t,r.__H=e,G.__h.push(r))}function nt(t,e){var r=Q(F++,7);return ct(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function ot(){W.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(at),t.__H.__h.forEach(ut),t.__H.__h=[]}catch(e){t.__H.__h=[],i.__e(e,t.__v)}})),W=[]}i.__b=function(t){G=null,$&&$(t)},i.__r=function(t){K&&K(t),F=0;var e=(G=t.__c).__H;e&&(e.__h.forEach(at),e.__h.forEach(ut),e.__h=[])},i.diffed=function(t){Z&&Z(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==W.push(e)&&Y===i.requestAnimationFrame||((Y=i.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),it&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);it&&(e=requestAnimationFrame(r))})(ot)),G=void 0},i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(at),t.__h=t.__h.filter((function(t){return!t.__||ut(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],i.__e(r,t.__v)}})),q&&q(t,e)},i.unmount=function(t){J&&J(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(at)}catch(t){i.__e(t,e.__v)}};var it="function"==typeof requestAnimationFrame;function at(t){var e=G;"function"==typeof t.__c&&t.__c(),G=e}function ut(t){var e=G;t.__c=t.__(),G=e}function ct(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function st(t,e){return"function"==typeof e?e(t):e}function lt(t,e){for(var r in e)t[r]=e[r];return t}function ft(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 pt(t){this.props=t}(pt.prototype=new w).isPureReactComponent=!0,pt.prototype.shouldComponentUpdate=function(t,e){return ft(this.props,t)||ft(this.state,e)};var yt=i.__b;i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),yt&&yt(t)};var dt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ht(t){function e(e,r){var n=lt({},e);return delete n.ref,t(n,(r=e.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return e.$$typeof=dt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var vt=function(t,e){return null==t?null:A(A(t).map(e))},bt={map:vt,forEach:vt,count:function(t){return t?A(t).length:0},only:function(t){var e=A(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:A},gt=i.__e;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);gt(t,e,r)};var mt=i.unmount;function Ot(){this.__u=0,this.t=null,this.__b=null}function wt(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function _t(){this.u=null,this.o=null}i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),mt&&mt(t)},(Ot.prototype=new w).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=wt(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)},Ot.prototype.componentWillUnmount=function(){this.t=[]},Ot.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=lt({},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&&b(O,null,t.fallback);return o&&(o.__h=null),[b(O,null,e.__e?null:t.children),o]};var xt=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 Et(t){return this.getChildContext=function(){return t.context},t.children}function jt(t){var e=this,r=t.i;e.componentWillUnmount=function(){H(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)}}),H(b(Et,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(_t.prototype=new w).__e=function(t){var e=this,r=wt(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),xt(e,t,n)):o()};r?r(i):i()}},_t.prototype.render=function(t){this.u=null,this.o=new Map;var e=A(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},_t.prototype.componentDidUpdate=_t.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){xt(t,r,e)}))};var St="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Pt=/^(?: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]/,At=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(w.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var kt=i.event;function Dt(){}function Tt(){return this.cancelBubble}function Mt(){return this.defaultPrevented}i.event=function(t){return kt&&(t=kt(t)),t.persist=Dt,t.isPropagationStopped=Tt,t.isDefaultPrevented=Mt,t.nativeEvent=t};var Nt,Ct={configurable:!0,get:function(){return this.class}},Rt=i.vnode;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];"value"===o&&"defaultValue"in r&&null==i||("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)&&!At(r.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():Pt.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=A(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=A(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&&(Ct.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",Ct)),t.$$typeof=St,Rt&&Rt(t)};var It=i.__r;i.__r=function(t){It&&It(t),Nt=t.__c};function Lt(t){return!!t&&t.$$typeof===St}function zt(t){return t&&(t.base||1===t.nodeType&&t)||null}var Bt=function(t,e){return t(e)},Ht={useState:tt,useReducer:et,useEffect:function(t,e){var r=Q(F++,3);!i.__s&&ct(r.__H,e)&&(r.__=t,r.__H=e,G.__H.__h.push(r))},useLayoutEffect:rt,useRef:function(t){return V=5,nt((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){V=6,rt((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:nt,useCallback:function(t,e){return V=8,nt((function(){return t}),e)},useContext:function(t){var e=G.context[t.__c],r=Q(F++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(G)),e.props.value):t.__},useDebugValue:function(t,e){i.useDebugValue&&i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:bt,render:function(t,e,r){return null==e.__k&&(e.textContent=""),H(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return U(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(H(null,t),!0)},createPortal:function(t,e){return b(jt,{__v:t,i:e})},createElement:b,createContext:function(t,e){var r={__c:e="__cC"+l++,__: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(E)},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},createFactory:function(t){return b.bind(null,t)},cloneElement:function(t){return Lt(t)?X.apply(null,arguments):t},createRef:m,Fragment:O,isValidElement:Lt,findDOMNode:zt,Component:w,PureComponent:pt,memo:function(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:ft(this.props,t)}function n(e){return this.shouldComponentUpdate=r,b(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:ht,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:Bt,StrictMode:O,Suspense:Ot,SuspenseList:_t,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 b(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(t){return Nt.__n[t.__c].props.value}}}}};
|
|
16
|
-
/** @license mobx-react v5.4.4
|
|
17
|
-
* index.module.js
|
|
18
|
-
*
|
|
19
|
-
* Copyright (c) 2015 Michel Weststrate.
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license found in the
|
|
22
|
-
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/
|
|
24
|
-
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 Xt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ft(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,r){return e&&Ft(t.prototype,e),r&&Ft(t,r),t}function Yt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vt(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(t,e)}function Wt(t){return(Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $t(t,e){return($t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kt(t,e){return!e||"object"!=typeof 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 Zt(t,e){return t(e={exports:{}},e.exports),e.exports}var qt,Jt=Zt((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,y=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116;function v(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case l:case f:case i:case u:case a:return t;default:switch(t=t&&t.$$typeof){case s:case p:case c:return t;default:return e}}case o:return e}}}function b(t){return v(t)===f}e.typeOf=v,e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=s,e.ContextProvider=c,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Profiler=u,e.Portal=o,e.StrictMode=a,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===u||t===a||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===h||t.$$typeof===d||t.$$typeof===c||t.$$typeof===s||t.$$typeof===p)},e.isAsyncMode=function(t){return b(t)||v(t)===l},e.isConcurrentMode=b,e.isContextConsumer=function(t){return v(t)===s},e.isContextProvider=function(t){return v(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return v(t)===p},e.isFragment=function(t){return v(t)===i},e.isProfiler=function(t){return v(t)===u},e.isPortal=function(t){return v(t)===o},e.isStrictMode=function(t){return v(t)===a}}));(qt=Jt)&&qt.__esModule&&Object.prototype.hasOwnProperty.call(qt,"default")&&qt.default;Jt.typeOf,Jt.AsyncMode,Jt.ConcurrentMode,Jt.ContextConsumer,Jt.ContextProvider,Jt.Element,Jt.ForwardRef,Jt.Fragment,Jt.Profiler,Jt.Portal,Jt.StrictMode,Jt.isValidElementType,Jt.isAsyncMode,Jt.isConcurrentMode,Jt.isContextConsumer,Jt.isContextProvider,Jt.isElement,Jt.isForwardRef,Jt.isFragment,Jt.isProfiler,Jt.isPortal,Jt.isStrictMode;var Qt=Zt((function(t){t.exports=Jt})),te={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ee={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},re={};re[Qt.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var ne=Object.defineProperty,oe=Object.getOwnPropertyNames,ie=Object.getOwnPropertySymbols,ae=Object.getOwnPropertyDescriptor,ue=Object.getPrototypeOf,ce=Object.prototype;var se=function t(e,r,n){if("string"!=typeof r){if(ce){var o=ue(r);o&&o!==ce&&t(e,o,n)}var i=oe(r);ie&&(i=i.concat(ie(r)));for(var a=re[e.$$typeof]||te,u=re[r.$$typeof]||te,c=0;c<i.length;++c){var s=i[c];if(!(ee[s]||n&&n[s]||u&&u[s]||a&&a[s])){var l=ae(r,s);try{ne(e,s,l)}catch(t){}}}return e}return e},le=function(){function t(){Xt(this,t),this.listeners=[]}return Gt(t,[{key:"on",value:function(t){var e=this;return this.listeners.push(t),function(){var r=e.listeners.indexOf(t);-1!==r&&e.listeners.splice(r,1)}}},{key:"emit",value:function(t){this.listeners.forEach((function(e){return e(t)}))}}]),t}();function fe(t){function e(e,r,n,o,i,a){for(var u=arguments.length,c=new Array(u>6?u-6:0),s=6;s<u;s++)c[s-6]=arguments[s];return Object(f.I)((function(){if(o=o||"<<anonymous>>",a=a||n,null==r[n]){if(e){var u=null===r[n]?"null":"undefined";return new Error("The "+i+" `"+a+"` is marked as required in `"+o+"`, but its value is `"+u+"`.")}return null}return t.apply(void 0,[r,n,o,i,a].concat(c))}))}var r=e.bind(null,!1);return r.isRequired=e.bind(null,!0),r}function pe(t){var e=Ut(t);return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}(e,t)?"symbol":e}function ye(t,e){return fe((function(r,n,o,i,a){return Object(f.I)((function(){if(t&&pe(r[n])===e.toLowerCase())return null;var i;switch(e){case"Array":i=f.w;break;case"Object":i=f.y;break;case"Map":i=f.x;break;default:throw new Error("Unexpected mobxType: ".concat(e))}var u=r[n];if(!i(u)){var c=function(t){var e=pe(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}(u),s=t?" or javascript `"+e.toLowerCase()+"`":"";return new Error("Invalid prop `"+a+"` of type `"+c+"` supplied to `"+o+"`, expected `mobx.Observable"+e+"`"+s+".")}return null}))}))}function de(t,e){return fe((function(r,n,o,i,a){for(var u=arguments.length,c=new Array(u>5?u-5:0),s=5;s<u;s++)c[s-5]=arguments[s];return Object(f.I)((function(){if("function"!=typeof e)return new Error("Property `"+a+"` of component `"+o+"` has invalid PropType notation.");var u=ye(t,"Array")(r,n,o);if(u instanceof Error)return u;for(var s=r[n],l=0;l<s.length;l++)if((u=e.apply(void 0,[s,l,o,i,a+"["+l+"]"].concat(c)))instanceof Error)return u;return null}))}))}ye(!1,"Array"),de.bind(null,!1),ye(!1,"Map"),ye(!1,"Object"),ye(!0,"Array"),de.bind(null,!0);var he=ye(!0,"Object");var ve=0;var be={};function ge(t){return be[t]||(be[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react ".concat(t," (").concat(ve,")");return ve++,e}(t)),be[t]}var me=ge("patchMixins"),Oe=ge("patchedDefinition");function we(t,e){var r=t[me]=t[me]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}function _e(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 xe(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];_e.call.apply(_e,[this,t,e].concat(n))}}function Ee(t,e){for(var r=we(t,e),n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];for(var a=0;a<o.length;a++){var u=o[a];r.methods.indexOf(u)<0&&r.methods.push(u)}var c=Object.getOwnPropertyDescriptor(t,e);if(!c||!c[Oe]){var s=t[e],l=je(t,e,c?c.enumerable:void 0,r,s);Object.defineProperty(t,e,l)}}function je(t,e,r,n,o){var i,a=xe(o,n);return Yt(i={},Oe,!0),Yt(i,"get",(function(){return a})),Yt(i,"set",(function(o){if(this===t)a=xe(o,n);else{var i=je(this,e,r,n,o);Object.defineProperty(this,e,i)}})),Yt(i,"configurable",!0),Yt(i,"enumerable",r),i}var Se={mobxStores:he};Object.seal(Se);var Pe={contextTypes:{get:function(){return Se},set:function(t){console.warn("Mobx Injector: you are trying to attach `contextTypes` on an component decorated with `inject` (or `observer`) HOC. Please specify the contextTypes on the wrapped component instead. It is accessible through the `wrappedComponent`")},configurable:!0,enumerable:!1},isMobxInjector:{value:!0,writable:!0,configurable:!0,enumerable:!0}};function Ae(t,e,r){var n="inject-"+(e.displayName||e.name||e.constructor&&e.constructor.name||"Unknown");r&&(n+="-with-"+r);var o=function(r){function n(){var t,e;Xt(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=Kt(this,(t=Wt(n)).call.apply(t,[this].concat(o)))).storeRef=function(t){e.wrappedInstance=t},e}return Vt(n,r),Gt(n,[{key:"render",value:function(){var r={};for(var n in this.props)this.props.hasOwnProperty(n)&&(r[n]=this.props[n]);var o=t(this.context.mobxStores||{},r,this.context)||{};for(var i in o)r[i]=o[i];return function(t){return!(t.prototype&&t.prototype.render)}(e)||(r.ref=this.storeRef),b(e,r)}}]),n}(w);return o.displayName=n,se(o,e),o.wrappedComponent=e,Object.defineProperties(o,Pe),o}function ke(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 De(){var t;if("function"==typeof arguments[0])return t=arguments[0],function(e){var r=Ae(t,e);return r.isMobxInjector=!1,(r=Ze(r)).isMobxInjector=!0,r};for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t=ke(e),function(r){return Ae(t,r,e.join("-"))}}var Te=f.a||"$mobx",Me=ge("isUnmounted"),Ne=!1,Ce=!1,Re=!1,Ie="undefined"!=typeof WeakMap?new WeakMap:void 0,Le=new le,ze=ge("skipRender"),Be=ge("isForcingUpdate"),He=ht((function(t,e){})).$$typeof;function Ue(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}function Xe(t){if(zt)try{return zt(t)}catch(t){return null}return null}function Fe(t){var e=Xe(t);e&&Ie&&Ie.set(e,t),Le.emit({event:"render",renderTime:t.__$mobRenderEnd-t.__$mobRenderStart,totalTime:Date.now()-t.__$mobRenderStart,component:t,node:e})}var Ge=new le;function Ye(t,e){if(Ve(t,e))return!0;if("object"!==Ut(t)||null===t||"object"!==Ut(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(!hasOwnProperty.call(e,r[o])||!Ve(t[r[o]],e[r[o]]))return!1;return!0}function Ve(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function We(t){var e=this;if(!0===Ce)return t.call(this);function r(){var t=this;a=!1;var e=void 0,r=void 0;if(u.track((function(){Ne&&(t.__$mobRenderStart=Date.now());try{r=Object(f.d)(!1,i)}catch(t){e=t}Ne&&(t.__$mobRenderEnd=Date.now())})),e)throw Ge.emit(e),e;return r}var n=this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"<component>",o=this._reactInternalInstance&&this._reactInternalInstance._rootNodeID||this._reactInternalInstance&&this._reactInternalInstance._debugID||this._reactInternalFiber&&this._reactInternalFiber._debugID;Ue(this,ze,!1),Ue(this,Be,!1);var i=t.bind(this),a=!1,u=new f.c("".concat(n,"#").concat(o,".render()"),(function(){if(!a&&(a=!0,"function"==typeof e.componentWillReact&&e.componentWillReact(),!0!==e[Me])){var t=!0;try{Ue(e,Be,!0),e[ze]||w.prototype.forceUpdate.call(e),t=!1}finally{Ue(e,Be,!1),t&&u.dispose()}}}));return u.reactComponent=this,r[Te]=u,this.render=r,r.call(this)}var $e={componentWillUnmount:function(){if(!0!==Ce&&(this.render[Te]&&this.render[Te].dispose(),this[Me]=!0,Ne)){var t=Xe(this);t&&Ie&&Ie.delete(t),Le.emit({event:"destroy",component:this,node:t})}},componentDidMount:function(){Ne&&Fe(this)},componentDidUpdate:function(){Ne&&Fe(this)},shouldComponentUpdate:function(t,e){return Ce&&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||!Ye(this.props,t)}};function Ke(t,e){var r=ge("reactProp_".concat(e,"_valueHolder")),n=ge("reactProp_".concat(e,"_atomHolder"));function o(){return this[n]||Ue(this,n,Object(f.m)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return o.call(this).reportObserved(),this[r]},set:function(t){this[Be]||Ye(this[r],t)?Ue(this,r,t):(Ue(this,r,t),Ue(this,ze,!0),o.call(this).reportChanged(),Ue(this,ze,!1))}})}function Ze(t,e){if("string"==typeof t)throw new Error("Store names should be provided as array");if(Array.isArray(t))return Re||(Re=!0,console.warn('Mobx observer: Using observer to inject stores is deprecated since 4.0. Use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))` instead of `@observer(["store1", "store2"]) ComponentClass`')),e?De.apply(null,t)(Ze(e)):function(e){return Ze(t,e)};var r=t;if(!0===r.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),r.__proto__===pt&&console.warn("Mobx observer: You are using 'observer' on React.PureComponent. These two achieve two opposite goals and should not be used together"),He&&r.$$typeof===He){var n=r.render;if("function"!=typeof n)throw new Error("render property of ForwardRef was not a function");return ht((function(){var t=arguments;return Ht.createElement(qe,null,(function(){return n.apply(void 0,t)}))}))}if(!("function"!=typeof r||r.prototype&&r.prototype.render||r.isReactClass||w.isPrototypeOf(r))){var o,i,a=Ze((i=o=function(t){function e(){return Xt(this,e),Kt(this,Wt(e).apply(this,arguments))}return Vt(e,t),Gt(e,[{key:"render",value:function(){return r.call(this,this.props,this.context)}}]),e}(w),o.displayName=r.displayName||r.name,o.contextTypes=r.contextTypes,o.propTypes=r.propTypes,o.defaultProps=r.defaultProps,i));return se(a,r),a}if(!r)throw new Error("Please pass a valid component to 'observer'");var u=r.prototype||r;!function(t){["componentDidMount","componentWillUnmount","componentDidUpdate"].forEach((function(e){!function(t,e){Ee(t,e,$e[e])}(t,e)})),t.shouldComponentUpdate?t.shouldComponentUpdate!==$e.shouldComponentUpdate&&console.warn("Use `shouldComponentUpdate` in an `observer` based component breaks the behavior of `observer` and might lead to unexpected results. Manually implementing `sCU` should not be needed when using mobx-react."):t.shouldComponentUpdate=$e.shouldComponentUpdate}(u),r.isMobXReactObserver=!0,Ke(u,"props"),Ke(u,"state");var c=u.render;return u.render=function(){return We.call(this,c)},r}var qe=Ze((function(t){var e=t.children,r=t.inject,n=t.render,o=e||n;if(void 0===o)return null;if(!r)return o();console.warn("<Observer inject=.../> is no longer supported. Please use inject on the enclosing component instead");var i=De(r)(o);return Ht.createElement(i,null)}));qe.displayName="Observer";var Je=function(t,e,r,n,o){var i="children"===e?"render":"children";return"function"==typeof t[e]&&"function"==typeof t[i]?new Error("Invalid prop,do not use children and render in the same time in`"+r):"function"!=typeof t[e]&&"function"!=typeof t[i]?new Error("Invalid prop `"+o+"` of type `"+Ut(t[e])+"` supplied to `"+r+"`, expected `function`."):void 0};function Qe(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function tr(t){this.setState(function(e){var r=this.constructor.getDerivedStateFromProps(t,e);return null!=r?r:null}.bind(this))}function er(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}qe.propTypes={render:Je,children:Je},Qe.__suppressDeprecationWarning=!0,tr.__suppressDeprecationWarning=!0,er.__suppressDeprecationWarning=!0;var rr={children:!0,key:!0,ref:!0},nr=function(t){function e(t,r){var n;return Xt(this,e),(n=Kt(this,Wt(e).call(this,t,r))).state={},or(t,n.state),n}return Vt(e,t),Gt(e,[{key:"render",value:function(){return bt.only(this.props.children)}},{key:"getChildContext",value:function(){var t={};return or(this.context.mobxStores,t),or(this.props,t),{mobxStores:t}}}],[{key:"getDerivedStateFromProps",value:function(t,e){if(!t)return null;if(!e)return t;if(Object.keys(t).filter(ir).length!==Object.keys(e).filter(ir).length&&console.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!t.suppressChangedStoreWarning)for(var r in t)ir(r)&&e[r]!==t[r]&&console.warn("MobX Provider: Provided store '"+r+"' has changed. Please avoid replacing stores as the change might not propagate to all children");return t}}]),e}(w);function or(t,e){if(t)for(var r in t)ir(r)&&(e[r]=t[r])}function ir(t){return!rr[t]&&"suppressChangedStoreWarning"!==t}nr.contextTypes={mobxStores:he},nr.childContextTypes={mobxStores:he.isRequired},function(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var r=null,n=null,o=null;if("function"==typeof e.componentWillMount?r="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?n="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(n="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?o="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==r||null!==n||null!==o){var i=t.displayName||t.name,a="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==r?"\n "+r:"")+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=Qe,e.componentWillReceiveProps=tr),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=er;var u=e.componentDidUpdate;e.componentDidUpdate=function(t,e,r){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:r;u.call(this,t,e,n)}}}(nr);ge("disposeOnUnmount");if(!w)throw new Error("mobx-react requires React to be available");if(!f.F)throw new Error("mobx-react requires mobx to be available");Object(f.l)({reactionScheduler:Bt});if("object"===("undefined"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__?"undefined":Ut(__MOBX_DEVTOOLS_GLOBAL_HOOK__))){var ar={spy:f.F,extras:{getDebugName:f.r}},ur={renderReporter:Le,componentByNodeRegistry:Ie,componentByNodeRegistery:Ie,trackComponents:function(){if("undefined"==typeof WeakMap)throw new Error("[mobx-react] tracking components is not supported in this browser.");Ne||(Ne=!0)}};__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(ur,ar)}r(1),r(78),r(3),r(5),r(4),r(8),r(17),r(35),r(12),r(2),r(19),r(13),r(20),r(6),r(7),r(14),r(18),r(159),r(164),r(81),r(130),r(131);var cr=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 sr=function(){this.__data__=[],this.size=0};var lr=function(t,e){return t===e||t!=t&&e!=e};var fr=function(t,e){for(var r=t.length;r--;)if(lr(t[r][0],e))return r;return-1},pr=Array.prototype.splice;var yr=function(t){var e=this.__data__,r=fr(e,t);return!(r<0)&&(r==e.length-1?e.pop():pr.call(e,r,1),--this.size,!0)};var dr=function(t){var e=this.__data__,r=fr(e,t);return r<0?void 0:e[r][1]};var hr=function(t){return fr(this.__data__,t)>-1};var vr=function(t,e){var r=this.__data__,n=fr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function br(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])}}br.prototype.clear=sr,br.prototype.delete=yr,br.prototype.get=dr,br.prototype.has=hr,br.prototype.set=vr;var gr=br;var mr=function(){this.__data__=new gr,this.size=0};var Or=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var wr=function(t){return this.__data__.get(t)};var _r=function(t){return this.__data__.has(t)},xr=r(22),Er=xr.a.Symbol,jr=Object.prototype,Sr=jr.hasOwnProperty,Pr=jr.toString,Ar=Er?Er.toStringTag:void 0;var kr=function(t){var e=Sr.call(t,Ar),r=t[Ar];try{t[Ar]=void 0;var n=!0}catch(t){}var o=Pr.call(t);return n&&(e?t[Ar]=r:delete t[Ar]),o},Dr=Object.prototype.toString;var Tr=function(t){return Dr.call(t)},Mr=Er?Er.toStringTag:void 0;var Nr=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Mr&&Mr in Object(t)?kr(t):Tr(t)};var Cr=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Rr,Ir=function(t){if(!Cr(t))return!1;var e=Nr(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Lr=xr.a["__core-js_shared__"],zr=(Rr=/[^.]+$/.exec(Lr&&Lr.keys&&Lr.keys.IE_PROTO||""))?"Symbol(src)_1."+Rr:"";var Br=function(t){return!!zr&&zr in t},Hr=Function.prototype.toString;var Ur=function(t){if(null!=t){try{return Hr.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Xr=/^\[object .+?Constructor\]$/,Fr=Function.prototype,Gr=Object.prototype,Yr=Fr.toString,Vr=Gr.hasOwnProperty,Wr=RegExp("^"+Yr.call(Vr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var $r=function(t){return!(!Cr(t)||Br(t))&&(Ir(t)?Wr:Xr).test(Ur(t))};var Kr=function(t,e){return null==t?void 0:t[e]};var Zr=function(t,e){var r=Kr(t,e);return $r(r)?r:void 0},qr=Zr(xr.a,"Map"),Jr=Zr(Object,"create");var Qr=function(){this.__data__=Jr?Jr(null):{},this.size=0};var tn=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},en=Object.prototype.hasOwnProperty;var rn=function(t){var e=this.__data__;if(Jr){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return en.call(e,t)?e[t]:void 0},nn=Object.prototype.hasOwnProperty;var on=function(t){var e=this.__data__;return Jr?void 0!==e[t]:nn.call(e,t)};var an=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Jr&&void 0===e?"__lodash_hash_undefined__":e,this};function un(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])}}un.prototype.clear=Qr,un.prototype.delete=tn,un.prototype.get=rn,un.prototype.has=on,un.prototype.set=an;var cn=un;var sn=function(){this.size=0,this.__data__={hash:new cn,map:new(qr||gr),string:new cn}};var ln=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var fn=function(t,e){var r=t.__data__;return ln(e)?r["string"==typeof e?"string":"hash"]:r.map};var pn=function(t){var e=fn(this,t).delete(t);return this.size-=e?1:0,e};var yn=function(t){return fn(this,t).get(t)};var dn=function(t){return fn(this,t).has(t)};var hn=function(t,e){var r=fn(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function vn(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])}}vn.prototype.clear=sn,vn.prototype.delete=pn,vn.prototype.get=yn,vn.prototype.has=dn,vn.prototype.set=hn;var bn=vn;var gn=function(t,e){var r=this.__data__;if(r instanceof gr){var n=r.__data__;if(!qr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new bn(n)}return r.set(t,e),this.size=r.size,this};function mn(t){var e=this.__data__=new gr(t);this.size=e.size}mn.prototype.clear=mr,mn.prototype.delete=Or,mn.prototype.get=wr,mn.prototype.has=_r,mn.prototype.set=gn;var On=mn;var wn=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var _n=function(t){return this.__data__.has(t)};function xn(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new bn;++e<r;)this.add(t[e])}xn.prototype.add=xn.prototype.push=wn,xn.prototype.has=_n;var En=xn;var jn=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 Sn=function(t,e){return t.has(e)};var Pn=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 En: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(!jn(e,(function(t,e){if(!Sn(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},An=xr.a.Uint8Array;var kn=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Dn=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Tn=Er?Er.prototype:void 0,Mn=Tn?Tn.valueOf:void 0;var Nn=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 An(t),new An(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lr(+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=kn;case"[object Set]":var c=1&n;if(u||(u=Dn),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=Pn(u(t),u(e),n,o,i,a);return a.delete(t),l;case"[object Symbol]":if(Mn)return Mn.call(t)==Mn.call(e)}return!1};var Cn=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Rn=Array.isArray;var In=function(t,e,r){var n=e(t);return Rn(t)?n:Cn(n,r(t))};var Ln=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 zn=function(){return[]},Bn=Object.prototype.propertyIsEnumerable,Hn=Object.getOwnPropertySymbols,Un=Hn?function(t){return null==t?[]:(t=Object(t),Ln(Hn(t),(function(e){return Bn.call(t,e)})))}:zn;var Xn=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Fn=function(t){return null!=t&&"object"==typeof t};var Gn=function(t){return Fn(t)&&"[object Arguments]"==Nr(t)},Yn=Object.prototype,Vn=Yn.hasOwnProperty,Wn=Yn.propertyIsEnumerable,$n=Gn(function(){return arguments}())?Gn:function(t){return Fn(t)&&Vn.call(t,"callee")&&!Wn.call(t,"callee")},Kn=r(48),Zn=/^(?:0|[1-9]\d*)$/;var qn=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Zn.test(t))&&t>-1&&t%1==0&&t<e};var Jn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Qn={};Qn["[object Float32Array]"]=Qn["[object Float64Array]"]=Qn["[object Int8Array]"]=Qn["[object Int16Array]"]=Qn["[object Int32Array]"]=Qn["[object Uint8Array]"]=Qn["[object Uint8ClampedArray]"]=Qn["[object Uint16Array]"]=Qn["[object Uint32Array]"]=!0,Qn["[object Arguments]"]=Qn["[object Array]"]=Qn["[object ArrayBuffer]"]=Qn["[object Boolean]"]=Qn["[object DataView]"]=Qn["[object Date]"]=Qn["[object Error]"]=Qn["[object Function]"]=Qn["[object Map]"]=Qn["[object Number]"]=Qn["[object Object]"]=Qn["[object RegExp]"]=Qn["[object Set]"]=Qn["[object String]"]=Qn["[object WeakMap]"]=!1;var to=function(t){return Fn(t)&&Jn(t.length)&&!!Qn[Nr(t)]};var eo=function(t){return function(e){return t(e)}},ro=r(42),no=ro.a&&ro.a.isTypedArray,oo=no?eo(no):to,io=Object.prototype.hasOwnProperty;var ao=function(t,e){var r=Rn(t),n=!r&&$n(t),o=!r&&!n&&Object(Kn.a)(t),i=!r&&!n&&!o&&oo(t),a=r||n||o||i,u=a?Xn(t.length,String):[],c=u.length;for(var s in t)!e&&!io.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||qn(s,c))||u.push(s);return u},uo=Object.prototype;var co=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||uo)};var so=function(t,e){return function(r){return t(e(r))}},lo=so(Object.keys,Object),fo=Object.prototype.hasOwnProperty;var po=function(t){if(!co(t))return lo(t);var e=[];for(var r in Object(t))fo.call(t,r)&&"constructor"!=r&&e.push(r);return e};var yo=function(t){return null!=t&&Jn(t.length)&&!Ir(t)};var ho=function(t){return yo(t)?ao(t):po(t)};var vo=function(t){return In(t,ho,Un)},bo=Object.prototype.hasOwnProperty;var go=function(t,e,r,n,o,i){var a=1&r,u=vo(t),c=u.length;if(c!=vo(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:bo.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},mo=Zr(xr.a,"DataView"),Oo=Zr(xr.a,"Promise"),wo=Zr(xr.a,"Set"),_o=Zr(xr.a,"WeakMap"),xo=Ur(mo),Eo=Ur(qr),jo=Ur(Oo),So=Ur(wo),Po=Ur(_o),Ao=Nr;(mo&&"[object DataView]"!=Ao(new mo(new ArrayBuffer(1)))||qr&&"[object Map]"!=Ao(new qr)||Oo&&"[object Promise]"!=Ao(Oo.resolve())||wo&&"[object Set]"!=Ao(new wo)||_o&&"[object WeakMap]"!=Ao(new _o))&&(Ao=function(t){var e=Nr(t),r="[object Object]"==e?t.constructor:void 0,n=r?Ur(r):"";if(n)switch(n){case xo:return"[object DataView]";case Eo:return"[object Map]";case jo:return"[object Promise]";case So:return"[object Set]";case Po:return"[object WeakMap]"}return e});var ko=Ao,Do=Object.prototype.hasOwnProperty;var To=function(t,e,r,n,o,i){var a=Rn(t),u=Rn(e),c=a?"[object Array]":ko(t),s=u?"[object Array]":ko(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(Kn.a)(t)){if(!Object(Kn.a)(e))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new On),a||oo(t)?Pn(t,e,r,n,o,i):Nn(t,e,c,r,n,o,i);if(!(1&r)){var y=l&&Do.call(t,"__wrapped__"),d=f&&Do.call(e,"__wrapped__");if(y||d){var h=y?t.value():t,v=d?e.value():e;return i||(i=new On),o(h,v,r,n,i)}}return!!p&&(i||(i=new On),go(t,e,r,n,o,i))};var Mo=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Fn(e)&&!Fn(r)?e!=e&&r!=r:To(e,r,n,o,t,i))};var No=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 On;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?Mo(l,s,3,n,f):p))return!1}}return!0};var Co=function(t){return t==t&&!Cr(t)};var Ro=function(t){for(var e=ho(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Co(o)]}return e};var Io=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Lo=function(t){var e=Ro(t);return 1==e.length&&e[0][2]?Io(e[0][0],e[0][1]):function(r){return r===t||No(r,t,e)}};var zo=function(t){return"symbol"==typeof t||Fn(t)&&"[object Symbol]"==Nr(t)},Bo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ho=/^\w*$/;var Uo=function(t,e){if(Rn(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!zo(t))||(Ho.test(t)||!Bo.test(t)||null!=e&&t in Object(e))};function Xo(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(Xo.Cache||bn),r}Xo.Cache=bn;var Fo=Xo;var Go=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yo=/\\(\\)?/g,Vo=function(t){var e=Fo(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(Go,(function(t,r,n,o){e.push(n?o.replace(Yo,"$1"):r||t)})),e})),Wo=Er?Er.prototype:void 0,$o=Wo?Wo.toString:void 0;var Ko=function t(e){if("string"==typeof e)return e;if(Rn(e))return cr(e,t)+"";if(zo(e))return $o?$o.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};var Zo=function(t){return null==t?"":Ko(t)};var qo=function(t,e){return Rn(t)?t:Uo(t,e)?[t]:Vo(Zo(t))};var Jo=function(t){if("string"==typeof t||zo(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var Qo=function(t,e){for(var r=0,n=(e=qo(e,t)).length;null!=t&&r<n;)t=t[Jo(e[r++])];return r&&r==n?t:void 0};var ti=function(t,e,r){var n=null==t?void 0:Qo(t,e);return void 0===n?r:n};var ei=function(t,e){return null!=t&&e in Object(t)};var ri=function(t,e,r){for(var n=-1,o=(e=qo(e,t)).length,i=!1;++n<o;){var a=Jo(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Jn(o)&&qn(a,o)&&(Rn(t)||$n(t))};var ni=function(t,e){return null!=t&&ri(t,e,ei)};var oi=function(t,e){return Uo(t)&&Co(e)?Io(Jo(t),e):function(r){var n=ti(r,t);return void 0===n&&n===e?ni(r,t):Mo(e,n,3)}};var ii=function(t){return t};var ai=function(t){return function(e){return null==e?void 0:e[t]}};var ui=function(t){return function(e){return Qo(e,t)}};var ci=function(t){return Uo(t)?ai(Jo(t)):ui(t)};var si=function(t){return"function"==typeof t?t:null==t?ii:"object"==typeof t?Rn(t)?oi(t[0],t[1]):Lo(t):ci(t)};var li=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 fi=function(t,e){return function(r,n){if(null==r)return r;if(!yo(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&&li(t,e,ho)}));var pi=function(t,e){var r=-1,n=yo(t)?Array(t.length):[];return fi(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var yi=function(t,e){return(Rn(t)?cr:pi)(t,si(e,3))},di=function(){try{var t=Zr(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var hi=function(t,e,r){"__proto__"==e&&di?di(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},vi=Object.prototype.hasOwnProperty;var bi=function(t,e,r){var n=t[e];vi.call(t,e)&&lr(n,r)&&(void 0!==r||e in t)||hi(t,e,r)};var gi=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?hi(r,u,c):bi(r,u,c)}return r};var mi=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)},Oi=Math.max;var wi=function(t,e,r){return e=Oi(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=Oi(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),mi(t,this,u)}};var _i=function(t){return function(){return t}},xi=di?function(t,e){return di(t,"toString",{configurable:!0,enumerable:!1,value:_i(e),writable:!0})}:ii,Ei=Date.now;var ji=function(t){var e=0,r=0;return function(){var n=Ei(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(xi);var Si=function(t,e){return ji(wi(t,e,ii),t+"")};var Pi=function(t,e,r){if(!Cr(r))return!1;var n=typeof e;return!!("number"==n?yo(r)&&qn(e,r.length):"string"==n&&e in r)&&lr(r[e],t)};var Ai=function(t){return Si((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&&Pi(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}))},ki=Object.prototype.hasOwnProperty,Di=Ai((function(t,e){if(co(e)||yo(e))gi(e,ho(e),t);else for(var r in e)ki.call(e,r)&&bi(t,r,e[r])}));var Ti=function(t,e,r,n){if(!Cr(t))return t;for(var o=-1,i=(e=qo(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=Jo(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=Cr(l)?l:qn(e[o+1])?[]:{})}bi(u,c,s),u=u[c]}return t};var Mi=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],u=Qo(t,a);r(u,a)&&Ti(i,qo(a,t),u)}return i};var Ni=function(t,e){return Mi(t,e,(function(e,r){return ni(t,r)}))},Ci=Er?Er.isConcatSpreadable:void 0;var Ri=function(t){return Rn(t)||$n(t)||!!(Ci&&t&&t[Ci])};var Ii=function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=Ri),i||(i=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Cn(i,c):o||(i[i.length]=c)}return i};var Li=function(t){return(null==t?0:t.length)?Ii(t,1):[]};var zi,Bi,Hi,Ui,Xi,Fi,Gi,Yi,Vi,Wi,$i,Ki,Zi,qi,Ji,Qi,ta,ea=function(t){return ji(wi(t,void 0,Li),t+"")}((function(t,e){return null==t?{}:Ni(t,e)}));function ra(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 na(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 oa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ia(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 aa,ua,ca,sa,la,fa,pa={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1,metaKeyMultipleSelected:!1},ya=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","metaKeyMultipleSelected","multipleSelectKey","extraConf"],da=(Bi=ia((zi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ra(this,"stopZoomGraph",Bi,this),ra(this,"stopScrollGraph",Hi,this),ra(this,"stopMoveGraph",Ui,this),ra(this,"adjustEdge",Xi,this),ra(this,"adjustEdgeMiddle",Fi,this),ra(this,"adjustEdgeStartAndEnd",Gi,this),ra(this,"adjustNodePosition",Yi,this),ra(this,"hideAnchors",Vi,this),ra(this,"hoverOutline",Wi,this),ra(this,"nodeSelectedOutline",$i,this),ra(this,"edgeSelectedOutline",Ki,this),ra(this,"nodeTextEdit",Zi,this),ra(this,"edgeTextEdit",qi,this),ra(this,"nodeTextDraggable",Ji,this),ra(this,"edgeTextDraggable",Qi,this),ra(this,"metaKeyMultipleSelected",ta,this),oa(this,"multipleSelectKey",""),oa(this,"extraConf",{}),oa(this,"defaultConfig",{}),Di(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);Di(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&Di(n,this.defaultConfig),!0===e){var o=ea(pa,ya);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},Di(n,o)}!1===r&&Di(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=ea(t,ya);return Di(n,i)}},{key:"getConfig",value:function(){return ea(this,ya)}}])&&na(e.prototype,r),n&&na(e,n),t}()).prototype,"stopZoomGraph",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hi=ia(zi.prototype,"stopScrollGraph",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ui=ia(zi.prototype,"stopMoveGraph",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xi=ia(zi.prototype,"adjustEdge",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Fi=ia(zi.prototype,"adjustEdgeMiddle",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gi=ia(zi.prototype,"adjustEdgeStartAndEnd",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yi=ia(zi.prototype,"adjustNodePosition",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vi=ia(zi.prototype,"hideAnchors",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wi=ia(zi.prototype,"hoverOutline",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$i=ia(zi.prototype,"nodeSelectedOutline",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ki=ia(zi.prototype,"edgeSelectedOutline",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Zi=ia(zi.prototype,"nodeTextEdit",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qi=ia(zi.prototype,"edgeTextEdit",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ji=ia(zi.prototype,"nodeTextDraggable",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Qi=ia(zi.prototype,"edgeTextDraggable",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ta=ia(zi.prototype,"metaKeyMultipleSelected",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ia(zi.prototype,"updateEditConfig",[f.i],Object.getOwnPropertyDescriptor(zi.prototype,"updateEditConfig"),zi.prototype),zi);r(82);!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"}(aa||(aa={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(ua||(ua={})),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"}(ca||(ca={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(sa||(sa={})),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"}(la||(la={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(fa||(fa={}));var ha,va,ba,ga,ma,Oa,wa,_a,xa;function Ea(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 ja(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 ja(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 ja(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 Sa(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 Pa(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 Aa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ka(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"}(ha||(ha={}));var Da=(ba=ka((va=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Aa(this,"MINI_SCALE_SIZE",.2),Aa(this,"MAX_SCALE_SIZE",16),Sa(this,"SCALE_X",ba,this),Sa(this,"SKEW_Y",ga,this),Sa(this,"SKEW_X",ma,this),Sa(this,"SCALE_Y",Oa,this),Sa(this,"TRANSLATE_X",wa,this),Sa(this,"TRANSLATE_Y",_a,this),Sa(this,"ZOOM_SIZE",xa,this),Aa(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=Ea(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=Ea(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=Ea(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(la.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=Ea(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")}}])&&Pa(e.prototype,r),n&&Pa(e,n),t}()).prototype,"SCALE_X",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ga=ka(va.prototype,"SKEW_Y",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ma=ka(va.prototype,"SKEW_X",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Oa=ka(va.prototype,"SCALE_Y",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wa=ka(va.prototype,"TRANSLATE_X",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),_a=ka(va.prototype,"TRANSLATE_Y",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),xa=ka(va.prototype,"ZOOM_SIZE",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),ka(va.prototype,"zoom",[f.i],Object.getOwnPropertyDescriptor(va.prototype,"zoom"),va.prototype),ka(va.prototype,"resetZoom",[f.i],Object.getOwnPropertyDescriptor(va.prototype,"resetZoom"),va.prototype),ka(va.prototype,"translate",[f.i],Object.getOwnPropertyDescriptor(va.prototype,"translate"),va.prototype),ka(va.prototype,"focusOn",[f.i],Object.getOwnPropertyDescriptor(va.prototype,"focusOn"),va.prototype),va);var Ta=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var Ma=function(t,e){return t&&gi(e,ho(e),t)};var Na=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},Ca=Object.prototype.hasOwnProperty;var Ra=function(t){if(!Cr(t))return Na(t);var e=co(t),r=[];for(var n in t)("constructor"!=n||!e&&Ca.call(t,n))&&r.push(n);return r};var Ia=function(t){return yo(t)?ao(t,!0):Ra(t)};var La=function(t,e){return t&&gi(e,Ia(e),t)},za=r(139);var Ba=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var Ha=function(t,e){return gi(t,Un(t),e)},Ua=so(Object.getPrototypeOf,Object),Xa=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Cn(e,Un(t)),t=Ua(t);return e}:zn;var Fa=function(t,e){return gi(t,Xa(t),e)};var Ga=function(t){return In(t,Ia,Xa)},Ya=Object.prototype.hasOwnProperty;var Va=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Ya.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var Wa=function(t){var e=new t.constructor(t.byteLength);return new An(e).set(new An(t)),e};var $a=function(t,e){var r=e?Wa(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Ka=/\w*$/;var Za=function(t){var e=new t.constructor(t.source,Ka.exec(t));return e.lastIndex=t.lastIndex,e},qa=Er?Er.prototype:void 0,Ja=qa?qa.valueOf:void 0;var Qa=function(t){return Ja?Object(Ja.call(t)):{}};var tu=function(t,e){var r=e?Wa(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var eu=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Wa(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return $a(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 tu(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Za(t);case"[object Set]":return new n;case"[object Symbol]":return Qa(t)}},ru=Object.create,nu=function(){function t(){}return function(e){if(!Cr(e))return{};if(ru)return ru(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var ou=function(t){return"function"!=typeof t.constructor||co(t)?{}:nu(Ua(t))};var iu=function(t){return Fn(t)&&"[object Map]"==ko(t)},au=ro.a&&ro.a.isMap,uu=au?eo(au):iu;var cu=function(t){return Fn(t)&&"[object Set]"==ko(t)},su=ro.a&&ro.a.isSet,lu=su?eo(su):cu,fu={};fu["[object Arguments]"]=fu["[object Array]"]=fu["[object ArrayBuffer]"]=fu["[object DataView]"]=fu["[object Boolean]"]=fu["[object Date]"]=fu["[object Float32Array]"]=fu["[object Float64Array]"]=fu["[object Int8Array]"]=fu["[object Int16Array]"]=fu["[object Int32Array]"]=fu["[object Map]"]=fu["[object Number]"]=fu["[object Object]"]=fu["[object RegExp]"]=fu["[object Set]"]=fu["[object String]"]=fu["[object Symbol]"]=fu["[object Uint8Array]"]=fu["[object Uint8ClampedArray]"]=fu["[object Uint16Array]"]=fu["[object Uint32Array]"]=!0,fu["[object Error]"]=fu["[object Function]"]=fu["[object WeakMap]"]=!1;var pu=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(!Cr(e))return e;var f=Rn(e);if(f){if(u=Va(e),!c)return Ba(e,u)}else{var p=ko(e),y="[object Function]"==p||"[object GeneratorFunction]"==p;if(Object(Kn.a)(e))return Object(za.a)(e,c);if("[object Object]"==p||"[object Arguments]"==p||y&&!i){if(u=s||y?{}:ou(e),!c)return s?Fa(e,La(u,e)):Ha(e,Ma(u,e))}else{if(!fu[p])return i?e:{};u=eu(e,p,c)}}a||(a=new On);var d=a.get(e);if(d)return d;a.set(e,u),lu(e)?e.forEach((function(o){u.add(t(o,r,n,o,e,a))})):uu(e)&&e.forEach((function(o,i){u.set(i,t(o,r,n,i,e,a))}));var h=f?void 0:(l?s?Ga:vo:s?Ia:ho)(e);return Ta(h||e,(function(o,i){h&&(o=e[i=o]),bi(u,i,t(o,r,n,i,e,a))})),u};var yu=function(t){return pu(t,5)};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}var bu={fill:"#FFFFFF",stroke:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,opacity:1,outlineColor:"#000000",outlineStrokeDashArray:"3,3",hoverOutlineColor:"#000000",hoverOutlineStrokeDashArray:"3,3"},gu=hu(hu({},bu),{},{width:100,height:80,radius:0}),mu=hu(hu({},bu),{},{r:50}),Ou=hu(hu({},bu),{},{rx:55,ry:45}),wu=hu(hu({},bu),{},{rx:50,ry:50}),_u=hu({},bu),xu=hu(hu({},bu),{},{stroke:"#000000",strokeWidth:1,r:4}),Eu={stroke:"#000000",strokeWidth:2,hoverStroke:"#000000",selectedStroke:"#000000",strokeDashArray:"1,0",outlineColor:"#000000",outlineStrokeDashArray:"3,3"},ju=hu({},Eu),Su=hu(hu({},Eu),{},{offset:30}),Pu=hu(hu({},Eu),{},{offset:100,adjustLineColor:"#4169E1",adjustAnchorStroke:"#4169E1",adjustAnchorFill:"#1E90FF",adjustAnchorFillOpacity:.5}),Au={color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:""},ku={rect:gu,circle:mu,diamond:wu,ellipse:Ou,polygon:_u,anchor:xu,text:Au,nodeText:hu(hu({},Au),{},{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:ju,polyline:Su,bezier:Pu,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 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 Tu(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){Mu(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 Mu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Nu=function(t){var e=yu(ku);return t&&Object.keys(t).forEach((function(r){e[r]=Tu(Tu({},e[r]),t[r])})),e};function Cu(t,e){return e*Math.round(t/e)||t}function Ru(t,e){return t%e}function Iu(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 Lu(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 Lu(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 Lu(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 zu,Bu=function(t,e,r){var n=Iu(t,2),o=n[0],i=n[1],a=Iu(e,2),u=a[0],c=a[1],s=Iu(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},Hu=(r(30),r(41),r(52),r(63),r(136),r(137),r(64),r(9),r(10),r(11),r(36),new Uint8Array(16));function Uu(){if(!zu&&!(zu="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 zu(Hu)}var Xu=/^(?:[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 Fu=function(t){return"string"==typeof t&&Xu.test(t)},Gu=[],Yu=0;Yu<256;++Yu)Gu.push((Yu+256).toString(16).substr(1));var Vu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Gu[t[e+0]]+Gu[t[e+1]]+Gu[t[e+2]]+Gu[t[e+3]]+"-"+Gu[t[e+4]]+Gu[t[e+5]]+"-"+Gu[t[e+6]]+Gu[t[e+7]]+"-"+Gu[t[e+8]]+Gu[t[e+9]]+"-"+Gu[t[e+10]]+Gu[t[e+11]]+Gu[t[e+12]]+Gu[t[e+13]]+Gu[t[e+14]]+Gu[t[e+15]]).toLowerCase();if(!Fu(r))throw TypeError("Stringified UUID is invalid");return r};var Wu=function(t,e,r){var n=(t=t||{}).random||(t.rng||Uu)();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 Vu(n)},$u=function(){return Wu()},Ku=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+Wu(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+Wu(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},Zu=(r(84),r(176),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 qu(t){return(qu="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 Ju(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 Qu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ju(Object(r),!0).forEach((function(e){tc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ju(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function tc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ec,rc,nc,oc,ic,ac,uc,cc,sc,lc,fc,pc,yc,dc,hc,vc,bc,gc,mc,Oc,wc,_c,xc,Ec,jc,Sc=function(t){return t.anchors},Pc=function(t,e){for(var r,n=e.length-1;n>=0;n--){if(Tc(t,e[n])){var o=Ac(t,e[n]);if(o){r={node:e[n],anchorIndex:o.index,anchor:o.anchor};break}}}return r},Ac=function(t,e){for(var r,n=Sc(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var a=kc(t.x,t.y,n[i].x,n[i].y);a<o&&(o=a,r={index:i,anchor:Qu(Qu({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r},kc=function(t,e,r,n){return Math.hypot(t-r,e-n)},Dc=function(t,e){var r=!1,n=Mc(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},Tc=function(t,e){var r=!1,n=Mc(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},Mc=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}},Nc=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=kc(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),Cc(t,e,n)},Cc=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.r;if(e===fa.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===fa.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},Rc=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},Ic=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===fa.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===fa.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},Lc=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===fa.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===fa.VERTICAL&&(s={x:t.x,y:l*t.x+f}),Zu(s,o,a)){var p=kc(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},zc=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}},Bc=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},Hc=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=rl(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},Uc=function(t){return"object"!==qu(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},Xc=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},Fc=1e3,Gc=999,Yc=function(){return++Fc};function Vc(t){return(Vc="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 Wc(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 $c(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}function Zc(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 qc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jc=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zc(Object(r),!0).forEach((function(e){qc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zc(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},ku.line),Qc=(rc=Kc((ec=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),qc(this,"id",$u()),qc(this,"BaseType",sa.EDGE),Wc(this,"state",rc,this),qc(this,"modelType",ca.EDGE),qc(this,"additionStateData",void 0),qc(this,"graphModel",void 0),qc(this,"menu",void 0),qc(this,"sourceAnchorId",Jc.sourceAnchorId),qc(this,"targetAnchorId",Jc.targetAnchorId),qc(this,"customTextPosition",!1),Wc(this,"text",nc,this),Wc(this,"type",oc,this),Wc(this,"properties",ic,this),Wc(this,"sourceNodeId",ac,this),Wc(this,"targetNodeId",uc,this),Wc(this,"startPoint",cc,this),Wc(this,"endPoint",sc,this),Wc(this,"strokeWidth",lc,this),Wc(this,"stroke",fc,this),Wc(this,"strokeDashArray",pc,this),Wc(this,"outlineColor",yc,this),Wc(this,"hideOutline",dc,this),Wc(this,"outlineStrokeDashArray",hc,this),Wc(this,"strokeOpacity",vc,this),Wc(this,"zIndex",bc,this),Wc(this,"isSelected",gc,this),Wc(this,"isHovered",mc,this),Wc(this,"isHitable",Oc,this),Wc(this,"hoverStroke",wc,this),Wc(this,"selectedStroke",_c,this),Wc(this,"points",xc,this),Wc(this,"pointsList",Ec,this),Wc(this,"draggable",jc,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)}Di(this,ul(t)),this.graphModel.overlapMode===ha.INCREASE&&(this.zIndex=t.zIndex||Yc())}},{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 Sc(t).forEach((function(t){var o=cl(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 Sc(t).forEach((function(t){var o=cl(t,n.startPoint);r?o<r&&(r=o,e=t):(r=o,e=t)})),e}},{key:"getProperties",value:function(){return Object(f.G)(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(f.G)(this.properties)};return n&&(o.text={x:e,y:r,value:n}),this.graphModel.overlapMode===ha.INCREASE&&(o.zIndex=this.zIndex),o}},{key:"setProperty",value:function(t,e){this.properties[t]=Xc(e),this.setAttributes()}},{key:"setProperties",value:function(t){Object.assign(this.properties,Xc(t)),this.setAttributes()}},{key:"updateData",value:function(t){var e=Xc(ea(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"===Vc(e.text)){var s=Object.assign({},this.text,e.text);e.text=ea(s,"x","y","value","draggable","editable")}Di(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&&Di(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]&&Di(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jc.zIndex;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Di(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})}}])&&$c(e.prototype,r),n&&$c(e,n),t}()).prototype,"state",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),nc=Kc(ec.prototype,"text",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.text}}),oc=Kc(ec.prototype,"type",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ic=Kc(ec.prototype,"properties",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ac=Kc(ec.prototype,"sourceNodeId",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.sourceNodeId}}),uc=Kc(ec.prototype,"targetNodeId",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.targetNodeId}}),cc=Kc(ec.prototype,"startPoint",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.startPoint}}),sc=Kc(ec.prototype,"endPoint",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.endPoint}}),lc=Kc(ec.prototype,"strokeWidth",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.strokeWidth}}),fc=Kc(ec.prototype,"stroke",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.stroke}}),pc=Kc(ec.prototype,"strokeDashArray",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.strokeDashArray}}),yc=Kc(ec.prototype,"outlineColor",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.outlineColor}}),dc=Kc(ec.prototype,"hideOutline",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.hideOutline}}),hc=Kc(ec.prototype,"outlineStrokeDashArray",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.outlineStrokeDashArray}}),vc=Kc(ec.prototype,"strokeOpacity",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.strokeOpacity}}),bc=Kc(ec.prototype,"zIndex",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.zIndex}}),gc=Kc(ec.prototype,"isSelected",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.isSelected}}),mc=Kc(ec.prototype,"isHovered",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.isHovered}}),Oc=Kc(ec.prototype,"isHitable",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),wc=Kc(ec.prototype,"hoverStroke",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.hoverStroke}}),_c=Kc(ec.prototype,"selectedStroke",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.selectedStroke}}),xc=Kc(ec.prototype,"points",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.points}}),Ec=Kc(ec.prototype,"pointsList",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Jc.pointsList}}),jc=Kc(ec.prototype,"draggable",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Kc(ec.prototype,"sourceNode",[f.k],Object.getOwnPropertyDescriptor(ec.prototype,"sourceNode"),ec.prototype),Kc(ec.prototype,"targetNode",[f.k],Object.getOwnPropertyDescriptor(ec.prototype,"targetNode"),ec.prototype),Kc(ec.prototype,"textPosition",[f.k],Object.getOwnPropertyDescriptor(ec.prototype,"textPosition"),ec.prototype),Kc(ec.prototype,"setProperty",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setProperty"),ec.prototype),Kc(ec.prototype,"setProperties",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setProperties"),ec.prototype),Kc(ec.prototype,"updateData",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateData"),ec.prototype),Kc(ec.prototype,"formatText",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"formatText"),ec.prototype),Kc(ec.prototype,"resetTextPosition",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"resetTextPosition"),ec.prototype),Kc(ec.prototype,"moveText",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"moveText"),ec.prototype),Kc(ec.prototype,"setText",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setText"),ec.prototype),Kc(ec.prototype,"updateText",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateText"),ec.prototype),Kc(ec.prototype,"setAnchors",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setAnchors"),ec.prototype),Kc(ec.prototype,"setSelected",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setSelected"),ec.prototype),Kc(ec.prototype,"setHovered",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setHovered"),ec.prototype),Kc(ec.prototype,"setHitable",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setHitable"),ec.prototype),Kc(ec.prototype,"setElementState",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setElementState"),ec.prototype),Kc(ec.prototype,"updateStroke",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateStroke"),ec.prototype),Kc(ec.prototype,"updateStrokeWidth",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateStrokeWidth"),ec.prototype),Kc(ec.prototype,"updateStartPoint",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateStartPoint"),ec.prototype),Kc(ec.prototype,"updateEndPoint",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateEndPoint"),ec.prototype),Kc(ec.prototype,"setStyleFromTheme",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setStyleFromTheme"),ec.prototype),Kc(ec.prototype,"setZIndex",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"setZIndex"),ec.prototype),Kc(ec.prototype,"initPoints",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"initPoints"),ec.prototype),Kc(ec.prototype,"updateAttributes",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateAttributes"),ec.prototype),Kc(ec.prototype,"getAdjustStart",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"getAdjustStart"),ec.prototype),Kc(ec.prototype,"getAdjustEnd",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"getAdjustEnd"),ec.prototype),Kc(ec.prototype,"updateAfterAdjustStartAndEnd",[f.i],Object.getOwnPropertyDescriptor(ec.prototype,"updateAfterAdjustStartAndEnd"),ec.prototype),ec),ts=Qc;function es(t){return(es="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 rs(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 os(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=us(t);if(e){var o=us(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return is(this,r)}}function is(t,e){if(e&&("object"===es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return as(t)}function as(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function us(t){return(us=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cs,ss,ls=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=os(i);function i(t,e){var r,n,a,u;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"),n=as(r),a="modelType",u=ca.LINE_EDGE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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}}}])&&rs(e.prototype,r),n&&rs(e,n),i}(ts);r(37);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 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 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 ds(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 hs(t,e,r){return(hs="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=Os(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 vs(t,e){return(vs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bs(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=Os(t);if(e){var o=Os(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gs(this,r)}}function gs(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 ms(t)}function ms(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Os(t){return(Os=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ws(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _s(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 xs=(ss=_s((cs=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&&vs(t,e)}(i,t);var e,r,n,o=bs(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),ws(ms(r=o.call(this,t,e,"polyline")),"modelType",ca.POLYLINE_EDGE),ws(ms(r),"offset",ku.polyline.offset),ws(ms(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})}(ms(r),"dbClickPosition",ss,ms(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=Qs(this.points),o=ps($s(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===fa.HORIZONTAL?i=Math.abs(e.y-r.y):t===fa.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===fa.HORIZONTAL?n={x:r.x,y:e.y}:t===fa.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(Ks(a,o,this.sourceNode)){if(Zs(o,i,this.sourceNode)){var u=qs(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)&&kc(e.x,e.y,o.x,o.y)<kc(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(Ks(s,l,this.targetNode)){if(Zs(c,s,this.targetNode)){var f=qs(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)&&kc(t.x,t.y,s.x,s.y)<kc(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=Js(r,n),f=e[0];switch(c){case ca.RECT_NODE:0!==a.radius&&(Rc(r,a)||(f=Nc(r,l,a)));break;case ca.CIRCLE_NODE:f=Cc(r,l,a);break;case ca.ELLIPSE_NODE:f=Ic(r,l,a);break;case ca.DIAMOND_NODE:case ca.POLYGON_NODE:f=Lc(r,l,a)}e[0]=f;var p=Js(o,i),y=e[e.length-1];switch(s){case ca.RECT_NODE:0!==u.radius&&(Rc(i,u)||(y=Nc(i,p,u)));break;case ca.CIRCLE_NODE:y=Cc(i,p,u);break;case ca.ELLIPSE_NODE:y=Ic(i,p,u);break;case ca.DIAMOND_NODE:case ca.POLYGON_NODE:y=Lc(i,p,u)}return e[e.length-1]=y,e}},{key:"getData",value:function(){var t=hs(Os(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=Ws({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===fa.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===fa.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===fa.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(!Dc(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(!Dc(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDragingPoints(a,"end",f,p,c)}}c=Vs(c),this.updatePointsAfterDrage(c),this.draginngPointList=c}else if(a===fa.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(!Dc(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(!Dc(v,this.targetNode)){var b=this.targetNode.anchors;y=this.getDragingPoints(a,"end",v,b,y)}}y=Vs(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=Qs(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=Ws({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&ds(e.prototype,r),n&&ds(e,n),i}(ts)).prototype,"dbClickPosition",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_s(cs.prototype,"initPoints",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"initPoints"),cs.prototype),_s(cs.prototype,"updatePoints",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"updatePoints"),cs.prototype),_s(cs.prototype,"updateStartPoint",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"updateStartPoint"),cs.prototype),_s(cs.prototype,"updateEndPoint",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"updateEndPoint"),cs.prototype),_s(cs.prototype,"dragAppendStart",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"dragAppendStart"),cs.prototype),_s(cs.prototype,"dragAppendSimple",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"dragAppendSimple"),cs.prototype),_s(cs.prototype,"dragAppend",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"dragAppend"),cs.prototype),_s(cs.prototype,"dragAppendEnd",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"dragAppendEnd"),cs.prototype),_s(cs.prototype,"updatePointsAfterDrage",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"updatePointsAfterDrage"),cs.prototype),_s(cs.prototype,"getAdjustStart",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"getAdjustStart"),cs.prototype),_s(cs.prototype,"getAdjustEnd",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"getAdjustEnd"),cs.prototype),_s(cs.prototype,"updateAfterAdjustStartAndEnd",[f.i],Object.getOwnPropertyDescriptor(cs.prototype,"updateAfterAdjustStartAndEnd"),cs.prototype),cs),Es=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 js(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 Ss(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?js(Object(r),!0).forEach((function(e){Ps(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):js(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ps(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function As(t){return function(t){if(Array.isArray(t))return Ms(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ts(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 ks(t){return(ks="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 Ds(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)||Ts(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 Ts(t,e){if(t){if("string"==typeof t)return Ms(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)?Ms(t,e):void 0}}function Ms(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 Ns=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},Cs=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}},Rs=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?fa.HORIZONTAL:fa.VERTICAL}(e,t)===fa.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}},Is=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}},Ls=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}},zs=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}]},Bs=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Hs=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Us=function(t,e,r,n,o){return Hs(t,e)+Hs(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])},Xs=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},Fs=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=Ds(zs(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return Xs(t,e,o,i)||Xs(t,e,o,u)||Xs(t,e,i,a)||Xs(t,e,a,u)},Gs=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=Us(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||Fs(t,e,r)||Fs(t,e,n)||o.push(t))})),Ns(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]+Hs(v,t);l[t.id]&&n>=l[t.id]||(s[t.id]=v.id,l[t.id]=n,f[t.id]=l[t.id]+Us(t,r,e,i,a))}}))};c.length;){var d=y();if("object"===ks(d))return d.v}return[e,r]},Ys=function(t){return Mc(t)},Vs=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},Ws=function(t,e,r,n,o){var i,a,u=Ys(r),c=Ys(n),s=Cs(u,o),l=Cs(c,o),f=Rs(s,t),p=Rs(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=tl(t,e,f,p);return[t,f].concat(As(y),[p,e])}var d=Ls([f,p]),h=Is(s,d),v=Is(l,d),b=[];b=(b=b.concat(zs(h))).concat(zs(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 Bs(t,s)&&Bs(t,l)})))})),[{x:f.x,y:p.y},{x:p.x,y:f.y}].forEach((function(t){Bs(t,s)&&Bs(t,l)&&b.push(t)})),b.unshift(f),b.push(p),b=Ns(b);var m=Gs(b,f,p,u,c,t,e);return m.unshift(t),m.push(e),m.length>2&&(m=Vs(m)),Ns(m)},$s=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=kc(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=kc(a.x,a.y,u.x,u.y);c>o&&(o=c,r=a,n=u)}e=[r,n]}return e},Ks=function(t,e,r){var n=Dc(t,r),o=Dc(e,r);return n&&o},Zs=function(t,e,r){var n=Dc(t,r),o=Dc(e,r);return!(n&&o)&&(n||o)},qs=function(t,e,r){for(var n,o,i=Mc(r),a=zs(i),u=0;u<a.length;u++){Xs(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},Js=function(t,e){var r;return t.x===e.x?r=fa.VERTICAL:t.y===e.y&&(r=fa.HORIZONTAL),r},Qs=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=Ds(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},tl=function(t,e,r,n){var o=[];if(Js(t,r)===Js(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=Zu(i,t,r),u=Zu(i,e,n);if(a||u)i={x:n.x,y:r.y};else{var c=el(i,t,r),s=el(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},el=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},rl=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},nl=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,a=Mc(n),u=Mc(o),c=Cs(a,i),s=Cs(u,i);return{sNext:Rs(c,e),ePre:Rs(s,r)}},ol=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[il(e[0]),il(e[1]),il(e[2]),il(e[3])]},il=function(t){var e=Ds(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},al=function(t,e){for(var r,n=t.x,o=t.y,i=Qs(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(Zu(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(Zu(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},ul=function(t){return ea(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},cl=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};var sl=function(){};function ll(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 fl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pl=window.document;function yl(t){var e=t.onDragStart,r=void 0===e?sl:e,n=t.onDraging,o=void 0===n?sl:n,i=t.onDragEnd,a=void 0===i?sl: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,pl.removeEventListener("mousemove",b,!1),pl.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,pl.addEventListener("mousemove",b,!1),pl.addEventListener("mouseup",g,!1),r({event:t})}}var dl,hl,vl,bl,gl,ml,Ol,wl,_l,xl,El,jl,Sl,Pl,Al,kl,Dl,Tl,Ml=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?sl:n,i=e.onDraging,a=void 0===i?sl:i,u=e.onDragEnd,c=void 0===u?sl: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),fl(this,"onDragStart",void 0),fl(this,"onDraging",void 0),fl(this,"onDragEnd",void 0),fl(this,"step",void 0),fl(this,"isStopPropagation",void 0),fl(this,"isDraging",!1),fl(this,"isStartDraging",!1),fl(this,"startX",0),fl(this,"startY",0),fl(this,"sumDeltaX",0),fl(this,"sumDeltaY",0),fl(this,"eventType",void 0),fl(this,"eventCenter",void 0),fl(this,"model",void 0),fl(this,"startTime",void 0),fl(this,"isGrag",void 0),fl(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,pl.addEventListener("mousemove",r.handleMouseMove,!1),pl.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(la["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(la["".concat(r.eventType,"_DRAGSTART")],{e:t,data:i}),r.startTime=(new Date).getTime()}})),fl(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(la["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:s}),null===(o=r.eventCenter)||void 0===o||o.emit(la["".concat(r.eventType,"_DRAG")],{e:t,data:s})}})),fl(this,"handleMouseUp",(function(t){var e,n,o;if(r.isStartDraging=!1,r.isStopPropagation&&t.stopPropagation(),pl.removeEventListener("mousemove",r.handleMouseMove,!1),pl.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(la["".concat(r.eventType,"_MOUSEUP")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(la["".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}}])&&ll(e.prototype,r),n&&ll(e,n),t}();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){Bl(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){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 Il(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 Il(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 Il(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 Ll(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 zl(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 Bl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hl(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 Ul,Xl=(hl=Hl((dl=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Bl(this,"BaseType",sa.GRAPH),Bl(this,"modelType",ca.GRAPH),Bl(this,"rootEl",void 0),Bl(this,"theme",void 0),Bl(this,"eventCenter",void 0),Bl(this,"modelMap",new Map),Bl(this,"width",void 0),Bl(this,"height",void 0),Bl(this,"topElement",void 0),Bl(this,"selectElement",void 0),Bl(this,"idGenerator",void 0),Bl(this,"nodeMoveRules",[]),Ll(this,"edgeType",hl,this),Ll(this,"nodes",vl,this),Ll(this,"activeElement",bl,this),Ll(this,"activeElementState",gl,this),Ll(this,"state",ml,this),Ll(this,"additionStateData",Ol,this),Ll(this,"edges",wl,this),Ll(this,"isSlient",_l,this),Ll(this,"overlapMode",xl,this),Ll(this,"plugins",El,this),Ll(this,"tools",jl,this),Ll(this,"background",Sl,this),Ll(this,"transformMatrix",Pl,this),Ll(this,"editConfig",Al,this),Ll(this,"gridSize",kl,this),Ll(this,"partial",Dl,this),Ll(this,"fakerNode",Tl,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 da(e),this.eventCenter=l,this.transformMatrix=new Da(l),this.theme=Nu(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===aa.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===aa.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=Rl(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===sa.NODE){for(var o=Mc(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=Rl(h,2);if(y=v[0],d=v[1],!Bu([y,d],e,r)){l=!1;break}}return l}if(t.BaseType===sa.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]),_=Bu(O,e,r),x=Bu(w,e,r);return n?_&&x:_||x}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=yi(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=Cu(n,e.gridSize),t.y=Cu(o,e.gridSize),"[object Object]"===Object.prototype.toString.call(t.text)&&(t.text.x-=Ru(n,e.gridSize),t.text.y-=Ru(o,e.gridSize))),new r(t,e)})),this.edges=yi(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===sa.NODE&&r.nodes.push(n.getData()),n.BaseType===sa.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=$u()),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=$u()),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]=Cl(Cl({},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=Yc()),"bottom"===e&&(o=--Gc),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(la.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=Xc(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(la.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,aa.TEXT_EDIT)}},{key:"createEdge",value:function(t){var e=Xc(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(Cl(Cl({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(la.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===ca.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,p=al(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(la.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(la.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(la.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(la.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(aa.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(aa.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!==ha.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=zc(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=zc(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=Nu(Cl(Cl({},this.theme),t))}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}}])&&zl(e.prototype,r),n&&zl(e,n),t}()).prototype,"edgeType",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vl=Hl(dl.prototype,"nodes",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),bl=Hl(dl.prototype,"activeElement",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),gl=Hl(dl.prototype,"activeElementState",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ml=Hl(dl.prototype,"state",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ol=Hl(dl.prototype,"additionStateData",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),wl=Hl(dl.prototype,"edges",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),_l=Hl(dl.prototype,"isSlient",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xl=Hl(dl.prototype,"overlapMode",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),El=Hl(dl.prototype,"plugins",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),jl=Hl(dl.prototype,"tools",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Sl=Hl(dl.prototype,"background",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Pl=Hl(dl.prototype,"transformMatrix",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Al=Hl(dl.prototype,"editConfig",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kl=Hl(dl.prototype,"gridSize",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Dl=Hl(dl.prototype,"partial",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tl=Hl(dl.prototype,"fakerNode",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hl(dl.prototype,"nodesMap",[f.k],Object.getOwnPropertyDescriptor(dl.prototype,"nodesMap"),dl.prototype),Hl(dl.prototype,"edgesMap",[f.k],Object.getOwnPropertyDescriptor(dl.prototype,"edgesMap"),dl.prototype),Hl(dl.prototype,"sortElements",[f.k],Object.getOwnPropertyDescriptor(dl.prototype,"sortElements"),dl.prototype),Hl(dl.prototype,"textEditElement",[f.k],Object.getOwnPropertyDescriptor(dl.prototype,"textEditElement"),dl.prototype),Hl(dl.prototype,"selectElements",[f.k],Object.getOwnPropertyDescriptor(dl.prototype,"selectElements"),dl.prototype),Hl(dl.prototype,"setFakerNode",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setFakerNode"),dl.prototype),Hl(dl.prototype,"removeFakerNode",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"removeFakerNode"),dl.prototype),Hl(dl.prototype,"setModel",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setModel"),dl.prototype),Hl(dl.prototype,"updateEdgeByIndex",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"updateEdgeByIndex"),dl.prototype),Hl(dl.prototype,"toFront",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"toFront"),dl.prototype),Hl(dl.prototype,"setElementZIndex",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setElementZIndex"),dl.prototype),Hl(dl.prototype,"deleteNode",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"deleteNode"),dl.prototype),Hl(dl.prototype,"addNode",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"addNode"),dl.prototype),Hl(dl.prototype,"cloneNode",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"cloneNode"),dl.prototype),Hl(dl.prototype,"moveNode",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"moveNode"),dl.prototype),Hl(dl.prototype,"moveNode2Coordinate",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"moveNode2Coordinate"),dl.prototype),Hl(dl.prototype,"setTextEditable",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setTextEditable"),dl.prototype),Hl(dl.prototype,"createEdge",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"createEdge"),dl.prototype),Hl(dl.prototype,"moveEdge",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"moveEdge"),dl.prototype),Hl(dl.prototype,"removeEdge",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"removeEdge"),dl.prototype),Hl(dl.prototype,"removeEdgeById",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"removeEdgeById"),dl.prototype),Hl(dl.prototype,"removeEdgeBySource",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"removeEdgeBySource"),dl.prototype),Hl(dl.prototype,"removeEdgeByTarget",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"removeEdgeByTarget"),dl.prototype),Hl(dl.prototype,"setElementState",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setElementState"),dl.prototype),Hl(dl.prototype,"setElementStateById",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setElementStateById"),dl.prototype),Hl(dl.prototype,"setElementTextById",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setElementTextById"),dl.prototype),Hl(dl.prototype,"resetElementState",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"resetElementState"),dl.prototype),Hl(dl.prototype,"selectNodeById",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"selectNodeById"),dl.prototype),Hl(dl.prototype,"selectEdgeById",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"selectEdgeById"),dl.prototype),Hl(dl.prototype,"selectElementById",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"selectElementById"),dl.prototype),Hl(dl.prototype,"clearSelectElements",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"clearSelectElements"),dl.prototype),Hl(dl.prototype,"moveElements",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"moveElements"),dl.prototype),Hl(dl.prototype,"moveNodes",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"moveNodes"),dl.prototype),Hl(dl.prototype,"setDefaultEdgeType",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setDefaultEdgeType"),dl.prototype),Hl(dl.prototype,"changeNodeType",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"changeNodeType"),dl.prototype),Hl(dl.prototype,"changeEdgeType",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"changeEdgeType"),dl.prototype),Hl(dl.prototype,"setTheme",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"setTheme"),dl.prototype),Hl(dl.prototype,"clearData",[f.i],Object.getOwnPropertyDescriptor(dl.prototype,"clearData"),dl.prototype),dl),Fl=Xl;function Gl(t){return(Gl="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 Vl(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 Wl(t,e){return(Wl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $l(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=ql(t);if(e){var o=ql(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Kl(this,r)}}function Kl(t,e){if(e&&("object"===Gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zl(t)}function Zl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ql(t){return(ql=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ql,tf=mw(Ul=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&&Wl(t,e)}(i,t);var e,r,n,o=$l(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),Jl(Zl(e=o.call(this)),"stepDrag",void 0),Jl(Zl(e),"stepScrollX",0),Jl(Zl(e),"stepScrollY",0),Jl(Zl(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)})),Jl(Zl(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),Jl(Zl(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}}})),Jl(Zl(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(aa.DEFAULT),o.emit(la.BLANK_CLICK,{e:t})}})),Jl(Zl(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(aa.SHOW_MENU,i.domOverlayPosition),o.emit(la.BLANK_CONTEXTMENU,{e:t,position:i})}})),Jl(Zl(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(la.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 Ml({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 b("svg",Yl({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()),b("g",{transform:t},r))}}])&&Vl(e.prototype,r),n&&Vl(e,n),i}(w))||Ul;function ef(t){return(ef="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 rf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 of(t,e){return(of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function af(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=sf(t);if(e){var o=sf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uf(this,r)}}function uf(t,e){if(e&&("object"===ef(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return cf(t)}function cf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sf(t){return(sf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function lf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ff=mw(Ql=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&&of(t,e)}(i,t);var e,r,n,o=af(i);function i(){var t;rf(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return lf(cf(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 b(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"render",value:function(){return b("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&nf(e.prototype,r),n&&nf(e,n),i}(w))||Ql;r(178);function pf(t){return(pf="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function df(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 hf(t,e){return(hf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vf(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=gf(t);if(e){var o=gf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bf(this,r)}}function bf(t,e){if(e&&("object"===pf(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 gf(t){return(gf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mf,Of=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&&hf(t,e)}(i,t);var e,r,n,o=vf(i);function i(){return yf(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;return b("div",{className:"lf-background"},b("div",{style:{backgroundImage:e,backgroundColor:r,backgroundRepeat:n,backgroundPosition:t.position,backgroundSize:o,opacity:t.opacity},className:"lf-background-area"}))}},{key:"render",value:function(){return this.getShape()}}])&&df(e.prototype,r),n&&df(e,n),i}(w);function wf(t){return(wf="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(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xf(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 Ef(t,e){return(Ef=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function jf(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=Af(t);if(e){var o=Af(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sf(this,r)}}function Sf(t,e){if(e&&("object"===wf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Pf(t)}function Pf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Af(t){return(Af=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function kf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Df=mw(mf=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&&Ef(t,e)}(i,t);var e,r,n,o=jf(i);function i(){var t;_f(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return kf(Pf(t=o.call.apply(o,[this].concat(r))),"id",$u()),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),b("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=1;return a||(c=0),b("path",{d:"M ".concat(i," 0 H0 M0 0 V0 ").concat(i),stroke:r,strokeWidth:u,opacity:c})}},{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 b("div",{className:"lf-grid"},b("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},b("defs",null,b("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())),b("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&xf(e.prototype,r),n&&xf(e,n),i}(w))||mf;Df.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(44);function Tf(t){return(Tf="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 Mf(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 Nf(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 Nf(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 Nf(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 Cf,Rf=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=Mf(t,2),n=r[0],o=r[1];"object"!==Tf(o)&&(e[n]=o)})),b("line",e)};function If(t){return(If="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 Lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zf(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 Bf(t,e){return(Bf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hf(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=Xf(t);if(e){var o=Xf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uf(this,r)}}function Uf(t,e){if(e&&("object"===If(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 Xf(t){return(Xf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ff,Gf=mw(Cf=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&&Bf(t,e)}(i,t);var e,r,n,o=Hf(i);function i(){return Lf(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:u,y1:-1e5,x2:u,y2:1e5,stroke:n?o:"none",strokeWidth:i};return b("g",{className:"lf-snapline"},b(Rf,{x1:-1e5,y1:s,x2:1e5,y2:s,stroke:r?o:"none",strokeWidth:i}),b(Rf,l))}}])&&zf(e.prototype,r),n&&zf(e,n),i}(w))||Cf;function Yf(t){return(Yf="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 Vf(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 Wf(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 Wf(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 Wf(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 $f(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=Vf(t,2),r=e[0],n=e[1];"object"!==Yf(n)&&(s[r]=n)})),s.x=u,s.y=c,b("rect",s)}function Kf(t){return(Kf="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 Zf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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(t,e){return(Jf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qf(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=ep(t);if(e){var o=ep(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tp(this,r)}}function tp(t,e){if(e&&("object"===Kf(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 ep(t){return(ep=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}$f.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var rp,np=mw(Ff=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&&Jf(t,e)}(i,t);var e,r,n,o=Qf(i);function i(){return Zf(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===sa.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(b($f,{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===ca.LINE_EDGE?n.push(this.getLineOutline(i)):i.modelType===ca.POLYLINE_EDGE?n.push(this.getPolylineOutline(i)):i.modelType===ca.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;return b($f,{className:"lf-outline-edge",x:n,y:o,width:i,height:a,radius:0,fill:"none",stroke:u.outlineColor,strokeDasharray:u.outlineStrokeDashArray})}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=Qs(e),n=Ls(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=this.props.graphModel.theme.polyline;return b($f,{className:"lf-outline",x:o,y:i,width:a,height:u,radius:0,fill:"none",stroke:c.outlineColor,strokeDasharray:c.outlineStrokeDashArray})}},{key:"getBezierOutline",value:function(t){var e=t.path,r=ol(e),n=Ls(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=this.props.graphModel.theme.bezier;return b($f,{className:"lf-outline",x:o,y:i,width:a,height:u,radius:0,fill:"none",stroke:c.outlineColor,strokeDasharray:c.outlineStrokeDashArray})}},{key:"render",value:function(){return b("g",{className:"lf-outline"},this.getNodeOutline(),this.getEdgeOutline())}}])&&qf(e.prototype,r),n&&qf(e,n),i}(w))||Ff;function op(t){return(op="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){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 ap(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 ap(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 ap(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 up(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=ip(t,2),r=e[0],n=e[1];"object"!==op(n)&&(a[r]=n)})),b("circle",a)}function cp(t){return(cp="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 sp(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 lp(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 lp(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 lp(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 fp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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,r){return e&&pp(t.prototype,e),r&&pp(t,r),t}function dp(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&&hp(t,e)}function hp(t,e){return(hp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vp(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=mp(t);if(e){var o=mp(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"===cp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return gp(t)}function gp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mp(t){return(mp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Op(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wp,_p=function(t){dp(r,t);var e=vp(r);function r(t){var n;fp(this,r),Op(gp(n=e.call(this)),"dragHandler",void 0),Op(gp(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=sp(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)})),Op(gp(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=yl({onDraging:n.onDraging,onDragEnd:n.onDragEnd});var o=t.position;return n.state={endX:o.x,endY:o.y},n}return yp(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;return b(up,{className:"lf-bezier-adjust-anchor",x:o,y:i,r:4,stroke:a.adjustAnchorStroke,fill:a.adjustAnchorFill,fillOpacity:a.adjustAnchorFillOpacity,onMouseDown:this.dragHandler})}}]),r}(w),xp=mw(rp=function(t){dp(r,t);var e=vp(r);function r(){return fp(this,r),e.apply(this,arguments)}return yp(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=sp(ol(r),4),i=o[0],a=o[1],u=o[2],c=o[3],s=e.theme.bezier.adjustLineColor,l=[];return l.push(b(Rf,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,stroke:s})),l.push(b(_p,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(b(Rf,{x1:c.x,y1:c.y,x2:u.x,y2:u.y,stroke:s})),l.push(b(_p,{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===ca.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return b("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(w))||rp;function Ep(t){return(Ep="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 jp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sp(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 Pp(t,e){return(Pp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ap(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"===Ep(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 Dp(t){return(Dp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tp,Mp=mw(wp=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&&Pp(t,e)}(i,t);var e,r,n,o=Ap(i);function i(){return jp(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return b("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},b("g",{transform:this.props.graphModel.transformMatrix.getTransformStyle().transform},this.props.children))}}])&&Sp(e.prototype,r),n&&Sp(e,n),i}(w))||wp;function Np(t){return(Np="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 Cp(){return(Cp=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 Rp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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=Hp(t);if(e){var o=Hp(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"===Np(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 Hp(t){return(Hp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Up=mw(Tp=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(){return Rp(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 b(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 b("div",{className:"lf-graph",style:c},b(tf,{graphModel:r,eventCenter:i,dnd:a},b("g",{className:"lf-base"},yi(r.sortElements,(function(e){return t.getComponent(e,r,i)}))),s?this.getComponent(s,r,i):""),b(Mp,{graphModel:r},o.hideOutline?"":b(np,{graphModel:r}),l?b(xp,{graphModel:r}):"",o.isSilentMode||!1===o.snapline?"":b(Gf,{snaplineModel:u})),b(ff,{graphModel:r,tool:n}),o.background&&b(Of,{background:o.background}),o.grid&&b(Df,Cp({},o.grid,{graphModel:r})))}}])&&Ip(e.prototype,r),n&&Ip(e,n),i}(w))||Tp;function Xp(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 Fp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xp(Object(r),!0).forEach((function(e){Yp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gp(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,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vp=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),Yp(this,"nodeConfig",void 0),Yp(this,"lf",void 0),Yp(this,"options",void 0),Yp(this,"fakerNode",void 0),Yp(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),Yp(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(Fp(Fp({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),Yp(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(la.NODE_DND_DRAG,{data:i})}return!1})),Yp(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),Yp(this,"onDrop",(function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(Fp(Fp({},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(la.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=ti(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,a=o.y;return{x:Cu(i,n),y:Cu(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}}}])&&Gp(e.prototype,r),n&&Gp(e,n),t}();function Wp(t){var e=t.container,r=t.grid;if(!e)throw new Error("请检查 container 参数是否有效");return r&&(t.grid=Di({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Di({},Zp,t)}var $p,Kp,Zp={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function qp(t){return(qp="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 Jp(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 Qp(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 Qp(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 Qp(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 ty(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 ey(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ty(Object(r),!0).forEach((function(e){sy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ty(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ry(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 ny(t,e,r){return(ny="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=cy(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 oy(t,e){return(oy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function iy(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=cy(t);if(e){var o=cy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ay(this,r)}}function ay(t,e){if(e&&("object"===qp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return uy(t)}function uy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cy(t){return(cy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ly(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 fy,py,yy,dy,hy,vy,by,gy,my,Oy,wy,_y,xy,Ey,jy,Sy,Py,Ay,ky,Dy,Ty,My,Ny,Cy,Ry,Iy,Ly=(Kp=ly(($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&&oy(t,e)}(i,t);var e,r,n,o=iy(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),sy(uy(r=o.call(this,t,e,"bezier")),"modelType",ca.BEZIER_EDGE),sy(uy(r),"offset",ku.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})}(uy(r),"path",Kp,uy(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=ny(cy(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return ey(ey({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return nl({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=Jp(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=Jp(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=nl({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()}}])&&ry(e.prototype,r),n&&ry(e,n),i}(ts)).prototype,"path",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ly($p.prototype,"initPoints",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"initPoints"),$p.prototype),ly($p.prototype,"updatePoints",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"updatePoints"),$p.prototype),ly($p.prototype,"updatePath",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"updatePath"),$p.prototype),ly($p.prototype,"updateStartPoint",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"updateStartPoint"),$p.prototype),ly($p.prototype,"updateEndPoint",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"updateEndPoint"),$p.prototype),ly($p.prototype,"updateAdjustAnchor",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"updateAdjustAnchor"),$p.prototype),ly($p.prototype,"getAdjustStart",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"getAdjustStart"),$p.prototype),ly($p.prototype,"getAdjustEnd",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"getAdjustEnd"),$p.prototype),ly($p.prototype,"updateAfterAdjustStartAndEnd",[f.i],Object.getOwnPropertyDescriptor($p.prototype,"updateAfterAdjustStartAndEnd"),$p.prototype),$p);r(39);function zy(t){return(zy="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 By(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 Hy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?By(Object(r),!0).forEach((function(e){Yy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):By(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Uy(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 Xy(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 Xy(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 Xy(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 Fy(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 Gy(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 Yy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vy(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 Wy,$y,Ky=Di({x:0,y:0,zIndex:1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},hideOutline:!1},ku.rect,ku.circle),Zy=(py=Vy((fy=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),Yy(this,"id",$u()),Yy(this,"BaseType",sa.NODE),Yy(this,"modelType",ca.NODE),Yy(this,"additionStateData",void 0),Yy(this,"targetRules",[]),Yy(this,"sourceRules",[]),Yy(this,"moveRules",[]),Yy(this,"hasSetTargetRules",!1),Yy(this,"hasSetSourceRules",!1),Fy(this,"properties",py,this),Fy(this,"type",yy,this),Fy(this,"x",dy,this),Fy(this,"y",hy,this),Fy(this,"_width",vy,this),Yy(this,"graphModel",void 0),Fy(this,"_height",by,this),Fy(this,"fill",gy,this),Fy(this,"fillOpacity",my,this),Fy(this,"strokeWidth",Oy,this),Fy(this,"stroke",wy,this),Fy(this,"strokeOpacity",_y,this),Fy(this,"opacity",xy,this),Fy(this,"outlineColor",Ey,this),Fy(this,"hideOutline",jy,this),Fy(this,"hoverOutlineColor",Sy,this),Fy(this,"outlineStrokeDashArray",Py,this),Fy(this,"hoverOutlineStrokeDashArray",Ay,this),Fy(this,"isSelected",ky,this),Fy(this,"isHovered",Dy,this),Fy(this,"isHitable",Ty,this),Fy(this,"zIndex",My,this),Fy(this,"anchorsOffset",Ny,this),Fy(this,"state",Cy,this),Fy(this,"text",Ry,this),Fy(this,"draggable",Iy,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),Di(this,function(t){return ea(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===ha.INCREASE&&(this.zIndex=t.zIndex||Yc())}},{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,o=this.properties;Object(f.v)(o)&&(o=Object(f.G)(o));var i={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return this.graphModel.overlapMode===ha.INCREASE&&(i.zIndex=this.zIndex),n&&(i.text={x:e,y:r,value:n}),i}},{key:"getProperties",value:function(){return Object(f.G)(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=Uy(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=Uy(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]}):Hy(Hy({},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=Xc(ea(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"===zy(e.text)){var u=Hy(Hy({},this.text),e.text);e.text=ea(u,"x","y","value","draggable","editable")}Di(this,e)}},{key:"setProperty",value:function(t,e){this.properties=Hy(Hy({},this.properties),{},Yy({},t,Xc(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Hy(Hy({},this.properties),Xc(t)),this.setAttributes()}},{key:"setStyleFromTheme",value:function(t,e){var r=e.theme;r[t]&&Di(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ky.zIndex;this.zIndex=t}},{key:"updateAttributes",value:function(t){Di(this,t)}}])&&Gy(e.prototype,r),n&&Gy(e,n),t}()).prototype,"properties",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),yy=Vy(fy.prototype,"type",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),dy=Vy(fy.prototype,"x",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.x}}),hy=Vy(fy.prototype,"y",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.y}}),vy=Vy(fy.prototype,"_width",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.width}}),by=Vy(fy.prototype,"_height",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.height}}),gy=Vy(fy.prototype,"fill",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.fill}}),my=Vy(fy.prototype,"fillOpacity",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.fillOpacity}}),Oy=Vy(fy.prototype,"strokeWidth",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.strokeWidth}}),wy=Vy(fy.prototype,"stroke",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.stroke}}),_y=Vy(fy.prototype,"strokeOpacity",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.strokeOpacity}}),xy=Vy(fy.prototype,"opacity",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.opacity}}),Ey=Vy(fy.prototype,"outlineColor",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.outlineColor}}),jy=Vy(fy.prototype,"hideOutline",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.hideOutline}}),Sy=Vy(fy.prototype,"hoverOutlineColor",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.hoverOutlineColor}}),Py=Vy(fy.prototype,"outlineStrokeDashArray",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.outlineStrokeDashArray}}),Ay=Vy(fy.prototype,"hoverOutlineStrokeDashArray",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.hoverOutlineStrokeDashArray}}),ky=Vy(fy.prototype,"isSelected",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dy=Vy(fy.prototype,"isHovered",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ty=Vy(fy.prototype,"isHitable",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),My=Vy(fy.prototype,"zIndex",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.zIndex}}),Ny=Vy(fy.prototype,"anchorsOffset",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cy=Vy(fy.prototype,"state",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ry=Vy(fy.prototype,"text",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ky.text}}),Iy=Vy(fy.prototype,"draggable",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vy(fy.prototype,"addNodeMoveRules",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"addNodeMoveRules"),fy.prototype),Vy(fy.prototype,"move",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"move"),fy.prototype),Vy(fy.prototype,"moveTo",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"moveTo"),fy.prototype),Vy(fy.prototype,"moveText",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"moveText"),fy.prototype),Vy(fy.prototype,"updateText",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"updateText"),fy.prototype),Vy(fy.prototype,"setSelected",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setSelected"),fy.prototype),Vy(fy.prototype,"setHovered",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setHovered"),fy.prototype),Vy(fy.prototype,"setHitable",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setHitable"),fy.prototype),Vy(fy.prototype,"setElementState",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setElementState"),fy.prototype),Vy(fy.prototype,"updateStroke",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"updateStroke"),fy.prototype),Vy(fy.prototype,"updateData",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"updateData"),fy.prototype),Vy(fy.prototype,"setProperty",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setProperty"),fy.prototype),Vy(fy.prototype,"setProperties",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setProperties"),fy.prototype),Vy(fy.prototype,"setStyleFromTheme",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setStyleFromTheme"),fy.prototype),Vy(fy.prototype,"setZIndex",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"setZIndex"),fy.prototype),Vy(fy.prototype,"updateAttributes",[f.i],Object.getOwnPropertyDescriptor(fy.prototype,"updateAttributes"),fy.prototype),fy);function qy(t){return(qy="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 Jy(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 Qy(t,e){return(Qy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function td(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 ed(this,r)}}function ed(t,e){if(e&&("object"===qy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return rd(t)}function rd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nd(t){return(nd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function od(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 id,ad,ud,cd=($y=od((Wy=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&&Qy(t,e)}(i,t);var e,r,n,o=td(i);function i(t,e){var r,n,a,u;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"),n=rd(r),a="modelType",u=ca.CIRCLE_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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})}(rd(r),"r",$y,rd(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")}]}}])&&Jy(e.prototype,r),n&&Jy(e,n),i}(Zy)).prototype,"r",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ku.circle.r}}),od(Wy.prototype,"width",[f.k],Object.getOwnPropertyDescriptor(Wy.prototype,"width"),Wy.prototype),od(Wy.prototype,"height",[f.k],Object.getOwnPropertyDescriptor(Wy.prototype,"height"),Wy.prototype),Wy);r(103);function sd(t){return(sd="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 ld(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 fd(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 fd(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 fd(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 pd(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 yd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pd(Object(r),!0).forEach((function(e){_d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dd(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 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 vd(t,e,r){return(vd="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=wd(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 bd(t,e){return(bd=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=wd(t);if(e){var o=wd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return md(this,r)}}function md(t,e){if(e&&("object"===sd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Od(t)}function Od(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wd(t){return(wd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xd(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 Ed,jd,Sd,Pd=(ad=xd((id=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&&bd(t,e)}(i,t);var e,r,n,o=gd(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),_d(Od(r=o.call(this,t,e,"diamond")),"modelType",ca.DIAMOND_NODE),dd(Od(r),"rx",ad,Od(r)),dd(Od(r),"ry",ud,Od(r)),r}return e=i,(r=[{key:"getData",value:function(){var t=this.rx,e=this.ry;return yd(yd({},vd(wd(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=ld(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=ld(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=ld(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&hd(e.prototype,r),n&&hd(e,n),i}(Zy)).prototype,"rx",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ud=xd(id.prototype,"ry",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xd(id.prototype,"points",[f.k],Object.getOwnPropertyDescriptor(id.prototype,"points"),id.prototype),xd(id.prototype,"pointsPosition",[f.k],Object.getOwnPropertyDescriptor(id.prototype,"pointsPosition"),id.prototype),xd(id.prototype,"width",[f.k],Object.getOwnPropertyDescriptor(id.prototype,"width"),id.prototype),xd(id.prototype,"height",[f.k],Object.getOwnPropertyDescriptor(id.prototype,"height"),id.prototype),xd(id.prototype,"anchors",[f.k],Object.getOwnPropertyDescriptor(id.prototype,"anchors"),id.prototype),id);function Ad(t){return(Ad="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 kd(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 Dd(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 Md(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=Rd(t);if(e){var o=Rd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Nd(this,r)}}function Nd(t,e){if(e&&("object"===Ad(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Cd(t)}function Cd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rd(t){return(Rd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Id(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 Ld,zd,Bd=(jd=Id((Ed=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=Md(i);function i(t,e){var r,n,a,u;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"),n=Cd(r),a="modelType",u=ca.ELLIPSE_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,kd(Cd(r),"rx",jd,Cd(r)),kd(Cd(r),"ry",Sd,Cd(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")}]}}])&&Dd(e.prototype,r),n&&Dd(e,n),i}(Zy)).prototype,"rx",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ku.ellipse.rx}}),Sd=Id(Ed.prototype,"ry",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ku.ellipse.ry}}),Id(Ed.prototype,"width",[f.k],Object.getOwnPropertyDescriptor(Ed.prototype,"width"),Ed.prototype),Id(Ed.prototype,"height",[f.k],Object.getOwnPropertyDescriptor(Ed.prototype,"height"),Ed.prototype),Id(Ed.prototype,"anchors",[f.k],Object.getOwnPropertyDescriptor(Ed.prototype,"anchors"),Ed.prototype),Ed);function Hd(t){return(Hd="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 Ud(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 Xd(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 Xd(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 Xd(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 Fd(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 Gd(t,e){return(Gd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yd(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=$d(t);if(e){var o=$d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vd(this,r)}}function Vd(t,e){if(e&&("object"===Hd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wd(t)}function Wd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $d(t){return($d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Kd(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 Zd,qd,Jd=(zd=Kd((Ld=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&&Gd(t,e)}(i,t);var e,r,n,o=Yd(i);function i(t,e){var r,n,a,u;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"),n=Wd(r),a="modelType",u=ca.POLYGON_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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})}(Wd(r),"points",zd,Wd(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=Ud(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=Ud(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=Ud(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)}}))}}])&&Fd(e.prototype,r),n&&Fd(e,n),i}(Zy)).prototype,"points",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Kd(Ld.prototype,"pointsPosition",[f.k],Object.getOwnPropertyDescriptor(Ld.prototype,"pointsPosition"),Ld.prototype),Kd(Ld.prototype,"width",[f.k],Object.getOwnPropertyDescriptor(Ld.prototype,"width"),Ld.prototype),Kd(Ld.prototype,"height",[f.k],Object.getOwnPropertyDescriptor(Ld.prototype,"height"),Ld.prototype),Kd(Ld.prototype,"anchors",[f.k],Object.getOwnPropertyDescriptor(Ld.prototype,"anchors"),Ld.prototype),Ld);function Qd(t){return(Qd="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 th(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 eh(t,e){return(eh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function rh(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 nh(this,r)}}function nh(t,e){if(e&&("object"===Qd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return oh(t)}function oh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ih(t){return(ih=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ah(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 uh,ch,sh,lh,fh=(qd=ah((Zd=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&&eh(t,e)}(i,t);var e,r,n,o=rh(i);function i(t,e){var r,n,a,u;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"),n=oh(r),a="modelType",u=ca.RECT_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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})}(oh(r),"radius",qd,oh(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")}]}}])&&th(e.prototype,r),n&&th(e,n),i}(Zy)).prototype,"radius",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ku.rect.radius}}),ah(Zd.prototype,"anchors",[f.k],Object.getOwnPropertyDescriptor(Zd.prototype,"anchors"),Zd.prototype),Zd);function ph(t){return(ph="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 yh(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 dh(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 hh(t,e){return(hh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vh(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=mh(t);if(e){var o=mh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bh(this,r)}}function bh(t,e){if(e&&("object"===ph(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return gh(t)}function gh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mh(t){return(mh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Oh(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 wh,_h=(ch=Oh((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&&hh(t,e)}(i,t);var e,r,n,o=vh(i);function i(t,e){var r,n,a,u;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"),n=gh(r),a="modelType",u=ca.TEXT_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,yh(gh(r),"fontSize",ch,gh(r)),yh(gh(r),"fontFamily",sh,gh(r)),yh(gh(r),"fontWeight",lh,gh(r)),r}return e=i,(r=[{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=Hc({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=Hc({rows:t,fontSize:this.fontSize,rowsLength:t.length}).height;return e>20?e:20}}])&&dh(e.prototype,r),n&&dh(e,n),i}(Zy)).prototype,"fontSize",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ku.text.fontSize}}),sh=Oh(uh.prototype,"fontFamily",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ku.text.fontFamily}}),lh=Oh(uh.prototype,"fontWeight",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ku.text.fontWeight}}),Oh(uh.prototype,"width",[f.k],Object.getOwnPropertyDescriptor(uh.prototype,"width"),uh.prototype),Oh(uh.prototype,"height",[f.k],Object.getOwnPropertyDescriptor(uh.prototype,"height"),uh.prototype),uh);function xh(t){return(xh="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){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 jh(t,e){return(jh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Sh(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=kh(t);if(e){var o=kh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ph(this,r)}}function Ph(t,e){if(e&&("object"===xh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ah(t)}function Ah(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kh(t){return(kh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Dh,Th,Mh,Nh,Ch=(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)}((wh=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&&jh(t,e)}(i,t);var e,r,n,o=Sh(i);function i(t,e){var r,n,a,u;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"),n=Ah(r),a="modelType",u=ca.HTML_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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")}]}}])&&Eh(e.prototype,r),n&&Eh(e,n),i}(Zy)).prototype,"anchors",[f.k],Object.getOwnPropertyDescriptor(wh.prototype,"anchors"),wh.prototype),wh);function Rh(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 Ih(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 Lh(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 zh=ku.snapline,Bh=(Th=Lh((Dh=function(){function t(e){var r,n,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o=void 0,(n="graphModel")in(r=this)?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,Rh(this,"isShowHorizontal",Th,this),Rh(this,"isShowVertical",Mh,this),Rh(this,"position",Nh,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||zh.stroke}},{key:"strokeWidth",get:function(){return this.graphModel.theme.snapline.strokeWidth||zh.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=Mc(a);else{var u=this.graphModel.getNodeModel(i);n=Mc(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=Mc(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 Di({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=Mc(a);else{var u=this.graphModel.getNodeModel(i);n=Mc(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=Mc(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 Di({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)}}])&&Ih(e.prototype,r),n&&Ih(e,n),t}()).prototype,"isShowHorizontal",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mh=Lh(Dh.prototype,"isShowVertical",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Nh=Lh(Dh.prototype,"position",[f.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Lh(Dh.prototype,"stroke",[f.k],Object.getOwnPropertyDescriptor(Dh.prototype,"stroke"),Dh.prototype),Lh(Dh.prototype,"strokeWidth",[f.k],Object.getOwnPropertyDescriptor(Dh.prototype,"strokeWidth"),Dh.prototype),Lh(Dh.prototype,"clearSnapline",[f.i],Object.getOwnPropertyDescriptor(Dh.prototype,"clearSnapline"),Dh.prototype),Lh(Dh.prototype,"setNodeSnapLine",[f.i],Object.getOwnPropertyDescriptor(Dh.prototype,"setNodeSnapLine"),Dh.prototype),Dh);function Hh(t){return(Hh="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 Uh(){return(Uh=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 Xh(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 Fh(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 Fh(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 Fh(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 Gh(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 Yh(t,e){return(Yh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vh(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=Kh(t);if(e){var o=Kh(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"===Hh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return $h(t)}function $h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kh(t){return(Kh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}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}var qh=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&&Yh(t,e)}(i,t);var e,r,n,o=Vh(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),Zh($h(t=o.call(this)),"preTargetNode",void 0),Zh($h(t),"dragHandler",void 0),Zh($h(t),"sourceRuleResults",void 0),Zh($h(t),"targetRuleResults",void 0),Zh($h(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!==ha.INCREASE&&i.toFront(o.id),t.setState({startX:r,startY:n,endX:r,endY:n})})),Zh($h(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=Xh(l.moveCanvasPointByHtml([i,a],r,n),2),y=p[0],d=p[1];t.setState({endX:y,endY:d,draging:!0});var h=Pc({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,Uc(w)),t.targetRuleResults.set(g,Uc(_))}var x=t.sourceRuleResults.get(v.id).isAllPass,E=t.targetRuleResults.get(g).isAllPass;x&&E?v.setElementState(aa.ALLOW_CONNECT):v.setElementState(aa.NOT_ALLOW_CONNECT)}else t.preTargetNode&&t.preTargetNode.state!==aa.DEFAULT&&t.preTargetNode.setElementState(aa.DEFAULT)})),Zh($h(t),"onDragEnd",(function(){t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear()})),Zh($h(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=Pc({x:f,y:p},c);if(t.preTargetNode&&t.preTargetNode.state!==aa.DEFAULT&&t.preTargetNode.setElementState(aa.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(aa.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 E=h.getData();a.emit(la.CONNECTION_NOT_ALLOWED,{data:E,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=yl({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 kc(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;return b("g",{className:"lf-anchor"},b(up,Uh({className:"lf-node-anchor-hover",x:a,y:u},i.hoverStyle,{onMouseDown:this.dragHandler})),b(up,Uh({className:"lf-node-anchor",x:a,y:u},c,{onMouseDown:this.dragHandler})),this.isShowLine()&&b(Rf,Uh({x1:e,y1:r,x2:n,y2:o,"pointer-events":"none"},s)))}}])&&Gh(e.prototype,r),n&&Gh(e,n),i}(w);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 Qh(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 tv(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 tv(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 tv(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 ev(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,g=t.wrapPadding,m=void 0===g?"0, 0":g,O={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:l};if(Object.entries(t).forEach((function(t){var e=Qh(t,2),r=e[0],n=e[1];"object"!==Jh(n)&&(O[r]=n)})),i){var w=String(i).split(/[\r\n]/g),_=w.length,x=f.BaseType,E=f.width,j=f.textWidth,S=f.textHeight,P=f.modelType;if(x===sa.NODE&&P!==ca.TEXT_NODE&&v||x===sa.EDGE&&v&&j){var A=j||E,k=Bc({rows:w,style:{fontSize:"".concat(c,"px"),width:"".concat(A,"px"),fontFamily:y,lineHeight:d,padding:m},rowsLength:_,className:"lf-get-text-height"}),D=f.height>k?f.height:k;return S&&(D=S),b("g",null,b("foreignObject",{width:A,height:D,x:O.x-A/2,y:O.y-D/2},b("div",{className:"lf-node-text-auto-wrap",style:{boxSizing:"border-box",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid transparent",minHeight:D,width:A,color:u,padding:m}},b("div",{className:"lf-node-text-auto-wrap-content",style:{fontSize:c,fontFamily:y,lineHeight:d,background:"transparent",textAlign:"center",wordBreak:"break-all"}},w.map((function(t){return b("div",null,t)}))))))}if(_>1){var T=w.map((function(t,e){return b("tspan",{className:"lf-text-tspan",x:r,y:o+(e-(_-1)/2)*(c+2)},t)}));return b("text",O,T)}return b("text",O,i)}}function rv(t){return(rv="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 nv(){return(nv=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 ov(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 iv(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 iv(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 iv(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 av(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 uv(t,e){return(uv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cv(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=fv(t);if(e){var o=fv(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"===rv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lv(t)}function lv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fv(t){return(fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yv=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&&uv(t,e)}(i,t);var e,r,n,o=cv(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),pv(lv(e=o.call(this)),"dragHandler",void 0),pv(lv(e),"sumDeltaX",0),pv(lv(e),"sumDeltaY",0),pv(lv(e),"stepDrag",void 0),pv(lv(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=ov(o.graphModel.transformMatrix.fixDeltaXY(r,n),2),u=a[0],c=a[1];i.moveText(u,c)})),pv(lv(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(aa.TEXT_EDIT)})),pv(lv(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 Ml({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;return b(ev,nv({},{x:n.x,y:n.y,className:"lf-element-text",value:o},r,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return b("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&av(e.prototype,r),n&&av(e,n),i}(w),dv=null!==window.navigator.userAgent.match(/MSIE|Trident/);function hv(t){return(hv="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 vv(){return(vv=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 bv(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 gv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?bv(Object(r),!0).forEach((function(e){Pv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mv(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 Ov(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 Ov(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 Ov(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 wv(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){return(_v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xv(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=Sv(t);if(e){var o=Sv(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"===hv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return jv(t)}function jv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sv(t){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Pv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Av=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=xv(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),Pv(jv(e=o.call(this)),"stepDrag",void 0),Pv(jv(e),"contextMenuTime",void 0),Pv(jv(e),"startTime",void 0),Pv(jv(e),"clickTimer",void 0),Pv(jv(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=mv(a.transformMatrix.fixDeltaXY(r,n),2),c=u[0],s=u[1];a.moveNode(i.id,c,s)})),Pv(jv(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),Pv(jv(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,aa.TEXT_EDIT)),o.emit(la.NODE_DBCLICK,a)):(o.emit(la.ELEMENT_CLICK,a),o.emit(la.NODE_CLICK,a))}}})),Pv(jv(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,aa.SHOW_MENU,u.domOverlayPosition),i.selectNodeById(n.id),o.emit(la.NODE_CONTEXTMENU,{data:a,e:t,position:u}),e.toFront()})),Pv(jv(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)})),Pv(jv(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(la.NODE_MOUSEENTER,{data:i,e:t})}})),Pv(jv(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(la.NODE_MOUSELEAVE,{data:i,e:t})})),Pv(jv(e),"onMouseOut",(function(t){dv&&e.setHoverOFF(t)}));var r=t.graphModel.gridSize,n=t.eventCenter,a=t.model;return e.stepDrag=new Ml({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 gv({id:e,properties:gv({},n),type:o,x:i,y:a,isSelected:u,isHovered:c,text:gv({},s)},l)}},{key:"getProperties",value:function(){return this.props.model.getProperties()}},{key:"getAnchorStyle",value:function(){return gv({},this.props.graphModel.theme.anchor)}},{key:"getAnchorHoverStyle",value:function(){return gv({},this.props.graphModel.theme.anchorHover)}},{key:"getNewEdgeStyle",value:function(){return gv({},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 yi(r.anchors,(function(e,i){return b(qh,vv({},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 gv({},this.props.graphModel.theme.nodeText)}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===aa.TEXT_EDIT)return"";var n=this.getTextStyle();if(e.text){var o=r.editConfig,i=!1;return(e.text.draggable||o.nodeTextDraggable)&&(i=!0),b(yv,{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 aa.ALLOW_CONNECT:t+=" lf-node-allow";break;case aa.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!==ha.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=b("g",{className:"lf-node-content"},this.getShape(),this.getText(),i?null:this.getAnchors());return s?(a&&l&&this.stepDrag.setStep(u*c),t=b("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=b("g",{className:this.getStateClassName()},f),t}}])&&wv(e.prototype,r),n&&wv(e,n),i}(w);function kv(t){return(kv="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(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 Tv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dv(Object(r),!0).forEach((function(e){Mv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Mv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cv(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 Rv(t,e,r){return(Rv="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=Bv(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 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"===kv(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(){return Nv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=Rv(Bv(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.radius;return Tv(Tv({},t),{},{radius:e})}},{key:"getAttributes",value:function(){var t=Rv(Bv(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Tv(Tv({},t),e)}},{key:"getShape",value:function(){return b($f,this.getAttributes())}}])&&Cv(e.prototype,r),n&&Cv(e,n),i}(Av);function Uv(t){return(Uv="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 Xv(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?Xv(Object(r),!0).forEach((function(e){Gv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xv(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(t,e,r){return(Wv="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=qv(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 Kv(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=qv(t);if(e){var o=qv(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"===Uv(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 qv(t){return(qv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jv=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=Kv(i);function i(){return Yv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=Wv(qv(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.r;return Fv(Fv({},t),{},{r:e})}},{key:"getAttributes",value:function(){var t=Wv(qv(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Fv(Fv({},t),e)}},{key:"getShape",value:function(){return b(up,this.getAttributes())}}])&&Vv(e.prototype,r),n&&Vv(e,n),i}(Av);function Qv(t){return(Qv="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 tb(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 eb(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 eb(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 eb(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 rb(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=tb(t,2),r=e[0],o=e[1];"object"!==Qv(o)&&(n[r]=o)})),n.points=e.map((function(t){return t.join(",")})).join(" "),b("polygon",n)}function nb(t){return(nb="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 ob(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 ib(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ob(Object(r),!0).forEach((function(e){ab(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ab(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ub(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cb(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(t,e,r){return(sb="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=yb(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 lb(t,e){return(lb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fb(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=yb(t);if(e){var o=yb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pb(this,r)}}function pb(t,e){if(e&&("object"===nb(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 yb(t){return(yb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var db=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&&lb(t,e)}(i,t);var e,r,n,o=fb(i);function i(){return ub(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=sb(yb(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.points;return ib(ib({},t),{},{points:e})}},{key:"getAttributes",value:function(){var t=sb(yb(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return ib(ib({},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;return b("g",{transform:"matrix(1 0 0 1 ".concat(n-e/2," ").concat(o-r/2,")")},b(rb,{fill:i,fillOpacity:a,strokeWidth:u,stroke:c,strokeOpacity:s,points:l}))}}])&&cb(e.prototype,r),n&&cb(e,n),i}(Av);function hb(t){return(hb="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 vb(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 bb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vb(Object(r),!0).forEach((function(e){gb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ob(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 wb(t,e,r){return(wb="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=jb(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 _b(t,e){return(_b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xb(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=jb(t);if(e){var o=jb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Eb(this,r)}}function Eb(t,e){if(e&&("object"===hb(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 jb(t){return(jb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sb=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&&_b(t,e)}(i,t);var e,r,n,o=xb(i);function i(){return mb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=this.props.model.points;return bb(bb({},wb(jb(i.prototype),"getShapeStyle",this).call(this)),{},{points:t})}},{key:"getAttributes",value:function(){var t=wb(jb(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return bb(bb({},t),e)}},{key:"getShape",value:function(){var t=this.props.model.points,e=this.getAttributes();return b("g",null,b(rb,{fill:e.fill,fillOpacity:e.fillOpacity,strokeWidth:e.strokeWidth,stroke:e.stroke,strokeOpacity:e.strokeOpacity,points:t}))}}])&&Ob(e.prototype,r),n&&Ob(e,n),i}(Av);function Pb(t){return(Pb="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 Ab(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 kb(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 kb(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 kb(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 Db(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=Ab(t,2),r=e[0],n=e[1];"object"!==Pb(n)&&(c[r]=n)})),b("ellipse",c)}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 Mb(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 Nb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Mb(Object(r),!0).forEach((function(e){Cb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Cb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ib(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 Lb(t,e,r){return(Lb="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=Ub(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 zb(t,e){return(zb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Bb(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=Ub(t);if(e){var o=Ub(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"===Tb(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 Ub(t){return(Ub=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Xb=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&&zb(t,e)}(i,t);var e,r,n,o=Bb(i);function i(){return Rb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=Lb(Ub(i.prototype),"getAttributes",this).call(this),e=this.props.model,r=e.rx,n=e.ry;return Nb(Nb({},t),{},{rx:r,ry:n})}},{key:"getShape",value:function(){return b(Db,this.getAttributes())}}])&&Ib(e.prototype,r),n&&Ib(e,n),i}(Av);function Fb(t){return(Fb="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 Gb(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 Yb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gb(Object(r),!0).forEach((function(e){Vb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wb(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 Kb(t,e){return(Kb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zb(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=Jb(t);if(e){var o=Jb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qb(this,r)}}function qb(t,e){if(e&&("object"===Fb(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 Jb(t){return(Jb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var 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&&Kb(t,e)}(i,t);var e,r,n,o=Zb(i);function i(){return Wb(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=rl(t);c=e>c?e:c}));var s=Hc({rows:a,fontSize:r,rowsLength:u}),l=s.width,f=s.height;return b($f,Yb(Yb({},e.backgroundStyle),{},{x:o-1,y:i-1,width:l,height:f}))}}},{key:"getShape",value:function(){var t=this.getAttributes();return b("g",null,this.getBackgroud(),b(ev,t))}}])&&$b(e.prototype,r),n&&$b(e,n),i}(Av);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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rg(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 ng(t,e){return(ng=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function og(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=ug(t);if(e){var o=ug(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ig(this,r)}}function ig(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 ag(t)}function ag(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ug(t){return(ug=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function cg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var sg=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&&ng(t,e)}(i,t);var e,r,n,o=og(i);function i(){var t;eg(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return cg(ag(t=o.call.apply(o,[this].concat(r))),"ref",void 0),cg(ag(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 b("foreignObject",{x:e-n/2,y:r-o/2,width:n,height:o,ref:this.setRef})}}])&&rg(e.prototype,r),n&&rg(e,n),i}(Av);function lg(t){return(lg="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 fg(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 pg(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 pg(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 pg(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 yg(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=fg(t,2),n=r[0],o=r[1];"object"!==lg(o)&&(e[n]=o)})),b("path",e)}yg.defaultProps={strokeDasharray:""};var dg=yg;function hg(t){return(hg="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 vg(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 bg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mg(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 Og(t,e){return(Og=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wg(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=xg(t);if(e){var o=xg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _g(this,r)}}function _g(t,e){if(e&&("object"===hg(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 xg(t){return(xg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Eg=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&&Og(t,e)}(i,t);var e,r,n,o=wg(i);function i(){return gg(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=Es(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?vg(Object(r),!0).forEach((function(e){bg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vg(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 b(dg,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return b("g",{className:"lf-arrow"},this.getShape())}}])&&mg(e.prototype,r),n&&mg(e,n),i}(w);function jg(t){return(jg="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 Sg(){return(Sg=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 Pg(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 Ag(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pg(Object(r),!0).forEach((function(e){Rg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kg(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 Dg(t,e){return(Dg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tg(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=Cg(t);if(e){var o=Cg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mg(this,r)}}function Mg(t,e){if(e&&("object"===jg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ng(t)}function Ng(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cg(t){return(Cg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Rg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ig,Lg=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&&Dg(t,e)}(i,t);var e,r,n,o=Tg(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),Rg(Ng(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHoverd:!0})})),Rg(Ng(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=ea(e.background,"fill","stroke","radius","height");if(this.state.isHoverd&&e.hoverBackground&&(o=Ag(Ag({},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=Bc({rows:y,style:{fontSize:"".concat(a,"px"),width:"".concat(n,"px"),lineHeight:c,padding:s},rowsLength:d,className:"lf-get-text-height"});i=Ag(Ag({},o),{},{x:f-1,y:p-1,width:n,height:h})}else{var v=0;y&&y.forEach((function(t){var e=rl(t);v=e>v?e:v}));var g=Hc({rows:y,fontSize:a,rowsLength:d}),m=g.width,O=g.height;i=Ag(Ag({},o),{},{x:f-1,y:p-1,width:m,height:O})}return b($f,i)}}},{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.style,n=e.text,o=n.value,i=Ag({x:n.x,y:n.y,className:"lf-element-text",value:o},r);return b("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),b(ev,Sg({},i,{model:e})))}}])&&kg(e.prototype,r),n&&kg(e,n),i}(yv);function zg(t){return(zg="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(){return(Bg=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 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 Ug(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){Zg(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 Xg(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 Fg(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 Fg(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 Fg(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 Gg(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 Yg(t,e){return(Yg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vg(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=Kg(t);if(e){var o=Kg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wg(this,r)}}function Wg(t,e){if(e&&("object"===zg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return $g(t)}function $g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kg(t){return(Kg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zg(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){t.SOURCE="SOURCE",t.TARGET="TARGET"}(Ig||(Ig={}));var qg=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&&Yg(t,e)}(i,t);var e,r,n,o=Vg(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),Zg($g(t=o.call(this)),"dragHandler",void 0),Zg($g(t),"oldEdge",void 0),Zg($g(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})})),Zg($g(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=Xg(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=Pc({x:i,y:a},d);if(h&&h.node){var v,b=y.startPoint,g=y.endPoint,m=y.sourceNode,O=y.targetNode;s===Ig.SOURCE?v={startPoint:{x:h.anchor.x,y:h.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:h.node,targetNode:O}:s===Ig.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===Ig.SOURCE?y.updateStartPoint({x:f,y:p}):s===Ig.TARGET&&y.updateEndPoint({x:f,y:p})})),Zg($g(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=Pc({x:c,y:s},a);if(l)if(f&&f.node){var p,y=n.getData(),d=Ug(Ug({},y),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==y||null===(p=y.text)||void 0===p?void 0:p.value)||""});o===Ig.SOURCE?d=Ug(Ug({},d),{},{sourceNodeId:f.node.id,sourceAnchorId:f.anchor.id,startPoint:{x:f.anchor.x,y:f.anchor.y},targetNodeId:n.targetNodeId,endPoint:Ug({},n.endPoint)}):o===Ig.TARGET&&(d=Ug(Ug({},d),{},{sourceNodeId:n.sourceNodeId,startPoint:Ug({},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(Ug({},d));i.emit(la.EDGE_EXCHANGE_NODE,{data:{newEdge:h.getData(),oldEdge:n.getData()}})}else t.recoveryEdge()})),Zg($g(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!==ca.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),Zg($g(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.dragHandler=yl({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;return b("g",null,b(up,Bg({className:"lf-edge-adjust-point"},this.getAdjustPointStyle(),{x:e,y:r,onMouseDown:this.dragHandler,"pointer-events":n?"none":""})))}}])&&Gg(e.prototype,r),n&&Gg(e,n),i}(w);function Jg(t){return(Jg="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 Qg(){return(Qg=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 tm(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 em(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tm(Object(r),!0).forEach((function(e){sm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function rm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nm(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 om(t,e){return(om=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function im(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=cm(t);if(e){var o=cm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return am(this,r)}}function am(t,e){if(e&&("object"===Jg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return um(t)}function um(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cm(t){return(cm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var lm=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&&om(t,e)}(i,t);var e,r,n,o=im(i);function i(){var t;rm(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return sm(um(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),sm(um(t),"contextMenuTime",void 0),sm(um(t),"clickTimer",void 0),sm(um(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.eventCenter;o.setHovered(e);var a=e?la.EDGE_MOUSEENTER:la.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})})),sm(um(t),"setHoverON",(function(e){t.handleHover(!0,e)})),sm(um(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),sm(um(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,aa.SHOW_MENU,a.domOverlayPosition),t.toFront(),o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();i.emit(la.EDGE_CONTEXTMENU,{data:u,e:e,position:a})})),sm(um(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),sm(um(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,aa.DEFAULT),s.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,aa.TEXT_EDIT),o.modelType===ca.POLYLINE_EDGE){var f=o,p=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,y=p.x,d=p.y,h=al({x:y,y:d},f.points);f.dbClickPosition=h}a.emit(la.EDGE_DBCLICK,{data:u,e:e,position:c})}else a.emit(la.ELEMENT_CLICK,{data:u,e:e,position:c}),a.emit(la.EDGE_CLICK,{data:u,e:e,position:c});var v=i.editConfig.metaKeyMultipleSelected;i.selectEdgeById(o.id,e.metaKey&&v),t.toFront()}})),sm(um(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:em({},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===aa.TEXT_EDIT)return"";var n=r.theme.edgeText,o=this.getTextStyle(),i=Di({},n,o),a=!1,u=r.editConfig;return(e.text.draggable||u.edgeTextDraggable)&&(a=!0),b(Lg,{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 b(Eg,{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 b("g",null,b(qg,Qg({type:"SOURCE"},o,{edgeModel:e,graphModel:r,eventCenter:n})),b(qg,Qg({type:"TARGET"},i,{edgeModel:e,graphModel:r,eventCenter:n})))}},{key:"getAppendWidth",value:function(){return b("g",null)}},{key:"getAppend",value:function(){return b("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.overlapMode!==ha.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 b("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():"")}}])&&nm(e.prototype,r),n&&nm(e,n),i}(w);function fm(t){return(fm="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 pm(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 ym(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pm(Object(r),!0).forEach((function(e){dm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vm(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 bm(t,e,r){return(bm="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=wm(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 gm(t,e){return(gm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mm(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=wm(t);if(e){var o=wm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Om(this,r)}}function Om(t,e){if(e&&("object"===fm(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 wm(t){return(wm=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&&gm(t,e)}(i,t);var e,r,n,o=mm(i);function i(){return hm(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 ym(ym({},bm(wm(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 b(Rf,{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 b("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=Es(Ss(Ss({},o),{},{type:"start"})),a=Es(Ss(Ss({},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 b(dg,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}}])&&vm(e.prototype,r),n&&vm(e,n),i}(lm);function xm(t){return(xm="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 Em(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 jm(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 jm(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 jm(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 Sm=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=Em(t,2),n=r[0],o=r[1];"object"!==xm(o)&&(e[n]=o)})),b("polyline",e)};function Pm(t){return(Pm="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 Am(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 km(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Am(Object(r),!0).forEach((function(e){Bm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Am(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Dm(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 Tm(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 Tm(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 Tm(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 Mm(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 Nm(t,e,r){return(Nm="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=zm(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 Cm(t,e){return(Cm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Rm(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=zm(t);if(e){var o=zm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Im(this,r)}}function Im(t,e){if(e&&("object"===Pm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Lm(t)}function Lm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zm(t){return(zm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Hm=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&&Cm(t,e)}(i,t);var e,r,n,o=Rm(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),Bm(Lm(t=o.call(this)),"drag",void 0),Bm(Lm(t),"isDraging",void 0),Bm(Lm(t),"appendInfo",void 0),Bm(Lm(t),"dragHandler",void 0),Bm(Lm(t),"onDragStart",(function(){t.props.model.dragAppendStart()})),Bm(Lm(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=Dm(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})})),Bm(Lm(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(la.EDGE_ADJUST,{data:o.getData()})})),Bm(Lm(t),"beforeDragStart",(function(e,r){r.dragAble&&t.dragHandler(e),t.appendInfo=r})),Bm(Lm(t),"getIsDraging",(function(){return t.isDraging})),t.drag=yl({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getAttributes",value:function(){var t=Nm(zm(i.prototype),"getAttributes",this).call(this),e=this.props.model.points;return km(km({},t),{},{points:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.points,r=t.strokeWidth,n=t.stroke,o=t.strokeDashArray;return b(Sm,{points:e,strokeWidth:r,stroke:n,strokeDasharray:o})}},{key:"getShape",value:function(){return b("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=Qs(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=Es(km(km({},o),{},{type:"start"})),a=Es(km(km({},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 b(dg,{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=b("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=fa.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=fa.HORIZONTAL),s=b("g",{className:t.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},b("g",{className:r},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return b("g",null,a)}}])&&Mm(e.prototype,r),n&&Mm(e,n),i}(lm);function Um(t){return(Um="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 Xm(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 Fm(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 Fm(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 Fm(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 Gm(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 Ym(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gm(Object(r),!0).forEach((function(e){Vm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $m(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 Km(t,e,r){return(Km="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=Qm(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 Zm(t,e){return(Zm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qm(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=Qm(t);if(e){var o=Qm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jm(this,r)}}function Jm(t,e){if(e&&("object"===Um(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 Qm(t){return(Qm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tO=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&&Zm(t,e)}(i,t);var e,r,n,o=qm(i);function i(){return Wm(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=Km(Qm(i.prototype),"getAttributes",this).call(this),e=this.props.model.path;return Ym(Ym({},t),{},{path:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.path,r=t.strokeWidth,n=t.stroke,o=t.strokeDashArray;return b(dg,{d:e,strokeWidth:r,stroke:n,fill:"none",strokeDasharray:o})}},{key:"getShape",value:function(){return b("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.getAttributes().path;return b(dg,{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=Xm(function(t){var e=ol(t);return[e[2],e[3]]}(n),2);return{start:i[0],end:i[1],hover:e,isSelected:o}}}])&&$m(e.prototype,r),n&&$m(e,n),i}(lm);var eO=function(t,e){return Mo(t,e)};var rO=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},nO=function(){return xr.a.Date.now()},oO=/\s/;var iO=function(t){for(var e=t.length;e--&&oO.test(t.charAt(e)););return e},aO=/^\s+/;var uO=function(t){return t?t.slice(0,iO(t)+1).replace(aO,""):t},cO=/^[-+]0x[0-9a-f]+$/i,sO=/^0b[01]+$/i,lO=/^0o[0-7]+$/i,fO=parseInt;var pO=function(t){if("number"==typeof t)return t;if(zo(t))return NaN;if(Cr(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Cr(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=uO(t);var r=sO.test(t);return r||lO.test(t)?fO(t.slice(2),r?2:8):cO.test(t)?NaN:+t},yO=Math.max,dO=Math.min;var hO=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=nO();if(h(t))return b(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?dO(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=nO(),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=pO(e)||0,Cr(r)&&(l=!!r.leading,i=(f="maxWait"in r)?yO(pO(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(nO())},g},vO=r(140);function bO(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 gO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var mO,OO,wO,_O=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),gO(this,"undos",[]),gO(this,"redos",[]),gO(this,"callbacks",[]),gO(this,"stopWatch",null),gO(this,"curData",null),gO(this,"maxSize",50),gO(this,"waitTime",100),gO(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){eO(rO(this.undos),t)||(this.undos.push(t),eO(this.curData,t)||(this.redos=[]),this.eventCenter.emit(la.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=yu(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=yu(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(vO.a)(t,hO((function(){var r=t.modelToGraphData();e.add(r)}),this.waitTime))}}])&&bO(e.prototype,r),n&&bO(e,n),t}();function xO(t){return(xO="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 EO(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 jO(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 jO(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 jO(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 SO(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 PO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?SO(Object(r),!0).forEach((function(e){CO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function AO(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 kO(t,e){return(kO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function DO(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=NO(t);if(e){var o=NO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TO(this,r)}}function TO(t,e){if(e&&("object"===xO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return MO(t)}function MO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function NO(t){return(NO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function CO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var RO,IO,LO,zO=mw((wO=OO=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&&kO(t,e)}(i,t);var e,r,n,o=DO(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),CO(MO(t=o.call(this)),"ref",{current:null}),CO(MO(t),"__prevText",{type:"",text:"",id:""}),CO(MO(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===sa.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===sa.EDGE){var p=o.edgeText,y=p.autoWrap,d=p.lineHeight,h=p.wrapPadding,v=i.textWidth;y&&v&&(e=PO(PO({},f),{},{width:v,minWidth:v,lineHeight:d,padding:h}))}else if(i.BaseType===sa.NODE){var b=o.nodeText,g=b.autoWrap,m=b.lineHeight,O=b.wrapPadding,w=i,_=w.width,x=w.textWidth,E=w.modelType;(E!==ca.TEXT_NODE&&g||E===ca.TEXT_NODE&&g&&x)&&(e=PO(PO({},f),{},{width:x||_,minWidth:x||_,lineHeight:m,padding:O}))}var j=i.text,S=j.x,P=j.y,A=EO(n.CanvasPointToHtmlPoint([S,P]),2);return{style:PO({left:A[0],top:A[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(la.GRAPH_TRANSFORM,(function(){t.textEditElement&&t.textEditElement.setElementState(aa.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(la.TEXT_UPDATE,PO({},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?b("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}}])&&AO(e.prototype,r),n&&AO(e,n),i}(w),CO(OO,"toolName","textEdit"),mO=wO))||mO,BO=function(t){return t.modelType===ca.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===ca.POLYLINE_EDGE?function(t){var e=t.points,r=Qs(e),n=Ls(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===ca.BEZIER_EDGE?function(t){var e=t.path,r=ol(e),n=Ls(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 HO(t){return(HO="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 UO(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)||FO(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 XO(t){return function(t){if(Array.isArray(t))return GO(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||FO(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 FO(t,e){if(t){if("string"==typeof t)return GO(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)?GO(t,e):void 0}}function GO(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 YO(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 VO(t,e){return(VO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function WO(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=ZO(t);if(e){var o=ZO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $O(this,r)}}function $O(t,e){if(e&&("object"===HO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return KO(t)}function KO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ZO(t){return(ZO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var JO=mw((LO=IO=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&&VO(t,e)}(i,t);var e,r,n,o=WO(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),qO(KO(e=o.call(this)),"stepDrag",void 0),qO(KO(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),qO(KO(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel;o.moveElements(o.getSelectElements(!0),r,n)})),qO(KO(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:[]};XO(a.values()).forEach((function(t){t.BaseType===sa.NODE&&c.nodes.push(t.getData()),t.BaseType===sa.EDGE&&c.edges.push(t.getData())})),i.emit(la.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})}));var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new Ml({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===sa.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===sa.EDGE&&(e=BO(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=UO(r.CanvasPointToHtmlPoint([n,o]),2);n=u[0],o=u[1];var c=UO(r.CanvasPointToHtmlPoint([i,a]),2);return i=c[0],a=c[1],b("div",{className:"lf-multiple-select",style:{left:"".concat(n-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-n+20,"px"),height:"".concat(a-o+20,"px")},onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&YO(e.prototype,r),n&&YO(e,n),i}(w),qO(IO,"toolName","multipleSelect"),RO=LO))||RO;function QO(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 tw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ew=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),tw(this,"tools",void 0),tw(this,"components",void 0),tw(this,"toolMap",new Map),tw(this,"instance",void 0),this.instance=e,this.isDisabledTool(zO.toolName)||this.registerTool(zO.toolName,zO),this.isDisabledTool(JO.toolName)||this.registerTool(JO.toolName,JO)}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}}])&&QO(e.prototype,r),n&&QO(e,n),t}();r(182);function rw(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 nw=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n={},(r="_events")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}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}}])&&rw(e.prototype,r),n&&rw(e,n),t}(),ow=r(141),iw=r.n(ow);function aw(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 uw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cw=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),uw(this,"mousetrap",void 0),uw(this,"options",void 0),uw(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new iw.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(Rn(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")}}])&&aw(e.prototype,r),n&&aw(e,n),t}(),sw=cw,lw=null;function fw(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function pw(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 yw(t){return(yw="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 dw(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 hw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dw(Object(r),!0).forEach((function(e){bw(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dw(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function vw(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 bw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var gw=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),bw(this,"container",void 0),bw(this,"width",void 0),bw(this,"height",void 0),bw(this,"graphModel",void 0),bw(this,"history",void 0),bw(this,"viewMap",new Map),bw(this,"tool",void 0),bw(this,"keyboard",void 0),bw(this,"dnd",void 0),bw(this,"options",void 0),bw(this,"getSnapshot",void 0),bw(this,"eventCenter",void 0),bw(this,"snaplineModel",void 0),bw(this,"components",[]),bw(this,"adapterIn",void 0),bw(this,"adapterOut",void 0),bw(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=Wp(e),this.container=i,this.width=a||i.getBoundingClientRect().width,this.height=u||i.getBoundingClientRect().height,this.tool=new ew(this),this.eventCenter=new nw,this.history=new _O(this.eventCenter),this.dnd=new Vp({options:c,lf:this}),this.keyboard=new sw({lf:this,keyboard:s}),this.graphModel=new Fl(hw(hw({},this.options),{},{eventCenter:this.eventCenter,rootEl:this.container,width:this.width,height:this.height})),l||!1===f||(this.snaplineModel=new Bh(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)?(lw=null,!1):((lw=o).nodes.forEach((function(t){return fw(t,40)})),lw.edges.forEach((function(t){return pw(t,40)})),!1)}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(lw&&(lw.nodes||lw.edges)){t.clearSelectElements();var r=t.addElements(lw);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)})),lw.nodes.forEach((function(t){return fw(t,40)})),lw.edges.forEach((function(t){return pw(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"===yw(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:lm,BaseEdgeModel:Qc,BaseNode:Av,BaseNodeModel:Zy,RectNode:Hv,RectNodeModel:fh,CircleNode:Jv,CircleNodeModel:cd,PolygonNode:db,PolygonNodeModel:Jd,TextNode:Qb,TextNodeModel:_h,LineEdge:_m,LineEdgeModel:ls,DiamondNode:Sb,DiamondNodeModel:Pd,PolylineEdge:Hm,PolylineEdgeModel:xs,BezierEdge:tO,BezierEdgeModel:Ly,EllipseNode:Xb,EllipseNodeModel:Bd,HtmlNode:sg,HtmlNodeModel:Ch,h:b,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=Ze(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=Ze(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"defaultRegister",value:function(){this._registerElement({view:Hv,model:fh,type:"rect"}),this._registerElement({type:"circle",view:Jv,model:cd}),this._registerElement({type:"polygon",view:db,model:Jd}),this._registerElement({type:"line",view:_m,model:ls}),this._registerElement({type:"polyline",view:Hm,model:xs}),this._registerElement({type:"bezier",view:tO,model:Ly}),this._registerElement({type:"text",view:Qb,model:_h}),this._registerElement({type:"ellipse",view:Xb,model:Bd}),this._registerElement({type:"diamond",view:Sb,model:Pd}),this._registerElement({type:"html",view:sg,model:Ch})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=Xc(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=Xc(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(Xc(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(Xc(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),H(b(Up,{eventCenter:this.eventCenter,getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container)}}])&&vw(e.prototype,r),n&&vw(e,n),t}();function mw(t){return Ze(t)}bw(gw,"extensions",new Map);e.default=gw}])}));
|
|
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 je(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(je(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: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),dt(t.prevAllowStateReads),Ht(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function jt(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),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]||j(t)||Wt(t)||At(t))}function je(t){return 1!==arguments.length&&u(!1),_e(t)}function xe(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)?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 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&&!je(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(je(e)&&xe(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=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 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=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),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=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=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(),j=w.next(),x=_.next();!j.done;){if(j.value!==x.value){e._keysAtom.reportChanged();break}j=w.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=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=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),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=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 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(j(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)):j(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,"a",(function(){return m})),r.d(e,"b",(function(){return g})),r.d(e,"c",(function(){return H})),r.d(e,"d",(function(){return X})),r.d(e,"e",(function(){return h})),r.d(e,"f",(function(){return b})),r.d(e,"g",(function(){return h})),r.d(e,"h",(function(){return B})),r.d(e,"i",(function(){return o})),r.d(e,"j",(function(){return z})),r.d(e,"k",(function(){return S}));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)&&!j.__r++||c!==o.debounceRendering)&&((c=o.debounceRendering)||u)(j)}function j(){for(var t;j.__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 x(t,e,r,n,o,i,a,u,c,s){var p,y,d,h,b,m,w,_=n&&n.__k||f,j=_.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<j;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=j;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,_,j,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)),j=null!=l&&l.type===g&&null==l.key?l.props.children:l,x(t,Array.isArray(j)?j:[j],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,x(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,j.__r=0,s=0},function(t,e,r){var n=r(113),o=r(46),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),j=r(38),x=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(46),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:x(0,!1)})):(y(t,Y)||rt(t,Y,x(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]?j(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,x(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=j(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,"a",(function(){return a.a})),r.d(e,"c",(function(){return a.e})),r.d(e,"h",(function(){return O})),r.d(e,"i",(function(){return b})),r.d(e,"j",(function(){return h})),r.d(e,"b",(function(){return D})),r.d(e,"e",(function(){return C})),r.d(e,"f",(function(){return T})),r.d(e,"g",(function(){return it}));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(P,t)}function v(t,e,r){var i=d(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):P(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&&S(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&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=d(n++,7);return S(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(){var t;for(c.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=c.pop();)if(t.__P)try{t.__H.__h.forEach(x),t.__H.__h.forEach(E),t.__H.__h=[]}catch(e){t.__H.__h=[],a.i.__e(e,t.__v)}}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(E),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)||j)(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.__||E(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 j(t){var e,r=function(){clearTimeout(n),_&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);_&&(e=requestAnimationFrame(r))}function x(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function E(t){var e=o;t.__c=t.__(),o=e}function S(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function P(t,e){return"function"==typeof e?e(t):e}function k(t,e){for(var r in e)t[r]=e[r];return t}function A(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 T(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:A(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 A(this.props,t)||A(this.state,e)};var M=a.i.__b;a.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),M&&M(t)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function C(t){function e(e,r){var n=k({},e);return delete n.ref,t(n,!(r=e.ref||r)||"object"==typeof r&&!("current"in r)?null:r)}return e.$$typeof=N,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var R=function(t,e){return null==t?null:Object(a.k)(Object(a.k)(t).map(e))},I={map:R,forEach:R,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},L=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);L(t,e,r)};var z=a.i.unmount;function B(){this.__u=0,this.t=null,this.__b=null}function H(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function X(){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),z&&z(t)},(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=H(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)},B.prototype.componentWillUnmount=function(){this.t=[]},B.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=k({},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 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 F(t){return this.getChildContext=function(){return t.context},t.children}function G(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)(F,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(X.prototype=new a.a).__e=function(t){var e=this,r=H(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()}},X.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},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){U(t,r,e)}))};var Y="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,V=/^(?: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]/,W="undefined"!=typeof document,K=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 $=a.i.event;function Z(){}function q(){return this.cancelBubble}function J(){return this.defaultPrevented}a.i.event=function(t){return $&&(t=$(t)),t.persist=Z,t.isPropagationStopped=q,t.isDefaultPrevented=J,t.nativeEvent=t};var Q,tt={configurable:!0,get:function(){return this.class}},et=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];W&&"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)&&!K(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&V.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&&(tt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",tt))}t.$$typeof=Y,et&&et(t)};var rt=a.i.__r;a.i.__r=function(t){rt&&rt(t),Q=t.__c};var nt={ReactCurrentDispatcher:{current:{readContext:function(t){return Q.__n[t.__c].props.value}}}};function ot(t){return!!t&&t.$$typeof===Y}var it=function(t,e){return t(e)},at=a.b,ut={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:I,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)(G,{__v:t,i:e})},createElement:a.e,createContext:a.d,createFactory:function(t){return a.e.bind(null,t)},cloneElement:function(t){return ot(t)?a.c.apply(null,arguments):t},createRef:a.f,Fragment:a.b,isValidElement:ot,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:a.a,PureComponent:D,memo:T,forwardRef:C,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:it,StrictMode:at,Suspense:B,SuspenseList:X,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:nt};e.d=ut},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(46),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(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){var n=r(19),o=r(201),i=r(75);n({target:"Array",proto:!0},{fill:o}),i("fill")},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,j=i(/./.exec),x=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&&(x(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&&j(g,"")||x(p,""):x(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,j=[];_<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(x(j,E(a,m,_)),j.length===g)return j;for(var k=1;k<=P.length-1;k++)if(x(j,P[k]),j.length===g)return j;_=m=S}}return x(j,E(a,m)),j}]}),!!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),j=u(w),x=0,E=b||c,S=e?E(d,j):r||p?E(d,0):void 0;j>x;x++)if((y||x in w)&&(m=_(g=w[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: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(46),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),j=i("".charCodeAt),x=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=j(s,0))||45===e){if(88===(r=j(s,2))||120===r)return NaN}else if(48===e){switch(j(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=j(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(x(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),j=s.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(_||x||j||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=j&&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)),x&&(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),x&&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(46),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,j){c(r,e,a);var x,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&&(x=s(N.call(new t)))!==Object.prototype&&x.next&&(i||s(x)===m||(l?l(x,m):u(x[w])||y(x,w,_)),f(x,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")},j)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&&!j||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(46),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(46),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,_,j=r&&r.that,x=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),P=o(e,j),k=function(t){return n&&y(n,"normal",t),new h(!0,t)},A=function(t){return x?(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),j=i("".indexOf),x=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===j(o,i)&&-1===j(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+=x(u,D,N)+z,D=N+M.length)}return A+x(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(46),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,j={},x=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)&&(x("delete"),x("has"),b&&x("get")),(A||S)&&x(m),g&&w.clear&&delete w.clear}return j[t]=_,n({global:!0,forced:_!=O},j),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(46);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,_,j=y(e),x=0;if(!j||this==d&&c(j))for(b=l(e),g=r?new this(b):d(b);b>x;x++)_=v?h(e[x],x):e[x],f(g,x,_);else for(w=(O=p(e,j)).next,g=r?new this:[];!(m=i(w,O)).done;x++)_=v?u(O,h,[m.value,x],!0):m.value,f(g,x,_);return g.length=x,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 _m})),r.d(e,"LogicFlow",(function(){return wm})),r.d(e,"h",(function(){return Q.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return jd})),r.d(e,"RectNode",(function(){return Id})),r.d(e,"CircleNode",(function(){return $d})),r.d(e,"PolygonNode",(function(){return ph})),r.d(e,"DiamondNode",(function(){return Eh})),r.d(e,"EllipseNode",(function(){return Uh})),r.d(e,"TextNode",(function(){return Qh})),r.d(e,"HtmlNode",(function(){return sv})),r.d(e,"BaseEdge",(function(){return lb})),r.d(e,"LineEdge",(function(){return jb})),r.d(e,"PolylineEdge",(function(){return Ub})),r.d(e,"BezierEdge",(function(){return ng})),r.d(e,"Arrow",(function(){return xv})),r.d(e,"BaseEdgeModel",(function(){return Ya})),r.d(e,"BezierEdgeModel",(function(){return Tf})),r.d(e,"LineEdgeModel",(function(){return ru})),r.d(e,"PolylineEdgeModel",(function(){return vu})),r.d(e,"BaseNodeModel",(function(){return Gf})),r.d(e,"CircleNodeModel",(function(){return rp})),r.d(e,"DiamondNodeModel",(function(){return _p})),r.d(e,"EllipseNodeModel",(function(){return Cp})),r.d(e,"PolygonNodeModel",(function(){return Wp})),r.d(e,"RectNodeModel",(function(){return ay})),r.d(e,"TextNodeModel",(function(){return by})),r.d(e,"HtmlNodeModel",(function(){return Ay})),r.d(e,"EditConfigModel",(function(){return io})),r.d(e,"GraphModel",(function(){return Rc})),r.d(e,"SnaplineModel",(function(){return Cy})),r.d(e,"Keyboard",(function(){return fm})),r.d(e,"get",(function(){return Bl})),r.d(e,"defaults",(function(){return Ul}));var n={};r.r(n),r.d(n,"createUuid",(function(){return Hi})),r.d(n,"refreshGraphId",(function(){return Xi})),r.d(n,"createDrag",(function(){return ac})),r.d(n,"StepDrag",(function(){return Ec}));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 j(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){x[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=u,r}var x={$$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):j(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 jt=function(t){return _t.call(t)},xt=vt?vt.toStringTag:void 0;var Et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":xt&&xt in Object(t)?wt(t):jt(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,je=_e?_e.valueOf:void 0;var xe=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(je)return je.call(t)==je.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):xe(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 jr=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 xr=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,xr(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||jr(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)&&xr(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 jn=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 xn=function(t,e){return jn(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?{}:xn(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){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zn(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 qn,Jn,Qn,to,eo,ro,no={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1,metaKeyMultipleSelected:!1},oo=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","metaKeyMultipleSelected","multipleSelectKey","extraConf"],io=(Dn=Zn((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),$n(this,"multipleSelectKey",""),$n(this,"extraConf",{}),$n(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(no,oo);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,oo);return wn(n,i)}},{key:"getConfig",value:function(){return Vn(this,oo)}}])&&Kn(e.prototype,r),n&&Kn(e,n),t}()).prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tn=Zn(An.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mn=Zn(An.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nn=Zn(An.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Cn=Zn(An.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rn=Zn(An.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),In=Zn(An.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ln=Zn(An.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zn=Zn(An.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Bn=Zn(An.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hn=Zn(An.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xn=Zn(An.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Un=Zn(An.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Fn=Zn(An.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=Zn(An.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yn=Zn(An.prototype,"metaKeyMultipleSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zn(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"}(qn||(qn={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(Jn||(Jn={})),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"}(Qn||(Qn={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(to||(to={})),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"}(eo||(eo={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ro||(ro={}));var ao,uo,co,so,lo,fo,po,yo,ho;function vo(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 bo(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 bo(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 bo(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 go(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 mo(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 Oo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wo(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"}(ao||(ao={}));var _o=(co=wo((uo=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Oo(this,"MINI_SCALE_SIZE",.2),Oo(this,"MAX_SCALE_SIZE",16),go(this,"SCALE_X",co,this),go(this,"SKEW_Y",so,this),go(this,"SKEW_X",lo,this),go(this,"SCALE_Y",fo,this),go(this,"TRANSLATE_X",po,this),go(this,"TRANSLATE_Y",yo,this),go(this,"ZOOM_SIZE",ho,this),Oo(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=vo(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=vo(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=vo(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(eo.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=vo(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")}}])&&mo(e.prototype,r),n&&mo(e,n),t}()).prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),so=wo(uo.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),lo=wo(uo.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),fo=wo(uo.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),po=wo(uo.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),yo=wo(uo.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ho=wo(uo.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),wo(uo.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(uo.prototype,"zoom"),uo.prototype),wo(uo.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(uo.prototype,"resetZoom"),uo.prototype),wo(uo.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(uo.prototype,"translate"),uo.prototype),wo(uo.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(uo.prototype,"focusOn"),uo.prototype),uo);var jo=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var xo=function(t,e){return t&&sn(e,ir(e),t)};var Eo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},So=Object.prototype.hasOwnProperty;var Po=function(t){if(!St(t))return Eo(t);var e=Qe(t),r=[];for(var n in t)("constructor"!=n||!e&&So.call(t,n))&&r.push(n);return r};var ko=function(t){return or(t)?qe(t,!0):Po(t)};var Ao=function(t,e){return t&&sn(e,ko(e),t)},Do=r(156);var To=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var Mo=function(t,e){return sn(t,Me(t),e)},No=tr(Object.getPrototypeOf,Object),Co=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ee(e,Me(t)),t=No(t);return e}:Ae;var Ro=function(t,e){return sn(t,Co(t),e)};var Io=function(t){return Pe(t,ko,Co)},Lo=Object.prototype.hasOwnProperty;var zo=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Lo.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var Bo=function(t){var e=new t.constructor(t.byteLength);return new me(e).set(new me(t)),e};var Ho=function(t,e){var r=e?Bo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Xo=/\w*$/;var Uo=function(t){var e=new t.constructor(t.source,Xo.exec(t));return e.lastIndex=t.lastIndex,e},Fo=vt?vt.prototype:void 0,Go=Fo?Fo.valueOf:void 0;var Yo=function(t){return Go?Object(Go.call(t)):{}};var Vo=function(t,e){var r=e?Bo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var Wo=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Bo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Ho(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 Vo(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Uo(t);case"[object Set]":return new n;case"[object Symbol]":return Yo(t)}},Ko=Object.create,$o=function(){function t(){}return function(e){if(!St(e))return{};if(Ko)return Ko(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Zo=function(t){return"function"!=typeof t.constructor||Qe(t)?{}:$o(No(t))};var qo=function(t){return Ce(t)&&"[object Map]"==mr(t)},Jo=We.a&&We.a.isMap,Qo=Jo?Ve(Jo):qo;var ti=function(t){return Ce(t)&&"[object Set]"==mr(t)},ei=We.a&&We.a.isSet,ri=ei?Ve(ei):ti,ni={};ni["[object Arguments]"]=ni["[object Array]"]=ni["[object ArrayBuffer]"]=ni["[object DataView]"]=ni["[object Boolean]"]=ni["[object Date]"]=ni["[object Float32Array]"]=ni["[object Float64Array]"]=ni["[object Int8Array]"]=ni["[object Int16Array]"]=ni["[object Int32Array]"]=ni["[object Map]"]=ni["[object Number]"]=ni["[object Object]"]=ni["[object RegExp]"]=ni["[object Set]"]=ni["[object String]"]=ni["[object Symbol]"]=ni["[object Uint8Array]"]=ni["[object Uint8ClampedArray]"]=ni["[object Uint16Array]"]=ni["[object Uint32Array]"]=!0,ni["[object Error]"]=ni["[object Function]"]=ni["[object WeakMap]"]=!1;var oi=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=zo(e),!c)return To(e,u)}else{var p=mr(e),y="[object Function]"==p||"[object GeneratorFunction]"==p;if(Object(He.a)(e))return Object(Do.a)(e,c);if("[object Object]"==p||"[object Arguments]"==p||y&&!i){if(u=s||y?{}:Zo(e),!c)return s?Ro(e,Ao(u,e)):Mo(e,xo(u,e))}else{if(!ni[p])return i?e:{};u=Wo(e,p,c)}}a||(a=new fe);var d=a.get(e);if(d)return d;a.set(e,u),ri(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?Io:ar:s?ko:ir)(e);return jo(h||e,(function(o,i){h&&(o=e[i=o]),cn(u,i,t(o,r,n,i,e,a))})),u};var ii=function(t){return oi(t,5)};function ai(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 ui(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ai(Object(r),!0).forEach((function(e){ci(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ai(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ci(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var si={fill:"#FFFFFF",stroke:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,opacity:1,outlineColor:"#000000",outlineStrokeDashArray:"3,3",hoverOutlineColor:"#000000",hoverOutlineStrokeDashArray:"3,3"},li=ui(ui({},si),{},{width:100,height:80,radius:0}),fi=ui(ui({},si),{},{r:50}),pi=ui(ui({},si),{},{rx:55,ry:45}),yi=ui(ui({},si),{},{rx:50,ry:50}),di=ui({},si),hi=ui(ui({},si),{},{stroke:"#000000",strokeWidth:1,r:4}),vi={stroke:"#000000",strokeWidth:2,hoverStroke:"#000000",selectedStroke:"#000000",strokeDashArray:"1,0",outlineColor:"#000000",outlineStrokeDashArray:"3,3"},bi=ui({},vi),gi=ui(ui({},vi),{},{offset:30}),mi=ui(ui({},vi),{},{offset:100,adjustLineColor:"#4169E1",adjustAnchorStroke:"#4169E1",adjustAnchorFill:"#1E90FF",adjustAnchorFillOpacity:.5}),Oi={color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:""},wi={rect:li,circle:fi,diamond:yi,ellipse:pi,polygon:di,anchor:hi,text:Oi,nodeText:ui(ui({},Oi),{},{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:bi,polyline:gi,bezier:mi,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 _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 ji(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){xi(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 xi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ei=function(t){var e=ii(wi);return t&&Object.keys(t).forEach((function(r){e[r]=ji(ji({},e[r]),t[r])})),e};function Si(t,e){return e*Math.round(t/e)||t}function Pi(t,e){return t%e}function ki(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 Ai(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 Ai(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 Ai(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 Di,Ti=function(t,e,r){var n=ki(t,2),o=n[0],i=n[1],a=ki(e,2),u=a[0],c=a[1],s=ki(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},Mi=(r(36),r(61),r(71),r(153),r(154),r(72),r(12),r(13),r(14),r(41),new Uint8Array(16));function Ni(){if(!Di&&!(Di="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 Di(Mi)}var Ci=/^(?:[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 Ri=function(t){return"string"==typeof t&&Ci.test(t)},Ii=[],Li=0;Li<256;++Li)Ii.push((Li+256).toString(16).substr(1));var zi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ii[t[e+0]]+Ii[t[e+1]]+Ii[t[e+2]]+Ii[t[e+3]]+"-"+Ii[t[e+4]]+Ii[t[e+5]]+"-"+Ii[t[e+6]]+Ii[t[e+7]]+"-"+Ii[t[e+8]]+Ii[t[e+9]]+"-"+Ii[t[e+10]]+Ii[t[e+11]]+Ii[t[e+12]]+Ii[t[e+13]]+Ii[t[e+14]]+Ii[t[e+15]]).toLowerCase();if(!Ri(r))throw TypeError("Stringified UUID is invalid");return r};var Bi=function(t,e,r){var n=(t=t||{}).random||(t.rng||Ni)();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 zi(n)},Hi=function(){return Bi()},Xi=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+Bi(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+Bi(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},Ui=(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 Fi(t){return(Fi="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 Gi(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 Yi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gi(Object(r),!0).forEach((function(e){Vi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Wi,Ki,$i,Zi,qi,Ji,Qi,ta,ea,ra,na,oa,ia,aa,ua,ca,sa,la,fa,pa,ya,da,ha,va,ba,ga=function(t){return t.anchors},ma=function(t,e){for(var r,n=e.length-1;n>=0;n--){if(ja(t,e[n])){var o=Oa(t,e[n]);if(o){r={node:e[n],anchorIndex:o.index,anchor:o.anchor};break}}}return r},Oa=function(t,e){for(var r,n=ga(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var a=wa(t.x,t.y,n[i].x,n[i].y);a<o&&(o=a,r={index:i,anchor:Yi(Yi({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r},wa=function(t,e,r,n){return Math.hypot(t-r,e-n)},_a=function(t,e){var r=!1,n=xa(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},ja=function(t,e){var r=!1,n=xa(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},xa=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}},Ea=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=wa(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),Sa(t,e,n)},Sa=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.r;if(e===ro.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===ro.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},Pa=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},ka=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===ro.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===ro.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},Aa=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===ro.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===ro.VERTICAL&&(s={x:t.x,y:l*t.x+f}),Ui(s,o,a)){var p=wa(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},Da=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}},Ta=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},Ma=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=$u(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},Na=function(t){return"object"!==Fi(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},Ca=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},Ra=1e3,Ia=999,La=function(){return++Ra};function za(t){return(za="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 Ba(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 Ha(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 Xa(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 Ua(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 Fa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ga=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ua(Object(r),!0).forEach((function(e){Fa(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ua(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},wi.line),Ya=(Ki=Xa((Wi=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),Fa(this,"id",Hi()),Fa(this,"BaseType",to.EDGE),Ba(this,"state",Ki,this),Fa(this,"modelType",Qn.EDGE),Fa(this,"additionStateData",void 0),Fa(this,"graphModel",void 0),Fa(this,"menu",void 0),Fa(this,"sourceAnchorId",Ga.sourceAnchorId),Fa(this,"targetAnchorId",Ga.targetAnchorId),Fa(this,"customTextPosition",!1),Ba(this,"text",$i,this),Ba(this,"type",Zi,this),Ba(this,"properties",qi,this),Ba(this,"sourceNodeId",Ji,this),Ba(this,"targetNodeId",Qi,this),Ba(this,"startPoint",ta,this),Ba(this,"endPoint",ea,this),Ba(this,"strokeWidth",ra,this),Ba(this,"stroke",na,this),Ba(this,"strokeDashArray",oa,this),Ba(this,"outlineColor",ia,this),Ba(this,"hideOutline",aa,this),Ba(this,"outlineStrokeDashArray",ua,this),Ba(this,"strokeOpacity",ca,this),Ba(this,"zIndex",sa,this),Ba(this,"isSelected",la,this),Ba(this,"isHovered",fa,this),Ba(this,"isHitable",pa,this),Ba(this,"hoverStroke",ya,this),Ba(this,"selectedStroke",da,this),Ba(this,"points",ha,this),Ba(this,"pointsList",va,this),Ba(this,"draggable",ba,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,tc(t)),this.graphModel.overlapMode===ao.INCREASE&&(this.zIndex=t.zIndex||La())}},{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 ga(t).forEach((function(t){var o=ec(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 ga(t).forEach((function(t){var o=ec(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===ao.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"setProperty",value:function(t,e){this.properties[t]=Ca(e),this.setAttributes()}},{key:"setProperties",value:function(t){Object.assign(this.properties,Ca(t)),this.setAttributes()}},{key:"updateData",value:function(t){var e=Ca(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"===za(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]:Ga.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})}}])&&Ha(e.prototype,r),n&&Ha(e,n),t}()).prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),$i=Xa(Wi.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.text}}),Zi=Xa(Wi.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),qi=Xa(Wi.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Ji=Xa(Wi.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.sourceNodeId}}),Qi=Xa(Wi.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.targetNodeId}}),ta=Xa(Wi.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.startPoint}}),ea=Xa(Wi.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.endPoint}}),ra=Xa(Wi.prototype,"strokeWidth",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.strokeWidth}}),na=Xa(Wi.prototype,"stroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.stroke}}),oa=Xa(Wi.prototype,"strokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.strokeDashArray}}),ia=Xa(Wi.prototype,"outlineColor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.outlineColor}}),aa=Xa(Wi.prototype,"hideOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.hideOutline}}),ua=Xa(Wi.prototype,"outlineStrokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.outlineStrokeDashArray}}),ca=Xa(Wi.prototype,"strokeOpacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.strokeOpacity}}),sa=Xa(Wi.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.zIndex}}),la=Xa(Wi.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.isSelected}}),fa=Xa(Wi.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.isHovered}}),pa=Xa(Wi.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ya=Xa(Wi.prototype,"hoverStroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.hoverStroke}}),da=Xa(Wi.prototype,"selectedStroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.selectedStroke}}),ha=Xa(Wi.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.points}}),va=Xa(Wi.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ga.pointsList}}),ba=Xa(Wi.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xa(Wi.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(Wi.prototype,"sourceNode"),Wi.prototype),Xa(Wi.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(Wi.prototype,"targetNode"),Wi.prototype),Xa(Wi.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(Wi.prototype,"textPosition"),Wi.prototype),Xa(Wi.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setProperty"),Wi.prototype),Xa(Wi.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setProperties"),Wi.prototype),Xa(Wi.prototype,"updateData",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateData"),Wi.prototype),Xa(Wi.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"formatText"),Wi.prototype),Xa(Wi.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"resetTextPosition"),Wi.prototype),Xa(Wi.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"moveText"),Wi.prototype),Xa(Wi.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setText"),Wi.prototype),Xa(Wi.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateText"),Wi.prototype),Xa(Wi.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setAnchors"),Wi.prototype),Xa(Wi.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setSelected"),Wi.prototype),Xa(Wi.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setHovered"),Wi.prototype),Xa(Wi.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setHitable"),Wi.prototype),Xa(Wi.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setElementState"),Wi.prototype),Xa(Wi.prototype,"updateStroke",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateStroke"),Wi.prototype),Xa(Wi.prototype,"updateStrokeWidth",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateStrokeWidth"),Wi.prototype),Xa(Wi.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateStartPoint"),Wi.prototype),Xa(Wi.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateEndPoint"),Wi.prototype),Xa(Wi.prototype,"setStyleFromTheme",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setStyleFromTheme"),Wi.prototype),Xa(Wi.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"setZIndex"),Wi.prototype),Xa(Wi.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"initPoints"),Wi.prototype),Xa(Wi.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateAttributes"),Wi.prototype),Xa(Wi.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"getAdjustStart"),Wi.prototype),Xa(Wi.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"getAdjustEnd"),Wi.prototype),Xa(Wi.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Wi.prototype,"updateAfterAdjustStartAndEnd"),Wi.prototype),Wi),Va=Ya;function Wa(t){return(Wa="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 Ka(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 $a(t,e){return($a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Za(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=Qa(t);if(e){var o=Qa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qa(this,r)}}function qa(t,e){if(e&&("object"===Wa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ja(t)}function Ja(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qa(t){return(Qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tu,eu,ru=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&&$a(t,e)}(i,t);var e,r,n,o=Za(i);function i(t,e){var r,n,a,u;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"),n=Ja(r),a="modelType",u=Qn.LINE_EDGE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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}}}])&&Ka(e.prototype,r),n&&Ka(e,n),i}(Va);r(42);function nu(t){return(nu="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 ou(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 iu(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 iu(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 iu(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 au(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 uu(){return(uu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=cu(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 cu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yu(t)););return t}function su(t,e){return(su=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function lu(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=yu(t);if(e){var o=yu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fu(this,r)}}function fu(t,e){if(e&&("object"===nu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return pu(t)}function pu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yu(t){return(yu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function du(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hu(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 vu=(eu=hu((tu=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&&su(t,e)}(i,t);var e,r,n,o=lu(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),du(pu(r=o.call(this,t,e,"polyline")),"modelType",Qn.POLYLINE_EDGE),du(pu(r),"offset",wi.polyline.offset),du(pu(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})}(pu(r),"dbClickPosition",eu,pu(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=Vu(this.points),o=ou(Xu(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===ro.HORIZONTAL?i=Math.abs(e.y-r.y):t===ro.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===ro.HORIZONTAL?n={x:r.x,y:e.y}:t===ro.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(Uu(a,o,this.sourceNode)){if(Fu(o,i,this.sourceNode)){var u=Gu(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)&&wa(e.x,e.y,o.x,o.y)<wa(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(Uu(s,l,this.targetNode)){if(Fu(c,s,this.targetNode)){var f=Gu(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)&&wa(t.x,t.y,s.x,s.y)<wa(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=Yu(r,n),f=e[0];switch(c){case Qn.RECT_NODE:0!==a.radius&&(Pa(r,a)||(f=Ea(r,l,a)));break;case Qn.CIRCLE_NODE:f=Sa(r,l,a);break;case Qn.ELLIPSE_NODE:f=ka(r,l,a);break;case Qn.DIAMOND_NODE:case Qn.POLYGON_NODE:f=Aa(r,l,a)}e[0]=f;var p=Yu(o,i),y=e[e.length-1];switch(s){case Qn.RECT_NODE:0!==u.radius&&(Pa(i,u)||(y=Ea(i,p,u)));break;case Qn.CIRCLE_NODE:y=Sa(i,p,u);break;case Qn.ELLIPSE_NODE:y=ka(i,p,u);break;case Qn.DIAMOND_NODE:case Qn.POLYGON_NODE:y=Aa(i,p,u)}return e[e.length-1]=y,e}},{key:"getData",value:function(){var t=uu(yu(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=Hu({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===ro.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===ro.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===ro.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(!_a(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(!_a(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDragingPoints(a,"end",f,p,c)}}c=Bu(c),this.updatePointsAfterDrage(c),this.draginngPointList=c}else if(a===ro.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(!_a(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(!_a(v,this.targetNode)){var b=this.targetNode.anchors;y=this.getDragingPoints(a,"end",v,b,y)}}y=Bu(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=Vu(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=Hu({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&au(e.prototype,r),n&&au(e,n),i}(Va)).prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hu(tu.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"initPoints"),tu.prototype),hu(tu.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"updatePoints"),tu.prototype),hu(tu.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"updateStartPoint"),tu.prototype),hu(tu.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"updateEndPoint"),tu.prototype),hu(tu.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"dragAppendStart"),tu.prototype),hu(tu.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"dragAppendSimple"),tu.prototype),hu(tu.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"dragAppend"),tu.prototype),hu(tu.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"dragAppendEnd"),tu.prototype),hu(tu.prototype,"updatePointsAfterDrage",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"updatePointsAfterDrage"),tu.prototype),hu(tu.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"getAdjustStart"),tu.prototype),hu(tu.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"getAdjustEnd"),tu.prototype),hu(tu.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(tu.prototype,"updateAfterAdjustStartAndEnd"),tu.prototype),tu),bu=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 gu(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 mu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gu(Object(r),!0).forEach((function(e){Ou(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ou(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wu(t){return function(t){if(Array.isArray(t))return Eu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||xu(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 _u(t){return(_u="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 ju(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)||xu(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 xu(t,e){if(t){if("string"==typeof t)return Eu(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)?Eu(t,e):void 0}}function Eu(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 Su=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},Pu=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}},ku=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?ro.HORIZONTAL:ro.VERTICAL}(e,t)===ro.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}},Au=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}},Du=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}},Tu=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}]},Mu=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Nu=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Cu=function(t,e,r,n,o){return Nu(t,e)+Nu(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])},Ru=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},Iu=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=ju(Tu(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return Ru(t,e,o,i)||Ru(t,e,o,u)||Ru(t,e,i,a)||Ru(t,e,a,u)},Lu=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=Cu(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||Iu(t,e,r)||Iu(t,e,n)||o.push(t))})),Su(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]+Nu(v,t);l[t.id]&&n>=l[t.id]||(s[t.id]=v.id,l[t.id]=n,f[t.id]=l[t.id]+Cu(t,r,e,i,a))}}))};c.length;){var d=y();if("object"===_u(d))return d.v}return[e,r]},zu=function(t){return xa(t)},Bu=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},Hu=function(t,e,r,n,o){var i,a,u=zu(r),c=zu(n),s=Pu(u,o),l=Pu(c,o),f=ku(s,t),p=ku(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=Wu(t,e,f,p);return[t,f].concat(wu(y),[p,e])}var d=Du([f,p]),h=Au(s,d),v=Au(l,d),b=[];b=(b=b.concat(Tu(h))).concat(Tu(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 Mu(t,s)&&Mu(t,l)})))})),[{x:f.x,y:p.y},{x:p.x,y:f.y}].forEach((function(t){Mu(t,s)&&Mu(t,l)&&b.push(t)})),b.unshift(f),b.push(p),b=Su(b);var m=Lu(b,f,p,u,c,t,e);return m.unshift(t),m.push(e),m.length>2&&(m=Bu(m)),Su(m)},Xu=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=wa(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=wa(a.x,a.y,u.x,u.y);c>o&&(o=c,r=a,n=u)}e=[r,n]}return e},Uu=function(t,e,r){var n=_a(t,r),o=_a(e,r);return n&&o},Fu=function(t,e,r){var n=_a(t,r),o=_a(e,r);return!(n&&o)&&(n||o)},Gu=function(t,e,r){for(var n,o,i=xa(r),a=Tu(i),u=0;u<a.length;u++){Ru(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},Yu=function(t,e){var r;return t.x===e.x?r=ro.VERTICAL:t.y===e.y&&(r=ro.HORIZONTAL),r},Vu=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=ju(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},Wu=function(t,e,r,n){var o=[];if(Yu(t,r)===Yu(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=Ui(i,t,r),u=Ui(i,e,n);if(a||u)i={x:n.x,y:r.y};else{var c=Ku(i,t,r),s=Ku(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},Ku=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},$u=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},Zu=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,a=xa(n),u=xa(o),c=Pu(a,i),s=Pu(u,i);return{sNext:ku(c,e),ePre:ku(s,r)}},qu=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Ju(e[0]),Ju(e[1]),Ju(e[2]),Ju(e[3])]},Ju=function(t){var e=ju(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Qu=function(t,e){for(var r,n=t.x,o=t.y,i=Vu(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(Ui(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(Ui(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},tc=function(t){return Vn(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},ec=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};var rc=function(){};function nc(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 oc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ic=window.document;function ac(t){var e=t.onDragStart,r=void 0===e?rc:e,n=t.onDraging,o=void 0===n?rc:n,i=t.onDragEnd,a=void 0===i?rc: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,ic.removeEventListener("mousemove",b,!1),ic.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,ic.addEventListener("mousemove",b,!1),ic.addEventListener("mouseup",g,!1),r({event:t})}}var uc,cc,sc,lc,fc,pc,yc,dc,hc,vc,bc,gc,mc,Oc,wc,_c,jc,xc,Ec=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?rc:n,i=e.onDraging,a=void 0===i?rc:i,u=e.onDragEnd,c=void 0===u?rc: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),oc(this,"onDragStart",void 0),oc(this,"onDraging",void 0),oc(this,"onDragEnd",void 0),oc(this,"step",void 0),oc(this,"isStopPropagation",void 0),oc(this,"isDraging",!1),oc(this,"isStartDraging",!1),oc(this,"startX",0),oc(this,"startY",0),oc(this,"sumDeltaX",0),oc(this,"sumDeltaY",0),oc(this,"eventType",void 0),oc(this,"eventCenter",void 0),oc(this,"model",void 0),oc(this,"startTime",void 0),oc(this,"isGrag",void 0),oc(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,ic.addEventListener("mousemove",r.handleMouseMove,!1),ic.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(eo["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(eo["".concat(r.eventType,"_DRAGSTART")],{e:t,data:i}),r.startTime=(new Date).getTime()}})),oc(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(eo["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:s}),null===(o=r.eventCenter)||void 0===o||o.emit(eo["".concat(r.eventType,"_DRAG")],{e:t,data:s})}})),oc(this,"handleMouseUp",(function(t){var e,n,o;if(r.isStartDraging=!1,r.isStopPropagation&&t.stopPropagation(),ic.removeEventListener("mousemove",r.handleMouseMove,!1),ic.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(eo["".concat(r.eventType,"_MOUSEUP")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(eo["".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}}])&&nc(e.prototype,r),n&&nc(e,n),t}();function Sc(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 Pc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Sc(Object(r),!0).forEach((function(e){Mc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kc(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 Ac(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 Ac(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 Ac(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 Dc(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 Tc(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 Mc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nc(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 Cc,Rc=(cc=Nc((uc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Mc(this,"BaseType",to.GRAPH),Mc(this,"modelType",Qn.GRAPH),Mc(this,"rootEl",void 0),Mc(this,"theme",void 0),Mc(this,"eventCenter",void 0),Mc(this,"modelMap",new Map),Mc(this,"width",void 0),Mc(this,"height",void 0),Mc(this,"topElement",void 0),Mc(this,"selectElement",void 0),Mc(this,"idGenerator",void 0),Mc(this,"nodeMoveRules",[]),Dc(this,"edgeType",cc,this),Dc(this,"nodes",sc,this),Dc(this,"activeElement",lc,this),Dc(this,"activeElementState",fc,this),Dc(this,"state",pc,this),Dc(this,"additionStateData",yc,this),Dc(this,"edges",dc,this),Dc(this,"isSlient",hc,this),Dc(this,"overlapMode",vc,this),Dc(this,"plugins",bc,this),Dc(this,"tools",gc,this),Dc(this,"background",mc,this),Dc(this,"transformMatrix",Oc,this),Dc(this,"editConfig",wc,this),Dc(this,"gridSize",_c,this),Dc(this,"partial",jc,this),Dc(this,"fakerNode",xc,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 io(e),this.eventCenter=l,this.transformMatrix=new _o(l),this.theme=Ei(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===qn.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===qn.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=kc(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===to.NODE){for(var o=xa(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=kc(h,2);if(y=v[0],d=v[1],!Ti([y,d],e,r)){l=!1;break}}return l}if(t.BaseType===to.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]),_=Ti(O,e,r),j=Ti(w,e,r);return n?_&&j:_||j}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=Si(n,e.gridSize),t.y=Si(o,e.gridSize),"[object Object]"===Object.prototype.toString.call(t.text)&&(t.text.x-=Pi(n,e.gridSize),t.text.y-=Pi(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===to.NODE&&r.nodes.push(n.getData()),n.BaseType===to.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=Hi()),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=Hi()),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]=Pc(Pc({},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=La()),"bottom"===e&&(o=--Ia),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(eo.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=Ca(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(eo.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,qn.TEXT_EDIT)}},{key:"createEdge",value:function(t){var e=Ca(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(Pc(Pc({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(eo.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===Qn.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,p=Qu(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(eo.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(eo.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(eo.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(eo.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(qn.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(qn.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!==ao.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=Da(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=Da(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=Ei(Pc(Pc({},this.theme),t))}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}}])&&Tc(e.prototype,r),n&&Tc(e,n),t}()).prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sc=Nc(uc.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),lc=Nc(uc.prototype,"activeElement",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),fc=Nc(uc.prototype,"activeElementState",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pc=Nc(uc.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yc=Nc(uc.prototype,"additionStateData",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dc=Nc(uc.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),hc=Nc(uc.prototype,"isSlient",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),vc=Nc(uc.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),bc=Nc(uc.prototype,"plugins",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),gc=Nc(uc.prototype,"tools",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),mc=Nc(uc.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Oc=Nc(uc.prototype,"transformMatrix",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),wc=Nc(uc.prototype,"editConfig",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_c=Nc(uc.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),jc=Nc(uc.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xc=Nc(uc.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Nc(uc.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(uc.prototype,"nodesMap"),uc.prototype),Nc(uc.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(uc.prototype,"edgesMap"),uc.prototype),Nc(uc.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(uc.prototype,"sortElements"),uc.prototype),Nc(uc.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(uc.prototype,"textEditElement"),uc.prototype),Nc(uc.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(uc.prototype,"selectElements"),uc.prototype),Nc(uc.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setFakerNode"),uc.prototype),Nc(uc.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"removeFakerNode"),uc.prototype),Nc(uc.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setModel"),uc.prototype),Nc(uc.prototype,"updateEdgeByIndex",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"updateEdgeByIndex"),uc.prototype),Nc(uc.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"toFront"),uc.prototype),Nc(uc.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setElementZIndex"),uc.prototype),Nc(uc.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"deleteNode"),uc.prototype),Nc(uc.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"addNode"),uc.prototype),Nc(uc.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"cloneNode"),uc.prototype),Nc(uc.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"moveNode"),uc.prototype),Nc(uc.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"moveNode2Coordinate"),uc.prototype),Nc(uc.prototype,"setTextEditable",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setTextEditable"),uc.prototype),Nc(uc.prototype,"createEdge",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"createEdge"),uc.prototype),Nc(uc.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"moveEdge"),uc.prototype),Nc(uc.prototype,"removeEdge",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"removeEdge"),uc.prototype),Nc(uc.prototype,"removeEdgeById",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"removeEdgeById"),uc.prototype),Nc(uc.prototype,"removeEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"removeEdgeBySource"),uc.prototype),Nc(uc.prototype,"removeEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"removeEdgeByTarget"),uc.prototype),Nc(uc.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setElementState"),uc.prototype),Nc(uc.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setElementStateById"),uc.prototype),Nc(uc.prototype,"setElementTextById",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setElementTextById"),uc.prototype),Nc(uc.prototype,"resetElementState",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"resetElementState"),uc.prototype),Nc(uc.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"selectNodeById"),uc.prototype),Nc(uc.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"selectEdgeById"),uc.prototype),Nc(uc.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"selectElementById"),uc.prototype),Nc(uc.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"clearSelectElements"),uc.prototype),Nc(uc.prototype,"moveElements",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"moveElements"),uc.prototype),Nc(uc.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"moveNodes"),uc.prototype),Nc(uc.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setDefaultEdgeType"),uc.prototype),Nc(uc.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"changeNodeType"),uc.prototype),Nc(uc.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"changeEdgeType"),uc.prototype),Nc(uc.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"setTheme"),uc.prototype),Nc(uc.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(uc.prototype,"clearData"),uc.prototype),uc),Ic=Rc;function Lc(t){return(Lc="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(){return(zc=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 Bc(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 Hc(t,e){return(Hc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xc(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=Gc(t);if(e){var o=Gc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uc(this,r)}}function Uc(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fc(t)}function Fc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gc(t){return(Gc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Yc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vc,Wc=_m(Cc=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&&Hc(t,e)}(i,t);var e,r,n,o=Xc(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),Yc(Fc(e=o.call(this)),"stepDrag",void 0),Yc(Fc(e),"stepScrollX",0),Yc(Fc(e),"stepScrollY",0),Yc(Fc(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)})),Yc(Fc(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),Yc(Fc(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}}})),Yc(Fc(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(qn.DEFAULT),o.emit(eo.BLANK_CLICK,{e:t})}})),Yc(Fc(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(qn.SHOW_MENU,i.domOverlayPosition),o.emit(eo.BLANK_CONTEXTMENU,{e:t,position:i})}})),Yc(Fc(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(eo.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 Ec({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",zc({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))}}])&&Bc(e.prototype,r),n&&Bc(e,n),i}(Q.a))||Cc;function Kc(t){return(Kc="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 $c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zc(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 qc(t,e){return(qc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Jc(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 Qc(this,r)}}function Qc(t,e){if(e&&("object"===Kc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ts(t)}function ts(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function es(t){return(es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function rs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ns=_m(Vc=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&&qc(t,e)}(i,t);var e,r,n,o=Jc(i);function i(){var t;$c(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return rs(ts(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())}}])&&Zc(e.prototype,r),n&&Zc(e,n),i}(Q.a))||Vc;r(198);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,ps=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(){return is(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()}}])&&as(e.prototype,r),n&&as(e,n),i}(Q.a);function ys(t){return(ys="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 ds(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hs(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 vs(t,e){return(vs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function bs(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=Os(t);if(e){var o=Os(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gs(this,r)}}function gs(t,e){if(e&&("object"===ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ms(t)}function ms(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Os(t){return(Os=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ws(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _s=_m(fs=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&&vs(t,e)}(i,t);var e,r,n,o=bs(i);function i(){var t;ds(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return ws(ms(t=o.call.apply(o,[this].concat(r))),"id",Hi()),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,")")})))}}])&&hs(e.prototype,r),n&&hs(e,n),i}(Q.a))||fs;_s.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(50);function js(t){return(js="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 xs(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 Es(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 Es(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 Es(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 Ss,Ps=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=xs(t,2),n=r[0],o=r[1];"object"!==js(o)&&(e[n]=o)})),Object(Q.g)("line",e)};function ks(t){return(ks="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 As(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ds(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 Ts(t,e){return(Ts=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ms(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=Cs(t);if(e){var o=Cs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ns(this,r)}}function Ns(t,e){if(e&&("object"===ks(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 Cs(t){return(Cs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rs,Is=_m(Ss=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&&Ts(t,e)}(i,t);var e,r,n,o=Ms(i);function i(){return As(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)(Ps,l),Object(Q.g)(Ps,f))}}])&&Ds(e.prototype,r),n&&Ds(e,n),i}(Q.a))||Ss;function Ls(t){return(Ls="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 zs(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 Bs(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 Bs(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 Bs(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 Hs(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=zs(t,2),r=e[0],n=e[1];"object"!==Ls(n)&&(s[r]=n)})),s.x=u,s.y=c,Object(Q.g)("rect",s)}function Xs(t){return(Xs="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 Us(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fs(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 Gs(t,e){return(Gs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ys(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=Ws(t);if(e){var o=Ws(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vs(this,r)}}function Vs(t,e){if(e&&("object"===Xs(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 Ws(t){return(Ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Hs.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Ks,$s=_m(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&&Gs(t,e)}(i,t);var e,r,n,o=Ys(i);function i(){return Us(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===to.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)(Hs,{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===Qn.LINE_EDGE?n.push(this.getLineOutline(i)):i.modelType===Qn.POLYLINE_EDGE?n.push(this.getPolylineOutline(i)):i.modelType===Qn.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)(Hs,{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=Vu(e),n=Du(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)(Hs,{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=qu(e),n=Du(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)(Hs,{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())}}])&&Fs(e.prototype,r),n&&Fs(e,n),i}(Q.a))||Rs;function Zs(t){return(Zs="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 qs(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 Js(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 Js(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 Js(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 Qs(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=qs(t,2),r=e[0],n=e[1];"object"!==Zs(n)&&(a[r]=n)})),Object(Q.g)("circle",a)}function tl(t){return(tl="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 el(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 rl(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 rl(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 rl(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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ol(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 il(t,e,r){return e&&ol(t.prototype,e),r&&ol(t,r),t}function al(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&&ul(t,e)}function ul(t,e){return(ul=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cl(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 sl(this,r)}}function sl(t,e){if(e&&("object"===tl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ll(t)}function ll(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 pl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yl,dl=function(t){al(r,t);var e=cl(r);function r(t){var n;nl(this,r),pl(ll(n=e.call(this)),"dragHandler",void 0),pl(ll(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=el(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)})),pl(ll(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=ac({onDraging:n.onDraging,onDragEnd:n.onDragEnd});var o=t.position;return n.state={endX:o.x,endY:o.y},n}return il(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)(Qs,{className:"lf-bezier-adjust-anchor",x:o,y:i,r:4,stroke:u,fill:c,fillOpacity:s,onMouseDown:this.dragHandler})}}]),r}(Q.a),hl=_m(Ks=function(t){al(r,t);var e=cl(r);function r(){return nl(this,r),e.apply(this,arguments)}return il(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=el(qu(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)(Ps,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,stroke:s})),l.push(Object(Q.g)(dl,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(Q.g)(Ps,{x1:c.x,y1:c.y,x2:u.x,y2:u.y,stroke:s})),l.push(Object(Q.g)(dl,{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===Qn.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))||Ks;function vl(t){return(vl="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 bl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gl(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 ml(t,e){return(ml=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ol(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=_l(t);if(e){var o=_l(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wl(this,r)}}function wl(t,e){if(e&&("object"===vl(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 _l(t){return(_l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jl,xl=_m(yl=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&&ml(t,e)}(i,t);var e,r,n,o=Ol(i);function i(){return bl(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))}}])&&gl(e.prototype,r),n&&gl(e,n),i}(Q.a))||yl;function El(t){return(El="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 Sl(){return(Sl=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 Pl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kl(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 Dl(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 Tl(this,r)}}function Tl(t,e){if(e&&("object"===El(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 Nl=_m(jl=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=Dl(i);function i(){return Pl(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)(Wc,{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)(xl,{graphModel:r},o.hideOutline?"":Object(Q.g)($s,{graphModel:r}),l?Object(Q.g)(hl,{graphModel:r}):"",o.isSilentMode||!1===o.snapline?"":Object(Q.g)(Is,{snaplineModel:u})),Object(Q.g)(ns,{graphModel:r,tool:n}),o.background&&Object(Q.g)(ps,{background:o.background}),o.grid&&Object(Q.g)(_s,Sl({},o.grid,{graphModel:r})))}}])&&kl(e.prototype,r),n&&kl(e,n),i}(Q.a))||jl;function Cl(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 Rl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Cl(Object(r),!0).forEach((function(e){Ll(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return 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(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var zl=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),Ll(this,"nodeConfig",void 0),Ll(this,"lf",void 0),Ll(this,"options",void 0),Ll(this,"fakerNode",void 0),Ll(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),Ll(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(Rl(Rl({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),Ll(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(eo.NODE_DND_DRAG,{data:i})}return!1})),Ll(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),Ll(this,"onDrop",(function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(Rl(Rl({},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(eo.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:Si(i,n),y:Si(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}}}])&&Il(e.prototype,r),n&&Il(e,n),t}();function Bl(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({},Ul,t)}var Hl,Xl,Ul={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Fl(t){return(Fl="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 Gl(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 Yl(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 Yl(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 Yl(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 Vl(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 Wl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vl(Object(r),!0).forEach((function(e){rf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Kl(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(){return($l="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=ef(t)););return t}function ql(t,e){return(ql=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Jl(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=ef(t);if(e){var o=ef(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ql(this,r)}}function Ql(t,e){if(e&&("object"===Fl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return tf(t)}function tf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ef(t){return(ef=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function rf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nf(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 of,af,uf,cf,sf,lf,ff,pf,yf,df,hf,vf,bf,gf,mf,Of,wf,_f,jf,xf,Ef,Sf,Pf,kf,Af,Df,Tf=(Xl=nf((Hl=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&&ql(t,e)}(i,t);var e,r,n,o=Jl(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),rf(tf(r=o.call(this,t,e,"bezier")),"modelType",Qn.BEZIER_EDGE),rf(tf(r),"offset",wi.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})}(tf(r),"path",Xl,tf(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=$l(ef(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Wl(Wl({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Zu({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=Gl(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=Gl(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=Zu({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()}}])&&Kl(e.prototype,r),n&&Kl(e,n),i}(Va)).prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),nf(Hl.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"initPoints"),Hl.prototype),nf(Hl.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updatePoints"),Hl.prototype),nf(Hl.prototype,"updatePath",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updatePath"),Hl.prototype),nf(Hl.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateStartPoint"),Hl.prototype),nf(Hl.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateEndPoint"),Hl.prototype),nf(Hl.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateAdjustAnchor"),Hl.prototype),nf(Hl.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"getAdjustStart"),Hl.prototype),nf(Hl.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"getAdjustEnd"),Hl.prototype),nf(Hl.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateAfterAdjustStartAndEnd"),Hl.prototype),Hl);r(47);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){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 Cf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nf(Object(r),!0).forEach((function(e){Bf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Rf(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 If(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 If(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 If(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 Lf(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 zf(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 Bf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hf(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 Xf,Uf,Ff=wn({x:0,y:0,zIndex:1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},hideOutline:!1},wi.rect,wi.circle),Gf=(af=Hf((of=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),Bf(this,"id",Hi()),Bf(this,"BaseType",to.NODE),Bf(this,"modelType",Qn.NODE),Bf(this,"additionStateData",void 0),Bf(this,"targetRules",[]),Bf(this,"sourceRules",[]),Bf(this,"moveRules",[]),Bf(this,"hasSetTargetRules",!1),Bf(this,"hasSetSourceRules",!1),Lf(this,"properties",af,this),Lf(this,"type",uf,this),Lf(this,"x",cf,this),Lf(this,"y",sf,this),Lf(this,"_width",lf,this),Bf(this,"graphModel",void 0),Lf(this,"_height",ff,this),Lf(this,"fill",pf,this),Lf(this,"fillOpacity",yf,this),Lf(this,"strokeWidth",df,this),Lf(this,"stroke",hf,this),Lf(this,"strokeOpacity",vf,this),Lf(this,"opacity",bf,this),Lf(this,"outlineColor",gf,this),Lf(this,"hideOutline",mf,this),Lf(this,"hoverOutlineColor",Of,this),Lf(this,"outlineStrokeDashArray",wf,this),Lf(this,"hoverOutlineStrokeDashArray",_f,this),Lf(this,"isSelected",jf,this),Lf(this,"isHovered",xf,this),Lf(this,"isHitable",Ef,this),Lf(this,"zIndex",Sf,this),Lf(this,"anchorsOffset",Pf,this),Lf(this,"state",kf,this),Lf(this,"text",Af,this),Lf(this,"draggable",Df,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===ao.INCREASE&&(this.zIndex=t.zIndex||La())}},{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===ao.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=Rf(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=Rf(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]}):Cf(Cf({},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=Ca(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=Cf(Cf({},this.text),e.text);e.text=Vn(u,"x","y","value","draggable","editable")}wn(this,e)}},{key:"setProperty",value:function(t,e){this.properties=Cf(Cf({},this.properties),{},Bf({},t,Ca(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Cf(Cf({},this.properties),Ca(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]:Ff.zIndex;this.zIndex=t}},{key:"updateAttributes",value:function(t){wn(this,t)}}])&&zf(e.prototype,r),n&&zf(e,n),t}()).prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),uf=Hf(of.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),cf=Hf(of.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.x}}),sf=Hf(of.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.y}}),lf=Hf(of.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.width}}),ff=Hf(of.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.height}}),pf=Hf(of.prototype,"fill",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.fill}}),yf=Hf(of.prototype,"fillOpacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.fillOpacity}}),df=Hf(of.prototype,"strokeWidth",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.strokeWidth}}),hf=Hf(of.prototype,"stroke",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.stroke}}),vf=Hf(of.prototype,"strokeOpacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.strokeOpacity}}),bf=Hf(of.prototype,"opacity",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.opacity}}),gf=Hf(of.prototype,"outlineColor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.outlineColor}}),mf=Hf(of.prototype,"hideOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.hideOutline}}),Of=Hf(of.prototype,"hoverOutlineColor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.hoverOutlineColor}}),wf=Hf(of.prototype,"outlineStrokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.outlineStrokeDashArray}}),_f=Hf(of.prototype,"hoverOutlineStrokeDashArray",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.hoverOutlineStrokeDashArray}}),jf=Hf(of.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xf=Hf(of.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ef=Hf(of.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Sf=Hf(of.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.zIndex}}),Pf=Hf(of.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),kf=Hf(of.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Af=Hf(of.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ff.text}}),Df=Hf(of.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hf(of.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"addNodeMoveRules"),of.prototype),Hf(of.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"move"),of.prototype),Hf(of.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"moveTo"),of.prototype),Hf(of.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"moveText"),of.prototype),Hf(of.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"updateText"),of.prototype),Hf(of.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setSelected"),of.prototype),Hf(of.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setHovered"),of.prototype),Hf(of.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setHitable"),of.prototype),Hf(of.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setElementState"),of.prototype),Hf(of.prototype,"updateStroke",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"updateStroke"),of.prototype),Hf(of.prototype,"updateData",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"updateData"),of.prototype),Hf(of.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setProperty"),of.prototype),Hf(of.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setProperties"),of.prototype),Hf(of.prototype,"setStyleFromTheme",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setStyleFromTheme"),of.prototype),Hf(of.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"setZIndex"),of.prototype),Hf(of.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(of.prototype,"updateAttributes"),of.prototype),of);function Yf(t){return(Yf="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 Vf(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 Wf(t,e){return(Wf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kf(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=qf(t);if(e){var o=qf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $f(this,r)}}function $f(t,e){if(e&&("object"===Yf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zf(t)}function Zf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qf(t){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jf(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 Qf,tp,ep,rp=(Uf=Jf((Xf=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&&Wf(t,e)}(i,t);var e,r,n,o=Kf(i);function i(t,e){var r,n,a,u;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"),n=Zf(r),a="modelType",u=Qn.CIRCLE_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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})}(Zf(r),"r",Uf,Zf(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")}]}}])&&Vf(e.prototype,r),n&&Vf(e,n),i}(Gf)).prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wi.circle.r}}),Jf(Xf.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Xf.prototype,"width"),Xf.prototype),Jf(Xf.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Xf.prototype,"height"),Xf.prototype),Xf);r(121);function np(t){return(np="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 op(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 ip(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 ip(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 ip(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 ap(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 up(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ap(Object(r),!0).forEach((function(e){bp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cp(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 sp(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(){return(lp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=fp(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 fp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vp(t)););return t}function pp(t,e){return(pp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function yp(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=vp(t);if(e){var o=vp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dp(this,r)}}function dp(t,e){if(e&&("object"===np(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 vp(t){return(vp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function bp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,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,_p=(tp=gp((Qf=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&&pp(t,e)}(i,t);var e,r,n,o=yp(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),bp(hp(r=o.call(this,t,e,"diamond")),"modelType",Qn.DIAMOND_NODE),cp(hp(r),"rx",tp,hp(r)),cp(hp(r),"ry",ep,hp(r)),r}return e=i,(r=[{key:"getData",value:function(){var t=this.rx,e=this.ry;return up(up({},lp(vp(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=op(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=op(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=op(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&sp(e.prototype,r),n&&sp(e,n),i}(Gf)).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ep=gp(Qf.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),gp(Qf.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(Qf.prototype,"points"),Qf.prototype),gp(Qf.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Qf.prototype,"pointsPosition"),Qf.prototype),gp(Qf.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Qf.prototype,"width"),Qf.prototype),gp(Qf.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Qf.prototype,"height"),Qf.prototype),gp(Qf.prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(Qf.prototype,"anchors"),Qf.prototype),Qf);function jp(t){return(jp="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,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 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"===jp(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,n,a,u;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"),n=Ap(r),a="modelType",u=Qn.ELLIPSE_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,xp(Ap(r),"rx",Op,Ap(r)),xp(Ap(r),"ry",wp,Ap(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")}]}}])&&Ep(e.prototype,r),n&&Ep(e,n),i}(Gf)).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wi.ellipse.rx}}),wp=Tp(mp.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wi.ellipse.ry}}),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){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 Lp(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 Lp(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 Lp(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 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 Bp(t,e){return(Bp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hp(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=Fp(t);if(e){var o=Fp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xp(this,r)}}function Xp(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 Up(t)}function Up(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fp(t){return(Fp=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 Yp,Vp,Wp=(Np=Gp((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&&Bp(t,e)}(i,t);var e,r,n,o=Hp(i);function i(t,e){var r,n,a,u;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"),n=Up(r),a="modelType",u=Qn.POLYGON_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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})}(Up(r),"points",Np,Up(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=Ip(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=Ip(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=Ip(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)}}))}}])&&zp(e.prototype,r),n&&zp(e,n),i}(Gf)).prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Gp(Mp.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Mp.prototype,"pointsPosition"),Mp.prototype),Gp(Mp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Mp.prototype,"width"),Mp.prototype),Gp(Mp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Mp.prototype,"height"),Mp.prototype),Gp(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){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 Zp(t,e){return(Zp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qp(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=ty(t);if(e){var o=ty(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jp(this,r)}}function Jp(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 Qp(t)}function Qp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ty(t){return(ty=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ey(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 ry,ny,oy,iy,ay=(Vp=ey((Yp=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&&Zp(t,e)}(i,t);var e,r,n,o=qp(i);function i(t,e){var r,n,a,u;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"),n=Qp(r),a="modelType",u=Qn.RECT_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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})}(Qp(r),"radius",Vp,Qp(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")}]}}])&&$p(e.prototype,r),n&&$p(e,n),i}(Gf)).prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wi.rect.radius}}),ey(Yp.prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(Yp.prototype,"anchors"),Yp.prototype),Yp);function uy(t){return(uy="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 cy(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 sy(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 ly(t,e){return(ly=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fy(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=dy(t);if(e){var o=dy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return py(this,r)}}function py(t,e){if(e&&("object"===uy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yy(t)}function yy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dy(t){return(dy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hy(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 vy,by=(ny=hy((ry=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&&ly(t,e)}(i,t);var e,r,n,o=fy(i);function i(t,e){var r,n,a,u;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"),n=yy(r),a="modelType",u=Qn.TEXT_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,cy(yy(r),"fontSize",ny,yy(r)),cy(yy(r),"fontFamily",oy,yy(r)),cy(yy(r),"fontWeight",iy,yy(r)),r}return e=i,(r=[{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=Ma({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=Ma({rows:t,fontSize:this.fontSize,rowsLength:t.length}).height;return e>20?e:20}}])&&sy(e.prototype,r),n&&sy(e,n),i}(Gf)).prototype,"fontSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wi.text.fontSize}}),oy=hy(ry.prototype,"fontFamily",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wi.text.fontFamily}}),iy=hy(ry.prototype,"fontWeight",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wi.text.fontWeight}}),hy(ry.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(ry.prototype,"width"),ry.prototype),hy(ry.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(ry.prototype,"height"),ry.prototype),ry);function gy(t){return(gy="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){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 Oy(t,e){return(Oy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wy(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=xy(t);if(e){var o=xy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _y(this,r)}}function _y(t,e){if(e&&("object"===gy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return jy(t)}function jy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xy(t){return(xy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ey,Sy,Py,ky,Ay=(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)}((vy=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&&Oy(t,e)}(i,t);var e,r,n,o=wy(i);function i(t,e){var r,n,a,u;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"),n=jy(r),a="modelType",u=Qn.HTML_NODE,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,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")}]}}])&&my(e.prototype,r),n&&my(e,n),i}(Gf)).prototype,"anchors",[o.m],Object.getOwnPropertyDescriptor(vy.prototype,"anchors"),vy.prototype),vy);function Dy(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 Ty(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 My(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=wi.snapline,Cy=(Sy=My((Ey=function(){function t(e){var r,n,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o=void 0,(n="graphModel")in(r=this)?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,Dy(this,"isShowHorizontal",Sy,this),Dy(this,"isShowVertical",Py,this),Dy(this,"position",ky,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||Ny.stroke}},{key:"strokeWidth",get:function(){return this.graphModel.theme.snapline.strokeWidth||Ny.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=xa(a);else{var u=this.graphModel.getNodeModel(i);n=xa(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=xa(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=xa(a);else{var u=this.graphModel.getNodeModel(i);n=xa(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=xa(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)}}])&&Ty(e.prototype,r),n&&Ty(e,n),t}()).prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Py=My(Ey.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ky=My(Ey.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),My(Ey.prototype,"stroke",[o.m],Object.getOwnPropertyDescriptor(Ey.prototype,"stroke"),Ey.prototype),My(Ey.prototype,"strokeWidth",[o.m],Object.getOwnPropertyDescriptor(Ey.prototype,"strokeWidth"),Ey.prototype),My(Ey.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(Ey.prototype,"clearSnapline"),Ey.prototype),My(Ey.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(Ey.prototype,"setNodeSnapLine"),Ey.prototype),Ey);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=Gy(t);if(e){var o=Gy(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 Fy(t)}function Fy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gy(t){return(Gy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Yy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vy=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(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Yy(Fy(t=o.call(this)),"preTargetNode",void 0),Yy(Fy(t),"dragHandler",void 0),Yy(Fy(t),"sourceRuleResults",void 0),Yy(Fy(t),"targetRuleResults",void 0),Yy(Fy(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!==ao.INCREASE&&i.toFront(o.id),t.setState({startX:r,startY:n,endX:r,endY:n})})),Yy(Fy(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=Ly(l.moveCanvasPointByHtml([i,a],r,n),2),y=p[0],d=p[1];t.setState({endX:y,endY:d,draging:!0});var h=ma({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,Na(w)),t.targetRuleResults.set(g,Na(_))}var j=t.sourceRuleResults.get(v.id).isAllPass,x=t.targetRuleResults.get(g).isAllPass;j&&x?v.setElementState(qn.ALLOW_CONNECT):v.setElementState(qn.NOT_ALLOW_CONNECT)}else t.preTargetNode&&t.preTargetNode.state!==qn.DEFAULT&&t.preTargetNode.setElementState(qn.DEFAULT)})),Yy(Fy(t),"onDragEnd",(function(){t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear()})),Yy(Fy(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=ma({x:f,y:p},c);if(t.preTargetNode&&t.preTargetNode.state!==qn.DEFAULT&&t.preTargetNode.setElementState(qn.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,j=w.msg;if(b&&_)h.setElementState(qn.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 x=h.getData();a.emit(eo.CONNECTION_NOT_ALLOWED,{data:x,msg:j||g})}}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,draging:!1},t.dragHandler=ac({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 wa(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)(Qs,Iy({className:"lf-node-anchor-hover",x:a,y:u},l,{onMouseDown:this.dragHandler})),Object(Q.g)(Qs,Iy({className:"lf-node-anchor",x:a,y:u},c,{onMouseDown:this.dragHandler})),this.isShowLine()&&Object(Q.g)(Ps,Iy({x1:e,y1:r,x2:n,y2:o,"pointer-events":"none"},s)))}}])&&By(e.prototype,r),n&&By(e,n),i}(Q.a);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 Ky(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 $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 Zy(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.fontSize,u=t.fill,c=void 0===u?"currentColor":u,s=t.model,l=t.autoWrap,f=void 0!==l&&l,p=t.overflowMode,y=void 0===p?"default":p,d={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=Ky(t,2),r=e[0],n=e[1];"object"!==Wy(n)&&(d[r]=n)})),f&&(y="autoWrap"),i){var h=String(i).split(/[\r\n]/g),v=h.length;if("default"!==y){var b=s.BaseType,g=s.textWidth,m=s.modelType;if(b===to.NODE&&m!==Qn.TEXT_NODE||b===to.EDGE&&g)return function(t,e){t.x,t.y;var r=t.value,n=t.color,o=void 0===n?"#000000":n,i=t.fontSize,a=t.model,u=t.fontFamily,c=void 0===u?"":u,s=t.lineHeight,l=t.wrapPadding,f=void 0===l?"0, 0":l,p=t.overflowMode,y=a.width,d=a.textWidth,h=a.textHeight,v=d||y,b=String(r).split(/[\r\n]/g),g=b.length,m=Ta({rows:b,style:{fontSize:"".concat(i,"px"),width:"".concat(v,"px"),fontFamily:c,lineHeight:s,padding:f},rowsLength:g,className:"lf-get-text-height"}),O=a.height>m?a.height:m;h&&(O=h);var w="ellipsis"===p;return Object(Q.g)("g",null,Object(Q.g)("foreignObject",{width:v,height:O,x:e.x-v/2,y:e.y-O/2},Object(Q.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:O,width:v,color:o,padding:f}},Object(Q.g)("div",{className:w?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:{fontSize:i,fontFamily:c,lineHeight:s}},b.map((function(t){return Object(Q.g)("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t,d)}if(v>1){var O=h.map((function(t,e){var n=(e-(v-1)/2)*(a+2);return Object(Q.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(Q.g)("text",d,O)}return Object(Q.g)("text",d,i)}}function qy(t){return(qy="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 Jy(){return(Jy=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 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 td(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 td(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 td(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 ed(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 rd(t,e){return(rd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nd(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 od(this,r)}}function od(t,e){if(e&&("object"===qy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return id(t)}function id(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ad(t){return(ad=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ud(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cd=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&&rd(t,e)}(i,t);var e,r,n,o=nd(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),ud(id(e=o.call(this)),"dragHandler",void 0),ud(id(e),"sumDeltaX",0),ud(id(e),"sumDeltaY",0),ud(id(e),"stepDrag",void 0),ud(id(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=Qy(o.graphModel.transformMatrix.fixDeltaXY(r,n),2),u=a[0],c=a[1];i.moveText(u,c)})),ud(id(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(qn.TEXT_EDIT)})),ud(id(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 Ec({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)(Zy,Jy({},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())}}])&&ed(e.prototype,r),n&&ed(e,n),i}(Q.a),sd=null!==window.navigator.userAgent.match(/MSIE|Trident/);function ld(t){return(ld="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 fd(){return(fd=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 pd(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 yd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pd(Object(r),!0).forEach((function(e){_d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dd(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 hd(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 hd(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 hd(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 vd(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 bd(t,e){return(bd=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=wd(t);if(e){var o=wd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return md(this,r)}}function md(t,e){if(e&&("object"===ld(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Od(t)}function Od(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wd(t){return(wd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jd=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&&bd(t,e)}(i,t);var e,r,n,o=gd(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),_d(Od(e=o.call(this)),"stepDrag",void 0),_d(Od(e),"contextMenuTime",void 0),_d(Od(e),"startTime",void 0),_d(Od(e),"clickTimer",void 0),_d(Od(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=dd(a.transformMatrix.fixDeltaXY(r,n),2),c=u[0],s=u[1];a.moveNode(i.id,c,s)})),_d(Od(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),_d(Od(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,qn.TEXT_EDIT)),o.emit(eo.NODE_DBCLICK,a)):(o.emit(eo.ELEMENT_CLICK,a),o.emit(eo.NODE_CLICK,a))}}})),_d(Od(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,qn.SHOW_MENU,u.domOverlayPosition),i.selectNodeById(n.id),o.emit(eo.NODE_CONTEXTMENU,{data:a,e:t,position:u}),e.toFront()})),_d(Od(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)})),_d(Od(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(eo.NODE_MOUSEENTER,{data:i,e:t})}})),_d(Od(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(eo.NODE_MOUSELEAVE,{data:i,e:t})})),_d(Od(e),"onMouseOut",(function(t){sd&&e.setHoverOFF(t)}));var r=t.graphModel.gridSize,n=t.eventCenter,a=t.model;return e.stepDrag=new Ec({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 yd({id:e,properties:yd({},n),type:o,x:i,y:a,isSelected:u,isHovered:c,text:yd({},s)},l)}},{key:"getProperties",value:function(){return this.props.model.getProperties()}},{key:"getAnchorStyle",value:function(){return yd({},this.props.graphModel.theme.anchor)}},{key:"getAnchorHoverStyle",value:function(){return yd({},this.props.graphModel.theme.anchorHover)}},{key:"getNewEdgeStyle",value:function(){return yd({},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)(Vy,fd({},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 yd({},this.props.graphModel.theme.nodeText)}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===qn.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)(cd,{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 qn.ALLOW_CONNECT:t+=" lf-node-allow";break;case qn.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!==ao.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}}])&&vd(e.prototype,r),n&&vd(e,n),i}(Q.a);function xd(t){return(xd="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 Ed(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 Sd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ed(Object(r),!0).forEach((function(e){Pd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ed(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Pd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ad(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 Dd(){return(Dd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Td(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 Td(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rd(t)););return t}function Md(t,e){return(Md=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nd(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=Rd(t);if(e){var o=Rd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Cd(this,r)}}function Cd(t,e){if(e&&("object"===xd(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 Rd(t){return(Rd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Id=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&&Md(t,e)}(i,t);var e,r,n,o=Nd(i);function i(){return kd(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=Dd(Rd(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.radius;return Sd(Sd({},t),{},{radius:e})}},{key:"getAttributes",value:function(){var t=Dd(Rd(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Sd(Sd({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)(Hs,t)}}])&&Ad(e.prototype,r),n&&Ad(e,n),i}(jd);function Ld(t){return(Ld="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 zd(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 Bd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zd(Object(r),!0).forEach((function(e){Hd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Hd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ud(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=Gd(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 Gd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kd(t)););return t}function Yd(t,e){return(Yd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vd(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=Kd(t);if(e){var o=Kd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wd(this,r)}}function Wd(t,e){if(e&&("object"===Ld(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 Kd(t){return(Kd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $d=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=Vd(i);function i(){return Xd(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=Fd(Kd(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.r;return Bd(Bd({},t),{},{r:e})}},{key:"getAttributes",value:function(){var t=Fd(Kd(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Bd(Bd({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)(Qs,t)}}])&&Ud(e.prototype,r),n&&Ud(e,n),i}(jd);function Zd(t){return(Zd="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 qd(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 Jd(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 Jd(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 Jd(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 Qd(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=qd(t,2),r=e[0],o=e[1];"object"!==Zd(o)&&(n[r]=o)})),n.points=e.map((function(t){return t.join(",")})).join(" "),Object(Q.g)("polygon",n)}function th(t){return(th="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 rh(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){nh(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 nh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ih(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 ah(){return(ah="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=uh(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 uh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fh(t)););return t}function ch(t,e){return(ch=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sh(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=fh(t);if(e){var o=fh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lh(this,r)}}function lh(t,e){if(e&&("object"===th(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 fh(t){return(fh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ph=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&&ch(t,e)}(i,t);var e,r,n,o=sh(i);function i(){return oh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=ah(fh(i.prototype),"getShapeStyle",this).call(this),e=this.props.model.points;return rh(rh({},t),{},{points:e})}},{key:"getAttributes",value:function(){var t=ah(fh(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return rh(rh({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.width,r=t.height,n=t.x,o=t.y,i={transform:"matrix(1 0 0 1 ".concat(n-e/2," ").concat(o-r/2,")")};return Object(Q.g)("g",i,Object(Q.g)(Qd,t))}}])&&ih(e.prototype,r),n&&ih(e,n),i}(jd);function yh(t){return(yh="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 dh(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 hh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dh(Object(r),!0).forEach((function(e){vh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function vh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gh(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 mh(){return(mh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Oh(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 Oh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xh(t)););return t}function wh(t,e){return(wh=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 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 jh(this,r)}}function jh(t,e){if(e&&("object"===yh(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 Eh=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&&wh(t,e)}(i,t);var e,r,n,o=_h(i);function i(){return bh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var t=this.props.model.points;return hh(hh({},mh(xh(i.prototype),"getShapeStyle",this).call(this)),{},{points:t})}},{key:"getAttributes",value:function(){var t=mh(xh(i.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return hh(hh({},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)(Qd,r))}}])&&gh(e.prototype,r),n&&gh(e,n),i}(jd);function Sh(t){return(Sh="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){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 kh(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 kh(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 kh(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 Ah(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=Ph(t,2),r=e[0],n=e[1];"object"!==Sh(n)&&(c[r]=n)})),Object(Q.g)("ellipse",c)}function Dh(t){return(Dh="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 Th(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 Mh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Th(Object(r),!0).forEach((function(e){Nh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Th(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ch(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rh(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 Ih(){return(Ih="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Lh(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 Lh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xh(t)););return t}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"===Dh(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(){return Ch(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=Ih(Xh(i.prototype),"getAttributes",this).call(this),e=this.props.model,r=e.rx,n=e.ry;return Mh(Mh({},t),{},{rx:r,ry:n})}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)(Ah,t)}}])&&Rh(e.prototype,r),n&&Rh(e,n),i}(jd);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){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?Gh(Object(r),!0).forEach((function(e){Vh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kh(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 $h(t,e){return($h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zh(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=Jh(t);if(e){var o=Jh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qh(this,r)}}function qh(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 Jh(t){return(Jh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qh=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&&$h(t,e)}(i,t);var e,r,n,o=Zh(i);function i(){return Wh(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=$u(t);c=e>c?e:c}));var s=Ma({rows:a,fontSize:r,rowsLength:u}),l=s.width,f=s.height,p=Yh(Yh({},e.backgroundStyle),{},{x:o-1,y:i-1,width:l,height:f});return Object(Q.g)(Hs,p)}}},{key:"getShape",value:function(){var t=this.getAttributes();return Object(Q.g)("g",null,this.getBackgroud(),Object(Q.g)(Zy,t))}}])&&Kh(e.prototype,r),n&&Kh(e,n),i}(jd);function tv(t){return(tv="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 ev(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 nv(t,e){return(nv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ov(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=uv(t);if(e){var o=uv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return iv(this,r)}}function iv(t,e){if(e&&("object"===tv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return av(t)}function av(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uv(t){return(uv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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}var sv=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&&nv(t,e)}(i,t);var e,r,n,o=ov(i);function i(){var t;ev(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return cv(av(t=o.call.apply(o,[this].concat(r))),"ref",void 0),cv(av(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})}}])&&rv(e.prototype,r),n&&rv(e,n),i}(jd);function lv(t){return(lv="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 fv(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 pv(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 pv(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 pv(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 yv(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=fv(t,2),n=r[0],o=r[1];"object"!==lv(o)&&(e[n]=o)})),Object(Q.g)("path",e)}yv.defaultProps={strokeDasharray:""};var dv=yv;function hv(t){return(hv="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 vv(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 bv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mv(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 Ov(t,e){return(Ov=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wv(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 _v(this,r)}}function _v(t,e){if(e&&("object"===hv(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 xv=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&&Ov(t,e)}(i,t);var e,r,n,o=wv(i);function i(){return gv(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=bu(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?vv(Object(r),!0).forEach((function(e){bv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vv(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)(dv,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(Q.g)("g",{className:"lf-arrow"},this.getShape())}}])&&mv(e.prototype,r),n&&mv(e,n),i}(Q.a);function Ev(t){return(Ev="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 Sv(){return(Sv=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 Pv(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 kv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pv(Object(r),!0).forEach((function(e){Rv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Av(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 Dv(t,e){return(Dv=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=Cv(t);if(e){var o=Cv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mv(this,r)}}function Mv(t,e){if(e&&("object"===Ev(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Nv(t)}function Nv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cv(t){return(Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Rv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Iv,Lv=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&&Dv(t,e)}(i,t);var e,r,n,o=Tv(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),Rv(Nv(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHoverd:!0})})),Rv(Nv(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=kv(kv({},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=Ta({rows:y,style:{fontSize:"".concat(a,"px"),width:"".concat(n,"px"),lineHeight:c,padding:s},rowsLength:d,className:"lf-get-text-height"});i=kv(kv({},o),{},{x:f-1,y:p-1,width:n,height:h})}else{var v=0;y&&y.forEach((function(t){var e=$u(t);v=e>v?e:v}));var b=Ma({rows:y,fontSize:a,rowsLength:d}),g=b.width,m=b.height;i=kv(kv({},o),{},{x:f-1,y:p-1,width:g,height:m})}return Object(Q.g)(Hs,i)}}},{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.style,n=e.text,o=n.value,i=kv({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)(Zy,Sv({},i,{model:e})))}}])&&Av(e.prototype,r),n&&Av(e,n),i}(cd);function zv(t){return(zv="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 Hv(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 Xv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hv(Object(r),!0).forEach((function(e){Zv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Uv(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 Fv(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 Fv(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 Fv(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 Gv(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 Yv(t,e){return(Yv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Vv(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=$v(t);if(e){var o=$v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wv(this,r)}}function Wv(t,e){if(e&&("object"===zv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Kv(t)}function Kv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $v(t){return($v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zv(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){t.SOURCE="SOURCE",t.TARGET="TARGET"}(Iv||(Iv={}));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&&Yv(t,e)}(i,t);var e,r,n,o=Vv(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),Zv(Kv(t=o.call(this)),"dragHandler",void 0),Zv(Kv(t),"oldEdge",void 0),Zv(Kv(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})})),Zv(Kv(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=Uv(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=ma({x:i,y:a},d);if(h&&h.node){var v,b=y.startPoint,g=y.endPoint,m=y.sourceNode,O=y.targetNode;s===Iv.SOURCE?v={startPoint:{x:h.anchor.x,y:h.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:h.node,targetNode:O}:s===Iv.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===Iv.SOURCE?y.updateStartPoint({x:f,y:p}):s===Iv.TARGET&&y.updateEndPoint({x:f,y:p})})),Zv(Kv(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=ma({x:c,y:s},a);if(l)if(f&&f.node){var p,y=n.getData(),d=Xv(Xv({},y),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==y||null===(p=y.text)||void 0===p?void 0:p.value)||""});o===Iv.SOURCE?d=Xv(Xv({},d),{},{sourceNodeId:f.node.id,sourceAnchorId:f.anchor.id,startPoint:{x:f.anchor.x,y:f.anchor.y},targetNodeId:n.targetNodeId,endPoint:Xv({},n.endPoint)}):o===Iv.TARGET&&(d=Xv(Xv({},d),{},{sourceNodeId:n.sourceNodeId,startPoint:Xv({},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(Xv({},d));i.emit(eo.EDGE_EXCHANGE_NODE,{data:{newEdge:h.getData(),oldEdge:n.getData()}})}else t.recoveryEdge()})),Zv(Kv(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!==Qn.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),Zv(Kv(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.dragHandler=ac({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)(Qs,Bv({className:"lf-edge-adjust-point"},o,{x:e,y:r,onMouseDown:this.dragHandler,"pointer-events":n?"none":""})))}}])&&Gv(e.prototype,r),n&&Gv(e,n),i}(Q.a);function Jv(t){return(Jv="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 Qv(){return(Qv=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 tb(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 eb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tb(Object(r),!0).forEach((function(e){sb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function rb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nb(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 ob(t,e){return(ob=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ib(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=cb(t);if(e){var o=cb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ab(this,r)}}function ab(t,e){if(e&&("object"===Jv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ub(t)}function ub(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cb(t){return(cb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var lb=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&&ob(t,e)}(i,t);var e,r,n,o=ib(i);function i(){var t;rb(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return sb(ub(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),sb(ub(t),"contextMenuTime",void 0),sb(ub(t),"clickTimer",void 0),sb(ub(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.eventCenter;o.setHovered(e);var a=e?eo.EDGE_MOUSEENTER:eo.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})})),sb(ub(t),"setHoverON",(function(e){t.handleHover(!0,e)})),sb(ub(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),sb(ub(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,qn.SHOW_MENU,a.domOverlayPosition),t.toFront(),o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();i.emit(eo.EDGE_CONTEXTMENU,{data:u,e:e,position:a})})),sb(ub(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),sb(ub(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,qn.DEFAULT),s.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,qn.TEXT_EDIT),o.modelType===Qn.POLYLINE_EDGE){var f=o,p=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,y=p.x,d=p.y,h=Qu({x:y,y:d},f.points);f.dbClickPosition=h}a.emit(eo.EDGE_DBCLICK,{data:u,e:e,position:c})}else a.emit(eo.ELEMENT_CLICK,{data:u,e:e,position:c}),a.emit(eo.EDGE_CLICK,{data:u,e:e,position:c});var v=i.editConfig.metaKeyMultipleSelected;i.selectEdgeById(o.id,e.metaKey&&v),t.toFront()}})),sb(ub(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:eb({},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===qn.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)(Lv,{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)(xv,{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)(qv,Qv({type:"SOURCE"},o,{edgeModel:e,graphModel:r,eventCenter:n})),Object(Q.g)(qv,Qv({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!==ao.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():"")}}])&&nb(e.prototype,r),n&&nb(e,n),i}(Q.a);function fb(t){return(fb="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 pb(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 yb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pb(Object(r),!0).forEach((function(e){db(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function db(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vb(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 bb(){return(bb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=gb(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 gb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_b(t)););return t}function mb(t,e){return(mb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ob(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=_b(t);if(e){var o=_b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wb(this,r)}}function wb(t,e){if(e&&("object"===fb(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 _b(t){return(_b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jb=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&&mb(t,e)}(i,t);var e,r,n,o=Ob(i);function i(){return hb(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 yb(yb({},bb(_b(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)(Ps,{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=bu(mu(mu({},o),{},{type:"start"})),a=bu(mu(mu({},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)(dv,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}}])&&vb(e.prototype,r),n&&vb(e,n),i}(lb);function xb(t){return(xb="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 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}var Pb=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"!==xb(o)&&(e[n]=o)})),Object(Q.g)("polyline",e)};function kb(t){return(kb="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 Ab(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 Db(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ab(Object(r),!0).forEach((function(e){Xb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ab(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tb(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 Mb(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 Mb(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 Mb(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 Nb(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 Cb(){return(Cb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Rb(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 Rb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hb(t)););return t}function Ib(t,e){return(Ib=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lb(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=Hb(t);if(e){var o=Hb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zb(this,r)}}function zb(t,e){if(e&&("object"===kb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Bb(t)}function Bb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hb(t){return(Hb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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}var Ub=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&&Ib(t,e)}(i,t);var e,r,n,o=Lb(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),Xb(Bb(t=o.call(this)),"drag",void 0),Xb(Bb(t),"isDraging",void 0),Xb(Bb(t),"appendInfo",void 0),Xb(Bb(t),"dragHandler",void 0),Xb(Bb(t),"onDragStart",(function(){t.props.model.dragAppendStart()})),Xb(Bb(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=Tb(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})})),Xb(Bb(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(eo.EDGE_ADJUST,{data:o.getData()})})),Xb(Bb(t),"beforeDragStart",(function(e,r){r.dragAble&&t.dragHandler(e),t.appendInfo=r})),Xb(Bb(t),"getIsDraging",(function(){return t.isDraging})),t.drag=ac({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getAttributes",value:function(){var t=Cb(Hb(i.prototype),"getAttributes",this).call(this),e=this.props.model.points;return Db(Db({},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)(Pb,{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=Vu(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=bu(Db(Db({},o),{},{type:"start"})),a=bu(Db(Db({},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)(dv,{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=ro.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=ro.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)}}])&&Nb(e.prototype,r),n&&Nb(e,n),i}(lb);function Fb(t){return(Fb="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 Gb(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 Yb(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 Yb(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 Yb(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 Vb(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 Wb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vb(Object(r),!0).forEach((function(e){Kb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Kb(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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zb(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 qb(){return(qb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Jb(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 Jb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rg(t)););return t}function Qb(t,e){return(Qb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tg(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=rg(t);if(e){var o=rg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eg(this,r)}}function eg(t,e){if(e&&("object"===Fb(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 rg(t){return(rg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ng=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&&Qb(t,e)}(i,t);var e,r,n,o=tg(i);function i(){return $b(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var t=qb(rg(i.prototype),"getAttributes",this).call(this),e=this.props.model.path;return Wb(Wb({},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)(dv,{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)(dv,{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=Gb(function(t){var e=qu(t);return[e[2],e[3]]}(n),2);return{start:i[0],end:i[1],hover:e,isSelected:o}}}])&&Zb(e.prototype,r),n&&Zb(e,n),i}(lb);var og=function(t,e){return _r(t,e)};var ig=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},ag=function(){return ht.a.Date.now()},ug=/\s/;var cg=function(t){for(var e=t.length;e--&&ug.test(t.charAt(e)););return e},sg=/^\s+/;var lg=function(t){return t?t.slice(0,cg(t)+1).replace(sg,""):t},fg=/^[-+]0x[0-9a-f]+$/i,pg=/^0b[01]+$/i,yg=/^0o[0-7]+$/i,dg=parseInt;var hg=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=lg(t);var r=pg.test(t);return r||yg.test(t)?dg(t.slice(2),r?2:8):fg.test(t)?NaN:+t},vg=Math.max,bg=Math.min;var gg=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=ag();if(h(t))return b(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?bg(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=ag(),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=hg(e)||0,St(r)&&(l=!!r.leading,i=(f="maxWait"in r)?vg(hg(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(ag())},g},mg=r(157);function Og(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 wg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _g,jg,xg,Eg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),wg(this,"undos",[]),wg(this,"redos",[]),wg(this,"callbacks",[]),wg(this,"stopWatch",null),wg(this,"curData",null),wg(this,"maxSize",50),wg(this,"waitTime",100),wg(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){og(ig(this.undos),t)||(this.undos.push(t),og(this.curData,t)||(this.redos=[]),this.eventCenter.emit(eo.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=ii(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=ii(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(mg.a)(t,gg((function(){var r=t.modelToGraphData();e.add(r)}),this.waitTime))}}])&&Og(e.prototype,r),n&&Og(e,n),t}();function Sg(t){return(Sg="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 Pg(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 kg(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 kg(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 kg(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 Ag(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 Dg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ag(Object(r),!0).forEach((function(e){Lg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ag(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tg(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 Mg(t,e){return(Mg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ng(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=Ig(t);if(e){var o=Ig(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Cg(this,r)}}function Cg(t,e){if(e&&("object"===Sg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Rg(t)}function Rg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ig(t){return(Ig=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Lg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var zg,Bg,Hg,Xg=_m((xg=jg=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&&Mg(t,e)}(i,t);var e,r,n,o=Ng(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),Lg(Rg(t=o.call(this)),"ref",Object(Q.f)()),Lg(Rg(t),"__prevText",{type:"",text:"",id:""}),Lg(Rg(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===to.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===to.EDGE){var p=o.edgeText,y=p.autoWrap,d=p.lineHeight,h=p.wrapPadding,v=i.textWidth;y&&v&&(e=Dg(Dg({},f),{},{width:v,minWidth:v,lineHeight:d,padding:h}))}else if(i.BaseType===to.NODE){var b=o.nodeText,g=b.autoWrap,m=b.lineHeight,O=b.wrapPadding,w=i,_=w.width,j=w.textWidth,x=w.modelType;(x!==Qn.TEXT_NODE&&g||x===Qn.TEXT_NODE&&g&&j)&&(e=Dg(Dg({},f),{},{width:j||_,minWidth:j||_,lineHeight:m,padding:O}))}var E=i.text,S=E.x,P=E.y,k=Pg(n.CanvasPointToHtmlPoint([S,P]),2);return{style:Dg({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(eo.GRAPH_TRANSFORM,(function(){t.textEditElement&&t.textEditElement.setElementState(qn.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(eo.TEXT_UPDATE,Dg({},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}}])&&Tg(e.prototype,r),n&&Tg(e,n),i}(Q.a),Lg(jg,"toolName","textEdit"),_g=xg))||_g,Ug=function(t){return t.modelType===Qn.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===Qn.POLYLINE_EDGE?function(t){var e=t.points,r=Vu(e),n=Du(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===Qn.BEZIER_EDGE?function(t){var e=t.path,r=qu(e),n=Du(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 Fg(t){return(Fg="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 Gg(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)||Vg(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 Yg(t){return function(t){if(Array.isArray(t))return Wg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Vg(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 Vg(t,e){if(t){if("string"==typeof t)return Wg(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)?Wg(t,e):void 0}}function Wg(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 Kg(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 Zg(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=Qg(t);if(e){var o=Qg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qg(this,r)}}function qg(t,e){if(e&&("object"===Fg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Jg(t)}function Jg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qg(t){return(Qg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var em=_m((Hg=Bg=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=Zg(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),tm(Jg(e=o.call(this)),"stepDrag",void 0),tm(Jg(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),tm(Jg(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel;o.moveElements(o.getSelectElements(!0),r,n)})),tm(Jg(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:[]};Yg(a.values()).forEach((function(t){t.BaseType===to.NODE&&c.nodes.push(t.getData()),t.BaseType===to.EDGE&&c.edges.push(t.getData())})),i.emit(eo.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})}));var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new Ec({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===to.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===to.EDGE&&(e=Ug(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=Gg(r.CanvasPointToHtmlPoint([n,o]),2);n=u[0],o=u[1];var c=Gg(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})}}}])&&Kg(e.prototype,r),n&&Kg(e,n),i}(Q.a),tm(Bg,"toolName","multipleSelect"),zg=Hg))||zg;function rm(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 nm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var om=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),nm(this,"tools",void 0),nm(this,"components",void 0),nm(this,"toolMap",new Map),nm(this,"instance",void 0),this.instance=e,this.isDisabledTool(Xg.toolName)||this.registerTool(Xg.toolName,Xg),this.isDisabledTool(em.toolName)||this.registerTool(em.toolName,em)}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}}])&&rm(e.prototype,r),n&&rm(e,n),t}();r(202);function im(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 am=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n={},(r="_events")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}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}}])&&im(e.prototype,r),n&&im(e,n),t}(),um=r(158),cm=r.n(um);function sm(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 lm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var fm=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),lm(this,"mousetrap",void 0),lm(this,"options",void 0),lm(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new cm.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")}}])&&sm(e.prototype,r),n&&sm(e,n),t}(),pm=fm,ym=null;function dm(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function hm(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 vm(t){return(vm="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 bm(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 gm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?bm(Object(r),!0).forEach((function(e){Om(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mm(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 Om(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wm=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),Om(this,"container",void 0),Om(this,"width",void 0),Om(this,"height",void 0),Om(this,"graphModel",void 0),Om(this,"history",void 0),Om(this,"viewMap",new Map),Om(this,"tool",void 0),Om(this,"keyboard",void 0),Om(this,"dnd",void 0),Om(this,"options",void 0),Om(this,"getSnapshot",void 0),Om(this,"eventCenter",void 0),Om(this,"snaplineModel",void 0),Om(this,"components",[]),Om(this,"adapterIn",void 0),Om(this,"adapterOut",void 0),Om(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=Bl(e),this.container=i,this.width=a||i.getBoundingClientRect().width,this.height=u||i.getBoundingClientRect().height,this.tool=new om(this),this.eventCenter=new am,this.history=new Eg(this.eventCenter),this.dnd=new zl({options:c,lf:this}),this.keyboard=new pm({lf:this,keyboard:s}),this.graphModel=new Ic(gm(gm({},this.options),{},{eventCenter:this.eventCenter,rootEl:this.container,width:this.width,height:this.height})),l||!1===f||(this.snaplineModel=new Cy(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)?(ym=null,!1):((ym=o).nodes.forEach((function(t){return dm(t,40)})),ym.edges.forEach((function(t){return hm(t,40)})),!1)}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(ym&&(ym.nodes||ym.edges)){t.clearSelectElements();var r=t.addElements(ym);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)})),ym.nodes.forEach((function(t){return dm(t,40)})),ym.edges.forEach((function(t){return hm(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"===vm(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:lb,BaseEdgeModel:Ya,BaseNode:jd,BaseNodeModel:Gf,RectNode:Id,RectNodeModel:ay,CircleNode:$d,CircleNodeModel:rp,PolygonNode:ph,PolygonNodeModel:Wp,TextNode:Qh,TextNodeModel:by,LineEdge:jb,LineEdgeModel:ru,DiamondNode:Eh,DiamondNodeModel:_p,PolylineEdge:Ub,PolylineEdgeModel:vu,BezierEdge:ng,BezierEdgeModel:Tf,EllipseNode:Uh,EllipseNodeModel:Cp,HtmlNode:sv,HtmlNodeModel:Ay,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:Id,model:ay,type:"rect"}),this._registerElement({type:"circle",view:$d,model:rp}),this._registerElement({type:"polygon",view:ph,model:Wp}),this._registerElement({type:"line",view:jb,model:ru}),this._registerElement({type:"polyline",view:Ub,model:vu}),this._registerElement({type:"bezier",view:ng,model:Tf}),this._registerElement({type:"text",view:Qh,model:by}),this._registerElement({type:"ellipse",view:Uh,model:Cp}),this._registerElement({type:"diamond",view:Eh,model:_p}),this._registerElement({type:"html",view:sv,model:Ay})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=Ca(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=Ca(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(Ca(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(Ca(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Object(Q.j)(Object(Q.g)(Nl,{eventCenter:this.eventCenter,getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container)}}])&&mm(e.prototype,r),n&&mm(e,n),t}();function _m(t){return J(t)}Om(wm,"extensions",new Map);e.default=wm}])}));
|