vue-pure-admin/dist/static/js/index-1b55f966.js
2023-02-08 18:11:24 +08:00

81 lines
572 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{g as cC}from"./_commonjsHelpers-042e6b4d.js";import{u as dC}from"./hooks-8de8f790.js";import{_ as Jc}from"./_plugin-vue_export-helper-c27b6911.js";import{V as pC}from"./styles-b18ef2c3.js";import{g as Qc}from"./index-8c77f9cd.js";import{S as hC}from"./set-up-729eb907.js";import"./index-02c38b19.js";import"./_vue_commonjs-external-c09696f7.js";const vC=[{incoming:[],outgoing:["Flow_33inf2k"],dockers:[],type:2,properties:{a:"efrwe",b:"wewe",name:"开始",x:280,y:200,text:{x:280,y:200,value:"开始"},logicFlowType:"bpmn:startEvent"},key:"Event_1d42u4p"},{incoming:["Flow_379e0o9"],outgoing:[],dockers:[],type:3,properties:{a:"efrwe",b:"wewe",name:"结束",x:920,y:200,text:{x:920,y:200,value:"结束"},logicFlowType:"bpmn:endEvent"},key:"Event_08p8i6q"},{incoming:["Flow_0pfouf0"],outgoing:["Flow_3918lhh"],dockers:[],type:6,properties:{a:"efrwe",b:"wewe",name:"网关",x:580,y:200,text:{x:580,y:200,value:"网关"},logicFlowType:"bpmn:exclusiveGateway"},key:"Gateway_1fngqgj"},{incoming:["Flow_33inf2k"],outgoing:["Flow_0pfouf0"],dockers:[],type:4,properties:{a:"efrwe",b:"wewe",name:"用户",x:420,y:200,text:{x:420,y:200,value:"用户"},logicFlowType:"bpmn:userTask"},key:"Activity_2mgtaia"},{incoming:["Flow_3918lhh"],outgoing:["Flow_379e0o9"],dockers:[],type:5,properties:{a:"efrwe",b:"wewe",name:"服务",x:760,y:200,text:{x:760,y:200,value:"服务"},logicFlowType:"bpmn:serviceTask"},key:"Activity_1sp8qc8"},{incoming:["Event_1d42u4p"],outgoing:["Activity_2mgtaia"],type:1,dockers:[],properties:{name:"边",text:{x:331,y:200,value:"边"},startPoint:{x:298,y:200},endPoint:{x:370,y:200},pointsList:[{x:298,y:200},{x:370,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_33inf2k"},{incoming:["Activity_2mgtaia"],outgoing:["Gateway_1fngqgj"],type:1,dockers:[],properties:{name:"边2",text:{x:507,y:200,value:"边2"},startPoint:{x:470,y:200},endPoint:{x:555,y:200},pointsList:[{x:470,y:200},{x:555,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_0pfouf0"},{incoming:["Gateway_1fngqgj"],outgoing:["Activity_1sp8qc8"],type:1,dockers:[],properties:{name:"边3",text:{x:664,y:200,value:"边3"},startPoint:{x:605,y:200},endPoint:{x:710,y:200},pointsList:[{x:605,y:200},{x:710,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_3918lhh"},{incoming:["Activity_1sp8qc8"],outgoing:["Event_08p8i6q"],type:1,dockers:[],properties:{name:"边4",text:{x:871,y:200,value:"边4"},startPoint:{x:810,y:200},endPoint:{x:902,y:200},pointsList:[{x:810,y:200},{x:902,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_379e0o9"}],yC={flowElementList:vC};var Ve={},gC={get exports(){return Ve},set exports(m){Ve=m}};(function(m,v){(function(c,i){m.exports=i()})(window,function(){return function(u){var c={};function i(l){if(c[l])return c[l].exports;var f=c[l]={i:l,l:!1,exports:{}};return u[l].call(f.exports,f,f.exports,i),f.l=!0,f.exports}return i.m=u,i.c=c,i.d=function(l,f,y){i.o(l,f)||Object.defineProperty(l,f,{enumerable:!0,get:y})},i.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},i.t=function(l,f){if(f&1&&(l=i(l)),f&8||f&4&&typeof l=="object"&&l&&l.__esModule)return l;var y=Object.create(null);if(i.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:l}),f&2&&typeof l!="string")for(var b in l)i.d(y,b,function(S){return l[S]}.bind(null,b));return y},i.n=function(l){var f=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(f,"a",f),f},i.o=function(l,f){return Object.prototype.hasOwnProperty.call(l,f)},i.p="",i(i.s=215)}([function(u,c,i){(function(l,f){i.d(c,"a",function(){return R}),i.d(c,"b",function(){return Qo}),i.d(c,"c",function(){return un}),i.d(c,"d",function(){return sr}),i.d(c,"e",function(){return Xe}),i.d(c,"f",function(){return De}),i.d(c,"g",function(){return ji}),i.d(c,"h",function(){return Yn}),i.d(c,"i",function(){return ot}),i.d(c,"j",function(){return xr}),i.d(c,"k",function(){return $r}),i.d(c,"l",function(){return Nr}),i.d(c,"m",function(){return Er}),i.d(c,"n",function(){return ul}),i.d(c,"o",function(){return ce}),i.d(c,"p",function(){return pl}),i.d(c,"q",function(){return Jo}),i.d(c,"r",function(){return ll}),i.d(c,"s",function(){return Mr}),i.d(c,"t",function(){return $i}),i.d(c,"u",function(){return nl}),i.d(c,"v",function(){return fl}),i.d(c,"w",function(){return cl}),i.d(c,"x",function(){return On}),i.d(c,"y",function(){return jr}),i.d(c,"z",function(){return $t}),i.d(c,"A",function(){return vr}),i.d(c,"B",function(){return En}),i.d(c,"C",function(){return mt}),i.d(c,"D",function(){return hl}),i.d(c,"E",function(){return Zo}),i.d(c,"F",function(){return il}),i.d(c,"G",function(){return rl}),i.d(c,"H",function(){return zi}),i.d(c,"I",function(){return gl}),i.d(c,"J",function(){return Sr}),i.d(c,"K",function(){return te}),i.d(c,"L",function(){return dl}),i.d(c,"M",function(){return Sn});var y="An invariant failed, however the error is obfuscated because this is a production build.",b=[];Object.freeze(b);var S={};Object.freeze(S);function x(){return++Ge.mobxGuid}function P(d){throw w(!1,d),"X"}function w(d,h){if(!d)throw new Error("[mobx] "+(h||y))}function M(d){var h=!1;return function(){if(!h)return h=!0,d.apply(this,arguments)}}var j=function(){};function C(d){var h=[];return d.forEach(function(O){h.indexOf(O)===-1&&h.push(O)}),h}function _(d){return d!==null&&typeof d=="object"}function z(d){if(d===null||typeof d!="object")return!1;var h=Object.getPrototypeOf(d);return h===Object.prototype||h===null}function X(d){if(J(d)||$t(d))return d;if(Array.isArray(d))return new Map(d);if(z(d)){var h=new Map;for(var O in d)h.set(O,d[O]);return h}else return P("Cannot convert to map from '"+d+"'")}function U(d,h,O){Object.defineProperty(d,h,{enumerable:!1,writable:!0,configurable:!0,value:O})}function ie(d,h,O){Object.defineProperty(d,h,{enumerable:!1,writable:!1,configurable:!0,value:O})}function oe(d,h){var O=Object.getOwnPropertyDescriptor(d,h);return!O||O.configurable!==!1&&O.writable!==!1}function ee(d,h){var O="isMobX"+d;return h.prototype[O]=!0,function(N){return _(N)&&N[O]===!0}}function J(d){return d instanceof Map}function ue(d){return d instanceof Set}function L(d){var h=new Set;for(var O in d)h.add(O);return Object.getOwnPropertySymbols(d).forEach(function(N){Object.getOwnPropertyDescriptor(d,N).enumerable&&h.add(N)}),Array.from(h)}function k(d){return d&&d.toString?d.toString():new String(d).toString()}function I(d){return d===null?null:typeof d=="object"?""+d:d}var A=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(d){return Object.getOwnPropertyNames(d).concat(Object.getOwnPropertySymbols(d))}:Object.getOwnPropertyNames,R=Symbol("mobx administration"),Y=function(){function d(h){h===void 0&&(h="Atom@"+x()),this.name=h,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=qe.NOT_TRACKING}return d.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(h){return h()})},d.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(h){return h()})},d.prototype.reportObserved=function(){return _i(this)},d.prototype.reportChanged=function(){Tt(),Ws(this),pr()},d.prototype.toString=function(){return this.name},d}(),Q=ee("Atom",Y);function ce(d,h,O){h===void 0&&(h=j),O===void 0&&(O=j);var N=new Y(d);return h!==j&&al(N,h),O!==j&&Zo(N,O),N}function Me(d,h){return d===h}function me(d,h){return yo(d,h)}function Oe(d,h){return yo(d,h,1)}function Pe(d,h){return Object.is(d,h)}var Ee={identity:Me,structural:me,default:Pe,shallow:Oe};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Ne=function(d,h){return Ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,N){O.__proto__=N}||function(O,N){for(var F in N)N.hasOwnProperty(F)&&(O[F]=N[F])},Ne(d,h)};function Le(d,h){Ne(d,h);function O(){this.constructor=d}d.prototype=h===null?Object.create(h):(O.prototype=h.prototype,new O)}var Ke=function(){return Ke=Object.assign||function(h){for(var O,N=1,F=arguments.length;N<F;N++){O=arguments[N];for(var W in O)Object.prototype.hasOwnProperty.call(O,W)&&(h[W]=O[W])}return h},Ke.apply(this,arguments)};function _e(d){var h=typeof Symbol=="function"&&d[Symbol.iterator],O=0;return h?h.call(d):{next:function(){return d&&O>=d.length&&(d=void 0),{value:d&&d[O++],done:!d}}}}function Se(d,h){var O=typeof Symbol=="function"&&d[Symbol.iterator];if(!O)return d;var N=O.call(d),F,W=[],fe;try{for(;(h===void 0||h-- >0)&&!(F=N.next()).done;)W.push(F.value)}catch(Te){fe={error:Te}}finally{try{F&&!F.done&&(O=N.return)&&O.call(N)}finally{if(fe)throw fe.error}}return W}function Ie(){for(var d=[],h=0;h<arguments.length;h++)d=d.concat(Se(arguments[h]));return d}var $e=Symbol("mobx did run lazy initializers"),$=Symbol("mobx pending decorators"),V={},q={};function he(d,h){var O=h?V:q;return O[d]||(O[d]={configurable:!0,enumerable:h,get:function(){return xe(this),this[d]},set:function(N){xe(this),this[d]=N}})}function xe(d){var h,O;if(d[$e]!==!0){var N=d[$];if(N){U(d,$e,!0);var F=Ie(Object.getOwnPropertySymbols(N),Object.keys(N));try{for(var W=_e(F),fe=W.next();!fe.done;fe=W.next()){var Te=fe.value,ke=N[Te];ke.propertyCreator(d,ke.prop,ke.descriptor,ke.decoratorTarget,ke.decoratorArguments)}}catch(ft){h={error:ft}}finally{try{fe&&!fe.done&&(O=W.return)&&O.call(W)}finally{if(h)throw h.error}}}}}function pe(d,h){return function(){var N,F=function(fe,Te,ke,ft){if(ft===!0)return h(fe,Te,ke,fe,N),null;if(!Object.prototype.hasOwnProperty.call(fe,$)){var ct=fe[$];U(fe,$,Ke({},ct))}return fe[$][Te]={prop:Te,propertyCreator:h,descriptor:ke,decoratorTarget:fe,decoratorArguments:N},he(Te,d)};return ze(arguments)?(N=b,F.apply(null,arguments)):(N=Array.prototype.slice.call(arguments),F)}}function ze(d){return(d.length===2||d.length===3)&&(typeof d[1]=="string"||typeof d[1]=="symbol")||d.length===4&&d[3]===!0}function tt(d,h,O){return On(d)?d:Array.isArray(d)?mt.array(d,{name:O}):z(d)?mt.object(d,void 0,{name:O}):J(d)?mt.map(d,{name:O}):ue(d)?mt.set(d,{name:O}):d}function Ye(d,h,O){return d==null||vr(d)||jr(d)||$t(d)||lr(d)?d:Array.isArray(d)?mt.array(d,{name:O,deep:!1}):z(d)?mt.object(d,void 0,{name:O,deep:!1}):J(d)?mt.map(d,{name:O,deep:!1}):ue(d)?mt.set(d,{name:O,deep:!1}):P(!1)}function nt(d){return d}function ve(d,h,O){return yo(d,h)?h:d}function ut(d){w(d);var h=pe(!0,function(N,F,W,fe,Te){var ke=W?W.initializer?W.initializer.call(N):W.value:void 0;qo(N).addObservableProp(F,ke,d)}),O=(typeof l<"u"&&l.env,h);return O.enhancer=d,O}var rt={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(rt);function Be(d){return d==null?rt:typeof d=="string"?{name:d,deep:!0,proxy:!0}:d}var Qe=ut(tt),At=ut(Ye),dt=ut(nt),bt=ut(ve);function ne(d){return d.defaultDecorator?d.defaultDecorator.enhancer:d.deep===!1?nt:tt}function Ct(d,h,O){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return Qe.apply(null,arguments);if(On(d))return d;var N=z(d)?mt.object(d,h,O):Array.isArray(d)?mt.array(d,h):J(d)?mt.map(d,h):ue(d)?mt.set(d,h):d;if(N!==d)return N;P(!1)}var St={box:function(d,h){arguments.length>2&&Vt("box");var O=Be(h);return new an(d,ne(O),O.name,!0,O.equals)},array:function(d,h){arguments.length>2&&Vt("array");var O=Be(h);return Sl(d,ne(O),O.name)},map:function(d,h){arguments.length>2&&Vt("map");var O=Be(h);return new Qo(d,ne(O),O.name)},set:function(d,h){arguments.length>2&&Vt("set");var O=Be(h);return new qi(d,ne(O),O.name)},object:function(d,h,O){typeof arguments[1]=="string"&&Vt("object");var N=Be(O);if(N.proxy===!1)return Jo({},d,h,N);var F=Gi(N),W=Jo({},void 0,void 0,N),fe=Tn(W);return ki(fe,d,h,F),fe},ref:dt,shallow:At,deep:Qe,struct:bt},mt=Ct;Object.keys(St).forEach(function(d){return mt[d]=St[d]});function Vt(d){P("Expected one or two arguments to observable."+d+". Did you accidentally try to use observable."+d+" as decorator?")}var dr=pe(!1,function(d,h,O,N,F){var W=O.get,fe=O.set,Te=F[0]||{};qo(d).addComputedProp(d,h,Ke({get:W,set:fe,context:d},Te))}),Kt=dr({equals:Ee.structural}),Er=function(h,O,N){if(typeof O=="string"||h!==null&&typeof h=="object"&&arguments.length===1)return dr.apply(null,arguments);var F=typeof O=="object"?O:{};return F.get=h,F.set=typeof O=="function"?O:F.set,F.name=F.name||h.name||"",new yn(F)};Er.struct=Kt;var qe;(function(d){d[d.NOT_TRACKING=-1]="NOT_TRACKING",d[d.UP_TO_DATE=0]="UP_TO_DATE",d[d.POSSIBLY_STALE=1]="POSSIBLY_STALE",d[d.STALE=2]="STALE"})(qe||(qe={}));var Pt;(function(d){d[d.NONE=0]="NONE",d[d.LOG=1]="LOG",d[d.BREAK=2]="BREAK"})(Pt||(Pt={}));var rr=function(){function d(h){this.cause=h}return d}();function je(d){return d instanceof rr}function Ue(d){switch(d.dependenciesState){case qe.UP_TO_DATE:return!1;case qe.NOT_TRACKING:case qe.STALE:return!0;case qe.POSSIBLY_STALE:{for(var h=De(!0),O=re(),N=d.observing,F=N.length,W=0;W<F;W++){var fe=N[W];if(gn(fe)){if(Ge.disableErrorBoundaries)fe.get();else try{fe.get()}catch{return we(O),Xe(h),!0}if(d.dependenciesState===qe.STALE)return we(O),Xe(h),!0}}return vt(d),we(O),Xe(h),!1}}}function ot(){return Ge.trackingDerivation!==null}function Je(d){var h=d.observers.size>0;Ge.computationDepth>0&&h&&P(!1),!Ge.allowStateChanges&&(h||Ge.enforceActions==="strict")&&P(!1)}function lt(d,h,O){var N=De(!0);vt(d),d.newObserving=new Array(d.observing.length+100),d.unboundDepsCount=0,d.runId=++Ge.runId;var F=Ge.trackingDerivation;Ge.trackingDerivation=d;var W;if(Ge.disableErrorBoundaries===!0)W=h.call(O);else try{W=h.call(O)}catch(fe){W=new rr(fe)}return Ge.trackingDerivation=F,H(d),Xe(N),W}function H(d){for(var h=d.observing,O=d.observing=d.newObserving,N=qe.UP_TO_DATE,F=0,W=d.unboundDepsCount,fe=0;fe<W;fe++){var Te=O[fe];Te.diffValue===0&&(Te.diffValue=1,F!==fe&&(O[F]=Te),F++),Te.dependenciesState>N&&(N=Te.dependenciesState)}for(O.length=F,d.newObserving=null,W=h.length;W--;){var Te=h[W];Te.diffValue===0&&kr(Te,d),Te.diffValue=0}for(;F--;){var Te=O[F];Te.diffValue===1&&(Te.diffValue=0,Ys(Te,d))}N!==qe.UP_TO_DATE&&(d.dependenciesState=N,d.onBecomeStale())}function K(d){var h=d.observing;d.observing=[];for(var O=h.length;O--;)kr(h[O],d);d.dependenciesState=qe.NOT_TRACKING}function te(d){var h=re();try{return d()}finally{we(h)}}function re(){var d=Ge.trackingDerivation;return Ge.trackingDerivation=null,d}function we(d){Ge.trackingDerivation=d}function De(d){var h=Ge.allowStateReads;return Ge.allowStateReads=d,h}function Xe(d){Ge.allowStateReads=d}function vt(d){if(d.dependenciesState!==qe.UP_TO_DATE){d.dependenciesState=qe.UP_TO_DATE;for(var h=d.observing,O=h.length;O--;)h[O].lowestObserverState=qe.UP_TO_DATE}}var Zt=0,Jt=1,Hn=Object.getOwnPropertyDescriptor(function(){},"name");Hn&&Hn.configurable;function Gr(d,h,O){var N=function(){return Di(d,h,O||this,arguments)};return N.isMobxAction=!0,N}function Di(d,h,O,N){var F=xr();try{return h.apply(O,N)}catch(W){throw F.error=W,W}finally{ji(F)}}function xr(d,h,O){var N=Rt(),F=0,W=re();Tt();var fe=vn(!0),Te=De(!0),ke={prevDerivation:W,prevAllowStateChanges:fe,prevAllowStateReads:Te,notifySpy:N,startTime:F,actionId:Jt++,parentActionId:Zt};return Zt=ke.actionId,ke}function ji(d){Zt!==d.actionId&&P("invalid action stack. did you forget to finish an action?"),Zt=d.parentActionId,d.error!==void 0&&(Ge.suppressReactionErrors=!0),Gn(d.prevAllowStateChanges),Xe(d.prevAllowStateReads),pr(),we(d.prevDerivation),d.notifySpy,Ge.suppressReactionErrors=!1}function sr(d,h){var O=vn(d),N;try{N=h()}finally{Gn(O)}return N}function vn(d){var h=Ge.allowStateChanges;return Ge.allowStateChanges=d,h}function Gn(d){Ge.allowStateChanges=d}var an=function(d){Le(h,d);function h(O,N,F,W,fe){F===void 0&&(F="ObservableValue@"+x()),W===void 0&&(W=!0),fe===void 0&&(fe=Ee.default);var Te=d.call(this,F)||this;return Te.enhancer=N,Te.name=F,Te.equals=fe,Te.hasUnreportedChange=!1,Te.value=N(O,void 0,F),W&&Rt(),Te}return h.prototype.dehanceValue=function(O){return this.dehancer!==void 0?this.dehancer(O):O},h.prototype.set=function(O){var N=this.value;if(O=this.prepareNewValue(O),O!==Ge.UNCHANGED){var F=Rt();this.setNewValue(O)}},h.prototype.prepareNewValue=function(O){if(Je(this),Pr(this)){var N=Tr(this,{object:this,type:"update",newValue:O});if(!N)return Ge.UNCHANGED;O=N.newValue}return O=this.enhancer(O,this.value,this.name),this.equals(this.value,O)?Ge.UNCHANGED:O},h.prototype.setNewValue=function(O){var N=this.value;this.value=O,this.reportChanged(),hr(this)&&Qt(this,{type:"update",object:this,newValue:O,oldValue:N})},h.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},h.prototype.intercept=function(O){return Un(this,O)},h.prototype.observe=function(O,N){return N&&O({object:this,type:"update",newValue:this.value,oldValue:void 0}),Vn(this,O)},h.prototype.toJSON=function(){return this.get()},h.prototype.toString=function(){return this.name+"["+this.value+"]"},h.prototype.valueOf=function(){return I(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(Y),kn=ee("ObservableValue",an),yn=function(){function d(h){this.dependenciesState=qe.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=qe.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+x(),this.value=new rr(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Pt.NONE,w(h.get,"missing option for computed: get"),this.derivation=h.get,this.name=h.name||"ComputedValue@"+x(),h.set&&(this.setter=Gr(this.name+"-setter",h.set)),this.equals=h.equals||(h.compareStructural||h.struct?Ee.structural:Ee.default),this.scope=h.context,this.requiresReaction=!!h.requiresReaction,this.keepAlive=!!h.keepAlive}return d.prototype.onBecomeStale=function(){Zs(this)},d.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(h){return h()})},d.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(h){return h()})},d.prototype.get=function(){this.isComputing&&P("Cycle detected in computation "+this.name+": "+this.derivation),Ge.inBatch===0&&this.observers.size===0&&!this.keepAlive?Ue(this)&&(this.warnAboutUntrackedRead(),Tt(),this.value=this.computeValue(!1),pr()):(_i(this),Ue(this)&&this.trackAndCompute()&&Ks(this));var h=this.value;if(je(h))throw h.cause;return h},d.prototype.peek=function(){var h=this.computeValue(!1);if(je(h))throw h.cause;return h},d.prototype.set=function(h){if(this.setter){w(!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,h)}finally{this.isRunningSetter=!1}}else w(!1,!1)},d.prototype.trackAndCompute=function(){var h=this.value,O=this.dependenciesState===qe.NOT_TRACKING,N=this.computeValue(!0),F=O||je(h)||je(N)||!this.equals(h,N);return F&&(this.value=N),F},d.prototype.computeValue=function(h){this.isComputing=!0,Ge.computationDepth++;var O;if(h)O=lt(this,this.derivation,this.scope);else if(Ge.disableErrorBoundaries===!0)O=this.derivation.call(this.scope);else try{O=this.derivation.call(this.scope)}catch(N){O=new rr(N)}return Ge.computationDepth--,this.isComputing=!1,O},d.prototype.suspend=function(){this.keepAlive||(K(this),this.value=void 0)},d.prototype.observe=function(h,O){var N=this,F=!0,W=void 0;return Nr(function(){var fe=N.get();if(!F||O){var Te=re();h({type:"update",object:N,newValue:fe,oldValue:W}),we(Te)}F=!1,W=fe})},d.prototype.warnAboutUntrackedRead=function(){},d.prototype.toJSON=function(){return this.get()},d.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},d.prototype.valueOf=function(){return I(this.get())},d.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},d}(),gn=ee("ComputedValue",yn),uo=function(){function d(){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}return d}(),Vs={};function so(){return typeof window<"u"?window:typeof f<"u"?f:typeof self<"u"?self:Vs}var lo=!0,Ci=!1,Ge=function(){var d=so();return d.__mobxInstanceCount>0&&!d.__mobxGlobals&&(lo=!1),d.__mobxGlobals&&d.__mobxGlobals.version!==new uo().version&&(lo=!1),lo?d.__mobxGlobals?(d.__mobxInstanceCount+=1,d.__mobxGlobals.UNCHANGED||(d.__mobxGlobals.UNCHANGED={}),d.__mobxGlobals):(d.__mobxInstanceCount=1,d.__mobxGlobals=new uo):(setTimeout(function(){Ci||P("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new uo)}();function Ri(){(Ge.pendingReactions.length||Ge.inBatch||Ge.isRunningReactions)&&P("isolateGlobalState should be called before MobX is running any reactions"),Ci=!0,lo&&(--so().__mobxInstanceCount===0&&(so().__mobxGlobals=void 0),Ge=new uo)}function Ys(d,h){d.observers.add(h),d.lowestObserverState>h.dependenciesState&&(d.lowestObserverState=h.dependenciesState)}function kr(d,h){d.observers.delete(h),d.observers.size===0&&Ii(d)}function Ii(d){d.isPendingUnobservation===!1&&(d.isPendingUnobservation=!0,Ge.pendingUnobservations.push(d))}function Tt(){Ge.inBatch++}function pr(){if(--Ge.inBatch===0){Li();for(var d=Ge.pendingUnobservations,h=0;h<d.length;h++){var O=d[h];O.isPendingUnobservation=!1,O.observers.size===0&&(O.isBeingObserved&&(O.isBeingObserved=!1,O.onBecomeUnobserved()),O instanceof yn&&O.suspend())}Ge.pendingUnobservations=[]}}function _i(d){var h=Ge.trackingDerivation;return h!==null?(h.runId!==d.lastAccessedBy&&(d.lastAccessedBy=h.runId,h.newObserving[h.unboundDepsCount++]=d,d.isBeingObserved||(d.isBeingObserved=!0,d.onBecomeObserved())),!0):(d.observers.size===0&&Ge.inBatch>0&&Ii(d),!1)}function Ws(d){d.lowestObserverState!==qe.STALE&&(d.lowestObserverState=qe.STALE,d.observers.forEach(function(h){h.dependenciesState===qe.UP_TO_DATE&&(h.isTracing!==Pt.NONE&&fo(h,d),h.onBecomeStale()),h.dependenciesState=qe.STALE}))}function Ks(d){d.lowestObserverState!==qe.STALE&&(d.lowestObserverState=qe.STALE,d.observers.forEach(function(h){h.dependenciesState===qe.POSSIBLY_STALE?h.dependenciesState=qe.STALE:h.dependenciesState===qe.UP_TO_DATE&&(d.lowestObserverState=qe.UP_TO_DATE)}))}function Zs(d){d.lowestObserverState===qe.UP_TO_DATE&&(d.lowestObserverState=qe.POSSIBLY_STALE,d.observers.forEach(function(h){h.dependenciesState===qe.UP_TO_DATE&&(h.dependenciesState=qe.POSSIBLY_STALE,h.isTracing!==Pt.NONE&&fo(h,d),h.onBecomeStale())}))}function fo(d,h){if(console.log("[mobx.trace] '"+d.name+"' is invalidated due to a change in: '"+h.name+"'"),d.isTracing===Pt.BREAK){var O=[];Bi($i(d),O,1),new Function(`debugger;
/*
Tracing '`+d.name+`'
You are entering this break point because derivation '`+d.name+"' is being traced and '"+h.name+`' is now forcing it to update.
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
The stackframe you are looking for is at least ~6-8 stack-frames up.
`+(d instanceof yn?d.derivation.toString().replace(/[*]\//g,"/"):"")+`
The dependencies for this derivation are:
`+O.join(`
`)+`
*/
`)()}}function Bi(d,h,O){if(h.length>=1e3){h.push("(and many more)");return}h.push(""+new Array(O).join(" ")+d.name),d.dependencies&&d.dependencies.forEach(function(N){return Bi(N,h,O+1)})}var un=function(){function d(h,O,N,F){h===void 0&&(h="Reaction@"+x()),F===void 0&&(F=!1),this.name=h,this.onInvalidate=O,this.errorHandler=N,this.requiresObservable=F,this.observing=[],this.newObserving=[],this.dependenciesState=qe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+x(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Pt.NONE}return d.prototype.onBecomeStale=function(){this.schedule()},d.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ge.pendingReactions.push(this),Li())},d.prototype.isScheduled=function(){return this._isScheduled},d.prototype.runReaction=function(){if(!this.isDisposed){if(Tt(),this._isScheduled=!1,Ue(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Rt()}catch(h){this.reportExceptionInDerivation(h)}}pr()}},d.prototype.track=function(h){if(!this.isDisposed){Tt(),this._isRunning=!0;var O=lt(this,h,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&K(this),je(O)&&this.reportExceptionInDerivation(O.cause),pr()}},d.prototype.reportExceptionInDerivation=function(h){var O=this;if(this.errorHandler){this.errorHandler(h,this);return}if(Ge.disableErrorBoundaries)throw h;var N="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ge.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(N,h),Ge.globalReactionErrorHandlers.forEach(function(F){return F(h,O)})},d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Tt(),K(this),pr()))},d.prototype.getDisposer=function(){var h=this.dispose.bind(this);return h[R]=this,h},d.prototype.toString=function(){return"Reaction["+this.name+"]"},d.prototype.trace=function(h){h===void 0&&(h=!1),ml(this,h)},d}(),Yo=100,Wo=function(d){return d()};function Li(){Ge.inBatch>0||Ge.isRunningReactions||Wo(Js)}function Js(){Ge.isRunningReactions=!0;for(var d=Ge.pendingReactions,h=0;d.length>0;){++h===Yo&&(console.error("Reaction doesn't converge to a stable state after "+Yo+" iterations."+(" Probably there is a cycle in the reactive function: "+d[0])),d.splice(0));for(var O=d.splice(0),N=0,F=O.length;N<F;N++)O[N].runReaction()}Ge.isRunningReactions=!1}var co=ee("Reaction",un);function Qs(d){var h=Wo;Wo=function(O){return d(function(){return h(O)})}}function Rt(){return!1}function nd(d){}function od(d){}function id(d){}function zi(d){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function qs(){P(!1)}function Fi(d){return function(h,O,N){if(N){if(N.value)return{value:Gr(d,N.value),enumerable:!1,configurable:!0,writable:!0};var F=N.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Gr(d,F.call(this))}}}return el(d).apply(this,arguments)}}function el(d){return function(h,O,N){Object.defineProperty(h,O,{configurable:!0,enumerable:!1,get:function(){},set:function(F){U(this,O,$r(d,F))}})}}function tl(d,h,O,N){return N===!0?(Ko(d,h,O.value),null):O?{configurable:!0,enumerable:!1,get:function(){return Ko(this,h,O.value||O.initializer.call(this)),this[h]},set:qs}:{enumerable:!1,configurable:!0,set:function(F){Ko(this,h,F)},get:function(){}}}var $r=function(h,O,N,F){if(arguments.length===1&&typeof h=="function")return Gr(h.name||"<unnamed action>",h);if(arguments.length===2&&typeof O=="function")return Gr(h,O);if(arguments.length===1&&typeof h=="string")return Fi(h);if(F===!0)U(h,O,Gr(h.name||O,N.value,this));else return Fi(O).apply(null,arguments)};$r.bound=tl;function rl(d,h){var O=typeof d=="string"?d:d.name||"<unnamed action>",N=typeof d=="function"?d:h;return Di(O,N,this,void 0)}function nl(d){return typeof d=="function"&&d.isMobxAction===!0}function Ko(d,h,O){U(d,h,Gr(h,O.bind(d)))}function Nr(d,h){h===void 0&&(h=S);var O=h&&h.name||d.name||"Autorun@"+x(),N=!h.scheduler&&!h.delay,F;if(N)F=new un(O,function(){this.track(Te)},h.onError,h.requiresObservable);else{var W=mn(h),fe=!1;F=new un(O,function(){fe||(fe=!0,W(function(){fe=!1,F.isDisposed||F.track(Te)}))},h.onError,h.requiresObservable)}function Te(){d(F)}return F.schedule(),F.getDisposer()}var ol=function(d){return d()};function mn(d){return d.scheduler?d.scheduler:d.delay?function(h){return setTimeout(h,d.delay)}:ol}function il(d,h,O){O===void 0&&(O=S);var N=O.name||"Reaction@"+x(),F=$r(N,O.onError?$n(O.onError,h):h),W=!O.scheduler&&!O.delay,fe=mn(O),Te=!0,ke=!1,ft,ct=O.compareStructural?Ee.structural:O.equals||Ee.default,Ot=new un(N,function(){Te||W?xt():ke||(ke=!0,fe(xt))},O.onError,O.requiresObservable);function xt(){if(ke=!1,!Ot.isDisposed){var _t=!1;Ot.track(function(){var Xt=d(Ot);_t=Te||!ct(ft,Xt),ft=Xt}),Te&&O.fireImmediately&&F(ft,Ot),!Te&&_t===!0&&F(ft,Ot),Te&&(Te=!1)}}return Ot.schedule(),Ot.getDisposer()}function $n(d,h){return function(){try{return h.apply(this,arguments)}catch(O){d.call(this,O)}}}function al(d,h,O){return Hi("onBecomeObserved",d,h,O)}function Zo(d,h,O){return Hi("onBecomeUnobserved",d,h,O)}function Hi(d,h,O,N){var F=typeof N=="function"?Mr(h,O):Mr(h),W=typeof N=="function"?N:O,fe=d+"Listeners";F[fe]?F[fe].add(W):F[fe]=new Set([W]);var Te=F[d];return typeof Te!="function"?P(!1):function(){var ke=F[fe];ke&&(ke.delete(W),ke.size===0&&delete F[fe])}}function ul(d){var h=d.enforceActions,O=d.computedRequiresReaction,N=d.computedConfigurable,F=d.disableErrorBoundaries,W=d.reactionScheduler,fe=d.reactionRequiresObservable,Te=d.observableRequiresReaction;if(d.isolateGlobalState===!0&&Ri(),h!==void 0){var ke=void 0;switch(h){case!0:case"observed":ke=!0;break;case!1:case"never":ke=!1;break;case"strict":case"always":ke="strict";break;default:P("Invalid value for 'enforceActions': '"+h+"', expected 'never', 'always' or 'observed'")}Ge.enforceActions=ke,Ge.allowStateChanges=!(ke===!0||ke==="strict")}O!==void 0&&(Ge.computedRequiresReaction=!!O),fe!==void 0&&(Ge.reactionRequiresObservable=!!fe),Te!==void 0&&(Ge.observableRequiresReaction=!!Te,Ge.allowStateReads=!Ge.observableRequiresReaction),N!==void 0&&(Ge.computedConfigurable=!!N),F!==void 0&&(F===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Ge.disableErrorBoundaries=!!F),W&&Qs(W)}function Jo(d,h,O,N){N=Be(N);var F=Gi(N);return xe(d),qo(d,N.name,F.enhancer),h&&ki(d,h,O,F),d}function Gi(d){return d.defaultDecorator||(d.deep===!1?dt:Qe)}function ki(d,h,O,N){var F,W,fe,Te;Tt();try{var Te=A(h);try{for(var ke=_e(Te),ft=ke.next();!ft.done;ft=ke.next()){var fe=ft.value,ct=Object.getOwnPropertyDescriptor(h,fe),Ot=O&&fe in O?O[fe]:ct.get?dr:N,xt=Ot(d,fe,ct,!0);xt&&Object.defineProperty(d,fe,xt)}}catch(Xt){F={error:Xt}}finally{try{ft&&!ft.done&&(W=ke.return)&&W.call(ke)}finally{if(F)throw F.error}}}finally{pr()}}function $i(d,h){return Xi(Mr(d,h))}function Xi(d){var h={name:d.name};return d.observing&&d.observing.length>0&&(h.dependencies=C(d.observing).map(Xi)),h}var sl=0;function Ui(){this.message="FLOW_CANCELLED"}Ui.prototype=Object.create(Error.prototype);function ll(d){arguments.length!==1&&P("Flow expects 1 argument and cannot be used as decorator");var h=d.name||"<unnamed flow>";return function(){var O=this,N=arguments,F=++sl,W=$r(h+" - runid: "+F+" - init",d).apply(O,N),fe,Te=void 0,ke=new Promise(function(ft,ct){var Ot=0;fe=ct;function xt(Mt){Te=void 0;var yr;try{yr=$r(h+" - runid: "+F+" - yield "+Ot++,W.next).call(W,Mt)}catch(Mn){return ct(Mn)}Xt(yr)}function _t(Mt){Te=void 0;var yr;try{yr=$r(h+" - runid: "+F+" - yield "+Ot++,W.throw).call(W,Mt)}catch(Mn){return ct(Mn)}Xt(yr)}function Xt(Mt){if(Mt&&typeof Mt.then=="function"){Mt.then(Xt,ct);return}return Mt.done?ft(Mt.value):(Te=Promise.resolve(Mt.value),Te.then(xt,_t))}xt(void 0)});return ke.cancel=$r(h+" - runid: "+F+" - cancel",function(){try{Te&&Vi(Te);var ft=W.return(void 0),ct=Promise.resolve(ft.value);ct.then(j,j),Vi(ct),fe(new Ui)}catch(Ot){fe(Ot)}}),ke}}function Vi(d){typeof d.cancel=="function"&&d.cancel()}function Yi(d,h){if(d==null)return!1;if(h!==void 0){if(vr(d)===!1||!d[R].values.has(h))return!1;var O=Mr(d,h);return gn(O)}return gn(d)}function fl(d){return arguments.length>1?P(!1):Yi(d)}function cl(d,h){return typeof h!="string"?P(!1):Yi(d,h)}function bn(d,h){return d==null?!1:h!==void 0?vr(d)?d[R].values.has(h):!1:vr(d)||!!d[R]||Q(d)||co(d)||gn(d)}function On(d){return arguments.length!==1&&P(!1),bn(d)}function En(d){return vr(d)?d[R].getKeys():$t(d)||lr(d)?Array.from(d.keys()):jr(d)?d.map(function(h,O){return O}):P(!1)}function dl(d){return vr(d)?En(d).map(function(h){return d[h]}):$t(d)?En(d).map(function(h){return d.get(h)}):lr(d)?Array.from(d.values()):jr(d)?d.slice():P(!1)}function pl(d){return vr(d)?En(d).map(function(h){return[h,d[h]]}):$t(d)?En(d).map(function(h){return[h,d.get(h)]}):lr(d)?Array.from(d.entries()):jr(d)?d.map(function(h,O){return[O,h]}):P(!1)}function Wi(d,h,O){if(arguments.length===2&&!lr(d)){Tt();var N=h;try{for(var F in N)Wi(d,F,N[F])}finally{pr()}return}if(vr(d)){var W=d[R],fe=W.values.get(h);fe?W.write(h,O):W.addObservableProp(h,O,W.defaultEnhancer)}else if($t(d))d.set(h,O);else if(lr(d))d.add(h);else if(jr(d))typeof h!="number"&&(h=parseInt(h,10)),w(h>=0,"Not a valid index: '"+h+"'"),Tt(),h>=d.length&&(d.length=h+1),d[h]=O,pr();else return P(!1)}function hl(d,h,O,N){return typeof O=="function"?vl(d,h,O,N):po(d,h,O)}function po(d,h,O){return Yn(d).observe(h,O)}function vl(d,h,O,N){return Yn(d,h).observe(O,N)}var yl={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function xn(d,h,O,N){return N.detectCycles&&d.set(h,O),O}function Xr(d,h,O){if(!h.recurseEverything&&!On(d)||typeof d!="object")return d;if(d===null)return null;if(d instanceof Date)return d;if(kn(d))return Xr(d.get(),h,O);On(d)&&En(d);var N=h.detectCycles===!0;if(N&&d!==null&&O.has(d))return O.get(d);if(jr(d)||Array.isArray(d)){var F=xn(O,d,[],h),W=d.map(function(_t){return Xr(_t,h,O)});F.length=W.length;for(var fe=0,Te=W.length;fe<Te;fe++)F[fe]=W[fe];return F}if(lr(d)||Object.getPrototypeOf(d)===Set.prototype)if(h.exportMapsAsObjects===!1){var ke=xn(O,d,new Set,h);return d.forEach(function(_t){ke.add(Xr(_t,h,O))}),ke}else{var ft=xn(O,d,[],h);return d.forEach(function(_t){ft.push(Xr(_t,h,O))}),ft}if($t(d)||Object.getPrototypeOf(d)===Map.prototype)if(h.exportMapsAsObjects===!1){var ct=xn(O,d,new Map,h);return d.forEach(function(_t,Xt){ct.set(Xt,Xr(_t,h,O))}),ct}else{var Ot=xn(O,d,{},h);return d.forEach(function(_t,Xt){Ot[Xt]=Xr(_t,h,O)}),Ot}var xt=xn(O,d,{},h);return L(d).forEach(function(_t){xt[_t]=Xr(d[_t],h,O)}),xt}function gl(d,h){typeof h=="boolean"&&(h={detectCycles:h}),h||(h=yl),h.detectCycles=h.detectCycles===void 0?h.recurseEverything===!0:h.detectCycles===!0;var O;return h.detectCycles&&(O=new Map),Xr(d,h,O)}function ml(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];var O=!1;typeof d[d.length-1]=="boolean"&&(O=d.pop());var N=bl(d);if(!N)return P(!1);N.isTracing===Pt.NONE&&console.log("[mobx.trace] '"+N.name+"' tracing enabled"),N.isTracing=O?Pt.BREAK:Pt.LOG}function bl(d){switch(d.length){case 0:return Ge.trackingDerivation;case 1:return Mr(d[0]);case 2:return Mr(d[0],d[1])}}function Sr(d,h){h===void 0&&(h=void 0),Tt();try{return d.apply(h)}finally{pr()}}function Sn(d,h,O){return arguments.length===1||h&&typeof h=="object"?Ol(d,h):Xn(d,h,O||{})}function Xn(d,h,O){var N;typeof O.timeout=="number"&&(N=setTimeout(function(){if(!W[R].isDisposed){W();var fe=new Error("WHEN_TIMEOUT");if(O.onError)O.onError(fe);else throw fe}},O.timeout)),O.name=O.name||"When@"+x();var F=Gr(O.name+"-effect",h),W=Nr(function(fe){d()&&(fe.dispose(),N&&clearTimeout(N),F())},O);return W}function Ol(d,h){var O,N=new Promise(function(F,W){var fe=Xn(d,F,Ke(Ke({},h),{onError:W}));O=function(){fe(),W("WHEN_CANCELLED")}});return N.cancel=O,N}function ho(d){return d[R]}function vo(d){return typeof d=="string"||typeof d=="number"||typeof d=="symbol"}var Pn={has:function(d,h){if(h===R||h==="constructor"||h===$e)return!0;var O=ho(d);return vo(h)?O.has(h):h in d},get:function(d,h){if(h===R||h==="constructor"||h===$e)return d[h];var O=ho(d),N=O.values.get(h);if(N instanceof Y){var F=N.get();return F===void 0&&O.has(h),F}return vo(h)&&O.has(h),d[h]},set:function(d,h,O){return vo(h)?(Wi(d,h,O),!0):!1},deleteProperty:function(d,h){if(!vo(h))return!1;var O=ho(d);return O.remove(h),!0},ownKeys:function(d){var h=ho(d);return h.keysAtom.reportObserved(),Reflect.ownKeys(d)},preventExtensions:function(d){return P("Dynamic observable objects cannot be frozen"),!1}};function Tn(d){var h=new Proxy(d,Pn);return d[R].proxy=h,h}function Pr(d){return d.interceptors!==void 0&&d.interceptors.length>0}function Un(d,h){var O=d.interceptors||(d.interceptors=[]);return O.push(h),M(function(){var N=O.indexOf(h);N!==-1&&O.splice(N,1)})}function Tr(d,h){var O=re();try{for(var N=Ie(d.interceptors||[]),F=0,W=N.length;F<W&&(h=N[F](h),w(!h||h.type,"Intercept handlers should return nothing or a change object"),!!h);F++);return h}finally{we(O)}}function hr(d){return d.changeListeners!==void 0&&d.changeListeners.length>0}function Vn(d,h){var O=d.changeListeners||(d.changeListeners=[]);return O.push(h),M(function(){var N=O.indexOf(h);N!==-1&&O.splice(N,1)})}function Qt(d,h){var O=re(),N=d.changeListeners;if(N){N=N.slice();for(var F=0,W=N.length;F<W;F++)N[F](h);we(O)}}var El=1e4,xl={get:function(d,h){return h===R?d[R]:h==="length"?d[R].getArrayLength():typeof h=="number"?Dr.get.call(d,h):typeof h=="string"&&!isNaN(h)?Dr.get.call(d,parseInt(h)):Dr.hasOwnProperty(h)?Dr[h]:d[h]},set:function(d,h,O){return h==="length"&&d[R].setArrayLength(O),typeof h=="number"&&Dr.set.call(d,h,O),typeof h=="symbol"||isNaN(h)?d[h]=O:Dr.set.call(d,parseInt(h),O),!0},preventExtensions:function(d){return P("Observable arrays cannot be frozen"),!1}};function Sl(d,h,O,N){O===void 0&&(O="ObservableArray@"+x()),N===void 0&&(N=!1);var F=new Ki(O,h,N);ie(F.values,R,F);var W=new Proxy(F.values,xl);if(F.proxy=W,d&&d.length){var fe=vn(!0);F.spliceWithArray(0,0,d),Gn(fe)}return W}var Ki=function(){function d(h,O,N){this.owned=N,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new Y(h||"ObservableArray@"+x()),this.enhancer=function(F,W){return O(F,W,h+"[..]")}}return d.prototype.dehanceValue=function(h){return this.dehancer!==void 0?this.dehancer(h):h},d.prototype.dehanceValues=function(h){return this.dehancer!==void 0&&h.length>0?h.map(this.dehancer):h},d.prototype.intercept=function(h){return Un(this,h)},d.prototype.observe=function(h,O){return O===void 0&&(O=!1),O&&h({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Vn(this,h)},d.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},d.prototype.setArrayLength=function(h){if(typeof h!="number"||h<0)throw new Error("[mobx.array] Out of range: "+h);var O=this.values.length;if(h!==O)if(h>O){for(var N=new Array(h-O),F=0;F<h-O;F++)N[F]=void 0;this.spliceWithArray(O,0,N)}else this.spliceWithArray(h,O-h)},d.prototype.updateArrayLength=function(h,O){if(h!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=O},d.prototype.spliceWithArray=function(h,O,N){var F=this;Je(this.atom);var W=this.values.length;if(h===void 0?h=0:h>W?h=W:h<0&&(h=Math.max(0,W+h)),arguments.length===1?O=W-h:O==null?O=0:O=Math.max(0,Math.min(O,W-h)),N===void 0&&(N=b),Pr(this)){var fe=Tr(this,{object:this.proxy,type:"splice",index:h,removedCount:O,added:N});if(!fe)return b;O=fe.removedCount,N=fe.added}N=N.length===0?N:N.map(function(ke){return F.enhancer(ke,void 0)});var Te=this.spliceItemsIntoValues(h,O,N);return(O!==0||N.length!==0)&&this.notifyArraySplice(h,N,Te),this.dehanceValues(Te)},d.prototype.spliceItemsIntoValues=function(h,O,N){var F;if(N.length<El)return(F=this.values).splice.apply(F,Ie([h,O],N));var W=this.values.slice(h,h+O);return this.values=this.values.slice(0,h).concat(N,this.values.slice(h+O)),W},d.prototype.notifyArrayChildUpdate=function(h,O,N){var F=!this.owned&&Rt(),W=hr(this),fe=W||F?{object:this.proxy,type:"update",index:h,newValue:O,oldValue:N}:null;this.atom.reportChanged(),W&&Qt(this,fe)},d.prototype.notifyArraySplice=function(h,O,N){var F=!this.owned&&Rt(),W=hr(this),fe=W||F?{object:this.proxy,type:"splice",index:h,removed:N,added:O,removedCount:N.length,addedCount:O.length}:null;this.atom.reportChanged(),W&&Qt(this,fe)},d}(),Dr={intercept:function(d){return this[R].intercept(d)},observe:function(d,h){h===void 0&&(h=!1);var O=this[R];return O.observe(d,h)},clear:function(){return this.splice(0)},replace:function(d){var h=this[R];return h.spliceWithArray(0,h.values.length,d)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(d,h){for(var O=[],N=2;N<arguments.length;N++)O[N-2]=arguments[N];var F=this[R];switch(arguments.length){case 0:return[];case 1:return F.spliceWithArray(d);case 2:return F.spliceWithArray(d,h)}return F.spliceWithArray(d,h,O)},spliceWithArray:function(d,h,O){var N=this[R];return N.spliceWithArray(d,h,O)},push:function(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];var O=this[R];return O.spliceWithArray(O.values.length,0,d),O.values.length},pop:function(){return this.splice(Math.max(this[R].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];var O=this[R];return O.spliceWithArray(0,0,d),O.values.length},reverse:function(){var d=this.slice();return d.reverse.apply(d,arguments)},sort:function(d){var h=this.slice();return h.sort.apply(h,arguments)},remove:function(d){var h=this[R],O=h.dehanceValues(h.values).indexOf(d);return O>-1?(this.splice(O,1),!0):!1},get:function(d){var h=this[R];if(h){if(d<h.values.length)return h.atom.reportObserved(),h.dehanceValue(h.values[d]);console.warn("[mobx.array] Attempt to read an array index ("+d+") that is out of bounds ("+h.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(d,h){var O=this[R],N=O.values;if(d<N.length){Je(O.atom);var F=N[d];if(Pr(O)){var W=Tr(O,{type:"update",object:O.proxy,index:d,newValue:h});if(!W)return;h=W.newValue}h=O.enhancer(h,F);var fe=h!==F;fe&&(N[d]=h,O.notifyArrayChildUpdate(d,h,F))}else if(d===N.length)O.spliceWithArray(d,0,[h]);else throw new Error("[mobx.array] Index out of bounds, "+d+" is larger than "+N.length)}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(d){typeof Array.prototype[d]=="function"&&(Dr[d]=function(){var h=this[R];h.atom.reportObserved();var O=h.dehanceValues(h.values);return O[d].apply(O,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(d){typeof Array.prototype[d]=="function"&&(Dr[d]=function(h,O){var N=this,F=this[R];F.atom.reportObserved();var W=F.dehanceValues(F.values);return W[d](function(fe,Te){return h.call(O,fe,Te,N)},O)})}),["reduce","reduceRight"].forEach(function(d){Dr[d]=function(){var h=this,O=this[R];O.atom.reportObserved();var N=arguments[0];return arguments[0]=function(F,W,fe){return W=O.dehanceValue(W),N(F,W,fe,h)},O.values[d].apply(O.values,arguments)}});var Pl=ee("ObservableArrayAdministration",Ki);function jr(d){return _(d)&&Pl(d[R])}var Zi,Ji={},Qo=function(){function d(h,O,N){if(O===void 0&&(O=tt),N===void 0&&(N="ObservableMap@"+x()),this.enhancer=O,this.name=N,this[Zi]=Ji,this._keysAtom=ce(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")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(h)}return d.prototype._has=function(h){return this._data.has(h)},d.prototype.has=function(h){var O=this;if(!Ge.trackingDerivation)return this._has(h);var N=this._hasMap.get(h);if(!N){var F=N=new an(this._has(h),nt,this.name+"."+k(h)+"?",!1);this._hasMap.set(h,F),Zo(F,function(){return O._hasMap.delete(h)})}return N.get()},d.prototype.set=function(h,O){var N=this._has(h);if(Pr(this)){var F=Tr(this,{type:N?"update":"add",object:this,newValue:O,name:h});if(!F)return this;O=F.newValue}return N?this._updateValue(h,O):this._addValue(h,O),this},d.prototype.delete=function(h){var O=this;if(Je(this._keysAtom),Pr(this)){var N=Tr(this,{type:"delete",object:this,name:h});if(!N)return!1}if(this._has(h)){var F=Rt(),W=hr(this),N=W||F?{type:"delete",object:this,oldValue:this._data.get(h).value,name:h}:null;return Sr(function(){O._keysAtom.reportChanged(),O._updateHasMapEntry(h,!1);var Te=O._data.get(h);Te.setNewValue(void 0),O._data.delete(h)}),W&&Qt(this,N),!0}return!1},d.prototype._updateHasMapEntry=function(h,O){var N=this._hasMap.get(h);N&&N.setNewValue(O)},d.prototype._updateValue=function(h,O){var N=this._data.get(h);if(O=N.prepareNewValue(O),O!==Ge.UNCHANGED){var F=Rt(),W=hr(this),fe=W||F?{type:"update",object:this,oldValue:N.value,name:h,newValue:O}:null;N.setNewValue(O),W&&Qt(this,fe)}},d.prototype._addValue=function(h,O){var N=this;Je(this._keysAtom),Sr(function(){var Te=new an(O,N.enhancer,N.name+"."+k(h),!1);N._data.set(h,Te),O=Te.value,N._updateHasMapEntry(h,!0),N._keysAtom.reportChanged()});var F=Rt(),W=hr(this),fe=W||F?{type:"add",object:this,name:h,newValue:O}:null;W&&Qt(this,fe)},d.prototype.get=function(h){return this.has(h)?this.dehanceValue(this._data.get(h).get()):this.dehanceValue(void 0)},d.prototype.dehanceValue=function(h){return this.dehancer!==void 0?this.dehancer(h):h},d.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},d.prototype.values=function(){var h=this,O=this.keys();return go({next:function(){var N=O.next(),F=N.done,W=N.value;return{done:F,value:F?void 0:h.get(W)}}})},d.prototype.entries=function(){var h=this,O=this.keys();return go({next:function(){var N=O.next(),F=N.done,W=N.value;return{done:F,value:F?void 0:[W,h.get(W)]}}})},d.prototype[Zi=R,Symbol.iterator]=function(){return this.entries()},d.prototype.forEach=function(h,O){var N,F;try{for(var W=_e(this),fe=W.next();!fe.done;fe=W.next()){var Te=Se(fe.value,2),ke=Te[0],ft=Te[1];h.call(O,ft,ke,this)}}catch(ct){N={error:ct}}finally{try{fe&&!fe.done&&(F=W.return)&&F.call(W)}finally{if(N)throw N.error}}},d.prototype.merge=function(h){var O=this;return $t(h)&&(h=h.toJS()),Sr(function(){var N=vn(!0);try{z(h)?L(h).forEach(function(F){return O.set(F,h[F])}):Array.isArray(h)?h.forEach(function(F){var W=Se(F,2),fe=W[0],Te=W[1];return O.set(fe,Te)}):J(h)?(h.constructor!==Map&&P("Cannot initialize from classes that inherit from Map: "+h.constructor.name),h.forEach(function(F,W){return O.set(W,F)})):h!=null&&P("Cannot initialize map from "+h)}finally{Gn(N)}}),this},d.prototype.clear=function(){var h=this;Sr(function(){te(function(){var O,N;try{for(var F=_e(h.keys()),W=F.next();!W.done;W=F.next()){var fe=W.value;h.delete(fe)}}catch(Te){O={error:Te}}finally{try{W&&!W.done&&(N=F.return)&&N.call(F)}finally{if(O)throw O.error}}})})},d.prototype.replace=function(h){var O=this;return Sr(function(){var N,F,W,fe,Te=X(h),ke=new Map,ft=!1;try{for(var ct=_e(O._data.keys()),Ot=ct.next();!Ot.done;Ot=ct.next()){var xt=Ot.value;if(!Te.has(xt)){var _t=O.delete(xt);if(_t)ft=!0;else{var Xt=O._data.get(xt);ke.set(xt,Xt)}}}}catch(sn){N={error:sn}}finally{try{Ot&&!Ot.done&&(F=ct.return)&&F.call(ct)}finally{if(N)throw N.error}}try{for(var Mt=_e(Te.entries()),yr=Mt.next();!yr.done;yr=Mt.next()){var Mn=Se(yr.value,2),xt=Mn[0],Xt=Mn[1],ua=O._data.has(xt);if(O.set(xt,Xt),O._data.has(xt)){var sa=O._data.get(xt);ke.set(xt,sa),ua||(ft=!0)}}}catch(sn){W={error:sn}}finally{try{yr&&!yr.done&&(fe=Mt.return)&&fe.call(Mt)}finally{if(W)throw W.error}}if(!ft)if(O._data.size!==ke.size)O._keysAtom.reportChanged();else for(var la=O._data.keys(),fa=ke.keys(),ti=la.next(),wn=fa.next();!ti.done;){if(ti.value!==wn.value){O._keysAtom.reportChanged();break}ti=la.next(),wn=fa.next()}O._data=ke}),this},Object.defineProperty(d.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),d.prototype.toPOJO=function(){var h,O,N={};try{for(var F=_e(this),W=F.next();!W.done;W=F.next()){var fe=Se(W.value,2),Te=fe[0],ke=fe[1];N[typeof Te=="symbol"?Te:k(Te)]=ke}}catch(ft){h={error:ft}}finally{try{W&&!W.done&&(O=F.return)&&O.call(F)}finally{if(h)throw h.error}}return N},d.prototype.toJS=function(){return new Map(this)},d.prototype.toJSON=function(){return this.toPOJO()},d.prototype.toString=function(){var h=this;return this.name+"[{ "+Array.from(this.keys()).map(function(O){return k(O)+": "+(""+h.get(O))}).join(", ")+" }]"},d.prototype.observe=function(h,O){return Vn(this,h)},d.prototype.intercept=function(h){return Un(this,h)},d}(),$t=ee("ObservableMap",Qo),Qi,Tl={},qi=function(){function d(h,O,N){if(O===void 0&&(O=tt),N===void 0&&(N="ObservableSet@"+x()),this.name=N,this[Qi]=Tl,this._data=new Set,this._atom=ce(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(F,W){return O(F,W,N)},h&&this.replace(h)}return d.prototype.dehanceValue=function(h){return this.dehancer!==void 0?this.dehancer(h):h},d.prototype.clear=function(){var h=this;Sr(function(){te(function(){var O,N;try{for(var F=_e(h._data.values()),W=F.next();!W.done;W=F.next()){var fe=W.value;h.delete(fe)}}catch(Te){O={error:Te}}finally{try{W&&!W.done&&(N=F.return)&&N.call(F)}finally{if(O)throw O.error}}})})},d.prototype.forEach=function(h,O){var N,F;try{for(var W=_e(this),fe=W.next();!fe.done;fe=W.next()){var Te=fe.value;h.call(O,Te,Te,this)}}catch(ke){N={error:ke}}finally{try{fe&&!fe.done&&(F=W.return)&&F.call(W)}finally{if(N)throw N.error}}},Object.defineProperty(d.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),d.prototype.add=function(h){var O=this;if(Je(this._atom),Pr(this)){var N=Tr(this,{type:"add",object:this,newValue:h});if(!N)return this}if(!this.has(h)){Sr(function(){O._data.add(O.enhancer(h,void 0)),O._atom.reportChanged()});var F=Rt(),W=hr(this),N=W||F?{type:"add",object:this,newValue:h}:null;W&&Qt(this,N)}return this},d.prototype.delete=function(h){var O=this;if(Pr(this)){var N=Tr(this,{type:"delete",object:this,oldValue:h});if(!N)return!1}if(this.has(h)){var F=Rt(),W=hr(this),N=W||F?{type:"delete",object:this,oldValue:h}:null;return Sr(function(){O._atom.reportChanged(),O._data.delete(h)}),W&&Qt(this,N),!0}return!1},d.prototype.has=function(h){return this._atom.reportObserved(),this._data.has(this.dehanceValue(h))},d.prototype.entries=function(){var h=0,O=Array.from(this.keys()),N=Array.from(this.values());return go({next:function(){var F=h;return h+=1,F<N.length?{value:[O[F],N[F]],done:!1}:{done:!0}}})},d.prototype.keys=function(){return this.values()},d.prototype.values=function(){this._atom.reportObserved();var h=this,O=0,N=Array.from(this._data.values());return go({next:function(){return O<N.length?{value:h.dehanceValue(N[O++]),done:!1}:{done:!0}}})},d.prototype.replace=function(h){var O=this;return lr(h)&&(h=h.toJS()),Sr(function(){var N=vn(!0);try{Array.isArray(h)?(O.clear(),h.forEach(function(F){return O.add(F)})):ue(h)?(O.clear(),h.forEach(function(F){return O.add(F)})):h!=null&&P("Cannot initialize set from "+h)}finally{Gn(N)}}),this},d.prototype.observe=function(h,O){return Vn(this,h)},d.prototype.intercept=function(h){return Un(this,h)},d.prototype.toJS=function(){return new Set(this)},d.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},d.prototype[Qi=R,Symbol.iterator]=function(){return this.values()},d}(),lr=ee("ObservableSet",qi),ea=function(){function d(h,O,N,F){O===void 0&&(O=new Map),this.target=h,this.values=O,this.name=N,this.defaultEnhancer=F,this.keysAtom=new Y(N+".keys")}return d.prototype.read=function(h){return this.values.get(h).get()},d.prototype.write=function(h,O){var N=this.target,F=this.values.get(h);if(F instanceof yn){F.set(O);return}if(Pr(this)){var W=Tr(this,{type:"update",object:this.proxy||N,name:h,newValue:O});if(!W)return;O=W.newValue}if(O=F.prepareNewValue(O),O!==Ge.UNCHANGED){var fe=hr(this),Te=Rt(),W=fe||Te?{type:"update",object:this.proxy||N,oldValue:F.value,name:h,newValue:O}:null;F.setNewValue(O),fe&&Qt(this,W)}},d.prototype.has=function(h){var O=this.pendingKeys||(this.pendingKeys=new Map),N=O.get(h);if(N)return N.get();var F=!!this.values.get(h);return N=new an(F,nt,this.name+"."+k(h)+"?",!1),O.set(h,N),N.get()},d.prototype.addObservableProp=function(h,O,N){N===void 0&&(N=this.defaultEnhancer);var F=this.target;if(Pr(this)){var W=Tr(this,{object:this.proxy||F,name:h,type:"add",newValue:O});if(!W)return;O=W.newValue}var fe=new an(O,N,this.name+"."+k(h),!1);this.values.set(h,fe),O=fe.value,Object.defineProperty(F,h,Ml(h)),this.notifyPropertyAddition(h,O)},d.prototype.addComputedProp=function(h,O,N){var F=this.target;N.name=N.name||this.name+"."+k(O),this.values.set(O,new yn(N)),(h===F||oe(h,O))&&Object.defineProperty(h,O,wl(O))},d.prototype.remove=function(h){if(this.values.has(h)){var O=this.target;if(Pr(this)){var N=Tr(this,{object:this.proxy||O,name:h,type:"remove"});if(!N)return}try{Tt();var F=hr(this),W=Rt(),fe=this.values.get(h),Te=fe&&fe.get();if(fe&&fe.set(void 0),this.keysAtom.reportChanged(),this.values.delete(h),this.pendingKeys){var ke=this.pendingKeys.get(h);ke&&ke.set(!1)}delete this.target[h];var N=F||W?{type:"remove",object:this.proxy||O,oldValue:Te,name:h}:null;F&&Qt(this,N)}finally{pr()}}},d.prototype.illegalAccess=function(h,O){console.warn("Property '"+O+"' of '"+h+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},d.prototype.observe=function(h,O){return Vn(this,h)},d.prototype.intercept=function(h){return Un(this,h)},d.prototype.notifyPropertyAddition=function(h,O){var N=hr(this),F=Rt(),W=N||F?{type:"add",object:this.proxy||this.target,name:h,newValue:O}:null;if(N&&Qt(this,W),this.pendingKeys){var fe=this.pendingKeys.get(h);fe&&fe.set(!0)}this.keysAtom.reportChanged()},d.prototype.getKeys=function(){var h,O;this.keysAtom.reportObserved();var N=[];try{for(var F=_e(this.values),W=F.next();!W.done;W=F.next()){var fe=Se(W.value,2),Te=fe[0],ke=fe[1];ke instanceof an&&N.push(Te)}}catch(ft){h={error:ft}}finally{try{W&&!W.done&&(O=F.return)&&O.call(F)}finally{if(h)throw h.error}}return N},d}();function qo(d,h,O){if(h===void 0&&(h=""),O===void 0&&(O=tt),Object.prototype.hasOwnProperty.call(d,R))return d[R];z(d)||(h=(d.constructor.name||"ObservableObject")+"@"+x()),h||(h="ObservableObject@"+x());var N=new ea(d,new Map,k(h),O);return U(d,R,N),N}var ta=Object.create(null),ra=Object.create(null);function Ml(d){return ta[d]||(ta[d]={configurable:!0,enumerable:!0,get:function(){return this[R].read(d)},set:function(h){this[R].write(d,h)}})}function na(d){var h=d[R];return h||(xe(d),d[R])}function wl(d){return ra[d]||(ra[d]={configurable:Ge.computedConfigurable,enumerable:!1,get:function(){return na(this).read(d)},set:function(h){na(this).write(d,h)}})}var Al=ee("ObservableObjectAdministration",ea);function vr(d){return _(d)?(xe(d),Al(d[R])):!1}function Mr(d,h){if(typeof d=="object"&&d!==null){if(jr(d))return h!==void 0&&P(!1),d[R].atom;if(lr(d))return d[R];if($t(d)){var O=d;if(h===void 0)return O._keysAtom;var N=O._data.get(h)||O._hasMap.get(h);return N||P(!1),N}if(xe(d),h&&!d[R]&&d[h],vr(d)){if(!h)return P(!1);var N=d[R].values.get(h);return N||P(!1),N}if(Q(d)||gn(d)||co(d))return d}else if(typeof d=="function"&&co(d[R]))return d[R];return P(!1)}function Yn(d,h){if(d||P("Expecting some object"),h!==void 0)return Yn(Mr(d,h));if(Q(d)||gn(d)||co(d)||$t(d)||lr(d))return d;if(xe(d),d[R])return d[R];P(!1)}function Nl(d,h){var O;return h!==void 0?O=Mr(d,h):vr(d)||$t(d)||lr(d)?O=Yn(d):O=Mr(d),O.name}var oa=Object.prototype.toString;function yo(d,h,O){return O===void 0&&(O=-1),Wn(d,h,O)}function Wn(d,h,O,N,F){if(d===h)return d!==0||1/d===1/h;if(d==null||h==null)return!1;if(d!==d)return h!==h;var W=typeof d;if(W!=="function"&&W!=="object"&&typeof h!="object")return!1;var fe=oa.call(d);if(fe!==oa.call(h))return!1;switch(fe){case"[object RegExp]":case"[object String]":return""+d==""+h;case"[object Number]":return+d!=+d?+h!=+h:+d==0?1/+d===1/h:+d==+h;case"[object Date]":case"[object Boolean]":return+d==+h;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(d)===Symbol.valueOf.call(h);case"[object Map]":case"[object Set]":O>=0&&O++;break}d=ia(d),h=ia(h);var Te=fe==="[object Array]";if(!Te){if(typeof d!="object"||typeof h!="object")return!1;var ke=d.constructor,ft=h.constructor;if(ke!==ft&&!(typeof ke=="function"&&ke instanceof ke&&typeof ft=="function"&&ft instanceof ft)&&"constructor"in d&&"constructor"in h)return!1}if(O===0)return!1;O<0&&(O=-1),N=N||[],F=F||[];for(var ct=N.length;ct--;)if(N[ct]===d)return F[ct]===h;if(N.push(d),F.push(h),Te){if(ct=d.length,ct!==h.length)return!1;for(;ct--;)if(!Wn(d[ct],h[ct],O-1,N,F))return!1}else{var Ot=Object.keys(d),xt=void 0;if(ct=Ot.length,Object.keys(h).length!==ct)return!1;for(;ct--;)if(xt=Ot[ct],!(Dl(h,xt)&&Wn(d[xt],h[xt],O-1,N,F)))return!1}return N.pop(),F.pop(),!0}function ia(d){return jr(d)?d.slice():J(d)||$t(d)||ue(d)||lr(d)?Array.from(d.entries()):d}function Dl(d,h){return Object.prototype.hasOwnProperty.call(d,h)}function go(d){return d[Symbol.iterator]=ei,d}function ei(){return this}if(typeof Proxy>"u"||typeof Symbol>"u")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.");try{}catch{var aa=so();typeof l>"u"&&(aa.process={}),aa.process.env={}}(function(){function d(){}if(d.name!=="testCodeMinification"&&!1)var h})(),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:zi,extras:{getDebugName:Nl},$mobx:R})}).call(this,i(155),i(82))},function(u,c,i){i.d(c,"a",function(){return oe}),i.d(c,"b",function(){return ie}),i.d(c,"c",function(){return Ie}),i.d(c,"d",function(){return $e}),i.d(c,"e",function(){return z}),i.d(c,"f",function(){return U}),i.d(c,"g",function(){return z}),i.d(c,"h",function(){return Se}),i.d(c,"i",function(){return f}),i.d(c,"j",function(){return _e}),i.d(c,"k",function(){return A});var l,f,y,b,S,x,P,w={},M=[],j=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function C($,V){for(var q in V)$[q]=V[q];return $}function _($){var V=$.parentNode;V&&V.removeChild($)}function z($,V,q){var he,xe,pe,ze={};for(pe in V)pe=="key"?he=V[pe]:pe=="ref"?xe=V[pe]:ze[pe]=V[pe];if(arguments.length>2&&(ze.children=arguments.length>3?l.call(arguments,2):q),typeof $=="function"&&$.defaultProps!=null)for(pe in $.defaultProps)ze[pe]===void 0&&(ze[pe]=$.defaultProps[pe]);return X($,ze,he,xe,null)}function X($,V,q,he,xe){var pe={type:$,props:V,key:q,ref:he,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:xe??++y};return xe==null&&f.vnode!=null&&f.vnode(pe),pe}function U(){return{current:null}}function ie($){return $.children}function oe($,V){this.props=$,this.context=V}function ee($,V){if(V==null)return $.__?ee($.__,$.__.__k.indexOf($)+1):null;for(var q;V<$.__k.length;V++)if((q=$.__k[V])!=null&&q.__e!=null)return q.__e;return typeof $.type=="function"?ee($):null}function J($){var V,q;if(($=$.__)!=null&&$.__c!=null){for($.__e=$.__c.base=null,V=0;V<$.__k.length;V++)if((q=$.__k[V])!=null&&q.__e!=null){$.__e=$.__c.base=q.__e;break}return J($)}}function ue($){(!$.__d&&($.__d=!0)&&b.push($)&&!L.__r++||x!==f.debounceRendering)&&((x=f.debounceRendering)||S)(L)}function L(){for(var $;L.__r=b.length;)$=b.sort(function(V,q){return V.__v.__b-q.__v.__b}),b=[],$.some(function(V){var q,he,xe,pe,ze,tt;V.__d&&(ze=(pe=(q=V).__v).__e,(tt=q.__P)&&(he=[],(xe=C({},pe)).__v=pe.__v+1,Oe(tt,pe,xe,q.__n,tt.ownerSVGElement!==void 0,pe.__h!=null?[ze]:null,he,ze??ee(pe),pe.__h),Pe(he,pe),pe.__e!=ze&&J(pe)))})}function k($,V,q,he,xe,pe,ze,tt,Ye,nt){var ve,ut,rt,Be,Qe,At,dt,bt=he&&he.__k||M,ne=bt.length;for(q.__k=[],ve=0;ve<V.length;ve++)if((Be=q.__k[ve]=(Be=V[ve])==null||typeof Be=="boolean"?null:typeof Be=="string"||typeof Be=="number"||typeof Be=="bigint"?X(null,Be,null,null,Be):Array.isArray(Be)?X(ie,{children:Be},null,null,null):Be.__b>0?X(Be.type,Be.props,Be.key,null,Be.__v):Be)!=null){if(Be.__=q,Be.__b=q.__b+1,(rt=bt[ve])===null||rt&&Be.key==rt.key&&Be.type===rt.type)bt[ve]=void 0;else for(ut=0;ut<ne;ut++){if((rt=bt[ut])&&Be.key==rt.key&&Be.type===rt.type){bt[ut]=void 0;break}rt=null}Oe($,Be,rt=rt||w,xe,pe,ze,tt,Ye,nt),Qe=Be.__e,(ut=Be.ref)&&rt.ref!=ut&&(dt||(dt=[]),rt.ref&&dt.push(rt.ref,null,Be),dt.push(ut,Be.__c||Qe,Be)),Qe!=null?(At==null&&(At=Qe),typeof Be.type=="function"&&Be.__k===rt.__k?Be.__d=Ye=I(Be,Ye,$):Ye=R($,Be,rt,bt,Qe,Ye),typeof q.type=="function"&&(q.__d=Ye)):Ye&&rt.__e==Ye&&Ye.parentNode!=$&&(Ye=ee(rt))}for(q.__e=At,ve=ne;ve--;)bt[ve]!=null&&(typeof q.type=="function"&&bt[ve].__e!=null&&bt[ve].__e==q.__d&&(q.__d=ee(he,ve+1)),Le(bt[ve],bt[ve]));if(dt)for(ve=0;ve<dt.length;ve++)Ne(dt[ve],dt[++ve],dt[++ve])}function I($,V,q){for(var he,xe=$.__k,pe=0;xe&&pe<xe.length;pe++)(he=xe[pe])&&(he.__=$,V=typeof he.type=="function"?I(he,V,q):R(q,he,he,xe,he.__e,V));return V}function A($,V){return V=V||[],$==null||typeof $=="boolean"||(Array.isArray($)?$.some(function(q){A(q,V)}):V.push($)),V}function R($,V,q,he,xe,pe){var ze,tt,Ye;if(V.__d!==void 0)ze=V.__d,V.__d=void 0;else if(q==null||xe!=pe||xe.parentNode==null)e:if(pe==null||pe.parentNode!==$)$.appendChild(xe),ze=null;else{for(tt=pe,Ye=0;(tt=tt.nextSibling)&&Ye<he.length;Ye+=2)if(tt==xe)break e;$.insertBefore(xe,pe),ze=pe}return ze!==void 0?ze:xe.nextSibling}function Y($,V,q,he,xe){var pe;for(pe in q)pe==="children"||pe==="key"||pe in V||ce($,pe,null,q[pe],he);for(pe in V)xe&&typeof V[pe]!="function"||pe==="children"||pe==="key"||pe==="value"||pe==="checked"||q[pe]===V[pe]||ce($,pe,V[pe],q[pe],he)}function Q($,V,q){V[0]==="-"?$.setProperty(V,q):$[V]=q==null?"":typeof q!="number"||j.test(V)?q:q+"px"}function ce($,V,q,he,xe){var pe;e:if(V==="style")if(typeof q=="string")$.style.cssText=q;else{if(typeof he=="string"&&($.style.cssText=he=""),he)for(V in he)q&&V in q||Q($.style,V,"");if(q)for(V in q)he&&q[V]===he[V]||Q($.style,V,q[V])}else if(V[0]==="o"&&V[1]==="n")pe=V!==(V=V.replace(/Capture$/,"")),V=V.toLowerCase()in $?V.toLowerCase().slice(2):V.slice(2),$.l||($.l={}),$.l[V+pe]=q,q?he||$.addEventListener(V,pe?me:Me,pe):$.removeEventListener(V,pe?me:Me,pe);else if(V!=="dangerouslySetInnerHTML"){if(xe)V=V.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(V!=="href"&&V!=="list"&&V!=="form"&&V!=="tabIndex"&&V!=="download"&&V in $)try{$[V]=q??"";break e}catch{}typeof q=="function"||(q!=null&&(q!==!1||V[0]==="a"&&V[1]==="r")?$.setAttribute(V,q):$.removeAttribute(V))}}function Me($){this.l[$.type+!1](f.event?f.event($):$)}function me($){this.l[$.type+!0](f.event?f.event($):$)}function Oe($,V,q,he,xe,pe,ze,tt,Ye){var nt,ve,ut,rt,Be,Qe,At,dt,bt,ne,Ct,St=V.type;if(V.constructor!==void 0)return null;q.__h!=null&&(Ye=q.__h,tt=V.__e=q.__e,V.__h=null,pe=[tt]),(nt=f.__b)&&nt(V);try{e:if(typeof St=="function"){if(dt=V.props,bt=(nt=St.contextType)&&he[nt.__c],ne=nt?bt?bt.props.value:nt.__:he,q.__c?At=(ve=V.__c=q.__c).__=ve.__E:("prototype"in St&&St.prototype.render?V.__c=ve=new St(dt,ne):(V.__c=ve=new oe(dt,ne),ve.constructor=St,ve.render=Ke),bt&&bt.sub(ve),ve.props=dt,ve.state||(ve.state={}),ve.context=ne,ve.__n=he,ut=ve.__d=!0,ve.__h=[]),ve.__s==null&&(ve.__s=ve.state),St.getDerivedStateFromProps!=null&&(ve.__s==ve.state&&(ve.__s=C({},ve.__s)),C(ve.__s,St.getDerivedStateFromProps(dt,ve.__s))),rt=ve.props,Be=ve.state,ut)St.getDerivedStateFromProps==null&&ve.componentWillMount!=null&&ve.componentWillMount(),ve.componentDidMount!=null&&ve.__h.push(ve.componentDidMount);else{if(St.getDerivedStateFromProps==null&&dt!==rt&&ve.componentWillReceiveProps!=null&&ve.componentWillReceiveProps(dt,ne),!ve.__e&&ve.shouldComponentUpdate!=null&&ve.shouldComponentUpdate(dt,ve.__s,ne)===!1||V.__v===q.__v){ve.props=dt,ve.state=ve.__s,V.__v!==q.__v&&(ve.__d=!1),ve.__v=V,V.__e=q.__e,V.__k=q.__k,V.__k.forEach(function(mt){mt&&(mt.__=V)}),ve.__h.length&&ze.push(ve);break e}ve.componentWillUpdate!=null&&ve.componentWillUpdate(dt,ve.__s,ne),ve.componentDidUpdate!=null&&ve.__h.push(function(){ve.componentDidUpdate(rt,Be,Qe)})}ve.context=ne,ve.props=dt,ve.state=ve.__s,(nt=f.__r)&&nt(V),ve.__d=!1,ve.__v=V,ve.__P=$,nt=ve.render(ve.props,ve.state,ve.context),ve.state=ve.__s,ve.getChildContext!=null&&(he=C(C({},he),ve.getChildContext())),ut||ve.getSnapshotBeforeUpdate==null||(Qe=ve.getSnapshotBeforeUpdate(rt,Be)),Ct=nt!=null&&nt.type===ie&&nt.key==null?nt.props.children:nt,k($,Array.isArray(Ct)?Ct:[Ct],V,q,he,xe,pe,ze,tt,Ye),ve.base=V.__e,V.__h=null,ve.__h.length&&ze.push(ve),At&&(ve.__E=ve.__=null),ve.__e=!1}else pe==null&&V.__v===q.__v?(V.__k=q.__k,V.__e=q.__e):V.__e=Ee(q.__e,V,q,he,xe,pe,ze,Ye);(nt=f.diffed)&&nt(V)}catch(mt){V.__v=null,(Ye||pe!=null)&&(V.__e=tt,V.__h=!!Ye,pe[pe.indexOf(tt)]=null),f.__e(mt,V,q)}}function Pe($,V){f.__c&&f.__c(V,$),$.some(function(q){try{$=q.__h,q.__h=[],$.some(function(he){he.call(q)})}catch(he){f.__e(he,q.__v)}})}function Ee($,V,q,he,xe,pe,ze,tt){var Ye,nt,ve,ut=q.props,rt=V.props,Be=V.type,Qe=0;if(Be==="svg"&&(xe=!0),pe!=null){for(;Qe<pe.length;Qe++)if((Ye=pe[Qe])&&"setAttribute"in Ye==!!Be&&(Be?Ye.localName===Be:Ye.nodeType===3)){$=Ye,pe[Qe]=null;break}}if($==null){if(Be===null)return document.createTextNode(rt);$=xe?document.createElementNS("http://www.w3.org/2000/svg",Be):document.createElement(Be,rt.is&&rt),pe=null,tt=!1}if(Be===null)ut===rt||tt&&$.data===rt||($.data=rt);else{if(pe=pe&&l.call($.childNodes),nt=(ut=q.props||w).dangerouslySetInnerHTML,ve=rt.dangerouslySetInnerHTML,!tt){if(pe!=null)for(ut={},Qe=0;Qe<$.attributes.length;Qe++)ut[$.attributes[Qe].name]=$.attributes[Qe].value;(ve||nt)&&(ve&&(nt&&ve.__html==nt.__html||ve.__html===$.innerHTML)||($.innerHTML=ve&&ve.__html||""))}if(Y($,rt,ut,xe,tt),ve)V.__k=[];else if(Qe=V.props.children,k($,Array.isArray(Qe)?Qe:[Qe],V,q,he,xe&&Be!=="foreignObject",pe,ze,pe?pe[0]:q.__k&&ee(q,0),tt),pe!=null)for(Qe=pe.length;Qe--;)pe[Qe]!=null&&_(pe[Qe]);tt||("value"in rt&&(Qe=rt.value)!==void 0&&(Qe!==ut.value||Qe!==$.value||Be==="progress"&&!Qe)&&ce($,"value",Qe,ut.value,!1),"checked"in rt&&(Qe=rt.checked)!==void 0&&Qe!==$.checked&&ce($,"checked",Qe,ut.checked,!1))}return $}function Ne($,V,q){try{typeof $=="function"?$(V):$.current=V}catch(he){f.__e(he,q)}}function Le($,V,q){var he,xe;if(f.unmount&&f.unmount($),(he=$.ref)&&(he.current&&he.current!==$.__e||Ne(he,null,V)),(he=$.__c)!=null){if(he.componentWillUnmount)try{he.componentWillUnmount()}catch(pe){f.__e(pe,V)}he.base=he.__P=null}if(he=$.__k)for(xe=0;xe<he.length;xe++)he[xe]&&Le(he[xe],V,typeof $.type!="function");q||$.__e==null||_($.__e),$.__e=$.__d=void 0}function Ke($,V,q){return this.constructor($,q)}function _e($,V,q){var he,xe,pe;f.__&&f.__($,V),xe=(he=typeof q=="function")?null:q&&q.__k||V.__k,pe=[],Oe(V,$=(!he&&q||V).__k=z(ie,null,[$]),xe||w,w,V.ownerSVGElement!==void 0,!he&&q?[q]:xe?null:V.firstChild?l.call(V.childNodes):null,pe,!he&&q?q:xe?xe.__e:V.firstChild,he),Pe(pe,$)}function Se($,V){_e($,V,Se)}function Ie($,V,q){var he,xe,pe,ze=C({},$.props);for(pe in V)pe=="key"?he=V[pe]:pe=="ref"?xe=V[pe]:ze[pe]=V[pe];return arguments.length>2&&(ze.children=arguments.length>3?l.call(arguments,2):q),X($.type,ze,he||$.key,xe||$.ref,null)}function $e($,V){var q={__c:V="__cC"+P++,__:$,Consumer:function(he,xe){return he.children(xe)},Provider:function(he){var xe,pe;return this.getChildContext||(xe=[],(pe={})[V]=this,this.getChildContext=function(){return pe},this.shouldComponentUpdate=function(ze){this.props.value!==ze.value&&xe.some(ue)},this.sub=function(ze){xe.push(ze);var tt=ze.componentWillUnmount;ze.componentWillUnmount=function(){xe.splice(xe.indexOf(ze),1),tt&&tt.call(ze)}}),he.children}};return q.Provider.__=q.Consumer.contextType=q}l=M.slice,f={__e:function($,V){for(var q,he,xe;V=V.__;)if((q=V.__c)&&!q.__)try{if((he=q.constructor)&&he.getDerivedStateFromError!=null&&(q.setState(he.getDerivedStateFromError($)),xe=q.__d),q.componentDidCatch!=null&&(q.componentDidCatch($),xe=q.__d),xe)return q.__E=q}catch(pe){$=pe}throw $}},y=0,oe.prototype.setState=function($,V){var q;q=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C({},this.state),typeof $=="function"&&($=$(C({},q),this.props)),$&&C(q,$),$!=null&&this.__v&&(V&&this.__h.push(V),ue(this))},oe.prototype.forceUpdate=function($){this.__v&&(this.__e=!0,$&&this.__h.push($),ue(this))},oe.prototype.render=ie,b=[],S=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,L.__r=0,P=0},function(u,c,i){var l=i(116),f=i(44),y=i(178);l||f(Object.prototype,"toString",y,{unsafe:!0})},function(u,c,i){var l=i(39),f=i(83),y=i(70),b=i(56),S=i(111),x="Array Iterator",P=b.set,w=b.getterFor(x);u.exports=S(Array,"Array",function(M,j){P(this,{type:x,target:l(M),index:0,kind:j})},function(){var M=w(this),j=M.target,C=M.kind,_=M.index++;return!j||_>=j.length?(M.target=void 0,{value:void 0,done:!0}):C=="keys"?{value:_,done:!1}:C=="values"?{value:j[_],done:!1}:{value:[_,j[_]],done:!1}},"values"),y.Arguments=y.Array,f("keys"),f("values"),f("entries")},function(u,c,i){var l=i(7),f=i(147),y=i(148),b=i(3),S=i(57),x=i(27),P=x("iterator"),w=x("toStringTag"),M=b.values,j=function(_,z){if(_){if(_[P]!==M)try{S(_,P,M)}catch{_[P]=M}if(_[w]||S(_,w,z),f[z]){for(var X in b)if(_[X]!==b[X])try{S(_,X,b[X])}catch{_[X]=b[X]}}}};for(var C in f)j(l[C]&&l[C].prototype,C);j(y,"DOMTokenList")},function(u,c,i){var l=i(16),f=i(7),y=i(46),b=i(76),S=i(35),x=i(15),P=i(64),w=i(36),M=i(109),j=i(18),C=i(34),_=i(99),z=i(28),X=i(33),U=i(58),ie=i(88),oe=i(32),ee=i(38),J=i(39),ue=i(87),L=i(40),k=i(71),I=i(54),A=i(66),R=i(72),Y=i(139),Q=i(112),ce=i(51),Me=i(37),me=i(93),Oe=i(101),Pe=i(44),Ee=i(84),Ne=i(91),Le=i(69),Ke=i(85),_e=i(27),Se=i(149),Ie=i(150),$e=i(73),$=i(56),V=i(74).forEach,q=Ne("hidden"),he="Symbol",xe="prototype",pe=_e("toPrimitive"),ze=$.set,tt=$.getterFor(he),Ye=Object[xe],nt=f.Symbol,ve=nt&&nt[xe],ut=f.TypeError,rt=f.QObject,Be=y("JSON","stringify"),Qe=ce.f,At=Me.f,dt=Y.f,bt=me.f,ne=x([].push),Ct=Ee("symbols"),St=Ee("op-symbols"),mt=Ee("string-to-symbol-registry"),Vt=Ee("symbol-to-string-registry"),dr=Ee("wks"),Kt=!rt||!rt[xe]||!rt[xe].findChild,Er=w&&j(function(){return I(At({},"a",{get:function(){return At(this,"a",{value:7}).a}})).a!=7})?function(te,re,we){var De=Qe(Ye,re);De&&delete Ye[re],At(te,re,we),De&&te!==Ye&&At(Ye,re,De)}:At,qe=function(te,re){var we=Ct[te]=I(ve);return ze(we,{type:he,tag:te,description:re}),w||(we.description=re),we},Pt=function(re,we,De){re===Ye&&Pt(St,we,De),oe(re);var Xe=ue(we);return oe(De),C(Ct,Xe)?(De.enumerable?(C(re,q)&&re[q][Xe]&&(re[q][Xe]=!1),De=I(De,{enumerable:k(0,!1)})):(C(re,q)||At(re,q,k(1,{})),re[q][Xe]=!0),Er(re,Xe,De)):At(re,Xe,De)},rr=function(re,we){oe(re);var De=J(we),Xe=A(De).concat(lt(De));return V(Xe,function(vt){(!w||S(Ue,De,vt))&&Pt(re,vt,De[vt])}),re},je=function(re,we){return we===void 0?I(re):rr(I(re),we)},Ue=function(re){var we=ue(re),De=S(bt,this,we);return this===Ye&&C(Ct,we)&&!C(St,we)?!1:De||!C(this,we)||!C(Ct,we)||C(this,q)&&this[q][we]?De:!0},ot=function(re,we){var De=J(re),Xe=ue(we);if(!(De===Ye&&C(Ct,Xe)&&!C(St,Xe))){var vt=Qe(De,Xe);return vt&&C(Ct,Xe)&&!(C(De,q)&&De[q][Xe])&&(vt.enumerable=!0),vt}},Je=function(re){var we=dt(J(re)),De=[];return V(we,function(Xe){!C(Ct,Xe)&&!C(Le,Xe)&&ne(De,Xe)}),De},lt=function(re){var we=re===Ye,De=dt(we?St:J(re)),Xe=[];return V(De,function(vt){C(Ct,vt)&&(!we||C(Ye,vt))&&ne(Xe,Ct[vt])}),Xe};if(M||(nt=function(){if(U(ve,this))throw ut("Symbol is not a constructor");var re=!arguments.length||arguments[0]===void 0?void 0:L(arguments[0]),we=Ke(re),De=function(Xe){this===Ye&&S(De,St,Xe),C(this,q)&&C(this[q],we)&&(this[q][we]=!1),Er(this,we,k(1,Xe))};return w&&Kt&&Er(Ye,we,{configurable:!0,set:De}),qe(we,re)},ve=nt[xe],Pe(ve,"toString",function(){return tt(this).tag}),Pe(nt,"withoutSetter",function(te){return qe(Ke(te),te)}),me.f=Ue,Me.f=Pt,ce.f=ot,R.f=Y.f=Je,Q.f=lt,Se.f=function(te){return qe(_e(te),te)},w&&(At(ve,"description",{configurable:!0,get:function(){return tt(this).description}}),P||Pe(Ye,"propertyIsEnumerable",Ue,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!M,sham:!M},{Symbol:nt}),V(A(dr),function(te){Ie(te)}),l({target:he,stat:!0,forced:!M},{for:function(te){var re=L(te);if(C(mt,re))return mt[re];var we=nt(re);return mt[re]=we,Vt[we]=re,we},keyFor:function(re){if(!ie(re))throw ut(re+" is not a symbol");if(C(Vt,re))return Vt[re]},useSetter:function(){Kt=!0},useSimple:function(){Kt=!1}}),l({target:"Object",stat:!0,forced:!M,sham:!w},{create:je,defineProperty:Pt,defineProperties:rr,getOwnPropertyDescriptor:ot}),l({target:"Object",stat:!0,forced:!M},{getOwnPropertyNames:Je,getOwnPropertySymbols:lt}),l({target:"Object",stat:!0,forced:j(function(){Q.f(1)})},{getOwnPropertySymbols:function(re){return Q.f(ee(re))}}),Be){var H=!M||j(function(){var te=nt();return Be([te])!="[null]"||Be({a:te})!="{}"||Be(Object(te))!="{}"});l({target:"JSON",stat:!0,forced:H},{stringify:function(re,we,De){var Xe=Oe(arguments),vt=we;if(!(!X(we)&&re===void 0||ie(re)))return _(we)||(we=function(Zt,Jt){if(z(vt)&&(Jt=S(vt,this,Zt,Jt)),!ie(Jt))return Jt}),Xe[1]=we,b(Be,null,Xe)}})}if(!ve[pe]){var K=ve.valueOf;Pe(ve,pe,function(te){return S(K,this)})}$e(nt,he),Le[q]=!0},function(u,c,i){var l=i(146).charAt,f=i(40),y=i(56),b=i(111),S="String Iterator",x=y.set,P=y.getterFor(S);b(String,"String",function(w){x(this,{type:S,string:f(w),index:0})},function(){var M=P(this),j=M.string,C=M.index,_;return C>=j.length?{value:void 0,done:!0}:(_=l(j,C),M.index+=_.length,{value:_,done:!1})})},function(u,c,i){(function(l){var f=function(y){return y&&y.Math==Math&&y};u.exports=f(typeof globalThis=="object"&&globalThis)||f(typeof window=="object"&&window)||f(typeof self=="object"&&self)||f(typeof l=="object"&&l)||function(){return this}()||Function("return this")()}).call(this,i(82))},function(u,c,i){var l=i(16),f=i(36),y=i(7),b=i(15),S=i(34),x=i(28),P=i(58),w=i(40),M=i(37).f,j=i(134),C=y.Symbol,_=C&&C.prototype;if(f&&x(C)&&(!("description"in _)||C().description!==void 0)){var z={},X=function(){var k=arguments.length<1||arguments[0]===void 0?void 0:w(arguments[0]),I=P(_,this)?new C(k):k===void 0?C():C(k);return k===""&&(z[I]=!0),I};j(X,C),X.prototype=_,_.constructor=X;var U=String(C("test"))=="Symbol(test)",ie=b(_.toString),oe=b(_.valueOf),ee=/^Symbol\((.*)\)[^)]+$/,J=b("".replace),ue=b("".slice);M(_,"description",{configurable:!0,get:function(){var k=oe(this),I=ie(k);if(S(z,k))return"";var A=U?ue(I,7,-1):J(I,ee,"$1");return A===""?void 0:A}}),l({global:!0,forced:!0},{Symbol:X})}},function(u,c,i){var l=i(150);l("iterator")},function(u,c,i){i.d(c,"a",function(){return l.a}),i.d(c,"c",function(){return l.e}),i.d(c,"h",function(){return ue}),i.d(c,"i",function(){return U}),i.d(c,"j",function(){return z}),i.d(c,"b",function(){return Pe}),i.d(c,"e",function(){return Ke}),i.d(c,"f",function(){return Ee}),i.d(c,"g",function(){return Ue});var l=i(1),f,y,b,S=0,x=[],P=l.i.__b,w=l.i.__r,M=l.i.diffed,j=l.i.__c,C=l.i.unmount;function _(H,K){l.i.__h&&l.i.__h(y,H,S||K),S=0;var te=y.__H||(y.__H={__:[],__h:[]});return H>=te.__.length&&te.__.push({}),te.__[H]}function z(H){return S=1,X(Me,H)}function X(H,K,te){var re=_(f++,2);return re.t=H,re.__c||(re.__=[te?te(K):Me(void 0,K),function(we){var De=re.t(re.__[0],we);re.__[0]!==De&&(re.__=[De,re.__[1]],re.__c.setState({}))}],re.__c=y),re.__}function U(H,K){var te=_(f++,3);!l.i.__s&&ce(te.__H,K)&&(te.__=H,te.__H=K,y.__H.__h.push(te))}function ie(H,K){var te=_(f++,4);!l.i.__s&&ce(te.__H,K)&&(te.__=H,te.__H=K,y.__h.push(te))}function oe(H){return S=5,J(function(){return{current:H}},[])}function ee(H,K,te){S=6,ie(function(){typeof H=="function"?H(K()):H&&(H.current=K())},te==null?te:te.concat(H))}function J(H,K){var te=_(f++,7);return ce(te.__H,K)&&(te.__=H(),te.__H=K,te.__h=H),te.__}function ue(H,K){return S=8,J(function(){return H},K)}function L(H){var K=y.context[H.__c],te=_(f++,9);return te.c=H,K?(te.__==null&&(te.__=!0,K.sub(y)),K.props.value):H.__}function k(H,K){l.i.useDebugValue&&l.i.useDebugValue(K?K(H):H)}function I(){var H;for(x.sort(function(K,te){return K.__v.__b-te.__v.__b});H=x.pop();)if(H.__P)try{H.__H.__h.forEach(Y),H.__H.__h.forEach(Q),H.__H.__h=[]}catch(K){H.__H.__h=[],l.i.__e(K,H.__v)}}l.i.__b=function(H){y=null,P&&P(H)},l.i.__r=function(H){w&&w(H),f=0;var K=(y=H.__c).__H;K&&(K.__h.forEach(Y),K.__h.forEach(Q),K.__h=[])},l.i.diffed=function(H){M&&M(H);var K=H.__c;K&&K.__H&&K.__H.__h.length&&(x.push(K)!==1&&b===l.i.requestAnimationFrame||((b=l.i.requestAnimationFrame)||R)(I)),y=null},l.i.__c=function(H,K){K.some(function(te){try{te.__h.forEach(Y),te.__h=te.__h.filter(function(re){return!re.__||Q(re)})}catch(re){K.some(function(we){we.__h&&(we.__h=[])}),K=[],l.i.__e(re,te.__v)}}),j&&j(H,K)},l.i.unmount=function(H){C&&C(H);var K,te=H.__c;te&&te.__H&&(te.__H.__.forEach(function(re){try{Y(re)}catch(we){K=we}}),K&&l.i.__e(K,te.__v))};var A=typeof requestAnimationFrame=="function";function R(H){var K,te=function(){clearTimeout(re),A&&cancelAnimationFrame(K),setTimeout(H)},re=setTimeout(te,100);A&&(K=requestAnimationFrame(te))}function Y(H){var K=y,te=H.__c;typeof te=="function"&&(H.__c=void 0,te()),y=K}function Q(H){var K=y;H.__c=H.__(),y=K}function ce(H,K){return!H||H.length!==K.length||K.some(function(te,re){return te!==H[re]})}function Me(H,K){return typeof K=="function"?K(H):K}function me(H,K){for(var te in K)H[te]=K[te];return H}function Oe(H,K){for(var te in H)if(te!=="__source"&&!(te in K))return!0;for(var re in K)if(re!=="__source"&&H[re]!==K[re])return!0;return!1}function Pe(H){this.props=H}function Ee(H,K){function te(we){var De=this.props.ref,Xe=De==we.ref;return!Xe&&De&&(De.call?De(null):De.current=null),K?!K(this.props,we)||!Xe:Oe(this.props,we)}function re(we){return this.shouldComponentUpdate=te,Object(l.e)(H,we)}return re.displayName="Memo("+(H.displayName||H.name)+")",re.prototype.isReactComponent=!0,re.__f=!0,re}(Pe.prototype=new l.a).isPureReactComponent=!0,Pe.prototype.shouldComponentUpdate=function(H,K){return Oe(this.props,H)||Oe(this.state,K)};var Ne=l.i.__b;l.i.__b=function(H){H.type&&H.type.__f&&H.ref&&(H.props.ref=H.ref,H.ref=null),Ne&&Ne(H)};var Le=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ke(H){function K(te,re){var we=me({},te);return delete we.ref,H(we,!(re=te.ref||re)||typeof re=="object"&&!("current"in re)?null:re)}return K.$$typeof=Le,K.render=K,K.prototype.isReactComponent=K.__f=!0,K.displayName="ForwardRef("+(H.displayName||H.name)+")",K}var _e=function(H,K){return H==null?null:Object(l.k)(Object(l.k)(H).map(K))},Se={map:_e,forEach:_e,count:function(H){return H?Object(l.k)(H).length:0},only:function(H){var K=Object(l.k)(H);if(K.length!==1)throw"Children.only";return K[0]},toArray:l.k},Ie=l.i.__e;l.i.__e=function(H,K,te){if(H.then){for(var re,we=K;we=we.__;)if((re=we.__c)&&re.__c)return K.__e==null&&(K.__e=te.__e,K.__k=te.__k),re.__c(H,K)}Ie(H,K,te)};var $e=l.i.unmount;function $(H,K,te){return H&&(H.__c&&H.__c.__H&&(H.__c.__H.__.forEach(function(re){typeof re.__c=="function"&&re.__c()}),H.__c.__H=null),(H=me({},H)).__c!=null&&(H.__c.__P===te&&(H.__c.__P=K),H.__c=null),H.__k=H.__k&&H.__k.map(function(re){return $(re,K,te)})),H}function V(H,K,te){return H&&(H.__v=null,H.__k=H.__k&&H.__k.map(function(re){return V(re,K,te)}),H.__c&&H.__c.__P===K&&(H.__e&&te.insertBefore(H.__e,H.__d),H.__c.__e=!0,H.__c.__P=te)),H}function q(){this.__u=0,this.t=null,this.__b=null}function he(H){var K=H.__.__c;return K&&K.__e&&K.__e(H)}function xe(H){var K,te,re;function we(De){if(K||(K=H()).then(function(Xe){te=Xe.default||Xe},function(Xe){re=Xe}),re)throw re;if(!te)throw K;return Object(l.e)(te,De)}return we.displayName="Lazy",we.__f=!0,we}function pe(){this.u=null,this.o=null}l.i.unmount=function(H){var K=H.__c;K&&K.__R&&K.__R(),K&&H.__h===!0&&(H.type=null),$e&&$e(H)},(q.prototype=new l.a).__c=function(H,K){var te=K.__c,re=this;re.t==null&&(re.t=[]),re.t.push(te);var we=he(re.__v),De=!1,Xe=function(){De||(De=!0,te.__R=null,we?we(vt):vt())};te.__R=Xe;var vt=function(){if(!--re.__u){if(re.state.__e){var Jt=re.state.__e;re.__v.__k[0]=V(Jt,Jt.__c.__P,Jt.__c.__O)}var Hn;for(re.setState({__e:re.__b=null});Hn=re.t.pop();)Hn.forceUpdate()}},Zt=K.__h===!0;re.__u++||Zt||re.setState({__e:re.__b=re.__v.__k[0]}),H.then(Xe,Xe)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(H,K){if(this.__b){if(this.__v.__k){var te=document.createElement("div"),re=this.__v.__k[0].__c;this.__v.__k[0]=$(this.__b,te,re.__O=re.__P)}this.__b=null}var we=K.__e&&Object(l.e)(l.b,null,H.fallback);return we&&(we.__h=null),[Object(l.e)(l.b,null,K.__e?null:H.children),we]};var ze=function(H,K,te){if(++te[1]===te[0]&&H.o.delete(K),H.props.revealOrder&&(H.props.revealOrder[0]!=="t"||!H.o.size))for(te=H.u;te;){for(;te.length>3;)te.pop()();if(te[1]<te[0])break;H.u=te=te[2]}};function tt(H){return this.getChildContext=function(){return H.context},H.children}function Ye(H){var K=this,te=H.i;K.componentWillUnmount=function(){Object(l.j)(null,K.l),K.l=null,K.i=null},K.i&&K.i!==te&&K.componentWillUnmount(),H.__v?(K.l||(K.i=te,K.l={nodeType:1,parentNode:te,childNodes:[],appendChild:function(re){this.childNodes.push(re),K.i.appendChild(re)},insertBefore:function(re,we){this.childNodes.push(re),K.i.appendChild(re)},removeChild:function(re){this.childNodes.splice(this.childNodes.indexOf(re)>>>1,1),K.i.removeChild(re)}}),Object(l.j)(Object(l.e)(tt,{context:K.context},H.__v),K.l)):K.l&&K.componentWillUnmount()}function nt(H,K){return Object(l.e)(Ye,{__v:H,i:K})}(pe.prototype=new l.a).__e=function(H){var K=this,te=he(K.__v),re=K.o.get(H);return re[0]++,function(we){var De=function(){K.props.revealOrder?(re.push(we),ze(K,H,re)):we()};te?te(De):De()}},pe.prototype.render=function(H){this.u=null,this.o=new Map;var K=Object(l.k)(H.children);H.revealOrder&&H.revealOrder[0]==="b"&&K.reverse();for(var te=K.length;te--;)this.o.set(K[te],this.u=[1,0,this.u]);return H.children},pe.prototype.componentDidUpdate=pe.prototype.componentDidMount=function(){var H=this;this.o.forEach(function(K,te){ze(H,te,K)})};var ve=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,ut=/^(?: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]/,rt=typeof document<"u",Be=function(H){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(H)};function Qe(H,K,te){return K.__k==null&&(K.textContent=""),Object(l.j)(H,K),typeof te=="function"&&te(),H?H.__c:null}function At(H,K,te){return Object(l.h)(H,K),typeof te=="function"&&te(),H?H.__c:null}l.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(H){Object.defineProperty(l.a.prototype,H,{configurable:!0,get:function(){return this["UNSAFE_"+H]},set:function(K){Object.defineProperty(this,H,{configurable:!0,writable:!0,value:K})}})});var dt=l.i.event;function bt(){}function ne(){return this.cancelBubble}function Ct(){return this.defaultPrevented}l.i.event=function(H){return dt&&(H=dt(H)),H.persist=bt,H.isPropagationStopped=ne,H.isDefaultPrevented=Ct,H.nativeEvent=H};var St,mt={configurable:!0,get:function(){return this.class}},Vt=l.i.vnode;l.i.vnode=function(H){var K=H.type,te=H.props,re=te;if(typeof K=="string"){var we=K.indexOf("-")===-1;for(var De in re={},te){var Xe=te[De];rt&&De==="children"&&K==="noscript"||De==="value"&&"defaultValue"in te&&Xe==null||(De==="defaultValue"&&"value"in te&&te.value==null?De="value":De==="download"&&Xe===!0?Xe="":/ondoubleclick/i.test(De)?De="ondblclick":/^onchange(textarea|input)/i.test(De+K)&&!Be(te.type)?De="oninput":/^onfocus$/i.test(De)?De="onfocusin":/^onblur$/i.test(De)?De="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(De)?De=De.toLowerCase():we&&ut.test(De)?De=De.replace(/[A-Z0-9]/,"-$&").toLowerCase():Xe===null&&(Xe=void 0),re[De]=Xe)}K=="select"&&re.multiple&&Array.isArray(re.value)&&(re.value=Object(l.k)(te.children).forEach(function(vt){vt.props.selected=re.value.indexOf(vt.props.value)!=-1})),K=="select"&&re.defaultValue!=null&&(re.value=Object(l.k)(te.children).forEach(function(vt){vt.props.selected=re.multiple?re.defaultValue.indexOf(vt.props.value)!=-1:re.defaultValue==vt.props.value})),H.props=re,te.class!=te.className&&(mt.enumerable="className"in te,te.className!=null&&(re.class=te.className),Object.defineProperty(re,"className",mt))}H.$$typeof=ve,Vt&&Vt(H)};var dr=l.i.__r;l.i.__r=function(H){dr&&dr(H),St=H.__c};var Kt={ReactCurrentDispatcher:{current:{readContext:function(H){return St.__n[H.__c].props.value}}}};function Er(H){return l.e.bind(null,H)}function qe(H){return!!H&&H.$$typeof===ve}function Pt(H){return qe(H)?l.c.apply(null,arguments):H}function rr(H){return!!H.__k&&(Object(l.j)(null,H),!0)}function je(H){return H&&(H.base||H.nodeType===1&&H)||null}var Ue=function(H,K){return H(K)},ot=function(H,K){return H(K)},Je=l.b,lt={useState:z,useReducer:X,useEffect:U,useLayoutEffect:ie,useRef:oe,useImperativeHandle:ee,useMemo:J,useCallback:ue,useContext:L,useDebugValue:k,version:"17.0.2",Children:Se,render:Qe,hydrate:At,unmountComponentAtNode:rr,createPortal:nt,createElement:l.e,createContext:l.d,createFactory:Er,cloneElement:Pt,createRef:l.f,Fragment:l.b,isValidElement:qe,findDOMNode:je,Component:l.a,PureComponent:Pe,memo:Ee,forwardRef:Ke,flushSync:ot,unstable_batchedUpdates:Ue,StrictMode:Je,Suspense:q,SuspenseList:pe,lazy:xe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kt};c.d=lt},function(u,c,i){var l=i(7),f=i(147),y=i(148),b=i(179),S=i(57),x=function(w){if(w&&w.forEach!==b)try{S(w,"forEach",b)}catch{w.forEach=b}};for(var P in f)f[P]&&x(l[P]&&l[P].prototype);x(y)},function(u,c,i){var l=i(16),f=i(97);l({target:"Object",stat:!0},{setPrototypeOf:f})},function(u,c,i){var l=i(16),f=i(18),y=i(38),b=i(96),S=i(137),x=f(function(){b(1)});l({target:"Object",stat:!0,forced:x,sham:!S},{getPrototypeOf:function(w){return b(y(w))}})},function(u,c,i){var l=i(16),f=i(46),y=i(76),b=i(199),S=i(157),x=i(32),P=i(33),w=i(54),M=i(18),j=f("Reflect","construct"),C=Object.prototype,_=[].push,z=M(function(){function ie(){}return!(j(function(){},[],ie)instanceof ie)}),X=!M(function(){j(function(){})}),U=z||X;l({target:"Reflect",stat:!0,forced:U,sham:U},{construct:function(oe,ee){S(oe),x(ee);var J=arguments.length<3?oe:S(arguments[2]);if(X&&!z)return j(oe,ee,J);if(oe==J){switch(ee.length){case 0:return new oe;case 1:return new oe(ee[0]);case 2:return new oe(ee[0],ee[1]);case 3:return new oe(ee[0],ee[1],ee[2]);case 4:return new oe(ee[0],ee[1],ee[2],ee[3])}var ue=[null];return y(_,ue,ee),new(y(b,oe,ue))}var L=J.prototype,k=w(P(L)?L:C),I=y(oe,k,ee);return P(I)?I:k}})},function(u,c){var i=Function.prototype,l=i.bind,f=i.call,y=l&&l.bind(f);u.exports=l?function(b){return b&&y(f,b)}:function(b){return b&&function(){return f.apply(b,arguments)}}},function(u,c,i){var l=i(7),f=i(51).f,y=i(57),b=i(44),S=i(108),x=i(134),P=i(95);u.exports=function(w,M){var j=w.target,C=w.global,_=w.stat,z,X,U,ie,oe,ee;if(C?X=l:_?X=l[j]||S(j,{}):X=(l[j]||{}).prototype,X)for(U in M){if(oe=M[U],w.noTargetGet?(ee=f(X,U),ie=ee&&ee.value):ie=X[U],z=P(C?U:j+(_?".":"#")+U,w.forced),!z&&ie!==void 0){if(typeof oe==typeof ie)continue;x(oe,ie)}(w.sham||ie&&ie.sham)&&y(oe,"sham",!0),b(X,U,oe,w)}}},function(u,c,i){var l=i(16),f=i(7),y=i(99),b=i(100),S=i(33),x=i(67),P=i(43),w=i(39),M=i(61),j=i(27),C=i(75),_=i(101),z=C("slice"),X=j("species"),U=f.Array,ie=Math.max;l({target:"Array",proto:!0,forced:!z},{slice:function(ee,J){var ue=w(this),L=P(ue),k=x(ee,L),I=x(J===void 0?L:J,L),A,R,Y;if(y(ue)&&(A=ue.constructor,b(A)&&(A===U||y(A.prototype))?A=void 0:S(A)&&(A=A[X],A===null&&(A=void 0)),A===U||A===void 0))return _(ue,k,I);for(R=new(A===void 0?U:A)(ie(I-k,0)),Y=0;k<I;k++,Y++)k in ue&&M(R,Y,ue[k]);return R.length=Y,R}})},function(u,c){u.exports=function(i){try{return!!i()}catch{return!0}}},function(u,c,i){var l=i(16),f=i(102);l({target:"RegExp",proto:!0,forced:/./.exec!==f},{exec:f})},function(u,c,i){var l=i(16),f=i(38),y=i(66),b=i(18),S=b(function(){y(1)});l({target:"Object",stat:!0,forced:S},{keys:function(P){return y(f(P))}})},function(u,c,i){var l=i(16),f=i(18),y=i(39),b=i(51).f,S=i(36),x=f(function(){b(1)}),P=!S||x;l({target:"Object",stat:!0,forced:P,sham:!S},{getOwnPropertyDescriptor:function(M,j){return b(y(M),j)}})},function(u,c,i){var l=i(16),f=i(74).filter,y=i(75),b=y("filter");l({target:"Array",proto:!0,forced:!b},{filter:function(x){return f(this,x,arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){var l=i(16),f=i(36),y=i(135),b=i(39),S=i(51),x=i(61);l({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(w){for(var M=b(w),j=S.f,C=y(M),_={},z=0,X,U;C.length>z;)U=j(M,X=C[z++]),U!==void 0&&x(_,X,U);return _}})},function(u,c,i){var l=i(36),f=i(94).EXISTS,y=i(15),b=i(37).f,S=Function.prototype,x=y(S.toString),P=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,w=y(P.exec),M="name";l&&!f&&b(S,M,{configurable:!0,get:function(){try{return w(P,x(this))[1]}catch{return""}}})},function(u,c,i){var l=i(16),f=i(182),y=i(118),b=!y(function(S){Array.from(S)});l({target:"Array",stat:!0,forced:b},{from:f})},,function(u,c,i){var l=i(7),f=i(84),y=i(34),b=i(85),S=i(109),x=i(128),P=f("wks"),w=l.Symbol,M=w&&w.for,j=x?w:w&&w.withoutSetter||b;u.exports=function(C){if(!y(P,C)||!(S||typeof P[C]=="string")){var _="Symbol."+C;S&&y(w,C)?P[C]=w[C]:x&&M?P[C]=M(_):P[C]=j(_)}return P[C]}},function(u,c){u.exports=function(i){return typeof i=="function"}},function(u,c,i){var l=i(16),f=i(7),y=i(18),b=i(99),S=i(33),x=i(38),P=i(43),w=i(61),M=i(119),j=i(75),C=i(27),_=i(65),z=C("isConcatSpreadable"),X=9007199254740991,U="Maximum allowed index exceeded",ie=f.TypeError,oe=_>=51||!y(function(){var L=[];return L[z]=!1,L.concat()[0]!==L}),ee=j("concat"),J=function(L){if(!S(L))return!1;var k=L[z];return k!==void 0?!!k:b(L)},ue=!oe||!ee;l({target:"Array",proto:!0,forced:ue},{concat:function(k){var I=x(this),A=M(I,0),R=0,Y,Q,ce,Me,me;for(Y=-1,ce=arguments.length;Y<ce;Y++)if(me=Y===-1?I:arguments[Y],J(me)){if(Me=P(me),R+Me>X)throw ie(U);for(Q=0;Q<Me;Q++,R++)Q in me&&w(A,R,me[Q])}else{if(R>=X)throw ie(U);w(A,R++,me)}return A.length=R,A}})},function(u,c,i){var l=i(16),f=i(198);l({target:"Object",stat:!0,forced:Object.assign!==f},{assign:f})},function(u,c,i){var l=i(105),f=typeof self=="object"&&self&&self.Object===Object&&self,y=l.a||f||Function("return this")();c.a=y},function(u,c,i){var l=i(7),f=i(33),y=l.String,b=l.TypeError;u.exports=function(S){if(f(S))return S;throw b(y(S)+" is not an object")}},function(u,c,i){var l=i(28);u.exports=function(f){return typeof f=="object"?f!==null:l(f)}},function(u,c,i){var l=i(15),f=i(38),y=l({}.hasOwnProperty);u.exports=Object.hasOwn||function(S,x){return y(f(S),x)}},function(u,c){var i=Function.prototype.call;u.exports=i.bind?i.bind(i):function(){return i.apply(i,arguments)}},function(u,c,i){var l=i(18);u.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(u,c,i){var l=i(7),f=i(36),y=i(129),b=i(32),S=i(87),x=l.TypeError,P=Object.defineProperty;c.f=f?P:function(M,j,C){if(b(M),j=S(j),b(C),y)try{return P(M,j,C)}catch{}if("get"in C||"set"in C)throw x("Accessors not supported");return"value"in C&&(M[j]=C.value),M}},function(u,c,i){var l=i(7),f=i(45),y=l.Object;u.exports=function(b){return y(f(b))}},function(u,c,i){var l=i(81),f=i(45);u.exports=function(y){return l(f(y))}},function(u,c,i){var l=i(7),f=i(98),y=l.String;u.exports=function(b){if(f(b)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return y(b)}},function(u,c,i){var l=i(16),f=i(74).map,y=i(75),b=y("map");l({target:"Array",proto:!0,forced:!b},{map:function(x){return f(this,x,arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){(function(l){i.d(c,"d",function(){return b}),i.d(c,"c",function(){return S}),i.d(c,"b",function(){return x}),i.d(c,"a",function(){return w});var f=i(10),y=function(M,j){var C=typeof Symbol=="function"&&M[Symbol.iterator];if(!C)return M;var _=C.call(M),z,X=[],U;try{for(;(j===void 0||j-- >0)&&!(z=_.next()).done;)X.push(z.value)}catch(ie){U={error:ie}}finally{try{z&&!z.done&&(C=_.return)&&C.call(_)}finally{if(U)throw U.error}}return X};function b(){var M=y(Object(f.j)(0),2),j=M[1],C=Object(f.h)(function(){j(function(_){return _+1})},[]);return C}function S(M){if(!M||typeof M!="object")return!1;var j=Object.getPrototypeOf(M);return!j||j===Object.prototype}function x(M){return typeof Symbol=="function"?Symbol.for(M):"__$mobx-react "+M+"__"}var P={};function w(){return typeof window<"u"?window:typeof l<"u"?l:typeof self<"u"?self:P}}).call(this,i(82))},function(u,c,i){var l=i(90);u.exports=function(f){return l(f.length)}},function(u,c,i){var l=i(7),f=i(28),y=i(34),b=i(57),S=i(108),x=i(92),P=i(56),w=i(94).CONFIGURABLE,M=P.get,j=P.enforce,C=String(String).split("String");(u.exports=function(_,z,X,U){var ie=U?!!U.unsafe:!1,oe=U?!!U.enumerable:!1,ee=U?!!U.noTargetGet:!1,J=U&&U.name!==void 0?U.name:z,ue;if(f(X)&&(String(J).slice(0,7)==="Symbol("&&(J="["+String(J).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!y(X,"name")||w&&X.name!==J)&&b(X,"name",J),ue=j(X),ue.source||(ue.source=C.join(typeof J=="string"?J:""))),_===l){oe?_[z]=X:S(z,X);return}else ie?!ee&&_[z]&&(oe=!0):delete _[z];oe?_[z]=X:b(_,z,X)})(Function.prototype,"toString",function(){return f(this)&&M(this).source||x(this)})},function(u,c,i){var l=i(7),f=l.TypeError;u.exports=function(y){if(y==null)throw f("Can't call method on "+y);return y}},function(u,c,i){var l=i(7),f=i(28),y=function(b){return f(b)?b:void 0};u.exports=function(b,S){return arguments.length<2?y(l[b]):l[b]&&l[b][S]}},function(u,c,i){var l=i(16),f=i(35),y=i(33),b=i(32),S=i(200),x=i(51),P=i(96);function w(M,j){var C=arguments.length<3?M:arguments[2],_,z;if(b(M)===C)return M[j];if(_=x.f(M,j),_)return S(_)?_.value:_.get===void 0?void 0:f(_.get,C);if(y(z=P(M)))return w(z,j,C)}l({target:"Reflect",stat:!0},{get:w})},function(u,c,i){(function(l){var f=i(31),y=i(165),b=v&&!v.nodeType&&v,S=b&&typeof l=="object"&&l&&!l.nodeType&&l,x=S&&S.exports===b,P=x?f.a.Buffer:void 0,w=P?P.isBuffer:void 0,M=w||y.a;c.a=M}).call(this,i(121)(u))},function(u,c,i){(function(l){var f=i(105),y=v&&!v.nodeType&&v,b=y&&typeof l=="object"&&l&&!l.nodeType&&l,S=b&&b.exports===y,x=S&&f.a.process,P=function(){try{var w=b&&b.require&&b.require("util").types;return w||x&&x.binding&&x.binding("util")}catch{}}();c.a=P}).call(this,i(121)(u))},function(u,c,i){var l=i(15),f=l({}.toString),y=l("".slice);u.exports=function(b){return y(f(b),8,-1)}},function(u,c,i){var l=i(36),f=i(35),y=i(93),b=i(71),S=i(39),x=i(87),P=i(34),w=i(129),M=Object.getOwnPropertyDescriptor;c.f=l?M:function(C,_){if(C=S(C),_=x(_),w)try{return M(C,_)}catch{}if(P(C,_))return b(!f(y.f,C,_),C[_])}},function(u,c,i){var l=i(16),f=i(213).entries;l({target:"Object",stat:!0},{entries:function(b){return f(b)}})},function(u,c,i){var l=i(46);u.exports=l("navigator","userAgent")||""},function(u,c,i){var l=i(32),f=i(168),y=i(110),b=i(69),S=i(133),x=i(86),P=i(91),w=">",M="<",j="prototype",C="script",_=P("IE_PROTO"),z=function(){},X=function(J){return M+C+w+J+M+"/"+C+w},U=function(J){J.write(X("")),J.close();var ue=J.parentWindow.Object;return J=null,ue},ie=function(){var J=x("iframe"),ue="java"+C+":",L;return J.style.display="none",S.appendChild(J),J.src=String(ue),L=J.contentWindow.document,L.open(),L.write(X("document.F=Object")),L.close(),L.F},oe,ee=function(){try{oe=new ActiveXObject("htmlfile")}catch{}ee=typeof document<"u"?document.domain&&oe?U(oe):ie():U(oe);for(var J=y.length;J--;)delete ee[j][y[J]];return ee()};b[_]=!0,u.exports=Object.create||function(ue,L){var k;return ue!==null?(z[j]=l(ue),k=new z,z[j]=null,k[_]=ue):k=ee(),L===void 0?k:f(k,L)}},function(u,c,i){var l=i(7),f=i(28),y=i(89),b=l.TypeError;u.exports=function(S){if(f(S))return S;throw b(y(S)+" is not a function")}},function(u,c,i){var l=i(170),f=i(7),y=i(15),b=i(33),S=i(57),x=i(34),P=i(107),w=i(91),M=i(69),j="Object already initialized",C=f.TypeError,_=f.WeakMap,z,X,U,ie=function(I){return U(I)?X(I):z(I,{})},oe=function(I){return function(A){var R;if(!b(A)||(R=X(A)).type!==I)throw C("Incompatible receiver, "+I+" required");return R}};if(l||P.state){var ee=P.state||(P.state=new _),J=y(ee.get),ue=y(ee.has),L=y(ee.set);z=function(I,A){if(ue(ee,I))throw new C(j);return A.facade=I,L(ee,I,A),A},X=function(I){return J(ee,I)||{}},U=function(I){return ue(ee,I)}}else{var k=w("state");M[k]=!0,z=function(I,A){if(x(I,k))throw new C(j);return A.facade=I,S(I,k,A),A},X=function(I){return x(I,k)?I[k]:{}},U=function(I){return x(I,k)}}u.exports={set:z,get:X,has:U,enforce:ie,getterFor:oe}},function(u,c,i){var l=i(36),f=i(37),y=i(71);u.exports=l?function(b,S,x){return f.f(b,S,y(1,x))}:function(b,S,x){return b[S]=x,b}},function(u,c,i){var l=i(15);u.exports=l({}.isPrototypeOf)},function(u,c,i){var l=i(55);u.exports=function(f,y){var b=f[y];return b==null?void 0:l(b)}},function(u,c,i){var l=i(173),f=i(177);l("Map",function(y){return function(){return y(this,arguments.length?arguments[0]:void 0)}},f)},function(u,c,i){var l=i(87),f=i(37),y=i(71);u.exports=function(b,S,x){var P=l(S);P in b?f.f(b,P,y(0,x)):b[P]=x}},function(u,c,i){var l=i(15),f=i(55),y=l(l.bind);u.exports=function(b,S){return f(b),S===void 0?b:y?y(b,S):function(){return b.apply(S,arguments)}}},function(u,c,i){var l=i(16),f=i(214),y=i(83);l({target:"Array",proto:!0},{fill:f}),y("fill")},function(u,c){u.exports=!1},function(u,c,i){var l=i(7),f=i(53),y=l.process,b=l.Deno,S=y&&y.versions||b&&b.version,x=S&&S.v8,P,w;x&&(P=x.split("."),w=P[0]>0&&P[0]<4?1:+(P[0]+P[1])),!w&&f&&(P=f.match(/Edge\/(\d+)/),(!P||P[1]>=74)&&(P=f.match(/Chrome\/(\d+)/),P&&(w=+P[1]))),u.exports=w},function(u,c,i){var l=i(131),f=i(110);u.exports=Object.keys||function(b){return l(b,f)}},function(u,c,i){var l=i(68),f=Math.max,y=Math.min;u.exports=function(b,S){var x=l(b);return x<0?f(x+S,0):y(x,S)}},function(u,c){var i=Math.ceil,l=Math.floor;u.exports=function(f){var y=+f;return y!==y||y===0?0:(y>0?l:i)(y)}},function(u,c){u.exports={}},function(u,c){u.exports={}},function(u,c){u.exports=function(i,l){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:l}}},function(u,c,i){var l=i(131),f=i(110),y=f.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(S){return l(S,y)}},function(u,c,i){var l=i(37).f,f=i(34),y=i(27),b=y("toStringTag");u.exports=function(S,x,P){S&&!f(S=P?S:S.prototype,b)&&l(S,b,{configurable:!0,value:x})}},function(u,c,i){var l=i(62),f=i(15),y=i(81),b=i(38),S=i(43),x=i(119),P=f([].push),w=function(M){var j=M==1,C=M==2,_=M==3,z=M==4,X=M==6,U=M==7,ie=M==5||X;return function(oe,ee,J,ue){for(var L=b(oe),k=y(L),I=l(ee,J),A=S(k),R=0,Y=ue||x,Q=j?Y(oe,A):C||U?Y(oe,0):void 0,ce,Me;A>R;R++)if((ie||R in k)&&(ce=k[R],Me=I(ce,R,L),M))if(j)Q[R]=Me;else if(Me)switch(M){case 3:return!0;case 5:return ce;case 6:return R;case 2:P(Q,ce)}else switch(M){case 4:return!1;case 7:P(Q,ce)}return X?-1:_||z?z:Q}};u.exports={forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findIndex:w(6),filterReject:w(7)}},function(u,c,i){var l=i(18),f=i(27),y=i(65),b=f("species");u.exports=function(S){return y>=51||!l(function(){var x=[],P=x.constructor={};return P[b]=function(){return{foo:1}},x[S](Boolean).foo!==1})}},function(u,c){var i=Function.prototype,l=i.apply,f=i.bind,y=i.call;u.exports=typeof Reflect=="object"&&Reflect.apply||(f?y.bind(l):function(){return y.apply(l,arguments)})},function(u,c,i){var l=i(16),f=i(15),y=i(81),b=i(39),S=i(120),x=f([].join),P=y!=Object,w=S("join",",");l({target:"Array",proto:!0,forced:P||!w},{join:function(j){return x(b(this),j===void 0?",":j)}})},function(u,c,i){var l=i(76),f=i(35),y=i(15),b=i(122),S=i(154),x=i(32),P=i(45),w=i(156),M=i(123),j=i(90),C=i(40),_=i(59),z=i(113),X=i(124),U=i(102),ie=i(151),oe=i(18),ee=ie.UNSUPPORTED_Y,J=4294967295,ue=Math.min,L=[].push,k=y(/./.exec),I=y(L),A=y("".slice),R=!oe(function(){var Y=/(?:)/,Q=Y.exec;Y.exec=function(){return Q.apply(this,arguments)};var ce="ab".split(Y);return ce.length!==2||ce[0]!=="a"||ce[1]!=="b"});b("split",function(Y,Q,ce){var Me;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?Me=function(me,Oe){var Pe=C(P(this)),Ee=Oe===void 0?J:Oe>>>0;if(Ee===0)return[];if(me===void 0)return[Pe];if(!S(me))return f(Q,Pe,me,Ee);for(var Ne=[],Le=(me.ignoreCase?"i":"")+(me.multiline?"m":"")+(me.unicode?"u":"")+(me.sticky?"y":""),Ke=0,_e=new RegExp(me.source,Le+"g"),Se,Ie,$e;(Se=f(U,_e,Pe))&&(Ie=_e.lastIndex,!(Ie>Ke&&(I(Ne,A(Pe,Ke,Se.index)),Se.length>1&&Se.index<Pe.length&&l(L,Ne,z(Se,1)),$e=Se[0].length,Ke=Ie,Ne.length>=Ee)));)_e.lastIndex===Se.index&&_e.lastIndex++;return Ke===Pe.length?($e||!k(_e,""))&&I(Ne,""):I(Ne,A(Pe,Ke)),Ne.length>Ee?z(Ne,0,Ee):Ne}:"0".split(void 0,0).length?Me=function(me,Oe){return me===void 0&&Oe===0?[]:f(Q,this,me,Oe)}:Me=Q,[function(Oe,Pe){var Ee=P(this),Ne=Oe==null?void 0:_(Oe,Y);return Ne?f(Ne,Oe,Ee,Pe):f(Me,C(Ee),Oe,Pe)},function(me,Oe){var Pe=x(this),Ee=C(me),Ne=ce(Me,Pe,Ee,Oe,Me!==Q);if(Ne.done)return Ne.value;var Le=w(Pe,RegExp),Ke=Pe.unicode,_e=(Pe.ignoreCase?"i":"")+(Pe.multiline?"m":"")+(Pe.unicode?"u":"")+(ee?"g":"y"),Se=new Le(ee?"^(?:"+Pe.source+")":Pe,_e),Ie=Oe===void 0?J:Oe>>>0;if(Ie===0)return[];if(Ee.length===0)return X(Se,Ee)===null?[Ee]:[];for(var $e=0,$=0,V=[];$<Ee.length;){Se.lastIndex=ee?0:$;var q=X(Se,ee?A(Ee,$):Ee),he;if(q===null||(he=ue(j(Se.lastIndex+(ee?$:0)),Ee.length))===$e)$=M(Ee,$,Ke);else{if(I(V,A(Ee,$e,$)),V.length===Ie)return V;for(var xe=1;xe<=q.length-1;xe++)if(I(V,q[xe]),V.length===Ie)return V;$=$e=he}}return I(V,A(Ee,$e)),V}]},!R,ee)},function(u,c,i){var l=i(36),f=i(7),y=i(15),b=i(95),S=i(44),x=i(34),P=i(143),w=i(58),M=i(88),j=i(130),C=i(18),_=i(72).f,z=i(51).f,X=i(37).f,U=i(196),ie=i(159).trim,oe="Number",ee=f[oe],J=ee.prototype,ue=f.TypeError,L=y("".slice),k=y("".charCodeAt),I=function(Me){var me=j(Me,"number");return typeof me=="bigint"?me:A(me)},A=function(Me){var me=j(Me,"number"),Oe,Pe,Ee,Ne,Le,Ke,_e,Se;if(M(me))throw ue("Cannot convert a Symbol value to a number");if(typeof me=="string"&&me.length>2){if(me=ie(me),Oe=k(me,0),Oe===43||Oe===45){if(Pe=k(me,2),Pe===88||Pe===120)return NaN}else if(Oe===48){switch(k(me,1)){case 66:case 98:Ee=2,Ne=49;break;case 79:case 111:Ee=8,Ne=55;break;default:return+me}for(Le=L(me,2),Ke=Le.length,_e=0;_e<Ke;_e++)if(Se=k(Le,_e),Se<48||Se>Ne)return NaN;return parseInt(Le,Ee)}}return+me};if(b(oe,!ee(" 0o1")||!ee("0b1")||ee("+0x1"))){for(var R=function(me){var Oe=arguments.length<1?0:ee(I(me)),Pe=this;return w(J,Pe)&&C(function(){U(Pe)})?P(Object(Oe),Pe,R):Oe},Y=l?_(ee):"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(","),Q=0,ce;Y.length>Q;Q++)x(ee,ce=Y[Q])&&!x(R,ce)&&X(R,ce,z(ee,ce));R.prototype=J,J.constructor=R,S(f,oe,R)}},function(u,c,i){var l=i(16);l({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(u,c,i){var l=i(7),f=i(15),y=i(18),b=i(50),S=l.Object,x=f("".split);u.exports=y(function(){return!S("z").propertyIsEnumerable(0)})?function(P){return b(P)=="String"?x(P,""):S(P)}:S},function(u,c){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}u.exports=i},function(u,c,i){var l=i(27),f=i(54),y=i(37),b=l("unscopables"),S=Array.prototype;S[b]==null&&y.f(S,b,{configurable:!0,value:f(null)}),u.exports=function(x){S[b][x]=!0}},function(u,c,i){var l=i(64),f=i(107);(u.exports=function(y,b){return f[y]||(f[y]=b!==void 0?b:{})})("versions",[]).push({version:"3.19.3",mode:l?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(u,c,i){var l=i(15),f=0,y=Math.random(),b=l(1 .toString);u.exports=function(S){return"Symbol("+(S===void 0?"":S)+")_"+b(++f+y,36)}},function(u,c,i){var l=i(7),f=i(33),y=l.document,b=f(y)&&f(y.createElement);u.exports=function(S){return b?y.createElement(S):{}}},function(u,c,i){var l=i(130),f=i(88);u.exports=function(y){var b=l(y,"string");return f(b)?b:b+""}},function(u,c,i){var l=i(7),f=i(46),y=i(28),b=i(58),S=i(128),x=l.Object;u.exports=S?function(P){return typeof P=="symbol"}:function(P){var w=f("Symbol");return y(w)&&b(w.prototype,x(P))}},function(u,c,i){var l=i(7),f=l.String;u.exports=function(y){try{return f(y)}catch{return"Object"}}},function(u,c,i){var l=i(68),f=Math.min;u.exports=function(y){return y>0?f(l(y),9007199254740991):0}},function(u,c,i){var l=i(84),f=i(85),y=l("keys");u.exports=function(b){return y[b]||(y[b]=f(b))}},function(u,c,i){var l=i(15),f=i(28),y=i(107),b=l(Function.toString);f(y.inspectSource)||(y.inspectSource=function(S){return b(S)}),u.exports=y.inspectSource},function(u,c,i){var l={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,y=f&&!l.call({1:2},1);c.f=y?function(S){var x=f(this,S);return!!x&&x.enumerable}:l},function(u,c,i){var l=i(36),f=i(34),y=Function.prototype,b=l&&Object.getOwnPropertyDescriptor,S=f(y,"name"),x=S&&function(){}.name==="something",P=S&&(!l||l&&b(y,"name").configurable);u.exports={EXISTS:S,PROPER:x,CONFIGURABLE:P}},function(u,c,i){var l=i(18),f=i(28),y=/#|\.prototype\./,b=function(M,j){var C=x[S(M)];return C==w?!0:C==P?!1:f(j)?l(j):!!j},S=b.normalize=function(M){return String(M).replace(y,".").toLowerCase()},x=b.data={},P=b.NATIVE="N",w=b.POLYFILL="P";u.exports=b},function(u,c,i){var l=i(7),f=i(34),y=i(28),b=i(38),S=i(91),x=i(137),P=S("IE_PROTO"),w=l.Object,M=w.prototype;u.exports=x?w.getPrototypeOf:function(j){var C=b(j);if(f(C,P))return C[P];var _=C.constructor;return y(_)&&C instanceof _?_.prototype:C instanceof w?M:null}},function(u,c,i){var l=i(15),f=i(32),y=i(172);u.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b=!1,S={},x;try{x=l(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),x(S,[]),b=S instanceof Array}catch{}return function(w,M){return f(w),y(M),b?x(w,M):w.__proto__=M,w}}():void 0)},function(u,c,i){var l=i(7),f=i(116),y=i(28),b=i(50),S=i(27),x=S("toStringTag"),P=l.Object,w=b(function(){return arguments}())=="Arguments",M=function(j,C){try{return j[C]}catch{}};u.exports=f?b:function(j){var C,_,z;return j===void 0?"Undefined":j===null?"Null":typeof(_=M(C=P(j),x))=="string"?_:w?b(C):(z=b(C))=="Object"&&y(C.callee)?"Arguments":z}},function(u,c,i){var l=i(50);u.exports=Array.isArray||function(y){return l(y)=="Array"}},function(u,c,i){var l=i(15),f=i(18),y=i(28),b=i(98),S=i(46),x=i(92),P=function(){},w=[],M=S("Reflect","construct"),j=/^\s*(?:class|function)\b/,C=l(j.exec),_=!j.exec(P),z=function(U){if(!y(U))return!1;try{return M(P,w,U),!0}catch{return!1}},X=function(U){if(!y(U))return!1;switch(b(U)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return _||!!C(j,x(U))};u.exports=!M||f(function(){var U;return z(z.call)||!z(Object)||!z(function(){U=!0})||U})?X:z},function(u,c,i){var l=i(15);u.exports=l([].slice)},function(u,c,i){var l=i(35),f=i(15),y=i(40),b=i(184),S=i(151),x=i(84),P=i(54),w=i(56).get,M=i(185),j=i(186),C=x("native-string-replace",String.prototype.replace),_=RegExp.prototype.exec,z=_,X=f("".charAt),U=f("".indexOf),ie=f("".replace),oe=f("".slice),ee=function(){var k=/a/,I=/b*/g;return l(_,k,"a"),l(_,I,"a"),k.lastIndex!==0||I.lastIndex!==0}(),J=S.BROKEN_CARET,ue=/()??/.exec("")[1]!==void 0,L=ee||ue||J||M||j;L&&(z=function(I){var A=this,R=w(A),Y=y(I),Q=R.raw,ce,Me,me,Oe,Pe,Ee,Ne;if(Q)return Q.lastIndex=A.lastIndex,ce=l(z,Q,Y),A.lastIndex=Q.lastIndex,ce;var Le=R.groups,Ke=J&&A.sticky,_e=l(b,A),Se=A.source,Ie=0,$e=Y;if(Ke&&(_e=ie(_e,"y",""),U(_e,"g")===-1&&(_e+="g"),$e=oe(Y,A.lastIndex),A.lastIndex>0&&(!A.multiline||A.multiline&&X(Y,A.lastIndex-1)!==`
`)&&(Se="(?: "+Se+")",$e=" "+$e,Ie++),Me=new RegExp("^(?:"+Se+")",_e)),ue&&(Me=new RegExp("^"+Se+"$(?!\\s)",_e)),ee&&(me=A.lastIndex),Oe=l(_,Ke?Me:A,$e),Ke?Oe?(Oe.input=oe(Oe.input,Ie),Oe[0]=oe(Oe[0],Ie),Oe.index=A.lastIndex,A.lastIndex+=Oe[0].length):A.lastIndex=0:ee&&Oe&&(A.lastIndex=A.global?Oe.index+Oe[0].length:me),ue&&Oe&&Oe.length>1&&l(C,Oe[0],Me,function(){for(Pe=1;Pe<arguments.length-2;Pe++)arguments[Pe]===void 0&&(Oe[Pe]=void 0)}),Oe&&Le)for(Oe.groups=Ee=P(null),Pe=0;Pe<Le.length;Pe++)Ne=Le[Pe],Ee[Ne[0]]=Oe[Ne[1]];return Oe}),u.exports=z},function(u,c,i){var l=i(16),f=i(7),y=i(67),b=i(68),S=i(43),x=i(38),P=i(119),w=i(61),M=i(75),j=M("splice"),C=f.TypeError,_=Math.max,z=Math.min,X=9007199254740991,U="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!j},{splice:function(oe,ee){var J=x(this),ue=S(J),L=y(oe,ue),k=arguments.length,I,A,R,Y,Q,ce;if(k===0?I=A=0:k===1?(I=0,A=ue-L):(I=k-2,A=z(_(b(ee),0),ue-L)),ue+I-A>X)throw C(U);for(R=P(J,A),Y=0;Y<A;Y++)Q=L+Y,Q in J&&w(R,Y,J[Q]);if(R.length=A,I<A){for(Y=L;Y<ue-A;Y++)Q=Y+A,ce=Y+I,Q in J?J[ce]=J[Q]:delete J[ce];for(Y=ue;Y>ue-A+I;Y--)delete J[Y-1]}else if(I>A)for(Y=ue-A;Y>L;Y--)Q=Y+A-1,ce=Y+I-1,Q in J?J[ce]=J[Q]:delete J[ce];for(Y=0;Y<I;Y++)J[Y+L]=arguments[Y+2];return J.length=ue-A+I,R}})},function(u,c,i){var l=i(16),f=i(201),y=i(202);l({target:"String",proto:!0,forced:y("anchor")},{anchor:function(S){return f(this,"a","name",S)}})},function(u,c,i){(function(l){var f=typeof l=="object"&&l&&l.Object===Object&&l;c.a=f}).call(this,i(82))},function(u,c,i){(function(l){var f=i(31),y=v&&!v.nodeType&&v,b=y&&typeof l=="object"&&l&&!l.nodeType&&l,S=b&&b.exports===y,x=S?f.a.Buffer:void 0,P=x?x.allocUnsafe:void 0;function w(M,j){if(j)return M.slice();var C=M.length,_=P?P(C):new M.constructor(C);return M.copy(_),_}c.a=w}).call(this,i(121)(u))},function(u,c,i){var l=i(7),f=i(108),y="__core-js_shared__",b=l[y]||f(y,{});u.exports=b},function(u,c,i){var l=i(7),f=Object.defineProperty;u.exports=function(y,b){try{f(l,y,{value:b,configurable:!0,writable:!0})}catch{l[y]=b}return b}},function(u,c,i){var l=i(65),f=i(18);u.exports=!!Object.getOwnPropertySymbols&&!f(function(){var y=Symbol();return!String(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&l&&l<41})},function(u,c){u.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(u,c,i){var l=i(16),f=i(35),y=i(64),b=i(94),S=i(28),x=i(171),P=i(96),w=i(97),M=i(73),j=i(57),C=i(44),_=i(27),z=i(70),X=i(136),U=b.PROPER,ie=b.CONFIGURABLE,oe=X.IteratorPrototype,ee=X.BUGGY_SAFARI_ITERATORS,J=_("iterator"),ue="keys",L="values",k="entries",I=function(){return this};u.exports=function(A,R,Y,Q,ce,Me,me){x(Y,R,Q);var Oe=function($){if($===ce&&Ke)return Ke;if(!ee&&$ in Ne)return Ne[$];switch($){case ue:return function(){return new Y(this,$)};case L:return function(){return new Y(this,$)};case k:return function(){return new Y(this,$)}}return function(){return new Y(this)}},Pe=R+" Iterator",Ee=!1,Ne=A.prototype,Le=Ne[J]||Ne["@@iterator"]||ce&&Ne[ce],Ke=!ee&&Le||Oe(ce),_e=R=="Array"&&Ne.entries||Le,Se,Ie,$e;if(_e&&(Se=P(_e.call(new A)),Se!==Object.prototype&&Se.next&&(!y&&P(Se)!==oe&&(w?w(Se,oe):S(Se[J])||C(Se,J,I)),M(Se,Pe,!0,!0),y&&(z[Pe]=I))),U&&ce==L&&Le&&Le.name!==L&&(!y&&ie?j(Ne,"name",L):(Ee=!0,Ke=function(){return f(Le,this)})),ce)if(Ie={values:Oe(L),keys:Me?Ke:Oe(ue),entries:Oe(k)},me)for($e in Ie)(ee||Ee||!($e in Ne))&&C(Ne,$e,Ie[$e]);else l({target:R,proto:!0,forced:ee||Ee},Ie);return(!y||me)&&Ne[J]!==Ke&&C(Ne,J,Ke,{name:ce}),z[R]=Ke,Ie}},function(u,c){c.f=Object.getOwnPropertySymbols},function(u,c,i){var l=i(7),f=i(67),y=i(43),b=i(61),S=l.Array,x=Math.max;u.exports=function(P,w,M){for(var j=y(P),C=f(w,j),_=f(M===void 0?j:M,j),z=S(x(_-C,0)),X=0;C<_;C++,X++)b(z,X,P[C]);return z.length=X,z}},function(u,c,i){var l=i(7),f=i(62),y=i(35),b=i(32),S=i(89),x=i(140),P=i(43),w=i(58),M=i(141),j=i(115),C=i(142),_=l.TypeError,z=function(U,ie){this.stopped=U,this.result=ie},X=z.prototype;u.exports=function(U,ie,oe){var ee=oe&&oe.that,J=!!(oe&&oe.AS_ENTRIES),ue=!!(oe&&oe.IS_ITERATOR),L=!!(oe&&oe.INTERRUPTED),k=f(ie,ee),I,A,R,Y,Q,ce,Me,me=function(Pe){return I&&C(I,"normal",Pe),new z(!0,Pe)},Oe=function(Pe){return J?(b(Pe),L?k(Pe[0],Pe[1],me):k(Pe[0],Pe[1])):L?k(Pe,me):k(Pe)};if(ue)I=U;else{if(A=j(U),!A)throw _(S(U)+" is not iterable");if(x(A)){for(R=0,Y=P(U);Y>R;R++)if(Q=Oe(U[R]),Q&&w(X,Q))return Q;return new z(!1)}I=M(U,A)}for(ce=I.next;!(Me=y(ce,I)).done;){try{Q=Oe(Me.value)}catch(Pe){C(I,"throw",Pe)}if(typeof Q=="object"&&Q&&w(X,Q))return Q}return new z(!1)}},function(u,c,i){var l=i(98),f=i(59),y=i(70),b=i(27),S=b("iterator");u.exports=function(x){if(x!=null)return f(x,S)||f(x,"@@iterator")||y[l(x)]}},function(u,c,i){var l=i(27),f=l("toStringTag"),y={};y[f]="z",u.exports=String(y)==="[object z]"},function(u,c,i){var l=i(7),f=i(58),y=l.TypeError;u.exports=function(b,S){if(f(S,b))return b;throw y("Incorrect invocation")}},function(u,c,i){var l=i(27),f=l("iterator"),y=!1;try{var b=0,S={next:function(){return{done:!!b++}},return:function(){y=!0}};S[f]=function(){return this},Array.from(S,function(){throw 2})}catch{}u.exports=function(x,P){if(!P&&!y)return!1;var w=!1;try{var M={};M[f]=function(){return{next:function(){return{done:w=!0}}}},x(M)}catch{}return w}},function(u,c,i){var l=i(180);u.exports=function(f,y){return new(l(f))(y===0?0:y)}},function(u,c,i){var l=i(18);u.exports=function(f,y){var b=[][f];return!!b&&l(function(){b.call(null,y||function(){throw 1},1)})}},function(u,c){u.exports=function(i){if(!i.webpackPolyfill){var l=Object.create(i);l.children||(l.children=[]),Object.defineProperty(l,"loaded",{enumerable:!0,get:function(){return l.l}}),Object.defineProperty(l,"id",{enumerable:!0,get:function(){return l.i}}),Object.defineProperty(l,"exports",{enumerable:!0}),l.webpackPolyfill=1}return l}},function(u,c,i){i(19);var l=i(15),f=i(44),y=i(102),b=i(18),S=i(27),x=i(57),P=S("species"),w=RegExp.prototype;u.exports=function(M,j,C,_){var z=S(M),X=!b(function(){var ee={};return ee[z]=function(){return 7},""[M](ee)!=7}),U=X&&!b(function(){var ee=!1,J=/a/;return M==="split"&&(J={},J.constructor={},J.constructor[P]=function(){return J},J.flags="",J[z]=/./[z]),J.exec=function(){return ee=!0,null},J[z](""),!ee});if(!X||!U||C){var ie=l(/./[z]),oe=j(z,""[M],function(ee,J,ue,L,k){var I=l(ee),A=J.exec;return A===y||A===w.exec?X&&!k?{done:!0,value:ie(J,ue,L)}:{done:!0,value:I(ue,J,L)}:{done:!1}});f(String.prototype,M,oe[0]),f(w,z,oe[1])}_&&x(w[z],"sham",!0)}},function(u,c,i){var l=i(146).charAt;u.exports=function(f,y,b){return y+(b?l(f,y).length:1)}},function(u,c,i){var l=i(7),f=i(35),y=i(32),b=i(28),S=i(50),x=i(102),P=l.TypeError;u.exports=function(w,M){var j=w.exec;if(b(j)){var C=f(j,w,M);return C!==null&&y(C),C}if(S(w)==="RegExp")return f(x,w,M);throw P("RegExp#exec called on incompatible receiver")}},function(u,c,i){var l=i(76),f=i(35),y=i(15),b=i(122),S=i(18),x=i(32),P=i(28),w=i(68),M=i(90),j=i(40),C=i(45),_=i(123),z=i(59),X=i(197),U=i(124),ie=i(27),oe=ie("replace"),ee=Math.max,J=Math.min,ue=y([].concat),L=y([].push),k=y("".indexOf),I=y("".slice),A=function(ce){return ce===void 0?ce:String(ce)},R=function(){return"a".replace(/./,"$0")==="$0"}(),Y=function(){return/./[oe]?/./[oe]("a","$0")==="":!1}(),Q=!S(function(){var ce=/./;return ce.exec=function(){var Me=[];return Me.groups={a:"7"},Me},"".replace(ce,"$<a>")!=="7"});b("replace",function(ce,Me,me){var Oe=Y?"$":"$0";return[function(Ee,Ne){var Le=C(this),Ke=Ee==null?void 0:z(Ee,oe);return Ke?f(Ke,Ee,Le,Ne):f(Me,j(Le),Ee,Ne)},function(Pe,Ee){var Ne=x(this),Le=j(Pe);if(typeof Ee=="string"&&k(Ee,Oe)===-1&&k(Ee,"$<")===-1){var Ke=me(Me,Ne,Le,Ee);if(Ke.done)return Ke.value}var _e=P(Ee);_e||(Ee=j(Ee));var Se=Ne.global;if(Se){var Ie=Ne.unicode;Ne.lastIndex=0}for(var $e=[];;){var $=U(Ne,Le);if($===null||(L($e,$),!Se))break;var V=j($[0]);V===""&&(Ne.lastIndex=_(Le,M(Ne.lastIndex),Ie))}for(var q="",he=0,xe=0;xe<$e.length;xe++){$=$e[xe];for(var pe=j($[0]),ze=ee(J(w($.index),Le.length),0),tt=[],Ye=1;Ye<$.length;Ye++)L(tt,A($[Ye]));var nt=$.groups;if(_e){var ve=ue([pe],tt,ze,Le);nt!==void 0&&L(ve,nt);var ut=j(l(Ee,void 0,ve))}else ut=X(pe,Le,ze,tt,nt,Ee);ze>=he&&(q+=I(Le,he,ze)+ut,he=ze+pe.length)}return q+I(Le,he)}]},!Q||!R||Y)},function(u,c,i){var l=i(50),f=i(7);u.exports=l(f.process)=="process"},function(u,c,i){var l=i(16);l({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(u,c,i){var l=i(109);u.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(u,c,i){var l=i(36),f=i(18),y=i(86);u.exports=!l&&!f(function(){return Object.defineProperty(y("div"),"a",{get:function(){return 7}}).a!=7})},function(u,c,i){var l=i(7),f=i(35),y=i(33),b=i(88),S=i(59),x=i(169),P=i(27),w=l.TypeError,M=P("toPrimitive");u.exports=function(j,C){if(!y(j)||b(j))return j;var _=S(j,M),z;if(_){if(C===void 0&&(C="default"),z=f(_,j,C),!y(z)||b(z))return z;throw w("Can't convert object to primitive value")}return C===void 0&&(C="number"),x(j,C)}},function(u,c,i){var l=i(15),f=i(34),y=i(39),b=i(132).indexOf,S=i(69),x=l([].push);u.exports=function(P,w){var M=y(P),j=0,C=[],_;for(_ in M)!f(S,_)&&f(M,_)&&x(C,_);for(;w.length>j;)f(M,_=w[j++])&&(~b(C,_)||x(C,_));return C}},function(u,c,i){var l=i(39),f=i(67),y=i(43),b=function(S){return function(x,P,w){var M=l(x),j=y(M),C=f(w,j),_;if(S&&P!=P){for(;j>C;)if(_=M[C++],_!=_)return!0}else for(;j>C;C++)if((S||C in M)&&M[C]===P)return S||C||0;return!S&&-1}};u.exports={includes:b(!0),indexOf:b(!1)}},function(u,c,i){var l=i(46);u.exports=l("document","documentElement")},function(u,c,i){var l=i(34),f=i(135),y=i(51),b=i(37);u.exports=function(S,x){for(var P=f(x),w=b.f,M=y.f,j=0;j<P.length;j++){var C=P[j];l(S,C)||w(S,C,M(x,C))}}},function(u,c,i){var l=i(46),f=i(15),y=i(72),b=i(112),S=i(32),x=f([].concat);u.exports=l("Reflect","ownKeys")||function(w){var M=y.f(S(w)),j=b.f;return j?x(M,j(w)):M}},function(u,c,i){var l=i(18),f=i(28),y=i(54),b=i(96),S=i(44),x=i(27),P=i(64),w=x("iterator"),M=!1,j,C,_;[].keys&&(_=[].keys(),"next"in _?(C=b(b(_)),C!==Object.prototype&&(j=C)):M=!0);var z=j==null||l(function(){var X={};return j[w].call(X)!==X});z?j={}:P&&(j=y(j)),f(j[w])||S(j,w,function(){return this}),u.exports={IteratorPrototype:j,BUGGY_SAFARI_ITERATORS:M}},function(u,c,i){var l=i(18);u.exports=!l(function(){function f(){}return f.prototype.constructor=null,Object.getPrototypeOf(new f)!==f.prototype})},function(u,c,i){var l=i(16),f=i(15),y=i(69),b=i(33),S=i(34),x=i(37).f,P=i(72),w=i(139),M=i(174),j=i(85),C=i(176),_=!1,z=j("meta"),X=0,U=function(L){x(L,z,{value:{objectID:"O"+X++,weakData:{}}})},ie=function(L,k){if(!b(L))return typeof L=="symbol"?L:(typeof L=="string"?"S":"P")+L;if(!S(L,z)){if(!M(L))return"F";if(!k)return"E";U(L)}return L[z].objectID},oe=function(L,k){if(!S(L,z)){if(!M(L))return!0;if(!k)return!1;U(L)}return L[z].weakData},ee=function(L){return C&&_&&M(L)&&!S(L,z)&&U(L),L},J=function(){ue.enable=function(){},_=!0;var L=P.f,k=f([].splice),I={};I[z]=1,L(I).length&&(P.f=function(A){for(var R=L(A),Y=0,Q=R.length;Y<Q;Y++)if(R[Y]===z){k(R,Y,1);break}return R},l({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:w.f}))},ue=u.exports={enable:J,fastKey:ie,getWeakData:oe,onFreeze:ee};y[z]=!0},function(u,c,i){var l=i(50),f=i(39),y=i(72).f,b=i(113),S=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],x=function(P){try{return y(P)}catch{return b(S)}};u.exports.f=function(w){return S&&l(w)=="Window"?x(w):y(f(w))}},function(u,c,i){var l=i(27),f=i(70),y=l("iterator"),b=Array.prototype;u.exports=function(S){return S!==void 0&&(f.Array===S||b[y]===S)}},function(u,c,i){var l=i(7),f=i(35),y=i(55),b=i(32),S=i(89),x=i(115),P=l.TypeError;u.exports=function(w,M){var j=arguments.length<2?x(w):M;if(y(j))return b(f(j,w));throw P(S(w)+" is not iterable")}},function(u,c,i){var l=i(35),f=i(32),y=i(59);u.exports=function(b,S,x){var P,w;f(b);try{if(P=y(b,"return"),!P){if(S==="throw")throw x;return x}P=l(P,b)}catch(M){w=!0,P=M}if(S==="throw")throw x;if(w)throw P;return f(P),x}},function(u,c,i){var l=i(28),f=i(33),y=i(97);u.exports=function(b,S,x){var P,w;return y&&l(P=S.constructor)&&P!==x&&f(w=P.prototype)&&w!==x.prototype&&y(b,w),b}},function(u,c,i){var l=i(44);u.exports=function(f,y,b){for(var S in y)l(f,S,y[S],b);return f}},function(u,c,i){var l=i(46),f=i(37),y=i(27),b=i(36),S=y("species");u.exports=function(x){var P=l(x),w=f.f;b&&P&&!P[S]&&w(P,S,{configurable:!0,get:function(){return this}})}},function(u,c,i){var l=i(15),f=i(68),y=i(40),b=i(45),S=l("".charAt),x=l("".charCodeAt),P=l("".slice),w=function(M){return function(j,C){var _=y(b(j)),z=f(C),X=_.length,U,ie;return z<0||z>=X?M?"":void 0:(U=x(_,z),U<55296||U>56319||z+1===X||(ie=x(_,z+1))<56320||ie>57343?M?S(_,z):U:M?P(_,z,z+2):(U-55296<<10)+(ie-56320)+65536)}};u.exports={codeAt:w(!1),charAt:w(!0)}},function(u,c){u.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(u,c,i){var l=i(86),f=l("span").classList,y=f&&f.constructor&&f.constructor.prototype;u.exports=y===Object.prototype?void 0:y},function(u,c,i){var l=i(27);c.f=l},function(u,c,i){var l=i(181),f=i(34),y=i(149),b=i(37).f;u.exports=function(S){var x=l.Symbol||(l.Symbol={});f(x,S)||b(x,S,{value:y.f(S)})}},function(u,c,i){var l=i(18),f=i(7),y=f.RegExp,b=l(function(){var P=y("a","y");return P.lastIndex=2,P.exec("abcd")!=null}),S=b||l(function(){return!y("a","y").sticky}),x=b||l(function(){var P=y("^r","gy");return P.lastIndex=2,P.exec("str")!=null});u.exports={BROKEN_CARET:x,MISSED_STICKY:S,UNSUPPORTED_Y:b}},function(u,c,i){var l=i(16),f=i(132).includes,y=i(83);l({target:"Array",proto:!0},{includes:function(S){return f(this,S,arguments.length>1?arguments[1]:void 0)}}),y("includes")},function(u,c,i){var l=i(16),f=i(15),y=i(193),b=i(45),S=i(40),x=i(194),P=f("".indexOf);l({target:"String",proto:!0,forced:!x("includes")},{includes:function(M){return!!~P(S(b(this)),S(y(M)),arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){var l=i(33),f=i(50),y=i(27),b=y("match");u.exports=function(S){var x;return l(S)&&((x=S[b])!==void 0?!!x:f(S)=="RegExp")}},function(u,c){var i=u.exports={},l,f;function y(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?l=setTimeout:l=y}catch{l=y}try{typeof clearTimeout=="function"?f=clearTimeout:f=b}catch{f=b}})();function S(U){if(l===setTimeout)return setTimeout(U,0);if((l===y||!l)&&setTimeout)return l=setTimeout,setTimeout(U,0);try{return l(U,0)}catch{try{return l.call(null,U,0)}catch{return l.call(this,U,0)}}}function x(U){if(f===clearTimeout)return clearTimeout(U);if((f===b||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(U);try{return f(U)}catch{try{return f.call(null,U)}catch{return f.call(this,U)}}}var P=[],w=!1,M,j=-1;function C(){!w||!M||(w=!1,M.length?P=M.concat(P):j=-1,P.length&&_())}function _(){if(!w){var U=S(C);w=!0;for(var ie=P.length;ie;){for(M=P,P=[];++j<ie;)M&&M[j].run();j=-1,ie=P.length}M=null,w=!1,x(U)}}i.nextTick=function(U){var ie=new Array(arguments.length-1);if(arguments.length>1)for(var oe=1;oe<arguments.length;oe++)ie[oe-1]=arguments[oe];P.push(new z(U,ie)),P.length===1&&!w&&S(_)};function z(U,ie){this.fun=U,this.array=ie}z.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function X(){}i.on=X,i.addListener=X,i.once=X,i.off=X,i.removeListener=X,i.removeAllListeners=X,i.emit=X,i.prependListener=X,i.prependOnceListener=X,i.listeners=function(U){return[]},i.binding=function(U){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(U){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(u,c,i){var l=i(32),f=i(157),y=i(27),b=y("species");u.exports=function(S,x){var P=l(S).constructor,w;return P===void 0||(w=l(P)[b])==null?x:f(w)}},function(u,c,i){var l=i(7),f=i(100),y=i(89),b=l.TypeError;u.exports=function(S){if(f(S))return S;throw b(y(S)+" is not a constructor")}},function(u,c,i){var l=i(16),f=i(159).trim,y=i(195);l({target:"String",proto:!0,forced:y("trim")},{trim:function(){return f(this)}})},function(u,c,i){var l=i(15),f=i(45),y=i(40),b=i(160),S=l("".replace),x="["+b+"]",P=RegExp("^"+x+x+"*"),w=RegExp(x+x+"*$"),M=function(j){return function(C){var _=y(f(C));return j&1&&(_=S(_,P,"")),j&2&&(_=S(_,w,"")),_}};u.exports={start:M(1),end:M(2),trim:M(3)}},function(u,c){u.exports=`
\v\f\r    \u2028\u2029\uFEFF`},function(u,c,i){var l=i(35),f=i(122),y=i(32),b=i(90),S=i(40),x=i(45),P=i(59),w=i(123),M=i(124);f("match",function(j,C,_){return[function(X){var U=x(this),ie=X==null?void 0:P(X,j);return ie?l(ie,X,U):new RegExp(X)[j](S(U))},function(z){var X=y(this),U=S(z),ie=_(C,X,U);if(ie.done)return ie.value;if(!X.global)return M(X,U);var oe=X.unicode;X.lastIndex=0;for(var ee=[],J=0,ue;(ue=M(X,U))!==null;){var L=S(ue[0]);ee[J]=L,L===""&&(X.lastIndex=w(U,b(X.lastIndex),oe)),J++}return J===0?null:ee}]})},function(u,c,i){var l=i(7),f=i(76),y=i(62),b=i(28),S=i(34),x=i(18),P=i(133),w=i(101),M=i(86),j=i(163),C=i(126),_=l.setImmediate,z=l.clearImmediate,X=l.process,U=l.Dispatch,ie=l.Function,oe=l.MessageChannel,ee=l.String,J=0,ue={},L="onreadystatechange",k,I,A,R;try{k=l.location}catch{}var Y=function(me){if(S(ue,me)){var Oe=ue[me];delete ue[me],Oe()}},Q=function(me){return function(){Y(me)}},ce=function(me){Y(me.data)},Me=function(me){l.postMessage(ee(me),k.protocol+"//"+k.host)};(!_||!z)&&(_=function(Oe){var Pe=w(arguments,1);return ue[++J]=function(){f(b(Oe)?Oe:ie(Oe),void 0,Pe)},I(J),J},z=function(Oe){delete ue[Oe]},C?I=function(me){X.nextTick(Q(me))}:U&&U.now?I=function(me){U.now(Q(me))}:oe&&!j?(A=new oe,R=A.port2,A.port1.onmessage=ce,I=y(R.postMessage,R)):l.addEventListener&&b(l.postMessage)&&!l.importScripts&&k&&k.protocol!=="file:"&&!x(Me)?(I=Me,l.addEventListener("message",ce,!1)):L in M("script")?I=function(me){P.appendChild(M("script"))[L]=function(){P.removeChild(this),Y(me)}}:I=function(me){setTimeout(Q(me),0)}),u.exports={set:_,clear:z}},function(u,c,i){var l=i(53);u.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(l)},function(u,c,i){var l=i(55),f=function(y){var b,S;this.promise=new y(function(x,P){if(b!==void 0||S!==void 0)throw TypeError("Bad Promise constructor");b=x,S=P}),this.resolve=l(b),this.reject=l(S)};u.exports.f=function(y){return new f(y)}},function(u,c,i){function l(){return!1}c.a=l},function(u,c,i){(function(l){i.d(c,"a",function(){return J});var f=i(0);function y(L){throw new Error("[mobx-utils] "+L)}function b(L,k){k===void 0&&(k="Illegal state"),L||y(k)}var S=function(L){return L&&L!==Object.prototype&&Object.getOwnPropertyNames(L).concat(S(Object.getPrototypeOf(L))||[])},x=function(L){var k=S(L),I=k.filter(function(A,R){return k.indexOf(A)===R});return I},P=function(L){return x(L).filter(function(k){return k!=="constructor"&&!~k.indexOf("__")})},w="pending",M="fulfilled",j="rejected";function C(L){switch(this.state){case w:return L.pending&&L.pending(this.value);case j:return L.rejected&&L.rejected(this.value);case M:return L.fulfilled?L.fulfilled(this.value):this.value}}function _(L,k){if(b(arguments.length<=2,"fromPromise expects up to two arguments"),b(typeof L=="function"||typeof L=="object"&&L&&typeof L.then=="function","Please pass a promise or function to fromPromise"),L.isPromiseBasedObservable===!0)return L;typeof L=="function"&&(L=new Promise(L));var I=L;L.then(Object(f.k)("observableFromPromise-resolve",function(R){I.value=R,I.state=M}),Object(f.k)("observableFromPromise-reject",function(R){I.value=R,I.state=j})),I.isPromiseBasedObservable=!0,I.case=C;var A=k&&k.state===M?k.value:void 0;return Object(f.q)(I,{value:A,state:w},{},{deep:!1}),I}(function(L){L.reject=Object(f.k)("fromPromise.reject",function(I){var A=L(Promise.reject(I));return A.state=j,A.value=I,A});function k(I){I===void 0&&(I=void 0);var A=L(Promise.resolve(I));return A.state=M,A.value=I,A}L.resolve=Object(f.k)("fromPromise.resolve",k)})(_||(_={}));var z=function(L,k,I,A){var R=arguments.length,Y=R<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,I):A,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(L,k,I,A);else for(var ce=L.length-1;ce>=0;ce--)(Q=L[ce])&&(Y=(R<3?Q(Y):R>3?Q(k,I,Y):Q(k,I))||Y);return R>3&&Y&&Object.defineProperty(k,I,Y),Y};(function(){function L(k,I){var A=this;Object(f.G)(function(){A.current=I,A.subscription=k.subscribe(A)})}return L.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},L.prototype.next=function(k){this.current=k},L.prototype.complete=function(){this.dispose()},L.prototype.error=function(k){this.current=k,this.dispose()},z([f.C.ref],L.prototype,"current",void 0),z([f.k.bound],L.prototype,"next",null),z([f.k.bound],L.prototype,"complete",null),z([f.k.bound],L.prototype,"error",null),L})();var X=function(){return X=Object.assign||function(L){for(var k,I=1,A=arguments.length;I<A;I++){k=arguments[I];for(var R in k)Object.prototype.hasOwnProperty.call(k,R)&&(L[R]=k[R])}return L},X.apply(this,arguments)},U=function(L,k,I,A){var R=arguments.length,Y=R<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,I):A,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(L,k,I,A);else for(var ce=L.length-1;ce>=0;ce--)(Q=L[ce])&&(Y=(R<3?Q(Y):R>3?Q(k,I,Y):Q(k,I))||Y);return R>3&&Y&&Object.defineProperty(k,I,Y),Y},ie=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function L(k){var I=this;this.model=k,this.localValues=f.C.map({}),this.localComputedValues=f.C.map({}),this.isPropertyDirty=function(A){return I.localValues.has(A)},b(Object(f.A)(k),"createViewModel expects an observable object"),P(k).forEach(function(A){if(!(A===f.a||A==="__mobxDidRunLazyInitializers")){if(b(ie.indexOf(A)===-1,"The propertyname "+A+" is reserved and cannot be used with viewModels"),Object(f.w)(k,A)){var R=Object(f.h)(k,A).derivation;I.localComputedValues.set(A,Object(f.m)(R.bind(I)))}var Y=Object.getOwnPropertyDescriptor(k,A),Q=Y?{enumerable:Y.enumerable}:{};Object.defineProperty(I,A,X(X({},Q),{configurable:!0,get:function(){return Object(f.w)(k,A)?I.localComputedValues.get(A).get():I.isPropertyDirty(A)?I.localValues.get(A):I.model[A]},set:Object(f.k)(function(ce){ce!==I.model[A]?I.localValues.set(A,ce):I.localValues.delete(A)})}))}})}return Object.defineProperty(L.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),L.prototype.submit=function(){var k=this;Object(f.B)(this.localValues).forEach(function(I){var A=k.localValues.get(I),R=k.model[I];Object(f.y)(R)?R.replace(A):Object(f.z)(R)?(R.clear(),R.merge(A)):Object(f.v)(A)||(k.model[I]=A)}),this.localValues.clear()},L.prototype.reset=function(){this.localValues.clear()},L.prototype.resetProperty=function(k){this.localValues.delete(k)},U([f.m],L.prototype,"isDirty",null),U([f.m],L.prototype,"changedValues",null),U([f.k.bound],L.prototype,"submit",null),U([f.k.bound],L.prototype,"reset",null),U([f.k.bound],L.prototype,"resetProperty",null),L})();function oe(L){if(!L)return"ROOT";for(var k=[];L.parent;)k.push(L.path),L=L.parent;return k.reverse().join("/")}function ee(L){return Object(f.A)(L)||Object(f.y)(L)||Object(f.z)(L)}function J(L,k){var I=new WeakMap;function A(ce){var Me=I.get(ce.object);R(ce,Me),k(ce,oe(Me),L)}function R(ce,Me){switch(ce.type){case"add":Y(ce.newValue,Me,ce.name);break;case"update":Q(ce.oldValue),Y(ce.newValue,Me,ce.name||""+ce.index);break;case"remove":case"delete":Q(ce.oldValue);break;case"splice":ce.removed.map(Q),ce.added.forEach(function(Pe,Ee){return Y(Pe,Me,""+(ce.index+Ee))});for(var me=ce.index+ce.addedCount;me<ce.object.length;me++)if(ee(ce.object[me])){var Oe=I.get(ce.object[me]);Oe&&(Oe.path=""+me)}break}}function Y(ce,Me,me){if(ee(ce)){var Oe=I.get(ce);if(Oe){if(Oe.parent!==Me||Oe.path!==me)throw new Error("The same observable object cannot appear twice in the same tree,"+(" trying to assign it to '"+oe(Me)+"/"+me+"',")+(" but it already exists at '"+oe(Oe.parent)+"/"+Oe.path+"'"))}else{var Pe={parent:Me,path:me,dispose:Object(f.D)(ce,A)};I.set(ce,Pe),Object(f.p)(ce).forEach(function(Ee){var Ne=Ee[0],Le=Ee[1];return Y(Le,Pe,Ne)})}}}function Q(ce){if(ee(ce)){var Me=I.get(ce);if(!Me)return;I.delete(ce),Me.dispose(),Object(f.L)(ce).forEach(Q)}}return Y(L,void 0,""),function(){Q(L)}}var ue=function(){var L=function(k,I){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,R){A.__proto__=R}||function(A,R){for(var Y in R)R.hasOwnProperty(Y)&&(A[Y]=R[Y])},L(k,I)};return function(k,I){L(k,I);function A(){this.constructor=k}k.prototype=I===null?Object.create(I):(A.prototype=I.prototype,new A)}}();(function(L){ue(k,L);function k(I,A,R){var Y=R===void 0?{}:R,Q=Y.name,ce=Q===void 0?"ogm"+(Math.random()*1e3|0):Q,Me=Y.keyToName,me=Me===void 0?function(Ee){return""+Ee}:Me,Oe=L.call(this)||this;Oe._keyToName=me,Oe._groupBy=A,Oe._ogmInfoKey=Symbol("ogmInfo"+ce),Oe._base=I;for(var Pe=0;Pe<I.length;Pe++)Oe._addItem(I[Pe]);return Oe._disposeBaseObserver=Object(f.D)(Oe._base,function(Ee){if(Ee.type==="splice")Object(f.J)(function(){for(var Ne=0,Le=Ee.removed;Ne<Le.length;Ne++){var Ke=Le[Ne];Oe._removeItem(Ke)}for(var _e=0,Se=Ee.added;_e<Se.length;_e++){var Ie=Se[_e];Oe._addItem(Ie)}});else if(Ee.type==="update")Object(f.J)(function(){Oe._removeItem(Ee.oldValue),Oe._addItem(Ee.newValue)});else throw new Error("illegal state")}),Oe}return k.prototype.clear=function(){throw new Error("not supported")},k.prototype.delete=function(I){throw new Error("not supported")},k.prototype.set=function(I,A){throw new Error("not supported")},k.prototype.dispose=function(){this._disposeBaseObserver();for(var I=0;I<this._base.length;I++){var A=this._base[I],R=A[this._ogmInfoKey];R.reaction(),delete A[this._ogmInfoKey]}},k.prototype._getGroupArr=function(I){var A=L.prototype.get.call(this,I);return A===void 0&&(A=Object(f.C)([],{name:"GroupArray["+this._keyToName(I)+"]",deep:!1}),L.prototype.set.call(this,I,A)),A},k.prototype._removeFromGroupArr=function(I,A){var R=L.prototype.get.call(this,I);R.length===1?L.prototype.delete.call(this,I):(A===R.length-1||(R[A]=R[R.length-1],R[A][this._ogmInfoKey].groupArrIndex=A),R.length--)},k.prototype._addItem=function(I){var A=this,R=this._groupBy(I),Y=this._getGroupArr(R),Q={groupByValue:R,groupArrIndex:Y.length,reaction:Object(f.F)(function(){return A._groupBy(I)},function(ce,Me){var me=I[A._ogmInfoKey];A._removeFromGroupArr(me.groupByValue,me.groupArrIndex);var Oe=A._getGroupArr(ce),Pe=Oe.length;Oe.push(I),me.groupByValue=ce,me.groupArrIndex=Pe})};Object.defineProperty(I,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:Q}),Y.push(I)},k.prototype._removeItem=function(I){var A=I[this._ogmInfoKey];this._removeFromGroupArr(A.groupByValue,A.groupArrIndex),A.reaction(),delete I[this._ogmInfoKey]},k})(f.b),Promise.resolve(),typeof queueMicrotask<"u"||typeof l<"u"&&l.nextTick}).call(this,i(155))},function(u,c,i){var l;(function(f,y,b){if(!f)return;for(var S={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"},x={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},P={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},w={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},M,j=1;j<20;++j)S[111+j]="f"+j;for(j=0;j<=9;++j)S[j+96]=j.toString();function C(A,R,Y){if(A.addEventListener){A.addEventListener(R,Y,!1);return}A.attachEvent("on"+R,Y)}function _(A){if(A.type=="keypress"){var R=String.fromCharCode(A.which);return A.shiftKey||(R=R.toLowerCase()),R}return S[A.which]?S[A.which]:x[A.which]?x[A.which]:String.fromCharCode(A.which).toLowerCase()}function z(A,R){return A.sort().join(",")===R.sort().join(",")}function X(A){var R=[];return A.shiftKey&&R.push("shift"),A.altKey&&R.push("alt"),A.ctrlKey&&R.push("ctrl"),A.metaKey&&R.push("meta"),R}function U(A){if(A.preventDefault){A.preventDefault();return}A.returnValue=!1}function ie(A){if(A.stopPropagation){A.stopPropagation();return}A.cancelBubble=!0}function oe(A){return A=="shift"||A=="ctrl"||A=="alt"||A=="meta"}function ee(){if(!M){M={};for(var A in S)A>95&&A<112||S.hasOwnProperty(A)&&(M[S[A]]=A)}return M}function J(A,R,Y){return Y||(Y=ee()[A]?"keydown":"keypress"),Y=="keypress"&&R.length&&(Y="keydown"),Y}function ue(A){return A==="+"?["+"]:(A=A.replace(/\+{2}/g,"+plus"),A.split("+"))}function L(A,R){var Y,Q,ce,Me=[];for(Y=ue(A),ce=0;ce<Y.length;++ce)Q=Y[ce],w[Q]&&(Q=w[Q]),R&&R!="keypress"&&P[Q]&&(Q=P[Q],Me.push("shift")),oe(Q)&&Me.push(Q);return R=J(Q,Me,R),{key:Q,modifiers:Me,action:R}}function k(A,R){return A===null||A===y?!1:A===R?!0:k(A.parentNode,R)}function I(A){var R=this;if(A=A||y,!(R instanceof I))return new I(A);R.target=A,R._callbacks={},R._directMap={};var Y={},Q,ce=!1,Me=!1,me=!1;function Oe(Se){Se=Se||{};var Ie=!1,$e;for($e in Y){if(Se[$e]){Ie=!0;continue}Y[$e]=0}Ie||(me=!1)}function Pe(Se,Ie,$e,$,V,q){var he,xe,pe=[],ze=$e.type;if(!R._callbacks[Se])return[];for(ze=="keyup"&&oe(Se)&&(Ie=[Se]),he=0;he<R._callbacks[Se].length;++he)if(xe=R._callbacks[Se][he],!(!$&&xe.seq&&Y[xe.seq]!=xe.level)&&ze==xe.action&&(ze=="keypress"&&!$e.metaKey&&!$e.ctrlKey||z(Ie,xe.modifiers))){var tt=!$&&xe.combo==V,Ye=$&&xe.seq==$&&xe.level==q;(tt||Ye)&&R._callbacks[Se].splice(he,1),pe.push(xe)}return pe}function Ee(Se,Ie,$e,$){R.stopCallback(Ie,Ie.target||Ie.srcElement,$e,$)||Se(Ie,$e)===!1&&(U(Ie),ie(Ie))}R._handleKey=function(Se,Ie,$e){var $=Pe(Se,Ie,$e),V,q={},he=0,xe=!1;for(V=0;V<$.length;++V)$[V].seq&&(he=Math.max(he,$[V].level));for(V=0;V<$.length;++V){if($[V].seq){if($[V].level!=he)continue;xe=!0,q[$[V].seq]=1,Ee($[V].callback,$e,$[V].combo,$[V].seq);continue}xe||Ee($[V].callback,$e,$[V].combo)}var pe=$e.type=="keypress"&&Me;$e.type==me&&!oe(Se)&&!pe&&Oe(q),Me=xe&&$e.type=="keydown"};function Ne(Se){typeof Se.which!="number"&&(Se.which=Se.keyCode);var Ie=_(Se);if(Ie){if(Se.type=="keyup"&&ce===Ie){ce=!1;return}R.handleKey(Ie,X(Se),Se)}}function Le(){clearTimeout(Q),Q=setTimeout(Oe,1e3)}function Ke(Se,Ie,$e,$){Y[Se]=0;function V(ze){return function(){me=ze,++Y[Se],Le()}}function q(ze){Ee($e,ze,Se),$!=="keyup"&&(ce=_(ze)),setTimeout(Oe,10)}for(var he=0;he<Ie.length;++he){var xe=he+1===Ie.length,pe=xe?q:V($||L(Ie[he+1]).action);_e(Ie[he],pe,$,Se,he)}}function _e(Se,Ie,$e,$,V){R._directMap[Se+":"+$e]=Ie,Se=Se.replace(/\s+/g," ");var q=Se.split(" "),he;if(q.length>1){Ke(Se,q,Ie,$e);return}he=L(Se,$e),R._callbacks[he.key]=R._callbacks[he.key]||[],Pe(he.key,he.modifiers,{type:he.action},$,Se,V),R._callbacks[he.key][$?"unshift":"push"]({callback:Ie,modifiers:he.modifiers,action:he.action,seq:$,level:V,combo:Se})}R._bindMultiple=function(Se,Ie,$e){for(var $=0;$<Se.length;++$)_e(Se[$],Ie,$e)},C(A,"keypress",Ne),C(A,"keydown",Ne),C(A,"keyup",Ne)}I.prototype.bind=function(A,R,Y){var Q=this;return A=A instanceof Array?A:[A],Q._bindMultiple.call(Q,A,R,Y),Q},I.prototype.unbind=function(A,R){var Y=this;return Y.bind.call(Y,A,function(){},R)},I.prototype.trigger=function(A,R){var Y=this;return Y._directMap[A+":"+R]&&Y._directMap[A+":"+R]({},A),Y},I.prototype.reset=function(){var A=this;return A._callbacks={},A._directMap={},A},I.prototype.stopCallback=function(A,R){var Y=this;if((" "+R.className+" ").indexOf(" mousetrap ")>-1||k(R,Y.target))return!1;if("composedPath"in A&&typeof A.composedPath=="function"){var Q=A.composedPath()[0];Q!==A.target&&(R=Q)}return R.tagName=="INPUT"||R.tagName=="SELECT"||R.tagName=="TEXTAREA"||R.isContentEditable},I.prototype.handleKey=function(){var A=this;return A._handleKey.apply(A,arguments)},I.addKeycodes=function(A){for(var R in A)A.hasOwnProperty(R)&&(S[R]=A[R]);M=null},I.init=function(){var A=I(y);for(var R in A)R.charAt(0)!=="_"&&(I[R]=function(Y){return function(){return A[Y].apply(A,arguments)}}(R))},I.init(),f.Mousetrap=I,u.exports&&(u.exports=I),l=function(){return I}.call(c,i,c,u),l!==b&&(u.exports=l)})(typeof window<"u"?window:null,typeof window<"u"?document:null)},function(u,c,i){var l=i(36),f=i(37),y=i(32),b=i(39),S=i(66);u.exports=l?Object.defineProperties:function(P,w){y(P);for(var M=b(w),j=S(w),C=j.length,_=0,z;C>_;)f.f(P,z=j[_++],M[z]);return P}},function(u,c,i){var l=i(7),f=i(35),y=i(28),b=i(33),S=l.TypeError;u.exports=function(x,P){var w,M;if(P==="string"&&y(w=x.toString)&&!b(M=f(w,x))||y(w=x.valueOf)&&!b(M=f(w,x))||P!=="string"&&y(w=x.toString)&&!b(M=f(w,x)))return M;throw S("Can't convert object to primitive value")}},function(u,c,i){var l=i(7),f=i(28),y=i(92),b=l.WeakMap;u.exports=f(b)&&/native code/.test(y(b))},function(u,c,i){var l=i(136).IteratorPrototype,f=i(54),y=i(71),b=i(73),S=i(70),x=function(){return this};u.exports=function(P,w,M,j){var C=w+" Iterator";return P.prototype=f(l,{next:y(+!j,M)}),b(P,C,!1,!0),S[C]=x,P}},function(u,c,i){var l=i(7),f=i(28),y=l.String,b=l.TypeError;u.exports=function(S){if(typeof S=="object"||f(S))return S;throw b("Can't set "+y(S)+" as a prototype")}},function(u,c,i){var l=i(16),f=i(7),y=i(15),b=i(95),S=i(44),x=i(138),P=i(114),w=i(117),M=i(28),j=i(33),C=i(18),_=i(118),z=i(73),X=i(143);u.exports=function(U,ie,oe){var ee=U.indexOf("Map")!==-1,J=U.indexOf("Weak")!==-1,ue=ee?"set":"add",L=f[U],k=L&&L.prototype,I=L,A={},R=function(Pe){var Ee=y(k[Pe]);S(k,Pe,Pe=="add"?function(Le){return Ee(this,Le===0?0:Le),this}:Pe=="delete"?function(Ne){return J&&!j(Ne)?!1:Ee(this,Ne===0?0:Ne)}:Pe=="get"?function(Le){return J&&!j(Le)?void 0:Ee(this,Le===0?0:Le)}:Pe=="has"?function(Le){return J&&!j(Le)?!1:Ee(this,Le===0?0:Le)}:function(Le,Ke){return Ee(this,Le===0?0:Le,Ke),this})},Y=b(U,!M(L)||!(J||k.forEach&&!C(function(){new L().entries().next()})));if(Y)I=oe.getConstructor(ie,U,ee,ue),x.enable();else if(b(U,!0)){var Q=new I,ce=Q[ue](J?{}:-0,1)!=Q,Me=C(function(){Q.has(1)}),me=_(function(Pe){new L(Pe)}),Oe=!J&&C(function(){for(var Pe=new L,Ee=5;Ee--;)Pe[ue](Ee,Ee);return!Pe.has(-0)});me||(I=ie(function(Pe,Ee){w(Pe,k);var Ne=X(new L,Pe,I);return Ee!=null&&P(Ee,Ne[ue],{that:Ne,AS_ENTRIES:ee}),Ne}),I.prototype=k,k.constructor=I),(Me||Oe)&&(R("delete"),R("has"),ee&&R("get")),(Oe||ce)&&R(ue),J&&k.clear&&delete k.clear}return A[U]=I,l({global:!0,forced:I!=L},A),z(I,U),J||oe.setStrong(I,U,ee),I}},function(u,c,i){var l=i(18),f=i(33),y=i(50),b=i(175),S=Object.isExtensible,x=l(function(){});u.exports=x||b?function(w){return!f(w)||b&&y(w)=="ArrayBuffer"?!1:S?S(w):!0}:S},function(u,c,i){var l=i(18);u.exports=l(function(){if(typeof ArrayBuffer=="function"){var f=new ArrayBuffer(8);Object.isExtensible(f)&&Object.defineProperty(f,"a",{value:8})}})},function(u,c,i){var l=i(18);u.exports=!l(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(u,c,i){var l=i(37).f,f=i(54),y=i(144),b=i(62),S=i(117),x=i(114),P=i(111),w=i(145),M=i(36),j=i(138).fastKey,C=i(56),_=C.set,z=C.getterFor;u.exports={getConstructor:function(X,U,ie,oe){var ee=X(function(I,A){S(I,J),_(I,{type:U,index:f(null),first:void 0,last:void 0,size:0}),M||(I.size=0),A!=null&&x(A,I[oe],{that:I,AS_ENTRIES:ie})}),J=ee.prototype,ue=z(U),L=function(I,A,R){var Y=ue(I),Q=k(I,A),ce,Me;return Q?Q.value=R:(Y.last=Q={index:Me=j(A,!0),key:A,value:R,previous:ce=Y.last,next:void 0,removed:!1},Y.first||(Y.first=Q),ce&&(ce.next=Q),M?Y.size++:I.size++,Me!=="F"&&(Y.index[Me]=Q)),I},k=function(I,A){var R=ue(I),Y=j(A),Q;if(Y!=="F")return R.index[Y];for(Q=R.first;Q;Q=Q.next)if(Q.key==A)return Q};return y(J,{clear:function(){for(var A=this,R=ue(A),Y=R.index,Q=R.first;Q;)Q.removed=!0,Q.previous&&(Q.previous=Q.previous.next=void 0),delete Y[Q.index],Q=Q.next;R.first=R.last=void 0,M?R.size=0:A.size=0},delete:function(I){var A=this,R=ue(A),Y=k(A,I);if(Y){var Q=Y.next,ce=Y.previous;delete R.index[Y.index],Y.removed=!0,ce&&(ce.next=Q),Q&&(Q.previous=ce),R.first==Y&&(R.first=Q),R.last==Y&&(R.last=ce),M?R.size--:A.size--}return!!Y},forEach:function(A){for(var R=ue(this),Y=b(A,arguments.length>1?arguments[1]:void 0),Q;Q=Q?Q.next:R.first;)for(Y(Q.value,Q.key,this);Q&&Q.removed;)Q=Q.previous},has:function(A){return!!k(this,A)}}),y(J,ie?{get:function(A){var R=k(this,A);return R&&R.value},set:function(A,R){return L(this,A===0?0:A,R)}}:{add:function(A){return L(this,A=A===0?0:A,A)}}),M&&l(J,"size",{get:function(){return ue(this).size}}),ee},setStrong:function(X,U,ie){var oe=U+" Iterator",ee=z(U),J=z(oe);P(X,U,function(ue,L){_(this,{type:oe,target:ue,state:ee(ue),kind:L,last:void 0})},function(){for(var ue=J(this),L=ue.kind,k=ue.last;k&&k.removed;)k=k.previous;return!ue.target||!(ue.last=k=k?k.next:ue.state.first)?(ue.target=void 0,{value:void 0,done:!0}):L=="keys"?{value:k.key,done:!1}:L=="values"?{value:k.value,done:!1}:{value:[k.key,k.value],done:!1}},ie?"entries":"values",!ie,!0),w(U)}}},function(u,c,i){var l=i(116),f=i(98);u.exports=l?{}.toString:function(){return"[object "+f(this)+"]"}},function(u,c,i){var l=i(74).forEach,f=i(120),y=f("forEach");u.exports=y?[].forEach:function(S){return l(this,S,arguments.length>1?arguments[1]:void 0)}},function(u,c,i){var l=i(7),f=i(99),y=i(100),b=i(33),S=i(27),x=S("species"),P=l.Array;u.exports=function(w){var M;return f(w)&&(M=w.constructor,y(M)&&(M===P||f(M.prototype))?M=void 0:b(M)&&(M=M[x],M===null&&(M=void 0))),M===void 0?P:M}},function(u,c,i){var l=i(7);u.exports=l},function(u,c,i){var l=i(7),f=i(62),y=i(35),b=i(38),S=i(183),x=i(140),P=i(100),w=i(43),M=i(61),j=i(141),C=i(115),_=l.Array;u.exports=function(X){var U=b(X),ie=P(this),oe=arguments.length,ee=oe>1?arguments[1]:void 0,J=ee!==void 0;J&&(ee=f(ee,oe>2?arguments[2]:void 0));var ue=C(U),L=0,k,I,A,R,Y,Q;if(ue&&!(this==_&&x(ue)))for(R=j(U,ue),Y=R.next,I=ie?new this:[];!(A=y(Y,R)).done;L++)Q=J?S(R,ee,[A.value,L],!0):A.value,M(I,L,Q);else for(k=w(U),I=ie?new this(k):_(k);k>L;L++)Q=J?ee(U[L],L):U[L],M(I,L,Q);return I.length=L,I}},function(u,c,i){var l=i(32),f=i(142);u.exports=function(y,b,S,x){try{return x?b(l(S)[0],S[1]):b(S)}catch(P){f(y,"throw",P)}}},function(u,c,i){var l=i(32);u.exports=function(){var f=l(this),y="";return f.global&&(y+="g"),f.ignoreCase&&(y+="i"),f.multiline&&(y+="m"),f.dotAll&&(y+="s"),f.unicode&&(y+="u"),f.sticky&&(y+="y"),y}},function(u,c,i){var l=i(18),f=i(7),y=f.RegExp;u.exports=l(function(){var b=y(".","s");return!(b.dotAll&&b.exec(`
`)&&b.flags==="s")})},function(u,c,i){var l=i(18),f=i(7),y=f.RegExp;u.exports=l(function(){var b=y("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},function(u,c,i){var l=i(16),f=i(15),y=i(55),b=i(38),S=i(43),x=i(40),P=i(18),w=i(188),M=i(120),j=i(189),C=i(190),_=i(65),z=i(191),X=[],U=f(X.sort),ie=f(X.push),oe=P(function(){X.sort(void 0)}),ee=P(function(){X.sort(null)}),J=M("sort"),ue=!P(function(){if(_)return _<70;if(!(j&&j>3)){if(C)return!0;if(z)return z<603;var I="",A,R,Y,Q;for(A=65;A<76;A++){switch(R=String.fromCharCode(A),A){case 66:case 69:case 70:case 72:Y=3;break;case 68:case 71:Y=4;break;default:Y=2}for(Q=0;Q<47;Q++)X.push({k:R+Q,v:Y})}for(X.sort(function(ce,Me){return Me.v-ce.v}),Q=0;Q<X.length;Q++)R=X[Q].k.charAt(0),I.charAt(I.length-1)!==R&&(I+=R);return I!=="DGBEFHACIJK"}}),L=oe||!ee||!J||!ue,k=function(I){return function(A,R){return R===void 0?-1:A===void 0?1:I!==void 0?+I(A,R)||0:x(A)>x(R)?1:-1}};l({target:"Array",proto:!0,forced:L},{sort:function(A){A!==void 0&&y(A);var R=b(this);if(ue)return A===void 0?U(R):U(R,A);var Y=[],Q=S(R),ce,Me;for(Me=0;Me<Q;Me++)Me in R&&ie(Y,R[Me]);for(w(Y,k(A)),ce=Y.length,Me=0;Me<ce;)R[Me]=Y[Me++];for(;Me<Q;)delete R[Me++];return R}})},function(u,c,i){var l=i(113),f=Math.floor,y=function(x,P){var w=x.length,M=f(w/2);return w<8?b(x,P):S(x,y(l(x,0,M),P),y(l(x,M),P),P)},b=function(x,P){for(var w=x.length,M=1,j,C;M<w;){for(C=M,j=x[M];C&&P(x[C-1],j)>0;)x[C]=x[--C];C!==M++&&(x[C]=j)}return x},S=function(x,P,w,M){for(var j=P.length,C=w.length,_=0,z=0;_<j||z<C;)x[_+z]=_<j&&z<C?M(P[_],w[z])<=0?P[_++]:w[z++]:_<j?P[_++]:w[z++];return x};u.exports=y},function(u,c,i){var l=i(53),f=l.match(/firefox\/(\d+)/i);u.exports=!!f&&+f[1]},function(u,c,i){var l=i(53);u.exports=/MSIE|Trident/.test(l)},function(u,c,i){var l=i(53),f=l.match(/AppleWebKit\/(\d+)\./);u.exports=!!f&&+f[1]},function(u,c,i){var l=i(16),f=i(74).find,y=i(83),b="find",S=!0;b in[]&&Array(1)[b](function(){S=!1}),l({target:"Array",proto:!0,forced:S},{find:function(P){return f(this,P,arguments.length>1?arguments[1]:void 0)}}),y(b)},function(u,c,i){var l=i(7),f=i(154),y=l.TypeError;u.exports=function(b){if(f(b))throw y("The method doesn't accept regular expressions");return b}},function(u,c,i){var l=i(27),f=l("match");u.exports=function(y){var b=/./;try{"/./"[y](b)}catch{try{return b[f]=!1,"/./"[y](b)}catch{}}return!1}},function(u,c,i){var l=i(94).PROPER,f=i(18),y=i(160),b="…";u.exports=function(S){return f(function(){return!!y[S]()||b[S]()!==b||l&&y[S].name!==S})}},function(u,c,i){var l=i(15);u.exports=l(1 .valueOf)},function(u,c,i){var l=i(15),f=i(38),y=Math.floor,b=l("".charAt),S=l("".replace),x=l("".slice),P=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,w=/\$([$&'`]|\d{1,2})/g;u.exports=function(M,j,C,_,z,X){var U=C+M.length,ie=_.length,oe=w;return z!==void 0&&(z=f(z),oe=P),S(X,oe,function(ee,J){var ue;switch(b(J,0)){case"$":return"$";case"&":return M;case"`":return x(j,0,C);case"'":return x(j,U);case"<":ue=z[x(J,1,-1)];break;default:var L=+J;if(L===0)return ee;if(L>ie){var k=y(L/10);return k===0?ee:k<=ie?_[k-1]===void 0?b(J,1):_[k-1]+b(J,1):ee}ue=_[L-1]}return ue===void 0?"":ue})}},function(u,c,i){var l=i(36),f=i(15),y=i(35),b=i(18),S=i(66),x=i(112),P=i(93),w=i(38),M=i(81),j=Object.assign,C=Object.defineProperty,_=f([].concat);u.exports=!j||b(function(){if(l&&j({b:1},j(C({},"a",{enumerable:!0,get:function(){C(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var z={},X={},U=Symbol(),ie="abcdefghijklmnopqrst";return z[U]=7,ie.split("").forEach(function(oe){X[oe]=oe}),j({},z)[U]!=7||S(j({},X)).join("")!=ie})?function(X,U){for(var ie=w(X),oe=arguments.length,ee=1,J=x.f,ue=P.f;oe>ee;)for(var L=M(arguments[ee++]),k=J?_(S(L),J(L)):S(L),I=k.length,A=0,R;I>A;)R=k[A++],(!l||y(ue,L,R))&&(ie[R]=L[R]);return ie}:j},function(u,c,i){var l=i(7),f=i(15),y=i(55),b=i(33),S=i(34),x=i(101),P=l.Function,w=f([].concat),M=f([].join),j={},C=function(_,z,X){if(!S(j,z)){for(var U=[],ie=0;ie<z;ie++)U[ie]="a["+ie+"]";j[z]=P("C,a","return new C("+M(U,",")+")")}return j[z](_,X)};u.exports=P.bind||function(z){var X=y(this),U=X.prototype,ie=x(arguments,1),oe=function(){var J=w(ie,x(arguments));return this instanceof oe?C(X,J.length,J):X.apply(z,J)};return b(U)&&(oe.prototype=U),oe}},function(u,c,i){var l=i(34);u.exports=function(f){return f!==void 0&&(l(f,"value")||l(f,"writable"))}},function(u,c,i){var l=i(15),f=i(45),y=i(40),b=/"/g,S=l("".replace);u.exports=function(x,P,w,M){var j=y(f(x)),C="<"+P;return w!==""&&(C+=" "+w+'="'+S(y(M),b,"&quot;")+'"'),C+">"+j+"</"+P+">"}},function(u,c,i){var l=i(18);u.exports=function(f){return l(function(){var y=""[f]('"');return y!==y.toLowerCase()||y.split('"').length>3})}},function(u,c,i){var l=i(16),f=Math.hypot,y=Math.abs,b=Math.sqrt,S=!!f&&f(1/0,NaN)!==1/0;l({target:"Math",stat:!0,forced:S},{hypot:function(P,w){for(var M=0,j=0,C=arguments.length,_=0,z,X;j<C;)z=y(arguments[j++]),_<z?(X=_/z,M=M*X*X+1,_=z):z>0?(X=z/_,M+=X*X):M+=z;return _===1/0?1/0:_*b(M)}})},function(u,c,i){var l=i(16),f=i(64),y=i(7),b=i(46),S=i(35),x=i(205),P=i(44),w=i(144),M=i(97),j=i(73),C=i(145),_=i(55),z=i(28),X=i(33),U=i(117),ie=i(92),oe=i(114),ee=i(118),J=i(156),ue=i(162).set,L=i(206),k=i(209),I=i(210),A=i(164),R=i(211),Y=i(56),Q=i(95),ce=i(27),Me=i(212),me=i(126),Oe=i(65),Pe=ce("species"),Ee="Promise",Ne=Y.getterFor(Ee),Le=Y.set,Ke=Y.getterFor(Ee),_e=x&&x.prototype,Se=x,Ie=_e,$e=y.TypeError,$=y.document,V=y.process,q=A.f,he=q,xe=!!($&&$.createEvent&&y.dispatchEvent),pe=z(y.PromiseRejectionEvent),ze="unhandledrejection",tt="rejectionhandled",Ye=0,nt=1,ve=2,ut=1,rt=2,Be=!1,Qe,At,dt,bt,ne=Q(Ee,function(){var je=ie(Se),Ue=je!==String(Se);if(!Ue&&Oe===66||f&&!Ie.finally)return!0;if(Oe>=51&&/native code/.test(je))return!1;var ot=new Se(function(H){H(1)}),Je=function(H){H(function(){},function(){})},lt=ot.constructor={};return lt[Pe]=Je,Be=ot.then(function(){})instanceof Je,Be?!Ue&&Me&&!pe:!0}),Ct=ne||!ee(function(je){Se.all(je).catch(function(){})}),St=function(je){var Ue;return X(je)&&z(Ue=je.then)?Ue:!1},mt=function(je,Ue){if(!je.notified){je.notified=!0;var ot=je.reactions;L(function(){for(var Je=je.value,lt=je.state==nt,H=0;ot.length>H;){var K=ot[H++],te=lt?K.ok:K.fail,re=K.resolve,we=K.reject,De=K.domain,Xe,vt,Zt;try{te?(lt||(je.rejection===rt&&Er(je),je.rejection=ut),te===!0?Xe=Je:(De&&De.enter(),Xe=te(Je),De&&(De.exit(),Zt=!0)),Xe===K.promise?we($e("Promise-chain cycle")):(vt=St(Xe))?S(vt,Xe,re,we):re(Xe)):we(Je)}catch(Jt){De&&!Zt&&De.exit(),we(Jt)}}je.reactions=[],je.notified=!1,Ue&&!je.rejection&&dr(je)})}},Vt=function(je,Ue,ot){var Je,lt;xe?(Je=$.createEvent("Event"),Je.promise=Ue,Je.reason=ot,Je.initEvent(je,!1,!0),y.dispatchEvent(Je)):Je={promise:Ue,reason:ot},!pe&&(lt=y["on"+je])?lt(Je):je===ze&&I("Unhandled promise rejection",ot)},dr=function(je){S(ue,y,function(){var Ue=je.facade,ot=je.value,Je=Kt(je),lt;if(Je&&(lt=R(function(){me?V.emit("unhandledRejection",ot,Ue):Vt(ze,Ue,ot)}),je.rejection=me||Kt(je)?rt:ut,lt.error))throw lt.value})},Kt=function(je){return je.rejection!==ut&&!je.parent},Er=function(je){S(ue,y,function(){var Ue=je.facade;me?V.emit("rejectionHandled",Ue):Vt(tt,Ue,je.value)})},qe=function(je,Ue,ot){return function(Je){je(Ue,Je,ot)}},Pt=function(je,Ue,ot){je.done||(je.done=!0,ot&&(je=ot),je.value=Ue,je.state=ve,mt(je,!0))},rr=function(je,Ue,ot){if(!je.done){je.done=!0,ot&&(je=ot);try{if(je.facade===Ue)throw $e("Promise can't be resolved itself");var Je=St(Ue);Je?L(function(){var lt={done:!1};try{S(Je,Ue,qe(rr,lt,je),qe(Pt,lt,je))}catch(H){Pt(lt,H,je)}}):(je.value=Ue,je.state=nt,mt(je,!1))}catch(lt){Pt({done:!1},lt,je)}}};if(ne&&(Se=function(Ue){U(this,Ie),_(Ue),S(Qe,this);var ot=Ne(this);try{Ue(qe(rr,ot),qe(Pt,ot))}catch(Je){Pt(ot,Je)}},Ie=Se.prototype,Qe=function(Ue){Le(this,{type:Ee,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Ye,value:void 0})},Qe.prototype=w(Ie,{then:function(Ue,ot){var Je=Ke(this),lt=Je.reactions,H=q(J(this,Se));return H.ok=z(Ue)?Ue:!0,H.fail=z(ot)&&ot,H.domain=me?V.domain:void 0,Je.parent=!0,lt[lt.length]=H,Je.state!=Ye&&mt(Je,!1),H.promise},catch:function(je){return this.then(void 0,je)}}),At=function(){var je=new Qe,Ue=Ne(je);this.promise=je,this.resolve=qe(rr,Ue),this.reject=qe(Pt,Ue)},A.f=q=function(je){return je===Se||je===dt?new At(je):he(je)},!f&&z(x)&&_e!==Object.prototype)){bt=_e.then,Be||(P(_e,"then",function(Ue,ot){var Je=this;return new Se(function(lt,H){S(bt,Je,lt,H)}).then(Ue,ot)},{unsafe:!0}),P(_e,"catch",Ie.catch,{unsafe:!0}));try{delete _e.constructor}catch{}M&&M(_e,Ie)}l({global:!0,wrap:!0,forced:ne},{Promise:Se}),j(Se,Ee,!1,!0),C(Ee),dt=b(Ee),l({target:Ee,stat:!0,forced:ne},{reject:function(Ue){var ot=q(this);return S(ot.reject,void 0,Ue),ot.promise}}),l({target:Ee,stat:!0,forced:f||ne},{resolve:function(Ue){return k(f&&this===dt?Se:this,Ue)}}),l({target:Ee,stat:!0,forced:Ct},{all:function(Ue){var ot=this,Je=q(ot),lt=Je.resolve,H=Je.reject,K=R(function(){var te=_(ot.resolve),re=[],we=0,De=1;oe(Ue,function(Xe){var vt=we++,Zt=!1;De++,S(te,ot,Xe).then(function(Jt){Zt||(Zt=!0,re[vt]=Jt,--De||lt(re))},H)}),--De||lt(re)});return K.error&&H(K.value),Je.promise},race:function(Ue){var ot=this,Je=q(ot),lt=Je.reject,H=R(function(){var K=_(ot.resolve);oe(Ue,function(te){S(K,ot,te).then(Je.resolve,lt)})});return H.error&&lt(H.value),Je.promise}})},function(u,c,i){var l=i(7);u.exports=l.Promise},function(u,c,i){var l=i(7),f=i(62),y=i(51).f,b=i(162).set,S=i(163),x=i(207),P=i(208),w=i(126),M=l.MutationObserver||l.WebKitMutationObserver,j=l.document,C=l.process,_=l.Promise,z=y(l,"queueMicrotask"),X=z&&z.value,U,ie,oe,ee,J,ue,L,k;X||(U=function(){var I,A;for(w&&(I=C.domain)&&I.exit();ie;){A=ie.fn,ie=ie.next;try{A()}catch(R){throw ie?ee():oe=void 0,R}}oe=void 0,I&&I.enter()},!S&&!w&&!P&&M&&j?(J=!0,ue=j.createTextNode(""),new M(U).observe(ue,{characterData:!0}),ee=function(){ue.data=J=!J}):!x&&_&&_.resolve?(L=_.resolve(void 0),L.constructor=_,k=f(L.then,L),ee=function(){k(U)}):w?ee=function(){C.nextTick(U)}:(b=f(b,l),ee=function(){b(U)})),u.exports=X||function(I){var A={fn:I,next:void 0};oe&&(oe.next=A),ie||(ie=A,ee()),oe=A}},function(u,c,i){var l=i(53),f=i(7);u.exports=/ipad|iphone|ipod/i.test(l)&&f.Pebble!==void 0},function(u,c,i){var l=i(53);u.exports=/web0s(?!.*chrome)/i.test(l)},function(u,c,i){var l=i(32),f=i(33),y=i(164);u.exports=function(b,S){if(l(b),f(S)&&S.constructor===b)return S;var x=y.f(b),P=x.resolve;return P(S),x.promise}},function(u,c,i){var l=i(7);u.exports=function(f,y){var b=l.console;b&&b.error&&(arguments.length==1?b.error(f):b.error(f,y))}},function(u,c){u.exports=function(i){try{return{error:!1,value:i()}}catch(l){return{error:!0,value:l}}}},function(u,c){u.exports=typeof window=="object"},function(u,c,i){var l=i(36),f=i(15),y=i(66),b=i(39),S=i(93).f,x=f(S),P=f([].push),w=function(M){return function(j){for(var C=b(j),_=y(C),z=_.length,X=0,U=[],ie;z>X;)ie=_[X++],(!l||x(C,ie))&&P(U,M?[ie,C[ie]]:C[ie]);return U}};u.exports={entries:w(!0),values:w(!1)}},function(u,c,i){var l=i(38),f=i(67),y=i(43);u.exports=function(S){for(var x=l(this),P=y(x),w=arguments.length,M=f(w>1?arguments[1]:void 0,P),j=w>2?arguments[2]:void 0,C=j===void 0?P:f(j,P);C>M;)x[M++]=S;return x}},function(u,c,i){i.r(c),i.d(c,"observer",function(){return Hr}),i.d(c,"LogicFlow",function(){return Uc}),i.d(c,"h",function(){return ne.g}),i.d(c,"LogicFlowUtil",function(){return l}),i.d(c,"BaseNode",function(){return pn}),i.d(c,"RectNode",function(){return ac}),i.d(c,"CircleNode",function(){return lc}),i.d(c,"PolygonNode",function(){return dc}),i.d(c,"DiamondNode",function(){return vc}),i.d(c,"EllipseNode",function(){return mc}),i.d(c,"TextNode",function(){return Oc}),i.d(c,"HtmlNode",function(){return Sc}),i.d(c,"BaseEdge",function(){return mi}),i.d(c,"LineEdge",function(){return Cc}),i.d(c,"PolylineEdge",function(){return Ic}),i.d(c,"BezierEdge",function(){return Bc}),i.d(c,"Arrow",function(){return WD}),i.d(c,"BaseEdgeModel",function(){return af}),i.d(c,"BezierEdgeModel",function(){return If}),i.d(c,"LineEdgeModel",function(){return lf}),i.d(c,"PolylineEdgeModel",function(){return df}),i.d(c,"BaseNodeModel",function(){return cn}),i.d(c,"CircleNodeModel",function(){return Lf}),i.d(c,"DiamondNodeModel",function(){return Hf}),i.d(c,"EllipseNodeModel",function(){return kf}),i.d(c,"PolygonNodeModel",function(){return Uf}),i.d(c,"RectNodeModel",function(){return Wf}),i.d(c,"TextNodeModel",function(){return Zf}),i.d(c,"HtmlNodeModel",function(){return Qf}),i.d(c,"EditConfigModel",function(){return Jd}),i.d(c,"GraphModel",function(){return Yh}),i.d(c,"SnaplineModel",function(){return Wy}),i.d(c,"Keyboard",function(){return nm}),i.d(c,"get",function(){return Av}),i.d(c,"defaults",function(){return Nv});var l={};i.r(l),i.d(l,"createUuid",function(){return Qn}),i.d(l,"refreshGraphId",function(){return tP}),i.d(l,"createDrag",function(){return gf}),i.d(l,"StepDrag",function(){return qn});var f=i(0),y=i(10);if(!y.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!f.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var b=i(42),S=Object(b.b)("observerBatching");function x(e){e()}function P(e){e||(e=x),Object(f.n)({reactionScheduler:e}),Object(b.a)()[S]=!0}function w(e){return Object(f.t)(e)}function M(e){var r={cleanAt:Date.now()+j,reaction:e};return r}var j=1e4,C=1e4,_=new Set,z;function X(){z===void 0&&(z=setTimeout(oe,C))}function U(e){_.add(e),X()}function ie(e){_.delete(e)}function oe(){z=void 0;var e=Date.now();_.forEach(function(r){var t=r.current;t&&e>=t.cleanAt&&(t.reaction.dispose(),r.current=null,_.delete(r))}),_.size>0&&X()}var ee=!1,J=[];function ue(e){return function(){ee?J.push(e):e()}}function L(e){ee=!0,J=[];try{var r=e();ee=!1;var t=J.length>0?J:void 0;return y.d.useLayoutEffect(function(){t&&t.forEach(function(n){return n()})},[t]),r}finally{ee=!1}}var k={};function I(e){return"observer"+e}function A(e,r,t){r===void 0&&(r="observed"),t===void 0&&(t=k);var n=t.useForceUpdate||b.d,o=n(),a=ue(o),s=y.d.useRef(null);if(!s.current){var p=new f.c(I(r),function(){g.mounted?a():(p.dispose(),s.current=null)}),g=M(p);s.current=g,U(s)}var E=s.current.reaction;return y.d.useDebugValue(E,w),y.d.useEffect(function(){return ie(s),s.current?s.current.mounted=!0:(s.current={reaction:new f.c(I(r),function(){a()}),cleanAt:1/0},a()),function(){s.current.reaction.dispose(),s.current=null}},[]),L(function(){var T,D;if(E.track(function(){try{T=e()}catch(B){D=B}}),D)throw D;return T})}var R=function(){return R=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},R.apply(this,arguments)};function Y(e,r){var t=R({forwardRef:!1},r),n=e.displayName||e.name,o=function(s,p){return A(function(){return e(s,p)},n)};o.displayName=n;var a;return t.forwardRef?a=Object(y.f)(Object(y.e)(o)):a=Object(y.f)(o),ce(e,a),a.displayName=n,a}var Q={$$typeof:!0,render:!0,compare:!0,type:!0};function ce(e,r){Object.keys(e).forEach(function(t){Q[t]||Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}function Me(e){var r=e.children,t=e.render,n=r||t;return typeof n!="function"?null:A(n)}Me.propTypes={children:me,render:me},Me.displayName="Observer";function me(e,r,t,n,o){var a=r==="children"?"render":"children",s=typeof e[r]=="function",p=typeof e[a]=="function";return s&&p?new Error("MobX Observer: Do not use children and render in the same time in`"+t):s||p?null:new Error("Invalid prop `"+o+"` of type `"+typeof e[r]+"` supplied to `"+t+"`, expected `function`.")}P(y.g);var Oe=0;function Pe(e){if(typeof Symbol=="function")return Symbol(e);var r="__$mobx-react "+e+" ("+Oe+")";return Oe++,r}var Ee={};function Ne(e){return Ee[e]||(Ee[e]=Pe(e)),Ee[e]}function Le(e,r){if(Ke(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(var o=0;o<t.length;o++)if(!Object.hasOwnProperty.call(r,t[o])||!Ke(e[t[o]],r[t[o]]))return!1;return!0}function Ke(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function _e(e,r,t){Object.hasOwnProperty.call(e,r)?e[r]=t:Object.defineProperty(e,r,{enumerable:!1,configurable:!0,writable:!0,value:t})}var Se=Ne("patchMixins"),Ie=Ne("patchedDefinition");function $e(e,r){var t=e[Se]=e[Se]||{},n=t[r]=t[r]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}function $(e,r){for(var t=this,n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];r.locks++;try{var s;return e!=null&&(s=e.apply(this,o)),s}finally{r.locks--,r.locks===0&&r.methods.forEach(function(p){p.apply(t,o)})}}function V(e,r){var t=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];$.call.apply($,[this,e,r].concat(a))};return t}function q(e,r,t){var n=$e(e,r);n.methods.indexOf(t)<0&&n.methods.push(t);var o=Object.getOwnPropertyDescriptor(e,r);if(!(o&&o[Ie])){var a=e[r],s=he(e,r,o?o.enumerable:void 0,n,a);Object.defineProperty(e,r,s)}}function he(e,r,t,n,o){var a,s=V(o,n);return a={},a[Ie]=!0,a.get=function(){return s},a.set=function(g){if(this===e)s=V(g,n);else{var E=he(this,r,t,n,g);Object.defineProperty(this,r,E)}},a.configurable=!0,a.enumerable=t,a}var xe=f.a||"$mobx",pe=Ne("isMobXReactObserver"),ze=Ne("isUnmounted"),tt=Ne("skipRender"),Ye=Ne("isForcingUpdate");function nt(e){var r=e.prototype;if(e[pe]){var t=ve(r);console.warn("The provided component class ("+t+`)
has already been declared as an observer component.`)}else e[pe]=!0;if(r.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==y.b){if(!r.shouldComponentUpdate)r.shouldComponentUpdate=rt;else if(r.shouldComponentUpdate!==rt)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}Be(r,"props"),Be(r,"state");var n=r.render;return r.render=function(){return ut.call(this,n)},q(r,"componentWillUnmount",function(){var o;if((o=this.render[xe])===null||o===void 0||o.dispose(),this[ze]=!0,!this.render[xe]){var a=ve(this);console.warn("The reactive render of an observer class component ("+a+`)
was overriden after MobX attached. This may result in a memory leak if the
overriden reactive render was not properly disposed.`)}}),e}function ve(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function ut(e){var r=this;_e(this,tt,!1),_e(this,Ye,!1);var t=ve(this),n=e.bind(this),o=!1,a=new f.c(t+".render()",function(){if(!o&&(o=!0,r[ze]!==!0)){var p=!0;try{_e(r,Ye,!0),r[tt]||y.a.prototype.forceUpdate.call(r),p=!1}finally{_e(r,Ye,!1),p&&a.dispose()}}});a.reactComponent=this,s[xe]=a,this.render=s;function s(){o=!1;var p=void 0,g=void 0;if(a.track(function(){try{g=Object(f.d)(!1,n)}catch(E){p=E}}),p)throw p;return g}return s.call(this)}function rt(e,r){return this.state!==r?!0:!Le(this.props,e)}function Be(e,r){var t=Ne("reactProp_"+r+"_valueHolder"),n=Ne("reactProp_"+r+"_atomHolder");function o(){return this[n]||_e(this,n,Object(f.o)("reactive "+r)),this[n]}Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:function(){var s=!1;return f.f&&f.e&&(s=Object(f.f)(!0)),o.call(this).reportObserved(),f.f&&f.e&&Object(f.e)(s),this[t]},set:function(s){!this[Ye]&&!Le(this[t],s)?(_e(this,t,s),_e(this,tt,!0),o.call(this).reportChanged(),_e(this,tt,!1)):_e(this,t,s)}})}var Qe=typeof Symbol=="function"&&Symbol.for,At=Qe?Symbol.for("react.forward_ref"):typeof y.e=="function"&&Object(y.e)(function(e){return null}).$$typeof,dt=Qe?Symbol.for("react.memo"):typeof y.f=="function"&&Object(y.f)(function(e){return null}).$$typeof;function bt(e){if(e.isMobxInjector===!0&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),dt&&e.$$typeof===dt)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(At&&e.$$typeof===At){var r=e.render;if(typeof r!="function")throw new Error("render property of ForwardRef was not a function");return Object(y.e)(function(){var n=arguments;return Object(y.c)(Me,null,function(){return r.apply(void 0,n)})})}return typeof e=="function"&&(!e.prototype||!e.prototype.render)&&!e.isReactClass&&!Object.prototype.isPrototypeOf.call(y.a,e)?Y(e):nt(e)}if(!y.a)throw new Error("mobx-react requires React to be available");if(!f.C)throw new Error("mobx-react requires mobx to be available");var ne=i(1);i(3),i(60),i(2),i(6),i(4),i(11),i(41),i(24),i(20),i(5),i(22),i(21),i(23),i(8),i(9),i(17),i(25),i(19),i(29),i(187),i(192),i(103),i(152),i(153);function Ct(e,r){for(var t=-1,n=e==null?0:e.length,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o}var St=Ct;function mt(){this.__data__=[],this.size=0}var Vt=mt;function dr(e,r){return e===r||e!==e&&r!==r}var Kt=dr;function Er(e,r){for(var t=e.length;t--;)if(Kt(e[t][0],r))return t;return-1}var qe=Er,Pt=Array.prototype,rr=Pt.splice;function je(e){var r=this.__data__,t=qe(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():rr.call(r,t,1),--this.size,!0}var Ue=je;function ot(e){var r=this.__data__,t=qe(r,e);return t<0?void 0:r[t][1]}var Je=ot;function lt(e){return qe(this.__data__,e)>-1}var H=lt;function K(e,r){var t=this.__data__,n=qe(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var te=K;function re(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}re.prototype.clear=Vt,re.prototype.delete=Ue,re.prototype.get=Je,re.prototype.has=H,re.prototype.set=te;var we=re;function De(){this.__data__=new we,this.size=0}var Xe=De;function vt(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var Zt=vt;function Jt(e){return this.__data__.get(e)}var Hn=Jt;function Gr(e){return this.__data__.has(e)}var Di=Gr,xr=i(31),ji=xr.a.Symbol,sr=ji,vn=Object.prototype,Gn=vn.hasOwnProperty,an=vn.toString,kn=sr?sr.toStringTag:void 0;function yn(e){var r=Gn.call(e,kn),t=e[kn];try{e[kn]=void 0;var n=!0}catch{}var o=an.call(e);return n&&(r?e[kn]=t:delete e[kn]),o}var gn=yn,uo=Object.prototype,Vs=uo.toString;function so(e){return Vs.call(e)}var lo=so,Ci="[object Null]",Ge="[object Undefined]",Ri=sr?sr.toStringTag:void 0;function Ys(e){return e==null?e===void 0?Ge:Ci:Ri&&Ri in Object(e)?gn(e):lo(e)}var kr=Ys;function Ii(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var Tt=Ii,pr="[object AsyncFunction]",_i="[object Function]",Ws="[object GeneratorFunction]",Ks="[object Proxy]";function Zs(e){if(!Tt(e))return!1;var r=kr(e);return r==_i||r==Ws||r==pr||r==Ks}var fo=Zs,Bi=xr.a["__core-js_shared__"],un=Bi,Yo=function(){var e=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Wo(e){return!!Yo&&Yo in e}var Li=Wo,Js=Function.prototype,co=Js.toString;function Qs(e){if(e!=null){try{return co.call(e)}catch{}try{return e+""}catch{}}return""}var Rt=Qs,nd=/[\\^$.*+?()[\]{}|]/g,od=/^\[object .+?Constructor\]$/,id=Function.prototype,zi=Object.prototype,qs=id.toString,Fi=zi.hasOwnProperty,el=RegExp("^"+qs.call(Fi).replace(nd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tl(e){if(!Tt(e)||Li(e))return!1;var r=fo(e)?el:od;return r.test(Rt(e))}var $r=tl;function rl(e,r){return e==null?void 0:e[r]}var nl=rl;function Ko(e,r){var t=nl(e,r);return $r(t)?t:void 0}var Nr=Ko,ol=Nr(xr.a,"Map"),mn=ol,il=Nr(Object,"create"),$n=il;function al(){this.__data__=$n?$n(null):{},this.size=0}var Zo=al;function Hi(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var ul=Hi,Jo="__lodash_hash_undefined__",Gi=Object.prototype,ki=Gi.hasOwnProperty;function $i(e){var r=this.__data__;if($n){var t=r[e];return t===Jo?void 0:t}return ki.call(r,e)?r[e]:void 0}var Xi=$i,sl=Object.prototype,Ui=sl.hasOwnProperty;function ll(e){var r=this.__data__;return $n?r[e]!==void 0:Ui.call(r,e)}var Vi=ll,Yi="__lodash_hash_undefined__";function fl(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=$n&&r===void 0?Yi:r,this}var cl=fl;function bn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}bn.prototype.clear=Zo,bn.prototype.delete=ul,bn.prototype.get=Xi,bn.prototype.has=Vi,bn.prototype.set=cl;var On=bn;function En(){this.size=0,this.__data__={hash:new On,map:new(mn||we),string:new On}}var dl=En;function pl(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var Wi=pl;function hl(e,r){var t=e.__data__;return Wi(r)?t[typeof r=="string"?"string":"hash"]:t.map}var po=hl;function vl(e){var r=po(this,e).delete(e);return this.size-=r?1:0,r}var yl=vl;function xn(e){return po(this,e).get(e)}var Xr=xn;function gl(e){return po(this,e).has(e)}var ml=gl;function bl(e,r){var t=po(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var Sr=bl;function Sn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Sn.prototype.clear=dl,Sn.prototype.delete=yl,Sn.prototype.get=Xr,Sn.prototype.has=ml,Sn.prototype.set=Sr;var Xn=Sn,Ol=200;function ho(e,r){var t=this.__data__;if(t instanceof we){var n=t.__data__;if(!mn||n.length<Ol-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Xn(n)}return t.set(e,r),this.size=t.size,this}var vo=ho;function Pn(e){var r=this.__data__=new we(e);this.size=r.size}Pn.prototype.clear=Xe,Pn.prototype.delete=Zt,Pn.prototype.get=Hn,Pn.prototype.has=Di,Pn.prototype.set=vo;var Tn=Pn,Pr="__lodash_hash_undefined__";function Un(e){return this.__data__.set(e,Pr),this}var Tr=Un;function hr(e){return this.__data__.has(e)}var Vn=hr;function Qt(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Xn;++r<t;)this.add(e[r])}Qt.prototype.add=Qt.prototype.push=Tr,Qt.prototype.has=Vn;var El=Qt;function xl(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}var Sl=xl;function Ki(e,r){return e.has(r)}var Dr=Ki,Pl=1,jr=2;function Zi(e,r,t,n,o,a){var s=t&Pl,p=e.length,g=r.length;if(p!=g&&!(s&&g>p))return!1;var E=a.get(e),T=a.get(r);if(E&&T)return E==r&&T==e;var D=-1,B=!0,G=t&jr?new El:void 0;for(a.set(e,r),a.set(r,e);++D<p;){var Z=e[D],ae=r[D];if(n)var se=s?n(ae,Z,D,r,e,a):n(Z,ae,D,e,r,a);if(se!==void 0){if(se)continue;B=!1;break}if(G){if(!Sl(r,function(le,Ae){if(!Dr(G,Ae)&&(Z===le||o(Z,le,t,n,a)))return G.push(Ae)})){B=!1;break}}else if(!(Z===ae||o(Z,ae,t,n,a))){B=!1;break}}return a.delete(e),a.delete(r),B}var Ji=Zi,Qo=xr.a.Uint8Array,$t=Qo;function Qi(e){var r=-1,t=Array(e.size);return e.forEach(function(n,o){t[++r]=[o,n]}),t}var Tl=Qi;function qi(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var lr=qi,ea=1,qo=2,ta="[object Boolean]",ra="[object Date]",Ml="[object Error]",na="[object Map]",wl="[object Number]",Al="[object RegExp]",vr="[object Set]",Mr="[object String]",Yn="[object Symbol]",Nl="[object ArrayBuffer]",oa="[object DataView]",yo=sr?sr.prototype:void 0,Wn=yo?yo.valueOf:void 0;function ia(e,r,t,n,o,a,s){switch(t){case oa:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Nl:return!(e.byteLength!=r.byteLength||!a(new $t(e),new $t(r)));case ta:case ra:case wl:return Kt(+e,+r);case Ml:return e.name==r.name&&e.message==r.message;case Al:case Mr:return e==r+"";case na:var p=Tl;case vr:var g=n&ea;if(p||(p=lr),e.size!=r.size&&!g)return!1;var E=s.get(e);if(E)return E==r;n|=qo,s.set(e,r);var T=Ji(p(e),p(r),n,o,a,s);return s.delete(e),T;case Yn:if(Wn)return Wn.call(e)==Wn.call(r)}return!1}var Dl=ia;function go(e,r){for(var t=-1,n=r.length,o=e.length;++t<n;)e[o+t]=r[t];return e}var ei=go,aa=Array.isArray,d=aa;function h(e,r,t){var n=r(e);return d(e)?n:ei(n,t(e))}var O=h;function N(e,r){for(var t=-1,n=e==null?0:e.length,o=0,a=[];++t<n;){var s=e[t];r(s,t,e)&&(a[o++]=s)}return a}var F=N;function W(){return[]}var fe=W,Te=Object.prototype,ke=Te.propertyIsEnumerable,ft=Object.getOwnPropertySymbols,ct=ft?function(e){return e==null?[]:(e=Object(e),F(ft(e),function(r){return ke.call(e,r)}))}:fe,Ot=ct;function xt(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var _t=xt;function Xt(e){return e!=null&&typeof e=="object"}var Mt=Xt,yr="[object Arguments]";function Mn(e){return Mt(e)&&kr(e)==yr}var ua=Mn,sa=Object.prototype,la=sa.hasOwnProperty,fa=sa.propertyIsEnumerable,ti=ua(function(){return arguments}())?ua:function(e){return Mt(e)&&la.call(e,"callee")&&!fa.call(e,"callee")},wn=ti,sn=i(48),sb=9007199254740991,lb=/^(?:0|[1-9]\d*)$/;function fb(e,r){var t=typeof e;return r=r??sb,!!r&&(t=="number"||t!="symbol"&&lb.test(e))&&e>-1&&e%1==0&&e<r}var ca=fb,cb=9007199254740991;function db(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cb}var jl=db,pb="[object Arguments]",hb="[object Array]",vb="[object Boolean]",yb="[object Date]",gb="[object Error]",mb="[object Function]",bb="[object Map]",Ob="[object Number]",Eb="[object Object]",xb="[object RegExp]",Sb="[object Set]",Pb="[object String]",Tb="[object WeakMap]",Mb="[object ArrayBuffer]",wb="[object DataView]",Ab="[object Float32Array]",Nb="[object Float64Array]",Db="[object Int8Array]",jb="[object Int16Array]",Cb="[object Int32Array]",Rb="[object Uint8Array]",Ib="[object Uint8ClampedArray]",_b="[object Uint16Array]",Bb="[object Uint32Array]",Nt={};Nt[Ab]=Nt[Nb]=Nt[Db]=Nt[jb]=Nt[Cb]=Nt[Rb]=Nt[Ib]=Nt[_b]=Nt[Bb]=!0,Nt[pb]=Nt[hb]=Nt[Mb]=Nt[vb]=Nt[wb]=Nt[yb]=Nt[gb]=Nt[mb]=Nt[bb]=Nt[Ob]=Nt[Eb]=Nt[xb]=Nt[Sb]=Nt[Pb]=Nt[Tb]=!1;function Lb(e){return Mt(e)&&jl(e.length)&&!!Nt[kr(e)]}var zb=Lb;function Fb(e){return function(r){return e(r)}}var Cl=Fb,mo=i(49),ad=mo.a&&mo.a.isTypedArray,Hb=ad?Cl(ad):zb,Rl=Hb,Gb=Object.prototype,kb=Gb.hasOwnProperty;function $b(e,r){var t=d(e),n=!t&&wn(e),o=!t&&!n&&Object(sn.a)(e),a=!t&&!n&&!o&&Rl(e),s=t||n||o||a,p=s?_t(e.length,String):[],g=p.length;for(var E in e)(r||kb.call(e,E))&&!(s&&(E=="length"||o&&(E=="offset"||E=="parent")||a&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||ca(E,g)))&&p.push(E);return p}var ud=$b,Xb=Object.prototype;function Ub(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Xb;return e===t}var da=Ub;function Vb(e,r){return function(t){return e(r(t))}}var sd=Vb,Yb=sd(Object.keys,Object),Wb=Yb,Kb=Object.prototype,Zb=Kb.hasOwnProperty;function Jb(e){if(!da(e))return Wb(e);var r=[];for(var t in Object(e))Zb.call(e,t)&&t!="constructor"&&r.push(t);return r}var Qb=Jb;function qb(e){return e!=null&&jl(e.length)&&!fo(e)}var Kn=qb;function eO(e){return Kn(e)?ud(e):Qb(e)}var bo=eO;function tO(e){return O(e,bo,Ot)}var Il=tO,rO=1,nO=Object.prototype,oO=nO.hasOwnProperty;function iO(e,r,t,n,o,a){var s=t&rO,p=Il(e),g=p.length,E=Il(r),T=E.length;if(g!=T&&!s)return!1;for(var D=g;D--;){var B=p[D];if(!(s?B in r:oO.call(r,B)))return!1}var G=a.get(e),Z=a.get(r);if(G&&Z)return G==r&&Z==e;var ae=!0;a.set(e,r),a.set(r,e);for(var se=s;++D<g;){B=p[D];var le=e[B],Ae=r[B];if(n)var ge=s?n(Ae,le,B,r,e,a):n(le,Ae,B,e,r,a);if(!(ge===void 0?le===Ae||o(le,Ae,t,n,a):ge)){ae=!1;break}se||(se=B=="constructor")}if(ae&&!se){var be=e.constructor,Fe=r.constructor;be!=Fe&&"constructor"in e&&"constructor"in r&&!(typeof be=="function"&&be instanceof be&&typeof Fe=="function"&&Fe instanceof Fe)&&(ae=!1)}return a.delete(e),a.delete(r),ae}var aO=iO,uO=Nr(xr.a,"DataView"),_l=uO,sO=Nr(xr.a,"Promise"),Bl=sO,lO=Nr(xr.a,"Set"),Ll=lO,fO=Nr(xr.a,"WeakMap"),zl=fO,ld="[object Map]",cO="[object Object]",fd="[object Promise]",cd="[object Set]",dd="[object WeakMap]",pd="[object DataView]",dO=Rt(_l),pO=Rt(mn),hO=Rt(Bl),vO=Rt(Ll),yO=Rt(zl),Zn=kr;(_l&&Zn(new _l(new ArrayBuffer(1)))!=pd||mn&&Zn(new mn)!=ld||Bl&&Zn(Bl.resolve())!=fd||Ll&&Zn(new Ll)!=cd||zl&&Zn(new zl)!=dd)&&(Zn=function(e){var r=kr(e),t=r==cO?e.constructor:void 0,n=t?Rt(t):"";if(n)switch(n){case dO:return pd;case pO:return ld;case hO:return fd;case vO:return cd;case yO:return dd}return r});var ri=Zn,gO=1,hd="[object Arguments]",vd="[object Array]",pa="[object Object]",mO=Object.prototype,yd=mO.hasOwnProperty;function bO(e,r,t,n,o,a){var s=d(e),p=d(r),g=s?vd:ri(e),E=p?vd:ri(r);g=g==hd?pa:g,E=E==hd?pa:E;var T=g==pa,D=E==pa,B=g==E;if(B&&Object(sn.a)(e)){if(!Object(sn.a)(r))return!1;s=!0,T=!1}if(B&&!T)return a||(a=new Tn),s||Rl(e)?Ji(e,r,t,n,o,a):Dl(e,r,g,t,n,o,a);if(!(t&gO)){var G=T&&yd.call(e,"__wrapped__"),Z=D&&yd.call(r,"__wrapped__");if(G||Z){var ae=G?e.value():e,se=Z?r.value():r;return a||(a=new Tn),o(ae,se,t,n,a)}}return B?(a||(a=new Tn),aO(e,r,t,n,o,a)):!1}var OO=bO;function gd(e,r,t,n,o){return e===r?!0:e==null||r==null||!Mt(e)&&!Mt(r)?e!==e&&r!==r:OO(e,r,t,n,gd,o)}var Fl=gd,EO=1,xO=2;function SO(e,r,t,n){var o=t.length,a=o,s=!n;if(e==null)return!a;for(e=Object(e);o--;){var p=t[o];if(s&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++o<a;){p=t[o];var g=p[0],E=e[g],T=p[1];if(s&&p[2]){if(E===void 0&&!(g in e))return!1}else{var D=new Tn;if(n)var B=n(E,T,g,e,r,D);if(!(B===void 0?Fl(T,E,EO|xO,n,D):B))return!1}}return!0}var PO=SO;function TO(e){return e===e&&!Tt(e)}var md=TO;function MO(e){for(var r=bo(e),t=r.length;t--;){var n=r[t],o=e[n];r[t]=[n,o,md(o)]}return r}var wO=MO;function AO(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}var bd=AO;function NO(e){var r=wO(e);return r.length==1&&r[0][2]?bd(r[0][0],r[0][1]):function(t){return t===e||PO(t,e,r)}}var DO=NO,jO="[object Symbol]";function CO(e){return typeof e=="symbol"||Mt(e)&&kr(e)==jO}var ha=CO,RO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IO=/^\w*$/;function _O(e,r){if(d(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||ha(e)?!0:IO.test(e)||!RO.test(e)||r!=null&&e in Object(r)}var Hl=_O,BO="Expected a function";function Gl(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(BO);var t=function(){var n=arguments,o=r?r.apply(this,n):n[0],a=t.cache;if(a.has(o))return a.get(o);var s=e.apply(this,n);return t.cache=a.set(o,s)||a,s};return t.cache=new(Gl.Cache||Xn),t}Gl.Cache=Xn;var LO=Gl,zO=500;function FO(e){var r=LO(e,function(n){return t.size===zO&&t.clear(),n}),t=r.cache;return r}var HO=FO,GO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kO=/\\(\\)?/g,$O=HO(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(GO,function(t,n,o,a){r.push(o?a.replace(kO,"$1"):n||t)}),r}),XO=$O,UO=1/0,Od=sr?sr.prototype:void 0,Ed=Od?Od.toString:void 0;function xd(e){if(typeof e=="string")return e;if(d(e))return St(e,xd)+"";if(ha(e))return Ed?Ed.call(e):"";var r=e+"";return r=="0"&&1/e==-UO?"-0":r}var VO=xd;function YO(e){return e==null?"":VO(e)}var WO=YO;function KO(e,r){return d(e)?e:Hl(e,r)?[e]:XO(WO(e))}var va=KO,ZO=1/0;function JO(e){if(typeof e=="string"||ha(e))return e;var r=e+"";return r=="0"&&1/e==-ZO?"-0":r}var ni=JO;function QO(e,r){r=va(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[ni(r[t++])];return t&&t==n?e:void 0}var kl=QO;function qO(e,r,t){var n=e==null?void 0:kl(e,r);return n===void 0?t:n}var Sd=qO;function eE(e,r){return e!=null&&r in Object(e)}var tE=eE;function rE(e,r,t){r=va(r,e);for(var n=-1,o=r.length,a=!1;++n<o;){var s=ni(r[n]);if(!(a=e!=null&&t(e,s)))break;e=e[s]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&jl(o)&&ca(s,o)&&(d(e)||wn(e)))}var nE=rE;function oE(e,r){return e!=null&&nE(e,r,tE)}var Pd=oE,iE=1,aE=2;function uE(e,r){return Hl(e)&&md(r)?bd(ni(e),r):function(t){var n=Sd(t,e);return n===void 0&&n===r?Pd(t,e):Fl(r,n,iE|aE)}}var sE=uE;function lE(e){return e}var $l=lE;function fE(e){return function(r){return r==null?void 0:r[e]}}var cE=fE;function dE(e){return function(r){return kl(r,e)}}var pE=dE;function hE(e){return Hl(e)?cE(ni(e)):pE(e)}var vE=hE;function yE(e){return typeof e=="function"?e:e==null?$l:typeof e=="object"?d(e)?sE(e[0],e[1]):DO(e):vE(e)}var gE=yE;function mE(e){return function(r,t,n){for(var o=-1,a=Object(r),s=n(r),p=s.length;p--;){var g=s[e?p:++o];if(t(a[g],g,a)===!1)break}return r}}var bE=mE,OE=bE(),Td=OE;function EE(e,r){return e&&Td(e,r,bo)}var xE=EE;function SE(e,r){return function(t,n){if(t==null)return t;if(!Kn(t))return e(t,n);for(var o=t.length,a=r?o:-1,s=Object(t);(r?a--:++a<o)&&n(s[a],a,s)!==!1;);return t}}var PE=SE,TE=PE(xE),ME=TE;function wE(e,r){var t=-1,n=Kn(e)?Array(e.length):[];return ME(e,function(o,a,s){n[++t]=r(o,a,s)}),n}var AE=wE;function NE(e,r){var t=d(e)?St:AE;return t(e,gE(r))}var ya=NE,DE=function(){try{var e=Nr(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ga=DE;function jE(e,r,t){r=="__proto__"&&ga?ga(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var Xl=jE,CE=Object.prototype,RE=CE.hasOwnProperty;function IE(e,r,t){var n=e[r];(!(RE.call(e,r)&&Kt(n,t))||t===void 0&&!(r in e))&&Xl(e,r,t)}var ma=IE;function _E(e,r,t,n){var o=!t;t||(t={});for(var a=-1,s=r.length;++a<s;){var p=r[a],g=n?n(t[p],e[p],p,t,e):void 0;g===void 0&&(g=e[p]),o?Xl(t,p,g):ma(t,p,g)}return t}var Oo=_E;function BE(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}var LE=BE,Md=Math.max;function zE(e,r,t){return r=Md(r===void 0?e.length-1:r,0),function(){for(var n=arguments,o=-1,a=Md(n.length-r,0),s=Array(a);++o<a;)s[o]=n[r+o];o=-1;for(var p=Array(r+1);++o<r;)p[o]=n[o];return p[r]=t(s),LE(e,this,p)}}var wd=zE;function FE(e){return function(){return e}}var HE=FE,GE=ga?function(e,r){return ga(e,"toString",{configurable:!0,enumerable:!1,value:HE(r),writable:!0})}:$l,kE=GE,$E=800,XE=16,UE=Date.now;function VE(e){var r=0,t=0;return function(){var n=UE(),o=XE-(n-t);if(t=n,o>0){if(++r>=$E)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var YE=VE,WE=YE(kE),Ad=WE;function KE(e,r){return Ad(wd(e,r,$l),e+"")}var ZE=KE;function JE(e,r,t){if(!Tt(t))return!1;var n=typeof r;return(n=="number"?Kn(t)&&ca(r,t.length):n=="string"&&r in t)?Kt(t[r],e):!1}var QE=JE;function qE(e){return ZE(function(r,t){var n=-1,o=t.length,a=o>1?t[o-1]:void 0,s=o>2?t[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,s&&QE(t[0],t[1],s)&&(a=o<3?void 0:a,o=1),r=Object(r);++n<o;){var p=t[n];p&&e(r,p,n,a)}return r})}var Nd=qE,ex=Object.prototype,tx=ex.hasOwnProperty,rx=Nd(function(e,r){if(da(r)||Kn(r)){Oo(r,bo(r),e);return}for(var t in r)tx.call(r,t)&&ma(e,t,r[t])}),nr=rx;function nx(e,r,t,n){if(!Tt(e))return e;r=va(r,e);for(var o=-1,a=r.length,s=a-1,p=e;p!=null&&++o<a;){var g=ni(r[o]),E=t;if(g==="__proto__"||g==="constructor"||g==="prototype")return e;if(o!=s){var T=p[g];E=n?n(T,g,p):void 0,E===void 0&&(E=Tt(T)?T:ca(r[o+1])?[]:{})}ma(p,g,E),p=p[g]}return e}var ox=nx;function ix(e,r,t){for(var n=-1,o=r.length,a={};++n<o;){var s=r[n],p=kl(e,s);t(p,s)&&ox(a,va(s,e),p)}return a}var ax=ix;function ux(e,r){return ax(e,r,function(t,n){return Pd(e,n)})}var sx=ux,Dd=sr?sr.isConcatSpreadable:void 0;function lx(e){return d(e)||wn(e)||!!(Dd&&e&&e[Dd])}var fx=lx;function jd(e,r,t,n,o){var a=-1,s=e.length;for(t||(t=fx),o||(o=[]);++a<s;){var p=e[a];r>0&&t(p)?r>1?jd(p,r-1,t,n,o):ei(o,p):n||(o[o.length]=p)}return o}var cx=jd;function dx(e){var r=e==null?0:e.length;return r?cx(e,1):[]}var px=dx;function hx(e){return Ad(wd(e,void 0,px),e+"")}var vx=hx,yx=vx(function(e,r){return e==null?{}:sx(e,r)}),oi=yx,It,Cd,Rd,Id,_d,Bd,Ld,zd,Fd,Hd,Gd,kd,$d,Xd,Ud,Vd,Yd,Wd;function Yt(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function gx(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Kd(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mx(e,r,t){return r&&Kd(e.prototype,r),t&&Kd(e,t),e}function Zd(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ut(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var bx={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},Ul=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],Jd=(It=function(){function e(r){gx(this,e),Yt(this,"isSilentMode",Cd,this),Yt(this,"stopZoomGraph",Rd,this),Yt(this,"stopScrollGraph",Id,this),Yt(this,"stopMoveGraph",_d,this),Yt(this,"adjustEdge",Bd,this),Yt(this,"adjustEdgeMiddle",Ld,this),Yt(this,"adjustEdgeStartAndEnd",zd,this),Yt(this,"adjustNodePosition",Fd,this),Yt(this,"hideAnchors",Hd,this),Yt(this,"hoverOutline",Gd,this),Yt(this,"nodeSelectedOutline",kd,this),Yt(this,"edgeSelectedOutline",$d,this),Yt(this,"nodeTextEdit",Xd,this),Yt(this,"edgeTextEdit",Ud,this),Yt(this,"nodeTextDraggable",Vd,this),Yt(this,"edgeTextDraggable",Yd,this),Yt(this,"autoExpand",Wd,this),Zd(this,"multipleSelectKey",""),Zd(this,"defaultConfig",{}),nr(this,this.getConfigDetail(r))}return mx(e,[{key:"updateEditConfig",value:function(t){var n=this.getConfigDetail(t);nr(this,n)}},{key:"getConfigDetail",value:function(t){var n=t.isSilentMode,o=t.textEdit,a={};if(n===!1&&nr(a,this.defaultConfig),n===!0){var s=oi(bx,Ul);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},nr(a,s)}o===!1&&nr(a,{nodeTextEdit:!1,edgeTextEdit:!1});var p=oi(t,Ul);return nr(a,p)}},{key:"getConfig",value:function(){return oi(this,Ul)}}]),e}(),Cd=Ut(It.prototype,"isSilentMode",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rd=Ut(It.prototype,"stopZoomGraph",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Id=Ut(It.prototype,"stopScrollGraph",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_d=Ut(It.prototype,"stopMoveGraph",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Bd=Ut(It.prototype,"adjustEdge",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ld=Ut(It.prototype,"adjustEdgeMiddle",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zd=Ut(It.prototype,"adjustEdgeStartAndEnd",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fd=Ut(It.prototype,"adjustNodePosition",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hd=Ut(It.prototype,"hideAnchors",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gd=Ut(It.prototype,"hoverOutline",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),kd=Ut(It.prototype,"nodeSelectedOutline",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),$d=Ut(It.prototype,"edgeSelectedOutline",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xd=Ut(It.prototype,"nodeTextEdit",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ud=Ut(It.prototype,"edgeTextEdit",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vd=Ut(It.prototype,"nodeTextDraggable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yd=Ut(It.prototype,"edgeTextDraggable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wd=Ut(It.prototype,"autoExpand",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ut(It.prototype,"updateEditConfig",[f.k],Object.getOwnPropertyDescriptor(It.prototype,"updateEditConfig"),It.prototype),It);i(77);var Et;(function(e){e[e.DEFAULT=1]="DEFAULT",e[e.TEXT_EDIT=2]="TEXT_EDIT",e[e.SHOW_MENU=3]="SHOW_MENU",e[e.ALLOW_CONNECT=4]="ALLOW_CONNECT",e[e.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"})(Et||(Et={}));var Qd;(function(e){e.KEY="logic-flow",e.NODE_NAME="lf-node",e.EDGE_NAME="lf-edge"})(Qd||(Qd={}));var pt;(function(e){e.NODE="node",e.CIRCLE_NODE="circle-node",e.POLYGON_NODE="polygon-node",e.RECT_NODE="rect-node",e.TEXT_NODE="text-node",e.ELLIPSE_NODE="ellipse-node",e.DIAMOND_NODE="diamond-node",e.HTML_NODE="html-node",e.EDGE="edge",e.LINE_EDGE="line-edge",e.POLYLINE_EDGE="polyline-edge",e.BEZIER_EDGE="bezier-edge",e.GRAPH="graph"})(pt||(pt={}));var Ht;(function(e){e.NODE="node",e.EDGE="edge",e.GRAPH="graph"})(Ht||(Ht={}));var it;(function(e){e.ELEMENT_CLICK="element:click",e.NODE_CLICK="node:click",e.NODE_DBCLICK="node:dbclick",e.NODE_DELETE="node:delete",e.NODE_ADD="node:add",e.NODE_DND_ADD="node:dnd-add",e.NODE_DND_DRAG="node:dnd-drag",e.NODE_MOUSEDOWN="node:mousedown",e.NODE_DRAGSTART="node:dragstart",e.NODE_DRAG="node:drag",e.NODE_DROP="node:drop",e.NODE_MOUSEUP="node:mouseup",e.NODE_MOUSEMOVE="node:mousemove",e.NODE_MOUSEENTER="node:mouseenter",e.NODE_MOUSELEAVE="node:mouseleave",e.NODE_CONTEXTMENU="node:contextmenu",e.EDGE_DELETE="edge:delete",e.EDGE_ADD="edge:add",e.EDGE_CLICK="edge:click",e.EDGE_DBCLICK="edge:dbclick",e.EDGE_MOUSEENTER="edge:mouseenter",e.EDGE_MOUSELEAVE="edge:mouseleave",e.EDGE_CONTEXTMENU="edge:contextmenu",e.EDGE_ADJUST="edge:adjust",e.EDGE_EXCHANGE_NODE="edge:exchange-node",e.ANCHOR_DRAGSTART="anchor:dragstart",e.ANCHOR_DRAG="anchor:drag",e.ANCHOR_DROP="anchor:drop",e.ANCHOR_DRAGEND="anchor:dragend",e.BLANK_MOUSEDOWN="blank:mousedown",e.BLANK_DRAGSTART="blank:dragstart",e.BLANK_DRAG="blank:drag",e.BLANK_DROP="blank:drop",e.BLANK_MOUSEMOVE="blank:mousemove",e.BLANK_MOUSEUP="blank:mouseup",e.BLANK_CLICK="blank:click",e.BLANK_CONTEXTMENU="blank:contextmenu",e.SELECTION_MOUSEDOWN="selection:mousedown",e.SELECTION_DRAGSTART="selection:dragstart",e.SELECTION_DRAG="selection:drag",e.SELECTION_DROP="selection:drop",e.SELECTION_MOUSEMOVE="selection:mousemove",e.SELECTION_MOUSEUP="selection:mouseup",e.SELECTION_CONTEXTMENU="selection:contextmenu",e.CONNECTION_NOT_ALLOWED="connection:not-allowed",e.HISTORY_CHANGE="history:change",e.TEXT_UPDATE="text:update",e.GRAPH_TRANSFORM="graph:transform",e.GRAPH_RENDERED="graph:rendered"})(it||(it={}));var Dt;(function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"})(Dt||(Dt={}));var Ox=9999,gr;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.INCREASE=1]="INCREASE"})(gr||(gr={}));var Bt,qd,ep,tp,rp,np,op,ip;function ba(e,r){return Px(e)||Sx(e,r)||xx(e,r)||Ex()}function Ex(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xx(e,r){if(e){if(typeof e=="string")return ap(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ap(e,r)}}function ap(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Sx(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function Px(e){if(Array.isArray(e))return e}function Jn(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function Tx(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function up(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mx(e,r,t){return r&&up(e.prototype,r),t&&up(e,t),e}function Vl(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Cr(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var wx=(Bt=function(){function e(r){Tx(this,e),Vl(this,"MINI_SCALE_SIZE",.2),Vl(this,"MAX_SCALE_SIZE",16),Jn(this,"SCALE_X",qd,this),Jn(this,"SKEW_Y",ep,this),Jn(this,"SKEW_X",tp,this),Jn(this,"SCALE_Y",rp,this),Jn(this,"TRANSLATE_X",np,this),Jn(this,"TRANSLATE_Y",op,this),Jn(this,"ZOOM_SIZE",ip,this),Vl(this,"eventCenter",void 0),this.eventCenter=r}return Mx(e,[{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 n=ba(t,2),o=n[0],a=n[1];return[(o-this.TRANSLATE_X)/this.SCALE_X,(a-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var n=ba(t,2),o=n[0],a=n[1];return[o*this.SCALE_X+this.TRANSLATE_X,a*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,n,o){var a=ba(t,2),s=a[0],p=a[1];return[s+n/this.SCALE_X,p+o/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,n){return[t/this.SCALE_X,n/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&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1?arguments[1]:void 0,o=this.SCALE_X,a=this.SCALE_Y;return t===!0?(o+=this.ZOOM_SIZE,a+=this.ZOOM_SIZE):t===!1?(o-=this.ZOOM_SIZE,a-=this.ZOOM_SIZE):typeof t=="number"&&(o=t,a=t),o<this.MINI_SCALE_SIZE||o>this.MAX_SCALE_SIZE?"".concat(this.SCALE_X*100,"%"):(n&&(this.TRANSLATE_X-=(o-this.SCALE_X)*n[0],this.TRANSLATE_Y-=(a-this.SCALE_Y)*n[1]),this.SCALE_X=o,this.SCALE_Y=a,this.emitGraphTransform("zoom"),"".concat(this.SCALE_X*100,"%"))}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(it.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,n){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=n,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,n,o,a){var s=this.CanvasPointToHtmlPoint([t,n]),p=ba(s,2),g=p[0],E=p[1],T=o/2-g,D=a/2-E;this.TRANSLATE_X+=T,this.TRANSLATE_Y+=D,this.emitGraphTransform("focusOn")}}]),e}(),qd=Cr(Bt.prototype,"SCALE_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ep=Cr(Bt.prototype,"SKEW_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),tp=Cr(Bt.prototype,"SKEW_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),rp=Cr(Bt.prototype,"SCALE_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),np=Cr(Bt.prototype,"TRANSLATE_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),op=Cr(Bt.prototype,"TRANSLATE_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ip=Cr(Bt.prototype,"ZOOM_SIZE",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Cr(Bt.prototype,"zoom",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"zoom"),Bt.prototype),Cr(Bt.prototype,"resetZoom",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"resetZoom"),Bt.prototype),Cr(Bt.prototype,"translate",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"translate"),Bt.prototype),Cr(Bt.prototype,"focusOn",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"focusOn"),Bt.prototype),Bt);function Ax(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var Nx=Ax;function Dx(e,r){return e&&Oo(r,bo(r),e)}var jx=Dx;function Cx(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var Rx=Cx,Ix=Object.prototype,_x=Ix.hasOwnProperty;function Bx(e){if(!Tt(e))return Rx(e);var r=da(e),t=[];for(var n in e)n=="constructor"&&(r||!_x.call(e,n))||t.push(n);return t}var Lx=Bx;function zx(e){return Kn(e)?ud(e,!0):Lx(e)}var ii=zx;function Fx(e,r){return e&&Oo(r,ii(r),e)}var Hx=Fx,sp=i(106);function Gx(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var lp=Gx;function kx(e,r){return Oo(e,Ot(e),r)}var $x=kx,Xx=sd(Object.getPrototypeOf,Object),Yl=Xx,Ux=Object.getOwnPropertySymbols,Vx=Ux?function(e){for(var r=[];e;)ei(r,Ot(e)),e=Yl(e);return r}:fe,fp=Vx;function Yx(e,r){return Oo(e,fp(e),r)}var Wx=Yx;function Kx(e){return O(e,ii,fp)}var Zx=Kx,Jx=Object.prototype,Qx=Jx.hasOwnProperty;function qx(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&Qx.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var eS=qx;function tS(e){var r=new e.constructor(e.byteLength);return new $t(r).set(new $t(e)),r}var Wl=tS;function rS(e,r){var t=r?Wl(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var nS=rS,oS=/\w*$/;function iS(e){var r=new e.constructor(e.source,oS.exec(e));return r.lastIndex=e.lastIndex,r}var aS=iS,cp=sr?sr.prototype:void 0,dp=cp?cp.valueOf:void 0;function uS(e){return dp?Object(dp.call(e)):{}}var sS=uS;function lS(e,r){var t=r?Wl(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var pp=lS,fS="[object Boolean]",cS="[object Date]",dS="[object Map]",pS="[object Number]",hS="[object RegExp]",vS="[object Set]",yS="[object String]",gS="[object Symbol]",mS="[object ArrayBuffer]",bS="[object DataView]",OS="[object Float32Array]",ES="[object Float64Array]",xS="[object Int8Array]",SS="[object Int16Array]",PS="[object Int32Array]",TS="[object Uint8Array]",MS="[object Uint8ClampedArray]",wS="[object Uint16Array]",AS="[object Uint32Array]";function NS(e,r,t){var n=e.constructor;switch(r){case mS:return Wl(e);case fS:case cS:return new n(+e);case bS:return nS(e,t);case OS:case ES:case xS:case SS:case PS:case TS:case MS:case wS:case AS:return pp(e,t);case dS:return new n;case pS:case yS:return new n(e);case hS:return aS(e);case vS:return new n;case gS:return sS(e)}}var DS=NS,hp=Object.create,jS=function(){function e(){}return function(r){if(!Tt(r))return{};if(hp)return hp(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),CS=jS;function RS(e){return typeof e.constructor=="function"&&!da(e)?CS(Yl(e)):{}}var vp=RS,IS="[object Map]";function _S(e){return Mt(e)&&ri(e)==IS}var BS=_S,yp=mo.a&&mo.a.isMap,LS=yp?Cl(yp):BS,zS=LS,FS="[object Set]";function HS(e){return Mt(e)&&ri(e)==FS}var GS=HS,gp=mo.a&&mo.a.isSet,kS=gp?Cl(gp):GS,$S=kS,XS=1,US=2,VS=4,mp="[object Arguments]",YS="[object Array]",WS="[object Boolean]",KS="[object Date]",ZS="[object Error]",bp="[object Function]",JS="[object GeneratorFunction]",QS="[object Map]",qS="[object Number]",Op="[object Object]",e0="[object RegExp]",t0="[object Set]",r0="[object String]",n0="[object Symbol]",o0="[object WeakMap]",i0="[object ArrayBuffer]",a0="[object DataView]",u0="[object Float32Array]",s0="[object Float64Array]",l0="[object Int8Array]",f0="[object Int16Array]",c0="[object Int32Array]",d0="[object Uint8Array]",p0="[object Uint8ClampedArray]",h0="[object Uint16Array]",v0="[object Uint32Array]",wt={};wt[mp]=wt[YS]=wt[i0]=wt[a0]=wt[WS]=wt[KS]=wt[u0]=wt[s0]=wt[l0]=wt[f0]=wt[c0]=wt[QS]=wt[qS]=wt[Op]=wt[e0]=wt[t0]=wt[r0]=wt[n0]=wt[d0]=wt[p0]=wt[h0]=wt[v0]=!0,wt[ZS]=wt[bp]=wt[o0]=!1;function Oa(e,r,t,n,o,a){var s,p=r&XS,g=r&US,E=r&VS;if(t&&(s=o?t(e,n,o,a):t(e)),s!==void 0)return s;if(!Tt(e))return e;var T=d(e);if(T){if(s=eS(e),!p)return lp(e,s)}else{var D=ri(e),B=D==bp||D==JS;if(Object(sn.a)(e))return Object(sp.a)(e,p);if(D==Op||D==mp||B&&!o){if(s=g||B?{}:vp(e),!p)return g?Wx(e,Hx(s,e)):$x(e,jx(s,e))}else{if(!wt[D])return o?e:{};s=DS(e,D,p)}}a||(a=new Tn);var G=a.get(e);if(G)return G;a.set(e,s),$S(e)?e.forEach(function(se){s.add(Oa(se,r,t,se,e,a))}):zS(e)&&e.forEach(function(se,le){s.set(le,Oa(se,r,t,le,e,a))});var Z=E?g?Zx:Il:g?ii:bo,ae=T?void 0:Z(e);return Nx(ae||e,function(se,le){ae&&(le=se,se=e[le]),ma(s,le,Oa(se,r,t,le,e,a))}),s}var y0=Oa,g0=1,m0=4;function b0(e){return y0(e,g0|m0)}var jt=b0;function O0(e,r,t){(t!==void 0&&!Kt(e[r],t)||t===void 0&&!(r in e))&&Xl(e,r,t)}var Kl=O0;function E0(e){return Mt(e)&&Kn(e)}var x0=E0,S0="[object Object]",P0=Function.prototype,T0=Object.prototype,Ep=P0.toString,M0=T0.hasOwnProperty,w0=Ep.call(Object);function A0(e){if(!Mt(e)||kr(e)!=S0)return!1;var r=Yl(e);if(r===null)return!0;var t=M0.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Ep.call(t)==w0}var N0=A0;function D0(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var Zl=D0;function j0(e){return Oo(e,ii(e))}var C0=j0;function R0(e,r,t,n,o,a,s){var p=Zl(e,t),g=Zl(r,t),E=s.get(g);if(E){Kl(e,t,E);return}var T=a?a(p,g,t+"",e,r,s):void 0,D=T===void 0;if(D){var B=d(g),G=!B&&Object(sn.a)(g),Z=!B&&!G&&Rl(g);T=g,B||G||Z?d(p)?T=p:x0(p)?T=lp(p):G?(D=!1,T=Object(sp.a)(g,!0)):Z?(D=!1,T=pp(g,!0)):T=[]:N0(g)||wn(g)?(T=p,wn(p)?T=C0(p):(!Tt(p)||fo(p))&&(T=vp(g))):D=!1}D&&(s.set(g,T),o(T,g,n,a,s),s.delete(g)),Kl(e,t,T)}var I0=R0;function xp(e,r,t,n,o){e!==r&&Td(r,function(a,s){if(o||(o=new Tn),Tt(a))I0(e,r,s,t,xp,n,o);else{var p=n?n(Zl(e,s),a,s+"",e,r,o):void 0;p===void 0&&(p=a),Kl(e,s,p)}},ii)}var _0=xp,B0=Nd(function(e,r,t){_0(e,r,t)}),Sp=B0,L0={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:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"}},Pp=function(r){var t=jt(L0);return r&&(t=Sp(t,r)),t};i(78),i(158);function z0(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Tp(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function F0(e,r,t){return r&&Tp(e.prototype,r),t&&Tp(e,t),e}function H0(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var G0="*",k0=function(){function e(){z0(this,e),H0(this,"_events",{})}return F0(e,[{key:"on",value:function(t,n,o){var a=this;return t==null||t.split(",").forEach(function(s){s=s.trim(),a._events[s]||(a._events[s]=[]),a._events[s].push({callback:n,once:!!o})}),this}},{key:"once",value:function(t,n){var o=this;t==null||t.split(",").forEach(function(a){return a=a.trim(),o.on(a,n,!0)})}},{key:"emit",value:function(t,n){var o=this;t==null||t.split(",").forEach(function(a){var s=o._events[a]||[],p=o._events[G0]||[],g=function(T){for(var D=T.length,B=0;B<D;B++)if(T[B]){var G=T[B],Z=G.callback,ae=G.once;ae&&(T.splice(B,1),T.length===0&&delete o._events[a],D--,B--),Z.apply(o,[n])}};g(s),g(p)})}},{key:"off",value:function(t,n){var o=this;return t||(this._events={}),t.split(",").forEach(function(a){if(!n)delete o._events[a];else{for(var s=o._events[a]||[],p=s.length,g=0;g<p;g++)s[g].callback===n&&(s.splice(g,1),p--,g--);s.length===0&&delete o._events[a]}}),this}},{key:"getEvents",value:function(){return this._events}}]),e}();function An(e,r){return r*Math.round(e/r)||e}function Mp(e,r){return e%r}function Jl(e,r){return V0(e)||U0(e,r)||X0(e,r)||$0()}function $0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X0(e,r){if(e){if(typeof e=="string")return wp(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return wp(e,r)}}function wp(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function U0(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function V0(e){if(Array.isArray(e))return e}var Ql=function(r,t,n){var o=Jl(r,2),a=o[0],s=o[1],p=Jl(t,2),g=p[0],E=p[1],T=Jl(n,2),D=T[0],B=T[1];return a>g&&a<D&&s>E&&s<B},Ap=function(r,t){var n=t.multipleSelectKey,o=!1;switch(n){case"meta":o=r.metaKey;break;case"alt":o=r.altKey;break;case"shift":o=r.shiftKey;break;case"ctrl":o=r.ctrlKey;break;default:o=!1;break}return o};i(79),i(161),i(125),i(80),i(30),i(12),i(13),i(14),i(47);var Ea,Y0=new Uint8Array(16);function W0(){if(!Ea&&(Ea=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ea))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ea(Y0)}var K0=/^(?:[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;function Z0(e){return typeof e=="string"&&K0.test(e)}for(var J0=Z0,Wt=[],ql=0;ql<256;++ql)Wt.push((ql+256).toString(16).substr(1));function Q0(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Wt[e[r+0]]+Wt[e[r+1]]+Wt[e[r+2]]+Wt[e[r+3]]+"-"+Wt[e[r+4]]+Wt[e[r+5]]+"-"+Wt[e[r+6]]+Wt[e[r+7]]+"-"+Wt[e[r+8]]+Wt[e[r+9]]+"-"+Wt[e[r+10]]+Wt[e[r+11]]+Wt[e[r+12]]+Wt[e[r+13]]+Wt[e[r+14]]+Wt[e[r+15]]).toLowerCase();if(!J0(t))throw TypeError("Stringified UUID is invalid");return t}var q0=Q0;function eP(e,r,t){e=e||{};var n=e.random||(e.rng||W0)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(var o=0;o<16;++o)r[t+o]=n[o];return r}return q0(n)}var ef=eP,Qn=function(){var r=ef();return r},tP=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=r.nodes.reduce(function(o,a){return o[a.id]=t+ef(),a.id=o[a.id],o},{});return r.edges.forEach(function(o){o.id=t+ef(),o.sourceNodeId=n[o.sourceNodeId],o.targetNodeId=n[o.targetNodeId]}),r};i(104),i(203);var rP=function(r,t,n,o){var a=(t.y-r.y)*(o.x-n.x)-(r.x-t.x)*(n.y-o.y);if(a===0)return!1;var s=((t.x-r.x)*(o.x-n.x)*(n.y-r.y)+(t.y-r.y)*(o.x-n.x)*r.x-(o.y-n.y)*(t.x-r.x)*n.x)/a,p=-((t.y-r.y)*(o.y-n.y)*(n.x-r.x)+(t.x-r.x)*(o.y-n.y)*r.y-(o.x-n.x)*(t.y-r.y)*n.y)/a;return(s-r.x)*(s-t.x)<=0&&(p-r.y)*(p-t.y)<=0&&(s-n.x)*(s-o.x)<=0&&(p-n.y)*(p-o.y)<=0?{x:s,y:p}:!1},ai=function(r,t,n){var o=r.x,a=r.y;return(o-t.x)*(o-n.x)<=0&&(a-t.y)*(a-n.y)<=0};function xa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xa=function(t){return typeof t}:xa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function Np(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Dp(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Np(Object(t),!0).forEach(function(n){nP(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Np(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nP(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var tf=function(r){var t=r.anchors;return t},Sa=function(r,t){for(var n=t.nodes,o,a=n.length-1;a>=0;a--){var s=n[a],p=aP(r,s);if(p){var g=iP(r,s);if(g){var E={node:s,anchorIndex:g.index,anchor:g.anchor};(!o||oP(s,o.node,t))&&(o=E)}}}return o},oP=function(r,t,n){return r.zIndex>t.zIndex||n.nodesMap[r.id].index>n.nodesMap[t.id].index},iP=function(r,t){for(var n=tf(t),o,a=Number.MAX_SAFE_INTEGER,s=0;s<n.length;s++){var p=Ur(r.x,r.y,n[s].x,n[s].y);p<a&&(a=p,o={index:s,anchor:Dp(Dp({},n[s]),{},{x:n[s].x,y:n[s].y,id:n[s].id})})}return o},Ur=function(r,t,n,o){return Math.hypot(r-n,t-o)},Nn=function(r,t){var n=!1,o=0,a=mr(t);return r.x>=a.minX-o&&r.x<=a.maxX+o&&r.y>=a.minY-o&&r.y<=a.maxY+o&&(n=!0),n},aP=function(r,t){var n=!1,o=5,a=mr(t);return r.x>=a.minX-o&&r.x<=a.maxX+o&&r.y>=a.minY-o&&r.y<=a.maxY+o&&(n=!0),n},mr=function(r){var t=r.x,n=r.y,o=r.width,a=r.height,s={minX:t-o/2,minY:n-a/2,maxX:t+o/2,maxY:n+a/2,x:t,y:n,width:o,height:a,centerX:t,centerY:n};return s},uP=function(r){var t=r,n=t.x,o=t.y,a=t.width,s=t.height,p=t.radius,g=[{x:n-a/2+p,y:o-s/2+p,r:p},{x:n+a/2-p,y:o-s/2+p,r:p},{x:n-a/2+p,y:o+s/2-p,r:p},{x:n+a/2-p,y:o+s/2-p,r:p}];return g},jp=function(r,t,n){var o=uP(n),a,s=Number.MAX_SAFE_INTEGER;o.forEach(function(g){var E=Ur(r.x,r.y,g.x,g.y);E<s&&(s=E,a=g)});var p=rf(r,t,a);return p},rf=function(r,t,n){var o,a=n,s=a.x,p=a.y,g=a.r;if(t===Dt.HORIZONTAL){var E=s-Math.sqrt(g*g-(r.y-p)*(r.y-p)),T=s+Math.sqrt(g*g-(r.y-p)*(r.y-p)),D=Math.abs(E-r.x)<Math.abs(T-r.x)?E:T;o={x:D,y:r.y}}else if(t===Dt.VERTICAL){var B=p-Math.sqrt(g*g-(r.x-s)*(r.x-s)),G=p+Math.sqrt(g*g-(r.x-s)*(r.x-s)),Z=Math.abs(B-r.y)<Math.abs(G-r.y)?B:G;o={x:r.x,y:Z}}return o},Cp=function(r,t){var n=t,o=!1,a={minX:n.x-n.width/2+n.radius,maxX:n.x+n.width/2-n.radius,minY:n.y-n.height/2+n.radius,maxY:n.y+n.height/2-n.radius},s=n.x,p=n.y,g=n.width,E=n.height;return r.y===p+E/2||r.y===p-E/2?o=r.x>a.minX&&r.x<a.maxX:(r.x===s+g/2||r.x===s-g/2)&&(o=r.y>a.minY&&r.y<a.maxY),o},Rp=function(r,t,n){var o,a=n,s=a.x,p=a.y,g=a.rx,E=a.ry;if(t===Dt.HORIZONTAL){var T=s-Math.sqrt(g*g-(r.y-p)*(r.y-p)*g*g/(E*E)),D=s+Math.sqrt(g*g-(r.y-p)*(r.y-p)*g*g/(E*E)),B=Math.abs(T-r.x)<Math.abs(D-r.x)?T:D;o={x:B,y:r.y}}else if(t===Dt.VERTICAL){var G=p-Math.sqrt(E*E-(r.x-s)*(r.x-s)*E*E/(g*g)),Z=p+Math.sqrt(E*E-(r.x-s)*(r.x-s)*E*E/(g*g)),ae=Math.abs(G-r.y)<Math.abs(Z-r.y)?G:Z;o={x:r.x,y:ae}}return o},Pa=function(r,t,n){for(var o=n,a=o.pointsPosition,s=Number.MAX_SAFE_INTEGER,p,g=[],E=0;E<a.length;E++)g.push({start:a[E],end:a[(E+1)%a.length]});return g.forEach(function(T){var D=T.start,B=T.end,G=D,Z=B;D.x>B.x&&(G=B,Z=D);var ae={x:r.x,y:r.y};if(G.x===Z.x&&t===Dt.HORIZONTAL&&(ae={x:G.x,y:r.y}),G.y===Z.y&&t===Dt.VERTICAL&&(ae={x:r.x,y:G.y}),G.x!==Z.x&&G.y!==Z.y){var se=(Z.y-G.y)/(Z.x-G.x),le=(G.x*Z.y-Z.x*G.y)/(G.x-Z.x);t===Dt.HORIZONTAL?ae={x:(r.y-le)/se,y:r.y}:t===Dt.VERTICAL&&(ae={x:r.x,y:se*r.x+le})}var Ae=ai(ae,D,B);if(Ae){var ge=Ur(ae.x,ae.y,r.x,r.y);ge<s&&(s=ge,p=ae)}}),p},sP=function(r){var t=oi(r,["id","type","x","y","text","properties","virtual"]);return t},Ip=function(r,t,n,o){var a=r.x,s=r.y;return t.x>r.x?a=r.x+n/2:t.x<r.x&&(a=r.x-n/2),t.y>r.y?s=r.y+o/2:t.y<r.y&&(s=r.y-o/2),{x:a,y:s}},_p=function(r){var t=r.rows,n=r.style,o=r.rowsLength,a=r.className,s=document.createElement("div");s.style.fontSize=n.fontSize,s.style.width=n.width,s.className=a,s.style.lineHeight=n.lineHeight,s.style.padding=n.padding,n.fontFamily&&(s.style.fontFamily=n.fontFamily),o>1?t.forEach(function(g){var E=document.createElement("div");E.textContent=g,s.appendChild(E)}):s.textContent=t,document.body.appendChild(s);var p=s.clientHeight;return document.body.removeChild(s),p},nf=function(r){var t=r.rows,n=r.rowsLength,o=r.fontSize,a=0;return t&&t.forEach(function(s){var p=Mh(s);a=p>a?p:a}),{width:Math.ceil(a/2)*o+o/4,height:n*(o+2)+o/4}},Ta=function(r){return xa(r)!=="object"?{isAllPass:!!r,msg:r?"":"不允许连接"}:r},Bp={node:!1,edge:!1},lP={node:!0,edge:!0},fP={stroke:"red",strokeDasharray:"10 200",className:"lf-edge-animation"},qt=function(r){try{return JSON.parse(JSON.stringify(r))}catch{return r}},cP=1e3,dP=999,of=function(){return++cP},pP=function(){return--dP},ye,Lp,zp,Fp,Hp,Gp,kp,$p,Xp,Up,Vp,Yp,Wp,Kp,Zp,Jp,Qp,qp,eh,th;function rh(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Rr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?rh(Object(t),!0).forEach(function(n){br(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Gt(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function hP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function nh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vP(e,r,t){return r&&nh(e.prototype,r),t&&nh(e,t),e}function br(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function et(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var af=(ye=function(){function e(r,t){hP(this,e),br(this,"id",Qn()),Gt(this,"type",Lp,this),Gt(this,"sourceNodeId",zp,this),Gt(this,"targetNodeId",Fp,this),Gt(this,"startPoint",Hp,this),Gt(this,"endPoint",Gp,this),Gt(this,"text",kp,this),Gt(this,"properties",$p,this),Gt(this,"points",Xp,this),Gt(this,"pointsList",Up,this),Gt(this,"isSelected",Vp,this),Gt(this,"isHovered",Yp,this),Gt(this,"isHitable",Wp,this),Gt(this,"draggable",Kp,this),Gt(this,"visible",Zp,this),br(this,"virtual",!1),Gt(this,"isAnimation",Jp,this),br(this,"graphModel",void 0),Gt(this,"zIndex",Qp,this),br(this,"BaseType",Ht.EDGE),br(this,"modelType",pt.EDGE),Gt(this,"state",qp,this),br(this,"additionStateData",void 0),br(this,"sourceAnchorId",""),br(this,"targetAnchorId",""),br(this,"menu",void 0),br(this,"customTextPosition",!1),br(this,"animationData",fP),Gt(this,"style",eh,this),Gt(this,"arrowConfig",th,this),this.graphModel=t,this.initEdgeData(r),this.setAttributes()}return vP(e,[{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var n=this.graphModel.idGenerator,o=n&&n(t.type);o&&(t.id=o);var a=this.createId();a&&(t.id=a)}nr(this,oT(t));var s=this.graphModel.overlapMode;s===gr.INCREASE&&(this.zIndex=t.zIndex||of()),this.setAnchors(),this.initPoints(),this.formatText(t)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return Rr(Rr({},this.graphModel.theme.baseEdge),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return jt(t)}},{key:"getAnimation",value:function(){var t=this.animationData;return jt(t)}},{key:"getEdgeAnimationStyle",value:function(){var t=this.graphModel.theme.edgeAnimation;return jt(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel,n=t.theme.outline;return jt(n)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var t,n;return(t=this.graphModel)===null||t===void 0||(n=t.nodesMap[this.sourceNodeId])===null||n===void 0?void 0:n.model}},{key:"targetNode",get:function(){var t,n;return(t=this.graphModel)===null||t===void 0||(n=t.nodesMap[this.targetNodeId])===null||n===void 0?void 0:n.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(t,n){var o,a,s=tf(t);return s.forEach(function(p){var g=Nh(p,n);a?g<a&&(a=g,o=p):(a=g,o=p)}),o}},{key:"getEndAnchor",value:function(t){var n=this,o,a,s=tf(t);return s.forEach(function(p){var g=Nh(p,n.startPoint);a?g<a&&(a=g,o=p):(a=g,o=p)}),o}},{key:"getProperties",value:function(){return Object(f.I)(this.properties)}},{key:"getData",value:function(){var t=this.text,n=t.x,o=t.y,a=t.value,s={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(f.I)(this.properties)};return a&&(s.text={x:n,y:o,value:a}),this.graphModel.overlapMode===gr.INCREASE&&(s.zIndex=this.zIndex),s}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,n){this.properties[t]=qt(n),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Rr(Rr({},this.properties),qt(t)),this.setAttributes()}},{key:"changeEdgeId",value:function(t){var n=this.arrowConfig,o=n.markerEnd,a=n.markerStart;a&&a==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(t,")")),o&&o==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(t,")")),this.id=t}},{key:"setStyle",value:function(t,n){this.style=Rr(Rr({},this.style),{},br({},t,qt(n)))}},{key:"setStyles",value:function(t){this.style=Rr(Rr({},this.style),qt(t))}},{key:"updateStyles",value:function(t){this.style=Rr({},qt(t))}},{key:"formatText",value:function(t){var n=this.textPosition,o=n.x,a=n.y;if(!t.text||typeof t.text=="string"){this.text={value:t.text||"",x:o,y:a,draggable:this.text.draggable,editable:this.text.editable};return}Object.prototype.toString.call(t.text)==="[object Object]"&&(this.text={x:t.text.x||o,y:t.text.y||a,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable})}},{key:"resetTextPosition",value:function(){var t=this.textPosition,n=t.x,o=t.y;this.text.x=n,this.text.y=o}},{key:"moveText",value:function(t,n){if(this.text){var o=this.text,a=o.x,s=o.y,p=o.value,g=o.draggable,E=o.editable;this.text={value:p,draggable:g,x:a+t,y:s+n,editable:E}}}},{key:"setText",value:function(t){t&&nr(this.text,t)}},{key:"updateText",value:function(t){this.text=Rr(Rr({},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 n=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:n.x,y:n.y}),this.targetAnchorId||(this.targetAnchorId=n.id)}}},{key:"setSelected",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isSelected=t}},{key:"setHovered",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHovered=t}},{key:"setHitable",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHitable=t}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(t,n){this.state=t,this.additionStateData=n}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,n){this.startPoint.x+=t,this.startPoint.y+=n}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,n){this.endPoint.x+=t,this.endPoint.y+=n}},{key:"setZIndex",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){nr(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var n=t.startPoint,o=t.endPoint;this.updateStartPoint({x:n.x,y:n.y}),this.updateEndPoint({x:o.x,y:o.y})}}]),e}(),Lp=et(ye.prototype,"type",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),zp=et(ye.prototype,"sourceNodeId",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Fp=et(ye.prototype,"targetNodeId",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Hp=et(ye.prototype,"startPoint",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Gp=et(ye.prototype,"endPoint",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),kp=et(ye.prototype,"text",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),$p=et(ye.prototype,"properties",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Xp=et(ye.prototype,"points",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Up=et(ye.prototype,"pointsList",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Vp=et(ye.prototype,"isSelected",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yp=et(ye.prototype,"isHovered",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wp=et(ye.prototype,"isHitable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Kp=et(ye.prototype,"draggable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Zp=et(ye.prototype,"visible",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jp=et(ye.prototype,"isAnimation",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Qp=et(ye.prototype,"zIndex",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),qp=et(ye.prototype,"state",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),eh=et(ye.prototype,"style",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),th=et(ye.prototype,"arrowConfig",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),et(ye.prototype,"sourceNode",[f.m],Object.getOwnPropertyDescriptor(ye.prototype,"sourceNode"),ye.prototype),et(ye.prototype,"targetNode",[f.m],Object.getOwnPropertyDescriptor(ye.prototype,"targetNode"),ye.prototype),et(ye.prototype,"textPosition",[f.m],Object.getOwnPropertyDescriptor(ye.prototype,"textPosition"),ye.prototype),et(ye.prototype,"setProperty",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setProperty"),ye.prototype),et(ye.prototype,"deleteProperty",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"deleteProperty"),ye.prototype),et(ye.prototype,"setProperties",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setProperties"),ye.prototype),et(ye.prototype,"changeEdgeId",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"changeEdgeId"),ye.prototype),et(ye.prototype,"setStyle",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setStyle"),ye.prototype),et(ye.prototype,"setStyles",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setStyles"),ye.prototype),et(ye.prototype,"updateStyles",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"updateStyles"),ye.prototype),et(ye.prototype,"formatText",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"formatText"),ye.prototype),et(ye.prototype,"resetTextPosition",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"resetTextPosition"),ye.prototype),et(ye.prototype,"moveText",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"moveText"),ye.prototype),et(ye.prototype,"setText",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setText"),ye.prototype),et(ye.prototype,"updateText",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"updateText"),ye.prototype),et(ye.prototype,"setAnchors",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setAnchors"),ye.prototype),et(ye.prototype,"setSelected",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setSelected"),ye.prototype),et(ye.prototype,"setHovered",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setHovered"),ye.prototype),et(ye.prototype,"setHitable",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setHitable"),ye.prototype),et(ye.prototype,"openEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"openEdgeAnimation"),ye.prototype),et(ye.prototype,"closeEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"closeEdgeAnimation"),ye.prototype),et(ye.prototype,"setElementState",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setElementState"),ye.prototype),et(ye.prototype,"updateStartPoint",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"updateStartPoint"),ye.prototype),et(ye.prototype,"moveStartPoint",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"moveStartPoint"),ye.prototype),et(ye.prototype,"updateEndPoint",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"updateEndPoint"),ye.prototype),et(ye.prototype,"moveEndPoint",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"moveEndPoint"),ye.prototype),et(ye.prototype,"setZIndex",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"setZIndex"),ye.prototype),et(ye.prototype,"initPoints",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"initPoints"),ye.prototype),et(ye.prototype,"updateAttributes",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"updateAttributes"),ye.prototype),et(ye.prototype,"getAdjustStart",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"getAdjustStart"),ye.prototype),et(ye.prototype,"getAdjustEnd",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"getAdjustEnd"),ye.prototype),et(ye.prototype,"updateAfterAdjustStartAndEnd",[f.k],Object.getOwnPropertyDescriptor(ye.prototype,"updateAfterAdjustStartAndEnd"),ye.prototype),ye),uf=af;function Ma(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ma=function(t){return typeof t}:Ma=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(e)}function oh(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function ih(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?oh(Object(t),!0).forEach(function(n){sh(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ah(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gP(e,r,t){return r&&ah(e.prototype,r),t&&ah(e,t),e}function wa(){return typeof Reflect<"u"&&Reflect.get?wa=Reflect.get:wa=function(r,t,n){var o=mP(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},wa.apply(this,arguments)}function mP(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Eo(e),e!==null););return e}function bP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&sf(e,r)}function sf(e,r){return sf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},sf(e,r)}function OP(e){var r=xP();return function(){var n=Eo(e),o;if(r){var a=Eo(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return EP(this,o)}}function EP(e,r){if(r&&(Ma(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uh(e)}function uh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Eo(e){return Eo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(e)}function sh(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var lf=function(e){bP(t,e);var r=OP(t);function t(){var n;yP(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),sh(uh(n),"modelType",pt.LINE_EDGE),n}return gP(t,[{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.line,a=wa(Eo(t.prototype),"getEdgeStyle",this).call(this);return ih(ih({},a),jt(o))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}]),t}(uf);function Aa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Aa=function(t){return typeof t}:Aa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Aa(e)}var at,lh;function SP(e,r){return wP(e)||MP(e,r)||TP(e,r)||PP()}function PP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TP(e,r){if(e){if(typeof e=="string")return fh(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fh(e,r)}}function fh(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function MP(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function wP(e){if(Array.isArray(e))return e}function ch(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function dh(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ch(Object(t),!0).forEach(function(n){cf(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ch(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function AP(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function NP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ph(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DP(e,r,t){return r&&ph(e.prototype,r),t&&ph(e,t),e}function xo(){return typeof Reflect<"u"&&Reflect.get?xo=Reflect.get:xo=function(r,t,n){var o=jP(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},xo.apply(this,arguments)}function jP(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Dn(e),e!==null););return e}function CP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ff(e,r)}function ff(e,r){return ff=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},ff(e,r)}function RP(e){var r=_P();return function(){var n=Dn(e),o;if(r){var a=Dn(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return IP(this,o)}}function IP(e,r){if(r&&(Aa(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ui(e)}function ui(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _P(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dn(e){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Dn(e)}function cf(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function or(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var df=(at=function(e){CP(t,e);var r=RP(t);function t(){var n;NP(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),cf(ui(n),"modelType",pt.POLYLINE_EDGE),cf(ui(n),"draginngPointList",void 0),AP(ui(n),"dbClickPosition",lh,ui(n)),n}return DP(t,[{key:"initEdgeData",value:function(o){this.offset=30,xo(Dn(t.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.polyline,a=xo(Dn(t.prototype),"getEdgeStyle",this).call(this);return dh(dh({},a),jt(o))}},{key:"getTextPosition",value:function(){var o,a=(o=this.text)===null||o===void 0?void 0:o.value;if(this.dbClickPosition&&!a){var s=this.dbClickPosition,p=s.x,g=s.y;return{x:p,y:g}}var E=So(this.points),T=eT(E),D=SP(T,2),B=D[0],G=D[1];return{x:(B.x+G.x)/2,y:(B.y+G.y)/2}}},{key:"getAfterAnchor",value:function(o,a,s){var p,g;return s.forEach(function(E){var T;o===Dt.HORIZONTAL?T=Math.abs(a.y-E.y):o===Dt.VERTICAL&&(T=Math.abs(a.x-E.x)),(!g||g>T)&&(g=T,p=E)}),p}},{key:"getCorssPoint",value:function(o,a,s){var p;return o===Dt.HORIZONTAL?p={x:s.x,y:a.y}:o===Dt.VERTICAL&&(p={x:a.x,y:s.y}),p}},{key:"removeCrossPoints",value:function(o,a,s){var p=s.map(function(Re){return Re});if(o===1){var g=p[o],E=p[a],T=p[o-1],D=xh(T,g,this.sourceNode);if(D){var B=Sh(g,E,this.sourceNode);if(B){var G=Ph(g,E,this.sourceNode);G&&(p[o]=G,p.splice(o-1,1),o--,a--)}}else{var Z=this.sourceNode.anchors;Z.forEach(function(Re){if(Re.x===T.x&&Re.x===g.x||Re.y===T.y&&Re.y===g.y){var Ze=Ur(Re.x,Re.y,g.x,g.y),He=Ur(T.x,T.y,g.x,g.y);Ze<He&&(p[o-1]=Re)}})}}if(a===s.length-2){var ae=p[o],se=p[a],le=p[a+1],Ae=xh(se,le,this.targetNode);if(Ae){var ge=Sh(ae,se,this.targetNode);if(ge){var be=Ph(ae,se,this.targetNode);be&&(p[a]=be,p.splice(a+1,1))}}else{var Fe=this.targetNode.anchors;Fe.forEach(function(Re){if(Re.x===le.x&&Re.x===se.x||Re.y===le.y&&Re.y===se.y){var Ze=Ur(Re.x,Re.y,se.x,se.y),He=Ur(le.x,le.y,se.x,se.y);Ze<He&&(p[a+1]=Re)}})}}return p}},{key:"getDragingPoints",value:function(o,a,s,p,g){var E=g.map(function(B){return B}),T=this.getAfterAnchor(o,s,p),D=this.getCorssPoint(o,s,T);return a==="start"?(E.unshift(D),E.unshift(T)):(E.push(D),E.push(T)),E}},{key:"updateCrossPoints",value:function(o){var a=o.map(function(be){return be}),s=o[0],p=o[1],g=o[a.length-2],E=o[a.length-1],T=this.sourceNode,D=this.targetNode,B=T.modelType,G=D.modelType,Z=_a(s,p),ae=a[0];switch(B){case pt.RECT_NODE:if(T.radius!==0){var se=Cp(s,T);se||(ae=jp(s,Z,T))}break;case pt.CIRCLE_NODE:ae=rf(s,Z,T);break;case pt.ELLIPSE_NODE:ae=Rp(s,Z,T);break;case pt.DIAMOND_NODE:ae=Pa(s,Z,T);break;case pt.POLYGON_NODE:ae=Pa(s,Z,T);break}a[0]=ae;var le=_a(g,E),Ae=a[a.length-1];switch(G){case pt.RECT_NODE:if(D.radius!==0){var ge=Cp(E,D);ge||(Ae=jp(E,le,D))}break;case pt.CIRCLE_NODE:Ae=rf(E,le,D);break;case pt.ELLIPSE_NODE:Ae=Rp(E,le,D);break;case pt.DIAMOND_NODE:Ae=Pa(E,le,D);break;case pt.POLYGON_NODE:Ae=Pa(E,le,D);break}return a[a.length-1]=Ae,a}},{key:"getData",value:function(){var o=xo(Dn(t.prototype),"getData",this).call(this),a=this.pointsList.map(function(s){var p=s.x,g=s.y;return{x:p,y:g}});return Object.assign({},o,{pointsList:a})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(o){return"".concat(o.x,",").concat(o.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var o=Eh({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=o,this.points=o.map(function(a){return"".concat(a.x,",").concat(a.y)}).join(" ")}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePoints()}},{key:"moveStartPoint",value:function(o,a){this.startPoint.x+=o,this.startPoint.y+=a,this.updatePoints()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"moveEndPoint",value:function(o,a){this.endPoint.x+=o,this.endPoint.y+=a,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map(function(o){return o})}},{key:"dragAppendSimple",value:function(o,a){this.isDragging=!0;var s=o.start,p=o.end,g=o.startIndex,E=o.endIndex,T=o.direction,D=this.pointsList,B=D;return T===Dt.HORIZONTAL?(D[g]={x:s.x,y:s.y+a.y},D[E]={x:p.x,y:p.y+a.y},B=this.pointsList.map(function(G){return G})):T===Dt.VERTICAL&&(D[g]={x:s.x+a.x,y:s.y},D[E]={x:p.x+a.x,y:p.y},B=this.pointsList.map(function(G){return G})),this.updatePointsAfterDrag(B),this.draginngPointList=B,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},D[g]),end:Object.assign({},D[E]),startIndex:g,endIndex:E,direction:T}}},{key:"dragAppend",value:function(o,a){this.isDragging=!0;var s=o.start,p=o.end,g=o.startIndex,E=o.endIndex,T=o.direction,D=this.pointsList;if(T===Dt.HORIZONTAL){D[g]={x:s.x,y:s.y+a.y},D[E]={x:p.x,y:p.y+a.y};var B=this.pointsList.map(function(yt){return yt});if(g!==0&&E!==this.pointsList.length-1&&(B=this.removeCrossPoints(g,E,B)),g===0){var G={x:s.x,y:s.y+a.y},Z=Nn(G,this.sourceNode);if(!Z){var ae=this.sourceNode.anchors;B=this.getDragingPoints(T,"start",G,ae,B)}}if(E===this.pointsList.length-1){var se={x:p.x,y:p.y+a.y},le=Nn(se,this.targetNode);if(!le){var Ae=this.targetNode.anchors;B=this.getDragingPoints(T,"end",se,Ae,B)}}this.updatePointsAfterDrag(B),this.draggingPointList=B}else if(T===Dt.VERTICAL){D[g]={x:s.x+a.x,y:s.y},D[E]={x:p.x+a.x,y:p.y};var ge=this.pointsList.map(function(yt){return yt});if(g!==0&&E!==this.pointsList.length-1&&(ge=this.removeCrossPoints(g,E,ge)),g===0){var be={x:s.x+a.x,y:s.y},Fe=Nn(be,this.sourceNode);if(!Fe){var Re=this.sourceNode.anchors;ge=this.getDragingPoints(T,"start",be,Re,ge)}}if(E===this.pointsList.length-1){var Ze={x:p.x+a.x,y:p.y},He=Nn(Ze,this.targetNode);if(!He){var ht=this.targetNode.anchors;ge=this.getDragingPoints(T,"end",Ze,ht,ge)}}this.updatePointsAfterDrag(ge),this.draggingPointList=ge}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},D[g]),end:Object.assign({},D[E]),startIndex:g,endIndex:E,direction:T}}},{key:"dragAppendEnd",value:function(){if(this.draginngPointList){var o=Oh(So(this.points));this.pointsList=o.map(function(p){return p}),this.draginngPointList=[];var a=o[0];this.startPoint=Object.assign({},a);var s=o[o.length-1];this.endPoint=Object.assign({},s)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(o){var a=this.updateCrossPoints(o);this.points=a.map(function(s){return"".concat(s.x,",").concat(s.y)}).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var o=this.pointsList;return o[o.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(o){var a=o.startPoint,s=o.endPoint,p=o.sourceNode,g=o.targetNode,E=Eh({x:a.x,y:a.y},{x:s.x,y:s.y},p,g,this.offset||0);this.pointsList=E,this.initPoints()}}]),t}(uf),lh=or(at.prototype,"dbClickPosition",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),or(at.prototype,"initPoints",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"initPoints"),at.prototype),or(at.prototype,"updatePoints",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updatePoints"),at.prototype),or(at.prototype,"updateStartPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updateStartPoint"),at.prototype),or(at.prototype,"moveStartPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"moveStartPoint"),at.prototype),or(at.prototype,"updateEndPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updateEndPoint"),at.prototype),or(at.prototype,"moveEndPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"moveEndPoint"),at.prototype),or(at.prototype,"dragAppendStart",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppendStart"),at.prototype),or(at.prototype,"dragAppendSimple",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppendSimple"),at.prototype),or(at.prototype,"dragAppend",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppend"),at.prototype),or(at.prototype,"dragAppendEnd",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppendEnd"),at.prototype),or(at.prototype,"updatePointsAfterDrag",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updatePointsAfterDrag"),at.prototype),or(at.prototype,"getAdjustStart",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"getAdjustStart"),at.prototype),or(at.prototype,"getAdjustEnd",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"getAdjustEnd"),at.prototype),or(at.prototype,"updateAfterAdjustStartAndEnd",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updateAfterAdjustStartAndEnd"),at.prototype),at),si=function(r){var t=r.start,n=r.end,o=r.offset,a=r.verticalLength,s=r.type,p={leftX:0,leftY:0,rightX:0,rightY:0},g=Math.atan((n.y-t.y)/(n.x-t.x)),E=Math.atan(o/a),T=Math.sqrt(a*a+o*o);return s==="start"?n.x>=t.x?(p.leftX=t.x+T*Math.sin(g+E),p.leftY=t.y-T*Math.cos(g+E),p.rightX=t.x-T*Math.sin(g-E),p.rightY=t.y+T*Math.cos(g-E)):(p.leftX=t.x-T*Math.sin(g+E),p.leftY=t.y+T*Math.cos(g+E),p.rightX=t.x+T*Math.sin(g-E),p.rightY=t.y-T*Math.cos(g-E)):s==="end"&&(n.x>=t.x?(p.leftX=n.x+T*Math.sin(g-E),p.leftY=n.y-T*Math.cos(g-E),p.rightX=n.x-T*Math.sin(g+E),p.rightY=n.y+T*Math.cos(g+E)):(p.leftX=n.x-T*Math.sin(g-E),p.leftY=n.y+T*Math.cos(g-E),p.rightX=n.x+T*Math.sin(g+E),p.rightY=n.y-T*Math.cos(g+E))),p};function hh(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Na(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?hh(Object(t),!0).forEach(function(n){BP(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function BP(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function LP(e){return HP(e)||FP(e)||vh(e)||zP()}function zP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FP(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function HP(e){if(Array.isArray(e))return hf(e)}function Da(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Da=function(t){return typeof t}:Da=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(e)}function pf(e,r){return $P(e)||kP(e,r)||vh(e,r)||GP()}function GP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vh(e,r){if(e){if(typeof e=="string")return hf(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hf(e,r)}}function hf(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function kP(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function $P(e){if(Array.isArray(e))return e}var XP=function(r,t){return Math.abs(r.centerX-t.centerX)*2<r.width+t.width&&Math.abs(r.centerY-t.centerY)*2<r.height+t.height},vf=function(r){var t=[],n={};return r.forEach(function(o){var a="".concat(o.x,"-").concat(o.y);o.id=a,n[a]=o}),Object.keys(n).forEach(function(o){t.push(n[o])}),t},ja=function(r,t){return r.width===0&&r.height===0?r:{centerX:r.centerX,centerY:r.centerY,minX:r.minX-t,minY:r.minY-t,maxX:r.maxX+t,maxY:r.maxY+t,height:r.height+2*t,width:r.width+2*t}},UP=function(r,t){var n=Math.abs(r.x-t.centerX),o=Math.abs(r.y-t.centerY);return n/t.width>o/t.height?Dt.HORIZONTAL:Dt.VERTICAL},Ca=function(r,t){var n=UP(t,r);return n===Dt.HORIZONTAL?{x:t.x>r.centerX?r.maxX:r.minX,y:t.y}:{x:t.x,y:t.y>r.centerY?r.maxY:r.minY}},yh=function(r,t){var n=Math.min(r.minX,t.minX),o=Math.min(r.minY,t.minY),a=Math.max(r.maxX,t.maxX),s=Math.max(r.maxY,t.maxY);return{centerX:(n+a)/2,centerY:(o+s)/2,minX:n,minY:o,maxX:a,maxY:s,height:s-o,width:a-n}},li=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[],o=[];r.forEach(function(D){n.push(D.x),o.push(D.y)});var a=Math.min.apply(Math,n),s=Math.max.apply(Math,n),p=Math.min.apply(Math,o),g=Math.max.apply(Math,o),E=s-a,T=g-p;return t&&(E+=t,T+=t),{centerX:(a+s)/2,centerY:(p+g)/2,maxX:s,maxY:g,minX:a,minY:p,x:(a+s)/2,y:(p+g)/2,height:T,width:E}},Ra=function(r){var t=r.minX,n=r.minY,o=r.maxX,a=r.maxY;return[{x:t,y:n},{x:o,y:n},{x:o,y:a},{x:t,y:a}]},Ia=function(r,t){var n=r.x,o=r.y;return n<t.minX||n>t.maxX||o<t.minY||o>t.maxY},VP=function(r,t){return t<r.minX||t>r.maxX?[]:[{x:t,y:r.minY},{x:t,y:r.maxY}]},YP=function(r,t){return t<r.minY||t>r.maxY?[]:[{x:r.minX,y:t},{x:r.maxX,y:t}]},WP=function(r,t){return VP(r,t.x).concat(YP(r,t.y))},yf=function(r,t){return Math.abs(r.x-t.x)+Math.abs(r.y-t.y)},KP=function(r,t){var n=-2,o=0;return t.forEach(function(a){a&&(r.x===a.x&&(o+=n),r.y===a.y&&(o+=n))}),o},gh=function(r,t,n,o,a){return yf(r,t)+yf(r,n)+KP(r,[t,n,o,a])},ZP=function e(r,t,n,o,a){a||(a=0),r.unshift(t[o]),n[o]&&n[o]!==o&&a<=100&&e(r,t,n,n[o],a+1)},JP=function(r,t){var n=r.indexOf(t);n>-1&&r.splice(n,1)},fi=function(r,t,n,o){var a=t.x-r.x,s=t.y-r.y,p=o.x-n.x,g=o.y-n.y,E=(-s*(r.x-n.x)+a*(r.y-n.y))/(-p*s+a*g),T=(p*(r.y-n.y)-g*(r.x-n.x))/(-p*s+a*g);return E>=0&&E<=1&&T>=0&&T<=1},mh=function(r,t,n){if(n.width===0&&n.height===0)return!1;var o=Ra(n),a=pf(o,4),s=a[0],p=a[1],g=a[2],E=a[3];return fi(r,t,s,p)||fi(r,t,s,E)||fi(r,t,p,g)||fi(r,t,g,E)},QP=function(r,t,n,o){var a=[];return r.forEach(function(s){s!==t&&(s.x===t.x||s.y===t.y)&&!mh(s,t,n)&&!mh(s,t,o)&&a.push(s)}),vf(a)},qP=function(r,t,n,o,a,s,p){var g=[],E=[t],T={},D={},B={};D[t.id]=0,B[t.id]=gh(t,n,t);var G={};r.forEach(function(se){G[se.id]=se});for(var Z=function(){var le=void 0,Ae=1/0;if(E.forEach(function(be){B[be.id]<Ae&&(Ae=B[be.id],le=be)}),le===n){var ge=[];return ZP(ge,G,T,n.id),{v:ge}}JP(E,le),g.push(le),QP(r,le,o,a).forEach(function(be){if(g.indexOf(be)===-1){E.indexOf(be)===-1&&E.push(be);var Fe=B[le.id]+yf(le,be);D[be.id]&&Fe>=D[be.id]||(T[be.id]=le.id,D[be.id]=Fe,B[be.id]=D[be.id]+gh(be,n,t,s,p))}})};E.length;){var ae=Z();if(Da(ae)==="object")return ae.v}return[t,n]},bh=function(r){var t=mr(r);return t},Oh=function(r){for(var t=r,n=1;n<t.length-1;){var o=t[n-1],a=t[n],s=t[n+1];o.x===a.x&&a.x===s.x||o.y===a.y&&a.y===s.y?t.splice(n,1):n++}return t},Eh=function(r,t,n,o,a){var s=bh(n),p=bh(o),g=ja(s,a),E=ja(p,a),T=Ca(g,r),D=Ca(E,t);if(XP(g,E)){var B=tT(r,t,T,D);return[r,T].concat(LP(B),[D,t])}var G=li([T,D]),Z=yh(g,G),ae=yh(E,G),se=[];se=se.concat(Ra(Z)),se=se.concat(Ra(ae));var le={x:(r.x+t.x)/2,y:(r.y+t.y)/2};[G,Z,ae].forEach(function(ge){se=se.concat(WP(ge,le).filter(function(be){return Ia(be,g)&&Ia(be,E)}))}),[{x:T.x,y:D.y},{x:D.x,y:T.y}].forEach(function(ge){Ia(ge,g)&&Ia(ge,E)&&se.push(ge)}),se.unshift(T),se.push(D),se=vf(se);var Ae=qP(se,T,D,s,p,r,t);return Ae.unshift(r),Ae.push(t),Ae.length>2&&(Ae=Oh(Ae)),vf(Ae)},eT=function(r){var t;if(r.length===1)t=[r[0],r[0]];else if(r.length>=2){for(var n=r[0],o=r[1],a=Ur(n.x,n.y,o.x,o.y),s=1;s<r.length-1;s++){var p=r[s],g=r[s+1],E=Ur(p.x,p.y,g.x,g.y);E>a&&(a=E,n=p,o=g)}t=[n,o]}return t},xh=function(r,t,n){var o=Nn(r,n),a=Nn(t,n);return o&&a},Sh=function(r,t,n){var o=Nn(r,n),a=Nn(t,n),s=o&&a,p=o||a;return!s&&p},Ph=function(r,t,n){for(var o,a,s=mr(n),p=Ra(s),g=0;g<p.length;g++){var E=fi(r,t,p[g],p[(g+1)%p.length]);E&&(a=[p[g],p[(g+1)%p.length]])}return a&&(o=rP(r,t,a[0],a[1])),o},_a=function(r,t){var n;return r.x===t.x?n=Dt.VERTICAL:r.y===t.y&&(n=Dt.HORIZONTAL),n},So=function(r){var t=r.split(" "),n=[];return t&&t.forEach(function(o){var a=o.split(","),s=pf(a,2),p=s[0],g=s[1];n.push({x:Number(p),y:Number(g)})}),n},tT=function(r,t,n,o){var a=[],s=_a(r,n),p=_a(t,o);if(s===p)r.y===n.y?(a.push({x:n.x,y:(n.y+o.y)/2}),a.push({x:o.x,y:(n.y+o.y)/2})):(a.push({x:(n.x+o.x)/2,y:n.y}),a.push({x:(n.x+o.x)/2,y:o.y}));else{var g={x:n.x,y:o.y},E=ai(g,r,n),T=ai(g,t,o);if(E||T)g={x:o.x,y:n.y};else{var D=Th(g,r,n),B=Th(g,t,o);D&&B&&(g={x:o.x,y:n.y})}a.push(g)}return a},Th=function(r,t,n){return r.x===t.x&&r.x===n.x||r.y===t.y&&r.y===n.y},Mh=function(r){if(!r)return 0;for(var t=0,n=0;n<r.length;n++){var o=r.charCodeAt(n);r.match(/[A-Z]/)?t+=1.5:o>=1&&o<=126||o>=65376&&o<=65439?t+=1:t+=2}return t},rT=function(r){var t=r.start,n=r.end,o;if(t.x===n.x&&t.y===n.y)o="";else{var a={start:t,end:n,offset:10,verticalLength:5},s=si(Na(Na({},a),{},{type:"start"})),p=si(Na(Na({},a),{},{type:"end"}));o="M".concat(s.leftX," ").concat(s.leftY,`
L`).concat(s.rightX," ").concat(s.rightY,`
L`).concat(p.rightX," ").concat(p.rightY,`
L`).concat(p.leftX," ").concat(p.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},wh=function(r){var t=r.start,n=r.end,o=r.sourceNode,a=r.targetNode,s=r.offset,p=mr(o),g=mr(a),E=ja(p,s),T=ja(g,s),D=Ca(E,t),B=Ca(T,n);return{sNext:D,ePre:B}},Ba=function(r){var t=r.replace(/M/g,"").replace(/C/g,",").split(","),n=La(t[0]),o=La(t[1]),a=La(t[2]),s=La(t[3]);return[n,o,a,s]},La=function(r){var t=r.replace(/(^\s*)/g,"").split(" "),n=pf(t,2),o=n[0],a=n[1];return{x:+o,y:+a}},nT=function(r){var t=Ba(r);return[t[2],t[3]]},Ah=function(r,t){for(var n=r.x,o=r.y,a=So(t),s=Number.MAX_SAFE_INTEGER,p,g=[],E=0;E<a.length;E++)g.push({start:a[E],end:a[(E+1)%a.length]});if(g.forEach(function(G){var Z=G.start,ae=G.end;if(Z.x===ae.x){var se={x:Z.x,y:o},le=ai(se,Z,ae);if(le){var Ae=Math.abs(Z.x-n);Ae<s&&(s=Ae,p=se)}}else if(Z.y===ae.y){var ge={x:n,y:Z.y},be=ai(ge,Z,ae);if(be){var Fe=Math.abs(Z.y-o);Fe<s&&(s=Fe,p=ge)}}}),!p){var T=g[0],D=T.start,B=T.end;p={x:D.x+(B.x-D.x)/2,y:D.y+(B.y-D.y)/2}}return p},oT=function(r){return oi(r,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Nh=function(r,t){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))};function iT(e,r){return typeof r!="function"?function(t,n,o){return Object.assign({type:e.edgeType},o)}:function(t,n,o){var a=r(t,n,o);return a?typeof a=="string"?Object.assign({},o,{type:a}):Object.assign({type:a},o):{type:e.edgeType}}}i(204);function aT(){}var Po=aT;function uT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Dh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sT(e,r,t){return r&&Dh(e.prototype,r),t&&Dh(e,t),e}function zt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Vr=window.document,jh=0;function gf(e){var r=e.onDragStart,t=r===void 0?Po:r,n=e.onDraging,o=n===void 0?Po:n,a=e.onDragEnd,s=a===void 0?Po:a,p=e.step,g=p===void 0?1:p,E=e.isStopPropagation,T=E===void 0?!0:E,D=!1,B=!1,G=0,Z=0,ae=0,se=0;function le(be){if(T&&be.stopPropagation(),!!B&&(D=!0,ae+=be.clientX-G,se+=be.clientY-Z,G=be.clientX,Z=be.clientY,Math.abs(ae)>g||Math.abs(se)>g)){var Fe=ae%g,Re=se%g,Ze=ae-Fe,He=se-Re;ae=Fe,se=Re,o({deltaX:Ze,deltaY:He,event:be})}}function Ae(be){if(T&&be.stopPropagation(),B=!1,Vr.removeEventListener("mousemove",le,!1),Vr.removeEventListener("mouseup",Ae,!1),!!D)return D=!1,s({event:be})}function ge(be){if(be.button===jh)return T&&be.stopPropagation(),B=!0,G=be.clientX,Z=be.clientY,Vr.addEventListener("mousemove",le,!1),Vr.addEventListener("mouseup",Ae,!1),t({event:be})}return ge}var qn=function(){function e(r){var t=this,n=r.onDragStart,o=n===void 0?Po:n,a=r.onDraging,s=a===void 0?Po:a,p=r.onDragEnd,g=p===void 0?Po:p,E=r.eventType,T=E===void 0?"":E,D=r.eventCenter,B=D===void 0?null:D,G=r.step,Z=G===void 0?1:G,ae=r.isStopPropagation,se=ae===void 0?!0:ae,le=r.model,Ae=le===void 0?null:le;uT(this,e),zt(this,"onDragStart",void 0),zt(this,"onDraging",void 0),zt(this,"onDragEnd",void 0),zt(this,"step",void 0),zt(this,"isStopPropagation",void 0),zt(this,"isDraging",!1),zt(this,"isStartDraging",!1),zt(this,"startX",0),zt(this,"startY",0),zt(this,"sumDeltaX",0),zt(this,"sumDeltaY",0),zt(this,"eventType",void 0),zt(this,"eventCenter",void 0),zt(this,"model",void 0),zt(this,"startTime",void 0),zt(this,"isGrag",void 0),zt(this,"handleMouseDown",function(ge){var be,Fe;if(ge.button===jh){t.isStopPropagation&&ge.stopPropagation(),t.isStartDraging=!0,t.startX=ge.clientX,t.startY=ge.clientY,Vr.addEventListener("mousemove",t.handleMouseMove,!1),Vr.addEventListener("mouseup",t.handleMouseUp,!1);var Re=(be=t.model)===null||be===void 0?void 0:be.getData();(Fe=t.eventCenter)===null||Fe===void 0||Fe.emit(it["".concat(t.eventType,"_MOUSEDOWN")],{e:ge,data:Re}),t.startTime=new Date().getTime()}}),zt(this,"handleMouseMove",function(ge){if(t.isStopPropagation&&ge.stopPropagation(),!!t.isStartDraging&&(t.sumDeltaX+=ge.clientX-t.startX,t.sumDeltaY+=ge.clientY-t.startY,t.startX=ge.clientX,t.startY=ge.clientY,t.step<=1||Math.abs(t.sumDeltaX)>t.step||Math.abs(t.sumDeltaY)>t.step)){var be,Fe=t.sumDeltaX%t.step,Re=t.sumDeltaY%t.step,Ze=t.sumDeltaX-Fe,He=t.sumDeltaY-Re;t.sumDeltaX=Fe,t.sumDeltaY=Re;var ht=(be=t.model)===null||be===void 0?void 0:be.getData();if(!t.isDraging){var yt;(yt=t.eventCenter)===null||yt===void 0||yt.emit(it["".concat(t.eventType,"_DRAGSTART")],{e:ge,data:ht}),t.onDragStart({event:ge})}t.isDraging=!0,Promise.resolve().then(function(){var ur,Or;t.onDraging({deltaX:Ze,deltaY:He,event:ge}),(ur=t.eventCenter)===null||ur===void 0||ur.emit(it["".concat(t.eventType,"_MOUSEMOVE")],{e:ge,data:ht}),(Or=t.eventCenter)===null||Or===void 0||Or.emit(it["".concat(t.eventType,"_DRAG")],{e:ge,data:ht})})}}),zt(this,"handleMouseUp",function(ge){t.isStartDraging=!1,t.isStopPropagation&&ge.stopPropagation(),Promise.resolve().then(function(){var be,Fe,Re;Vr.removeEventListener("mousemove",t.handleMouseMove,!1),Vr.removeEventListener("mouseup",t.handleMouseUp,!1);var Ze=(be=t.model)===null||be===void 0?void 0:be.getData();(Fe=t.eventCenter)===null||Fe===void 0||Fe.emit(it["".concat(t.eventType,"_MOUSEUP")],{e:ge,data:Ze}),t.isDraging&&(t.isDraging=!1,t.onDragEnd({event:ge}),(Re=t.eventCenter)===null||Re===void 0||Re.emit(it["".concat(t.eventType,"_DROP")],{e:ge,data:Ze}))})}),zt(this,"cancelDrag",function(){Vr.removeEventListener("mousemove",t.handleMouseMove,!1),Vr.removeEventListener("mouseup",t.handleMouseUp,!1),t.onDragEnd({event:null}),t.isDraging=!1}),this.onDragStart=o,this.onDraging=s,this.onDragEnd=g,this.step=Z,this.isStopPropagation=se,this.eventType=T,this.eventCenter=B,this.model=Ae}return sT(e,[{key:"setStep",value:function(t){this.step=t}}]),e}(),lT=function(r){return!r||typeof r=="boolean"?jt(r===!0?lP:Bp):Sp(jt(Bp),r)},de,Ch,Rh,Ih,_h,Bh,Lh,zh,Fh,Hh,Gh,kh,$h;function Xh(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function za(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Xh(Object(t),!0).forEach(function(n){Yr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mf(e,r){return dT(e)||cT(e,r)||Uh(e,r)||fT()}function fT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cT(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function dT(e){if(Array.isArray(e))return e}function To(e){return vT(e)||hT(e)||Uh(e)||pT()}function pT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uh(e,r){if(e){if(typeof e=="string")return bf(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return bf(e,r)}}function hT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vT(e){if(Array.isArray(e))return bf(e)}function bf(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function ci(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ci=function(t){return typeof t}:ci=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function wr(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function yT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Vh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gT(e,r,t){return r&&Vh(e.prototype,r),t&&Vh(e,t),e}function Yr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function We(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Fa=200,Yh=(de=function(){function e(r){yT(this,e),Yr(this,"rootEl",void 0),wr(this,"width",Ch,this),wr(this,"height",Rh,this),Yr(this,"theme",void 0),Yr(this,"eventCenter",void 0),Yr(this,"modelMap",new Map),Yr(this,"topElement",void 0),Yr(this,"animation",void 0),Yr(this,"idGenerator",void 0),Yr(this,"edgeGenerator",void 0),Yr(this,"nodeMoveRules",[]),wr(this,"edgeType",Ih,this),wr(this,"nodes",_h,this),wr(this,"edges",Bh,this),wr(this,"overlapMode",Lh,this),wr(this,"background",zh,this),wr(this,"transformModel",Fh,this),wr(this,"editConfigModel",Hh,this),wr(this,"gridSize",Gh,this),wr(this,"partial",kh,this),wr(this,"fakerNode",$h,this);var t=r.container,n=r.background,o=n===void 0?{}:n,a=r.grid,s=r.idGenerator,p=r.edgeGenerator,g=r.animation;this.background=o,ci(a)==="object"&&(this.gridSize=a.size),this.rootEl=t,this.editConfigModel=new Jd(r),this.eventCenter=new k0,this.transformModel=new wx(this.eventCenter),this.theme=Pp(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=lT(g),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=s,this.edgeGenerator=iT(this,p),this.width=r.width||this.rootEl.getBoundingClientRect().width,this.height=r.height||this.rootEl.getBoundingClientRect().height}return gT(e,[{key:"nodesMap",get:function(){return this.nodes.reduce(function(t,n,o){return t[n.id]={index:o,model:n},t},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(t,n,o){return t[n.id]={index:o,model:n},t},{})}},{key:"modelsMap",get:function(){return[].concat(To(this.nodes),To(this.edges)).reduce(function(t,n){return t[n.id]=n,t},{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach(function(g){return t.push(g)}),this.edges.forEach(function(g){return t.push(g)}),t=t.sort(function(g,E){return g.zIndex-E.zIndex});for(var n=[],o=[-Fa,-Fa],a=[this.width+Fa,this.height+Fa],s=0;s<t.length;s++){var p=t[s];p.visible&&(!this.partial||p.isSelected||this.isElementInArea(p,o,a,!1,!1))&&n.push(p)}return n}},{key:"textEditElement",get:function(){var t=this.nodes.find(function(o){return o.state===Et.TEXT_EDIT}),n=this.edges.find(function(o){return o.state===Et.TEXT_EDIT});return t||n}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach(function(n){n.isSelected&&t.set(n.id,n)}),this.edges.forEach(function(n){n.isSelected&&t.set(n.id,n)}),t}},{key:"getAreaElement",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,p=[],g=[];this.nodes.forEach(function(D){return g.push(D)}),this.edges.forEach(function(D){return g.push(D)});for(var E=0;E<g.length;E++){var T=g[E];(!s||T.visible)&&this.isElementInArea(T,t,n,o,a)&&p.push(T)}return p}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",value:function(t){var n;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:(n=this.nodesMap[t])===null||n===void 0?void 0:n.model}},{key:"getPointByClient",value:function(t){var n=t.x,o=t.y,a=this.rootEl.getBoundingClientRect(),s={x:n-a.left,y:o-a.top},p=this.transformModel.HtmlPointToCanvasPoint([s.x,s.y]),g=mf(p,2),E=g[0],T=g[1];return{domOverlayPosition:s,canvasOverlayPosition:{x:E,y:T}}}},{key:"isElementInArea",value:function(t,n,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(t.BaseType===Ht.NODE){t=t;for(var p=mr(t),g=p.minX,E=p.minY,T=p.maxX,D=p.maxY,B=[{x:g,y:E},{x:T,y:E},{x:T,y:D},{x:g,y:D}],G=s,Z=0;Z<B.length;Z++){var ae=B[Z],se=ae.x,le=ae.y,Ae=this.transformModel.CanvasPointToHtmlPoint([se,le]),ge=mf(Ae,2);if(se=ge[0],le=ge[1],Ql([se,le],n,o)!==s){G=!s;break}}return G}if(t.BaseType===Ht.EDGE){t=t;var be=t,Fe=be.startPoint,Re=be.endPoint,Ze=this.transformModel.CanvasPointToHtmlPoint([Fe.x,Fe.y]),He=this.transformModel.CanvasPointToHtmlPoint([Re.x,Re.y]),ht=Ql(Ze,n,o),yt=Ql(He,n,o);return a?ht&&yt:ht||yt}return!1}},{key:"graphDataToModel",value:function(t){var n=this;(!this.width||!this.height)&&this.resize(),this.nodes=ya(t.nodes,function(o){var a=n.getModel(o.type);if(!a)throw new Error("找不到".concat(o.type,"对应的节点。"));var s=o.x,p=o.y;return s&&p&&(o.x=An(s,n.gridSize),o.y=An(p,n.gridSize),ci(o.text)==="object"&&(o.text.x-=Mp(s,n.gridSize),o.text.y-=Mp(p,n.gridSize))),new a(o,n)}),this.edges=ya(t.edges,function(o){var a=n.getModel(o.type);if(!a)throw new Error("找不到".concat(o.type,"对应的边。"));return new a(o,n)})}},{key:"modelToGraphData",value:function(){var t=[];this.edges.forEach(function(o){var a=o.getData();a&&!o.virtual&&t.push(a)});var n=[];return this.nodes.forEach(function(o){var a=o.getData();a&&!o.virtual&&n.push(a)}),{nodes:n,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,n=[],o=0;o<this.nodes.length;o++){var a=this.nodes[o];if(a.isDragging){t=!0;break}else n.push(a.getHistoryData())}if(t)return!1;for(var s=!1,p=[],g=0;g<this.edges.length;g++){var E=this.edges[g];if(E.isDragging){s=!0;break}else p.push(E.getHistoryData())}return s?!1:{nodes:n,edges:p}}},{key:"getEdgeModelById",value:function(t){var n;return(n=this.edgesMap[t])===null||n===void 0?void 0:n.model}},{key:"getElement",value:function(t){return this.modelsMap[t]}},{key:"getNodeEdges",value:function(t){for(var n=[],o=0;o<this.edges.length;o++){var a=this.edges[o],s=this.edges[o].sourceNodeId===t,p=this.edges[o].targetNodeId===t;(s||p)&&n.push(a)}return n}},{key:"getSelectElements",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,n=this.selectElements,o={nodes:[],edges:[]};return n.forEach(function(a){if(a.BaseType===Ht.NODE&&o.nodes.push(a.getData()),a.BaseType===Ht.EDGE){var s=a.getData(),p=n.get(s.sourceNodeId)&&n.get(s.targetNodeId);(t||p)&&o.edges.push(s)}}),o}},{key:"updateAttributes",value:function(t,n){var o=this.getElement(t);o.updateAttributes(n)}},{key:"changeNodeId",value:function(t,n){return n||(n=Qn()),this.nodesMap[n]?(console.warn("当前流程图已存在节点".concat(n,", 修改失败")),""):this.nodesMap[t]?(this.edges.forEach(function(o){o.sourceNodeId===t&&(o.sourceNodeId=n),o.targetNodeId===t&&(o.targetNodeId=n)}),this.nodesMap[t].model.id=n,n):(console.warn("当前流程图找不到节点".concat(n,", 修改失败")),"")}},{key:"changeEdgeId",value:function(t,n){return n||(n=Qn()),this.edgesMap[n]?(console.warn("当前流程图已存在边: ".concat(n,", 修改失败")),""):this.edgesMap[t]?(this.edges.forEach(function(o){o.id===t&&o.changeEdgeId(n)}),n):(console.warn("当前流程图找不到边: ".concat(n,", 修改失败")),"")}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,n){return this.modelMap.set(t,n)}},{key:"toFront",value:function(t){var n,o,a=((n=this.nodesMap[t])===null||n===void 0?void 0:n.model)||((o=this.edgesMap[t])===null||o===void 0?void 0:o.model);if(a){if(this.overlapMode===gr.DEFAULT){var s;(s=this.topElement)===null||s===void 0||s.setZIndex(),a.setZIndex(Ox),this.topElement=a}this.overlapMode===gr.INCREASE&&this.setElementZIndex(t,"top")}}},{key:"setElementZIndex",value:function(t,n){var o,a,s=((o=this.nodesMap[t])===null||o===void 0?void 0:o.model)||((a=this.edgesMap[t])===null||a===void 0?void 0:a.model);if(s){var p;typeof n=="number"&&(p=n),n==="top"&&(p=of()),n==="bottom"&&(p=pP()),s.setZIndex(p)}}},{key:"deleteNode",value:function(t){var n=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(it.NODE_DELETE,{data:n})}},{key:"addNode",value:function(t){var n=qt(t);n.id&&this.nodesMap[t.id]&&delete n.id;var o=this.getModel(n.type);if(!o)throw new Error("找不到".concat(n.type,"对应的节点,请确认是否已注册此类型节点。"));n.x=An(n.x,this.gridSize),n.y=An(n.y,this.gridSize);var a=new o(n,this);this.nodes.push(a);var s=a.getData();return this.eventCenter.emit(it.NODE_ADD,{data:s}),a}},{key:"cloneNode",value:function(t){var n=this.getNodeModelById(t),o=n.getData();o.x+=30,o.y+=30,delete o.id,o.text&&(o.text.x+=30,o.text.y+=30);var a=this.addNode(o);return a.setSelected(!0),n.setSelected(!1),a.getData()}},{key:"moveNode",value:function(t,n,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=this.nodesMap[t];if(!s){console.warn("不存在id为".concat(t,"的节点"));return}var p=s.model,g=p.getMoveDistance(n,o,a),E=mf(g,2);n=E[0],o=E[1],this.moveEdge(t,n,o)}},{key:"moveNode2Coordinate",value:function(t,n,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=this.nodesMap[t];if(!s){console.warn("不存在id为".concat(t,"的节点"));return}var p=s.model,g=p.x,E=p.y,T=n-g,D=o-E;this.moveNode(t,T,D,a)}},{key:"editText",value:function(t){this.setElementStateById(t,Et.TEXT_EDIT)}},{key:"addEdge",value:function(t){var n=qt(t),o=n.type;o||(o=this.edgeType),n.id&&this.edgesMap[n.id]&&delete n.id;var a=this.getModel(o);if(!a)throw new Error("找不到".concat(o,"对应的边,请确认是否已注册此类型边。"));var s=new a(za(za({},n),{},{type:o}),this),p=s.getData();return this.edges.push(s),this.eventCenter.emit(it.EDGE_ADD,{data:p}),s}},{key:"moveEdge",value:function(t,n,o){for(var a=0;a<this.edges.length;a++){var s=this.edges[a],p=s.textPosition,g=p.x,E=p.y,T=this.edges[a].sourceNodeId===t,D=this.edges[a].targetNodeId===t;if(T&&s.moveStartPoint(n,o),D&&s.moveEndPoint(n,o),T||D){var B;if(s.customTextPosition===!0)s.resetTextPosition();else if(s.modelType===pt.POLYLINE_EDGE&&(B=s.text)!==null&&B!==void 0&&B.value){var G=s.text,Z=Ah(G,s.points);s.moveText(Z.x-G.x,Z.y-G.y)}else{var ae=s.textPosition,se=ae.x,le=ae.y;s.moveText(se-g,le-E)}}}}},{key:"deleteEdgeBySourceAndTarget",value:function(t,n){for(var o=0;o<this.edges.length;o++)if(this.edges[o].sourceNodeId===t&&this.edges[o].targetNodeId===n){var a=this.edges[o].getData();this.edges.splice(o,1),o--,this.eventCenter.emit(it.EDGE_DELETE,{data:a})}}},{key:"deleteEdgeById",value:function(t){var n=this.edgesMap[t];if(n){var o=this.edgesMap[t].index,a=this.edgesMap[t].model.getData();this.edges.splice(o,1),this.eventCenter.emit(it.EDGE_DELETE,{data:a})}}},{key:"deleteEdgeBySource",value:function(t){for(var n=0;n<this.edges.length;n++)if(this.edges[n].sourceNodeId===t){var o=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(it.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeByTarget",value:function(t){for(var n=0;n<this.edges.length;n++)if(this.edges[n].targetNodeId===t){var o=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(it.EDGE_DELETE,{data:o})}}},{key:"setElementStateById",value:function(t,n,o){this.nodes.forEach(function(a){a.id===t?a.setElementState(n,o):a.setElementState(Et.DEFAULT)}),this.edges.forEach(function(a){a.id===t?a.setElementState(n,o):a.setElementState(Et.DEFAULT)})}},{key:"updateText",value:function(t,n){this.nodes.forEach(function(o){o.id===t&&o.updateText(n)}),this.edges.forEach(function(o){o.id===t&&o.updateText(n)})}},{key:"selectNodeById",value:function(t){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o||this.clearSelectElements();var a=(n=this.nodesMap[t])===null||n===void 0?void 0:n.model;a==null||a.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o||this.clearSelectElements();var a=(n=this.edgesMap[t])===null||n===void 0?void 0:n.model;a==null||a.setSelected(!0)}},{key:"selectElementById",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n||this.clearSelectElements();var o=this.getElement(t);o==null||o.setSelected(!0)}},{key:"clearSelectElements",value:function(){if(this.selectElements.forEach(function(n){n==null||n.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===gr.DEFAULT){var t;(t=this.topElement)===null||t===void 0||t.setZIndex()}}},{key:"moveNodes",value:function(t,n,o){var a=this,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;t.forEach(function(p){return a.moveNode(p,n,o,s)})}},{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,n){var o=this.getNodeModelById(t);if(!o){console.warn("找不到id为".concat(t,"的节点"));return}var a=o.getData();a.type=n;var s=this.getModel(n);if(!s)throw new Error("找不到".concat(n,"对应的节点,请确认是否已注册此类型节点。"));var p=new s(a,this);this.nodes.splice(this.nodesMap[t].index,1,p);var g=this.getNodeEdges(t);g.forEach(function(E){if(E.sourceNodeId===t){var T=Ip(p,E.startPoint,p.width,p.height);E.updateStartPoint(T)}if(E.targetNodeId===t){var D=Ip(p,E.endPoint,p.width,p.height);E.updateEndPoint(D)}})}},{key:"changeEdgeType",value:function(t,n){var o=this.getEdgeModelById(t);if(!o){console.warn("找不到id为".concat(t,"的边"));return}if(o.type!==n){var a=o.getData();a.type=n;var s=this.getModel(n);if(!s)throw new Error("找不到".concat(n,"对应的节点,请确认是否已注册此类型节点。"));delete a.pointsList;var p=new s(a,this);this.edges.splice(this.edgesMap[t].index,1,p)}}},{key:"getNodeIncomingEdge",value:function(t){var n=[];return this.edges.forEach(function(o){o.targetNodeId===t&&n.push(o)}),n}},{key:"getNodeOutgoingEdge",value:function(t){var n=[];return this.edges.forEach(function(o){o.sourceNodeId===t&&n.push(o)}),n}},{key:"getNodeIncomingNode",value:function(t){var n=this,o=[];return this.edges.forEach(function(a){a.targetNodeId===t&&o.push(n.nodesMap[a.sourceNodeId].model)}),o}},{key:"getNodeOutgoingNode",value:function(t){var n=this,o=[];return this.edges.forEach(function(a){a.sourceNodeId===t&&o.push(n.nodesMap[a.targetNodeId].model)}),o}},{key:"setTheme",value:function(t){this.theme=Pp(za(za({},this.theme),t))}},{key:"resize",value:function(t,n){this.width=t||this.rootEl.getBoundingClientRect().width,this.height=n||this.rootEl.getBoundingClientRect().height,(!this.width||!this.height)&&console.warn("渲染画布的时候无法获取画布宽高请确认在container已挂载到DOM。@see https://github.com/didi/LogicFlow/issues/675")}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,n=[],o=[];t.forEach(function(G){var Z=G.x,ae=G.y,se=G.width,le=G.height,Ae=G.getNodeStyle(),ge=Ae.strokeWidth,be=ge===void 0?0:ge;n=n.concat([Z+se/2+be,Z-se/2-be]),o=o.concat([ae+le/2+be,ae-le/2-be])});var a=Math.min.apply(Math,To(n)),s=Math.max.apply(Math,To(n)),p=Math.min.apply(Math,To(o)),g=Math.max.apply(Math,To(o)),E=s-a||0,T=g-p||0,D=a+E/2,B=p+T/2;return{virtualRectWidth:E,virtualRectHeight:T,virtualRectCenterPositionX:D,virtualRectCenterPositionY:B}}},{key:"translateCenter",value:function(){var t=this.nodes,n=this.width,o=this.height,a=this.rootEl,s=this.transformModel;if(t.length){var p=n||a.clientWidth,g=o||a.clientHeight,E=this.getVirtualRectSize(),T=E.virtualRectCenterPositionX,D=E.virtualRectCenterPositionY;s.focusOn(T,D,p,g)}}},{key:"fitView",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,o=this.nodes,a=this.width,s=this.height,p=this.rootEl,g=this.transformModel;if(o.length){var E=a||p.clientWidth,T=s||p.clientHeight,D=this.getVirtualRectSize(),B=D.virtualRectWidth,G=D.virtualRectHeight,Z=D.virtualRectCenterPositionX,ae=D.virtualRectCenterPositionY,se=(B+n)/E,le=(G+t)/T,Ae=0;Ae=1/Math.max(se,le);var ge=[E/2,T/2];g.zoom(Ae,ge),g.focusOn(Z,ae,E,T)}}},{key:"openEdgeAnimation",value:function(t){var n=this.getEdgeModelById(t);n.openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(t){var n=this.getEdgeModelById(t);n.closeEdgeAnimation()}}]),e}(),Ch=We(de.prototype,"width",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Rh=We(de.prototype,"height",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ih=We(de.prototype,"edgeType",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_h=We(de.prototype,"nodes",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Bh=We(de.prototype,"edges",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Lh=We(de.prototype,"overlapMode",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return gr.DEFAULT}}),zh=We(de.prototype,"background",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Fh=We(de.prototype,"transformModel",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hh=We(de.prototype,"editConfigModel",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Gh=We(de.prototype,"gridSize",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),kh=We(de.prototype,"partial",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$h=We(de.prototype,"fakerNode",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),We(de.prototype,"nodesMap",[f.m],Object.getOwnPropertyDescriptor(de.prototype,"nodesMap"),de.prototype),We(de.prototype,"edgesMap",[f.m],Object.getOwnPropertyDescriptor(de.prototype,"edgesMap"),de.prototype),We(de.prototype,"modelsMap",[f.m],Object.getOwnPropertyDescriptor(de.prototype,"modelsMap"),de.prototype),We(de.prototype,"sortElements",[f.m],Object.getOwnPropertyDescriptor(de.prototype,"sortElements"),de.prototype),We(de.prototype,"textEditElement",[f.m],Object.getOwnPropertyDescriptor(de.prototype,"textEditElement"),de.prototype),We(de.prototype,"selectElements",[f.m],Object.getOwnPropertyDescriptor(de.prototype,"selectElements"),de.prototype),We(de.prototype,"setFakerNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"setFakerNode"),de.prototype),We(de.prototype,"removeFakerNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"removeFakerNode"),de.prototype),We(de.prototype,"setModel",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"setModel"),de.prototype),We(de.prototype,"toFront",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"toFront"),de.prototype),We(de.prototype,"setElementZIndex",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"setElementZIndex"),de.prototype),We(de.prototype,"deleteNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteNode"),de.prototype),We(de.prototype,"addNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"addNode"),de.prototype),We(de.prototype,"cloneNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"cloneNode"),de.prototype),We(de.prototype,"moveNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNode"),de.prototype),We(de.prototype,"moveNode2Coordinate",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNode2Coordinate"),de.prototype),We(de.prototype,"editText",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"editText"),de.prototype),We(de.prototype,"addEdge",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"addEdge"),de.prototype),We(de.prototype,"moveEdge",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"moveEdge"),de.prototype),We(de.prototype,"deleteEdgeBySourceAndTarget",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeBySourceAndTarget"),de.prototype),We(de.prototype,"deleteEdgeById",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeById"),de.prototype),We(de.prototype,"deleteEdgeBySource",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeBySource"),de.prototype),We(de.prototype,"deleteEdgeByTarget",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeByTarget"),de.prototype),We(de.prototype,"setElementStateById",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"setElementStateById"),de.prototype),We(de.prototype,"updateText",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"updateText"),de.prototype),We(de.prototype,"selectNodeById",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"selectNodeById"),de.prototype),We(de.prototype,"selectEdgeById",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"selectEdgeById"),de.prototype),We(de.prototype,"selectElementById",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"selectElementById"),de.prototype),We(de.prototype,"clearSelectElements",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"clearSelectElements"),de.prototype),We(de.prototype,"moveNodes",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNodes"),de.prototype),We(de.prototype,"setDefaultEdgeType",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"setDefaultEdgeType"),de.prototype),We(de.prototype,"changeNodeType",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"changeNodeType"),de.prototype),We(de.prototype,"changeEdgeType",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"changeEdgeType"),de.prototype),We(de.prototype,"getNodeIncomingEdge",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeIncomingEdge"),de.prototype),We(de.prototype,"getNodeOutgoingEdge",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeOutgoingEdge"),de.prototype),We(de.prototype,"getNodeIncomingNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeIncomingNode"),de.prototype),We(de.prototype,"getNodeOutgoingNode",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeOutgoingNode"),de.prototype),We(de.prototype,"setTheme",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"setTheme"),de.prototype),We(de.prototype,"resize",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"resize"),de.prototype),We(de.prototype,"clearData",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"clearData"),de.prototype),We(de.prototype,"translateCenter",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"translateCenter"),de.prototype),We(de.prototype,"fitView",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"fitView"),de.prototype),We(de.prototype,"openEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"openEdgeAnimation"),de.prototype),We(de.prototype,"closeEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(de.prototype,"closeEdgeAnimation"),de.prototype),de),mT=Yh;function Ha(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ha=function(t){return typeof t}:Ha=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}var Wh;function Of(){return Of=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Of.apply(this,arguments)}function bT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Kh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function OT(e,r,t){return r&&Kh(e.prototype,r),t&&Kh(e,t),e}function ET(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Ef(e,r)}function Ef(e,r){return Ef=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Ef(e,r)}function xT(e){var r=PT();return function(){var n=Ga(e),o;if(r){var a=Ga(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return ST(this,o)}}function ST(e,r){if(r&&(Ha(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wr(e)}function Wr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ga(e){return Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ga(e)}function ln(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var TT=Hr(Wh=function(e){ET(t,e);var r=xT(t);function t(n){var o;bT(this,t),o=r.call(this),ln(Wr(o),"stepDrag",void 0),ln(Wr(o),"stepScrollX",0),ln(Wr(o),"stepScrollY",0),ln(Wr(o),"onDraging",function(g){var E=g.deltaX,T=g.deltaY;o.setState({isDraging:!0});var D=o.props.graphModel,B=D.transformModel,G=D.editConfigModel;G.stopMoveGraph||B.translate(E,T)}),ln(Wr(o),"onDragEnd",function(){o.setState({isDraging:!1})}),ln(Wr(o),"zoomHandler",function(g){var E=o.props,T=E.graphModel,D=T.editConfigModel,B=T.transformModel,G=T.gridSize,Z=E.graphModel,ae=g.deltaX,se=g.deltaY;if(!D.stopScrollGraph&&g.ctrlKey!==!0){if(g.preventDefault(),o.stepScrollX+=ae,o.stepScrollY+=se,Math.abs(o.stepScrollX)>=G){var le=o.stepScrollX%G,Ae=o.stepScrollX-le;B.translate(-Ae*B.SCALE_X,0),o.stepScrollX=le}if(Math.abs(o.stepScrollY)>=G){var ge=o.stepScrollY%G,be=o.stepScrollY-ge;B.translate(0,-be*B.SCALE_Y),o.stepScrollY=ge}return}if(!D.stopZoomGraph){g.preventDefault();var Fe=Z.getPointByClient({x:g.clientX,y:g.clientY}),Re=Fe.canvasOverlayPosition,Ze=Re.x,He=Re.y;B.zoom(g.deltaY<0,[Ze,He])}}),ln(Wr(o),"clickHandler",function(g){var E=g.target;if(E.getAttribute("name")==="canvas-overlay"){var T=o.props.graphModel,D=T.selectElements;D.size>0&&T.clearSelectElements(),T.eventCenter.emit(it.BLANK_CLICK,{e:g})}}),ln(Wr(o),"handleContextMenu",function(g){var E=g.target;if(E.getAttribute("name")==="canvas-overlay"){g.preventDefault();var T=o.props.graphModel,D=T.getPointByClient({x:g.clientX,y:g.clientY});T.eventCenter.emit(it.BLANK_CONTEXTMENU,{e:g,position:D})}}),ln(Wr(o),"mouseDownHandler",function(g){var E=o.props.graphModel,T=E.eventCenter,D=E.editConfigModel,B=E.transformModel.SCALE_X,G=E.gridSize,Z=g.target,ae=!D.adjustEdge&&!D.adjustNodePosition;(Z.getAttribute("name")==="canvas-overlay"||ae)&&(D.stopMoveGraph?T.emit(it.BLANK_MOUSEDOWN,{e:g}):(o.stepDrag.setStep(G*B),o.stepDrag.handleMouseDown(g)),o.clickHandler(g))});var a=n.graphModel,s=a.gridSize,p=a.eventCenter;return o.stepDrag=new qn({onDraging:o.onDraging,onDragEnd:o.onDragEnd,step:s,eventType:"BLANK",isStopPropagation:!1,eventCenter:p,model:null}),o.state={isDraging:!1},o}return OT(t,[{key:"render",value:function(){var o=this.props.graphModel.transformModel,a=o.getTransformStyle(),s=a.transform,p=this.props,g=p.children,E=p.dnd,T=this.state.isDraging;return Object(ne.g)("svg",Of({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:T?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},E.eventMap()),Object(ne.g)("g",{transform:s},g))}}]),t}(ne.a))||Wh,MT=TT;function ka(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ka=function(t){return typeof t}:ka=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ka(e)}var Zh;function wT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Jh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AT(e,r,t){return r&&Jh(e.prototype,r),t&&Jh(e,t),e}function NT(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&xf(e,r)}function xf(e,r){return xf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},xf(e,r)}function DT(e){var r=CT();return function(){var n=$a(e),o;if(r){var a=$a(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return jT(this,o)}}function jT(e,r){if(r&&(ka(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qh(e)}function Qh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $a(e){return $a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(e)}function RT(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var IT=Hr(Zh=function(e){NT(t,e);var r=DT(t);function t(){var n;wT(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),RT(Qh(n),"setToolOverlayRef",function(p){var g=n.props.tool,E=g.getInstance();E.components.forEach(function(T){return T(E,p)}),E.components=[]}),n}return AT(t,[{key:"getTools",value:function(){var o=this.props,a=o.tool,s=o.graphModel,p=a.getTools(),g=p.map(function(E){return Object(ne.g)(E,{graphModel:s,logicFlow:a.instance})});return a.components=g,g}},{key:"render",value:function(){return Object(ne.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}]),t}(ne.a))||Zh;function Xa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xa=function(t){return typeof t}:Xa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(e)}function _T(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function qh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BT(e,r,t){return r&&qh(e.prototype,r),t&&qh(e,t),e}function LT(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Sf(e,r)}function Sf(e,r){return Sf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Sf(e,r)}function zT(e){var r=GT();return function(){var n=Ua(e),o;if(r){var a=Ua(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return FT(this,o)}}function FT(e,r){if(r&&(Xa(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return HT(e)}function HT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ua(e){return Ua=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ua(e)}var kT=function(e){LT(t,e);var r=zT(t);function t(){return _T(this,t),r.apply(this,arguments)}return BT(t,[{key:"render",value:function(){var o=this.props.background;return Object(ne.g)("div",{className:"lf-background"},Object(ne.g)("div",{style:o,className:"lf-background-area"}))}}]),t}(ne.a);function Va(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Va=function(t){return typeof t}:Va=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Va(e)}var ev;function $T(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function tv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function XT(e,r,t){return r&&tv(e.prototype,r),t&&tv(e,t),e}function UT(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Pf(e,r)}function Pf(e,r){return Pf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Pf(e,r)}function VT(e){var r=WT();return function(){var n=Ya(e),o;if(r){var a=Ya(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return YT(this,o)}}function YT(e,r){if(r&&(Va(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rv(e)}function rv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ya(e){return Ya=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ya(e)}function KT(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var nv=Hr(ev=function(e){UT(t,e);var r=VT(t);function t(){var n;$T(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),KT(rv(n),"id",Qn()),n}return XT(t,[{key:"renderDot",value:function(){var o=this.props,a=o.config,s=a.color,p=a.thickness,g=p===void 0?2:p,E=o.size,T=o.visible,D=Math.min(Math.max(2,g),E/2),B=1;return T||(B=0),Object(ne.g)("rect",{width:D,height:D,rx:D/2,ry:D/2,fill:s,opacity:B})}},{key:"renderMesh",value:function(){var o=this.props,a=o.config,s=a.color,p=a.thickness,g=p===void 0?1:p,E=o.size,T=o.visible,D=Math.min(Math.max(1,g),E/2),B="M ".concat(E," 0 H0 M0 0 V0 ").concat(E),G=1;return T||(G=0),Object(ne.g)("path",{d:B,stroke:s,strokeWidth:D,opacity:G})}},{key:"render",value:function(){var o=this.props,a=o.type,s=o.size,p=o.graphModel.transformModel,g=p.SCALE_X,E=p.SKEW_Y,T=p.SKEW_X,D=p.SCALE_Y,B=p.TRANSLATE_X,G=p.TRANSLATE_Y,Z=[g,E,T,D,B,G].join(","),ae="matrix(".concat(Z,")");return Object(ne.g)("div",{className:"lf-grid"},Object(ne.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(ne.g)("defs",null,Object(ne.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:ae,x:"0",y:"0",width:s,height:s},a==="dot"&&this.renderDot(),a==="mesh"&&this.renderMesh())),Object(ne.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}]),t}(ne.a))||ev;nv.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},i(52);function Wa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wa=function(t){return typeof t}:Wa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(e)}function ZT(e,r){return eM(e)||qT(e,r)||QT(e,r)||JT()}function JT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QT(e,r){if(e){if(typeof e=="string")return ov(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ov(e,r)}}function ov(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function qT(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function eM(e){if(Array.isArray(e))return e}function tM(e){var r={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(t){var n=ZT(t,2),o=n[0],a=n[1];if(o==="style")r[o]=a;else{var s=Wa(a);s!=="object"&&(r[o]=a)}}),Object(ne.g)("line",r)}var eo=tM;function Ka(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ka=function(t){return typeof t}:Ka=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ka(e)}var iv;function av(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Za(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?av(Object(t),!0).forEach(function(n){rM(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):av(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rM(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function nM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function uv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oM(e,r,t){return r&&uv(e.prototype,r),t&&uv(e,t),e}function iM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Tf(e,r)}function Tf(e,r){return Tf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Tf(e,r)}function aM(e){var r=lM();return function(){var n=Ja(e),o;if(r){var a=Ja(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return uM(this,o)}}function uM(e,r){if(r&&(Ka(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sM(e)}function sM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lM(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ja(e){return Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ja(e)}var fM=Hr(iv=function(e){iM(t,e);var r=aM(t);function t(){return nM(this,t),r.apply(this,arguments)}return oM(t,[{key:"render",value:function(){var o=this.props.snaplineModel,a=o.position,s=o.isShowHorizontal,p=o.isShowVertical,g=o.getStyle(),E=a.x,T=E===void 0?0:E,D=a.y,B=D===void 0?0:D,G=Za(Za({x1:-1e5,y1:B,x2:1e5,y2:B},g),{},{stroke:s?g.stroke:"none"}),Z=Za(Za({x1:T,y1:-1e5,x2:T,y2:1e5},g),{},{stroke:p?g.stroke:"none"});return Object(ne.g)("g",{className:"lf-snapline"},Object(ne.g)(eo,G),Object(ne.g)(eo,Z))}}]),t}(ne.a))||iv;function Qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qa=function(t){return typeof t}:Qa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(e)}function cM(e,r){return vM(e)||hM(e,r)||pM(e,r)||dM()}function dM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pM(e,r){if(e){if(typeof e=="string")return sv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return sv(e,r)}}function sv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function hM(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function vM(e){if(Array.isArray(e))return e}function jn(e){var r=e.x,t=e.y,n=e.width,o=e.height,a=e.className,s=e.radius,p=r-n/2,g=t-o/2,E={};return Object.entries(e).forEach(function(T){var D=cM(T,2),B=D[0],G=D[1],Z=Qa(G);Z!=="object"&&(E[B]=G)}),a?E.className="lf-basic-shape ".concat(a):E.className="lf-basic-shape",s&&(E.rx=s,E.ry=s),E.x=p,E.y=g,Object(ne.g)("rect",E)}jn.defaultProps={className:"",radius:""};function qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qa=function(t){return typeof t}:qa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}var lv;function Mo(){return Mo=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Mo.apply(this,arguments)}function fv(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function cv(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?fv(Object(t),!0).forEach(function(n){yM(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yM(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function gM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function dv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mM(e,r,t){return r&&dv(e.prototype,r),t&&dv(e,t),e}function bM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Mf(e,r)}function Mf(e,r){return Mf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Mf(e,r)}function OM(e){var r=SM();return function(){var n=eu(e),o;if(r){var a=eu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return EM(this,o)}}function EM(e,r){if(r&&(qa(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xM(e)}function xM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SM(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function eu(e){return eu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},eu(e)}var PM=Hr(lv=function(e){bM(t,e);var r=OM(t);function t(){return gM(this,t),r.apply(this,arguments)}return mM(t,[{key:"getNodesOutline",value:function(){var o=this.props.graphModel,a=o.nodes,s=o.editConfigModel,p=s.hoverOutline,g=s.nodeSelectedOutline,E=[];return a.forEach(function(T){if(T.isHovered||T.isSelected){var D=T.isHovered,B=T.isSelected,G=T.x,Z=T.y,ae=T.width,se=T.height;if(g&&B||p&&D){var le=T.getOutlineStyle(),Ae={};if(Object.keys(le).forEach(function(be){be!=="hover"&&(Ae[be]=le[be])}),D){var ge=le.hover;Ae=cv(cv({},Ae),ge)}E.push(Object(ne.g)(jn,Mo({className:"lf-outline-node",x:G,y:Z,width:ae+10,height:se+10},Ae)))}}}),E}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,a=o.edges,s=o.editConfigModel,p=s.edgeSelectedOutline,g=s.hoverOutline,E=[],T=0;T<a.length;T++){var D=a[T];(p&&D.isSelected||g&&D.isHovered)&&(D.modelType===pt.LINE_EDGE?E.push(this.getLineOutline(D)):D.modelType===pt.POLYLINE_EDGE?E.push(this.getPolylineOutline(D)):D.modelType===pt.BEZIER_EDGE&&E.push(this.getBezierOutline(D)))}return E}},{key:"getLineOutline",value:function(o){var a=o.startPoint,s=o.endPoint,p=(a.x+s.x)/2,g=(a.y+s.y)/2,E=Math.abs(a.x-s.x)+10,T=Math.abs(a.y-s.y)+10,D=o.getOutlineStyle();return Object(ne.g)(jn,Mo({className:"lf-outline-edge",x:p,y:g,width:E,height:T},D))}},{key:"getPolylineOutline",value:function(o){var a=o.points,s=So(a),p=li(s,8),g=p.x,E=p.y,T=p.width,D=p.height,B=o.getOutlineStyle();return Object(ne.g)(jn,Mo({className:"lf-outline",x:g,y:E,width:T,height:D},B))}},{key:"getBezierOutline",value:function(o){var a=o.path,s=Ba(a),p=li(s,8),g=p.x,E=p.y,T=p.width,D=p.height,B=o.getOutlineStyle();return Object(ne.g)(jn,Mo({className:"lf-outline",x:g,y:E,width:T,height:D},B))}},{key:"render",value:function(){return Object(ne.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}]),t}(ne.a))||lv;function tu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tu=function(t){return typeof t}:tu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function TM(e,r){return NM(e)||AM(e,r)||wM(e,r)||MM()}function MM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wM(e,r){if(e){if(typeof e=="string")return pv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pv(e,r)}}function pv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function AM(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function NM(e){if(Array.isArray(e))return e}function di(e){var r=e.x,t=r===void 0?0:r,n=e.y,o=n===void 0?0:n,a=e.r,s=a===void 0?4:a,p=e.className,g={cx:t,cy:o,r:s,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(E){var T=TM(E,2),D=T[0],B=T[1],G=tu(B);G!=="object"&&(g[D]=B)}),p?g.className="lf-basic-shape ".concat(p):g.className="lf-basic-shape",Object(ne.g)("circle",g)}function ru(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ru=function(t){return typeof t}:ru=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(e)}var hv;function DM(e,r){return IM(e)||RM(e,r)||CM(e,r)||jM()}function jM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CM(e,r){if(e){if(typeof e=="string")return vv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return vv(e,r)}}function vv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function RM(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function IM(e){if(Array.isArray(e))return e}function pi(){return pi=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},pi.apply(this,arguments)}function yv(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function gv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mv(e,r,t){return r&&gv(e.prototype,r),t&&gv(e,t),e}function bv(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&wf(e,r)}function wf(e,r){return wf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},wf(e,r)}function Ov(e){var r=BM();return function(){var n=ou(e),o;if(r){var a=ou(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return _M(this,o)}}function _M(e,r){if(r&&(ru(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nu(e)}function nu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BM(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ou(e){return ou=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ou(e)}function Af(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Ev=function(e){bv(t,e);var r=Ov(t);function t(){var n;return yv(this,t),n=r.call(this),Af(nu(n),"dragHandler",void 0),Af(nu(n),"onDraging",function(o){var a=o.event,s=n.props,p=s.graphModel,g=s.bezierModel,E=s.type,T=p.getPointByClient({x:a.clientX,y:a.clientY}),D=T.canvasOverlayPosition,B=D.x,G=D.y;g.updateAdjustAnchor({x:B,y:G},E)}),Af(nu(n),"onDragEnd",function(){var o=n.props.bezierModel;o.isDragging=!1}),n.dragHandler=new qn({onDraging:n.onDraging,onDragEnd:n.onDragEnd}),n}return mv(t,[{key:"render",value:function(){var o=this,a=this.props.position,s=a.x,p=a.y,g=this.props.bezierModel,E=g.getEdgeStyle(),T=E.adjustAnchor;return Object(ne.g)(di,pi({className:"lf-bezier-adjust-anchor",x:s,y:p},T,{onMouseDown:function(B){o.dragHandler.handleMouseDown(B)}}))}}]),t}(ne.a),LM=Hr(hv=function(e){bv(t,e);var r=Ov(t);function t(){return yv(this,t),r.apply(this,arguments)}return mv(t,[{key:"getBezierAdjust",value:function(o,a){var s=o.path,p=o.id,g=Ba(s),E=DM(g,4),T=E[0],D=E[1],B=E[2],G=E[3],Z=o.getEdgeStyle(),ae=Z.adjustLine,se=[];return se.push(Object(ne.g)(eo,pi({x1:T.x,y1:T.y,x2:D.x,y2:D.y},ae))),se.push(Object(ne.g)(Ev,{position:D,bezierModel:o,graphModel:a,key:"".concat(p,"_ePre"),type:"sNext"})),se.push(Object(ne.g)(eo,pi({x1:G.x,y1:G.y,x2:B.x,y2:B.y},ae))),se.push(Object(ne.g)(Ev,{position:B,bezierModel:o,graphModel:a,key:"".concat(p,"_sNext"),type:"ePre"})),se}},{key:"selectedBezierEdge",value:function(){for(var o=this.props.graphModel,a=o.edges,s=[],p=0;p<a.length;p++){var g=a[p];g.isSelected&&g.modelType===pt.BEZIER_EDGE&&g.draggable&&s.push(this.getBezierAdjust(g,o))}return s}},{key:"render",value:function(){return Object(ne.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),t}(ne.a))||hv;function iu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?iu=function(t){return typeof t}:iu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}var xv;function zM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Sv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function FM(e,r,t){return r&&Sv(e.prototype,r),t&&Sv(e,t),e}function HM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Nf(e,r)}function Nf(e,r){return Nf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Nf(e,r)}function GM(e){var r=XM();return function(){var n=au(e),o;if(r){var a=au(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return kM(this,o)}}function kM(e,r){if(r&&(iu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $M(e)}function $M(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XM(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function au(e){return au=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},au(e)}var UM=Hr(xv=function(e){HM(t,e);var r=GM(t);function t(){return zM(this,t),r.apply(this,arguments)}return FM(t,[{key:"render",value:function(){var o=this.props.graphModel.transformModel,a=o.getTransformStyle(),s=a.transform,p=this.props.children;return Object(ne.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(ne.g)("g",{transform:s},p))}}]),t}(ne.a))||xv;function uu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?uu=function(t){return typeof t}:uu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uu(e)}var Pv;function Df(){return Df=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Df.apply(this,arguments)}function VM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Tv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function YM(e,r,t){return r&&Tv(e.prototype,r),t&&Tv(e,t),e}function WM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&jf(e,r)}function jf(e,r){return jf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},jf(e,r)}function KM(e){var r=QM();return function(){var n=su(e),o;if(r){var a=su(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return ZM(this,o)}}function ZM(e,r){if(r&&(uu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JM(e)}function JM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QM(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function su(e){return su=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},su(e)}var qM=Hr(Pv=function(e){WM(t,e);var r=KM(t);function t(){return VM(this,t),r.apply(this,arguments)}return YM(t,[{key:"getComponent",value:function(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",p=this.props.getView,g=p(o.type);return Object(ne.g)(g,{key:o.id,model:o,graphModel:a,overlay:s})}},{key:"render",value:function(){var o=this,a=this.props,s=a.graphModel,p=a.tool,g=a.options,E=a.dnd,T=a.snaplineModel,D={};g.width&&(D.width="".concat(s.width,"px")),g.height&&(D.height="".concat(s.height,"px"));var B=s.fakerNode,G=s.editConfigModel,Z=G.adjustEdge;return Object(ne.g)("div",{className:"lf-graph",style:D},Object(ne.g)(MT,{graphModel:s,dnd:E},Object(ne.g)("g",{className:"lf-base"},ya(s.sortElements,function(ae){return o.getComponent(ae,s)})),B?this.getComponent(B,s):""),Object(ne.g)(UM,{graphModel:s},Object(ne.g)(PM,{graphModel:s}),Z?Object(ne.g)(LM,{graphModel:s}):"",g.snapline!==!1?Object(ne.g)(fM,{snaplineModel:T}):""),Object(ne.g)(IT,{graphModel:s,tool:p}),g.background&&Object(ne.g)(kT,{background:g.background}),g.grid&&Object(ne.g)(nv,Df({},g.grid,{graphModel:s})))}}]),t}(ne.a))||Pv,ew=qM;function Mv(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function lu(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Mv(Object(t),!0).forEach(function(n){fn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Mv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function tw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function wv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rw(e,r,t){return r&&wv(e.prototype,r),t&&wv(e,t),e}function fn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var nw=function(){function e(r){var t=this;tw(this,e),fn(this,"nodeConfig",void 0),fn(this,"lf",void 0),fn(this,"fakerNode",void 0),fn(this,"stopDrag",function(){t.nodeConfig=null,window.document.removeEventListener("mouseup",t.stopDrag)}),fn(this,"dragEnter",function(o){!t.nodeConfig||t.fakerNode||(t.fakerNode=t.lf.createFakerNode(lu(lu({},t.nodeConfig),t.clientToLocalPoint({x:o.clientX,y:o.clientY}))))}),fn(this,"onDragOver",function(o){if(o.preventDefault(),t.fakerNode){var a=t.clientToLocalPoint({x:o.clientX,y:o.clientY}),s=a.x,p=a.y;t.fakerNode.moveTo(s,p);var g=t.fakerNode.getData();t.lf.setNodeSnapLine(g),t.lf.graphModel.eventCenter.emit(it.NODE_DND_DRAG,{data:g})}return!1}),fn(this,"onDragLeave",function(){t.fakerNode&&(t.lf.removeNodeSnapLine(),t.lf.graphModel.removeFakerNode(),t.fakerNode=null)}),fn(this,"onDrop",function(o){if(!(!t.lf.graphModel||!o||!t.nodeConfig)){var a=t.lf.addNode(lu(lu({},t.nodeConfig),t.clientToLocalPoint({x:o.clientX,y:o.clientY})));o.preventDefault(),o.stopPropagation(),t.nodeConfig=null,t.lf.removeNodeSnapLine(),t.lf.graphModel.removeFakerNode(),t.fakerNode=null;var s=a.getData();t.lf.graphModel.eventCenter.emit(it.NODE_DND_ADD,{data:s,e:o})}});var n=r.lf;this.lf=n}return rw(e,[{key:"clientToLocalPoint",value:function(t){var n=t.x,o=t.y,a=Sd(this.lf.options,["grid","size"]),s=this.lf.graphModel.getPointByClient({x:n,y:o}),p=s.canvasOverlayPosition,g=p.x,E=p.y;return{x:An(g,a),y:An(E,a)}}},{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}}}]),e}();function Av(e){var r=e.container,t=e.grid,n=e.width,o=e.height;if(!r)throw new Error("请检查 container 参数是否有效");if(typeof n=="string"||typeof o=="string")throw new Error("width或height不支持传入字符串请传数字");return t&&(e.grid=nr({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},t)),nr({},Nv,e)}var Nv={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function fu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fu=function(t){return typeof t}:fu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(e)}var gt,Dv;function Cf(e,r){return uw(e)||aw(e,r)||iw(e,r)||ow()}function ow(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iw(e,r){if(e){if(typeof e=="string")return jv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return jv(e,r)}}function jv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function aw(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function uw(e){if(Array.isArray(e))return e}function Cv(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function cu(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Cv(Object(t),!0).forEach(function(n){Iv(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sw(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function lw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Rv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fw(e,r,t){return r&&Rv(e.prototype,r),t&&Rv(e,t),e}function wo(){return typeof Reflect<"u"&&Reflect.get?wo=Reflect.get:wo=function(r,t,n){var o=cw(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},wo.apply(this,arguments)}function cw(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Cn(e),e!==null););return e}function dw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Rf(e,r)}function Rf(e,r){return Rf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Rf(e,r)}function pw(e){var r=vw();return function(){var n=Cn(e),o;if(r){var a=Cn(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return hw(this,o)}}function hw(e,r){if(r&&(fu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return du(e)}function du(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cn(e){return Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(e)}function Iv(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ir(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var If=(gt=function(e){dw(t,e);var r=pw(t);function t(){var n;lw(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),Iv(du(n),"modelType",pt.BEZIER_EDGE),sw(du(n),"path",Dv,du(n)),n}return fw(t,[{key:"initEdgeData",value:function(o){this.offset=100,wo(Cn(t.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.bezier,a=wo(Cn(t.prototype),"getEdgeStyle",this).call(this);return cu(cu({},a),jt(o))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var o=0,a=0;return this.pointsList.forEach(function(s){var p=s.x,g=s.y;o+=p,a+=g}),{x:o/this.pointsList.length,y:a/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 o=wo(Cn(t.prototype),"getData",this).call(this),a=this.pointsList.map(function(s){var p=s.x,g=s.y;return{x:p,y:g}});return cu(cu({},o),{},{pointsList:a})}},{key:"getControls",value:function(){var o=this.startPoint,a=this.endPoint,s=wh({start:o,end:a,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset});return s}},{key:"getPath",value:function(o){var a=Cf(o,4),s=a[0],p=a[1],g=a[2],E=a[3];return"M ".concat(s.x," ").concat(s.y,`
C `).concat(p.x," ").concat(p.y,`,
`).concat(g.x," ").concat(g.y,`,
`).concat(E.x," ").concat(E.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var o=this.getControls(),a=o.sNext,s=o.ePre;this.updatePath(a,s)}},{key:"updatePath",value:function(o,a){var s={x:this.startPoint.x,y:this.startPoint.y},p={x:this.endPoint.x,y:this.endPoint.y};if(!o||!a){var g=this.getControls();o=g.sNext,a=g.ePre}this.pointsList=[s,o,a,p],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePoints()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"moveStartPoint",value:function(o,a){this.startPoint.x+=o,this.startPoint.y+=a;var s=Cf(this.pointsList,3),p=s[1],g=s[2];p.x+=o,p.y+=a,this.updatePath(p,g)}},{key:"moveEndPoint",value:function(o,a){this.endPoint.x+=o,this.endPoint.y+=a;var s=Cf(this.pointsList,3),p=s[1],g=s[2];g.x+=o,g.y+=a,this.updatePath(p,g)}},{key:"updateAdjustAnchor",value:function(o,a){a==="sNext"?this.pointsList[1]=o:a==="ePre"&&(this.pointsList[2]=o),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 o=this.pointsList;return o[o.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(o){var a=o.startPoint,s=o.endPoint,p=o.sourceNode,g=o.targetNode,E=wh({start:a,end:s,sourceNode:p,targetNode:g,offset:this.offset}),T=E.sNext,D=E.ePre;this.pointsList=[a,T,D,s],this.initPoints()}}]),t}(uf),Dv=Ir(gt.prototype,"path",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ir(gt.prototype,"initPoints",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"initPoints"),gt.prototype),Ir(gt.prototype,"updatePoints",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updatePoints"),gt.prototype),Ir(gt.prototype,"updateStartPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateStartPoint"),gt.prototype),Ir(gt.prototype,"updateEndPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateEndPoint"),gt.prototype),Ir(gt.prototype,"moveStartPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"moveStartPoint"),gt.prototype),Ir(gt.prototype,"moveEndPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"moveEndPoint"),gt.prototype),Ir(gt.prototype,"updateAdjustAnchor",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateAdjustAnchor"),gt.prototype),Ir(gt.prototype,"getAdjustStart",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"getAdjustStart"),gt.prototype),Ir(gt.prototype,"getAdjustEnd",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"getAdjustEnd"),gt.prototype),Ir(gt.prototype,"updateAfterAdjustStartAndEnd",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateAfterAdjustStartAndEnd"),gt.prototype),gt);function yw(e){return e==null}var gw=yw,Ce,_v,Bv,Lv,zv,Fv,Hv,Gv,kv,$v,Xv,Uv,Vv,Yv,Wv,Kv,Zv,Jv,Qv,qv;function pu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pu=function(t){return typeof t}:pu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}function mw(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=bw(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(E){throw E},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,p;return{s:function(){t=t.call(e)},n:function(){var E=t.next();return a=E.done,E},e:function(E){s=!0,p=E},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(s)throw p}}}}function bw(e,r){if(e){if(typeof e=="string")return ey(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ey(e,r)}}function ey(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function ty(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function ir(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ty(Object(t),!0).forEach(function(n){fr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ty(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kt(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function Ow(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ry(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ew(e,r,t){return r&&ry(e.prototype,r),t&&ry(e,t),e}function fr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function st(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var cn=(Ce=function(){function e(r,t){Ow(this,e),fr(this,"id",Qn()),kt(this,"type",_v,this),kt(this,"x",Bv,this),kt(this,"y",Lv,this),kt(this,"text",zv,this),kt(this,"properties",Fv,this),kt(this,"_width",Hv,this),kt(this,"_height",Gv,this),kt(this,"anchorsOffset",kv,this),kt(this,"isSelected",$v,this),kt(this,"isHovered",Xv,this),kt(this,"isShowAnchor",Uv,this),kt(this,"isDragging",Vv,this),kt(this,"isHitable",Yv,this),kt(this,"draggable",Wv,this),kt(this,"visible",Kv,this),fr(this,"virtual",!1),fr(this,"graphModel",void 0),kt(this,"zIndex",Zv,this),kt(this,"state",Jv,this),kt(this,"autoToFront",Qv,this),kt(this,"style",qv,this),fr(this,"BaseType",Ht.NODE),fr(this,"modelType",pt.NODE),fr(this,"additionStateData",void 0),fr(this,"targetRules",[]),fr(this,"sourceRules",[]),fr(this,"moveRules",[]),fr(this,"hasSetTargetRules",!1),fr(this,"hasSetSourceRules",!1),this.graphModel=t,this.initNodeData(r),this.setAttributes()}return Ew(e,[{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 n=this.graphModel.idGenerator,o=n&&n(t.type);o&&(t.id=o);var a=this.createId();a&&(t.id=a)}this.formatText(t),nr(this,sP(t));var s=this.graphModel.overlapMode;s===gr.INCREASE&&(this.zIndex=t.zIndex||of())}},{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&&typeof t.text=="string"?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&t.text.editable===void 0&&(t.text.editable=!0)}},{key:"getData",value:function(){var t=this.text,n=t.x,o=t.y,a=t.value,s=this.properties;Object(f.x)(s)&&(s=Object(f.I)(s));var p={id:this.id,type:this.type,x:this.x,y:this.y,properties:s};return this.graphModel.overlapMode===gr.INCREASE&&(p.zIndex=this.zIndex),a&&(p.text={x:n,y:o,value:a}),p}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(f.I)(this.properties)}},{key:"getNodeStyle",value:function(){return ir(ir({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return jt(t)}},{key:"getAnchorStyle",value:function(t){var n=this.graphModel.theme.anchor;return jt(n)}},{key:"getAnchorLineStyle",value:function(t){var n=this.graphModel.theme.anchorLine;return jt(n)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return jt(t)}},{key:"isAllowConnectedAsSource",value:function(t,n,o){var a=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var s=!0,p,g=0;g<a.length;g++){var E=a[g];if(!E.validate.call(this,this,t,n,o)){s=!1,p=E.message;break}}return{isAllPass:s,msg:p}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,n,o){var a=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var s=!0,p,g=0;g<a.length;g++){var E=a[g];if(!E.validate.call(this,t,this,n,o)){s=!1,p=E.message;break}}return{isAllPass:s,msg:p}}},{key:"isAllowMoveNode",value:function(t,n){var o=!0,a=!0,s=this.moveRules.concat(this.graphModel.nodeMoveRules),p=mw(s),g;try{for(p.s();!(g=p.n()).done;){var E=g.value,T=E(this,t,n);if(!T)return!1;if(pu(T)==="object"){var D=T;if(D.x===!1&&D.y===!1)return!1;o=o&&D.x,a=a&&D.y}}}catch(B){p.e(B)}finally{p.f()}return{x:o,y:a}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,n=this.id,o=this.x,a=this.y;return t&&t.length>0?t.map(function(s,p){return s.length?(s=s,{id:"".concat(n,"_").concat(p),x:o+s[0],y:a+s[1]}):(s=s,ir(ir({},s),{},{x:o+s.x,y:a+s.y,id:s.id||"".concat(n,"_").concat(p)}))}):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(!gw(t))for(var n=0;n<this.anchors.length;n++){var o=this.anchors[n];if(o.id===t)return o}}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,s=!1;if(o)a=!0,s=!0;else{var p=this.isAllowMoveNode(t,n);typeof p=="boolean"?(a=p,s=p):(a=p.x,s=p.y)}if(a){var g=this.x+t;this.x=g,this.text&&this.moveText(t,0)}if(s){var E=this.y+n;this.y=E,this.text&&this.moveText(0,n)}return a||s}},{key:"getMoveDistance",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,s=!1,p=0,g=0;if(o)a=!0,s=!0;else{var E=this.isAllowMoveNode(t,n);typeof E=="boolean"?(a=E,s=E):(a=E.x,s=E.y)}if(a&&t){var T=this.x+t;this.x=T,this.text&&this.moveText(t,0),p=t}if(s&&n){var D=this.y+n;this.y=D,this.text&&this.moveText(0,n),g=n}return[p,g]}},{key:"moveTo",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=t-this.x,s=n-this.y;return!o&&!this.isAllowMoveNode(a,s)?!1:(this.text&&this.text&&this.moveText(a,s),this.x=t,this.y=n,!0)}},{key:"moveText",value:function(t,n){var o=this.text,a=o.x,s=o.y,p=o.value,g=o.draggable,E=o.editable;this.text={value:p,editable:E,draggable:g,x:a+t,y:s+n}}},{key:"updateText",value:function(t){this.text=ir(ir({},this.text),{},{value:t})}},{key:"setSelected",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isSelected=t}},{key:"setHovered",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHovered=t,this.setIsShowAnchor(t)}},{key:"setIsShowAnchor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isShowAnchor=t}},{key:"setHitable",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHitable=t}},{key:"setElementState",value:function(t,n){this.state=t,this.additionStateData=n}},{key:"setProperty",value:function(t,n){this.properties=ir(ir({},this.properties),{},fr({},t,qt(n))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=ir(ir({},this.properties),qt(t)),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setStyle",value:function(t,n){this.style=ir(ir({},this.style),{},fr({},t,qt(n)))}},{key:"setStyles",value:function(t){this.style=ir(ir({},this.style),qt(t))}},{key:"updateStyles",value:function(t){this.style=ir({},qt(t))}},{key:"setZIndex",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){nr(this,t)}}]),e}(),_v=st(Ce.prototype,"type",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Bv=st(Ce.prototype,"x",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Lv=st(Ce.prototype,"y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),zv=st(Ce.prototype,"text",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Fv=st(Ce.prototype,"properties",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Hv=st(Ce.prototype,"_width",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Gv=st(Ce.prototype,"_height",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),kv=st(Ce.prototype,"anchorsOffset",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),$v=st(Ce.prototype,"isSelected",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xv=st(Ce.prototype,"isHovered",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Uv=st(Ce.prototype,"isShowAnchor",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Vv=st(Ce.prototype,"isDragging",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yv=st(Ce.prototype,"isHitable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Wv=st(Ce.prototype,"draggable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Kv=st(Ce.prototype,"visible",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Zv=st(Ce.prototype,"zIndex",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Jv=st(Ce.prototype,"state",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Qv=st(Ce.prototype,"autoToFront",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qv=st(Ce.prototype,"style",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),st(Ce.prototype,"incoming",[f.m],Object.getOwnPropertyDescriptor(Ce.prototype,"incoming"),Ce.prototype),st(Ce.prototype,"outgoing",[f.m],Object.getOwnPropertyDescriptor(Ce.prototype,"outgoing"),Ce.prototype),st(Ce.prototype,"addNodeMoveRules",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"addNodeMoveRules"),Ce.prototype),st(Ce.prototype,"move",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"move"),Ce.prototype),st(Ce.prototype,"getMoveDistance",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"getMoveDistance"),Ce.prototype),st(Ce.prototype,"moveTo",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"moveTo"),Ce.prototype),st(Ce.prototype,"moveText",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"moveText"),Ce.prototype),st(Ce.prototype,"updateText",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"updateText"),Ce.prototype),st(Ce.prototype,"setSelected",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setSelected"),Ce.prototype),st(Ce.prototype,"setHovered",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setHovered"),Ce.prototype),st(Ce.prototype,"setIsShowAnchor",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setIsShowAnchor"),Ce.prototype),st(Ce.prototype,"setHitable",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setHitable"),Ce.prototype),st(Ce.prototype,"setElementState",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setElementState"),Ce.prototype),st(Ce.prototype,"setProperty",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setProperty"),Ce.prototype),st(Ce.prototype,"setProperties",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setProperties"),Ce.prototype),st(Ce.prototype,"deleteProperty",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"deleteProperty"),Ce.prototype),st(Ce.prototype,"setStyle",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setStyle"),Ce.prototype),st(Ce.prototype,"setStyles",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setStyles"),Ce.prototype),st(Ce.prototype,"updateStyles",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"updateStyles"),Ce.prototype),st(Ce.prototype,"setZIndex",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"setZIndex"),Ce.prototype),st(Ce.prototype,"updateAttributes",[f.k],Object.getOwnPropertyDescriptor(Ce.prototype,"updateAttributes"),Ce.prototype),Ce);function hu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hu=function(t){return typeof t}:hu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(e)}var dn,ny;function oy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function iy(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?oy(Object(t),!0).forEach(function(n){uy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xw(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function Sw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ay(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pw(e,r,t){return r&&ay(e.prototype,r),t&&ay(e,t),e}function vu(){return typeof Reflect<"u"&&Reflect.get?vu=Reflect.get:vu=function(r,t,n){var o=Tw(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},vu.apply(this,arguments)}function Tw(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Ao(e),e!==null););return e}function Mw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&_f(e,r)}function _f(e,r){return _f=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},_f(e,r)}function ww(e){var r=Nw();return function(){var n=Ao(e),o;if(r){var a=Ao(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Aw(this,o)}}function Aw(e,r){if(r&&(hu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yu(e)}function yu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ao(e){return Ao=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ao(e)}function uy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Bf(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Lf=(dn=function(e){Mw(t,e);var r=ww(t);function t(){var n;Sw(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),uy(yu(n),"modelType",pt.CIRCLE_NODE),xw(yu(n),"r",ny,yu(n)),n}return Pw(t,[{key:"width",get:function(){return this.r*2}},{key:"height",get:function(){return this.r*2}},{key:"getNodeStyle",value:function(){var o=vu(Ao(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.circle;return iy(iy({},o),jt(a))}},{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,s=this.r;return[{x:o,y:a-s,id:"".concat(this.id,"_0")},{x:o+s,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+s,id:"".concat(this.id,"_2")},{x:o-s,y:a,id:"".concat(this.id,"_3")}]}}]),t}(cn),ny=Bf(dn.prototype,"r",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Bf(dn.prototype,"width",[f.m],Object.getOwnPropertyDescriptor(dn.prototype,"width"),dn.prototype),Bf(dn.prototype,"height",[f.m],Object.getOwnPropertyDescriptor(dn.prototype,"height"),dn.prototype),dn);i(127);function gu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gu=function(t){return typeof t}:gu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(e)}var er,sy,ly;function zf(e,r){return Rw(e)||Cw(e,r)||jw(e,r)||Dw()}function Dw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jw(e,r){if(e){if(typeof e=="string")return fy(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fy(e,r)}}function fy(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Cw(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function Rw(e){if(Array.isArray(e))return e}function cy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function dy(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?cy(Object(t),!0).forEach(function(n){vy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function py(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function Iw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function hy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _w(e,r,t){return r&&hy(e.prototype,r),t&&hy(e,t),e}function mu(){return typeof Reflect<"u"&&Reflect.get?mu=Reflect.get:mu=function(r,t,n){var o=Bw(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},mu.apply(this,arguments)}function Bw(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Do(e),e!==null););return e}function Lw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Ff(e,r)}function Ff(e,r){return Ff=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Ff(e,r)}function zw(e){var r=Hw();return function(){var n=Do(e),o;if(r){var a=Do(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Fw(this,o)}}function Fw(e,r){if(r&&(gu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return No(e)}function No(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Do(e){return Do=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(e)}function vy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function jo(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Hf=(er=function(e){Lw(t,e);var r=zw(t);function t(){var n;Iw(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),vy(No(n),"modelType",pt.DIAMOND_NODE),py(No(n),"rx",sy,No(n)),py(No(n),"ry",ly,No(n)),n}return _w(t,[{key:"getNodeStyle",value:function(){var o=mu(Do(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.diamond;return dy(dy({},o),jt(a))}},{key:"points",get:function(){var o=this.x,a=this.y,s=this.rx,p=this.ry;return[[o,a-p],[o+s,a],[o,a+p],[o-s,a]]}},{key:"pointsPosition",get:function(){var o=this.points.map(function(a){return{x:a[0],y:a[1]}});return o}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var p=zf(s,1),g=p[0];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var p=zf(s,2),g=p[1];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"getDefaultAnchor",value:function(){var o=this;return this.points.map(function(a,s){var p=zf(a,2),g=p[0],E=p[1];return{x:g,y:E,id:"".concat(o.id,"_").concat(s)}})}}]),t}(cn),sy=jo(er.prototype,"rx",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),ly=jo(er.prototype,"ry",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),jo(er.prototype,"points",[f.m],Object.getOwnPropertyDescriptor(er.prototype,"points"),er.prototype),jo(er.prototype,"pointsPosition",[f.m],Object.getOwnPropertyDescriptor(er.prototype,"pointsPosition"),er.prototype),jo(er.prototype,"width",[f.m],Object.getOwnPropertyDescriptor(er.prototype,"width"),er.prototype),jo(er.prototype,"height",[f.m],Object.getOwnPropertyDescriptor(er.prototype,"height"),er.prototype),er);function bu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bu=function(t){return typeof t}:bu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(e)}var Kr,yy,gy;function my(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function by(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?my(Object(t),!0).forEach(function(n){xy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):my(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Oy(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function Gw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ey(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kw(e,r,t){return r&&Ey(e.prototype,r),t&&Ey(e,t),e}function Ou(){return typeof Reflect<"u"&&Reflect.get?Ou=Reflect.get:Ou=function(r,t,n){var o=$w(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Ou.apply(this,arguments)}function $w(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Ro(e),e!==null););return e}function Xw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Gf(e,r)}function Gf(e,r){return Gf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Gf(e,r)}function Uw(e){var r=Yw();return function(){var n=Ro(e),o;if(r){var a=Ro(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Vw(this,o)}}function Vw(e,r){if(r&&(bu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Co(e)}function Co(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(e)}function xy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Eu(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var kf=(Kr=function(e){Xw(t,e);var r=Uw(t);function t(){var n;Gw(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),xy(Co(n),"modelType",pt.ELLIPSE_NODE),Oy(Co(n),"rx",yy,Co(n)),Oy(Co(n),"ry",gy,Co(n)),n}return kw(t,[{key:"getNodeStyle",value:function(){var o=Ou(Ro(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.ellipse;return by(by({},o),jt(a))}},{key:"width",get:function(){return this.rx*2}},{key:"height",get:function(){return this.ry*2}},{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,s=this.rx,p=this.ry;return[{x:o,y:a-p,id:"".concat(this.id,"_0")},{x:o+s,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+p,id:"".concat(this.id,"_2")},{x:o-s,y:a,id:"".concat(this.id,"_3")}]}}]),t}(cn),yy=Eu(Kr.prototype,"rx",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),gy=Eu(Kr.prototype,"ry",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Eu(Kr.prototype,"width",[f.m],Object.getOwnPropertyDescriptor(Kr.prototype,"width"),Kr.prototype),Eu(Kr.prototype,"height",[f.m],Object.getOwnPropertyDescriptor(Kr.prototype,"height"),Kr.prototype),Kr);function xu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xu=function(t){return typeof t}:xu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xu(e)}var Ar,Sy;function $f(e,r){return Jw(e)||Zw(e,r)||Kw(e,r)||Ww()}function Ww(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kw(e,r){if(e){if(typeof e=="string")return Py(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Py(e,r)}}function Py(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Zw(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function Jw(e){if(Array.isArray(e))return e}function Ty(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function My(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ty(Object(t),!0).forEach(function(n){Ay(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ty(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qw(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function qw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function wy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eA(e,r,t){return r&&wy(e.prototype,r),t&&wy(e,t),e}function Su(){return typeof Reflect<"u"&&Reflect.get?Su=Reflect.get:Su=function(r,t,n){var o=tA(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Su.apply(this,arguments)}function tA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Io(e),e!==null););return e}function rA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Xf(e,r)}function Xf(e,r){return Xf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Xf(e,r)}function nA(e){var r=iA();return function(){var n=Io(e),o;if(r){var a=Io(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return oA(this,o)}}function oA(e,r){if(r&&(xu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pu(e)}function Pu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iA(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Io(e){return Io=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(e)}function Ay(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Tu(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Uf=(Ar=function(e){rA(t,e);var r=nA(t);function t(){var n;qw(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),Ay(Pu(n),"modelType",pt.POLYGON_NODE),Qw(Pu(n),"points",Sy,Pu(n)),n}return eA(t,[{key:"getNodeStyle",value:function(){var o=Su(Io(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.polygon;return My(My({},o),jt(a))}},{key:"pointsPosition",get:function(){var o=this.x,a=this.y,s=this.width,p=this.height,g=this.points.map(function(E){return{x:E[0]+o-s/2,y:E[1]+a-p/2}});return g}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var p=$f(s,1),g=p[0];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var p=$f(s,2),g=p[1];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"getDefaultAnchor",value:function(){var o=this,a=this.x,s=this.y,p=this.width,g=this.height,E=this.points;return E.map(function(T,D){var B=$f(T,2),G=B[0],Z=B[1];return{x:a+G-p/2,y:s+Z-g/2,id:"".concat(o.id,"_").concat(D)}})}}]),t}(cn),Sy=Tu(Ar.prototype,"points",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Tu(Ar.prototype,"pointsPosition",[f.m],Object.getOwnPropertyDescriptor(Ar.prototype,"pointsPosition"),Ar.prototype),Tu(Ar.prototype,"width",[f.m],Object.getOwnPropertyDescriptor(Ar.prototype,"width"),Ar.prototype),Tu(Ar.prototype,"height",[f.m],Object.getOwnPropertyDescriptor(Ar.prototype,"height"),Ar.prototype),Ar);function Mu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mu=function(t){return typeof t}:Mu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(e)}var Vf,Ny;function Dy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function jy(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Dy(Object(t),!0).forEach(function(n){Ry(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aA(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function uA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Cy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sA(e,r,t){return r&&Cy(e.prototype,r),t&&Cy(e,t),e}function wu(){return typeof Reflect<"u"&&Reflect.get?wu=Reflect.get:wu=function(r,t,n){var o=lA(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},wu.apply(this,arguments)}function lA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=_o(e),e!==null););return e}function fA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Yf(e,r)}function Yf(e,r){return Yf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Yf(e,r)}function cA(e){var r=pA();return function(){var n=_o(e),o;if(r){var a=_o(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return dA(this,o)}}function dA(e,r){if(r&&(Mu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Au(e)}function Au(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pA(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_o(e)}function Ry(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function hA(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Wf=(Vf=function(e){fA(t,e);var r=cA(t);function t(){var n;uA(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),Ry(Au(n),"modelType",pt.RECT_NODE),aA(Au(n),"radius",Ny,Au(n)),n}return sA(t,[{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,s=this.width,p=this.height;return[{x:o,y:a-p/2,id:"".concat(this.id,"_0")},{x:o+s/2,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+p/2,id:"".concat(this.id,"_2")},{x:o-s/2,y:a,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var o=wu(_o(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.rect;return jy(jy({},o),jt(a))}}]),t}(cn),Ny=hA(Vf.prototype,"radius",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Vf);function Nu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nu=function(t){return typeof t}:Nu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}var Rn;function Iy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function _y(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Iy(Object(t),!0).forEach(function(n){zy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Iy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function By(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yA(e,r,t){return r&&By(e.prototype,r),t&&By(e,t),e}function Du(){return typeof Reflect<"u"&&Reflect.get?Du=Reflect.get:Du=function(r,t,n){var o=gA(r,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Du.apply(this,arguments)}function gA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Bo(e),e!==null););return e}function mA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Kf(e,r)}function Kf(e,r){return Kf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Kf(e,r)}function bA(e){var r=EA();return function(){var n=Bo(e),o;if(r){var a=Bo(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return OA(this,o)}}function OA(e,r){if(r&&(Nu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ly(e)}function Ly(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EA(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bo(e){return Bo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Bo(e)}function zy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Fy(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Zf=(Rn=function(e){mA(t,e);var r=bA(t);function t(){var n;vA(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),zy(Ly(n),"modelType",pt.TEXT_NODE),n}return yA(t,[{key:"getTextStyle",value:function(){var o=Du(Bo(t.prototype),"getTextStyle",this).call(this),a=this.graphModel.theme.text;return _y(_y({},o),jt(a))}},{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),a=this.getTextStyle(),s=a.fontSize,p=nf({rows:o,fontSize:s,rowsLength:o.length}),g=p.width;return g}},{key:"height",get:function(){var o=String(this.text.value).split(/[\r\n]/g),a=this.getTextStyle(),s=a.fontSize,p=nf({rows:o,fontSize:s,rowsLength:o.length}),g=p.height;return g}}]),t}(cn),Fy(Rn.prototype,"width",[f.m],Object.getOwnPropertyDescriptor(Rn.prototype,"width"),Rn.prototype),Fy(Rn.prototype,"height",[f.m],Object.getOwnPropertyDescriptor(Rn.prototype,"height"),Rn.prototype),Rn);function ju(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ju=function(t){return typeof t}:ju=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(e)}function xA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Hy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SA(e,r,t){return r&&Hy(e.prototype,r),t&&Hy(e,t),e}function PA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Jf(e,r)}function Jf(e,r){return Jf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Jf(e,r)}function TA(e){var r=wA();return function(){var n=Cu(e),o;if(r){var a=Cu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return MA(this,o)}}function MA(e,r){if(r&&(ju(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gy(e)}function Gy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wA(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cu(e){return Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cu(e)}function AA(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Qf=function(e){PA(t,e);var r=TA(t);function t(){var n;xA(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),AA(Gy(n),"modelType",pt.HTML_NODE),n}return SA(t,[{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,s=this.width,p=this.height;return[{x:o,y:a-p/2,id:"".concat(this.id,"_0")},{x:o+s/2,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+p/2,id:"".concat(this.id,"_2")},{x:o-s/2,y:a,id:"".concat(this.id,"_3")}]}}]),t}(cn),_r,ky,$y,Xy;function Uy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function NA(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Uy(Object(t),!0).forEach(function(n){Yy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Uy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function qf(e,r,t,n){t&&Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function DA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Vy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jA(e,r,t){return r&&Vy(e.prototype,r),t&&Vy(e,t),e}function Yy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function hi(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(s){a[s]=n[s]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(s,p){return p(e,r,s)||s},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Wy=(_r=function(){function e(r){DA(this,e),Yy(this,"graphModel",void 0),qf(this,"isShowHorizontal",ky,this),qf(this,"isShowVertical",$y,this),qf(this,"position",Xy,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=r}return jA(e,[{key:"getStyle",value:function(){return NA({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,n){for(var o=t.x,a=t.y,s=!1,p=!1,g=0;g<n.length;g++){var E=n[g];if(E.id!==t.id&&(o===E.x&&(s=!0),a===E.y&&(p=!0),s&&p))break}return{isShowVertical:s,isShowHorizontal:p,position:{x:o,y:a}}}},{key:"getHorizontalSnapline",value:function(t,n){var o=!1,a,s=t.id,p;if(s){var g=this.graphModel.fakerNode;if(g&&g.id===s)p=mr(g);else{var E=this.graphModel.getNodeModelById(s);p=mr(E)}}for(var T=0;T<n.length;T++){var D=n[T];if(D.id!==t.id){var B=mr(D);if(B.minY===p.minY||B.maxY===p.minY){o=!0,a=p.minY;break}if(B.minY===p.maxY||B.maxY===p.maxY){o=!0,a=p.maxY;break}}}return nr({isShowHorizontal:o,position:{y:a}})}},{key:"getVerticalSnapline",value:function(t,n){var o=!1,a,s=t.id,p;if(s){var g=this.graphModel.fakerNode;if(g&&g.id===s)p=mr(g);else{var E=this.graphModel.getNodeModelById(s);p=mr(E)}}for(var T=0;T<n.length;T++){var D=n[T];if(D.id!==t.id){var B=mr(D);if(B.minX===p.minX||B.maxX===p.minX){o=!0,a=p.minX;break}if(B.minX===p.maxX||B.maxX===p.maxX){o=!0,a=p.maxX;break}}}return nr({isShowVertical:o,position:{x:a}})}},{key:"getSnapLinePosition",value:function(t,n){var o=this.getCenterSnapLine(t,n),a=o.isShowHorizontal,s=o.isShowVertical;if(!a){var p=this.getHorizontalSnapline(t,n);p.isShowHorizontal&&(o.isShowHorizontal=p.isShowHorizontal,o.position.y=p.position.y)}if(!s){var g=this.getVerticalSnapline(t,n);g.isShowVertical&&(o.isShowVertical=g.isShowVertical,o.position.x=g.position.x)}return o}},{key:"setSnaplineInfo",value:function(t){var n=t.isShowHorizontal,o=t.isShowVertical,a=t.position;this.position=a,this.isShowHorizontal=n,this.isShowVertical=o}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var n=this.graphModel.nodes,o=this.getSnapLinePosition(t,n);this.setSnaplineInfo(o)}}]),e}(),ky=hi(_r.prototype,"isShowHorizontal",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$y=hi(_r.prototype,"isShowVertical",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xy=hi(_r.prototype,"position",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hi(_r.prototype,"clearSnapline",[f.k],Object.getOwnPropertyDescriptor(_r.prototype,"clearSnapline"),_r.prototype),hi(_r.prototype,"setNodeSnapLine",[f.k],Object.getOwnPropertyDescriptor(_r.prototype,"setNodeSnapLine"),_r.prototype),_r),vi=new Map,Ky=function(r){var t=Qn();function n(){r();var a=vi.get(t);if(a){var s=window.requestAnimationFrame(n);vi.set(t,s)}}var o=window.requestAnimationFrame(n);return vi.set(t,o),t},Ru=function(r){var t=vi.get(r);t&&(window.cancelAnimationFrame(t),vi.delete(r))};function Iu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Iu=function(t){return typeof t}:Iu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iu(e)}function yi(){return yi=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},yi.apply(this,arguments)}function Zy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function _u(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Zy(Object(t),!0).forEach(function(n){Jr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function CA(e,r){return BA(e)||_A(e,r)||IA(e,r)||RA()}function RA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IA(e,r){if(e){if(typeof e=="string")return Jy(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Jy(e,r)}}function Jy(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _A(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function BA(e){if(Array.isArray(e))return e}function LA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Qy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zA(e,r,t){return r&&Qy(e.prototype,r),t&&Qy(e,t),e}function FA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ec(e,r)}function ec(e,r){return ec=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},ec(e,r)}function HA(e){var r=kA();return function(){var n=Bu(e),o;if(r){var a=Bu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return GA(this,o)}}function GA(e,r){if(r&&(Iu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zr(e)}function Zr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kA(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bu(e){return Bu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Bu(e)}function Jr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var $A=function(e){FA(t,e);var r=HA(t);function t(){var n;return LA(this,t),n=r.call(this),Jr(Zr(n),"preTargetNode",void 0),Jr(Zr(n),"sourceRuleResults",void 0),Jr(Zr(n),"targetRuleResults",void 0),Jr(Zr(n),"dragHandler",void 0),Jr(Zr(n),"t",void 0),Jr(Zr(n),"onDragStart",function(o){var a=o.event,s=n.props,p=s.anchorData,g=s.nodeModel,E=s.graphModel,T=E.overlapMode;E.selectNodeById(g.id),T!==gr.INCREASE&&g.autoToFront&&E.toFront(g.id),E.eventCenter.emit(it.ANCHOR_DRAGSTART,{data:p,e:a,nodeModel:g}),n.setState({startX:p.x,startY:p.y,endX:p.x,endY:p.y})}),Jr(Zr(n),"onDraging",function(o){var a=o.event,s=n.props,p=s.graphModel,g=s.nodeModel,E=s.anchorData,T=p.transformModel,D=p.eventCenter,B=p.width,G=p.height,Z=p.editConfigModel,ae=Z.autoExpand,se=Z.stopMoveGraph,le=a.clientX,Ae=a.clientY,ge=p.getPointByClient({x:le,y:Ae}),be=ge.domOverlayPosition,Fe=be.x,Re=be.y,Ze=ge.canvasOverlayPosition,He=Ze.x,ht=Ze.y;n.t&&Ru(n.t);var yt=[],ur=10;Fe<10?yt=[ur,0]:Fe+10>B?yt=[-ur,0]:Re<10?yt=[0,ur]:Re+10>G&&(yt=[0,-ur]),n.setState({endX:He,endY:ht,draging:!0}),n.moveAnchorEnd(He,ht),yt.length>0&&!se&&ae&&(n.t=Ky(function(){var Or=yt,rn=CA(Or,2),Bn=rn[0],oo=rn[1];T.translate(Bn,oo);var Ho=n.state,Ln=Ho.endX,Go=Ho.endY;n.setState({endX:Ln-Bn,endY:Go-oo}),n.moveAnchorEnd(Ln-Bn,Go-oo)})),D.emit(it.ANCHOR_DRAG,{data:E,e:a,nodeModel:g})}),Jr(Zr(n),"onDragEnd",function(o){n.t&&Ru(n.t),n.checkEnd(o),n.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),n.sourceRuleResults.clear(),n.targetRuleResults.clear();var a=n.props,s=a.graphModel,p=a.nodeModel,g=a.anchorData;s.eventCenter.emit(it.ANCHOR_DRAGEND,{data:g,e:o,nodeModel:p})}),Jr(Zr(n),"checkEnd",function(o){var a=n.props,s=a.graphModel,p=a.nodeModel,g=a.anchorData,E=g.x,T=g.y,D=g.id;s.edgeType;var B=n.state,G=B.endX,Z=B.endY,ae=B.draging,se=Sa({x:G,y:Z},s);if(n.preTargetNode&&n.preTargetNode.state!==Et.DEFAULT&&n.preTargetNode.setElementState(Et.DEFAULT),!!ae&&se&&se.node){var le=se.node,Ae=se.anchor.id,ge="".concat(p.id,"_").concat(le.id,"_").concat(Ae,"_").concat(D),be=n.sourceRuleResults.get(ge)||{},Fe=be.isAllPass,Re=be.msg,Ze=n.targetRuleResults.get(ge)||{},He=Ze.isAllPass,ht=Ze.msg;if(Fe&&He){le.setElementState(Et.DEFAULT);var yt=s.edgeGenerator(p.getData(),s.getNodeModelById(se.node.id).getData()),ur=s.addEdge(_u(_u({},yt),{},{sourceNodeId:p.id,sourceAnchorId:D,startPoint:{x:E,y:T},targetNodeId:se.node.id,targetAnchorId:se.anchor.id,endPoint:{x:se.anchor.x,y:se.anchor.y}})),Or=n.props.anchorData;s.eventCenter.emit(it.ANCHOR_DROP,{data:Or,e:o,nodeModel:p,edgeModel:ur})}else{var rn=le.getData();s.eventCenter.emit(it.CONNECTION_NOT_ALLOWED,{data:rn,msg:ht||Re})}}}),n.sourceRuleResults=new Map,n.targetRuleResults=new Map,n.state={startX:0,startY:0,endX:0,endY:0,draging:!1},n.dragHandler=new qn({onDragStart:n.onDragStart,onDraging:n.onDraging,onDragEnd:n.onDragEnd}),n}return zA(t,[{key:"getAnchorShape",value:function(){var o=this.props,a=o.anchorData,s=o.style,p=o.node,g=p.getAnchorShape(a);if(g)return g;var E=a.x,T=a.y,D=_u(_u({},s),s.hover);return Object(ne.g)("g",null,Object(ne.g)(di,yi({className:"lf-node-anchor-hover"},D,{x:E,y:T})),Object(ne.g)(di,yi({className:"lf-node-anchor"},s,{x:E,y:T})))}},{key:"moveAnchorEnd",value:function(o,a){var s=this.props,p=s.graphModel,g=s.nodeModel,E=s.anchorData,T=Sa({x:o,y:a},p);if(T){var D=T.node,B=T.anchor.id;if(this.preTargetNode&&this.preTargetNode!==T.node&&this.preTargetNode.setElementState(Et.DEFAULT),E.id===B)return;this.preTargetNode=D;var G="".concat(g.id,"_").concat(D.id,"_").concat(B,"_").concat(E.id);if(!this.targetRuleResults.has(G)){var Z=T.anchor,ae=g.isAllowConnectedAsSource(D,E,Z),se=D.isAllowConnectedAsTarget(g,E,Z);this.sourceRuleResults.set(G,Ta(ae)),this.targetRuleResults.set(G,Ta(se))}var le=this.sourceRuleResults.get(G),Ae=le.isAllPass,ge=this.targetRuleResults.get(G),be=ge.isAllPass;Ae&&be?D.setElementState(Et.ALLOW_CONNECT):D.setElementState(Et.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Et.DEFAULT&&this.preTargetNode.setElementState(Et.DEFAULT)}},{key:"isShowLine",value:function(){var o=this.state,a=o.startX,s=o.startY,p=o.endX,g=o.endY,E=Ur(a,s,p,g);return E>10}},{key:"render",value:function(){var o=this,a=this.state,s=a.startX,p=a.startY,g=a.endX,E=a.endY,T=this.props,D=T.anchorData.edgeAddable,B=T.edgeStyle;return Object(ne.g)("g",{className:"lf-anchor"},Object(ne.g)("g",{onMouseDown:function(Z){D!==!1&&o.dragHandler.handleMouseDown(Z)}},this.getAnchorShape()),this.isShowLine()&&Object(ne.g)(eo,yi({x1:s,y1:p,x2:g,y2:E},B,{"pointer-events":"none"})))}}]),t}(ne.a),XA=$A;i(63);function qy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function UA(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qy(Object(t),!0).forEach(function(n){VA(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function VA(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Lu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lu=function(t){return typeof t}:Lu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function YA(e,r){return JA(e)||ZA(e,r)||KA(e,r)||WA()}function WA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KA(e,r){if(e){if(typeof e=="string")return eg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eg(e,r)}}function eg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function ZA(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function JA(e){if(Array.isArray(e))return e}function tg(e){var r=e.x,t=r===void 0?0:r,n=e.y,o=n===void 0?0:n,a=e.value,s=e.fontSize,p=e.fill,g=p===void 0?"currentColor":p,E=e.overflowMode,T=E===void 0?"default":E,D=e.textWidth,B=D===void 0?"":D,G=e.model,Z={textAnchor:"middle","dominant-baseline":"middle",x:t,y:o,fill:g};if(Object.entries(e).forEach(function(be){var Fe=YA(be,2),Re=Fe[0],Ze=Fe[1],He=Lu(Ze);He!=="object"&&(Z[Re]=Ze)}),a){var ae=String(a).split(/[\r\n]/g),se=ae.length;if(T!=="default"){var le=G.BaseType,Ae=G.modelType;if(le===Ht.NODE&&Ae!==pt.TEXT_NODE||le===Ht.EDGE&&B)return QA(e)}if(se>1){var ge=ae.map(function(be,Fe){var Re=s+2,Ze=(Fe-(se-1)/2)*Re;return Object(ne.g)("tspan",{className:"lf-text-tspan",x:t,y:o+Ze},be)});return Object(ne.g)("text",Z,ge)}return Object(ne.g)("text",Z,a)}}function QA(e){var r=e.value,t=e.fontSize,n=e.model,o=e.fontFamily,a=o===void 0?"":o,s=e.lineHeight,p=e.wrapPadding,g=p===void 0?"0, 0":p,E=e.overflowMode,T=e.x,D=e.y,B=n.width,G=n.textHeight,Z=e.textWidth||B,ae=String(r).split(/[\r\n]/g),se=ae.length,le=_p({rows:ae,style:{fontSize:"".concat(t,"px"),width:"".concat(Z,"px"),fontFamily:a,lineHeight:s,padding:g},rowsLength:se,className:"lf-get-text-height"}),Ae=n.height>le?n.height:le;G&&(Ae=G);var ge=E==="ellipsis";return Object(ne.g)("g",null,Object(ne.g)("foreignObject",{width:Z,height:Ae,x:T-Z/2,y:D-Ae/2},Object(ne.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:Ae,width:Z,padding:g}},Object(ne.g)("div",{className:ge?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:UA({},e)},ae.map(function(be){return Object(ne.g)("div",{className:"lf-node-text--auto-wrap-inner"},be)})))))}function zu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zu=function(t){return typeof t}:zu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(e)}function tc(){return tc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},tc.apply(this,arguments)}function qA(e,r){return n1(e)||r1(e,r)||t1(e,r)||e1()}function e1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t1(e,r){if(e){if(typeof e=="string")return rg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rg(e,r)}}function rg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function r1(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function n1(e){if(Array.isArray(e))return e}function o1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ng(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i1(e,r,t){return r&&ng(e.prototype,r),t&&ng(e,t),e}function a1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&rc(e,r)}function rc(e,r){return rc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},rc(e,r)}function u1(e){var r=l1();return function(){var n=Fu(e),o;if(r){var a=Fu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return s1(this,o)}}function s1(e,r){if(r&&(zu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return In(e)}function In(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fu(e){return Fu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fu(e)}function to(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var og=function(e){a1(t,e);var r=u1(t);function t(n){var o;o1(this,t),o=r.call(this),to(In(o),"dragHandler",void 0),to(In(o),"sumDeltaX",0),to(In(o),"sumDeltaY",0),to(In(o),"stepDrag",void 0),to(In(o),"onDraging",function(p){var g=p.deltaX,E=p.deltaY,T=o.props,D=T.model,B=T.graphModel.transformModel,G=B.fixDeltaXY(g,E),Z=qA(G,2),ae=Z[0],se=Z[1];D.moveText(ae,se)}),to(In(o),"dblClickHandler",function(){var p=o.props.editable;if(p){var g=o.props.model;g.setElementState(Et.TEXT_EDIT)}}),to(In(o),"mouseDownHandle",function(p){var g=o.props,E=g.draggable,T=g.graphModel.editConfigModel.nodeTextDraggable;(E||T)&&o.stepDrag.handleMouseDown(p)});var a=n.model,s=n.draggable;return o.stepDrag=new qn({onDraging:o.onDraging,step:1,model:a,isStopPropagation:s}),o}return i1(t,[{key:"getShape",value:function(){var o=this.props,a=o.model,s=o.graphModel,p=a.text,g=s.editConfigModel,E=p.value,T=p.x,D=p.y,B=p.editable,G=p.draggable,Z={x:T,y:D,className:"",value:E};B?Z.className="lf-element-text":G||g.nodeTextDraggable?Z.className="lf-text-draggable":Z.className="lf-text-disabled";var ae=a.getTextStyle();return Object(ne.g)(tg,tc({},Z,ae,{model:a}))}},{key:"render",value:function(){var o=this.props.model.text;if(o)return Object(ne.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}]),t}(ne.a),f1=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function Hu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hu=function(t){return typeof t}:Hu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}function Gu(e,r){return h1(e)||p1(e,r)||d1(e,r)||c1()}function c1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d1(e,r){if(e){if(typeof e=="string")return ig(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ig(e,r)}}function ig(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function p1(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function h1(e){if(Array.isArray(e))return e}function v1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ag(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y1(e,r,t){return r&&ag(e.prototype,r),t&&ag(e,t),e}function g1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&nc(e,r)}function nc(e,r){return nc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},nc(e,r)}function m1(e){var r=O1();return function(){var n=ku(e),o;if(r){var a=ku(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return b1(this,o)}}function b1(e,r){if(r&&(Hu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tr(e)}function tr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ku(e){return ku=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ku(e)}function ar(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var pn=function(e){g1(t,e);var r=m1(t);function t(n){var o;v1(this,t),o=r.call(this),ar(tr(o),"t",void 0),ar(tr(o),"moveOffset",void 0),ar(tr(o),"stepDrag",void 0),ar(tr(o),"contextMenuTime",void 0),ar(tr(o),"startTime",void 0),ar(tr(o),"clickTimer",void 0),ar(tr(o),"onDragStart",function(E){var T=E.event,D=T.clientX,B=T.clientY,G=o.props,Z=G.model,ae=G.graphModel,se=ae.getPointByClient({x:D,y:B}),le=se.canvasOverlayPosition,Ae=le.x,ge=le.y;o.moveOffset={x:Z.x-Ae,y:Z.y-ge}}),ar(tr(o),"onDraging",function(E){var T=E.event,D=o.props,B=D.model,G=D.graphModel,Z=G.editConfigModel,ae=Z.stopMoveGraph,se=Z.autoExpand,le=G.transformModel,Ae=G.width,ge=G.height,be=G.gridSize;B.isDragging=!0;var Fe=T.clientX,Re=T.clientY,Ze=G.getPointByClient({x:Fe,y:Re}),He=Ze.canvasOverlayPosition,ht=He.x,yt=He.y,ur=le.CanvasPointToHtmlPoint([ht,yt]),Or=Gu(ur,2),rn=Or[0],Bn=Or[1];if(ht=ht+o.moveOffset.x,yt=yt+o.moveOffset.y,ht=An(ht,be),yt=An(yt,be),!Ae||!ge){G.moveNode2Coordinate(B.id,ht,yt);return}var oo=rn<0||Bn<0||rn>Ae||Bn>ge;if(!(se&&!ae&&oo)){var Ho=le.CanvasPointToHtmlPoint([ht-B.width/2,yt-B.height/2]),Ln=Gu(Ho,2),Go=Ln[0],Vc=Ln[1],uC=le.CanvasPointToHtmlPoint([ht+B.width/2,yt+B.height/2]),sm=Gu(uC,2),sC=sm[0],lC=sm[1],Is=Math.max(be,20),ko=[];Go<0?ko=[Is,0]:sC>G.width?ko=[-Is,0]:Vc<0?ko=[0,Is]:lC>G.height&&(ko=[0,-Is]),o.t&&Ru(o.t),ko.length>0&&!ae&&se?o.t=Ky(function(){var fC=ko,lm=Gu(fC,2),fm=lm[0],cm=lm[1];le.translate(fm,cm),G.moveNode(B.id,-fm/le.SCALE_X,-cm/le.SCALE_X)}):G.moveNode2Coordinate(B.id,ht,yt)}}),ar(tr(o),"onDragEnd",function(){o.t&&Ru(o.t);var E=o.props.model;E.isDragging=!1}),ar(tr(o),"handleClick",function(E){if(o.startTime){var T=new Date().getTime()-o.startTime;if(!(T>200)){var D=o.props,B=D.model,G=D.graphModel,Z=B.getData(),ae=G.getPointByClient({x:E.clientX,y:E.clientY}),se={data:Z,e:E,position:ae},le=E.button===2,Ae=E.detail===2;if(!le){var ge=G.editConfigModel;G.selectNodeById(B.id,Ap(E,ge)),o.toFront(),Ae?(ge.nodeTextEdit&&B.text.editable&&(B.setSelected(!1),G.setElementStateById(B.id,Et.TEXT_EDIT)),G.eventCenter.emit(it.NODE_DBCLICK,se)):(G.eventCenter.emit(it.ELEMENT_CLICK,se),G.eventCenter.emit(it.NODE_CLICK,se))}}}}),ar(tr(o),"handleContextMenu",function(E){E.preventDefault();var T=o.props,D=T.model,B=T.graphModel,G=D.getData(),Z=B.getPointByClient({x:E.clientX,y:E.clientY});B.setElementStateById(D.id,Et.SHOW_MENU,Z.domOverlayPosition),B.selectNodeById(D.id),B.eventCenter.emit(it.NODE_CONTEXTMENU,{data:G,e:E,position:Z}),o.toFront()}),ar(tr(o),"handleMouseDown",function(E){var T=o.props,D=T.model,B=T.graphModel;o.startTime=new Date().getTime();var G=B.editConfigModel;G.adjustNodePosition&&D.draggable&&o.stepDrag&&o.stepDrag.handleMouseDown(E)}),ar(tr(o),"setHoverON",function(E){var T=o.props,D=T.model,B=T.graphModel;if(!D.isHovered){var G=D.getData();D.setHovered(!0),B.eventCenter.emit(it.NODE_MOUSEENTER,{data:G,e:E})}}),ar(tr(o),"setHoverOFF",function(E){var T=o.props,D=T.model,B=T.graphModel,G=D.getData();D.isHovered&&(D.setHovered(!1),B.eventCenter.emit(it.NODE_MOUSELEAVE,{data:G,e:E}))}),ar(tr(o),"onMouseOut",function(E){f1&&o.setHoverOFF(E)});var a=n.graphModel,s=a.gridSize,p=a.eventCenter,g=n.model;return o.stepDrag=new qn({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd,step:s,eventType:"NODE",isStopPropagation:!1,eventCenter:p,model:g}),o}return y1(t,[{key:"getAnchorShape",value:function(o){return null}},{key:"getAnchors",value:function(){var o=this,a=this.props,s=a.model,p=a.graphModel,g=s.isSelected,E=s.isHitable,T=s.isDragging,D=s.isShowAnchor;return E&&(g||D)&&!T?ya(s.anchors,function(B,G){var Z=s.getAnchorLineStyle(B),ae=s.getAnchorStyle(B);return Object(ne.g)(XA,{anchorData:B,node:o,style:ae,edgeStyle:Z,anchorIndex:G,nodeModel:s,graphModel:p,setHoverOFF:o.setHoverOFF})}):[]}},{key:"getText",value:function(){var o=this.props,a=o.model,s=o.graphModel;if(a.state===Et.TEXT_EDIT)return"";if(a.text){var p=s.editConfigModel,g=!1;return(a.text.draggable||p.nodeTextDraggable)&&(g=!0),Object(ne.g)(og,{editable:p.nodeTextEdit&&a.text.editable,model:a,graphModel:s,draggable:g})}}},{key:"getStateClassName",value:function(){var o=this.props.model,a=o.state,s=o.isDraging,p=o.isSelected,g="lf-node";switch(a){case Et.ALLOW_CONNECT:g+=" lf-node-allow";break;case Et.NOT_ALLOW_CONNECT:g+=" lf-node-not-allow";break;default:g+=" lf-node-default";break}return s&&(g+=" lf-isDragging"),p&&(g+=" lf-node-selected"),g}},{key:"toFront",value:function(){var o=this.props,a=o.model,s=o.graphModel,p=s.overlapMode;p!==gr.INCREASE&&a.autoToFront&&s.toFront(a.id)}},{key:"render",value:function(){var o=this.props,a=o.model,s=o.graphModel,p=s.editConfigModel,g=p.hideAnchors,E=p.adjustNodePosition,T=s.gridSize,D=s.transformModel.SCALE_X,B=a.isHitable,G=a.draggable,Z=Object(ne.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),g?null:this.getAnchors()),ae;return B?(E&&G&&this.stepDrag.setStep(T*D),ae=Object(ne.g)("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},Z)):ae=Object(ne.g)("g",{className:this.getStateClassName()},Z),ae}}],[{key:"getModel",value:function(o){return o}}]),t}(ne.a);function $u(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$u=function(t){return typeof t}:$u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}function oc(){return oc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},oc.apply(this,arguments)}function E1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ug(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x1(e,r,t){return r&&ug(e.prototype,r),t&&ug(e,t),e}function S1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ic(e,r)}function ic(e,r){return ic=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},ic(e,r)}function P1(e){var r=w1();return function(){var n=Xu(e),o;if(r){var a=Xu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return T1(this,o)}}function T1(e,r){if(r&&($u(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M1(e)}function M1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xu(e){return Xu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xu(e)}var ac=function(e){S1(t,e);var r=P1(t);function t(){return E1(this,t),r.apply(this,arguments)}return x1(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.getNodeStyle();return Object(ne.g)(jn,oc({},a,{x:o.x,y:o.y,width:o.width,height:o.height,radius:o.radius}))}}]),t}(pn);function Uu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Uu=function(t){return typeof t}:Uu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}function uc(){return uc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},uc.apply(this,arguments)}function A1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function sg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function N1(e,r,t){return r&&sg(e.prototype,r),t&&sg(e,t),e}function D1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&sc(e,r)}function sc(e,r){return sc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},sc(e,r)}function j1(e){var r=I1();return function(){var n=Vu(e),o;if(r){var a=Vu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return C1(this,o)}}function C1(e,r){if(r&&(Uu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R1(e)}function R1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vu(e){return Vu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Vu(e)}var lc=function(e){D1(t,e);var r=j1(t);function t(){return A1(this,t),r.apply(this,arguments)}return N1(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.x,s=o.y,p=o.r,g=o.getNodeStyle();return Object(ne.g)(di,uc({},g,{x:a,y:s,r:p}))}}]),t}(pn);function Yu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yu=function(t){return typeof t}:Yu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}function _1(e,r){return F1(e)||z1(e,r)||L1(e,r)||B1()}function B1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L1(e,r){if(e){if(typeof e=="string")return lg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return lg(e,r)}}function lg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function z1(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function F1(e){if(Array.isArray(e))return e}function fg(e){var r=e.points,t=e.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(e).forEach(function(o){var a=_1(o,2),s=a[0],p=a[1],g=Yu(p);g!=="object"&&(n[s]=p)}),t?n.className="lf-basic-shape ".concat(t):n.className="lf-basic-shape",n.points=r.map(function(o){return o.join(",")}).join(" "),Object(ne.g)("polygon",n)}function Wu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wu=function(t){return typeof t}:Wu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(e)}function fc(){return fc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},fc.apply(this,arguments)}function H1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function cg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function G1(e,r,t){return r&&cg(e.prototype,r),t&&cg(e,t),e}function k1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&cc(e,r)}function cc(e,r){return cc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},cc(e,r)}function $1(e){var r=V1();return function(){var n=Ku(e),o;if(r){var a=Ku(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return X1(this,o)}}function X1(e,r){if(r&&(Wu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U1(e)}function U1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ku(e){return Ku=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ku(e)}var dc=function(e){k1(t,e);var r=$1(t);function t(){return H1(this,t),r.apply(this,arguments)}return G1(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.x,s=o.y,p=o.width,g=o.height,E=o.points,T=o.getNodeStyle(),D={transform:"matrix(1 0 0 1 ".concat(a-p/2," ").concat(s-g/2,")")};return Object(ne.g)("g",D,Object(ne.g)(fg,fc({},T,{points:E,x:a,y:s})))}}]),t}(pn);function Zu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zu=function(t){return typeof t}:Zu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}function pc(){return pc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},pc.apply(this,arguments)}function Y1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function dg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function W1(e,r,t){return r&&dg(e.prototype,r),t&&dg(e,t),e}function K1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&hc(e,r)}function hc(e,r){return hc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},hc(e,r)}function Z1(e){var r=q1();return function(){var n=Ju(e),o;if(r){var a=Ju(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return J1(this,o)}}function J1(e,r){if(r&&(Zu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q1(e)}function Q1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q1(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ju(e){return Ju=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ju(e)}var vc=function(e){K1(t,e);var r=Z1(t);function t(){return Y1(this,t),r.apply(this,arguments)}return W1(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.getNodeStyle();return Object(ne.g)("g",null,Object(ne.g)(fg,pc({},a,{points:o.points,x:o.x,y:o.y})))}}]),t}(pn);function Qu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qu=function(t){return typeof t}:Qu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}function eN(e,r){return oN(e)||nN(e,r)||rN(e,r)||tN()}function tN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rN(e,r){if(e){if(typeof e=="string")return pg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pg(e,r)}}function pg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function nN(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function oN(e){if(Array.isArray(e))return e}function iN(e){var r=e.x,t=r===void 0?0:r,n=e.y,o=n===void 0?0:n,a=e.rx,s=a===void 0?4:a,p=e.ry,g=p===void 0?4:p,E=e.className,T={cx:t,cy:o,rx:s,ry:g,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(D){var B=eN(D,2),G=B[0],Z=B[1],ae=Qu(Z);ae!=="object"&&(T[G]=Z)}),E?T.className="lf-basic-shape ".concat(E):T.className="lf-basic-shape",Object(ne.g)("ellipse",T)}function qu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qu=function(t){return typeof t}:qu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qu(e)}function yc(){return yc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},yc.apply(this,arguments)}function aN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function hg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uN(e,r,t){return r&&hg(e.prototype,r),t&&hg(e,t),e}function sN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&gc(e,r)}function gc(e,r){return gc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},gc(e,r)}function lN(e){var r=dN();return function(){var n=es(e),o;if(r){var a=es(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return fN(this,o)}}function fN(e,r){if(r&&(qu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cN(e)}function cN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function es(e){return es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},es(e)}var mc=function(e){sN(t,e);var r=lN(t);function t(){return aN(this,t),r.apply(this,arguments)}return uN(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.getNodeStyle();return Object(ne.g)(iN,yc({},a,{x:o.x,y:o.y,rx:o.rx,ry:o.ry}))}}]),t}(pn);function ts(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ts=function(t){return typeof t}:ts=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ts(e)}function vg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function yg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?vg(Object(t),!0).forEach(function(n){pN(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pN(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function hN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function gg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vN(e,r,t){return r&&gg(e.prototype,r),t&&gg(e,t),e}function yN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&bc(e,r)}function bc(e,r){return bc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},bc(e,r)}function gN(e){var r=ON();return function(){var n=rs(e),o;if(r){var a=rs(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return mN(this,o)}}function mN(e,r){if(r&&(ts(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bN(e)}function bN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ON(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},rs(e)}var Oc=function(e){yN(t,e);var r=gN(t);function t(){return hN(this,t),r.apply(this,arguments)}return vN(t,[{key:"getBackground",value:function(){var o=this.props.model,a=o.getTextStyle(),s=o.text;if(s&&s.value&&a.background&&a.background.fill!=="transparnet"){var p=s.x,g=s.y,E=o.width,T=o.height,D=yg(yg({},a.background),{},{x:p,y:g-1,width:E,height:T});return Object(ne.g)(jn,D)}}},{key:"getShape",value:function(){return Object(ne.g)("g",null,this.getBackground())}}]),t}(pn);function ns(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(t){return typeof t}:ns=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ns(e)}function Ec(){return Ec=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ec.apply(this,arguments)}function EN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function mg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xN(e,r,t){return r&&mg(e.prototype,r),t&&mg(e,t),e}function SN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&xc(e,r)}function xc(e,r){return xc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},xc(e,r)}function PN(e){var r=MN();return function(){var n=os(e),o;if(r){var a=os(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return TN(this,o)}}function TN(e,r){if(r&&(ns(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gi(e)}function gi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},os(e)}function is(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Sc=function(e){SN(t,e);var r=PN(t);function t(){var n;EN(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),is(gi(n),"ref",void 0),is(gi(n),"currentProperties",void 0),is(gi(n),"preProperties",void 0),is(gi(n),"setRef",function(p){n.ref=p}),n}return xN(t,[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(o){o.appendChild(document.createElement("div"))}},{key:"shouldUpdate",value:function(){if(!(this.preProperties&&this.preProperties===this.currentProperties))return this.preProperties=this.currentProperties,!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 o=this.props.model,a=o.x,s=o.y,p=o.height,g=o.width,E=o.getNodeStyle();return this.currentProperties=JSON.stringify(o.properties),Object(ne.g)("foreignObject",Ec({},E,{x:a-g/2,y:s-p/2,width:g,height:p,ref:this.setRef}))}}]),t}(pn);function as(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?as=function(t){return typeof t}:as=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},as(e)}function Pc(){return Pc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Pc.apply(this,arguments)}function bg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function ro(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?bg(Object(t),!0).forEach(function(n){wc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Og(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AN(e,r,t){return r&&Og(e.prototype,r),t&&Og(e,t),e}function NN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Tc(e,r)}function Tc(e,r){return Tc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Tc(e,r)}function DN(e){var r=CN();return function(){var n=us(e),o;if(r){var a=us(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return jN(this,o)}}function jN(e,r){if(r&&(as(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mc(e)}function Mc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},us(e)}function wc(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var RN=function(e){NN(t,e);var r=DN(t);function t(n){var o;return wN(this,t),o=r.call(this,n),wc(Mc(o),"setHoverON",function(){o.setState({isHoverd:!0})}),wc(Mc(o),"setHoverOFF",function(){o.setState({isHoverd:!1})}),o.state={isHoverd:!1},o}return AN(t,[{key:"getBackground",value:function(){var o=this.props.model,a=o.getTextStyle(),s=o.text,p=a.background||{},g=this.state.isHoverd;if(g&&a.hover&&a.hover.background&&(p=ro(ro({},p),a.hover.background)),s&&s.value&&p.fill!=="transparent"){var E=a.fontSize,T=a.overflowMode,D=a.lineHeight,B=a.wrapPadding,G=a.textWidth,Z=s.value,ae=s.x,se=s.y,le=String(Z).split(/[\r\n]/g),Ae=le.length,ge;if(T==="autoWrap"&&G){var be=_p({rows:le,style:{fontSize:"".concat(E,"px"),width:"".concat(G,"px"),lineHeight:D,padding:B},rowsLength:Ae,className:"lf-get-text-height"});ge=ro(ro({},p),{},{x:ae-1,y:se-1,width:G,height:be})}else{le&&le.forEach(function(ht){Mh(ht)});var Fe=nf({rows:le,fontSize:E,rowsLength:Ae}),Re=Fe.width,Ze=Fe.height;if(typeof p.wrapPadding=="string"){var He=p.wrapPadding.split(",").filter(function(ht){return ht.trim()}).map(function(ht){return parseFloat(ht.trim())});He.length>0&&He.length<=4&&(He.length===1?He=[He[0],He[0],He[0],He[0]]:He.length===2?He=[He[0],He[1],He[0],He[1]]:He.length===3&&(He=[He[0],He[1],He[2],He[1]]),Re+=He[1]+He[3],Ze+=He[0]+He[2],ae=ae+(He[1]-He[3])/2,se=se+(He[2]-He[0])/2)}ge=ro(ro({},p),{},{x:ae-1,y:se-1,width:Re,height:Ze})}return Object(ne.g)(jn,ge)}}},{key:"getShape",value:function(){var o=this.props.model,a=o.text,s=a.value,p=a.x,g=a.y;if(s){var E=o.getTextStyle(),T=ro({x:p,y:g,className:"lf-element-text",value:s},E);return Object(ne.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(ne.g)(tg,Pc({},T,{model:o})))}}}]),t}(og);function ss(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ss=function(t){return typeof t}:ss=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ss(e)}function Ac(){return Ac=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ac.apply(this,arguments)}function Eg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function hn(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Eg(Object(t),!0).forEach(function(n){Lr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Eg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function IN(e,r){return zN(e)||LN(e,r)||BN(e,r)||_N()}function _N(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BN(e,r){if(e){if(typeof e=="string")return xg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xg(e,r)}}function xg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function LN(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function zN(e){if(Array.isArray(e))return e}function FN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Sg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function HN(e,r,t){return r&&Sg(e.prototype,r),t&&Sg(e,t),e}function GN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Nc(e,r)}function Nc(e,r){return Nc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Nc(e,r)}function kN(e){var r=XN();return function(){var n=ls(e),o;if(r){var a=ls(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return $N(this,o)}}function $N(e,r){if(r&&(ss(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Br(e)}function Br(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ls(e){return ls=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ls(e)}function Lr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Qr;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(Qr||(Qr={}));var Pg=function(e){GN(t,e);var r=kN(t);function t(){var n;return FN(this,t),n=r.call(this),Lr(Br(n),"dragHandler",void 0),Lr(Br(n),"oldEdge",void 0),Lr(Br(n),"preTargetNode",void 0),Lr(Br(n),"targetRuleResults",void 0),Lr(Br(n),"sourceRuleResults",void 0),Lr(Br(n),"onDragStart",function(){var o=n.props,a=o.x,s=o.y,p=o.edgeModel,g=p.startPoint,E=p.endPoint,T=p.pointsList;n.oldEdge={startPoint:g,endPoint:E,pointsList:T},n.setState({endX:a,endY:s,draging:!0}),p.isHitable=!1}),Lr(Br(n),"onDraging",function(o){var a=o.deltaX,s=o.deltaY,p=n.state,g=p.endX,E=p.endY,T=n.props,D=T.graphModel,B=T.type,G=D.transformModel,Z=G.moveCanvasPointByHtml([g,E],a,s),ae=IN(Z,2),se=ae[0],le=ae[1];n.setState({endX:se,endY:le,draging:!0});var Ae=n.props.edgeModel,ge=Sa({x:g,y:E},D);if(ge&&ge.node&&n.isAllowAdjust(ge)){var be,Fe=Ae.startPoint,Re=Ae.endPoint,Ze=Ae.sourceNode,He=Ae.targetNode;B===Qr.SOURCE?be={startPoint:{x:ge.anchor.x,y:ge.anchor.y},endPoint:{x:Re.x,y:Re.y},sourceNode:ge.node,targetNode:He}:B===Qr.TARGET&&(be={startPoint:{x:Fe.x,y:Fe.y},endPoint:{x:ge.anchor.x,y:ge.anchor.y},sourceNode:Ze,targetNode:ge.node}),Ae.updateAfterAdjustStartAndEnd(be)}else B===Qr.SOURCE?Ae.updateStartPoint({x:se,y:le}):B===Qr.TARGET&&Ae.updateEndPoint({x:se,y:le})}),Lr(Br(n),"onDragEnd",function(){var o;n.setState({draging:!1});var a=n.props,s=a.graphModel,p=a.edgeModel,g=a.type;p.isHitable=!0;var E=n.state,T=E.endX,D=E.endY,B=E.draging,G=Sa({x:T,y:D},s);if(B){if(G&&G.node&&n.isAllowAdjust(G)){var Z,ae=p.getData(),se=hn(hn({},ae),{},{sourceAnchorId:"",targetAnchorId:"",text:(ae==null||(Z=ae.text)===null||Z===void 0?void 0:Z.value)||""});if(g===Qr.SOURCE){var le=s.edgeGenerator(s.getNodeModelById(G.node.id).getData(),s.getNodeModelById(p.targetNodeId).getData(),se);se=hn(hn({},le),{},{sourceNodeId:G.node.id,sourceAnchorId:G.anchor.id,startPoint:{x:G.anchor.x,y:G.anchor.y},targetNodeId:p.targetNodeId,endPoint:hn({},p.endPoint)})}else if(g===Qr.TARGET){var Ae=s.edgeGenerator(s.getNodeModelById(p.sourceNodeId).getData(),s.getNodeModelById(G.node.id).getData(),se);se=hn(hn({},Ae),{},{sourceNodeId:p.sourceNodeId,startPoint:hn({},p.startPoint),targetNodeId:G.node.id,targetAnchorId:G.anchor.id,endPoint:{x:G.anchor.x,y:G.anchor.y}})}s.deleteEdgeById(p.id);var ge=s.addEdge(hn({},se));s.eventCenter.emit(it.EDGE_EXCHANGE_NODE,{data:{newEdge:ge.getData(),oldEdge:p.getData()}})}else n.recoveryEdge();(o=n.preTargetNode)===null||o===void 0||o.setElementState(Et.DEFAULT)}}),Lr(Br(n),"recoveryEdge",function(){var o=n.props.edgeModel,a=n.oldEdge,s=a.startPoint,p=a.endPoint,g=a.pointsList;o.updateStartPoint(s),o.updateEndPoint(p),o.modelType!==pt.LINE_EDGE&&(o.pointsList=g,o.initPoints())}),Lr(Br(n),"getAdjustPointStyle",function(){var o=n.props.graphModel.theme,a=o.edgeAdjust;return a}),n.state={draging:!1,endX:0,endY:0},n.targetRuleResults=new Map,n.sourceRuleResults=new Map,n.dragHandler=gf({onDragStart:n.onDragStart,onDraging:n.onDraging,onDragEnd:n.onDragEnd}),n}return HN(t,[{key:"isAllowAdjust",value:function(o){var a=this.props,s=a.edgeModel;s.id;var p=s.sourceNode,g=s.targetNode,E=s.sourceAnchorId,T=s.targetAnchorId,D=a.type,B=null,G=null,Z=null,ae=null;if(D===Qr.SOURCE?(B=o.node,G=g,Z=o.anchor,ae=g.getAnchorInfo(T)):(B=p,G=o.node,ae=o.anchor,Z=p.getAnchorInfo(E)),this.preTargetNode&&this.preTargetNode!==o.node&&this.preTargetNode.setElementState(Et.DEFAULT),this.preTargetNode=o.node,ae.id===Z.id)return!1;var se="".concat(B.id,"_").concat(G.id,"_").concat(Z.id,"_").concat(ae.id);if(!this.targetRuleResults.has(se)){var le=B.isAllowConnectedAsSource(G,Z,ae),Ae=G.isAllowConnectedAsTarget(B,Z,ae);this.sourceRuleResults.set(se,Ta(le)),this.targetRuleResults.set(se,Ta(Ae))}var ge=this.sourceRuleResults.get(se),be=ge.isAllPass,Fe=this.targetRuleResults.get(se),Re=Fe.isAllPass,Ze=be&&Re?Et.ALLOW_CONNECT:Et.NOT_ALLOW_CONNECT;return D===Qr.SOURCE?B.setElementState(Ze):G.setElementState(Ze),be&&Re}},{key:"render",value:function(){var o=this.props,a=o.x,s=o.y,p=this.state.draging,g=this.getAdjustPointStyle();return Object(ne.g)("g",null,Object(ne.g)(di,Ac({className:"lf-edge-adjust-point"},g,{x:a,y:s,onMouseDown:this.dragHandler,"pointer-events":p?"none":""})))}}]),t}(ne.a);function fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fs=function(t){return typeof t}:fs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(e)}function cs(){return cs=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},cs.apply(this,arguments)}function Tg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Mg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Tg(Object(t),!0).forEach(function(n){Fr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function UN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function wg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function VN(e,r,t){return r&&wg(e.prototype,r),t&&wg(e,t),e}function YN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Dc(e,r)}function Dc(e,r){return Dc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Dc(e,r)}function WN(e){var r=ZN();return function(){var n=ds(e),o;if(r){var a=ds(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return KN(this,o)}}function KN(e,r){if(r&&(fs(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zr(e)}function zr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ds(e){return ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ds(e)}function Fr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var mi=function(e){YN(t,e);var r=WN(t);function t(){var n;UN(this,t);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return n=r.call.apply(r,[this].concat(a)),Fr(zr(n),"startTime",void 0),Fr(zr(n),"contextMenuTime",void 0),Fr(zr(n),"clickTimer",void 0),Fr(zr(n),"handleHover",function(p,g){var E=n.props,T=E.model,D=E.graphModel.eventCenter;T.setHovered(p);var B=p?it.EDGE_MOUSEENTER:it.EDGE_MOUSELEAVE,G=T.getData();D.emit(B,{data:G,e:g})}),Fr(zr(n),"setHoverON",function(p){var g=n.props.model.isHovered;g||n.handleHover(!0,p)}),Fr(zr(n),"setHoverOFF",function(p){n.handleHover(!1,p)}),Fr(zr(n),"handleContextMenu",function(p){p.preventDefault(),n.contextMenuTime=new Date().getTime(),n.clickTimer&&clearTimeout(n.clickTimer);var g=n.props,E=g.model,T=g.graphModel,D=T.getPointByClient({x:p.clientX,y:p.clientY});T.setElementStateById(E.id,Et.SHOW_MENU,D.domOverlayPosition),n.toFront(),T.selectEdgeById(E.id);var B=E==null?void 0:E.getData();T.eventCenter.emit(it.EDGE_CONTEXTMENU,{data:B,e:p,position:D})}),Fr(zr(n),"handleMouseDown",function(p){p.stopPropagation(),n.startTime=new Date().getTime()}),Fr(zr(n),"handleMouseUp",function(p){if(n.startTime){var g=new Date().getTime()-n.startTime;if(!(g>200)){var E=p.button===2;if(!E){var T=p.detail===2,D=n.props,B=D.model,G=D.graphModel,Z=B==null?void 0:B.getData(),ae=G.getPointByClient({x:p.clientX,y:p.clientY});if(T){var se=G.editConfigModel,le=G.textEditElement;if(le&&le.id===B.id&&G.setElementStateById(B.id,Et.DEFAULT),se.edgeTextEdit&&B.text.editable&&G.setElementStateById(B.id,Et.TEXT_EDIT),B.modelType===pt.POLYLINE_EDGE){var Ae=B,ge=G.getPointByClient({x:p.x,y:p.y}),be=ge.canvasOverlayPosition,Fe=be.x,Re=be.y,Ze=Ah({x:Fe,y:Re},Ae.points);Ae.dbClickPosition=Ze}G.eventCenter.emit(it.EDGE_DBCLICK,{data:Z,e:p,position:ae})}else G.eventCenter.emit(it.ELEMENT_CLICK,{data:Z,e:p,position:ae}),G.eventCenter.emit(it.EDGE_CLICK,{data:Z,e:p,position:ae});var He=G.editConfigModel;G.selectEdgeById(B.id,Ap(p,He)),n.toFront()}}}}),Fr(zr(n),"getIsDragging",function(){return!1}),n}return VN(t,[{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,a=o.model,s=o.graphModel;if(a.state===Et.TEXT_EDIT)return"";var p=!1,g=s.editConfigModel;return(a.text.draggable||g.edgeTextDraggable)&&(p=!0),Object(ne.g)(RN,{editable:g.edgeTextEdit&&a.text.editable,model:a,graphModel:s,draggable:p})}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=o.startPoint,s=o.endPoint,p=o.isSelected,g=this.state,E=g.hover;return{start:a,end:s,hover:E,isSelected:p}}},{key:"getArrowStyle",value:function(){var o=this.props,a=o.model,s=o.graphModel,p=a.getEdgeStyle(),g=a.getEdgeAnimationStyle(),E=s.theme.arrow,T=a.isAnimation?g.stroke:p.stroke;return Mg(Mg({},p),{},{fill:T,stroke:T},E)}},{key:"getArrow",value:function(){var o=this.props.model.id,a=this.getArrowStyle(),s=a.refY,p=s===void 0?0:s,g=a.refX,E=g===void 0?2:g;return Object(ne.g)("g",null,Object(ne.g)("defs",null,Object(ne.g)("marker",{id:"marker-start-".concat(o),refX:-E,refY:p,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(ne.g)("marker",{id:"marker-end-".concat(o),refX:E,refY:p,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var o=this.getArrowStyle(),a=o.stroke,s=o.strokeWidth,p=o.offset,g=o.verticalLength;return Object(ne.g)("path",{stroke:a,fill:a,strokeWidth:s,d:"M 0 0 L ".concat(p," -").concat(g," L ").concat(p," ").concat(g," Z")})}},{key:"getEndArrow",value:function(){var o=this.getArrowStyle(),a=o.stroke,s=o.strokeWidth,p=o.offset,g=o.verticalLength;return Object(ne.g)("path",{stroke:a,fill:a,strokeWidth:s,transform:"rotate(180)",d:"M 0 0 L ".concat(p," -").concat(g," L ").concat(p," ").concat(g," Z")})}},{key:"getAdjustPoints",value:function(){var o=this.props,a=o.model,s=o.graphModel,p=a.getAdjustStart(),g=a.getAdjustEnd();return Object(ne.g)("g",null,Object(ne.g)(Pg,cs({type:"SOURCE"},p,{edgeModel:a,graphModel:s})),Object(ne.g)(Pg,cs({type:"TARGET"},g,{edgeModel:a,graphModel:s})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(ne.g)("g",null)}},{key:"getAppend",value:function(){return Object(ne.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var o=this.props,a=o.graphModel,s=o.model,p=a.overlapMode;p!==gr.INCREASE&&a.toFront(s.id)}},{key:"render",value:function(){var o=this.props,a=o.model,s=a.isSelected,p=a.isHitable,g=o.graphModel,E=this.getIsDragging(),T=g.editConfigModel.adjustEdgeStartAndEnd,D=g.animation,B=s&&D.edge&&g.getSelectElements().edges.length===1;return Object(ne.g)("g",null,Object(ne.g)("g",{className:["lf-edge",!p&&"pointer-none",s&&"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(),B&&this.getAnimation(),this.getText(),this.getArrow()),T&&s&&!E?this.getAdjustPoints():"")}}]),t}(ne.a);function ps(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ps=function(t){return typeof t}:ps=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(e)}function JN(e,r){return tD(e)||eD(e,r)||qN(e,r)||QN()}function QN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qN(e,r){if(e){if(typeof e=="string")return Ag(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ag(e,r)}}function Ag(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function eD(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function tD(e){if(Array.isArray(e))return e}function rD(e){var r={d:""};return Object.entries(e).forEach(function(t){var n=JN(t,2),o=n[0],a=n[1],s=ps(a);(o==="style"||s!=="object")&&(r[o]=a)}),Object(ne.g)("path",r)}var Lo=rD;function hs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hs=function(t){return typeof t}:hs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function vs(){return vs=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},vs.apply(this,arguments)}function nD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ng(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oD(e,r,t){return r&&Ng(e.prototype,r),t&&Ng(e,t),e}function iD(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&jc(e,r)}function jc(e,r){return jc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},jc(e,r)}function aD(e){var r=lD();return function(){var n=ys(e),o;if(r){var a=ys(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return uD(this,o)}}function uD(e,r){if(r&&(hs(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sD(e)}function sD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lD(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ys(e)}var Cc=function(e){iD(t,e);var r=aD(t);function t(){return nD(this,t),r.apply(this,arguments)}return oD(t,[{key:"getEdge",value:function(){var o=this.props.model,a=o.startPoint,s=o.endPoint,p=o.isAnimation,g=o.arrowConfig,E=o.getEdgeStyle(),T=o.getEdgeAnimationStyle(),D=T.strokeDasharray,B=T.stroke,G=T.strokeDashoffset,Z=T.animationName,ae=T.animationDuration,se=T.animationIterationCount,le=T.animationTimingFunction,Ae=T.animationDirection;return Object(ne.g)(eo,vs({},E,{x1:a.x,y1:a.y,x2:s.x,y2:s.y},g,p?{strokeDasharray:D,stroke:B,style:{strokeDashoffset:G,animationName:Z,animationDuration:ae,animationIterationCount:se,animationTimingFunction:le,animationDirection:Ae}}:{}))}},{key:"getShape",value:function(){return Object(ne.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var o=this.props.model,a=o.getAnimation(),s=a.stroke,p=a.className,g=a.strokeDasharray,E=o.startPoint,T=o.endPoint,D=o.getEdgeStyle();return Object(ne.g)("g",null,Object(ne.g)(eo,vs({},D,{x1:E.x,y1:E.y,x2:T.x,y2:T.y,className:p,strokeDasharray:g,stroke:s})))}},{key:"getAppendWidth",value:function(){var o=this.props.model,a=o.startPoint,s=o.endPoint,p={start:a,end:s},g=rT(p),E=g.d,T=g.strokeWidth,D=g.fill,B=g.strokeDasharray,G=g.stroke;return Object(ne.g)(Lo,{d:E,fill:D,strokeWidth:T,stroke:G,strokeDasharray:B})}}]),t}(mi);function gs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gs=function(t){return typeof t}:gs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(e)}function fD(e,r){return hD(e)||pD(e,r)||dD(e,r)||cD()}function cD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dD(e,r){if(e){if(typeof e=="string")return Dg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Dg(e,r)}}function Dg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function pD(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function hD(e){if(Array.isArray(e))return e}function vD(e){var r={points:"",fill:"none"};return Object.entries(e).forEach(function(t){var n=fD(t,2),o=n[0],a=n[1];if(o==="style")r[o]=a;else{var s=gs(a);s!=="object"&&(r[o]=a)}}),Object(ne.g)("polyline",r)}var jg=vD;function ms(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ms=function(t){return typeof t}:ms=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(e)}function Cg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function bs(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Cg(Object(t),!0).forEach(function(n){en(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Os(){return Os=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Os.apply(this,arguments)}function yD(e,r){return OD(e)||bD(e,r)||mD(e,r)||gD()}function gD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mD(e,r){if(e){if(typeof e=="string")return Rg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rg(e,r)}}function Rg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function bD(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function OD(e){if(Array.isArray(e))return e}function ED(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ig(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xD(e,r,t){return r&&Ig(e.prototype,r),t&&Ig(e,t),e}function SD(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Rc(e,r)}function Rc(e,r){return Rc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Rc(e,r)}function PD(e){var r=MD();return function(){var n=Es(e),o;if(r){var a=Es(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return TD(this,o)}}function TD(e,r){if(r&&(ms(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qr(e)}function qr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MD(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Es(e){return Es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Es(e)}function en(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Ic=function(e){SD(t,e);var r=PD(t);function t(){var n;return ED(this,t),n=r.call(this),en(qr(n),"drag",void 0),en(qr(n),"isDraging",void 0),en(qr(n),"appendInfo",void 0),en(qr(n),"dragHandler",void 0),en(qr(n),"onDragStart",function(){var o=n.props.model;o.dragAppendStart()}),en(qr(n),"onDraging",function(o){var a=o.deltaX,s=o.deltaY,p=n.props,g=p.model,E=p.graphModel;n.isDraging=!0;var T=E.transformModel,D=E.editConfigModel,B=T.fixDeltaXY(a,s),G=yD(B,2),Z=G[0],ae=G[1],se=g,le=D.adjustEdgeMiddle;le?n.appendInfo=se.dragAppendSimple(n.appendInfo,{x:Z,y:ae}):n.appendInfo=se.dragAppend(n.appendInfo,{x:Z,y:ae})}),en(qr(n),"onDragEnd",function(){var o=n.props,a=o.model,s=o.graphModel.eventCenter,p=a;p.dragAppendEnd(),n.isDraging=!1,n.appendInfo=void 0,s.emit(it.EDGE_ADJUST,{data:p.getData()})}),en(qr(n),"beforeDragStart",function(o,a){a.dragAble&&n.dragHandler(o),n.appendInfo=a}),en(qr(n),"getIsDragging",function(){return n.isDraging}),n.drag=gf({onDragStart:n.onDragStart,onDraging:n.onDraging,onDragEnd:n.onDragEnd,isStopPropagation:!1}),n}return xD(t,[{key:"getEdge",value:function(){var o=this.props.model,a=o.points,s=o.isAnimation,p=o.arrowConfig,g=o.getEdgeStyle(),E=o.getEdgeAnimationStyle(),T=E.strokeDasharray,D=E.stroke,B=E.strokeDashoffset,G=E.animationName,Z=E.animationDuration,ae=E.animationIterationCount,se=E.animationTimingFunction,le=E.animationDirection;return Object(ne.g)(jg,Os({points:a},g,p,s?{strokeDasharray:T,stroke:D,style:{strokeDashoffset:B,animationName:G,animationDuration:Z,animationIterationCount:ae,animationTimingFunction:se,animationDirection:le}}:{}))}},{key:"getShape",value:function(){return Object(ne.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var o=this.props.model,a=o.getAnimation(),s=a.stroke,p=a.className,g=a.strokeDasharray,E=o.getEdgeStyle();return Object(ne.g)("g",null,Object(ne.g)(jg,Os({points:o.points},E,{className:p,strokeDasharray:g,stroke:s})))}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=o.points,s=o.isSelected,p=this.state,g=p.hover,E={start:null,end:null,hover:g,isSelected:s},T=So(a);return T.length>=2&&(E.start=T[T.length-2],E.end=T[T.length-1]),E}},{key:"getAppendAttributes",value:function(o){var a=o.start,s=o.end,p;if(a.x===s.x&&a.y===s.y)p="";else{var g={start:a,end:s,offset:10,verticalLength:5},E=si(bs(bs({},g),{},{type:"start"})),T=si(bs(bs({},g),{},{type:"end"}));p="M".concat(E.leftX," ").concat(E.leftY,`
L`).concat(E.rightX," ").concat(E.rightY,`
L`).concat(T.rightX," ").concat(T.rightY,`
L`).concat(T.leftX," ").concat(T.leftY," z")}return{d:p,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var a=this.getAppendAttributes(o),s=a.d,p=a.strokeWidth,g=a.fill,E=a.strokeDasharray,T=a.stroke;return Object(ne.g)(Lo,{d:s,fill:g,strokeWidth:p,stroke:T,strokeDasharray:E})}},{key:"getAppendWidth",value:function(){for(var o=this,a=this.props,s=a.model,p=a.graphModel,g=s.pointsList,E=s.draggable,T=[],D=g.length,B=function(ae){var se="lf-polyline-append",le={start:{x:g[ae].x,y:g[ae].y},end:{x:g[ae+1].x,y:g[ae+1].y},startIndex:ae,endIndex:ae+1,direction:"",dragAble:!0},Ae=Object(ne.g)("g",{className:se},o.getAppendShape(le)),ge=p.editConfigModel,be=ge.adjustEdge,Fe=ge.adjustEdgeMiddle;if(!be||!E)o.dragHandler=function(){};else{o.dragHandler=o.drag;var Re=le.startIndex,Ze=le.endIndex,He=Fe&&(Re===0||Ze===D-1);le.dragAble=!He,le.start.x===le.end.x?(le.dragAble&&(se+="-ew-resize"),le.direction=Dt.VERTICAL):le.start.y===le.end.y&&(le.dragAble&&(se+="-ns-resize"),le.direction=Dt.HORIZONTAL),Ae=Object(ne.g)("g",{className:o.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(yt){return o.beforeDragStart(yt,le)}},Object(ne.g)("g",{className:se},o.getAppendShape(le)))}T.push(Ae)},G=0;G<D-1;G++)B(G);return Object(ne.g)("g",null,T)}}]),t}(mi);function xs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xs=function(t){return typeof t}:xs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xs(e)}function wD(e,r){return jD(e)||DD(e,r)||ND(e,r)||AD()}function AD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ND(e,r){if(e){if(typeof e=="string")return _g(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _g(e,r)}}function _g(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function DD(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function jD(e){if(Array.isArray(e))return e}function Ss(){return Ss=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ss.apply(this,arguments)}function CD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Bg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function RD(e,r,t){return r&&Bg(e.prototype,r),t&&Bg(e,t),e}function ID(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&_c(e,r)}function _c(e,r){return _c=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},_c(e,r)}function _D(e){var r=zD();return function(){var n=Ps(e),o;if(r){var a=Ps(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return BD(this,o)}}function BD(e,r){if(r&&(xs(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LD(e)}function LD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zD(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ps(e)}var Bc=function(e){ID(t,e);var r=_D(t);function t(){return CD(this,t),r.apply(this,arguments)}return RD(t,[{key:"getEdge",value:function(){var o=this.props.model,a=o.getEdgeStyle(),s=o.path,p=o.isAnimation,g=o.arrowConfig,E=o.getEdgeAnimationStyle(),T=E.strokeDasharray,D=E.stroke,B=E.strokeDashoffset,G=E.animationName,Z=E.animationDuration,ae=E.animationIterationCount,se=E.animationTimingFunction,le=E.animationDirection;return Object(ne.g)(Lo,Ss({d:s},a,g,p?{strokeDasharray:T,stroke:D,style:{strokeDashoffset:B,animationName:G,animationDuration:Z,animationIterationCount:ae,animationTimingFunction:se,animationDirection:le}}:{}))}},{key:"getShape",value:function(){return Object(ne.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var o=this.props.model,a=o.getAnimation(),s=a.stroke,p=a.className,g=a.strokeDasharray,E=o.getEdgeStyle();return Object(ne.g)("g",null,Object(ne.g)(Lo,Ss({d:o.path},E,{className:p,strokeDasharray:g,stroke:s})))}},{key:"getAppendWidth",value:function(){var o=this.props.model.path;return Object(ne.g)(Lo,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=this.state,s=a.hover,p=o,g=p.path,E=p.isSelected,T=nT(g),D=wD(T,2),B=D[0],G=D[1],Z={start:B,end:G,hover:s,isSelected:E};return Z}}]),t}(mi);function Ts(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ts=function(t){return typeof t}:Ts=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}function Lg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function FD(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Lg(Object(t),!0).forEach(function(n){HD(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function HD(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function GD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function zg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kD(e,r,t){return r&&zg(e.prototype,r),t&&zg(e,t),e}function $D(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Lc(e,r)}function Lc(e,r){return Lc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Lc(e,r)}function XD(e){var r=YD();return function(){var n=Ms(e),o;if(r){var a=Ms(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return UD(this,o)}}function UD(e,r){if(r&&(Ts(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VD(e)}function VD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YD(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ms(e){return Ms=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ms(e)}var WD=function(e){$D(t,e);var r=XD(t);function t(){return GD(this,t),r.apply(this,arguments)}return kD(t,[{key:"getArrowAttributes",value:function(){var o=this.props,a=o.arrowInfo,s=o.style,p=a.start,g=a.end,E={start:p,end:g,offset:s.offset,verticalLength:s.verticalLength,type:"end"},T=si(E),D=T.leftX,B=T.leftY,G=T.rightX,Z=T.rightY;return FD({d:"M".concat(D," ").concat(B," L").concat(g.x," ").concat(g.y," L").concat(G," ").concat(Z," z")},s)}},{key:"getShape",value:function(){var o=this.getArrowAttributes(),a=o.d,s=o.strokeWidth,p=o.stroke,g=o.fill;return Object(ne.g)(Lo,{d:a,fill:g,strokeWidth:s,stroke:p})}},{key:"render",value:function(){return Object(ne.g)("g",{className:"lf-arrow"},this.getShape())}}]),t}(ne.a);function KD(e,r){return Fl(e,r)}var Fg=KD;function ZD(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}var JD=ZD,QD=function(){return xr.a.Date.now()},zc=QD,qD=/\s/;function ej(e){for(var r=e.length;r--&&qD.test(e.charAt(r)););return r}var tj=ej,rj=/^\s+/;function nj(e){return e&&e.slice(0,tj(e)+1).replace(rj,"")}var oj=nj,Hg=0/0,ij=/^[-+]0x[0-9a-f]+$/i,aj=/^0b[01]+$/i,uj=/^0o[0-7]+$/i,sj=parseInt;function lj(e){if(typeof e=="number")return e;if(ha(e))return Hg;if(Tt(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=Tt(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=oj(e);var t=aj.test(e);return t||uj.test(e)?sj(e.slice(2),t?2:8):ij.test(e)?Hg:+e}var Gg=lj,fj="Expected a function",cj=Math.max,dj=Math.min;function pj(e,r,t){var n,o,a,s,p,g,E=0,T=!1,D=!1,B=!0;if(typeof e!="function")throw new TypeError(fj);r=Gg(r)||0,Tt(t)&&(T=!!t.leading,D="maxWait"in t,a=D?cj(Gg(t.maxWait)||0,r):a,B="trailing"in t?!!t.trailing:B);function G(Re){var Ze=n,He=o;return n=o=void 0,E=Re,s=e.apply(He,Ze),s}function Z(Re){return E=Re,p=setTimeout(le,r),T?G(Re):s}function ae(Re){var Ze=Re-g,He=Re-E,ht=r-Ze;return D?dj(ht,a-He):ht}function se(Re){var Ze=Re-g,He=Re-E;return g===void 0||Ze>=r||Ze<0||D&&He>=a}function le(){var Re=zc();if(se(Re))return Ae(Re);p=setTimeout(le,ae(Re))}function Ae(Re){return p=void 0,B&&n?G(Re):(n=o=void 0,s)}function ge(){p!==void 0&&clearTimeout(p),E=0,n=g=o=p=void 0}function be(){return p===void 0?s:Ae(zc())}function Fe(){var Re=zc(),Ze=se(Re);if(n=arguments,o=this,g=Re,Ze){if(p===void 0)return Z(g);if(D)return clearTimeout(p),p=setTimeout(le,r),G(g)}return p===void 0&&(p=setTimeout(le,r)),s}return Fe.cancel=ge,Fe.flush=be,Fe}var hj=pj,vj=i(166);function yj(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function kg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gj(e,r,t){return r&&kg(e.prototype,r),t&&kg(e,t),e}function _n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var mj=function(){function e(r){yj(this,e),_n(this,"undos",[]),_n(this,"redos",[]),_n(this,"callbacks",[]),_n(this,"stopWatch",null),_n(this,"curData",null),_n(this,"maxSize",50),_n(this,"waitTime",100),_n(this,"eventCenter",void 0),this.eventCenter=r}return gj(e,[{key:"add",value:function(t){Fg(JD(this.undos),t)||(this.undos.push(t),Fg(this.curData,t)||(this.redos=[]),this.eventCenter.emit(it.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 n=this.undos.pop();return this.curData=jt(n),n}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=jt(t),t}}},{key:"watch",value:function(t){var n=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(vj.a)(t,hj(function(){var o=t.modelToHistoryData();o&&n.add(o)},this.waitTime))}}]),e}(),bj=mj;function ws(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ws=function(t){return typeof t}:ws=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}var $g,Xg,Ug;function Oj(e,r){return Pj(e)||Sj(e,r)||xj(e,r)||Ej()}function Ej(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xj(e,r){if(e){if(typeof e=="string")return Vg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Vg(e,r)}}function Vg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Sj(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function Pj(e){if(Array.isArray(e))return e}function Yg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function zo(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Yg(Object(t),!0).forEach(function(n){no(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Tj(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Wg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mj(e,r,t){return r&&Wg(e.prototype,r),t&&Wg(e,t),e}function wj(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Fc(e,r)}function Fc(e,r){return Fc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Fc(e,r)}function Aj(e){var r=Dj();return function(){var n=As(e),o;if(r){var a=As(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Nj(this,o)}}function Nj(e,r){if(r&&(ws(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fo(e)}function Fo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},As(e)}function no(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Hc=Hr($g=(Ug=Xg=function(e){wj(t,e);var r=Aj(t);function t(){var n;return Tj(this,t),n=r.call(this),no(Fo(n),"ref",Object(ne.f)()),no(Fo(n),"__prevText",{type:"",text:"",id:""}),no(Fo(n),"keyupHandler",function(o){var a=n.props.graphModel.textEditElement;o.key==="Enter"&&o.altKey&&a.setElementState(0)}),no(Fo(n),"inputHandler",function(o){var a=o.target,s=a.innerText,p=n.props.graphModel.textEditElement;n.__prevText={type:p.type,text:s.replace(/(\r\n)+$|(\n)+$/,""),id:p.id}}),no(Fo(n),"keydownHandler",function(o){o.stopPropagation()}),n.state={style:{left:0,top:0}},n}return Mj(t,[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var o=this.props.graphModel,a=o.eventCenter;a.on("".concat(it.GRAPH_TRANSFORM,",").concat(it.NODE_CLICK,",").concat(it.BLANK_CLICK," "),function(){var s=o.textEditElement,p=o.editConfigModel,g=p.edgeTextEdit,E=p.nodeTextEdit;(g||E)&&s&&o.textEditElement.setElementState(Et.DEFAULT)})}},{key:"componentDidUpdate",value:function(){var o=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var a=this.__prevText,s=a.text,p=a.id;o.updateText(p,s),o.eventCenter.emit(it.TEXT_UPDATE,zo({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(o){if(window.getSelection!==void 0&&document.createRange!==void 0){var a=document.createRange();a.selectNodeContents(o),a.collapse(!1);var s=window.getSelection();s.removeAllRanges(),s.addRange(a)}}},{key:"render",value:function(){var o,a=this.props.graphModel.textEditElement,s=this.state.style;return a?Object(ne.g)("div",{contentEditable:!0,className:"lf-text-input",style:s,ref:this.ref,key:a.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(o=a.text)===null||o===void 0?void 0:o.value):null}}],[{key:"getDerivedStateFromProps",value:function(o){var a=o.graphModel,s=a.transformModel,p=a.theme,g=a.textEditElement,E;if(g){var T;if(!((T=g.text)!==null&&T!==void 0&&T.value))if(g.BaseType===Ht.EDGE){g=g;var D=g.text,B=g.textPosition,G=B.x,Z=B.y;D.x=G,D.y=Z,g.setText(D)}else g=g;var ae={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(g.BaseType===Ht.EDGE){var se=p.edgeText,le=se.overflowMode,Ae=se.lineHeight,ge=se.wrapPadding,be=se.textWidth;be&&le==="autoWrap"&&(E=zo(zo({},ae),{},{width:be,minWidth:be,lineHeight:Ae,padding:ge}))}else if(g.BaseType===Ht.NODE){var Fe=p.nodeText,Re=Fe.overflowMode,Ze=Fe.lineHeight,He=Fe.wrapPadding,ht=Fe.textWidth,yt=g,ur=yt.width,Or=yt.modelType;(Or!==pt.TEXT_NODE&&Re==="autoWrap"||Or===pt.TEXT_NODE&&ht)&&(E=zo(zo({},ae),{},{width:ht||ur,minWidth:ht||ur,lineHeight:Ze,padding:He}))}var rn=g.text,Bn=rn.x,oo=rn.y,Ho=s.CanvasPointToHtmlPoint([Bn,oo]),Ln=Oj(Ho,2),Go=Ln[0],Vc=Ln[1];return{style:zo({left:Go,top:Vc},E)}}}}]),t}(ne.a),no(Xg,"toolName","textEdit"),Ug))||$g,jj=function(r){var t=r.x,n=r.y,o=r.width,a=r.height;return{x:t-o/2,y:n-a/2,x1:t+o/2,y1:n+a/2}},Cj=function(r){var t=r.startPoint,n=r.endPoint,o=(t.x+n.x)/2,a=(t.y+n.y)/2,s=Math.abs(t.x-n.x)+10,p=Math.abs(t.y-n.y)+10;return{x:o-s/2,y:a-p/2,x1:o+s/2,y1:a+p/2}},Rj=function(r){var t=r.points,n=So(t),o=li(n,8),a=o.x,s=o.y,p=o.width,g=o.height;return{x:a-p/2,y:s-g/2,x1:a+p/2,y1:s+g/2}},Ij=function(r){var t=r.path,n=Ba(t),o=li(n,8),a=o.x,s=o.y,p=o.width,g=o.height;return{x:a-p/2,y:s-g/2,x1:a+p/2,y1:s+g/2}},_j=function(r){if(r.modelType===pt.LINE_EDGE)return Cj(r);if(r.modelType===pt.POLYLINE_EDGE)return Rj(r);if(r.modelType===pt.BEZIER_EDGE)return Ij(r)};function Ns(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ns=function(t){return typeof t}:Ns=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ns(e)}var Kg,Zg,Jg;function Qg(e,r){return zj(e)||Lj(e,r)||qg(e,r)||Bj()}function Bj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lj(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,s,p;try{for(t=t.call(e);!(o=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function zj(e){if(Array.isArray(e))return e}function Fj(e){return kj(e)||Gj(e)||qg(e)||Hj()}function Hj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qg(e,r){if(e){if(typeof e=="string")return Gc(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Gc(e,r)}}function Gj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kj(e){if(Array.isArray(e))return Gc(e)}function Gc(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function $j(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function em(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Xj(e,r,t){return r&&em(e.prototype,r),t&&em(e,t),e}function Uj(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&kc(e,r)}function kc(e,r){return kc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},kc(e,r)}function Vj(e){var r=Wj();return function(){var n=Ds(e),o;if(r){var a=Ds(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Yj(this,o)}}function Yj(e,r){if(r&&(Ns(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bi(e)}function bi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wj(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ds(e){return Ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ds(e)}function Oi(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var $c=Hr(Kg=(Jg=Zg=function(e){Uj(t,e);var r=Vj(t);function t(n){var o;$j(this,t),o=r.call(this),Oi(bi(o),"stepDrag",void 0),Oi(bi(o),"handleMouseDown",function(g){o.stepDrag.handleMouseDown(g)}),Oi(bi(o),"onDraging",function(g){var E=g.deltaX,T=g.deltaY,D=o.props.graphModel,B=D.getSelectElements(!0);D.moveNodes(B.nodes.map(function(G){return G.id}),E,T)}),Oi(bi(o),"handleContextMenu",function(g){g.preventDefault();var E=o.props,T=E.graphModel,D=E.graphModel,B=D.eventCenter,G=D.selectElements,Z=T.getPointByClient({x:g.clientX,y:g.clientY}),ae={nodes:[],edges:[]},se=Fj(G.values());se.forEach(function(le){le.BaseType===Ht.NODE&&ae.nodes.push(le.getData()),le.BaseType===Ht.EDGE&&ae.edges.push(le.getData())}),B.emit(it.SELECTION_CONTEXTMENU,{data:ae,e:g,position:Z})});var a=n.graphModel,s=a.gridSize,p=a.eventCenter;return o.stepDrag=new qn({onDraging:o.onDraging,step:s,eventType:"SELECTION",eventCenter:p}),o}return Xj(t,[{key:"render",value:function(){var o=this.props.graphModel,a=o.selectElements,s=o.transformModel;if(!(a.size<=1)){var p=Number.MAX_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,E=Number.MIN_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER;a.forEach(function(se){var le={x:0,y:0,x1:0,y1:0};se.BaseType===Ht.NODE&&(le=jj(se)),se.BaseType===Ht.EDGE&&(le=_j(se)),p=Math.min(p,le.x),g=Math.min(g,le.y),E=Math.max(E,le.x1),T=Math.max(T,le.y1)});var D=s.CanvasPointToHtmlPoint([p,g]),B=Qg(D,2);p=B[0],g=B[1];var G=s.CanvasPointToHtmlPoint([E,T]),Z=Qg(G,2);E=Z[0],T=Z[1];var ae={left:"".concat(p-10,"px"),top:"".concat(g-10,"px"),width:"".concat(E-p+20,"px"),height:"".concat(T-g+20,"px")};return Object(ne.g)("div",{className:"lf-multiple-select",style:ae,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}]),t}(ne.a),Oi(Zg,"toolName","multipleSelect"),Jg))||Kg;function Kj(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function tm(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zj(e,r,t){return r&&tm(e.prototype,r),t&&tm(e,t),e}function js(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Jj=function(){function e(r){Kj(this,e),js(this,"tools",void 0),js(this,"components",void 0),js(this,"toolMap",new Map),js(this,"instance",void 0),this.instance=r,this.isDisabledTool(Hc.toolName)||this.registerTool(Hc.toolName,Hc),this.isDisabledTool($c.toolName)||this.registerTool($c.toolName,$c)}return Zj(e,[{key:"isDisabledTool",value:function(t){return this.instance.options.disabledTools.indexOf(t)!==-1}},{key:"registerTool",value:function(t,n){this.toolMap.set(t,n)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}]),e}(),Qj=i(167),qj=i.n(Qj);function eC(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function rm(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tC(e,r,t){return r&&rm(e.prototype,r),t&&rm(e,t),e}function Xc(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var nm=function(){function e(r){eC(this,e),Xc(this,"mousetrap",void 0),Xc(this,"options",void 0),Xc(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var t=r.lf;this.target=t.container,this.mousetrap=new qj.a(this.target),r.keyboard.enabled&&this.enable(!0)}return tC(e,[{key:"initShortcuts",value:function(){var t=this,n=this.options.keyboard.shortcuts;if(n)if(d(n))n.forEach(function(p){var g=p.keys,E=p.callback,T=p.action;return t.on(g,E,T)});else{var o=n.keys,a=n.callback,s=n.action;this.on(o,a,s)}}},{key:"on",value:function(t,n,o){this.mousetrap.bind(this.getKeys(t),n,o)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(t,n){this.mousetrap.unbind(this.getKeys(t),n)}},{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 n=this;return(Array.isArray(t)?t:[t]).map(function(o){return n.formatkey(o)})}},{key:"formatkey",value:function(t){var n=t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command");return n}}]),e}(),rC=nm,tn=null;function om(e,r){return e.x+=r,e.y+=r,e.text&&(e.text.x+=r,e.text.y+=r),e}function im(e,r){return e.startPoint&&(e.startPoint.x+=r,e.startPoint.y+=r),e.endPoint&&(e.endPoint.x+=r,e.endPoint.y+=r),e.pointsList&&e.pointsList.length>0&&e.pointsList.forEach(function(t){t.x+=r,t.y+=r}),e.text&&(e.text.x+=r,e.text.y+=r),e}var Cs=40;function nC(e,r){var t=e.keyboard,n=t.options.keyboard;t.on(["cmd + c","ctrl + c"],function(){if(n.enabled&&!r.textEditElement){var o=e.options.guards,a=r.getSelectElements(!1),s=o&&o.beforeClone?o.beforeClone(a):!0;return s?(tn=a,tn.nodes.forEach(function(p){return om(p,Cs)}),tn.edges.forEach(function(p){return im(p,Cs)}),!1):(tn=null,!1)}}),t.on(["cmd + v","ctrl + v"],function(){if(n.enabled&&!r.textEditElement){if(tn&&(tn.nodes||tn.edges)){e.clearSelectElements();var o=e.addElements(tn);if(!o)return;o.nodes.forEach(function(a){return e.selectElementById(a.id,!0)}),o.edges.forEach(function(a){return e.selectElementById(a.id,!0)}),tn.nodes.forEach(function(a){return om(a,Cs)}),tn.edges.forEach(function(a){return im(a,Cs)})}return!1}}),t.on(["cmd + z","ctrl + z"],function(){if(n.enabled&&!r.textEditElement)return e.undo(),!1}),t.on(["cmd + y","ctrl + y"],function(){if(n.enabled&&!r.textEditElement)return e.redo(),!1}),t.on(["backspace"],function(){if(n.enabled&&!r.textEditElement){var o=r.getSelectElements(!0);return e.clearSelectElements(),o.edges.forEach(function(a){return e.deleteEdge(a.id)}),o.nodes.forEach(function(a){return e.deleteNode(a.id)}),!1}})}function oC(e,r){e.on("node:mousemove",function(t){var n=t.data;r.setNodeSnapLine(n)}),e.on("node:mouseup",function(){r.clearSnapline()})}function Rs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rs=function(t){return typeof t}:Rs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function am(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Ei(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?am(Object(t),!0).forEach(function(n){Lt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):am(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function iC(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function um(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function aC(e,r,t){return r&&um(e.prototype,r),t&&um(e,t),e}function Lt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Uc=function(){function e(r){var t=this;iC(this,e),Lt(this,"container",void 0),Lt(this,"width",void 0),Lt(this,"height",void 0),Lt(this,"graphModel",void 0),Lt(this,"history",void 0),Lt(this,"viewMap",new Map),Lt(this,"tool",void 0),Lt(this,"keyboard",void 0),Lt(this,"dnd",void 0),Lt(this,"options",void 0),Lt(this,"snaplineModel",void 0),Lt(this,"components",[]),Lt(this,"plugins",void 0),Lt(this,"extension",{}),Lt(this,"adapterIn",void 0),Lt(this,"adapterOut",void 0),Lt(this,"getView",function(n){return t.viewMap.get(n)}),r=Av(r),this.options=r,this.container=r.container,this.plugins=r.plugins,this.graphModel=new mT(Ei({},r)),this.tool=new Jj(this),this.history=new bj(this.graphModel.eventCenter),this.dnd=new nw({lf:this}),this.keyboard=new rC({lf:this,keyboard:r.keyboard}),r.snapline!==!1&&(this.snaplineModel=new Wy(this.graphModel),oC(this.graphModel.eventCenter,this.snaplineModel)),nC(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(r.disabledPlugins)}return aC(e,[{key:"register",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(typeof t!="string"){this.registerElement(t);return}var a={BaseEdge:mi,BaseEdgeModel:af,BaseNode:pn,BaseNodeModel:cn,RectNode:ac,RectNodeModel:Wf,CircleNode:lc,CircleNodeModel:Lf,PolygonNode:dc,PolygonNodeModel:Uf,TextNode:Oc,TextNodeModel:Zf,LineEdge:Cc,LineEdgeModel:lf,DiamondNode:vc,DiamondNodeModel:Hf,PolylineEdge:Ic,PolylineEdgeModel:df,BezierEdge:Bc,BezierEdgeModel:If,EllipseNode:mc,EllipseNodeModel:kf,HtmlNode:Sc,HtmlNodeModel:Qf,h:ne.g,type:t};this.viewMap.forEach(function(T){var D=T.extendKey;D&&(a[D]=T)}),this.graphModel.modelMap.forEach(function(T){var D=T.extendKey;D&&(a[D]=T)});var s=n(a),p=s.view,g=s.model,E=p;o&&!E.isObervered&&(E.isObervered=!0,E=bt(E)),this.setView(t,E),this.graphModel.setModel(t,g)}},{key:"registerElement",value:function(t){var n=t.view;t.isObserverView!==!1&&!n.isObervered&&(n.isObervered=!0,n=bt(n)),this.setView(t.type,n),this.graphModel.setModel(t.type,t.model)}},{key:"batchRegister",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];n.forEach(function(o){t.registerElement(o)})}},{key:"defaultRegister",value:function(){this.registerElement({view:ac,model:Wf,type:"rect"}),this.registerElement({type:"circle",view:lc,model:Lf}),this.registerElement({type:"polygon",view:dc,model:Uf}),this.registerElement({type:"line",view:Cc,model:lf}),this.registerElement({type:"polyline",view:Ic,model:df}),this.registerElement({type:"bezier",view:Bc,model:If}),this.registerElement({type:"text",view:Oc,model:Zf}),this.registerElement({type:"ellipse",view:mc,model:kf}),this.registerElement({type:"diamond",view:vc,model:Hf}),this.registerElement({type:"html",view:Sc,model:Qf})}},{key:"selectElementById",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;this.graphModel.selectElementById(t,n),!n&&o&&this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var n=this.graphModel.transformModel,o=t.coordinate,a=t.id;if(!o){var s=this.getNodeModelById(a);s&&(o=s.getData());var p=this.getEdgeModelById(a);p&&(o=p.textPosition)}var g=o,E=g.x,T=g.y;n.focusOn(E,T,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,n){this.graphModel.resize(t,n),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,n){this.graphModel.updateText(t,n)}},{key:"deleteElement",value:function(t){var n,o,a,s=this.getModelById(t);if(!s)return!1;var p=(n={},Lt(n,Ht.NODE,this.deleteNode),Lt(n,Ht.EDGE,this.deleteEdge),n),g=s.BaseType;return(o=(a=p[g])===null||a===void 0?void 0:a.call(this,t))!==null&&o!==void 0?o:!1}},{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,n){this.graphModel.changeNodeType(t,n)}},{key:"changeEdgeType",value:function(t,n){this.graphModel.changeEdgeType(t,n)}},{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 n=this.graphModel.getNodeModelById(t);if(!n)return!1;var o=n.getData(),a=this.options.guards,s=a&&a.beforeDelete?a.beforeDelete(o):!0;return s&&this.graphModel.deleteNode(t),s}},{key:"cloneNode",value:function(t){var n=this.graphModel.getNodeModelById(t),o=n.getData(),a=this.options.guards,s=a&&a.beforeClone?a.beforeClone(o):!0;if(s)return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,n){return this.graphModel.changeNodeId(t,n)}},{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 n=this.options.guards,o=this.graphModel.edgesMap[t];if(!o)return!1;var a=o.model.getData(),s=n&&n.beforeDelete?n.beforeDelete(a):!0;return s&&this.graphModel.deleteEdgeById(t),s}},{key:"deleteEdgeByNodeId",value:function(t){var n=t.sourceNodeId,o=t.targetNodeId;n&&o?this.graphModel.deleteEdgeBySourceAndTarget(n,o):n?this.graphModel.deleteEdgeBySource(n):o&&this.graphModel.deleteEdgeByTarget(o)}},{key:"changeEdgeId",value:function(t,n){return this.graphModel.changeEdgeId(t,n)}},{key:"getEdgeModelById",value:function(t){var n,o=this.graphModel.edgesMap;return(n=o[t])===null||n===void 0?void 0:n.model}},{key:"getEdgeModels",value:function(t){var n=this.graphModel.edges,o=t.sourceNodeId,a=t.targetNodeId;if(o&&a){var s=[];return n.forEach(function(E){E.sourceNodeId===o&&E.targetNodeId===a&&s.push(E)}),s}if(o){var p=[];return n.forEach(function(E){E.sourceNodeId===o&&p.push(E)}),p}if(a){var g=[];return n.forEach(function(E){E.targetNodeId===a&&g.push(E)}),g}return[]}},{key:"getEdgeDataById",value:function(t){var n;return(n=this.getEdgeModelById(t))===null||n===void 0?void 0:n.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,n){var o;(o=this.graphModel.getElement(t))===null||o===void 0||o.setProperties(qt(n))}},{key:"deleteProperty",value:function(t,n){var o;(o=this.graphModel.getElement(t))===null||o===void 0||o.deleteProperty(n)}},{key:"getProperties",value:function(t){var n;return(n=this.graphModel.getElement(t))===null||n===void 0?void 0:n.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{key:"setElementZIndex",value:function(t,n){return this.graphModel.setElementZIndex(t,n)}},{key:"addElements",value:function(t){for(var n=this,o=t.nodes,a=t.edges,s={},p={nodes:[],edges:[]},g=0;g<o.length;g++){var E=o[g],T=E.id,D=this.addNode(E);if(!D)return;T&&(s[T]=D.id),p.nodes.push(D)}return a.forEach(function(B){var G=B.sourceNodeId,Z=B.targetNodeId;s[G]&&(G=s[G]),s[Z]&&(Z=s[Z]);var ae=n.graphModel.addEdge(Ei(Ei({},B),{},{sourceNodeId:G,targetNodeId:Z}));p.edges.push(ae)}),p}},{key:"getAreaElement",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return this.graphModel.getAreaElement(t,n,o,a,s).map(function(p){return p.getData()})}},{key:"getSelectElements",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!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,n){return this.graphModel.getPointByClient({x:t,y:n})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=qt(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=qt(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,n){var o=this.graphModel.transformModel;return o.zoom(t,n)}},{key:"resetZoom",value:function(){var t=this.graphModel.transformModel;t.resetZoom()}},{key:"setZoomMiniSize",value:function(t){var n=this.graphModel.transformModel;n.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){var n=this.graphModel.transformModel;n.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel,n=t.SCALE_X,o=t.SCALE_Y,a=t.TRANSLATE_X,s=t.TRANSLATE_Y;return{SCALE_X:n,SCALE_Y:o,TRANSLATE_X:a,TRANSLATE_Y:s}}},{key:"translate",value:function(t,n){var o=this.graphModel.transformModel;o.translate(t,n)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,n=t.TRANSLATE_X,o=t.TRANSLATE_Y;this.translate(-n,-o)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t,n){n===void 0&&(n=t),this.graphModel.fitView(t,n)}},{key:"openEdgeAnimation",value:function(t){this.graphModel.openEdgeAnimation(t)}},{key:"closeEdgeAnimation",value:function(t){this.graphModel.closeEdgeAnimation(t)}},{key:"on",value:function(t,n){this.graphModel.eventCenter.on(t,n)}},{key:"off",value:function(t,n){this.graphModel.eventCenter.off(t,n)}},{key:"once",value:function(t,n){this.graphModel.eventCenter.once(t,n)}},{key:"emit",value:function(t,n){this.graphModel.eventCenter.emit(t,n)}},{key:"installPlugins",value:function(){var t,n=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=(t=this.plugins)!==null&&t!==void 0?t:e.extensions;a.forEach(function(s){var p=s.pluginName||s.name;o.indexOf(p)===-1&&n.installPlugin(s)})}},{key:"installPlugin",value:function(t){if(Rs(t)==="object"){var n=t.install,o=t.render;n&&n.call(t,this,e),o&&this.components.push(o.bind(t)),this.extension[t.pluginName]=t;return}var a=t,s=new a({lf:this,LogicFlow:e});s.render&&this.components.push(s.render.bind(s)),this.extension[a.pluginName]=s}},{key:"updateAttributes",value:function(t,n){this.graphModel.updateAttributes(t,n)}},{key:"createFakerNode",value:function(t){var n=this.graphModel.modelMap.get(t.type);if(!n){console.warn("不存在为".concat(t.type,"类型的节点"));return}var o=new n(Ei(Ei({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(o),o}},{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,n){this.viewMap.set(t,n)}},{key:"renderRawData",value:function(t){this.graphModel.graphDataToModel(qt(t)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(ne.j)(Object(ne.g)(ew,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(it.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t)}}],[{key:"use",value:function(t){var n=t.pluginName;n||(console.warn("请给插件".concat(t.name||t.constructor.name,"指定pluginName!")),n=t.name);var o=this.extensions.get(n);o&&o.destroy&&o.destroy(),this.extensions.set(n,t)}}]),e}();Lt(Uc,"extensions",new Map);function Hr(e){return bt(e)}c.default=Uc}])})})(gC,Ve);const _s=cC(Ve),mC=[{type:"bpmn:startEvent",text:"开始",class:"bpmn-start"},{type:"bpmn:endEvent",text:"结束",class:"bpmn-end"},{type:"bpmn:exclusiveGateway",text:"网关",class:"bpmn-exclusiveGateway"},{type:"bpmn:userTask",text:"用户",class:"bpmn-user"}];function bC(m,v){return v={exports:{}},m(v,v.exports),v.exports}var OC=bC(function(m){var v=m.exports=function(u,c){if(c||(c=16),u===void 0&&(u=128),u<=0)return"0";for(var i=Math.log(Math.pow(2,u))/Math.log(c),l=2;i===1/0;l*=2)i=Math.log(Math.pow(2,u/l))/Math.log(c)*l;for(var f=i-Math.floor(i),y="",l=0;l<Math.floor(i);l++){var b=Math.floor(Math.random()*c).toString(c);y=b+y}if(f){var S=Math.pow(c,f),b=Math.floor(Math.random()*S).toString(c);y=b+y}var x=parseInt(y,c);return x!==1/0&&x>=Math.pow(2,u)?v(u,c):y};v.rack=function(u,c,i){var l=function(y){var b=0;do{if(b++>10)if(i)u+=i;else throw new Error("too many ID collisions, use more bits");var S=v(u,c)}while(Object.hasOwnProperty.call(f,S));return f[S]=y,S},f=l.hats={};return l.get=function(y){return l.hats[y]},l.set=function(y,b){return l.hats[y]=b,l},l.bits=u||128,l.base=c||16,l}});function nn(m){if(!(this instanceof nn))return new nn(m);m=m||[128,36,1],this._seed=m.length?OC.rack(m[0],m[1],m[2]):m}nn.prototype.next=function(m){return this._seed(m||!0)};nn.prototype.nextPrefixed=function(m,v){var u;do u=m+this.next(!0);while(this.assigned(u));return this.claim(u,v),u};nn.prototype.claim=function(m,v){this._seed.set(m,v||!0)};nn.prototype.assigned=function(m){return this._seed.get(m)||!1};nn.prototype.unclaim=function(m){delete this._seed.hats[m]};nn.prototype.clear=function(){var m=this._seed.hats,v;for(v in m)this.unclaim(v)};var EC=new nn([32,32,1]);function Vo(){return EC.next()}var Lm=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),xC=function(m){Lm(v,m);function v(u,c){var i=this;return u.id||(u.id="Event_"+Vo()),u.text||(u.text=""),u.text&&typeof u.text=="string"&&(u.text={value:u.text,x:u.x,y:u.y+40}),i=m.call(this,u,c)||this,i}return v.prototype.setAttributes=function(){this.r=18},v.prototype.getConnectedTargetRules=function(){var u=m.prototype.getConnectedTargetRules.call(this),c={message:"起始节点不能作为边的终点",validate:function(){return!1}};return u.push(c),u},v.extendKey="StartEventModel",v}(Ve.CircleNodeModel),SC=function(m){Lm(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.extendKey="StartEventNode",v}(Ve.CircleNode),PC={type:"bpmn:startEvent",view:SC,model:xC},zm=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),zs=globalThis&&globalThis.__assign||function(){return zs=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},zs.apply(this,arguments)},TC=function(m){zm(v,m);function v(u,c){var i=this;return u.id||(u.id="Event_"+Vo()),u.text||(u.text=""),u.text&&typeof u.text=="string"&&(u.text={value:u.text,x:u.x,y:u.y+40}),i=m.call(this,u,c)||this,i}return v.prototype.setAttributes=function(){this.r=18},v.prototype.getConnectedSourceRules=function(){var u=m.prototype.getConnectedSourceRules.call(this),c={message:"结束节点不能作为边的起点",validate:function(){return!1}};return u.push(c),u},v.extendKey="EndEventModel",v}(Ve.CircleNodeModel),MC=function(m){zm(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},v.prototype.getShape=function(){var u=this.props.model,c=u.getNodeStyle(),i=u.x,l=u.y,f=u.r,y=m.prototype.getShape.call(this);return Ve.h("g",{},y,Ve.h("circle",zs(zs({},c),{cx:i,cy:l,r:f-5})))},v.extendKey="EndEventView",v}(Ve.CircleNode),wC={type:"bpmn:endEvent",view:MC,model:TC},Fm=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Ti=globalThis&&globalThis.__assign||function(){return Ti=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Ti.apply(this,arguments)},AC=function(m){Fm(v,m);function v(u,c){var i=this;return u.id||(u.id="Gateway_"+Vo()),u.text||(u.text=""),u.text&&typeof u.text=="string"&&(u.text={value:u.text,x:u.x,y:u.y+40}),i=m.call(this,u,c)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return v.extendKey="ExclusiveGatewayModel",v}(Ve.PolygonNodeModel),NC=function(m){Fm(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,f=u.height,y=u.points,b=u.getNodeStyle();return Ve.h("g",{transform:"matrix(1 0 0 1 "+(c-l/2)+" "+(i-f/2)+")"},Ve.h("polygon",Ti(Ti({},b),{x:c,y:i,points:y})),Ve.h("path",Ti({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},b)))},v.extendKey="ExclusiveGatewayNode",v}(Ve.PolygonNode),DC={type:"bpmn:exclusiveGateway",view:NC,model:AC},Hm=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Fs=globalThis&&globalThis.__assign||function(){return Fs=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Fs.apply(this,arguments)},jC=function(m){Hm(v,m);function v(u,c){var i=this;return u.id||(u.id="Activity_"+Vo()),i=m.call(this,u,c)||this,i}return v.extendKey="UserTaskModel",v}(Ve.RectNodeModel),CC=function(m){Hm(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getLabelShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,f=u.height,y=u.getNodeStyle();return Ve.h("svg",{x:c-l/2+5,y:i-f/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Ve.h("path",{fill:y.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},v.prototype.getShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,f=u.height,y=u.radius,b=u.getNodeStyle();return Ve.h("g",{},[Ve.h("rect",Fs(Fs({},b),{x:c-l/2,y:i-f/2,rx:y,ry:y,width:l,height:f})),this.getLabelShape()])},v.extendKey="UserTaskNode",v}(Ve.RectNode),RC={type:"bpmn:userTask",view:CC,model:jC},Gm=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Yc=globalThis&&globalThis.__assign||function(){return Yc=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Yc.apply(this,arguments)},IC=function(m){Gm(v,m);function v(u,c){var i=this;return u.id||(u.id="Activity_"+Vo()),i=m.call(this,u,c)||this,i}return v.extendKey="ServiceTaskModel",v}(Ve.RectNodeModel),_C=function(m){Gm(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getLabelShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,f=u.height,y=u.getNodeStyle();return Ve.h("svg",{x:c-l/2+5,y:i-f/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Ve.h("path",{fill:y.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},v.prototype.getShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,f=u.height,y=u.radius,b=u.getNodeStyle();return Ve.h("g",{},[Ve.h("rect",Yc({x:c-l/2,y:i-f/2,rx:y,ry:y,width:l,height:f},b)),this.getLabelShape()])},v.extendKey="ServiceTaskNode",v}(Ve.RectNode),BC={type:"bpmn:serviceTask",view:_C,model:IC},km=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),LC=function(m){km(v,m);function v(u,c){var i=this;return u.id||(u.id="Flow_"+Vo()),i=m.call(this,u,c)||this,i}return v.extendKey="SequenceFlowModel",v}(Ve.PolylineEdgeModel),zC=function(m){km(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.extendKey="SequenceFlowEdge",v}(Ve.PolylineEdge),FC={type:"bpmn:sequenceFlow",view:zC,model:LC},dm={width:40,height:40},pm={width:40,height:40},hm={width:40,height:40},vm={width:100,height:80},ym={width:100,height:80},HC={rect:{radius:5,stroke:"rgb(24, 125, 255)"},circle:{r:18,stroke:"rgb(24, 125, 255)"},polygon:{stroke:"rgb(24, 125, 255)"},polyline:{stroke:"rgb(24, 125, 255)",hoverStroke:"rgb(24, 125, 255)",selectedStroke:"rgb(24, 125, 255)"},edgeText:{background:{fill:"white",height:14,stroke:"transparent",radius:3}}},GC=function(){function m(v){var u=v.lf;u.setTheme(HC),u.register(PC),u.register(wC),u.register(DC),u.register(RC),u.register(BC),u.options.customBpmnEdge||(u.register(FC),u.setDefaultEdgeType("bpmn:sequenceFlow"))}return m.pluginName="bpmnElement",m}(),kC=function(){function m(v){var u=this,c=v.lf;this.lf=c,this.customCssRules="",this.useGlobalRules=!0,c.getSnapshot=function(i,l){u.getSnapshot(i,l)},c.getSnapshotBlob=function(i){return u.getSnapshotBlob(i)},c.getSnapshotBase64=function(i){return u.getSnapshotBase64(i)}}return m.prototype.getSvgRootElement=function(v){var u=this;this.offsetX=Number.MAX_SAFE_INTEGER,this.offsetY=Number.MAX_SAFE_INTEGER,v.graphModel.nodes.forEach(function(i){var l=i.x,f=i.width,y=i.y,b=i.height,S=l-f/2,x=y-b/2;S<u.offsetX&&(u.offsetX=S-5),x<u.offsetY&&(u.offsetY=x-5)}),v.graphModel.edges.forEach(function(i){i.pointsList&&i.pointsList.forEach(function(l){var f=l.x,y=l.y;f<u.offsetX&&(u.offsetX=f-5),y<u.offsetY&&(u.offsetY=y-5)})});var c=v.container.querySelector(".lf-canvas-overlay");return c},m.prototype.triggerDownload=function(v){var u=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),c=document.createElement("a");c.setAttribute("download",this.fileName),c.setAttribute("href",v),c.setAttribute("target","_blank"),c.dispatchEvent(u)},m.prototype.removeAnchor=function(v){for(var u=v.childNodes,c=v.childNodes&&v.childNodes.length,i=0;i<c;i++){var l=u[i],f=l.classList&&Array.from(l.classList)||[];f.indexOf("lf-anchor")>-1&&(v.removeChild(v.childNodes[i]),c--,i--)}},m.prototype.getSnapshot=function(v,u){var c=this;this.fileName=v||"logic-flow."+Date.now()+".png";var i=this.getSvgRootElement(this.lf);this.getCanvasData(i,u).then(function(l){var f=l.toDataURL("image/png").replace("image/png","image/octet-stream");c.triggerDownload(f)})},m.prototype.getSnapshotBase64=function(v){var u=this,c=this.getSvgRootElement(this.lf);return new Promise(function(i){u.getCanvasData(c,v).then(function(l){var f=l.toDataURL("image/png");i({data:f,width:l.width,height:l.height})})})},m.prototype.getSnapshotBlob=function(v){var u=this,c=this.getSvgRootElement(this.lf);return new Promise(function(i){u.getCanvasData(c,v).then(function(l){l.toBlob(function(f){i({data:f,width:l.width,height:l.height})},"image/png")})})},m.prototype.getClassRules=function(){var v="";if(this.useGlobalRules)for(var u=document.styleSheets,c=0;c<u.length;c++)for(var i=u[c],l=0;l<i.cssRules.length;l++)v+=i.cssRules[l].cssText;return this.customCssRules&&(v+=this.customCssRules),v},m.prototype.getCanvasData=function(v,u){var c=this,i=v.cloneNode(!0),l=i.lastChild,f=l.childNodes&&l.childNodes.length;if(f)for(var y=0;y<f;y++){var b=l.childNodes[y],S=b.classList&&Array.from(b.classList);if(S&&S.indexOf("lf-base")<0)l.removeChild(l.childNodes[y]),f--,y--;else{var x=l.childNodes[y];x&&x.childNodes.forEach(function(L){var k=L;c.removeAnchor(k.firstChild)})}}i.lastChild.style.transform="matrix(1, 0, 0, 1, "+(-this.offsetX+10)+", "+(-this.offsetY+10)+")";var P=window.devicePixelRatio||1,w=document.createElement("canvas"),M=this.lf.graphModel.rootEl.querySelector(".lf-base"),j=M.getBoundingClientRect(),C=this.lf.graphModel,_=C.transformModel,z=_.SCALE_X,X=_.SCALE_Y,U=Math.ceil(j.width/z),ie=Math.ceil(j.height/X);w.style.width=U+"px",w.style.height=ie+"px",w.width=U*P+80,w.height=ie*P+80;var oe=w.getContext("2d");oe.clearRect(0,0,w.width,w.height),oe.scale(P,P),u?(oe.fillStyle=u,oe.fillRect(0,0,U*P+80,ie*P+80)):oe.clearRect(0,0,U,ie);var ee=new Image,J=document.createElement("style");J.innerHTML=this.getClassRules();var ue=document.createElement("foreignObject");return ue.appendChild(J),i.appendChild(ue),new Promise(function(L){ee.onload=function(){oe.drawImage(ee,0,0),L(w)};var k="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(i),I=k.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");ee.src=I})},m.pluginName="snapshot",m}(),$C=new nn([32,32,1]);function gm(){return $C.next()}var cr=function(){};cr.ObjTree=function(){return this};cr.ObjTree.VERSION="0.23";cr.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
`;cr.ObjTree.prototype.attr_prefix="-";cr.ObjTree.prototype.parseXML=function(m){var v;if(window.DOMParser){var u=new DOMParser,c=u.parseFromString(m,"application/xml");if(!c)return;v=c.documentElement}else window.ActiveXObject&&(u=new ActiveXObject("Microsoft.XMLDOM"),u.async=!1,u.loadXML(m),v=u.documentElement);if(v)return this.parseDOM(v)};cr.ObjTree.prototype.parseHTTP=function(m,v,u){var c={};for(var i in v)c[i]=v[i];if(c.method||(typeof c.postBody>"u"&&typeof c.postbody>"u"&&typeof c.parameters>"u"?c.method="get":c.method="post"),u){c.asynchronous=!0;var l=this,f=u,y=c.onComplete;c.onComplete=function(x){var P;x&&x.responseXML&&x.responseXML.documentElement&&(P=l.parseDOM(x.responseXML.documentElement)),f(P,x),y&&y(x)}}else c.asynchronous=!1;var b;if(typeof HTTP<"u"&&HTTP.Request){c.uri=m;var S=new HTTP.Request(c);S&&(b=S.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var S=new Ajax.Request(m,c);S&&(b=S.transport)}if(u)return b;if(b&&b.responseXML&&b.responseXML.documentElement)return this.parseDOM(b.responseXML.documentElement)};cr.ObjTree.prototype.parseDOM=function(m){if(m){if(this.__force_array={},this.force_array)for(var v=0;v<this.force_array.length;v++)this.__force_array[this.force_array[v]]=1;var u=this.parseElement(m);if(this.__force_array[m.nodeName]&&(u=[u]),m.nodeType!=11){var c={};c[m.nodeName]=u,u=c}return u}};cr.ObjTree.prototype.parseElement=function(m){if(m.nodeType!=7){if(m.nodeType==3||m.nodeType==4){var v=m.nodeValue.match(/[^\x00-\x20]/);return v==null?void 0:m.nodeValue}var u,c={};if(m.attributes&&m.attributes.length){u={};for(var i=0;i<m.attributes.length;i++){var l=m.attributes[i].nodeName;if(typeof l=="string"){var f=m.attributes[i].nodeValue;f&&(l=this.attr_prefix+l,typeof c[l]>"u"&&(c[l]=0),c[l]++,this.addNode(u,l,c[l],f))}}}if(m.childNodes&&m.childNodes.length){var y=!0;u&&(y=!1);for(var i=0;i<m.childNodes.length&&y;i++){var b=m.childNodes[i].nodeType;b==3||b==4||(y=!1)}if(y){u||(u="");for(var i=0;i<m.childNodes.length;i++)u+=m.childNodes[i].nodeValue}else{u||(u={});for(var i=0;i<m.childNodes.length;i++){var l=m.childNodes[i].nodeName;if(typeof l=="string"){var f=this.parseElement(m.childNodes[i]);f&&(typeof c[l]>"u"&&(c[l]=0),c[l]++,this.addNode(u,l,c[l],f))}}}}return u}};cr.ObjTree.prototype.addNode=function(m,v,u,c){this.__force_array[v]?(u==1&&(m[v]=[]),m[v][m[v].length]=c):u==1?m[v]=c:u==2?m[v]=[m[v],c]:m[v][m[v].length]=c};cr.ObjTree.prototype.writeXML=function(m){var v=this.hash_to_xml(null,m);return this.xmlDecl+v};cr.ObjTree.prototype.hash_to_xml=function(m,v){var u=[],c=[];for(var i in v)if(v.hasOwnProperty(i)){var l=v[i];i.charAt(0)!=this.attr_prefix?typeof l>"u"||l==null?u[u.length]="<"+i+" />":typeof l=="object"&&l.constructor==Array?u[u.length]=this.array_to_xml(i,l):typeof l=="object"?u[u.length]=this.hash_to_xml(i,l):u[u.length]=this.scalar_to_xml(i,l):c[c.length]=" "+i.substring(1)+'="'+this.xml_escape(l)+'"'}var f=c.join(""),y=u.join("");return typeof m>"u"||m==null||(u.length>0?y.match(/\n/)?y="<"+m+f+`>
`+y+"</"+m+`>
`:y="<"+m+f+">"+y+"</"+m+`>
`:y="<"+m+f+` />
`),y};cr.ObjTree.prototype.array_to_xml=function(m,v){for(var u=[],c=0;c<v.length;c++){var i=v[c];typeof i>"u"||i==null?u[u.length]="<"+m+" />":typeof i=="object"&&i.constructor==Array?u[u.length]=this.array_to_xml(m,i):typeof i=="object"?u[u.length]=this.hash_to_xml(m,i):u[u.length]=this.scalar_to_xml(m,i)}return u.join("")};cr.ObjTree.prototype.scalar_to_xml=function(m,v){return m=="#text"?this.xml_escape(v):"<"+m+">"+this.xml_escape(v)+"</"+m+`>
`};cr.ObjTree.prototype.xml_escape=function(m){return m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var Xs=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l},on;(function(m){m.START="bpmn:startEvent",m.END="bpmn:endEvent",m.GATEWAY="bpmn:exclusiveGateway",m.USER="bpmn:userTask",m.SYSTEM="bpmn:serviceTask",m.FLOW="bpmn:sequenceFlow"})(on||(on={}));var $m=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"];function Wc(m){var v={};return Object.entries(m).forEach(function(u){var c=Xs(u,2),i=c[0],l=c[1];typeof l!="object"?i.indexOf("-")===0?v[i]=l:v["-"+i]=l:v[i]=Wc(l)}),v}function qc(m){var v={};return Object.entries(m).forEach(function(u){var c=Xs(u,2),i=c[0],l=c[1];typeof l=="string"?i.indexOf("-")===0?v[i.substr(1)]=l:v[i]=l:typeof l=="object"?v[i]=qc(l):v[i]=l}),v}function XC(m,v){var u=new Map;v.nodes.forEach(function(i){var l,f={"-id":i.id};if(!((l=i.text)===null||l===void 0)&&l.value&&(f["-name"]=i.text.value),i.properties){var y=Wc(i.properties);Object.assign(f,y)}u.set(i.id,f),m[i.type]?Array.isArray(m[i.type])?m[i.type].push(f):m[i.type]=[m[i.type],f]:m[i.type]=f});var c=v.edges.map(function(i){var l,f,y=u.get(i.targetNodeId);y["bpmn:incoming"]?Array.isArray(y["bpmn:incoming"])?y["bpmn:incoming"].push(i.id):y["bpmn:incoming"]=[y["bpmn:incoming"],i.id]:y["bpmn:incoming"]=i.id;var b=u.get(i.sourceNodeId);b["bpmn:outgoing"]?Array.isArray(b["bpmn:outgoing"])?b["bpmn:outgoing"].push(i.id):b["bpmn:outgoing"]=[b["bpmn:outgoing"],i.id]:b["bpmn:outgoing"]=i.id;var S={"-id":i.id,"-sourceRef":i.sourceNodeId,"-targetRef":i.targetNodeId};if(!((l=i.text)===null||l===void 0)&&l.value&&(S["-name"]=(f=i.text)===null||f===void 0?void 0:f.value),i.properties){var x=Wc(i.properties);Object.assign(S,x)}return S});m[on.FLOW]=c}function UC(m,v){m["bpmndi:BPMNEdge"]=v.edges.map(function(u){var c,i=u.id,l=u.pointsList.map(function(y){var b=y.x,S=y.y;return{"-x":b,"-y":S}}),f={"-id":i+"_di","-bpmnElement":i,"di:waypoint":l};return!((c=u.text)===null||c===void 0)&&c.value&&(f["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":u.text.x-u.text.value.length*10/2,"-y":u.text.y-7,"-width":u.text.value.length*10,"-height":14}}),f}),m["bpmndi:BPMNShape"]=v.nodes.map(function(u){var c,i=u.id,l=100,f=80,y=u.x,b=u.y,S=ao.shapeConfigMap.get(u.type);S&&(l=S.width,f=S.height),y-=l/2,b-=f/2;var x={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":y,"-y":b,"-width":l,"-height":f}};return!((c=u.text)===null||c===void 0)&&c.value&&(x["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":u.text.x-u.text.value.length*10/2,"-y":u.text.y-7,"-width":u.text.value.length*10,"-height":14}}),x})}function VC(m){var v=[],u=[],c=m["bpmn:definitions"];if(c){var i=c["bpmn:process"];Object.keys(i).forEach(function(l){if(l.indexOf("bpmn:")===0){var f=i[l];if(l===on.FLOW){var y=c["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];u=WC(f,y)}else{var b=c["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];v=v.concat(YC(f,b,l))}}})}return{nodes:v,edges:u}}function YC(m,v,u){var c=[];if(Array.isArray(m))m.forEach(function(f){var y;Array.isArray(v)?y=v.find(function(S){return S["-bpmnElement"]===f["-id"]}):y=v;var b=mm(y,u,f);c.push(b)});else{var i=void 0;Array.isArray(v)?i=v.find(function(f){return f["-bpmnElement"]===m["-id"]}):i=v;var l=mm(i,u,m);c.push(l)}return c}function mm(m,v,u){var c=Number(m["dc:Bounds"]["-x"]),i=Number(m["dc:Bounds"]["-y"]),l=u["-name"],f=ao.shapeConfigMap.get(v);f&&(c+=f.width/2,i+=f.height/2);var y;Object.entries(u).forEach(function(P){var w=Xs(P,2),M=w[0],j=w[1];$m.indexOf(M)===-1&&(y||(y={}),y[M]=j)}),y&&(y=qc(y));var b;if(l&&(b={x:c,y:i,value:l},m["bpmndi:BPMNLabel"]&&m["bpmndi:BPMNLabel"]["dc:Bounds"])){var S=m["bpmndi:BPMNLabel"]["dc:Bounds"];b.x=Number(S["-x"])+Number(S["-width"])/2,b.y=Number(S["-y"])+Number(S["-height"])/2}var x={id:m["-bpmnElement"],type:v,x:c,y:i,properties:y};return b&&(x.text=b),x}function WC(m,v){var u=[];if(Array.isArray(m))m.forEach(function(i){var l;Array.isArray(v)?l=v.find(function(f){return f["-bpmnElement"]===i["-id"]}):l=v,u.push(bm(l,i))});else{var c=void 0;Array.isArray(v)?c=v.find(function(i){return i["-bpmnElement"]===m["-id"]}):c=v,u.push(bm(c,m))}return u}function bm(m,v){var u,c=v["-name"];if(c){var i=m["bpmndi:BPMNLabel"]["dc:Bounds"],l=0;c.split(`
`).forEach(function(b){l<b.length&&(l=b.length)}),u={value:c,x:Number(i["-x"])+l*10/2,y:Number(i["-y"])+7}}var f;Object.entries(v).forEach(function(b){var S=Xs(b,2),x=S[0],P=S[1];$m.indexOf(x)===-1&&(f||(f={}),f[x]=P)}),f&&(f=qc(f));var y={id:v["-id"],type:on.FLOW,pointsList:m["di:waypoint"].map(function(b){return{x:Number(b["-x"]),y:Number(b["-y"])}}),sourceNodeId:v["-sourceRef"],targetNodeId:v["-targetRef"],properties:f};return u&&(y.text=u),y}var ao={pluginName:"bpmn-adapter",install:function(m){m.adapterIn=this.adapterIn,m.adapterOut=this.adapterOut},shapeConfigMap:new Map,setCustomShape:function(m,v){this.shapeConfigMap.set(m,v)},adapterOut:function(m){var v={"-id":"Process_"+gm(),"-isExecutable":"false"};XC(v,m);var u={"-id":"BPMNPlane_1","-bpmnElement":v["-id"]};UC(u,m);var c={"bpmn:definitions":{"-id":"Definitions_"+gm(),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://bpmn.io/schema/bpmn","-exporter":"bpmn-js (https://demo.bpmn.io)","-exporterVersion":"7.3.0","bpmn:process":v,"bpmndi:BPMNDiagram":{"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":u}}};return c},adapterIn:function(m){if(m)return VC(m)}};ao.shapeConfigMap.set(on.START,{width:dm.width,height:dm.height});ao.shapeConfigMap.set(on.END,{width:pm.width,height:pm.height});ao.shapeConfigMap.set(on.GATEWAY,{width:hm.width,height:hm.height});ao.shapeConfigMap.set(on.SYSTEM,{width:vm.width,height:vm.height});ao.shapeConfigMap.set(on.USER,{width:ym.width,height:ym.height});var Om=globalThis&&globalThis.__assign||function(){return Om=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Om.apply(this,arguments)};globalThis&&globalThis.__read;var Em;(function(m){m.HORIZONTAL="horizontal",m.VERTICAL="vertical"})(Em||(Em={}));var KC=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l};globalThis&&globalThis.__spread;var ZC=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l};globalThis&&globalThis.__spread;var JC=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l},QC=globalThis&&globalThis.__spread||function(){for(var m=[],v=0;v<arguments.length;v++)m=m.concat(JC(arguments[v]));return m},xi="lf:defaultNodeMenu",Si="lf:defaultEdgeMenu",Pi="lf:defaultGraphMenu",xm="lf:defaultSelectionMenu",qC=function(){function m(v){var u=this,c=v.lf;this.__menuDOM=document.createElement("ul"),this.lf=c,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){u.setMenuConfig(i)},this.lf.addMenuConfig=function(i){u.addMenuConfig(i)},this.lf.setMenuByType=function(i){u.setMenuByType(i)}}return m.prototype.init=function(){var v=this,u=[{text:"删除",callback:function(l){v.lf.deleteNode(l.id)}},{text:"编辑文本",callback:function(l){v.lf.graphModel.editText(l.id)}},{text:"复制",callback:function(l){v.lf.cloneNode(l.id)}}];this.menuTypeMap.set(xi,u);var c=[{text:"删除",callback:function(l){v.lf.deleteEdge(l.id)}},{text:"编辑文本",callback:function(l){v.lf.graphModel.editText(l.id)}}];this.menuTypeMap.set(Si,c),this.menuTypeMap.set(Pi,[]);var i=[{text:"删除",callback:function(l){v.lf.clearSelectElements(),l.edges.forEach(function(f){return v.lf.deleteEdge(f.id)}),l.nodes.forEach(function(f){return v.lf.deleteNode(f.id)})}}];this.menuTypeMap.set(xm,i)},m.prototype.render=function(v,u){var c=this;this.__container=u,this.__currentData=null,this.__menuDOM.className="lf-menu",u.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var l=i.target;Array.from(l.classList).indexOf("lf-menu-item")===-1&&Array.from(l.classList).indexOf("lf-menu")===-1;)l=l.parentElement;Array.from(l.classList).indexOf("lf-menu-item")>-1?(l.onclickCallback(c.__currentData),c.__menuDOM.style.display="none",c.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!")},!0),this.lf.on("node:contextmenu",function(i){var l=i.data,f=i.position,y=f.domOverlayPosition,b=y.x,S=y.y,x=l.id,P=c.lf.graphModel.getNodeModelById(x),w=[],M=c.menuTypeMap.get(P.type);P&&P.menu&&Array.isArray(P.menu)?w=P.menu:M?w=M:w=c.menuTypeMap.get(xi),c.__currentData=l,c.showMenu(b,S,w)}),this.lf.on("edge:contextmenu",function(i){var l=i.data,f=i.position,y=f.domOverlayPosition,b=y.x,S=y.y,x=l.id,P=c.lf.graphModel.getEdgeModelById(x),w=[],M=c.menuTypeMap.get(P.type);P&&P.menu&&Array.isArray(P.menu)?w=P.menu:M?w=M:w=c.menuTypeMap.get(Si),c.__currentData=l,c.showMenu(b,S,w)}),this.lf.on("blank:contextmenu",function(i){var l=i.position,f=c.menuTypeMap.get(Pi),y=l.domOverlayPosition,b=y.x,S=y.y;c.showMenu(b,S,f)}),this.lf.on("selection:contextmenu",function(i){var l=i.data,f=i.position,y=c.menuTypeMap.get(xm),b=f.domOverlayPosition,S=b.x,x=b.y;c.__currentData=l,c.showMenu(S,x,y)}),this.lf.on("node:mousedown",function(){c.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){c.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){c.__menuDOM.style.display="none"})},m.prototype.destroy=function(){var v;(v=this===null||this===void 0?void 0:this.__container)===null||v===void 0||v.removeChild(this.__menuDOM),this.__menuDOM=null},m.prototype.showMenu=function(v,u,c){if(!(!c||!c.length)){var i=this.__menuDOM;i.innerHTML="",i.append.apply(i,QC(this.__getMenuDom(c))),i.children.length&&(i.style.display="block",i.style.top=u+"px",i.style.left=v+"px")}},m.prototype.setMenuByType=function(v){!v.type||!v.menu||this.menuTypeMap.set(v.type,v.menu)},m.prototype.__getMenuDom=function(v){var u=[];return v&&v.length>0&&v.forEach(function(c){var i=document.createElement("li");if(c.className?i.className="lf-menu-item "+c.className:i.className="lf-menu-item",c.icon===!0){var l=document.createElement("span");l.className="lf-menu-item-icon",i.appendChild(l)}var f=document.createElement("span");f.className="lf-menu-item-text",c.text&&(f.innerText=c.text),i.appendChild(f),i.onclickCallback=c.callback,u.push(i)}),u},m.prototype.setMenuConfig=function(v){v&&(v.nodeMenu!==void 0&&this.menuTypeMap.set(xi,v.nodeMenu?v.nodeMenu:[]),v.edgeMenu!==void 0&&this.menuTypeMap.set(Si,v.edgeMenu?v.edgeMenu:[]),v.graphMenu!==void 0&&this.menuTypeMap.set(Pi,v.graphMenu?v.graphMenu:[]))},m.prototype.addMenuConfig=function(v){if(v){if(Array.isArray(v.nodeMenu)){var u=this.menuTypeMap.get(xi);this.menuTypeMap.set(xi,u.concat(v.nodeMenu))}if(Array.isArray(v.edgeMenu)){var u=this.menuTypeMap.get(Si);this.menuTypeMap.set(Si,u.concat(v.edgeMenu))}if(Array.isArray(v.graphMenu)){var u=this.menuTypeMap.get(Pi);this.menuTypeMap.set(Pi,u.concat(v.graphMenu))}}},m.prototype.changeMenuItem=function(v,u){if(v==="add")this.addMenuConfig(u);else if(v==="reset")this.setMenuConfig(u);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},m.pluginName="menu",m}();globalThis&&globalThis.__read;globalThis&&globalThis.__values;var Xm=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),$o=globalThis&&globalThis.__assign||function(){return $o=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},$o.apply(this,arguments)},zn=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l};(function(m){Xm(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.pointFilter=function(u){for(var c=u,i=1;i<c.length-1;){var l=zn(c[i-1],2),f=l[0],y=l[1],b=zn(c[i],2),S=b[0],x=b[1],P=zn(c[i+1],2),w=P[0],M=P[1];f===S&&S===w||y===x&&x===M?c.splice(i,1):i++}return c},v.prototype.getEdge=function(){for(var u=this.props.model,c=u.points,i=u.isAnimation,l=u.arrowConfig,f=u.radius,y=f===void 0?5:f,b=u.getEdgeStyle(),S=u.getEdgeAnimationStyle(),x=this.pointFilter(c.split(" ").map(function(Q){return Q.split(",").map(function(ce){return Number(ce)})})),P=zn(x[0],2),w=P[0],M=P[1],j="M"+w+" "+M,C=1;C<x.length-1;C++){var _=zn(x[C-1],2),z=_[0],X=_[1],U=zn(x[C],2),ie=U[0],oe=U[1],ee=zn(x[C+1],2),J=ee[0],ue=ee[1];if(ie===z&&oe!==X){var L=oe>X?oe-y:oe+y;j=j+" L "+ie+" "+L}if(oe===X&&ie!==z){var k=ie>z?ie-y:ie+y;j=j+" L "+k+" "+oe}if(j=j+" Q "+ie+" "+oe,ie===J&&oe!==ue){var L=oe>ue?oe-y:oe+y;j=j+" "+ie+" "+L}if(oe===ue&&ie!==J){var k=ie>J?ie-y:ie+y;j=j+" "+k+" "+oe}}var I=zn(x[x.length-1],2),A=I[0],R=I[1];j=j+" L "+A+" "+R;var Y=$o($o($o({d:j,style:i?S:{}},b),l),{fill:"none"});return Ve.h("path",$o({d:j},Y))},v})(Ve.PolylineEdge);(function(m){Xm(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v})(Ve.PolylineEdgeModel);var ed,Ft,Um,Mi,Sm,Vm={},Ym=[],eR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Fn(m,v){for(var u in v)m[u]=v[u];return m}function Wm(m){var v=m.parentNode;v&&v.removeChild(m)}function wi(m,v,u){var c,i,l,f={};for(l in v)l=="key"?c=v[l]:l=="ref"?i=v[l]:f[l]=v[l];if(arguments.length>2&&(f.children=arguments.length>3?ed.call(arguments,2):u),typeof m=="function"&&m.defaultProps!=null)for(l in m.defaultProps)f[l]===void 0&&(f[l]=m.defaultProps[l]);return Bs(m,f,c,i,null)}function Bs(m,v,u,c,i){var l={type:m,props:v,key:u,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Um};return i==null&&Ft.vnode!=null&&Ft.vnode(l),l}function td(m){return m.children}function Uo(m,v){this.props=m,this.context=v}function Ni(m,v){if(v==null)return m.__?Ni(m.__,m.__.__k.indexOf(m)+1):null;for(var u;v<m.__k.length;v++)if((u=m.__k[v])!=null&&u.__e!=null)return u.__e;return typeof m.type=="function"?Ni(m):null}function Km(m){var v,u;if((m=m.__)!=null&&m.__c!=null){for(m.__e=m.__c.base=null,v=0;v<m.__k.length;v++)if((u=m.__k[v])!=null&&u.__e!=null){m.__e=m.__c.base=u.__e;break}return Km(m)}}function Pm(m){(!m.__d&&(m.__d=!0)&&Mi.push(m)&&!Hs.__r++||Sm!==Ft.debounceRendering)&&((Sm=Ft.debounceRendering)||setTimeout)(Hs)}function Hs(){for(var m;Hs.__r=Mi.length;)m=Mi.sort(function(v,u){return v.__v.__b-u.__v.__b}),Mi=[],m.some(function(v){var u,c,i,l,f,y;v.__d&&(f=(l=(u=v).__v).__e,(y=u.__P)&&(c=[],(i=Fn({},l)).__v=l.__v+1,qm(y,l,i,u.__n,y.ownerSVGElement!==void 0,l.__h!=null?[f]:null,c,f??Ni(l),l.__h),rR(c,l),l.__e!=f&&Km(l)))})}function Zm(m,v,u,c,i,l,f,y,b,S){var x,P,w,M,j,C,_,z=c&&c.__k||Ym,X=z.length;for(u.__k=[],x=0;x<v.length;x++)if((M=u.__k[x]=(M=v[x])==null||typeof M=="boolean"?null:typeof M=="string"||typeof M=="number"||typeof M=="bigint"?Bs(null,M,null,null,M):Array.isArray(M)?Bs(td,{children:M},null,null,null):M.__b>0?Bs(M.type,M.props,M.key,M.ref?M.ref:null,M.__v):M)!=null){if(M.__=u,M.__b=u.__b+1,(w=z[x])===null||w&&M.key==w.key&&M.type===w.type)z[x]=void 0;else for(P=0;P<X;P++){if((w=z[P])&&M.key==w.key&&M.type===w.type){z[P]=void 0;break}w=null}qm(m,M,w=w||Vm,i,l,f,y,b,S),j=M.__e,(P=M.ref)&&w.ref!=P&&(_||(_=[]),w.ref&&_.push(w.ref,null,M),_.push(P,M.__c||j,M)),j!=null?(C==null&&(C=j),typeof M.type=="function"&&M.__k===w.__k?M.__d=b=Jm(M,b,m):b=Qm(m,M,w,z,j,b),typeof u.type=="function"&&(u.__d=b)):b&&w.__e==b&&b.parentNode!=m&&(b=Ni(w))}for(u.__e=C,x=X;x--;)z[x]!=null&&tb(z[x],z[x]);if(_)for(x=0;x<_.length;x++)eb(_[x],_[++x],_[++x])}function Jm(m,v,u){for(var c,i=m.__k,l=0;i&&l<i.length;l++)(c=i[l])&&(c.__=m,v=typeof c.type=="function"?Jm(c,v,u):Qm(u,c,c,i,c.__e,v));return v}function Qm(m,v,u,c,i,l){var f,y,b;if(v.__d!==void 0)f=v.__d,v.__d=void 0;else if(u==null||i!=l||i.parentNode==null)e:if(l==null||l.parentNode!==m)m.appendChild(i),f=null;else{for(y=l,b=0;(y=y.nextSibling)&&b<c.length;b+=1)if(y==i)break e;m.insertBefore(i,l),f=l}return f!==void 0?f:i.nextSibling}function tR(m,v,u,c,i){var l;for(l in u)l==="children"||l==="key"||l in v||Gs(m,l,null,u[l],c);for(l in v)i&&typeof v[l]!="function"||l==="children"||l==="key"||l==="value"||l==="checked"||u[l]===v[l]||Gs(m,l,v[l],u[l],c)}function Tm(m,v,u){v[0]==="-"?m.setProperty(v,u):m[v]=u==null?"":typeof u!="number"||eR.test(v)?u:u+"px"}function Gs(m,v,u,c,i){var l;e:if(v==="style")if(typeof u=="string")m.style.cssText=u;else{if(typeof c=="string"&&(m.style.cssText=c=""),c)for(v in c)u&&v in u||Tm(m.style,v,"");if(u)for(v in u)c&&u[v]===c[v]||Tm(m.style,v,u[v])}else if(v[0]==="o"&&v[1]==="n")l=v!==(v=v.replace(/Capture$/,"")),v=v.toLowerCase()in m?v.toLowerCase().slice(2):v.slice(2),m.l||(m.l={}),m.l[v+l]=u,u?c||m.addEventListener(v,l?wm:Mm,l):m.removeEventListener(v,l?wm:Mm,l);else if(v!=="dangerouslySetInnerHTML"){if(i)v=v.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(v!=="href"&&v!=="list"&&v!=="form"&&v!=="tabIndex"&&v!=="download"&&v in m)try{m[v]=u??"";break e}catch{}typeof u=="function"||(u==null||u===!1&&v.indexOf("-")==-1?m.removeAttribute(v):m.setAttribute(v,u))}}function Mm(m){this.l[m.type+!1](Ft.event?Ft.event(m):m)}function wm(m){this.l[m.type+!0](Ft.event?Ft.event(m):m)}function qm(m,v,u,c,i,l,f,y,b){var S,x,P,w,M,j,C,_,z,X,U,ie,oe,ee,J,ue=v.type;if(v.constructor!==void 0)return null;u.__h!=null&&(b=u.__h,y=v.__e=u.__e,v.__h=null,l=[y]),(S=Ft.__b)&&S(v);try{e:if(typeof ue=="function"){if(_=v.props,z=(S=ue.contextType)&&c[S.__c],X=S?z?z.props.value:S.__:c,u.__c?C=(x=v.__c=u.__c).__=x.__E:("prototype"in ue&&ue.prototype.render?v.__c=x=new ue(_,X):(v.__c=x=new Uo(_,X),x.constructor=ue,x.render=oR),z&&z.sub(x),x.props=_,x.state||(x.state={}),x.context=X,x.__n=c,P=x.__d=!0,x.__h=[],x._sb=[]),x.__s==null&&(x.__s=x.state),ue.getDerivedStateFromProps!=null&&(x.__s==x.state&&(x.__s=Fn({},x.__s)),Fn(x.__s,ue.getDerivedStateFromProps(_,x.__s))),w=x.props,M=x.state,P)ue.getDerivedStateFromProps==null&&x.componentWillMount!=null&&x.componentWillMount(),x.componentDidMount!=null&&x.__h.push(x.componentDidMount);else{if(ue.getDerivedStateFromProps==null&&_!==w&&x.componentWillReceiveProps!=null&&x.componentWillReceiveProps(_,X),!x.__e&&x.shouldComponentUpdate!=null&&x.shouldComponentUpdate(_,x.__s,X)===!1||v.__v===u.__v){for(x.props=_,x.state=x.__s,v.__v!==u.__v&&(x.__d=!1),x.__v=v,v.__e=u.__e,v.__k=u.__k,v.__k.forEach(function(L){L&&(L.__=v)}),U=0;U<x._sb.length;U++)x.__h.push(x._sb[U]);x._sb=[],x.__h.length&&f.push(x);break e}x.componentWillUpdate!=null&&x.componentWillUpdate(_,x.__s,X),x.componentDidUpdate!=null&&x.__h.push(function(){x.componentDidUpdate(w,M,j)})}if(x.context=X,x.props=_,x.__v=v,x.__P=m,ie=Ft.__r,oe=0,"prototype"in ue&&ue.prototype.render){for(x.state=x.__s,x.__d=!1,ie&&ie(v),S=x.render(x.props,x.state,x.context),ee=0;ee<x._sb.length;ee++)x.__h.push(x._sb[ee]);x._sb=[]}else do x.__d=!1,ie&&ie(v),S=x.render(x.props,x.state,x.context),x.state=x.__s;while(x.__d&&++oe<25);x.state=x.__s,x.getChildContext!=null&&(c=Fn(Fn({},c),x.getChildContext())),P||x.getSnapshotBeforeUpdate==null||(j=x.getSnapshotBeforeUpdate(w,M)),J=S!=null&&S.type===td&&S.key==null?S.props.children:S,Zm(m,Array.isArray(J)?J:[J],v,u,c,i,l,f,y,b),x.base=v.__e,v.__h=null,x.__h.length&&f.push(x),C&&(x.__E=x.__=null),x.__e=!1}else l==null&&v.__v===u.__v?(v.__k=u.__k,v.__e=u.__e):v.__e=nR(u.__e,v,u,c,i,l,f,b);(S=Ft.diffed)&&S(v)}catch(L){v.__v=null,(b||l!=null)&&(v.__e=y,v.__h=!!b,l[l.indexOf(y)]=null),Ft.__e(L,v,u)}}function rR(m,v){Ft.__c&&Ft.__c(v,m),m.some(function(u){try{m=u.__h,u.__h=[],m.some(function(c){c.call(u)})}catch(c){Ft.__e(c,u.__v)}})}function nR(m,v,u,c,i,l,f,y){var b,S,x,P=u.props,w=v.props,M=v.type,j=0;if(M==="svg"&&(i=!0),l!=null){for(;j<l.length;j++)if((b=l[j])&&"setAttribute"in b==!!M&&(M?b.localName===M:b.nodeType===3)){m=b,l[j]=null;break}}if(m==null){if(M===null)return document.createTextNode(w);m=i?document.createElementNS("http://www.w3.org/2000/svg",M):document.createElement(M,w.is&&w),l=null,y=!1}if(M===null)P===w||y&&m.data===w||(m.data=w);else{if(l=l&&ed.call(m.childNodes),S=(P=u.props||Vm).dangerouslySetInnerHTML,x=w.dangerouslySetInnerHTML,!y){if(l!=null)for(P={},j=0;j<m.attributes.length;j++)P[m.attributes[j].name]=m.attributes[j].value;(x||S)&&(x&&(S&&x.__html==S.__html||x.__html===m.innerHTML)||(m.innerHTML=x&&x.__html||""))}if(tR(m,w,P,i,y),x)v.__k=[];else if(j=v.props.children,Zm(m,Array.isArray(j)?j:[j],v,u,c,i&&M!=="foreignObject",l,f,l?l[0]:u.__k&&Ni(u,0),y),l!=null)for(j=l.length;j--;)l[j]!=null&&Wm(l[j]);y||("value"in w&&(j=w.value)!==void 0&&(j!==m.value||M==="progress"&&!j||M==="option"&&j!==P.value)&&Gs(m,"value",j,P.value,!1),"checked"in w&&(j=w.checked)!==void 0&&j!==m.checked&&Gs(m,"checked",j,P.checked,!1))}return m}function eb(m,v,u){try{typeof m=="function"?m(v):m.current=v}catch(c){Ft.__e(c,u)}}function tb(m,v,u){var c,i;if(Ft.unmount&&Ft.unmount(m),(c=m.ref)&&(c.current&&c.current!==m.__e||eb(c,null,v)),(c=m.__c)!=null){if(c.componentWillUnmount)try{c.componentWillUnmount()}catch(l){Ft.__e(l,v)}c.base=c.__P=null,m.__c=void 0}if(c=m.__k)for(i=0;i<c.length;i++)c[i]&&tb(c[i],v,u||typeof m.type!="function");u||m.__e==null||Wm(m.__e),m.__=m.__e=m.__d=void 0}function oR(m,v,u){return this.constructor(m,u)}ed=Ym.slice,Ft={__e:function(m,v,u,c){for(var i,l,f;v=v.__;)if((i=v.__c)&&!i.__)try{if((l=i.constructor)&&l.getDerivedStateFromError!=null&&(i.setState(l.getDerivedStateFromError(m)),f=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(m,c||{}),f=i.__d),f)return i.__E=i}catch(y){m=y}throw m}},Um=0,Uo.prototype.setState=function(m,v){var u;u=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Fn({},this.state),typeof m=="function"&&(m=m(Fn({},u),this.props)),m&&Fn(u,m),m!=null&&this.__v&&(v&&this._sb.push(v),Pm(this))},Uo.prototype.forceUpdate=function(m){this.__v&&(this.__e=!0,m&&this.__h.push(m),Pm(this))},Uo.prototype.render=td,Mi=[],Hs.__r=0;var Ai=globalThis&&globalThis.__assign||function(){return Ai=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Ai.apply(this,arguments)};function rd(m){var v=m.x,u=m.y,c=m.width,i=m.height,l=m.radius,f=m.className,y=v-c/2,b=u-i/2,S=Ai(Ai({width:10,height:10,cx:0,cy:0,rx:l||0,ry:l||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+f},m),{x:y,y:b});return Ve.h("rect",Ai({},S))}rd.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Xo;(function(m){m.NODE="node",m.CIRCLE_NODE="circle-node",m.POLYGON_NODE="polygon-node",m.RECT_NODE="rect-node",m.HTML_NODE="html-node",m.TEXT_NODE="text-node",m.ELLIPSE_NODE="ellipse-node",m.DIAMOND_NODE="diamond-node",m.EDGE="edge",m.LINE_EDGE="line-edge",m.POLYLINE_EDGE="polyline-edge",m.BEZIER_EDGE="bezier-edge",m.GRAPH="graph"})(Xo||(Xo={}));function Ls(m){var v=m.x,u=m.y,c=m.width,i=m.height;return{minX:v-c/2,minY:u-i/2,maxX:v+c/2,maxY:u+i/2}}function Am(m){var v=Ls(m),u=m.radius,c=v.minX,i=v.minY,l=v.maxX,f=v.maxY;return[{x:c+u,y:i+u},{x:l-u,y:i+u},{x:l-u,y:f-u},{x:c+u,y:f-u}]}function Nm(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=v.x,l=v.y,f={x:i,y:l},y=u.radius,b=Ls(u),S=Ls(c);if(i===b.minX){f.x=S.minX;var x=(l-u.y)/(u.height/2-y);x?f.y=c.y+(c.height/2-y)*x:f.y=c.y}else if(i===b.maxX){f.x=S.maxX;var x=(l-u.y)/(u.height/2-y);x?f.y=c.y+(c.height/2-y)*x:f.y=c.y}else if(l===b.minY){f.y=S.minY;var x=(i-u.x)/(u.width/2-y);x?f.x=c.x+(c.width/2-y)*x:f.x=c.x}else if(l===b.maxY){f.y=S.maxY;var x=(i-u.x)/(u.width/2-y);x?f.x=c.x+(c.width/2-y)*x:f.x=c.x}else{var P=Am(u),w=Am(c),M=Ls(u),j=M.minX,C=M.minY,_=M.maxX,z=M.maxY,X=-1;if(i-j<y&&l-C<y?X=0:_-i<y&&l-C<y?X=1:_-i<y&&z-l<y?X=2:i-j<y&&C-l<y&&(X=3),X>-1){var U=Math.atan2(l-P[X].y,i-P[X].x);f.x=w[X].x+y*Math.cos(U),f.y=w[X].y+y*Math.sin(U)}}return f}function Dm(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=c.rx,l=c.ry,f=v,y=(v.y-u.y)/(v.x-u.x),b=i,S=l,x,P;return y>=1/0?(x=0,P=S):y<=-1/0?(x=0,P=-S):v.x-u.x>0?(x=b*S/Math.sqrt(S*S+b*b*y*y),P=b*S*y/Math.sqrt(S*S+b*b*y*y)):(x=-(b*S)/Math.sqrt(S*S+b*b*y*y),P=-(b*S*y)/Math.sqrt(S*S+b*b*y*y)),f={x:x+c.x,y:P+c.y},f}function jm(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=v,l,f,y=v.x-u.x,b=v.y-u.y,S=u.rx,x=u.ry,P=Math.sqrt((S-Math.abs(y))*(S-Math.abs(y))+b*b)/Math.sqrt(S*S+x*x),w=c.rx,M=c.ry,j=Math.sqrt((w*w+M*M)*P*P*(w*w/(w*w+M*M))),C=j*(M/w);return y>=0?l=w-j:l=j-w,b>0?f=C:f=-C,i={x:l+c.x,y:f+c.y},i}var iR=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),io=globalThis&&globalThis.__assign||function(){return io=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},io.apply(this,arguments)},aR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l},uR=Ve.LogicFlowUtil.StepDrag,sR=function(m){iR(v,m);function v(u){var c=m.call(this)||this;return c.updatePosition=function(i){var l=i.deltaX,f=i.deltaY,y=c.nodeModel,b=y.x,S=y.y;c.nodeModel.x=b+l/2,c.nodeModel.y=S+f/2,c.nodeModel.moveText(l/2,f/2)},c.getResize=function(i){var l=i.index,f=i.deltaX,y=i.deltaY,b=i.width,S=i.height,x=i.PCTResizeInfo,P=i.pct,w=P===void 0?1:P,M={width:b,height:S,deltaX:f,deltaY:y};if(x){var j=4,C=0,_=0;switch(l){case 0:_=(f*-1-y)/j;break;case 1:_=(f-y)/j;break;case 2:_=(f+y)/j;break;case 3:_=(f*-1+y)/j;break}_!==0&&(C=Math.round(_/x.ResizeBasis.basisHeight*1e5)/1e3),x.ResizePCT.widthPCT=Math.max(Math.min(x.ResizePCT.widthPCT+C,x.ScaleLimit.maxScaleLimit),x.ScaleLimit.minScaleLimit),x.ResizePCT.hightPCT=Math.max(Math.min(x.ResizePCT.hightPCT+C,x.ScaleLimit.maxScaleLimit),x.ScaleLimit.minScaleLimit);var z=Math.round(x.ResizePCT.widthPCT*x.ResizeBasis.basisWidth/100),X=Math.round(x.ResizePCT.hightPCT*x.ResizeBasis.basisHeight/100);switch(l){case 0:f=b-z,y=S-X;break;case 1:f=z-b,y=S-X;break;case 2:f=z-b,y=X-S;break;case 3:f=b-z,y=X-S;break}return M.width=z,M.height=X,M.deltaX=f/w,M.deltaY=y/w,M}switch(l){case 0:M.width=b-f*w,M.height=S-y*w;break;case 1:M.width=b+f*w,M.height=S-y*w;break;case 2:M.width=b+f*w,M.height=S+y*w;break;case 3:M.width=b-f*w,M.height=S+y*w;break}return M},c.updateRect=function(i){var l=i.deltaX,f=i.deltaY,y=c.nodeModel,b=y.id,S=y.x,x=y.y,P=y.width,w=y.height,M=y.radius,j=y.PCTResizeInfo,C=c.index,_=c.getResize({index:C,deltaX:l,deltaY:f,width:P,height:w,PCTResizeInfo:j,pct:1}),z=c.nodeModel,X=z.minWidth,U=z.minHeight,ie=z.maxWidth,oe=z.maxHeight;if(_.width<X||_.width>ie||_.height<U||_.height>oe){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:_.deltaX,deltaY:_.deltaY}),c.nodeModel.width=_.width,c.nodeModel.height=_.height,c.nodeModel.setProperties({nodeSize:{width:_.width,height:_.height}});var ee=c.getNodeEdges(b),J={x:S,y:x,width:P,height:w,radius:M},ue={x:c.nodeModel.x,y:c.nodeModel.y,width:c.nodeModel.width,height:c.nodeModel.height,radius:M},L={point:"",beforeNode:J,afterNode:ue},k;ee.sourceEdges.forEach(function(I){L.point=I.startPoint,k=Nm(L),I.updateStartPoint(k)}),ee.targetEdges.forEach(function(I){L.point=I.endPoint,k=Nm(L),I.updateEndPoint(k)}),c.eventEmit({beforeNode:J,afterNode:ue})},c.updateEllipse=function(i){var l=i.deltaX,f=i.deltaY,y=c.nodeModel,b=y.id,S=y.rx,x=y.ry,P=y.x,w=y.y,M=y.PCTResizeInfo,j=c.index,C=S,_=x,z=c.getResize({index:j,deltaX:l,deltaY:f,width:C,height:_,PCTResizeInfo:M,pct:1/2}),X=c.nodeModel,U=X.minWidth,ie=X.minHeight,oe=X.maxWidth,ee=X.maxHeight;if(z.width<U/2||z.width>oe/2||z.height<ie/2||z.height>ee/2){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:z.deltaX,deltaY:z.deltaY}),c.nodeModel.rx=z.width,c.nodeModel.ry=z.height,c.nodeModel.setProperties({nodeSize:{rx:z.width,ry:z.height}});var J=c.getNodeEdges(b),ue={x:P,y:w},L={rx:z.width,ry:z.height,x:c.nodeModel.x,y:c.nodeModel.y},k={point:{},beforeNode:ue,afterNode:L},I;J.sourceEdges.forEach(function(A){k.point=A.startPoint,I=Dm(k),A.updateStartPoint(I)}),J.targetEdges.forEach(function(A){k.point=A.endPoint,I=Dm(k),A.updateEndPoint(I)}),c.eventEmit({beforeNode:io(io({},ue),{rx:S,ry:x}),afterNode:L})},c.updateDiamond=function(i){var l=i.deltaX,f=i.deltaY,y=c.nodeModel,b=y.id,S=y.rx,x=y.ry,P=y.x,w=y.y,M=y.PCTResizeInfo,j=c.index,C=S,_=x,z=c.getResize({index:j,deltaX:l,deltaY:f,width:C,height:_,PCTResizeInfo:M,pct:1/2}),X=c.nodeModel,U=X.minWidth,ie=X.minHeight,oe=X.maxWidth,ee=X.maxHeight;if(z.width<U/2||z.width>oe/2||z.height<ie/2||z.height>ee/2){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:z.deltaX,deltaY:z.deltaY}),c.nodeModel.rx=z.width,c.nodeModel.ry=z.height,c.nodeModel.setProperties({nodeSize:{rx:z.width,ry:z.height}});var J={x:P,y:w,rx:S,ry:x},ue={rx:z.width,ry:z.height,x:c.nodeModel.x,y:c.nodeModel.y},L={point:{},beforeNode:J,afterNode:ue},k,I=c.getNodeEdges(b);I.sourceEdges.forEach(function(A){L.point=A.startPoint,k=jm(L),A.updateStartPoint(k)}),I.targetEdges.forEach(function(A){L.point=A.endPoint,k=jm(L),A.updateEndPoint(k)}),c.eventEmit({beforeNode:J,afterNode:ue})},c.eventEmit=function(i){var l=i.beforeNode,f=i.afterNode,y=c.nodeModel,b=y.id,S=y.modelType,x=y.type,P=io({id:b,modelType:S,type:x},l),w=io({id:b,modelType:S,type:x},f);c.graphModel.eventCenter.emit("node:resize",{oldNodeSize:P,newNodeSize:w})},c.onDraging=function(i){var l,f=i.deltaX,y=i.deltaY,b=c.graphModel.transformModel,S=c.nodeModel.modelType;l=aR(b.fixDeltaXY(f,y),2),f=l[0],y=l[1],S===Xo.RECT_NODE||S===Xo.HTML_NODE?c.updateRect({deltaX:f,deltaY:y}):S===Xo.ELLIPSE_NODE?c.updateEllipse({deltaX:f,deltaY:y}):S===Xo.DIAMOND_NODE&&c.updateDiamond({deltaX:f,deltaY:y})},c.onDragEnd=function(){var i=c.graphModel.gridSize,l=i===void 0?1:i,f=l*Math.round(c.nodeModel.x/l),y=l*Math.round(c.nodeModel.y/l);c.nodeModel.moveTo(f,y)},c.index=u.index,c.nodeModel=u.model,c.graphModel=u.graphModel,c.state={},c.dragHandler=new uR({onDraging:c.onDraging,onDragEnd:c.onDragEnd,step:1}),c}return v.prototype.getNodeEdges=function(u){for(var c=this.graphModel,i=c.edges,l=[],f=[],y=0;y<i.length;y++){var b=i[y];b.sourceNodeId===u?l.push(b):i[y].targetNodeId===u&&f.push(b)}return{sourceEdges:l,targetEdges:f}},v.prototype.render=function(){var u=this.props,c=u.x,i=u.y,l=u.index,f=u.model,y=f.getControlPointStyle();return wi("g",{className:"lf-resize-control-"+l},wi(rd,io({className:"lf-node-control"},{x:c,y:i},y,{onMouseDown:this.dragHandler.handleMouseDown})))},v}(Uo),lR=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),ks=globalThis&&globalThis.__assign||function(){return ks=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},ks.apply(this,arguments)},Us=function(m){lR(v,m);function v(){var u=m.call(this)||this;return u.state={},u}return v.prototype.getResizeControl=function(){var u=this.props,c=u.model,i=u.graphModel,l=c.x,f=c.y,y=c.width,b=c.height,S={minX:l-y/2,minY:f-b/2,maxX:l+y/2,maxY:f+b/2},x=S.minX,P=S.minY,w=S.maxX,M=S.maxY,j=[{x,y:P},{x:w,y:P},{x:w,y:M},{x,y:M}];return j.map(function(C,_){return wi(sR,ks({index:_},C,{model:c,graphModel:i}))})},v.prototype.getGroupSolid=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,f=u.height,y=u.getResizeOutlineStyle();return wi(rd,ks({fill:"none"},y,{x:c,y:i,width:l,height:f}))},v.prototype.render=function(){return wi("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},v}(Uo),rb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),fR=function(m){rb(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.resize=function(u,c){console.log(u,c)},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v}(Ve.RectNodeModel),cR=function(m){rb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Ve.h(Us,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},v.prototype.getShape=function(){var u=this.props,c=u.model.isSelected,i=u.graphModel.editConfigModel.isSilentMode;return Ve.h("g",null,this.getResizeShape(),c&&!i?this.getControlGroup():"")},v}(Ve.RectNode),nb={type:"rect",view:cR,model:fR},ob=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}();(function(m){ob(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v})(Ve.EllipseNodeModel);(function(m){ob(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Ve.h(Us,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},v.prototype.getShape=function(){var u=this.props,c=u.model,i=u.graphModel.editConfigModel.isSilentMode;return Ve.h("g",null,this.getResizeShape(),c.isSelected&&!i?this.getControlGroup():"")},v})(Ve.EllipseNode);var Kc=globalThis&&globalThis.__assign||function(){return Kc=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Kc.apply(this,arguments)};function dR(m){var v=m.fillOpacity,u=v===void 0?1:v,c=m.strokeWidth,i=c===void 0?1:c,l=m.strokeOpacity,f=l===void 0?1:l,y=m.fill,b=y===void 0?"transparent":y,S=m.stroke,x=S===void 0?"#000":S,P=m.points,w=m.className,M=w===void 0?"lf-basic-shape":w,j={fill:b,fillOpacity:u,strokeWidth:i,stroke:x,strokeOpacity:f,points:"",className:M};return j.points=P.map(function(C){return C.join(",")}).join(" "),Ve.h("polygon",Kc({},j))}var ib=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Zc=globalThis&&globalThis.__assign||function(){return Zc=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Zc.apply(this,arguments)};(function(m){ib(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v})(Ve.DiamondNodeModel);(function(m){ib(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Ve.h(Us,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){var u=this.props.model,c=u.points,i=u.getNodeStyle();return Ve.h("g",null,Ve.h(dR,Zc({},i,{points:c})))},v.prototype.getShape=function(){var u=this.props,c=u.model.isSelected,i=u.graphModel.editConfigModel.isSilentMode;return Ve.h("g",null,this.getResizeShape(),c&&!i?this.getControlGroup():"")},v})(Ve.DiamondNode);var ab=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}();(function(m){ab(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v})(Ve.HtmlNodeModel);(function(m){ab(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Ve.h(Us,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},v.prototype.getShape=function(){var u=this.props,c=u.model.isSelected,i=u.graphModel.editConfigModel.isSilentMode;return Ve.h("g",null,this.getResizeShape(),c&&!i?this.getControlGroup():"")},v})(Ve.HtmlNode);var ub=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),$s=globalThis&&globalThis.__assign||function(){return $s=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},$s.apply(this,arguments)},pR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l},Cm=globalThis&&globalThis.__spread||function(){for(var m=[],v=0;v<arguments.length;v++)m=m.concat(pR(arguments[v]));return m},Rm=500,Im=300,hR=-1e4;(function(m){ub(v,m);function v(){var u=m!==null&&m.apply(this,arguments)||this;return u.isGroup=!0,u.unfoldedWidth=Rm,u.unfoldedHight=Im,u}return v.prototype.initNodeData=function(u){var c=this;m.prototype.initNodeData.call(this,u);var i=[];Array.isArray(u.children)&&(i=u.children),this.children=new Set(i),this.width=Rm,this.height=Im,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=hR,this.radius=0,this.text.editable=!1,this.text.draggable=!1,this.isRestrict=!1,this.resizable=!1,this.autoToFront=!1,this.foldable=!1,this.properties.isFolded===void 0&&(this.properties.isFolded=!1),this.isFolded=this.properties.isFolded,setTimeout(function(){c.isFolded&&c.foldGroup(c.isFolded)})},v.prototype.getResizeOutlineStyle=function(){var u=m.prototype.getResizeOutlineStyle.call(this);return u.stroke="none",u},v.prototype.foldGroup=function(u){var c=this;this.setProperty("isFolded",u),this.isFolded=u,u?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(l){var f=c.graphModel.getElement(l);f.visible=!u,i=i.concat(f.incoming.edges.concat(f.outgoing.edges))}),this.foldEdge(u,i)},v.prototype.getAnchorStyle=function(u){var c=m.prototype.getAnchorStyle.call(this,u);return c.stroke="transparent",c.fill="transparent",c.hover.fill="transparent",c.hover.stroke="transparent",c},v.prototype.foldEdge=function(u,c){var i=this;c.forEach(function(l,f){var y=l.id,b=l.sourceNodeId,S=l.targetNodeId,x=l.startPoint,P=l.endPoint,w=l.type,M=l.properties,j=l.text,C={id:y+"__"+f,sourceNodeId:b,targetNodeId:S,startPoint:x,endPoint:P,type:w,properties:M,text:j==null?void 0:j.value};l.virtual&&i.graphModel.deleteEdgeById(l.id);var _=i.graphModel.group.getNodeGroup(S);_||(_=i.graphModel.getNodeModelById(S));var z=i.graphModel.group.getNodeGroup(b);z||(z=i.graphModel.getNodeModelById(b)),u&&l.visible!==!1&&(i.children.has(b)||i.id===b?(C.startPoint=void 0,C.sourceNodeId=i.id):(C.endPoint=void 0,C.targetNodeId=i.id),(_.id!==i.id||z.id!==i.id)&&i.createVirtualEdge(C),l.visible=!1),!u&&l.visible===!1&&(_&&_.isGroup&&_.isFolded?(C.targetNodeId=_.id,C.endPoint=void 0,i.createVirtualEdge(C)):z&&z.isGroup&&z.isFolded?(C.sourceNodeId=z.id,C.startPoint=void 0,i.createVirtualEdge(C)):l.visible=!0)})},v.prototype.createVirtualEdge=function(u){u.pointsList=void 0;var c=this.graphModel.addEdge(u);c.virtual=!0,c.text.editable=!1,c.isFoldedEdge=!0},v.prototype.isInRange=function(u){var c=u.x1,i=u.y1,l=u.x2,f=u.y2;return c>=this.x-this.width/2&&l<=this.x+this.width/2&&i>=this.y-this.height/2&&f<=this.y+this.height/2},v.prototype.isAllowMoveTo=function(u){var c=u.x1,i=u.y1,l=u.x2,f=u.y2;return{x:c>=this.x-this.width/2&&l<=this.x+this.width/2,y:i>=this.y-this.height/2&&f<=this.y+this.height/2}},v.prototype.setAllowAppendChild=function(u){this.setProperty("groupAddable",u)},v.prototype.addChild=function(u){this.children.add(u)},v.prototype.removeChild=function(u){this.children.delete(u)},v.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},v.prototype.getData=function(){var u=m.prototype.getData.call(this);u.children=Cm(this.children);var c=u.properties;return delete c.groupAddable,delete c.isFolded,u},v.prototype.getHistoryData=function(){var u=m.prototype.getData.call(this);u.children=Cm(this.children),u.isGroup=!0;var c=u.properties;return delete c.groupAddable,c.isFolded&&(u.x=u.x+this.unfoldedWidth/2-this.foldedWidth/2,u.y=u.y+this.unfoldedHight/2-this.foldedHeight/2),u},v.prototype.isAllowAppendIn=function(u){return!0},v.prototype.toBack=function(){this.zIndex--},v})(nb.model);(function(m){ub(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props.model,c=u.resizable,i=u.properties;return c&&!i.isFolded?m.prototype.getControlGroup.call(this):null},v.prototype.getAddableShape=function(){var u=this.props.model,c=u.width,i=u.height,l=u.x,f=u.y,y=u.radius,b=u.properties;if(!b.groupAddable)return null;var S=this.props.model.getNodeStyle().strokeWidth,x=this.props.model.getAddableOutlineStyle(),P=c+S+8,w=i+S+8;return Ve.h("rect",$s($s({},x),{width:P,height:w,x:l-P/2,y:f-w/2,rx:y,ry:y}))},v.prototype.getFoldIcon=function(){var u=this.props.model,c=u.x-u.width/2+5,i=u.y-u.height/2+5;if(!u.foldable)return null;var l=Ve.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:u.properties.isFolded?"M "+(c+3)+","+(i+6)+" "+(c+11)+","+(i+6)+" M"+(c+7)+","+(i+2)+" "+(c+7)+","+(i+10):"M "+(c+3)+","+(i+6)+" "+(c+11)+","+(i+6)+" "});return Ve.h("g",{},[Ve.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:u.x-u.width/2+5,y:u.y-u.height/2+5,onClick:function(){u.foldGroup(!u.properties.isFolded)}}),l])},v.prototype.getResizeShape=function(){return Ve.h("g",{},[this.getAddableShape(),m.prototype.getResizeShape.call(this),this.getFoldIcon()])},v})(nb.view);var vR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l};globalThis&&globalThis.__spread;var _m=globalThis&&globalThis.__assign||function(){return _m=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},_m.apply(this,arguments)},Bm=globalThis&&globalThis.__assign||function(){return Bm=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Bm.apply(this,arguments)},yR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){f={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(f)throw f.error}}return l};globalThis&&globalThis.__spread;const gR={class:"control-container"},mR=["title","onMouseenter"],bR=["disabled","onClick"],OR=Vue.defineComponent({__name:"Control",props:{lf:{default:null},catTurboData:{type:Boolean}},emits:["catData"],setup(m,{emit:v}){const u=m,c=Vue.ref(),i=Vue.ref(),l=Vue.ref(-1),f=Vue.ref([{icon:"icon-zoom-out-hs",text:"缩小",size:"18",disabled:!1},{icon:"icon-enlarge-hs",text:"放大",size:"18",disabled:!1},{icon:"icon-full-screen-hs",text:"适应",size:"15",disabled:!1},{icon:"icon-previous-hs",text:"上一步",size:"15",disabled:!0},{icon:"icon-next-step-hs",text:"下一步",size:"17",disabled:!0},{icon:"icon-download-hs",text:"下载图片",size:"17",disabled:!1},{icon:"icon-watch-hs",text:"查看数据",size:"17",disabled:!1}]),y=(S,x)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((P,w)=>{const M=u.lf;x===1&&M.zoom(!0),x===6&&v("catData"),x===w&&M[P]()})},b=S=>{l.value=S};return Vue.onMounted(()=>{u.lf.on("history:change",({data:{undoAble:S,redoAble:x}})=>{Vue.unref(f)[3].disabled=Vue.unref(c).disabled=!S,Vue.unref(f)[4].disabled=Vue.unref(i).disabled=!x})}),(S,x)=>{const P=Vue.resolveComponent("el-tooltip");return Vue.openBlock(),Vue.createElementBlock("div",gR,[Vue.createElementVNode("ul",null,[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(f.value,(w,M)=>(Vue.openBlock(),Vue.createElementBlock("li",{key:M,title:w.text,class:"dark:text-bg_color",onMouseenter:Vue.withModifiers(j=>b(M),["prevent"]),onMouseleave:x[0]||(x[0]=Vue.withModifiers(j=>l.value=-1,["prevent"]))},[Vue.createVNode(P,{content:w.text,visible:l.value===M,placement:"right"},{default:Vue.withCtx(()=>[Vue.createElementVNode("button",{ref_for:!0,ref:"controlButton"+M,disabled:w.disabled,style:Vue.normalizeStyle({cursor:w.disabled===!1?"pointer":"not-allowed",color:w.disabled===!1?"":"#00000040",background:"transparent"}),onClick:j=>y(w,M)},[Vue.createElementVNode("span",{class:Vue.normalizeClass("iconfont "+w.icon),style:Vue.normalizeStyle({fontSize:`${w.size}px`})},null,6)],12,bR)]),_:2},1032,["content","visible"])],40,mR))),128))])])}}});const ER=Jc(OR,[["__scopeId","data-v-8ed94ee6"]]),xR={class:"node-panel"},SR=["onMousedown"],PR={key:0,class:"shape"},TR={class:"node-label"},MR=Vue.defineComponent({__name:"NodePanel",props:{lf:{default:null},nodeList:{default:null}},setup(m){const v=m,u=Vue.ref({a:"efrwe",b:"wewe"}),c=i=>{v.lf.dnd.startDrag({type:i.type,properties:Vue.unref(u)})};return(i,l)=>(Vue.openBlock(),Vue.createElementBlock("div",xR,[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(v.nodeList,f=>(Vue.openBlock(),Vue.createElementBlock("div",{class:"node-item dark:text-bg_color",key:f.text,onMousedown:y=>c(f)},[Vue.createElementVNode("div",{class:Vue.normalizeClass(["node-item-icon",f.class])},[f.type==="user"||f.type==="time"?(Vue.openBlock(),Vue.createElementBlock("div",PR)):Vue.createCommentVNode("",!0)],2),Vue.createElementVNode("span",TR,Vue.toDisplayString(f.text),1)],40,SR))),128))]))}});const wR=Jc(MR,[["__scopeId","data-v-9049943f"]]),AR=Vue.defineComponent({__name:"DataDialog",props:{graphData:Object},setup(m){const v=m;return(u,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(pC),{path:"res",deep:3,showLength:!0,data:v.graphData},null,8,["data"]))}}),NR=Qc(ER),DR=Qc(wR),jR=Qc(AR),CR={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function RR(m){const{incoming:v,outgoing:u,properties:c,key:i}=m,{text:l,startPoint:f,endPoint:y,pointsList:b,logicFlowType:S}=c,x={id:i,type:S,sourceNodeId:v[0],targetNodeId:u[0],text:l,startPoint:f,endPoint:y,pointsList:b,properties:{}},P=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(m.properties).forEach(w=>{P.indexOf(w)===-1&&(x.properties[w]=m.properties[w])}),x}function IR(m){const{properties:v,key:u}=m,{x:c,y:i,text:l,logicFlowType:f}=v,y={id:u,type:f,x:c,y:i,text:l,properties:{}},b=["x","y","text","logicFlowType"];return Object.keys(m.properties).forEach(S=>{b.indexOf(S)===-1&&(y.properties[S]=m.properties[S])}),y}function _R(m){const v={nodes:[],edges:[]},u=m.flowElementList;return u&&u.length>0&&u.forEach(c=>{if(c.type===CR.SEQUENCE_FLOW){const i=RR(c);v.edges.push(i)}else{const i=IR(c);v.nodes.push(i)}}),v}const BR=m=>(Vue.pushScopeId("data-v-ab034b5a"),m=m(),Vue.popScopeId(),m),LR={class:"card-header"},zR={class:"font-medium"},FR={class:"logic-flow-view"},HR=BR(()=>Vue.createElementVNode("div",{id:"LF-Turbo"},null,-1)),GR=Vue.defineComponent({name:"FlowChart"}),kR=Vue.defineComponent({...GR,setup(m){const v=Vue.ref(null),u=Vue.ref(null),c=Vue.ref(!1),i=Vue.ref({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),l=mC;function f(){_s.use(kC),_s.use(GC),_s.use(qC);const S=new _s({...Vue.unref(i),container:document.querySelector("#LF-Turbo")});v.value=S,Vue.unref(v).setDefaultEdgeType("bpmn:sequenceFlow"),y()}function y(){const S=_R(yC);v.value.render(S)}function b(){u.value=Vue.unref(v).getGraphData(),c.value=!0}return Vue.onMounted(()=>{f()}),(S,x)=>{const P=Vue.resolveComponent("el-link"),w=Vue.resolveComponent("el-scrollbar"),M=Vue.resolveComponent("el-dialog"),j=Vue.resolveComponent("el-card");return Vue.openBlock(),Vue.createBlock(j,null,{header:Vue.withCtx(()=>[Vue.createElementVNode("div",LR,[Vue.createElementVNode("span",zR,[Vue.createTextVNode(" 流程图组件,采用开源的 "),Vue.createVNode(P,{href:"http://logic-flow.org/",target:"_blank",icon:Vue.unref(dC)(Vue.unref(hC)),style:{"font-size":"16px",margin:"0 4px 5px"}},{default:Vue.withCtx(()=>[Vue.createTextVNode(" LogicFlow ")]),_:1},8,["icon"])])])]),default:Vue.withCtx(()=>[Vue.createElementVNode("div",FR,[v.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(NR),{key:0,class:"demo-control",lf:v.value,catTurboData:!1,onCatData:b},null,8,["lf"])):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(DR),{lf:v.value,nodeList:Vue.unref(l)},null,8,["lf","nodeList"]),HR,Vue.createVNode(M,{class:"flow-dialog",title:"数据",modelValue:c.value,"onUpdate:modelValue":x[0]||(x[0]=C=>c.value=C),width:"50%"},{default:Vue.withCtx(()=>[Vue.createVNode(w,null,{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(jR),{graphData:u.value},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});const JR=Jc(kR,[["__scopeId","data-v-ab034b5a"]]);export{JR as default};