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{h as Qc}from"./index-e857c921.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=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;h2&&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;W0;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;feN&&(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;h0&&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",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||"",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||"";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;fe0}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;F0}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;F0?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;FW?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-1?(this.splice(O,1),!0):!1},get:function(d){var h=this[R];if(h){if(d=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;ve0?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;ut2&&(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]>>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;k1?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;YX)throw ie(U);for(Q=0;Q=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=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=[];$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;_eNe)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;PeX)throw C(U);for(R=P(J,A),Y=0;Yue-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;YR;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,"$")!=="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=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=[];++j1)for(var oe=1;oe=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=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":".","?":"/","|":"\\"},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;ce1){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;$-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("(?b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$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;Qx(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;Me0;)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;_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"+j+""}},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;j0?(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&<(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;t2?n-2:0),a=2;a"}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-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();++rp))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-1&&e%1==0&&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;++D0){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);++n0&&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;te.length)&&(r=e.length);for(var t=0,n=new Array(r);t0&&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),othis.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;++te.length)&&(r=e.length);for(var t=0,n=new Array(r);tg&&aE&&s1&&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=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=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);Ea.minX&&r.xa.minY&&r.yB.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);ger.x?a=r.x+n/2:t.xr.y?s=r.y+o/2:t.y1?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;r0&&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"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;se.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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;sT)&&(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);Ze0?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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);to/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 nt.maxX||ot.maxY},VP=function(r,t){return tr.maxX?[]:[{x:t,y:r.minY},{x:t,y:r.maxY}]},YP=function(r,t){return tr.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]=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;n2&&(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;sa&&(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=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;Eg||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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t2&&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;E3&&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;Z0&&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;a1&&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"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"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"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"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;se.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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"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;Te.length)&&(r=e.length);for(var t=0,n=new Array(r);te.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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"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"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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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;s0){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);t0?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;n2&&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"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;se.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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;sa&&(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];ga&&(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"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;se.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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;sa&&(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];ga&&(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"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"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"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;se.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t1){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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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"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"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"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"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"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"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"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"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"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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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"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;s200)){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"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);te.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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;Ge.length)&&(r=e.length);for(var t=0,n=new Array(r);t"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"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;t1,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"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"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;t0&&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;r2&&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;g2&&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.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-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 `;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"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"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+" `:y="<"+m+f+">"+y+" `:y="<"+m+f+` /> `),y};cr.ObjTree.prototype.array_to_xml=function(m,v){for(var u=[],c=0;c"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)+" `};cr.ObjTree.prototype.xml_escape=function(m){return m.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){l0)&&!(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-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;u0)&&!(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;iX?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;v0?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-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;u0)&&!(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(_.widthie||_.heightoe){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.widthoe/2||z.heightee/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.widthoe/2||z.heightee/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;y0)&&!(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=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;u0)&&!(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-3d4a3f8d"),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,{shadow:"never"},{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-3d4a3f8d"]]);export{JR as default};