import{aE as Jm,_ as Zl,d as Jl,B as Sm,E as lo,F as Qm,u as zt,x as Ci,o as nn,c as so,a as Hn,b as on,L as rd,M as qm,a2 as Pm,ao as eb,y as Ko,K as Vo,V as Tm,J as tb,T as DC,aF as jC,aG as CC,ax as RC,N as nd,aH as ld,R as IC,W as rb,$ as _C,a0 as BC}from"./index.743f0c80.js";const LC=[{incoming:[],outgoing:["Flow_33inf2k"],dockers:[],type:2,properties:{a:"efrwe",b:"wewe",name:"\u5F00\u59CB",x:280,y:200,text:{x:280,y:200,value:"\u5F00\u59CB"},logicFlowType:"bpmn:startEvent"},key:"Event_1d42u4p"},{incoming:["Flow_379e0o9"],outgoing:[],dockers:[],type:3,properties:{a:"efrwe",b:"wewe",name:"\u7ED3\u675F",x:920,y:200,text:{x:920,y:200,value:"\u7ED3\u675F"},logicFlowType:"bpmn:endEvent"},key:"Event_08p8i6q"},{incoming:["Flow_0pfouf0"],outgoing:["Flow_3918lhh"],dockers:[],type:6,properties:{a:"efrwe",b:"wewe",name:"\u7F51\u5173",x:580,y:200,text:{x:580,y:200,value:"\u7F51\u5173"},logicFlowType:"bpmn:exclusiveGateway"},key:"Gateway_1fngqgj"},{incoming:["Flow_33inf2k"],outgoing:["Flow_0pfouf0"],dockers:[],type:4,properties:{a:"efrwe",b:"wewe",name:"\u7528\u6237",x:420,y:200,text:{x:420,y:200,value:"\u7528\u6237"},logicFlowType:"bpmn:userTask"},key:"Activity_2mgtaia"},{incoming:["Flow_3918lhh"],outgoing:["Flow_379e0o9"],dockers:[],type:5,properties:{a:"efrwe",b:"wewe",name:"\u670D\u52A1",x:760,y:200,text:{x:760,y:200,value:"\u670D\u52A1"},logicFlowType:"bpmn:serviceTask"},key:"Activity_1sp8qc8"},{incoming:["Event_1d42u4p"],outgoing:["Activity_2mgtaia"],type:1,dockers:[],properties:{name:"\u8FB9",text:{x:331,y:200,value:"\u8FB9"},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:"\u8FB92",text:{x:507,y:200,value:"\u8FB92"},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:"\u8FB93",text:{x:664,y:200,value:"\u8FB93"},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:"\u8FB94",text:{x:871,y:200,value:"\u8FB94"},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"}];var zC={flowElementList:LC};var Ke={exports:{}};(function(m,v){(function(c,i){m.exports=i()})(window,function(){return function(u){var c={};function i(s){if(c[s])return c[s].exports;var f=c[s]={i:s,l:!1,exports:{}};return u[s].call(f.exports,f,f.exports,i),f.l=!0,f.exports}return i.m=u,i.c=c,i.d=function(s,f,y){i.o(s,f)||Object.defineProperty(s,f,{enumerable:!0,get:y})},i.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,f){if(f&1&&(s=i(s)),f&8||f&4&&typeof s=="object"&&s&&s.__esModule)return s;var y=Object.create(null);if(i.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:s}),f&2&&typeof s!="string")for(var b in s)i.d(y,b,function(E){return s[E]}.bind(null,b));return y},i.n=function(s){var f=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(f,"a",f),f},i.o=function(s,f){return Object.prototype.hasOwnProperty.call(s,f)},i.p="",i(i.s=215)}([function(u,c,i){(function(s,f){i.d(c,"a",function(){return D}),i.d(c,"b",function(){return ii}),i.d(c,"c",function(){return sn}),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 zi}),i.d(c,"h",function(){return Vn}),i.d(c,"i",function(){return nt}),i.d(c,"j",function(){return xr}),i.d(c,"k",function(){return Ur}),i.d(c,"l",function(){return Dr}),i.d(c,"m",function(){return Er}),i.d(c,"n",function(){return vs}),i.d(c,"o",function(){return ue}),i.d(c,"p",function(){return Es}),i.d(c,"q",function(){return oi}),i.d(c,"r",function(){return gs}),i.d(c,"s",function(){return Mr}),i.d(c,"t",function(){return Zi}),i.d(c,"u",function(){return cs}),i.d(c,"v",function(){return ms}),i.d(c,"w",function(){return bs}),i.d(c,"x",function(){return Sn}),i.d(c,"y",function(){return Cr}),i.d(c,"z",function(){return $t}),i.d(c,"A",function(){return vr}),i.d(c,"B",function(){return Pn}),i.d(c,"C",function(){return mt}),i.d(c,"D",function(){return xs}),i.d(c,"E",function(){return ni}),i.d(c,"F",function(){return ps}),i.d(c,"G",function(){return fs}),i.d(c,"H",function(){return Xi}),i.d(c,"I",function(){return Ts}),i.d(c,"J",function(){return Sr}),i.d(c,"K",function(){return te}),i.d(c,"L",function(){return Os}),i.d(c,"M",function(){return Mn});var y="An invariant failed, however the error is obfuscated because this is a production build.",b=[];Object.freeze(b);var E={};Object.freeze(E);function S(){return++$e.mobxGuid}function M(d){throw T(!1,d),"X"}function T(d,h){if(!d)throw new Error("[mobx] "+(h||y))}function A(d){var h=!1;return function(){if(!h)return h=!0,d.apply(this,arguments)}}var I=function(){};function _(d){var h=[];return d.forEach(function(O){h.indexOf(O)===-1&&h.push(O)}),h}function L(d){return d!==null&&typeof d=="object"}function H(d){if(d===null||typeof d!="object")return!1;var h=Object.getPrototypeOf(d);return h===Object.prototype||h===null}function U(d){if(J(d)||$t(d))return d;if(Array.isArray(d))return new Map(d);if(H(d)){var h=new Map;for(var O in d)h.set(O,d[O]);return h}else return M("Cannot convert to map from '"+d+"'")}function X(d,h,O){Object.defineProperty(d,h,{enumerable:!1,writable:!0,configurable:!0,value:O})}function se(d,h,O){Object.defineProperty(d,h,{enumerable:!1,writable:!1,configurable:!0,value:O})}function ae(d,h){var O=Object.getOwnPropertyDescriptor(d,h);return!O||O.configurable!==!1&&O.writable!==!1}function q(d,h){var O="isMobX"+d;return h.prototype[O]=!0,function(C){return L(C)&&C[O]===!0}}function J(d){return d instanceof Map}function ie(d){return d instanceof Set}function z(d){var h=new Set;for(var O in d)h.add(O);return Object.getOwnPropertySymbols(d).forEach(function(C){Object.getOwnPropertyDescriptor(d,C).enumerable&&h.add(C)}),Array.from(h)}function j(d){return d&&d.toString?d.toString():new String(d).toString()}function N(d){return d===null?null:typeof d=="object"?""+d:d}var P=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(d){return Object.getOwnPropertyNames(d).concat(Object.getOwnPropertySymbols(d))}:Object.getOwnPropertyNames,D=Symbol("mobx administration"),Y=function(){function d(h){h===void 0&&(h="Atom@"+S()),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 ki(this)},d.prototype.reportChanged=function(){Tt(),rs(this),pr()},d.prototype.toString=function(){return this.name},d}(),V=q("Atom",Y);function ue(d,h,O){h===void 0&&(h=I),O===void 0&&(O=I);var C=new Y(d);return h!==I&&hs(C,h),O!==I&&ni(C,O),C}function Oe(d,h){return d===h}function me(d,h){return Oo(d,h)}function ce(d,h){return Oo(d,h,1)}function he(d,h){return Object.is(d,h)}var ve={identity:Oe,structural:me,default:he,shallow:ce};/*! ***************************************************************************** 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 Ee=function(d,h){return Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,C){O.__proto__=C}||function(O,C){for(var F in C)C.hasOwnProperty(F)&&(O[F]=C[F])},Ee(d,h)};function je(d,h){Ee(d,h);function O(){this.constructor=d}d.prototype=h===null?Object.create(h):(O.prototype=h.prototype,new O)}var ze=function(){return ze=Object.assign||function(h){for(var O,C=1,F=arguments.length;C=d.length&&(d=void 0),{value:d&&d[O++],done:!d}}}}function xe(d,h){var O=typeof Symbol=="function"&&d[Symbol.iterator];if(!O)return d;var C=O.call(d),F,K=[],de;try{for(;(h===void 0||h-- >0)&&!(F=C.next()).done;)K.push(F.value)}catch(we){de={error:we}}finally{try{F&&!F.done&&(O=C.return)&&O.call(C)}finally{if(de)throw de.error}}return K}function Be(){for(var d=[],h=0;h2&&Wt("box");var O=Fe(h);return new ln(d,ne(O),O.name,!0,O.equals)},array:function(d,h){arguments.length>2&&Wt("array");var O=Fe(h);return js(d,ne(O),O.name)},map:function(d,h){arguments.length>2&&Wt("map");var O=Fe(h);return new ii(d,ne(O),O.name)},set:function(d,h){arguments.length>2&&Wt("set");var O=Fe(h);return new aa(d,ne(O),O.name)},object:function(d,h,O){typeof arguments[1]=="string"&&Wt("object");var C=Fe(O);if(C.proxy===!1)return oi({},d,h,C);var F=Ki(C),K=oi({},void 0,void 0,C),de=An(K);return Vi(de,d,h,F),de},ref:ct,shallow:At,deep:Qe,struct:bt},mt=Ct;Object.keys(St).forEach(function(d){return mt[d]=St[d]});function Wt(d){M("Expected one or two arguments to observable."+d+". Did you accidentally try to use observable."+d+" as decorator?")}var dr=ye(!1,function(d,h,O,C,F){var K=O.get,de=O.set,we=F[0]||{};ai(d).addComputedProp(d,h,ze({get:K,set:de,context:d},we))}),Zt=dr({equals:ve.structural}),Er=function(h,O,C){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 bn(F)};Er.struct=Zt;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 nr=function(){function d(h){this.cause=h}return d}();function Ce(d){return d instanceof nr}function Ye(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(),C=d.observing,F=C.length,K=0;K0;$e.computationDepth>0&&h&&M(!1),!$e.allowStateChanges&&(h||$e.enforceActions==="strict")&&M(!1)}function lt(d,h,O){var C=De(!0);vt(d),d.newObserving=new Array(d.observing.length+100),d.unboundDepsCount=0,d.runId=++$e.runId;var F=$e.trackingDerivation;$e.trackingDerivation=d;var K;if($e.disableErrorBoundaries===!0)K=h.call(O);else try{K=h.call(O)}catch(de){K=new nr(de)}return $e.trackingDerivation=F,k(d),Xe(C),K}function k(d){for(var h=d.observing,O=d.observing=d.newObserving,C=qe.UP_TO_DATE,F=0,K=d.unboundDepsCount,de=0;deC&&(C=we.dependenciesState)}for(O.length=F,d.newObserving=null,K=h.length;K--;){var we=h[K];we.diffValue===0&&$r(we,d),we.diffValue=0}for(;F--;){var we=O[F];we.diffValue===1&&(we.diffValue=0,ts(we,d))}C!==qe.UP_TO_DATE&&(d.dependenciesState=C,d.onBecomeStale())}function Z(d){var h=d.observing;d.observing=[];for(var O=h.length;O--;)$r(h[O],d);d.dependenciesState=qe.NOT_TRACKING}function te(d){var h=re();try{return d()}finally{Ae(h)}}function re(){var d=$e.trackingDerivation;return $e.trackingDerivation=null,d}function Ae(d){$e.trackingDerivation=d}function De(d){var h=$e.allowStateReads;return $e.allowStateReads=d,h}function Xe(d){$e.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 Jt=0,Qt=1,kn=Object.getOwnPropertyDescriptor(function(){},"name");kn&&kn.configurable;function kr(d,h,O){var C=function(){return Li(d,h,O||this,arguments)};return C.isMobxAction=!0,C}function Li(d,h,O,C){var F=xr();try{return h.apply(O,C)}catch(K){throw F.error=K,K}finally{zi(F)}}function xr(d,h,O){var C=Rt(),F=0,K=re();Tt();var de=mn(!0),we=De(!0),Ue={prevDerivation:K,prevAllowStateChanges:de,prevAllowStateReads:we,notifySpy:C,startTime:F,actionId:Qt++,parentActionId:Jt};return Jt=Ue.actionId,Ue}function zi(d){Jt!==d.actionId&&M("invalid action stack. did you forget to finish an action?"),Jt=d.parentActionId,d.error!==void 0&&($e.suppressReactionErrors=!0),$n(d.prevAllowStateChanges),Xe(d.prevAllowStateReads),pr(),Ae(d.prevDerivation),d.notifySpy,$e.suppressReactionErrors=!1}function sr(d,h){var O=mn(d),C;try{C=h()}finally{$n(O)}return C}function mn(d){var h=$e.allowStateChanges;return $e.allowStateChanges=d,h}function $n(d){$e.allowStateChanges=d}var ln=function(d){je(h,d);function h(O,C,F,K,de){F===void 0&&(F="ObservableValue@"+S()),K===void 0&&(K=!0),de===void 0&&(de=ve.default);var we=d.call(this,F)||this;return we.enhancer=C,we.name=F,we.equals=de,we.hasUnreportedChange=!1,we.value=C(O,void 0,F),K&&Rt(),we}return h.prototype.dehanceValue=function(O){return this.dehancer!==void 0?this.dehancer(O):O},h.prototype.set=function(O){var C=this.value;if(O=this.prepareNewValue(O),O!==$e.UNCHANGED){var F=Rt();this.setNewValue(O)}},h.prototype.prepareNewValue=function(O){if(Ze(this),Pr(this)){var C=Tr(this,{object:this,type:"update",newValue:O});if(!C)return $e.UNCHANGED;O=C.newValue}return O=this.enhancer(O,this.value,this.name),this.equals(this.value,O)?$e.UNCHANGED:O},h.prototype.setNewValue=function(O){var C=this.value;this.value=O,this.reportChanged(),hr(this)&&qt(this,{type:"update",object:this,newValue:O,oldValue:C})},h.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},h.prototype.intercept=function(O){return Wn(this,O)},h.prototype.observe=function(O,C){return C&&O({object:this,type:"update",newValue:this.value,oldValue:void 0}),Kn(this,O)},h.prototype.toJSON=function(){return this.get()},h.prototype.toString=function(){return this.name+"["+this.value+"]"},h.prototype.valueOf=function(){return N(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(Y),Un=q("ObservableValue",ln),bn=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="#"+S(),this.value=new nr(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Pt.NONE,T(h.get,"missing option for computed: get"),this.derivation=h.get,this.name=h.name||"ComputedValue@"+S(),h.set&&(this.setter=kr(this.name+"-setter",h.set)),this.equals=h.equals||(h.compareStructural||h.struct?ve.structural:ve.default),this.scope=h.context,this.requiresReaction=!!h.requiresReaction,this.keepAlive=!!h.keepAlive}return d.prototype.onBecomeStale=function(){os(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&&M("Cycle detected in computation "+this.name+": "+this.derivation),$e.inBatch===0&&this.observers.size===0&&!this.keepAlive?Ye(this)&&(this.warnAboutUntrackedRead(),Tt(),this.value=this.computeValue(!1),pr()):(ki(this),Ye(this)&&this.trackAndCompute()&&ns(this));var h=this.value;if(Ce(h))throw h.cause;return h},d.prototype.peek=function(){var h=this.computeValue(!1);if(Ce(h))throw h.cause;return h},d.prototype.set=function(h){if(this.setter){T(!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 T(!1,!1)},d.prototype.trackAndCompute=function(){var h=this.value,O=this.dependenciesState===qe.NOT_TRACKING,C=this.computeValue(!0),F=O||Ce(h)||Ce(C)||!this.equals(h,C);return F&&(this.value=C),F},d.prototype.computeValue=function(h){this.isComputing=!0,$e.computationDepth++;var O;if(h)O=lt(this,this.derivation,this.scope);else if($e.disableErrorBoundaries===!0)O=this.derivation.call(this.scope);else try{O=this.derivation.call(this.scope)}catch(C){O=new nr(C)}return $e.computationDepth--,this.isComputing=!1,O},d.prototype.suspend=function(){this.keepAlive||(Z(this),this.value=void 0)},d.prototype.observe=function(h,O){var C=this,F=!0,K=void 0;return Dr(function(){var de=C.get();if(!F||O){var we=re();h({type:"update",object:C,newValue:de,oldValue:K}),Ae(we)}F=!1,K=de})},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 N(this.get())},d.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},d}(),On=q("ComputedValue",bn),co=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}(),es={};function po(){return typeof window!="undefined"?window:typeof f!="undefined"?f:typeof self!="undefined"?self:es}var ho=!0,Fi=!1,$e=function(){var d=po();return d.__mobxInstanceCount>0&&!d.__mobxGlobals&&(ho=!1),d.__mobxGlobals&&d.__mobxGlobals.version!==new co().version&&(ho=!1),ho?d.__mobxGlobals?(d.__mobxInstanceCount+=1,d.__mobxGlobals.UNCHANGED||(d.__mobxGlobals.UNCHANGED={}),d.__mobxGlobals):(d.__mobxInstanceCount=1,d.__mobxGlobals=new co):(setTimeout(function(){Fi||M("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new co)}();function Hi(){($e.pendingReactions.length||$e.inBatch||$e.isRunningReactions)&&M("isolateGlobalState should be called before MobX is running any reactions"),Fi=!0,ho&&(--po().__mobxInstanceCount===0&&(po().__mobxGlobals=void 0),$e=new co)}function ts(d,h){d.observers.add(h),d.lowestObserverState>h.dependenciesState&&(d.lowestObserverState=h.dependenciesState)}function $r(d,h){d.observers.delete(h),d.observers.size===0&&Gi(d)}function Gi(d){d.isPendingUnobservation===!1&&(d.isPendingUnobservation=!0,$e.pendingUnobservations.push(d))}function Tt(){$e.inBatch++}function pr(){if(--$e.inBatch===0){Ui();for(var d=$e.pendingUnobservations,h=0;h0&&Gi(d),!1)}function rs(d){d.lowestObserverState!==qe.STALE&&(d.lowestObserverState=qe.STALE,d.observers.forEach(function(h){h.dependenciesState===qe.UP_TO_DATE&&(h.isTracing!==Pt.NONE&&vo(h,d),h.onBecomeStale()),h.dependenciesState=qe.STALE}))}function ns(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 os(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&&vo(h,d),h.onBecomeStale())}))}function vo(d,h){if(console.log("[mobx.trace] '"+d.name+"' is invalidated due to a change in: '"+h.name+"'"),d.isTracing===Pt.BREAK){var O=[];$i(Zi(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 bn?d.derivation.toString().replace(/[*]\//g,"/"):"")+` The dependencies for this derivation are: `+O.join(` `)+` */ `)()}}function $i(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(C){return $i(C,h,O+1)})}var sn=function(){function d(h,O,C,F){h===void 0&&(h="Reaction@"+S()),F===void 0&&(F=!1),this.name=h,this.onInvalidate=O,this.errorHandler=C,this.requiresObservable=F,this.observing=[],this.newObserving=[],this.dependenciesState=qe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+S(),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,$e.pendingReactions.push(this),Ui())},d.prototype.isScheduled=function(){return this._isScheduled},d.prototype.runReaction=function(){if(!this.isDisposed){if(Tt(),this._isScheduled=!1,Ye(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&&Z(this),Ce(O)&&this.reportExceptionInDerivation(O.cause),pr()}},d.prototype.reportExceptionInDerivation=function(h){var O=this;if(this.errorHandler){this.errorHandler(h,this);return}if($e.disableErrorBoundaries)throw h;var C="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";$e.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(C,h),$e.globalReactionErrorHandlers.forEach(function(F){return F(h,O)})},d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Tt(),Z(this),pr()))},d.prototype.getDisposer=function(){var h=this.dispose.bind(this);return h[D]=this,h},d.prototype.toString=function(){return"Reaction["+this.name+"]"},d.prototype.trace=function(h){h===void 0&&(h=!1),Ms(this,h)},d}(),ei=100,ti=function(d){return d()};function Ui(){$e.inBatch>0||$e.isRunningReactions||ti(is)}function is(){$e.isRunningReactions=!0;for(var d=$e.pendingReactions,h=0;d.length>0;){++h===ei&&(console.error("Reaction doesn't converge to a stable state after "+ei+" iterations."+(" Probably there is a cycle in the reactive function: "+d[0])),d.splice(0));for(var O=d.splice(0),C=0,F=O.length;C",h);if(arguments.length===2&&typeof O=="function")return kr(h,O);if(arguments.length===1&&typeof h=="string")return Yi(h);if(F===!0)X(h,O,kr(h.name||O,C.value,this));else return Yi(O).apply(null,arguments)};Ur.bound=ss;function fs(d,h){var O=typeof d=="string"?d:d.name||"",C=typeof d=="function"?d:h;return Li(O,C,this,void 0)}function cs(d){return typeof d=="function"&&d.isMobxAction===!0}function ri(d,h,O){X(d,h,kr(h,O.bind(d)))}function Dr(d,h){h===void 0&&(h=E);var O=h&&h.name||d.name||"Autorun@"+S(),C=!h.scheduler&&!h.delay,F;if(C)F=new sn(O,function(){this.track(we)},h.onError,h.requiresObservable);else{var K=En(h),de=!1;F=new sn(O,function(){de||(de=!0,K(function(){de=!1,F.isDisposed||F.track(we)}))},h.onError,h.requiresObservable)}function we(){d(F)}return F.schedule(),F.getDisposer()}var ds=function(d){return d()};function En(d){return d.scheduler?d.scheduler:d.delay?function(h){return setTimeout(h,d.delay)}:ds}function ps(d,h,O){O===void 0&&(O=E);var C=O.name||"Reaction@"+S(),F=Ur(C,O.onError?Xn(O.onError,h):h),K=!O.scheduler&&!O.delay,de=En(O),we=!0,Ue=!1,st,ft=O.compareStructural?ve.structural:O.equals||ve.default,Ot=new sn(C,function(){we||K?xt():Ue||(Ue=!0,de(xt))},O.onError,O.requiresObservable);function xt(){if(Ue=!1,!Ot.isDisposed){var _t=!1;Ot.track(function(){var Ut=d(Ot);_t=we||!ft(st,Ut),st=Ut}),we&&O.fireImmediately&&F(st,Ot),!we&&_t===!0&&F(st,Ot),we&&(we=!1)}}return Ot.schedule(),Ot.getDisposer()}function Xn(d,h){return function(){try{return h.apply(this,arguments)}catch(O){d.call(this,O)}}}function hs(d,h,O){return Wi("onBecomeObserved",d,h,O)}function ni(d,h,O){return Wi("onBecomeUnobserved",d,h,O)}function Wi(d,h,O,C){var F=typeof C=="function"?Mr(h,O):Mr(h),K=typeof C=="function"?C:O,de=d+"Listeners";F[de]?F[de].add(K):F[de]=new Set([K]);var we=F[d];return typeof we!="function"?M(!1):function(){var Ue=F[de];Ue&&(Ue.delete(K),Ue.size===0&&delete F[de])}}function vs(d){var h=d.enforceActions,O=d.computedRequiresReaction,C=d.computedConfigurable,F=d.disableErrorBoundaries,K=d.reactionScheduler,de=d.reactionRequiresObservable,we=d.observableRequiresReaction;if(d.isolateGlobalState===!0&&Hi(),h!==void 0){var Ue=void 0;switch(h){case!0:case"observed":Ue=!0;break;case!1:case"never":Ue=!1;break;case"strict":case"always":Ue="strict";break;default:M("Invalid value for 'enforceActions': '"+h+"', expected 'never', 'always' or 'observed'")}$e.enforceActions=Ue,$e.allowStateChanges=!(Ue===!0||Ue==="strict")}O!==void 0&&($e.computedRequiresReaction=!!O),de!==void 0&&($e.reactionRequiresObservable=!!de),we!==void 0&&($e.observableRequiresReaction=!!we,$e.allowStateReads=!$e.observableRequiresReaction),C!==void 0&&($e.computedConfigurable=!!C),F!==void 0&&(F===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),$e.disableErrorBoundaries=!!F),K&&as(K)}function oi(d,h,O,C){C=Fe(C);var F=Ki(C);return Me(d),ai(d,C.name,F.enhancer),h&&Vi(d,h,O,F),d}function Ki(d){return d.defaultDecorator||(d.deep===!1?ct:Qe)}function Vi(d,h,O,C){var F,K,de,we;Tt();try{var we=P(h);try{for(var Ue=Re(we),st=Ue.next();!st.done;st=Ue.next()){var de=st.value,ft=Object.getOwnPropertyDescriptor(h,de),Ot=O&&de in O?O[de]:ft.get?dr:C,xt=Ot(d,de,ft,!0);xt&&Object.defineProperty(d,de,xt)}}catch(Ut){F={error:Ut}}finally{try{st&&!st.done&&(K=Ue.return)&&K.call(Ue)}finally{if(F)throw F.error}}}finally{pr()}}function Zi(d,h){return Ji(Mr(d,h))}function Ji(d){var h={name:d.name};return d.observing&&d.observing.length>0&&(h.dependencies=_(d.observing).map(Ji)),h}var ys=0;function Qi(){this.message="FLOW_CANCELLED"}Qi.prototype=Object.create(Error.prototype);function gs(d){arguments.length!==1&&M("Flow expects 1 argument and cannot be used as decorator");var h=d.name||"";return function(){var O=this,C=arguments,F=++ys,K=Ur(h+" - runid: "+F+" - init",d).apply(O,C),de,we=void 0,Ue=new Promise(function(st,ft){var Ot=0;de=ft;function xt(Mt){we=void 0;var yr;try{yr=Ur(h+" - runid: "+F+" - yield "+Ot++,K.next).call(K,Mt)}catch(Nn){return ft(Nn)}Ut(yr)}function _t(Mt){we=void 0;var yr;try{yr=Ur(h+" - runid: "+F+" - yield "+Ot++,K.throw).call(K,Mt)}catch(Nn){return ft(Nn)}Ut(yr)}function Ut(Mt){if(Mt&&typeof Mt.then=="function"){Mt.then(Ut,ft);return}return Mt.done?st(Mt.value):(we=Promise.resolve(Mt.value),we.then(xt,_t))}xt(void 0)});return Ue.cancel=Ur(h+" - runid: "+F+" - cancel",function(){try{we&&qi(we);var st=K.return(void 0),ft=Promise.resolve(st.value);ft.then(I,I),qi(ft),de(new Qi)}catch(Ot){de(Ot)}}),Ue}}function qi(d){typeof d.cancel=="function"&&d.cancel()}function ea(d,h){if(d==null)return!1;if(h!==void 0){if(vr(d)===!1||!d[D].values.has(h))return!1;var O=Mr(d,h);return On(O)}return On(d)}function ms(d){return arguments.length>1?M(!1):ea(d)}function bs(d,h){return typeof h!="string"?M(!1):ea(d,h)}function xn(d,h){return d==null?!1:h!==void 0?vr(d)?d[D].values.has(h):!1:vr(d)||!!d[D]||V(d)||yo(d)||On(d)}function Sn(d){return arguments.length!==1&&M(!1),xn(d)}function Pn(d){return vr(d)?d[D].getKeys():$t(d)||fr(d)?Array.from(d.keys()):Cr(d)?d.map(function(h,O){return O}):M(!1)}function Os(d){return vr(d)?Pn(d).map(function(h){return d[h]}):$t(d)?Pn(d).map(function(h){return d.get(h)}):fr(d)?Array.from(d.values()):Cr(d)?d.slice():M(!1)}function Es(d){return vr(d)?Pn(d).map(function(h){return[h,d[h]]}):$t(d)?Pn(d).map(function(h){return[h,d.get(h)]}):fr(d)?Array.from(d.entries()):Cr(d)?d.map(function(h,O){return[O,h]}):M(!1)}function ta(d,h,O){if(arguments.length===2&&!fr(d)){Tt();var C=h;try{for(var F in C)ta(d,F,C[F])}finally{pr()}return}if(vr(d)){var K=d[D],de=K.values.get(h);de?K.write(h,O):K.addObservableProp(h,O,K.defaultEnhancer)}else if($t(d))d.set(h,O);else if(fr(d))d.add(h);else if(Cr(d))typeof h!="number"&&(h=parseInt(h,10)),T(h>=0,"Not a valid index: '"+h+"'"),Tt(),h>=d.length&&(d.length=h+1),d[h]=O,pr();else return M(!1)}function xs(d,h,O,C){return typeof O=="function"?Ss(d,h,O,C):go(d,h,O)}function go(d,h,O){return Vn(d).observe(h,O)}function Ss(d,h,O,C){return Vn(d,h).observe(O,C)}var Ps={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Tn(d,h,O,C){return C.detectCycles&&d.set(h,O),O}function Xr(d,h,O){if(!h.recurseEverything&&!Sn(d)||typeof d!="object")return d;if(d===null)return null;if(d instanceof Date)return d;if(Un(d))return Xr(d.get(),h,O);Sn(d)&&Pn(d);var C=h.detectCycles===!0;if(C&&d!==null&&O.has(d))return O.get(d);if(Cr(d)||Array.isArray(d)){var F=Tn(O,d,[],h),K=d.map(function(_t){return Xr(_t,h,O)});F.length=K.length;for(var de=0,we=K.length;de0}function Wn(d,h){var O=d.interceptors||(d.interceptors=[]);return O.push(h),A(function(){var C=O.indexOf(h);C!==-1&&O.splice(C,1)})}function Tr(d,h){var O=re();try{for(var C=Be(d.interceptors||[]),F=0,K=C.length;F0}function Kn(d,h){var O=d.changeListeners||(d.changeListeners=[]);return O.push(h),A(function(){var C=O.indexOf(h);C!==-1&&O.splice(C,1)})}function qt(d,h){var O=re(),C=d.changeListeners;if(!!C){C=C.slice();for(var F=0,K=C.length;F0?h.map(this.dehancer):h},d.prototype.intercept=function(h){return Wn(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}),Kn(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 C=new Array(h-O),F=0;FK?h=K:h<0&&(h=Math.max(0,K+h)),arguments.length===1?O=K-h:O==null?O=0:O=Math.max(0,Math.min(O,K-h)),C===void 0&&(C=b),Pr(this)){var de=Tr(this,{object:this.proxy,type:"splice",index:h,removedCount:O,added:C});if(!de)return b;O=de.removedCount,C=de.added}C=C.length===0?C:C.map(function(Ue){return F.enhancer(Ue,void 0)});var we=this.spliceItemsIntoValues(h,O,C);return(O!==0||C.length!==0)&&this.notifyArraySplice(h,C,we),this.dehanceValues(we)},d.prototype.spliceItemsIntoValues=function(h,O,C){var F;if(C.length-1?(this.splice(O,1),!0):!1},get:function(d){var h=this[D];if(h){if(d=0&&O++;break}d=da(d),h=da(h);var we=de==="[object Array]";if(!we){if(typeof d!="object"||typeof h!="object")return!1;var Ue=d.constructor,st=h.constructor;if(Ue!==st&&!(typeof Ue=="function"&&Ue instanceof Ue&&typeof st=="function"&&st instanceof st)&&"constructor"in d&&"constructor"in h)return!1}if(O===0)return!1;O<0&&(O=-1),C=C||[],F=F||[];for(var ft=C.length;ft--;)if(C[ft]===d)return F[ft]===h;if(C.push(d),F.push(h),we){if(ft=d.length,ft!==h.length)return!1;for(;ft--;)if(!Zn(d[ft],h[ft],O-1,C,F))return!1}else{var Ot=Object.keys(d),xt=void 0;if(ft=Ot.length,Object.keys(h).length!==ft)return!1;for(;ft--;)if(xt=Ot[ft],!(zs(h,xt)&&Zn(d[xt],h[xt],O-1,C,F)))return!1}return C.pop(),F.pop(),!0}function da(d){return Cr(d)?d.slice():J(d)||$t(d)||ie(d)||fr(d)?Array.from(d.entries()):d}function zs(d,h){return Object.prototype.hasOwnProperty.call(d,h)}function Eo(d){return d[Symbol.iterator]=ui,d}function ui(){return this}if(typeof Proxy=="undefined"||typeof Symbol=="undefined")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 pa=po();typeof s=="undefined"&&(pa.process={}),pa.process.env={}}(function(){function d(){}if(d.name!=="testCodeMinification"&&!1)var h})(),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Xi,extras:{getDebugName:Ls},$mobx:D})}).call(this,i(155),i(82))},function(u,c,i){i.d(c,"a",function(){return ae}),i.d(c,"b",function(){return se}),i.d(c,"c",function(){return Be}),i.d(c,"d",function(){return _e}),i.d(c,"e",function(){return H}),i.d(c,"f",function(){return X}),i.d(c,"g",function(){return H}),i.d(c,"h",function(){return xe}),i.d(c,"i",function(){return f}),i.d(c,"j",function(){return Re}),i.d(c,"k",function(){return P});var s,f,y,b,E,S,M,T={},A=[],I=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function _(G,W){for(var ee in W)G[ee]=W[ee];return G}function L(G){var W=G.parentNode;W&&W.removeChild(G)}function H(G,W,ee){var ge,Me,ye,He={};for(ye in W)ye=="key"?ge=W[ye]:ye=="ref"?Me=W[ye]:He[ye]=W[ye];if(arguments.length>2&&(He.children=arguments.length>3?s.call(arguments,2):ee),typeof G=="function"&&G.defaultProps!=null)for(ye in G.defaultProps)He[ye]===void 0&&(He[ye]=G.defaultProps[ye]);return U(G,He,ge,Me,null)}function U(G,W,ee,ge,Me){var ye={type:G,props:W,key:ee,ref:ge,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:Me==null?++y:Me};return Me==null&&f.vnode!=null&&f.vnode(ye),ye}function X(){return{current:null}}function se(G){return G.children}function ae(G,W){this.props=G,this.context=W}function q(G,W){if(W==null)return G.__?q(G.__,G.__.__k.indexOf(G)+1):null;for(var ee;W0?U(Fe.type,Fe.props,Fe.key,null,Fe.__v):Fe)!=null){if(Fe.__=ee,Fe.__b=ee.__b+1,(tt=bt[be])===null||tt&&Fe.key==tt.key&&Fe.type===tt.type)bt[be]=void 0;else for(ut=0;ut2&&(He.children=arguments.length>3?s.call(arguments,2):ee),U(G.type,He,ge||G.key,Me||G.ref,null)}function _e(G,W){var ee={__c:W="__cC"+M++,__:G,Consumer:function(ge,Me){return ge.children(Me)},Provider:function(ge){var Me,ye;return this.getChildContext||(Me=[],(ye={})[W]=this,this.getChildContext=function(){return ye},this.shouldComponentUpdate=function(He){this.props.value!==He.value&&Me.some(ie)},this.sub=function(He){Me.push(He);var et=He.componentWillUnmount;He.componentWillUnmount=function(){Me.splice(Me.indexOf(He),1),et&&et.call(He)}}),ge.children}};return ee.Provider.__=ee.Consumer.contextType=ee}s=A.slice,f={__e:function(G,W){for(var ee,ge,Me;W=W.__;)if((ee=W.__c)&&!ee.__)try{if((ge=ee.constructor)&&ge.getDerivedStateFromError!=null&&(ee.setState(ge.getDerivedStateFromError(G)),Me=ee.__d),ee.componentDidCatch!=null&&(ee.componentDidCatch(G),Me=ee.__d),Me)return ee.__E=ee}catch(ye){G=ye}throw G}},y=0,ae.prototype.setState=function(G,W){var ee;ee=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=_({},this.state),typeof G=="function"&&(G=G(_({},ee),this.props)),G&&_(ee,G),G!=null&&this.__v&&(W&&this.__h.push(W),ie(this))},ae.prototype.forceUpdate=function(G){this.__v&&(this.__e=!0,G&&this.__h.push(G),ie(this))},ae.prototype.render=se,b=[],E=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,z.__r=0,M=0},function(u,c,i){var s=i(116),f=i(44),y=i(178);s||f(Object.prototype,"toString",y,{unsafe:!0})},function(u,c,i){var s=i(39),f=i(83),y=i(70),b=i(56),E=i(111),S="Array Iterator",M=b.set,T=b.getterFor(S);u.exports=E(Array,"Array",function(A,I){M(this,{type:S,target:s(A),index:0,kind:I})},function(){var A=T(this),I=A.target,_=A.kind,L=A.index++;return!I||L>=I.length?(A.target=void 0,{value:void 0,done:!0}):_=="keys"?{value:L,done:!1}:_=="values"?{value:I[L],done:!1}:{value:[L,I[L]],done:!1}},"values"),y.Arguments=y.Array,f("keys"),f("values"),f("entries")},function(u,c,i){var s=i(7),f=i(147),y=i(148),b=i(3),E=i(57),S=i(27),M=S("iterator"),T=S("toStringTag"),A=b.values,I=function(L,H){if(L){if(L[M]!==A)try{E(L,M,A)}catch{L[M]=A}if(L[T]||E(L,T,H),f[H]){for(var U in b)if(L[U]!==b[U])try{E(L,U,b[U])}catch{L[U]=b[U]}}}};for(var _ in f)I(s[_]&&s[_].prototype,_);I(y,"DOMTokenList")},function(u,c,i){var s=i(16),f=i(7),y=i(46),b=i(76),E=i(35),S=i(15),M=i(64),T=i(36),A=i(109),I=i(18),_=i(34),L=i(99),H=i(28),U=i(33),X=i(58),se=i(88),ae=i(32),q=i(38),J=i(39),ie=i(87),z=i(40),j=i(71),N=i(54),P=i(66),D=i(72),Y=i(139),V=i(112),ue=i(51),Oe=i(37),me=i(93),ce=i(101),he=i(44),ve=i(84),Ee=i(91),je=i(69),ze=i(85),Re=i(27),xe=i(149),Be=i(150),_e=i(73),G=i(56),W=i(74).forEach,ee=Ee("hidden"),ge="Symbol",Me="prototype",ye=Re("toPrimitive"),He=G.set,et=G.getterFor(ge),We=Object[Me],rt=f.Symbol,be=rt&&rt[Me],ut=f.TypeError,tt=f.QObject,Fe=y("JSON","stringify"),Qe=ue.f,At=Oe.f,ct=Y.f,bt=me.f,ne=S([].push),Ct=ve("symbols"),St=ve("op-symbols"),mt=ve("string-to-symbol-registry"),Wt=ve("symbol-to-string-registry"),dr=ve("wks"),Zt=!tt||!tt[Me]||!tt[Me].findChild,Er=T&&I(function(){return N(At({},"a",{get:function(){return At(this,"a",{value:7}).a}})).a!=7})?function(te,re,Ae){var De=Qe(We,re);De&&delete We[re],At(te,re,Ae),De&&te!==We&&At(We,re,De)}:At,qe=function(te,re){var Ae=Ct[te]=N(be);return He(Ae,{type:ge,tag:te,description:re}),T||(Ae.description=re),Ae},Pt=function(re,Ae,De){re===We&&Pt(St,Ae,De),ae(re);var Xe=ie(Ae);return ae(De),_(Ct,Xe)?(De.enumerable?(_(re,ee)&&re[ee][Xe]&&(re[ee][Xe]=!1),De=N(De,{enumerable:j(0,!1)})):(_(re,ee)||At(re,ee,j(1,{})),re[ee][Xe]=!0),Er(re,Xe,De)):At(re,Xe,De)},nr=function(re,Ae){ae(re);var De=J(Ae),Xe=P(De).concat(lt(De));return W(Xe,function(vt){(!T||E(Ye,De,vt))&&Pt(re,vt,De[vt])}),re},Ce=function(re,Ae){return Ae===void 0?N(re):nr(N(re),Ae)},Ye=function(re){var Ae=ie(re),De=E(bt,this,Ae);return this===We&&_(Ct,Ae)&&!_(St,Ae)?!1:De||!_(this,Ae)||!_(Ct,Ae)||_(this,ee)&&this[ee][Ae]?De:!0},nt=function(re,Ae){var De=J(re),Xe=ie(Ae);if(!(De===We&&_(Ct,Xe)&&!_(St,Xe))){var vt=Qe(De,Xe);return vt&&_(Ct,Xe)&&!(_(De,ee)&&De[ee][Xe])&&(vt.enumerable=!0),vt}},Ze=function(re){var Ae=ct(J(re)),De=[];return W(Ae,function(Xe){!_(Ct,Xe)&&!_(je,Xe)&&ne(De,Xe)}),De},lt=function(re){var Ae=re===We,De=ct(Ae?St:J(re)),Xe=[];return W(De,function(vt){_(Ct,vt)&&(!Ae||_(We,vt))&&ne(Xe,Ct[vt])}),Xe};if(A||(rt=function(){if(X(be,this))throw ut("Symbol is not a constructor");var re=!arguments.length||arguments[0]===void 0?void 0:z(arguments[0]),Ae=ze(re),De=function(Xe){this===We&&E(De,St,Xe),_(this,ee)&&_(this[ee],Ae)&&(this[ee][Ae]=!1),Er(this,Ae,j(1,Xe))};return T&&Zt&&Er(We,Ae,{configurable:!0,set:De}),qe(Ae,re)},be=rt[Me],he(be,"toString",function(){return et(this).tag}),he(rt,"withoutSetter",function(te){return qe(ze(te),te)}),me.f=Ye,Oe.f=Pt,ue.f=nt,D.f=Y.f=Ze,V.f=lt,xe.f=function(te){return qe(Re(te),te)},T&&(At(be,"description",{configurable:!0,get:function(){return et(this).description}}),M||he(We,"propertyIsEnumerable",Ye,{unsafe:!0}))),s({global:!0,wrap:!0,forced:!A,sham:!A},{Symbol:rt}),W(P(dr),function(te){Be(te)}),s({target:ge,stat:!0,forced:!A},{for:function(te){var re=z(te);if(_(mt,re))return mt[re];var Ae=rt(re);return mt[re]=Ae,Wt[Ae]=re,Ae},keyFor:function(re){if(!se(re))throw ut(re+" is not a symbol");if(_(Wt,re))return Wt[re]},useSetter:function(){Zt=!0},useSimple:function(){Zt=!1}}),s({target:"Object",stat:!0,forced:!A,sham:!T},{create:Ce,defineProperty:Pt,defineProperties:nr,getOwnPropertyDescriptor:nt}),s({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:Ze,getOwnPropertySymbols:lt}),s({target:"Object",stat:!0,forced:I(function(){V.f(1)})},{getOwnPropertySymbols:function(re){return V.f(q(re))}}),Fe){var k=!A||I(function(){var te=rt();return Fe([te])!="[null]"||Fe({a:te})!="{}"||Fe(Object(te))!="{}"});s({target:"JSON",stat:!0,forced:k},{stringify:function(re,Ae,De){var Xe=ce(arguments),vt=Ae;if(!(!U(Ae)&&re===void 0||se(re)))return L(Ae)||(Ae=function(Jt,Qt){if(H(vt)&&(Qt=E(vt,this,Jt,Qt)),!se(Qt))return Qt}),Xe[1]=Ae,b(Fe,null,Xe)}})}if(!be[ye]){var Z=be.valueOf;he(be,ye,function(te){return E(Z,this)})}_e(rt,ge),je[ee]=!0},function(u,c,i){var s=i(146).charAt,f=i(40),y=i(56),b=i(111),E="String Iterator",S=y.set,M=y.getterFor(E);b(String,"String",function(T){S(this,{type:E,string:f(T),index:0})},function(){var A=M(this),I=A.string,_=A.index,L;return _>=I.length?{value:void 0,done:!0}:(L=s(I,_),A.index+=L.length,{value:L,done:!1})})},function(u,c,i){(function(s){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 s=="object"&&s)||function(){return this}()||Function("return this")()}).call(this,i(82))},function(u,c,i){var s=i(16),f=i(36),y=i(7),b=i(15),E=i(34),S=i(28),M=i(58),T=i(40),A=i(37).f,I=i(134),_=y.Symbol,L=_&&_.prototype;if(f&&S(_)&&(!("description"in L)||_().description!==void 0)){var H={},U=function(){var j=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),N=M(L,this)?new _(j):j===void 0?_():_(j);return j===""&&(H[N]=!0),N};I(U,_),U.prototype=L,L.constructor=U;var X=String(_("test"))=="Symbol(test)",se=b(L.toString),ae=b(L.valueOf),q=/^Symbol\((.*)\)[^)]+$/,J=b("".replace),ie=b("".slice);A(L,"description",{configurable:!0,get:function(){var j=ae(this),N=se(j);if(E(H,j))return"";var P=X?ie(N,7,-1):J(N,q,"$1");return P===""?void 0:P}}),s({global:!0,forced:!0},{Symbol:U})}},function(u,c,i){var s=i(150);s("iterator")},function(u,c,i){i.d(c,"a",function(){return s.a}),i.d(c,"c",function(){return s.e}),i.d(c,"h",function(){return ie}),i.d(c,"i",function(){return X}),i.d(c,"j",function(){return H}),i.d(c,"b",function(){return he}),i.d(c,"e",function(){return ze}),i.d(c,"f",function(){return ve}),i.d(c,"g",function(){return Ye});var s=i(1),f,y,b,E=0,S=[],M=s.i.__b,T=s.i.__r,A=s.i.diffed,I=s.i.__c,_=s.i.unmount;function L(k,Z){s.i.__h&&s.i.__h(y,k,E||Z),E=0;var te=y.__H||(y.__H={__:[],__h:[]});return k>=te.__.length&&te.__.push({}),te.__[k]}function H(k){return E=1,U(Oe,k)}function U(k,Z,te){var re=L(f++,2);return re.t=k,re.__c||(re.__=[te?te(Z):Oe(void 0,Z),function(Ae){var De=re.t(re.__[0],Ae);re.__[0]!==De&&(re.__=[De,re.__[1]],re.__c.setState({}))}],re.__c=y),re.__}function X(k,Z){var te=L(f++,3);!s.i.__s&&ue(te.__H,Z)&&(te.__=k,te.__H=Z,y.__H.__h.push(te))}function se(k,Z){var te=L(f++,4);!s.i.__s&&ue(te.__H,Z)&&(te.__=k,te.__H=Z,y.__h.push(te))}function ae(k){return E=5,J(function(){return{current:k}},[])}function q(k,Z,te){E=6,se(function(){typeof k=="function"?k(Z()):k&&(k.current=Z())},te==null?te:te.concat(k))}function J(k,Z){var te=L(f++,7);return ue(te.__H,Z)&&(te.__=k(),te.__H=Z,te.__h=k),te.__}function ie(k,Z){return E=8,J(function(){return k},Z)}function z(k){var Z=y.context[k.__c],te=L(f++,9);return te.c=k,Z?(te.__==null&&(te.__=!0,Z.sub(y)),Z.props.value):k.__}function j(k,Z){s.i.useDebugValue&&s.i.useDebugValue(Z?Z(k):k)}function N(){var k;for(S.sort(function(Z,te){return Z.__v.__b-te.__v.__b});k=S.pop();)if(k.__P)try{k.__H.__h.forEach(Y),k.__H.__h.forEach(V),k.__H.__h=[]}catch(Z){k.__H.__h=[],s.i.__e(Z,k.__v)}}s.i.__b=function(k){y=null,M&&M(k)},s.i.__r=function(k){T&&T(k),f=0;var Z=(y=k.__c).__H;Z&&(Z.__h.forEach(Y),Z.__h.forEach(V),Z.__h=[])},s.i.diffed=function(k){A&&A(k);var Z=k.__c;Z&&Z.__H&&Z.__H.__h.length&&(S.push(Z)!==1&&b===s.i.requestAnimationFrame||((b=s.i.requestAnimationFrame)||D)(N)),y=null},s.i.__c=function(k,Z){Z.some(function(te){try{te.__h.forEach(Y),te.__h=te.__h.filter(function(re){return!re.__||V(re)})}catch(re){Z.some(function(Ae){Ae.__h&&(Ae.__h=[])}),Z=[],s.i.__e(re,te.__v)}}),I&&I(k,Z)},s.i.unmount=function(k){_&&_(k);var Z,te=k.__c;te&&te.__H&&(te.__H.__.forEach(function(re){try{Y(re)}catch(Ae){Z=Ae}}),Z&&s.i.__e(Z,te.__v))};var P=typeof requestAnimationFrame=="function";function D(k){var Z,te=function(){clearTimeout(re),P&&cancelAnimationFrame(Z),setTimeout(k)},re=setTimeout(te,100);P&&(Z=requestAnimationFrame(te))}function Y(k){var Z=y,te=k.__c;typeof te=="function"&&(k.__c=void 0,te()),y=Z}function V(k){var Z=y;k.__c=k.__(),y=Z}function ue(k,Z){return!k||k.length!==Z.length||Z.some(function(te,re){return te!==k[re]})}function Oe(k,Z){return typeof Z=="function"?Z(k):Z}function me(k,Z){for(var te in Z)k[te]=Z[te];return k}function ce(k,Z){for(var te in k)if(te!=="__source"&&!(te in Z))return!0;for(var re in Z)if(re!=="__source"&&k[re]!==Z[re])return!0;return!1}function he(k){this.props=k}function ve(k,Z){function te(Ae){var De=this.props.ref,Xe=De==Ae.ref;return!Xe&&De&&(De.call?De(null):De.current=null),Z?!Z(this.props,Ae)||!Xe:ce(this.props,Ae)}function re(Ae){return this.shouldComponentUpdate=te,Object(s.e)(k,Ae)}return re.displayName="Memo("+(k.displayName||k.name)+")",re.prototype.isReactComponent=!0,re.__f=!0,re}(he.prototype=new s.a).isPureReactComponent=!0,he.prototype.shouldComponentUpdate=function(k,Z){return ce(this.props,k)||ce(this.state,Z)};var Ee=s.i.__b;s.i.__b=function(k){k.type&&k.type.__f&&k.ref&&(k.props.ref=k.ref,k.ref=null),Ee&&Ee(k)};var je=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ze(k){function Z(te,re){var Ae=me({},te);return delete Ae.ref,k(Ae,!(re=te.ref||re)||typeof re=="object"&&!("current"in re)?null:re)}return Z.$$typeof=je,Z.render=Z,Z.prototype.isReactComponent=Z.__f=!0,Z.displayName="ForwardRef("+(k.displayName||k.name)+")",Z}var Re=function(k,Z){return k==null?null:Object(s.k)(Object(s.k)(k).map(Z))},xe={map:Re,forEach:Re,count:function(k){return k?Object(s.k)(k).length:0},only:function(k){var Z=Object(s.k)(k);if(Z.length!==1)throw"Children.only";return Z[0]},toArray:s.k},Be=s.i.__e;s.i.__e=function(k,Z,te){if(k.then){for(var re,Ae=Z;Ae=Ae.__;)if((re=Ae.__c)&&re.__c)return Z.__e==null&&(Z.__e=te.__e,Z.__k=te.__k),re.__c(k,Z)}Be(k,Z,te)};var _e=s.i.unmount;function G(k,Z,te){return k&&(k.__c&&k.__c.__H&&(k.__c.__H.__.forEach(function(re){typeof re.__c=="function"&&re.__c()}),k.__c.__H=null),(k=me({},k)).__c!=null&&(k.__c.__P===te&&(k.__c.__P=Z),k.__c=null),k.__k=k.__k&&k.__k.map(function(re){return G(re,Z,te)})),k}function W(k,Z,te){return k&&(k.__v=null,k.__k=k.__k&&k.__k.map(function(re){return W(re,Z,te)}),k.__c&&k.__c.__P===Z&&(k.__e&&te.insertBefore(k.__e,k.__d),k.__c.__e=!0,k.__c.__P=te)),k}function ee(){this.__u=0,this.t=null,this.__b=null}function ge(k){var Z=k.__.__c;return Z&&Z.__e&&Z.__e(k)}function Me(k){var Z,te,re;function Ae(De){if(Z||(Z=k()).then(function(Xe){te=Xe.default||Xe},function(Xe){re=Xe}),re)throw re;if(!te)throw Z;return Object(s.e)(te,De)}return Ae.displayName="Lazy",Ae.__f=!0,Ae}function ye(){this.u=null,this.o=null}s.i.unmount=function(k){var Z=k.__c;Z&&Z.__R&&Z.__R(),Z&&k.__h===!0&&(k.type=null),_e&&_e(k)},(ee.prototype=new s.a).__c=function(k,Z){var te=Z.__c,re=this;re.t==null&&(re.t=[]),re.t.push(te);var Ae=ge(re.__v),De=!1,Xe=function(){De||(De=!0,te.__R=null,Ae?Ae(vt):vt())};te.__R=Xe;var vt=function(){if(!--re.__u){if(re.state.__e){var Qt=re.state.__e;re.__v.__k[0]=W(Qt,Qt.__c.__P,Qt.__c.__O)}var kn;for(re.setState({__e:re.__b=null});kn=re.t.pop();)kn.forceUpdate()}},Jt=Z.__h===!0;re.__u++||Jt||re.setState({__e:re.__b=re.__v.__k[0]}),k.then(Xe,Xe)},ee.prototype.componentWillUnmount=function(){this.t=[]},ee.prototype.render=function(k,Z){if(this.__b){if(this.__v.__k){var te=document.createElement("div"),re=this.__v.__k[0].__c;this.__v.__k[0]=G(this.__b,te,re.__O=re.__P)}this.__b=null}var Ae=Z.__e&&Object(s.e)(s.b,null,k.fallback);return Ae&&(Ae.__h=null),[Object(s.e)(s.b,null,Z.__e?null:k.children),Ae]};var He=function(k,Z,te){if(++te[1]===te[0]&&k.o.delete(Z),k.props.revealOrder&&(k.props.revealOrder[0]!=="t"||!k.o.size))for(te=k.u;te;){for(;te.length>3;)te.pop()();if(te[1]>>1,1),Z.i.removeChild(re)}}),Object(s.j)(Object(s.e)(et,{context:Z.context},k.__v),Z.l)):Z.l&&Z.componentWillUnmount()}function rt(k,Z){return Object(s.e)(We,{__v:k,i:Z})}(ye.prototype=new s.a).__e=function(k){var Z=this,te=ge(Z.__v),re=Z.o.get(k);return re[0]++,function(Ae){var De=function(){Z.props.revealOrder?(re.push(Ae),He(Z,k,re)):Ae()};te?te(De):De()}},ye.prototype.render=function(k){this.u=null,this.o=new Map;var Z=Object(s.k)(k.children);k.revealOrder&&k.revealOrder[0]==="b"&&Z.reverse();for(var te=Z.length;te--;)this.o.set(Z[te],this.u=[1,0,this.u]);return k.children},ye.prototype.componentDidUpdate=ye.prototype.componentDidMount=function(){var k=this;this.o.forEach(function(Z,te){He(k,te,Z)})};var be=typeof Symbol!="undefined"&&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]/,tt=typeof document!="undefined",Fe=function(k){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(k)};function Qe(k,Z,te){return Z.__k==null&&(Z.textContent=""),Object(s.j)(k,Z),typeof te=="function"&&te(),k?k.__c:null}function At(k,Z,te){return Object(s.h)(k,Z),typeof te=="function"&&te(),k?k.__c:null}s.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(k){Object.defineProperty(s.a.prototype,k,{configurable:!0,get:function(){return this["UNSAFE_"+k]},set:function(Z){Object.defineProperty(this,k,{configurable:!0,writable:!0,value:Z})}})});var ct=s.i.event;function bt(){}function ne(){return this.cancelBubble}function Ct(){return this.defaultPrevented}s.i.event=function(k){return ct&&(k=ct(k)),k.persist=bt,k.isPropagationStopped=ne,k.isDefaultPrevented=Ct,k.nativeEvent=k};var St,mt={configurable:!0,get:function(){return this.class}},Wt=s.i.vnode;s.i.vnode=function(k){var Z=k.type,te=k.props,re=te;if(typeof Z=="string"){var Ae=Z.indexOf("-")===-1;for(var De in re={},te){var Xe=te[De];tt&&De==="children"&&Z==="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+Z)&&!Fe(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():Ae&&ut.test(De)?De=De.replace(/[A-Z0-9]/,"-$&").toLowerCase():Xe===null&&(Xe=void 0),re[De]=Xe)}Z=="select"&&re.multiple&&Array.isArray(re.value)&&(re.value=Object(s.k)(te.children).forEach(function(vt){vt.props.selected=re.value.indexOf(vt.props.value)!=-1})),Z=="select"&&re.defaultValue!=null&&(re.value=Object(s.k)(te.children).forEach(function(vt){vt.props.selected=re.multiple?re.defaultValue.indexOf(vt.props.value)!=-1:re.defaultValue==vt.props.value})),k.props=re,te.class!=te.className&&(mt.enumerable="className"in te,te.className!=null&&(re.class=te.className),Object.defineProperty(re,"className",mt))}k.$$typeof=be,Wt&&Wt(k)};var dr=s.i.__r;s.i.__r=function(k){dr&&dr(k),St=k.__c};var Zt={ReactCurrentDispatcher:{current:{readContext:function(k){return St.__n[k.__c].props.value}}}};function Er(k){return s.e.bind(null,k)}function qe(k){return!!k&&k.$$typeof===be}function Pt(k){return qe(k)?s.c.apply(null,arguments):k}function nr(k){return!!k.__k&&(Object(s.j)(null,k),!0)}function Ce(k){return k&&(k.base||k.nodeType===1&&k)||null}var Ye=function(k,Z){return k(Z)},nt=function(k,Z){return k(Z)},Ze=s.b,lt={useState:H,useReducer:U,useEffect:X,useLayoutEffect:se,useRef:ae,useImperativeHandle:q,useMemo:J,useCallback:ie,useContext:z,useDebugValue:j,version:"17.0.2",Children:xe,render:Qe,hydrate:At,unmountComponentAtNode:nr,createPortal:rt,createElement:s.e,createContext:s.d,createFactory:Er,cloneElement:Pt,createRef:s.f,Fragment:s.b,isValidElement:qe,findDOMNode:Ce,Component:s.a,PureComponent:he,memo:ve,forwardRef:ze,flushSync:nt,unstable_batchedUpdates:Ye,StrictMode:Ze,Suspense:ee,SuspenseList:ye,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Zt};c.d=lt},function(u,c,i){var s=i(7),f=i(147),y=i(148),b=i(179),E=i(57),S=function(T){if(T&&T.forEach!==b)try{E(T,"forEach",b)}catch{T.forEach=b}};for(var M in f)f[M]&&S(s[M]&&s[M].prototype);S(y)},function(u,c,i){var s=i(16),f=i(97);s({target:"Object",stat:!0},{setPrototypeOf:f})},function(u,c,i){var s=i(16),f=i(18),y=i(38),b=i(96),E=i(137),S=f(function(){b(1)});s({target:"Object",stat:!0,forced:S,sham:!E},{getPrototypeOf:function(T){return b(y(T))}})},function(u,c,i){var s=i(16),f=i(46),y=i(76),b=i(198),E=i(157),S=i(32),M=i(33),T=i(54),A=i(18),I=f("Reflect","construct"),_=Object.prototype,L=[].push,H=A(function(){function se(){}return!(I(function(){},[],se)instanceof se)}),U=!A(function(){I(function(){})}),X=H||U;s({target:"Reflect",stat:!0,forced:X,sham:X},{construct:function(ae,q){E(ae),S(q);var J=arguments.length<3?ae:E(arguments[2]);if(U&&!H)return I(ae,q,J);if(ae==J){switch(q.length){case 0:return new ae;case 1:return new ae(q[0]);case 2:return new ae(q[0],q[1]);case 3:return new ae(q[0],q[1],q[2]);case 4:return new ae(q[0],q[1],q[2],q[3])}var ie=[null];return y(L,ie,q),new(y(b,ae,ie))}var z=J.prototype,j=T(M(z)?z:_),N=y(ae,j,q);return M(N)?N:j}})},function(u,c){var i=Function.prototype,s=i.bind,f=i.call,y=s&&s.bind(f);u.exports=s?function(b){return b&&y(f,b)}:function(b){return b&&function(){return f.apply(b,arguments)}}},function(u,c,i){var s=i(7),f=i(51).f,y=i(57),b=i(44),E=i(108),S=i(134),M=i(95);u.exports=function(T,A){var I=T.target,_=T.global,L=T.stat,H,U,X,se,ae,q;if(_?U=s:L?U=s[I]||E(I,{}):U=(s[I]||{}).prototype,U)for(X in A){if(ae=A[X],T.noTargetGet?(q=f(U,X),se=q&&q.value):se=U[X],H=M(_?X:I+(L?".":"#")+X,T.forced),!H&&se!==void 0){if(typeof ae==typeof se)continue;S(ae,se)}(T.sham||se&&se.sham)&&y(ae,"sham",!0),b(U,X,ae,T)}}},function(u,c,i){var s=i(16),f=i(7),y=i(99),b=i(100),E=i(33),S=i(67),M=i(43),T=i(39),A=i(61),I=i(27),_=i(75),L=i(101),H=_("slice"),U=I("species"),X=f.Array,se=Math.max;s({target:"Array",proto:!0,forced:!H},{slice:function(q,J){var ie=T(this),z=M(ie),j=S(q,z),N=S(J===void 0?z:J,z),P,D,Y;if(y(ie)&&(P=ie.constructor,b(P)&&(P===X||y(P.prototype))?P=void 0:E(P)&&(P=P[U],P===null&&(P=void 0)),P===X||P===void 0))return L(ie,j,N);for(D=new(P===void 0?X:P)(se(N-j,0)),Y=0;j1?arguments[1]:void 0)}})},function(u,c,i){var s=i(16),f=i(36),y=i(135),b=i(39),E=i(51),S=i(61);s({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(T){for(var A=b(T),I=E.f,_=y(A),L={},H=0,U,X;_.length>H;)X=I(A,U=_[H++]),X!==void 0&&S(L,U,X);return L}})},function(u,c,i){var s=i(36),f=i(94).EXISTS,y=i(15),b=i(37).f,E=Function.prototype,S=y(E.toString),M=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=y(M.exec),A="name";s&&!f&&b(E,A,{configurable:!0,get:function(){try{return T(M,S(this))[1]}catch{return""}}})},function(u,c,i){var s=i(16),f=i(182),y=i(118),b=!y(function(E){Array.from(E)});s({target:"Array",stat:!0,forced:b},{from:f})},,function(u,c,i){var s=i(7),f=i(84),y=i(34),b=i(85),E=i(109),S=i(128),M=f("wks"),T=s.Symbol,A=T&&T.for,I=S?T:T&&T.withoutSetter||b;u.exports=function(_){if(!y(M,_)||!(E||typeof M[_]=="string")){var L="Symbol."+_;E&&y(T,_)?M[_]=T[_]:S&&A?M[_]=A(L):M[_]=I(L)}return M[_]}},function(u,c){u.exports=function(i){return typeof i=="function"}},function(u,c,i){var s=i(16),f=i(7),y=i(18),b=i(99),E=i(33),S=i(38),M=i(43),T=i(61),A=i(119),I=i(75),_=i(27),L=i(65),H=_("isConcatSpreadable"),U=9007199254740991,X="Maximum allowed index exceeded",se=f.TypeError,ae=L>=51||!y(function(){var z=[];return z[H]=!1,z.concat()[0]!==z}),q=I("concat"),J=function(z){if(!E(z))return!1;var j=z[H];return j!==void 0?!!j:b(z)},ie=!ae||!q;s({target:"Array",proto:!0,forced:ie},{concat:function(j){var N=S(this),P=A(N,0),D=0,Y,V,ue,Oe,me;for(Y=-1,ue=arguments.length;YU)throw se(X);for(V=0;V=U)throw se(X);T(P,D++,me)}return P.length=D,P}})},function(u,c,i){var s=i(105),f=typeof self=="object"&&self&&self.Object===Object&&self,y=s.a||f||Function("return this")();c.a=y},function(u,c,i){var s=i(16),f=i(200);s({target:"Object",stat:!0,forced:Object.assign!==f},{assign:f})},function(u,c,i){var s=i(7),f=i(33),y=s.String,b=s.TypeError;u.exports=function(E){if(f(E))return E;throw b(y(E)+" is not an object")}},function(u,c,i){var s=i(28);u.exports=function(f){return typeof f=="object"?f!==null:s(f)}},function(u,c,i){var s=i(15),f=i(38),y=s({}.hasOwnProperty);u.exports=Object.hasOwn||function(E,S){return y(f(E),S)}},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 s=i(18);u.exports=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(u,c,i){var s=i(7),f=i(36),y=i(129),b=i(32),E=i(87),S=s.TypeError,M=Object.defineProperty;c.f=f?M:function(A,I,_){if(b(A),I=E(I),b(_),y)try{return M(A,I,_)}catch{}if("get"in _||"set"in _)throw S("Accessors not supported");return"value"in _&&(A[I]=_.value),A}},function(u,c,i){var s=i(7),f=i(45),y=s.Object;u.exports=function(b){return y(f(b))}},function(u,c,i){var s=i(81),f=i(45);u.exports=function(y){return s(f(y))}},function(u,c,i){var s=i(7),f=i(98),y=s.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 s=i(16),f=i(74).map,y=i(75),b=y("map");s({target:"Array",proto:!0,forced:!b},{map:function(S){return f(this,S,arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){(function(s){i.d(c,"d",function(){return b}),i.d(c,"c",function(){return E}),i.d(c,"b",function(){return S}),i.d(c,"a",function(){return T});var f=i(10),y=function(A,I){var _=typeof Symbol=="function"&&A[Symbol.iterator];if(!_)return A;var L=_.call(A),H,U=[],X;try{for(;(I===void 0||I-- >0)&&!(H=L.next()).done;)U.push(H.value)}catch(se){X={error:se}}finally{try{H&&!H.done&&(_=L.return)&&_.call(L)}finally{if(X)throw X.error}}return U};function b(){var A=y(Object(f.j)(0),2),I=A[1],_=Object(f.h)(function(){I(function(L){return L+1})},[]);return _}function E(A){if(!A||typeof A!="object")return!1;var I=Object.getPrototypeOf(A);return!I||I===Object.prototype}function S(A){return typeof Symbol=="function"?Symbol.for(A):"__$mobx-react "+A+"__"}var M={};function T(){return typeof window!="undefined"?window:typeof s!="undefined"?s:typeof self!="undefined"?self:M}}).call(this,i(82))},function(u,c,i){var s=i(90);u.exports=function(f){return s(f.length)}},function(u,c,i){var s=i(7),f=i(28),y=i(34),b=i(57),E=i(108),S=i(92),M=i(56),T=i(94).CONFIGURABLE,A=M.get,I=M.enforce,_=String(String).split("String");(u.exports=function(L,H,U,X){var se=X?!!X.unsafe:!1,ae=X?!!X.enumerable:!1,q=X?!!X.noTargetGet:!1,J=X&&X.name!==void 0?X.name:H,ie;if(f(U)&&(String(J).slice(0,7)==="Symbol("&&(J="["+String(J).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!y(U,"name")||T&&U.name!==J)&&b(U,"name",J),ie=I(U),ie.source||(ie.source=_.join(typeof J=="string"?J:""))),L===s){ae?L[H]=U:E(H,U);return}else se?!q&&L[H]&&(ae=!0):delete L[H];ae?L[H]=U:b(L,H,U)})(Function.prototype,"toString",function(){return f(this)&&A(this).source||S(this)})},function(u,c,i){var s=i(7),f=s.TypeError;u.exports=function(y){if(y==null)throw f("Can't call method on "+y);return y}},function(u,c,i){var s=i(7),f=i(28),y=function(b){return f(b)?b:void 0};u.exports=function(b,E){return arguments.length<2?y(s[b]):s[b]&&s[b][E]}},function(u,c,i){var s=i(16),f=i(35),y=i(33),b=i(32),E=i(199),S=i(51),M=i(96);function T(A,I){var _=arguments.length<3?A:arguments[2],L,H;if(b(A)===_)return A[I];if(L=S.f(A,I),L)return E(L)?L.value:L.get===void 0?void 0:f(L.get,_);if(y(H=M(A)))return T(H,I,_)}s({target:"Reflect",stat:!0},{get:T})},function(u,c,i){(function(s){var f=i(30),y=i(165),b=v&&!v.nodeType&&v,E=b&&typeof s=="object"&&s&&!s.nodeType&&s,S=E&&E.exports===b,M=S?f.a.Buffer:void 0,T=M?M.isBuffer:void 0,A=T||y.a;c.a=A}).call(this,i(121)(u))},function(u,c,i){(function(s){var f=i(105),y=v&&!v.nodeType&&v,b=y&&typeof s=="object"&&s&&!s.nodeType&&s,E=b&&b.exports===y,S=E&&f.a.process,M=function(){try{var T=b&&b.require&&b.require("util").types;return T||S&&S.binding&&S.binding("util")}catch{}}();c.a=M}).call(this,i(121)(u))},function(u,c,i){var s=i(15),f=s({}.toString),y=s("".slice);u.exports=function(b){return y(f(b),8,-1)}},function(u,c,i){var s=i(36),f=i(35),y=i(93),b=i(71),E=i(39),S=i(87),M=i(34),T=i(129),A=Object.getOwnPropertyDescriptor;c.f=s?A:function(_,L){if(_=E(_),L=S(L),T)try{return A(_,L)}catch{}if(M(_,L))return b(!f(y.f,_,L),_[L])}},function(u,c,i){var s=i(16),f=i(213).entries;s({target:"Object",stat:!0},{entries:function(b){return f(b)}})},function(u,c,i){var s=i(46);u.exports=s("navigator","userAgent")||""},function(u,c,i){var s=i(32),f=i(168),y=i(110),b=i(69),E=i(133),S=i(86),M=i(91),T=">",A="<",I="prototype",_="script",L=M("IE_PROTO"),H=function(){},U=function(J){return A+_+T+J+A+"/"+_+T},X=function(J){J.write(U("")),J.close();var ie=J.parentWindow.Object;return J=null,ie},se=function(){var J=S("iframe"),ie="java"+_+":",z;return J.style.display="none",E.appendChild(J),J.src=String(ie),z=J.contentWindow.document,z.open(),z.write(U("document.F=Object")),z.close(),z.F},ae,q=function(){try{ae=new ActiveXObject("htmlfile")}catch{}q=typeof document!="undefined"?document.domain&&ae?X(ae):se():X(ae);for(var J=y.length;J--;)delete q[I][y[J]];return q()};b[L]=!0,u.exports=Object.create||function(ie,z){var j;return ie!==null?(H[I]=s(ie),j=new H,H[I]=null,j[L]=ie):j=q(),z===void 0?j:f(j,z)}},function(u,c,i){var s=i(7),f=i(28),y=i(89),b=s.TypeError;u.exports=function(E){if(f(E))return E;throw b(y(E)+" is not a function")}},function(u,c,i){var s=i(170),f=i(7),y=i(15),b=i(33),E=i(57),S=i(34),M=i(107),T=i(91),A=i(69),I="Object already initialized",_=f.TypeError,L=f.WeakMap,H,U,X,se=function(N){return X(N)?U(N):H(N,{})},ae=function(N){return function(P){var D;if(!b(P)||(D=U(P)).type!==N)throw _("Incompatible receiver, "+N+" required");return D}};if(s||M.state){var q=M.state||(M.state=new L),J=y(q.get),ie=y(q.has),z=y(q.set);H=function(N,P){if(ie(q,N))throw new _(I);return P.facade=N,z(q,N,P),P},U=function(N){return J(q,N)||{}},X=function(N){return ie(q,N)}}else{var j=T("state");A[j]=!0,H=function(N,P){if(S(N,j))throw new _(I);return P.facade=N,E(N,j,P),P},U=function(N){return S(N,j)?N[j]:{}},X=function(N){return S(N,j)}}u.exports={set:H,get:U,has:X,enforce:se,getterFor:ae}},function(u,c,i){var s=i(36),f=i(37),y=i(71);u.exports=s?function(b,E,S){return f.f(b,E,y(1,S))}:function(b,E,S){return b[E]=S,b}},function(u,c,i){var s=i(15);u.exports=s({}.isPrototypeOf)},function(u,c,i){var s=i(55);u.exports=function(f,y){var b=f[y];return b==null?void 0:s(b)}},function(u,c,i){var s=i(173),f=i(177);s("Map",function(y){return function(){return y(this,arguments.length?arguments[0]:void 0)}},f)},function(u,c,i){var s=i(87),f=i(37),y=i(71);u.exports=function(b,E,S){var M=s(E);M in b?f.f(b,M,y(0,S)):b[M]=S}},function(u,c,i){var s=i(15),f=i(55),y=s(s.bind);u.exports=function(b,E){return f(b),E===void 0?b:y?y(b,E):function(){return b.apply(E,arguments)}}},function(u,c,i){var s=i(16),f=i(214),y=i(83);s({target:"Array",proto:!0},{fill:f}),y("fill")},function(u,c){u.exports=!1},function(u,c,i){var s=i(7),f=i(53),y=s.process,b=s.Deno,E=y&&y.versions||b&&b.version,S=E&&E.v8,M,T;S&&(M=S.split("."),T=M[0]>0&&M[0]<4?1:+(M[0]+M[1])),!T&&f&&(M=f.match(/Edge\/(\d+)/),(!M||M[1]>=74)&&(M=f.match(/Chrome\/(\d+)/),M&&(T=+M[1]))),u.exports=T},function(u,c,i){var s=i(131),f=i(110);u.exports=Object.keys||function(b){return s(b,f)}},function(u,c,i){var s=i(68),f=Math.max,y=Math.min;u.exports=function(b,E){var S=s(b);return S<0?f(S+E,0):y(S,E)}},function(u,c){var i=Math.ceil,s=Math.floor;u.exports=function(f){var y=+f;return y!==y||y===0?0:(y>0?s:i)(y)}},function(u,c){u.exports={}},function(u,c){u.exports={}},function(u,c){u.exports=function(i,s){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:s}}},function(u,c,i){var s=i(131),f=i(110),y=f.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(E){return s(E,y)}},function(u,c,i){var s=i(37).f,f=i(34),y=i(27),b=y("toStringTag");u.exports=function(E,S,M){E&&!f(E=M?E:E.prototype,b)&&s(E,b,{configurable:!0,value:S})}},function(u,c,i){var s=i(62),f=i(15),y=i(81),b=i(38),E=i(43),S=i(119),M=f([].push),T=function(A){var I=A==1,_=A==2,L=A==3,H=A==4,U=A==6,X=A==7,se=A==5||U;return function(ae,q,J,ie){for(var z=b(ae),j=y(z),N=s(q,J),P=E(j),D=0,Y=ie||S,V=I?Y(ae,P):_||X?Y(ae,0):void 0,ue,Oe;P>D;D++)if((se||D in j)&&(ue=j[D],Oe=N(ue,D,z),A))if(I)V[D]=Oe;else if(Oe)switch(A){case 3:return!0;case 5:return ue;case 6:return D;case 2:M(V,ue)}else switch(A){case 4:return!1;case 7:M(V,ue)}return U?-1:L||H?H:V}};u.exports={forEach:T(0),map:T(1),filter:T(2),some:T(3),every:T(4),find:T(5),findIndex:T(6),filterReject:T(7)}},function(u,c,i){var s=i(18),f=i(27),y=i(65),b=f("species");u.exports=function(E){return y>=51||!s(function(){var S=[],M=S.constructor={};return M[b]=function(){return{foo:1}},S[E](Boolean).foo!==1})}},function(u,c){var i=Function.prototype,s=i.apply,f=i.bind,y=i.call;u.exports=typeof Reflect=="object"&&Reflect.apply||(f?y.bind(s):function(){return y.apply(s,arguments)})},function(u,c,i){var s=i(16),f=i(15),y=i(81),b=i(39),E=i(120),S=f([].join),M=y!=Object,T=E("join",",");s({target:"Array",proto:!0,forced:M||!T},{join:function(I){return S(b(this),I===void 0?",":I)}})},function(u,c,i){var s=i(76),f=i(35),y=i(15),b=i(122),E=i(154),S=i(32),M=i(45),T=i(156),A=i(123),I=i(90),_=i(40),L=i(59),H=i(113),U=i(124),X=i(102),se=i(151),ae=i(18),q=se.UNSUPPORTED_Y,J=4294967295,ie=Math.min,z=[].push,j=y(/./.exec),N=y(z),P=y("".slice),D=!ae(function(){var Y=/(?:)/,V=Y.exec;Y.exec=function(){return V.apply(this,arguments)};var ue="ab".split(Y);return ue.length!==2||ue[0]!=="a"||ue[1]!=="b"});b("split",function(Y,V,ue){var Oe;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?Oe=function(me,ce){var he=_(M(this)),ve=ce===void 0?J:ce>>>0;if(ve===0)return[];if(me===void 0)return[he];if(!E(me))return f(V,he,me,ve);for(var Ee=[],je=(me.ignoreCase?"i":"")+(me.multiline?"m":"")+(me.unicode?"u":"")+(me.sticky?"y":""),ze=0,Re=new RegExp(me.source,je+"g"),xe,Be,_e;(xe=f(X,Re,he))&&(Be=Re.lastIndex,!(Be>ze&&(N(Ee,P(he,ze,xe.index)),xe.length>1&&xe.index=ve)));)Re.lastIndex===xe.index&&Re.lastIndex++;return ze===he.length?(_e||!j(Re,""))&&N(Ee,""):N(Ee,P(he,ze)),Ee.length>ve?H(Ee,0,ve):Ee}:"0".split(void 0,0).length?Oe=function(me,ce){return me===void 0&&ce===0?[]:f(V,this,me,ce)}:Oe=V,[function(ce,he){var ve=M(this),Ee=ce==null?void 0:L(ce,Y);return Ee?f(Ee,ce,ve,he):f(Oe,_(ve),ce,he)},function(me,ce){var he=S(this),ve=_(me),Ee=ue(Oe,he,ve,ce,Oe!==V);if(Ee.done)return Ee.value;var je=T(he,RegExp),ze=he.unicode,Re=(he.ignoreCase?"i":"")+(he.multiline?"m":"")+(he.unicode?"u":"")+(q?"g":"y"),xe=new je(q?"^(?:"+he.source+")":he,Re),Be=ce===void 0?J:ce>>>0;if(Be===0)return[];if(ve.length===0)return U(xe,ve)===null?[ve]:[];for(var _e=0,G=0,W=[];G2){if(me=se(me),ce=j(me,0),ce===43||ce===45){if(he=j(me,2),he===88||he===120)return NaN}else if(ce===48){switch(j(me,1)){case 66:case 98:ve=2,Ee=49;break;case 79:case 111:ve=8,Ee=55;break;default:return+me}for(je=z(me,2),ze=je.length,Re=0;ReEe)return NaN;return parseInt(je,ve)}}return+me};if(b(ae,!q(" 0o1")||!q("0b1")||q("+0x1"))){for(var D=function(me){var ce=arguments.length<1?0:q(N(me)),he=this;return T(J,he)&&_(function(){X(he)})?M(Object(ce),he,D):ce},Y=s?L(q):"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(","),V=0,ue;Y.length>V;V++)S(q,ue=Y[V])&&!S(D,ue)&&U(D,ue,H(q,ue));D.prototype=J,J.constructor=D,E(f,ae,D)}},function(u,c,i){var s=i(16);s({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(u,c,i){var s=i(7),f=i(15),y=i(18),b=i(50),E=s.Object,S=f("".split);u.exports=y(function(){return!E("z").propertyIsEnumerable(0)})?function(M){return b(M)=="String"?S(M,""):E(M)}:E},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 s=i(27),f=i(54),y=i(37),b=s("unscopables"),E=Array.prototype;E[b]==null&&y.f(E,b,{configurable:!0,value:f(null)}),u.exports=function(S){E[b][S]=!0}},function(u,c,i){var s=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:s?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},function(u,c,i){var s=i(15),f=0,y=Math.random(),b=s(1 .toString);u.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+b(++f+y,36)}},function(u,c,i){var s=i(7),f=i(33),y=s.document,b=f(y)&&f(y.createElement);u.exports=function(E){return b?y.createElement(E):{}}},function(u,c,i){var s=i(130),f=i(88);u.exports=function(y){var b=s(y,"string");return f(b)?b:b+""}},function(u,c,i){var s=i(7),f=i(46),y=i(28),b=i(58),E=i(128),S=s.Object;u.exports=E?function(M){return typeof M=="symbol"}:function(M){var T=f("Symbol");return y(T)&&b(T.prototype,S(M))}},function(u,c,i){var s=i(7),f=s.String;u.exports=function(y){try{return f(y)}catch{return"Object"}}},function(u,c,i){var s=i(68),f=Math.min;u.exports=function(y){return y>0?f(s(y),9007199254740991):0}},function(u,c,i){var s=i(84),f=i(85),y=s("keys");u.exports=function(b){return y[b]||(y[b]=f(b))}},function(u,c,i){var s=i(15),f=i(28),y=i(107),b=s(Function.toString);f(y.inspectSource)||(y.inspectSource=function(E){return b(E)}),u.exports=y.inspectSource},function(u,c,i){var s={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,y=f&&!s.call({1:2},1);c.f=y?function(E){var S=f(this,E);return!!S&&S.enumerable}:s},function(u,c,i){var s=i(36),f=i(34),y=Function.prototype,b=s&&Object.getOwnPropertyDescriptor,E=f(y,"name"),S=E&&function(){}.name==="something",M=E&&(!s||s&&b(y,"name").configurable);u.exports={EXISTS:E,PROPER:S,CONFIGURABLE:M}},function(u,c,i){var s=i(18),f=i(28),y=/#|\.prototype\./,b=function(A,I){var _=S[E(A)];return _==T?!0:_==M?!1:f(I)?s(I):!!I},E=b.normalize=function(A){return String(A).replace(y,".").toLowerCase()},S=b.data={},M=b.NATIVE="N",T=b.POLYFILL="P";u.exports=b},function(u,c,i){var s=i(7),f=i(34),y=i(28),b=i(38),E=i(91),S=i(137),M=E("IE_PROTO"),T=s.Object,A=T.prototype;u.exports=S?T.getPrototypeOf:function(I){var _=b(I);if(f(_,M))return _[M];var L=_.constructor;return y(L)&&_ instanceof L?L.prototype:_ instanceof T?A:null}},function(u,c,i){var s=i(15),f=i(32),y=i(172);u.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b=!1,E={},S;try{S=s(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),S(E,[]),b=E instanceof Array}catch{}return function(T,A){return f(T),y(A),b?S(T,A):T.__proto__=A,T}}():void 0)},function(u,c,i){var s=i(7),f=i(116),y=i(28),b=i(50),E=i(27),S=E("toStringTag"),M=s.Object,T=b(function(){return arguments}())=="Arguments",A=function(I,_){try{return I[_]}catch{}};u.exports=f?b:function(I){var _,L,H;return I===void 0?"Undefined":I===null?"Null":typeof(L=A(_=M(I),S))=="string"?L:T?b(_):(H=b(_))=="Object"&&y(_.callee)?"Arguments":H}},function(u,c,i){var s=i(50);u.exports=Array.isArray||function(y){return s(y)=="Array"}},function(u,c,i){var s=i(15),f=i(18),y=i(28),b=i(98),E=i(46),S=i(92),M=function(){},T=[],A=E("Reflect","construct"),I=/^\s*(?:class|function)\b/,_=s(I.exec),L=!I.exec(M),H=function(X){if(!y(X))return!1;try{return A(M,T,X),!0}catch{return!1}},U=function(X){if(!y(X))return!1;switch(b(X)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return L||!!_(I,S(X))};u.exports=!A||f(function(){var X;return H(H.call)||!H(Object)||!H(function(){X=!0})||X})?U:H},function(u,c,i){var s=i(15);u.exports=s([].slice)},function(u,c,i){var s=i(35),f=i(15),y=i(40),b=i(184),E=i(151),S=i(84),M=i(54),T=i(56).get,A=i(185),I=i(186),_=S("native-string-replace",String.prototype.replace),L=RegExp.prototype.exec,H=L,U=f("".charAt),X=f("".indexOf),se=f("".replace),ae=f("".slice),q=function(){var j=/a/,N=/b*/g;return s(L,j,"a"),s(L,N,"a"),j.lastIndex!==0||N.lastIndex!==0}(),J=E.BROKEN_CARET,ie=/()??/.exec("")[1]!==void 0,z=q||ie||J||A||I;z&&(H=function(N){var P=this,D=T(P),Y=y(N),V=D.raw,ue,Oe,me,ce,he,ve,Ee;if(V)return V.lastIndex=P.lastIndex,ue=s(H,V,Y),P.lastIndex=V.lastIndex,ue;var je=D.groups,ze=J&&P.sticky,Re=s(b,P),xe=P.source,Be=0,_e=Y;if(ze&&(Re=se(Re,"y",""),X(Re,"g")===-1&&(Re+="g"),_e=ae(Y,P.lastIndex),P.lastIndex>0&&(!P.multiline||P.multiline&&U(Y,P.lastIndex-1)!==` `)&&(xe="(?: "+xe+")",_e=" "+_e,Be++),Oe=new RegExp("^(?:"+xe+")",Re)),ie&&(Oe=new RegExp("^"+xe+"$(?!\\s)",Re)),q&&(me=P.lastIndex),ce=s(L,ze?Oe:P,_e),ze?ce?(ce.input=ae(ce.input,Be),ce[0]=ae(ce[0],Be),ce.index=P.lastIndex,P.lastIndex+=ce[0].length):P.lastIndex=0:q&&ce&&(P.lastIndex=P.global?ce.index+ce[0].length:me),ie&&ce&&ce.length>1&&s(_,ce[0],Oe,function(){for(he=1;heU)throw _(X);for(D=M(J,P),Y=0;Yie-P+N;Y--)delete J[Y-1]}else if(N>P)for(Y=ie-P;Y>z;Y--)V=Y+P-1,ue=Y+N-1,V in J?J[ue]=J[V]:delete J[ue];for(Y=0;YD;D++)if(V=ce(X[D]),V&&T(U,V))return V;return new H(!1)}N=A(X,P)}for(ue=N.next;!(Oe=y(ue,N)).done;){try{V=ce(Oe.value)}catch(he){_(N,"throw",he)}if(typeof V=="object"&&V&&T(U,V))return V}return new H(!1)}},function(u,c,i){var s=i(98),f=i(59),y=i(70),b=i(27),E=b("iterator");u.exports=function(S){if(S!=null)return f(S,E)||f(S,"@@iterator")||y[s(S)]}},function(u,c,i){var s=i(27),f=s("toStringTag"),y={};y[f]="z",u.exports=String(y)==="[object z]"},function(u,c,i){var s=i(7),f=i(58),y=s.TypeError;u.exports=function(b,E){if(f(E,b))return b;throw y("Incorrect invocation")}},function(u,c,i){var s=i(27),f=s("iterator"),y=!1;try{var b=0,E={next:function(){return{done:!!b++}},return:function(){y=!0}};E[f]=function(){return this},Array.from(E,function(){throw 2})}catch{}u.exports=function(S,M){if(!M&&!y)return!1;var T=!1;try{var A={};A[f]=function(){return{next:function(){return{done:T=!0}}}},S(A)}catch{}return T}},function(u,c,i){var s=i(180);u.exports=function(f,y){return new(s(f))(y===0?0:y)}},function(u,c,i){var s=i(18);u.exports=function(f,y){var b=[][f];return!!b&&s(function(){b.call(null,y||function(){throw 1},1)})}},function(u,c){u.exports=function(i){if(!i.webpackPolyfill){var s=Object.create(i);s.children||(s.children=[]),Object.defineProperty(s,"loaded",{enumerable:!0,get:function(){return s.l}}),Object.defineProperty(s,"id",{enumerable:!0,get:function(){return s.i}}),Object.defineProperty(s,"exports",{enumerable:!0}),s.webpackPolyfill=1}return s}},function(u,c,i){i(19);var s=i(15),f=i(44),y=i(102),b=i(18),E=i(27),S=i(57),M=E("species"),T=RegExp.prototype;u.exports=function(A,I,_,L){var H=E(A),U=!b(function(){var q={};return q[H]=function(){return 7},""[A](q)!=7}),X=U&&!b(function(){var q=!1,J=/a/;return A==="split"&&(J={},J.constructor={},J.constructor[M]=function(){return J},J.flags="",J[H]=/./[H]),J.exec=function(){return q=!0,null},J[H](""),!q});if(!U||!X||_){var se=s(/./[H]),ae=I(H,""[A],function(q,J,ie,z,j){var N=s(q),P=J.exec;return P===y||P===T.exec?U&&!j?{done:!0,value:se(J,ie,z)}:{done:!0,value:N(ie,J,z)}:{done:!1}});f(String.prototype,A,ae[0]),f(T,H,ae[1])}L&&S(T[H],"sham",!0)}},function(u,c,i){var s=i(146).charAt;u.exports=function(f,y,b){return y+(b?s(f,y).length:1)}},function(u,c,i){var s=i(7),f=i(35),y=i(32),b=i(28),E=i(50),S=i(102),M=s.TypeError;u.exports=function(T,A){var I=T.exec;if(b(I)){var _=f(I,T,A);return _!==null&&y(_),_}if(E(T)==="RegExp")return f(S,T,A);throw M("RegExp#exec called on incompatible receiver")}},function(u,c,i){var s=i(76),f=i(35),y=i(15),b=i(122),E=i(18),S=i(32),M=i(28),T=i(68),A=i(90),I=i(40),_=i(45),L=i(123),H=i(59),U=i(197),X=i(124),se=i(27),ae=se("replace"),q=Math.max,J=Math.min,ie=y([].concat),z=y([].push),j=y("".indexOf),N=y("".slice),P=function(ue){return ue===void 0?ue:String(ue)},D=function(){return"a".replace(/./,"$0")==="$0"}(),Y=function(){return/./[ae]?/./[ae]("a","$0")==="":!1}(),V=!E(function(){var ue=/./;return ue.exec=function(){var Oe=[];return Oe.groups={a:"7"},Oe},"".replace(ue,"$")!=="7"});b("replace",function(ue,Oe,me){var ce=Y?"$":"$0";return[function(ve,Ee){var je=_(this),ze=ve==null?void 0:H(ve,ae);return ze?f(ze,ve,je,Ee):f(Oe,I(je),ve,Ee)},function(he,ve){var Ee=S(this),je=I(he);if(typeof ve=="string"&&j(ve,ce)===-1&&j(ve,"$<")===-1){var ze=me(Oe,Ee,je,ve);if(ze.done)return ze.value}var Re=M(ve);Re||(ve=I(ve));var xe=Ee.global;if(xe){var Be=Ee.unicode;Ee.lastIndex=0}for(var _e=[];;){var G=X(Ee,je);if(G===null||(z(_e,G),!xe))break;var W=I(G[0]);W===""&&(Ee.lastIndex=L(je,A(Ee.lastIndex),Be))}for(var ee="",ge=0,Me=0;Me<_e.length;Me++){G=_e[Me];for(var ye=I(G[0]),He=q(J(T(G.index),je.length),0),et=[],We=1;We=ge&&(ee+=N(je,ge,He)+ut,ge=He+ye.length)}return ee+N(je,ge)}]},!V||!D||Y)},function(u,c,i){var s=i(50),f=i(7);u.exports=s(f.process)=="process"},function(u,c,i){var s=i(16);s({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(u,c,i){var s=i(109);u.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(u,c,i){var s=i(36),f=i(18),y=i(86);u.exports=!s&&!f(function(){return Object.defineProperty(y("div"),"a",{get:function(){return 7}}).a!=7})},function(u,c,i){var s=i(7),f=i(35),y=i(33),b=i(88),E=i(59),S=i(169),M=i(27),T=s.TypeError,A=M("toPrimitive");u.exports=function(I,_){if(!y(I)||b(I))return I;var L=E(I,A),H;if(L){if(_===void 0&&(_="default"),H=f(L,I,_),!y(H)||b(H))return H;throw T("Can't convert object to primitive value")}return _===void 0&&(_="number"),S(I,_)}},function(u,c,i){var s=i(15),f=i(34),y=i(39),b=i(132).indexOf,E=i(69),S=s([].push);u.exports=function(M,T){var A=y(M),I=0,_=[],L;for(L in A)!f(E,L)&&f(A,L)&&S(_,L);for(;T.length>I;)f(A,L=T[I++])&&(~b(_,L)||S(_,L));return _}},function(u,c,i){var s=i(39),f=i(67),y=i(43),b=function(E){return function(S,M,T){var A=s(S),I=y(A),_=f(T,I),L;if(E&&M!=M){for(;I>_;)if(L=A[_++],L!=L)return!0}else for(;I>_;_++)if((E||_ in A)&&A[_]===M)return E||_||0;return!E&&-1}};u.exports={includes:b(!0),indexOf:b(!1)}},function(u,c,i){var s=i(46);u.exports=s("document","documentElement")},function(u,c,i){var s=i(34),f=i(135),y=i(51),b=i(37);u.exports=function(E,S){for(var M=f(S),T=b.f,A=y.f,I=0;I=U?A?"":void 0:(X=S(L,H),X<55296||X>56319||H+1===U||(se=S(L,H+1))<56320||se>57343?A?E(L,H):X:A?M(L,H,H+2):(X-55296<<10)+(se-56320)+65536)}};u.exports={codeAt:T(!1),charAt:T(!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 s=i(86),f=s("span").classList,y=f&&f.constructor&&f.constructor.prototype;u.exports=y===Object.prototype?void 0:y},function(u,c,i){var s=i(27);c.f=s},function(u,c,i){var s=i(181),f=i(34),y=i(149),b=i(37).f;u.exports=function(E){var S=s.Symbol||(s.Symbol={});f(S,E)||b(S,E,{value:y.f(E)})}},function(u,c,i){var s=i(18),f=i(7),y=f.RegExp,b=s(function(){var M=y("a","y");return M.lastIndex=2,M.exec("abcd")!=null}),E=b||s(function(){return!y("a","y").sticky}),S=b||s(function(){var M=y("^r","gy");return M.lastIndex=2,M.exec("str")!=null});u.exports={BROKEN_CARET:S,MISSED_STICKY:E,UNSUPPORTED_Y:b}},function(u,c,i){var s=i(16),f=i(132).includes,y=i(83);s({target:"Array",proto:!0},{includes:function(E){return f(this,E,arguments.length>1?arguments[1]:void 0)}}),y("includes")},function(u,c,i){var s=i(16),f=i(15),y=i(193),b=i(45),E=i(40),S=i(194),M=f("".indexOf);s({target:"String",proto:!0,forced:!S("includes")},{includes:function(A){return!!~M(E(b(this)),E(y(A)),arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){var s=i(33),f=i(50),y=i(27),b=y("match");u.exports=function(E){var S;return s(E)&&((S=E[b])!==void 0?!!S:f(E)=="RegExp")}},function(u,c){var i=u.exports={},s,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"?s=setTimeout:s=y}catch{s=y}try{typeof clearTimeout=="function"?f=clearTimeout:f=b}catch{f=b}})();function E(X){if(s===setTimeout)return setTimeout(X,0);if((s===y||!s)&&setTimeout)return s=setTimeout,setTimeout(X,0);try{return s(X,0)}catch{try{return s.call(null,X,0)}catch{return s.call(this,X,0)}}}function S(X){if(f===clearTimeout)return clearTimeout(X);if((f===b||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(X);try{return f(X)}catch{try{return f.call(null,X)}catch{return f.call(this,X)}}}var M=[],T=!1,A,I=-1;function _(){!T||!A||(T=!1,A.length?M=A.concat(M):I=-1,M.length&&L())}function L(){if(!T){var X=E(_);T=!0;for(var se=M.length;se;){for(A=M,M=[];++I1)for(var ae=1;ae=0;ue--)(V=z[ue])&&(Y=(D<3?V(Y):D>3?V(j,N,Y):V(j,N))||Y);return D>3&&Y&&Object.defineProperty(j,N,Y),Y};(function(){function z(j,N){var P=this;Object(f.G)(function(){P.current=N,P.subscription=j.subscribe(P)})}return z.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},z.prototype.next=function(j){this.current=j},z.prototype.complete=function(){this.dispose()},z.prototype.error=function(j){this.current=j,this.dispose()},H([f.C.ref],z.prototype,"current",void 0),H([f.k.bound],z.prototype,"next",null),H([f.k.bound],z.prototype,"complete",null),H([f.k.bound],z.prototype,"error",null),z})();var U=function(){return U=Object.assign||function(z){for(var j,N=1,P=arguments.length;N=0;ue--)(V=z[ue])&&(Y=(D<3?V(Y):D>3?V(j,N,Y):V(j,N))||Y);return D>3&&Y&&Object.defineProperty(j,N,Y),Y},se=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function z(j){var N=this;this.model=j,this.localValues=f.C.map({}),this.localComputedValues=f.C.map({}),this.isPropertyDirty=function(P){return N.localValues.has(P)},b(Object(f.A)(j),"createViewModel expects an observable object"),M(j).forEach(function(P){if(!(P===f.a||P==="__mobxDidRunLazyInitializers")){if(b(se.indexOf(P)===-1,"The propertyname "+P+" is reserved and cannot be used with viewModels"),Object(f.w)(j,P)){var D=Object(f.h)(j,P).derivation;N.localComputedValues.set(P,Object(f.m)(D.bind(N)))}var Y=Object.getOwnPropertyDescriptor(j,P),V=Y?{enumerable:Y.enumerable}:{};Object.defineProperty(N,P,U(U({},V),{configurable:!0,get:function(){return Object(f.w)(j,P)?N.localComputedValues.get(P).get():N.isPropertyDirty(P)?N.localValues.get(P):N.model[P]},set:Object(f.k)(function(ue){ue!==N.model[P]?N.localValues.set(P,ue):N.localValues.delete(P)})}))}})}return Object.defineProperty(z.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),z.prototype.submit=function(){var j=this;Object(f.B)(this.localValues).forEach(function(N){var P=j.localValues.get(N),D=j.model[N];Object(f.y)(D)?D.replace(P):Object(f.z)(D)?(D.clear(),D.merge(P)):Object(f.v)(P)||(j.model[N]=P)}),this.localValues.clear()},z.prototype.reset=function(){this.localValues.clear()},z.prototype.resetProperty=function(j){this.localValues.delete(j)},X([f.m],z.prototype,"isDirty",null),X([f.m],z.prototype,"changedValues",null),X([f.k.bound],z.prototype,"submit",null),X([f.k.bound],z.prototype,"reset",null),X([f.k.bound],z.prototype,"resetProperty",null),z})();function ae(z){if(!z)return"ROOT";for(var j=[];z.parent;)j.push(z.path),z=z.parent;return j.reverse().join("/")}function q(z){return Object(f.A)(z)||Object(f.y)(z)||Object(f.z)(z)}function J(z,j){var N=new WeakMap;function P(ue){var Oe=N.get(ue.object);D(ue,Oe),j(ue,ae(Oe),z)}function D(ue,Oe){switch(ue.type){case"add":Y(ue.newValue,Oe,ue.name);break;case"update":V(ue.oldValue),Y(ue.newValue,Oe,ue.name||""+ue.index);break;case"remove":case"delete":V(ue.oldValue);break;case"splice":ue.removed.map(V),ue.added.forEach(function(he,ve){return Y(he,Oe,""+(ue.index+ve))});for(var me=ue.index+ue.addedCount;me":".","?":"/","|":"\\"},T={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},A,I=1;I<20;++I)E[111+I]="f"+I;for(I=0;I<=9;++I)E[I+96]=I.toString();function _(P,D,Y){if(P.addEventListener){P.addEventListener(D,Y,!1);return}P.attachEvent("on"+D,Y)}function L(P){if(P.type=="keypress"){var D=String.fromCharCode(P.which);return P.shiftKey||(D=D.toLowerCase()),D}return E[P.which]?E[P.which]:S[P.which]?S[P.which]:String.fromCharCode(P.which).toLowerCase()}function H(P,D){return P.sort().join(",")===D.sort().join(",")}function U(P){var D=[];return P.shiftKey&&D.push("shift"),P.altKey&&D.push("alt"),P.ctrlKey&&D.push("ctrl"),P.metaKey&&D.push("meta"),D}function X(P){if(P.preventDefault){P.preventDefault();return}P.returnValue=!1}function se(P){if(P.stopPropagation){P.stopPropagation();return}P.cancelBubble=!0}function ae(P){return P=="shift"||P=="ctrl"||P=="alt"||P=="meta"}function q(){if(!A){A={};for(var P in E)P>95&&P<112||E.hasOwnProperty(P)&&(A[E[P]]=P)}return A}function J(P,D,Y){return Y||(Y=q()[P]?"keydown":"keypress"),Y=="keypress"&&D.length&&(Y="keydown"),Y}function ie(P){return P==="+"?["+"]:(P=P.replace(/\+{2}/g,"+plus"),P.split("+"))}function z(P,D){var Y,V,ue,Oe=[];for(Y=ie(P),ue=0;ue1){ze(xe,ee,Be,_e);return}ge=z(xe,_e),D._callbacks[ge.key]=D._callbacks[ge.key]||[],he(ge.key,ge.modifiers,{type:ge.action},G,xe,W),D._callbacks[ge.key][G?"unshift":"push"]({callback:Be,modifiers:ge.modifiers,action:ge.action,seq:G,level:W,combo:xe})}D._bindMultiple=function(xe,Be,_e){for(var G=0;G-1||j(D,Y.target))return!1;if("composedPath"in P&&typeof P.composedPath=="function"){var V=P.composedPath()[0];V!==P.target&&(D=V)}return D.tagName=="INPUT"||D.tagName=="SELECT"||D.tagName=="TEXTAREA"||D.isContentEditable},N.prototype.handleKey=function(){var P=this;return P._handleKey.apply(P,arguments)},N.addKeycodes=function(P){for(var D in P)P.hasOwnProperty(D)&&(E[D]=P[D]);A=null},N.init=function(){var P=N(y);for(var D in P)D.charAt(0)!=="_"&&(N[D]=function(Y){return function(){return P[Y].apply(P,arguments)}}(D))},N.init(),f.Mousetrap=N,u.exports&&(u.exports=N),s=function(){return N}.call(c,i,c,u),s!==b&&(u.exports=s)})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)},function(u,c,i){var s=i(36),f=i(37),y=i(32),b=i(39),E=i(66);u.exports=s?Object.defineProperties:function(M,T){y(M);for(var A=b(T),I=E(T),_=I.length,L=0,H;_>L;)f.f(M,H=I[L++],A[H]);return M}},function(u,c,i){var s=i(7),f=i(35),y=i(28),b=i(33),E=s.TypeError;u.exports=function(S,M){var T,A;if(M==="string"&&y(T=S.toString)&&!b(A=f(T,S))||y(T=S.valueOf)&&!b(A=f(T,S))||M!=="string"&&y(T=S.toString)&&!b(A=f(T,S)))return A;throw E("Can't convert object to primitive value")}},function(u,c,i){var s=i(7),f=i(28),y=i(92),b=s.WeakMap;u.exports=f(b)&&/native code/.test(y(b))},function(u,c,i){var s=i(136).IteratorPrototype,f=i(54),y=i(71),b=i(73),E=i(70),S=function(){return this};u.exports=function(M,T,A,I){var _=T+" Iterator";return M.prototype=f(s,{next:y(+!I,A)}),b(M,_,!1,!0),E[_]=S,M}},function(u,c,i){var s=i(7),f=i(28),y=s.String,b=s.TypeError;u.exports=function(E){if(typeof E=="object"||f(E))return E;throw b("Can't set "+y(E)+" as a prototype")}},function(u,c,i){var s=i(16),f=i(7),y=i(15),b=i(95),E=i(44),S=i(138),M=i(114),T=i(117),A=i(28),I=i(33),_=i(18),L=i(118),H=i(73),U=i(143);u.exports=function(X,se,ae){var q=X.indexOf("Map")!==-1,J=X.indexOf("Weak")!==-1,ie=q?"set":"add",z=f[X],j=z&&z.prototype,N=z,P={},D=function(he){var ve=y(j[he]);E(j,he,he=="add"?function(je){return ve(this,je===0?0:je),this}:he=="delete"?function(Ee){return J&&!I(Ee)?!1:ve(this,Ee===0?0:Ee)}:he=="get"?function(je){return J&&!I(je)?void 0:ve(this,je===0?0:je)}:he=="has"?function(je){return J&&!I(je)?!1:ve(this,je===0?0:je)}:function(je,ze){return ve(this,je===0?0:je,ze),this})},Y=b(X,!A(z)||!(J||j.forEach&&!_(function(){new z().entries().next()})));if(Y)N=ae.getConstructor(se,X,q,ie),S.enable();else if(b(X,!0)){var V=new N,ue=V[ie](J?{}:-0,1)!=V,Oe=_(function(){V.has(1)}),me=L(function(he){new z(he)}),ce=!J&&_(function(){for(var he=new z,ve=5;ve--;)he[ie](ve,ve);return!he.has(-0)});me||(N=se(function(he,ve){T(he,j);var Ee=U(new z,he,N);return ve!=null&&M(ve,Ee[ie],{that:Ee,AS_ENTRIES:q}),Ee}),N.prototype=j,j.constructor=N),(Oe||ce)&&(D("delete"),D("has"),q&&D("get")),(ce||ue)&&D(ie),J&&j.clear&&delete j.clear}return P[X]=N,s({global:!0,forced:N!=z},P),H(N,X),J||ae.setStrong(N,X,q),N}},function(u,c,i){var s=i(18),f=i(33),y=i(50),b=i(175),E=Object.isExtensible,S=s(function(){});u.exports=S||b?function(T){return!f(T)||b&&y(T)=="ArrayBuffer"?!1:E?E(T):!0}:E},function(u,c,i){var s=i(18);u.exports=s(function(){if(typeof ArrayBuffer=="function"){var f=new ArrayBuffer(8);Object.isExtensible(f)&&Object.defineProperty(f,"a",{value:8})}})},function(u,c,i){var s=i(18);u.exports=!s(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(u,c,i){var s=i(37).f,f=i(54),y=i(144),b=i(62),E=i(117),S=i(114),M=i(111),T=i(145),A=i(36),I=i(138).fastKey,_=i(56),L=_.set,H=_.getterFor;u.exports={getConstructor:function(U,X,se,ae){var q=U(function(N,P){E(N,J),L(N,{type:X,index:f(null),first:void 0,last:void 0,size:0}),A||(N.size=0),P!=null&&S(P,N[ae],{that:N,AS_ENTRIES:se})}),J=q.prototype,ie=H(X),z=function(N,P,D){var Y=ie(N),V=j(N,P),ue,Oe;return V?V.value=D:(Y.last=V={index:Oe=I(P,!0),key:P,value:D,previous:ue=Y.last,next:void 0,removed:!1},Y.first||(Y.first=V),ue&&(ue.next=V),A?Y.size++:N.size++,Oe!=="F"&&(Y.index[Oe]=V)),N},j=function(N,P){var D=ie(N),Y=I(P),V;if(Y!=="F")return D.index[Y];for(V=D.first;V;V=V.next)if(V.key==P)return V};return y(J,{clear:function(){for(var P=this,D=ie(P),Y=D.index,V=D.first;V;)V.removed=!0,V.previous&&(V.previous=V.previous.next=void 0),delete Y[V.index],V=V.next;D.first=D.last=void 0,A?D.size=0:P.size=0},delete:function(N){var P=this,D=ie(P),Y=j(P,N);if(Y){var V=Y.next,ue=Y.previous;delete D.index[Y.index],Y.removed=!0,ue&&(ue.next=V),V&&(V.previous=ue),D.first==Y&&(D.first=V),D.last==Y&&(D.last=ue),A?D.size--:P.size--}return!!Y},forEach:function(P){for(var D=ie(this),Y=b(P,arguments.length>1?arguments[1]:void 0),V;V=V?V.next:D.first;)for(Y(V.value,V.key,this);V&&V.removed;)V=V.previous},has:function(P){return!!j(this,P)}}),y(J,se?{get:function(P){var D=j(this,P);return D&&D.value},set:function(P,D){return z(this,P===0?0:P,D)}}:{add:function(P){return z(this,P=P===0?0:P,P)}}),A&&s(J,"size",{get:function(){return ie(this).size}}),q},setStrong:function(U,X,se){var ae=X+" Iterator",q=H(X),J=H(ae);M(U,X,function(ie,z){L(this,{type:ae,target:ie,state:q(ie),kind:z,last:void 0})},function(){for(var ie=J(this),z=ie.kind,j=ie.last;j&&j.removed;)j=j.previous;return!ie.target||!(ie.last=j=j?j.next:ie.state.first)?(ie.target=void 0,{value:void 0,done:!0}):z=="keys"?{value:j.key,done:!1}:z=="values"?{value:j.value,done:!1}:{value:[j.key,j.value],done:!1}},se?"entries":"values",!se,!0),T(X)}}},function(u,c,i){var s=i(116),f=i(98);u.exports=s?{}.toString:function(){return"[object "+f(this)+"]"}},function(u,c,i){var s=i(74).forEach,f=i(120),y=f("forEach");u.exports=y?[].forEach:function(E){return s(this,E,arguments.length>1?arguments[1]:void 0)}},function(u,c,i){var s=i(7),f=i(99),y=i(100),b=i(33),E=i(27),S=E("species"),M=s.Array;u.exports=function(T){var A;return f(T)&&(A=T.constructor,y(A)&&(A===M||f(A.prototype))?A=void 0:b(A)&&(A=A[S],A===null&&(A=void 0))),A===void 0?M:A}},function(u,c,i){var s=i(7);u.exports=s},function(u,c,i){var s=i(7),f=i(62),y=i(35),b=i(38),E=i(183),S=i(140),M=i(100),T=i(43),A=i(61),I=i(141),_=i(115),L=s.Array;u.exports=function(U){var X=b(U),se=M(this),ae=arguments.length,q=ae>1?arguments[1]:void 0,J=q!==void 0;J&&(q=f(q,ae>2?arguments[2]:void 0));var ie=_(X),z=0,j,N,P,D,Y,V;if(ie&&!(this==L&&S(ie)))for(D=I(X,ie),Y=D.next,N=se?new this:[];!(P=y(Y,D)).done;z++)V=J?E(D,q,[P.value,z],!0):P.value,A(N,z,V);else for(j=T(X),N=se?new this(j):L(j);j>z;z++)V=J?q(X[z],z):X[z],A(N,z,V);return N.length=z,N}},function(u,c,i){var s=i(32),f=i(142);u.exports=function(y,b,E,S){try{return S?b(s(E)[0],E[1]):b(E)}catch(M){f(y,"throw",M)}}},function(u,c,i){var s=i(32);u.exports=function(){var f=s(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 s=i(18),f=i(7),y=f.RegExp;u.exports=s(function(){var b=y(".","s");return!(b.dotAll&&b.exec(` `)&&b.flags==="s")})},function(u,c,i){var s=i(18),f=i(7),y=f.RegExp;u.exports=s(function(){var b=y("(?b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$c")!=="bc"})},function(u,c,i){var s=i(16),f=i(15),y=i(55),b=i(38),E=i(43),S=i(40),M=i(18),T=i(188),A=i(120),I=i(189),_=i(190),L=i(65),H=i(191),U=[],X=f(U.sort),se=f(U.push),ae=M(function(){U.sort(void 0)}),q=M(function(){U.sort(null)}),J=A("sort"),ie=!M(function(){if(L)return L<70;if(!(I&&I>3)){if(_)return!0;if(H)return H<603;var N="",P,D,Y,V;for(P=65;P<76;P++){switch(D=String.fromCharCode(P),P){case 66:case 69:case 70:case 72:Y=3;break;case 68:case 71:Y=4;break;default:Y=2}for(V=0;V<47;V++)U.push({k:D+V,v:Y})}for(U.sort(function(ue,Oe){return Oe.v-ue.v}),V=0;VS(D)?1:-1}};s({target:"Array",proto:!0,forced:z},{sort:function(P){P!==void 0&&y(P);var D=b(this);if(ie)return P===void 0?X(D):X(D,P);var Y=[],V=E(D),ue,Oe;for(Oe=0;Oe0;)S[_]=S[--_];_!==A++&&(S[_]=I)}return S},E=function(S,M,T,A){for(var I=M.length,_=T.length,L=0,H=0;L1?arguments[1]:void 0)}}),y(b)},function(u,c,i){var s=i(7),f=i(154),y=s.TypeError;u.exports=function(b){if(f(b))throw y("The method doesn't accept regular expressions");return b}},function(u,c,i){var s=i(27),f=s("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 s=i(94).PROPER,f=i(18),y=i(160),b="\u200B\x85\u180E";u.exports=function(E){return f(function(){return!!y[E]()||b[E]()!==b||s&&y[E].name!==E})}},function(u,c,i){var s=i(15);u.exports=s(1 .valueOf)},function(u,c,i){var s=i(15),f=i(38),y=Math.floor,b=s("".charAt),E=s("".replace),S=s("".slice),M=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;u.exports=function(A,I,_,L,H,U){var X=_+A.length,se=L.length,ae=T;return H!==void 0&&(H=f(H),ae=M),E(U,ae,function(q,J){var ie;switch(b(J,0)){case"$":return"$";case"&":return A;case"`":return S(I,0,_);case"'":return S(I,X);case"<":ie=H[S(J,1,-1)];break;default:var z=+J;if(z===0)return q;if(z>se){var j=y(z/10);return j===0?q:j<=se?L[j-1]===void 0?b(J,1):L[j-1]+b(J,1):q}ie=L[z-1]}return ie===void 0?"":ie})}},function(u,c,i){var s=i(7),f=i(15),y=i(55),b=i(33),E=i(34),S=i(101),M=s.Function,T=f([].concat),A=f([].join),I={},_=function(L,H,U){if(!E(I,H)){for(var X=[],se=0;seq;)for(var z=A(arguments[q++]),j=J?L(E(z),J(z)):E(z),N=j.length,P=0,D;N>P;)D=j[P++],(!s||y(ie,z,D))&&(se[D]=z[D]);return se}:I},function(u,c,i){var s=i(15),f=i(45),y=i(40),b=/"/g,E=s("".replace);u.exports=function(S,M,T,A){var I=y(f(S)),_="<"+M;return T!==""&&(_+=" "+T+'="'+E(y(A),b,""")+'"'),_+">"+I+""}},function(u,c,i){var s=i(18);u.exports=function(f){return s(function(){var y=""[f]('"');return y!==y.toLowerCase()||y.split('"').length>3})}},function(u,c,i){var s=i(16),f=Math.hypot,y=Math.abs,b=Math.sqrt,E=!!f&&f(1/0,NaN)!==1/0;s({target:"Math",stat:!0,forced:E},{hypot:function(M,T){for(var A=0,I=0,_=arguments.length,L=0,H,U;I<_;)H=y(arguments[I++]),L0?(U=H/L,A+=U*U):A+=H;return L===1/0?1/0:L*b(A)}})},function(u,c,i){var s=i(16),f=i(64),y=i(7),b=i(46),E=i(35),S=i(205),M=i(44),T=i(144),A=i(97),I=i(73),_=i(145),L=i(55),H=i(28),U=i(33),X=i(117),se=i(92),ae=i(114),q=i(118),J=i(156),ie=i(162).set,z=i(206),j=i(209),N=i(210),P=i(164),D=i(211),Y=i(56),V=i(95),ue=i(27),Oe=i(212),me=i(126),ce=i(65),he=ue("species"),ve="Promise",Ee=Y.getterFor(ve),je=Y.set,ze=Y.getterFor(ve),Re=S&&S.prototype,xe=S,Be=Re,_e=y.TypeError,G=y.document,W=y.process,ee=P.f,ge=ee,Me=!!(G&&G.createEvent&&y.dispatchEvent),ye=H(y.PromiseRejectionEvent),He="unhandledrejection",et="rejectionhandled",We=0,rt=1,be=2,ut=1,tt=2,Fe=!1,Qe,At,ct,bt,ne=V(ve,function(){var Ce=se(xe),Ye=Ce!==String(xe);if(!Ye&&ce===66||f&&!Be.finally)return!0;if(ce>=51&&/native code/.test(Ce))return!1;var nt=new xe(function(k){k(1)}),Ze=function(k){k(function(){},function(){})},lt=nt.constructor={};return lt[he]=Ze,Fe=nt.then(function(){})instanceof Ze,Fe?!Ye&&Oe&&!ye:!0}),Ct=ne||!q(function(Ce){xe.all(Ce).catch(function(){})}),St=function(Ce){var Ye;return U(Ce)&&H(Ye=Ce.then)?Ye:!1},mt=function(Ce,Ye){if(!Ce.notified){Ce.notified=!0;var nt=Ce.reactions;z(function(){for(var Ze=Ce.value,lt=Ce.state==rt,k=0;nt.length>k;){var Z=nt[k++],te=lt?Z.ok:Z.fail,re=Z.resolve,Ae=Z.reject,De=Z.domain,Xe,vt,Jt;try{te?(lt||(Ce.rejection===tt&&Er(Ce),Ce.rejection=ut),te===!0?Xe=Ze:(De&&De.enter(),Xe=te(Ze),De&&(De.exit(),Jt=!0)),Xe===Z.promise?Ae(_e("Promise-chain cycle")):(vt=St(Xe))?E(vt,Xe,re,Ae):re(Xe)):Ae(Ze)}catch(Qt){De&&!Jt&&De.exit(),Ae(Qt)}}Ce.reactions=[],Ce.notified=!1,Ye&&!Ce.rejection&&dr(Ce)})}},Wt=function(Ce,Ye,nt){var Ze,lt;Me?(Ze=G.createEvent("Event"),Ze.promise=Ye,Ze.reason=nt,Ze.initEvent(Ce,!1,!0),y.dispatchEvent(Ze)):Ze={promise:Ye,reason:nt},!ye&&(lt=y["on"+Ce])?lt(Ze):Ce===He&&N("Unhandled promise rejection",nt)},dr=function(Ce){E(ie,y,function(){var Ye=Ce.facade,nt=Ce.value,Ze=Zt(Ce),lt;if(Ze&&(lt=D(function(){me?W.emit("unhandledRejection",nt,Ye):Wt(He,Ye,nt)}),Ce.rejection=me||Zt(Ce)?tt:ut,lt.error))throw lt.value})},Zt=function(Ce){return Ce.rejection!==ut&&!Ce.parent},Er=function(Ce){E(ie,y,function(){var Ye=Ce.facade;me?W.emit("rejectionHandled",Ye):Wt(et,Ye,Ce.value)})},qe=function(Ce,Ye,nt){return function(Ze){Ce(Ye,Ze,nt)}},Pt=function(Ce,Ye,nt){Ce.done||(Ce.done=!0,nt&&(Ce=nt),Ce.value=Ye,Ce.state=be,mt(Ce,!0))},nr=function(Ce,Ye,nt){if(!Ce.done){Ce.done=!0,nt&&(Ce=nt);try{if(Ce.facade===Ye)throw _e("Promise can't be resolved itself");var Ze=St(Ye);Ze?z(function(){var lt={done:!1};try{E(Ze,Ye,qe(nr,lt,Ce),qe(Pt,lt,Ce))}catch(k){Pt(lt,k,Ce)}}):(Ce.value=Ye,Ce.state=rt,mt(Ce,!1))}catch(lt){Pt({done:!1},lt,Ce)}}};if(ne&&(xe=function(Ye){X(this,Be),L(Ye),E(Qe,this);var nt=Ee(this);try{Ye(qe(nr,nt),qe(Pt,nt))}catch(Ze){Pt(nt,Ze)}},Be=xe.prototype,Qe=function(Ye){je(this,{type:ve,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:We,value:void 0})},Qe.prototype=T(Be,{then:function(Ye,nt){var Ze=ze(this),lt=Ze.reactions,k=ee(J(this,xe));return k.ok=H(Ye)?Ye:!0,k.fail=H(nt)&&nt,k.domain=me?W.domain:void 0,Ze.parent=!0,lt[lt.length]=k,Ze.state!=We&&mt(Ze,!1),k.promise},catch:function(Ce){return this.then(void 0,Ce)}}),At=function(){var Ce=new Qe,Ye=Ee(Ce);this.promise=Ce,this.resolve=qe(nr,Ye),this.reject=qe(Pt,Ye)},P.f=ee=function(Ce){return Ce===xe||Ce===ct?new At(Ce):ge(Ce)},!f&&H(S)&&Re!==Object.prototype)){bt=Re.then,Fe||(M(Re,"then",function(Ye,nt){var Ze=this;return new xe(function(lt,k){E(bt,Ze,lt,k)}).then(Ye,nt)},{unsafe:!0}),M(Re,"catch",Be.catch,{unsafe:!0}));try{delete Re.constructor}catch{}A&&A(Re,Be)}s({global:!0,wrap:!0,forced:ne},{Promise:xe}),I(xe,ve,!1,!0),_(ve),ct=b(ve),s({target:ve,stat:!0,forced:ne},{reject:function(Ye){var nt=ee(this);return E(nt.reject,void 0,Ye),nt.promise}}),s({target:ve,stat:!0,forced:f||ne},{resolve:function(Ye){return j(f&&this===ct?xe:this,Ye)}}),s({target:ve,stat:!0,forced:Ct},{all:function(Ye){var nt=this,Ze=ee(nt),lt=Ze.resolve,k=Ze.reject,Z=D(function(){var te=L(nt.resolve),re=[],Ae=0,De=1;ae(Ye,function(Xe){var vt=Ae++,Jt=!1;De++,E(te,nt,Xe).then(function(Qt){Jt||(Jt=!0,re[vt]=Qt,--De||lt(re))},k)}),--De||lt(re)});return Z.error&&k(Z.value),Ze.promise},race:function(Ye){var nt=this,Ze=ee(nt),lt=Ze.reject,k=D(function(){var Z=L(nt.resolve);ae(Ye,function(te){E(Z,nt,te).then(Ze.resolve,lt)})});return k.error&<(k.value),Ze.promise}})},function(u,c,i){var s=i(7);u.exports=s.Promise},function(u,c,i){var s=i(7),f=i(62),y=i(51).f,b=i(162).set,E=i(163),S=i(207),M=i(208),T=i(126),A=s.MutationObserver||s.WebKitMutationObserver,I=s.document,_=s.process,L=s.Promise,H=y(s,"queueMicrotask"),U=H&&H.value,X,se,ae,q,J,ie,z,j;U||(X=function(){var N,P;for(T&&(N=_.domain)&&N.exit();se;){P=se.fn,se=se.next;try{P()}catch(D){throw se?q():ae=void 0,D}}ae=void 0,N&&N.enter()},!E&&!T&&!M&&A&&I?(J=!0,ie=I.createTextNode(""),new A(X).observe(ie,{characterData:!0}),q=function(){ie.data=J=!J}):!S&&L&&L.resolve?(z=L.resolve(void 0),z.constructor=L,j=f(z.then,z),q=function(){j(X)}):T?q=function(){_.nextTick(X)}:(b=f(b,s),q=function(){b(X)})),u.exports=U||function(N){var P={fn:N,next:void 0};ae&&(ae.next=P),se||(se=P,q()),ae=P}},function(u,c,i){var s=i(53),f=i(7);u.exports=/ipad|iphone|ipod/i.test(s)&&f.Pebble!==void 0},function(u,c,i){var s=i(53);u.exports=/web0s(?!.*chrome)/i.test(s)},function(u,c,i){var s=i(32),f=i(33),y=i(164);u.exports=function(b,E){if(s(b),f(E)&&E.constructor===b)return E;var S=y.f(b),M=S.resolve;return M(E),S.promise}},function(u,c,i){var s=i(7);u.exports=function(f,y){var b=s.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(s){return{error:!0,value:s}}}},function(u,c){u.exports=typeof window=="object"},function(u,c,i){var s=i(36),f=i(15),y=i(66),b=i(39),E=i(93).f,S=f(E),M=f([].push),T=function(A){return function(I){for(var _=b(I),L=y(_),H=L.length,U=0,X=[],se;H>U;)se=L[U++],(!s||S(_,se))&&M(X,A?[se,_[se]]:_[se]);return X}};u.exports={entries:T(!0),values:T(!1)}},function(u,c,i){var s=i(38),f=i(67),y=i(43);u.exports=function(E){for(var S=s(this),M=y(S),T=arguments.length,A=f(T>1?arguments[1]:void 0,M),I=T>2?arguments[2]:void 0,_=I===void 0?M:f(I,M);_>A;)S[A++]=E;return S}},function(u,c,i){i.r(c),i.d(c,"observer",function(){return Gr}),i.d(c,"LogicFlow",function(){return ed}),i.d(c,"h",function(){return ne.g}),i.d(c,"LogicFlowUtil",function(){return s}),i.d(c,"BaseNode",function(){return yn}),i.d(c,"RectNode",function(){return hc}),i.d(c,"CircleNode",function(){return gc}),i.d(c,"PolygonNode",function(){return Oc}),i.d(c,"DiamondNode",function(){return Sc}),i.d(c,"EllipseNode",function(){return Mc}),i.d(c,"TextNode",function(){return Ac}),i.d(c,"HtmlNode",function(){return jc}),i.d(c,"BaseEdge",function(){return Ti}),i.d(c,"LineEdge",function(){return Hc}),i.d(c,"PolylineEdge",function(){return kc}),i.d(c,"BezierEdge",function(){return Uc}),i.d(c,"Arrow",function(){return pj}),i.d(c,"BaseEdgeModel",function(){return hf}),i.d(c,"BezierEdgeModel",function(){return kf}),i.d(c,"LineEdgeModel",function(){return gf}),i.d(c,"PolylineEdgeModel",function(){return Of}),i.d(c,"BaseNodeModel",function(){return hn}),i.d(c,"CircleNodeModel",function(){return Xf}),i.d(c,"DiamondNodeModel",function(){return Kf}),i.d(c,"EllipseNodeModel",function(){return Zf}),i.d(c,"PolygonNodeModel",function(){return qf}),i.d(c,"RectNodeModel",function(){return rc}),i.d(c,"TextNodeModel",function(){return oc}),i.d(c,"HtmlNodeModel",function(){return ac}),i.d(c,"EditConfigModel",function(){return up}),i.d(c,"GraphModel",function(){return ov}),i.d(c,"SnaplineModel",function(){return og}),i.d(c,"Keyboard",function(){return hm}),i.d(c,"get",function(){return Fv}),i.d(c,"defaults",function(){return Hv});var s={};i.r(s),i.d(s,"createUuid",function(){return eo}),i.d(s,"refreshGraphId",function(){return EP}),i.d(s,"createDrag",function(){return Mf}),i.d(s,"StepDrag",function(){return to});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),E=Object(b.b)("observerBatching");function S(e){e()}function M(e){e||(e=S),Object(f.n)({reactionScheduler:e}),Object(b.a)()[E]=!0}function T(e){return Object(f.t)(e)}function A(e){var r={cleanAt:Date.now()+I,reaction:e};return r}var I=1e4,_=1e4,L=new Set,H;function U(){H===void 0&&(H=setTimeout(ae,_))}function X(e){L.add(e),U()}function se(e){L.delete(e)}function ae(){H=void 0;var e=Date.now();L.forEach(function(r){var t=r.current;t&&e>=t.cleanAt&&(t.reaction.dispose(),r.current=null,L.delete(r))}),L.size>0&&U()}var q=!1,J=[];function ie(e){return function(){q?J.push(e):e()}}function z(e){q=!0,J=[];try{var r=e();q=!1;var t=J.length>0?J:void 0;return y.d.useLayoutEffect(function(){t&&t.forEach(function(n){return n()})},[t]),r}finally{q=!1}}var j={};function N(e){return"observer"+e}function P(e,r,t){r===void 0&&(r="observed"),t===void 0&&(t=j);var n=t.useForceUpdate||b.d,o=n(),a=ie(o),l=y.d.useRef(null);if(!l.current){var p=new f.c(N(r),function(){g.mounted?a():(p.dispose(),l.current=null)}),g=A(p);l.current=g,X(l)}var x=l.current.reaction;return y.d.useDebugValue(x,T),y.d.useEffect(function(){return se(l),l.current?l.current.mounted=!0:(l.current={reaction:new f.c(N(r),function(){a()}),cleanAt:1/0},a()),function(){l.current.reaction.dispose(),l.current=null}},[]),z(function(){var w,R;if(x.track(function(){try{w=e()}catch(B){R=B}}),R)throw R;return w})}var D=function(){return D=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;Re(this,et,!1),Re(this,We,!1);var t=be(this),n=e.bind(this),o=!1,a=new f.c(t+".render()",function(){if(!o&&(o=!0,r[He]!==!0)){var p=!0;try{Re(r,We,!0),r[et]||y.a.prototype.forceUpdate.call(r),p=!1}finally{Re(r,We,!1),p&&a.dispose()}}});a.reactComponent=this,l[Me]=a,this.render=l;function l(){o=!1;var p=void 0,g=void 0;if(a.track(function(){try{g=Object(f.d)(!1,n)}catch(x){p=x}}),p)throw p;return g}return l.call(this)}function tt(e,r){return this.state!==r?!0:!je(this.props,e)}function Fe(e,r){var t=Ee("reactProp_"+r+"_valueHolder"),n=Ee("reactProp_"+r+"_atomHolder");function o(){return this[n]||Re(this,n,Object(f.o)("reactive "+r)),this[n]}Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:function(){var l=!1;return f.f&&f.e&&(l=Object(f.f)(!0)),o.call(this).reportObserved(),f.f&&f.e&&Object(f.e)(l),this[t]},set:function(l){!this[We]&&!je(this[t],l)?(Re(this,t,l),Re(this,et,!0),o.call(this).reportChanged(),Re(this,et,!1)):Re(this,t,l)}})}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,ct=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'"),ct&&e.$$typeof===ct)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)(Oe,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):rt(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 k=lt;function Z(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=Z;function re(e){var r=-1,t=e==null?0:e.length;for(this.clear();++rp))return!1;var x=a.get(e),w=a.get(r);if(x&&w)return x==r&&w==e;var R=-1,B=!0,$=t&Cr?new Ns:void 0;for(a.set(e,r),a.set(r,e);++R-1&&e%1==0&&e-1&&e%1==0&&e<=Cb}var Fs=Rb,Ib="[object Arguments]",_b="[object Array]",Bb="[object Boolean]",Lb="[object Date]",zb="[object Error]",Fb="[object Function]",Hb="[object Map]",Gb="[object Number]",kb="[object Object]",$b="[object RegExp]",Ub="[object Set]",Xb="[object String]",Yb="[object WeakMap]",Wb="[object ArrayBuffer]",Kb="[object DataView]",Vb="[object Float32Array]",Zb="[object Float64Array]",Jb="[object Int8Array]",Qb="[object Int16Array]",qb="[object Int32Array]",eO="[object Uint8Array]",tO="[object Uint8ClampedArray]",rO="[object Uint16Array]",nO="[object Uint32Array]",Nt={};Nt[Vb]=Nt[Zb]=Nt[Jb]=Nt[Qb]=Nt[qb]=Nt[eO]=Nt[tO]=Nt[rO]=Nt[nO]=!0,Nt[Ib]=Nt[_b]=Nt[Wb]=Nt[Bb]=Nt[Kb]=Nt[Lb]=Nt[zb]=Nt[Fb]=Nt[Hb]=Nt[Gb]=Nt[kb]=Nt[$b]=Nt[Ub]=Nt[Xb]=Nt[Yb]=!1;function oO(e){return Mt(e)&&Fs(e.length)&&!!Nt[$r(e)]}var iO=oO;function aO(e){return function(r){return e(r)}}var Hs=aO,xo=i(49),yd=xo.a&&xo.a.isTypedArray,uO=yd?Hs(yd):iO,Gs=uO,lO=Object.prototype,sO=lO.hasOwnProperty;function fO(e,r){var t=d(e),n=!t&&Dn(e),o=!t&&!n&&Object(fn.a)(e),a=!t&&!n&&!o&&Gs(e),l=t||n||o||a,p=l?_t(e.length,String):[],g=p.length;for(var x in e)(r||sO.call(e,x))&&!(l&&(x=="length"||o&&(x=="offset"||x=="parent")||a&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||ma(x,g)))&&p.push(x);return p}var gd=fO,cO=Object.prototype;function dO(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||cO;return e===t}var ba=dO;function pO(e,r){return function(t){return e(r(t))}}var md=pO,hO=md(Object.keys,Object),vO=hO,yO=Object.prototype,gO=yO.hasOwnProperty;function mO(e){if(!ba(e))return vO(e);var r=[];for(var t in Object(e))gO.call(e,t)&&t!="constructor"&&r.push(t);return r}var bO=mO;function OO(e){return e!=null&&Fs(e.length)&&!vo(e)}var Jn=OO;function EO(e){return Jn(e)?gd(e):bO(e)}var So=EO;function xO(e){return O(e,So,Ot)}var ks=xO,SO=1,PO=Object.prototype,TO=PO.hasOwnProperty;function MO(e,r,t,n,o,a){var l=t&SO,p=ks(e),g=p.length,x=ks(r),w=x.length;if(g!=w&&!l)return!1;for(var R=g;R--;){var B=p[R];if(!(l?B in r:TO.call(r,B)))return!1}var $=a.get(e),Q=a.get(r);if($&&Q)return $==r&&Q==e;var oe=!0;a.set(e,r),a.set(r,e);for(var fe=l;++R0){if(++r>=fx)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var hx=px,vx=hx(sx),zd=vx;function yx(e,r){return zd(Ld(e,r,Js),e+"")}var gx=yx;function mx(e,r,t){if(!Tt(t))return!1;var n=typeof r;return(n=="number"?Jn(t)&&ma(r,t.length):n=="string"&&r in t)?Zt(t[r],e):!1}var bx=mx;function Ox(e){return gx(function(r,t){var n=-1,o=t.length,a=o>1?t[o-1]:void 0,l=o>2?t[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,l&&bx(t[0],t[1],l)&&(a=o<3?void 0:a,o=1),r=Object(r);++n0&&t(p)?r>1?Gd(p,r-1,t,n,o):ui(o,p):n||(o[o.length]=p)}return o}var Cx=Gd;function Rx(e){var r=e==null?0:e.length;return r?Cx(e,1):[]}var Ix=Rx;function _x(e){return zd(Ld(e,void 0,Ix),e+"")}var Bx=_x,Lx=Bx(function(e,r){return e==null?{}:Nx(e,r)}),ci=Lx,It,kd,$d,Ud,Xd,Yd,Wd,Kd,Vd,Zd,Jd,Qd,qd,ep,tp,rp,np,op;function Kt(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function zx(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ip(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 l=this.CanvasPointToHtmlPoint([t,n]),p=Ma(l,2),g=p[0],x=p[1],w=o/2-g,R=a/2-x;this.TRANSLATE_X+=w,this.TRANSLATE_Y+=R,this.emitGraphTransform("focusOn")}}]),e}(),fp=Rr(Bt.prototype,"SCALE_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),cp=Rr(Bt.prototype,"SKEW_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),dp=Rr(Bt.prototype,"SKEW_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),pp=Rr(Bt.prototype,"SCALE_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),hp=Rr(Bt.prototype,"TRANSLATE_X",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),vp=Rr(Bt.prototype,"TRANSLATE_Y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),yp=Rr(Bt.prototype,"ZOOM_SIZE",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Rr(Bt.prototype,"zoom",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"zoom"),Bt.prototype),Rr(Bt.prototype,"resetZoom",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"resetZoom"),Bt.prototype),Rr(Bt.prototype,"translate",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"translate"),Bt.prototype),Rr(Bt.prototype,"focusOn",[f.k],Object.getOwnPropertyDescriptor(Bt.prototype,"focusOn"),Bt.prototype),Bt);function Kx(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&&ax&&l1&&arguments[1]!==void 0?arguments[1]:0,t=(Vt[e[r+0]]+Vt[e[r+1]]+Vt[e[r+2]]+Vt[e[r+3]]+"-"+Vt[e[r+4]]+Vt[e[r+5]]+"-"+Vt[e[r+6]]+Vt[e[r+7]]+"-"+Vt[e[r+8]]+Vt[e[r+9]]+"-"+Vt[e[r+10]]+Vt[e[r+11]]+Vt[e[r+12]]+Vt[e[r+13]]+Vt[e[r+14]]+Vt[e[r+15]]).toLowerCase();if(!gP(t))throw TypeError("Stringified UUID is invalid");return t}var bP=mP;function OP(e,r,t){e=e||{};var n=e.random||(e.rng||hP)();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 bP(n)}var sf=OP,eo=function(){var r=sf();return r},EP=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+sf(),a.id=o[a.id],o},{});return r.edges.forEach(function(o){o.id=t+sf(),o.sourceNodeId=n[o.sourceNodeId],o.targetNodeId=n[o.targetNodeId]}),r};i(104),i(203);var xP=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 l=((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(l-r.x)*(l-t.x)<=0&&(p-r.y)*(p-t.y)<=0&&(l-n.x)*(l-o.x)<=0&&(p-n.y)*(p-o.y)<=0?{x:l,y:p}:!1},pi=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 Na(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Na=function(t){return typeof t}:Na=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Na(e)}function Hp(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 Gp(e){for(var r=1;r=0;a--){var l=n[a],p=MP(r,l);if(p){var g=TP(r,l);if(g){var x={node:l,anchorIndex:g.index,anchor:g.anchor};(!o||PP(l,o.node,t))&&(o=x)}}}return o},PP=function(r,t,n){return r.zIndex>t.zIndex||n.nodesMap[r.id].index>n.nodesMap[t.id].index},TP=function(r,t){for(var n=ff(t),o,a=Number.MAX_SAFE_INTEGER,l=0;l=a.minX-o&&r.x<=a.maxX+o&&r.y>=a.minY-o&&r.y<=a.maxY+o&&(n=!0),n},MP=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,l={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 l},wP=function(r){var t=r,n=t.x,o=t.y,a=t.width,l=t.height,p=t.radius,g=[{x:n-a/2+p,y:o-l/2+p,r:p},{x:n+a/2-p,y:o-l/2+p,r:p},{x:n-a/2+p,y:o+l/2-p,r:p},{x:n+a/2-p,y:o+l/2-p,r:p}];return g},kp=function(r,t,n){var o=wP(n),a,l=Number.MAX_SAFE_INTEGER;o.forEach(function(g){var x=Yr(r.x,r.y,g.x,g.y);xa.minX&&r.xa.minY&&r.yB.x&&($=B,Q=R);var oe={x:r.x,y:r.y};if($.x===Q.x&&t===Dt.HORIZONTAL&&(oe={x:$.x,y:r.y}),$.y===Q.y&&t===Dt.VERTICAL&&(oe={x:r.x,y:$.y}),$.x!==Q.x&&$.y!==Q.y){var fe=(Q.y-$.y)/(Q.x-$.x),le=($.x*Q.y-Q.x*$.y)/($.x-Q.x);t===Dt.HORIZONTAL?oe={x:(r.y-le)/fe,y:r.y}:t===Dt.VERTICAL&&(oe={x:r.x,y:fe*r.x+le})}var Ne=pi(oe,R,B);if(Ne){var Se=Yr(oe.x,oe.y,r.x,r.y);Ser.x?a=r.x+n/2:t.xr.y?l=r.y+o/2:t.y1?t.forEach(function(g){var x=document.createElement("div");x.textContent=g,l.appendChild(x)}):l.textContent=t,document.body.appendChild(l);var p=l.clientHeight;return document.body.removeChild(l),p},df=function(r){var t=r.rows,n=r.rowsLength,o=r.fontSize,a=0;return t&&t.forEach(function(l){var p=Bh(l);a=p>a?p:a}),{width:Math.ceil(a/2)*o+o/4,height:n*(o+2)+o/4}},Ca=function(r){return Na(r)!=="object"?{isAllPass:!!r,msg:r?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:r},Wp={node:!1,edge:!1},NP={node:!0,edge:!0},DP={stroke:"red",strokeDasharray:"10 200",className:"lf-edge-animation"},er=function(r){try{return JSON.parse(JSON.stringify(r))}catch{return r}},jP=1e3,CP=999,pf=function(){return++jP},RP=function(){return--CP},Te,Kp,Vp,Zp,Jp,Qp,qp,eh,th,rh,nh,oh,ih,ah,uh,lh,sh,fh,ch,dh;function ph(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Ir(e){for(var r=1;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){or(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}(),Kp=ot(Te.prototype,"type",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Vp=ot(Te.prototype,"sourceNodeId",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Zp=ot(Te.prototype,"targetNodeId",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Jp=ot(Te.prototype,"startPoint",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Qp=ot(Te.prototype,"endPoint",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),qp=ot(Te.prototype,"text",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),eh=ot(Te.prototype,"properties",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),th=ot(Te.prototype,"points",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),rh=ot(Te.prototype,"pointsList",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),nh=ot(Te.prototype,"isSelected",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),oh=ot(Te.prototype,"isHovered",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ih=ot(Te.prototype,"isHitable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ah=ot(Te.prototype,"draggable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),uh=ot(Te.prototype,"visible",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),lh=ot(Te.prototype,"isAnimation",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),sh=ot(Te.prototype,"zIndex",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),fh=ot(Te.prototype,"state",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ch=ot(Te.prototype,"style",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),dh=ot(Te.prototype,"arrowConfig",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),ot(Te.prototype,"sourceNode",[f.m],Object.getOwnPropertyDescriptor(Te.prototype,"sourceNode"),Te.prototype),ot(Te.prototype,"targetNode",[f.m],Object.getOwnPropertyDescriptor(Te.prototype,"targetNode"),Te.prototype),ot(Te.prototype,"textPosition",[f.m],Object.getOwnPropertyDescriptor(Te.prototype,"textPosition"),Te.prototype),ot(Te.prototype,"setProperty",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setProperty"),Te.prototype),ot(Te.prototype,"setProperties",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setProperties"),Te.prototype),ot(Te.prototype,"setStyle",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setStyle"),Te.prototype),ot(Te.prototype,"setStyles",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setStyles"),Te.prototype),ot(Te.prototype,"updateStyles",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"updateStyles"),Te.prototype),ot(Te.prototype,"formatText",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"formatText"),Te.prototype),ot(Te.prototype,"resetTextPosition",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"resetTextPosition"),Te.prototype),ot(Te.prototype,"moveText",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"moveText"),Te.prototype),ot(Te.prototype,"setText",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setText"),Te.prototype),ot(Te.prototype,"updateText",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"updateText"),Te.prototype),ot(Te.prototype,"setAnchors",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setAnchors"),Te.prototype),ot(Te.prototype,"setSelected",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setSelected"),Te.prototype),ot(Te.prototype,"setHovered",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setHovered"),Te.prototype),ot(Te.prototype,"setHitable",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setHitable"),Te.prototype),ot(Te.prototype,"openEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"openEdgeAnimation"),Te.prototype),ot(Te.prototype,"closeEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"closeEdgeAnimation"),Te.prototype),ot(Te.prototype,"setElementState",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setElementState"),Te.prototype),ot(Te.prototype,"updateStartPoint",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"updateStartPoint"),Te.prototype),ot(Te.prototype,"moveStartPoint",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"moveStartPoint"),Te.prototype),ot(Te.prototype,"updateEndPoint",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"updateEndPoint"),Te.prototype),ot(Te.prototype,"moveEndPoint",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"moveEndPoint"),Te.prototype),ot(Te.prototype,"setZIndex",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"setZIndex"),Te.prototype),ot(Te.prototype,"initPoints",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"initPoints"),Te.prototype),ot(Te.prototype,"updateAttributes",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"updateAttributes"),Te.prototype),ot(Te.prototype,"getAdjustStart",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"getAdjustStart"),Te.prototype),ot(Te.prototype,"getAdjustEnd",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"getAdjustEnd"),Te.prototype),ot(Te.prototype,"updateAfterAdjustStartAndEnd",[f.k],Object.getOwnPropertyDescriptor(Te.prototype,"updateAfterAdjustStartAndEnd"),Te.prototype),Te),vf=hf;function Ra(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ra=function(t){return typeof t}:Ra=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(e)}function vh(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 yh(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);tw)&&(g=w,p=x)}),p}},{key:"getCorssPoint",value:function(o,a,l){var p;return o===Dt.HORIZONTAL?p={x:l.x,y:a.y}:o===Dt.VERTICAL&&(p={x:a.x,y:l.y}),p}},{key:"removeCrossPoints",value:function(o,a,l){var p=l.map(function(Ie){return Ie});if(o===1){var g=p[o],x=p[a],w=p[o-1],R=Ch(w,g,this.sourceNode);if(R){var B=Rh(g,x,this.sourceNode);if(B){var $=Ih(g,x,this.sourceNode);$&&(p[o]=$,p.splice(o-1,1),o--,a--)}}else{var Q=this.sourceNode.anchors;Q.forEach(function(Ie){if(Ie.x===w.x&&Ie.x===g.x||Ie.y===w.y&&Ie.y===g.y){var Je=Yr(Ie.x,Ie.y,g.x,g.y),ke=Yr(w.x,w.y,g.x,g.y);Je0?this.points=this.pointsList.map(function(o){return"".concat(o.x,",").concat(o.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var o=jh({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 l=o.start,p=o.end,g=o.startIndex,x=o.endIndex,w=o.direction,R=this.pointsList,B=R;return w===Dt.HORIZONTAL?(R[g]={x:l.x,y:l.y+a.y},R[x]={x:p.x,y:p.y+a.y},B=this.pointsList.map(function($){return $})):w===Dt.VERTICAL&&(R[g]={x:l.x+a.x,y:l.y},R[x]={x:p.x+a.x,y:p.y},B=this.pointsList.map(function($){return $})),this.updatePointsAfterDrage(B),this.draginngPointList=B,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},R[g]),end:Object.assign({},R[x]),startIndex:g,endIndex:x,direction:w}}},{key:"dragAppend",value:function(o,a){this.isDragging=!0;var l=o.start,p=o.end,g=o.startIndex,x=o.endIndex,w=o.direction,R=this.pointsList;if(w===Dt.HORIZONTAL){R[g]={x:l.x,y:l.y+a.y},R[x]={x:p.x,y:p.y+a.y};var B=this.pointsList.map(function(yt){return yt});if(g!==0&&x!==this.pointsList.length-1&&(B=this.removeCrossPoints(g,x,B)),g===0){var $={x:l.x,y:l.y+a.y},Q=jn($,this.sourceNode);if(!Q){var oe=this.sourceNode.anchors;B=this.getDragingPoints(w,"start",$,oe,B)}}if(x===this.pointsList.length-1){var fe={x:p.x,y:p.y+a.y},le=jn(fe,this.targetNode);if(!le){var Ne=this.targetNode.anchors;B=this.getDragingPoints(w,"end",fe,Ne,B)}}B=Tf(B),this.updatePointsAfterDrage(B),this.draginngPointList=B}else if(w===Dt.VERTICAL){R[g]={x:l.x+a.x,y:l.y},R[x]={x:p.x+a.x,y:p.y};var Se=this.pointsList.map(function(yt){return yt});if(g!==0&&x!==this.pointsList.length-1&&(Se=this.removeCrossPoints(g,x,Se)),g===0){var Pe={x:l.x+a.x,y:l.y},Ge=jn(Pe,this.sourceNode);if(!Ge){var Ie=this.sourceNode.anchors;Se=this.getDragingPoints(w,"start",Pe,Ie,Se)}}if(x===this.pointsList.length-1){var Je={x:p.x+a.x,y:p.y},ke=jn(Je,this.targetNode);if(!ke){var pt=this.targetNode.anchors;Se=this.getDragingPoints(w,"end",Je,pt,Se)}}Se=Tf(Se),this.updatePointsAfterDrage(Se),this.draginngPointList=Se}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},R[g]),end:Object.assign({},R[x]),startIndex:g,endIndex:x,direction:w}}},{key:"dragAppendEnd",value:function(){if(this.draginngPointList){var o=Ao(this.points);this.pointsList=o.map(function(p){return p}),this.draginngPointList=[];var a=o[0];this.startPoint=Object.assign({},a);var l=o[o.length-1];this.endPoint=Object.assign({},l)}this.isDragging=!1}},{key:"updatePointsAfterDrage",value:function(o){var a=this.updateCrossPoints(o);this.points=a.map(function(l){return"".concat(l.x,",").concat(l.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,l=o.endPoint,p=o.sourceNode,g=o.targetNode,x=jh({x:a.x,y:a.y},{x:l.x,y:l.y},p,g,this.offset||0);this.pointsList=x,this.initPoints()}}]),t}(vf),Oh=ir(at.prototype,"dbClickPosition",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ir(at.prototype,"initPoints",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"initPoints"),at.prototype),ir(at.prototype,"updatePoints",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updatePoints"),at.prototype),ir(at.prototype,"updateStartPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updateStartPoint"),at.prototype),ir(at.prototype,"moveStartPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"moveStartPoint"),at.prototype),ir(at.prototype,"updateEndPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updateEndPoint"),at.prototype),ir(at.prototype,"moveEndPoint",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"moveEndPoint"),at.prototype),ir(at.prototype,"dragAppendStart",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppendStart"),at.prototype),ir(at.prototype,"dragAppendSimple",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppendSimple"),at.prototype),ir(at.prototype,"dragAppend",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppend"),at.prototype),ir(at.prototype,"dragAppendEnd",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"dragAppendEnd"),at.prototype),ir(at.prototype,"updatePointsAfterDrage",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updatePointsAfterDrage"),at.prototype),ir(at.prototype,"getAdjustStart",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"getAdjustStart"),at.prototype),ir(at.prototype,"getAdjustEnd",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"getAdjustEnd"),at.prototype),ir(at.prototype,"updateAfterAdjustStartAndEnd",[f.k],Object.getOwnPropertyDescriptor(at.prototype,"updateAfterAdjustStartAndEnd"),at.prototype),at),vi=function(r){var t=r.start,n=r.end,o=r.offset,a=r.verticalLength,l=r.type,p={leftX:0,leftY:0,rightX:0,rightY:0},g=Math.atan((n.y-t.y)/(n.x-t.x)),x=Math.atan(o/a),w=Math.sqrt(a*a+o*o);return l==="start"?n.x>=t.x?(p.leftX=t.x+w*Math.sin(g+x),p.leftY=t.y-w*Math.cos(g+x),p.rightX=t.x-w*Math.sin(g-x),p.rightY=t.y+w*Math.cos(g-x)):(p.leftX=t.x-w*Math.sin(g+x),p.leftY=t.y+w*Math.cos(g+x),p.rightX=t.x+w*Math.sin(g-x),p.rightY=t.y-w*Math.cos(g-x)):l==="end"&&(n.x>=t.x?(p.leftX=n.x+w*Math.sin(g-x),p.leftY=n.y-w*Math.cos(g-x),p.rightX=n.x-w*Math.sin(g+x),p.rightY=n.y+w*Math.cos(g+x)):(p.leftX=n.x-w*Math.sin(g-x),p.leftY=n.y+w*Math.cos(g-x),p.rightX=n.x+w*Math.sin(g+x),p.rightY=n.y-w*Math.cos(g+x))),p};function Th(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 Ba(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},Fa=function(r,t){var n=cT(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}},wh=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),l=Math.max(r.maxY,t.maxY);return{centerX:(n+a)/2,centerY:(o+l)/2,minX:n,minY:o,maxX:a,maxY:l,height:l-o,width:a-n}},yi=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(R){n.push(R.x),o.push(R.y)});var a=Math.min.apply(Math,n),l=Math.max.apply(Math,n),p=Math.min.apply(Math,o),g=Math.max.apply(Math,o),x=l-a,w=g-p;return t&&(x+=t,w+=t),{centerX:(a+l)/2,centerY:(p+g)/2,maxX:l,maxY:g,minX:a,minY:p,x:(a+l)/2,y:(p+g)/2,height:w,width:x}},Ha=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}]},Ga=function(r,t){var n=r.x,o=r.y;return nt.maxX||ot.maxY},dT=function(r,t){return tr.maxX?[]:[{x:t,y:r.minY},{x:t,y:r.maxY}]},pT=function(r,t){return tr.maxY?[]:[{x:r.minX,y:t},{x:r.maxX,y:t}]},hT=function(r,t){return dT(r,t.x).concat(pT(r,t.y))},Pf=function(r,t){return Math.abs(r.x-t.x)+Math.abs(r.y-t.y)},vT=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},Ah=function(r,t,n,o,a){return Pf(r,t)+Pf(r,n)+vT(r,[t,n,o,a])},yT=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)},gT=function(r,t){var n=r.indexOf(t);n>-1&&r.splice(n,1)},gi=function(r,t,n,o){var a=t.x-r.x,l=t.y-r.y,p=o.x-n.x,g=o.y-n.y,x=(-l*(r.x-n.x)+a*(r.y-n.y))/(-p*l+a*g),w=(p*(r.y-n.y)-g*(r.x-n.x))/(-p*l+a*g);return x>=0&&x<=1&&w>=0&&w<=1},Nh=function(r,t,n){if(n.width===0&&n.height===0)return!1;var o=Ha(n),a=Ef(o,4),l=a[0],p=a[1],g=a[2],x=a[3];return gi(r,t,l,p)||gi(r,t,l,x)||gi(r,t,p,g)||gi(r,t,g,x)},mT=function(r,t,n,o){var a=[];return r.forEach(function(l){l!==t&&(l.x===t.x||l.y===t.y)&&!Nh(l,t,n)&&!Nh(l,t,o)&&a.push(l)}),Sf(a)},bT=function(r,t,n,o,a,l,p){var g=[],x=[t],w={},R={},B={};R[t.id]=0,B[t.id]=Ah(t,n,t);var $={};r.forEach(function(fe){$[fe.id]=fe});for(var Q=function(){var le=void 0,Ne=1/0;if(x.forEach(function(Pe){B[Pe.id]=R[Pe.id]||(w[Pe.id]=le.id,R[Pe.id]=Ge,B[Pe.id]=R[Pe.id]+Ah(Pe,n,t,l,p))}})};x.length;){var oe=Q();if(La(oe)==="object")return oe.v}return[t,n]},Dh=function(r){var t=mr(r);return t},Tf=function(r){for(var t=r,n=1;n2&&(Ne=Tf(Ne)),Sf(Ne)},OT=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=Yr(n.x,n.y,o.x,o.y),l=1;la&&(a=x,n=p,o=g)}t=[n,o]}return t},Ch=function(r,t,n){var o=jn(r,n),a=jn(t,n);return o&&a},Rh=function(r,t,n){var o=jn(r,n),a=jn(t,n),l=o&&a,p=o||a;return!l&&p},Ih=function(r,t,n){for(var o,a,l=mr(n),p=Ha(l),g=0;g=1&&o<=126||o>=65376&&o<=65439?t+=1:t+=2}return t},xT=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},l=vi(Ba(Ba({},a),{},{type:"start"})),p=vi(Ba(Ba({},a),{},{type:"end"}));o="M".concat(l.leftX," ").concat(l.leftY,` L`).concat(l.rightX," ").concat(l.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"}},Lh=function(r){var t=r.start,n=r.end,o=r.sourceNode,a=r.targetNode,l=r.offset,p=mr(o),g=mr(a),x=za(p,l),w=za(g,l),R=Fa(x,t),B=Fa(w,n);return{sNext:R,ePre:B}},$a=function(r){var t=r.replace(/M/g,"").replace(/C/g,",").split(","),n=Ua(t[0]),o=Ua(t[1]),a=Ua(t[2]),l=Ua(t[3]);return[n,o,a,l]},Ua=function(r){var t=r.replace(/(^\s*)/g,"").split(" "),n=Ef(t,2),o=n[0],a=n[1];return{x:+o,y:+a}},ST=function(r){var t=$a(r);return[t[2],t[3]]},zh=function(r,t){for(var n=r.x,o=r.y,a=Ao(t),l=Number.MAX_SAFE_INTEGER,p,g=[],x=0;xg||Math.abs(fe)>g)){var Ge=oe%g,Ie=fe%g,Je=oe-Ge,ke=fe-Ie;oe=Ge,fe=Ie,o({deltaX:Je,deltaY:ke,event:Pe})}}function Ne(Pe){if(w&&Pe.stopPropagation(),B=!1,Wr.removeEventListener("mousemove",le,!1),Wr.removeEventListener("mouseup",Ne,!1),!!R)return R=!1,l({event:Pe})}function Se(Pe){if(Pe.button===Gh)return w&&Pe.stopPropagation(),B=!0,$=Pe.clientX,Q=Pe.clientY,Wr.addEventListener("mousemove",le,!1),Wr.addEventListener("mouseup",Ne,!1),t({event:Pe})}return Se}var to=function(){function e(r){var t=this,n=r.onDragStart,o=n===void 0?No:n,a=r.onDraging,l=a===void 0?No:a,p=r.onDragEnd,g=p===void 0?No:p,x=r.eventType,w=x===void 0?"":x,R=r.eventCenter,B=R===void 0?null:R,$=r.step,Q=$===void 0?1:$,oe=r.isStopPropagation,fe=oe===void 0?!0:oe,le=r.model,Ne=le===void 0?null:le;MT(this,e),Ft(this,"onDragStart",void 0),Ft(this,"onDraging",void 0),Ft(this,"onDragEnd",void 0),Ft(this,"step",void 0),Ft(this,"isStopPropagation",void 0),Ft(this,"isDraging",!1),Ft(this,"isStartDraging",!1),Ft(this,"startX",0),Ft(this,"startY",0),Ft(this,"sumDeltaX",0),Ft(this,"sumDeltaY",0),Ft(this,"eventType",void 0),Ft(this,"eventCenter",void 0),Ft(this,"model",void 0),Ft(this,"startTime",void 0),Ft(this,"isGrag",void 0),Ft(this,"handleMouseDown",function(Se){var Pe,Ge;if(Se.button===Gh){t.isStopPropagation&&Se.stopPropagation(),t.isStartDraging=!0,t.startX=Se.clientX,t.startY=Se.clientY,Wr.addEventListener("mousemove",t.handleMouseMove,!1),Wr.addEventListener("mouseup",t.handleMouseUp,!1);var Ie=(Pe=t.model)===null||Pe===void 0?void 0:Pe.getData();(Ge=t.eventCenter)===null||Ge===void 0||Ge.emit(it["".concat(t.eventType,"_MOUSEDOWN")],{e:Se,data:Ie}),t.startTime=new Date().getTime()}}),Ft(this,"handleMouseMove",function(Se){if(t.isStopPropagation&&Se.stopPropagation(),!!t.isStartDraging&&(t.sumDeltaX+=Se.clientX-t.startX,t.sumDeltaY+=Se.clientY-t.startY,t.startX=Se.clientX,t.startY=Se.clientY,t.step<=1||Math.abs(t.sumDeltaX)>t.step||Math.abs(t.sumDeltaY)>t.step)){var Pe,Ge=t.sumDeltaX%t.step,Ie=t.sumDeltaY%t.step,Je=t.sumDeltaX-Ge,ke=t.sumDeltaY-Ie;t.sumDeltaX=Ge,t.sumDeltaY=Ie;var pt=(Pe=t.model)===null||Pe===void 0?void 0:Pe.getData();if(!t.isDraging){var yt;(yt=t.eventCenter)===null||yt===void 0||yt.emit(it["".concat(t.eventType,"_DRAGSTART")],{e:Se,data:pt}),t.onDragStart({event:Se})}t.isDraging=!0,Promise.resolve().then(function(){var lr,Or;t.onDraging({deltaX:Je,deltaY:ke,event:Se}),(lr=t.eventCenter)===null||lr===void 0||lr.emit(it["".concat(t.eventType,"_MOUSEMOVE")],{e:Se,data:pt}),(Or=t.eventCenter)===null||Or===void 0||Or.emit(it["".concat(t.eventType,"_DRAG")],{e:Se,data:pt})})}}),Ft(this,"handleMouseUp",function(Se){t.isStartDraging=!1,t.isStopPropagation&&Se.stopPropagation(),Promise.resolve().then(function(){var Pe,Ge,Ie;Wr.removeEventListener("mousemove",t.handleMouseMove,!1),Wr.removeEventListener("mouseup",t.handleMouseUp,!1);var Je=(Pe=t.model)===null||Pe===void 0?void 0:Pe.getData();(Ge=t.eventCenter)===null||Ge===void 0||Ge.emit(it["".concat(t.eventType,"_MOUSEUP")],{e:Se,data:Je}),t.isDraging&&(t.isDraging=!1,t.onDragEnd({event:Se}),(Ie=t.eventCenter)===null||Ie===void 0||Ie.emit(it["".concat(t.eventType,"_DROP")],{e:Se,data:Je}))})}),Ft(this,"cancelDrag",function(){Wr.removeEventListener("mousemove",t.handleMouseMove,!1),Wr.removeEventListener("mouseup",t.handleMouseUp,!1),t.isDraging=!1}),this.onDragStart=o,this.onDraging=l,this.onDragEnd=g,this.step=Q,this.isStopPropagation=fe,this.eventType=w,this.eventCenter=B,this.model=Ne}return wT(e,[{key:"setStep",value:function(t){this.step=t}}]),e}(),AT=function(r){return!r||typeof r=="boolean"?jt(r===!0?NP:Wp):Ip(jt(Wp),r)},pe,kh,$h,Uh,Xh,Yh,Wh,Kh,Vh,Zh,Jh,Qh,qh;function ev(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 Xa(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,l=[],p=[];this.nodes.forEach(function(w){return p.push(w)}),this.edges.forEach(function(w){return p.push(w)});for(var g=0;g3&&arguments[3]!==void 0?arguments[3]:!0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(t.BaseType===Gt.NODE){t=t;for(var p=mr(t),g=p.minX,x=p.minY,w=p.maxX,R=p.maxY,B=[{x:g,y:x},{x:w,y:x},{x:w,y:R},{x:g,y:R}],$=l,Q=0;Q0&&arguments[0]!==void 0?arguments[0]:!0,n=this.selectElements,o={nodes:[],edges:[]};return n.forEach(function(a){if(a.BaseType===Gt.NODE&&o.nodes.push(a.getData()),a.BaseType===Gt.EDGE){var l=a.getData(),p=n.get(l.sourceNodeId)&&n.get(l.targetNodeId);(t||p)&&o.edges.push(l)}}),o}},{key:"updateAttributes",value:function(t,n){var o=this.getElement(t);o.updateAttributes(n)}},{key:"changeNodeId",value:function(t,n){return n||(n=eo()),this.nodesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8282\u70B9".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):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("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8282\u70B9".concat(n,", \u4FEE\u6539\u5931\u8D25")),"")}},{key:"changeEdgeId",value:function(t,n){return n||(n=eo()),this.edgesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):this.edgesMap[t]?(this.edges.forEach(function(o){o.id===t&&(o.id=n)}),n):(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),"")}},{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 l;(l=this.topElement)===null||l===void 0||l.setZIndex(),a.setZIndex(sp),this.topElement=a}this.overlapMode===gr.INCREASE&&this.setElementZIndex(t,"top")}}},{key:"setElementZIndex",value:function(t,n){var o,a,l=((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(l){var p;typeof n=="number"&&(p=n),n==="top"&&(p=pf()),n==="bottom"&&(p=RP()),l.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=er(t);n.id&&this.nodesMap[t.id]&&delete n.id;var o=this.getModel(n.type);if(!o)throw new Error("\u627E\u4E0D\u5230".concat(n.type,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var a=new o(n,this);this.nodes.push(a);var l=a.getData();return this.eventCenter.emit(it.NODE_ADD,{data:l}),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,l=this.nodesMap[t];if(!l){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(t,"\u7684\u8282\u70B9"));return}var p=l.model,g=p.move(n,o,a);g&&this.moveEdge(t,n,o)}},{key:"moveNode2Coordinate",value:function(t,n,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,l=this.nodesMap[t];if(!l){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(t,"\u7684\u8282\u70B9"));return}var p=l.model,g=p.x,x=p.y,w=n-g,R=o-x;this.moveNode(t,w,R,a)}},{key:"editText",value:function(t){this.setElementStateById(t,Et.TEXT_EDIT)}},{key:"addEdge",value:function(t){var n=er(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("\u627E\u4E0D\u5230".concat(o,"\u5BF9\u5E94\u7684\u8FB9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8FB9\u3002"));var l=new a(Xa(Xa({},n),{},{type:o}),this),p=l.getData();return this.edges.push(l),this.eventCenter.emit(it.EDGE_ADD,{data:p}),l}},{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,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;t.forEach(function(p){return a.moveNode(p,n,o,l)})}},{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("\u627E\u4E0D\u5230id\u4E3A".concat(t,"\u7684\u8282\u70B9"));return}var a=o.getData();a.type=n;var l=this.getModel(n);if(!l)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var p=new l(a,this);this.nodes.splice(this.nodesMap[t].index,1,p);var g=this.getNodeEdges(t);g.forEach(function(x){if(x.sourceNodeId===t){var w=Xp(p,x.startPoint,p.width,p.height);x.updateStartPoint(w)}if(x.targetNodeId===t){var R=Xp(p,x.endPoint,p.width,p.height);x.updateEndPoint(R)}})}},{key:"changeEdgeType",value:function(t,n){var o=this.getEdgeModelById(t);if(!o){console.warn("\u627E\u4E0D\u5230id\u4E3A".concat(t,"\u7684\u8FB9"));return}if(o.type!==n){var a=o.getData();a.type=n;var l=this.getModel(n);if(!l)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));delete a.pointsList;var p=new l(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=_p(Xa(Xa({},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("\u6E32\u67D3\u753B\u5E03\u7684\u65F6\u5019\u65E0\u6CD5\u83B7\u53D6\u753B\u5E03\u5BBD\u9AD8\uFF0C\u8BF7\u786E\u8BA4\u5728container\u5DF2\u6302\u8F7D\u5230DOM\u3002@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($){var Q=$.x,oe=$.y,fe=$.width,le=$.height,Ne=$.getNodeStyle(),Se=Ne.strokeWidth,Pe=Se===void 0?0:Se;n=n.concat([Q+fe/2+Pe,Q-fe/2-Pe]),o=o.concat([oe+le/2+Pe,oe-le/2-Pe])});var a=Math.min.apply(Math,Do(n)),l=Math.max.apply(Math,Do(n)),p=Math.min.apply(Math,Do(o)),g=Math.max.apply(Math,Do(o)),x=l-a||0,w=g-p||0,R=a+x/2,B=p+w/2;return{virtualRectWidth:x,virtualRectHeight:w,virtualRectCenterPositionX:R,virtualRectCenterPositionY:B}}},{key:"translateCenter",value:function(){var t=this.nodes,n=this.width,o=this.height,a=this.rootEl,l=this.transformModel;if(!!t.length){var p=n||a.clientWidth,g=o||a.clientHeight,x=this.getVirtualRectSize(),w=x.virtualRectCenterPositionX,R=x.virtualRectCenterPositionY;l.focusOn(w,R,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,l=this.height,p=this.rootEl,g=this.transformModel;if(!!o.length){var x=a||p.clientWidth,w=l||p.clientHeight,R=this.getVirtualRectSize(),B=R.virtualRectWidth,$=R.virtualRectHeight,Q=R.virtualRectCenterPositionX,oe=R.virtualRectCenterPositionY,fe=(B+n)/x,le=($+t)/w,Ne=0;Ne=1/Math.max(fe,le);var Se=[x/2,w/2];g.zoom(Ne,Se),g.focusOn(Q,oe,x,w)}}},{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}(),kh=Ve(pe.prototype,"width",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$h=Ve(pe.prototype,"height",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Uh=Ve(pe.prototype,"edgeType",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xh=Ve(pe.prototype,"nodes",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Yh=Ve(pe.prototype,"edges",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Wh=Ve(pe.prototype,"overlapMode",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return gr.DEFAULT}}),Kh=Ve(pe.prototype,"background",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Vh=Ve(pe.prototype,"transformModel",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Zh=Ve(pe.prototype,"editConfigModel",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jh=Ve(pe.prototype,"gridSize",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Qh=Ve(pe.prototype,"partial",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qh=Ve(pe.prototype,"fakerNode",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ve(pe.prototype,"nodesMap",[f.m],Object.getOwnPropertyDescriptor(pe.prototype,"nodesMap"),pe.prototype),Ve(pe.prototype,"edgesMap",[f.m],Object.getOwnPropertyDescriptor(pe.prototype,"edgesMap"),pe.prototype),Ve(pe.prototype,"modelsMap",[f.m],Object.getOwnPropertyDescriptor(pe.prototype,"modelsMap"),pe.prototype),Ve(pe.prototype,"sortElements",[f.m],Object.getOwnPropertyDescriptor(pe.prototype,"sortElements"),pe.prototype),Ve(pe.prototype,"textEditElement",[f.m],Object.getOwnPropertyDescriptor(pe.prototype,"textEditElement"),pe.prototype),Ve(pe.prototype,"selectElements",[f.m],Object.getOwnPropertyDescriptor(pe.prototype,"selectElements"),pe.prototype),Ve(pe.prototype,"setFakerNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"setFakerNode"),pe.prototype),Ve(pe.prototype,"removeFakerNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"removeFakerNode"),pe.prototype),Ve(pe.prototype,"setModel",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"setModel"),pe.prototype),Ve(pe.prototype,"toFront",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"toFront"),pe.prototype),Ve(pe.prototype,"setElementZIndex",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"setElementZIndex"),pe.prototype),Ve(pe.prototype,"deleteNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"deleteNode"),pe.prototype),Ve(pe.prototype,"addNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"addNode"),pe.prototype),Ve(pe.prototype,"cloneNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"cloneNode"),pe.prototype),Ve(pe.prototype,"moveNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"moveNode"),pe.prototype),Ve(pe.prototype,"moveNode2Coordinate",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"moveNode2Coordinate"),pe.prototype),Ve(pe.prototype,"editText",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"editText"),pe.prototype),Ve(pe.prototype,"addEdge",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"addEdge"),pe.prototype),Ve(pe.prototype,"moveEdge",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"moveEdge"),pe.prototype),Ve(pe.prototype,"deleteEdgeBySourceAndTarget",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"deleteEdgeBySourceAndTarget"),pe.prototype),Ve(pe.prototype,"deleteEdgeById",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"deleteEdgeById"),pe.prototype),Ve(pe.prototype,"deleteEdgeBySource",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"deleteEdgeBySource"),pe.prototype),Ve(pe.prototype,"deleteEdgeByTarget",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"deleteEdgeByTarget"),pe.prototype),Ve(pe.prototype,"setElementStateById",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"setElementStateById"),pe.prototype),Ve(pe.prototype,"updateText",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"updateText"),pe.prototype),Ve(pe.prototype,"selectNodeById",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"selectNodeById"),pe.prototype),Ve(pe.prototype,"selectEdgeById",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"selectEdgeById"),pe.prototype),Ve(pe.prototype,"selectElementById",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"selectElementById"),pe.prototype),Ve(pe.prototype,"clearSelectElements",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"clearSelectElements"),pe.prototype),Ve(pe.prototype,"moveNodes",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"moveNodes"),pe.prototype),Ve(pe.prototype,"setDefaultEdgeType",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"setDefaultEdgeType"),pe.prototype),Ve(pe.prototype,"changeNodeType",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"changeNodeType"),pe.prototype),Ve(pe.prototype,"changeEdgeType",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"changeEdgeType"),pe.prototype),Ve(pe.prototype,"getNodeIncomingEdge",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"getNodeIncomingEdge"),pe.prototype),Ve(pe.prototype,"getNodeOutgoingEdge",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"getNodeOutgoingEdge"),pe.prototype),Ve(pe.prototype,"getNodeIncomingNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"getNodeIncomingNode"),pe.prototype),Ve(pe.prototype,"getNodeOutgoingNode",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"getNodeOutgoingNode"),pe.prototype),Ve(pe.prototype,"setTheme",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"setTheme"),pe.prototype),Ve(pe.prototype,"resize",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"resize"),pe.prototype),Ve(pe.prototype,"clearData",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"clearData"),pe.prototype),Ve(pe.prototype,"translateCenter",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"translateCenter"),pe.prototype),Ve(pe.prototype,"fitView",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"fitView"),pe.prototype),Ve(pe.prototype,"openEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"openEdgeAnimation"),pe.prototype),Ve(pe.prototype,"closeEdgeAnimation",[f.k],Object.getOwnPropertyDescriptor(pe.prototype,"closeEdgeAnimation"),pe.prototype),pe),LT=ov;function Wa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wa=function(t){return typeof t}:Wa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(e)}var iv;function Af(){return Af=Object.assign||function(e){for(var r=1;r=$){var le=o.stepScrollX%$,Ne=o.stepScrollX-le;B.translate(-Ne*B.SCALE_X,0),o.stepScrollX=le}if(Math.abs(o.stepScrollY)>=$){var Se=o.stepScrollY%$,Pe=o.stepScrollY-Se;B.translate(0,-Pe*B.SCALE_Y),o.stepScrollY=Se}return}if(!R.stopZoomGraph){g.preventDefault();var Ge=Q.getPointByClient({x:g.clientX,y:g.clientY}),Ie=Ge.canvasOverlayPosition,Je=Ie.x,ke=Ie.y;B.zoom(g.deltaY<0,[Je,ke])}}),dn(Kr(o),"clickHandler",function(g){var x=g.target;if(x.getAttribute("name")==="canvas-overlay"){var w=o.props.graphModel,R=w.selectElements;R.size>0&&w.clearSelectElements(),w.eventCenter.emit(it.BLANK_CLICK,{e:g})}}),dn(Kr(o),"handleContextMenu",function(g){var x=g.target;if(x.getAttribute("name")==="canvas-overlay"){g.preventDefault();var w=o.props.graphModel,R=w.getPointByClient({x:g.clientX,y:g.clientY});w.eventCenter.emit(it.BLANK_CONTEXTMENU,{e:g,position:R})}}),dn(Kr(o),"mouseDownHandler",function(g){var x=o.props.graphModel,w=x.eventCenter,R=x.editConfigModel,B=x.transformModel.SCALE_X,$=x.gridSize,Q=g.target,oe=!R.adjustEdge&&!R.adjustNodePosition;(Q.getAttribute("name")==="canvas-overlay"||oe)&&(R.stopMoveGraph?w.emit(it.BLANK_MOUSEDOWN,{e:g}):(o.stepDrag.setStep($*B),o.stepDrag.handleMouseDown(g)),o.clickHandler(g))});var a=n.graphModel,l=a.gridSize,p=a.eventCenter;return o.stepDrag=new to({onDraging:o.onDraging,onDragEnd:o.onDragEnd,step:l,eventType:"BLANK",isStopPropagation:!1,eventCenter:p,model:null}),o.state={isDraging:!1},o}return FT(t,[{key:"render",value:function(){var o=this.props.graphModel.transformModel,a=o.getTransformStyle(),l=a.transform,p=this.props,g=p.children,x=p.dnd,w=this.state.isDraging;return Object(ne.g)("svg",Af({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:w?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},x.eventMap()),Object(ne.g)("g",{transform:l},g))}}]),t}(ne.a))||iv,XT=UT;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 uv;function YT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function lv(e,r){for(var 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);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);t2&&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:l})}},{key:"render",value:function(){var o=this,a=this.props,l=a.graphModel,p=a.tool,g=a.options,x=a.dnd,w=a.snaplineModel,R={};g.width&&(R.width="".concat(l.width,"px")),g.height&&(R.height="".concat(l.height,"px"));var B=l.fakerNode,$=l.editConfigModel,Q=$.adjustEdge;return Object(ne.g)("div",{className:"lf-graph",style:R},Object(ne.g)(XT,{graphModel:l,dnd:x},Object(ne.g)("g",{className:"lf-base"},Sa(l.sortElements,function(oe){return o.getComponent(oe,l)})),B?this.getComponent(B,l):""),Object(ne.g)(fw,{graphModel:l},Object(ne.g)($M,{graphModel:l}),Q?Object(ne.g)(rw,{graphModel:l}):"",!g.isSilentMode&&g.snapline!==!1?Object(ne.g)(NM,{snaplineModel:w}):""),Object(ne.g)(qT,{graphModel:l,tool:p}),g.background&&Object(ne.g)(uM,{background:g.background}),g.grid&&Object(ne.g)(hv,zf({},g.grid,{graphModel:l})))}}]),t}(ne.a))||_v,bw=mw;function Lv(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 yu(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t0){var o=0,a=0;return this.pointsList.forEach(function(l){var p=l.x,g=l.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=Co(In(t.prototype),"getData",this).call(this),a=this.pointsList.map(function(l){var p=l.x,g=l.y;return{x:p,y:g}});return mu(mu({},o),{},{pointsList:a})}},{key:"getControls",value:function(){var o=this.startPoint,a=this.endPoint,l=Lh({start:o,end:a,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset});return l}},{key:"getPath",value:function(o){var a=Hf(o,4),l=a[0],p=a[1],g=a[2],x=a[3];return"M ".concat(l.x," ").concat(l.y,` C `).concat(p.x," ").concat(p.y,`, `).concat(g.x," ").concat(g.y,`, `).concat(x.x," ").concat(x.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,l=o.ePre;this.updatePath(a,l)}},{key:"updatePath",value:function(o,a){var l={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=[l,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 l=Hf(this.pointsList,3),p=l[1],g=l[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 l=Hf(this.pointsList,3),p=l[1],g=l[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,l=o.endPoint,p=o.sourceNode,g=o.targetNode,x=Lh({start:a,end:l,sourceNode:p,targetNode:g,offset:this.offset}),w=x.sNext,R=x.ePre;this.pointsList=[a,w,R,l],this.initPoints()}}]),t}(vf),Gv=_r(gt.prototype,"path",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),_r(gt.prototype,"initPoints",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"initPoints"),gt.prototype),_r(gt.prototype,"updatePoints",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updatePoints"),gt.prototype),_r(gt.prototype,"updateStartPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateStartPoint"),gt.prototype),_r(gt.prototype,"updateEndPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateEndPoint"),gt.prototype),_r(gt.prototype,"moveStartPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"moveStartPoint"),gt.prototype),_r(gt.prototype,"moveEndPoint",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"moveEndPoint"),gt.prototype),_r(gt.prototype,"updateAdjustAnchor",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateAdjustAnchor"),gt.prototype),_r(gt.prototype,"getAdjustStart",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"getAdjustStart"),gt.prototype),_r(gt.prototype,"getAdjustEnd",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"getAdjustEnd"),gt.prototype),_r(gt.prototype,"updateAfterAdjustStartAndEnd",[f.k],Object.getOwnPropertyDescriptor(gt.prototype,"updateAfterAdjustStartAndEnd"),gt.prototype),gt);function _w(e){return e==null}var Bw=_w,Le,Yv,Wv,Kv,Vv,Zv,Jv,Qv,qv,ey,ty,ry,ny,oy,iy,ay,uy,ly,sy;function Ou(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ou=function(t){return typeof t}:Ou=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function Lw(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=zw(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(x){throw x},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,l=!1,p;return{s:function(){t=t.call(e)},n:function(){var x=t.next();return a=x.done,x},e:function(x){l=!0,p=x},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(l)throw p}}}}function zw(e,r){if(!!e){if(typeof e=="string")return fy(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fy(e,r)}}function fy(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t0?t.map(function(l,p){return l.length?(l=l,{id:"".concat(n,"_").concat(p),x:o+l[0],y:a+l[1]}):(l=l,ar(ar({},l),{},{x:o+l.x,y:a+l.y,id:l.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(!Bw(t))for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,l=!1;if(o)a=!0,l=!0;else{var p=this.isAllowMoveNode(t,n);typeof p=="boolean"?(a=p,l=p):(a=p.x,l=p.y)}if(a){var g=this.x+t;this.x=g,this.text&&this.moveText(t,0)}if(l){var x=this.y+n;this.y=x,this.text&&this.moveText(0,n)}return a||l}},{key:"moveTo",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=t-this.x,l=n-this.y;return!o&&!this.isAllowMoveNode(a,l)?!1:(this.text&&this.text&&this.moveText(a,l),this.x=t,this.y=n,!0)}},{key:"moveText",value:function(t,n){var o=this.text,a=o.x,l=o.y,p=o.value,g=o.draggable,x=o.editable;this.text={value:p,editable:x,draggable:g,x:a+t,y:l+n}}},{key:"updateText",value:function(t){this.text=ar(ar({},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}},{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=ar(ar({},this.properties),{},br({},t,er(n))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=ar(ar({},this.properties),er(t)),this.setAttributes()}},{key:"setStyle",value:function(t,n){this.style=ar(ar({},this.style),{},br({},t,er(n)))}},{key:"setStyles",value:function(t){this.style=ar(ar({},this.style),er(t))}},{key:"updateStyles",value:function(t){this.style=ar({},er(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){or(this,t)}}]),e}(),Yv=ht(Le.prototype,"type",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Wv=ht(Le.prototype,"x",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Kv=ht(Le.prototype,"y",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Vv=ht(Le.prototype,"text",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Zv=ht(Le.prototype,"properties",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Jv=ht(Le.prototype,"_width",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Qv=ht(Le.prototype,"_height",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),qv=ht(Le.prototype,"anchorsOffset",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ey=ht(Le.prototype,"isSelected",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ty=ht(Le.prototype,"isHovered",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ry=ht(Le.prototype,"isDragging",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ny=ht(Le.prototype,"isHitable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),oy=ht(Le.prototype,"draggable",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),iy=ht(Le.prototype,"visible",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ay=ht(Le.prototype,"zIndex",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),uy=ht(Le.prototype,"state",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ly=ht(Le.prototype,"autoToFront",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),sy=ht(Le.prototype,"style",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ht(Le.prototype,"incoming",[f.m],Object.getOwnPropertyDescriptor(Le.prototype,"incoming"),Le.prototype),ht(Le.prototype,"outgoing",[f.m],Object.getOwnPropertyDescriptor(Le.prototype,"outgoing"),Le.prototype),ht(Le.prototype,"addNodeMoveRules",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"addNodeMoveRules"),Le.prototype),ht(Le.prototype,"move",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"move"),Le.prototype),ht(Le.prototype,"moveTo",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"moveTo"),Le.prototype),ht(Le.prototype,"moveText",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"moveText"),Le.prototype),ht(Le.prototype,"updateText",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"updateText"),Le.prototype),ht(Le.prototype,"setSelected",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setSelected"),Le.prototype),ht(Le.prototype,"setHovered",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setHovered"),Le.prototype),ht(Le.prototype,"setHitable",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setHitable"),Le.prototype),ht(Le.prototype,"setElementState",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setElementState"),Le.prototype),ht(Le.prototype,"setProperty",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setProperty"),Le.prototype),ht(Le.prototype,"setProperties",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setProperties"),Le.prototype),ht(Le.prototype,"setStyle",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setStyle"),Le.prototype),ht(Le.prototype,"setStyles",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setStyles"),Le.prototype),ht(Le.prototype,"updateStyles",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"updateStyles"),Le.prototype),ht(Le.prototype,"setZIndex",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"setZIndex"),Le.prototype),ht(Le.prototype,"updateAttributes",[f.k],Object.getOwnPropertyDescriptor(Le.prototype,"updateAttributes"),Le.prototype),Le);function Eu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Eu=function(t){return typeof t}:Eu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}var vn,py;function hy(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 vy(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);ta&&(a=g)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(l){var p=Yf(l,2),g=p[1];ga&&(a=g)}),a-o}},{key:"getDefaultAnchor",value:function(){var o=this;return this.points.map(function(a,l){var p=Yf(a,2),g=p[0],x=p[1];return{x:g,y:x,id:"".concat(o.id,"_").concat(l)}})}}]),t}(hn),my=Bo(tr.prototype,"rx",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),by=Bo(tr.prototype,"ry",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Bo(tr.prototype,"points",[f.m],Object.getOwnPropertyDescriptor(tr.prototype,"points"),tr.prototype),Bo(tr.prototype,"pointsPosition",[f.m],Object.getOwnPropertyDescriptor(tr.prototype,"pointsPosition"),tr.prototype),Bo(tr.prototype,"width",[f.m],Object.getOwnPropertyDescriptor(tr.prototype,"width"),tr.prototype),Bo(tr.prototype,"height",[f.m],Object.getOwnPropertyDescriptor(tr.prototype,"height"),tr.prototype),tr);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 Vr,My,wy;function Ay(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 Ny(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);ta&&(a=g)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(l){var p=Jf(l,2),g=p[1];ga&&(a=g)}),a-o}},{key:"getDefaultAnchor",value:function(){var o=this,a=this.x,l=this.y,p=this.width,g=this.height,x=this.points;return x.map(function(w,R){var B=Jf(w,2),$=B[0],Q=B[1];return{x:a+$-p/2,y:l+Q-g/2,id:"".concat(o.id,"_").concat(R)}})}}]),t}(hn),Ry=Cu(Nr.prototype,"points",[f.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Cu(Nr.prototype,"pointsPosition",[f.m],Object.getOwnPropertyDescriptor(Nr.prototype,"pointsPosition"),Nr.prototype),Cu(Nr.prototype,"width",[f.m],Object.getOwnPropertyDescriptor(Nr.prototype,"width"),Nr.prototype),Cu(Nr.prototype,"height",[f.m],Object.getOwnPropertyDescriptor(Nr.prototype,"height"),Nr.prototype),Nr);function Ru(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ru=function(t){return typeof t}:Ru=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}var ec,Fy;function Hy(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 Gy(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);tB?yt=[-lr,0]:Ie<10?yt=[0,lr]:Ie+10>$&&(yt=[0,-lr]),n.setState({endX:ke,endY:pt,draging:!0}),n.moveAnchorEnd(ke,pt),yt.length>0&&!fe&&oe&&(n.t=ig(function(){var Or=yt,rn=JA(Or,2),zn=rn[0],ao=rn[1];w.translate(zn,ao);var Xo=n.state,Fn=Xo.endX,Yo=Xo.endY;n.setState({endX:Fn-zn,endY:Yo-ao}),n.moveAnchorEnd(Fn-zn,Yo-ao)})),R.emit(it.ANCHOR_DRAG,{data:x,e:a,nodeModel:g})}),Jr(Zr(n),"onDragEnd",function(o){n.t&&Hu(n.t),console.log(555,"dragend"),n.checkEnd(o),n.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),n.sourceRuleResults.clear(),n.targetRuleResults.clear()}),Jr(Zr(n),"checkEnd",function(o){var a=n.props,l=a.graphModel,p=a.nodeModel,g=a.anchorData,x=g.x,w=g.y,R=g.id,B=l.edgeType,$=n.state,Q=$.endX,oe=$.endY,fe=$.draging,le=Da({x:Q,y:oe},l);if(n.preTargetNode&&n.preTargetNode.state!==Et.DEFAULT&&n.preTargetNode.setElementState(Et.DEFAULT),!!fe&&le&&le.node){var Ne=le.node,Se=le.anchor.id,Pe="".concat(p.id,"_").concat(Ne.id,"_").concat(Se,"_").concat(R),Ge=n.sourceRuleResults.get(Pe)||{},Ie=Ge.isAllPass,Je=Ge.msg,ke=n.targetRuleResults.get(Pe)||{},pt=ke.isAllPass,yt=ke.msg;if(Ie&&pt){Ne.setElementState(Et.DEFAULT);var lr=l.addEdge({type:B,sourceNodeId:p.id,sourceAnchorId:R,startPoint:{x,y:w},targetNodeId:le.node.id,targetAnchorId:le.anchor.id,endPoint:{x:le.anchor.x,y:le.anchor.y}}),Or=n.props.anchorData;l.eventCenter.emit(it.ANCHOR_DROP,{data:Or,e:o,nodeModel:p,edgeModel:lr})}else{var rn=Ne.getData();l.eventCenter.emit(it.CONNECTION_NOT_ALLOWED,{data:rn,msg:yt||Je})}}}),n.sourceRuleResults=new Map,n.targetRuleResults=new Map,n.state={startX:0,startY:0,endX:0,endY:0,draging:!1},n.dragHandler=new to({onDragStart:n.onDragStart,onDraging:n.onDraging,onDragEnd:n.onDragEnd}),n}return n1(t,[{key:"getAnchorShape",value:function(){var o=this.props,a=o.anchorData,l=o.style,p=o.node,g=p.getAnchorShape(a);if(g)return g;var x=a.x,w=a.y,R=ug(ug({},l),l.hover);return Object(ne.g)("g",null,Object(ne.g)(bi,Si({className:"lf-node-anchor-hover"},R,{x,y:w})),Object(ne.g)(bi,Si({className:"lf-node-anchor"},l,{x,y:w})))}},{key:"moveAnchorEnd",value:function(o,a){var l=this.props,p=l.graphModel,g=l.nodeModel,x=l.anchorData,w=Da({x:o,y:a},p);if(w){var R=w.node,B=w.anchor.id;if(this.preTargetNode&&this.preTargetNode!==w.node&&this.preTargetNode.setElementState(Et.DEFAULT),x.id===B)return;this.preTargetNode=R;var $="".concat(g.id,"_").concat(R.id,"_").concat(B,"_").concat(x.id);if(!this.targetRuleResults.has($)){var Q=w.anchor,oe=g.isAllowConnectedAsSource(R,x,Q),fe=R.isAllowConnectedAsTarget(g,x,Q);this.sourceRuleResults.set($,Ca(oe)),this.targetRuleResults.set($,Ca(fe))}var le=this.sourceRuleResults.get($),Ne=le.isAllPass,Se=this.targetRuleResults.get($),Pe=Se.isAllPass;Ne&&Pe?R.setElementState(Et.ALLOW_CONNECT):R.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,l=o.startY,p=o.endX,g=o.endY,x=Yr(a,l,p,g);return x>10}},{key:"render",value:function(){var o=this,a=this.state,l=a.startX,p=a.startY,g=a.endX,x=a.endY,w=this.props,R=w.anchorData.edgeAddable,B=w.edgeStyle;return Object(ne.g)("g",{className:"lf-anchor"},Object(ne.g)("g",{onMouseDown:function(Q){R!==!1&&o.dragHandler.handleMouseDown(Q)}},this.getAnchorShape()),this.isShowLine()&&Object(ne.g)(ro,Si({x1:l,y1:p,x2:g,y2:x},B,{"pointer-events":"none"})))}}]),t}(ne.a),s1=l1;i(63);function fg(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 f1(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t1){var Se=oe.map(function(Pe,Ge){var Ie=l+2,Je=(Ge-(fe-1)/2)*Ie;return Object(ne.g)("tspan",{className:"lf-text-tspan",x:t,y:o+Je},Pe)});return Object(ne.g)("text",Q,Se)}return Object(ne.g)("text",Q,a)}}function g1(e){var r=e.value,t=e.fontSize,n=e.model,o=e.fontFamily,a=o===void 0?"":o,l=e.lineHeight,p=e.wrapPadding,g=p===void 0?"0, 0":p,x=e.overflowMode,w=e.x,R=e.y,B=n.width,$=n.textHeight,Q=e.textWidth||B,oe=String(r).split(/[\r\n]/g),fe=oe.length,le=Yp({rows:oe,style:{fontSize:"".concat(t,"px"),width:"".concat(Q,"px"),fontFamily:a,lineHeight:l,padding:g},rowsLength:fe,className:"lf-get-text-height"}),Ne=n.height>le?n.height:le;$&&(Ne=$);var Se=x==="ellipsis";return Object(ne.g)("g",null,Object(ne.g)("foreignObject",{width:Q,height:Ne,x:w-Q/2,y:R-Ne/2},Object(ne.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:Ne,width:Q,padding:g}},Object(ne.g)("div",{className:Se?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:f1({},e)},oe.map(function(Pe){return Object(ne.g)("div",{className:"lf-node-text--auto-wrap-inner"},Pe)})))))}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 sc(){return sc=Object.assign||function(e){for(var r=1;re.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);tNe||zn>Se;if(!(fe&&!oe&&ao)){var Xo=le.CanvasPointToHtmlPoint([pt-B.width/2,yt-B.height/2]),Fn=Wu(Xo,2),Yo=Fn[0],td=Fn[1],MC=le.CanvasPointToHtmlPoint([pt+B.width/2,yt+B.height/2]),bm=Wu(MC,2),wC=bm[0],AC=bm[1],Hl=Math.max(Pe,20),Wo=[];Yo<0?Wo=[Hl,0]:wC>$.width?Wo=[-Hl,0]:td<0?Wo=[0,Hl]:AC>$.height&&(Wo=[0,-Hl]),o.t&&Hu(o.t),Wo.length>0&&!oe&&fe?o.t=ig(function(){var NC=Wo,Om=Wu(NC,2),Em=Om[0],xm=Om[1];le.translate(Em,xm),$.moveNode(B.id,-Em/le.SCALE_X,-xm/le.SCALE_X)}):$.moveNode2Coordinate(B.id,pt,yt)}}),ur(rr(o),"onDragEnd",function(){o.t&&Hu(o.t);var x=o.props.model;x.isDragging=!1}),ur(rr(o),"handleClick",function(x){if(!!o.startTime){var w=new Date().getTime()-o.startTime;if(!(w>200)){var R=o.props,B=R.model,$=R.graphModel,Q=B.getData(),oe=$.getPointByClient({x:x.clientX,y:x.clientY}),fe={data:Q,e:x,position:oe},le=x.button===2,Ne=x.detail===2;if(!le){var Se=$.editConfigModel;$.selectNodeById(B.id,Fp(x,Se)),o.toFront(),Ne?(Se.nodeTextEdit&&B.text.editable&&(B.setSelected(!1),$.setElementStateById(B.id,Et.TEXT_EDIT)),$.eventCenter.emit(it.NODE_DBCLICK,fe)):($.eventCenter.emit(it.ELEMENT_CLICK,fe),$.eventCenter.emit(it.NODE_CLICK,fe))}}}}),ur(rr(o),"handleContextMenu",function(x){x.preventDefault();var w=o.props,R=w.model,B=w.graphModel,$=R.getData(),Q=B.getPointByClient({x:x.clientX,y:x.clientY});B.setElementStateById(R.id,Et.SHOW_MENU,Q.domOverlayPosition),B.selectNodeById(R.id),B.eventCenter.emit(it.NODE_CONTEXTMENU,{data:$,e:x,position:Q}),o.toFront()}),ur(rr(o),"handleMouseDown",function(x){var w=o.props,R=w.model,B=w.graphModel;o.toFront(),o.startTime=new Date().getTime();var $=B.editConfigModel;$.adjustNodePosition&&R.draggable&&o.stepDrag&&o.stepDrag.handleMouseDown(x)}),ur(rr(o),"setHoverON",function(x){var w=o.state.isHovered;if(!w){o.setState({isHovered:!0});var R=o.props,B=R.model,$=R.graphModel,Q=B.getData();B.setHovered(!0),$.eventCenter.emit(it.NODE_MOUSEENTER,{data:Q,e:x})}}),ur(rr(o),"setHoverOFF",function(x){o.setState({isHovered:!1});var w=o.props,R=w.model,B=w.graphModel,$=R.getData();R.setHovered(!1),B.eventCenter.emit(it.NODE_MOUSELEAVE,{data:$,e:x})}),ur(rr(o),"onMouseOut",function(x){N1&&o.setHoverOFF(x)});var a=n.graphModel,l=a.gridSize,p=a.eventCenter,g=n.model;return o.stepDrag=new to({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd,step:l,eventType:"NODE",isStopPropagation:!1,eventCenter:p,model:g}),o.state={isHovered:!1},o}return _1(t,[{key:"getAnchorShape",value:function(o){return null}},{key:"getAnchors",value:function(){var o=this,a=this.props,l=a.model,p=a.graphModel,g=l.isSelected,x=l.isHitable,w=l.isDragging,R=this.state.isHovered;if(x&&(g||R)&&!w){var B=l.getAnchorLineStyle();return Sa(l.anchors,function($,Q){var oe=l.getAnchorStyle($);return Object(ne.g)(s1,{anchorData:$,node:o,style:oe,edgeStyle:B,anchorIndex:Q,nodeModel:l,graphModel:p,setHoverOFF:o.setHoverOFF})})}return[]}},{key:"getText",value:function(){var o=this.props,a=o.model,l=o.graphModel;if(a.state===Et.TEXT_EDIT)return"";if(a.text){var p=l.editConfigModel,g=!1;return(a.text.draggable||p.nodeTextDraggable)&&(g=!0),Object(ne.g)(vg,{editable:p.nodeTextEdit&&a.text.editable,model:a,graphModel:l,draggable:g})}}},{key:"getStateClassName",value:function(){var o=this.props.model,a=o.state,l=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 l&&(g+=" lf-isDragging"),p&&(g+=" lf-node-selected"),g}},{key:"toFront",value:function(){var o=this.props,a=o.model,l=o.graphModel,p=l.overlapMode;p!==gr.INCREASE&&a.autoToFront&&l.toFront(a.id)}},{key:"render",value:function(){var o=this.props,a=o.model,l=o.graphModel,p=l.editConfigModel,g=p.hideAnchors,x=p.adjustNodePosition,w=l.gridSize,R=l.transformModel.SCALE_X,B=a.isHitable,$=a.draggable,Q=Object(ne.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),g?null:this.getAnchors()),oe;return B?(x&&$&&this.stepDrag.setStep(w*R),oe=Object(ne.g)("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onMouseUp:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},Q)):oe=Object(ne.g)("g",{className:this.getStateClassName()},Q),oe}}],[{key:"getModel",value:function(o){return o}}]),t}(ne.a);function Vu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vu=function(t){return typeof t}:Vu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}function dc(){return dc=Object.assign||function(e){for(var r=1;re.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);t0&&ke.length<=4&&(ke.length===1?ke=[ke[0],ke[0],ke[0],ke[0]]:ke.length===2?ke=[ke[0],ke[1],ke[0],ke[1]]:ke.length===3&&(ke=[ke[0],ke[1],ke[2],ke[1]]),Ie+=ke[1]+ke[3],Je+=ke[0]+ke[2],oe=oe+(ke[1]-ke[3])/2,fe=fe+(ke[2]-ke[0])/2)}Se=oo(oo({},p),{},{x:oe-1,y:fe-1,width:Ie,height:Je})}return Object(ne.g)(Rn,Se)}}},{key:"getShape",value:function(){var o=this.props.model,a=o.text,l=a.value,p=a.x,g=a.y;if(!!l){var x=o.getTextStyle(),w=oo({x:p,y:g,className:"lf-element-text",value:l},x);return Object(ne.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(ne.g)(dg,Cc({},w,{model:o})))}}}]),t}(vg);function hl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hl=function(t){return typeof t}:hl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hl(e)}function Bc(){return Bc=Object.assign||function(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t200)){var x=p.button===2;if(!x){var w=p.detail===2,R=n.props,B=R.model,$=R.graphModel,Q=B==null?void 0:B.getData(),oe=$.getPointByClient({x:p.clientX,y:p.clientY});if(w){var fe=$.editConfigModel,le=$.textEditElement;if(le&&le.id===B.id&&$.setElementStateById(B.id,Et.DEFAULT),fe.edgeTextEdit&&B.text.editable&&$.setElementStateById(B.id,Et.TEXT_EDIT),B.modelType===dt.POLYLINE_EDGE){var Ne=B,Se=$.getPointByClient({x:p.x,y:p.y}),Pe=Se.canvasOverlayPosition,Ge=Pe.x,Ie=Pe.y,Je=zh({x:Ge,y:Ie},Ne.points);Ne.dbClickPosition=Je}$.eventCenter.emit(it.EDGE_DBCLICK,{data:Q,e:p,position:oe})}else $.eventCenter.emit(it.ELEMENT_CLICK,{data:Q,e:p,position:oe}),$.eventCenter.emit(it.EDGE_CLICK,{data:Q,e:p,position:oe});var ke=$.editConfigModel;$.selectEdgeById(B.id,Fp(p,ke)),n.toFront()}}}}),Hr(Fr(n),"getIsDraging",function(){return!1}),n}return cD(t,[{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,a=o.model,l=o.graphModel;if(a.state===Et.TEXT_EDIT)return"";var p=!1,g=l.editConfigModel;return(a.text.draggable||g.edgeTextDraggable)&&(p=!0),Object(ne.g)(QN,{editable:g.edgeTextEdit&&a.text.editable,model:a,graphModel:l,draggable:p})}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=o.startPoint,l=o.endPoint,p=o.isSelected,g=this.state,x=g.hover;return{start:a,end:l,hover:x,isSelected:p}}},{key:"getArrowStyle",value:function(){var o=this.props,a=o.model,l=o.graphModel,p=a.getEdgeStyle(),g=a.getEdgeAnimationStyle(),x=l.theme.arrow,w=a.isAnimation?g.stroke:p.stroke;return Lg(Lg({},p),{},{fill:w,stroke:w},x)}},{key:"getArrow",value:function(){return Object(ne.g)("g",null,Object(ne.g)("defs",null,this.getStartArrow(),this.getEndArrow()))}},{key:"getStartArrow",value:function(){var o=this.props,a=o.model,l=o.graphModel,p=a.id,g=l.theme.arrow,x=g.offset,w=g.verticalLength,R=this.getArrowStyle(),B=R.stroke,$=R.strokeWidth;return Object(ne.g)("marker",{id:"marker-start-".concat(p),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(ne.g)("path",{stroke:B,fill:B,strokeWidth:$,d:"M 0 0 L ".concat(x," -").concat(w," L ").concat(x," ").concat(w," Z")}))}},{key:"getEndArrow",value:function(){var o=this.props,a=o.model,l=o.graphModel,p=a.id,g=l.theme.arrow,x=g.offset,w=g.verticalLength,R=this.getArrowStyle(),B=R.stroke,$=R.strokeWidth;return Object(ne.g)("marker",{id:"marker-end-".concat(p),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(ne.g)("path",{stroke:B,fill:B,strokeWidth:$,transform:"rotate(180)",d:"M 0 0 L ".concat(x," -").concat(w," L ").concat(x," ").concat(w," Z")}))}},{key:"getAdjustPoints",value:function(){var o=this.props,a=o.model,l=o.graphModel,p=a.getAdjustStart(),g=a.getAdjustEnd();return Object(ne.g)("g",null,Object(ne.g)(_g,gl({type:"SOURCE"},p,{edgeModel:a,graphModel:l})),Object(ne.g)(_g,gl({type:"TARGET"},g,{edgeModel:a,graphModel:l})))}},{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,l=o.model,p=a.overlapMode;p!==gr.INCREASE&&a.toFront(l.id)}},{key:"render",value:function(){var o=this.props,a=o.model,l=a.isSelected,p=a.isHitable,g=o.graphModel,x=this.getIsDraging(),w=g.editConfigModel.adjustEdgeStartAndEnd,R=g.animation,B=l&&R.edge&&g.getSelectElements().edges.length===1;return Object(ne.g)("g",null,Object(ne.g)("g",{className:["lf-edge",!p&&"pointer-none",l&&"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()),w&&l&&!x?this.getAdjustPoints():"")}}]),t}(ne.a);function bl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bl=function(t){return typeof t}:bl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(e)}function yD(e,r){return OD(e)||bD(e,r)||mD(e,r)||gD()}function gD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mD(e,r){if(!!e){if(typeof e=="string")return Fg(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 Fg(e,r)}}function Fg(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);te.length)&&(r=e.length);for(var t=0,n=new Array(r);t=2&&(x.start=w[w.length-2],x.end=w[w.length-1]),x}},{key:"getAppendAttributes",value:function(o){var a=o.start,l=o.end,p;if(a.x===l.x&&a.y===l.y)p="";else{var g={start:a,end:l,offset:10,verticalLength:5},x=vi(Tl(Tl({},g),{},{type:"start"})),w=vi(Tl(Tl({},g),{},{type:"end"}));p="M".concat(x.leftX," ").concat(x.leftY,` L`).concat(x.rightX," ").concat(x.rightY,` L`).concat(w.rightX," ").concat(w.rightY,` L`).concat(w.leftX," ").concat(w.leftY," z")}return{d:p,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var a=this.getAppendAttributes(o),l=a.d,p=a.strokeWidth,g=a.fill,x=a.strokeDasharray,w=a.stroke;return Object(ne.g)(ko,{d:l,fill:g,strokeWidth:p,stroke:w,strokeDasharray:x})}},{key:"getAppendWidth",value:function(){for(var o=this,a=this.props,l=a.model,p=a.graphModel,g=l.pointsList,x=l.draggable,w=[],R=g.length,B=function(oe){var fe="lf-polyline-append",le={start:{x:g[oe].x,y:g[oe].y},end:{x:g[oe+1].x,y:g[oe+1].y},startIndex:oe,endIndex:oe+1,direction:"",dragAble:!0},Ne=Object(ne.g)("g",{className:fe},o.getAppendShape(le)),Se=p.editConfigModel,Pe=Se.adjustEdge,Ge=Se.adjustEdgeMiddle;if(!Pe||!x)o.dragHandler=function(){};else{o.dragHandler=o.drag;var Ie=le.startIndex,Je=le.endIndex,ke=Ge&&(Ie===0||Je===R-1);le.dragAble=!ke,le.start.x===le.end.x?(le.dragAble&&(fe+="-ew-resize"),le.direction=Dt.VERTICAL):le.start.y===le.end.y&&(le.dragAble&&(fe+="-ns-resize"),le.direction=Dt.HORIZONTAL),Ne=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:fe},o.getAppendShape(le)))}w.push(Ne)},$=0;$e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=r||Je<0||R&&ke>=a}function le(){var Ie=Yc();if(fe(Ie))return Ne(Ie);p=setTimeout(le,oe(Ie))}function Ne(Ie){return p=void 0,B&&n?$(Ie):(n=o=void 0,l)}function Se(){p!==void 0&&clearTimeout(p),x=0,n=g=o=p=void 0}function Pe(){return p===void 0?l:Ne(Yc())}function Ge(){var Ie=Yc(),Je=fe(Ie);if(n=arguments,o=this,g=Ie,Je){if(p===void 0)return Q(g);if(R)return clearTimeout(p),p=setTimeout(le,r),$(g)}return p===void 0&&(p=setTimeout(le,r)),l}return Ge.cancel=Se,Ge.flush=Pe,Ge}var Rj=Cj,Ij=i(166);function _j(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function qg(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(Ij.a)(t,Rj(function(){var o=t.modelToHistoryData();o&&n.add(o)},this.waitTime))}}]),e}(),zj=Lj;function Rl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rl=function(t){return typeof t}:Rl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rl(e)}var em,tm,rm;function Fj(e,r){return $j(e)||kj(e,r)||Gj(e,r)||Hj()}function Hj(){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 Gj(e,r){if(!!e){if(typeof e=="string")return nm(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 nm(e,r)}}function nm(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);t0&&e.pointsList.forEach(function(t){t.x+=r,t.y+=r}),e.text&&(e.text.x+=r,e.text.y+=r),e}var zl=40;function xC(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),l=o&&o.beforeClone?o.beforeClone(a):!0;return l?(tn=a,tn.nodes.forEach(function(p){return vm(p,zl)}),tn.edges.forEach(function(p){return ym(p,zl)}),!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 vm(a,zl)}),tn.edges.forEach(function(a){return ym(a,zl)})}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 SC(e,r){e.on("node:mousemove",function(t){var n=t.data;r.setNodeSnapLine(n)}),e.on("node:mouseup",function(){r.clearSnapline()})}function Fl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fl=function(t){return typeof t}:Fl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function gm(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 qc(e){for(var r=1;r2&&arguments[2]!==void 0?arguments[2]:!0;if(typeof t!="string"){this.registerElement(t);return}var a={BaseEdge:Ti,BaseEdgeModel:hf,BaseNode:yn,BaseNodeModel:hn,RectNode:hc,RectNodeModel:rc,CircleNode:gc,CircleNodeModel:Xf,PolygonNode:Oc,PolygonNodeModel:qf,TextNode:Ac,TextNodeModel:oc,LineEdge:Hc,LineEdgeModel:gf,DiamondNode:Sc,DiamondNodeModel:Kf,PolylineEdge:kc,PolylineEdgeModel:Of,BezierEdge:Uc,BezierEdgeModel:kf,EllipseNode:Mc,EllipseNodeModel:Zf,HtmlNode:jc,HtmlNodeModel:ac,h:ne.g,type:t};this.viewMap.forEach(function(w){var R=w.extendKey;R&&(a[R]=w)}),this.graphModel.modelMap.forEach(function(w){var R=w.extendKey;R&&(a[R]=w)});var l=n(a),p=l.view,g=l.model,x=p;o&&!x.isObervered&&(x.isObervered=!0,x=bt(x)),this.setView(t,x),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:hc,model:rc,type:"rect"}),this.registerElement({type:"circle",view:gc,model:Xf}),this.registerElement({type:"polygon",view:Oc,model:qf}),this.registerElement({type:"line",view:Hc,model:gf}),this.registerElement({type:"polyline",view:kc,model:Of}),this.registerElement({type:"bezier",view:Uc,model:kf}),this.registerElement({type:"text",view:Ac,model:oc}),this.registerElement({type:"ellipse",view:Mc,model:Zf}),this.registerElement({type:"diamond",view:Sc,model:Kf}),this.registerElement({type:"html",view:jc,model:ac})}},{key:"selectElementById",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;this.graphModel.selectElementById(t,n),n||this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var n=this.graphModel.transformModel,o=t.coordinate,a=t.id;if(!o){var l=this.getNodeModelById(a);l&&(o=l.getData());var p=this.getEdgeModelById(a);p&&(o=p.textPosition)}var g=o,x=g.x,w=g.y;n.focusOn(x,w,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,l=this.getModelById(t);if(!l)return!1;var p=(n={},Lt(n,Gt.NODE,this.deleteNode),Lt(n,Gt.EDGE,this.deleteEdge),n),g=l.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,l=a&&a.beforeDelete?a.beforeDelete(o):!0;return l&&this.graphModel.deleteNode(t),l}},{key:"cloneNode",value:function(t){var n=this.graphModel.getNodeModelById(t),o=n.getData(),a=this.options.guards,l=a&&a.beforeClone?a.beforeClone(o):!0;if(l)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(),l=n&&n.beforeDelete?n.beforeDelete(a):!0;return l&&this.graphModel.deleteEdgeById(t),l}},{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 l=[];return n.forEach(function(x){x.sourceNodeId===o&&x.targetNodeId===a&&l.push(x)}),l}if(o){var p=[];return n.forEach(function(x){x.sourceNodeId===o&&p.push(x)}),p}if(a){var g=[];return n.forEach(function(x){x.targetNodeId===a&&g.push(x)}),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(er(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,l={},p={nodes:[],edges:[]},g=0;g2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return this.graphModel.getAreaElement(t,n,o,a).map(function(l){return l.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=er(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(!!this.history.redoAble()){var t=er(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,l=t.TRANSLATE_Y;return{SCALE_X:n,SCALE_Y:o,TRANSLATE_X:a,TRANSLATE_Y:l}}},{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(l){var p=l.pluginName||l.name;o.indexOf(p)===-1&&n.installPlugin(l)})}},{key:"installPlugin",value:function(t){if(Fl(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,l=new a({lf:this,LogicFlow:e});l.render&&this.components.push(l.render.bind(l)),this.extension[a.pluginName]=l}},{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("\u4E0D\u5B58\u5728\u4E3A".concat(t.type,"\u7C7B\u578B\u7684\u8282\u70B9"));return}var o=new n(qc(qc({},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(er(t)),!this.options.isSilentMode&&this.options.history!==!1&&this.history.watch(this.graphModel),Object(ne.j)(Object(ne.g)(bw,{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("\u8BF7\u7ED9\u63D2\u4EF6".concat(t.name||t.constructor.name,"\u6307\u5B9ApluginName!")),n=t.name);var o=this.extensions.get(n);o&&o.destroy&&o.destroy(),this.extensions.set(n,t)}}]),e}();Lt(ed,"extensions",new Map);function Gr(e){return bt(e)}c.default=ed}])})})(Ke,Ke.exports);var Gl=Jm(Ke.exports);const FC=[{type:"bpmn:startEvent",text:"\u5F00\u59CB",class:"bpmn-start"},{type:"bpmn:endEvent",text:"\u7ED3\u675F",class:"bpmn-end"},{type:"bpmn:exclusiveGateway",text:"\u7F51\u5173",class:"bpmn-exclusiveGateway"},{type:"bpmn:userTask",text:"\u7528\u6237",class:"bpmn-user"}];function HC(m,v){return v={exports:{}},m(v,v.exports),v.exports}var GC=HC(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),s=2;i===1/0;s*=2)i=Math.log(Math.pow(2,u/s))/Math.log(c)*s;for(var f=i-Math.floor(i),y="",s=0;s=Math.pow(2,u)?v(u,c):y};v.rack=function(u,c,i){var s=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 E=v(u,c)}while(Object.hasOwnProperty.call(f,E));return f[E]=y,E},f=s.hats={};return s.get=function(y){return s.hats[y]},s.set=function(y,b){return s.hats[y]=b,s},s.bits=u||128,s.base=c||16,s}});function an(m){if(!(this instanceof an))return new an(m);m=m||[128,36,1],this._seed=m.length?GC.rack(m[0],m[1],m[2]):m}an.prototype.next=function(m){return this._seed(m||!0)};an.prototype.nextPrefixed=function(m,v){var u;do u=m+this.next(!0);while(this.assigned(u));return this.claim(u,v),u};an.prototype.claim=function(m,v){this._seed.set(m,v||!0)};an.prototype.assigned=function(m){return this._seed.get(m)||!1};an.prototype.unclaim=function(m){delete this._seed.hats[m]};an.prototype.clear=function(){var m=this._seed.hats,v;for(v in m)this.unclaim(v)};var kC=new an([32,32,1]);function qo(){return kC.next()}var nb=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 s in i)i.hasOwnProperty(s)&&(c[s]=i[s])},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)}}(),$C=function(m){nb(v,m);function v(u,c){var i=this;return u.id||(u.id="Event_"+qo()),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:"\u8D77\u59CB\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u7EC8\u70B9",validate:function(){return!1}};return u.push(c),u},v.extendKey="StartEventModel",v}(Ke.exports.CircleNodeModel),UC=function(m){nb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.extendKey="StartEventNode",v}(Ke.exports.CircleNode),XC={type:"bpmn:startEvent",view:UC,model:$C},ob=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var s in i)i.hasOwnProperty(s)&&(c[s]=i[s])},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)}}(),Ul=globalThis&&globalThis.__assign||function(){return Ul=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(s){var f=s.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(s){var f=s.toDataURL("image/png");i({data:f,width:s.width,height:s.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(s){s.toBlob(function(f){i({data:f,width:s.width,height:s.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=="undefined"&&typeof c.postbody=="undefined"&&typeof c.parameters=="undefined"?c.method="get":c.method="post"),u){c.asynchronous=!0;var s=this,f=u,y=c.onComplete;c.onComplete=function(S){var M;S&&S.responseXML&&S.responseXML.documentElement&&(M=s.parseDOM(S.responseXML.documentElement)),f(M,S),y&&y(S)}}else c.asynchronous=!1;var b;if(typeof HTTP!="undefined"&&HTTP.Request){c.uri=m;var E=new HTTP.Request(c);E&&(b=E.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var E=new Ajax.Request(m,c);E&&(b=E.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":typeof s=="object"&&s.constructor==Array?u[u.length]=this.array_to_xml(i,s):typeof s=="object"?u[u.length]=this.hash_to_xml(i,s):u[u.length]=this.scalar_to_xml(i,s):c[c.length]=" "+i.substring(1)+'="'+this.xml_escape(s)+'"'}var f=c.join(""),y=u.join("");return typeof m=="undefined"||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":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 Ql=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,s=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)s.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 s},un;(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"})(un||(un={}));var sb=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"];function id(m){var v={};return Object.entries(m).forEach(function(u){var c=Ql(u,2),i=c[0],s=c[1];typeof s!="object"?i.indexOf("-")===0?v[i]=s:v["-"+i]=s:v[i]=id(s)}),v}function sd(m){var v={};return Object.entries(m).forEach(function(u){var c=Ql(u,2),i=c[0],s=c[1];typeof s=="string"?i.indexOf("-")===0?v[i.substr(1)]=s:v[i]=s:typeof s=="object"?v[i]=sd(s):v[i]=s}),v}function c2(m,v){var u=new Map;v.nodes.forEach(function(i){var s,f={"-id":i.id};if(!((s=i.text)===null||s===void 0)&&s.value&&(f["-name"]=i.text.value),i.properties){var y=id(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 s,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 E={"-id":i.id,"-sourceRef":i.sourceNodeId,"-targetRef":i.targetNodeId};if(!((s=i.text)===null||s===void 0)&&s.value&&(E["-name"]=(f=i.text)===null||f===void 0?void 0:f.value),i.properties){var S=id(i.properties);Object.assign(E,S)}return E});m[un.FLOW]=c}function d2(m,v){m["bpmndi:BPMNEdge"]=v.edges.map(function(u){var c,i=u.id,s=u.pointsList.map(function(y){var b=y.x,E=y.y;return{"-x":b,"-y":E}}),f={"-id":i+"_di","-bpmnElement":i,"di:waypoint":s};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,s=100,f=80,y=u.x,b=u.y,E=fo.shapeConfigMap.get(u.type);E&&(s=E.width,f=E.height),y-=s/2,b-=f/2;var S={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":y,"-y":b,"-width":s,"-height":f}};return!((c=u.text)===null||c===void 0)&&c.value&&(S["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}}),S})}function p2(m){var v=[],u=[],c=m["bpmn:definitions"];if(c){var i=c["bpmn:process"];Object.keys(i).forEach(function(s){if(s.indexOf("bpmn:")===0){var f=i[s];if(s===un.FLOW){var y=c["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];u=v2(f,y)}else{var b=c["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];v=v.concat(h2(f,b,s))}}})}return{nodes:v,edges:u}}function h2(m,v,u){var c=[];if(Array.isArray(m))m.forEach(function(f){var y;Array.isArray(v)?y=v.find(function(E){return E["-bpmnElement"]===f["-id"]}):y=v;var b=Cm(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 s=Cm(i,u,m);c.push(s)}return c}function Cm(m,v,u){var c=Number(m["dc:Bounds"]["-x"]),i=Number(m["dc:Bounds"]["-y"]),s=u["-name"],f=fo.shapeConfigMap.get(v);f&&(c+=f.width/2,i+=f.height/2);var y;Object.entries(u).forEach(function(M){var T=Ql(M,2),A=T[0],I=T[1];sb.indexOf(A)===-1&&(y||(y={}),y[A]=I)}),y&&(y=sd(y));var b;if(s&&(b={x:c,y:i,value:s},m["bpmndi:BPMNLabel"]&&m["bpmndi:BPMNLabel"]["dc:Bounds"])){var E=m["bpmndi:BPMNLabel"]["dc:Bounds"];b.x=Number(E["-x"])+Number(E["-width"])/2,b.y=Number(E["-y"])+Number(E["-height"])/2}var S={id:m["-bpmnElement"],type:v,x:c,y:i,properties:y};return b&&(S.text=b),S}function v2(m,v){var u=[];if(Array.isArray(m))m.forEach(function(i){var s;Array.isArray(v)?s=v.find(function(f){return f["-bpmnElement"]===i["-id"]}):s=v,u.push(Rm(s,i))});else{var c=void 0;Array.isArray(v)?c=v.find(function(i){return i["-bpmnElement"]===m["-id"]}):c=v,u.push(Rm(c,m))}return u}function Rm(m,v){var u,c=v["-name"];if(c){var i=m["bpmndi:BPMNLabel"]["dc:Bounds"],s=0;c.split(` `).forEach(function(b){s0)&&!(i=c.next()).done;)s.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 s};globalThis&&globalThis.__spread;var g2=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,s=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)s.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 s};globalThis&&globalThis.__spread;var m2=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,s=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)s.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 s},b2=globalThis&&globalThis.__spread||function(){for(var m=[],v=0;v-1?(s.onclickCallback(c.__currentData),c.__menuDOM.style.display="none",c.__currentData=null):console.warn("\u70B9\u51FB\u533A\u57DF\u4E0D\u5728\u83DC\u5355\u9879\u5185\uFF0C\u8BF7\u68C0\u67E5\u4EE3\u7801\uFF01")},!0),this.lf.on("node:contextmenu",function(i){var s=i.data,f=i.position,y=f.domOverlayPosition,b=y.x,E=y.y,S=s.id,M=c.lf.graphModel.getNodeModelById(S),T=[],A=c.menuTypeMap.get(M.type);M&&M.menu&&Array.isArray(M.menu)?T=M.menu:A?T=A:T=c.menuTypeMap.get(Ai),c.__currentData=s,c.showMenu(b,E,T)}),this.lf.on("edge:contextmenu",function(i){var s=i.data,f=i.position,y=f.domOverlayPosition,b=y.x,E=y.y,S=s.id,M=c.lf.graphModel.getEdgeModelById(S),T=[],A=c.menuTypeMap.get(M.type);M&&M.menu&&Array.isArray(M.menu)?T=M.menu:A?T=A:T=c.menuTypeMap.get(Ni),c.__currentData=s,c.showMenu(b,E,T)}),this.lf.on("blank:contextmenu",function(i){var s=i.position,f=c.menuTypeMap.get(Di),y=s.domOverlayPosition,b=y.x,E=y.y;c.showMenu(b,E,f)}),this.lf.on("selection:contextmenu",function(i){var s=i.data,f=i.position,y=c.menuTypeMap.get(Bm),b=f.domOverlayPosition,E=b.x,S=b.y;c.__currentData=s,c.showMenu(E,S,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,b2(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 s=document.createElement("span");s.className="lf-menu-item-icon",i.appendChild(s)}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(Ai,v.nodeMenu?v.nodeMenu:[]),v.edgeMenu!==void 0&&this.menuTypeMap.set(Ni,v.edgeMenu?v.edgeMenu:[]),v.graphMenu!==void 0&&this.menuTypeMap.set(Di,v.graphMenu?v.graphMenu:[]))},m.prototype.addMenuConfig=function(v){if(!!v){if(Array.isArray(v.nodeMenu)){var u=this.menuTypeMap.get(Ai);this.menuTypeMap.set(Ai,u.concat(v.nodeMenu))}if(Array.isArray(v.edgeMenu)){var u=this.menuTypeMap.get(Ni);this.menuTypeMap.set(Ni,u.concat(v.edgeMenu))}if(Array.isArray(v.graphMenu)){var u=this.menuTypeMap.get(Di);this.menuTypeMap.set(Di,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 fb=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 s in i)i.hasOwnProperty(s)&&(c[s]=i[s])},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)}}(),ji=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,s=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)s.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 s};(function(m){fb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getEdge=function(){for(var u=this.props.model.getEdgeStyle(),c=u.strokeWidth,i=u.stroke,s=u.strokeDashArray,f=this.props.model.points,y=f.split(" ").map(function(P){return P.split(",").map(function(D){return Number(D)})}),b=ji(y[0],2),E=b[0],S=b[1],M="M"+E+" "+S,T=5,A=1;AL?X-T:X+T;M=M+" L "+U+" "+J}if(X===L&&U!==_){var ie=U>_?U-T:U+T;M=M+" L "+ie+" "+X}if(M=M+" Q "+U+" "+X,U===ae&&X!==q){var J=X>q?X-T:X+T;M=M+" "+U+" "+J}if(X===q&&U!==ae){var ie=U>ae?U-T:U+T;M=M+" "+ie+" "+X}}var z=ji(y[y.length-1],2),j=z[0],N=z[1];return M=M+" L "+j+" "+N,Ke.exports.h("path",{d:M,strokeWidth:c,stroke:i,fill:"none",strokeDashArray:s})},v.extendKey="curvedEdge",v})(Ke.exports.PolylineEdge);(function(m){fb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v})(Ke.exports.PolylineEdgeModel);var fd,Ht,cb,Ii,Lm,db={},pb=[],E2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Gn(m,v){for(var u in v)m[u]=v[u];return m}function hb(m){var v=m.parentNode;v&&v.removeChild(m)}function _i(m,v,u){var c,i,s,f={};for(s in v)s=="key"?c=v[s]:s=="ref"?i=v[s]:f[s]=v[s];if(arguments.length>2&&(f.children=arguments.length>3?fd.call(arguments,2):u),typeof m=="function"&&m.defaultProps!=null)for(s in m.defaultProps)f[s]===void 0&&(f[s]=m.defaultProps[s]);return kl(m,f,c,i,null)}function kl(m,v,u,c,i){var s={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==null?++cb:i};return i==null&&Ht.vnode!=null&&Ht.vnode(s),s}function cd(m){return m.children}function Jo(m,v){this.props=m,this.context=v}function Qo(m,v){if(v==null)return m.__?Qo(m.__,m.__.__k.indexOf(m)+1):null;for(var u;v0?kl(A.type,A.props,A.key,null,A.__v):A)!=null){if(A.__=u,A.__b=u.__b+1,(T=H[S])===null||T&&A.key==T.key&&A.type===T.type)H[S]=void 0;else for(M=0;M-1){var X=Math.atan2(s-M[U].y,i-M[U].x);f.x=T[U].x+y*Math.cos(X),f.y=T[U].y+y*Math.sin(X)}}return f}function Um(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=c.rx,s=c.ry,f=v,y=(v.y-u.y)/(v.x-u.x),b=i,E=s,S,M;return y>=1/0?(S=0,M=E):y<=-1/0?(S=0,M=-E):v.x-u.x>0?(S=b*E/Math.sqrt(E*E+b*b*y*y),M=b*E*y/Math.sqrt(E*E+b*b*y*y)):(S=-(b*E)/Math.sqrt(E*E+b*b*y*y),M=-(b*E*y)/Math.sqrt(E*E+b*b*y*y)),f={x:S+c.x,y:M+c.y},f}function Xm(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=v,s,f,y=v.x-u.x,b=v.y-u.y,E=u.rx,S=u.ry,M=Math.sqrt((E-Math.abs(y))*(E-Math.abs(y))+b*b)/Math.sqrt(E*E+S*S),T=c.rx,A=c.ry,I=Math.sqrt((T*T+A*A)*M*M*(T*T/(T*T+A*A))),_=I*(A/T);return y>=0?s=T-I:s=I-T,b>0?f=_:f=-_,i={x:s+c.x,y:f+c.y},i}var M2=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 s in i)i.hasOwnProperty(s)&&(c[s]=i[s])},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)}}(),uo=globalThis&&globalThis.__assign||function(){return uo=Object.assign||function(m){for(var v,u=1,c=arguments.length;uae||H.heightq){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:y,deltaY:b}),c.nodeModel.width=H.width,c.nodeModel.height=H.height,c.nodeModel.setProperties({nodeSize:{width:H.width,height:H.height}});var J=c.getNodeEdges(S),ie={x:M,y:T,width:A,height:I,radius:_},z={x:c.nodeModel.x,y:c.nodeModel.y,width:c.nodeModel.width,height:c.nodeModel.height,radius:_},j={point:"",beforeNode:ie,afterNode:z},N;J.sourceEdges.forEach(function(P){j.point=P.startPoint,N=$m(j),P.updateStartPoint(N)}),J.targetEdges.forEach(function(P){j.point=P.endPoint,N=$m(j),P.updateEndPoint(N)}),c.eventEmit({beforeNode:ie,afterNode:z})},c.updateEllipse=function(f){var y=f.deltaX,b=f.deltaY,E=c.nodeModel,S=E.id,M=E.rx,T=E.ry,A=E.x,I=E.y,_=c.index,L=M,H=T,U=c.getResize({index:_,deltaX:y,deltaY:b,width:L,height:H,pct:1/2}),X=c.nodeModel,se=X.minWidth,ae=X.minHeight,q=X.maxWidth,J=X.maxHeight;if(U.widthq/2||U.heightJ/2){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:y,deltaY:b}),c.nodeModel.rx=c.nodeModel.rx+y/2,c.nodeModel.ry=c.nodeModel.ry+b/2,c.nodeModel.setProperties({nodeSize:{rx:U.width,ry:U.height}});var ie=c.getNodeEdges(S),z={x:A,y:I},j={rx:U.width,ry:U.height,x:c.nodeModel.x,y:c.nodeModel.y},N={point:{},beforeNode:z,afterNode:j},P;ie.sourceEdges.forEach(function(D){N.point=D.startPoint,P=Um(N),D.updateStartPoint(P)}),ie.targetEdges.forEach(function(D){N.point=D.endPoint,P=Um(N),D.updateEndPoint(P)}),c.eventEmit({beforeNode:uo(uo({},z),{rx:M,ry:T}),afterNode:j})},c.updateDiamond=function(f){var y=f.deltaX,b=f.deltaY,E=c.nodeModel,S=E.id,M=E.rx,T=E.ry,A=E.x,I=E.y,_=c.index,L=M,H=T,U=c.getResize({index:_,deltaX:y,deltaY:b,width:L,height:H,pct:1/2}),X=c.nodeModel,se=X.minWidth,ae=X.minHeight,q=X.maxWidth,J=X.maxHeight;if(U.widthq/2||U.heightJ/2){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:y,deltaY:b}),c.nodeModel.rx=c.nodeModel.rx+y/2,c.nodeModel.ry=c.nodeModel.ry+b/2,c.nodeModel.setProperties({nodeSize:{rx:U.width,ry:U.height}});var ie={x:A,y:I,rx:M,ry:T},z={rx:U.width,ry:U.height,x:c.nodeModel.x,y:c.nodeModel.y},j={point:{},beforeNode:ie,afterNode:z},N,P=c.getNodeEdges(S);P.sourceEdges.forEach(function(D){j.point=D.startPoint,N=Xm(j),D.updateStartPoint(N)}),P.targetEdges.forEach(function(D){j.point=D.endPoint,N=Xm(j),D.updateEndPoint(N)}),c.eventEmit({beforeNode:ie,afterNode:z})},c.eventEmit=function(f){var y=f.beforeNode,b=f.afterNode,E=c.nodeModel,S=E.id,M=E.modelType,T=E.type,A=uo({id:S,modelType:M,type:T},y),I=uo({id:S,modelType:M,type:T},b);c.graphModel.eventCenter.emit("node:resize",{oldNodeSize:A,newNodeSize:I})},c.onDraging=function(f){var y=f.deltaX,b=f.deltaY,E=c.nodeModel.modelType;E===Zo.RECT_NODE||E===Zo.HTML_NODE?c.updateRect({deltaX:y,deltaY:b}):E===Zo.ELLIPSE_NODE?c.updateEllipse({deltaX:y,deltaY:b}):E===Zo.DIAMOND_NODE&&c.updateDiamond({deltaX:y,deltaY:b})},c.index=u.index,c.nodeModel=u.model,c.graphModel=u.graphModel;var i=c.graphModel.gridSize,s=2;return i>1&&(s=2*i),c.nodeModel.gridSize&&(s=2*c.nodeModel.gridSize),c.state={},c.dragHandler=new w2({onDraging:c.onDraging,step:s}),c}return v.prototype.getNodeEdges=function(u){for(var c=this.graphModel,i=c.edges,s=[],f=[],y=0;y0)&&!(i=c.next()).done;)s.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 s},Ym=globalThis&&globalThis.__spread||function(){for(var m=[],v=0;v=this.x-this.width/2&&s<=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,s=u.x2,f=u.y2;return{x:c>=this.x-this.width/2&&s<=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=Ym(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=Ym(this.children);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})(Sb.model);(function(m){wb(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.getAddedableShape=function(){var u=this.props.model,c=u.width,i=u.height,s=u.x,f=u.y,y=u.radius,b=u.properties;if(!b.groupAddable)return null;var E=this.props.model.getNodeStyle().strokeWidth,S=this.props.model.getAddableOutlineStyle(),M=c+E+8,T=i+E+8;return Ke.exports.h("rect",Vl(Vl({},S),{width:M,height:T,x:s-M/2,y:f-T/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 s=Ke.exports.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 Ke.exports.h("g",{},[Ke.exports.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)}}),s])},v.prototype.getResizeShape=function(){return Ke.exports.h("g",{},[this.getAddedableShape(),m.prototype.getResizeShape.call(this),this.getFoldIcon()])},v})(Sb.view);var I2=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,s=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)s.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 s};globalThis&&globalThis.__spread;var _2=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,s=[],f;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)s.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 s};globalThis&&globalThis.__spread;var Vm=globalThis&&globalThis.__assign||function(){return Vm=Object.assign||function(m){for(var v,u=1,c=arguments.length;u0)&&!(i=c.next()).done;)s.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 s};globalThis&&globalThis.__spread;const L2={class:"control-container"},z2=["title","onMouseenter"],F2=["disabled","onClick"],H2=Jl({__name:"Control",props:{lf:{type:null,required:!0,default:null},catTurboData:{type:Boolean,required:!1}},emits:["catData"],setup(m,{emit:v}){const u=m,c=Sm("controlButton3",null),i=Sm("controlButton4",null);let s=lo(-1),f=lo([{icon:"icon-zoom-out-hs",text:"\u7F29\u5C0F",size:"18",disabled:!1},{icon:"icon-enlarge-hs",text:"\u653E\u5927",size:"18",disabled:!1},{icon:"icon-full-screen-hs",text:"\u9002\u5E94",size:"15",disabled:!1},{icon:"icon-previous-hs",text:"\u4E0A\u4E00\u6B65",size:"15",disabled:!0},{icon:"icon-next-step-hs",text:"\u4E0B\u4E00\u6B65",size:"17",disabled:!0},{icon:"icon-download-hs",text:"\u4E0B\u8F7D\u56FE\u7247",size:"17",disabled:!1},{icon:"icon-watch-hs",text:"\u67E5\u770B\u6570\u636E",size:"17",disabled:!1}]);const y=(E,S)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((M,T)=>{let A=u.lf;S===1&&A.zoom(!0),S===6&&v("catData"),S===T&&A[M]()})},b=E=>{s.value=E};return Qm(()=>{u.lf.on("history:change",({data:{undoAble:E,redoAble:S}})=>{zt(f)[3].disabled=zt(c).disabled=!E,zt(f)[4].disabled=zt(i).disabled=!S})}),(E,S)=>{const M=Ci("el-tooltip");return nn(),so("div",L2,[Hn(" \u529F\u80FD\u6309\u94AE "),on("ul",null,[(nn(!0),so(rd,null,qm(zt(f),(T,A)=>(nn(),so("li",{key:A,title:T.text,class:"dark:color-bg_color",onMouseenter:Pm(I=>b(A),["prevent"]),onMouseleave:S[0]||(S[0]=Pm(I=>eb(s)?s.value=-1:s=-1,["prevent"]))},[Ko(M,{content:T.text,visible:zt(s)===A,placement:"right"},{default:Vo(()=>[on("button",{ref_for:!0,ref:"controlButton"+A,disabled:T.disabled,style:Tm({cursor:T.disabled===!1?"pointer":"not-allowed",color:T.disabled===!1?"":"#00000040"}),onClick:I=>y(T,A)},[on("span",{class:tb("iconfont "+T.icon),style:Tm({fontSize:`${T.size}px`})},null,6)],12,F2)]),_:2},1032,["content","visible"])],40,z2))),128))])])}}});var G2=Zl(H2,[["__scopeId","data-v-518de540"],["__file","D:/work/accout-vue3-ui/src/components/ReFlowChart/src/Control.vue"]]);const k2={class:"node-panel"},$2=["onMousedown"],U2={key:0,class:"shape"},X2={class:"node-label"},Y2=Jl({__name:"NodePanel",props:{lf:{type:null,required:!0,default:null},nodeList:{type:Array,required:!0,default:null}},setup(m){const v=m;let u=lo({a:"efrwe",b:"wewe"});const c=i=>{v.lf.dnd.startDrag({type:i.type,properties:zt(u)})};return(i,s)=>(nn(),so(rd,null,[Hn(" \u5DE6\u4FA7bpmn\u5143\u7D20\u9009\u62E9\u5668 "),on("div",k2,[(nn(!0),so(rd,null,qm(v.nodeList,f=>(nn(),so("div",{class:"node-item dark:color-bg_color",key:f.text,onMousedown:y=>c(f)},[on("div",{class:tb(["node-item-icon",f.class])},[f.type==="user"||f.type==="time"?(nn(),so("div",U2)):Hn("v-if",!0)],2),on("span",X2,DC(f.text),1)],40,$2))),128))])],2112))}});var W2=Zl(Y2,[["__scopeId","data-v-7322cbe5"],["__file","D:/work/accout-vue3-ui/src/components/ReFlowChart/src/NodePanel.vue"]]),Ab={exports:{}},K2=jC(CC);(function(m,v){(function(u,c){m.exports=c(K2)})(RC,function(u){return function(){var c={789:function(y){y.exports=u}},i={};function s(y){var b=i[y];if(b!==void 0)return b.exports;var E=i[y]={exports:{}};return c[y](E,E.exports,s),E.exports}s.d=function(y,b){for(var E in b)s.o(b,E)&&!s.o(y,E)&&Object.defineProperty(y,E,{enumerable:!0,get:b[E]})},s.o=function(y,b){return Object.prototype.hasOwnProperty.call(y,b)},s.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})};var f={};return function(){function y(j,N){(N==null||N>j.length)&&(N=j.length);for(var P=0,D=new Array(N);P1&&arguments[1]!==void 0?arguments[1]:"root",P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,D=arguments.length>3?arguments[3]:void 0,Y=D||{},V=Y.key,ue=Y.index,Oe=Y.type,me=Oe===void 0?"content":Oe,ce=Y.showComma,he=ce!==void 0&&ce,ve=Y.length,Ee=ve===void 0?1:ve,je=H(j);if(je==="array"){var ze=j.map(function(_e,G,W){return U(_e,"".concat(N,"[").concat(G,"]"),P+1,{index:G,showComma:G!==W.length-1,length:Ee,type:me})}).reduce(function(_e,G){return _e.concat(G)},[]);return[U("[",N,P,{showComma:!1,key:V,length:j.length,type:"arrayStart"})[0]].concat(ze,U("]",N,P,{showComma:he,length:j.length,type:"arrayEnd"})[0])}if(je==="object"){var Re=Object.keys(j),xe=Re.map(function(_e,G,W){return U(j[_e],_e.includes(".")?"".concat(N,'["').concat(_e,'"]'):"".concat(N,".").concat(_e),P+1,{key:_e,showComma:G!==W.length-1,length:Ee,type:me})}).reduce(function(_e,G){return _e.concat(G)},[]);return[U("{",N,P,{showComma:!1,key:V,index:ue,length:Re.length,type:"objectStart"})[0]].concat(xe,U("}",N,P,{showComma:he,length:Re.length,type:"objectEnd"})[0])}var Be=Object.entries({content:j,level:P,key:V,index:ue,path:N,showComma:he,length:Ee,type:me}).reduce(function(_e,G){var W=E(G,2),ee=W[0],ge=W[1];return ge!==void 0?L(L({},_e),{},M({},ee,ge)):_e},{});return[Be]}function X(j,N){var P=Object.keys(j);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(j);N&&(D=D.filter(function(Y){return Object.getOwnPropertyDescriptor(j,Y).enumerable})),P.push.apply(P,D)}return P}function se(j){for(var N=1;N=j.deep:he.level===j.deep,Ee=ve||j.collapsePath&&j.collapsePath.test(he.path);return he.type!=="objectStart"&&he.type!=="arrayStart"||!ve&&!Ee?ce:ie(ie({},ce),{},M({},he.path,1))},{})}),V=(0,T.computed)(function(){var ce=null;return U(j.data,j.path).reduce(function(he,ve,Ee){var je=ie(ie({},ve),{},{id:Ee}),ze=Y.hiddenPaths[je.path];if(ce&&ce.path===je.path){var Re=ce.type==="objectStart",xe=ie(ie(ie({},ce),je),{},{content:Re?"{...}":"[...]",type:Re?"objectCollapsed":"arrayCollapsed"});return ce=null,he.concat(xe)}return ze&&!ce?(ce=je,he):ce?he:he.concat(je)},[])}),ue=(0,T.computed)(function(){var ce=j.modelValue;return ce&&j.selectableType==="multiple"&&Array.isArray(ce)?ce:[ce]}),Oe=(0,T.computed)(function(){return!j.selectableType||j.selectOnClickNode||j.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),me=function(ce){if(j.virtual){var he=D.value,ve=j.virtualLines,Ee=he&&he.scrollTop||0,je=Math.floor(Ee/j.itemHeight),ze=je<0?0:je+ve>ce.length?ce.length-ve:je;ze<0&&(ze=0);var Re=ze+ve;Y.translateY=ze*j.itemHeight,Y.visibleData=ce.filter(function(xe,Be){return Be>=ze&&Be(nn(),nd(zt(V2),{path:"res",deep:3,showLength:!0,data:v.graphData},null,8,["data"]))}});var J2=Zl(Z2,[["__file","D:/work/accout-vue3-ui/src/components/ReFlowChart/src/DataDialog.vue"]]);const Q2=ld(G2),q2=ld(W2),eR=ld(J2),tR={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:s,startPoint:f,endPoint:y,pointsList:b,logicFlowType:E}=c,S={id:i,type:E,sourceNodeId:v[0],targetNodeId:u[0],text:s,startPoint:f,endPoint:y,pointsList:b,properties:{}},M=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(m.properties).forEach(T=>{M.indexOf(T)===-1&&(S.properties[T]=m.properties[T])}),S}function nR(m){const{properties:v,key:u}=m,{x:c,y:i,text:s,logicFlowType:f}=v,y={id:u,type:f,x:c,y:i,text:s,properties:{}},b=["x","y","text","logicFlowType"];return Object.keys(m.properties).forEach(E=>{b.indexOf(E)===-1&&(y.properties[E]=m.properties[E])}),y}function oR(m){const v={nodes:[],edges:[]},u=m.flowElementList;return u&&u.length>0&&u.forEach(c=>{if(c.type===tR.SEQUENCE_FLOW){const i=rR(c);v.edges.push(i)}else{const i=nR(c);v.nodes.push(i)}}),v}const iR=m=>(_C("data-v-77d65f48"),m=m(),BC(),m),aR={class:"card-header"},uR={class:"font-medium"},lR=rb(" \u6D41\u7A0B\u56FE\u7EC4\u4EF6\uFF0C\u91C7\u7528\u5F00\u6E90\u7684 "),sR=rb(" LogicFlow "),fR={class:"logic-flow-view"},cR=iR(()=>on("div",{id:"LF-Turbo"},null,-1)),dR={name:"FlowChart"},pR=Jl({...dR,setup(m){let v=lo(null),u=lo(null),c=lo(!1),i=lo({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),s=FC;function f(){Gl.use(s2),Gl.use(l2),Gl.use(O2);const E=new Gl({...zt(i),container:document.querySelector("#LF-Turbo")});v.value=E,zt(v).setDefaultEdgeType("bpmn:sequenceFlow"),y()}function y(){const E=oR(zC);v.value.render(E)}function b(){u.value=zt(v).getGraphData(),c.value=!0}return Qm(()=>{f()}),(E,S)=>{const M=Ci("el-link"),T=Ci("el-scrollbar"),A=Ci("el-dialog"),I=Ci("el-card");return nn(),nd(I,null,{header:Vo(()=>[on("div",aR,[on("span",uR,[lR,Ko(M,{href:"http://logic-flow.org/",target:"_blank",icon:zt(IC)("set-up"),style:{"font-size":"16px",margin:"0 4px 5px"}},{default:Vo(()=>[sR]),_:1},8,["icon"])])])]),default:Vo(()=>[on("div",fR,[Hn(" \u8F85\u52A9\u5DE5\u5177\u680F "),zt(v)?(nn(),nd(zt(Q2),{key:0,class:"demo-control",lf:zt(v),catTurboData:!1,onCatData:b},null,8,["lf"])):Hn("v-if",!0),Hn(" \u8282\u70B9\u9762\u677F "),Ko(zt(q2),{lf:zt(v),nodeList:zt(s)},null,8,["lf","nodeList"]),Hn(" \u753B\u5E03 "),cR,Hn(" \u6570\u636E\u67E5\u770B\u9762\u677F "),Ko(A,{customClass:"flow-dialog",title:"\u6570\u636E",modelValue:zt(c),"onUpdate:modelValue":S[0]||(S[0]=_=>eb(c)?c.value=_:c=_),width:"50%"},{default:Vo(()=>[Ko(T,null,{default:Vo(()=>[Ko(zt(eR),{graphData:zt(u)},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});var vR=Zl(pR,[["__scopeId","data-v-77d65f48"],["__file","D:/work/accout-vue3-ui/src/views/flow-chart/index.vue"]]);export{vR as default};