@logicflow/core 1.1.20 → 1.1.21

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.
@@ -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=215)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return or})),r.d(e,"c",(function(){return Gt})),r.d(e,"d",(function(){return jt})),r.d(e,"e",(function(){return yt})),r.d(e,"f",(function(){return dt})),r.d(e,"g",(function(){return _t})),r.d(e,"h",(function(){return gr})),r.d(e,"i",(function(){return at})),r.d(e,"j",(function(){return wt})),r.d(e,"k",(function(){return te})),r.d(e,"l",(function(){return oe})),r.d(e,"m",(function(){return rt})),r.d(e,"n",(function(){return le})),r.d(e,"o",(function(){return E})),r.d(e,"p",(function(){return Pe})),r.d(e,"q",(function(){return fe})),r.d(e,"r",(function(){return be})),r.d(e,"s",(function(){return vr})),r.d(e,"t",(function(){return ye})),r.d(e,"u",(function(){return re})),r.d(e,"v",(function(){return we})),r.d(e,"w",(function(){return _e})),r.d(e,"x",(function(){return Ee})),r.d(e,"y",(function(){return er})),r.d(e,"z",(function(){return ir})),r.d(e,"A",(function(){return hr})),r.d(e,"B",(function(){return xe})),r.d(e,"C",(function(){return Z})),r.d(e,"D",(function(){return Ae})),r.d(e,"E",(function(){return ce})),r.d(e,"F",(function(){return ue})),r.d(e,"G",(function(){return ee})),r.d(e,"H",(function(){return Zt})),r.d(e,"I",(function(){return Ne})),r.d(e,"J",(function(){return Re})),r.d(e,"K",(function(){return lt})),r.d(e,"L",(function(){return Se})),r.d(e,"M",(function(){return Ie}));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 d(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function y(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 g(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 b(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=y("Atom",_);function E(t,e,r){void 0===e&&(e=l),void 0===r&&(r=l);var n,o=new _(t);return e!==l&&se("onBecomeObserved",o,e,n),r!==l&&ce(o,r),o}var x={identity:function(t,e){return t===e},structural:function(t,e){return mr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return mr(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])},S(t,e)};
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=215)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return or})),r.d(e,"c",(function(){return Gt})),r.d(e,"d",(function(){return Et})),r.d(e,"e",(function(){return yt})),r.d(e,"f",(function(){return dt})),r.d(e,"g",(function(){return _t})),r.d(e,"h",(function(){return gr})),r.d(e,"i",(function(){return at})),r.d(e,"j",(function(){return wt})),r.d(e,"k",(function(){return te})),r.d(e,"l",(function(){return oe})),r.d(e,"m",(function(){return rt})),r.d(e,"n",(function(){return le})),r.d(e,"o",(function(){return j})),r.d(e,"p",(function(){return Pe})),r.d(e,"q",(function(){return fe})),r.d(e,"r",(function(){return be})),r.d(e,"s",(function(){return vr})),r.d(e,"t",(function(){return ye})),r.d(e,"u",(function(){return re})),r.d(e,"v",(function(){return we})),r.d(e,"w",(function(){return _e})),r.d(e,"x",(function(){return je})),r.d(e,"y",(function(){return er})),r.d(e,"z",(function(){return ir})),r.d(e,"A",(function(){return hr})),r.d(e,"B",(function(){return xe})),r.d(e,"C",(function(){return Z})),r.d(e,"D",(function(){return Ae})),r.d(e,"E",(function(){return ce})),r.d(e,"F",(function(){return ue})),r.d(e,"G",(function(){return ee})),r.d(e,"H",(function(){return Zt})),r.d(e,"I",(function(){return Ne})),r.d(e,"J",(function(){return Re})),r.d(e,"K",(function(){return lt})),r.d(e,"L",(function(){return Se})),r.d(e,"M",(function(){return Ie}));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 d(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function y(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 g(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 b(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}(),E=y("Atom",_);function j(t,e,r){void 0===e&&(e=l),void 0===r&&(r=l);var n,o=new _(t);return e!==l&&se("onBecomeObserved",o,e,n),r!==l&&ce(o,r),o}var x={identity:function(t,e){return t===e},structural:function(t,e){return mr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return mr(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])},S(t,e)};
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -12,4 +12,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var P=function(){return P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},P.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){d(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];d(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 Ee(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;lr(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||hr(t)||er(t)||ir(t)||cr(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 mr(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 Ze(t,K(r),r.name)},map:function(t,e){arguments.length>2&&q("map");var r=F(e);return new or(t,K(r),r.name)},set:function(t,e){arguments.length>2&&q("set");var r=F(e);return new ur(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 fe({},t,e,n);var o=pe(n),i=fe({},void 0,void 0,n),a=Ue(i);return de(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(Ee(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]||{};lr(t).addComputedProp(t,e,P({get:i,set:a,context:t},u))})),et=tt({equals:x.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=dt(!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),yt(e),!0}if(t.dependenciesState===J.STALE)return pt(r),yt(e),!0}}return ht(t),pt(r),yt(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=dt(!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),yt(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 dt(t){var e=Rt.allowStateReads;return Rt.allowStateReads=t,e}function yt(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,gt=1,bt=Object.getOwnPropertyDescriptor((function(){}),"name");bt&&bt.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:Et(!0),prevAllowStateReads:dt(!0),notifySpy:false,startTime:n,actionId:gt++,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),xt(t.prevAllowStateChanges),yt(t.prevAllowStateReads),Ht(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function jt(t,e){var r,n=Et(t);try{r=e()}finally{xt(n)}return r}function Et(t){var e=Rt.allowStateChanges;return Rt.allowStateChanges=t,e}function xt(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=x.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){false,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(ut(this),Fe(this)){var e=Ye(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(),Ve(this)&&Ke(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 m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(_),Pt=y("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?x.structural:x.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 oe((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=y("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){Vt();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(t.isTracing===Q.BREAK){var r=[];Ft(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 ")()}}function Ft(t,e,r){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(r).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Ft(t,e,r+1)})))}var Gt=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),Vt())},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();false,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;Rt.suppressReactionErrors,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=Ce(t);if(!n)return u(!1);n.isTracing,Q.NONE;n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Yt=function(t){return t()};function Vt(){Rt.inBatch>0||Rt.isRunningReactions||Yt(Wt)}function Wt(){Rt.isRunningReactions=!0;for(var t=Rt.pendingReactions,e=0;t.length>0;){100==++e&&t.splice(0);for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Rt.isRunningReactions=!1}var Kt=y("Reaction",Gt);function $t(t){var e=Yt;Yt=function(r){return t((function(){return e(r)}))}}function Zt(t){return function(){}}function qt(){u(!1)}function Jt(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 Qt(t).apply(this,arguments)}}function Qt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){d(this,r,te(t,e))}})}}var te=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?Jt(t):!0!==n?Jt(e).apply(null,arguments):void d(t,e,mt(t.name||e,r.value,this))};function ee(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function re(t){return"function"==typeof t&&!0===t.isMobxAction}function ne(t,e,r){d(t,e,mt(e,r.bind(t)))}function oe(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+a();if(!e.scheduler&&!e.delay)r=new Gt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ae(e),u=!1;r=new Gt(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()}te.bound=function(t,e,r,n){return!0===n?(ne(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return ne(this,e,r.value||r.initializer.call(this)),this[e]},set:qt}:{enumerable:!1,configurable:!0,set:function(t){ne(this,e,t)},get:function(){}}};var ie=function(t){return t()};function ae(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ie}function ue(t,e,r){void 0===r&&(r=i);var n,o,u,c=r.name||"Reaction@"+a(),s=te(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=ae(r),p=!0,d=!1,y=r.compareStructural?x.structural:r.equals||x.default,h=new Gt(c,(function(){p||l?v():d||(d=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(d=!1,!h.isDisposed){var e=!1;h.track((function(){var r=t(h);e=p||!y(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 ce(t,e,r){return se("onBecomeUnobserved",t,e,r)}function se(t,e,r,n){var o="function"==typeof n?vr(e,r):vr(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 le(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&&(Rt.disableErrorBoundaries=!!o),i&&$t(i)}function fe(t,e,r,n){var o=pe(n=F(n));return I(t),lr(t,n.name,o.enhancer),e&&de(t,e,r,o),t}function pe(t){return t.defaultDecorator||(!1===t.deep?V:G)}function de(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 he(vr(t,e))}function he(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(he)),n}var ve=0;function ge(){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=++ve,a=te(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=te(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=te(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=te(e+" - runid: "+i+" - cancel",(function(){try{u&&me(u);var t=a.return(void 0),e=Promise.resolve(t.value);e.then(l,l),me(e),r(new ge)}catch(t){r(t)}})),c}}function me(t){"function"==typeof t.cancel&&t.cancel()}function Oe(t,e){if(null==t)return!1;if(void 0!==e){if(!1===hr(t))return!1;if(!t[w].values.has(e))return!1;var r=vr(t,e);return At(r)}return At(t)}function we(t){return arguments.length>1?u(!1):Oe(t)}function _e(t,e){return"string"!=typeof e?u(!1):Oe(t,e)}function je(t,e){return null!=t&&(void 0!==e?!!hr(t)&&t[w].values.has(e):hr(t)||!!t[w]||j(t)||Kt(t)||At(t))}function Ee(t){return 1!==arguments.length&&u(!1),je(t)}function xe(t){return hr(t)?t[w].getKeys():ir(t)||cr(t)?Array.from(t.keys()):er(t)?t.map((function(t,e){return e})):u(!1)}function Se(t){return hr(t)?xe(t).map((function(e){return t[e]})):ir(t)?xe(t).map((function(e){return t.get(e)})):cr(t)?Array.from(t.values()):er(t)?t.slice():u(!1)}function Pe(t){return hr(t)?xe(t).map((function(e){return[e,t[e]]})):ir(t)?xe(t).map((function(e){return[e,t.get(e)]})):cr(t)?Array.from(t.entries()):er(t)?t.map((function(t,e){return[e,t]})):u(!1)}function ke(t,e,r){if(2!==arguments.length||cr(t))if(hr(t)){var n=t[w],o=n.values.get(e);o?n.write(e,r):n.addObservableProp(e,r,n.defaultEnhancer)}else if(ir(t))t.set(e,r);else if(cr(t))t.add(e);else{if(!er(t))return u(!1);"number"!=typeof e&&(e=parseInt(e,10)),c(e>=0,"Not a valid index: '"+e+"'"),Bt(),e>=t.length&&(t.length=e+1),t[e]=r,Ht()}else{Bt();var i=e;try{for(var a in i)ke(t,a,i[a])}finally{Ht()}}}function Ae(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return gr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return gr(t).observe(e,r)}(t,e,r)}ge.prototype=Object.create(Error.prototype);var De={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Te(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Me(t,e,r){if(!e.recurseEverything&&!Ee(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(Pt(t))return Me(t.get(),e,r);if(Ee(t)&&xe(t),!0===e.detectCycles&&null!==t&&r.has(t))return r.get(t);if(er(t)||Array.isArray(t)){var n=Te(r,t,[],e),o=t.map((function(t){return Me(t,e,r)}));n.length=o.length;for(var i=0,a=o.length;i<a;i++)n[i]=o[i];return n}if(cr(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===e.exportMapsAsObjects){var u=Te(r,t,new Set,e);return t.forEach((function(t){u.add(Me(t,e,r))})),u}var c=Te(r,t,[],e);return t.forEach((function(t){c.push(Me(t,e,r))})),c}if(ir(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===e.exportMapsAsObjects){var s=Te(r,t,new Map,e);return t.forEach((function(t,n){s.set(n,Me(t,e,r))})),s}var l=Te(r,t,{},e);return t.forEach((function(t,n){l[n]=Me(t,e,r)})),l}var f=Te(r,t,{},e);return g(t).forEach((function(n){f[n]=Me(t[n],e,r)})),f}function Ne(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=De),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),Me(t,e,r)}function Ce(t){switch(t.length){case 0:return Rt.trackingDerivation;case 1:return vr(t[0]);case 2:return vr(t[0],t[1])}}function Re(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Ht()}}function Ie(t,e,r){return 1===arguments.length||e&&"object"==typeof e?ze(t,e):Le(t,e,r||{})}function Le(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=oe((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function ze(t,e){var r;var n=new Promise((function(n,o){var i=Le(t,n,P(P({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Be(t){return t[w]}function He(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var Xe={has:function(t,e){if(e===w||"constructor"===e||e===T)return!0;var r=Be(t);return He(e)?r.has(e):e in t},get:function(t,e){if(e===w||"constructor"===e||e===T)return t[e];var r=Be(t),n=r.values.get(e);if(n instanceof _){var o=n.get();return void 0===o&&r.has(e),o}return He(e)&&r.has(e),t[e]},set:function(t,e,r){return!!He(e)&&(ke(t,e,r),!0)},deleteProperty:function(t,e){return!!He(e)&&(Be(t).remove(e),!0)},ownKeys:function(t){return Be(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return u("Dynamic observable objects cannot be frozen"),!1}};function Ue(t){var e=new Proxy(t,Xe);return t[w].proxy=e,e}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),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ye(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 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),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ke(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 $e={get:function(t,e){return e===w?t[w]:"length"===e?t[w].getArrayLength():"number"==typeof e?Je.get.call(t,e):"string"!=typeof e||isNaN(e)?Je.hasOwnProperty(e)?Je[e]:t[e]:Je.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[w].setArrayLength(r),"number"==typeof e&&Je.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:Je.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return u("Observable arrays cannot be frozen"),!1}};function Ze(t,e,r,n){void 0===r&&(r="ObservableArray@"+a()),void 0===n&&(n=!1);var o,i,u,c=new qe(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,$e);if(c.proxy=s,t&&t.length){var l=Et(!0);c.spliceWithArray(0,0,t),xt(l)}return s}var qe=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 Ge(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}),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.");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),Fe(this)){var a=Ye(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=Ve(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Ke(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Ve(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&&Ke(this,i)},t}(),Je={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&&t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t])},set:function(t,e){var r=this[w],n=r.values;if(t<n.length){ut(r.atom);var o=n[t];if(Fe(r)){var i=Ye(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]&&(Je[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]&&(Je[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){Je[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 Qe,tr=y("ObservableArrayAdministration",qe);function er(t){return f(t)&&tr(t[w])}var rr,nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+a()),this.enhancer=e,this.name=r,this[Qe]=nr,this._keysAtom=E(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+"."+b(t)+"?",!1);this._hasMap.set(t,n),ce(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((ut(this._keysAtom),Fe(this))&&!(n=Ye(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Re((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Ke(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=!1,o=Ve(this),i=o?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;n,r.setNewValue(e),o&&Ke(this,i)}},t.prototype._addValue=function(t,e){var r=this;ut(this._keysAtom),Re((function(){var n=new St(e,r.enhancer,r.name+"."+b(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=!1,o=Ve(this),i=o?{type:"add",object:this,name:t,newValue:e}:null;o&&Ke(this,i)},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 jr({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 jr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(Qe=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 ir(t)&&(t=t.toJS()),Re((function(){var r=Et(!0);try{p(t)?g(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{xt(r)}})),this},t.prototype.clear=function(){var t=this;Re((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 Re((function(){var r,n,o,i,a=function(t){if(h(t)||ir(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 d=f.value;if(!a.has(d))if(e.delete(d))s=!0;else{var y=e._data.get(d);c.set(d,y)}}}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()),g=v.next();!g.done;g=v.next()){var b=A(g.value,2),m=(d=b[0],y=b[1],e._data.has(d));if(e.set(d,y),e._data.has(d)){var O=e._data.get(d);c.set(d,O),m||(s=!0)}}}catch(t){o={error:t}}finally{try{g&&!g.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(),E=_.next();!j.done;){if(j.value!==E.value){e._keysAtom.reportChanged();break}j=w.next(),E=_.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:b(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 b(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}(),ir=y("ObservableMap",or),ar={},ur=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+a()),this.name=r,this[rr]=ar,this._data=new Set,this._atom=E(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;Re((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),Fe(this))&&!(o=Ye(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Re((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=!1,n=Ve(this),o=n?{type:"add",object:this,newValue:t}:null;r,n&&Ke(this,o)}return this},t.prototype.delete=function(t){var e=this;if(Fe(this)&&!(n=Ye(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Re((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Ke(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 jr({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 jr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return cr(t)&&(t=t.toJS()),Re((function(){var r=Et(!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{xt(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+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(rr=w,Symbol.iterator)]=function(){return this.values()},t}(),cr=y("ObservableSet",ur),sr=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(Fe(this)){if(!(a=Ye(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=a.newValue}if((e=n.prepareNewValue(e))!==Rt.UNCHANGED){var o=Ve(this),i=!1,a=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;i,n.setNewValue(e),o&&Ke(this,a)}}},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+"."+b(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(Fe(this)){var o=Ye(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+"."+b(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return fr[t]||(fr[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+"."+b(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 pr[t]||(pr[t]={configurable:Rt.computedConfigurable,enumerable:!1,get:function(){return dr(this).read(t)},set:function(e){dr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Fe(this))if(!(u=Ye(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Ve(this),n=!1,o=this.values.get(t),i=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var a=this.pendingKeys.get(t);a&&a.set(!1)}delete this.target[t];var u=r?{type:"remove",object:this.proxy||e,oldValue:i,name:t}:null;n,r&&Ke(this,u)}finally{Ht()}}},t.prototype.illegalAccess=function(t,e){},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Ve(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Ke(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 lr(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 sr(t,new Map,b(e),r);return d(t,w,n),n}var fr=Object.create(null),pr=Object.create(null);function dr(t){var e=t[w];return e||(I(t),t[w])}var yr=y("ObservableObjectAdministration",sr);function hr(t){return!!f(t)&&(I(t),yr(t[w]))}function vr(t,e){if("object"==typeof t&&null!==t){if(er(t))return void 0!==e&&u(!1),t[w].atom;if(cr(t))return t[w];if(ir(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],hr(t))return e?((n=t[w].values.get(e))||u(!1),n):u(!1);if(j(t)||At(t)||Kt(t))return t}else if("function"==typeof t&&Kt(t[w]))return t[w];return u(!1)}function gr(t,e){return t||u("Expecting some object"),void 0!==e?gr(vr(t,e)):j(t)||At(t)||Kt(t)||ir(t)||cr(t)?t:(I(t),t[w]?t[w]:void u(!1))}var br=Object.prototype.toString;function mr(t,e,r){return void 0===r&&(r=-1),Or(t,e,r)}function Or(t,e,r,n,o){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;if("function"!==i&&"object"!==i&&"object"!=typeof e)return!1;var a=br.call(t);if(a!==br.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":r>=0&&r++}t=wr(t),e=wr(e);var u="[object Array]"===a;if(!u){if("object"!=typeof t||"object"!=typeof e)return!1;var c=t.constructor,s=e.constructor;if(c!==s&&!("function"==typeof c&&c instanceof c&&"function"==typeof s&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return o[l]===e;if(n.push(t),o.push(e),u){if((l=t.length)!==e.length)return!1;for(;l--;)if(!Or(t[l],e[l],r-1,n,o))return!1}else{var f=Object.keys(t),p=void 0;if(l=f.length,Object.keys(e).length!==l)return!1;for(;l--;)if(!_r(e,p=f[l])||!Or(t[p],e[p],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function wr(t){return er(t)?t.slice():h(t)||ir(t)||v(t)||cr(t)?Array.from(t.entries()):t}function _r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function jr(t){return t[Symbol.iterator]=Er,t}function Er(){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:Zt,extras:{getDebugName:function(t,e){return(void 0!==e?vr(t,e):hr(t)||ir(t)||cr(t)?gr(t):vr(t)).name}},$mobx:w})}).call(this,r(155),r(82))},function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return b})),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 g})),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 d(t,e){for(var r in e)t[r]=e[r];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,r){var 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 g(){return{current:null}}function b(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=d({},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 E(t,e,r,n,o,i,a,u,c,s){var p,d,y,h,g,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(b,{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===(y=_[p])||y&&h.key==y.key&&h.type===y.type)_[p]=void 0;else for(d=0;d<j;d++){if((y=_[d])&&h.key==y.key&&h.type===y.type){_[d]=void 0;break}y=null}M(t,h,y=y||l,o,i,a,u,c,s),g=h.__e,(d=h.ref)&&y.ref!=d&&(w||(w=[]),y.ref&&w.push(y.ref,null,h),w.push(d,h.__c||g,h)),null!=g?(null==m&&(m=g),"function"==typeof h.type&&h.__k===y.__k?h.__d=c=x(h,c,t):c=P(t,h,y,_,g,c),"function"==typeof r.type&&(r.__d=c)):c&&y.__e==c&&c.parentNode!=t&&(c=O(y))}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 x(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?x(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,y,h,v,g,O,w,_,j,x=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 x){if(O=e.props,w=(l=x.contextType)&&n[l.__c],_=l?w?w.props.value:l.__:n,r.__c?g=(f=e.__c=r.__c).__=f.__E:("prototype"in x&&x.prototype.render?e.__c=f=new x(O,_):(e.__c=f=new m(O,_),f.constructor=x,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!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=d({},f.__s)),d(f.__s,x.getDerivedStateFromProps(O,f.__s))),y=f.props,h=f.state,p)null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==x.getDerivedStateFromProps&&O!==y&&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(y,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=d(d({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(y,h)),j=null!=l&&l.type===b&&null==l.key?l.props.children:l,E(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),g&&(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,d=r.props,h=e.props,v=e.type,g=0;if("svg"===v&&(i=!0),null!=a)for(;g<a.length;g++)if((s=a[g])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,a[g]=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)d===h||c&&t.data===h||(t.data=h);else{if(a=a&&n.call(t.childNodes),f=(d=r.props||l).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!c){if(null!=a)for(d={},g=0;g<t.attributes.length;g++)d[t.attributes[g].name]=t.attributes[g].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,d,i,c),p)e.__k=[];else if(g=e.props.children,E(t,Array.isArray(g)?g:[g],e,r,o,i&&"foreignObject"!==v,a,u,a?a[0]:r.__k&&O(r,0),c),null!=a)for(g=a.length;g--;)null!=a[g]&&y(a[g]);c||("value"in h&&void 0!==(g=h.value)&&(g!==d.value||g!==t.value||"progress"===v&&!g)&&A(t,"value",g,d.value,!1),"checked"in h&&void 0!==(g=h.checked)&&g!==t.checked&&A(t,"checked",g,d.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||y(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(b,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=d({},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=d({},this.state),"function"==typeof t&&(t=t(d({},r),this.props)),t&&d(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=b,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j.__r=0,s=0},function(t,e,r){var n=r(116),o=r(44),i=r(178);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";var n=r(39),o=r(83),i=r(70),a=r(56),u=r(111),c="Array Iterator",s=a.set,l=a.getterFor(c);t.exports=u(Array,"Array",(function(t,e){s(this,{type:c,target:n(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){var n=r(7),o=r(147),i=r(148),a=r(3),u=r(57),c=r(27),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 d in o)p(n[d]&&n[d].prototype,d);p(i,"DOMTokenList")},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(46),a=r(76),u=r(35),c=r(15),s=r(64),l=r(36),f=r(109),p=r(18),d=r(34),y=r(99),h=r(28),v=r(33),g=r(58),b=r(88),m=r(32),O=r(38),w=r(39),_=r(87),j=r(40),E=r(71),x=r(54),S=r(66),P=r(72),k=r(139),A=r(112),D=r(51),T=r(37),M=r(93),N=r(101),C=r(44),R=r(84),I=r(91),L=r(69),z=r(85),B=r(27),H=r(149),X=r(150),U=r(73),F=r(56),G=r(74).forEach,Y=I("hidden"),V="Symbol",W=B("toPrimitive"),K=F.set,$=F.getterFor(V),Z=Object.prototype,q=o.Symbol,J=q&&q.prototype,Q=o.TypeError,tt=o.QObject,et=i("JSON","stringify"),rt=D.f,nt=T.f,ot=k.f,it=M.f,at=c([].push),ut=R("symbols"),ct=R("op-symbols"),st=R("string-to-symbol-registry"),lt=R("symbol-to-string-registry"),ft=R("wks"),pt=!tt||!tt.prototype||!tt.prototype.findChild,dt=l&&p((function(){return 7!=x(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=rt(Z,e);n&&delete Z[e],nt(t,e,r),n&&t!==Z&&nt(Z,e,n)}:nt,yt=function(t,e){var r=ut[t]=x(J);return K(r,{type:V,tag:t,description:e}),l||(r.description=e),r},ht=function(t,e,r){t===Z&&ht(ct,e,r),m(t);var n=_(e);return m(r),d(ut,n)?(r.enumerable?(d(t,Y)&&t[Y][n]&&(t[Y][n]=!1),r=x(r,{enumerable:E(0,!1)})):(d(t,Y)||nt(t,Y,E(1,{})),t[Y][n]=!0),dt(t,n,r)):nt(t,n,r)},vt=function(t,e){m(t);var r=w(e),n=S(r).concat(Ot(r));return G(n,(function(e){l&&!u(gt,r,e)||ht(t,e,r[e])})),t},gt=function(t){var e=_(t),r=u(it,this,e);return!(this===Z&&d(ut,e)&&!d(ct,e))&&(!(r||!d(this,e)||!d(ut,e)||d(this,Y)&&this[Y][e])||r)},bt=function(t,e){var r=w(t),n=_(e);if(r!==Z||!d(ut,n)||d(ct,n)){var o=rt(r,n);return!o||!d(ut,n)||d(r,Y)&&r[Y][n]||(o.enumerable=!0),o}},mt=function(t){var e=ot(w(t)),r=[];return G(e,(function(t){d(ut,t)||d(L,t)||at(r,t)})),r},Ot=function(t){var e=t===Z,r=ot(e?ct:w(t)),n=[];return G(r,(function(t){!d(ut,t)||e&&!d(Z,t)||at(n,ut[t])})),n};(f||(q=function(){if(g(J,this))throw Q("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===Z&&u(r,ct,t),d(this,Y)&&d(this[Y],e)&&(this[Y][e]=!1),dt(this,e,E(1,t))};return l&&pt&&dt(Z,e,{configurable:!0,set:r}),yt(e,t)},C(J=q.prototype,"toString",(function(){return $(this).tag})),C(q,"withoutSetter",(function(t){return yt(z(t),t)})),M.f=gt,T.f=ht,D.f=bt,P.f=k.f=mt,A.f=Ot,H.f=function(t){return yt(B(t),t)},l&&(nt(J,"description",{configurable:!0,get:function(){return $(this).description}}),s||C(Z,"propertyIsEnumerable",gt,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:q}),G(S(ft),(function(t){X(t)})),n({target:V,stat:!0,forced:!f},{for:function(t){var e=j(t);if(d(st,e))return st[e];var r=q(e);return st[e]=r,lt[r]=e,r},keyFor:function(t){if(!b(t))throw Q(t+" is not a symbol");if(d(lt,t))return lt[t]},useSetter:function(){pt=!0},useSimple:function(){pt=!1}}),n({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?x(t):vt(x(t),e)},defineProperty:ht,defineProperties:vt,getOwnPropertyDescriptor:bt}),n({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:mt,getOwnPropertySymbols:Ot}),n({target:"Object",stat:!0,forced:p((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(O(t))}}),et)&&n({target:"JSON",stat:!0,forced:!f||p((function(){var t=q();return"[null]"!=et([t])||"{}"!=et({a:t})||"{}"!=et(Object(t))}))},{stringify:function(t,e,r){var n=N(arguments),o=e;if((v(e)||void 0!==t)&&!b(t))return y(e)||(e=function(t,e){if(h(o)&&(e=u(o,this,t,e)),!b(e))return e}),n[1]=e,a(et,null,n)}});if(!J[W]){var wt=J.valueOf;C(J,W,(function(t){return u(wt,this)}))}U(q,V),L[Y]=!0},function(t,e,r){"use strict";var n=r(146).charAt,o=r(40),i=r(56),a=r(111),u="String Iterator",c=i.set,s=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:o(t),index:0})}),(function(){var t,e=s(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){(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(82))},function(t,e,r){"use strict";var n=r(16),o=r(36),i=r(7),a=r(15),u=r(34),c=r(28),s=r(58),l=r(40),f=r(37).f,p=r(134),d=i.Symbol,y=d&&d.prototype;if(o&&c(d)&&(!("description"in y)||void 0!==d().description)){var h={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(y,this)?new d(t):void 0===t?d():d(t);return""===t&&(h[e]=!0),e};p(v,d),v.prototype=y,y.constructor=v;var g="Symbol(test)"==String(d("test")),b=a(y.toString),m=a(y.valueOf),O=/^Symbol\((.*)\)[^)]+$/,w=a("".replace),_=a("".slice);f(y,"description",{configurable:!0,get:function(){var t=m(this),e=b(t);if(u(h,t))return"";var r=g?_(e,7,-1):w(e,O,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},function(t,e,r){r(150)("iterator")},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 g})),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 ut}));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,d=a.i.unmount;function y(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=y(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 g(t,e){var r=y(n++,3);!a.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function b(t,e){var r=y(n++,4);!a.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=y(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(E),t.__H.__h.forEach(x),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(E),e.__h.forEach(x),e.__h=[])},a.i.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===a.i.requestAnimationFrame||((i=a.i.requestAnimationFrame)||j)(w)),o=null},a.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(E),t.__h=t.__h.filter((function(t){return!t.__||x(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.i.__e(r,t.__v)}})),p&&p(t,e)},a.i.unmount=function(t){d&&d(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{E(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 E(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function x(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(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=k({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return B(t,e,r)}))),t}function H(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return H(t,e,r)})),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function X(){this.__u=0,this.t=null,this.__b=null}function U(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function F(){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)},(X.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=U(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]=H(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)},X.prototype.componentWillUnmount=function(){this.t=[]},X.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]=B(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 G=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Y(t){return this.getChildContext=function(){return t.context},t.children}function V(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(a.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={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)(Y,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(F.prototype=new a.a).__e=function(t){var e=this,r=U(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),G(e,t,n)):o()};r?r(i):i()}},F.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},F.prototype.componentDidUpdate=F.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){G(t,r,e)}))};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,K=/^(?: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]/,$="undefined"!=typeof document,Z=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 q=a.i.event;function J(){}function Q(){return this.cancelBubble}function tt(){return this.defaultPrevented}a.i.event=function(t){return q&&(t=q(t)),t.persist=J,t.isPropagationStopped=Q,t.isDefaultPrevented=tt,t.nativeEvent=t};var et,rt={configurable:!0,get:function(){return this.class}},nt=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];$&&"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)&&!Z(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&&K.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&&(rt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",rt))}t.$$typeof=W,nt&&nt(t)};var ot=a.i.__r;a.i.__r=function(t){ot&&ot(t),et=t.__c};var it={ReactCurrentDispatcher:{current:{readContext:function(t){return et.__n[t.__c].props.value}}}};function at(t){return!!t&&t.$$typeof===W}var ut=function(t,e){return t(e)},ct=a.b,st={useState:h,useReducer:v,useEffect:g,useLayoutEffect:b,useRef:function(t){return u=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){u=6,b((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=y(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)(V,{__v:t,i:e})},createElement:a.e,createContext:a.d,createFactory:function(t){return a.e.bind(null,t)},cloneElement:function(t){return at(t)?a.c.apply(null,arguments):t},createRef:a.f,Fragment:a.b,isValidElement:at,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:ut,StrictMode:ct,Suspense:X,SuspenseList:F,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:it};e.d=st},function(t,e,r){var n=r(7),o=r(147),i=r(148),a=r(179),u=r(57),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){r(16)({target:"Object",stat:!0},{setPrototypeOf:r(97)})},function(t,e,r){var n=r(16),o=r(18),i=r(38),a=r(96),u=r(137);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(16),o=r(46),i=r(76),a=r(198),u=r(157),c=r(32),s=r(33),l=r(54),f=r(18),p=o("Reflect","construct"),d=Object.prototype,y=[].push,h=f((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!f((function(){p((function(){}))})),g=h||v;n({target:"Reflect",stat:!0,forced:g,sham:g},{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(y,n,e),new(i(a,t,n))}var o=r.prototype,f=l(s(o)?o:d),g=i(t,f,e);return s(g)?g:f}})},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){var n=r(7),o=r(51).f,i=r(57),a=r(44),u=r(108),c=r(134),s=r(95);t.exports=function(t,e){var r,l,f,p,d,y=t.target,h=t.global,v=t.stat;if(r=h?n:v?n[y]||u(y,{}):(n[y]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(d=o(r,l))&&d.value:r[l],!s(h?l:y+(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(16),o=r(7),i=r(99),a=r(100),u=r(33),c=r(67),s=r(43),l=r(39),f=r(61),p=r(27),d=r(75),y=r(101),h=d("slice"),v=p("species"),g=o.Array,b=Math.max;n({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var r,n,o,p=l(this),d=s(p),h=c(t,d),m=c(void 0===e?d:e,d);if(i(p)&&(r=p.constructor,(a(r)&&(r===g||i(r.prototype))||u(r)&&null===(r=r[v]))&&(r=void 0),r===g||void 0===r))return y(p,h,m);for(n=new(void 0===r?g:r)(b(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){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";var n=r(16),o=r(102);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){var n=r(16),o=r(38),i=r(66);n({target:"Object",stat:!0,forced:r(18)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){var n=r(16),o=r(18),i=r(39),a=r(51).f,u=r(36),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(16),o=r(74).filter;n({target:"Array",proto:!0,forced:!r(75)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(16),o=r(36),i=r(135),a=r(39),u=r(51),c=r(61);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(36),o=r(94).EXISTS,i=r(15),a=r(37).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(16),o=r(182);n({target:"Array",stat:!0,forced:!r(118)((function(t){Array.from(t)}))},{from:o})},,function(t,e,r){var n=r(7),o=r(84),i=r(34),a=r(85),u=r(109),c=r(128),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){t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(18),a=r(99),u=r(33),c=r(38),s=r(43),l=r(61),f=r(119),p=r(75),d=r(27),y=r(65),h=d("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",b=o.TypeError,m=y>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),O=p("concat"),w=function(t){if(!u(t))return!1;var e=t[h];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,forced:!m||!O},{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(w(i=-1===e?a:arguments[e])){if(p+(o=s(i))>v)throw b(g);for(r=0;r<o;r++,p++)r in i&&l(u,p,i[r])}else{if(p>=v)throw b(g);l(u,p++,i)}return u.length=p,u}})},function(t,e,r){"use strict";var n=r(105),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e,r){var n=r(16),o=r(200);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,r){var n=r(7),o=r(33),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(15),o=r(38),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},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(18);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var n=r(7),o=r(36),i=r(129),a=r(32),u=r(87),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){var n=r(7),o=r(45),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(81),o=r(45);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(7),o=r(98),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){"use strict";var n=r(16),o=r(74).map;n({target:"Array",proto:!0,forced:!r(75)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return s}));var n=r(10),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(82))},function(t,e,r){var n=r(90);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(7),o=r(28),i=r(34),a=r(57),u=r(108),c=r(92),s=r(56),l=r(94).CONFIGURABLE,f=s.get,p=s.enforce,d=String(String).split("String");(t.exports=function(t,e,r,c){var s,f=!!c&&!!c.unsafe,y=!!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=d.join("string"==typeof v?v:""))),t!==n?(f?!h&&t[e]&&(y=!0):delete t[e],y?t[e]=r:a(t,e,r)):y?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(7).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(7),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(16),o=r(35),i=r(33),a=r(32),u=r(199),c=r(51),s=r(96);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){var n=r(30),o=r(165),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(121)(t))},function(t,e,r){"use strict";(function(t){var n=r(105),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(121)(t))},function(t,e,r){var n=r(15),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){var n=r(36),o=r(35),i=r(93),a=r(71),u=r(39),c=r(87),s=r(34),l=r(129),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){var n=r(16),o=r(213).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(46);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n,o=r(32),i=r(168),a=r(110),u=r(69),c=r(133),s=r(86),l=r(91),f=l("IE_PROTO"),p=function(){},d=function(t){return"<script>"+t+"</"+"script>"},y=function(t){t.write(d("")),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?y(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):y(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(7),o=r(28),i=r(89),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,o,i,a=r(170),u=r(7),c=r(15),s=r(33),l=r(57),f=r(34),p=r(107),d=r(91),y=r(69),h="Object already initialized",v=u.TypeError,g=u.WeakMap;if(a||p.state){var b=p.state||(p.state=new g),m=c(b.get),O=c(b.has),w=c(b.set);n=function(t,e){if(O(b,t))throw new v(h);return e.facade=t,w(b,t,e),e},o=function(t){return m(b,t)||{}},i=function(t){return O(b,t)}}else{var _=d("state");y[_]=!0,n=function(t,e){if(f(t,_))throw new v(h);return e.facade=t,l(t,_,e),e},o=function(t){return f(t,_)?t[_]:{}},i=function(t){return f(t,_)}}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 v("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var n=r(36),o=r(37),i=r(71);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(15);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(55);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e,r){"use strict";r(173)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(177))},function(t,e,r){"use strict";var n=r(87),o=r(37),i=r(71);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){var n=r(15),o=r(55),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(16),o=r(214),i=r(83);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e){t.exports=!1},function(t,e,r){var n,o,i=r(7),a=r(53),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(131),o=r(110);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(68),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){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){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(131),o=r(110).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(37).f,o=r(34),i=r(27)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(62),o=r(15),i=r(81),a=r(38),u=r(43),c=r(119),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,d=5==t||f;return function(y,h,v,g){for(var b,m,O=a(y),w=i(O),_=n(h,v),j=u(w),E=0,x=g||c,S=e?x(y,j):r||p?x(y,0):void 0;j>E;E++)if((d||E in w)&&(m=_(b=w[E],E,O),t))if(e)S[E]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return E;case 2:s(S,b)}else switch(t){case 4:return!1;case 7:s(S,b)}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(18),o=r(27),i=r(65),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){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=r(16),o=r(15),i=r(81),a=r(39),u=r(120),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(76),o=r(35),i=r(15),a=r(122),u=r(154),c=r(32),s=r(45),l=r(156),f=r(123),p=r(90),d=r(40),y=r(59),h=r(113),v=r(124),g=r(102),b=r(151),m=r(18),O=b.UNSUPPORTED_Y,w=4294967295,_=Math.min,j=[].push,E=i(/./.exec),x=i(j),S=i("".slice),P=!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]}));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=d(s(this)),a=void 0===r?w: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=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,b=new RegExp(t.source,y+"g");(c=o(g,b,i))&&!((l=b.lastIndex)>v&&(x(p,S(i,v,c.index)),c.length>1&&c.index<i.length&&n(j,p,h(c,1)),f=c[0].length,v=l,p.length>=a));)b.lastIndex===c.index&&b.lastIndex++;return v===i.length?!f&&E(b,"")||x(p,""):x(p,S(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:y(e,t);return a?o(a,e,n,r):o(i,d(n),e,r)},function(t,n){var o=c(this),a=d(t),u=r(i,o,a,n,i!==e);if(u.done)return u.value;var s=l(o,RegExp),y=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),g=new s(O?"^(?:"+o.source+")":o,h),b=void 0===n?w:n>>>0;if(0===b)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var m=0,j=0,E=[];j<a.length;){g.lastIndex=O?0:j;var P,k=v(g,O?S(a,j):a);if(null===k||(P=_(p(g.lastIndex+(O?j:0)),a.length))===m)j=f(a,j,y);else{if(x(E,S(a,m,j)),E.length===b)return E;for(var A=1;A<=k.length-1;A++)if(x(E,k[A]),E.length===b)return E;j=m=P}}return x(E,S(a,m)),E}]}),!P,O)},function(t,e,r){"use strict";var n=r(36),o=r(7),i=r(15),a=r(95),u=r(44),c=r(34),s=r(143),l=r(58),f=r(88),p=r(130),d=r(18),y=r(72).f,h=r(51).f,v=r(37).f,g=r(196),b=r(159).trim,m="Number",O=o.Number,w=O.prototype,_=o.TypeError,j=i("".slice),E=i("".charCodeAt),x=function(t){var e=p(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,r,n,o,i,a,u,c,s=p(t,"number");if(f(s))throw _("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=E(s,0))||45===e){if(88===(r=E(s,2))||120===r)return NaN}else if(48===e){switch(E(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=j(s,2)).length,u=0;u<a;u++)if((c=E(i,u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(a(m,!O(" 0o1")||!O("0b1")||O("+0x1"))){for(var P,k=function(t){var e=arguments.length<1?0:O(x(t)),r=this;return l(w,r)&&d((function(){g(r)}))?s(Object(e),r,k):e},A=n?y(O):"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(","),D=0;A.length>D;D++)c(O,P=A[D])&&!c(k,P)&&v(k,P,h(O,P));k.prototype=w,w.constructor=k,u(o,m,k)}},function(t,e,r){r(16)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(7),o=r(15),i=r(18),a=r(50),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(27),o=r(54),i=r(37),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(64),o=r(107);(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,r){var n=r(15),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=r(7),o=r(33),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(130),o=r(88);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(7),o=r(46),i=r(28),a=r(58),u=r(128),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(7).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(68),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(84),o=r(85),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,r){var n=r(15),o=r(28),i=r(107),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={}.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(36),o=r(34),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(18),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(7),o=r(34),i=r(28),a=r(38),u=r(91),c=r(137),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(15),o=r(32),i=r(172);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(7),o=r(116),i=r(28),a=r(50),u=r(27)("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(50);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(15),o=r(18),i=r(28),a=r(98),u=r(46),c=r(92),s=function(){},l=[],f=u("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=n(p.exec),y=!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 y||!!d(p,c(t))}:h},function(t,e,r){var n=r(15);t.exports=n([].slice)},function(t,e,r){"use strict";var n,o,i=r(35),a=r(15),u=r(40),c=r(184),s=r(151),l=r(84),f=r(54),p=r(56).get,d=r(185),y=r(186),h=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,b=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,E=void 0!==/()??/.exec("")[1];(_||E||j||d||y)&&(g=function(t){var e,r,n,o,a,s,l,d=this,y=p(d),x=u(t),S=y.raw;if(S)return S.lastIndex=d.lastIndex,e=i(g,S,x),d.lastIndex=S.lastIndex,e;var P=y.groups,k=j&&d.sticky,A=i(c,d),D=d.source,T=0,M=x;if(k&&(A=O(A,"y",""),-1===m(A,"g")&&(A+="g"),M=w(x,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==b(x,d.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,T++),r=new RegExp("^(?:"+D+")",A)),E&&(r=new RegExp("^"+D+"$(?!\\s)",A)),_&&(n=d.lastIndex),o=i(v,k?r:d,M),k?o?(o.input=w(o.input,T),o[0]=w(o[0],T),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:_&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),E&&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=g},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(67),a=r(68),u=r(43),c=r(38),s=r(119),l=r(61),f=r(75)("splice"),p=o.TypeError,d=Math.max,y=Math.min,h=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,o,f,g,b,m=c(this),O=u(m),w=i(t,O),_=arguments.length;if(0===_?r=n=0:1===_?(r=0,n=O-w):(r=_-2,n=y(d(a(e),0),O-w)),O+r-n>h)throw p(v);for(o=s(m,n),f=0;f<n;f++)(g=w+f)in m&&l(o,f,m[g]);if(o.length=n,r<n){for(f=w;f<O-n;f++)b=f+r,(g=f+n)in m?m[b]=m[g]:delete m[b];for(f=O;f>O-n+r;f--)delete m[f-1]}else if(r>n)for(f=O-n;f>w;f--)b=f+r-1,(g=f+n-1)in m?m[b]=m[g]:delete m[b];for(f=0;f<r;f++)m[f+w]=arguments[f+2];return m.length=O-n+r,o}})},function(t,e,r){"use strict";var n=r(16),o=r(201);n({target:"String",proto:!0,forced:r(202)("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(82))},function(t,e,r){"use strict";(function(t){var n=r(30),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(121)(t))},function(t,e,r){var n=r(7),o=r(108),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},function(t,e,r){var n=r(7),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(65),o=r(18);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(16),o=r(35),i=r(64),a=r(94),u=r(28),c=r(171),s=r(96),l=r(97),f=r(73),p=r(57),d=r(44),y=r(27),h=r(70),v=r(136),g=a.PROPER,b=a.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,w=y("iterator"),_="keys",j="values",E="entries",x=function(){return this};t.exports=function(t,e,r,a,y,v,S){c(r,e,a);var P,k,A,D=function(t){if(t===y&&R)return R;if(!O&&t in N)return N[t];switch(t){case _:case j:case E:return function(){return new r(this,t)}}return function(){return new r(this)}},T=e+" Iterator",M=!1,N=t.prototype,C=N[w]||N["@@iterator"]||y&&N[y],R=!O&&C||D(y),I="Array"==e&&N.entries||C;if(I&&(P=s(I.call(new t)))!==Object.prototype&&P.next&&(i||s(P)===m||(l?l(P,m):u(P[w])||d(P,w,x)),f(P,T,!0,!0),i&&(h[T]=x)),g&&y==j&&C&&C.name!==j&&(!i&&b?p(N,"name",j):(M=!0,R=function(){return o(C,this)})),y)if(k={values:D(j),keys:v?R:D(_),entries:D(E)},S)for(A in k)(O||M||!(A in N))&&d(N,A,k[A]);else n({target:e,proto:!0,forced:O||M},k);return i&&!S||N[w]===R||d(N,w,R,{name:y}),h[e]=R,k}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(7),o=r(67),i=r(43),a=r(61),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(7),o=r(62),i=r(35),a=r(32),u=r(89),c=r(140),s=r(43),l=r(58),f=r(141),p=r(115),d=r(142),y=n.TypeError,h=function(t,e){this.stopped=t,this.result=e},v=h.prototype;t.exports=function(t,e,r){var n,g,b,m,O,w,_,j=r&&r.that,E=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),P=o(e,j),k=function(t){return n&&d(n,"normal",t),new h(!0,t)},A=function(t){return E?(a(t),S?P(t[0],t[1],k):P(t[0],t[1])):S?P(t,k):P(t)};if(x)n=t;else{if(!(g=p(t)))throw y(u(t)+" is not iterable");if(c(g)){for(b=0,m=s(t);m>b;b++)if((O=A(t[b]))&&l(v,O))return O;return new h(!1)}n=f(t,g)}for(w=n.next;!(_=i(w,n)).done;){try{O=A(_.value)}catch(t){d(n,"throw",t)}if("object"==typeof O&&O&&l(v,O))return O}return new h(!1)}},function(t,e,r){var n=r(98),o=r(59),i=r(70),a=r(27)("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(27)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(7),o=r(58),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(27)("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(180);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(18);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(19);var n=r(15),o=r(44),i=r(102),a=r(18),u=r(27),c=r(57),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,r,f){var p=u(t),d=!a((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),y=d&&!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(!d||!y||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?d&&!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(146).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(7),o=r(35),i=r(32),a=r(28),u=r(50),c=r(102),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){"use strict";var n=r(76),o=r(35),i=r(15),a=r(122),u=r(18),c=r(32),s=r(28),l=r(68),f=r(90),p=r(40),d=r(45),y=r(123),h=r(59),v=r(197),g=r(124),b=r(27)("replace"),m=Math.max,O=Math.min,w=i([].concat),_=i([].push),j=i("".indexOf),E=i("".slice),x="$0"==="a".replace(/./,"$0"),S=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,r){var i=S?"$":"$0";return[function(t,r){var n=d(this),i=null==t?void 0:h(t,b);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 d=r(e,a,u,o);if(d.done)return d.value}var h=s(o);h||(o=p(o));var b=a.global;if(b){var x=a.unicode;a.lastIndex=0}for(var S=[];;){var P=g(a,u);if(null===P)break;if(_(S,P),!b)break;""===p(P[0])&&(a.lastIndex=y(u,f(a.lastIndex),x))}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+=E(u,D,N)+z,D=N+M.length)}return A+E(u,D)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!x||S)},function(t,e,r){var n=r(50),o=r(7);t.exports="process"==n(o.process)},function(t,e,r){r(16)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(109);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(36),o=r(18),i=r(86);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(7),o=r(35),i=r(33),a=r(88),u=r(59),c=r(169),s=r(27),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(15),o=r(34),i=r(39),a=r(132).indexOf,u=r(69),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(67),i=r(43),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(46);t.exports=n("document","documentElement")},function(t,e,r){var n=r(34),o=r(135),i=r(51),a=r(37);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(46),o=r(15),i=r(72),a=r(112),u=r(32),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(18),u=r(28),c=r(54),s=r(96),l=r(44),f=r(27),p=r(64),d=f("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):y=!0),null==n||a((function(){var t={};return n[d].call(t)!==t}))?n={}:p&&(n=c(n)),u(n[d])||l(n,d,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},function(t,e,r){var n=r(18);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(16),o=r(15),i=r(69),a=r(33),u=r(34),c=r(37).f,s=r(72),l=r(139),f=r(174),p=r(85),d=r(176),y=!1,h=p("meta"),v=0,g=function(t){c(t,h,{value:{objectID:"O"+v++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},y=!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";g(t)}return t[h].objectID},getWeakData:function(t,e){if(!u(t,h)){if(!f(t))return!0;if(!e)return!1;g(t)}return t[h].weakData},onFreeze:function(t){return d&&y&&f(t)&&!u(t,h)&&g(t),t}};i[h]=!0},function(t,e,r){var n=r(50),o=r(39),i=r(72).f,a=r(113),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(27),o=r(70),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(7),o=r(35),i=r(55),a=r(32),u=r(89),c=r(115),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(35),o=r(32),i=r(59);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(28),o=r(33),i=r(97);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(44);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(46),o=r(37),i=r(27),a=r(36),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){var n=r(15),o=r(68),i=r(40),a=r(45),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),d=f.length;return p<0||p>=d?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===d||(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(86)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,r){var n=r(27);e.f=n},function(t,e,r){var n=r(181),o=r(34),i=r(149),a=r(37).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(18),o=r(7).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(16),o=r(132).includes,i=r(83);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(16),o=r(15),i=r(193),a=r(45),u=r(40),c=r(194),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(33),o=r(50),i=r(27)("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&&d())}function d(){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 y(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 y(t,e)),1!==s.length||l||u(d)},y.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(32),o=r(157),i=r(27)("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(7),o=r(100),i=r(89),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},function(t,e,r){"use strict";var n=r(16),o=r(159).trim;n({target:"String",proto:!0,forced:r(195)("trim")},{trim:function(){return o(this)}})},function(t,e,r){var n=r(15),o=r(45),i=r(40),a=r(160),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(35),o=r(122),i=r(32),a=r(90),u=r(40),c=r(45),s=r(59),l=r(123),f=r(124);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,d=[],y=0;null!==(p=f(n,o));){var h=u(p[0]);d[y]=h,""===h&&(n.lastIndex=l(o,a(n.lastIndex),s)),y++}return 0===y?null:d}]}))},function(t,e,r){var n,o,i,a,u=r(7),c=r(76),s=r(62),l=r(28),f=r(34),p=r(18),d=r(133),y=r(101),h=r(86),v=r(163),g=r(126),b=u.setImmediate,m=u.clearImmediate,O=u.process,w=u.Dispatch,_=u.Function,j=u.MessageChannel,E=u.String,x=0,S={},P="onreadystatechange";try{n=u.location}catch(t){}var k=function(t){if(f(S,t)){var e=S[t];delete S[t],e()}},A=function(t){return function(){k(t)}},D=function(t){k(t.data)},T=function(t){u.postMessage(E(t),n.protocol+"//"+n.host)};b&&m||(b=function(t){var e=y(arguments,1);return S[++x]=function(){c(l(t)?t:_(t),void 0,e)},o(x),x},m=function(t){delete S[t]},g?o=function(t){O.nextTick(A(t))}:w&&w.now?o=function(t){w.now(A(t))}:j&&!v?(a=(i=new j).port2,i.port1.onmessage=D,o=s(a.postMessage,a)):u.addEventListener&&l(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!p(T)?(o=T,u.addEventListener("message",D,!1)):o=P in h("script")?function(t){d.appendChild(h("script")).onreadystatechange=function(){d.removeChild(this),k(t)}}:function(t){setTimeout(A(t),0)}),t.exports={set:b,clear:m}},function(t,e,r){var n=r(53);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},function(t,e,r){"use strict";var n=r(55),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return m}));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("__")}))},c="pending",s="fulfilled",l="rejected";function f(t){switch(this.state){case c:return t.pending&&t.pending(this.value);case l:return t.rejected&&t.rejected(this.value);case s:return t.fulfilled?t.fulfilled(this.value):this.value}}function p(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=s})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state=l}))),r.isPromiseBasedObservable=!0,r.case=f;var o=e&&e.state===s?e.value:void 0;return Object(n.q)(r,{value:o,state:c},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state=l,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=s,r.value=e,r}))}(p||(p={}));var d=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()},d([n.C.ref],t.prototype,"current",void 0),d([n.k.bound],t.prototype,"next",null),d([n.k.bound],t.prototype,"complete",null),d([n.k.bound],t.prototype,"error",null)}();var y=function(){return y=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},y.apply(this,arguments)},h=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},v=["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===v.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,y(y({},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)},h([n.m],t.prototype,"isDirty",null),h([n.m],t.prototype,"changedValues",null),h([n.k.bound],t.prototype,"submit",null),h([n.k.bound],t.prototype,"reset",null),h([n.k.bound],t.prototype,"resetProperty",null)}();function g(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function b(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function m(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(b(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,g(o),t)}function i(t,e,a){if(b(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 '"+g(e)+"/"+a+"', but it already exists at '"+g(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(b(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 O,w=(O=function(t,e){return O=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])},O(t,e)},function(t,e){function r(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),_=(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}w(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 _(this.store,t)}}();new Set,new Set;var j,E=Promise.resolve();j="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var x=function(){return new Promise((function(t){j(t)}))}}).call(this,r(155))},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();m.prototype.bind=function(t,e,r){var n=this;return t=t instanceof Array?t:[t],n._bindMultiple.call(n,t,e,r),n},m.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},m.prototype.trigger=function(t,e){var r=this;return r._directMap[t+":"+e]&&r._directMap[t+":"+e]({},t),r},m.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},m.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(b(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},m.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},m.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},m.init=function(){var t=m(i);for(var e in t)"_"!==e.charAt(0)&&(m[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},m.init(),o.Mousetrap=m,t.exports&&(t.exports=m),void 0===(n=function(){return m}.call(e,r,e,t))||(t.exports=n)}function d(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function y(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 g(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 b(t,e){return null!==t&&t!==i&&(t===e||b(t.parentNode,e))}function m(t){var e=this;if(t=t||i,!(e instanceof m))return new m(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=[],d=o.type;if(!e._callbacks[t])return[];for("keyup"==d&&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)&&d==s.action&&("keypress"==d&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var y=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(y||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=y(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=y(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var d=p+1===e.length?f:s(a||g(e[p+1]).action);v(e[p],d,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=g(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 d="keypress"==r.type&&a;r.type!=u||h(t)||d||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)},d(t,"keypress",f),d(t,"keydown",f),d(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){var n=r(36),o=r(37),i=r(32),a=r(39),u=r(66);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(7),o=r(35),i=r(28),a=r(33),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(7),o=r(28),i=r(92),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,r){"use strict";var n=r(136).IteratorPrototype,o=r(54),i=r(71),a=r(73),u=r(70),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(7),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(16),o=r(7),i=r(15),a=r(95),u=r(44),c=r(138),s=r(114),l=r(117),f=r(28),p=r(33),d=r(18),y=r(118),h=r(73),v=r(143);t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),m=g?"set":"add",O=o[t],w=O&&O.prototype,_=O,j={},E=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!(b&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!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)||!(b||w.forEach&&!d((function(){(new O).entries().next()})))))_=r.getConstructor(e,t,g,m),c.enable();else if(a(t,!0)){var x=new _,S=x[m](b?{}:-0,1)!=x,P=d((function(){x.has(1)})),k=y((function(t){new O(t)})),A=!b&&d((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:g}),r}))).prototype=w,w.constructor=_),(P||A)&&(E("delete"),E("has"),g&&E("get")),(A||S)&&E(m),b&&w.clear&&delete w.clear}return j[t]=_,n({global:!0,forced:_!=O},j),h(_,t),b||r.setStrong(_,t,g),_}},function(t,e,r){var n=r(18),o=r(33),i=r(50),a=r(175),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(18);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(18);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(37).f,o=r(54),i=r(144),a=r(62),u=r(117),c=r(114),s=r(111),l=r(145),f=r(36),p=r(138).fastKey,d=r(56),y=d.set,h=d.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){u(t,d),y(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})})),d=l.prototype,v=h(e),g=function(t,e,r){var n,o,i=v(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=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(d,{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=this,r=v(e),n=b(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),f?r.size--:e.size--}return!!n},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!!b(this,t)}}),i(d,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),f&&n(d,"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){y(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){"use strict";var n=r(116),o=r(98);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(74).forEach,o=r(120)("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(7),o=r(99),i=r(100),a=r(33),u=r(27)("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(7);t.exports=n},function(t,e,r){"use strict";var n=r(7),o=r(62),i=r(35),a=r(38),u=r(183),c=r(140),s=r(100),l=r(43),f=r(61),p=r(141),d=r(115),y=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 g,b,m,O,w,_,j=d(e),E=0;if(!j||this==y&&c(j))for(g=l(e),b=r?new this(g):y(g);g>E;E++)_=v?h(e[E],E):e[E],f(b,E,_);else for(w=(O=p(e,j)).next,b=r?new this:[];!(m=i(w,O)).done;E++)_=v?u(O,h,[m.value,E],!0):m.value,f(b,E,_);return b.length=E,b}},function(t,e,r){var n=r(32),o=r(142);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(32);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(18),o=r(7).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(18),o=r(7).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(16),o=r(15),i=r(55),a=r(38),u=r(43),c=r(40),s=r(18),l=r(188),f=r(120),p=r(189),d=r(190),y=r(65),h=r(191),v=[],g=o(v.sort),b=o(v.push),m=s((function(){v.sort(void 0)})),O=s((function(){v.sort(null)})),w=f("sort"),_=!s((function(){if(y)return y<70;if(!(p&&p>3)){if(d)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?g(e):g(e,t);var r,n,o=[],s=u(e);for(n=0;n<s;n++)n in e&&b(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(113),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(53).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(53);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(53).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){"use strict";var n=r(16),o=r(74).find,i=r(83),a="find",u=!0;a in[]&&Array(1).find((function(){u=!1})),n({target:"Array",proto:!0,forced:u},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},function(t,e,r){var n=r(7),o=r(154),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(27)("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(94).PROPER,o=r(18),i=r(160);t.exports=function(t){return o((function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||n&&i[t].name!==t}))}},function(t,e,r){var n=r(15);t.exports=n(1..valueOf)},function(t,e,r){var n=r(15),o=r(38),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 d=r+t.length,y=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,d);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>y){var p=i(l/10);return 0===p?o:p<=y?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(7),o=r(15),i=r(55),a=r(33),u=r(34),c=r(101),s=n.Function,l=o([].concat),f=o([].join),p={},d=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?d(e,r.length,r):e.apply(t,r)};return a(r)&&(o.prototype=r),o}},function(t,e,r){var n=r(34);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){"use strict";var n=r(36),o=r(15),i=r(35),a=r(18),u=r(66),c=r(112),s=r(93),l=r(38),f=r(81),p=Object.assign,d=Object.defineProperty,y=o([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||u(p({},e)).join("")!=o}))?function(t,e){for(var r=l(t),o=arguments.length,a=1,p=c.f,d=s.f;o>a;)for(var h,v=f(arguments[a++]),g=p?y(u(v),p(v)):u(v),b=g.length,m=0;b>m;)h=g[m++],n&&!i(d,v,h)||(r[h]=v[h]);return r}:p},function(t,e,r){var n=r(15),o=r(45),i=r(40),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,"&quot;")+'"'),s+">"+c+"</"+e+">"}},function(t,e,r){var n=r(18);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(16),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){"use strict";var n,o,i,a,u=r(16),c=r(64),s=r(7),l=r(46),f=r(35),p=r(205),d=r(44),y=r(144),h=r(97),v=r(73),g=r(145),b=r(55),m=r(28),O=r(33),w=r(117),_=r(92),j=r(114),E=r(118),x=r(156),S=r(162).set,P=r(206),k=r(209),A=r(210),D=r(164),T=r(211),M=r(56),N=r(95),C=r(27),R=r(212),I=r(126),L=r(65),z=C("species"),B="Promise",H=M.getterFor(B),X=M.set,U=M.getterFor(B),F=p&&p.prototype,G=p,Y=F,V=s.TypeError,W=s.document,K=s.process,$=D.f,Z=$,q=!!(W&&W.createEvent&&s.dispatchEvent),J=m(s.PromiseRejectionEvent),Q="unhandledrejection",tt=!1,et=N(B,(function(){var t=_(G),e=t!==String(G);if(!e&&66===L)return!0;if(c&&!Y.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var r=new G((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[z]=n,!(tt=r.then((function(){}))instanceof n)||!e&&R&&!J})),rt=et||!E((function(t){G.all(t).catch((function(){}))})),nt=function(t){var e;return!(!O(t)||!m(e=t.then))&&e},ot=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;P((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var a,u,c,s=r[i++],l=o?s.ok:s.fail,p=s.resolve,d=s.reject,y=s.domain;try{l?(o||(2===t.rejection&&ct(t),t.rejection=1),!0===l?a=n:(y&&y.enter(),a=l(n),y&&(y.exit(),c=!0)),a===s.promise?d(V("Promise-chain cycle")):(u=nt(a))?f(u,a,p,d):p(a)):d(n)}catch(t){y&&!c&&y.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&at(t)}))}},it=function(t,e,r){var n,o;q?((n=W.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),s.dispatchEvent(n)):n={promise:e,reason:r},!J&&(o=s["on"+t])?o(n):t===Q&&A("Unhandled promise rejection",r)},at=function(t){f(S,s,(function(){var e,r=t.facade,n=t.value;if(ut(t)&&(e=T((function(){I?K.emit("unhandledRejection",n,r):it(Q,r,n)})),t.rejection=I||ut(t)?2:1,e.error))throw e.value}))},ut=function(t){return 1!==t.rejection&&!t.parent},ct=function(t){f(S,s,(function(){var e=t.facade;I?K.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},st=function(t,e,r){return function(n){t(e,n,r)}},lt=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,ot(t,!0))},ft=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw V("Promise can't be resolved itself");var n=nt(e);n?P((function(){var r={done:!1};try{f(n,e,st(ft,r,t),st(lt,r,t))}catch(e){lt(r,e,t)}})):(t.value=e,t.state=1,ot(t,!1))}catch(e){lt({done:!1},e,t)}}};if(et&&(Y=(G=function(t){w(this,Y),b(t),f(n,this);var e=H(this);try{t(st(ft,e),st(lt,e))}catch(t){lt(e,t)}}).prototype,(n=function(t){X(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=y(Y,{then:function(t,e){var r=U(this),n=r.reactions,o=$(x(this,G));return o.ok=!m(t)||t,o.fail=m(e)&&e,o.domain=I?K.domain:void 0,r.parent=!0,n[n.length]=o,0!=r.state&&ot(r,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=H(t);this.promise=t,this.resolve=st(ft,e),this.reject=st(lt,e)},D.f=$=function(t){return t===G||t===i?new o(t):Z(t)},!c&&m(p)&&F!==Object.prototype)){a=F.then,tt||(d(F,"then",(function(t,e){var r=this;return new G((function(t,e){f(a,r,t,e)})).then(t,e)}),{unsafe:!0}),d(F,"catch",Y.catch,{unsafe:!0}));try{delete F.constructor}catch(t){}h&&h(F,Y)}u({global:!0,wrap:!0,forced:et},{Promise:G}),v(G,B,!1,!0),g(B),i=l(B),u({target:B,stat:!0,forced:et},{reject:function(t){var e=$(this);return f(e.reject,void 0,t),e.promise}}),u({target:B,stat:!0,forced:c||et},{resolve:function(t){return k(c&&this===i?G:this,t)}}),u({target:B,stat:!0,forced:rt},{all:function(t){var e=this,r=$(e),n=r.resolve,o=r.reject,i=T((function(){var r=b(e.resolve),i=[],a=0,u=1;j(t,(function(t){var c=a++,s=!1;u++,f(r,e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=$(e),n=r.reject,o=T((function(){var o=b(e.resolve);j(t,(function(t){f(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},function(t,e,r){var n=r(7);t.exports=n.Promise},function(t,e,r){var n,o,i,a,u,c,s,l,f=r(7),p=r(62),d=r(51).f,y=r(162).set,h=r(163),v=r(207),g=r(208),b=r(126),m=f.MutationObserver||f.WebKitMutationObserver,O=f.document,w=f.process,_=f.Promise,j=d(f,"queueMicrotask"),E=j&&j.value;E||(n=function(){var t,e;for(b&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},h||b||g||!m||!O?!v&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,l=p(s.then,s),a=function(){l(n)}):b?a=function(){w.nextTick(n)}:(y=p(y,f),a=function(){y(n)}):(u=!0,c=O.createTextNode(""),new m(n).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=E||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,r){var n=r(53),o=r(7);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},function(t,e,r){var n=r(53);t.exports=/web0s(?!.*chrome)/i.test(n)},function(t,e,r){var n=r(32),o=r(33),i=r(164);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){var n=r(7);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e){t.exports="object"==typeof window},function(t,e,r){var n=r(36),o=r(15),i=r(66),a=r(39),u=o(r(93).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(38),o=r(67),i=r(43);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";r.r(e),r.d(e,"observer",(function(){return Zm})),r.d(e,"LogicFlow",(function(){return $m})),r.d(e,"h",(function(){return tt.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return kh})),r.d(e,"RectNode",(function(){return Lh})),r.d(e,"CircleNode",(function(){return Vh})),r.d(e,"PolygonNode",(function(){return iv})),r.d(e,"DiamondNode",(function(){return yv})),r.d(e,"EllipseNode",(function(){return Pv})),r.d(e,"TextNode",(function(){return zv})),r.d(e,"HtmlNode",(function(){return $v})),r.d(e,"BaseEdge",(function(){return Rg})),r.d(e,"LineEdge",(function(){return Kg})),r.d(e,"PolylineEdge",(function(){return pb})),r.d(e,"BezierEdge",(function(){return jb})),r.d(e,"Arrow",(function(){return Nb})),r.d(e,"BaseEdgeModel",(function(){return eu})),r.d(e,"BezierEdgeModel",(function(){return If})),r.d(e,"LineEdgeModel",(function(){return bu})),r.d(e,"PolylineEdgeModel",(function(){return Iu})),r.d(e,"BaseNodeModel",(function(){return yp})),r.d(e,"CircleNodeModel",(function(){return Np})),r.d(e,"DiamondNodeModel",(function(){return td})),r.d(e,"EllipseNodeModel",(function(){return bd})),r.d(e,"PolygonNodeModel",(function(){return zd})),r.d(e,"RectNodeModel",(function(){return ty})),r.d(e,"TextNodeModel",(function(){return hy})),r.d(e,"HtmlNodeModel",(function(){return Ay})),r.d(e,"EditConfigModel",(function(){return go})),r.d(e,"GraphModel",(function(){return es})),r.d(e,"SnaplineModel",(function(){return Ry})),r.d(e,"Keyboard",(function(){return Bm})),r.d(e,"get",(function(){return hf})),r.d(e,"defaults",(function(){return bf}));var n={};r.r(n),r.d(n,"createUuid",(function(){return Ji})),r.d(n,"refreshGraphId",(function(){return Qi})),r.d(n,"createDrag",(function(){return Pc})),r.d(n,"StepDrag",(function(){return Xc}));var o=r(0),i=r(10);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(42),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,d=1e4,y=new Set;function h(){void 0===p&&(p=setTimeout(v,1e4))}function v(){p=void 0;var t=Date.now();y.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,y.delete(e))})),y.size>0&&h()}var g=!1,b=[];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(){g?b.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()+d,reaction:t}}(s);c.current=p,n=c,y.add(n),h()}var v=c.current.reaction;return i.d.useDebugValue(v,f),i.d.useEffect((function(){var t;return t=c,y.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){g=!0,b=[];try{var e=t();g=!1;var r=b.length>0?b:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{g=!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){E[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=u,r}var E={$$typeof:!0,render:!0,compare:!0,type:!0};function x(t){var e=t.children,r=t.render,n=e||r;return"function"!=typeof n?null: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`.")}x.propTypes={children:S,render:S},x.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=B(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,a)}}function B(t,e,r,n,o){var i,a=L(o,n);return(i={})[R]=!0,i.get=function(){return a},i.set=function(o){if(this===t)a=L(o,n);else{var i=B(this,e,r,n,o);Object.defineProperty(this,e,i)}},i.configurable=!0,i.enumerable=r,i}var H=o.a||"$mobx",X=D("isMobXReactObserver"),U=D("isUnmounted"),F=D("skipRender"),G=D("isForcingUpdate");function Y(t){var e=t.prototype;if(t[X])V(e);else t[X]=!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!==K)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=K;$(e,"props"),$(e,"state");var r=e.render;return e.render=function(){return W.call(this,r)},z(e,"componentWillUnmount",(function(){var t;if(!0!==l()&&(null===(t=this.render[H])||void 0===t||t.dispose(),this[U]=!0,!this.render[H]))V(this)})),t}function V(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function W(t){var e=this;if(!0===l())return t.call(this);N(this,F,!1),N(this,G,!1);var r=V(this),n=t.bind(this),a=!1,u=new o.c(r+".render()",(function(){if(!a&&(a=!0,!0!==e[U])){var t=!0;try{N(e,G,!0),e[F]||i.a.prototype.forceUpdate.call(e),t=!1}finally{N(e,G,!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[H]=u,this.render=c,c.call(this)}function K(t,e){return l(),this.state!==e||!T(this.props,t)}function $(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[G]||T(this[r],t)?N(this,r,t):(N(this,r,t),N(this,F,!0),i.call(this).reportChanged(),N(this,F,!1))}})}var Z="function"==typeof Symbol&&Symbol.for,q=Z?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,J=Z?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function Q(t){if(t.isMobxInjector,J&&t.$$typeof===J)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(q&&t.$$typeof===q){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(i.e)((function(){var t=arguments;return Object(i.c)(x,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.a,t)?Y(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 tt=r(1);r(3),r(60),r(2),r(6),r(4),r(11),r(41),r(24),r(20),r(5),r(22),r(21),r(23),r(8),r(9),r(17),r(25),r(19),r(29),r(187),r(192),r(103),r(152),r(153);var et=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 rt=function(){this.__data__=[],this.size=0};var nt=function(t,e){return t===e||t!=t&&e!=e};var ot=function(t,e){for(var r=t.length;r--;)if(nt(t[r][0],e))return r;return-1},it=Array.prototype.splice;var at=function(t){var e=this.__data__,r=ot(e,t);return!(r<0)&&(r==e.length-1?e.pop():it.call(e,r,1),--this.size,!0)};var ut=function(t){var e=this.__data__,r=ot(e,t);return r<0?void 0:e[r][1]};var ct=function(t){return ot(this.__data__,t)>-1};var st=function(t,e){var r=this.__data__,n=ot(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function lt(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])}}lt.prototype.clear=rt,lt.prototype.delete=at,lt.prototype.get=ut,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=new ft,this.size=0};var dt=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 ht=function(t){return this.__data__.has(t)},vt=r(30),gt=vt.a.Symbol,bt=Object.prototype,mt=bt.hasOwnProperty,Ot=bt.toString,wt=gt?gt.toStringTag:void 0;var _t=function(t){var e=mt.call(t,wt),r=t[wt];try{t[wt]=void 0;var n=!0}catch(t){}var o=Ot.call(t);return n&&(e?t[wt]=r:delete t[wt]),o},jt=Object.prototype.toString;var Et=function(t){return jt.call(t)},xt=gt?gt.toStringTag:void 0;var St=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":xt&&xt in Object(t)?_t(t):Et(t)};var Pt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var kt,At=function(t){if(!Pt(t))return!1;var e=St(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Dt=vt.a["__core-js_shared__"],Tt=(kt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+kt:"";var Mt=function(t){return!!Tt&&Tt in t},Nt=Function.prototype.toString;var Ct=function(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Rt=/^\[object .+?Constructor\]$/,It=Function.prototype,Lt=Object.prototype,zt=It.toString,Bt=Lt.hasOwnProperty,Ht=RegExp("^"+zt.call(Bt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xt=function(t){return!(!Pt(t)||Mt(t))&&(At(t)?Ht:Rt).test(Ct(t))};var Ut=function(t,e){return null==t?void 0:t[e]};var Ft=function(t,e){var r=Ut(t,e);return Xt(r)?r:void 0},Gt=Ft(vt.a,"Map"),Yt=Ft(Object,"create");var Vt=function(){this.__data__=Yt?Yt(null):{},this.size=0};var Wt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kt=Object.prototype.hasOwnProperty;var $t=function(t){var e=this.__data__;if(Yt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Kt.call(e,t)?e[t]:void 0},Zt=Object.prototype.hasOwnProperty;var qt=function(t){var e=this.__data__;return Yt?void 0!==e[t]:Zt.call(e,t)};var Jt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Yt&&void 0===e?"__lodash_hash_undefined__":e,this};function Qt(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])}}Qt.prototype.clear=Vt,Qt.prototype.delete=Wt,Qt.prototype.get=$t,Qt.prototype.has=qt,Qt.prototype.set=Jt;var te=Qt;var ee=function(){this.size=0,this.__data__={hash:new te,map:new(Gt||ft),string:new te}};var re=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ne=function(t,e){var r=t.__data__;return re(e)?r["string"==typeof e?"string":"hash"]:r.map};var oe=function(t){var e=ne(this,t).delete(t);return this.size-=e?1:0,e};var ie=function(t){return ne(this,t).get(t)};var ae=function(t){return ne(this,t).has(t)};var ue=function(t,e){var r=ne(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ce(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])}}ce.prototype.clear=ee,ce.prototype.delete=oe,ce.prototype.get=ie,ce.prototype.has=ae,ce.prototype.set=ue;var se=ce;var le=function(t,e){var r=this.__data__;if(r instanceof ft){var n=r.__data__;if(!Gt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new se(n)}return r.set(t,e),this.size=r.size,this};function fe(t){var e=this.__data__=new ft(t);this.size=e.size}fe.prototype.clear=pt,fe.prototype.delete=dt,fe.prototype.get=yt,fe.prototype.has=ht,fe.prototype.set=le;var pe=fe;var de=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var ye=function(t){return this.__data__.has(t)};function he(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new se;++e<r;)this.add(t[e])}he.prototype.add=he.prototype.push=de,he.prototype.has=ye;var ve=he;var ge=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 me=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,d=2&r?new ve:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var y=t[f],h=e[f];if(n)var v=a?n(h,y,f,e,t,i):n(y,h,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!ge(e,(function(t,e){if(!be(d,e)&&(y===t||o(y,t,r,n,i)))return d.push(e)}))){p=!1;break}}else if(y!==h&&!o(y,h,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Oe=vt.a.Uint8Array;var we=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var _e=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},je=gt?gt.prototype:void 0,Ee=je?je.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 Oe(t),new Oe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nt(+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=we;case"[object Set]":var c=1&n;if(u||(u=_e),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=me(u(t),u(e),n,o,i,a);return a.delete(t),l;case"[object Symbol]":if(Ee)return Ee.call(t)==Ee.call(e)}return!1};var Se=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Pe=Array.isArray;var ke=function(t,e,r){var n=e(t);return Pe(t)?n:Se(n,r(t))};var Ae=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 De=function(){return[]},Te=Object.prototype.propertyIsEnumerable,Me=Object.getOwnPropertySymbols,Ne=Me?function(t){return null==t?[]:(t=Object(t),Ae(Me(t),(function(e){return Te.call(t,e)})))}:De;var Ce=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Re=function(t){return null!=t&&"object"==typeof t};var Ie=function(t){return Re(t)&&"[object Arguments]"==St(t)},Le=Object.prototype,ze=Le.hasOwnProperty,Be=Le.propertyIsEnumerable,He=Ie(function(){return arguments}())?Ie:function(t){return Re(t)&&ze.call(t,"callee")&&!Be.call(t,"callee")},Xe=He,Ue=r(48),Fe=/^(?:0|[1-9]\d*)$/;var Ge=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Fe.test(t))&&t>-1&&t%1==0&&t<e};var Ye=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ve={};Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var We=function(t){return Re(t)&&Ye(t.length)&&!!Ve[St(t)]};var Ke=function(t){return function(e){return t(e)}},$e=r(49),Ze=$e.a&&$e.a.isTypedArray,qe=Ze?Ke(Ze):We,Je=Object.prototype.hasOwnProperty;var Qe=function(t,e){var r=Pe(t),n=!r&&Xe(t),o=!r&&!n&&Object(Ue.a)(t),i=!r&&!n&&!o&&qe(t),a=r||n||o||i,u=a?Ce(t.length,String):[],c=u.length;for(var s in t)!e&&!Je.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ge(s,c))||u.push(s);return u},tr=Object.prototype;var er=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tr)};var rr=function(t,e){return function(r){return t(e(r))}},nr=rr(Object.keys,Object),or=Object.prototype.hasOwnProperty;var ir=function(t){if(!er(t))return nr(t);var e=[];for(var r in Object(t))or.call(t,r)&&"constructor"!=r&&e.push(r);return e};var ar=function(t){return null!=t&&Ye(t.length)&&!At(t)};var ur=function(t){return ar(t)?Qe(t):ir(t)};var cr=function(t){return ke(t,ur,Ne)},sr=Object.prototype.hasOwnProperty;var lr=function(t,e,r,n,o,i){var a=1&r,u=cr(t),c=u.length;if(c!=cr(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:sr.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var d=!0;i.set(t,e),i.set(e,t);for(var y=a;++s<c;){var h=t[l=u[s]],v=e[l];if(n)var g=a?n(v,h,l,e,t,i):n(h,v,l,t,e,i);if(!(void 0===g?h===v||o(h,v,r,n,i):g)){d=!1;break}y||(y="constructor"==l)}if(d&&!y){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(t),i.delete(e),d},fr=Ft(vt.a,"DataView"),pr=Ft(vt.a,"Promise"),dr=Ft(vt.a,"Set"),yr=Ft(vt.a,"WeakMap"),hr="[object Map]",vr="[object Promise]",gr="[object Set]",br="[object WeakMap]",mr="[object DataView]",Or=Ct(fr),wr=Ct(Gt),_r=Ct(pr),jr=Ct(dr),Er=Ct(yr),xr=St;(fr&&xr(new fr(new ArrayBuffer(1)))!=mr||Gt&&xr(new Gt)!=hr||pr&&xr(pr.resolve())!=vr||dr&&xr(new dr)!=gr||yr&&xr(new yr)!=br)&&(xr=function(t){var e=St(t),r="[object Object]"==e?t.constructor:void 0,n=r?Ct(r):"";if(n)switch(n){case Or:return mr;case wr:return hr;case _r:return vr;case jr:return gr;case Er:return br}return e});var Sr=xr,Pr="[object Arguments]",kr="[object Array]",Ar="[object Object]",Dr=Object.prototype.hasOwnProperty;var Tr=function(t,e,r,n,o,i){var a=Pe(t),u=Pe(e),c=a?kr:Sr(t),s=u?kr:Sr(e),l=(c=c==Pr?Ar:c)==Ar,f=(s=s==Pr?Ar:s)==Ar,p=c==s;if(p&&Object(Ue.a)(t)){if(!Object(Ue.a)(e))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new pe),a||qe(t)?me(t,e,r,n,o,i):xe(t,e,c,r,n,o,i);if(!(1&r)){var d=l&&Dr.call(t,"__wrapped__"),y=f&&Dr.call(e,"__wrapped__");if(d||y){var h=d?t.value():t,v=y?e.value():e;return i||(i=new pe),o(h,v,r,n,i)}}return!!p&&(i||(i=new pe),lr(t,e,r,n,o,i))};var Mr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Re(e)&&!Re(r)?e!=e&&r!=r:Tr(e,r,n,o,t,i))};var Nr=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 pe;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?Mr(l,s,3,n,f):p))return!1}}return!0};var Cr=function(t){return t==t&&!Pt(t)};var Rr=function(t){for(var e=ur(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Cr(o)]}return e};var Ir=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Lr=function(t){var e=Rr(t);return 1==e.length&&e[0][2]?Ir(e[0][0],e[0][1]):function(r){return r===t||Nr(r,t,e)}};var zr=function(t){return"symbol"==typeof t||Re(t)&&"[object Symbol]"==St(t)},Br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hr=/^\w*$/;var Xr=function(t,e){if(Pe(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!zr(t))||(Hr.test(t)||!Br.test(t)||null!=e&&t in Object(e))};function Ur(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(Ur.Cache||se),r}Ur.Cache=se;var Fr=Ur;var Gr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yr=/\\(\\)?/g,Vr=function(t){var e=Fr(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(Gr,(function(t,r,n,o){e.push(n?o.replace(Yr,"$1"):r||t)})),e})),Wr=gt?gt.prototype:void 0,Kr=Wr?Wr.toString:void 0;var $r=function t(e){if("string"==typeof e)return e;if(Pe(e))return et(e,t)+"";if(zr(e))return Kr?Kr.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Zr=function(t){return null==t?"":$r(t)};var qr=function(t,e){return Pe(t)?t:Xr(t,e)?[t]:Vr(Zr(t))};var Jr=function(t){if("string"==typeof t||zr(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Qr=function(t,e){for(var r=0,n=(e=qr(e,t)).length;null!=t&&r<n;)t=t[Jr(e[r++])];return r&&r==n?t:void 0};var tn=function(t,e,r){var n=null==t?void 0:Qr(t,e);return void 0===n?r:n};var en=function(t,e){return null!=t&&e in Object(t)};var rn=function(t,e,r){for(var n=-1,o=(e=qr(e,t)).length,i=!1;++n<o;){var a=Jr(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ye(o)&&Ge(a,o)&&(Pe(t)||Xe(t))};var nn=function(t,e){return null!=t&&rn(t,e,en)};var on=function(t,e){return Xr(t)&&Cr(e)?Ir(Jr(t),e):function(r){var n=tn(r,t);return void 0===n&&n===e?nn(r,t):Mr(e,n,3)}};var an=function(t){return t};var un=function(t){return function(e){return null==e?void 0:e[t]}};var cn=function(t){return function(e){return Qr(e,t)}};var sn=function(t){return Xr(t)?un(Jr(t)):cn(t)};var ln=function(t){return"function"==typeof t?t:null==t?an:"object"==typeof t?Pe(t)?on(t[0],t[1]):Lr(t):sn(t)};var fn=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 pn=function(t,e){return function(r,n){if(null==r)return r;if(!ar(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&&fn(t,e,ur)}));var dn=function(t,e){var r=-1,n=ar(t)?Array(t.length):[];return pn(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var yn=function(t,e){return(Pe(t)?et:dn)(t,ln(e,3))},hn=function(){try{var t=Ft(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var vn=function(t,e,r){"__proto__"==e&&hn?hn(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},gn=Object.prototype.hasOwnProperty;var bn=function(t,e,r){var n=t[e];gn.call(t,e)&&nt(n,r)&&(void 0!==r||e in t)||vn(t,e,r)};var mn=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?vn(r,u,c):bn(r,u,c)}return r};var On=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)},wn=Math.max;var _n=function(t,e,r){return e=wn(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=wn(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),On(t,this,u)}};var jn=function(t){return function(){return t}},En=hn?function(t,e){return hn(t,"toString",{configurable:!0,enumerable:!1,value:jn(e),writable:!0})}:an,xn=Date.now;var Sn=function(t){var e=0,r=0;return function(){var n=xn(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Pn=Sn(En);var kn=function(t,e){return Pn(_n(t,e,an),t+"")};var An=function(t,e,r){if(!Pt(r))return!1;var n=typeof e;return!!("number"==n?ar(r)&&Ge(e,r.length):"string"==n&&e in r)&&nt(r[e],t)};var Dn=function(t){return kn((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&&An(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}))},Tn=Object.prototype.hasOwnProperty,Mn=Dn((function(t,e){if(er(e)||ar(e))mn(e,ur(e),t);else for(var r in e)Tn.call(e,r)&&bn(t,r,e[r])}));var Nn=function(t,e,r,n){if(!Pt(t))return t;for(var o=-1,i=(e=qr(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=Jr(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=Pt(l)?l:Ge(e[o+1])?[]:{})}bn(u,c,s),u=u[c]}return t};var Cn=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],u=Qr(t,a);r(u,a)&&Nn(i,qr(a,t),u)}return i};var Rn=function(t,e){return Cn(t,e,(function(e,r){return nn(t,r)}))},In=gt?gt.isConcatSpreadable:void 0;var Ln=function(t){return Pe(t)||Xe(t)||!!(In&&t&&t[In])};var zn=function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=Ln),i||(i=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Se(i,c):o||(i[i.length]=c)}return i};var Bn=function(t){return(null==t?0:t.length)?zn(t,1):[]};var Hn,Xn,Un,Fn,Gn,Yn,Vn,Wn,Kn,$n,Zn,qn,Jn,Qn,to,eo,ro,no=function(t){return Pn(_n(t,void 0,Bn),t+"")}((function(t,e){return null==t?{}:Rn(t,e)}));function oo(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 io(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 ao(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uo(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 co,so,lo,fo,po,yo,ho={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},vo=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey"],go=(Xn=uo((Hn=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,"isSilentMode",Xn,this),oo(this,"stopZoomGraph",Un,this),oo(this,"stopScrollGraph",Fn,this),oo(this,"stopMoveGraph",Gn,this),oo(this,"adjustEdge",Yn,this),oo(this,"adjustEdgeMiddle",Vn,this),oo(this,"adjustEdgeStartAndEnd",Wn,this),oo(this,"adjustNodePosition",Kn,this),oo(this,"hideAnchors",$n,this),oo(this,"hoverOutline",Zn,this),oo(this,"nodeSelectedOutline",qn,this),oo(this,"edgeSelectedOutline",Jn,this),oo(this,"nodeTextEdit",Qn,this),oo(this,"edgeTextEdit",to,this),oo(this,"nodeTextDraggable",eo,this),oo(this,"edgeTextDraggable",ro,this),ao(this,"multipleSelectKey",""),ao(this,"defaultConfig",{}),Mn(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);Mn(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&Mn(n,this.defaultConfig),!0===e){var o=no(ho,vo);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},Mn(n,o)}!1===r&&Mn(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=no(t,vo);return Mn(n,i)}},{key:"getConfig",value:function(){return no(this,vo)}}])&&io(e.prototype,r),n&&io(e,n),t}()).prototype,"isSilentMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Un=uo(Hn.prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fn=uo(Hn.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=uo(Hn.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yn=uo(Hn.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vn=uo(Hn.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wn=uo(Hn.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kn=uo(Hn.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),$n=uo(Hn.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zn=uo(Hn.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qn=uo(Hn.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jn=uo(Hn.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Qn=uo(Hn.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),to=uo(Hn.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),eo=uo(Hn.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ro=uo(Hn.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),uo(Hn.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(Hn.prototype,"updateEditConfig"),Hn.prototype),Hn);r(77);!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"}(co||(co={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(so||(so={})),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"}(lo||(lo={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(fo||(fo={})),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.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",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.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(po||(po={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(yo||(yo={}));var bo,mo,Oo,wo,_o,jo,Eo,xo,So;function Po(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 ko(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 ko(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 ko(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 Ao(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 Do(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 To(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mo(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(bo||(bo={}));var No=(mo=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),To(this,"MINI_SCALE_SIZE",.2),To(this,"MAX_SCALE_SIZE",16),Ao(this,"SCALE_X",Oo,this),Ao(this,"SKEW_Y",wo,this),Ao(this,"SKEW_X",_o,this),Ao(this,"SCALE_Y",jo,this),Ao(this,"TRANSLATE_X",Eo,this),Ao(this,"TRANSLATE_Y",xo,this),Ao(this,"ZOOM_SIZE",So,this),To(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=Po(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=Po(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=Po(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")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(po.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=Po(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")}}],r&&Do(e.prototype,r),n&&Do(e,n),t}(),Oo=Mo(mo.prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wo=Mo(mo.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),_o=Mo(mo.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),jo=Mo(mo.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Eo=Mo(mo.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),xo=Mo(mo.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),So=Mo(mo.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),Mo(mo.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(mo.prototype,"zoom"),mo.prototype),Mo(mo.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(mo.prototype,"resetZoom"),mo.prototype),Mo(mo.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(mo.prototype,"translate"),mo.prototype),Mo(mo.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(mo.prototype,"focusOn"),mo.prototype),mo);var Co=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var Ro=function(t,e){return t&&mn(e,ur(e),t)};var Io=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},Lo=Object.prototype.hasOwnProperty;var zo=function(t){if(!Pt(t))return Io(t);var e=er(t),r=[];for(var n in t)("constructor"!=n||!e&&Lo.call(t,n))&&r.push(n);return r};var Bo=function(t){return ar(t)?Qe(t,!0):zo(t)};var Ho=function(t,e){return t&&mn(e,Bo(e),t)},Xo=r(106);var Uo=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var Fo=function(t,e){return mn(t,Ne(t),e)},Go=rr(Object.getPrototypeOf,Object),Yo=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Se(e,Ne(t)),t=Go(t);return e}:De;var Vo=function(t,e){return mn(t,Yo(t),e)};var Wo=function(t){return ke(t,Bo,Yo)},Ko=Object.prototype.hasOwnProperty;var $o=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Ko.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var Zo=function(t){var e=new t.constructor(t.byteLength);return new Oe(e).set(new Oe(t)),e};var qo=function(t,e){var r=e?Zo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Jo=/\w*$/;var Qo=function(t){var e=new t.constructor(t.source,Jo.exec(t));return e.lastIndex=t.lastIndex,e},ti=gt?gt.prototype:void 0,ei=ti?ti.valueOf:void 0;var ri=function(t){return ei?Object(ei.call(t)):{}};var ni=function(t,e){var r=e?Zo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var oi=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Zo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return qo(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 ni(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Qo(t);case"[object Symbol]":return ri(t)}},ii=Object.create,ai=function(){function t(){}return function(e){if(!Pt(e))return{};if(ii)return ii(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var ui=function(t){return"function"!=typeof t.constructor||er(t)?{}:ai(Go(t))};var ci=function(t){return Re(t)&&"[object Map]"==Sr(t)},si=$e.a&&$e.a.isMap,li=si?Ke(si):ci;var fi=function(t){return Re(t)&&"[object Set]"==Sr(t)},pi=$e.a&&$e.a.isSet,di=pi?Ke(pi):fi,yi="[object Arguments]",hi="[object Function]",vi="[object Object]",gi={};gi[yi]=gi["[object Array]"]=gi["[object ArrayBuffer]"]=gi["[object DataView]"]=gi["[object Boolean]"]=gi["[object Date]"]=gi["[object Float32Array]"]=gi["[object Float64Array]"]=gi["[object Int8Array]"]=gi["[object Int16Array]"]=gi["[object Int32Array]"]=gi["[object Map]"]=gi["[object Number]"]=gi["[object Object]"]=gi["[object RegExp]"]=gi["[object Set]"]=gi["[object String]"]=gi["[object Symbol]"]=gi["[object Uint8Array]"]=gi["[object Uint8ClampedArray]"]=gi["[object Uint16Array]"]=gi["[object Uint32Array]"]=!0,gi["[object Error]"]=gi[hi]=gi["[object WeakMap]"]=!1;var bi=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(!Pt(e))return e;var f=Pe(e);if(f){if(u=$o(e),!c)return Uo(e,u)}else{var p=Sr(e),d=p==hi||"[object GeneratorFunction]"==p;if(Object(Ue.a)(e))return Object(Xo.a)(e,c);if(p==vi||p==yi||d&&!i){if(u=s||d?{}:ui(e),!c)return s?Vo(e,Ho(u,e)):Fo(e,Ro(u,e))}else{if(!gi[p])return i?e:{};u=oi(e,p,c)}}a||(a=new pe);var y=a.get(e);if(y)return y;a.set(e,u),di(e)?e.forEach((function(o){u.add(t(o,r,n,o,e,a))})):li(e)&&e.forEach((function(o,i){u.set(i,t(o,r,n,i,e,a))}));var h=f?void 0:(l?s?Wo:cr:s?Bo:ur)(e);return Co(h||e,(function(o,i){h&&(o=e[i=o]),bn(u,i,t(o,r,n,i,e,a))})),u};var mi=function(t){return bi(t,5)};var Oi=function(t,e,r){(void 0!==r&&!nt(t[e],r)||void 0===r&&!(e in t))&&vn(t,e,r)};var wi=function(t){return Re(t)&&ar(t)},_i=Function.prototype,ji=Object.prototype,Ei=_i.toString,xi=ji.hasOwnProperty,Si=Ei.call(Object);var Pi=function(t){if(!Re(t)||"[object Object]"!=St(t))return!1;var e=Go(t);if(null===e)return!0;var r=xi.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ei.call(r)==Si};var ki=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Ai=function(t){return mn(t,Bo(t))};var Di=function(t,e,r,n,o,i,a){var u=ki(t,r),c=ki(e,r),s=a.get(c);if(s)Oi(t,r,s);else{var l=i?i(u,c,r+"",t,e,a):void 0,f=void 0===l;if(f){var p=Pe(c),d=!p&&Object(Ue.a)(c),y=!p&&!d&&qe(c);l=c,p||d||y?Pe(u)?l=u:wi(u)?l=Uo(u):d?(f=!1,l=Object(Xo.a)(c,!0)):y?(f=!1,l=ni(c,!0)):l=[]:Pi(c)||Xe(c)?(l=u,Xe(u)?l=Ai(u):Pt(u)&&!At(u)||(l=ui(c))):f=!1}f&&(a.set(c,l),o(l,c,n,i,a),a.delete(c)),Oi(t,r,l)}};var Ti=function t(e,r,n,o,i){e!==r&&fn(r,(function(a,u){if(i||(i=new pe),Pt(a))Di(e,r,u,n,t,o,i);else{var c=o?o(ki(e,u),a,u+"",e,r,i):void 0;void 0===c&&(c=a),Oi(e,u,c)}}),Bo)},Mi=Dn((function(t,e,r){Ti(t,e,r)})),Ni={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"}},Ci=function(t){var e=mi(Ni);return t&&(e=Mi(e,t)),e};r(78),r(158);function Ri(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 Ii=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 null==t||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;null==t||t.split(",").forEach((function(t){return t=t.trim(),r.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var r=this;null==t||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}}])&&Ri(e.prototype,r),n&&Ri(e,n),t}();function Li(t,e){return e*Math.round(t/e)||t}function zi(t,e){return t%e}function Bi(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 Hi(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 Hi(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 Hi(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 Xi,Ui=function(t,e,r){var n=Bi(t,2),o=n[0],i=n[1],a=Bi(e,2),u=a[0],c=a[1],s=Bi(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},Fi=function(t,e){var r=!1;switch(e.multipleSelectKey){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;default:r=!1}return r},Gi=(r(79),r(161),r(125),r(80),r(12),r(13),r(14),r(47),r(31),new Uint8Array(16));function Yi(){if(!Xi&&!(Xi="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 Xi(Gi)}var Vi=/^(?:[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 Wi=function(t){return"string"==typeof t&&Vi.test(t)},Ki=[],$i=0;$i<256;++$i)Ki.push(($i+256).toString(16).substr(1));var Zi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ki[t[e+0]]+Ki[t[e+1]]+Ki[t[e+2]]+Ki[t[e+3]]+"-"+Ki[t[e+4]]+Ki[t[e+5]]+"-"+Ki[t[e+6]]+Ki[t[e+7]]+"-"+Ki[t[e+8]]+Ki[t[e+9]]+"-"+Ki[t[e+10]]+Ki[t[e+11]]+Ki[t[e+12]]+Ki[t[e+13]]+Ki[t[e+14]]+Ki[t[e+15]]).toLowerCase();if(!Wi(r))throw TypeError("Stringified UUID is invalid");return r};var qi=function(t,e,r){var n=(t=t||{}).random||(t.rng||Yi)();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)},Ji=function(){return qi()},Qi=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+qi(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+qi(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},ta=(r(104),r(203),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 ea(t){return ea="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},ea(t)}function ra(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 na(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ra(Object(r),!0).forEach((function(e){oa(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}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}var ia,aa,ua,ca,sa,la,fa,pa,da,ya,ha,va,ga,ba,ma,Oa,wa,_a,ja,Ea,xa=function(t){return t.anchors},Sa=function(t,e){for(var r,n=e.nodes,o=n.length-1;o>=0;o--){var i=n[o];if(Ta(t,i)){var a=ka(t,i);if(a){var u={node:i,anchorIndex:a.index,anchor:a.anchor};r&&!Pa(i,r.node,e)||(r=u)}}}return r},Pa=function(t,e,r){return t.zIndex>e.zIndex||r.nodesMap[t.id].index>r.nodesMap[e.id].index},ka=function(t,e){for(var r,n=xa(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var a=Aa(t.x,t.y,n[i].x,n[i].y);a<o&&(o=a,r={index:i,anchor:na(na({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r},Aa=function(t,e,r,n){return Math.hypot(t-r,e-n)},Da=function(t,e){var r=!1,n=Ma(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},Ta=function(t,e){var r=!1,n=Ma(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},Ma=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}},Na=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=Aa(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),Ca(t,e,n)},Ca=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.r;if(e===yo.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===yo.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},Ra=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},Ia=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===yo.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===yo.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)),d=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:d}}return n},La=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={x:t.x,y:t.y};if(u.x===c.x&&e===yo.HORIZONTAL&&(s={x:u.x,y:t.y}),u.y===c.y&&e===yo.VERTICAL&&(s={x:t.x,y:u.y}),u.x!==c.x&&u.y!==c.y){var l=(c.y-u.y)/(c.x-u.x),f=(u.x*c.y-c.x*u.y)/(u.x-c.x);e===yo.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===yo.VERTICAL&&(s={x:t.x,y:l*t.x+f})}if(ta(s,o,a)){var p=Aa(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},za=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}},Ba=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},Ha=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=vc(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},Xa=function(t){return"object"!==ea(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},Ua={node:!1,edge:!1},Fa={node:!0,edge:!0},Ga={stroke:"red",strokeDasharray:"10 200",className:"lf-edge-animation"},Ya=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},Va=1e3,Wa=999,Ka=function(){return++Va};function $a(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 Za(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$a(Object(r),!0).forEach((function(e){Qa(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function qa(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 Ja(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 Qa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tu(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 eu=(ia=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Qa(this,"id",Ji()),qa(this,"type",aa,this),qa(this,"sourceNodeId",ua,this),qa(this,"targetNodeId",ca,this),qa(this,"startPoint",sa,this),qa(this,"endPoint",la,this),qa(this,"text",fa,this),qa(this,"properties",pa,this),qa(this,"points",da,this),qa(this,"pointsList",ya,this),qa(this,"isSelected",ha,this),qa(this,"isHovered",va,this),qa(this,"isHitable",ga,this),qa(this,"draggable",ba,this),qa(this,"visible",ma,this),qa(this,"isAnimation",Oa,this),Qa(this,"graphModel",void 0),qa(this,"zIndex",wa,this),Qa(this,"BaseType",fo.EDGE),Qa(this,"modelType",lo.EDGE),qa(this,"state",_a,this),Qa(this,"additionStateData",void 0),Qa(this,"sourceAnchorId",""),Qa(this,"targetAnchorId",""),Qa(this,"menu",void 0),Qa(this,"customTextPosition",!1),Qa(this,"animationData",Ga),qa(this,"style",ja,this),qa(this,"arrowConfig",Ea,this),this.graphModel=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)}Mn(this,wc(t)),this.graphModel.overlapMode===bo.INCREASE&&(this.zIndex=t.zIndex||Ka())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return Za(Za({},this.graphModel.theme.baseEdge),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return mi(t)}},{key:"getAnimation",value:function(){var t=this.animationData;return mi(t)}},{key:"getEdgeAnimationStyle",value:function(){var t=this.graphModel.theme.edgeAnimation;return mi(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return mi(t)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{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:"getBeginAnchor",value:function(t,e){var r,n;return xa(t).forEach((function(t){var o=_c(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 xa(t).forEach((function(t){var o=_c(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===bo.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,e){this.properties[t]=Ya(e),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Za(Za({},this.properties),Ya(t)),this.setAttributes()}},{key:"setStyle",value:function(t,e){this.style=Za(Za({},this.style),{},Qa({},t,Ya(e)))}},{key:"setStyles",value:function(t){this.style=Za(Za({},this.style),Ya(t))}},{key:"updateStyles",value:function(t){this.style=Za({},Ya(t))}},{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&&Mn(this.text,t)}},{key:"updateText",value:function(t){this.text=Za(Za({},this.text),{},{value:t})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}}},{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:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Mn(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})}}],r&&Ja(e.prototype,r),n&&Ja(e,n),t}(),aa=tu(ia.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ua=tu(ia.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ca=tu(ia.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),sa=tu(ia.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),la=tu(ia.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),fa=tu(ia.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),pa=tu(ia.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),da=tu(ia.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ya=tu(ia.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ha=tu(ia.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),va=tu(ia.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ga=tu(ia.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ba=tu(ia.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ma=tu(ia.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Oa=tu(ia.prototype,"isAnimation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),wa=tu(ia.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),_a=tu(ia.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ja=tu(ia.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Ea=tu(ia.prototype,"arrowConfig",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),tu(ia.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(ia.prototype,"sourceNode"),ia.prototype),tu(ia.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(ia.prototype,"targetNode"),ia.prototype),tu(ia.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(ia.prototype,"textPosition"),ia.prototype),tu(ia.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setProperty"),ia.prototype),tu(ia.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setProperties"),ia.prototype),tu(ia.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setStyle"),ia.prototype),tu(ia.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setStyles"),ia.prototype),tu(ia.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"updateStyles"),ia.prototype),tu(ia.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"formatText"),ia.prototype),tu(ia.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"resetTextPosition"),ia.prototype),tu(ia.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"moveText"),ia.prototype),tu(ia.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setText"),ia.prototype),tu(ia.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"updateText"),ia.prototype),tu(ia.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setAnchors"),ia.prototype),tu(ia.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setSelected"),ia.prototype),tu(ia.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setHovered"),ia.prototype),tu(ia.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setHitable"),ia.prototype),tu(ia.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"openEdgeAnimation"),ia.prototype),tu(ia.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"closeEdgeAnimation"),ia.prototype),tu(ia.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setElementState"),ia.prototype),tu(ia.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"updateStartPoint"),ia.prototype),tu(ia.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"moveStartPoint"),ia.prototype),tu(ia.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"updateEndPoint"),ia.prototype),tu(ia.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"moveEndPoint"),ia.prototype),tu(ia.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"setZIndex"),ia.prototype),tu(ia.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"initPoints"),ia.prototype),tu(ia.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"updateAttributes"),ia.prototype),tu(ia.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"getAdjustStart"),ia.prototype),tu(ia.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"getAdjustEnd"),ia.prototype),tu(ia.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(ia.prototype,"updateAfterAdjustStartAndEnd"),ia.prototype),ia),ru=eu;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},nu(t)}function ou(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 iu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ou(Object(r),!0).forEach((function(e){hu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ou(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function au(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uu(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 cu(){return cu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=su(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},cu.apply(this,arguments)}function su(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yu(t)););return t}function lu(t,e){return lu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},lu(t,e)}function fu(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 pu(this,r)}}function pu(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 du(t)}function du(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)},yu(t)}function hu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vu,gu,bu=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&&lu(t,e)}(i,t);var e,r,n,o=fu(i);function i(){var t;au(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return hu(du(t=o.call.apply(o,[this].concat(r))),"modelType",lo.LINE_EDGE),t}return e=i,(r=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return iu(iu({},cu(yu(i.prototype),"getEdgeStyle",this).call(this)),mi(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&uu(e.prototype,r),n&&uu(e,n),i}(ru);function mu(t){return mu="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},mu(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 wu(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 wu(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 wu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _u(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 ju(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_u(Object(r),!0).forEach((function(e){Cu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Eu(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 xu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Su(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 Pu(){return Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=ku(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pu.apply(this,arguments)}function ku(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nu(t)););return t}function Au(t,e){return Au=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Au(t,e)}function Du(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=Nu(t);if(e){var o=Nu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tu(this,r)}}function Tu(t,e){if(e&&("object"===mu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mu(t)}function Mu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nu(t){return Nu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Nu(t)}function Cu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ru(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 Iu=(vu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Au(t,e)}(i,t);var e,r,n,o=Du(i);function i(){var t;xu(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cu(Mu(t=o.call.apply(o,[this].concat(r))),"modelType",lo.POLYLINE_EDGE),Cu(Mu(t),"draginngPointList",void 0),Eu(Mu(t),"dbClickPosition",gu,Mu(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,Pu(Nu(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return ju(ju({},Pu(Nu(i.prototype),"getEdgeStyle",this).call(this)),mi(t))}},{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=dc(this.points),o=Ou(cc(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===yo.HORIZONTAL?i=Math.abs(e.y-r.y):t===yo.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===yo.HORIZONTAL?n={x:r.x,y:e.y}:t===yo.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(sc(a,o,this.sourceNode)){if(lc(o,i,this.sourceNode)){var u=fc(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)&&Aa(e.x,e.y,o.x,o.y)<Aa(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(sc(s,l,this.targetNode)){if(lc(c,s,this.targetNode)){var f=fc(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)&&Aa(t.x,t.y,s.x,s.y)<Aa(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=pc(r,n),f=e[0];switch(c){case lo.RECT_NODE:0!==a.radius&&(Ra(r,a)||(f=Na(r,l,a)));break;case lo.CIRCLE_NODE:f=Ca(r,l,a);break;case lo.ELLIPSE_NODE:f=Ia(r,l,a);break;case lo.DIAMOND_NODE:case lo.POLYGON_NODE:f=La(r,l,a)}e[0]=f;var p=pc(o,i),d=e[e.length-1];switch(s){case lo.RECT_NODE:0!==u.radius&&(Ra(i,u)||(d=Na(i,p,u)));break;case lo.CIRCLE_NODE:d=Ca(i,p,u);break;case lo.ELLIPSE_NODE:d=Ia(i,p,u);break;case lo.DIAMOND_NODE:case lo.POLYGON_NODE:d=La(i,p,u)}return e[e.length-1]=d,e}},{key:"getData",value:function(){var t=Pu(Nu(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=uc({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:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList,c=u;return a===yo.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===yo.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){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList;if(a===yo.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(!Da(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(!Da(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDragingPoints(a,"end",f,p,c)}}c=ac(c),this.updatePointsAfterDrage(c),this.draginngPointList=c}else if(a===yo.VERTICAL){u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y};var d=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(d=this.removeCrossPoints(o,i,d)),0===o){var y={x:r.x+e.x,y:r.y};if(!Da(y,this.sourceNode)){var h=this.sourceNode.anchors;d=this.getDragingPoints(a,"start",y,h,d)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!Da(v,this.targetNode)){var g=this.targetNode.anchors;d=this.getDragingPoints(a,"end",v,g,d)}}d=ac(d),this.updatePointsAfterDrage(d),this.draginngPointList=d}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=dc(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)}this.isDragging=!1}},{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=uc({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&Su(e.prototype,r),n&&Su(e,n),i}(ru),gu=Ru(vu.prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ru(vu.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"initPoints"),vu.prototype),Ru(vu.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"updatePoints"),vu.prototype),Ru(vu.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"updateStartPoint"),vu.prototype),Ru(vu.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"moveStartPoint"),vu.prototype),Ru(vu.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"updateEndPoint"),vu.prototype),Ru(vu.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"moveEndPoint"),vu.prototype),Ru(vu.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"dragAppendStart"),vu.prototype),Ru(vu.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"dragAppendSimple"),vu.prototype),Ru(vu.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"dragAppend"),vu.prototype),Ru(vu.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"dragAppendEnd"),vu.prototype),Ru(vu.prototype,"updatePointsAfterDrage",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"updatePointsAfterDrage"),vu.prototype),Ru(vu.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"getAdjustStart"),vu.prototype),Ru(vu.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"getAdjustEnd"),vu.prototype),Ru(vu.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(vu.prototype,"updateAfterAdjustStartAndEnd"),vu.prototype),vu),Lu=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 zu(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 Bu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zu(Object(r),!0).forEach((function(e){Hu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Hu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xu(t){return function(t){if(Array.isArray(t))return Yu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Gu(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 Uu(t){return Uu="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},Uu(t)}function Fu(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)||Gu(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 Gu(t,e){if(t){if("string"==typeof t)return Yu(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)?Yu(t,e):void 0}}function Yu(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 Vu=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},Wu=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){var r=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?yo.HORIZONTAL:yo.VERTICAL}(e,t);return r===yo.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}},$u=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}},Zu=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}},qu=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}]},Ju=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Qu=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},tc=function(t,e,r,n,o){return Qu(t,e)+Qu(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])},ec=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)},rc=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},nc=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=Fu(qu(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return rc(t,e,o,i)||rc(t,e,o,u)||rc(t,e,i,a)||rc(t,e,a,u)},oc=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=tc(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var d=function(){var d,y,h,v=void 0,g=1/0;if(c.forEach((function(t){f[t.id]<g&&(g=f[t.id],v=t)})),v===r){var b=[];return ec(b,p,s,r.id),{v:b}}y=v,(h=(d=c).indexOf(y))>-1&&d.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||nc(t,e,r)||nc(t,e,n)||o.push(t))})),Vu(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]+Qu(v,t);l[t.id]&&n>=l[t.id]||(s[t.id]=v.id,l[t.id]=n,f[t.id]=l[t.id]+tc(t,r,e,i,a))}}))};c.length;){var y=d();if("object"===Uu(y))return y.v}return[e,r]},ic=function(t){return Ma(t)},ac=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},uc=function(t,e,r,n,o){var i,a,u=ic(r),c=ic(n),s=Wu(u,o),l=Wu(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 d=yc(t,e,f,p);return[t,f].concat(Xu(d),[p,e])}var y=Zu([f,p]),h=$u(s,y),v=$u(l,y),g=[];g=(g=g.concat(qu(h))).concat(qu(v));var b={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[y,h,v].forEach((function(t){g=g.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,b).filter((function(t){return Ju(t,s)&&Ju(t,l)})))})),[{x:f.x,y:p.y},{x:p.x,y:f.y}].forEach((function(t){Ju(t,s)&&Ju(t,l)&&g.push(t)})),g.unshift(f),g.push(p),g=Vu(g);var m=oc(g,f,p,u,c,t,e);return m.unshift(t),m.push(e),m.length>2&&(m=ac(m)),Vu(m)},cc=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=Aa(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=Aa(a.x,a.y,u.x,u.y);c>o&&(o=c,r=a,n=u)}e=[r,n]}return e},sc=function(t,e,r){var n=Da(t,r),o=Da(e,r);return n&&o},lc=function(t,e,r){var n=Da(t,r),o=Da(e,r);return!(n&&o)&&(n||o)},fc=function(t,e,r){for(var n,o,i=Ma(r),a=qu(i),u=0;u<a.length;u++){rc(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},pc=function(t,e){var r;return t.x===e.x?r=yo.VERTICAL:t.y===e.y&&(r=yo.HORIZONTAL),r},dc=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=Fu(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},yc=function(t,e,r,n){var o=[];if(pc(t,r)===pc(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=ta(i,t,r),u=ta(i,e,n);if(a||u)i={x:n.x,y:r.y};else{var c=hc(i,t,r),s=hc(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},hc=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},vc=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},gc=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,a=Ma(n),u=Ma(o),c=Wu(a,i),s=Wu(u,i);return{sNext:Ku(c,e),ePre:Ku(s,r)}},bc=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[mc(e[0]),mc(e[1]),mc(e[2]),mc(e[3])]},mc=function(t){var e=Fu(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Oc=function(t,e){for(var r,n=t.x,o=t.y,i=dc(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(ta(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(ta(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},wc=function(t){return no(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},_c=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};r(204);var jc=function(){};function Ec(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 xc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Sc=window.document;function Pc(t){var e=t.onDragStart,r=void 0===e?jc:e,n=t.onDraging,o=void 0===n?jc:n,i=t.onDragEnd,a=void 0===i?jc:i,u=t.step,c=void 0===u?1:u,s=t.isStopPropagation,l=void 0===s||s,f=!1,p=!1,d=0,y=0,h=0,v=0;function g(t){if(l&&t.stopPropagation(),p&&(f=!0,h+=t.clientX-d,v+=t.clientY-y,d=t.clientX,y=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 b(t){if(l&&t.stopPropagation(),p=!1,Sc.removeEventListener("mousemove",g,!1),Sc.removeEventListener("mouseup",b,!1),f)return f=!1,a({event:t})}return function(t){if(0===t.button)return l&&t.stopPropagation(),p=!0,d=t.clientX,y=t.clientY,Sc.addEventListener("mousemove",g,!1),Sc.addEventListener("mouseup",b,!1),r({event:t})}}var kc,Ac,Dc,Tc,Mc,Nc,Cc,Rc,Ic,Lc,zc,Bc,Hc,Xc=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?jc:n,i=e.onDraging,a=void 0===i?jc:i,u=e.onDragEnd,c=void 0===u?jc:u,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,p=void 0===f?null:f,d=e.step,y=void 0===d?1:d,h=e.isStopPropagation,v=void 0===h||h,g=e.model,b=void 0===g?null:g;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),xc(this,"onDragStart",void 0),xc(this,"onDraging",void 0),xc(this,"onDragEnd",void 0),xc(this,"step",void 0),xc(this,"isStopPropagation",void 0),xc(this,"isDraging",!1),xc(this,"isStartDraging",!1),xc(this,"startX",0),xc(this,"startY",0),xc(this,"sumDeltaX",0),xc(this,"sumDeltaY",0),xc(this,"eventType",void 0),xc(this,"eventCenter",void 0),xc(this,"model",void 0),xc(this,"startTime",void 0),xc(this,"isGrag",void 0),xc(this,"handleMouseDown",(function(t){var e,n;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isStartDraging=!0,r.startX=t.clientX,r.startY=t.clientY,Sc.addEventListener("mousemove",r.handleMouseMove,!1),Sc.addEventListener("mouseup",r.handleMouseUp,!1);var o=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(po["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:o}),r.startTime=(new Date).getTime()}})),xc(this,"handleMouseMove",(function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDraging&&(r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,r.step<=1||Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n=r.sumDeltaX%r.step,o=r.sumDeltaY%r.step,i=r.sumDeltaX-n,a=r.sumDeltaY-o;r.sumDeltaX=n,r.sumDeltaY=o;var u,c=null===(e=r.model)||void 0===e?void 0:e.getData();if(!r.isDraging)null===(u=r.eventCenter)||void 0===u||u.emit(po["".concat(r.eventType,"_DRAGSTART")],{e:t,data:c}),r.onDragStart({event:t});r.isDraging=!0,Promise.resolve().then((function(){var e,n;r.onDraging({deltaX:i,deltaY:a,event:t}),null===(e=r.eventCenter)||void 0===e||e.emit(po["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:c}),null===(n=r.eventCenter)||void 0===n||n.emit(po["".concat(r.eventType,"_DRAG")],{e:t,data:c})}))}})),xc(this,"handleMouseUp",(function(t){r.isStartDraging=!1,r.isStopPropagation&&t.stopPropagation(),Promise.resolve().then((function(){var e,n,o;Sc.removeEventListener("mousemove",r.handleMouseMove,!1),Sc.removeEventListener("mouseup",r.handleMouseUp,!1);var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(po["".concat(r.eventType,"_MOUSEUP")],{e:t,data:i}),r.isDraging&&(r.isDraging=!1,r.onDragEnd({event:t}),null===(o=r.eventCenter)||void 0===o||o.emit(po["".concat(r.eventType,"_DROP")],{e:t,data:i}))}))})),xc(this,"cancelDrag",(function(){Sc.removeEventListener("mousemove",r.handleMouseMove,!1),Sc.removeEventListener("mouseup",r.handleMouseUp,!1),r.isDraging=!1})),this.onDragStart=o,this.onDraging=a,this.onDragEnd=c,this.step=y,this.isStopPropagation=v,this.eventType=l,this.eventCenter=p,this.model=b}var e,r,n;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}}])&&Ec(e.prototype,r),n&&Ec(e,n),t}();function Uc(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 Fc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Uc(Object(r),!0).forEach((function(e){qc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gc(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)||Vc(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 Yc(t){return function(t){if(Array.isArray(t))return Wc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Vc(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 Vc(t,e){if(t){if("string"==typeof t)return Wc(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)?Wc(t,e):void 0}}function Wc(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 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},Kc(t)}function $c(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 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,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jc(t,e,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 Qc,ts=200,es=(kc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qc(this,"rootEl",void 0),$c(this,"width",Ac,this),$c(this,"height",Dc,this),qc(this,"theme",void 0),qc(this,"eventCenter",void 0),qc(this,"modelMap",new Map),qc(this,"topElement",void 0),qc(this,"animation",void 0),qc(this,"idGenerator",void 0),qc(this,"nodeMoveRules",[]),$c(this,"edgeType",Tc,this),$c(this,"nodes",Mc,this),$c(this,"edges",Nc,this),$c(this,"overlapMode",Cc,this),$c(this,"background",Rc,this),$c(this,"transformModel",Ic,this),$c(this,"editConfigModel",Lc,this),$c(this,"gridSize",zc,this),$c(this,"partial",Bc,this),$c(this,"fakerNode",Hc,this);var r,n=e.container,o=e.background,i=void 0===o?{}:o,a=e.grid,u=e.idGenerator,c=e.animation;this.background=i,"object"===Kc(a)&&(this.gridSize=a.size),this.rootEl=n,this.editConfigModel=new go(e),this.eventCenter=new Ii,this.transformModel=new No(this.eventCenter),this.theme=Ci(e.style),this.edgeType=e.edgeType||"polyline",e.width||(e.width=n.getBoundingClientRect().width),e.height||(e.height=n.getBoundingClientRect().height),this.width=e.width,this.height=e.height,this.animation=(r=c)&&"boolean"!=typeof r?Mi(mi(Ua),r):mi(!0===r?Fa:Ua),this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=u}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:"modelsMap",get:function(){return[].concat(Yc(this.nodes),Yc(this.edges)).reduce((function(t,e){return t[e.id]=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+ts,this.height+ts],i=0;i<t.length;i++){var a=t[i];a.visible&&(!this.partial||a.isSelected||this.isElementInArea(a,n,o,!1,!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===co.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===co.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=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=[],i=[];this.nodes.forEach((function(t){return i.push(t)})),this.edges.forEach((function(t){return i.push(t)}));for(var a=0;a<i.length;a++){var u=i[a];this.isElementInArea(u,t,e,r,n)&&o.push(u)}return o}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",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=Gc(this.transformModel.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],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(t.BaseType===fo.NODE){for(var i=Ma(t=t),a=i.minX,u=i.minY,c=i.maxX,s=i.maxY,l=[{x:a,y:u},{x:c,y:u},{x:c,y:s},{x:a,y:s}],f=o,p=0;p<l.length;p++){var d=l[p],y=d.x,h=d.y,v=this.transformModel.CanvasPointToHtmlPoint([y,h]),g=Gc(v,2);if(y=g[0],h=g[1],Ui([y,h],e,r)!==o){f=!o;break}}return f}if(t.BaseType===fo.EDGE){var b=t=t,m=b.startPoint,O=b.endPoint,w=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),_=this.transformModel.CanvasPointToHtmlPoint([O.x,O.y]),j=Ui(w,e,r),E=Ui(_,e,r);return n?j&&E:j||E}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=yn(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=Li(n,e.gridSize),t.y=Li(o,e.gridSize),"object"===Kc(t.text)&&(t.text.x-=zi(n,e.gridSize),t.text.y-=zi(o,e.gridSize))),new r(t,e)})),this.edges=yn(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.forEach((function(e){var r=e.getData();r&&t.push(r)}));var e=[];return this.nodes.forEach((function(t){var r=t.getData();r&&e.push(r)})),{nodes:e,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,e=[],r=0;r<this.nodes.length;r++){var n=this.nodes[r];if(n.isDragging){t=!0;break}e.push(n.getHistoryData())}if(t)return!1;for(var o=!1,i=[],a=0;a<this.edges.length;a++){var u=this.edges[a];if(u.isDragging){o=!0;break}i.push(u.getHistoryData())}return!o&&{nodes:e,edges:i}}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.modelsMap[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===fo.NODE&&r.nodes.push(n.getData()),n.BaseType===fo.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=Ji()),this.nodesMap[e]?"":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):""}},{key:"changeEdgeId",value:function(t,e){return e||(e=Ji()),this.edgesMap[e]?"":this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&(r.id=e)})),e):""}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"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&&(this.overlapMode===bo.DEFAULT&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===bo.INCREASE&&this.setElementZIndex(t,"top"))}},{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=Ka()),"bottom"===e&&(o=--Wa),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(po.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=Ya(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(po.NODE_ADD,{data:o}),n}},{key:"cloneNode",value:function(t){var e=this.getNodeModelById(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,a=i.move(e,r,n);a&&this.moveEdge(t,e,r)}}},{key:"moveNode2Coordinate",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,a=i.x,u=i.y,c=e-a,s=r-u;this.moveNode(t,c,s,n)}}},{key:"editText",value:function(t){this.setElementStateById(t,co.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=Ya(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(Fc(Fc({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(po.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.moveStartPoint(e,r),l&&i.moveEndPoint(e,r),s||l)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===lo.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,p=Oc(f,i.points);i.moveText(p.x-f.x,p.y-f.y)}else{var d=i.textPosition,y=d.x,h=d.y;i.moveText(y-u,h-c)}}}},{key:"deleteEdgeBySourceAndTarget",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(po.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeById",value:function(t){if(this.edgesMap[t]){var e=this.edgesMap[t].index,r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(po.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeBySource",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(po.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeByTarget",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(po.EDGE_DELETE,{data:r})}}},{key:"setElementStateById",value:function(t,e,r){this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(co.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(co.DEFAULT)}))}},{key:"updateText",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:"selectNodeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||this.clearSelectElements();var r=this.getElement(t);null==r||r.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===bo.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{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.getNodeModelById(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=za(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=za(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModelById(t);if(r&&r.type!==e){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete n.pointsList;var i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}}},{key:"getNodeIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.targetNodeId===t&&e.push(r)})),e}},{key:"getNodeOutgoingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.sourceNodeId===t&&e.push(r)})),e}},{key:"getNodeIncomingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.targetNodeId===t&&r.push(e.nodesMap[n.sourceNodeId].model)})),r}},{key:"getNodeOutgoingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.sourceNodeId===t&&r.push(e.nodesMap[n.targetNodeId].model)})),r}},{key:"setTheme",value:function(t){this.theme=Ci(Fc(Fc({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=null!=t?t:this.width,this.height=null!=e?e:this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,e=[],r=[];t.forEach((function(t){var n=t.x,o=t.y,i=t.width,a=t.height,u=t.getNodeStyle().strokeWidth,c=void 0===u?0:u;e=e.concat([n+i/2+c,n-i/2-c]),r=r.concat([o+a/2+c,o-a/2-c])}));var n=Math.min.apply(Math,Yc(e)),o=Math.max.apply(Math,Yc(e)),i=Math.min.apply(Math,Yc(r)),a=o-n||0,u=Math.max.apply(Math,Yc(r))-i||0;return{virtualRectWidth:a,virtualRectHeight:u,virtualRectCenterPositionX:n+a/2,virtualRectCenterPositionY:i+u/2}}},{key:"translateCenter",value:function(){var t=this.nodes,e=this.width,r=this.height,n=this.rootEl,o=this.transformModel;if(t.length){var i=e||n.clientWidth,a=r||n.clientHeight,u=this.getVirtualRectSize(),c=u.virtualRectCenterPositionX,s=u.virtualRectCenterPositionY;o.focusOn(c,s,i,a)}}},{key:"fitView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=this.nodes,n=this.width,o=this.height,i=this.rootEl,a=this.transformModel;if(r.length){var u=n||i.clientWidth,c=o||i.clientHeight,s=this.getVirtualRectSize(),l=s.virtualRectWidth,f=s.virtualRectHeight,p=s.virtualRectCenterPositionX,d=s.virtualRectCenterPositionY,y=(l+e)/u,h=(f+t)/c,v=0;v=1/Math.max(y,h);var g=[u/2,c/2];a.zoom(v,g),a.focusOn(p,d,u,c)}}},{key:"openEdgeAnimation",value:function(t){this.getEdgeModelById(t).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(t){this.getEdgeModelById(t).closeEdgeAnimation()}}],r&&Zc(e.prototype,r),n&&Zc(e,n),t}(),Ac=Jc(kc.prototype,"width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Dc=Jc(kc.prototype,"height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Tc=Jc(kc.prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mc=Jc(kc.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Nc=Jc(kc.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cc=Jc(kc.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return bo.DEFAULT}}),Rc=Jc(kc.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ic=Jc(kc.prototype,"transformModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Lc=Jc(kc.prototype,"editConfigModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zc=Jc(kc.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Bc=Jc(kc.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hc=Jc(kc.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jc(kc.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(kc.prototype,"nodesMap"),kc.prototype),Jc(kc.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(kc.prototype,"edgesMap"),kc.prototype),Jc(kc.prototype,"modelsMap",[o.m],Object.getOwnPropertyDescriptor(kc.prototype,"modelsMap"),kc.prototype),Jc(kc.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(kc.prototype,"sortElements"),kc.prototype),Jc(kc.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(kc.prototype,"textEditElement"),kc.prototype),Jc(kc.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(kc.prototype,"selectElements"),kc.prototype),Jc(kc.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"setFakerNode"),kc.prototype),Jc(kc.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"removeFakerNode"),kc.prototype),Jc(kc.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"setModel"),kc.prototype),Jc(kc.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"toFront"),kc.prototype),Jc(kc.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"setElementZIndex"),kc.prototype),Jc(kc.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"deleteNode"),kc.prototype),Jc(kc.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"addNode"),kc.prototype),Jc(kc.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"cloneNode"),kc.prototype),Jc(kc.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"moveNode"),kc.prototype),Jc(kc.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"moveNode2Coordinate"),kc.prototype),Jc(kc.prototype,"editText",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"editText"),kc.prototype),Jc(kc.prototype,"addEdge",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"addEdge"),kc.prototype),Jc(kc.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"moveEdge"),kc.prototype),Jc(kc.prototype,"deleteEdgeBySourceAndTarget",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"deleteEdgeBySourceAndTarget"),kc.prototype),Jc(kc.prototype,"deleteEdgeById",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"deleteEdgeById"),kc.prototype),Jc(kc.prototype,"deleteEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"deleteEdgeBySource"),kc.prototype),Jc(kc.prototype,"deleteEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"deleteEdgeByTarget"),kc.prototype),Jc(kc.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"setElementStateById"),kc.prototype),Jc(kc.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"updateText"),kc.prototype),Jc(kc.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"selectNodeById"),kc.prototype),Jc(kc.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"selectEdgeById"),kc.prototype),Jc(kc.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"selectElementById"),kc.prototype),Jc(kc.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"clearSelectElements"),kc.prototype),Jc(kc.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"moveNodes"),kc.prototype),Jc(kc.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"setDefaultEdgeType"),kc.prototype),Jc(kc.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"changeNodeType"),kc.prototype),Jc(kc.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"changeEdgeType"),kc.prototype),Jc(kc.prototype,"getNodeIncomingEdge",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"getNodeIncomingEdge"),kc.prototype),Jc(kc.prototype,"getNodeOutgoingEdge",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"getNodeOutgoingEdge"),kc.prototype),Jc(kc.prototype,"getNodeIncomingNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"getNodeIncomingNode"),kc.prototype),Jc(kc.prototype,"getNodeOutgoingNode",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"getNodeOutgoingNode"),kc.prototype),Jc(kc.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"setTheme"),kc.prototype),Jc(kc.prototype,"resize",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"resize"),kc.prototype),Jc(kc.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"clearData"),kc.prototype),Jc(kc.prototype,"translateCenter",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"translateCenter"),kc.prototype),Jc(kc.prototype,"fitView",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"fitView"),kc.prototype),Jc(kc.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"openEdgeAnimation"),kc.prototype),Jc(kc.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(kc.prototype,"closeEdgeAnimation"),kc.prototype),kc),rs=es;function ns(t){return ns="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},ns(t)}function os(){return os=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},os.apply(this,arguments)}function is(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 as(t,e){return as=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},as(t,e)}function us(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 cs(this,r)}}function cs(t,e){if(e&&("object"===ns(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ss(t)}function ss(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ls(t){return ls=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ls(t)}function fs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ps,ds=Zm(Qc=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&&as(t,e)}(i,t);var e,r,n,o=us(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),fs(ss(e=o.call(this)),"stepDrag",void 0),fs(ss(e),"stepScrollX",0),fs(ss(e),"stepScrollY",0),fs(ss(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDraging:!0});var o=e.props.graphModel,i=o.transformModel;o.editConfigModel.stopMoveGraph||i.translate(r,n)})),fs(ss(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),fs(ss(e),"zoomHandler",(function(t){var r=e.props,n=r.graphModel,o=n.editConfigModel,i=n.transformModel,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 d=e.stepScrollX%a,y=e.stepScrollX-d;i.translate(-y*i.SCALE_X,0),e.stepScrollX=d}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}}})),fs(ss(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props.graphModel;r.selectElements.size>0&&r.clearSelectElements(),r.eventCenter.emit(po.BLANK_CLICK,{e:t})}})),fs(ss(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props.graphModel,n=r.getPointByClient({x:t.clientX,y:t.clientY});r.eventCenter.emit(po.BLANK_CONTEXTMENU,{e:t,position:n})}})),fs(ss(e),"mouseDownHandler",(function(t){var r=e.props.graphModel,n=r.eventCenter,o=r.editConfigModel,i=r.transformModel.SCALE_X,a=r.gridSize,u=t.target,c=!o.adjustEdge&&!o.adjustNodePosition;("canvas-overlay"===u.getAttribute("name")||c)&&(o.stopMoveGraph?n.emit(po.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(a*i),e.stepDrag.handleMouseDown(t)),e.clickHandler(t))}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter;return e.stepDrag=new Xc({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:n,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:null}),e.state={isDraging:!1},e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props,r=e.children,n=e.dnd,o=this.state.isDraging;return Object(tt.g)("svg",os({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-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},n.eventMap()),Object(tt.g)("g",{transform:t},r))}}])&&is(e.prototype,r),n&&is(e,n),i}(tt.a))||Qc;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},ys(t)}function hs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vs(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},gs(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=ws(t);if(e){var o=ws(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ms(this,r)}}function ms(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 Os(t)}function Os(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ws(t){return ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ws(t)}function _s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var js=Zm(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&&gs(t,e)}(i,t);var e,r,n,o=bs(i);function i(){var t;hs(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return _s(Os(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(tt.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"render",value:function(){return Object(tt.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&vs(e.prototype,r),n&&vs(e,n),i}(tt.a))||ps;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},Es(t)}function xs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ss(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 Ps(t,e){return Ps=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ps(t,e)}function ks(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=Ds(t);if(e){var o=Ds(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return As(this,r)}}function As(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 function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ds(t){return Ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ds(t)}var Ts,Ms=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&&Ps(t,e)}(i,t);var e,r,n,o=ks(i);function i(){return xs(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.background;return Object(tt.g)("div",{className:"lf-background"},Object(tt.g)("div",{style:t,className:"lf-background-area"}))}}])&&Ss(e.prototype,r),n&&Ss(e,n),i}(tt.a);function Ns(t){return Ns="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},Ns(t)}function Cs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 Is(t,e){return Is=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Is(t,e)}function Ls(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=Hs(t);if(e){var o=Hs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zs(this,r)}}function zs(t,e){if(e&&("object"===Ns(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Bs(t)}function Bs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hs(t){return Hs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(t)}function Xs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Us=Zm(Ts=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&&Is(t,e)}(i,t);var e,r,n,o=Ls(i);function i(){var t;Cs(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Xs(Bs(t=o.call.apply(o,[this].concat(r))),"id",Ji()),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(tt.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(tt.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.transformModel,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(tt.g)("div",{className:"lf-grid"},Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(tt.g)("defs",null,Object(tt.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:r,height:r},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Object(tt.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Rs(e.prototype,r),n&&Rs(e,n),i}(tt.a))||Ts;Us.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(52);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},Fs(t)}function Gs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ys(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ys(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ys(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Vs,Ws=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=Gs(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==Fs(o)&&(e[n]=o)})),Object(tt.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},Ks(t)}function $s(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 Zs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$s(Object(r),!0).forEach((function(e){qs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function qs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Js(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qs(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 tl(t,e){return tl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},tl(t,e)}function el(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=nl(t);if(e){var o=nl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rl(this,r)}}function rl(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 nl(t){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nl(t)}var ol,il=Zm(Vs=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&&tl(t,e)}(i,t);var e,r,n,o=el(i);function i(){return Js(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.getStyle(),i=e.x,a=void 0===i?0:i,u=e.y,c=void 0===u?0:u,s=Zs(Zs({x1:-1e5,y1:c,x2:1e5,y2:c},o),{},{stroke:r?o.stroke:"none"}),l=Zs(Zs({x1:a,y1:-1e5,x2:a,y2:1e5},o),{},{stroke:n?o.stroke:"none"});return Object(tt.g)("g",{className:"lf-snapline"},Object(tt.g)(Ws,s),Object(tt.g)(Ws,l))}}])&&Qs(e.prototype,r),n&&Qs(e,n),i}(tt.a))||Vs;function al(t){return al="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},al(t)}function ul(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 cl(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 cl(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 cl(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 sl(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.className,a=t.radius,u=e-n/2,c=r-o/2,s={};return Object.entries(t).forEach((function(t){var e=ul(t,2),r=e[0],n=e[1];"object"!==al(n)&&(s[r]=n)})),s.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",a&&(s.rx=a,s.ry=a),s.x=u,s.y=c,Object(tt.g)("rect",s)}function ll(t){return ll="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},ll(t)}function fl(){return fl=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},fl.apply(this,arguments)}function pl(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 dl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pl(Object(r),!0).forEach((function(e){yl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function yl(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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 gl(t,e){return gl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},gl(t,e)}function bl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ol(t);if(e){var o=Ol(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ml(this,r)}}function ml(t,e){if(e&&("object"===ll(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 Ol(t){return Ol=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ol(t)}sl.defaultProps={className:"",radius:""};var wl,_l=Zm(ol=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&&gl(t,e)}(i,t);var e,r,n,o=bl(i);function i(){return hl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getNodesOutline",value:function(){var t=this.props.graphModel,e=t.nodes,r=t.editConfigModel,n=r.hoverOutline,o=r.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.isHovered||t.isSelected){var e=t.isHovered,r=t.isSelected,a=t.x,u=t.y,c=t.width,s=t.height;if(o&&r||n&&e){var l=t.getOutlineStyle(),f={};if(Object.keys(l).forEach((function(t){"hover"!==t&&(f[t]=l[t])})),e){var p=l.hover;f=dl(dl({},f),p)}i.push(Object(tt.g)(sl,fl({className:"lf-outline-node",x:a,y:u,width:c+10,height:s+10},f)))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,r=t.editConfigModel,n=r.edgeSelectedOutline,o=r.hoverOutline,i=[],a=0;a<e.length;a++){var u=e[a];(n&&u.isSelected||o&&u.isHovered)&&(u.modelType===lo.LINE_EDGE?i.push(this.getLineOutline(u)):u.modelType===lo.POLYLINE_EDGE?i.push(this.getPolylineOutline(u)):u.modelType===lo.BEZIER_EDGE&&i.push(this.getBezierOutline(u)))}return i}},{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=t.getOutlineStyle();return Object(tt.g)(sl,fl({className:"lf-outline-edge",x:n,y:o,width:i,height:a},u))}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=dc(e),n=Zu(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=t.getOutlineStyle();return Object(tt.g)(sl,fl({className:"lf-outline",x:o,y:i,width:a,height:u},c))}},{key:"getBezierOutline",value:function(t){var e=t.path,r=bc(e),n=Zu(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=t.getOutlineStyle();return Object(tt.g)(sl,fl({className:"lf-outline",x:o,y:i,width:a,height:u},c))}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&vl(e.prototype,r),n&&vl(e,n),i}(tt.a))||ol;function jl(t){return jl="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},jl(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 xl(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 xl(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 xl(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 Sl(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,a=void 0===i?4:i,u=t.className,c={cx:r,cy:o,r:a,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=El(t,2),r=e[0],n=e[1];"object"!==jl(n)&&(c[r]=n)})),c.className=u?"lf-basic-shape ".concat(u):"lf-basic-shape",Object(tt.g)("circle",c)}function Pl(t){return Pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(t)}function kl(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 Al(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 Al(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 Al(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 Dl(){return Dl=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},Dl.apply(this,arguments)}function Tl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ml(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 Nl(t,e,r){return e&&Ml(t.prototype,e),r&&Ml(t,r),t}function Cl(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&&Rl(t,e)}function Rl(t,e){return Rl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Rl(t,e)}function Il(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=Bl(t);if(e){var o=Bl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ll(this,r)}}function Ll(t,e){if(e&&("object"===Pl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return 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 Bl(t){return Bl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Bl(t)}function Hl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xl,Ul=function(t){Cl(r,t);var e=Il(r);function r(){var t;return Tl(this,r),Hl(zl(t=e.call(this)),"dragHandler",void 0),Hl(zl(t),"onDraging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.bezierModel,a=n.type,u=o.getPointByClient({x:r.clientX,y:r.clientY}).canvasOverlayPosition,c=u.x,s=u.y;i.updateAdjustAnchor({x:c,y:s},a)})),Hl(zl(t),"onDragEnd",(function(){t.props.bezierModel.isDragging=!1})),t.dragHandler=new Xc({onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return Nl(r,[{key:"render",value:function(){var t=this,e=this.props.position,r=e.x,n=e.y,o=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(tt.g)(Sl,Dl({className:"lf-bezier-adjust-anchor",x:r,y:n},o,{onMouseDown:function(e){t.dragHandler.handleMouseDown(e)}}))}}]),r}(tt.a),Fl=Zm(wl=function(t){Cl(r,t);var e=Il(r);function r(){return Tl(this,r),e.apply(this,arguments)}return Nl(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=kl(bc(r),4),i=o[0],a=o[1],u=o[2],c=o[3],s=t.getEdgeStyle().adjustLine,l=[];return l.push(Object(tt.g)(Ws,Dl({x1:i.x,y1:i.y,x2:a.x,y2:a.y},s))),l.push(Object(tt.g)(Ul,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(tt.g)(Ws,Dl({x1:c.x,y1:c.y,x2:u.x,y2:u.y},s))),l.push(Object(tt.g)(Ul,{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===lo.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(tt.a))||wl;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},Gl(t)}function Yl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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},Wl(t,e)}function Kl(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=Zl(t);if(e){var o=Zl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $l(this,r)}}function $l(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 function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zl(t){return Zl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zl(t)}var ql,Jl=Zm(Xl=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=Kl(i);function i(){return Yl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props.children;return Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(tt.g)("g",{transform:t},e))}}])&&Vl(e.prototype,r),n&&Vl(e,n),i}(tt.a))||Xl;function Ql(t){return Ql="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},Ql(t)}function tf(){return tf=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},tf.apply(this,arguments)}function ef(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rf(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 nf(t,e){return nf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nf(t,e)}function of(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=uf(t);if(e){var o=uf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return af(this,r)}}function af(t,e){if(e&&("object"===Ql(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 uf(t){return uf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},uf(t)}var cf=Zm(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&&nf(t,e)}(i,t);var e,r,n,o=of(i);function i(){return ef(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getComponent",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay",n=this.props.getView,o=n(t.type);return Object(tt.g)(o,{key:t.id,model:t,graphModel:e,overlay:r})}},{key:"render",value:function(){var t=this,e=this.props,r=e.graphModel,n=e.tool,o=e.options,i=e.dnd,a=e.snaplineModel,u={};o.width&&(u.width="".concat(r.width,"px")),o.height&&(u.height="".concat(r.height,"px"));var c=r.fakerNode,s=r.editConfigModel.adjustEdge;return Object(tt.g)("div",{className:"lf-graph",style:u},Object(tt.g)(ds,{graphModel:r,dnd:i},Object(tt.g)("g",{className:"lf-base"},yn(r.sortElements,(function(e){return t.getComponent(e,r)}))),c?this.getComponent(c,r):""),Object(tt.g)(Jl,{graphModel:r},Object(tt.g)(_l,{graphModel:r}),s?Object(tt.g)(Fl,{graphModel:r}):"",o.isSilentMode||!1===o.snapline?"":Object(tt.g)(il,{snaplineModel:a})),Object(tt.g)(js,{graphModel:r,tool:n}),o.background&&Object(tt.g)(Ms,{background:o.background}),o.grid&&Object(tt.g)(Us,tf({},o.grid,{graphModel:r})))}}],r&&rf(e.prototype,r),n&&rf(e,n),i}(tt.a))||ql,sf=cf;function lf(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 ff(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?lf(Object(r),!0).forEach((function(e){df(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pf(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 df(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yf=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),df(this,"nodeConfig",void 0),df(this,"lf",void 0),df(this,"fakerNode",void 0),df(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),df(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(ff(ff({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),df(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.graphModel.eventCenter.emit(po.NODE_DND_DRAG,{data:i})}return!1})),df(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),df(this,"onDrop",(function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(ff(ff({},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.graphModel.eventCenter.emit(po.NODE_DND_ADD,{data:n})}}));var n=e.lf;this.lf=n}var e,r,n;return e=t,(r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=tn(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,a=o.y;return{x:Li(i,n),y:Li(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}}}])&&pf(e.prototype,r),n&&pf(e,n),t}();function hf(t){var e=t.container,r=t.grid,n=t.width,o=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if("string"==typeof n||"string"==typeof o)throw new Error("width或height不支持传入字符串,请传数字");return r&&(t.grid=Mn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Mn({},bf,t)}var vf,gf,bf={background:!1,grid:!1,textEdit:!0,disabledTools:[]};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},mf(t)}function Of(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,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 jf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_f(Object(r),!0).forEach((function(e){Cf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ef(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function xf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pf(){return Pf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=kf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pf.apply(this,arguments)}function kf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nf(t)););return t}function Af(t,e){return Af=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Af(t,e)}function Df(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=Nf(t);if(e){var o=Nf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tf(this,r)}}function Tf(t,e){if(e&&("object"===mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mf(t)}function Mf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nf(t){return Nf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Nf(t)}function Cf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rf(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 If=(vf=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&&Af(t,e)}(i,t);var e,r,n,o=Df(i);function i(){var t;xf(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cf(Mf(t=o.call.apply(o,[this].concat(r))),"modelType",lo.BEZIER_EDGE),Ef(Mf(t),"path",gf,Mf(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=100,Pf(Nf(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return jf(jf({},Pf(Nf(i.prototype),"getEdgeStyle",this).call(this)),mi(t))}},{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=Pf(Nf(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return jf(jf({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return gc({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=Of(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=this.getControls(),e=t.sNext,r=t.ePre;this.updatePath(e,r)}},{key:"updatePath",value:function(t,e){var r={x:this.startPoint.x,y:this.startPoint.y},n={x:this.endPoint.x,y:this.endPoint.y};if(!t||!e){var o=this.getControls();t=o.sNext,e=o.ePre}this.pointsList=[r,t,e,n],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e;var r=Of(this.pointsList,3),n=r[1],o=r[2];n.x+=t,n.y+=e,this.updatePath(n,o)}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e;var r=Of(this.pointsList,3),n=r[1],o=r[2];o.x+=t,o.y+=e,this.updatePath(n,o)}},{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=gc({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()}}])&&Sf(e.prototype,r),n&&Sf(e,n),i}(ru),gf=Rf(vf.prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Rf(vf.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"initPoints"),vf.prototype),Rf(vf.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"updatePoints"),vf.prototype),Rf(vf.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"updateStartPoint"),vf.prototype),Rf(vf.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"updateEndPoint"),vf.prototype),Rf(vf.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"moveStartPoint"),vf.prototype),Rf(vf.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"moveEndPoint"),vf.prototype),Rf(vf.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"updateAdjustAnchor"),vf.prototype),Rf(vf.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"getAdjustStart"),vf.prototype),Rf(vf.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"getAdjustEnd"),vf.prototype),Rf(vf.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(vf.prototype,"updateAfterAdjustStartAndEnd"),vf.prototype),vf);var Lf,zf,Bf,Hf,Xf,Uf,Ff,Gf,Yf,Vf,Wf,Kf,$f,Zf,qf,Jf,Qf,tp,ep,rp=function(t){return null==t};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},np(t)}function op(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 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&&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 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){lp(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(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fp(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 pp,dp,yp=(Lf=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),lp(this,"id",Ji()),cp(this,"type",zf,this),cp(this,"x",Bf,this),cp(this,"y",Hf,this),cp(this,"text",Xf,this),cp(this,"properties",Uf,this),cp(this,"_width",Ff,this),cp(this,"_height",Gf,this),cp(this,"anchorsOffset",Yf,this),cp(this,"isSelected",Vf,this),cp(this,"isHovered",Wf,this),cp(this,"isDragging",Kf,this),cp(this,"isHitable",$f,this),cp(this,"draggable",Zf,this),cp(this,"visible",qf,this),lp(this,"graphModel",void 0),cp(this,"zIndex",Jf,this),cp(this,"state",Qf,this),cp(this,"autoToFront",tp,this),cp(this,"style",ep,this),lp(this,"BaseType",fo.NODE),lp(this,"modelType",lo.NODE),lp(this,"additionStateData",void 0),lp(this,"targetRules",[]),lp(this,"sourceRules",[]),lp(this,"moveRules",[]),lp(this,"hasSetTargetRules",!1),lp(this,"hasSetSourceRules",!1),this.graphModel=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:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{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),Mn(this,function(t){return no(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===bo.INCREASE&&(this.zIndex=t.zIndex||Ka())}},{key:"setAttributes",value:function(){}},{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:"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===bo.INCREASE&&(a.zIndex=this.zIndex),n&&(a.text={x:e,y:r,value:n}),a}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getNodeStyle",value:function(){return up(up({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return mi(t)}},{key:"getAnchorStyle",value:function(t){var e=this.graphModel.theme.anchor;return mi(e)}},{key:"getAnchorLineStyle",value:function(){var t=this.graphModel.theme.anchorLine;return mi(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return mi(t)}},{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=!0,o=!0,i=op(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(i.s();!(r=i.n()).done;){var a=(0,r.value)(this,t,e);if(!a)return!1;if("object"===np(a)){var u=a;if(!1===u.x&&!1===u.y)return!1;n=n&&u.x,o=o&&u.y}}}catch(t){i.e(t)}finally{i.f()}return{x:n,y:o}}},{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]}):up(up({},t=t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",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:"getAnchorInfo",value:function(t){if(!rp(t))for(var e=0;e<this.anchors.length;e++){var r=this.anchors[e];if(r.id===t)return r}}},{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],n=!1,o=!1;if(r)n=!0,o=!0;else{var i=this.isAllowMoveNode(t,e);"boolean"==typeof i?(n=i,o=i):(n=i.x,o=i.y)}if(n){var a=this.x+t;this.x=a,this.text&&this.moveText(t,0)}if(o){var u=this.y+e;this.y=u,this.text&&this.moveText(0,e)}return n||o}},{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;return!(!r&&!this.isAllowMoveNode(n,o)||(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e,0))}},{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=up(up({},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:"setProperty",value:function(t,e){this.properties=up(up({},this.properties),{},lp({},t,Ya(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=up(up({},this.properties),Ya(t)),this.setAttributes()}},{key:"setStyle",value:function(t,e){this.style=up(up({},this.style),{},lp({},t,Ya(e)))}},{key:"setStyles",value:function(t){this.style=up(up({},this.style),Ya(t))}},{key:"updateStyles",value:function(t){this.style=up({},Ya(t))}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){Mn(this,t)}}],r&&sp(e.prototype,r),n&&sp(e,n),t}(),zf=fp(Lf.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Bf=fp(Lf.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Hf=fp(Lf.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Xf=fp(Lf.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Uf=fp(Lf.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Ff=fp(Lf.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Gf=fp(Lf.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Yf=fp(Lf.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Vf=fp(Lf.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wf=fp(Lf.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kf=fp(Lf.prototype,"isDragging",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$f=fp(Lf.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Zf=fp(Lf.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qf=fp(Lf.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jf=fp(Lf.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Qf=fp(Lf.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),tp=fp(Lf.prototype,"autoToFront",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ep=fp(Lf.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),fp(Lf.prototype,"incoming",[o.m],Object.getOwnPropertyDescriptor(Lf.prototype,"incoming"),Lf.prototype),fp(Lf.prototype,"outgoing",[o.m],Object.getOwnPropertyDescriptor(Lf.prototype,"outgoing"),Lf.prototype),fp(Lf.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"addNodeMoveRules"),Lf.prototype),fp(Lf.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"move"),Lf.prototype),fp(Lf.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"moveTo"),Lf.prototype),fp(Lf.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"moveText"),Lf.prototype),fp(Lf.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"updateText"),Lf.prototype),fp(Lf.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setSelected"),Lf.prototype),fp(Lf.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setHovered"),Lf.prototype),fp(Lf.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setHitable"),Lf.prototype),fp(Lf.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setElementState"),Lf.prototype),fp(Lf.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setProperty"),Lf.prototype),fp(Lf.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setProperties"),Lf.prototype),fp(Lf.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setStyle"),Lf.prototype),fp(Lf.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setStyles"),Lf.prototype),fp(Lf.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"updateStyles"),Lf.prototype),fp(Lf.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"setZIndex"),Lf.prototype),fp(Lf.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(Lf.prototype,"updateAttributes"),Lf.prototype),Lf);function hp(t){return hp="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},hp(t)}function vp(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 gp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vp(Object(r),!0).forEach((function(e){kp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bp(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 mp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Op(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 wp(){return wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=_p(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},wp.apply(this,arguments)}function _p(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Pp(t)););return t}function jp(t,e){return jp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},jp(t,e)}function Ep(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pp(t);if(e){var o=Pp(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"===hp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Sp(t)}function Sp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pp(t){return Pp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Pp(t)}function kp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ap(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 Dp,Tp,Mp,Np=(pp=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&&jp(t,e)}(i,t);var e,r,n,o=Ep(i);function i(){var t;mp(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return kp(Sp(t=o.call.apply(o,[this].concat(r))),"modelType",lo.CIRCLE_NODE),bp(Sp(t),"r",dp,Sp(t)),t}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var t=wp(Pp(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return gp(gp({},t),mi(e))}},{key:"getDefaultAnchor",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")}]}}])&&Op(e.prototype,r),n&&Op(e,n),i}(yp),dp=Ap(pp.prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Ap(pp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(pp.prototype,"width"),pp.prototype),Ap(pp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(pp.prototype,"height"),pp.prototype),pp);r(127);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},Cp(t)}function Rp(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 Lp(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 zp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lp(Object(r),!0).forEach((function(e){$p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bp(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 Hp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xp(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 Up(){return Up="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}},Up.apply(this,arguments)}function Fp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kp(t)););return t}function Gp(t,e){return Gp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gp(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=Kp(t);if(e){var o=Kp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vp(this,r)}}function Vp(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 Wp(t)}function Wp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kp(t){return Kp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Kp(t)}function $p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zp(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 qp,Jp,Qp,td=(Dp=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&&Gp(t,e)}(i,t);var e,r,n,o=Yp(i);function i(){var t;Hp(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $p(Wp(t=o.call.apply(o,[this].concat(r))),"modelType",lo.DIAMOND_NODE),Bp(Wp(t),"rx",Tp,Wp(t)),Bp(Wp(t),"ry",Mp,Wp(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Up(Kp(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return zp(zp({},t),mi(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=Rp(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=Rp(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this;return this.points.map((function(e,r){var n=Rp(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&Xp(e.prototype,r),n&&Xp(e,n),i}(yp),Tp=Zp(Dp.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Mp=Zp(Dp.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Zp(Dp.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(Dp.prototype,"points"),Dp.prototype),Zp(Dp.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Dp.prototype,"pointsPosition"),Dp.prototype),Zp(Dp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Dp.prototype,"width"),Dp.prototype),Zp(Dp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Dp.prototype,"height"),Dp.prototype),Dp);function ed(t){return ed="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},ed(t)}function rd(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 nd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rd(Object(r),!0).forEach((function(e){yd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function od(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 id(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 ud(){return ud="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=cd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ud.apply(this,arguments)}function cd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dd(t)););return t}function sd(t,e){return sd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},sd(t,e)}function ld(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=dd(t);if(e){var o=dd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fd(this,r)}}function fd(t,e){if(e&&("object"===ed(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return pd(t)}function pd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dd(t){return dd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},dd(t)}function yd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hd(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 vd,gd,bd=(qp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&sd(t,e)}(i,t);var e,r,n,o=ld(i);function i(){var t;id(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return yd(pd(t=o.call.apply(o,[this].concat(r))),"modelType",lo.ELLIPSE_NODE),od(pd(t),"rx",Jp,pd(t)),od(pd(t),"ry",Qp,pd(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=ud(dd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return nd(nd({},t),mi(e))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&ad(e.prototype,r),n&&ad(e,n),i}(yp),Jp=hd(qp.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Qp=hd(qp.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),hd(qp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(qp.prototype,"width"),qp.prototype),hd(qp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(qp.prototype,"height"),qp.prototype),qp);function md(t){return md="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},md(t)}function Od(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 wd(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 wd(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 wd(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 _d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_d(Object(r),!0).forEach((function(e){Cd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ed(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 xd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sd(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 Pd(){return Pd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=kd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pd.apply(this,arguments)}function kd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nd(t)););return t}function Ad(t,e){return Ad=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ad(t,e)}function Dd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Nd(t);if(e){var o=Nd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Td(this,r)}}function Td(t,e){if(e&&("object"===md(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Md(t)}function Md(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)},Nd(t)}function Cd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rd(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,Ld,zd=(vd=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&&Ad(t,e)}(i,t);var e,r,n,o=Dd(i);function i(){var t;xd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cd(Md(t=o.call.apply(o,[this].concat(r))),"modelType",lo.POLYGON_NODE),Ed(Md(t),"points",gd,Md(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Pd(Nd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return jd(jd({},t),mi(e))}},{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=Od(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=Od(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this,e=this.x,r=this.y,n=this.width,o=this.height;return this.points.map((function(i,a){var u=Od(i,2),c=u[0],s=u[1];return{x:e+c-n/2,y:r+s-o/2,id:"".concat(t.id,"_").concat(a)}}))}}])&&Sd(e.prototype,r),n&&Sd(e,n),i}(yp),gd=Rd(vd.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Rd(vd.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(vd.prototype,"pointsPosition"),vd.prototype),Rd(vd.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(vd.prototype,"width"),vd.prototype),Rd(vd.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(vd.prototype,"height"),vd.prototype),vd);function Bd(t){return Bd="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},Bd(t)}function Hd(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 Xd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hd(Object(r),!0).forEach((function(e){Jd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ud(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 Fd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gd(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 Yd(){return Yd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Vd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Yd.apply(this,arguments)}function Vd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qd(t)););return t}function Wd(t,e){return Wd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Wd(t,e)}function Kd(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=qd(t);if(e){var o=qd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $d(this,r)}}function $d(t,e){if(e&&("object"===Bd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zd(t)}function Zd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qd(t){return qd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qd(t)}function Jd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qd,ty=(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&&Wd(t,e)}(i,t);var e,r,n,o=Kd(i);function i(){var t;Fd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Jd(Zd(t=o.call.apply(o,[this].concat(r))),"modelType",lo.RECT_NODE),Ud(Zd(t),"radius",Ld,Zd(t)),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var t=Yd(qd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return Xd(Xd({},t),mi(e))}}])&&Gd(e.prototype,r),n&&Gd(e,n),i}(yp),Ld=function(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}(Id.prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Id);function ey(t){return ey="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},ey(t)}function ry(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 ny(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ry(Object(r),!0).forEach((function(e){dy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function oy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iy(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 ay(){return ay="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=uy(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ay.apply(this,arguments)}function uy(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=py(t)););return t}function cy(t,e){return cy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cy(t,e)}function sy(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=py(t);if(e){var o=py(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ly(this,r)}}function ly(t,e){if(e&&("object"===ey(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 py(t){return py=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},py(t)}function dy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yy(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 hy=(Qd=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&&cy(t,e)}(i,t);var e,r,n,o=sy(i);function i(){var t;oy(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return dy(fy(t=o.call.apply(o,[this].concat(r))),"modelType",lo.TEXT_NODE),t}return e=i,(r=[{key:"getTextStyle",value:function(){var t=ay(py(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return ny(ny({},t),mi(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return Ha({rows:t,fontSize:e,rowsLength:t.length}).width}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return Ha({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&iy(e.prototype,r),n&&iy(e,n),i}(yp),yy(Qd.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Qd.prototype,"width"),Qd.prototype),yy(Qd.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Qd.prototype,"height"),Qd.prototype),Qd);function vy(t){return vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vy(t)}function gy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 my(t,e){return my=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},my(t,e)}function Oy(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=jy(t);if(e){var o=jy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wy(this,r)}}function wy(t,e){if(e&&("object"===vy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _y(t)}function _y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jy(t){return jy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jy(t)}function Ey(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xy,Sy,Py,ky,Ay=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&&my(t,e)}(i,t);var e,r,n,o=Oy(i);function i(){var t;gy(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ey(_y(t=o.call.apply(o,[this].concat(r))),"modelType",lo.HTML_NODE),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}}])&&by(e.prototype,r),n&&by(e,n),i}(yp);function Dy(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 Ty(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 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 Ny(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cy(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=(xy=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ny(this,"graphModel",void 0),Ty(this,"isShowHorizontal",Sy,this),Ty(this,"isShowVertical",Py,this),Ty(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:"getStyle",value:function(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dy(Object(r),!0).forEach((function(e){Ny(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},this.graphModel.theme.snapline)}},{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=Ma(a);else{var u=this.graphModel.getNodeModelById(i);n=Ma(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=Ma(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 Mn({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=Ma(a);else{var u=this.graphModel.getNodeModelById(i);n=Ma(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=Ma(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 Mn({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)}}],r&&My(e.prototype,r),n&&My(e,n),t}(),Sy=Cy(xy.prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Py=Cy(xy.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ky=Cy(xy.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Cy(xy.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(xy.prototype,"clearSnapline"),xy.prototype),Cy(xy.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(xy.prototype,"setNodeSnapLine"),xy.prototype),xy);function Iy(t){return Iy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iy(t)}function Ly(){return Ly=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},Ly.apply(this,arguments)}function zy(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 By(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zy(Object(r),!0).forEach((function(e){Ky(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Hy(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 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)||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 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 Uy(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 Fy(t,e){return Fy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fy(t,e)}function Gy(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=Wy(t);if(e){var o=Wy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yy(this,r)}}function Yy(t,e){if(e&&("object"===Iy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vy(t)}function Vy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wy(t){return Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wy(t)}function Ky(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $y=function(t){!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&&Fy(t,e)}(i,t);var e,r,n,o=Gy(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),Ky(Vy(t=o.call(this)),"preTargetNode",void 0),Ky(Vy(t),"sourceRuleResults",void 0),Ky(Vy(t),"targetRuleResults",void 0),Ky(Vy(t),"dragHandler",void 0),Ky(Vy(t),"t",void 0),Ky(Vy(t),"onDragStart",(function(e){var r=e.event,n=t.props,o=n.anchorData,i=n.nodeModel,a=n.graphModel,u=a.overlapMode;a.selectNodeById(i.id),u!==bo.INCREASE&&i.autoToFront&&a.toFront(i.id),a.eventCenter.emit(po.ANCHOR_DRAGSTART,{data:o,e:r,nodeModel:i}),t.setState({startX:o.x,startY:o.y,endX:o.x,endY:o.y})})),Ky(Vy(t),"onDraging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.nodeModel,a=n.anchorData,u=o.transformModel,c=o.eventCenter,s=o.width,l=o.height,f=o.editConfigModel,p=r.clientX,d=r.clientY,y=o.getPointByClient({x:p,y:d}),h=y.domOverlayPosition,v=h.x,g=h.y,b=y.canvasOverlayPosition,m=b.x,O=b.y;t.t&&clearInterval(t.t);var w=[];v<10?w=[10,0]:v+10>s?w=[-10,0]:g<10?w=[0,10]:g+10>l&&(w=[0,-10]),t.setState({endX:m,endY:O,draging:!0}),t.moveAnchorEnd(m,O),w.length>0&&!f.stopMoveGraph&&(t.t=setInterval((function(){var e=Hy(w,2),r=e[0],n=e[1];u.translate(r,n);var o=t.state,i=o.endX,a=o.endY;t.setState({endX:i-r,endY:a-n}),t.moveAnchorEnd(i-r,a-n)}),50)),c.emit(po.ANCHOR_DRAG,{data:a,e:r,nodeModel:i})})),Ky(Vy(t),"onDragEnd",(function(e){t.t&&clearInterval(t.t),t.checkEnd(e),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear()})),Ky(Vy(t),"checkEnd",(function(e){var r=t.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,a=i.x,u=i.y,c=i.id,s=n.edgeType,l=t.state,f=l.endX,p=l.endY,d=l.draging,y=Sa({x:f,y:p},n);if(t.preTargetNode&&t.preTargetNode.state!==co.DEFAULT&&t.preTargetNode.setElementState(co.DEFAULT),d&&y&&y.node){var h=y.node,v=y.anchor.id,g="".concat(o.id,"_").concat(h.id,"_").concat(v,"_").concat(c),b=t.sourceRuleResults.get(g)||{},m=b.isAllPass,O=b.msg,w=t.targetRuleResults.get(g)||{},_=w.isAllPass,j=w.msg;if(m&&_){h.setElementState(co.DEFAULT);var E=n.addEdge({type:s,sourceNodeId:o.id,sourceAnchorId:c,startPoint:{x:a,y:u},targetNodeId:y.node.id,targetAnchorId:y.anchor.id,endPoint:{x:y.anchor.x,y:y.anchor.y}}),x=t.props.anchorData;n.eventCenter.emit(po.ANCHOR_DROP,{data:x,e:e,nodeModel:o,edgeModel:E})}else{var S=h.getData();n.eventCenter.emit(po.CONNECTION_NOT_ALLOWED,{data:S,msg:j||O})}}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,draging:!1},t.dragHandler=new Xc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"getAnchorShape",value:function(){var t=this.props,e=t.anchorData,r=t.style,n=t.node.getAnchorShape(e);if(n)return n;var o=e.x,i=e.y,a=By(By({},r),r.hover);return Object(tt.g)("g",null,Object(tt.g)(Sl,Ly({className:"lf-node-anchor-hover"},a,{x:o,y:i})),Object(tt.g)(Sl,Ly({className:"lf-node-anchor"},r,{x:o,y:i})))}},{key:"moveAnchorEnd",value:function(t,e){var r=this.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,a=Sa({x:t,y:e},n);if(a){var u=a.node,c=a.anchor.id;if(this.preTargetNode&&this.preTargetNode!==a.node&&this.preTargetNode.setElementState(co.DEFAULT),i.id===c)return;this.preTargetNode=u;var s="".concat(o.id,"_").concat(u.id,"_").concat(c,"_").concat(i.id);if(!this.targetRuleResults.has(s)){var l=a.anchor,f=o.isAllowConnectedAsSource(u,i,l),p=u.isAllowConnectedAsTarget(o,i,l);this.sourceRuleResults.set(s,Xa(f)),this.targetRuleResults.set(s,Xa(p))}var d=this.sourceRuleResults.get(s).isAllPass,y=this.targetRuleResults.get(s).isAllPass;d&&y?u.setElementState(co.ALLOW_CONNECT):u.setElementState(co.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==co.DEFAULT&&this.preTargetNode.setElementState(co.DEFAULT)}},{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return Aa(e,r,n,o)>10}},{key:"render",value:function(){var t=this,e=this.state,r=e.startX,n=e.startY,o=e.endX,i=e.endY,a=this.props,u=a.anchorData.edgeAddable,c=a.edgeStyle;return Object(tt.g)("g",{className:"lf-anchor"},Object(tt.g)("g",{onMouseDown:function(e){!1!==u&&t.dragHandler.handleMouseDown(e)}},this.getAnchorShape()),this.isShowLine()&&Object(tt.g)(Ws,Ly({x1:r,y1:n,x2:o,y2:i},c,{"pointer-events":"none"})))}}])&&Uy(e.prototype,r),n&&Uy(e,n),i}(tt.a);r(63);function Zy(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 qy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zy(Object(r),!0).forEach((function(e){Jy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Jy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qy(t){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},Qy(t)}function th(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 eh(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 eh(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 eh(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 rh(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.overflowMode,l=void 0===s?"default":s,f=t.textWidth,p=void 0===f?"":f,d=t.model,y={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=th(t,2),r=e[0],n=e[1];"object"!==Qy(n)&&(y[r]=n)})),i){var h=String(i).split(/[\r\n]/g),v=h.length;if("default"!==l){var g=d.BaseType,b=d.modelType;if(g===fo.NODE&&b!==lo.TEXT_NODE||g===fo.EDGE&&p)return function(t){var e=t.value,r=t.fontSize,n=t.model,o=t.fontFamily,i=void 0===o?"":o,a=t.lineHeight,u=t.wrapPadding,c=void 0===u?"0, 0":u,s=t.overflowMode,l=t.x,f=t.y,p=n.width,d=n.textHeight,y=t.textWidth||p,h=String(e).split(/[\r\n]/g),v=h.length,g=Ba({rows:h,style:{fontSize:"".concat(r,"px"),width:"".concat(y,"px"),fontFamily:i,lineHeight:a,padding:c},rowsLength:v,className:"lf-get-text-height"}),b=n.height>g?n.height:g;d&&(b=d);var m="ellipsis"===s;return Object(tt.g)("g",null,Object(tt.g)("foreignObject",{width:y,height:b,x:l-y/2,y:f-b/2},Object(tt.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:b,width:y,padding:c}},Object(tt.g)("div",{className:m?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:qy({},t)},h.map((function(t){return Object(tt.g)("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t)}if(v>1){var m=h.map((function(t,e){var n=(e-(v-1)/2)*(a+2);return Object(tt.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(tt.g)("text",y,m)}return Object(tt.g)("text",y,i)}}function nh(t){return nh="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},nh(t)}function oh(){return oh=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},oh.apply(this,arguments)}function ih(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 ah(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 ah(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 ah(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 uh(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 ch(t,e){return ch=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ch(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=ph(t);if(e){var o=ph(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"===nh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fh(t)}function fh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ph(t){return ph=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ph(t)}function dh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yh=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(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),dh(fh(e=o.call(this)),"dragHandler",void 0),dh(fh(e),"sumDeltaX",0),dh(fh(e),"sumDeltaY",0),dh(fh(e),"stepDrag",void 0),dh(fh(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=ih(o.graphModel.transformModel.fixDeltaXY(r,n),2),u=a[0],c=a[1];i.moveText(u,c)})),dh(fh(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(co.TEXT_EDIT)})),dh(fh(e),"mouseDownHandle",(function(t){var r=e.props,n=r.draggable,o=r.graphModel.editConfigModel.nodeTextDraggable;(n||o)&&e.stepDrag.handleMouseDown(t)}));var r=t.model,n=t.draggable;return e.stepDrag=new Xc({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.graphModel,n=e.text,o=r.editConfigModel,i=n.value,a=n.x,u=n.y,c=n.editable,s=n.draggable,l={x:a,y:u,className:"",value:i};c?l.className="lf-element-text":s||o.nodeTextDraggable?l.className="lf-text-draggable":l.className="lf-text-disabled";var f=e.getTextStyle();return Object(tt.g)(rh,oh({},l,f,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return Object(tt.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&uh(e.prototype,r),n&&uh(e,n),i}(tt.a),hh=null!==window.navigator.userAgent.match(/MSIE|Trident/),vh=new Map,gh=function(t){var e=vh.get(t);e&&(window.cancelAnimationFrame(e),vh.delete(t))};function bh(t){return bh="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},bh(t)}function mh(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 Oh(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 Oh(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 Oh(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 wh(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},_h(t,e)}function jh(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=Sh(t);if(e){var o=Sh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Eh(this,r)}}function Eh(t,e){if(e&&("object"===bh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xh(t)}function xh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sh(t){return Sh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Sh(t)}function Ph(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var kh=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=jh(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),Ph(xh(e=o.call(this)),"t",void 0),Ph(xh(e),"moveOffset",void 0),Ph(xh(e),"stepDrag",void 0),Ph(xh(e),"contextMenuTime",void 0),Ph(xh(e),"startTime",void 0),Ph(xh(e),"clickTimer",void 0),Ph(xh(e),"onDragStart",(function(t){var r=t.event,n=r.clientX,o=r.clientY,i=e.props,a=i.model,u=i.graphModel.getPointByClient({x:n,y:o}).canvasOverlayPosition,c=u.x,s=u.y;e.moveOffset={x:a.x-c,y:a.y-s}})),Ph(xh(e),"onDraging",(function(t){var r=t.event,n=e.props,o=n.model,i=n.graphModel,a=i.editConfigModel,u=i.transformModel,c=i.width,s=i.height,l=i.gridSize;o.isDragging=!0;var f=r.clientX,p=r.clientY,d=i.getPointByClient({x:f,y:p}).canvasOverlayPosition,y=d.x,h=d.y,v=mh(u.CanvasPointToHtmlPoint([y,h]),2),g=v[0],b=v[1];if(!(g<0||b<0||g>c||b>s)){y+=e.moveOffset.x,h+=e.moveOffset.y,y=Li(y,l),h=Li(h,l);var m,O,w,_=mh(u.CanvasPointToHtmlPoint([y-o.width/2,h-o.height/2]),2),j=_[0],E=_[1],x=mh(u.CanvasPointToHtmlPoint([y+o.width/2,h+o.height/2]),2),S=x[0],P=x[1],k=Math.max(l,20),A=[];j<0?A=[k,0]:S>i.width?A=[-k,0]:E<0?A=[0,k]:P>i.height&&(A=[0,-k]),e.t&&gh(e.t),A.length>0&&!a.stopMoveGraph?e.t=(m=function(){var t=mh(A,2),e=t[0],r=t[1];u.translate(e,r),i.moveNode(o.id,-e/u.SCALE_X,-r/u.SCALE_X)},O=Ji(),w=window.requestAnimationFrame((function t(){if(m(),vh.get(O)){var e=window.requestAnimationFrame(t);vh.set(O,e)}})),vh.set(O,w),O):i.moveNode2Coordinate(o.id,y,h)}})),Ph(xh(e),"onDragEnd",(function(){e.t&&gh(e.t),e.props.model.isDragging=!1})),Ph(xh(e),"handleClick",(function(t){if(e.startTime&&!((new Date).getTime()-e.startTime>200)){var r=e.props,n=r.model,o=r.graphModel,i={data:n.getData(),e:t,position:o.getPointByClient({x:t.clientX,y:t.clientY})},a=2===t.button,u=2===t.detail;if(!a){var c=o.editConfigModel;o.selectNodeById(n.id,Fi(t,c)),e.toFront(),u?(c.nodeTextEdit&&n.text.editable&&(n.setSelected(!1),o.setElementStateById(n.id,co.TEXT_EDIT)),o.eventCenter.emit(po.NODE_DBCLICK,i)):(o.eventCenter.emit(po.ELEMENT_CLICK,i),o.eventCenter.emit(po.NODE_CLICK,i))}}})),Ph(xh(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.model,o=r.graphModel,i=n.getData(),a=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(n.id,co.SHOW_MENU,a.domOverlayPosition),o.selectNodeById(n.id),o.eventCenter.emit(po.NODE_CONTEXTMENU,{data:i,e:t,position:a}),e.toFront()})),Ph(xh(e),"handleMouseDown",(function(t){var r=e.props,n=r.model,o=r.graphModel;e.toFront(),e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),Ph(xh(e),"setHoverON",(function(t){if(!e.state.isHovered){e.setState({isHovered:!0});var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.setHovered(!0),o.eventCenter.emit(po.NODE_MOUSEENTER,{data:i,e:t})}})),Ph(xh(e),"setHoverOFF",(function(t){e.setState({isHovered:!1});var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.setHovered(!1),o.eventCenter.emit(po.NODE_MOUSELEAVE,{data:i,e:t})})),Ph(xh(e),"onMouseOut",(function(t){hh&&e.setHoverOFF(t)}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter,u=t.model;return e.stepDrag=new Xc({onDragStart:e.onDragStart,onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:n,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:u}),e.state={isHovered:!1},e}return e=i,n=[{key:"getModel",value:function(t){return t}}],(r=[{key:"getAnchorShape",value:function(t){return null}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.isSelected,i=r.isHitable,a=r.isDragging,u=this.state.isHovered;if(i&&(o||u)&&!a){var c=r.getAnchorLineStyle();return yn(r.anchors,(function(e,o){var i=r.getAnchorStyle(e);return Object(tt.g)($y,{anchorData:e,node:t,style:i,edgeStyle:c,anchorIndex:o,nodeModel:r,graphModel:n,setHoverOFF:t.setHoverOFF})}))}return[]}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===co.TEXT_EDIT)return"";if(e.text){var n=r.editConfigModel,o=!1;return(e.text.draggable||n.nodeTextDraggable)&&(o=!0),Object(tt.g)(yh,{editable:n.nodeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,r=t.isDraging,n=t.isSelected,o="lf-node";switch(e){case co.ALLOW_CONNECT:o+=" lf-node-allow";break;case co.NOT_ALLOW_CONNECT:o+=" lf-node-not-allow";break;default:o+=" lf-node-default"}return r&&(o+=" lf-isDragging"),n&&(o+=" lf-node-selected"),o}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;r.overlapMode!==bo.INCREASE&&e.autoToFront&&r.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,r=e.model,n=e.graphModel,o=n.editConfigModel,i=o.hideAnchors,a=o.adjustNodePosition,u=n.gridSize,c=n.transformModel.SCALE_X,s=r.isHitable,l=r.draggable,f=Object(tt.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(tt.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(tt.g)("g",{className:this.getStateClassName()},f),t}}])&&wh(e.prototype,r),n&&wh(e,n),i}(tt.a);function Ah(t){return Ah="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},Ah(t)}function Dh(){return Dh=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},Dh.apply(this,arguments)}function Th(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mh(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 Nh(t,e){return Nh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Nh(t,e)}function Ch(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 Rh(this,r)}}function Rh(t,e){if(e&&("object"===Ah(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ih(t){return Ih=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ih(t)}var Lh=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&&Nh(t,e)}(i,t);var e,r,n,o=Ch(i);function i(){return Th(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(sl,Dh({},e,{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&Mh(e.prototype,r),n&&Mh(e,n),i}(kh);function zh(t){return zh="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},zh(t)}function Bh(){return Bh=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},Bh.apply(this,arguments)}function Hh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xh(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 Uh(t,e){return Uh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Uh(t,e)}function Fh(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=Yh(t);if(e){var o=Yh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gh(this,r)}}function Gh(t,e){if(e&&("object"===zh(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 Yh(t){return Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yh(t)}var Vh=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&&Uh(t,e)}(i,t);var e,r,n,o=Fh(i);function i(){return Hh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.r,o=t.getNodeStyle();return Object(tt.g)(Sl,Bh({},o,{x:e,y:r,r:n}))}}])&&Xh(e.prototype,r),n&&Xh(e,n),i}(kh);function Wh(t){return Wh="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},Wh(t)}function Kh(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 $h(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 $h(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 $h(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 Zh(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach((function(t){var e=Kh(t,2),r=e[0],o=e[1];"object"!==Wh(o)&&(n[r]=o)})),n.className=r?"lf-basic-shape ".concat(r):"lf-basic-shape",n.points=e.map((function(t){return t.join(",")})).join(" "),Object(tt.g)("polygon",n)}function qh(t){return qh="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},qh(t)}function Jh(){return Jh=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},Jh.apply(this,arguments)}function Qh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tv(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 ev(t,e){return ev=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ev(t,e)}function rv(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=ov(t);if(e){var o=ov(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nv(this,r)}}function nv(t,e){if(e&&("object"===qh(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 ov(t){return ov=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ov(t)}var iv=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&&ev(t,e)}(i,t);var e,r,n,o=rv(i);function i(){return Qh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.width,o=t.height,i=t.points,a=t.getNodeStyle(),u={transform:"matrix(1 0 0 1 ".concat(e-n/2," ").concat(r-o/2,")")};return Object(tt.g)("g",u,Object(tt.g)(Zh,Jh({},a,{points:i,x:e,y:r})))}}])&&tv(e.prototype,r),n&&tv(e,n),i}(kh);function av(t){return av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},av(t)}function uv(){return uv=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},uv.apply(this,arguments)}function cv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function lv(t,e){return lv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},lv(t,e)}function fv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=dv(t);if(e){var o=dv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pv(this,r)}}function pv(t,e){if(e&&("object"===av(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dv(t){return dv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},dv(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&&lv(t,e)}(i,t);var e,r,n,o=fv(i);function i(){return cv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)("g",null,Object(tt.g)(Zh,uv({},e,{points:t.points,x:t.x,y:t.y})))}}])&&sv(e.prototype,r),n&&sv(e,n),i}(kh);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},hv(t)}function vv(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 gv(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 gv(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 gv(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 bv(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=void 0===u?4:u,s=t.className,l={cx:r,cy:o,rx:a,ry:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=vv(t,2),r=e[0],n=e[1];"object"!==hv(n)&&(l[r]=n)})),l.className=s?"lf-basic-shape ".concat(s):"lf-basic-shape",Object(tt.g)("ellipse",l)}function mv(t){return mv="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},mv(t)}function Ov(){return Ov=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},Ov.apply(this,arguments)}function wv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function jv(t,e){return jv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},jv(t,e)}function Ev(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Sv(t);if(e){var o=Sv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return xv(this,r)}}function xv(t,e){if(e&&("object"===mv(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 Sv(t){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Sv(t)}var Pv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jv(t,e)}(i,t);var e,r,n,o=Ev(i);function i(){return wv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(bv,Ov({},e,{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&_v(e.prototype,r),n&&_v(e,n),i}(kh);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},kv(t)}function Av(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Dv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Av(Object(r),!0).forEach((function(e){Tv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Av(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nv(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 Cv(t,e){return Cv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Cv(t,e)}function Rv(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=Lv(t);if(e){var o=Lv(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"===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 Lv(t){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Lv(t)}var zv=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&&Cv(t,e)}(i,t);var e,r,n,o=Rv(i);function i(){return Mv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getBackgroud",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.text;if(r&&r.value&&e.background&&"transparnet"!==e.background.fill){var n=r.x,o=r.y,i=t.width,a=t.height,u=Dv(Dv({},e.background),{},{x:n,y:o-1,width:i,height:a});return Object(tt.g)(sl,u)}}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getBackgroud())}}])&&Nv(e.prototype,r),n&&Nv(e,n),i}(kh);function Bv(t){return Bv="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},Bv(t)}function Hv(){return Hv=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},Hv.apply(this,arguments)}function Xv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uv(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 Fv(t,e){return Fv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fv(t,e)}function Gv(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=Wv(t);if(e){var o=Wv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yv(this,r)}}function Yv(t,e){if(e&&("object"===Bv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vv(t)}function Vv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wv(t){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wv(t)}function Kv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fv(t,e)}(i,t);var e,r,n,o=Gv(i);function i(){var t;Xv(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Kv(Vv(t=o.call.apply(o,[this].concat(r))),"ref",void 0),Kv(Vv(t),"currrentProperties",void 0),Kv(Vv(t),"preProperties",void 0),Kv(Vv(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:"shouldUpdate",value:function(){if(!this.preProperties||this.preProperties!==this.currrentProperties)return this.preProperties=this.currrentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.height,o=t.width,i=t.getNodeStyle();return this.currrentProperties=JSON.stringify(t.properties),Object(tt.g)("foreignObject",Hv({},i,{x:e-o/2,y:r-n/2,width:o,height:n,ref:this.setRef}))}}])&&Uv(e.prototype,r),n&&Uv(e,n),i}(kh);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},Zv(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},qv.apply(this,arguments)}function Jv(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 Qv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Jv(Object(r),!0).forEach((function(e){ag(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jv(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 eg(t,e){return eg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},eg(t,e)}function rg(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 ng(this,r)}}function ng(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 og(t)}function og(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)},ig(t)}function ag(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ug,cg=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&&eg(t,e)}(i,t);var e,r,n,o=rg(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),ag(og(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHoverd:!0})})),ag(og(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=t.getTextStyle(),r=t.text,n=e.background||{};if(this.state.isHoverd&&e.hover&&e.hover.background&&(n=Qv(Qv({},n),e.hover.background)),r&&r.value&&"transparent"!==n.fill){var o,i=e.fontSize,a=e.overflowMode,u=e.lineHeight,c=e.wrapPadding,s=e.textWidth,l=r.value,f=r.x,p=r.y,d=String(l).split(/[\r\n]/g),y=d.length;if("autoWrap"===a&&s){var h=Ba({rows:d,style:{fontSize:"".concat(i,"px"),width:"".concat(s,"px"),lineHeight:u,padding:c},rowsLength:y,className:"lf-get-text-height"});o=Qv(Qv({},n),{},{x:f-1,y:p-1,width:s,height:h})}else{var v=0;d&&d.forEach((function(t){var e=vc(t);v=e>v?e:v}));var g=Ha({rows:d,fontSize:i,rowsLength:y}),b=g.width,m=g.height;if("string"==typeof n.wrapPadding){var O=n.wrapPadding.split(",").filter((function(t){return t.trim()})).map((function(t){return parseFloat(t.trim())}));O.length>0&&O.length<=4&&(1===O.length?O=[O[0],O[0],O[0],O[0]]:2===O.length?O=[O[0],O[1],O[0],O[1]]:3===O.length&&(O=[O[0],O[1],O[2],O[1]]),b+=O[1]+O[3],m+=O[0]+O[2],f+=(O[1]-O[3])/2,p+=(O[2]-O[0])/2)}o=Qv(Qv({},n),{},{x:f-1,y:p-1,width:b,height:m})}return Object(tt.g)(sl,o)}}},{key:"getShape",value:function(){var t=this.props.model,e=t.text,r=e.value,n=e.x,o=e.y;if(r){var i=Qv({x:n,y:o,className:"lf-element-text",value:r},t.getTextStyle());return Object(tt.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(tt.g)(rh,qv({},i,{model:t})))}}}])&&tg(e.prototype,r),n&&tg(e,n),i}(yh);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},sg(t)}function lg(){return lg=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},lg.apply(this,arguments)}function fg(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 pg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fg(Object(r),!0).forEach((function(e){wg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dg(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 yg(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 yg(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 yg(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 hg(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 vg(t,e){return vg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vg(t,e)}function gg(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=Og(t);if(e){var o=Og(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bg(this,r)}}function bg(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 mg(t)}function mg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Og(t){return Og=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Og(t)}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}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(ug||(ug={}));var _g=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&&vg(t,e)}(i,t);var e,r,n,o=gg(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),wg(mg(t=o.call(this)),"dragHandler",void 0),wg(mg(t),"oldEdge",void 0),wg(mg(t),"preTargetNode",void 0),wg(mg(t),"targetRuleResults",void 0),wg(mg(t),"sourceRuleResults",void 0),wg(mg(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}),o.isHitable=!1})),wg(mg(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=dg(c.transformModel.moveCanvasPointByHtml([i,a],r,n),2),f=l[0],p=l[1];t.setState({endX:f,endY:p,draging:!0});var d=t.props.edgeModel,y=Sa({x:i,y:a},c);if(y&&y.node&&t.isAllowAdjust(y)){var h,v=d.startPoint,g=d.endPoint,b=d.sourceNode,m=d.targetNode;s===ug.SOURCE?h={startPoint:{x:y.anchor.x,y:y.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:y.node,targetNode:m}:s===ug.TARGET&&(h={startPoint:{x:v.x,y:v.y},endPoint:{x:y.anchor.x,y:y.anchor.y},sourceNode:b,targetNode:y.node}),d.updateAfterAdjustStartAndEnd(h)}else s===ug.SOURCE?d.updateStartPoint({x:f,y:p}):s===ug.TARGET&&d.updateEndPoint({x:f,y:p})})),wg(mg(t),"onDragEnd",(function(){var e;t.setState({draging:!1});var r=t.props,n=r.graphModel,o=r.edgeModel,i=r.type;o.isHitable=!0;var a=t.state,u=a.endX,c=a.endY,s=a.draging,l=Sa({x:u,y:c},n);if(s){if(l&&l.node&&t.isAllowAdjust(l)){var f,p=o.getData(),d=pg(pg({},p),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==p||null===(f=p.text)||void 0===f?void 0:f.value)||""});i===ug.SOURCE?d=pg(pg({},d),{},{sourceNodeId:l.node.id,sourceAnchorId:l.anchor.id,startPoint:{x:l.anchor.x,y:l.anchor.y},targetNodeId:o.targetNodeId,endPoint:pg({},o.endPoint)}):i===ug.TARGET&&(d=pg(pg({},d),{},{sourceNodeId:o.sourceNodeId,startPoint:pg({},o.startPoint),targetNodeId:l.node.id,targetAnchorId:l.anchor.id,endPoint:{x:l.anchor.x,y:l.anchor.y}})),n.deleteEdgeById(o.id);var y=n.addEdge(pg({},d));n.eventCenter.emit(po.EDGE_EXCHANGE_NODE,{data:{newEdge:y.getData(),oldEdge:o.getData()}})}else t.recoveryEdge();null===(e=t.preTargetNode)||void 0===e||e.setElementState(co.DEFAULT)}})),wg(mg(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!==lo.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),wg(mg(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.targetRuleResults=new Map,t.sourceRuleResults=new Map,t.dragHandler=Pc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"isAllowAdjust",value:function(t){var e=this.props,r=e.edgeModel,n=(r.id,r.sourceNode),o=r.targetNode,i=r.sourceAnchorId,a=r.targetAnchorId,u=e.type,c=null,s=null,l=null,f=null;if(u===ug.SOURCE?(c=t.node,s=o,l=t.anchor,f=o.getAnchorInfo(a)):(c=n,s=t.node,f=t.anchor,l=n.getAnchorInfo(i)),this.preTargetNode&&this.preTargetNode!==t.node&&this.preTargetNode.setElementState(co.DEFAULT),this.preTargetNode=t.node,f.id===l.id)return!1;var p="".concat(c.id,"_").concat(s.id,"_").concat(l.id,"_").concat(f.id);if(!this.targetRuleResults.has(p)){var d=c.isAllowConnectedAsSource(s,l,f),y=s.isAllowConnectedAsTarget(c,l,f);this.sourceRuleResults.set(p,Xa(d)),this.targetRuleResults.set(p,Xa(y))}var h=this.sourceRuleResults.get(p).isAllPass,v=this.targetRuleResults.get(p).isAllPass,g=h&&v?co.ALLOW_CONNECT:co.NOT_ALLOW_CONNECT;return u===ug.SOURCE?c.setElementState(g):s.setElementState(g),h&&v}},{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=this.state.draging,o=this.getAdjustPointStyle();return Object(tt.g)("g",null,Object(tt.g)(Sl,lg({className:"lf-edge-adjust-point"},o,{x:e,y:r,onMouseDown:this.dragHandler,"pointer-events":n?"none":""})))}}])&&hg(e.prototype,r),n&&hg(e,n),i}(tt.a);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},jg(t)}function Eg(){return Eg=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},Eg.apply(this,arguments)}function xg(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 Sg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xg(Object(r),!0).forEach((function(e){Cg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Pg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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 Ag(t,e){return Ag=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ag(t,e)}function Dg(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=Ng(t);if(e){var o=Ng(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tg(this,r)}}function Tg(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 Mg(t)}function Mg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ng(t){return Ng=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ng(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 Rg=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&&Ag(t,e)}(i,t);var e,r,n,o=Dg(i);function i(){var t;Pg(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cg(Mg(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),Cg(Mg(t),"contextMenuTime",void 0),Cg(Mg(t),"clickTimer",void 0),Cg(Mg(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.graphModel.eventCenter;o.setHovered(e);var a=e?po.EDGE_MOUSEENTER:po.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})})),Cg(Mg(t),"setHoverON",(function(e){t.props.model.isHovered||t.handleHover(!0,e)})),Cg(Mg(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),Cg(Mg(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=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,co.SHOW_MENU,i.domOverlayPosition),t.toFront(),o.selectEdgeById(n.id);var a=null==n?void 0:n.getData();o.eventCenter.emit(po.EDGE_CONTEXTMENU,{data:a,e:e,position:i})})),Cg(Mg(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),Cg(Mg(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=null==o?void 0:o.getData(),u=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var c=i.editConfigModel,s=i.textEditElement;if(s&&s.id===o.id&&i.setElementStateById(o.id,co.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,co.TEXT_EDIT),o.modelType===lo.POLYLINE_EDGE){var l=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,p=f.x,d=f.y,y=Oc({x:p,y:d},l.points);l.dbClickPosition=y}i.eventCenter.emit(po.EDGE_DBCLICK,{data:a,e:e,position:u})}else i.eventCenter.emit(po.ELEMENT_CLICK,{data:a,e:e,position:u}),i.eventCenter.emit(po.EDGE_CLICK,{data:a,e:e,position:u});var h=i.editConfigModel;i.selectEdgeById(o.id,Fi(e,h)),t.toFront()}})),Cg(Mg(t),"getIsDraging",(function(){return!1})),t}return e=i,(r=[{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===co.TEXT_EDIT)return"";var n=!1,o=r.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(n=!0),Object(tt.g)(cg,{editable:o.edgeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:n})}},{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.props,e=t.model,r=t.graphModel,n=e.getEdgeStyle(),o=e.getEdgeAnimationStyle(),i=r.theme.arrow,a=e.isAnimation?o.stroke:n.stroke;return Sg(Sg({},n),{},{fill:a,stroke:a},i)}},{key:"getArrow",value:function(){return Object(tt.g)("g",null,Object(tt.g)("defs",null,this.getStartArrow(),this.getEndArrow()))}},{key:"getStartArrow",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.id,o=r.theme.arrow,i=o.offset,a=o.verticalLength,u=this.getArrowStyle(),c=u.stroke,s=u.strokeWidth;return Object(tt.g)("marker",{id:"marker-start-".concat(n),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(tt.g)("path",{stroke:c,fill:c,strokeWidth:s,d:"M 0 0 L ".concat(i," -").concat(a," L ").concat(i," ").concat(a," Z")}))}},{key:"getEndArrow",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.id,o=r.theme.arrow,i=o.offset,a=o.verticalLength,u=this.getArrowStyle(),c=u.stroke,s=u.strokeWidth;return Object(tt.g)("marker",{id:"marker-end-".concat(n),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(tt.g)("path",{stroke:c,fill:c,strokeWidth:s,transform:"rotate(180)",d:"M 0 0 L ".concat(i," -").concat(a," L ").concat(i," ").concat(a," Z")}))}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.getAdjustStart(),o=e.getAdjustEnd();return Object(tt.g)("g",null,Object(tt.g)(_g,Eg({type:"SOURCE"},n,{edgeModel:e,graphModel:r})),Object(tt.g)(_g,Eg({type:"TARGET"},o,{edgeModel:e,graphModel:r})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(tt.g)("g",null)}},{key:"getAppend",value:function(){return Object(tt.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.overlapMode!==bo.INCREASE&&e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model,r=e.isSelected,n=e.isHitable,o=t.graphModel,i=this.getIsDraging(),a=o.editConfigModel.adjustEdgeStartAndEnd,u=o.animation,c=r&&u.edge&&1===o.getSelectElements().edges.length;return Object(tt.g)("g",null,Object(tt.g)("g",{className:["lf-edge",!n&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),c&&this.getAnimation(),this.getText(),this.getArrow()),a&&r&&!i?this.getAdjustPoints():"")}}])&&kg(e.prototype,r),n&&kg(e,n),i}(tt.a);function Ig(t){return Ig="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},Ig(t)}function Lg(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 zg(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 zg(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 zg(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 Bg=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=Lg(t,2),n=r[0],o=r[1],i=Ig(o);"style"!==n&&"object"===i||(e[n]=o)})),Object(tt.g)("path",e)};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},Hg(t)}function Xg(){return Xg=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},Xg.apply(this,arguments)}function Ug(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gg(t,e){return Gg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gg(t,e)}function Yg(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=Wg(t);if(e){var o=Wg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vg(this,r)}}function Vg(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 Wg(t){return Wg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wg(t)}var Kg=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&&Gg(t,e)}(i,t);var e,r,n,o=Yg(i);function i(){return Ug(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeStyle(),a=t.getEdgeAnimationStyle(),u=a.strokeDasharray,c=a.stroke,s=a.strokeDashoffset,l=a.animationName,f=a.animationDuration,p=a.animationIterationCount,d=a.animationTimingFunction,y=a.animationDirection;return Object(tt.g)(Ws,Xg({},i,{x1:e.x,y1:e.y,x2:r.x,y2:r.y},o,n?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:s,animationName:l,animationDuration:f,animationIterationCount:p,animationTimingFunction:d,animationDirection:y}}:{}))}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),r=e.stroke,n=e.className,o=e.strokeDasharray,i=t.startPoint,a=t.endPoint,u=t.getEdgeStyle();return Object(tt.g)("g",null,Object(tt.g)(Ws,Xg({},u,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,className:n,strokeDasharray:o,stroke:r})))}},{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=Lu(Bu(Bu({},o),{},{type:"start"})),a=Lu(Bu(Bu({},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(tt.g)(Bg,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}}])&&Fg(e.prototype,r),n&&Fg(e,n),i}(Rg);function $g(t){return $g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$g(t)}function Zg(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 qg(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 qg(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 qg(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 Jg=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=Zg(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==$g(o)&&(e[n]=o)})),Object(tt.g)("polyline",e)};function Qg(t){return Qg="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},Qg(t)}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){fb(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(){return rb=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},rb.apply(this,arguments)}function nb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ob(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ob(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ob(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function 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 ab(t,e){return ab=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ab(t,e)}function ub(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=lb(t);if(e){var o=lb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cb(this,r)}}function cb(t,e){if(e&&("object"===Qg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return sb(t)}function sb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lb(t){return lb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},lb(t)}function fb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pb=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&&ab(t,e)}(i,t);var e,r,n,o=ub(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),fb(sb(t=o.call(this)),"drag",void 0),fb(sb(t),"isDraging",void 0),fb(sb(t),"appendInfo",void 0),fb(sb(t),"dragHandler",void 0),fb(sb(t),"onDragStart",(function(){t.props.model.dragAppendStart()})),fb(sb(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.transformModel,c=a.editConfigModel,s=nb(u.fixDeltaXY(r,n),2),l=s[0],f=s[1],p=i,d=c.adjustEdgeMiddle;t.appendInfo=d?p.dragAppendSimple(t.appendInfo,{x:l,y:f}):p.dragAppend(t.appendInfo,{x:l,y:f})})),fb(sb(t),"onDragEnd",(function(){var e=t.props,r=e.model,n=e.graphModel.eventCenter,o=r;o.dragAppendEnd(),t.isDraging=!1,t.appendInfo=void 0,n.emit(po.EDGE_ADJUST,{data:o.getData()})})),fb(sb(t),"beforeDragStart",(function(e,r){r.dragAble&&t.dragHandler(e),t.appendInfo=r})),fb(sb(t),"getIsDraging",(function(){return t.isDraging})),t.drag=Pc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.points,r=t.isAnimation,n=t.arrowConfig,o=t.getEdgeStyle(),i=t.getEdgeAnimationStyle(),a=i.strokeDasharray,u=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,d=i.animationDirection;return Object(tt.g)(Jg,rb({points:e},o,n,r?{strokeDasharray:a,stroke:u,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:d}}:{}))}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),r=e.stroke,n=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return Object(tt.g)("g",null,Object(tt.g)(Jg,rb({points:t.points},i,{className:n,strokeDasharray:o,stroke:r})))}},{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=dc(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getAppendAttributes",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=Lu(eb(eb({},o),{},{type:"start"})),a=Lu(eb(eb({},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.getAppendAttributes(t),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Object(tt.g)(Bg,{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(tt.g)("g",{className:r},t.getAppendShape(c)),l=n.editConfigModel,f=l.adjustEdge,p=l.adjustEdgeMiddle;if(f&&i){t.dragHandler=t.drag;var d=c.startIndex,y=c.endIndex,h=p&&(0===d||y===u-1);c.dragAble=!h,c.start.x===c.end.x?(c.dragAble&&(r+="-ew-resize"),c.direction=yo.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=yo.HORIZONTAL),s=Object(tt.g)("g",{className:t.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Object(tt.g)("g",{className:r},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return Object(tt.g)("g",null,a)}}])&&ib(e.prototype,r),n&&ib(e,n),i}(Rg);function db(t){return db="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},db(t)}function yb(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 hb(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 hb(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 hb(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(){return vb=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},vb.apply(this,arguments)}function gb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bb(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 mb(t,e){return mb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},mb(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"===db(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)},_b(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 gb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle(),r=t.path,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeAnimationStyle(),a=i.strokeDasharray,u=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,d=i.animationDirection;return Object(tt.g)(Bg,vb({d:r},e,o,n?{strokeDasharray:a,stroke:u,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:d}}:{}))}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),r=e.stroke,n=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return Object(tt.g)("g",null,Object(tt.g)(Bg,vb({d:t.path},i,{className:n,strokeDasharray:o,stroke:r})))}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return Object(tt.g)(Bg,{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=function(t){var e=bc(t);return[e[2],e[3]]}(n),a=yb(i,2);return{start:a[0],end:a[1],hover:e,isSelected:o}}}])&&bb(e.prototype,r),n&&bb(e,n),i}(Rg);function Eb(t){return Eb="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},Eb(t)}function xb(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 Sb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kb(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 Ab(t,e){return Ab=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ab(t,e)}function Db(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Mb(t);if(e){var o=Mb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tb(this,r)}}function Tb(t,e){if(e&&("object"===Eb(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 Mb(t){return Mb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Mb(t)}var Nb=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&&Ab(t,e)}(i,t);var e,r,n,o=Db(i);function i(){return Pb(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getArrowAttributes",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=Lu(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?xb(Object(r),!0).forEach((function(e){Sb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xb(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.getArrowAttributes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Object(tt.g)(Bg,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-arrow"},this.getShape())}}],r&&kb(e.prototype,r),n&&kb(e,n),i}(tt.a);var Cb=function(t,e){return Mr(t,e)};var Rb=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},Ib=function(){return vt.a.Date.now()},Lb=/\s/;var zb=function(t){for(var e=t.length;e--&&Lb.test(t.charAt(e)););return e},Bb=/^\s+/;var Hb=function(t){return t?t.slice(0,zb(t)+1).replace(Bb,""):t},Xb=/^[-+]0x[0-9a-f]+$/i,Ub=/^0b[01]+$/i,Fb=/^0o[0-7]+$/i,Gb=parseInt;var Yb=function(t){if("number"==typeof t)return t;if(zr(t))return NaN;if(Pt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Pt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Hb(t);var r=Ub.test(t);return r||Fb.test(t)?Gb(t.slice(2),r?2:8):Xb.test(t)?NaN:+t},Vb=Math.max,Wb=Math.min;var Kb=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 d(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function y(t){return s=t,u=setTimeout(v,e),l?d(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=Ib();if(h(t))return g(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?Wb(r,i-(t-s)):r}(t))}function g(t){return u=void 0,p&&n?d(t):(n=o=void 0,a)}function b(){var t=Ib(),r=h(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return y(c);if(f)return clearTimeout(u),u=setTimeout(v,e),d(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=Yb(e)||0,Pt(r)&&(l=!!r.leading,i=(f="maxWait"in r)?Vb(Yb(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),b.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},b.flush=function(){return void 0===u?a:g(Ib())},b},$b=r(166);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(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jb,Qb,tm,em=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qb(this,"undos",[]),qb(this,"redos",[]),qb(this,"callbacks",[]),qb(this,"stopWatch",null),qb(this,"curData",null),qb(this,"maxSize",50),qb(this,"waitTime",100),qb(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){Cb(Rb(this.undos),t)||(this.undos.push(t),Cb(this.curData,t)||(this.redos=[]),this.eventCenter.emit(po.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=mi(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=mi(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object($b.a)(t,Kb((function(){var r=t.modelToHistoryData();r&&e.add(r)}),this.waitTime))}}])&&Zb(e.prototype,r),n&&Zb(e,n),t}();function rm(t){return rm="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},rm(t)}function nm(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 om(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 om(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 om(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 im(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 am(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?im(Object(r),!0).forEach((function(e){dm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function um(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 cm(t,e){return cm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cm(t,e)}function sm(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=pm(t);if(e){var o=pm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lm(this,r)}}function lm(t,e){if(e&&("object"===rm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fm(t)}function fm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pm(t){return pm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pm(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}var ym,hm,vm,gm=Zm((tm=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&&cm(t,e)}(i,t);var e,r,n,o=sm(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),dm(fm(t=o.call(this)),"ref",Object(tt.f)()),dm(fm(t),"__prevText",{type:"",text:"",id:""}),dm(fm(t),"keyupHandler",(function(e){var r=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&r.setElementState(0)})),dm(fm(t),"inputHandler",(function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;t.__prevText={type:n.type,text:r.replace(/(\r\n)+$|(\n)+$/,""),id:n.id}})),dm(fm(t),"keydownHandler",(function(t){t.stopPropagation()})),t.state={style:{left:0,top:0}},t}return e=i,n=[{key:"getDerivedStateFromProps",value:function(t){var e,r=t.graphModel,n=r.transformModel,o=r.theme,i=r.textEditElement;if(i){var a;if(null===(a=i.text)||void 0===a||!a.value)if(i.BaseType===fo.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===fo.EDGE){var p=o.edgeText,d=p.overflowMode,y=p.lineHeight,h=p.wrapPadding,v=p.textWidth;v&&"autoWrap"===d&&(e=am(am({},f),{},{width:v,minWidth:v,lineHeight:y,padding:h}))}else if(i.BaseType===fo.NODE){var g=o.nodeText,b=g.overflowMode,m=g.lineHeight,O=g.wrapPadding,w=g.textWidth,_=i,j=_.width,E=_.modelType;(E!==lo.TEXT_NODE&&"autoWrap"===b||E===lo.TEXT_NODE&&w)&&(e=am(am({},f),{},{width:w||j,minWidth:w||j,lineHeight:m,padding:O}))}var x=i.text,S=x.x,P=x.y,k=nm(n.CanvasPointToHtmlPoint([S,P]),2);return{style:am({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.editConfigModel,n=r.edgeTextEdit,o=r.nodeTextEdit;(n||o)&&e.on("".concat(po.GRAPH_TRANSFORM,",").concat(po.NODE_CLICK,",").concat(po.BLANK_CLICK," "),(function(){t.textEditElement&&t.textEditElement.setElementState(co.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.updateText(n,r),t.eventCenter.emit(po.TEXT_UPDATE,am({},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(tt.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onInput:this.inputHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&um(e.prototype,r),n&&um(e,n),i}(tt.a),dm(Qb,"toolName","textEdit"),Jb=tm))||Jb,bm=function(t){return t.modelType===lo.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===lo.POLYLINE_EDGE?function(t){var e=t.points,r=dc(e),n=Zu(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===lo.BEZIER_EDGE?function(t){var e=t.path,r=bc(e),n=Zu(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 mm(t){return mm="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},mm(t)}function Om(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)||_m(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 wm(t){return function(t){if(Array.isArray(t))return jm(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_m(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 _m(t,e){if(t){if("string"==typeof t)return jm(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)?jm(t,e):void 0}}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}function Em(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 xm(t,e){return xm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xm(t,e)}function Sm(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=Am(t);if(e){var o=Am(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Pm(this,r)}}function Pm(t,e){if(e&&("object"===mm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return km(t)}function km(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Am(t){return Am=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Am(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}var Tm=Zm((vm=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&&xm(t,e)}(i,t);var e,r,n,o=Sm(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),Dm(km(e=o.call(this)),"stepDrag",void 0),Dm(km(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),Dm(km(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel,i=o.getSelectElements(!0);o.moveNodes(i.nodes.map((function(t){return t.id})),r,n)})),Dm(km(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:[]};wm(a.values()).forEach((function(t){t.BaseType===fo.NODE&&c.nodes.push(t.getData()),t.BaseType===fo.EDGE&&c.edges.push(t.getData())})),i.emit(po.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter;return e.stepDrag=new Xc({onDraging:e.onDraging,step:n,eventType:"SELECTION",eventCenter:a}),e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.transformModel;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===fo.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===fo.EDGE&&(e=bm(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=Om(r.CanvasPointToHtmlPoint([n,o]),2);n=u[0],o=u[1];var c=Om(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(tt.g)("div",{className:"lf-multiple-select",style:s,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&Em(e.prototype,r),n&&Em(e,n),i}(tt.a),Dm(hm,"toolName","multipleSelect"),ym=vm))||ym;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 e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cm=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(gm.toolName)||this.registerTool(gm.toolName,gm),this.isDisabledTool(Tm.toolName)||this.registerTool(Tm.toolName,Tm)}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}}])&&Mm(e.prototype,r),n&&Mm(e,n),t}(),Rm=r(167),Im=r.n(Rm);function Lm(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 zm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Bm=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),zm(this,"mousetrap",void 0),zm(this,"options",void 0),zm(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new Im.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(Pe(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")}}])&&Lm(e.prototype,r),n&&Lm(e,n),t}(),Hm=Bm,Xm=null;function Um(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Fm(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 Gm(t){return Gm="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},Gm(t)}function Ym(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 Vm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ym(Object(r),!0).forEach((function(e){Km(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ym(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Wm(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 e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $m=function(){function t(e){var r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Km(this,"container",void 0),Km(this,"width",void 0),Km(this,"height",void 0),Km(this,"graphModel",void 0),Km(this,"history",void 0),Km(this,"viewMap",new Map),Km(this,"tool",void 0),Km(this,"keyboard",void 0),Km(this,"dnd",void 0),Km(this,"options",void 0),Km(this,"snaplineModel",void 0),Km(this,"components",[]),Km(this,"plugins",void 0),Km(this,"extension",{}),Km(this,"adapterIn",void 0),Km(this,"adapterOut",void 0),Km(this,"getView",(function(t){return o.viewMap.get(t)})),e=hf(e),this.options=e,this.container=e.container,this.plugins=e.plugins,this.graphModel=new rs(Vm({},e)),this.tool=new Cm(this),this.history=new em(this.graphModel.eventCenter),this.dnd=new yf({lf:this}),this.keyboard=new Hm({lf:this,keyboard:e.keyboard}),e.isSilentMode||!1===e.snapline||(this.snaplineModel=new Ry(this.graphModel),r=this.graphModel.eventCenter,n=this.snaplineModel,r.on("node:mousemove",(function(t){var e=t.data;n.setNodeSnapLine(e)})),r.on("node:mouseup",(function(){n.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)?(Xm=null,!1):((Xm=o).nodes.forEach((function(t){return Um(t,40)})),Xm.edges.forEach((function(t){return Fm(t,40)})),!1)}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(Xm&&(Xm.nodes||Xm.edges)){t.clearSelectElements();var r=t.addElements(Xm);if(!r)return;r.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),r.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),Xm.nodes.forEach((function(t){return Um(t,40)})),Xm.edges.forEach((function(t){return Fm(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,r=[{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var n={BaseEdge:Rg,BaseEdgeModel:eu,BaseNode:kh,BaseNodeModel:yp,RectNode:Lh,RectNodeModel:ty,CircleNode:Vh,CircleNodeModel:Np,PolygonNode:iv,PolygonNodeModel:zd,TextNode:zv,TextNodeModel:hy,LineEdge:Kg,LineEdgeModel:bu,DiamondNode:yv,DiamondNodeModel:td,PolylineEdge:pb,PolylineEdgeModel:Iu,BezierEdge:jb,BezierEdgeModel:If,EllipseNode:Pv,EllipseNodeModel:bd,HtmlNode:$v,HtmlNodeModel:Ay,h:tt.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=Q(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=Q(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"batchRegister",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){t.registerElement(e)}))}},{key:"defaultRegister",value:function(){this.registerElement({view:Lh,model:ty,type:"rect"}),this.registerElement({type:"circle",view:Vh,model:Np}),this.registerElement({type:"polygon",view:iv,model:zd}),this.registerElement({type:"line",view:Kg,model:bu}),this.registerElement({type:"polyline",view:pb,model:Iu}),this.registerElement({type:"bezier",view:jb,model:If}),this.registerElement({type:"text",view:zv,model:hy}),this.registerElement({type:"ellipse",view:Pv,model:bd}),this.registerElement({type:"diamond",view:yv,model:td}),this.registerElement({type:"html",view:$v,model:Ay})}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e),e||this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformModel,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModelById(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.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,e){this.options.width=null!=t?t:this.options.width,this.options.height=null!=e?e:this.options.height,this.graphModel.resize(t,e)}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.updateText(t,e)}},{key:"deleteElement",value:function(t){var e,r,n,o=this.getModelById(t);return!!o&&null!==(r=null===(n=(Km(e={},fo.NODE,this.deleteNode),Km(e,fo.EDGE,this.deleteEdge),e)[o.BaseType])||void 0===n?void 0:n.call(this,t))&&void 0!==r&&r}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){return this.graphModel.getElement(t).getData()}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"changeEdgeType",value:function(t,e){this.graphModel.changeEdgeType(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.getNodeModelById(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:"cloneNode",value:function(t){var e=this.graphModel.getNodeModelById(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"getNodeModelById",value:function(t){return this.graphModel.getNodeModelById(t)}},{key:"getNodeDataById",value:function(t){return this.graphModel.getNodeModelById(t).getData()}},{key:"addEdge",value:function(t){return this.graphModel.addEdge(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.deleteEdgeById(t),o}},{key:"deleteEdgeByNodeId",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.deleteEdgeBySourceAndTarget(e,r):e?this.graphModel.deleteEdgeBySource(e):r&&this.graphModel.deleteEdgeByTarget(r)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdgeModels",value:function(t){var e=this.graphModel.edges,r=t.sourceNodeId,n=t.targetNodeId;if(r&&n){var o=[];return e.forEach((function(t){t.sourceNodeId===r&&t.targetNodeId===n&&o.push(t)})),o}if(r){var i=[];return e.forEach((function(t){t.sourceNodeId===r&&i.push(t)})),i}if(n){var a=[];return e.forEach((function(t){t.targetNodeId===n&&a.push(t)})),a}return[]}},{key:"getEdgeDataById",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(Ya(e))}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{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.addEdge(t);i.edges.push(a)})),i}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.graphModel.getAreaElement(t,e,r,n).map((function(t){return t.getData()}))}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{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:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfigModel.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=Ya(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=Ya(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){return this.graphModel.transformModel.zoom(t,e)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformModel.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformModel.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel;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.transformModel.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,e=t.TRANSLATE_X,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t,e){void 0===e&&(e=t),this.graphModel.fitView(t,e)}},{key:"openEdgeAnimation",value:function(t){this.graphModel.openEdgeAnimation(t)}},{key:"closeEdgeAnimation",value:function(t){this.graphModel.closeEdgeAnimation(t)}},{key:"on",value:function(t,e){this.graphModel.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.graphModel.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.graphModel.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.graphModel.eventCenter.emit(t,e)}},{key:"installPlugins",value:function(){var e,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=null!==(e=this.plugins)&&void 0!==e?e:t.extensions;o.forEach((function(t){var e=t.pluginName||t.name;-1===n.indexOf(e)&&r.installPlugin(t)}))}},{key:"installPlugin",value:function(e){if("object"===Gm(e)){var r=e.install,n=e.render;return r&&r.call(e,this,t),n&&this.components.push(n.bind(e)),void(this.extension[e.pluginName]=e)}var o=e,i=new o({lf:this,LogicFlow:t});i.render&&this.components.push(i.render.bind(i)),this.extension[o.pluginName]=i}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var r=new e(Vm(Vm({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(r),r}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"renderRawData",value:function(t){this.graphModel.graphDataToModel(Ya(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Object(tt.j)(Object(tt.g)(sf,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(po.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t)}}],n=[{key:"use",value:function(t){var e=t.pluginName;e||(e=t.name);var r=this.extensions.get(e);r&&r.destroy&&r.destroy(),this.extensions.set(e,t)}}],r&&Wm(e.prototype,r),n&&Wm(e,n),t}();function Zm(t){return Q(t)}Km($m,"extensions",new Map);e.default=$m}])}));
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},P.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){d(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];d(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;lr(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||hr(t)||er(t)||ir(t)||cr(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 mr(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 Ze(t,K(r),r.name)},map:function(t,e){arguments.length>2&&q("map");var r=F(e);return new or(t,K(r),r.name)},set:function(t,e){arguments.length>2&&q("set");var r=F(e);return new ur(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 fe({},t,e,n);var o=pe(n),i=fe({},void 0,void 0,n),a=Ue(i);return de(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]||{};lr(t).addComputedProp(t,e,P({get:i,set:a,context:t},u))})),et=tt({equals:x.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=dt(!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),yt(e),!0}if(t.dependenciesState===J.STALE)return pt(r),yt(e),!0}}return ht(t),pt(r),yt(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=dt(!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),yt(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 dt(t){var e=Rt.allowStateReads;return Rt.allowStateReads=t,e}function yt(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,gt=1,bt=Object.getOwnPropertyDescriptor((function(){}),"name");bt&&bt.configurable;function mt(t,e,r){var n=function(){return Ot(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,r,n){var o=wt(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{_t(o)}}function wt(t,e,r){var n=0,o=ft();Bt();var i={prevDerivation:o,prevAllowStateChanges:jt(!0),prevAllowStateReads:dt(!0),notifySpy:false,startTime:n,actionId:gt++,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),xt(t.prevAllowStateChanges),yt(t.prevAllowStateReads),Ht(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function Et(t,e){var r,n=jt(t);try{r=e()}finally{xt(n)}return r}function jt(t){var e=Rt.allowStateChanges;return Rt.allowStateChanges=t,e}function xt(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=x.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){false,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(ut(this),Fe(this)){var e=Ye(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(),Ve(this)&&Ke(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 m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(_),Pt=y("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?x.structural:x.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 oe((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=y("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){Vt();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(t.isTracing===Q.BREAK){var r=[];Ft(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 ")()}}function Ft(t,e,r){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(r).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Ft(t,e,r+1)})))}var Gt=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),Vt())},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();false,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;Rt.suppressReactionErrors,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=Ce(t);if(!n)return u(!1);n.isTracing,Q.NONE;n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Yt=function(t){return t()};function Vt(){Rt.inBatch>0||Rt.isRunningReactions||Yt(Wt)}function Wt(){Rt.isRunningReactions=!0;for(var t=Rt.pendingReactions,e=0;t.length>0;){100==++e&&t.splice(0);for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Rt.isRunningReactions=!1}var Kt=y("Reaction",Gt);function $t(t){var e=Yt;Yt=function(r){return t((function(){return e(r)}))}}function Zt(t){return function(){}}function qt(){u(!1)}function Jt(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 Qt(t).apply(this,arguments)}}function Qt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){d(this,r,te(t,e))}})}}var te=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?Jt(t):!0!==n?Jt(e).apply(null,arguments):void d(t,e,mt(t.name||e,r.value,this))};function ee(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function re(t){return"function"==typeof t&&!0===t.isMobxAction}function ne(t,e,r){d(t,e,mt(e,r.bind(t)))}function oe(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+a();if(!e.scheduler&&!e.delay)r=new Gt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ae(e),u=!1;r=new Gt(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()}te.bound=function(t,e,r,n){return!0===n?(ne(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return ne(this,e,r.value||r.initializer.call(this)),this[e]},set:qt}:{enumerable:!1,configurable:!0,set:function(t){ne(this,e,t)},get:function(){}}};var ie=function(t){return t()};function ae(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ie}function ue(t,e,r){void 0===r&&(r=i);var n,o,u,c=r.name||"Reaction@"+a(),s=te(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=ae(r),p=!0,d=!1,y=r.compareStructural?x.structural:r.equals||x.default,h=new Gt(c,(function(){p||l?v():d||(d=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(d=!1,!h.isDisposed){var e=!1;h.track((function(){var r=t(h);e=p||!y(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 ce(t,e,r){return se("onBecomeUnobserved",t,e,r)}function se(t,e,r,n){var o="function"==typeof n?vr(e,r):vr(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 le(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&&(Rt.disableErrorBoundaries=!!o),i&&$t(i)}function fe(t,e,r,n){var o=pe(n=F(n));return I(t),lr(t,n.name,o.enhancer),e&&de(t,e,r,o),t}function pe(t){return t.defaultDecorator||(!1===t.deep?V:G)}function de(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 he(vr(t,e))}function he(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(he)),n}var ve=0;function ge(){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=++ve,a=te(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=te(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=te(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=te(e+" - runid: "+i+" - cancel",(function(){try{u&&me(u);var t=a.return(void 0),e=Promise.resolve(t.value);e.then(l,l),me(e),r(new ge)}catch(t){r(t)}})),c}}function me(t){"function"==typeof t.cancel&&t.cancel()}function Oe(t,e){if(null==t)return!1;if(void 0!==e){if(!1===hr(t))return!1;if(!t[w].values.has(e))return!1;var r=vr(t,e);return At(r)}return At(t)}function we(t){return arguments.length>1?u(!1):Oe(t)}function _e(t,e){return"string"!=typeof e?u(!1):Oe(t,e)}function Ee(t,e){return null!=t&&(void 0!==e?!!hr(t)&&t[w].values.has(e):hr(t)||!!t[w]||E(t)||Kt(t)||At(t))}function je(t){return 1!==arguments.length&&u(!1),Ee(t)}function xe(t){return hr(t)?t[w].getKeys():ir(t)||cr(t)?Array.from(t.keys()):er(t)?t.map((function(t,e){return e})):u(!1)}function Se(t){return hr(t)?xe(t).map((function(e){return t[e]})):ir(t)?xe(t).map((function(e){return t.get(e)})):cr(t)?Array.from(t.values()):er(t)?t.slice():u(!1)}function Pe(t){return hr(t)?xe(t).map((function(e){return[e,t[e]]})):ir(t)?xe(t).map((function(e){return[e,t.get(e)]})):cr(t)?Array.from(t.entries()):er(t)?t.map((function(t,e){return[e,t]})):u(!1)}function ke(t,e,r){if(2!==arguments.length||cr(t))if(hr(t)){var n=t[w],o=n.values.get(e);o?n.write(e,r):n.addObservableProp(e,r,n.defaultEnhancer)}else if(ir(t))t.set(e,r);else if(cr(t))t.add(e);else{if(!er(t))return u(!1);"number"!=typeof e&&(e=parseInt(e,10)),c(e>=0,"Not a valid index: '"+e+"'"),Bt(),e>=t.length&&(t.length=e+1),t[e]=r,Ht()}else{Bt();var i=e;try{for(var a in i)ke(t,a,i[a])}finally{Ht()}}}function Ae(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return gr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return gr(t).observe(e,r)}(t,e,r)}ge.prototype=Object.create(Error.prototype);var De={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Te(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Me(t,e,r){if(!e.recurseEverything&&!je(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(Pt(t))return Me(t.get(),e,r);if(je(t)&&xe(t),!0===e.detectCycles&&null!==t&&r.has(t))return r.get(t);if(er(t)||Array.isArray(t)){var n=Te(r,t,[],e),o=t.map((function(t){return Me(t,e,r)}));n.length=o.length;for(var i=0,a=o.length;i<a;i++)n[i]=o[i];return n}if(cr(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===e.exportMapsAsObjects){var u=Te(r,t,new Set,e);return t.forEach((function(t){u.add(Me(t,e,r))})),u}var c=Te(r,t,[],e);return t.forEach((function(t){c.push(Me(t,e,r))})),c}if(ir(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===e.exportMapsAsObjects){var s=Te(r,t,new Map,e);return t.forEach((function(t,n){s.set(n,Me(t,e,r))})),s}var l=Te(r,t,{},e);return t.forEach((function(t,n){l[n]=Me(t,e,r)})),l}var f=Te(r,t,{},e);return g(t).forEach((function(n){f[n]=Me(t[n],e,r)})),f}function Ne(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=De),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),Me(t,e,r)}function Ce(t){switch(t.length){case 0:return Rt.trackingDerivation;case 1:return vr(t[0]);case 2:return vr(t[0],t[1])}}function Re(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Ht()}}function Ie(t,e,r){return 1===arguments.length||e&&"object"==typeof e?ze(t,e):Le(t,e,r||{})}function Le(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=oe((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function ze(t,e){var r;var n=new Promise((function(n,o){var i=Le(t,n,P(P({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Be(t){return t[w]}function He(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var Xe={has:function(t,e){if(e===w||"constructor"===e||e===T)return!0;var r=Be(t);return He(e)?r.has(e):e in t},get:function(t,e){if(e===w||"constructor"===e||e===T)return t[e];var r=Be(t),n=r.values.get(e);if(n instanceof _){var o=n.get();return void 0===o&&r.has(e),o}return He(e)&&r.has(e),t[e]},set:function(t,e,r){return!!He(e)&&(ke(t,e,r),!0)},deleteProperty:function(t,e){return!!He(e)&&(Be(t).remove(e),!0)},ownKeys:function(t){return Be(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return u("Dynamic observable objects cannot be frozen"),!1}};function Ue(t){var e=new Proxy(t,Xe);return t[w].proxy=e,e}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),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ye(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 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),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ke(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 $e={get:function(t,e){return e===w?t[w]:"length"===e?t[w].getArrayLength():"number"==typeof e?Je.get.call(t,e):"string"!=typeof e||isNaN(e)?Je.hasOwnProperty(e)?Je[e]:t[e]:Je.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[w].setArrayLength(r),"number"==typeof e&&Je.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:Je.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return u("Observable arrays cannot be frozen"),!1}};function Ze(t,e,r,n){void 0===r&&(r="ObservableArray@"+a()),void 0===n&&(n=!1);var o,i,u,c=new qe(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,$e);if(c.proxy=s,t&&t.length){var l=jt(!0);c.spliceWithArray(0,0,t),xt(l)}return s}var qe=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 Ge(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}),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.");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),Fe(this)){var a=Ye(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=Ve(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Ke(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Ve(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&&Ke(this,i)},t}(),Je={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&&t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t])},set:function(t,e){var r=this[w],n=r.values;if(t<n.length){ut(r.atom);var o=n[t];if(Fe(r)){var i=Ye(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]&&(Je[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]&&(Je[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){Je[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 Qe,tr=y("ObservableArrayAdministration",qe);function er(t){return f(t)&&tr(t[w])}var rr,nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+a()),this.enhancer=e,this.name=r,this[Qe]=nr,this._keysAtom=j(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Rt.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new St(this._has(t),H,this.name+"."+b(t)+"?",!1);this._hasMap.set(t,n),ce(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((ut(this._keysAtom),Fe(this))&&!(n=Ye(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Re((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Ke(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=!1,o=Ve(this),i=o?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;n,r.setNewValue(e),o&&Ke(this,i)}},t.prototype._addValue=function(t,e){var r=this;ut(this._keysAtom),Re((function(){var n=new St(e,r.enhancer,r.name+"."+b(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=!1,o=Ve(this),i=o?{type:"add",object:this,name:t,newValue:e}:null;o&&Ke(this,i)},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 Er({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 Er({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(Qe=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 ir(t)&&(t=t.toJS()),Re((function(){var r=jt(!0);try{p(t)?g(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{xt(r)}})),this},t.prototype.clear=function(){var t=this;Re((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 Re((function(){var r,n,o,i,a=function(t){if(h(t)||ir(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 d=f.value;if(!a.has(d))if(e.delete(d))s=!0;else{var y=e._data.get(d);c.set(d,y)}}}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()),g=v.next();!g.done;g=v.next()){var b=A(g.value,2),m=(d=b[0],y=b[1],e._data.has(d));if(e.set(d,y),e._data.has(d)){var O=e._data.get(d);c.set(d,O),m||(s=!0)}}}catch(t){o={error:t}}finally{try{g&&!g.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(),E=w.next(),j=_.next();!E.done;){if(E.value!==j.value){e._keysAtom.reportChanged();break}E=w.next(),j=_.next()}e._data=c})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,r={};try{for(var n=k(this),o=n.next();!o.done;o=n.next()){var i=A(o.value,2),a=i[0],u=i[1];r["symbol"==typeof a?a:b(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 b(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}(),ir=y("ObservableMap",or),ar={},ur=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+a()),this.name=r,this[rr]=ar,this._data=new Set,this._atom=j(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Re((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),Fe(this))&&!(o=Ye(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Re((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=!1,n=Ve(this),o=n?{type:"add",object:this,newValue:t}:null;r,n&&Ke(this,o)}return this},t.prototype.delete=function(t){var e=this;if(Fe(this)&&!(n=Ye(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Re((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Ke(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 Er({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 Er({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return cr(t)&&(t=t.toJS()),Re((function(){var r=jt(!0);try{Array.isArray(t)||v(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&u("Cannot initialize set from "+t)}finally{xt(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+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(rr=w,Symbol.iterator)]=function(){return this.values()},t}(),cr=y("ObservableSet",ur),sr=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(Fe(this)){if(!(a=Ye(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=a.newValue}if((e=n.prepareNewValue(e))!==Rt.UNCHANGED){var o=Ve(this),i=!1,a=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;i,n.setNewValue(e),o&&Ke(this,a)}}},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+"."+b(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(Fe(this)){var o=Ye(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+"."+b(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return fr[t]||(fr[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+"."+b(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 pr[t]||(pr[t]={configurable:Rt.computedConfigurable,enumerable:!1,get:function(){return dr(this).read(t)},set:function(e){dr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Fe(this))if(!(u=Ye(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Ve(this),n=!1,o=this.values.get(t),i=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var a=this.pendingKeys.get(t);a&&a.set(!1)}delete this.target[t];var u=r?{type:"remove",object:this.proxy||e,oldValue:i,name:t}:null;n,r&&Ke(this,u)}finally{Ht()}}},t.prototype.illegalAccess=function(t,e){},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Ve(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Ke(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 lr(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 sr(t,new Map,b(e),r);return d(t,w,n),n}var fr=Object.create(null),pr=Object.create(null);function dr(t){var e=t[w];return e||(I(t),t[w])}var yr=y("ObservableObjectAdministration",sr);function hr(t){return!!f(t)&&(I(t),yr(t[w]))}function vr(t,e){if("object"==typeof t&&null!==t){if(er(t))return void 0!==e&&u(!1),t[w].atom;if(cr(t))return t[w];if(ir(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],hr(t))return e?((n=t[w].values.get(e))||u(!1),n):u(!1);if(E(t)||At(t)||Kt(t))return t}else if("function"==typeof t&&Kt(t[w]))return t[w];return u(!1)}function gr(t,e){return t||u("Expecting some object"),void 0!==e?gr(vr(t,e)):E(t)||At(t)||Kt(t)||ir(t)||cr(t)?t:(I(t),t[w]?t[w]:void u(!1))}var br=Object.prototype.toString;function mr(t,e,r){return void 0===r&&(r=-1),Or(t,e,r)}function Or(t,e,r,n,o){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;if("function"!==i&&"object"!==i&&"object"!=typeof e)return!1;var a=br.call(t);if(a!==br.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":r>=0&&r++}t=wr(t),e=wr(e);var u="[object Array]"===a;if(!u){if("object"!=typeof t||"object"!=typeof e)return!1;var c=t.constructor,s=e.constructor;if(c!==s&&!("function"==typeof c&&c instanceof c&&"function"==typeof s&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return o[l]===e;if(n.push(t),o.push(e),u){if((l=t.length)!==e.length)return!1;for(;l--;)if(!Or(t[l],e[l],r-1,n,o))return!1}else{var f=Object.keys(t),p=void 0;if(l=f.length,Object.keys(e).length!==l)return!1;for(;l--;)if(!_r(e,p=f[l])||!Or(t[p],e[p],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function wr(t){return er(t)?t.slice():h(t)||ir(t)||v(t)||cr(t)?Array.from(t.entries()):t}function _r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Er(t){return t[Symbol.iterator]=jr,t}function jr(){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:Zt,extras:{getDebugName:function(t,e){return(void 0!==e?vr(t,e):hr(t)||ir(t)||cr(t)?gr(t):vr(t)).name}},$mobx:w})}).call(this,r(155),r(82))},function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return b})),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 g})),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 d(t,e){for(var r in e)t[r]=e[r];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,r){var 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 g(){return{current:null}}function b(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)&&!E.__r++||c!==o.debounceRendering)&&((c=o.debounceRendering)||u)(E)}function E(){for(var t;E.__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=d({},o)).__v=o.__v+1,M(a,o,n,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?O(o):i,o.__h),N(r,o),o.__e!=i&&w(o)))}))}function j(t,e,r,n,o,i,a,u,c,s){var p,d,y,h,g,m,w,_=n&&n.__k||f,E=_.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(b,{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===(y=_[p])||y&&h.key==y.key&&h.type===y.type)_[p]=void 0;else for(d=0;d<E;d++){if((y=_[d])&&h.key==y.key&&h.type===y.type){_[d]=void 0;break}y=null}M(t,h,y=y||l,o,i,a,u,c,s),g=h.__e,(d=h.ref)&&y.ref!=d&&(w||(w=[]),y.ref&&w.push(y.ref,null,h),w.push(d,h.__c||g,h)),null!=g?(null==m&&(m=g),"function"==typeof h.type&&h.__k===y.__k?h.__d=c=x(h,c,t):c=P(t,h,y,_,g,c),"function"==typeof r.type&&(r.__d=c)):c&&y.__e==c&&c.parentNode!=t&&(c=O(y))}for(r.__e=m,p=E;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 x(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?x(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,y,h,v,g,O,w,_,E,x=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 x){if(O=e.props,w=(l=x.contextType)&&n[l.__c],_=l?w?w.props.value:l.__:n,r.__c?g=(f=e.__c=r.__c).__=f.__E:("prototype"in x&&x.prototype.render?e.__c=f=new x(O,_):(e.__c=f=new m(O,_),f.constructor=x,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!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=d({},f.__s)),d(f.__s,x.getDerivedStateFromProps(O,f.__s))),y=f.props,h=f.state,p)null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==x.getDerivedStateFromProps&&O!==y&&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(y,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=d(d({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(y,h)),E=null!=l&&l.type===b&&null==l.key?l.props.children:l,j(t,Array.isArray(E)?E:[E],e,r,n,i,a,u,c,s),f.base=e.__e,e.__h=null,f.__h.length&&u.push(f),g&&(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,d=r.props,h=e.props,v=e.type,g=0;if("svg"===v&&(i=!0),null!=a)for(;g<a.length;g++)if((s=a[g])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,a[g]=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)d===h||c&&t.data===h||(t.data=h);else{if(a=a&&n.call(t.childNodes),f=(d=r.props||l).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!c){if(null!=a)for(d={},g=0;g<t.attributes.length;g++)d[t.attributes[g].name]=t.attributes[g].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,d,i,c),p)e.__k=[];else if(g=e.props.children,j(t,Array.isArray(g)?g:[g],e,r,o,i&&"foreignObject"!==v,a,u,a?a[0]:r.__k&&O(r,0),c),null!=a)for(g=a.length;g--;)null!=a[g]&&y(a[g]);c||("value"in h&&void 0!==(g=h.value)&&(g!==d.value||g!==t.value||"progress"===v&&!g)&&A(t,"value",g,d.value,!1),"checked"in h&&void 0!==(g=h.checked)&&g!==t.checked&&A(t,"checked",g,d.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||y(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(b,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=d({},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=d({},this.state),"function"==typeof t&&(t=t(d({},r),this.props)),t&&d(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=b,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,E.__r=0,s=0},function(t,e,r){var n=r(116),o=r(44),i=r(178);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";var n=r(39),o=r(83),i=r(70),a=r(56),u=r(111),c="Array Iterator",s=a.set,l=a.getterFor(c);t.exports=u(Array,"Array",(function(t,e){s(this,{type:c,target:n(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){var n=r(7),o=r(147),i=r(148),a=r(3),u=r(57),c=r(27),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 d in o)p(n[d]&&n[d].prototype,d);p(i,"DOMTokenList")},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(46),a=r(76),u=r(35),c=r(15),s=r(64),l=r(36),f=r(109),p=r(18),d=r(34),y=r(99),h=r(28),v=r(33),g=r(58),b=r(88),m=r(32),O=r(38),w=r(39),_=r(87),E=r(40),j=r(71),x=r(54),S=r(66),P=r(72),k=r(139),A=r(112),D=r(51),T=r(37),M=r(93),N=r(101),C=r(44),R=r(84),I=r(91),L=r(69),z=r(85),B=r(27),H=r(149),X=r(150),U=r(73),F=r(56),G=r(74).forEach,Y=I("hidden"),V="Symbol",W=B("toPrimitive"),K=F.set,$=F.getterFor(V),Z=Object.prototype,q=o.Symbol,J=q&&q.prototype,Q=o.TypeError,tt=o.QObject,et=i("JSON","stringify"),rt=D.f,nt=T.f,ot=k.f,it=M.f,at=c([].push),ut=R("symbols"),ct=R("op-symbols"),st=R("string-to-symbol-registry"),lt=R("symbol-to-string-registry"),ft=R("wks"),pt=!tt||!tt.prototype||!tt.prototype.findChild,dt=l&&p((function(){return 7!=x(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=rt(Z,e);n&&delete Z[e],nt(t,e,r),n&&t!==Z&&nt(Z,e,n)}:nt,yt=function(t,e){var r=ut[t]=x(J);return K(r,{type:V,tag:t,description:e}),l||(r.description=e),r},ht=function(t,e,r){t===Z&&ht(ct,e,r),m(t);var n=_(e);return m(r),d(ut,n)?(r.enumerable?(d(t,Y)&&t[Y][n]&&(t[Y][n]=!1),r=x(r,{enumerable:j(0,!1)})):(d(t,Y)||nt(t,Y,j(1,{})),t[Y][n]=!0),dt(t,n,r)):nt(t,n,r)},vt=function(t,e){m(t);var r=w(e),n=S(r).concat(Ot(r));return G(n,(function(e){l&&!u(gt,r,e)||ht(t,e,r[e])})),t},gt=function(t){var e=_(t),r=u(it,this,e);return!(this===Z&&d(ut,e)&&!d(ct,e))&&(!(r||!d(this,e)||!d(ut,e)||d(this,Y)&&this[Y][e])||r)},bt=function(t,e){var r=w(t),n=_(e);if(r!==Z||!d(ut,n)||d(ct,n)){var o=rt(r,n);return!o||!d(ut,n)||d(r,Y)&&r[Y][n]||(o.enumerable=!0),o}},mt=function(t){var e=ot(w(t)),r=[];return G(e,(function(t){d(ut,t)||d(L,t)||at(r,t)})),r},Ot=function(t){var e=t===Z,r=ot(e?ct:w(t)),n=[];return G(r,(function(t){!d(ut,t)||e&&!d(Z,t)||at(n,ut[t])})),n};(f||(q=function(){if(g(J,this))throw Q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?E(arguments[0]):void 0,e=z(t),r=function(t){this===Z&&u(r,ct,t),d(this,Y)&&d(this[Y],e)&&(this[Y][e]=!1),dt(this,e,j(1,t))};return l&&pt&&dt(Z,e,{configurable:!0,set:r}),yt(e,t)},C(J=q.prototype,"toString",(function(){return $(this).tag})),C(q,"withoutSetter",(function(t){return yt(z(t),t)})),M.f=gt,T.f=ht,D.f=bt,P.f=k.f=mt,A.f=Ot,H.f=function(t){return yt(B(t),t)},l&&(nt(J,"description",{configurable:!0,get:function(){return $(this).description}}),s||C(Z,"propertyIsEnumerable",gt,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:q}),G(S(ft),(function(t){X(t)})),n({target:V,stat:!0,forced:!f},{for:function(t){var e=E(t);if(d(st,e))return st[e];var r=q(e);return st[e]=r,lt[r]=e,r},keyFor:function(t){if(!b(t))throw Q(t+" is not a symbol");if(d(lt,t))return lt[t]},useSetter:function(){pt=!0},useSimple:function(){pt=!1}}),n({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?x(t):vt(x(t),e)},defineProperty:ht,defineProperties:vt,getOwnPropertyDescriptor:bt}),n({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:mt,getOwnPropertySymbols:Ot}),n({target:"Object",stat:!0,forced:p((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(O(t))}}),et)&&n({target:"JSON",stat:!0,forced:!f||p((function(){var t=q();return"[null]"!=et([t])||"{}"!=et({a:t})||"{}"!=et(Object(t))}))},{stringify:function(t,e,r){var n=N(arguments),o=e;if((v(e)||void 0!==t)&&!b(t))return y(e)||(e=function(t,e){if(h(o)&&(e=u(o,this,t,e)),!b(e))return e}),n[1]=e,a(et,null,n)}});if(!J[W]){var wt=J.valueOf;C(J,W,(function(t){return u(wt,this)}))}U(q,V),L[Y]=!0},function(t,e,r){"use strict";var n=r(146).charAt,o=r(40),i=r(56),a=r(111),u="String Iterator",c=i.set,s=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:o(t),index:0})}),(function(){var t,e=s(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){(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(82))},function(t,e,r){"use strict";var n=r(16),o=r(36),i=r(7),a=r(15),u=r(34),c=r(28),s=r(58),l=r(40),f=r(37).f,p=r(134),d=i.Symbol,y=d&&d.prototype;if(o&&c(d)&&(!("description"in y)||void 0!==d().description)){var h={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(y,this)?new d(t):void 0===t?d():d(t);return""===t&&(h[e]=!0),e};p(v,d),v.prototype=y,y.constructor=v;var g="Symbol(test)"==String(d("test")),b=a(y.toString),m=a(y.valueOf),O=/^Symbol\((.*)\)[^)]+$/,w=a("".replace),_=a("".slice);f(y,"description",{configurable:!0,get:function(){var t=m(this),e=b(t);if(u(h,t))return"";var r=g?_(e,7,-1):w(e,O,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},function(t,e,r){r(150)("iterator")},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 g})),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 ut}));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,d=a.i.unmount;function y(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=y(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 g(t,e){var r=y(n++,3);!a.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function b(t,e){var r=y(n++,4);!a.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=y(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(j),t.__H.__h.forEach(x),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(j),e.__h.forEach(x),e.__h=[])},a.i.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===a.i.requestAnimationFrame||((i=a.i.requestAnimationFrame)||E)(w)),o=null},a.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(j),t.__h=t.__h.filter((function(t){return!t.__||x(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.i.__e(r,t.__v)}})),p&&p(t,e)},a.i.unmount=function(t){d&&d(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{j(t)}catch(t){e=t}})),e&&a.i.__e(e,r.__v))};var _="function"==typeof requestAnimationFrame;function E(t){var e,r=function(){clearTimeout(n),_&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);_&&(e=requestAnimationFrame(r))}function j(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function x(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(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=k({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return B(t,e,r)}))),t}function H(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return H(t,e,r)})),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function X(){this.__u=0,this.t=null,this.__b=null}function U(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function F(){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)},(X.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=U(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]=H(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)},X.prototype.componentWillUnmount=function(){this.t=[]},X.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]=B(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 G=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Y(t){return this.getChildContext=function(){return t.context},t.children}function V(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(a.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={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)(Y,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(F.prototype=new a.a).__e=function(t){var e=this,r=U(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),G(e,t,n)):o()};r?r(i):i()}},F.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},F.prototype.componentDidUpdate=F.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){G(t,r,e)}))};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,K=/^(?: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]/,$="undefined"!=typeof document,Z=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 q=a.i.event;function J(){}function Q(){return this.cancelBubble}function tt(){return this.defaultPrevented}a.i.event=function(t){return q&&(t=q(t)),t.persist=J,t.isPropagationStopped=Q,t.isDefaultPrevented=tt,t.nativeEvent=t};var et,rt={configurable:!0,get:function(){return this.class}},nt=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];$&&"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)&&!Z(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&&K.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&&(rt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",rt))}t.$$typeof=W,nt&&nt(t)};var ot=a.i.__r;a.i.__r=function(t){ot&&ot(t),et=t.__c};var it={ReactCurrentDispatcher:{current:{readContext:function(t){return et.__n[t.__c].props.value}}}};function at(t){return!!t&&t.$$typeof===W}var ut=function(t,e){return t(e)},ct=a.b,st={useState:h,useReducer:v,useEffect:g,useLayoutEffect:b,useRef:function(t){return u=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){u=6,b((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=y(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)(V,{__v:t,i:e})},createElement:a.e,createContext:a.d,createFactory:function(t){return a.e.bind(null,t)},cloneElement:function(t){return at(t)?a.c.apply(null,arguments):t},createRef:a.f,Fragment:a.b,isValidElement:at,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:ut,StrictMode:ct,Suspense:X,SuspenseList:F,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:it};e.d=st},function(t,e,r){var n=r(7),o=r(147),i=r(148),a=r(179),u=r(57),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){r(16)({target:"Object",stat:!0},{setPrototypeOf:r(97)})},function(t,e,r){var n=r(16),o=r(18),i=r(38),a=r(96),u=r(137);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(16),o=r(46),i=r(76),a=r(198),u=r(157),c=r(32),s=r(33),l=r(54),f=r(18),p=o("Reflect","construct"),d=Object.prototype,y=[].push,h=f((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!f((function(){p((function(){}))})),g=h||v;n({target:"Reflect",stat:!0,forced:g,sham:g},{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(y,n,e),new(i(a,t,n))}var o=r.prototype,f=l(s(o)?o:d),g=i(t,f,e);return s(g)?g:f}})},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){var n=r(7),o=r(51).f,i=r(57),a=r(44),u=r(108),c=r(134),s=r(95);t.exports=function(t,e){var r,l,f,p,d,y=t.target,h=t.global,v=t.stat;if(r=h?n:v?n[y]||u(y,{}):(n[y]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(d=o(r,l))&&d.value:r[l],!s(h?l:y+(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(16),o=r(7),i=r(99),a=r(100),u=r(33),c=r(67),s=r(43),l=r(39),f=r(61),p=r(27),d=r(75),y=r(101),h=d("slice"),v=p("species"),g=o.Array,b=Math.max;n({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var r,n,o,p=l(this),d=s(p),h=c(t,d),m=c(void 0===e?d:e,d);if(i(p)&&(r=p.constructor,(a(r)&&(r===g||i(r.prototype))||u(r)&&null===(r=r[v]))&&(r=void 0),r===g||void 0===r))return y(p,h,m);for(n=new(void 0===r?g:r)(b(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){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";var n=r(16),o=r(102);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){var n=r(16),o=r(38),i=r(66);n({target:"Object",stat:!0,forced:r(18)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){var n=r(16),o=r(18),i=r(39),a=r(51).f,u=r(36),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(16),o=r(74).filter;n({target:"Array",proto:!0,forced:!r(75)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(16),o=r(36),i=r(135),a=r(39),u=r(51),c=r(61);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(36),o=r(94).EXISTS,i=r(15),a=r(37).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(16),o=r(182);n({target:"Array",stat:!0,forced:!r(118)((function(t){Array.from(t)}))},{from:o})},,function(t,e,r){var n=r(7),o=r(84),i=r(34),a=r(85),u=r(109),c=r(128),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){t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(18),a=r(99),u=r(33),c=r(38),s=r(43),l=r(61),f=r(119),p=r(75),d=r(27),y=r(65),h=d("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",b=o.TypeError,m=y>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),O=p("concat"),w=function(t){if(!u(t))return!1;var e=t[h];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,forced:!m||!O},{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(w(i=-1===e?a:arguments[e])){if(p+(o=s(i))>v)throw b(g);for(r=0;r<o;r++,p++)r in i&&l(u,p,i[r])}else{if(p>=v)throw b(g);l(u,p++,i)}return u.length=p,u}})},function(t,e,r){"use strict";var n=r(105),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e,r){var n=r(16),o=r(200);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,r){var n=r(7),o=r(33),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(15),o=r(38),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},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(18);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var n=r(7),o=r(36),i=r(129),a=r(32),u=r(87),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){var n=r(7),o=r(45),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(81),o=r(45);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(7),o=r(98),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){"use strict";var n=r(16),o=r(74).map;n({target:"Array",proto:!0,forced:!r(75)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return s}));var n=r(10),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(82))},function(t,e,r){var n=r(90);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(7),o=r(28),i=r(34),a=r(57),u=r(108),c=r(92),s=r(56),l=r(94).CONFIGURABLE,f=s.get,p=s.enforce,d=String(String).split("String");(t.exports=function(t,e,r,c){var s,f=!!c&&!!c.unsafe,y=!!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=d.join("string"==typeof v?v:""))),t!==n?(f?!h&&t[e]&&(y=!0):delete t[e],y?t[e]=r:a(t,e,r)):y?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(7).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(7),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(16),o=r(35),i=r(33),a=r(32),u=r(199),c=r(51),s=r(96);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){var n=r(30),o=r(165),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(121)(t))},function(t,e,r){"use strict";(function(t){var n=r(105),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(121)(t))},function(t,e,r){var n=r(15),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){var n=r(36),o=r(35),i=r(93),a=r(71),u=r(39),c=r(87),s=r(34),l=r(129),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){var n=r(16),o=r(213).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(46);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n,o=r(32),i=r(168),a=r(110),u=r(69),c=r(133),s=r(86),l=r(91),f=l("IE_PROTO"),p=function(){},d=function(t){return"<script>"+t+"</"+"script>"},y=function(t){t.write(d("")),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?y(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):y(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(7),o=r(28),i=r(89),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,o,i,a=r(170),u=r(7),c=r(15),s=r(33),l=r(57),f=r(34),p=r(107),d=r(91),y=r(69),h="Object already initialized",v=u.TypeError,g=u.WeakMap;if(a||p.state){var b=p.state||(p.state=new g),m=c(b.get),O=c(b.has),w=c(b.set);n=function(t,e){if(O(b,t))throw new v(h);return e.facade=t,w(b,t,e),e},o=function(t){return m(b,t)||{}},i=function(t){return O(b,t)}}else{var _=d("state");y[_]=!0,n=function(t,e){if(f(t,_))throw new v(h);return e.facade=t,l(t,_,e),e},o=function(t){return f(t,_)?t[_]:{}},i=function(t){return f(t,_)}}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 v("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var n=r(36),o=r(37),i=r(71);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(15);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(55);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e,r){"use strict";r(173)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(177))},function(t,e,r){"use strict";var n=r(87),o=r(37),i=r(71);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){var n=r(15),o=r(55),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(16),o=r(214),i=r(83);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e){t.exports=!1},function(t,e,r){var n,o,i=r(7),a=r(53),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(131),o=r(110);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(68),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){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){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(131),o=r(110).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(37).f,o=r(34),i=r(27)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(62),o=r(15),i=r(81),a=r(38),u=r(43),c=r(119),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,d=5==t||f;return function(y,h,v,g){for(var b,m,O=a(y),w=i(O),_=n(h,v),E=u(w),j=0,x=g||c,S=e?x(y,E):r||p?x(y,0):void 0;E>j;j++)if((d||j in w)&&(m=_(b=w[j],j,O),t))if(e)S[j]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return j;case 2:s(S,b)}else switch(t){case 4:return!1;case 7:s(S,b)}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(18),o=r(27),i=r(65),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){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=r(16),o=r(15),i=r(81),a=r(39),u=r(120),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(76),o=r(35),i=r(15),a=r(122),u=r(154),c=r(32),s=r(45),l=r(156),f=r(123),p=r(90),d=r(40),y=r(59),h=r(113),v=r(124),g=r(102),b=r(151),m=r(18),O=b.UNSUPPORTED_Y,w=4294967295,_=Math.min,E=[].push,j=i(/./.exec),x=i(E),S=i("".slice),P=!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]}));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=d(s(this)),a=void 0===r?w: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=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,b=new RegExp(t.source,y+"g");(c=o(g,b,i))&&!((l=b.lastIndex)>v&&(x(p,S(i,v,c.index)),c.length>1&&c.index<i.length&&n(E,p,h(c,1)),f=c[0].length,v=l,p.length>=a));)b.lastIndex===c.index&&b.lastIndex++;return v===i.length?!f&&j(b,"")||x(p,""):x(p,S(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:y(e,t);return a?o(a,e,n,r):o(i,d(n),e,r)},function(t,n){var o=c(this),a=d(t),u=r(i,o,a,n,i!==e);if(u.done)return u.value;var s=l(o,RegExp),y=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),g=new s(O?"^(?:"+o.source+")":o,h),b=void 0===n?w:n>>>0;if(0===b)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var m=0,E=0,j=[];E<a.length;){g.lastIndex=O?0:E;var P,k=v(g,O?S(a,E):a);if(null===k||(P=_(p(g.lastIndex+(O?E:0)),a.length))===m)E=f(a,E,y);else{if(x(j,S(a,m,E)),j.length===b)return j;for(var A=1;A<=k.length-1;A++)if(x(j,k[A]),j.length===b)return j;E=m=P}}return x(j,S(a,m)),j}]}),!P,O)},function(t,e,r){"use strict";var n=r(36),o=r(7),i=r(15),a=r(95),u=r(44),c=r(34),s=r(143),l=r(58),f=r(88),p=r(130),d=r(18),y=r(72).f,h=r(51).f,v=r(37).f,g=r(196),b=r(159).trim,m="Number",O=o.Number,w=O.prototype,_=o.TypeError,E=i("".slice),j=i("".charCodeAt),x=function(t){var e=p(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,r,n,o,i,a,u,c,s=p(t,"number");if(f(s))throw _("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(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=E(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(m,!O(" 0o1")||!O("0b1")||O("+0x1"))){for(var P,k=function(t){var e=arguments.length<1?0:O(x(t)),r=this;return l(w,r)&&d((function(){g(r)}))?s(Object(e),r,k):e},A=n?y(O):"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(","),D=0;A.length>D;D++)c(O,P=A[D])&&!c(k,P)&&v(k,P,h(O,P));k.prototype=w,w.constructor=k,u(o,m,k)}},function(t,e,r){r(16)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(7),o=r(15),i=r(18),a=r(50),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(27),o=r(54),i=r(37),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(64),o=r(107);(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,r){var n=r(15),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=r(7),o=r(33),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(130),o=r(88);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(7),o=r(46),i=r(28),a=r(58),u=r(128),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(7).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(68),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(84),o=r(85),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,r){var n=r(15),o=r(28),i=r(107),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={}.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(36),o=r(34),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(18),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(7),o=r(34),i=r(28),a=r(38),u=r(91),c=r(137),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(15),o=r(32),i=r(172);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(7),o=r(116),i=r(28),a=r(50),u=r(27)("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(50);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(15),o=r(18),i=r(28),a=r(98),u=r(46),c=r(92),s=function(){},l=[],f=u("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=n(p.exec),y=!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 y||!!d(p,c(t))}:h},function(t,e,r){var n=r(15);t.exports=n([].slice)},function(t,e,r){"use strict";var n,o,i=r(35),a=r(15),u=r(40),c=r(184),s=r(151),l=r(84),f=r(54),p=r(56).get,d=r(185),y=r(186),h=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,b=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),E=s.BROKEN_CARET,j=void 0!==/()??/.exec("")[1];(_||j||E||d||y)&&(g=function(t){var e,r,n,o,a,s,l,d=this,y=p(d),x=u(t),S=y.raw;if(S)return S.lastIndex=d.lastIndex,e=i(g,S,x),d.lastIndex=S.lastIndex,e;var P=y.groups,k=E&&d.sticky,A=i(c,d),D=d.source,T=0,M=x;if(k&&(A=O(A,"y",""),-1===m(A,"g")&&(A+="g"),M=w(x,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==b(x,d.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,T++),r=new RegExp("^(?:"+D+")",A)),j&&(r=new RegExp("^"+D+"$(?!\\s)",A)),_&&(n=d.lastIndex),o=i(v,k?r:d,M),k?o?(o.input=w(o.input,T),o[0]=w(o[0],T),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:_&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),j&&o&&o.length>1&&i(h,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&P)for(o.groups=s=f(null),a=0;a<P.length;a++)s[(l=P[a])[0]]=o[l[1]];return o}),t.exports=g},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(67),a=r(68),u=r(43),c=r(38),s=r(119),l=r(61),f=r(75)("splice"),p=o.TypeError,d=Math.max,y=Math.min,h=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,o,f,g,b,m=c(this),O=u(m),w=i(t,O),_=arguments.length;if(0===_?r=n=0:1===_?(r=0,n=O-w):(r=_-2,n=y(d(a(e),0),O-w)),O+r-n>h)throw p(v);for(o=s(m,n),f=0;f<n;f++)(g=w+f)in m&&l(o,f,m[g]);if(o.length=n,r<n){for(f=w;f<O-n;f++)b=f+r,(g=f+n)in m?m[b]=m[g]:delete m[b];for(f=O;f>O-n+r;f--)delete m[f-1]}else if(r>n)for(f=O-n;f>w;f--)b=f+r-1,(g=f+n-1)in m?m[b]=m[g]:delete m[b];for(f=0;f<r;f++)m[f+w]=arguments[f+2];return m.length=O-n+r,o}})},function(t,e,r){"use strict";var n=r(16),o=r(201);n({target:"String",proto:!0,forced:r(202)("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(82))},function(t,e,r){"use strict";(function(t){var n=r(30),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(121)(t))},function(t,e,r){var n=r(7),o=r(108),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},function(t,e,r){var n=r(7),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(65),o=r(18);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(16),o=r(35),i=r(64),a=r(94),u=r(28),c=r(171),s=r(96),l=r(97),f=r(73),p=r(57),d=r(44),y=r(27),h=r(70),v=r(136),g=a.PROPER,b=a.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,w=y("iterator"),_="keys",E="values",j="entries",x=function(){return this};t.exports=function(t,e,r,a,y,v,S){c(r,e,a);var P,k,A,D=function(t){if(t===y&&R)return R;if(!O&&t in N)return N[t];switch(t){case _:case E:case j:return function(){return new r(this,t)}}return function(){return new r(this)}},T=e+" Iterator",M=!1,N=t.prototype,C=N[w]||N["@@iterator"]||y&&N[y],R=!O&&C||D(y),I="Array"==e&&N.entries||C;if(I&&(P=s(I.call(new t)))!==Object.prototype&&P.next&&(i||s(P)===m||(l?l(P,m):u(P[w])||d(P,w,x)),f(P,T,!0,!0),i&&(h[T]=x)),g&&y==E&&C&&C.name!==E&&(!i&&b?p(N,"name",E):(M=!0,R=function(){return o(C,this)})),y)if(k={values:D(E),keys:v?R:D(_),entries:D(j)},S)for(A in k)(O||M||!(A in N))&&d(N,A,k[A]);else n({target:e,proto:!0,forced:O||M},k);return i&&!S||N[w]===R||d(N,w,R,{name:y}),h[e]=R,k}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(7),o=r(67),i=r(43),a=r(61),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(7),o=r(62),i=r(35),a=r(32),u=r(89),c=r(140),s=r(43),l=r(58),f=r(141),p=r(115),d=r(142),y=n.TypeError,h=function(t,e){this.stopped=t,this.result=e},v=h.prototype;t.exports=function(t,e,r){var n,g,b,m,O,w,_,E=r&&r.that,j=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),P=o(e,E),k=function(t){return n&&d(n,"normal",t),new h(!0,t)},A=function(t){return j?(a(t),S?P(t[0],t[1],k):P(t[0],t[1])):S?P(t,k):P(t)};if(x)n=t;else{if(!(g=p(t)))throw y(u(t)+" is not iterable");if(c(g)){for(b=0,m=s(t);m>b;b++)if((O=A(t[b]))&&l(v,O))return O;return new h(!1)}n=f(t,g)}for(w=n.next;!(_=i(w,n)).done;){try{O=A(_.value)}catch(t){d(n,"throw",t)}if("object"==typeof O&&O&&l(v,O))return O}return new h(!1)}},function(t,e,r){var n=r(98),o=r(59),i=r(70),a=r(27)("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(27)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(7),o=r(58),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(27)("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(180);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(18);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(19);var n=r(15),o=r(44),i=r(102),a=r(18),u=r(27),c=r(57),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,r,f){var p=u(t),d=!a((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),y=d&&!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(!d||!y||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?d&&!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(146).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(7),o=r(35),i=r(32),a=r(28),u=r(50),c=r(102),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){"use strict";var n=r(76),o=r(35),i=r(15),a=r(122),u=r(18),c=r(32),s=r(28),l=r(68),f=r(90),p=r(40),d=r(45),y=r(123),h=r(59),v=r(197),g=r(124),b=r(27)("replace"),m=Math.max,O=Math.min,w=i([].concat),_=i([].push),E=i("".indexOf),j=i("".slice),x="$0"==="a".replace(/./,"$0"),S=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,r){var i=S?"$":"$0";return[function(t,r){var n=d(this),i=null==t?void 0:h(t,b);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===E(o,i)&&-1===E(o,"$<")){var d=r(e,a,u,o);if(d.done)return d.value}var h=s(o);h||(o=p(o));var b=a.global;if(b){var x=a.unicode;a.lastIndex=0}for(var S=[];;){var P=g(a,u);if(null===P)break;if(_(S,P),!b)break;""===p(P[0])&&(a.lastIndex=y(u,f(a.lastIndex),x))}for(var k,A="",D=0,T=0;T<S.length;T++){for(var M=p((P=S[T])[0]),N=m(O(l(P.index),u.length),0),C=[],R=1;R<P.length;R++)_(C,void 0===(k=P[R])?k:String(k));var I=P.groups;if(h){var L=w([M],C,N,u);void 0!==I&&_(L,I);var z=p(n(o,void 0,L))}else z=v(M,u,N,C,I,o);N>=D&&(A+=j(u,D,N)+z,D=N+M.length)}return A+j(u,D)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!x||S)},function(t,e,r){var n=r(50),o=r(7);t.exports="process"==n(o.process)},function(t,e,r){r(16)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(109);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(36),o=r(18),i=r(86);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(7),o=r(35),i=r(33),a=r(88),u=r(59),c=r(169),s=r(27),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(15),o=r(34),i=r(39),a=r(132).indexOf,u=r(69),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(67),i=r(43),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(46);t.exports=n("document","documentElement")},function(t,e,r){var n=r(34),o=r(135),i=r(51),a=r(37);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(46),o=r(15),i=r(72),a=r(112),u=r(32),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(18),u=r(28),c=r(54),s=r(96),l=r(44),f=r(27),p=r(64),d=f("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):y=!0),null==n||a((function(){var t={};return n[d].call(t)!==t}))?n={}:p&&(n=c(n)),u(n[d])||l(n,d,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},function(t,e,r){var n=r(18);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(16),o=r(15),i=r(69),a=r(33),u=r(34),c=r(37).f,s=r(72),l=r(139),f=r(174),p=r(85),d=r(176),y=!1,h=p("meta"),v=0,g=function(t){c(t,h,{value:{objectID:"O"+v++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},y=!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";g(t)}return t[h].objectID},getWeakData:function(t,e){if(!u(t,h)){if(!f(t))return!0;if(!e)return!1;g(t)}return t[h].weakData},onFreeze:function(t){return d&&y&&f(t)&&!u(t,h)&&g(t),t}};i[h]=!0},function(t,e,r){var n=r(50),o=r(39),i=r(72).f,a=r(113),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(27),o=r(70),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(7),o=r(35),i=r(55),a=r(32),u=r(89),c=r(115),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(35),o=r(32),i=r(59);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(28),o=r(33),i=r(97);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(44);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(46),o=r(37),i=r(27),a=r(36),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){var n=r(15),o=r(68),i=r(40),a=r(45),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),d=f.length;return p<0||p>=d?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===d||(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(86)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,r){var n=r(27);e.f=n},function(t,e,r){var n=r(181),o=r(34),i=r(149),a=r(37).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(18),o=r(7).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(16),o=r(132).includes,i=r(83);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(16),o=r(15),i=r(193),a=r(45),u=r(40),c=r(194),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(33),o=r(50),i=r(27)("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&&d())}function d(){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 y(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 y(t,e)),1!==s.length||l||u(d)},y.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(32),o=r(157),i=r(27)("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(7),o=r(100),i=r(89),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},function(t,e,r){"use strict";var n=r(16),o=r(159).trim;n({target:"String",proto:!0,forced:r(195)("trim")},{trim:function(){return o(this)}})},function(t,e,r){var n=r(15),o=r(45),i=r(40),a=r(160),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(35),o=r(122),i=r(32),a=r(90),u=r(40),c=r(45),s=r(59),l=r(123),f=r(124);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,d=[],y=0;null!==(p=f(n,o));){var h=u(p[0]);d[y]=h,""===h&&(n.lastIndex=l(o,a(n.lastIndex),s)),y++}return 0===y?null:d}]}))},function(t,e,r){var n,o,i,a,u=r(7),c=r(76),s=r(62),l=r(28),f=r(34),p=r(18),d=r(133),y=r(101),h=r(86),v=r(163),g=r(126),b=u.setImmediate,m=u.clearImmediate,O=u.process,w=u.Dispatch,_=u.Function,E=u.MessageChannel,j=u.String,x=0,S={},P="onreadystatechange";try{n=u.location}catch(t){}var k=function(t){if(f(S,t)){var e=S[t];delete S[t],e()}},A=function(t){return function(){k(t)}},D=function(t){k(t.data)},T=function(t){u.postMessage(j(t),n.protocol+"//"+n.host)};b&&m||(b=function(t){var e=y(arguments,1);return S[++x]=function(){c(l(t)?t:_(t),void 0,e)},o(x),x},m=function(t){delete S[t]},g?o=function(t){O.nextTick(A(t))}:w&&w.now?o=function(t){w.now(A(t))}:E&&!v?(a=(i=new E).port2,i.port1.onmessage=D,o=s(a.postMessage,a)):u.addEventListener&&l(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!p(T)?(o=T,u.addEventListener("message",D,!1)):o=P in h("script")?function(t){d.appendChild(h("script")).onreadystatechange=function(){d.removeChild(this),k(t)}}:function(t){setTimeout(A(t),0)}),t.exports={set:b,clear:m}},function(t,e,r){var n=r(53);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},function(t,e,r){"use strict";var n=r(55),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return m}));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("__")}))},c="pending",s="fulfilled",l="rejected";function f(t){switch(this.state){case c:return t.pending&&t.pending(this.value);case l:return t.rejected&&t.rejected(this.value);case s:return t.fulfilled?t.fulfilled(this.value):this.value}}function p(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=s})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state=l}))),r.isPromiseBasedObservable=!0,r.case=f;var o=e&&e.state===s?e.value:void 0;return Object(n.q)(r,{value:o,state:c},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state=l,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=s,r.value=e,r}))}(p||(p={}));var d=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()},d([n.C.ref],t.prototype,"current",void 0),d([n.k.bound],t.prototype,"next",null),d([n.k.bound],t.prototype,"complete",null),d([n.k.bound],t.prototype,"error",null)}();var y=function(){return y=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},y.apply(this,arguments)},h=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},v=["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===v.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,y(y({},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)},h([n.m],t.prototype,"isDirty",null),h([n.m],t.prototype,"changedValues",null),h([n.k.bound],t.prototype,"submit",null),h([n.k.bound],t.prototype,"reset",null),h([n.k.bound],t.prototype,"resetProperty",null)}();function g(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function b(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function m(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(b(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,g(o),t)}function i(t,e,a){if(b(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 '"+g(e)+"/"+a+"', but it already exists at '"+g(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(b(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 O,w=(O=function(t,e){return O=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])},O(t,e)},function(t,e){function r(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),_=(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}w(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 _(this.store,t)}}();new Set,new Set;var E,j=Promise.resolve();E="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var x=function(){return new Promise((function(t){E(t)}))}}).call(this,r(155))},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();m.prototype.bind=function(t,e,r){var n=this;return t=t instanceof Array?t:[t],n._bindMultiple.call(n,t,e,r),n},m.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},m.prototype.trigger=function(t,e){var r=this;return r._directMap[t+":"+e]&&r._directMap[t+":"+e]({},t),r},m.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},m.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(b(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},m.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},m.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},m.init=function(){var t=m(i);for(var e in t)"_"!==e.charAt(0)&&(m[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},m.init(),o.Mousetrap=m,t.exports&&(t.exports=m),void 0===(n=function(){return m}.call(e,r,e,t))||(t.exports=n)}function d(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function y(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 g(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 b(t,e){return null!==t&&t!==i&&(t===e||b(t.parentNode,e))}function m(t){var e=this;if(t=t||i,!(e instanceof m))return new m(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=[],d=o.type;if(!e._callbacks[t])return[];for("keyup"==d&&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)&&d==s.action&&("keypress"==d&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var y=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(y||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=y(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=y(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var d=p+1===e.length?f:s(a||g(e[p+1]).action);v(e[p],d,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=g(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 d="keypress"==r.type&&a;r.type!=u||h(t)||d||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)},d(t,"keypress",f),d(t,"keydown",f),d(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){var n=r(36),o=r(37),i=r(32),a=r(39),u=r(66);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(7),o=r(35),i=r(28),a=r(33),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(7),o=r(28),i=r(92),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,r){"use strict";var n=r(136).IteratorPrototype,o=r(54),i=r(71),a=r(73),u=r(70),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(7),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(16),o=r(7),i=r(15),a=r(95),u=r(44),c=r(138),s=r(114),l=r(117),f=r(28),p=r(33),d=r(18),y=r(118),h=r(73),v=r(143);t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),m=g?"set":"add",O=o[t],w=O&&O.prototype,_=O,E={},j=function(t){var e=i(w[t]);u(w,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!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)||!(b||w.forEach&&!d((function(){(new O).entries().next()})))))_=r.getConstructor(e,t,g,m),c.enable();else if(a(t,!0)){var x=new _,S=x[m](b?{}:-0,1)!=x,P=d((function(){x.has(1)})),k=y((function(t){new O(t)})),A=!b&&d((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:g}),r}))).prototype=w,w.constructor=_),(P||A)&&(j("delete"),j("has"),g&&j("get")),(A||S)&&j(m),b&&w.clear&&delete w.clear}return E[t]=_,n({global:!0,forced:_!=O},E),h(_,t),b||r.setStrong(_,t,g),_}},function(t,e,r){var n=r(18),o=r(33),i=r(50),a=r(175),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(18);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(18);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(37).f,o=r(54),i=r(144),a=r(62),u=r(117),c=r(114),s=r(111),l=r(145),f=r(36),p=r(138).fastKey,d=r(56),y=d.set,h=d.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){u(t,d),y(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})})),d=l.prototype,v=h(e),g=function(t,e,r){var n,o,i=v(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=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(d,{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=this,r=v(e),n=b(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),f?r.size--:e.size--}return!!n},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!!b(this,t)}}),i(d,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),f&&n(d,"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){y(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){"use strict";var n=r(116),o=r(98);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(74).forEach,o=r(120)("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(7),o=r(99),i=r(100),a=r(33),u=r(27)("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(7);t.exports=n},function(t,e,r){"use strict";var n=r(7),o=r(62),i=r(35),a=r(38),u=r(183),c=r(140),s=r(100),l=r(43),f=r(61),p=r(141),d=r(115),y=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 g,b,m,O,w,_,E=d(e),j=0;if(!E||this==y&&c(E))for(g=l(e),b=r?new this(g):y(g);g>j;j++)_=v?h(e[j],j):e[j],f(b,j,_);else for(w=(O=p(e,E)).next,b=r?new this:[];!(m=i(w,O)).done;j++)_=v?u(O,h,[m.value,j],!0):m.value,f(b,j,_);return b.length=j,b}},function(t,e,r){var n=r(32),o=r(142);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(32);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(18),o=r(7).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(18),o=r(7).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(16),o=r(15),i=r(55),a=r(38),u=r(43),c=r(40),s=r(18),l=r(188),f=r(120),p=r(189),d=r(190),y=r(65),h=r(191),v=[],g=o(v.sort),b=o(v.push),m=s((function(){v.sort(void 0)})),O=s((function(){v.sort(null)})),w=f("sort"),_=!s((function(){if(y)return y<70;if(!(p&&p>3)){if(d)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?g(e):g(e,t);var r,n,o=[],s=u(e);for(n=0;n<s;n++)n in e&&b(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(113),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(53).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(53);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(53).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){"use strict";var n=r(16),o=r(74).find,i=r(83),a="find",u=!0;a in[]&&Array(1).find((function(){u=!1})),n({target:"Array",proto:!0,forced:u},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},function(t,e,r){var n=r(7),o=r(154),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(27)("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(94).PROPER,o=r(18),i=r(160);t.exports=function(t){return o((function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||n&&i[t].name!==t}))}},function(t,e,r){var n=r(15);t.exports=n(1..valueOf)},function(t,e,r){var n=r(15),o=r(38),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 d=r+t.length,y=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,d);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>y){var p=i(l/10);return 0===p?o:p<=y?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(7),o=r(15),i=r(55),a=r(33),u=r(34),c=r(101),s=n.Function,l=o([].concat),f=o([].join),p={},d=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?d(e,r.length,r):e.apply(t,r)};return a(r)&&(o.prototype=r),o}},function(t,e,r){var n=r(34);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){"use strict";var n=r(36),o=r(15),i=r(35),a=r(18),u=r(66),c=r(112),s=r(93),l=r(38),f=r(81),p=Object.assign,d=Object.defineProperty,y=o([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||u(p({},e)).join("")!=o}))?function(t,e){for(var r=l(t),o=arguments.length,a=1,p=c.f,d=s.f;o>a;)for(var h,v=f(arguments[a++]),g=p?y(u(v),p(v)):u(v),b=g.length,m=0;b>m;)h=g[m++],n&&!i(d,v,h)||(r[h]=v[h]);return r}:p},function(t,e,r){var n=r(15),o=r(45),i=r(40),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,"&quot;")+'"'),s+">"+c+"</"+e+">"}},function(t,e,r){var n=r(18);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(16),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){"use strict";var n,o,i,a,u=r(16),c=r(64),s=r(7),l=r(46),f=r(35),p=r(205),d=r(44),y=r(144),h=r(97),v=r(73),g=r(145),b=r(55),m=r(28),O=r(33),w=r(117),_=r(92),E=r(114),j=r(118),x=r(156),S=r(162).set,P=r(206),k=r(209),A=r(210),D=r(164),T=r(211),M=r(56),N=r(95),C=r(27),R=r(212),I=r(126),L=r(65),z=C("species"),B="Promise",H=M.getterFor(B),X=M.set,U=M.getterFor(B),F=p&&p.prototype,G=p,Y=F,V=s.TypeError,W=s.document,K=s.process,$=D.f,Z=$,q=!!(W&&W.createEvent&&s.dispatchEvent),J=m(s.PromiseRejectionEvent),Q="unhandledrejection",tt=!1,et=N(B,(function(){var t=_(G),e=t!==String(G);if(!e&&66===L)return!0;if(c&&!Y.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var r=new G((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[z]=n,!(tt=r.then((function(){}))instanceof n)||!e&&R&&!J})),rt=et||!j((function(t){G.all(t).catch((function(){}))})),nt=function(t){var e;return!(!O(t)||!m(e=t.then))&&e},ot=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;P((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var a,u,c,s=r[i++],l=o?s.ok:s.fail,p=s.resolve,d=s.reject,y=s.domain;try{l?(o||(2===t.rejection&&ct(t),t.rejection=1),!0===l?a=n:(y&&y.enter(),a=l(n),y&&(y.exit(),c=!0)),a===s.promise?d(V("Promise-chain cycle")):(u=nt(a))?f(u,a,p,d):p(a)):d(n)}catch(t){y&&!c&&y.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&at(t)}))}},it=function(t,e,r){var n,o;q?((n=W.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),s.dispatchEvent(n)):n={promise:e,reason:r},!J&&(o=s["on"+t])?o(n):t===Q&&A("Unhandled promise rejection",r)},at=function(t){f(S,s,(function(){var e,r=t.facade,n=t.value;if(ut(t)&&(e=T((function(){I?K.emit("unhandledRejection",n,r):it(Q,r,n)})),t.rejection=I||ut(t)?2:1,e.error))throw e.value}))},ut=function(t){return 1!==t.rejection&&!t.parent},ct=function(t){f(S,s,(function(){var e=t.facade;I?K.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},st=function(t,e,r){return function(n){t(e,n,r)}},lt=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,ot(t,!0))},ft=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw V("Promise can't be resolved itself");var n=nt(e);n?P((function(){var r={done:!1};try{f(n,e,st(ft,r,t),st(lt,r,t))}catch(e){lt(r,e,t)}})):(t.value=e,t.state=1,ot(t,!1))}catch(e){lt({done:!1},e,t)}}};if(et&&(Y=(G=function(t){w(this,Y),b(t),f(n,this);var e=H(this);try{t(st(ft,e),st(lt,e))}catch(t){lt(e,t)}}).prototype,(n=function(t){X(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=y(Y,{then:function(t,e){var r=U(this),n=r.reactions,o=$(x(this,G));return o.ok=!m(t)||t,o.fail=m(e)&&e,o.domain=I?K.domain:void 0,r.parent=!0,n[n.length]=o,0!=r.state&&ot(r,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=H(t);this.promise=t,this.resolve=st(ft,e),this.reject=st(lt,e)},D.f=$=function(t){return t===G||t===i?new o(t):Z(t)},!c&&m(p)&&F!==Object.prototype)){a=F.then,tt||(d(F,"then",(function(t,e){var r=this;return new G((function(t,e){f(a,r,t,e)})).then(t,e)}),{unsafe:!0}),d(F,"catch",Y.catch,{unsafe:!0}));try{delete F.constructor}catch(t){}h&&h(F,Y)}u({global:!0,wrap:!0,forced:et},{Promise:G}),v(G,B,!1,!0),g(B),i=l(B),u({target:B,stat:!0,forced:et},{reject:function(t){var e=$(this);return f(e.reject,void 0,t),e.promise}}),u({target:B,stat:!0,forced:c||et},{resolve:function(t){return k(c&&this===i?G:this,t)}}),u({target:B,stat:!0,forced:rt},{all:function(t){var e=this,r=$(e),n=r.resolve,o=r.reject,i=T((function(){var r=b(e.resolve),i=[],a=0,u=1;E(t,(function(t){var c=a++,s=!1;u++,f(r,e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=$(e),n=r.reject,o=T((function(){var o=b(e.resolve);E(t,(function(t){f(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},function(t,e,r){var n=r(7);t.exports=n.Promise},function(t,e,r){var n,o,i,a,u,c,s,l,f=r(7),p=r(62),d=r(51).f,y=r(162).set,h=r(163),v=r(207),g=r(208),b=r(126),m=f.MutationObserver||f.WebKitMutationObserver,O=f.document,w=f.process,_=f.Promise,E=d(f,"queueMicrotask"),j=E&&E.value;j||(n=function(){var t,e;for(b&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},h||b||g||!m||!O?!v&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,l=p(s.then,s),a=function(){l(n)}):b?a=function(){w.nextTick(n)}:(y=p(y,f),a=function(){y(n)}):(u=!0,c=O.createTextNode(""),new m(n).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=j||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,r){var n=r(53),o=r(7);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},function(t,e,r){var n=r(53);t.exports=/web0s(?!.*chrome)/i.test(n)},function(t,e,r){var n=r(32),o=r(33),i=r(164);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){var n=r(7);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e){t.exports="object"==typeof window},function(t,e,r){var n=r(36),o=r(15),i=r(66),a=r(39),u=o(r(93).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(38),o=r(67),i=r(43);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";r.r(e),r.d(e,"observer",(function(){return Jm})),r.d(e,"LogicFlow",(function(){return qm})),r.d(e,"h",(function(){return tt.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return Dh})),r.d(e,"RectNode",(function(){return Bh})),r.d(e,"CircleNode",(function(){return Kh})),r.d(e,"PolygonNode",(function(){return uv})),r.d(e,"DiamondNode",(function(){return vv})),r.d(e,"EllipseNode",(function(){return Av})),r.d(e,"TextNode",(function(){return Hv})),r.d(e,"HtmlNode",(function(){return qv})),r.d(e,"BaseEdge",(function(){return Lg})),r.d(e,"LineEdge",(function(){return Zg})),r.d(e,"PolylineEdge",(function(){return yb})),r.d(e,"BezierEdge",(function(){return xb})),r.d(e,"Arrow",(function(){return Rb})),r.d(e,"BaseEdgeModel",(function(){return ru})),r.d(e,"BezierEdgeModel",(function(){return Lf})),r.d(e,"LineEdgeModel",(function(){return mu})),r.d(e,"PolylineEdgeModel",(function(){return Lu})),r.d(e,"BaseNodeModel",(function(){return hp})),r.d(e,"CircleNodeModel",(function(){return Cp})),r.d(e,"DiamondNodeModel",(function(){return ed})),r.d(e,"EllipseNodeModel",(function(){return md})),r.d(e,"PolygonNodeModel",(function(){return Bd})),r.d(e,"RectNodeModel",(function(){return ey})),r.d(e,"TextNodeModel",(function(){return vy})),r.d(e,"HtmlNodeModel",(function(){return Dy})),r.d(e,"EditConfigModel",(function(){return bo})),r.d(e,"GraphModel",(function(){return rs})),r.d(e,"SnaplineModel",(function(){return Iy})),r.d(e,"Keyboard",(function(){return Xm})),r.d(e,"get",(function(){return vf})),r.d(e,"defaults",(function(){return mf}));var n={};r.r(n),r.d(n,"createUuid",(function(){return Qi})),r.d(n,"refreshGraphId",(function(){return ta})),r.d(n,"createDrag",(function(){return kc})),r.d(n,"StepDrag",(function(){return Uc}));var o=r(0),i=r(10);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(42),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,d=1e4,y=new Set;function h(){void 0===p&&(p=setTimeout(v,1e4))}function v(){p=void 0;var t=Date.now();y.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,y.delete(e))})),y.size>0&&h()}var g=!1,b=[];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(){g?b.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()+d,reaction:t}}(s);c.current=p,n=c,y.add(n),h()}var v=c.current.reaction;return i.d.useDebugValue(v,f),i.d.useEffect((function(){var t;return t=c,y.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){g=!0,b=[];try{var e=t();g=!1;var r=b.length>0?b:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{g=!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 E(t,e){if(l())return t;var r,n,o,a=_({forwardRef:!1},e),u=t.displayName||t.name,c=function(e,r){return w((function(){return t(e,r)}),u)};return c.displayName=u,r=a.forwardRef?Object(i.f)(Object(i.e)(c)):Object(i.f)(c),n=t,o=r,Object.keys(n).forEach((function(t){j[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=u,r}var j={$$typeof:!0,render:!0,compare:!0,type:!0};function x(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`.")}x.propTypes={children:S,render:S},x.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=B(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,a)}}function B(t,e,r,n,o){var i,a=L(o,n);return(i={})[R]=!0,i.get=function(){return a},i.set=function(o){if(this===t)a=L(o,n);else{var i=B(this,e,r,n,o);Object.defineProperty(this,e,i)}},i.configurable=!0,i.enumerable=r,i}var H=o.a||"$mobx",X=D("isMobXReactObserver"),U=D("isUnmounted"),F=D("skipRender"),G=D("isForcingUpdate");function Y(t){var e=t.prototype;if(t[X])V(e);else t[X]=!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!==K)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=K;$(e,"props"),$(e,"state");var r=e.render;return e.render=function(){return W.call(this,r)},z(e,"componentWillUnmount",(function(){var t;if(!0!==l()&&(null===(t=this.render[H])||void 0===t||t.dispose(),this[U]=!0,!this.render[H]))V(this)})),t}function V(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function W(t){var e=this;if(!0===l())return t.call(this);N(this,F,!1),N(this,G,!1);var r=V(this),n=t.bind(this),a=!1,u=new o.c(r+".render()",(function(){if(!a&&(a=!0,!0!==e[U])){var t=!0;try{N(e,G,!0),e[F]||i.a.prototype.forceUpdate.call(e),t=!1}finally{N(e,G,!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[H]=u,this.render=c,c.call(this)}function K(t,e){return l(),this.state!==e||!T(this.props,t)}function $(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[G]||T(this[r],t)?N(this,r,t):(N(this,r,t),N(this,F,!0),i.call(this).reportChanged(),N(this,F,!1))}})}var Z="function"==typeof Symbol&&Symbol.for,q=Z?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,J=Z?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function Q(t){if(t.isMobxInjector,J&&t.$$typeof===J)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(q&&t.$$typeof===q){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(i.e)((function(){var t=arguments;return Object(i.c)(x,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.a,t)?Y(t):E(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 tt=r(1);r(3),r(60),r(2),r(6),r(4),r(11),r(41),r(24),r(20),r(5),r(22),r(21),r(23),r(8),r(9),r(17),r(25),r(19),r(29),r(187),r(192),r(103),r(152),r(153);var et=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 rt=function(){this.__data__=[],this.size=0};var nt=function(t,e){return t===e||t!=t&&e!=e};var ot=function(t,e){for(var r=t.length;r--;)if(nt(t[r][0],e))return r;return-1},it=Array.prototype.splice;var at=function(t){var e=this.__data__,r=ot(e,t);return!(r<0)&&(r==e.length-1?e.pop():it.call(e,r,1),--this.size,!0)};var ut=function(t){var e=this.__data__,r=ot(e,t);return r<0?void 0:e[r][1]};var ct=function(t){return ot(this.__data__,t)>-1};var st=function(t,e){var r=this.__data__,n=ot(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function lt(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])}}lt.prototype.clear=rt,lt.prototype.delete=at,lt.prototype.get=ut,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=new ft,this.size=0};var dt=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 ht=function(t){return this.__data__.has(t)},vt=r(30),gt=vt.a.Symbol,bt=Object.prototype,mt=bt.hasOwnProperty,Ot=bt.toString,wt=gt?gt.toStringTag:void 0;var _t=function(t){var e=mt.call(t,wt),r=t[wt];try{t[wt]=void 0;var n=!0}catch(t){}var o=Ot.call(t);return n&&(e?t[wt]=r:delete t[wt]),o},Et=Object.prototype.toString;var jt=function(t){return Et.call(t)},xt=gt?gt.toStringTag:void 0;var St=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":xt&&xt in Object(t)?_t(t):jt(t)};var Pt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var kt,At=function(t){if(!Pt(t))return!1;var e=St(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Dt=vt.a["__core-js_shared__"],Tt=(kt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+kt:"";var Mt=function(t){return!!Tt&&Tt in t},Nt=Function.prototype.toString;var Ct=function(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Rt=/^\[object .+?Constructor\]$/,It=Function.prototype,Lt=Object.prototype,zt=It.toString,Bt=Lt.hasOwnProperty,Ht=RegExp("^"+zt.call(Bt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xt=function(t){return!(!Pt(t)||Mt(t))&&(At(t)?Ht:Rt).test(Ct(t))};var Ut=function(t,e){return null==t?void 0:t[e]};var Ft=function(t,e){var r=Ut(t,e);return Xt(r)?r:void 0},Gt=Ft(vt.a,"Map"),Yt=Ft(Object,"create");var Vt=function(){this.__data__=Yt?Yt(null):{},this.size=0};var Wt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kt=Object.prototype.hasOwnProperty;var $t=function(t){var e=this.__data__;if(Yt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Kt.call(e,t)?e[t]:void 0},Zt=Object.prototype.hasOwnProperty;var qt=function(t){var e=this.__data__;return Yt?void 0!==e[t]:Zt.call(e,t)};var Jt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Yt&&void 0===e?"__lodash_hash_undefined__":e,this};function Qt(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])}}Qt.prototype.clear=Vt,Qt.prototype.delete=Wt,Qt.prototype.get=$t,Qt.prototype.has=qt,Qt.prototype.set=Jt;var te=Qt;var ee=function(){this.size=0,this.__data__={hash:new te,map:new(Gt||ft),string:new te}};var re=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ne=function(t,e){var r=t.__data__;return re(e)?r["string"==typeof e?"string":"hash"]:r.map};var oe=function(t){var e=ne(this,t).delete(t);return this.size-=e?1:0,e};var ie=function(t){return ne(this,t).get(t)};var ae=function(t){return ne(this,t).has(t)};var ue=function(t,e){var r=ne(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ce(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])}}ce.prototype.clear=ee,ce.prototype.delete=oe,ce.prototype.get=ie,ce.prototype.has=ae,ce.prototype.set=ue;var se=ce;var le=function(t,e){var r=this.__data__;if(r instanceof ft){var n=r.__data__;if(!Gt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new se(n)}return r.set(t,e),this.size=r.size,this};function fe(t){var e=this.__data__=new ft(t);this.size=e.size}fe.prototype.clear=pt,fe.prototype.delete=dt,fe.prototype.get=yt,fe.prototype.has=ht,fe.prototype.set=le;var pe=fe;var de=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var ye=function(t){return this.__data__.has(t)};function he(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new se;++e<r;)this.add(t[e])}he.prototype.add=he.prototype.push=de,he.prototype.has=ye;var ve=he;var ge=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 me=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,d=2&r?new ve:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var y=t[f],h=e[f];if(n)var v=a?n(h,y,f,e,t,i):n(y,h,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!ge(e,(function(t,e){if(!be(d,e)&&(y===t||o(y,t,r,n,i)))return d.push(e)}))){p=!1;break}}else if(y!==h&&!o(y,h,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Oe=vt.a.Uint8Array;var we=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var _e=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Ee=gt?gt.prototype:void 0,je=Ee?Ee.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 Oe(t),new Oe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nt(+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=we;case"[object Set]":var c=1&n;if(u||(u=_e),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=me(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 Se=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Pe=Array.isArray;var ke=function(t,e,r){var n=e(t);return Pe(t)?n:Se(n,r(t))};var Ae=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 De=function(){return[]},Te=Object.prototype.propertyIsEnumerable,Me=Object.getOwnPropertySymbols,Ne=Me?function(t){return null==t?[]:(t=Object(t),Ae(Me(t),(function(e){return Te.call(t,e)})))}:De;var Ce=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Re=function(t){return null!=t&&"object"==typeof t};var Ie=function(t){return Re(t)&&"[object Arguments]"==St(t)},Le=Object.prototype,ze=Le.hasOwnProperty,Be=Le.propertyIsEnumerable,He=Ie(function(){return arguments}())?Ie:function(t){return Re(t)&&ze.call(t,"callee")&&!Be.call(t,"callee")},Xe=He,Ue=r(48),Fe=/^(?:0|[1-9]\d*)$/;var Ge=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Fe.test(t))&&t>-1&&t%1==0&&t<e};var Ye=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ve={};Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var We=function(t){return Re(t)&&Ye(t.length)&&!!Ve[St(t)]};var Ke=function(t){return function(e){return t(e)}},$e=r(49),Ze=$e.a&&$e.a.isTypedArray,qe=Ze?Ke(Ze):We,Je=Object.prototype.hasOwnProperty;var Qe=function(t,e){var r=Pe(t),n=!r&&Xe(t),o=!r&&!n&&Object(Ue.a)(t),i=!r&&!n&&!o&&qe(t),a=r||n||o||i,u=a?Ce(t.length,String):[],c=u.length;for(var s in t)!e&&!Je.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ge(s,c))||u.push(s);return u},tr=Object.prototype;var er=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tr)};var rr=function(t,e){return function(r){return t(e(r))}},nr=rr(Object.keys,Object),or=Object.prototype.hasOwnProperty;var ir=function(t){if(!er(t))return nr(t);var e=[];for(var r in Object(t))or.call(t,r)&&"constructor"!=r&&e.push(r);return e};var ar=function(t){return null!=t&&Ye(t.length)&&!At(t)};var ur=function(t){return ar(t)?Qe(t):ir(t)};var cr=function(t){return ke(t,ur,Ne)},sr=Object.prototype.hasOwnProperty;var lr=function(t,e,r,n,o,i){var a=1&r,u=cr(t),c=u.length;if(c!=cr(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:sr.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var d=!0;i.set(t,e),i.set(e,t);for(var y=a;++s<c;){var h=t[l=u[s]],v=e[l];if(n)var g=a?n(v,h,l,e,t,i):n(h,v,l,t,e,i);if(!(void 0===g?h===v||o(h,v,r,n,i):g)){d=!1;break}y||(y="constructor"==l)}if(d&&!y){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(t),i.delete(e),d},fr=Ft(vt.a,"DataView"),pr=Ft(vt.a,"Promise"),dr=Ft(vt.a,"Set"),yr=Ft(vt.a,"WeakMap"),hr="[object Map]",vr="[object Promise]",gr="[object Set]",br="[object WeakMap]",mr="[object DataView]",Or=Ct(fr),wr=Ct(Gt),_r=Ct(pr),Er=Ct(dr),jr=Ct(yr),xr=St;(fr&&xr(new fr(new ArrayBuffer(1)))!=mr||Gt&&xr(new Gt)!=hr||pr&&xr(pr.resolve())!=vr||dr&&xr(new dr)!=gr||yr&&xr(new yr)!=br)&&(xr=function(t){var e=St(t),r="[object Object]"==e?t.constructor:void 0,n=r?Ct(r):"";if(n)switch(n){case Or:return mr;case wr:return hr;case _r:return vr;case Er:return gr;case jr:return br}return e});var Sr=xr,Pr="[object Arguments]",kr="[object Array]",Ar="[object Object]",Dr=Object.prototype.hasOwnProperty;var Tr=function(t,e,r,n,o,i){var a=Pe(t),u=Pe(e),c=a?kr:Sr(t),s=u?kr:Sr(e),l=(c=c==Pr?Ar:c)==Ar,f=(s=s==Pr?Ar:s)==Ar,p=c==s;if(p&&Object(Ue.a)(t)){if(!Object(Ue.a)(e))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new pe),a||qe(t)?me(t,e,r,n,o,i):xe(t,e,c,r,n,o,i);if(!(1&r)){var d=l&&Dr.call(t,"__wrapped__"),y=f&&Dr.call(e,"__wrapped__");if(d||y){var h=d?t.value():t,v=y?e.value():e;return i||(i=new pe),o(h,v,r,n,i)}}return!!p&&(i||(i=new pe),lr(t,e,r,n,o,i))};var Mr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Re(e)&&!Re(r)?e!=e&&r!=r:Tr(e,r,n,o,t,i))};var Nr=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 pe;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?Mr(l,s,3,n,f):p))return!1}}return!0};var Cr=function(t){return t==t&&!Pt(t)};var Rr=function(t){for(var e=ur(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Cr(o)]}return e};var Ir=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Lr=function(t){var e=Rr(t);return 1==e.length&&e[0][2]?Ir(e[0][0],e[0][1]):function(r){return r===t||Nr(r,t,e)}};var zr=function(t){return"symbol"==typeof t||Re(t)&&"[object Symbol]"==St(t)},Br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hr=/^\w*$/;var Xr=function(t,e){if(Pe(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!zr(t))||(Hr.test(t)||!Br.test(t)||null!=e&&t in Object(e))};function Ur(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(Ur.Cache||se),r}Ur.Cache=se;var Fr=Ur;var Gr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yr=/\\(\\)?/g,Vr=function(t){var e=Fr(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(Gr,(function(t,r,n,o){e.push(n?o.replace(Yr,"$1"):r||t)})),e})),Wr=gt?gt.prototype:void 0,Kr=Wr?Wr.toString:void 0;var $r=function t(e){if("string"==typeof e)return e;if(Pe(e))return et(e,t)+"";if(zr(e))return Kr?Kr.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Zr=function(t){return null==t?"":$r(t)};var qr=function(t,e){return Pe(t)?t:Xr(t,e)?[t]:Vr(Zr(t))};var Jr=function(t){if("string"==typeof t||zr(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Qr=function(t,e){for(var r=0,n=(e=qr(e,t)).length;null!=t&&r<n;)t=t[Jr(e[r++])];return r&&r==n?t:void 0};var tn=function(t,e,r){var n=null==t?void 0:Qr(t,e);return void 0===n?r:n};var en=function(t,e){return null!=t&&e in Object(t)};var rn=function(t,e,r){for(var n=-1,o=(e=qr(e,t)).length,i=!1;++n<o;){var a=Jr(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ye(o)&&Ge(a,o)&&(Pe(t)||Xe(t))};var nn=function(t,e){return null!=t&&rn(t,e,en)};var on=function(t,e){return Xr(t)&&Cr(e)?Ir(Jr(t),e):function(r){var n=tn(r,t);return void 0===n&&n===e?nn(r,t):Mr(e,n,3)}};var an=function(t){return t};var un=function(t){return function(e){return null==e?void 0:e[t]}};var cn=function(t){return function(e){return Qr(e,t)}};var sn=function(t){return Xr(t)?un(Jr(t)):cn(t)};var ln=function(t){return"function"==typeof t?t:null==t?an:"object"==typeof t?Pe(t)?on(t[0],t[1]):Lr(t):sn(t)};var fn=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 pn=function(t,e){return function(r,n){if(null==r)return r;if(!ar(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&&fn(t,e,ur)}));var dn=function(t,e){var r=-1,n=ar(t)?Array(t.length):[];return pn(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var yn=function(t,e){return(Pe(t)?et:dn)(t,ln(e,3))},hn=function(){try{var t=Ft(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var vn=function(t,e,r){"__proto__"==e&&hn?hn(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},gn=Object.prototype.hasOwnProperty;var bn=function(t,e,r){var n=t[e];gn.call(t,e)&&nt(n,r)&&(void 0!==r||e in t)||vn(t,e,r)};var mn=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?vn(r,u,c):bn(r,u,c)}return r};var On=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)},wn=Math.max;var _n=function(t,e,r){return e=wn(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=wn(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),On(t,this,u)}};var En=function(t){return function(){return t}},jn=hn?function(t,e){return hn(t,"toString",{configurable:!0,enumerable:!1,value:En(e),writable:!0})}:an,xn=Date.now;var Sn=function(t){var e=0,r=0;return function(){var n=xn(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Pn=Sn(jn);var kn=function(t,e){return Pn(_n(t,e,an),t+"")};var An=function(t,e,r){if(!Pt(r))return!1;var n=typeof e;return!!("number"==n?ar(r)&&Ge(e,r.length):"string"==n&&e in r)&&nt(r[e],t)};var Dn=function(t){return kn((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&&An(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}))},Tn=Object.prototype.hasOwnProperty,Mn=Dn((function(t,e){if(er(e)||ar(e))mn(e,ur(e),t);else for(var r in e)Tn.call(e,r)&&bn(t,r,e[r])}));var Nn=function(t,e,r,n){if(!Pt(t))return t;for(var o=-1,i=(e=qr(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=Jr(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=Pt(l)?l:Ge(e[o+1])?[]:{})}bn(u,c,s),u=u[c]}return t};var Cn=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],u=Qr(t,a);r(u,a)&&Nn(i,qr(a,t),u)}return i};var Rn=function(t,e){return Cn(t,e,(function(e,r){return nn(t,r)}))},In=gt?gt.isConcatSpreadable:void 0;var Ln=function(t){return Pe(t)||Xe(t)||!!(In&&t&&t[In])};var zn=function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=Ln),i||(i=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Se(i,c):o||(i[i.length]=c)}return i};var Bn=function(t){return(null==t?0:t.length)?zn(t,1):[]};var Hn,Xn,Un,Fn,Gn,Yn,Vn,Wn,Kn,$n,Zn,qn,Jn,Qn,to,eo,ro,no,oo=function(t){return Pn(_n(t,void 0,Bn),t+"")}((function(t,e){return null==t?{}:Rn(t,e)}));function io(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 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 uo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function co(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 so,lo,fo,po,yo,ho,vo={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},go=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],bo=(Xn=co((Hn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),io(this,"isSilentMode",Xn,this),io(this,"stopZoomGraph",Un,this),io(this,"stopScrollGraph",Fn,this),io(this,"stopMoveGraph",Gn,this),io(this,"adjustEdge",Yn,this),io(this,"adjustEdgeMiddle",Vn,this),io(this,"adjustEdgeStartAndEnd",Wn,this),io(this,"adjustNodePosition",Kn,this),io(this,"hideAnchors",$n,this),io(this,"hoverOutline",Zn,this),io(this,"nodeSelectedOutline",qn,this),io(this,"edgeSelectedOutline",Jn,this),io(this,"nodeTextEdit",Qn,this),io(this,"edgeTextEdit",to,this),io(this,"nodeTextDraggable",eo,this),io(this,"edgeTextDraggable",ro,this),io(this,"autoExpand",no,this),uo(this,"multipleSelectKey",""),uo(this,"defaultConfig",{}),Mn(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);Mn(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&Mn(n,this.defaultConfig),!0===e){var o=oo(vo,go);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,autoExpand:this.autoExpand},Mn(n,o)}!1===r&&Mn(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=oo(t,go);return Mn(n,i)}},{key:"getConfig",value:function(){return oo(this,go)}}])&&ao(e.prototype,r),n&&ao(e,n),t}()).prototype,"isSilentMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Un=co(Hn.prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fn=co(Hn.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=co(Hn.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yn=co(Hn.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vn=co(Hn.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wn=co(Hn.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kn=co(Hn.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),$n=co(Hn.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zn=co(Hn.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qn=co(Hn.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jn=co(Hn.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Qn=co(Hn.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),to=co(Hn.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),eo=co(Hn.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ro=co(Hn.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),no=co(Hn.prototype,"autoExpand",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),co(Hn.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(Hn.prototype,"updateEditConfig"),Hn.prototype),Hn);r(77);!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"}(so||(so={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(lo||(lo={})),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"}(fo||(fo={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(po||(po={})),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.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",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.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(yo||(yo={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ho||(ho={}));var mo,Oo,wo,_o,Eo,jo,xo,So,Po;function ko(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 Ao(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 Ao(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 Ao(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 Do(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 To(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Mo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function No(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"}(mo||(mo={}));var Co=(Oo=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Mo(this,"MINI_SCALE_SIZE",.2),Mo(this,"MAX_SCALE_SIZE",16),Do(this,"SCALE_X",wo,this),Do(this,"SKEW_Y",_o,this),Do(this,"SKEW_X",Eo,this),Do(this,"SCALE_Y",jo,this),Do(this,"TRANSLATE_X",xo,this),Do(this,"TRANSLATE_Y",So,this),Do(this,"ZOOM_SIZE",Po,this),Mo(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=ko(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=ko(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=ko(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")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(yo.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=ko(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")}}],r&&To(e.prototype,r),n&&To(e,n),t}(),wo=No(Oo.prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),_o=No(Oo.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Eo=No(Oo.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),jo=No(Oo.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),xo=No(Oo.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),So=No(Oo.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Po=No(Oo.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),No(Oo.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(Oo.prototype,"zoom"),Oo.prototype),No(Oo.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(Oo.prototype,"resetZoom"),Oo.prototype),No(Oo.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(Oo.prototype,"translate"),Oo.prototype),No(Oo.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(Oo.prototype,"focusOn"),Oo.prototype),Oo);var Ro=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var Io=function(t,e){return t&&mn(e,ur(e),t)};var Lo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},zo=Object.prototype.hasOwnProperty;var Bo=function(t){if(!Pt(t))return Lo(t);var e=er(t),r=[];for(var n in t)("constructor"!=n||!e&&zo.call(t,n))&&r.push(n);return r};var Ho=function(t){return ar(t)?Qe(t,!0):Bo(t)};var Xo=function(t,e){return t&&mn(e,Ho(e),t)},Uo=r(106);var Fo=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var Go=function(t,e){return mn(t,Ne(t),e)},Yo=rr(Object.getPrototypeOf,Object),Vo=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Se(e,Ne(t)),t=Yo(t);return e}:De;var Wo=function(t,e){return mn(t,Vo(t),e)};var Ko=function(t){return ke(t,Ho,Vo)},$o=Object.prototype.hasOwnProperty;var Zo=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&$o.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var qo=function(t){var e=new t.constructor(t.byteLength);return new Oe(e).set(new Oe(t)),e};var Jo=function(t,e){var r=e?qo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Qo=/\w*$/;var ti=function(t){var e=new t.constructor(t.source,Qo.exec(t));return e.lastIndex=t.lastIndex,e},ei=gt?gt.prototype:void 0,ri=ei?ei.valueOf:void 0;var ni=function(t){return ri?Object(ri.call(t)):{}};var oi=function(t,e){var r=e?qo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var ii=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return qo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Jo(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 oi(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return ti(t);case"[object Symbol]":return ni(t)}},ai=Object.create,ui=function(){function t(){}return function(e){if(!Pt(e))return{};if(ai)return ai(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var ci=function(t){return"function"!=typeof t.constructor||er(t)?{}:ui(Yo(t))};var si=function(t){return Re(t)&&"[object Map]"==Sr(t)},li=$e.a&&$e.a.isMap,fi=li?Ke(li):si;var pi=function(t){return Re(t)&&"[object Set]"==Sr(t)},di=$e.a&&$e.a.isSet,yi=di?Ke(di):pi,hi="[object Arguments]",vi="[object Function]",gi="[object Object]",bi={};bi[hi]=bi["[object Array]"]=bi["[object ArrayBuffer]"]=bi["[object DataView]"]=bi["[object Boolean]"]=bi["[object Date]"]=bi["[object Float32Array]"]=bi["[object Float64Array]"]=bi["[object Int8Array]"]=bi["[object Int16Array]"]=bi["[object Int32Array]"]=bi["[object Map]"]=bi["[object Number]"]=bi["[object Object]"]=bi["[object RegExp]"]=bi["[object Set]"]=bi["[object String]"]=bi["[object Symbol]"]=bi["[object Uint8Array]"]=bi["[object Uint8ClampedArray]"]=bi["[object Uint16Array]"]=bi["[object Uint32Array]"]=!0,bi["[object Error]"]=bi[vi]=bi["[object WeakMap]"]=!1;var mi=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(!Pt(e))return e;var f=Pe(e);if(f){if(u=Zo(e),!c)return Fo(e,u)}else{var p=Sr(e),d=p==vi||"[object GeneratorFunction]"==p;if(Object(Ue.a)(e))return Object(Uo.a)(e,c);if(p==gi||p==hi||d&&!i){if(u=s||d?{}:ci(e),!c)return s?Wo(e,Xo(u,e)):Go(e,Io(u,e))}else{if(!bi[p])return i?e:{};u=ii(e,p,c)}}a||(a=new pe);var y=a.get(e);if(y)return y;a.set(e,u),yi(e)?e.forEach((function(o){u.add(t(o,r,n,o,e,a))})):fi(e)&&e.forEach((function(o,i){u.set(i,t(o,r,n,i,e,a))}));var h=f?void 0:(l?s?Ko:cr:s?Ho:ur)(e);return Ro(h||e,(function(o,i){h&&(o=e[i=o]),bn(u,i,t(o,r,n,i,e,a))})),u};var Oi=function(t){return mi(t,5)};var wi=function(t,e,r){(void 0!==r&&!nt(t[e],r)||void 0===r&&!(e in t))&&vn(t,e,r)};var _i=function(t){return Re(t)&&ar(t)},Ei=Function.prototype,ji=Object.prototype,xi=Ei.toString,Si=ji.hasOwnProperty,Pi=xi.call(Object);var ki=function(t){if(!Re(t)||"[object Object]"!=St(t))return!1;var e=Yo(t);if(null===e)return!0;var r=Si.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&xi.call(r)==Pi};var Ai=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Di=function(t){return mn(t,Ho(t))};var Ti=function(t,e,r,n,o,i,a){var u=Ai(t,r),c=Ai(e,r),s=a.get(c);if(s)wi(t,r,s);else{var l=i?i(u,c,r+"",t,e,a):void 0,f=void 0===l;if(f){var p=Pe(c),d=!p&&Object(Ue.a)(c),y=!p&&!d&&qe(c);l=c,p||d||y?Pe(u)?l=u:_i(u)?l=Fo(u):d?(f=!1,l=Object(Uo.a)(c,!0)):y?(f=!1,l=oi(c,!0)):l=[]:ki(c)||Xe(c)?(l=u,Xe(u)?l=Di(u):Pt(u)&&!At(u)||(l=ci(c))):f=!1}f&&(a.set(c,l),o(l,c,n,i,a),a.delete(c)),wi(t,r,l)}};var Mi=function t(e,r,n,o,i){e!==r&&fn(r,(function(a,u){if(i||(i=new pe),Pt(a))Ti(e,r,u,n,t,o,i);else{var c=o?o(Ai(e,u),a,u+"",e,r,i):void 0;void 0===c&&(c=a),wi(e,u,c)}}),Ho)},Ni=Dn((function(t,e,r){Mi(t,e,r)})),Ci={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"}},Ri=function(t){var e=Oi(Ci);return t&&(e=Ni(e,t)),e};r(78),r(158);function Ii(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 Li=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 null==t||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;null==t||t.split(",").forEach((function(t){return t=t.trim(),r.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var r=this;null==t||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}}])&&Ii(e.prototype,r),n&&Ii(e,n),t}();function zi(t,e){return e*Math.round(t/e)||t}function Bi(t,e){return t%e}function Hi(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 Xi(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 Xi(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 Xi(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 Ui,Fi=function(t,e,r){var n=Hi(t,2),o=n[0],i=n[1],a=Hi(e,2),u=a[0],c=a[1],s=Hi(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},Gi=function(t,e){var r=!1;switch(e.multipleSelectKey){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;default:r=!1}return r},Yi=(r(79),r(161),r(125),r(80),r(12),r(13),r(14),r(47),r(31),new Uint8Array(16));function Vi(){if(!Ui&&!(Ui="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 Ui(Yi)}var Wi=/^(?:[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 Ki=function(t){return"string"==typeof t&&Wi.test(t)},$i=[],Zi=0;Zi<256;++Zi)$i.push((Zi+256).toString(16).substr(1));var qi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=($i[t[e+0]]+$i[t[e+1]]+$i[t[e+2]]+$i[t[e+3]]+"-"+$i[t[e+4]]+$i[t[e+5]]+"-"+$i[t[e+6]]+$i[t[e+7]]+"-"+$i[t[e+8]]+$i[t[e+9]]+"-"+$i[t[e+10]]+$i[t[e+11]]+$i[t[e+12]]+$i[t[e+13]]+$i[t[e+14]]+$i[t[e+15]]).toLowerCase();if(!Ki(r))throw TypeError("Stringified UUID is invalid");return r};var Ji=function(t,e,r){var n=(t=t||{}).random||(t.rng||Vi)();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 qi(n)},Qi=function(){return Ji()},ta=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+Ji(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+Ji(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},ea=(r(104),r(203),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 ra(t){return ra="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},ra(t)}function na(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 oa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?na(Object(r),!0).forEach((function(e){ia(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):na(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ia(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var aa,ua,ca,sa,la,fa,pa,da,ya,ha,va,ga,ba,ma,Oa,wa,_a,Ea,ja,xa,Sa=function(t){return t.anchors},Pa=function(t,e){for(var r,n=e.nodes,o=n.length-1;o>=0;o--){var i=n[o];if(Ma(t,i)){var a=Aa(t,i);if(a){var u={node:i,anchorIndex:a.index,anchor:a.anchor};r&&!ka(i,r.node,e)||(r=u)}}}return r},ka=function(t,e,r){return t.zIndex>e.zIndex||r.nodesMap[t.id].index>r.nodesMap[e.id].index},Aa=function(t,e){for(var r,n=Sa(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var a=Da(t.x,t.y,n[i].x,n[i].y);a<o&&(o=a,r={index:i,anchor:oa(oa({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r},Da=function(t,e,r,n){return Math.hypot(t-r,e-n)},Ta=function(t,e){var r=!1,n=Na(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},Ma=function(t,e){var r=!1,n=Na(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},Na=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}},Ca=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=Da(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),Ra(t,e,n)},Ra=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.r;if(e===ho.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===ho.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},Ia=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},La=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===ho.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===ho.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)),d=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:d}}return n},za=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={x:t.x,y:t.y};if(u.x===c.x&&e===ho.HORIZONTAL&&(s={x:u.x,y:t.y}),u.y===c.y&&e===ho.VERTICAL&&(s={x:t.x,y:u.y}),u.x!==c.x&&u.y!==c.y){var l=(c.y-u.y)/(c.x-u.x),f=(u.x*c.y-c.x*u.y)/(u.x-c.x);e===ho.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===ho.VERTICAL&&(s={x:t.x,y:l*t.x+f})}if(ea(s,o,a)){var p=Da(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},Ba=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}},Ha=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},Xa=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=gc(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},Ua=function(t){return"object"!==ra(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},Fa={node:!1,edge:!1},Ga={node:!0,edge:!0},Ya={stroke:"red",strokeDasharray:"10 200",className:"lf-edge-animation"},Va=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},Wa=1e3,Ka=999,$a=function(){return++Wa};function Za(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 qa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Za(Object(r),!0).forEach((function(e){tu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Za(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ja(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 Qa(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 tu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eu(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 ru=(aa=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),tu(this,"id",Qi()),Ja(this,"type",ua,this),Ja(this,"sourceNodeId",ca,this),Ja(this,"targetNodeId",sa,this),Ja(this,"startPoint",la,this),Ja(this,"endPoint",fa,this),Ja(this,"text",pa,this),Ja(this,"properties",da,this),Ja(this,"points",ya,this),Ja(this,"pointsList",ha,this),Ja(this,"isSelected",va,this),Ja(this,"isHovered",ga,this),Ja(this,"isHitable",ba,this),Ja(this,"draggable",ma,this),Ja(this,"visible",Oa,this),Ja(this,"isAnimation",wa,this),tu(this,"graphModel",void 0),Ja(this,"zIndex",_a,this),tu(this,"BaseType",po.EDGE),tu(this,"modelType",fo.EDGE),Ja(this,"state",Ea,this),tu(this,"additionStateData",void 0),tu(this,"sourceAnchorId",""),tu(this,"targetAnchorId",""),tu(this,"menu",void 0),tu(this,"customTextPosition",!1),tu(this,"animationData",Ya),Ja(this,"style",ja,this),Ja(this,"arrowConfig",xa,this),this.graphModel=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)}Mn(this,_c(t)),this.graphModel.overlapMode===mo.INCREASE&&(this.zIndex=t.zIndex||$a())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return qa(qa({},this.graphModel.theme.baseEdge),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return Oi(t)}},{key:"getAnimation",value:function(){var t=this.animationData;return Oi(t)}},{key:"getEdgeAnimationStyle",value:function(){var t=this.graphModel.theme.edgeAnimation;return Oi(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return Oi(t)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{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:"getBeginAnchor",value:function(t,e){var r,n;return Sa(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 Sa(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===mo.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,e){this.properties[t]=Va(e),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=qa(qa({},this.properties),Va(t)),this.setAttributes()}},{key:"setStyle",value:function(t,e){this.style=qa(qa({},this.style),{},tu({},t,Va(e)))}},{key:"setStyles",value:function(t){this.style=qa(qa({},this.style),Va(t))}},{key:"updateStyles",value:function(t){this.style=qa({},Va(t))}},{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&&Mn(this.text,t)}},{key:"updateText",value:function(t){this.text=qa(qa({},this.text),{},{value:t})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}}},{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:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Mn(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})}}],r&&Qa(e.prototype,r),n&&Qa(e,n),t}(),ua=eu(aa.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ca=eu(aa.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),sa=eu(aa.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),la=eu(aa.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),fa=eu(aa.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),pa=eu(aa.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),da=eu(aa.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ya=eu(aa.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ha=eu(aa.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),va=eu(aa.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ga=eu(aa.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ba=eu(aa.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ma=eu(aa.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Oa=eu(aa.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),wa=eu(aa.prototype,"isAnimation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_a=eu(aa.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ea=eu(aa.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ja=eu(aa.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),xa=eu(aa.prototype,"arrowConfig",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),eu(aa.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(aa.prototype,"sourceNode"),aa.prototype),eu(aa.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(aa.prototype,"targetNode"),aa.prototype),eu(aa.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(aa.prototype,"textPosition"),aa.prototype),eu(aa.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setProperty"),aa.prototype),eu(aa.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setProperties"),aa.prototype),eu(aa.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setStyle"),aa.prototype),eu(aa.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setStyles"),aa.prototype),eu(aa.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"updateStyles"),aa.prototype),eu(aa.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"formatText"),aa.prototype),eu(aa.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"resetTextPosition"),aa.prototype),eu(aa.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"moveText"),aa.prototype),eu(aa.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setText"),aa.prototype),eu(aa.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"updateText"),aa.prototype),eu(aa.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setAnchors"),aa.prototype),eu(aa.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setSelected"),aa.prototype),eu(aa.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setHovered"),aa.prototype),eu(aa.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setHitable"),aa.prototype),eu(aa.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"openEdgeAnimation"),aa.prototype),eu(aa.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"closeEdgeAnimation"),aa.prototype),eu(aa.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setElementState"),aa.prototype),eu(aa.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"updateStartPoint"),aa.prototype),eu(aa.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"moveStartPoint"),aa.prototype),eu(aa.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"updateEndPoint"),aa.prototype),eu(aa.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"moveEndPoint"),aa.prototype),eu(aa.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"setZIndex"),aa.prototype),eu(aa.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"initPoints"),aa.prototype),eu(aa.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"updateAttributes"),aa.prototype),eu(aa.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"getAdjustStart"),aa.prototype),eu(aa.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"getAdjustEnd"),aa.prototype),eu(aa.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(aa.prototype,"updateAfterAdjustStartAndEnd"),aa.prototype),aa),nu=ru;function ou(t){return ou="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},ou(t)}function iu(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 au(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?iu(Object(r),!0).forEach((function(e){vu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function uu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cu(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 su(){return su="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=lu(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},su.apply(this,arguments)}function lu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=hu(t)););return t}function fu(t,e){return fu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},fu(t,e)}function pu(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=hu(t);if(e){var o=hu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return du(this,r)}}function du(t,e){if(e&&("object"===ou(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yu(t)}function yu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hu(t){return hu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},hu(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 gu,bu,mu=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&&fu(t,e)}(i,t);var e,r,n,o=pu(i);function i(){var t;uu(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return vu(yu(t=o.call.apply(o,[this].concat(r))),"modelType",fo.LINE_EDGE),t}return e=i,(r=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return au(au({},su(hu(i.prototype),"getEdgeStyle",this).call(this)),Oi(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&cu(e.prototype,r),n&&cu(e,n),i}(nu);function Ou(t){return Ou="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},Ou(t)}function wu(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 _u(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 _u(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 _u(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 Eu(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 ju(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Eu(Object(r),!0).forEach((function(e){Ru(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Eu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xu(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 Su(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pu(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 ku(){return ku="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Au(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ku.apply(this,arguments)}function Au(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cu(t)););return t}function Du(t,e){return Du=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Du(t,e)}function Tu(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=Cu(t);if(e){var o=Cu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mu(this,r)}}function Mu(t,e){if(e&&("object"===Ou(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Nu(t)}function Nu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cu(t){return Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cu(t)}function Ru(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iu(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 Lu=(gu=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&&Du(t,e)}(i,t);var e,r,n,o=Tu(i);function i(){var t;Su(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ru(Nu(t=o.call.apply(o,[this].concat(r))),"modelType",fo.POLYLINE_EDGE),Ru(Nu(t),"draginngPointList",void 0),xu(Nu(t),"dbClickPosition",bu,Nu(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,ku(Cu(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return ju(ju({},ku(Cu(i.prototype),"getEdgeStyle",this).call(this)),Oi(t))}},{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=yc(this.points),o=wu(sc(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===ho.HORIZONTAL?i=Math.abs(e.y-r.y):t===ho.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===ho.HORIZONTAL?n={x:r.x,y:e.y}:t===ho.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(lc(a,o,this.sourceNode)){if(fc(o,i,this.sourceNode)){var u=pc(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)&&Da(e.x,e.y,o.x,o.y)<Da(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(lc(s,l,this.targetNode)){if(fc(c,s,this.targetNode)){var f=pc(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)&&Da(t.x,t.y,s.x,s.y)<Da(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=dc(r,n),f=e[0];switch(c){case fo.RECT_NODE:0!==a.radius&&(Ia(r,a)||(f=Ca(r,l,a)));break;case fo.CIRCLE_NODE:f=Ra(r,l,a);break;case fo.ELLIPSE_NODE:f=La(r,l,a);break;case fo.DIAMOND_NODE:case fo.POLYGON_NODE:f=za(r,l,a)}e[0]=f;var p=dc(o,i),d=e[e.length-1];switch(s){case fo.RECT_NODE:0!==u.radius&&(Ia(i,u)||(d=Ca(i,p,u)));break;case fo.CIRCLE_NODE:d=Ra(i,p,u);break;case fo.ELLIPSE_NODE:d=La(i,p,u);break;case fo.DIAMOND_NODE:case fo.POLYGON_NODE:d=za(i,p,u)}return e[e.length-1]=d,e}},{key:"getData",value:function(){var t=ku(Cu(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=cc({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:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList,c=u;return a===ho.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===ho.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){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList;if(a===ho.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(!Ta(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(!Ta(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDragingPoints(a,"end",f,p,c)}}c=uc(c),this.updatePointsAfterDrage(c),this.draginngPointList=c}else if(a===ho.VERTICAL){u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y};var d=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(d=this.removeCrossPoints(o,i,d)),0===o){var y={x:r.x+e.x,y:r.y};if(!Ta(y,this.sourceNode)){var h=this.sourceNode.anchors;d=this.getDragingPoints(a,"start",y,h,d)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!Ta(v,this.targetNode)){var g=this.targetNode.anchors;d=this.getDragingPoints(a,"end",v,g,d)}}d=uc(d),this.updatePointsAfterDrage(d),this.draginngPointList=d}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=yc(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)}this.isDragging=!1}},{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=cc({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&Pu(e.prototype,r),n&&Pu(e,n),i}(nu),bu=Iu(gu.prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Iu(gu.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"initPoints"),gu.prototype),Iu(gu.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"updatePoints"),gu.prototype),Iu(gu.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"updateStartPoint"),gu.prototype),Iu(gu.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"moveStartPoint"),gu.prototype),Iu(gu.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"updateEndPoint"),gu.prototype),Iu(gu.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"moveEndPoint"),gu.prototype),Iu(gu.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"dragAppendStart"),gu.prototype),Iu(gu.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"dragAppendSimple"),gu.prototype),Iu(gu.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"dragAppend"),gu.prototype),Iu(gu.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"dragAppendEnd"),gu.prototype),Iu(gu.prototype,"updatePointsAfterDrage",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"updatePointsAfterDrage"),gu.prototype),Iu(gu.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"getAdjustStart"),gu.prototype),Iu(gu.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"getAdjustEnd"),gu.prototype),Iu(gu.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(gu.prototype,"updateAfterAdjustStartAndEnd"),gu.prototype),gu),zu=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 Bu(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?Bu(Object(r),!0).forEach((function(e){Xu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uu(t){return function(t){if(Array.isArray(t))return Vu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Yu(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 Fu(t){return Fu="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},Fu(t)}function Gu(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)||Yu(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 Yu(t,e){if(t){if("string"==typeof t)return Vu(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)?Vu(t,e):void 0}}function Vu(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 Wu=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},Ku=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}},$u=function(t,e){var r=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?ho.HORIZONTAL:ho.VERTICAL}(e,t);return r===ho.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}},Zu=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}},qu=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}},Ju=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}]},Qu=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},tc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},ec=function(t,e,r,n,o){return tc(t,e)+tc(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])},rc=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)},nc=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},oc=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=Gu(Ju(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return nc(t,e,o,i)||nc(t,e,o,u)||nc(t,e,i,a)||nc(t,e,a,u)},ic=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=ec(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var d=function(){var d,y,h,v=void 0,g=1/0;if(c.forEach((function(t){f[t.id]<g&&(g=f[t.id],v=t)})),v===r){var b=[];return rc(b,p,s,r.id),{v:b}}y=v,(h=(d=c).indexOf(y))>-1&&d.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||oc(t,e,r)||oc(t,e,n)||o.push(t))})),Wu(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]+tc(v,t);l[t.id]&&n>=l[t.id]||(s[t.id]=v.id,l[t.id]=n,f[t.id]=l[t.id]+ec(t,r,e,i,a))}}))};c.length;){var y=d();if("object"===Fu(y))return y.v}return[e,r]},ac=function(t){return Na(t)},uc=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},cc=function(t,e,r,n,o){var i,a,u=ac(r),c=ac(n),s=Ku(u,o),l=Ku(c,o),f=$u(s,t),p=$u(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 d=hc(t,e,f,p);return[t,f].concat(Uu(d),[p,e])}var y=qu([f,p]),h=Zu(s,y),v=Zu(l,y),g=[];g=(g=g.concat(Ju(h))).concat(Ju(v));var b={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[y,h,v].forEach((function(t){g=g.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,b).filter((function(t){return Qu(t,s)&&Qu(t,l)})))})),[{x:f.x,y:p.y},{x:p.x,y:f.y}].forEach((function(t){Qu(t,s)&&Qu(t,l)&&g.push(t)})),g.unshift(f),g.push(p),g=Wu(g);var m=ic(g,f,p,u,c,t,e);return m.unshift(t),m.push(e),m.length>2&&(m=uc(m)),Wu(m)},sc=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=Da(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=Da(a.x,a.y,u.x,u.y);c>o&&(o=c,r=a,n=u)}e=[r,n]}return e},lc=function(t,e,r){var n=Ta(t,r),o=Ta(e,r);return n&&o},fc=function(t,e,r){var n=Ta(t,r),o=Ta(e,r);return!(n&&o)&&(n||o)},pc=function(t,e,r){for(var n,o,i=Na(r),a=Ju(i),u=0;u<a.length;u++){nc(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},dc=function(t,e){var r;return t.x===e.x?r=ho.VERTICAL:t.y===e.y&&(r=ho.HORIZONTAL),r},yc=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=Gu(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},hc=function(t,e,r,n){var o=[];if(dc(t,r)===dc(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=ea(i,t,r),u=ea(i,e,n);if(a||u)i={x:n.x,y:r.y};else{var c=vc(i,t,r),s=vc(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},vc=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},gc=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},bc=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,a=Na(n),u=Na(o),c=Ku(a,i),s=Ku(u,i);return{sNext:$u(c,e),ePre:$u(s,r)}},mc=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Oc(e[0]),Oc(e[1]),Oc(e[2]),Oc(e[3])]},Oc=function(t){var e=Gu(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},wc=function(t,e){for(var r,n=t.x,o=t.y,i=yc(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(ea(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(ea(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},_c=function(t){return oo(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))};r(204);var jc=function(){};function xc(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 Sc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Pc=window.document;function kc(t){var e=t.onDragStart,r=void 0===e?jc:e,n=t.onDraging,o=void 0===n?jc:n,i=t.onDragEnd,a=void 0===i?jc:i,u=t.step,c=void 0===u?1:u,s=t.isStopPropagation,l=void 0===s||s,f=!1,p=!1,d=0,y=0,h=0,v=0;function g(t){if(l&&t.stopPropagation(),p&&(f=!0,h+=t.clientX-d,v+=t.clientY-y,d=t.clientX,y=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 b(t){if(l&&t.stopPropagation(),p=!1,Pc.removeEventListener("mousemove",g,!1),Pc.removeEventListener("mouseup",b,!1),f)return f=!1,a({event:t})}return function(t){if(0===t.button)return l&&t.stopPropagation(),p=!0,d=t.clientX,y=t.clientY,Pc.addEventListener("mousemove",g,!1),Pc.addEventListener("mouseup",b,!1),r({event:t})}}var Ac,Dc,Tc,Mc,Nc,Cc,Rc,Ic,Lc,zc,Bc,Hc,Xc,Uc=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?jc:n,i=e.onDraging,a=void 0===i?jc:i,u=e.onDragEnd,c=void 0===u?jc:u,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,p=void 0===f?null:f,d=e.step,y=void 0===d?1:d,h=e.isStopPropagation,v=void 0===h||h,g=e.model,b=void 0===g?null:g;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Sc(this,"onDragStart",void 0),Sc(this,"onDraging",void 0),Sc(this,"onDragEnd",void 0),Sc(this,"step",void 0),Sc(this,"isStopPropagation",void 0),Sc(this,"isDraging",!1),Sc(this,"isStartDraging",!1),Sc(this,"startX",0),Sc(this,"startY",0),Sc(this,"sumDeltaX",0),Sc(this,"sumDeltaY",0),Sc(this,"eventType",void 0),Sc(this,"eventCenter",void 0),Sc(this,"model",void 0),Sc(this,"startTime",void 0),Sc(this,"isGrag",void 0),Sc(this,"handleMouseDown",(function(t){var e,n;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isStartDraging=!0,r.startX=t.clientX,r.startY=t.clientY,Pc.addEventListener("mousemove",r.handleMouseMove,!1),Pc.addEventListener("mouseup",r.handleMouseUp,!1);var o=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(yo["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:o}),r.startTime=(new Date).getTime()}})),Sc(this,"handleMouseMove",(function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDraging&&(r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,r.step<=1||Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n=r.sumDeltaX%r.step,o=r.sumDeltaY%r.step,i=r.sumDeltaX-n,a=r.sumDeltaY-o;r.sumDeltaX=n,r.sumDeltaY=o;var u,c=null===(e=r.model)||void 0===e?void 0:e.getData();if(!r.isDraging)null===(u=r.eventCenter)||void 0===u||u.emit(yo["".concat(r.eventType,"_DRAGSTART")],{e:t,data:c}),r.onDragStart({event:t});r.isDraging=!0,Promise.resolve().then((function(){var e,n;r.onDraging({deltaX:i,deltaY:a,event:t}),null===(e=r.eventCenter)||void 0===e||e.emit(yo["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:c}),null===(n=r.eventCenter)||void 0===n||n.emit(yo["".concat(r.eventType,"_DRAG")],{e:t,data:c})}))}})),Sc(this,"handleMouseUp",(function(t){r.isStartDraging=!1,r.isStopPropagation&&t.stopPropagation(),Promise.resolve().then((function(){var e,n,o;Pc.removeEventListener("mousemove",r.handleMouseMove,!1),Pc.removeEventListener("mouseup",r.handleMouseUp,!1);var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(yo["".concat(r.eventType,"_MOUSEUP")],{e:t,data:i}),r.isDraging&&(r.isDraging=!1,r.onDragEnd({event:t}),null===(o=r.eventCenter)||void 0===o||o.emit(yo["".concat(r.eventType,"_DROP")],{e:t,data:i}))}))})),Sc(this,"cancelDrag",(function(){Pc.removeEventListener("mousemove",r.handleMouseMove,!1),Pc.removeEventListener("mouseup",r.handleMouseUp,!1),r.isDraging=!1})),this.onDragStart=o,this.onDraging=a,this.onDragEnd=c,this.step=y,this.isStopPropagation=v,this.eventType=l,this.eventCenter=p,this.model=b}var e,r,n;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}}])&&xc(e.prototype,r),n&&xc(e,n),t}();function Fc(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 Gc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fc(Object(r),!0).forEach((function(e){Jc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Yc(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)||Wc(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 Vc(t){return function(t){if(Array.isArray(t))return Kc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wc(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 Wc(t,e){if(t){if("string"==typeof t)return Kc(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)?Kc(t,e):void 0}}function Kc(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 $c(t){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(t)}function Zc(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 qc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qc(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 ts,es=200,rs=(Ac=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Jc(this,"rootEl",void 0),Zc(this,"width",Dc,this),Zc(this,"height",Tc,this),Jc(this,"theme",void 0),Jc(this,"eventCenter",void 0),Jc(this,"modelMap",new Map),Jc(this,"topElement",void 0),Jc(this,"animation",void 0),Jc(this,"idGenerator",void 0),Jc(this,"nodeMoveRules",[]),Zc(this,"edgeType",Mc,this),Zc(this,"nodes",Nc,this),Zc(this,"edges",Cc,this),Zc(this,"overlapMode",Rc,this),Zc(this,"background",Ic,this),Zc(this,"transformModel",Lc,this),Zc(this,"editConfigModel",zc,this),Zc(this,"gridSize",Bc,this),Zc(this,"partial",Hc,this),Zc(this,"fakerNode",Xc,this);var r,n=e.container,o=e.background,i=void 0===o?{}:o,a=e.grid,u=e.idGenerator,c=e.animation;this.background=i,"object"===$c(a)&&(this.gridSize=a.size),this.rootEl=n,this.editConfigModel=new bo(e),this.eventCenter=new Li,this.transformModel=new Co(this.eventCenter),this.theme=Ri(e.style),this.edgeType=e.edgeType||"polyline",this.width=e.width,this.height=e.height,this.animation=(r=c)&&"boolean"!=typeof r?Ni(Oi(Fa),r):Oi(!0===r?Ga:Fa),this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=u,this.width=e.width||this.rootEl.getBoundingClientRect().width,this.height=e.height||this.rootEl.getBoundingClientRect().height}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:"modelsMap",get:function(){return[].concat(Vc(this.nodes),Vc(this.edges)).reduce((function(t,e){return t[e.id]=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+es,this.height+es],i=0;i<t.length;i++){var a=t[i];a.visible&&(!this.partial||a.isSelected||this.isElementInArea(a,n,o,!1,!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===so.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===so.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=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=[],i=[];this.nodes.forEach((function(t){return i.push(t)})),this.edges.forEach((function(t){return i.push(t)}));for(var a=0;a<i.length;a++){var u=i[a];this.isElementInArea(u,t,e,r,n)&&o.push(u)}return o}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",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=Yc(this.transformModel.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],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(t.BaseType===po.NODE){for(var i=Na(t=t),a=i.minX,u=i.minY,c=i.maxX,s=i.maxY,l=[{x:a,y:u},{x:c,y:u},{x:c,y:s},{x:a,y:s}],f=o,p=0;p<l.length;p++){var d=l[p],y=d.x,h=d.y,v=this.transformModel.CanvasPointToHtmlPoint([y,h]),g=Yc(v,2);if(y=g[0],h=g[1],Fi([y,h],e,r)!==o){f=!o;break}}return f}if(t.BaseType===po.EDGE){var b=t=t,m=b.startPoint,O=b.endPoint,w=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),_=this.transformModel.CanvasPointToHtmlPoint([O.x,O.y]),E=Fi(w,e,r),j=Fi(_,e,r);return n?E&&j:E||j}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.width&&this.height||this.resize(),this.nodes=yn(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=zi(n,e.gridSize),t.y=zi(o,e.gridSize),"object"===$c(t.text)&&(t.text.x-=Bi(n,e.gridSize),t.text.y-=Bi(o,e.gridSize))),new r(t,e)})),this.edges=yn(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.forEach((function(e){var r=e.getData();r&&t.push(r)}));var e=[];return this.nodes.forEach((function(t){var r=t.getData();r&&e.push(r)})),{nodes:e,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,e=[],r=0;r<this.nodes.length;r++){var n=this.nodes[r];if(n.isDragging){t=!0;break}e.push(n.getHistoryData())}if(t)return!1;for(var o=!1,i=[],a=0;a<this.edges.length;a++){var u=this.edges[a];if(u.isDragging){o=!0;break}i.push(u.getHistoryData())}return!o&&{nodes:e,edges:i}}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.modelsMap[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===po.NODE&&r.nodes.push(n.getData()),n.BaseType===po.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=Qi()),this.nodesMap[e]?"":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):""}},{key:"changeEdgeId",value:function(t,e){return e||(e=Qi()),this.edgesMap[e]?"":this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&(r.id=e)})),e):""}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"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&&(this.overlapMode===mo.DEFAULT&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===mo.INCREASE&&this.setElementZIndex(t,"top"))}},{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=$a()),"bottom"===e&&(o=--Ka),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(yo.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=Va(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(yo.NODE_ADD,{data:o}),n}},{key:"cloneNode",value:function(t){var e=this.getNodeModelById(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,a=i.move(e,r,n);a&&this.moveEdge(t,e,r)}}},{key:"moveNode2Coordinate",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,a=i.x,u=i.y,c=e-a,s=r-u;this.moveNode(t,c,s,n)}}},{key:"editText",value:function(t){this.setElementStateById(t,so.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=Va(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(Gc(Gc({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(yo.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.moveStartPoint(e,r),l&&i.moveEndPoint(e,r),s||l)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===fo.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,p=wc(f,i.points);i.moveText(p.x-f.x,p.y-f.y)}else{var d=i.textPosition,y=d.x,h=d.y;i.moveText(y-u,h-c)}}}},{key:"deleteEdgeBySourceAndTarget",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(yo.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeById",value:function(t){if(this.edgesMap[t]){var e=this.edgesMap[t].index,r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(yo.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeBySource",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(yo.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeByTarget",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(yo.EDGE_DELETE,{data:r})}}},{key:"setElementStateById",value:function(t,e,r){this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(so.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(so.DEFAULT)}))}},{key:"updateText",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:"selectNodeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||this.clearSelectElements();var r=this.getElement(t);null==r||r.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===mo.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{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.getNodeModelById(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=Ba(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=Ba(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModelById(t);if(r&&r.type!==e){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete n.pointsList;var i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}}},{key:"getNodeIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.targetNodeId===t&&e.push(r)})),e}},{key:"getNodeOutgoingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.sourceNodeId===t&&e.push(r)})),e}},{key:"getNodeIncomingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.targetNodeId===t&&r.push(e.nodesMap[n.sourceNodeId].model)})),r}},{key:"getNodeOutgoingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.sourceNodeId===t&&r.push(e.nodesMap[n.targetNodeId].model)})),r}},{key:"setTheme",value:function(t){this.theme=Ri(Gc(Gc({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=t||this.rootEl.getBoundingClientRect().width,this.height=e||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,e=[],r=[];t.forEach((function(t){var n=t.x,o=t.y,i=t.width,a=t.height,u=t.getNodeStyle().strokeWidth,c=void 0===u?0:u;e=e.concat([n+i/2+c,n-i/2-c]),r=r.concat([o+a/2+c,o-a/2-c])}));var n=Math.min.apply(Math,Vc(e)),o=Math.max.apply(Math,Vc(e)),i=Math.min.apply(Math,Vc(r)),a=o-n||0,u=Math.max.apply(Math,Vc(r))-i||0;return{virtualRectWidth:a,virtualRectHeight:u,virtualRectCenterPositionX:n+a/2,virtualRectCenterPositionY:i+u/2}}},{key:"translateCenter",value:function(){var t=this.nodes,e=this.width,r=this.height,n=this.rootEl,o=this.transformModel;if(t.length){var i=e||n.clientWidth,a=r||n.clientHeight,u=this.getVirtualRectSize(),c=u.virtualRectCenterPositionX,s=u.virtualRectCenterPositionY;o.focusOn(c,s,i,a)}}},{key:"fitView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=this.nodes,n=this.width,o=this.height,i=this.rootEl,a=this.transformModel;if(r.length){var u=n||i.clientWidth,c=o||i.clientHeight,s=this.getVirtualRectSize(),l=s.virtualRectWidth,f=s.virtualRectHeight,p=s.virtualRectCenterPositionX,d=s.virtualRectCenterPositionY,y=(l+e)/u,h=(f+t)/c,v=0;v=1/Math.max(y,h);var g=[u/2,c/2];a.zoom(v,g),a.focusOn(p,d,u,c)}}},{key:"openEdgeAnimation",value:function(t){this.getEdgeModelById(t).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(t){this.getEdgeModelById(t).closeEdgeAnimation()}}],r&&qc(e.prototype,r),n&&qc(e,n),t}(),Dc=Qc(Ac.prototype,"width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Tc=Qc(Ac.prototype,"height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mc=Qc(Ac.prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Nc=Qc(Ac.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cc=Qc(Ac.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Rc=Qc(Ac.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mo.DEFAULT}}),Ic=Qc(Ac.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Lc=Qc(Ac.prototype,"transformModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zc=Qc(Ac.prototype,"editConfigModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Bc=Qc(Ac.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Hc=Qc(Ac.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xc=Qc(Ac.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qc(Ac.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(Ac.prototype,"nodesMap"),Ac.prototype),Qc(Ac.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(Ac.prototype,"edgesMap"),Ac.prototype),Qc(Ac.prototype,"modelsMap",[o.m],Object.getOwnPropertyDescriptor(Ac.prototype,"modelsMap"),Ac.prototype),Qc(Ac.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(Ac.prototype,"sortElements"),Ac.prototype),Qc(Ac.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(Ac.prototype,"textEditElement"),Ac.prototype),Qc(Ac.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(Ac.prototype,"selectElements"),Ac.prototype),Qc(Ac.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"setFakerNode"),Ac.prototype),Qc(Ac.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"removeFakerNode"),Ac.prototype),Qc(Ac.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"setModel"),Ac.prototype),Qc(Ac.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"toFront"),Ac.prototype),Qc(Ac.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"setElementZIndex"),Ac.prototype),Qc(Ac.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"deleteNode"),Ac.prototype),Qc(Ac.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"addNode"),Ac.prototype),Qc(Ac.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"cloneNode"),Ac.prototype),Qc(Ac.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"moveNode"),Ac.prototype),Qc(Ac.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"moveNode2Coordinate"),Ac.prototype),Qc(Ac.prototype,"editText",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"editText"),Ac.prototype),Qc(Ac.prototype,"addEdge",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"addEdge"),Ac.prototype),Qc(Ac.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"moveEdge"),Ac.prototype),Qc(Ac.prototype,"deleteEdgeBySourceAndTarget",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"deleteEdgeBySourceAndTarget"),Ac.prototype),Qc(Ac.prototype,"deleteEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"deleteEdgeById"),Ac.prototype),Qc(Ac.prototype,"deleteEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"deleteEdgeBySource"),Ac.prototype),Qc(Ac.prototype,"deleteEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"deleteEdgeByTarget"),Ac.prototype),Qc(Ac.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"setElementStateById"),Ac.prototype),Qc(Ac.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"updateText"),Ac.prototype),Qc(Ac.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"selectNodeById"),Ac.prototype),Qc(Ac.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"selectEdgeById"),Ac.prototype),Qc(Ac.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"selectElementById"),Ac.prototype),Qc(Ac.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"clearSelectElements"),Ac.prototype),Qc(Ac.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"moveNodes"),Ac.prototype),Qc(Ac.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"setDefaultEdgeType"),Ac.prototype),Qc(Ac.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"changeNodeType"),Ac.prototype),Qc(Ac.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"changeEdgeType"),Ac.prototype),Qc(Ac.prototype,"getNodeIncomingEdge",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"getNodeIncomingEdge"),Ac.prototype),Qc(Ac.prototype,"getNodeOutgoingEdge",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"getNodeOutgoingEdge"),Ac.prototype),Qc(Ac.prototype,"getNodeIncomingNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"getNodeIncomingNode"),Ac.prototype),Qc(Ac.prototype,"getNodeOutgoingNode",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"getNodeOutgoingNode"),Ac.prototype),Qc(Ac.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"setTheme"),Ac.prototype),Qc(Ac.prototype,"resize",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"resize"),Ac.prototype),Qc(Ac.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"clearData"),Ac.prototype),Qc(Ac.prototype,"translateCenter",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"translateCenter"),Ac.prototype),Qc(Ac.prototype,"fitView",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"fitView"),Ac.prototype),Qc(Ac.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"openEdgeAnimation"),Ac.prototype),Qc(Ac.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Ac.prototype,"closeEdgeAnimation"),Ac.prototype),Ac),ns=rs;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},os(t)}function is(){return is=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},is.apply(this,arguments)}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},us(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=fs(t);if(e){var o=fs(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 ls(t)}function ls(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fs(t){return fs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fs(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}var ds,ys=Jm(ts=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(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),ps(ls(e=o.call(this)),"stepDrag",void 0),ps(ls(e),"stepScrollX",0),ps(ls(e),"stepScrollY",0),ps(ls(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDraging:!0});var o=e.props.graphModel,i=o.transformModel;o.editConfigModel.stopMoveGraph||i.translate(r,n)})),ps(ls(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),ps(ls(e),"zoomHandler",(function(t){var r=e.props,n=r.graphModel,o=n.editConfigModel,i=n.transformModel,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 d=e.stepScrollX%a,y=e.stepScrollX-d;i.translate(-y*i.SCALE_X,0),e.stepScrollX=d}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}}})),ps(ls(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props.graphModel;r.selectElements.size>0&&r.clearSelectElements(),r.eventCenter.emit(yo.BLANK_CLICK,{e:t})}})),ps(ls(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props.graphModel,n=r.getPointByClient({x:t.clientX,y:t.clientY});r.eventCenter.emit(yo.BLANK_CONTEXTMENU,{e:t,position:n})}})),ps(ls(e),"mouseDownHandler",(function(t){var r=e.props.graphModel,n=r.eventCenter,o=r.editConfigModel,i=r.transformModel.SCALE_X,a=r.gridSize,u=t.target,c=!o.adjustEdge&&!o.adjustNodePosition;("canvas-overlay"===u.getAttribute("name")||c)&&(o.stopMoveGraph?n.emit(yo.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(a*i),e.stepDrag.handleMouseDown(t)),e.clickHandler(t))}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter;return e.stepDrag=new Uc({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:n,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:null}),e.state={isDraging:!1},e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props,r=e.children,n=e.dnd,o=this.state.isDraging;return Object(tt.g)("svg",is({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-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},n.eventMap()),Object(tt.g)("g",{transform:t},r))}}])&&as(e.prototype,r),n&&as(e,n),i}(tt.a))||ts;function hs(t){return hs="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},hs(t)}function vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gs(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 bs(t,e){return bs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},bs(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=_s(t);if(e){var o=_s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Os(this,r)}}function Os(t,e){if(e&&("object"===hs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ws(t)}function ws(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _s(t){return _s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_s(t)}function Es(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var js=Jm(ds=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&&bs(t,e)}(i,t);var e,r,n,o=ms(i);function i(){var t;vs(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Es(ws(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(tt.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"render",value:function(){return Object(tt.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&gs(e.prototype,r),n&&gs(e,n),i}(tt.a))||ds;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},xs(t)}function Ss(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ks(t,e){return ks=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ks(t,e)}function As(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=Ts(t);if(e){var o=Ts(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ds(this,r)}}function Ds(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 Ts(t){return Ts=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ts(t)}var Ms,Ns=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ks(t,e)}(i,t);var e,r,n,o=As(i);function i(){return Ss(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.background;return Object(tt.g)("div",{className:"lf-background"},Object(tt.g)("div",{style:t,className:"lf-background-area"}))}}])&&Ps(e.prototype,r),n&&Ps(e,n),i}(tt.a);function Cs(t){return Cs="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},Cs(t)}function Rs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Is(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 Ls(t,e){return Ls=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ls(t,e)}function zs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Xs(t);if(e){var o=Xs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Bs(this,r)}}function Bs(t,e){if(e&&("object"===Cs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hs(t)}function Hs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Us(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Fs=Jm(Ms=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&&Ls(t,e)}(i,t);var e,r,n,o=zs(i);function i(){var t;Rs(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Us(Hs(t=o.call.apply(o,[this].concat(r))),"id",Qi()),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(tt.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(tt.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.transformModel,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(tt.g)("div",{className:"lf-grid"},Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(tt.g)("defs",null,Object(tt.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:r,height:r},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Object(tt.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Is(e.prototype,r),n&&Is(e,n),i}(tt.a))||Ms;Fs.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(52);function Gs(t){return Gs="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},Gs(t)}function Ys(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vs(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 Vs(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 Vs(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 Ws,Ks=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=Ys(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==Gs(o)&&(e[n]=o)})),Object(tt.g)("line",e)};function $s(t){return $s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(t)}function Zs(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 qs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zs(Object(r),!0).forEach((function(e){Js(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zs(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Js(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tl(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 el(t,e){return el=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},el(t,e)}function rl(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=ol(t);if(e){var o=ol(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nl(this,r)}}function nl(t,e){if(e&&("object"===$s(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 ol(t){return ol=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ol(t)}var il,al=Jm(Ws=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&&el(t,e)}(i,t);var e,r,n,o=rl(i);function i(){return Qs(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.getStyle(),i=e.x,a=void 0===i?0:i,u=e.y,c=void 0===u?0:u,s=qs(qs({x1:-1e5,y1:c,x2:1e5,y2:c},o),{},{stroke:r?o.stroke:"none"}),l=qs(qs({x1:a,y1:-1e5,x2:a,y2:1e5},o),{},{stroke:n?o.stroke:"none"});return Object(tt.g)("g",{className:"lf-snapline"},Object(tt.g)(Ks,s),Object(tt.g)(Ks,l))}}])&&tl(e.prototype,r),n&&tl(e,n),i}(tt.a))||Ws;function ul(t){return ul="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},ul(t)}function cl(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 sl(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 sl(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 sl(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){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.className,a=t.radius,u=e-n/2,c=r-o/2,s={};return Object.entries(t).forEach((function(t){var e=cl(t,2),r=e[0],n=e[1];"object"!==ul(n)&&(s[r]=n)})),s.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",a&&(s.rx=a,s.ry=a),s.x=u,s.y=c,Object(tt.g)("rect",s)}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},fl(t)}function pl(){return pl=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},pl.apply(this,arguments)}function dl(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 yl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dl(Object(r),!0).forEach((function(e){hl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vl(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 bl(t,e){return bl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},bl(t,e)}function ml(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=wl(t);if(e){var o=wl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ol(this,r)}}function Ol(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 function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wl(t){return wl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wl(t)}ll.defaultProps={className:"",radius:""};var _l,El=Jm(il=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&bl(t,e)}(i,t);var e,r,n,o=ml(i);function i(){return vl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getNodesOutline",value:function(){var t=this.props.graphModel,e=t.nodes,r=t.editConfigModel,n=r.hoverOutline,o=r.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.isHovered||t.isSelected){var e=t.isHovered,r=t.isSelected,a=t.x,u=t.y,c=t.width,s=t.height;if(o&&r||n&&e){var l=t.getOutlineStyle(),f={};if(Object.keys(l).forEach((function(t){"hover"!==t&&(f[t]=l[t])})),e){var p=l.hover;f=yl(yl({},f),p)}i.push(Object(tt.g)(ll,pl({className:"lf-outline-node",x:a,y:u,width:c+10,height:s+10},f)))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,r=t.editConfigModel,n=r.edgeSelectedOutline,o=r.hoverOutline,i=[],a=0;a<e.length;a++){var u=e[a];(n&&u.isSelected||o&&u.isHovered)&&(u.modelType===fo.LINE_EDGE?i.push(this.getLineOutline(u)):u.modelType===fo.POLYLINE_EDGE?i.push(this.getPolylineOutline(u)):u.modelType===fo.BEZIER_EDGE&&i.push(this.getBezierOutline(u)))}return i}},{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=t.getOutlineStyle();return Object(tt.g)(ll,pl({className:"lf-outline-edge",x:n,y:o,width:i,height:a},u))}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=yc(e),n=qu(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=t.getOutlineStyle();return Object(tt.g)(ll,pl({className:"lf-outline",x:o,y:i,width:a,height:u},c))}},{key:"getBezierOutline",value:function(t){var e=t.path,r=mc(e),n=qu(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=t.getOutlineStyle();return Object(tt.g)(ll,pl({className:"lf-outline",x:o,y:i,width:a,height:u},c))}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&gl(e.prototype,r),n&&gl(e,n),i}(tt.a))||il;function jl(t){return jl="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},jl(t)}function xl(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 Sl(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 Sl(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 Sl(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 Pl(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,a=void 0===i?4:i,u=t.className,c={cx:r,cy:o,r:a,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=xl(t,2),r=e[0],n=e[1];"object"!==jl(n)&&(c[r]=n)})),c.className=u?"lf-basic-shape ".concat(u):"lf-basic-shape",Object(tt.g)("circle",c)}function kl(t){return kl="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},kl(t)}function Al(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 Dl(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 Dl(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 Dl(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 Tl(){return Tl=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},Tl.apply(this,arguments)}function Ml(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nl(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 Cl(t,e,r){return e&&Nl(t.prototype,e),r&&Nl(t,r),t}function Rl(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&&Il(t,e)}function Il(t,e){return Il=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Il(t,e)}function Ll(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=Hl(t);if(e){var o=Hl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zl(this,r)}}function zl(t,e){if(e&&("object"===kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Bl(t)}function Bl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}function Xl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ul,Fl=function(t){Rl(r,t);var e=Ll(r);function r(){var t;return Ml(this,r),Xl(Bl(t=e.call(this)),"dragHandler",void 0),Xl(Bl(t),"onDraging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.bezierModel,a=n.type,u=o.getPointByClient({x:r.clientX,y:r.clientY}).canvasOverlayPosition,c=u.x,s=u.y;i.updateAdjustAnchor({x:c,y:s},a)})),Xl(Bl(t),"onDragEnd",(function(){t.props.bezierModel.isDragging=!1})),t.dragHandler=new Uc({onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return Cl(r,[{key:"render",value:function(){var t=this,e=this.props.position,r=e.x,n=e.y,o=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(tt.g)(Pl,Tl({className:"lf-bezier-adjust-anchor",x:r,y:n},o,{onMouseDown:function(e){t.dragHandler.handleMouseDown(e)}}))}}]),r}(tt.a),Gl=Jm(_l=function(t){Rl(r,t);var e=Ll(r);function r(){return Ml(this,r),e.apply(this,arguments)}return Cl(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=Al(mc(r),4),i=o[0],a=o[1],u=o[2],c=o[3],s=t.getEdgeStyle().adjustLine,l=[];return l.push(Object(tt.g)(Ks,Tl({x1:i.x,y1:i.y,x2:a.x,y2:a.y},s))),l.push(Object(tt.g)(Fl,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(tt.g)(Ks,Tl({x1:c.x,y1:c.y,x2:u.x,y2:u.y},s))),l.push(Object(tt.g)(Fl,{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===fo.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(tt.a))||_l;function Yl(t){return Yl="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},Yl(t)}function Vl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wl(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 Kl(t,e){return Kl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Kl(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 Zl(this,r)}}function Zl(t,e){if(e&&("object"===Yl(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 ql(t){return ql=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ql(t)}var Jl,Ql=Jm(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&&Kl(t,e)}(i,t);var e,r,n,o=$l(i);function i(){return Vl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props.children;return Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(tt.g)("g",{transform:t},e))}}])&&Wl(e.prototype,r),n&&Wl(e,n),i}(tt.a))||Ul;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},tf(t)}function ef(){return ef=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},ef.apply(this,arguments)}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},of(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=cf(t);if(e){var o=cf(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"===tf(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 cf(t){return cf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cf(t)}var sf=Jm(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&&of(t,e)}(i,t);var e,r,n,o=af(i);function i(){return rf(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getComponent",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay",n=this.props.getView,o=n(t.type);return Object(tt.g)(o,{key:t.id,model:t,graphModel:e,overlay:r})}},{key:"render",value:function(){var t=this,e=this.props,r=e.graphModel,n=e.tool,o=e.options,i=e.dnd,a=e.snaplineModel,u={};o.width&&(u.width="".concat(r.width,"px")),o.height&&(u.height="".concat(r.height,"px"));var c=r.fakerNode,s=r.editConfigModel.adjustEdge;return Object(tt.g)("div",{className:"lf-graph",style:u},Object(tt.g)(ys,{graphModel:r,dnd:i},Object(tt.g)("g",{className:"lf-base"},yn(r.sortElements,(function(e){return t.getComponent(e,r)}))),c?this.getComponent(c,r):""),Object(tt.g)(Ql,{graphModel:r},Object(tt.g)(El,{graphModel:r}),s?Object(tt.g)(Gl,{graphModel:r}):"",o.isSilentMode||!1===o.snapline?"":Object(tt.g)(al,{snaplineModel:a})),Object(tt.g)(js,{graphModel:r,tool:n}),o.background&&Object(tt.g)(Ns,{background:o.background}),o.grid&&Object(tt.g)(Fs,ef({},o.grid,{graphModel:r})))}}],r&&nf(e.prototype,r),n&&nf(e,n),i}(tt.a))||Jl,lf=sf;function ff(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 pf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ff(Object(r),!0).forEach((function(e){yf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ff(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}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 yf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hf=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),yf(this,"nodeConfig",void 0),yf(this,"lf",void 0),yf(this,"fakerNode",void 0),yf(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),yf(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(pf(pf({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),yf(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.graphModel.eventCenter.emit(yo.NODE_DND_DRAG,{data:i})}return!1})),yf(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),yf(this,"onDrop",(function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(pf(pf({},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.graphModel.eventCenter.emit(yo.NODE_DND_ADD,{data:n})}}));var n=e.lf;this.lf=n}var e,r,n;return e=t,(r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=tn(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,a=o.y;return{x:zi(i,n),y:zi(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}}}])&&df(e.prototype,r),n&&df(e,n),t}();function vf(t){var e=t.container,r=t.grid,n=t.width,o=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if("string"==typeof n||"string"==typeof o)throw new Error("width或height不支持传入字符串,请传数字");return r&&(t.grid=Mn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Mn({},mf,t)}var gf,bf,mf={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Of(t){return Of="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},Of(t)}function wf(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 _f(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 _f(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 _f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ef(t,e){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 jf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ef(Object(r),!0).forEach((function(e){Rf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ef(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xf(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Sf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pf(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 kf(){return kf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Af(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},kf.apply(this,arguments)}function Af(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cf(t)););return t}function Df(t,e){return Df=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Df(t,e)}function Tf(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=Cf(t);if(e){var o=Cf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mf(this,r)}}function Mf(t,e){if(e&&("object"===Of(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Nf(t)}function Nf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cf(t){return Cf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cf(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 If(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 Lf=(gf=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&&Df(t,e)}(i,t);var e,r,n,o=Tf(i);function i(){var t;Sf(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Rf(Nf(t=o.call.apply(o,[this].concat(r))),"modelType",fo.BEZIER_EDGE),xf(Nf(t),"path",bf,Nf(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=100,kf(Cf(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return jf(jf({},kf(Cf(i.prototype),"getEdgeStyle",this).call(this)),Oi(t))}},{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=kf(Cf(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return jf(jf({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return bc({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=wf(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=this.getControls(),e=t.sNext,r=t.ePre;this.updatePath(e,r)}},{key:"updatePath",value:function(t,e){var r={x:this.startPoint.x,y:this.startPoint.y},n={x:this.endPoint.x,y:this.endPoint.y};if(!t||!e){var o=this.getControls();t=o.sNext,e=o.ePre}this.pointsList=[r,t,e,n],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e;var r=wf(this.pointsList,3),n=r[1],o=r[2];n.x+=t,n.y+=e,this.updatePath(n,o)}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e;var r=wf(this.pointsList,3),n=r[1],o=r[2];o.x+=t,o.y+=e,this.updatePath(n,o)}},{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=bc({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()}}])&&Pf(e.prototype,r),n&&Pf(e,n),i}(nu),bf=If(gf.prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),If(gf.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"initPoints"),gf.prototype),If(gf.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"updatePoints"),gf.prototype),If(gf.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"updateStartPoint"),gf.prototype),If(gf.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"updateEndPoint"),gf.prototype),If(gf.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"moveStartPoint"),gf.prototype),If(gf.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"moveEndPoint"),gf.prototype),If(gf.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"updateAdjustAnchor"),gf.prototype),If(gf.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"getAdjustStart"),gf.prototype),If(gf.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"getAdjustEnd"),gf.prototype),If(gf.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(gf.prototype,"updateAfterAdjustStartAndEnd"),gf.prototype),gf);var zf,Bf,Hf,Xf,Uf,Ff,Gf,Yf,Vf,Wf,Kf,$f,Zf,qf,Jf,Qf,tp,ep,rp,np=function(t){return null==t};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},op(t)}function ip(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 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&&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 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,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 cp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?up(Object(r),!0).forEach((function(e){fp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):up(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function sp(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 lp(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 fp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pp(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 dp,yp,hp=(zf=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),fp(this,"id",Qi()),sp(this,"type",Bf,this),sp(this,"x",Hf,this),sp(this,"y",Xf,this),sp(this,"text",Uf,this),sp(this,"properties",Ff,this),sp(this,"_width",Gf,this),sp(this,"_height",Yf,this),sp(this,"anchorsOffset",Vf,this),sp(this,"isSelected",Wf,this),sp(this,"isHovered",Kf,this),sp(this,"isDragging",$f,this),sp(this,"isHitable",Zf,this),sp(this,"draggable",qf,this),sp(this,"visible",Jf,this),fp(this,"graphModel",void 0),sp(this,"zIndex",Qf,this),sp(this,"state",tp,this),sp(this,"autoToFront",ep,this),sp(this,"style",rp,this),fp(this,"BaseType",po.NODE),fp(this,"modelType",fo.NODE),fp(this,"additionStateData",void 0),fp(this,"targetRules",[]),fp(this,"sourceRules",[]),fp(this,"moveRules",[]),fp(this,"hasSetTargetRules",!1),fp(this,"hasSetSourceRules",!1),this.graphModel=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:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{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),Mn(this,function(t){return oo(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===mo.INCREASE&&(this.zIndex=t.zIndex||$a())}},{key:"setAttributes",value:function(){}},{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:"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===mo.INCREASE&&(a.zIndex=this.zIndex),n&&(a.text={x:e,y:r,value:n}),a}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getNodeStyle",value:function(){return cp(cp({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return Oi(t)}},{key:"getAnchorStyle",value:function(t){var e=this.graphModel.theme.anchor;return Oi(e)}},{key:"getAnchorLineStyle",value:function(){var t=this.graphModel.theme.anchorLine;return Oi(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return Oi(t)}},{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=!0,o=!0,i=ip(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(i.s();!(r=i.n()).done;){var a=(0,r.value)(this,t,e);if(!a)return!1;if("object"===op(a)){var u=a;if(!1===u.x&&!1===u.y)return!1;n=n&&u.x,o=o&&u.y}}}catch(t){i.e(t)}finally{i.f()}return{x:n,y:o}}},{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]}):cp(cp({},t=t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",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:"getAnchorInfo",value:function(t){if(!np(t))for(var e=0;e<this.anchors.length;e++){var r=this.anchors[e];if(r.id===t)return r}}},{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],n=!1,o=!1;if(r)n=!0,o=!0;else{var i=this.isAllowMoveNode(t,e);"boolean"==typeof i?(n=i,o=i):(n=i.x,o=i.y)}if(n){var a=this.x+t;this.x=a,this.text&&this.moveText(t,0)}if(o){var u=this.y+e;this.y=u,this.text&&this.moveText(0,e)}return n||o}},{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;return!(!r&&!this.isAllowMoveNode(n,o)||(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e,0))}},{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=cp(cp({},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:"setProperty",value:function(t,e){this.properties=cp(cp({},this.properties),{},fp({},t,Va(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=cp(cp({},this.properties),Va(t)),this.setAttributes()}},{key:"setStyle",value:function(t,e){this.style=cp(cp({},this.style),{},fp({},t,Va(e)))}},{key:"setStyles",value:function(t){this.style=cp(cp({},this.style),Va(t))}},{key:"updateStyles",value:function(t){this.style=cp({},Va(t))}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){Mn(this,t)}}],r&&lp(e.prototype,r),n&&lp(e,n),t}(),Bf=pp(zf.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Hf=pp(zf.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Xf=pp(zf.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Uf=pp(zf.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Ff=pp(zf.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Gf=pp(zf.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Yf=pp(zf.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Vf=pp(zf.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Wf=pp(zf.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kf=pp(zf.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$f=pp(zf.prototype,"isDragging",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zf=pp(zf.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qf=pp(zf.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jf=pp(zf.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Qf=pp(zf.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),tp=pp(zf.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ep=pp(zf.prototype,"autoToFront",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),rp=pp(zf.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),pp(zf.prototype,"incoming",[o.m],Object.getOwnPropertyDescriptor(zf.prototype,"incoming"),zf.prototype),pp(zf.prototype,"outgoing",[o.m],Object.getOwnPropertyDescriptor(zf.prototype,"outgoing"),zf.prototype),pp(zf.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"addNodeMoveRules"),zf.prototype),pp(zf.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"move"),zf.prototype),pp(zf.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"moveTo"),zf.prototype),pp(zf.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"moveText"),zf.prototype),pp(zf.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"updateText"),zf.prototype),pp(zf.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setSelected"),zf.prototype),pp(zf.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setHovered"),zf.prototype),pp(zf.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setHitable"),zf.prototype),pp(zf.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setElementState"),zf.prototype),pp(zf.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setProperty"),zf.prototype),pp(zf.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setProperties"),zf.prototype),pp(zf.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setStyle"),zf.prototype),pp(zf.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setStyles"),zf.prototype),pp(zf.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"updateStyles"),zf.prototype),pp(zf.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"setZIndex"),zf.prototype),pp(zf.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(zf.prototype,"updateAttributes"),zf.prototype),zf);function vp(t){return vp="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},vp(t)}function gp(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 bp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gp(Object(r),!0).forEach((function(e){Ap(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mp(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 Op(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wp(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 _p(){return _p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ep(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_p.apply(this,arguments)}function Ep(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kp(t)););return t}function jp(t,e){return jp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},jp(t,e)}function xp(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=kp(t);if(e){var o=kp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sp(this,r)}}function Sp(t,e){if(e&&("object"===vp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Pp(t)}function Pp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kp(t){return kp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},kp(t)}function Ap(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dp(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 Tp,Mp,Np,Cp=(dp=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&&jp(t,e)}(i,t);var e,r,n,o=xp(i);function i(){var t;Op(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ap(Pp(t=o.call.apply(o,[this].concat(r))),"modelType",fo.CIRCLE_NODE),mp(Pp(t),"r",yp,Pp(t)),t}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var t=_p(kp(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return bp(bp({},t),Oi(e))}},{key:"getDefaultAnchor",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")}]}}])&&wp(e.prototype,r),n&&wp(e,n),i}(hp),yp=Dp(dp.prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Dp(dp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(dp.prototype,"width"),dp.prototype),Dp(dp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(dp.prototype,"height"),dp.prototype),dp);r(127);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},Rp(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){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 Bp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zp(Object(r),!0).forEach((function(e){Zp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Hp(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 Xp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Up(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 Fp(){return Fp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Gp(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fp.apply(this,arguments)}function Gp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$p(t)););return t}function Yp(t,e){return Yp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Yp(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=$p(t);if(e){var o=$p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wp(this,r)}}function Wp(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 Kp(t)}function Kp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $p(t){return $p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$p(t)}function Zp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qp(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 Jp,Qp,td,ed=(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&&Yp(t,e)}(i,t);var e,r,n,o=Vp(i);function i(){var t;Xp(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Zp(Kp(t=o.call.apply(o,[this].concat(r))),"modelType",fo.DIAMOND_NODE),Hp(Kp(t),"rx",Mp,Kp(t)),Hp(Kp(t),"ry",Np,Kp(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Fp($p(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return Bp(Bp({},t),Oi(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=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:"getDefaultAnchor",value:function(){var t=this;return this.points.map((function(e,r){var n=Ip(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&Up(e.prototype,r),n&&Up(e,n),i}(hp),Mp=qp(Tp.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Np=qp(Tp.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),qp(Tp.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(Tp.prototype,"points"),Tp.prototype),qp(Tp.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Tp.prototype,"pointsPosition"),Tp.prototype),qp(Tp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Tp.prototype,"width"),Tp.prototype),qp(Tp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Tp.prototype,"height"),Tp.prototype),Tp);function rd(t){return rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rd(t)}function nd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function od(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nd(Object(r),!0).forEach((function(e){hd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function id(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 ad(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 cd(){return cd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=sd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},cd.apply(this,arguments)}function sd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yd(t)););return t}function ld(t,e){return ld=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ld(t,e)}function fd(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=yd(t);if(e){var o=yd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pd(this,r)}}function pd(t,e){if(e&&("object"===rd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dd(t)}function dd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yd(t){return yd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},yd(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 vd(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 gd,bd,md=(Jp=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&&ld(t,e)}(i,t);var e,r,n,o=fd(i);function i(){var t;ad(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return hd(dd(t=o.call.apply(o,[this].concat(r))),"modelType",fo.ELLIPSE_NODE),id(dd(t),"rx",Qp,dd(t)),id(dd(t),"ry",td,dd(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=cd(yd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return od(od({},t),Oi(e))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&ud(e.prototype,r),n&&ud(e,n),i}(hp),Qp=vd(Jp.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),td=vd(Jp.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),vd(Jp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Jp.prototype,"width"),Jp.prototype),vd(Jp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Jp.prototype,"height"),Jp.prototype),Jp);function Od(t){return Od="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},Od(t)}function wd(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 _d(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 _d(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 _d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}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 jd(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){Rd(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 xd(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 Sd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pd(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 kd(){return kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ad(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},kd.apply(this,arguments)}function Ad(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cd(t)););return t}function Dd(t,e){return Dd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Dd(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=Cd(t);if(e){var o=Cd(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"===Od(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Nd(t)}function Nd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cd(t){return Cd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cd(t)}function Rd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,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=(gd=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&&Dd(t,e)}(i,t);var e,r,n,o=Td(i);function i(){var t;Sd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Rd(Nd(t=o.call.apply(o,[this].concat(r))),"modelType",fo.POLYGON_NODE),xd(Nd(t),"points",bd,Nd(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=kd(Cd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return jd(jd({},t),Oi(e))}},{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=wd(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=wd(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this,e=this.x,r=this.y,n=this.width,o=this.height;return this.points.map((function(i,a){var u=wd(i,2),c=u[0],s=u[1];return{x:e+c-n/2,y:r+s-o/2,id:"".concat(t.id,"_").concat(a)}}))}}])&&Pd(e.prototype,r),n&&Pd(e,n),i}(hp),bd=Id(gd.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Id(gd.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(gd.prototype,"pointsPosition"),gd.prototype),Id(gd.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(gd.prototype,"width"),gd.prototype),Id(gd.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(gd.prototype,"height"),gd.prototype),gd);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},Hd(t)}function Xd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ud(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xd(Object(r),!0).forEach((function(e){Qd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Fd(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 Gd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yd(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(){return Vd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Wd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Vd.apply(this,arguments)}function Wd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jd(t)););return t}function Kd(t,e){return Kd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Kd(t,e)}function $d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Jd(t);if(e){var o=Jd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zd(this,r)}}function Zd(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 qd(t)}function qd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jd(t){return Jd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Jd(t)}function Qd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ty,ey=(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&&Kd(t,e)}(i,t);var e,r,n,o=$d(i);function i(){var t;Gd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Qd(qd(t=o.call.apply(o,[this].concat(r))),"modelType",fo.RECT_NODE),Fd(qd(t),"radius",zd,qd(t)),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var t=Vd(Jd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return Ud(Ud({},t),Oi(e))}}])&&Yd(e.prototype,r),n&&Yd(e,n),i}(hp),zd=function(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}(Ld.prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ld);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},ry(t)}function ny(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 oy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ny(Object(r),!0).forEach((function(e){yy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function iy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ay(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function uy(){return uy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=cy(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},uy.apply(this,arguments)}function cy(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dy(t)););return t}function sy(t,e){return sy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},sy(t,e)}function ly(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 fy(this,r)}}function fy(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 py(t)}function py(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)},dy(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}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=(ty=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&sy(t,e)}(i,t);var e,r,n,o=ly(i);function i(){var t;iy(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return yy(py(t=o.call.apply(o,[this].concat(r))),"modelType",fo.TEXT_NODE),t}return e=i,(r=[{key:"getTextStyle",value:function(){var t=uy(dy(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return oy(oy({},t),Oi(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return Xa({rows:t,fontSize:e,rowsLength:t.length}).width}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return Xa({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&ay(e.prototype,r),n&&ay(e,n),i}(hp),hy(ty.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(ty.prototype,"width"),ty.prototype),hy(ty.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(ty.prototype,"height"),ty.prototype),ty);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},gy(t)}function by(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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},Oy(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=jy(t);if(e){var o=jy(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 Ey(t)}function Ey(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jy(t){return jy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jy(t)}function xy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Sy,Py,ky,Ay,Dy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Oy(t,e)}(i,t);var e,r,n,o=wy(i);function i(){var t;by(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return xy(Ey(t=o.call.apply(o,[this].concat(r))),"modelType",fo.HTML_NODE),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}}])&&my(e.prototype,r),n&&my(e,n),i}(hp);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 My(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 Ny(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 Cy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ry(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Iy=(Sy=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Cy(this,"graphModel",void 0),My(this,"isShowHorizontal",Py,this),My(this,"isShowVertical",ky,this),My(this,"position",Ay,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:"getStyle",value:function(){return function(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){Cy(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}({},this.graphModel.theme.snapline)}},{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=Na(a);else{var u=this.graphModel.getNodeModelById(i);n=Na(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=Na(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 Mn({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=Na(a);else{var u=this.graphModel.getNodeModelById(i);n=Na(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=Na(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 Mn({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)}}],r&&Ny(e.prototype,r),n&&Ny(e,n),t}(),Py=Ry(Sy.prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ky=Ry(Sy.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ay=Ry(Sy.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ry(Sy.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(Sy.prototype,"clearSnapline"),Sy.prototype),Ry(Sy.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(Sy.prototype,"setNodeSnapLine"),Sy.prototype),Sy),Ly=new Map,zy=function(t){var e=Qi();var r=window.requestAnimationFrame((function r(){if(t(),Ly.get(e)){var n=window.requestAnimationFrame(r);Ly.set(e,n)}}));return Ly.set(e,r),e},By=function(t){var e=Ly.get(t);e&&(window.cancelAnimationFrame(e),Ly.delete(t))};function Hy(t){return Hy="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},Hy(t)}function Xy(){return Xy=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},Xy.apply(this,arguments)}function Uy(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 Fy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Uy(Object(r),!0).forEach((function(e){Jy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gy(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 Yy(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 Yy(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 Yy(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 Vy(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 Wy(t,e){return Wy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Wy(t,e)}function Ky(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=qy(t);if(e){var o=qy(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"===Hy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zy(t)}function Zy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qy(t){return qy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qy(t)}function Jy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qy=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&&Wy(t,e)}(i,t);var e,r,n,o=Ky(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),Jy(Zy(t=o.call(this)),"preTargetNode",void 0),Jy(Zy(t),"sourceRuleResults",void 0),Jy(Zy(t),"targetRuleResults",void 0),Jy(Zy(t),"dragHandler",void 0),Jy(Zy(t),"t",void 0),Jy(Zy(t),"onDragStart",(function(e){var r=e.event,n=t.props,o=n.anchorData,i=n.nodeModel,a=n.graphModel,u=a.overlapMode;a.selectNodeById(i.id),u!==mo.INCREASE&&i.autoToFront&&a.toFront(i.id),a.eventCenter.emit(yo.ANCHOR_DRAGSTART,{data:o,e:r,nodeModel:i}),t.setState({startX:o.x,startY:o.y,endX:o.x,endY:o.y})})),Jy(Zy(t),"onDraging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.nodeModel,a=n.anchorData,u=o.transformModel,c=o.eventCenter,s=o.width,l=o.height,f=o.editConfigModel,p=f.autoExpand,d=f.stopMoveGraph,y=r.clientX,h=r.clientY,v=o.getPointByClient({x:y,y:h}),g=v.domOverlayPosition,b=g.x,m=g.y,O=v.canvasOverlayPosition,w=O.x,_=O.y;t.t&&By(t.t);var E=[];b<10?E=[10,0]:b+10>s?E=[-10,0]:m<10?E=[0,10]:m+10>l&&(E=[0,-10]),t.setState({endX:w,endY:_,draging:!0}),t.moveAnchorEnd(w,_),E.length>0&&!d&&p&&(t.t=zy((function(){var e=Gy(E,2),r=e[0],n=e[1];u.translate(r,n);var o=t.state,i=o.endX,a=o.endY;t.setState({endX:i-r,endY:a-n}),t.moveAnchorEnd(i-r,a-n)}))),c.emit(yo.ANCHOR_DRAG,{data:a,e:r,nodeModel:i})})),Jy(Zy(t),"onDragEnd",(function(e){t.t&&clearInterval(t.t),t.checkEnd(e),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear()})),Jy(Zy(t),"checkEnd",(function(e){var r=t.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,a=i.x,u=i.y,c=i.id,s=n.edgeType,l=t.state,f=l.endX,p=l.endY,d=l.draging,y=Pa({x:f,y:p},n);if(t.preTargetNode&&t.preTargetNode.state!==so.DEFAULT&&t.preTargetNode.setElementState(so.DEFAULT),d&&y&&y.node){var h=y.node,v=y.anchor.id,g="".concat(o.id,"_").concat(h.id,"_").concat(v,"_").concat(c),b=t.sourceRuleResults.get(g)||{},m=b.isAllPass,O=b.msg,w=t.targetRuleResults.get(g)||{},_=w.isAllPass,E=w.msg;if(m&&_){h.setElementState(so.DEFAULT);var j=n.addEdge({type:s,sourceNodeId:o.id,sourceAnchorId:c,startPoint:{x:a,y:u},targetNodeId:y.node.id,targetAnchorId:y.anchor.id,endPoint:{x:y.anchor.x,y:y.anchor.y}}),x=t.props.anchorData;n.eventCenter.emit(yo.ANCHOR_DROP,{data:x,e:e,nodeModel:o,edgeModel:j})}else{var S=h.getData();n.eventCenter.emit(yo.CONNECTION_NOT_ALLOWED,{data:S,msg:E||O})}}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,draging:!1},t.dragHandler=new Uc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"getAnchorShape",value:function(){var t=this.props,e=t.anchorData,r=t.style,n=t.node.getAnchorShape(e);if(n)return n;var o=e.x,i=e.y,a=Fy(Fy({},r),r.hover);return Object(tt.g)("g",null,Object(tt.g)(Pl,Xy({className:"lf-node-anchor-hover"},a,{x:o,y:i})),Object(tt.g)(Pl,Xy({className:"lf-node-anchor"},r,{x:o,y:i})))}},{key:"moveAnchorEnd",value:function(t,e){var r=this.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,a=Pa({x:t,y:e},n);if(a){var u=a.node,c=a.anchor.id;if(this.preTargetNode&&this.preTargetNode!==a.node&&this.preTargetNode.setElementState(so.DEFAULT),i.id===c)return;this.preTargetNode=u;var s="".concat(o.id,"_").concat(u.id,"_").concat(c,"_").concat(i.id);if(!this.targetRuleResults.has(s)){var l=a.anchor,f=o.isAllowConnectedAsSource(u,i,l),p=u.isAllowConnectedAsTarget(o,i,l);this.sourceRuleResults.set(s,Ua(f)),this.targetRuleResults.set(s,Ua(p))}var d=this.sourceRuleResults.get(s).isAllPass,y=this.targetRuleResults.get(s).isAllPass;d&&y?u.setElementState(so.ALLOW_CONNECT):u.setElementState(so.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==so.DEFAULT&&this.preTargetNode.setElementState(so.DEFAULT)}},{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return Da(e,r,n,o)>10}},{key:"render",value:function(){var t=this,e=this.state,r=e.startX,n=e.startY,o=e.endX,i=e.endY,a=this.props,u=a.anchorData.edgeAddable,c=a.edgeStyle;return Object(tt.g)("g",{className:"lf-anchor"},Object(tt.g)("g",{onMouseDown:function(e){!1!==u&&t.dragHandler.handleMouseDown(e)}},this.getAnchorShape()),this.isShowLine()&&Object(tt.g)(Ks,Xy({x1:r,y1:n,x2:o,y2:i},c,{"pointer-events":"none"})))}}])&&Vy(e.prototype,r),n&&Vy(e,n),i}(tt.a);r(63);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 eh(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){rh(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 rh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nh(t){return nh="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},nh(t)}function oh(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 ih(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 ih(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 ih(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.value,a=t.fontSize,u=t.fill,c=void 0===u?"currentColor":u,s=t.overflowMode,l=void 0===s?"default":s,f=t.textWidth,p=void 0===f?"":f,d=t.model,y={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=oh(t,2),r=e[0],n=e[1];"object"!==nh(n)&&(y[r]=n)})),i){var h=String(i).split(/[\r\n]/g),v=h.length;if("default"!==l){var g=d.BaseType,b=d.modelType;if(g===po.NODE&&b!==fo.TEXT_NODE||g===po.EDGE&&p)return function(t){var e=t.value,r=t.fontSize,n=t.model,o=t.fontFamily,i=void 0===o?"":o,a=t.lineHeight,u=t.wrapPadding,c=void 0===u?"0, 0":u,s=t.overflowMode,l=t.x,f=t.y,p=n.width,d=n.textHeight,y=t.textWidth||p,h=String(e).split(/[\r\n]/g),v=h.length,g=Ha({rows:h,style:{fontSize:"".concat(r,"px"),width:"".concat(y,"px"),fontFamily:i,lineHeight:a,padding:c},rowsLength:v,className:"lf-get-text-height"}),b=n.height>g?n.height:g;d&&(b=d);var m="ellipsis"===s;return Object(tt.g)("g",null,Object(tt.g)("foreignObject",{width:y,height:b,x:l-y/2,y:f-b/2},Object(tt.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:b,width:y,padding:c}},Object(tt.g)("div",{className:m?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:eh({},t)},h.map((function(t){return Object(tt.g)("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t)}if(v>1){var m=h.map((function(t,e){var n=(e-(v-1)/2)*(a+2);return Object(tt.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(tt.g)("text",y,m)}return Object(tt.g)("text",y,i)}}function uh(t){return uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uh(t)}function ch(){return ch=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},ch.apply(this,arguments)}function sh(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 lh(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 lh(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 lh(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 fh(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 ph(t,e){return ph=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ph(t,e)}function dh(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=vh(t);if(e){var o=vh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yh(this,r)}}function yh(t,e){if(e&&("object"===uh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return hh(t)}function hh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vh(t){return vh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vh(t)}function gh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var bh=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&&ph(t,e)}(i,t);var e,r,n,o=dh(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),gh(hh(e=o.call(this)),"dragHandler",void 0),gh(hh(e),"sumDeltaX",0),gh(hh(e),"sumDeltaY",0),gh(hh(e),"stepDrag",void 0),gh(hh(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=sh(o.graphModel.transformModel.fixDeltaXY(r,n),2),u=a[0],c=a[1];i.moveText(u,c)})),gh(hh(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(so.TEXT_EDIT)})),gh(hh(e),"mouseDownHandle",(function(t){var r=e.props,n=r.draggable,o=r.graphModel.editConfigModel.nodeTextDraggable;(n||o)&&e.stepDrag.handleMouseDown(t)}));var r=t.model,n=t.draggable;return e.stepDrag=new Uc({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.graphModel,n=e.text,o=r.editConfigModel,i=n.value,a=n.x,u=n.y,c=n.editable,s=n.draggable,l={x:a,y:u,className:"",value:i};c?l.className="lf-element-text":s||o.nodeTextDraggable?l.className="lf-text-draggable":l.className="lf-text-disabled";var f=e.getTextStyle();return Object(tt.g)(ah,ch({},l,f,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return Object(tt.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&fh(e.prototype,r),n&&fh(e,n),i}(tt.a),mh=null!==window.navigator.userAgent.match(/MSIE|Trident/);function Oh(t){return Oh="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},Oh(t)}function wh(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 _h(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 _h(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 _h(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 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},jh(t,e)}function xh(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 Sh(this,r)}}function Sh(t,e){if(e&&("object"===Oh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ph(t)}function Ph(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)},kh(t)}function Ah(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Dh=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=xh(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),Ah(Ph(e=o.call(this)),"t",void 0),Ah(Ph(e),"moveOffset",void 0),Ah(Ph(e),"stepDrag",void 0),Ah(Ph(e),"contextMenuTime",void 0),Ah(Ph(e),"startTime",void 0),Ah(Ph(e),"clickTimer",void 0),Ah(Ph(e),"onDragStart",(function(t){var r=t.event,n=r.clientX,o=r.clientY,i=e.props,a=i.model,u=i.graphModel.getPointByClient({x:n,y:o}).canvasOverlayPosition,c=u.x,s=u.y;e.moveOffset={x:a.x-c,y:a.y-s}})),Ah(Ph(e),"onDraging",(function(t){var r=t.event,n=e.props,o=n.model,i=n.graphModel,a=i.editConfigModel,u=a.stopMoveGraph,c=a.autoExpand,s=i.transformModel,l=i.width,f=i.height,p=i.gridSize;o.isDragging=!0;var d=r.clientX,y=r.clientY,h=i.getPointByClient({x:d,y:y}).canvasOverlayPosition,v=h.x,g=h.y,b=wh(s.CanvasPointToHtmlPoint([v,g]),2),m=b[0],O=b[1];if(v+=e.moveOffset.x,g+=e.moveOffset.y,v=zi(v,p),g=zi(g,p),l&&f){if(!c||u||!(m<0||O<0||m>l||O>f)){var w=wh(s.CanvasPointToHtmlPoint([v-o.width/2,g-o.height/2]),2),_=w[0],E=w[1],j=wh(s.CanvasPointToHtmlPoint([v+o.width/2,g+o.height/2]),2),x=j[0],S=j[1],P=Math.max(p,20),k=[];_<0?k=[P,0]:x>i.width?k=[-P,0]:E<0?k=[0,P]:S>i.height&&(k=[0,-P]),e.t&&By(e.t),k.length>0&&!u&&c?e.t=zy((function(){var t=wh(k,2),e=t[0],r=t[1];s.translate(e,r),i.moveNode(o.id,-e/s.SCALE_X,-r/s.SCALE_X)})):i.moveNode2Coordinate(o.id,v,g)}}else i.moveNode2Coordinate(o.id,v,g)})),Ah(Ph(e),"onDragEnd",(function(){e.t&&By(e.t),e.props.model.isDragging=!1})),Ah(Ph(e),"handleClick",(function(t){if(e.startTime&&!((new Date).getTime()-e.startTime>200)){var r=e.props,n=r.model,o=r.graphModel,i={data:n.getData(),e:t,position:o.getPointByClient({x:t.clientX,y:t.clientY})},a=2===t.button,u=2===t.detail;if(!a){var c=o.editConfigModel;o.selectNodeById(n.id,Gi(t,c)),e.toFront(),u?(c.nodeTextEdit&&n.text.editable&&(n.setSelected(!1),o.setElementStateById(n.id,so.TEXT_EDIT)),o.eventCenter.emit(yo.NODE_DBCLICK,i)):(o.eventCenter.emit(yo.ELEMENT_CLICK,i),o.eventCenter.emit(yo.NODE_CLICK,i))}}})),Ah(Ph(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.model,o=r.graphModel,i=n.getData(),a=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(n.id,so.SHOW_MENU,a.domOverlayPosition),o.selectNodeById(n.id),o.eventCenter.emit(yo.NODE_CONTEXTMENU,{data:i,e:t,position:a}),e.toFront()})),Ah(Ph(e),"handleMouseDown",(function(t){var r=e.props,n=r.model,o=r.graphModel;e.toFront(),e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),Ah(Ph(e),"setHoverON",(function(t){if(!e.state.isHovered){e.setState({isHovered:!0});var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.setHovered(!0),o.eventCenter.emit(yo.NODE_MOUSEENTER,{data:i,e:t})}})),Ah(Ph(e),"setHoverOFF",(function(t){e.setState({isHovered:!1});var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.setHovered(!1),o.eventCenter.emit(yo.NODE_MOUSELEAVE,{data:i,e:t})})),Ah(Ph(e),"onMouseOut",(function(t){mh&&e.setHoverOFF(t)}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter,u=t.model;return e.stepDrag=new Uc({onDragStart:e.onDragStart,onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:n,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:u}),e.state={isHovered:!1},e}return e=i,n=[{key:"getModel",value:function(t){return t}}],(r=[{key:"getAnchorShape",value:function(t){return null}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.isSelected,i=r.isHitable,a=r.isDragging,u=this.state.isHovered;if(i&&(o||u)&&!a){var c=r.getAnchorLineStyle();return yn(r.anchors,(function(e,o){var i=r.getAnchorStyle(e);return Object(tt.g)(Qy,{anchorData:e,node:t,style:i,edgeStyle:c,anchorIndex:o,nodeModel:r,graphModel:n,setHoverOFF:t.setHoverOFF})}))}return[]}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===so.TEXT_EDIT)return"";if(e.text){var n=r.editConfigModel,o=!1;return(e.text.draggable||n.nodeTextDraggable)&&(o=!0),Object(tt.g)(bh,{editable:n.nodeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,r=t.isDraging,n=t.isSelected,o="lf-node";switch(e){case so.ALLOW_CONNECT:o+=" lf-node-allow";break;case so.NOT_ALLOW_CONNECT:o+=" lf-node-not-allow";break;default:o+=" lf-node-default"}return r&&(o+=" lf-isDragging"),n&&(o+=" lf-node-selected"),o}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;r.overlapMode!==mo.INCREASE&&e.autoToFront&&r.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,r=e.model,n=e.graphModel,o=n.editConfigModel,i=o.hideAnchors,a=o.adjustNodePosition,u=n.gridSize,c=n.transformModel.SCALE_X,s=r.isHitable,l=r.draggable,f=Object(tt.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(tt.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(tt.g)("g",{className:this.getStateClassName()},f),t}}])&&Eh(e.prototype,r),n&&Eh(e,n),i}(tt.a);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},Th(t)}function Mh(){return Mh=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},Mh.apply(this,arguments)}function Nh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ch(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 Rh(t,e){return Rh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Rh(t,e)}function Ih(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=zh(t);if(e){var o=zh(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 zh(t){return zh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},zh(t)}var Bh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rh(t,e)}(i,t);var e,r,n,o=Ih(i);function i(){return Nh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(ll,Mh({},e,{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&Ch(e.prototype,r),n&&Ch(e,n),i}(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},Hh(t)}function Xh(){return Xh=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},Xh.apply(this,arguments)}function Uh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fh(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 Gh(t,e){return Gh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gh(t,e)}function Yh(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=Wh(t);if(e){var o=Wh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vh(this,r)}}function Vh(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 function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wh(t){return Wh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wh(t)}var Kh=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&&Gh(t,e)}(i,t);var e,r,n,o=Yh(i);function i(){return Uh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.r,o=t.getNodeStyle();return Object(tt.g)(Pl,Xh({},o,{x:e,y:r,r:n}))}}])&&Fh(e.prototype,r),n&&Fh(e,n),i}(Dh);function $h(t){return $h="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},$h(t)}function Zh(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 qh(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 qh(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 qh(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 Jh(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach((function(t){var e=Zh(t,2),r=e[0],o=e[1];"object"!==$h(o)&&(n[r]=o)})),n.className=r?"lf-basic-shape ".concat(r):"lf-basic-shape",n.points=e.map((function(t){return t.join(",")})).join(" "),Object(tt.g)("polygon",n)}function Qh(t){return Qh="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},Qh(t)}function tv(){return tv=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},tv.apply(this,arguments)}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},nv(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=av(t);if(e){var o=av(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"===Qh(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 av(t){return av=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},av(t)}var uv=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(){return ev(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.width,o=t.height,i=t.points,a=t.getNodeStyle(),u={transform:"matrix(1 0 0 1 ".concat(e-n/2," ").concat(r-o/2,")")};return Object(tt.g)("g",u,Object(tt.g)(Jh,tv({},a,{points:i,x:e,y:r})))}}])&&rv(e.prototype,r),n&&rv(e,n),i}(Dh);function cv(t){return cv="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},cv(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},sv.apply(this,arguments)}function lv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fv(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 pv(t,e){return pv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},pv(t,e)}function dv(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=hv(t);if(e){var o=hv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yv(this,r)}}function yv(t,e){if(e&&("object"===cv(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 hv(t){return hv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},hv(t)}var vv=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&&pv(t,e)}(i,t);var e,r,n,o=dv(i);function i(){return lv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)("g",null,Object(tt.g)(Jh,sv({},e,{points:t.points,x:t.x,y:t.y})))}}])&&fv(e.prototype,r),n&&fv(e,n),i}(Dh);function gv(t){return gv="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},gv(t)}function bv(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 mv(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 mv(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 mv(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 Ov(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=void 0===u?4:u,s=t.className,l={cx:r,cy:o,rx:a,ry:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=bv(t,2),r=e[0],n=e[1];"object"!==gv(n)&&(l[r]=n)})),l.className=s?"lf-basic-shape ".concat(s):"lf-basic-shape",Object(tt.g)("ellipse",l)}function wv(t){return wv="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},wv(t)}function _v(){return _v=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},_v.apply(this,arguments)}function Ev(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jv(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 xv(t,e){return xv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xv(t,e)}function Sv(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=kv(t);if(e){var o=kv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Pv(this,r)}}function Pv(t,e){if(e&&("object"===wv(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 kv(t){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},kv(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&&xv(t,e)}(i,t);var e,r,n,o=Sv(i);function i(){return Ev(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(Ov,_v({},e,{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&jv(e.prototype,r),n&&jv(e,n),i}(Dh);function Dv(t){return Dv="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},Dv(t)}function Tv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tv(Object(r),!0).forEach((function(e){Nv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Iv(t,e){return Iv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Iv(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"===Dv(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)},Bv(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 Cv(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getBackgroud",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.text;if(r&&r.value&&e.background&&"transparnet"!==e.background.fill){var n=r.x,o=r.y,i=t.width,a=t.height,u=Mv(Mv({},e.background),{},{x:n,y:o-1,width:i,height:a});return Object(tt.g)(ll,u)}}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getBackgroud())}}])&&Rv(e.prototype,r),n&&Rv(e,n),i}(Dh);function Xv(t){return Xv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xv(t)}function Uv(){return Uv=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},Uv.apply(this,arguments)}function Fv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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},Yv(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"===Xv(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)},$v(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}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;Fv(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Zv(Kv(t=o.call.apply(o,[this].concat(r))),"ref",void 0),Zv(Kv(t),"currrentProperties",void 0),Zv(Kv(t),"preProperties",void 0),Zv(Kv(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:"shouldUpdate",value:function(){if(!this.preProperties||this.preProperties!==this.currrentProperties)return this.preProperties=this.currrentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.height,o=t.width,i=t.getNodeStyle();return this.currrentProperties=JSON.stringify(t.properties),Object(tt.g)("foreignObject",Uv({},i,{x:e-o/2,y:r-n/2,width:o,height:n,ref:this.setRef}))}}])&&Gv(e.prototype,r),n&&Gv(e,n),i}(Dh);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},Jv(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},Qv.apply(this,arguments)}function tg(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 eg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tg(Object(r),!0).forEach((function(e){cg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}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},ng(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"===Jv(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)},ug(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,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&&ng(t,e)}(i,t);var e,r,n,o=og(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),cg(ag(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHoverd:!0})})),cg(ag(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=t.getTextStyle(),r=t.text,n=e.background||{};if(this.state.isHoverd&&e.hover&&e.hover.background&&(n=eg(eg({},n),e.hover.background)),r&&r.value&&"transparent"!==n.fill){var o,i=e.fontSize,a=e.overflowMode,u=e.lineHeight,c=e.wrapPadding,s=e.textWidth,l=r.value,f=r.x,p=r.y,d=String(l).split(/[\r\n]/g),y=d.length;if("autoWrap"===a&&s){var h=Ha({rows:d,style:{fontSize:"".concat(i,"px"),width:"".concat(s,"px"),lineHeight:u,padding:c},rowsLength:y,className:"lf-get-text-height"});o=eg(eg({},n),{},{x:f-1,y:p-1,width:s,height:h})}else{var v=0;d&&d.forEach((function(t){var e=gc(t);v=e>v?e:v}));var g=Xa({rows:d,fontSize:i,rowsLength:y}),b=g.width,m=g.height;if("string"==typeof n.wrapPadding){var O=n.wrapPadding.split(",").filter((function(t){return t.trim()})).map((function(t){return parseFloat(t.trim())}));O.length>0&&O.length<=4&&(1===O.length?O=[O[0],O[0],O[0],O[0]]:2===O.length?O=[O[0],O[1],O[0],O[1]]:3===O.length&&(O=[O[0],O[1],O[2],O[1]]),b+=O[1]+O[3],m+=O[0]+O[2],f+=(O[1]-O[3])/2,p+=(O[2]-O[0])/2)}o=eg(eg({},n),{},{x:f-1,y:p-1,width:b,height:m})}return Object(tt.g)(ll,o)}}},{key:"getShape",value:function(){var t=this.props.model,e=t.text,r=e.value,n=e.x,o=e.y;if(r){var i=eg({x:n,y:o,className:"lf-element-text",value:r},t.getTextStyle());return Object(tt.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(tt.g)(ah,Qv({},i,{model:t})))}}}])&&rg(e.prototype,r),n&&rg(e,n),i}(bh);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},fg(t)}function pg(){return pg=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},pg.apply(this,arguments)}function dg(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 yg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dg(Object(r),!0).forEach((function(e){Eg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hg(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 vg(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 vg(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 vg(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 bg(t,e){return bg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},bg(t,e)}function mg(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=_g(t);if(e){var o=_g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Og(this,r)}}function Og(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 wg(t)}function wg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _g(t){return _g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_g(t)}function Eg(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"}(sg||(sg={}));var 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&&bg(t,e)}(i,t);var e,r,n,o=mg(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),Eg(wg(t=o.call(this)),"dragHandler",void 0),Eg(wg(t),"oldEdge",void 0),Eg(wg(t),"preTargetNode",void 0),Eg(wg(t),"targetRuleResults",void 0),Eg(wg(t),"sourceRuleResults",void 0),Eg(wg(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}),o.isHitable=!1})),Eg(wg(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=hg(c.transformModel.moveCanvasPointByHtml([i,a],r,n),2),f=l[0],p=l[1];t.setState({endX:f,endY:p,draging:!0});var d=t.props.edgeModel,y=Pa({x:i,y:a},c);if(y&&y.node&&t.isAllowAdjust(y)){var h,v=d.startPoint,g=d.endPoint,b=d.sourceNode,m=d.targetNode;s===sg.SOURCE?h={startPoint:{x:y.anchor.x,y:y.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:y.node,targetNode:m}:s===sg.TARGET&&(h={startPoint:{x:v.x,y:v.y},endPoint:{x:y.anchor.x,y:y.anchor.y},sourceNode:b,targetNode:y.node}),d.updateAfterAdjustStartAndEnd(h)}else s===sg.SOURCE?d.updateStartPoint({x:f,y:p}):s===sg.TARGET&&d.updateEndPoint({x:f,y:p})})),Eg(wg(t),"onDragEnd",(function(){var e;t.setState({draging:!1});var r=t.props,n=r.graphModel,o=r.edgeModel,i=r.type;o.isHitable=!0;var a=t.state,u=a.endX,c=a.endY,s=a.draging,l=Pa({x:u,y:c},n);if(s){if(l&&l.node&&t.isAllowAdjust(l)){var f,p=o.getData(),d=yg(yg({},p),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==p||null===(f=p.text)||void 0===f?void 0:f.value)||""});i===sg.SOURCE?d=yg(yg({},d),{},{sourceNodeId:l.node.id,sourceAnchorId:l.anchor.id,startPoint:{x:l.anchor.x,y:l.anchor.y},targetNodeId:o.targetNodeId,endPoint:yg({},o.endPoint)}):i===sg.TARGET&&(d=yg(yg({},d),{},{sourceNodeId:o.sourceNodeId,startPoint:yg({},o.startPoint),targetNodeId:l.node.id,targetAnchorId:l.anchor.id,endPoint:{x:l.anchor.x,y:l.anchor.y}})),n.deleteEdgeById(o.id);var y=n.addEdge(yg({},d));n.eventCenter.emit(yo.EDGE_EXCHANGE_NODE,{data:{newEdge:y.getData(),oldEdge:o.getData()}})}else t.recoveryEdge();null===(e=t.preTargetNode)||void 0===e||e.setElementState(so.DEFAULT)}})),Eg(wg(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!==fo.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),Eg(wg(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.targetRuleResults=new Map,t.sourceRuleResults=new Map,t.dragHandler=kc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"isAllowAdjust",value:function(t){var e=this.props,r=e.edgeModel,n=(r.id,r.sourceNode),o=r.targetNode,i=r.sourceAnchorId,a=r.targetAnchorId,u=e.type,c=null,s=null,l=null,f=null;if(u===sg.SOURCE?(c=t.node,s=o,l=t.anchor,f=o.getAnchorInfo(a)):(c=n,s=t.node,f=t.anchor,l=n.getAnchorInfo(i)),this.preTargetNode&&this.preTargetNode!==t.node&&this.preTargetNode.setElementState(so.DEFAULT),this.preTargetNode=t.node,f.id===l.id)return!1;var p="".concat(c.id,"_").concat(s.id,"_").concat(l.id,"_").concat(f.id);if(!this.targetRuleResults.has(p)){var d=c.isAllowConnectedAsSource(s,l,f),y=s.isAllowConnectedAsTarget(c,l,f);this.sourceRuleResults.set(p,Ua(d)),this.targetRuleResults.set(p,Ua(y))}var h=this.sourceRuleResults.get(p).isAllPass,v=this.targetRuleResults.get(p).isAllPass,g=h&&v?so.ALLOW_CONNECT:so.NOT_ALLOW_CONNECT;return u===sg.SOURCE?c.setElementState(g):s.setElementState(g),h&&v}},{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=this.state.draging,o=this.getAdjustPointStyle();return Object(tt.g)("g",null,Object(tt.g)(Pl,pg({className:"lf-edge-adjust-point"},o,{x:e,y:r,onMouseDown:this.dragHandler,"pointer-events":n?"none":""})))}}])&&gg(e.prototype,r),n&&gg(e,n),i}(tt.a);function xg(t){return xg="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},xg(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},Sg.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 kg(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){Ig(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 Ag(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dg(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 Tg(t,e){return Tg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tg(t,e)}function Mg(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 Ng(this,r)}}function Ng(t,e){if(e&&("object"===xg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Cg(t)}function Cg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rg(t){return Rg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Rg(t)}function Ig(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var 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&&Tg(t,e)}(i,t);var e,r,n,o=Mg(i);function i(){var t;Ag(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ig(Cg(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),Ig(Cg(t),"contextMenuTime",void 0),Ig(Cg(t),"clickTimer",void 0),Ig(Cg(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.graphModel.eventCenter;o.setHovered(e);var a=e?yo.EDGE_MOUSEENTER:yo.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})})),Ig(Cg(t),"setHoverON",(function(e){t.props.model.isHovered||t.handleHover(!0,e)})),Ig(Cg(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),Ig(Cg(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=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,so.SHOW_MENU,i.domOverlayPosition),t.toFront(),o.selectEdgeById(n.id);var a=null==n?void 0:n.getData();o.eventCenter.emit(yo.EDGE_CONTEXTMENU,{data:a,e:e,position:i})})),Ig(Cg(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),Ig(Cg(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=null==o?void 0:o.getData(),u=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var c=i.editConfigModel,s=i.textEditElement;if(s&&s.id===o.id&&i.setElementStateById(o.id,so.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,so.TEXT_EDIT),o.modelType===fo.POLYLINE_EDGE){var l=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,p=f.x,d=f.y,y=wc({x:p,y:d},l.points);l.dbClickPosition=y}i.eventCenter.emit(yo.EDGE_DBCLICK,{data:a,e:e,position:u})}else i.eventCenter.emit(yo.ELEMENT_CLICK,{data:a,e:e,position:u}),i.eventCenter.emit(yo.EDGE_CLICK,{data:a,e:e,position:u});var h=i.editConfigModel;i.selectEdgeById(o.id,Gi(e,h)),t.toFront()}})),Ig(Cg(t),"getIsDraging",(function(){return!1})),t}return e=i,(r=[{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===so.TEXT_EDIT)return"";var n=!1,o=r.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(n=!0),Object(tt.g)(lg,{editable:o.edgeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:n})}},{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.props,e=t.model,r=t.graphModel,n=e.getEdgeStyle(),o=e.getEdgeAnimationStyle(),i=r.theme.arrow,a=e.isAnimation?o.stroke:n.stroke;return kg(kg({},n),{},{fill:a,stroke:a},i)}},{key:"getArrow",value:function(){return Object(tt.g)("g",null,Object(tt.g)("defs",null,this.getStartArrow(),this.getEndArrow()))}},{key:"getStartArrow",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.id,o=r.theme.arrow,i=o.offset,a=o.verticalLength,u=this.getArrowStyle(),c=u.stroke,s=u.strokeWidth;return Object(tt.g)("marker",{id:"marker-start-".concat(n),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(tt.g)("path",{stroke:c,fill:c,strokeWidth:s,d:"M 0 0 L ".concat(i," -").concat(a," L ").concat(i," ").concat(a," Z")}))}},{key:"getEndArrow",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.id,o=r.theme.arrow,i=o.offset,a=o.verticalLength,u=this.getArrowStyle(),c=u.stroke,s=u.strokeWidth;return Object(tt.g)("marker",{id:"marker-end-".concat(n),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(tt.g)("path",{stroke:c,fill:c,strokeWidth:s,transform:"rotate(180)",d:"M 0 0 L ".concat(i," -").concat(a," L ").concat(i," ").concat(a," Z")}))}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.getAdjustStart(),o=e.getAdjustEnd();return Object(tt.g)("g",null,Object(tt.g)(jg,Sg({type:"SOURCE"},n,{edgeModel:e,graphModel:r})),Object(tt.g)(jg,Sg({type:"TARGET"},o,{edgeModel:e,graphModel:r})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(tt.g)("g",null)}},{key:"getAppend",value:function(){return Object(tt.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.overlapMode!==mo.INCREASE&&e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model,r=e.isSelected,n=e.isHitable,o=t.graphModel,i=this.getIsDraging(),a=o.editConfigModel.adjustEdgeStartAndEnd,u=o.animation,c=r&&u.edge&&1===o.getSelectElements().edges.length;return Object(tt.g)("g",null,Object(tt.g)("g",{className:["lf-edge",!n&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),c&&this.getAnimation(),this.getText(),this.getArrow()),a&&r&&!i?this.getAdjustPoints():"")}}])&&Dg(e.prototype,r),n&&Dg(e,n),i}(tt.a);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},zg(t)}function Bg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Hg(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 Hg(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 Hg(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 Xg=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=Bg(t,2),n=r[0],o=r[1],i=zg(o);"style"!==n&&"object"===i||(e[n]=o)})),Object(tt.g)("path",e)};function Ug(t){return Ug="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},Ug(t)}function Fg(){return Fg=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},Fg.apply(this,arguments)}function Gg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yg(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 Vg(t,e){return Vg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Vg(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=$g(t);if(e){var o=$g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Kg(this,r)}}function Kg(t,e){if(e&&("object"===Ug(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 $g(t){return $g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$g(t)}var Zg=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&&Vg(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:"getEdge",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeStyle(),a=t.getEdgeAnimationStyle(),u=a.strokeDasharray,c=a.stroke,s=a.strokeDashoffset,l=a.animationName,f=a.animationDuration,p=a.animationIterationCount,d=a.animationTimingFunction,y=a.animationDirection;return Object(tt.g)(Ks,Fg({},i,{x1:e.x,y1:e.y,x2:r.x,y2:r.y},o,n?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:s,animationName:l,animationDuration:f,animationIterationCount:p,animationTimingFunction:d,animationDirection:y}}:{}))}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),r=e.stroke,n=e.className,o=e.strokeDasharray,i=t.startPoint,a=t.endPoint,u=t.getEdgeStyle();return Object(tt.g)("g",null,Object(tt.g)(Ks,Fg({},u,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,className:n,strokeDasharray:o,stroke:r})))}},{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=zu(Hu(Hu({},o),{},{type:"start"})),a=zu(Hu(Hu({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:t.startPoint,end:t.endPoint}),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Object(tt.g)(Xg,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}}])&&Yg(e.prototype,r),n&&Yg(e,n),i}(Lg);function qg(t){return qg="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},qg(t)}function Jg(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 Qg(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 Qg(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 Qg(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 tb=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=Jg(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==qg(o)&&(e[n]=o)})),Object(tt.g)("polyline",e)};function eb(t){return eb="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},eb(t)}function rb(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?rb(Object(r),!0).forEach((function(e){db(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ob(){return ob=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},ob.apply(this,arguments)}function ib(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 ab(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 ab(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 ab(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 ub(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(t,e){return cb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cb(t,e)}function sb(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=pb(t);if(e){var o=pb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lb(this,r)}}function lb(t,e){if(e&&("object"===eb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fb(t)}function fb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pb(t){return pb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pb(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}var yb=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&&cb(t,e)}(i,t);var e,r,n,o=sb(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),db(fb(t=o.call(this)),"drag",void 0),db(fb(t),"isDraging",void 0),db(fb(t),"appendInfo",void 0),db(fb(t),"dragHandler",void 0),db(fb(t),"onDragStart",(function(){t.props.model.dragAppendStart()})),db(fb(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.transformModel,c=a.editConfigModel,s=ib(u.fixDeltaXY(r,n),2),l=s[0],f=s[1],p=i,d=c.adjustEdgeMiddle;t.appendInfo=d?p.dragAppendSimple(t.appendInfo,{x:l,y:f}):p.dragAppend(t.appendInfo,{x:l,y:f})})),db(fb(t),"onDragEnd",(function(){var e=t.props,r=e.model,n=e.graphModel.eventCenter,o=r;o.dragAppendEnd(),t.isDraging=!1,t.appendInfo=void 0,n.emit(yo.EDGE_ADJUST,{data:o.getData()})})),db(fb(t),"beforeDragStart",(function(e,r){r.dragAble&&t.dragHandler(e),t.appendInfo=r})),db(fb(t),"getIsDraging",(function(){return t.isDraging})),t.drag=kc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.points,r=t.isAnimation,n=t.arrowConfig,o=t.getEdgeStyle(),i=t.getEdgeAnimationStyle(),a=i.strokeDasharray,u=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,d=i.animationDirection;return Object(tt.g)(tb,ob({points:e},o,n,r?{strokeDasharray:a,stroke:u,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:d}}:{}))}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),r=e.stroke,n=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return Object(tt.g)("g",null,Object(tt.g)(tb,ob({points:t.points},i,{className:n,strokeDasharray:o,stroke:r})))}},{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=yc(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getAppendAttributes",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=zu(nb(nb({},o),{},{type:"start"})),a=zu(nb(nb({},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.getAppendAttributes(t),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Object(tt.g)(Xg,{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(tt.g)("g",{className:r},t.getAppendShape(c)),l=n.editConfigModel,f=l.adjustEdge,p=l.adjustEdgeMiddle;if(f&&i){t.dragHandler=t.drag;var d=c.startIndex,y=c.endIndex,h=p&&(0===d||y===u-1);c.dragAble=!h,c.start.x===c.end.x?(c.dragAble&&(r+="-ew-resize"),c.direction=ho.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=ho.HORIZONTAL),s=Object(tt.g)("g",{className:t.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Object(tt.g)("g",{className:r},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return Object(tt.g)("g",null,a)}}])&&ub(e.prototype,r),n&&ub(e,n),i}(Lg);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},hb(t)}function vb(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 gb(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 gb(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 gb(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 bb(){return bb=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},bb.apply(this,arguments)}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){return wb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},wb(t,e)}function _b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return 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)},jb(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&&wb(t,e)}(i,t);var e,r,n,o=_b(i);function i(){return mb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle(),r=t.path,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeAnimationStyle(),a=i.strokeDasharray,u=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,d=i.animationDirection;return Object(tt.g)(Xg,bb({d:r},e,o,n?{strokeDasharray:a,stroke:u,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:d}}:{}))}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),r=e.stroke,n=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return Object(tt.g)("g",null,Object(tt.g)(Xg,bb({d:t.path},i,{className:n,strokeDasharray:o,stroke:r})))}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return Object(tt.g)(Xg,{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=function(t){var e=mc(t);return[e[2],e[3]]}(n),a=vb(i,2);return{start:a[0],end:a[1],hover:e,isSelected:o}}}])&&Ob(e.prototype,r),n&&Ob(e,n),i}(Lg);function Sb(t){return Sb="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},Sb(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 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 Ab(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Db(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 Tb(t,e){return Tb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tb(t,e)}function Mb(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 Nb(this,r)}}function Nb(t,e){if(e&&("object"===Sb(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 Cb(t){return Cb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cb(t)}var Rb=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&&Tb(t,e)}(i,t);var e,r,n,o=Mb(i);function i(){return Ab(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getArrowAttributes",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=zu(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?Pb(Object(r),!0).forEach((function(e){kb(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}({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.getArrowAttributes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Object(tt.g)(Xg,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-arrow"},this.getShape())}}],r&&Db(e.prototype,r),n&&Db(e,n),i}(tt.a);var Ib=function(t,e){return Mr(t,e)};var Lb=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},zb=function(){return vt.a.Date.now()},Bb=/\s/;var Hb=function(t){for(var e=t.length;e--&&Bb.test(t.charAt(e)););return e},Xb=/^\s+/;var Ub=function(t){return t?t.slice(0,Hb(t)+1).replace(Xb,""):t},Fb=/^[-+]0x[0-9a-f]+$/i,Gb=/^0b[01]+$/i,Yb=/^0o[0-7]+$/i,Vb=parseInt;var Wb=function(t){if("number"==typeof t)return t;if(zr(t))return NaN;if(Pt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Pt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ub(t);var r=Gb.test(t);return r||Yb.test(t)?Vb(t.slice(2),r?2:8):Fb.test(t)?NaN:+t},Kb=Math.max,$b=Math.min;var Zb=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 d(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function y(t){return s=t,u=setTimeout(v,e),l?d(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=zb();if(h(t))return g(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?$b(r,i-(t-s)):r}(t))}function g(t){return u=void 0,p&&n?d(t):(n=o=void 0,a)}function b(){var t=zb(),r=h(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return y(c);if(f)return clearTimeout(u),u=setTimeout(v,e),d(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=Wb(e)||0,Pt(r)&&(l=!!r.leading,i=(f="maxWait"in r)?Kb(Wb(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),b.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},b.flush=function(){return void 0===u?a:g(zb())},b},qb=r(166);function Jb(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(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tm,em,rm,nm=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Qb(this,"undos",[]),Qb(this,"redos",[]),Qb(this,"callbacks",[]),Qb(this,"stopWatch",null),Qb(this,"curData",null),Qb(this,"maxSize",50),Qb(this,"waitTime",100),Qb(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){Ib(Lb(this.undos),t)||(this.undos.push(t),Ib(this.curData,t)||(this.redos=[]),this.eventCenter.emit(yo.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=Oi(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=Oi(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(qb.a)(t,Zb((function(){var r=t.modelToHistoryData();r&&e.add(r)}),this.waitTime))}}])&&Jb(e.prototype,r),n&&Jb(e,n),t}();function om(t){return om="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},om(t)}function im(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 am(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 am(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 am(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 um(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 cm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?um(Object(r),!0).forEach((function(e){hm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):um(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}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){return lm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},lm(t,e)}function fm(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=ym(t);if(e){var o=ym(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pm(this,r)}}function pm(t,e){if(e&&("object"===om(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dm(t)}function dm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ym(t){return ym=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ym(t)}function hm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vm,gm,bm,mm=Jm((rm=em=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&&lm(t,e)}(i,t);var e,r,n,o=fm(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),hm(dm(t=o.call(this)),"ref",Object(tt.f)()),hm(dm(t),"__prevText",{type:"",text:"",id:""}),hm(dm(t),"keyupHandler",(function(e){var r=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&r.setElementState(0)})),hm(dm(t),"inputHandler",(function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;t.__prevText={type:n.type,text:r.replace(/(\r\n)+$|(\n)+$/,""),id:n.id}})),hm(dm(t),"keydownHandler",(function(t){t.stopPropagation()})),t.state={style:{left:0,top:0}},t}return e=i,n=[{key:"getDerivedStateFromProps",value:function(t){var e,r=t.graphModel,n=r.transformModel,o=r.theme,i=r.textEditElement;if(i){var a;if(null===(a=i.text)||void 0===a||!a.value)if(i.BaseType===po.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===po.EDGE){var p=o.edgeText,d=p.overflowMode,y=p.lineHeight,h=p.wrapPadding,v=p.textWidth;v&&"autoWrap"===d&&(e=cm(cm({},f),{},{width:v,minWidth:v,lineHeight:y,padding:h}))}else if(i.BaseType===po.NODE){var g=o.nodeText,b=g.overflowMode,m=g.lineHeight,O=g.wrapPadding,w=g.textWidth,_=i,E=_.width,j=_.modelType;(j!==fo.TEXT_NODE&&"autoWrap"===b||j===fo.TEXT_NODE&&w)&&(e=cm(cm({},f),{},{width:w||E,minWidth:w||E,lineHeight:m,padding:O}))}var x=i.text,S=x.x,P=x.y,k=im(n.CanvasPointToHtmlPoint([S,P]),2);return{style:cm({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.editConfigModel,n=r.edgeTextEdit,o=r.nodeTextEdit;(n||o)&&e.on("".concat(yo.GRAPH_TRANSFORM,",").concat(yo.NODE_CLICK,",").concat(yo.BLANK_CLICK," "),(function(){t.textEditElement&&t.textEditElement.setElementState(so.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.updateText(n,r),t.eventCenter.emit(yo.TEXT_UPDATE,cm({},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(tt.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onInput:this.inputHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&sm(e.prototype,r),n&&sm(e,n),i}(tt.a),hm(em,"toolName","textEdit"),tm=rm))||tm,Om=function(t){return t.modelType===fo.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===fo.POLYLINE_EDGE?function(t){var e=t.points,r=yc(e),n=qu(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===fo.BEZIER_EDGE?function(t){var e=t.path,r=mc(e),n=qu(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 wm(t){return wm="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},wm(t)}function _m(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)||jm(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 Em(t){return function(t){if(Array.isArray(t))return xm(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||jm(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 jm(t,e){if(t){if("string"==typeof t)return xm(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)?xm(t,e):void 0}}function xm(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 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 Pm(t,e){return Pm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Pm(t,e)}function km(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=Tm(t);if(e){var o=Tm(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"===wm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Dm(t)}function Dm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tm(t){return Tm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Tm(t)}function Mm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Nm=Jm((bm=gm=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&&Pm(t,e)}(i,t);var e,r,n,o=km(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),Mm(Dm(e=o.call(this)),"stepDrag",void 0),Mm(Dm(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),Mm(Dm(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel,i=o.getSelectElements(!0);o.moveNodes(i.nodes.map((function(t){return t.id})),r,n)})),Mm(Dm(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:[]};Em(a.values()).forEach((function(t){t.BaseType===po.NODE&&c.nodes.push(t.getData()),t.BaseType===po.EDGE&&c.edges.push(t.getData())})),i.emit(yo.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter;return e.stepDrag=new Uc({onDraging:e.onDraging,step:n,eventType:"SELECTION",eventCenter:a}),e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.transformModel;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===po.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===po.EDGE&&(e=Om(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=_m(r.CanvasPointToHtmlPoint([n,o]),2);n=u[0],o=u[1];var c=_m(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(tt.g)("div",{className:"lf-multiple-select",style:s,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&Sm(e.prototype,r),n&&Sm(e,n),i}(tt.a),Mm(gm,"toolName","multipleSelect"),vm=bm))||vm;function Cm(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 Rm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Im=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Rm(this,"tools",void 0),Rm(this,"components",void 0),Rm(this,"toolMap",new Map),Rm(this,"instance",void 0),this.instance=e,this.isDisabledTool(mm.toolName)||this.registerTool(mm.toolName,mm),this.isDisabledTool(Nm.toolName)||this.registerTool(Nm.toolName,Nm)}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}}])&&Cm(e.prototype,r),n&&Cm(e,n),t}(),Lm=r(167),zm=r.n(Lm);function Bm(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 Hm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xm=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Hm(this,"mousetrap",void 0),Hm(this,"options",void 0),Hm(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new zm.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(Pe(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")}}])&&Bm(e.prototype,r),n&&Bm(e,n),t}(),Um=Xm,Fm=null;function Gm(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Ym(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},Vm(t)}function Wm(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?Wm(Object(r),!0).forEach((function(e){Zm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}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 Zm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qm=function(){function t(e){var r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Zm(this,"container",void 0),Zm(this,"width",void 0),Zm(this,"height",void 0),Zm(this,"graphModel",void 0),Zm(this,"history",void 0),Zm(this,"viewMap",new Map),Zm(this,"tool",void 0),Zm(this,"keyboard",void 0),Zm(this,"dnd",void 0),Zm(this,"options",void 0),Zm(this,"snaplineModel",void 0),Zm(this,"components",[]),Zm(this,"plugins",void 0),Zm(this,"extension",{}),Zm(this,"adapterIn",void 0),Zm(this,"adapterOut",void 0),Zm(this,"getView",(function(t){return o.viewMap.get(t)})),e=vf(e),this.options=e,this.container=e.container,this.plugins=e.plugins,this.graphModel=new ns(Km({},e)),this.tool=new Im(this),this.history=new nm(this.graphModel.eventCenter),this.dnd=new hf({lf:this}),this.keyboard=new Um({lf:this,keyboard:e.keyboard}),e.isSilentMode||!1===e.snapline||(this.snaplineModel=new Iy(this.graphModel),r=this.graphModel.eventCenter,n=this.snaplineModel,r.on("node:mousemove",(function(t){var e=t.data;n.setNodeSnapLine(e)})),r.on("node:mouseup",(function(){n.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)?(Fm=null,!1):((Fm=o).nodes.forEach((function(t){return Gm(t,40)})),Fm.edges.forEach((function(t){return Ym(t,40)})),!1)}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(Fm&&(Fm.nodes||Fm.edges)){t.clearSelectElements();var r=t.addElements(Fm);if(!r)return;r.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),r.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),Fm.nodes.forEach((function(t){return Gm(t,40)})),Fm.edges.forEach((function(t){return Ym(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,r=[{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var n={BaseEdge:Lg,BaseEdgeModel:ru,BaseNode:Dh,BaseNodeModel:hp,RectNode:Bh,RectNodeModel:ey,CircleNode:Kh,CircleNodeModel:Cp,PolygonNode:uv,PolygonNodeModel:Bd,TextNode:Hv,TextNodeModel:vy,LineEdge:Zg,LineEdgeModel:mu,DiamondNode:vv,DiamondNodeModel:ed,PolylineEdge:yb,PolylineEdgeModel:Lu,BezierEdge:xb,BezierEdgeModel:Lf,EllipseNode:Av,EllipseNodeModel:md,HtmlNode:qv,HtmlNodeModel:Dy,h:tt.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=Q(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=Q(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"batchRegister",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){t.registerElement(e)}))}},{key:"defaultRegister",value:function(){this.registerElement({view:Bh,model:ey,type:"rect"}),this.registerElement({type:"circle",view:Kh,model:Cp}),this.registerElement({type:"polygon",view:uv,model:Bd}),this.registerElement({type:"line",view:Zg,model:mu}),this.registerElement({type:"polyline",view:yb,model:Lu}),this.registerElement({type:"bezier",view:xb,model:Lf}),this.registerElement({type:"text",view:Hv,model:vy}),this.registerElement({type:"ellipse",view:Av,model:md}),this.registerElement({type:"diamond",view:vv,model:ed}),this.registerElement({type:"html",view:qv,model:Dy})}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e),e||this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformModel,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModelById(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.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,e){this.graphModel.resize(t,e),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.updateText(t,e)}},{key:"deleteElement",value:function(t){var e,r,n,o=this.getModelById(t);return!!o&&null!==(r=null===(n=(Zm(e={},po.NODE,this.deleteNode),Zm(e,po.EDGE,this.deleteEdge),e)[o.BaseType])||void 0===n?void 0:n.call(this,t))&&void 0!==r&&r}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){return this.graphModel.getElement(t).getData()}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"changeEdgeType",value:function(t,e){this.graphModel.changeEdgeType(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.getNodeModelById(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:"cloneNode",value:function(t){var e=this.graphModel.getNodeModelById(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"getNodeModelById",value:function(t){return this.graphModel.getNodeModelById(t)}},{key:"getNodeDataById",value:function(t){return this.graphModel.getNodeModelById(t).getData()}},{key:"addEdge",value:function(t){return this.graphModel.addEdge(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.deleteEdgeById(t),o}},{key:"deleteEdgeByNodeId",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.deleteEdgeBySourceAndTarget(e,r):e?this.graphModel.deleteEdgeBySource(e):r&&this.graphModel.deleteEdgeByTarget(r)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdgeModels",value:function(t){var e=this.graphModel.edges,r=t.sourceNodeId,n=t.targetNodeId;if(r&&n){var o=[];return e.forEach((function(t){t.sourceNodeId===r&&t.targetNodeId===n&&o.push(t)})),o}if(r){var i=[];return e.forEach((function(t){t.sourceNodeId===r&&i.push(t)})),i}if(n){var a=[];return e.forEach((function(t){t.targetNodeId===n&&a.push(t)})),a}return[]}},{key:"getEdgeDataById",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(Va(e))}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{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.addEdge(t);i.edges.push(a)})),i}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.graphModel.getAreaElement(t,e,r,n).map((function(t){return t.getData()}))}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{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:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfigModel.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=Va(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=Va(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){return this.graphModel.transformModel.zoom(t,e)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformModel.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformModel.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel;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.transformModel.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,e=t.TRANSLATE_X,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t,e){void 0===e&&(e=t),this.graphModel.fitView(t,e)}},{key:"openEdgeAnimation",value:function(t){this.graphModel.openEdgeAnimation(t)}},{key:"closeEdgeAnimation",value:function(t){this.graphModel.closeEdgeAnimation(t)}},{key:"on",value:function(t,e){this.graphModel.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.graphModel.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.graphModel.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.graphModel.eventCenter.emit(t,e)}},{key:"installPlugins",value:function(){var e,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=null!==(e=this.plugins)&&void 0!==e?e:t.extensions;o.forEach((function(t){var e=t.pluginName||t.name;-1===n.indexOf(e)&&r.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),n&&this.components.push(n.bind(e)),void(this.extension[e.pluginName]=e)}var o=e,i=new o({lf:this,LogicFlow:t});i.render&&this.components.push(i.render.bind(i)),this.extension[o.pluginName]=i}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var r=new e(Km(Km({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(r),r}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"renderRawData",value:function(t){this.graphModel.graphDataToModel(Va(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Object(tt.j)(Object(tt.g)(lf,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(yo.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t)}}],n=[{key:"use",value:function(t){var e=t.pluginName;e||(e=t.name);var r=this.extensions.get(e);r&&r.destroy&&r.destroy(),this.extensions.set(e,t)}}],r&&$m(e.prototype,r),n&&$m(e,n),t}();function Jm(t){return Q(t)}Zm(qm,"extensions",new Map);e.default=qm}])}));