12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import{u as Jw}from"./hooks.d804685b.js";import{_ as cf,q as ku,y as rg,B as no,C as Cg,v as Rt,r as xi,o as or,n as ro,p as Er,I as Ng,J as Mg,Z as og,ak as Bg,t as Ro,H as zo,R as ig,G as Tg,P as Ig,O as Zw,ay as Kw,az as qw,aq as $w,aA as eO,K as tf,aB as sf,S as Rg,V as tO,W as nO}from"./index.307d1dca.js";const rO=[{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 oO={flowElementList:rO};var Ze={exports:{}},nf={exports:{}};(function(v,g){(function(c,p){v.exports=p()})(window,function(){return function(c){var p={};function i(f){if(p[f])return p[f].exports;var s=p[f]={i:f,l:!1,exports:{}};return c[f].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=c,i.c=p,i.d=function(f,s,A){i.o(f,s)||Object.defineProperty(f,s,{enumerable:!0,get:A})},i.r=function(f){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},i.t=function(f,s){if(1&s&&(f=i(f)),8&s||4&s&&typeof f=="object"&&f&&f.__esModule)return f;var A=Object.create(null);if(i.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:f}),2&s&&typeof f!="string")for(var m in f)i.d(A,m,function(w){return f[w]}.bind(null,m));return A},i.n=function(f){var s=f&&f.__esModule?function(){return f.default}:function(){return f};return i.d(s,"a",s),s},i.o=function(f,s){return Object.prototype.hasOwnProperty.call(f,s)},i.p="",i(i.s=215)}([function(c,p,i){(function(f,s){i.d(p,"a",function(){return Q}),i.d(p,"b",function(){return Jo}),i.d(p,"c",function(){return Nn}),i.d(p,"d",function(){return qe}),i.d(p,"e",function(){return Ne}),i.d(p,"f",function(){return Ce}),i.d(p,"g",function(){return We}),i.d(p,"h",function(){return Pr}),i.d(p,"i",function(){return xt}),i.d(p,"j",function(){return Ie}),i.d(p,"k",function(){return Hn}),i.d(p,"l",function(){return Vo}),i.d(p,"m",function(){return gt}),i.d(p,"n",function(){return Sr}),i.d(p,"o",function(){return D}),i.d(p,"p",function(){return Hi}),i.d(p,"q",function(){return Vn}),i.d(p,"r",function(){return Gi}),i.d(p,"s",function(){return bn}),i.d(p,"t",function(){return Qr}),i.d(p,"u",function(){return ao}),i.d(p,"v",function(){return Lu}),i.d(p,"w",function(){return Ui}),i.d(p,"x",function(){return Gr}),i.d(p,"y",function(){return kn}),i.d(p,"z",function(){return Mt}),i.d(p,"A",function(){return dn}),i.d(p,"B",function(){return Wn}),i.d(p,"C",function(){return Ve}),i.d(p,"D",function(){return Wi}),i.d(p,"E",function(){return jr}),i.d(p,"F",function(){return _r}),i.d(p,"G",function(){return Iu}),i.d(p,"H",function(){return Bi}),i.d(p,"I",function(){return Fu}),i.d(p,"J",function(){return An}),i.d(p,"K",function(){return oe}),i.d(p,"L",function(){return Xt}),i.d(p,"M",function(){return Xi});var A=[];Object.freeze(A);var m={};function w(){return++Ge.mobxGuid}function E(h){throw S(!1,h),"X"}function S(h,y){if(!h)throw new Error("[mobx] "+(y||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(m);function _(h){var y=!1;return function(){if(!y)return y=!0,h.apply(this,arguments)}}var P=function(){};function B(h){return h!==null&&typeof h=="object"}function I(h){if(h===null||typeof h!="object")return!1;var y=Object.getPrototypeOf(h);return y===Object.prototype||y===null}function L(h,y,x){Object.defineProperty(h,y,{enumerable:!1,writable:!0,configurable:!0,value:x})}function Y(h,y){var x="isMobX"+h;return y.prototype[x]=!0,function(N){return B(N)&&N[x]===!0}}function z(h){return h instanceof Map}function Z(h){return h instanceof Set}function ie(h){var y=new Set;for(var x in h)y.add(x);return Object.getOwnPropertySymbols(h).forEach(function(N){Object.getOwnPropertyDescriptor(h,N).enumerable&&y.add(N)}),Array.from(y)}function q(h){return h&&h.toString?h.toString():new String(h).toString()}function H(h){return h===null?null:typeof h=="object"?""+h:h}var $=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:Object.getOwnPropertyNames,Q=Symbol("mobx administration"),T=function(){function h(y){y===void 0&&(y="Atom@"+w()),this.name=y,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Qe.NOT_TRACKING}return h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(y){return y()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(y){return y()})},h.prototype.reportObserved=function(){return Ni(this)},h.prototype.reportChanged=function(){yn(),function(y){y.lowestObserverState!==Qe.STALE&&(y.lowestObserverState=Qe.STALE,y.observers.forEach(function(x){x.dependenciesState===Qe.UP_TO_DATE&&(x.isTracing!==ee.NONE&&Un(x,y),x.onBecomeStale()),x.dependenciesState=Qe.STALE}))}(this),gn()},h.prototype.toString=function(){return this.name},h}(),k=Y("Atom",T);function D(h,y,x){y===void 0&&(y=P),x===void 0&&(x=P);var N,F=new T(h);return y!==P&&Ri("onBecomeObserved",F,y,N),x!==P&&jr(F,x),F}var M={identity:function(h,y){return h===y},structural:function(h,y){return Ko(h,y)},default:function(h,y){return Object.is(h,y)},shallow:function(h,y){return Ko(h,y,1)}},G=function(h,y){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,N){x.__proto__=N}||function(x,N){for(var F in N)N.hasOwnProperty(F)&&(x[F]=N[F])},G(h,y)};
- var ce=function(){return ce=Object.assign||function(h){for(var y,x=1,N=arguments.length;x<N;x++)for(var F in y=arguments[x])Object.prototype.hasOwnProperty.call(y,F)&&(h[F]=y[F]);return h},ce.apply(this,arguments)};function fe(h){var y=typeof Symbol=="function"&&h[Symbol.iterator],x=0;return y?y.call(h):{next:function(){return h&&x>=h.length&&(h=void 0),{value:h&&h[x++],done:!h}}}}function ye(h,y){var x=typeof Symbol=="function"&&h[Symbol.iterator];if(!x)return h;var N,F,ne=x.call(h),he=[];try{for(;(y===void 0||y-- >0)&&!(N=ne.next()).done;)he.push(N.value)}catch(Se){F={error:Se}}finally{try{N&&!N.done&&(x=ne.return)&&x.call(ne)}finally{if(F)throw F.error}}return he}function Oe(){for(var h=[],y=0;y<arguments.length;y++)h=h.concat(ye(arguments[y]));return h}var Ae=Symbol("mobx did run lazy initializers"),K=Symbol("mobx pending decorators"),se={},pe={};function me(h,y){var x=y?se:pe;return x[h]||(x[h]={configurable:!0,enumerable:y,get:function(){return Pe(this),this[h]},set:function(N){Pe(this),this[h]=N}})}function Pe(h){var y,x;if(h[Ae]!==!0){var N=h[K];if(N){L(h,Ae,!0);var F=Oe(Object.getOwnPropertySymbols(N),Object.keys(N));try{for(var ne=fe(F),he=ne.next();!he.done;he=ne.next()){var Se=N[he.value];Se.propertyCreator(h,Se.prop,Se.descriptor,Se.decoratorTarget,Se.decoratorArguments)}}catch(Le){y={error:Le}}finally{try{he&&!he.done&&(x=ne.return)&&x.call(ne)}finally{if(y)throw y.error}}}}}function ze(h,y){return function(){var x,N=function(F,ne,he,Se){if(Se===!0)return y(F,ne,he,F,x),null;if(!Object.prototype.hasOwnProperty.call(F,K)){var Le=F[K];L(F,K,ce({},Le))}return F[K][ne]={prop:ne,propertyCreator:y,descriptor:he,decoratorTarget:F,decoratorArguments:x},me(ne,h)};return je(arguments)?(x=A,N.apply(null,arguments)):(x=Array.prototype.slice.call(arguments),N)}}function je(h){return(h.length===2||h.length===3)&&(typeof h[1]=="string"||typeof h[1]=="symbol")||h.length===4&&h[3]===!0}function De(h,y,x){return Gr(h)?h:Array.isArray(h)?Ve.array(h,{name:x}):I(h)?Ve.object(h,void 0,{name:x}):z(h)?Ve.map(h,{name:x}):Z(h)?Ve.set(h,{name:x}):h}function Ue(h){return h}function J(h){S(h);var y=ze(!0,function(N,F,ne,he,Se){var Le=ne?ne.initializer?ne.initializer.call(N):ne.value:void 0;Ur(N).addObservableProp(F,Le,h)}),x=(f!==void 0&&f.env,y);return x.enhancer=h,x}var V={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function re(h){return h==null?V:typeof h=="string"?{name:h,deep:!0,proxy:!0}:h}Object.freeze(V);var we=J(De),ke=J(function(h,y,x){return h==null||dn(h)||kn(h)||Mt(h)||pn(h)?h:Array.isArray(h)?Ve.array(h,{name:x,deep:!1}):I(h)?Ve.object(h,void 0,{name:x,deep:!1}):z(h)?Ve.map(h,{name:x,deep:!1}):Z(h)?Ve.set(h,{name:x,deep:!1}):E(!1)}),Ee=J(Ue),Xe=J(function(h,y,x){return Ko(h,y)?y:h});function $e(h){return h.defaultDecorator?h.defaultDecorator.enhancer:h.deep===!1?Ue:De}var Ke={box:function(h,y){arguments.length>2&&be("box");var x=re(y);return new kt(h,$e(x),x.name,!0,x.equals)},array:function(h,y){arguments.length>2&&be("array");var x=re(y);return Xo(h,$e(x),x.name)},map:function(h,y){arguments.length>2&&be("map");var x=re(y);return new Jo(h,$e(x),x.name)},set:function(h,y){arguments.length>2&&be("set");var x=re(y);return new so(h,$e(x),x.name)},object:function(h,y,x){typeof arguments[1]=="string"&&be("object");var N=re(x);if(N.proxy===!1)return Vn({},h,y,N);var F=zi(N),ne=Vn({},void 0,void 0,N),he=Yu(ne);return Li(he,h,y,F),he},ref:Ee,shallow:ke,deep:we,struct:Xe},Ve=function(h,y,x){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return we.apply(null,arguments);if(Gr(h))return h;var N=I(h)?Ve.object(h,y,x):Array.isArray(h)?Ve.array(h,y):z(h)?Ve.map(h,y):Z(h)?Ve.set(h,y):h;if(N!==h)return N;E(!1)};function be(h){E("Expected one or two arguments to observable."+h+". Did you accidentally try to use observable."+h+" as decorator?")}Object.keys(Ke).forEach(function(h){return Ve[h]=Ke[h]});var Qe,ee,Te=ze(!1,function(h,y,x,N,F){var ne=x.get,he=x.set,Se=F[0]||{};Ur(h).addComputedProp(h,y,ce({get:ne,set:he,context:h},Se))}),it=Te({equals:M.structural}),gt=function(h,y,x){if(typeof y=="string"||h!==null&&typeof h=="object"&&arguments.length===1)return Te.apply(null,arguments);var N=typeof y=="object"?y:{};return N.get=h,N.set=typeof y=="function"?y:N.set,N.name=N.name||h.name||"",new Gn(N)};gt.struct=it,function(h){h[h.NOT_TRACKING=-1]="NOT_TRACKING",h[h.UP_TO_DATE=0]="UP_TO_DATE",h[h.POSSIBLY_STALE=1]="POSSIBLY_STALE",h[h.STALE=2]="STALE"}(Qe||(Qe={})),function(h){h[h.NONE=0]="NONE",h[h.LOG=1]="LOG",h[h.BREAK=2]="BREAK"}(ee||(ee={}));var rt=function(h){this.cause=h};function ft(h){return h instanceof rt}function Et(h){switch(h.dependenciesState){case Qe.UP_TO_DATE:return!1;case Qe.NOT_TRACKING:case Qe.STALE:return!0;case Qe.POSSIBLY_STALE:for(var y=Ce(!0),x=W(),N=h.observing,F=N.length,ne=0;ne<F;ne++){var he=N[ne];if(Yn(he)){if(Ge.disableErrorBoundaries)he.get();else try{he.get()}catch{return le(x),Ne(y),!0}if(h.dependenciesState===Qe.STALE)return le(x),Ne(y),!0}}return Ye(h),le(x),Ne(y),!1}}function xt(){return Ge.trackingDerivation!==null}function ot(h){var y=h.observers.size>0;Ge.computationDepth>0&&y&&E(!1),Ge.allowStateChanges||!y&&Ge.enforceActions!=="strict"||E(!1)}function Pt(h,y,x){var N=Ce(!0);Ye(h),h.newObserving=new Array(h.observing.length+100),h.unboundDepsCount=0,h.runId=++Ge.runId;var F,ne=Ge.trackingDerivation;if(Ge.trackingDerivation=h,Ge.disableErrorBoundaries===!0)F=y.call(x);else try{F=y.call(x)}catch(he){F=new rt(he)}return Ge.trackingDerivation=ne,function(he){for(var Se=he.observing,Le=he.observing=he.newObserving,lt=Qe.UP_TO_DATE,tt=0,wt=he.unboundDepsCount,ct=0;ct<wt;ct++)(bt=Le[ct]).diffValue===0&&(bt.diffValue=1,tt!==ct&&(Le[tt]=bt),tt++),bt.dependenciesState>lt&&(lt=bt.dependenciesState);for(Le.length=tt,he.newObserving=null,wt=Se.length;wt--;)(bt=Se[wt]).diffValue===0&&Di(bt,he),bt.diffValue=0;for(;tt--;){var bt;(bt=Le[tt]).diffValue===1&&(bt.diffValue=0,Nu(bt,he))}lt!==Qe.UP_TO_DATE&&(he.dependenciesState=lt,he.onBecomeStale())}(h),Ne(N),F}function U(h){var y=h.observing;h.observing=[];for(var x=y.length;x--;)Di(y[x],h);h.dependenciesState=Qe.NOT_TRACKING}function oe(h){var y=W();try{return h()}finally{le(y)}}function W(){var h=Ge.trackingDerivation;return Ge.trackingDerivation=null,h}function le(h){Ge.trackingDerivation=h}function Ce(h){var y=Ge.allowStateReads;return Ge.allowStateReads=h,y}function Ne(h){Ge.allowStateReads=h}function Ye(h){if(h.dependenciesState!==Qe.UP_TO_DATE){h.dependenciesState=Qe.UP_TO_DATE;for(var y=h.observing,x=y.length;x--;)y[x].lowestObserverState=Qe.UP_TO_DATE}}var st=0,zt=1,Ut=Object.getOwnPropertyDescriptor(function(){},"name");Ut&&Ut.configurable;function Dt(h,y,x){var N=function(){return Nt(h,y,x||this,arguments)};return N.isMobxAction=!0,N}function Nt(h,y,x,N){var F=Ie();try{return y.apply(x,N)}catch(ne){throw F.error=ne,ne}finally{We(F)}}function Ie(h,y,x){var N=0,F=W();yn();var ne={prevDerivation:F,prevAllowStateChanges:et(!0),prevAllowStateReads:Ce(!0),notifySpy:!1,startTime:N,actionId:zt++,parentActionId:st};return st=ne.actionId,ne}function We(h){st!==h.actionId&&E("invalid action stack. did you forget to finish an action?"),st=h.parentActionId,h.error!==void 0&&(Ge.suppressReactionErrors=!0),mt(h.prevAllowStateChanges),Ne(h.prevAllowStateReads),gn(),le(h.prevDerivation),h.notifySpy,Ge.suppressReactionErrors=!1}function qe(h,y){var x,N=et(h);try{x=y()}finally{mt(N)}return x}function et(h){var y=Ge.allowStateChanges;return Ge.allowStateChanges=h,y}function mt(h){Ge.allowStateChanges=h}var kt=function(h){function y(x,N,F,ne,he){F===void 0&&(F="ObservableValue@"+w()),he===void 0&&(he=M.default);var Se=h.call(this,F)||this;return Se.enhancer=N,Se.name=F,Se.equals=he,Se.hasUnreportedChange=!1,Se.value=N(x,void 0,F),Se}return function(x,N){function F(){this.constructor=x}G(x,N),x.prototype=N===null?Object.create(N):(F.prototype=N.prototype,new F)}(y,h),y.prototype.dehanceValue=function(x){return this.dehancer!==void 0?this.dehancer(x):x},y.prototype.set=function(x){this.value,(x=this.prepareNewValue(x))!==Ge.UNCHANGED&&this.setNewValue(x)},y.prototype.prepareNewValue=function(x){if(ot(this),rn(this)){var N=dt(this,{object:this,type:"update",newValue:x});if(!N)return Ge.UNCHANGED;x=N.newValue}return x=this.enhancer(x,this.value,this.name),this.equals(this.value,x)?Ge.UNCHANGED:x},y.prototype.setNewValue=function(x){var N=this.value;this.value=x,this.reportChanged(),vn(this)&&Ht(this,{type:"update",object:this,newValue:x,oldValue:N})},y.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},y.prototype.intercept=function(x){return lr(this,x)},y.prototype.observe=function(x,N){return N&&x({object:this,type:"update",newValue:this.value,oldValue:void 0}),fr(this,x)},y.prototype.toJSON=function(){return this.get()},y.prototype.toString=function(){return this.name+"["+this.value+"]"},y.prototype.valueOf=function(){return H(this.get())},y.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},y}(T),ur=Y("ObservableValue",kt),Gn=function(){function h(y){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="#"+w(),this.value=new rt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ee.NONE,S(y.get,"missing option for computed: get"),this.derivation=y.get,this.name=y.name||"ComputedValue@"+w(),y.set&&(this.setter=Dt(this.name+"-setter",y.set)),this.equals=y.equals||(y.compareStructural||y.struct?M.structural:M.default),this.scope=y.context,this.requiresReaction=!!y.requiresReaction,this.keepAlive=!!y.keepAlive}return h.prototype.onBecomeStale=function(){(function(y){y.lowestObserverState===Qe.UP_TO_DATE&&(y.lowestObserverState=Qe.POSSIBLY_STALE,y.observers.forEach(function(x){x.dependenciesState===Qe.UP_TO_DATE&&(x.dependenciesState=Qe.POSSIBLY_STALE,x.isTracing!==ee.NONE&&Un(x,y),x.onBecomeStale())}))})(this)},h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(y){return y()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(y){return y()})},h.prototype.get=function(){this.isComputing&&E("Cycle detected in computation "+this.name+": "+this.derivation),Ge.inBatch!==0||this.observers.size!==0||this.keepAlive?(Ni(this),Et(this)&&this.trackAndCompute()&&function(x){x.lowestObserverState!==Qe.STALE&&(x.lowestObserverState=Qe.STALE,x.observers.forEach(function(N){N.dependenciesState===Qe.POSSIBLY_STALE?N.dependenciesState=Qe.STALE:N.dependenciesState===Qe.UP_TO_DATE&&(x.lowestObserverState=Qe.UP_TO_DATE)}))}(this)):Et(this)&&(this.warnAboutUntrackedRead(),yn(),this.value=this.computeValue(!1),gn());var y=this.value;if(ft(y))throw y.cause;return y},h.prototype.peek=function(){var y=this.computeValue(!1);if(ft(y))throw y.cause;return y},h.prototype.set=function(y){if(this.setter){S(!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,y)}finally{this.isRunningSetter=!1}}else S(!1,!1)},h.prototype.trackAndCompute=function(){var y=this.value,x=this.dependenciesState===Qe.NOT_TRACKING,N=this.computeValue(!0),F=x||ft(y)||ft(N)||!this.equals(y,N);return F&&(this.value=N),F},h.prototype.computeValue=function(y){var x;if(this.isComputing=!0,Ge.computationDepth++,y)x=Pt(this,this.derivation,this.scope);else if(Ge.disableErrorBoundaries===!0)x=this.derivation.call(this.scope);else try{x=this.derivation.call(this.scope)}catch(N){x=new rt(N)}return Ge.computationDepth--,this.isComputing=!1,x},h.prototype.suspend=function(){this.keepAlive||(U(this),this.value=void 0)},h.prototype.observe=function(y,x){var N=this,F=!0,ne=void 0;return Vo(function(){var he=N.get();if(!F||x){var Se=W();y({type:"update",object:N,newValue:he,oldValue:ne}),le(Se)}F=!1,ne=he})},h.prototype.warnAboutUntrackedRead=function(){},h.prototype.toJSON=function(){return this.get()},h.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},h.prototype.valueOf=function(){return H(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(),Yn=Y("ComputedValue",Gn),Lr=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Cu={};function Yo(){return typeof window!="undefined"?window:s!==void 0?s:typeof self!="undefined"?self:Cu}var xn=!0,Pi=!1,Ge=function(){var h=Yo();return h.__mobxInstanceCount>0&&!h.__mobxGlobals&&(xn=!1),h.__mobxGlobals&&h.__mobxGlobals.version!==new Lr().version&&(xn=!1),xn?h.__mobxGlobals?(h.__mobxInstanceCount+=1,h.__mobxGlobals.UNCHANGED||(h.__mobxGlobals.UNCHANGED={}),h.__mobxGlobals):(h.__mobxInstanceCount=1,h.__mobxGlobals=new Lr):(setTimeout(function(){Pi||E("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Lr)}();function Nu(h,y){h.observers.add(y),h.lowestObserverState>y.dependenciesState&&(h.lowestObserverState=y.dependenciesState)}function Di(h,y){h.observers.delete(y),h.observers.size===0&&Ci(h)}function Ci(h){h.isPendingUnobservation===!1&&(h.isPendingUnobservation=!0,Ge.pendingUnobservations.push(h))}function yn(){Ge.inBatch++}function gn(){if(--Ge.inBatch==0){Mi();for(var h=Ge.pendingUnobservations,y=0;y<h.length;y++){var x=h[y];x.isPendingUnobservation=!1,x.observers.size===0&&(x.isBeingObserved&&(x.isBeingObserved=!1,x.onBecomeUnobserved()),x instanceof Gn&&x.suspend())}Ge.pendingUnobservations=[]}}function Ni(h){var y=Ge.trackingDerivation;return y!==null?(y.runId!==h.lastAccessedBy&&(h.lastAccessedBy=y.runId,y.newObserving[y.unboundDepsCount++]=h,h.isBeingObserved||(h.isBeingObserved=!0,h.onBecomeObserved())),!0):(h.observers.size===0&&Ge.inBatch>0&&Ci(h),!1)}function Un(h,y){if(h.isTracing===ee.BREAK){var x=[];xr(Qr(h),x,1),new Function(`debugger;
- /*
- Tracing '`+h.name+`'
- You are entering this break point because derivation '`+h.name+"' is being traced and '"+y.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.
- `+(h instanceof Gn?h.derivation.toString().replace(/[*]\//g,"/"):"")+`
- The dependencies for this derivation are:
- `+x.join(`
- `)+`
- */
- `)()}}function xr(h,y,x){y.length>=1e3?y.push("(and many more)"):(y.push(""+new Array(x).join(" ")+h.name),h.dependencies&&h.dependencies.forEach(function(N){return xr(N,y,x+1)}))}var Nn=function(){function h(y,x,N,F){y===void 0&&(y="Reaction@"+w()),F===void 0&&(F=!1),this.name=y,this.onInvalidate=x,this.errorHandler=N,this.requiresObservable=F,this.observing=[],this.newObserving=[],this.dependenciesState=Qe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+w(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ee.NONE}return h.prototype.onBecomeStale=function(){this.schedule()},h.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ge.pendingReactions.push(this),Mi())},h.prototype.isScheduled=function(){return this._isScheduled},h.prototype.runReaction=function(){if(!this.isDisposed){if(yn(),this._isScheduled=!1,Et(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(y){this.reportExceptionInDerivation(y)}}gn()}},h.prototype.track=function(y){if(!this.isDisposed){yn(),this._isRunning=!0;var x=Pt(this,y,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&U(this),ft(x)&&this.reportExceptionInDerivation(x.cause),gn()}},h.prototype.reportExceptionInDerivation=function(y){var x=this;if(this.errorHandler)this.errorHandler(y,this);else{if(Ge.disableErrorBoundaries)throw y;Ge.suppressReactionErrors,Ge.globalReactionErrorHandlers.forEach(function(N){return N(y,x)})}},h.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(yn(),U(this),gn()))},h.prototype.getDisposer=function(){var y=this.dispose.bind(this);return y[Q]=this,y},h.prototype.toString=function(){return"Reaction["+this.name+"]"},h.prototype.trace=function(y){y===void 0&&(y=!1),function(){for(var x=[],N=0;N<arguments.length;N++)x[N]=arguments[N];var F=!1;typeof x[x.length-1]=="boolean"&&(F=x.pop());var ne=jn(x);if(!ne)return E(!1);ne.isTracing,ee.NONE,ne.isTracing=F?ee.BREAK:ee.LOG}(this,y)},h}(),Uo=function(h){return h()};function Mi(){Ge.inBatch>0||Ge.isRunningReactions||Uo(Mu)}function Mu(){Ge.isRunningReactions=!0;for(var h=Ge.pendingReactions,y=0;h.length>0;){++y==100&&h.splice(0);for(var x=h.splice(0),N=0,F=x.length;N<F;N++)x[N].runReaction()}Ge.isRunningReactions=!1}var io=Y("Reaction",Nn);function Bu(h){var y=Uo;Uo=function(x){return h(function(){return y(x)})}}function Bi(h){return function(){}}function Tu(){E(!1)}function cr(h){return function(y,x,N){if(N){if(N.value)return{value:Dt(h,N.value),enumerable:!1,configurable:!0,writable:!0};var F=N.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Dt(h,F.call(this))}}}return Ti(h).apply(this,arguments)}}function Ti(h){return function(y,x,N){Object.defineProperty(y,x,{configurable:!0,enumerable:!1,get:function(){},set:function(F){L(this,x,Hn(h,F))}})}}var Hn=function(h,y,x,N){return arguments.length===1&&typeof h=="function"?Dt(h.name||"<unnamed action>",h):arguments.length===2&&typeof y=="function"?Dt(h,y):arguments.length===1&&typeof h=="string"?cr(h):N!==!0?cr(y).apply(null,arguments):void L(h,y,Dt(h.name||y,x.value,this))};function Iu(h,y){return Nt(typeof h=="string"?h:h.name||"<unnamed action>",typeof h=="function"?h:y,this,void 0)}function ao(h){return typeof h=="function"&&h.isMobxAction===!0}function Ho(h,y,x){L(h,y,Dt(y,x.bind(h)))}function Vo(h,y){y===void 0&&(y=m);var x,N=y&&y.name||h.name||"Autorun@"+w();if(!y.scheduler&&!y.delay)x=new Nn(N,function(){this.track(he)},y.onError,y.requiresObservable);else{var F=Ii(y),ne=!1;x=new Nn(N,function(){ne||(ne=!0,F(function(){ne=!1,x.isDisposed||x.track(he)}))},y.onError,y.requiresObservable)}function he(){h(x)}return x.schedule(),x.getDisposer()}Hn.bound=function(h,y,x,N){return N===!0?(Ho(h,y,x.value),null):x?{configurable:!0,enumerable:!1,get:function(){return Ho(this,y,x.value||x.initializer.call(this)),this[y]},set:Tu}:{enumerable:!1,configurable:!0,set:function(F){Ho(this,y,F)},get:function(){}}};var Ru=function(h){return h()};function Ii(h){return h.scheduler?h.scheduler:h.delay?function(y){return setTimeout(y,h.delay)}:Ru}function _r(h,y,x){x===void 0&&(x=m);var N,F,ne,he=x.name||"Reaction@"+w(),Se=Hn(he,x.onError?(N=x.onError,F=y,function(){try{return F.apply(this,arguments)}catch(jt){N.call(this,jt)}}):y),Le=!x.scheduler&&!x.delay,lt=Ii(x),tt=!0,wt=!1,ct=x.compareStructural?M.structural:x.equals||M.default,bt=new Nn(he,function(){tt||Le?mn():wt||(wt=!0,lt(mn))},x.onError,x.requiresObservable);function mn(){if(wt=!1,!bt.isDisposed){var jt=!1;bt.track(function(){var on=h(bt);jt=tt||!ct(ne,on),ne=on}),tt&&x.fireImmediately&&Se(ne,bt),tt||jt!==!0||Se(ne,bt),tt&&(tt=!1)}}return bt.schedule(),bt.getDisposer()}function jr(h,y,x){return Ri("onBecomeUnobserved",h,y,x)}function Ri(h,y,x,N){var F=typeof N=="function"?bn(y,x):bn(y),ne=typeof N=="function"?N:x,he=h+"Listeners";return F[he]?F[he].add(ne):F[he]=new Set([ne]),typeof F[h]!="function"?E(!1):function(){var Se=F[he];Se&&(Se.delete(ne),Se.size===0&&delete F[he])}}function Sr(h){var y=h.enforceActions,x=h.computedRequiresReaction,N=h.computedConfigurable,F=h.disableErrorBoundaries,ne=h.reactionScheduler,he=h.reactionRequiresObservable,Se=h.observableRequiresReaction;if(h.isolateGlobalState===!0&&((Ge.pendingReactions.length||Ge.inBatch||Ge.isRunningReactions)&&E("isolateGlobalState should be called before MobX is running any reactions"),Pi=!0,xn&&(--Yo().__mobxInstanceCount==0&&(Yo().__mobxGlobals=void 0),Ge=new Lr)),y!==void 0){var Le=void 0;switch(y){case!0:case"observed":Le=!0;break;case!1:case"never":Le=!1;break;case"strict":case"always":Le="strict";break;default:E("Invalid value for 'enforceActions': '"+y+"', expected 'never', 'always' or 'observed'")}Ge.enforceActions=Le,Ge.allowStateChanges=Le!==!0&&Le!=="strict"}x!==void 0&&(Ge.computedRequiresReaction=!!x),he!==void 0&&(Ge.reactionRequiresObservable=!!he),Se!==void 0&&(Ge.observableRequiresReaction=!!Se,Ge.allowStateReads=!Ge.observableRequiresReaction),N!==void 0&&(Ge.computedConfigurable=!!N),F!==void 0&&(Ge.disableErrorBoundaries=!!F),ne&&Bu(ne)}function Vn(h,y,x,N){var F=zi(N=re(N));return Pe(h),Ur(h,N.name,F.enhancer),y&&Li(h,y,x,F),h}function zi(h){return h.defaultDecorator||(h.deep===!1?Ee:we)}function Li(h,y,x,N){var F,ne;yn();try{var he=$(y);try{for(var Se=fe(he),Le=Se.next();!Le.done;Le=Se.next()){var lt=Le.value,tt=Object.getOwnPropertyDescriptor(y,lt),wt=(x&< in x?x[lt]:tt.get?Te:N)(h,lt,tt,!0);wt&&Object.defineProperty(h,lt,wt)}}catch(ct){F={error:ct}}finally{try{Le&&!Le.done&&(ne=Se.return)&&ne.call(Se)}finally{if(F)throw F.error}}}finally{gn()}}function Qr(h,y){return Qi(bn(h,y))}function Qi(h){var y,x,N={name:h.name};return h.observing&&h.observing.length>0&&(N.dependencies=(y=h.observing,x=[],y.forEach(function(F){x.indexOf(F)===-1&&x.push(F)}),x).map(Qi)),N}var zu=0;function Fi(){this.message="FLOW_CANCELLED"}function Gi(h){arguments.length!==1&&E("Flow expects 1 argument and cannot be used as decorator");var y=h.name||"<unnamed flow>";return function(){var x,N=this,F=arguments,ne=++zu,he=Hn(y+" - runid: "+ne+" - init",h).apply(N,F),Se=void 0,Le=new Promise(function(lt,tt){var wt=0;function ct(jt){var on;Se=void 0;try{on=Hn(y+" - runid: "+ne+" - yield "+wt++,he.next).call(he,jt)}catch(Hr){return tt(Hr)}mn(on)}function bt(jt){var on;Se=void 0;try{on=Hn(y+" - runid: "+ne+" - yield "+wt++,he.throw).call(he,jt)}catch(Hr){return tt(Hr)}mn(on)}function mn(jt){if(!jt||typeof jt.then!="function")return jt.done?lt(jt.value):(Se=Promise.resolve(jt.value)).then(ct,bt);jt.then(mn,tt)}x=tt,ct(void 0)});return Le.cancel=Hn(y+" - runid: "+ne+" - cancel",function(){try{Se&&Fr(Se);var lt=he.return(void 0),tt=Promise.resolve(lt.value);tt.then(P,P),Fr(tt),x(new Fi)}catch(wt){x(wt)}}),Le}}function Fr(h){typeof h.cancel=="function"&&h.cancel()}function Yi(h,y){if(h==null)return!1;if(y!==void 0){if(dn(h)===!1||!h[Q].values.has(y))return!1;var x=bn(h,y);return Yn(x)}return Yn(h)}function Lu(h){return arguments.length>1?E(!1):Yi(h)}function Ui(h,y){return typeof y!="string"?E(!1):Yi(h,y)}function Wo(h,y){return h!=null&&(y!==void 0?!!dn(h)&&h[Q].values.has(y):dn(h)||!!h[Q]||k(h)||io(h)||Yn(h))}function Gr(h){return arguments.length!==1&&E(!1),Wo(h)}function Wn(h){return dn(h)?h[Q].getKeys():Mt(h)||pn(h)?Array.from(h.keys()):kn(h)?h.map(function(y,x){return x}):E(!1)}function Xt(h){return dn(h)?Wn(h).map(function(y){return h[y]}):Mt(h)?Wn(h).map(function(y){return h.get(y)}):pn(h)?Array.from(h.values()):kn(h)?h.slice():E(!1)}function Hi(h){return dn(h)?Wn(h).map(function(y){return[y,h[y]]}):Mt(h)?Wn(h).map(function(y){return[y,h.get(y)]}):pn(h)?Array.from(h.entries()):kn(h)?h.map(function(y,x){return[x,y]}):E(!1)}function Vi(h,y,x){if(arguments.length!==2||pn(h))if(dn(h)){var N=h[Q],F=N.values.get(y);F?N.write(y,x):N.addObservableProp(y,x,N.defaultEnhancer)}else if(Mt(h))h.set(y,x);else if(pn(h))h.add(y);else{if(!kn(h))return E(!1);typeof y!="number"&&(y=parseInt(y,10)),S(y>=0,"Not a valid index: '"+y+"'"),yn(),y>=h.length&&(h.length=y+1),h[y]=x,gn()}else{yn();var ne=y;try{for(var he in ne)Vi(h,he,ne[he])}finally{gn()}}}function Wi(h,y,x,N){return typeof x=="function"?function(F,ne,he,Se){return Pr(F,ne).observe(he,Se)}(h,y,x,N):function(F,ne,he){return Pr(F).observe(ne,he)}(h,y,x)}Fi.prototype=Object.create(Error.prototype);var Qu={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function sr(h,y,x,N){return N.detectCycles&&h.set(y,x),x}function _n(h,y,x){if(!y.recurseEverything&&!Gr(h)||typeof h!="object")return h;if(h===null)return null;if(h instanceof Date)return h;if(ur(h))return _n(h.get(),y,x);if(Gr(h)&&Wn(h),y.detectCycles===!0&&h!==null&&x.has(h))return x.get(h);if(kn(h)||Array.isArray(h)){var N=sr(x,h,[],y),F=h.map(function(ct){return _n(ct,y,x)});N.length=F.length;for(var ne=0,he=F.length;ne<he;ne++)N[ne]=F[ne];return N}if(pn(h)||Object.getPrototypeOf(h)===Set.prototype){if(y.exportMapsAsObjects===!1){var Se=sr(x,h,new Set,y);return h.forEach(function(ct){Se.add(_n(ct,y,x))}),Se}var Le=sr(x,h,[],y);return h.forEach(function(ct){Le.push(_n(ct,y,x))}),Le}if(Mt(h)||Object.getPrototypeOf(h)===Map.prototype){if(y.exportMapsAsObjects===!1){var lt=sr(x,h,new Map,y);return h.forEach(function(ct,bt){lt.set(bt,_n(ct,y,x))}),lt}var tt=sr(x,h,{},y);return h.forEach(function(ct,bt){tt[bt]=_n(ct,y,x)}),tt}var wt=sr(x,h,{},y);return ie(h).forEach(function(ct){wt[ct]=_n(h[ct],y,x)}),wt}function Fu(h,y){var x;return typeof y=="boolean"&&(y={detectCycles:y}),y||(y=Qu),y.detectCycles=y.detectCycles===void 0?y.recurseEverything===!0:y.detectCycles===!0,y.detectCycles&&(x=new Map),_n(h,y,x)}function jn(h){switch(h.length){case 0:return Ge.trackingDerivation;case 1:return bn(h[0]);case 2:return bn(h[0],h[1])}}function An(h,y){y===void 0&&(y=void 0),yn();try{return h.apply(y)}finally{gn()}}function Xi(h,y,x){return arguments.length===1||y&&typeof y=="object"?Gu(h,y):Ji(h,y,x||{})}function Ji(h,y,x){var N;typeof x.timeout=="number"&&(N=setTimeout(function(){if(!ne[Q].isDisposed){ne();var he=new Error("WHEN_TIMEOUT");if(!x.onError)throw he;x.onError(he)}},x.timeout)),x.name=x.name||"When@"+w();var F=Dt(x.name+"-effect",y),ne=Vo(function(he){h()&&(he.dispose(),N&&clearTimeout(N),F())},x);return ne}function Gu(h,y){var x,N=new Promise(function(F,ne){var he=Ji(h,F,ce(ce({},y),{onError:ne}));x=function(){he(),ne("WHEN_CANCELLED")}});return N.cancel=x,N}function uo(h){return h[Q]}function Xn(h){return typeof h=="string"||typeof h=="number"||typeof h=="symbol"}var Yr={has:function(h,y){if(y===Q||y==="constructor"||y===Ae)return!0;var x=uo(h);return Xn(y)?x.has(y):y in h},get:function(h,y){if(y===Q||y==="constructor"||y===Ae)return h[y];var x=uo(h),N=x.values.get(y);if(N instanceof T){var F=N.get();return F===void 0&&x.has(y),F}return Xn(y)&&x.has(y),h[y]},set:function(h,y,x){return!!Xn(y)&&(Vi(h,y,x),!0)},deleteProperty:function(h,y){return!!Xn(y)&&(uo(h).remove(y),!0)},ownKeys:function(h){return uo(h).keysAtom.reportObserved(),Reflect.ownKeys(h)},preventExtensions:function(h){return E("Dynamic observable objects cannot be frozen"),!1}};function Yu(h){var y=new Proxy(h,Yr);return h[Q].proxy=y,y}function rn(h){return h.interceptors!==void 0&&h.interceptors.length>0}function lr(h,y){var x=h.interceptors||(h.interceptors=[]);return x.push(y),_(function(){var N=x.indexOf(y);N!==-1&&x.splice(N,1)})}function dt(h,y){var x=W();try{for(var N=Oe(h.interceptors||[]),F=0,ne=N.length;F<ne&&(S(!(y=N[F](y))||y.type,"Intercept handlers should return nothing or a change object"),y);F++);return y}finally{le(x)}}function vn(h){return h.changeListeners!==void 0&&h.changeListeners.length>0}function fr(h,y){var x=h.changeListeners||(h.changeListeners=[]);return x.push(y),_(function(){var N=x.indexOf(y);N!==-1&&x.splice(N,1)})}function Ht(h,y){var x=W(),N=h.changeListeners;if(N){for(var F=0,ne=(N=N.slice()).length;F<ne;F++)N[F](y);le(x)}}var Zi={get:function(h,y){return y===Q?h[Q]:y==="length"?h[Q].getArrayLength():typeof y=="number"?Sn.get.call(h,y):typeof y!="string"||isNaN(y)?Sn.hasOwnProperty(y)?Sn[y]:h[y]:Sn.get.call(h,parseInt(y))},set:function(h,y,x){return y==="length"&&h[Q].setArrayLength(x),typeof y=="number"&&Sn.set.call(h,y,x),typeof y=="symbol"||isNaN(y)?h[y]=x:Sn.set.call(h,parseInt(y),x),!0},preventExtensions:function(h){return E("Observable arrays cannot be frozen"),!1}};function Xo(h,y,x,N){x===void 0&&(x="ObservableArray@"+w()),N===void 0&&(N=!1);var F,ne,he,Se=new Ki(x,y,N);F=Se.values,ne=Q,he=Se,Object.defineProperty(F,ne,{enumerable:!1,writable:!1,configurable:!0,value:he});var Le=new Proxy(Se.values,Zi);if(Se.proxy=Le,h&&h.length){var lt=et(!0);Se.spliceWithArray(0,0,h),mt(lt)}return Le}var Ki=function(){function h(y,x,N){this.owned=N,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new T(y||"ObservableArray@"+w()),this.enhancer=function(F,ne){return x(F,ne,y+"[..]")}}return h.prototype.dehanceValue=function(y){return this.dehancer!==void 0?this.dehancer(y):y},h.prototype.dehanceValues=function(y){return this.dehancer!==void 0&&y.length>0?y.map(this.dehancer):y},h.prototype.intercept=function(y){return lr(this,y)},h.prototype.observe=function(y,x){return x===void 0&&(x=!1),x&&y({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),fr(this,y)},h.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},h.prototype.setArrayLength=function(y){if(typeof y!="number"||y<0)throw new Error("[mobx.array] Out of range: "+y);var x=this.values.length;if(y!==x)if(y>x){for(var N=new Array(y-x),F=0;F<y-x;F++)N[F]=void 0;this.spliceWithArray(x,0,N)}else this.spliceWithArray(y,x-y)},h.prototype.updateArrayLength=function(y,x){if(y!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=x},h.prototype.spliceWithArray=function(y,x,N){var F=this;ot(this.atom);var ne=this.values.length;if(y===void 0?y=0:y>ne?y=ne:y<0&&(y=Math.max(0,ne+y)),x=arguments.length===1?ne-y:x==null?0:Math.max(0,Math.min(x,ne-y)),N===void 0&&(N=A),rn(this)){var he=dt(this,{object:this.proxy,type:"splice",index:y,removedCount:x,added:N});if(!he)return A;x=he.removedCount,N=he.added}N=N.length===0?N:N.map(function(Le){return F.enhancer(Le,void 0)});var Se=this.spliceItemsIntoValues(y,x,N);return x===0&&N.length===0||this.notifyArraySplice(y,N,Se),this.dehanceValues(Se)},h.prototype.spliceItemsIntoValues=function(y,x,N){var F;if(N.length<1e4)return(F=this.values).splice.apply(F,Oe([y,x],N));var ne=this.values.slice(y,y+x);return this.values=this.values.slice(0,y).concat(N,this.values.slice(y+x)),ne},h.prototype.notifyArrayChildUpdate=function(y,x,N){var F=!this.owned&&!1,ne=vn(this),he=ne||F?{object:this.proxy,type:"update",index:y,newValue:x,oldValue:N}:null;this.atom.reportChanged(),ne&&Ht(this,he)},h.prototype.notifyArraySplice=function(y,x,N){var F=!this.owned&&!1,ne=vn(this),he=ne||F?{object:this.proxy,type:"splice",index:y,removed:N,added:x,removedCount:N.length,addedCount:x.length}:null;this.atom.reportChanged(),ne&&Ht(this,he)},h}(),Sn={intercept:function(h){return this[Q].intercept(h)},observe:function(h,y){return y===void 0&&(y=!1),this[Q].observe(h,y)},clear:function(){return this.splice(0)},replace:function(h){var y=this[Q];return y.spliceWithArray(0,y.values.length,h)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(h,y){for(var x=[],N=2;N<arguments.length;N++)x[N-2]=arguments[N];var F=this[Q];switch(arguments.length){case 0:return[];case 1:return F.spliceWithArray(h);case 2:return F.spliceWithArray(h,y)}return F.spliceWithArray(h,y,x)},spliceWithArray:function(h,y,x){return this[Q].spliceWithArray(h,y,x)},push:function(){for(var h=[],y=0;y<arguments.length;y++)h[y]=arguments[y];var x=this[Q];return x.spliceWithArray(x.values.length,0,h),x.values.length},pop:function(){return this.splice(Math.max(this[Q].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var h=[],y=0;y<arguments.length;y++)h[y]=arguments[y];var x=this[Q];return x.spliceWithArray(0,0,h),x.values.length},reverse:function(){var h=this.slice();return h.reverse.apply(h,arguments)},sort:function(h){var y=this.slice();return y.sort.apply(y,arguments)},remove:function(h){var y=this[Q],x=y.dehanceValues(y.values).indexOf(h);return x>-1&&(this.splice(x,1),!0)},get:function(h){var y=this[Q];if(y&&h<y.values.length)return y.atom.reportObserved(),y.dehanceValue(y.values[h])},set:function(h,y){var x=this[Q],N=x.values;if(h<N.length){ot(x.atom);var F=N[h];if(rn(x)){var ne=dt(x,{type:"update",object:x.proxy,index:h,newValue:y});if(!ne)return;y=ne.newValue}(y=x.enhancer(y,F))!==F&&(N[h]=y,x.notifyArrayChildUpdate(h,y,F))}else{if(h!==N.length)throw new Error("[mobx.array] Index out of bounds, "+h+" is larger than "+N.length);x.spliceWithArray(h,0,[y])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Sn[h]=function(){var y=this[Q];y.atom.reportObserved();var x=y.dehanceValues(y.values);return x[h].apply(x,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Sn[h]=function(y,x){var N=this,F=this[Q];return F.atom.reportObserved(),F.dehanceValues(F.values)[h](function(ne,he){return y.call(x,ne,he,N)},x)})}),["reduce","reduceRight"].forEach(function(h){Sn[h]=function(){var y=this,x=this[Q];x.atom.reportObserved();var N=arguments[0];return arguments[0]=function(F,ne,he){return ne=x.dehanceValue(ne),N(F,ne,he,y)},x.values[h].apply(x.values,arguments)}});var qi,co=Y("ObservableArrayAdministration",Ki);function kn(h){return B(h)&&co(h[Q])}var $i,Uu={},Jo=function(){function h(y,x,N){if(x===void 0&&(x=De),N===void 0&&(N="ObservableMap@"+w()),this.enhancer=x,this.name=N,this[qi]=Uu,this._keysAtom=D(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(y)}return h.prototype._has=function(y){return this._data.has(y)},h.prototype.has=function(y){var x=this;if(!Ge.trackingDerivation)return this._has(y);var N=this._hasMap.get(y);if(!N){var F=N=new kt(this._has(y),Ue,this.name+"."+q(y)+"?",!1);this._hasMap.set(y,F),jr(F,function(){return x._hasMap.delete(y)})}return N.get()},h.prototype.set=function(y,x){var N=this._has(y);if(rn(this)){var F=dt(this,{type:N?"update":"add",object:this,newValue:x,name:y});if(!F)return this;x=F.newValue}return N?this._updateValue(y,x):this._addValue(y,x),this},h.prototype.delete=function(y){var x=this;if(ot(this._keysAtom),rn(this)&&!(F=dt(this,{type:"delete",object:this,name:y})))return!1;if(this._has(y)){var N=vn(this),F=N?{type:"delete",object:this,oldValue:this._data.get(y).value,name:y}:null;return An(function(){x._keysAtom.reportChanged(),x._updateHasMapEntry(y,!1),x._data.get(y).setNewValue(void 0),x._data.delete(y)}),N&&Ht(this,F),!0}return!1},h.prototype._updateHasMapEntry=function(y,x){var N=this._hasMap.get(y);N&&N.setNewValue(x)},h.prototype._updateValue=function(y,x){var N=this._data.get(y);if((x=N.prepareNewValue(x))!==Ge.UNCHANGED){var F=vn(this),ne=F?{type:"update",object:this,oldValue:N.value,name:y,newValue:x}:null;N.setNewValue(x),F&&Ht(this,ne)}},h.prototype._addValue=function(y,x){var N=this;ot(this._keysAtom),An(function(){var he=new kt(x,N.enhancer,N.name+"."+q(y),!1);N._data.set(y,he),x=he.value,N._updateHasMapEntry(y,!0),N._keysAtom.reportChanged()});var F=vn(this),ne=F?{type:"add",object:this,name:y,newValue:x}:null;F&&Ht(this,ne)},h.prototype.get=function(y){return this.has(y)?this.dehanceValue(this._data.get(y).get()):this.dehanceValue(void 0)},h.prototype.dehanceValue=function(y){return this.dehancer!==void 0?this.dehancer(y):y},h.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},h.prototype.values=function(){var y=this,x=this.keys();return ho({next:function(){var N=x.next(),F=N.done,ne=N.value;return{done:F,value:F?void 0:y.get(ne)}}})},h.prototype.entries=function(){var y=this,x=this.keys();return ho({next:function(){var N=x.next(),F=N.done,ne=N.value;return{done:F,value:F?void 0:[ne,y.get(ne)]}}})},h.prototype[qi=Q,Symbol.iterator]=function(){return this.entries()},h.prototype.forEach=function(y,x){var N,F;try{for(var ne=fe(this),he=ne.next();!he.done;he=ne.next()){var Se=ye(he.value,2),Le=Se[0],lt=Se[1];y.call(x,lt,Le,this)}}catch(tt){N={error:tt}}finally{try{he&&!he.done&&(F=ne.return)&&F.call(ne)}finally{if(N)throw N.error}}},h.prototype.merge=function(y){var x=this;return Mt(y)&&(y=y.toJS()),An(function(){var N=et(!0);try{I(y)?ie(y).forEach(function(F){return x.set(F,y[F])}):Array.isArray(y)?y.forEach(function(F){var ne=ye(F,2),he=ne[0],Se=ne[1];return x.set(he,Se)}):z(y)?(y.constructor!==Map&&E("Cannot initialize from classes that inherit from Map: "+y.constructor.name),y.forEach(function(F,ne){return x.set(ne,F)})):y!=null&&E("Cannot initialize map from "+y)}finally{mt(N)}}),this},h.prototype.clear=function(){var y=this;An(function(){oe(function(){var x,N;try{for(var F=fe(y.keys()),ne=F.next();!ne.done;ne=F.next()){var he=ne.value;y.delete(he)}}catch(Se){x={error:Se}}finally{try{ne&&!ne.done&&(N=F.return)&&N.call(F)}finally{if(x)throw x.error}}})})},h.prototype.replace=function(y){var x=this;return An(function(){var N,F,ne,he,Se=function(an){if(z(an)||Mt(an))return an;if(Array.isArray(an))return new Map(an);if(I(an)){var ia=new Map;for(var Vr in an)ia.set(Vr,an[Vr]);return ia}return E("Cannot convert to map from '"+an+"'")}(y),Le=new Map,lt=!1;try{for(var tt=fe(x._data.keys()),wt=tt.next();!wt.done;wt=tt.next()){var ct=wt.value;if(!Se.has(ct))if(x.delete(ct))lt=!0;else{var bt=x._data.get(ct);Le.set(ct,bt)}}}catch(an){N={error:an}}finally{try{wt&&!wt.done&&(F=tt.return)&&F.call(tt)}finally{if(N)throw N.error}}try{for(var mn=fe(Se.entries()),jt=mn.next();!jt.done;jt=mn.next()){var on=ye(jt.value,2),Hr=(ct=on[0],bt=on[1],x._data.has(ct));if(x.set(ct,bt),x._data.has(ct)){var Vu=x._data.get(ct);Le.set(ct,Vu),Hr||(lt=!0)}}}catch(an){ne={error:an}}finally{try{jt&&!jt.done&&(he=mn.return)&&he.call(mn)}finally{if(ne)throw ne.error}}if(!lt)if(x._data.size!==Le.size)x._keysAtom.reportChanged();else for(var ra=x._data.keys(),oa=Le.keys(),yo=ra.next(),$o=oa.next();!yo.done;){if(yo.value!==$o.value){x._keysAtom.reportChanged();break}yo=ra.next(),$o=oa.next()}x._data=Le}),this},Object.defineProperty(h.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.toPOJO=function(){var y,x,N={};try{for(var F=fe(this),ne=F.next();!ne.done;ne=F.next()){var he=ye(ne.value,2),Se=he[0],Le=he[1];N[typeof Se=="symbol"?Se:q(Se)]=Le}}catch(lt){y={error:lt}}finally{try{ne&&!ne.done&&(x=F.return)&&x.call(F)}finally{if(y)throw y.error}}return N},h.prototype.toJS=function(){return new Map(this)},h.prototype.toJSON=function(){return this.toPOJO()},h.prototype.toString=function(){var y=this;return this.name+"[{ "+Array.from(this.keys()).map(function(x){return q(x)+": "+y.get(x)}).join(", ")+" }]"},h.prototype.observe=function(y,x){return fr(this,y)},h.prototype.intercept=function(y){return lr(this,y)},h}(),Mt=Y("ObservableMap",Jo),kr={},so=function(){function h(y,x,N){if(x===void 0&&(x=De),N===void 0&&(N="ObservableSet@"+w()),this.name=N,this[$i]=kr,this._data=new Set,this._atom=D(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(F,ne){return x(F,ne,N)},y&&this.replace(y)}return h.prototype.dehanceValue=function(y){return this.dehancer!==void 0?this.dehancer(y):y},h.prototype.clear=function(){var y=this;An(function(){oe(function(){var x,N;try{for(var F=fe(y._data.values()),ne=F.next();!ne.done;ne=F.next()){var he=ne.value;y.delete(he)}}catch(Se){x={error:Se}}finally{try{ne&&!ne.done&&(N=F.return)&&N.call(F)}finally{if(x)throw x.error}}})})},h.prototype.forEach=function(y,x){var N,F;try{for(var ne=fe(this),he=ne.next();!he.done;he=ne.next()){var Se=he.value;y.call(x,Se,Se,this)}}catch(Le){N={error:Le}}finally{try{he&&!he.done&&(F=ne.return)&&F.call(ne)}finally{if(N)throw N.error}}},Object.defineProperty(h.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.add=function(y){var x=this;if(ot(this._atom),rn(this)&&!(F=dt(this,{type:"add",object:this,newValue:y})))return this;if(!this.has(y)){An(function(){x._data.add(x.enhancer(y,void 0)),x._atom.reportChanged()});var N=vn(this),F=N?{type:"add",object:this,newValue:y}:null;N&&Ht(this,F)}return this},h.prototype.delete=function(y){var x=this;if(rn(this)&&!(F=dt(this,{type:"delete",object:this,oldValue:y})))return!1;if(this.has(y)){var N=vn(this),F=N?{type:"delete",object:this,oldValue:y}:null;return An(function(){x._atom.reportChanged(),x._data.delete(y)}),N&&Ht(this,F),!0}return!1},h.prototype.has=function(y){return this._atom.reportObserved(),this._data.has(this.dehanceValue(y))},h.prototype.entries=function(){var y=0,x=Array.from(this.keys()),N=Array.from(this.values());return ho({next:function(){var F=y;return y+=1,F<N.length?{value:[x[F],N[F]],done:!1}:{done:!0}}})},h.prototype.keys=function(){return this.values()},h.prototype.values=function(){this._atom.reportObserved();var y=this,x=0,N=Array.from(this._data.values());return ho({next:function(){return x<N.length?{value:y.dehanceValue(N[x++]),done:!1}:{done:!0}}})},h.prototype.replace=function(y){var x=this;return pn(y)&&(y=y.toJS()),An(function(){var N=et(!0);try{Array.isArray(y)||Z(y)?(x.clear(),y.forEach(function(F){return x.add(F)})):y!=null&&E("Cannot initialize set from "+y)}finally{mt(N)}}),this},h.prototype.observe=function(y,x){return fr(this,y)},h.prototype.intercept=function(y){return lr(this,y)},h.prototype.toJS=function(){return new Set(this)},h.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},h.prototype[$i=Q,Symbol.iterator]=function(){return this.values()},h}(),pn=Y("ObservableSet",so),ea=function(){function h(y,x,N,F){x===void 0&&(x=new Map),this.target=y,this.values=x,this.name=N,this.defaultEnhancer=F,this.keysAtom=new T(N+".keys")}return h.prototype.read=function(y){return this.values.get(y).get()},h.prototype.write=function(y,x){var N=this.target,F=this.values.get(y);if(F instanceof Gn)F.set(x);else{if(rn(this)){if(!(he=dt(this,{type:"update",object:this.proxy||N,name:y,newValue:x})))return;x=he.newValue}if((x=F.prepareNewValue(x))!==Ge.UNCHANGED){var ne=vn(this),he=ne?{type:"update",object:this.proxy||N,oldValue:F.value,name:y,newValue:x}:null;F.setNewValue(x),ne&&Ht(this,he)}}},h.prototype.has=function(y){var x=this.pendingKeys||(this.pendingKeys=new Map),N=x.get(y);if(N)return N.get();var F=!!this.values.get(y);return N=new kt(F,Ue,this.name+"."+q(y)+"?",!1),x.set(y,N),N.get()},h.prototype.addObservableProp=function(y,x,N){N===void 0&&(N=this.defaultEnhancer);var F=this.target;if(rn(this)){var ne=dt(this,{object:this.proxy||F,name:y,type:"add",newValue:x});if(!ne)return;x=ne.newValue}var he=new kt(x,N,this.name+"."+q(y),!1);this.values.set(y,he),x=he.value,Object.defineProperty(F,y,function(Se){return lo[Se]||(lo[Se]={configurable:!0,enumerable:!0,get:function(){return this[Q].read(Se)},set:function(Le){this[Q].write(Se,Le)}})}(y)),this.notifyPropertyAddition(y,x)},h.prototype.addComputedProp=function(y,x,N){var F,ne,he,Se=this.target;N.name=N.name||this.name+"."+q(x),this.values.set(x,new Gn(N)),(y===Se||(F=y,ne=x,!(he=Object.getOwnPropertyDescriptor(F,ne))||he.configurable!==!1&&he.writable!==!1))&&Object.defineProperty(y,x,function(Le){return fo[Le]||(fo[Le]={configurable:Ge.computedConfigurable,enumerable:!1,get:function(){return po(this).read(Le)},set:function(lt){po(this).write(Le,lt)}})}(x))},h.prototype.remove=function(y){if(this.values.has(y)){var x=this.target;if(rn(this)&&!(Le=dt(this,{object:this.proxy||x,name:y,type:"remove"})))return;try{yn();var N=vn(this),F=!1,ne=this.values.get(y),he=ne&&ne.get();if(ne&&ne.set(void 0),this.keysAtom.reportChanged(),this.values.delete(y),this.pendingKeys){var Se=this.pendingKeys.get(y);Se&&Se.set(!1)}delete this.target[y];var Le=N?{type:"remove",object:this.proxy||x,oldValue:he,name:y}:null;N&&Ht(this,Le)}finally{gn()}}},h.prototype.illegalAccess=function(y,x){},h.prototype.observe=function(y,x){return fr(this,y)},h.prototype.intercept=function(y){return lr(this,y)},h.prototype.notifyPropertyAddition=function(y,x){var N=vn(this),F=N?{type:"add",object:this.proxy||this.target,name:y,newValue:x}:null;if(N&&Ht(this,F),this.pendingKeys){var ne=this.pendingKeys.get(y);ne&&ne.set(!0)}this.keysAtom.reportChanged()},h.prototype.getKeys=function(){var y,x;this.keysAtom.reportObserved();var N=[];try{for(var F=fe(this.values),ne=F.next();!ne.done;ne=F.next()){var he=ye(ne.value,2),Se=he[0];he[1]instanceof kt&&N.push(Se)}}catch(Le){y={error:Le}}finally{try{ne&&!ne.done&&(x=F.return)&&x.call(F)}finally{if(y)throw y.error}}return N},h}();function Ur(h,y,x){if(y===void 0&&(y=""),x===void 0&&(x=De),Object.prototype.hasOwnProperty.call(h,Q))return h[Q];I(h)||(y=(h.constructor.name||"ObservableObject")+"@"+w()),y||(y="ObservableObject@"+w());var N=new ea(h,new Map,q(y),x);return L(h,Q,N),N}var lo=Object.create(null),fo=Object.create(null);function po(h){var y=h[Q];return y||(Pe(h),h[Q])}var ta=Y("ObservableObjectAdministration",ea);function dn(h){return!!B(h)&&(Pe(h),ta(h[Q]))}function bn(h,y){if(typeof h=="object"&&h!==null){if(kn(h))return y!==void 0&&E(!1),h[Q].atom;if(pn(h))return h[Q];if(Mt(h)){var x=h;return y===void 0?x._keysAtom:((N=x._data.get(y)||x._hasMap.get(y))||E(!1),N)}var N;if(Pe(h),y&&!h[Q]&&h[y],dn(h))return y?((N=h[Q].values.get(y))||E(!1),N):E(!1);if(k(h)||Yn(h)||io(h))return h}else if(typeof h=="function"&&io(h[Q]))return h[Q];return E(!1)}function Pr(h,y){return h||E("Expecting some object"),y!==void 0?Pr(bn(h,y)):k(h)||Yn(h)||io(h)||Mt(h)||pn(h)?h:(Pe(h),h[Q]?h[Q]:void E(!1))}var Zo=Object.prototype.toString;function Ko(h,y,x){return x===void 0&&(x=-1),qo(h,y,x)}function qo(h,y,x,N,F){if(h===y)return h!==0||1/h==1/y;if(h==null||y==null)return!1;if(h!=h)return y!=y;var ne=typeof h;if(ne!=="function"&&ne!=="object"&&typeof y!="object")return!1;var he=Zo.call(h);if(he!==Zo.call(y))return!1;switch(he){case"[object RegExp]":case"[object String]":return""+h==""+y;case"[object Number]":return+h!=+h?+y!=+y:+h==0?1/+h==1/y:+h==+y;case"[object Date]":case"[object Boolean]":return+h==+y;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(h)===Symbol.valueOf.call(y);case"[object Map]":case"[object Set]":x>=0&&x++}h=na(h),y=na(y);var Se=he==="[object Array]";if(!Se){if(typeof h!="object"||typeof y!="object")return!1;var Le=h.constructor,lt=y.constructor;if(Le!==lt&&!(typeof Le=="function"&&Le instanceof Le&&typeof lt=="function"&< instanceof lt)&&"constructor"in h&&"constructor"in y)return!1}if(x===0)return!1;x<0&&(x=-1),F=F||[];for(var tt=(N=N||[]).length;tt--;)if(N[tt]===h)return F[tt]===y;if(N.push(h),F.push(y),Se){if((tt=h.length)!==y.length)return!1;for(;tt--;)if(!qo(h[tt],y[tt],x-1,N,F))return!1}else{var wt=Object.keys(h),ct=void 0;if(tt=wt.length,Object.keys(y).length!==tt)return!1;for(;tt--;)if(!Hu(y,ct=wt[tt])||!qo(h[ct],y[ct],x-1,N,F))return!1}return N.pop(),F.pop(),!0}function na(h){return kn(h)?h.slice():z(h)||Mt(h)||Z(h)||pn(h)?Array.from(h.entries()):h}function Hu(h,y){return Object.prototype.hasOwnProperty.call(h,y)}function ho(h){return h[Symbol.iterator]=pr,h}function pr(){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.");typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Bi,extras:{getDebugName:function(h,y){return(y!==void 0?bn(h,y):dn(h)||Mt(h)||pn(h)?Pr(h):bn(h)).name}},$mobx:Q})}).call(this,i(155),i(82))},function(c,p,i){i.d(p,"a",function(){return q}),i.d(p,"b",function(){return ie}),i.d(p,"c",function(){return De}),i.d(p,"d",function(){return Ue}),i.d(p,"e",function(){return Y}),i.d(p,"f",function(){return Z}),i.d(p,"g",function(){return Y}),i.d(p,"h",function(){return je}),i.d(p,"i",function(){return s}),i.d(p,"j",function(){return ze}),i.d(p,"k",function(){return M});var f,s,A,m,w,E,S,_={},P=[],B=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function I(J,V){for(var re in V)J[re]=V[re];return J}function L(J){var V=J.parentNode;V&&V.removeChild(J)}function Y(J,V,re){var we,ke,Ee,Xe={};for(Ee in V)Ee=="key"?we=V[Ee]:Ee=="ref"?ke=V[Ee]:Xe[Ee]=V[Ee];if(arguments.length>2&&(Xe.children=arguments.length>3?f.call(arguments,2):re),typeof J=="function"&&J.defaultProps!=null)for(Ee in J.defaultProps)Xe[Ee]===void 0&&(Xe[Ee]=J.defaultProps[Ee]);return z(J,Xe,we,ke,null)}function z(J,V,re,we,ke){var Ee={type:J,props:V,key:re,ref:we,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:ke==null?++A:ke};return ke==null&&s.vnode!=null&&s.vnode(Ee),Ee}function Z(){return{current:null}}function ie(J){return J.children}function q(J,V){this.props=J,this.context=V}function H(J,V){if(V==null)return J.__?H(J.__,J.__.__k.indexOf(J)+1):null;for(var re;V<J.__k.length;V++)if((re=J.__k[V])!=null&&re.__e!=null)return re.__e;return typeof J.type=="function"?H(J):null}function $(J){var V,re;if((J=J.__)!=null&&J.__c!=null){for(J.__e=J.__c.base=null,V=0;V<J.__k.length;V++)if((re=J.__k[V])!=null&&re.__e!=null){J.__e=J.__c.base=re.__e;break}return $(J)}}function Q(J){(!J.__d&&(J.__d=!0)&&m.push(J)&&!T.__r++||E!==s.debounceRendering)&&((E=s.debounceRendering)||w)(T)}function T(){for(var J;T.__r=m.length;)J=m.sort(function(V,re){return V.__v.__b-re.__v.__b}),m=[],J.some(function(V){var re,we,ke,Ee,Xe,$e;V.__d&&(Xe=(Ee=(re=V).__v).__e,($e=re.__P)&&(we=[],(ke=I({},Ee)).__v=Ee.__v+1,Ae($e,Ee,ke,re.__n,$e.ownerSVGElement!==void 0,Ee.__h!=null?[Xe]:null,we,Xe==null?H(Ee):Xe,Ee.__h),K(we,Ee),Ee.__e!=Xe&&$(Ee)))})}function k(J,V,re,we,ke,Ee,Xe,$e,Ke,Ve){var be,Qe,ee,Te,it,gt,rt,ft=we&&we.__k||P,Et=ft.length;for(re.__k=[],be=0;be<V.length;be++)if((Te=re.__k[be]=(Te=V[be])==null||typeof Te=="boolean"?null:typeof Te=="string"||typeof Te=="number"||typeof Te=="bigint"?z(null,Te,null,null,Te):Array.isArray(Te)?z(ie,{children:Te},null,null,null):Te.__b>0?z(Te.type,Te.props,Te.key,null,Te.__v):Te)!=null){if(Te.__=re,Te.__b=re.__b+1,(ee=ft[be])===null||ee&&Te.key==ee.key&&Te.type===ee.type)ft[be]=void 0;else for(Qe=0;Qe<Et;Qe++){if((ee=ft[Qe])&&Te.key==ee.key&&Te.type===ee.type){ft[Qe]=void 0;break}ee=null}Ae(J,Te,ee=ee||_,ke,Ee,Xe,$e,Ke,Ve),it=Te.__e,(Qe=Te.ref)&&ee.ref!=Qe&&(rt||(rt=[]),ee.ref&&rt.push(ee.ref,null,Te),rt.push(Qe,Te.__c||it,Te)),it!=null?(gt==null&&(gt=it),typeof Te.type=="function"&&Te.__k===ee.__k?Te.__d=Ke=D(Te,Ke,J):Ke=G(J,Te,ee,ft,it,Ke),typeof re.type=="function"&&(re.__d=Ke)):Ke&&ee.__e==Ke&&Ke.parentNode!=J&&(Ke=H(ee))}for(re.__e=gt,be=Et;be--;)ft[be]!=null&&(typeof re.type=="function"&&ft[be].__e!=null&&ft[be].__e==re.__d&&(re.__d=H(we,be+1)),me(ft[be],ft[be]));if(rt)for(be=0;be<rt.length;be++)pe(rt[be],rt[++be],rt[++be])}function D(J,V,re){for(var we,ke=J.__k,Ee=0;ke&&Ee<ke.length;Ee++)(we=ke[Ee])&&(we.__=J,V=typeof we.type=="function"?D(we,V,re):G(re,we,we,ke,we.__e,V));return V}function M(J,V){return V=V||[],J==null||typeof J=="boolean"||(Array.isArray(J)?J.some(function(re){M(re,V)}):V.push(J)),V}function G(J,V,re,we,ke,Ee){var Xe,$e,Ke;if(V.__d!==void 0)Xe=V.__d,V.__d=void 0;else if(re==null||ke!=Ee||ke.parentNode==null)e:if(Ee==null||Ee.parentNode!==J)J.appendChild(ke),Xe=null;else{for($e=Ee,Ke=0;($e=$e.nextSibling)&&Ke<we.length;Ke+=2)if($e==ke)break e;J.insertBefore(ke,Ee),Xe=Ee}return Xe!==void 0?Xe:ke.nextSibling}function ce(J,V,re){V[0]==="-"?J.setProperty(V,re):J[V]=re==null?"":typeof re!="number"||B.test(V)?re:re+"px"}function fe(J,V,re,we,ke){var Ee;e:if(V==="style")if(typeof re=="string")J.style.cssText=re;else{if(typeof we=="string"&&(J.style.cssText=we=""),we)for(V in we)re&&V in re||ce(J.style,V,"");if(re)for(V in re)we&&re[V]===we[V]||ce(J.style,V,re[V])}else if(V[0]==="o"&&V[1]==="n")Ee=V!==(V=V.replace(/Capture$/,"")),V=V.toLowerCase()in J?V.toLowerCase().slice(2):V.slice(2),J.l||(J.l={}),J.l[V+Ee]=re,re?we||J.addEventListener(V,Ee?Oe:ye,Ee):J.removeEventListener(V,Ee?Oe:ye,Ee);else if(V!=="dangerouslySetInnerHTML"){if(ke)V=V.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(V!=="href"&&V!=="list"&&V!=="form"&&V!=="tabIndex"&&V!=="download"&&V in J)try{J[V]=re==null?"":re;break e}catch{}typeof re=="function"||(re!=null&&(re!==!1||V[0]==="a"&&V[1]==="r")?J.setAttribute(V,re):J.removeAttribute(V))}}function ye(J){this.l[J.type+!1](s.event?s.event(J):J)}function Oe(J){this.l[J.type+!0](s.event?s.event(J):J)}function Ae(J,V,re,we,ke,Ee,Xe,$e,Ke){var Ve,be,Qe,ee,Te,it,gt,rt,ft,Et,xt,ot=V.type;if(V.constructor!==void 0)return null;re.__h!=null&&(Ke=re.__h,$e=V.__e=re.__e,V.__h=null,Ee=[$e]),(Ve=s.__b)&&Ve(V);try{e:if(typeof ot=="function"){if(rt=V.props,ft=(Ve=ot.contextType)&&we[Ve.__c],Et=Ve?ft?ft.props.value:Ve.__:we,re.__c?gt=(be=V.__c=re.__c).__=be.__E:("prototype"in ot&&ot.prototype.render?V.__c=be=new ot(rt,Et):(V.__c=be=new q(rt,Et),be.constructor=ot,be.render=Pe),ft&&ft.sub(be),be.props=rt,be.state||(be.state={}),be.context=Et,be.__n=we,Qe=be.__d=!0,be.__h=[]),be.__s==null&&(be.__s=be.state),ot.getDerivedStateFromProps!=null&&(be.__s==be.state&&(be.__s=I({},be.__s)),I(be.__s,ot.getDerivedStateFromProps(rt,be.__s))),ee=be.props,Te=be.state,Qe)ot.getDerivedStateFromProps==null&&be.componentWillMount!=null&&be.componentWillMount(),be.componentDidMount!=null&&be.__h.push(be.componentDidMount);else{if(ot.getDerivedStateFromProps==null&&rt!==ee&&be.componentWillReceiveProps!=null&&be.componentWillReceiveProps(rt,Et),!be.__e&&be.shouldComponentUpdate!=null&&be.shouldComponentUpdate(rt,be.__s,Et)===!1||V.__v===re.__v){be.props=rt,be.state=be.__s,V.__v!==re.__v&&(be.__d=!1),be.__v=V,V.__e=re.__e,V.__k=re.__k,V.__k.forEach(function(Pt){Pt&&(Pt.__=V)}),be.__h.length&&Xe.push(be);break e}be.componentWillUpdate!=null&&be.componentWillUpdate(rt,be.__s,Et),be.componentDidUpdate!=null&&be.__h.push(function(){be.componentDidUpdate(ee,Te,it)})}be.context=Et,be.props=rt,be.state=be.__s,(Ve=s.__r)&&Ve(V),be.__d=!1,be.__v=V,be.__P=J,Ve=be.render(be.props,be.state,be.context),be.state=be.__s,be.getChildContext!=null&&(we=I(I({},we),be.getChildContext())),Qe||be.getSnapshotBeforeUpdate==null||(it=be.getSnapshotBeforeUpdate(ee,Te)),xt=Ve!=null&&Ve.type===ie&&Ve.key==null?Ve.props.children:Ve,k(J,Array.isArray(xt)?xt:[xt],V,re,we,ke,Ee,Xe,$e,Ke),be.base=V.__e,V.__h=null,be.__h.length&&Xe.push(be),gt&&(be.__E=be.__=null),be.__e=!1}else Ee==null&&V.__v===re.__v?(V.__k=re.__k,V.__e=re.__e):V.__e=se(re.__e,V,re,we,ke,Ee,Xe,Ke);(Ve=s.diffed)&&Ve(V)}catch(Pt){V.__v=null,(Ke||Ee!=null)&&(V.__e=$e,V.__h=!!Ke,Ee[Ee.indexOf($e)]=null),s.__e(Pt,V,re)}}function K(J,V){s.__c&&s.__c(V,J),J.some(function(re){try{J=re.__h,re.__h=[],J.some(function(we){we.call(re)})}catch(we){s.__e(we,re.__v)}})}function se(J,V,re,we,ke,Ee,Xe,$e){var Ke,Ve,be,Qe=re.props,ee=V.props,Te=V.type,it=0;if(Te==="svg"&&(ke=!0),Ee!=null){for(;it<Ee.length;it++)if((Ke=Ee[it])&&"setAttribute"in Ke==!!Te&&(Te?Ke.localName===Te:Ke.nodeType===3)){J=Ke,Ee[it]=null;break}}if(J==null){if(Te===null)return document.createTextNode(ee);J=ke?document.createElementNS("http://www.w3.org/2000/svg",Te):document.createElement(Te,ee.is&&ee),Ee=null,$e=!1}if(Te===null)Qe===ee||$e&&J.data===ee||(J.data=ee);else{if(Ee=Ee&&f.call(J.childNodes),Ve=(Qe=re.props||_).dangerouslySetInnerHTML,be=ee.dangerouslySetInnerHTML,!$e){if(Ee!=null)for(Qe={},it=0;it<J.attributes.length;it++)Qe[J.attributes[it].name]=J.attributes[it].value;(be||Ve)&&(be&&(Ve&&be.__html==Ve.__html||be.__html===J.innerHTML)||(J.innerHTML=be&&be.__html||""))}if(function(gt,rt,ft,Et,xt){var ot;for(ot in ft)ot==="children"||ot==="key"||ot in rt||fe(gt,ot,null,ft[ot],Et);for(ot in rt)xt&&typeof rt[ot]!="function"||ot==="children"||ot==="key"||ot==="value"||ot==="checked"||ft[ot]===rt[ot]||fe(gt,ot,rt[ot],ft[ot],Et)}(J,ee,Qe,ke,$e),be)V.__k=[];else if(it=V.props.children,k(J,Array.isArray(it)?it:[it],V,re,we,ke&&Te!=="foreignObject",Ee,Xe,Ee?Ee[0]:re.__k&&H(re,0),$e),Ee!=null)for(it=Ee.length;it--;)Ee[it]!=null&&L(Ee[it]);$e||("value"in ee&&(it=ee.value)!==void 0&&(it!==Qe.value||it!==J.value||Te==="progress"&&!it)&&fe(J,"value",it,Qe.value,!1),"checked"in ee&&(it=ee.checked)!==void 0&&it!==J.checked&&fe(J,"checked",it,Qe.checked,!1))}return J}function pe(J,V,re){try{typeof J=="function"?J(V):J.current=V}catch(we){s.__e(we,re)}}function me(J,V,re){var we,ke;if(s.unmount&&s.unmount(J),(we=J.ref)&&(we.current&&we.current!==J.__e||pe(we,null,V)),(we=J.__c)!=null){if(we.componentWillUnmount)try{we.componentWillUnmount()}catch(Ee){s.__e(Ee,V)}we.base=we.__P=null}if(we=J.__k)for(ke=0;ke<we.length;ke++)we[ke]&&me(we[ke],V,typeof J.type!="function");re||J.__e==null||L(J.__e),J.__e=J.__d=void 0}function Pe(J,V,re){return this.constructor(J,re)}function ze(J,V,re){var we,ke,Ee;s.__&&s.__(J,V),ke=(we=typeof re=="function")?null:re&&re.__k||V.__k,Ee=[],Ae(V,J=(!we&&re||V).__k=Y(ie,null,[J]),ke||_,_,V.ownerSVGElement!==void 0,!we&&re?[re]:ke?null:V.firstChild?f.call(V.childNodes):null,Ee,!we&&re?re:ke?ke.__e:V.firstChild,we),K(Ee,J)}function je(J,V){ze(J,V,je)}function De(J,V,re){var we,ke,Ee,Xe=I({},J.props);for(Ee in V)Ee=="key"?we=V[Ee]:Ee=="ref"?ke=V[Ee]:Xe[Ee]=V[Ee];return arguments.length>2&&(Xe.children=arguments.length>3?f.call(arguments,2):re),z(J.type,Xe,we||J.key,ke||J.ref,null)}function Ue(J,V){var re={__c:V="__cC"+S++,__:J,Consumer:function(we,ke){return we.children(ke)},Provider:function(we){var ke,Ee;return this.getChildContext||(ke=[],(Ee={})[V]=this,this.getChildContext=function(){return Ee},this.shouldComponentUpdate=function(Xe){this.props.value!==Xe.value&&ke.some(Q)},this.sub=function(Xe){ke.push(Xe);var $e=Xe.componentWillUnmount;Xe.componentWillUnmount=function(){ke.splice(ke.indexOf(Xe),1),$e&&$e.call(Xe)}}),we.children}};return re.Provider.__=re.Consumer.contextType=re}f=P.slice,s={__e:function(J,V){for(var re,we,ke;V=V.__;)if((re=V.__c)&&!re.__)try{if((we=re.constructor)&&we.getDerivedStateFromError!=null&&(re.setState(we.getDerivedStateFromError(J)),ke=re.__d),re.componentDidCatch!=null&&(re.componentDidCatch(J),ke=re.__d),ke)return re.__E=re}catch(Ee){J=Ee}throw J}},A=0,q.prototype.setState=function(J,V){var re;re=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=I({},this.state),typeof J=="function"&&(J=J(I({},re),this.props)),J&&I(re,J),J!=null&&this.__v&&(V&&this.__h.push(V),Q(this))},q.prototype.forceUpdate=function(J){this.__v&&(this.__e=!0,J&&this.__h.push(J),Q(this))},q.prototype.render=ie,m=[],w=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,T.__r=0,S=0},function(c,p,i){var f=i(116),s=i(44),A=i(178);f||s(Object.prototype,"toString",A,{unsafe:!0})},function(c,p,i){var f=i(39),s=i(83),A=i(70),m=i(56),w=i(111),E="Array Iterator",S=m.set,_=m.getterFor(E);c.exports=w(Array,"Array",function(P,B){S(this,{type:E,target:f(P),index:0,kind:B})},function(){var P=_(this),B=P.target,I=P.kind,L=P.index++;return!B||L>=B.length?(P.target=void 0,{value:void 0,done:!0}):I=="keys"?{value:L,done:!1}:I=="values"?{value:B[L],done:!1}:{value:[L,B[L]],done:!1}},"values"),A.Arguments=A.Array,s("keys"),s("values"),s("entries")},function(c,p,i){var f=i(7),s=i(147),A=i(148),m=i(3),w=i(57),E=i(27),S=E("iterator"),_=E("toStringTag"),P=m.values,B=function(L,Y){if(L){if(L[S]!==P)try{w(L,S,P)}catch{L[S]=P}if(L[_]||w(L,_,Y),s[Y]){for(var z in m)if(L[z]!==m[z])try{w(L,z,m[z])}catch{L[z]=m[z]}}}};for(var I in s)B(f[I]&&f[I].prototype,I);B(A,"DOMTokenList")},function(c,p,i){var f=i(16),s=i(7),A=i(46),m=i(76),w=i(35),E=i(15),S=i(64),_=i(36),P=i(109),B=i(18),I=i(34),L=i(99),Y=i(28),z=i(33),Z=i(58),ie=i(88),q=i(32),H=i(38),$=i(39),Q=i(87),T=i(40),k=i(71),D=i(54),M=i(66),G=i(72),ce=i(139),fe=i(112),ye=i(51),Oe=i(37),Ae=i(93),K=i(101),se=i(44),pe=i(84),me=i(91),Pe=i(69),ze=i(85),je=i(27),De=i(149),Ue=i(150),J=i(73),V=i(56),re=i(74).forEach,we=me("hidden"),ke="Symbol",Ee=je("toPrimitive"),Xe=V.set,$e=V.getterFor(ke),Ke=Object.prototype,Ve=s.Symbol,be=Ve&&Ve.prototype,Qe=s.TypeError,ee=s.QObject,Te=A("JSON","stringify"),it=ye.f,gt=Oe.f,rt=ce.f,ft=Ae.f,Et=E([].push),xt=pe("symbols"),ot=pe("op-symbols"),Pt=pe("string-to-symbol-registry"),U=pe("symbol-to-string-registry"),oe=pe("wks"),W=!ee||!ee.prototype||!ee.prototype.findChild,le=_&&B(function(){return D(gt({},"a",{get:function(){return gt(this,"a",{value:7}).a}})).a!=7})?function(Ie,We,qe){var et=it(Ke,We);et&&delete Ke[We],gt(Ie,We,qe),et&&Ie!==Ke&>(Ke,We,et)}:gt,Ce=function(Ie,We){var qe=xt[Ie]=D(be);return Xe(qe,{type:ke,tag:Ie,description:We}),_||(qe.description=We),qe},Ne=function(Ie,We,qe){Ie===Ke&&Ne(ot,We,qe),q(Ie);var et=Q(We);return q(qe),I(xt,et)?(qe.enumerable?(I(Ie,we)&&Ie[we][et]&&(Ie[we][et]=!1),qe=D(qe,{enumerable:k(0,!1)})):(I(Ie,we)||gt(Ie,we,k(1,{})),Ie[we][et]=!0),le(Ie,et,qe)):gt(Ie,et,qe)},Ye=function(Ie,We){q(Ie);var qe=$(We),et=M(qe).concat(Dt(qe));return re(et,function(mt){_&&!w(st,qe,mt)||Ne(Ie,mt,qe[mt])}),Ie},st=function(Ie){var We=Q(Ie),qe=w(ft,this,We);return!(this===Ke&&I(xt,We)&&!I(ot,We))&&(!(qe||!I(this,We)||!I(xt,We)||I(this,we)&&this[we][We])||qe)},zt=function(Ie,We){var qe=$(Ie),et=Q(We);if(qe!==Ke||!I(xt,et)||I(ot,et)){var mt=it(qe,et);return!mt||!I(xt,et)||I(qe,we)&&qe[we][et]||(mt.enumerable=!0),mt}},Ut=function(Ie){var We=rt($(Ie)),qe=[];return re(We,function(et){I(xt,et)||I(Pe,et)||Et(qe,et)}),qe},Dt=function(Ie){var We=Ie===Ke,qe=rt(We?ot:$(Ie)),et=[];return re(qe,function(mt){!I(xt,mt)||We&&!I(Ke,mt)||Et(et,xt[mt])}),et};if(P||(Ve=function(){if(Z(be,this))throw Qe("Symbol is not a constructor");var Ie=arguments.length&&arguments[0]!==void 0?T(arguments[0]):void 0,We=ze(Ie),qe=function(et){this===Ke&&w(qe,ot,et),I(this,we)&&I(this[we],We)&&(this[we][We]=!1),le(this,We,k(1,et))};return _&&W&&le(Ke,We,{configurable:!0,set:qe}),Ce(We,Ie)},se(be=Ve.prototype,"toString",function(){return $e(this).tag}),se(Ve,"withoutSetter",function(Ie){return Ce(ze(Ie),Ie)}),Ae.f=st,Oe.f=Ne,ye.f=zt,G.f=ce.f=Ut,fe.f=Dt,De.f=function(Ie){return Ce(je(Ie),Ie)},_&&(gt(be,"description",{configurable:!0,get:function(){return $e(this).description}}),S||se(Ke,"propertyIsEnumerable",st,{unsafe:!0}))),f({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:Ve}),re(M(oe),function(Ie){Ue(Ie)}),f({target:ke,stat:!0,forced:!P},{for:function(Ie){var We=T(Ie);if(I(Pt,We))return Pt[We];var qe=Ve(We);return Pt[We]=qe,U[qe]=We,qe},keyFor:function(Ie){if(!ie(Ie))throw Qe(Ie+" is not a symbol");if(I(U,Ie))return U[Ie]},useSetter:function(){W=!0},useSimple:function(){W=!1}}),f({target:"Object",stat:!0,forced:!P,sham:!_},{create:function(Ie,We){return We===void 0?D(Ie):Ye(D(Ie),We)},defineProperty:Ne,defineProperties:Ye,getOwnPropertyDescriptor:zt}),f({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:Ut,getOwnPropertySymbols:Dt}),f({target:"Object",stat:!0,forced:B(function(){fe.f(1)})},{getOwnPropertySymbols:function(Ie){return fe.f(H(Ie))}}),Te&&f({target:"JSON",stat:!0,forced:!P||B(function(){var Ie=Ve();return Te([Ie])!="[null]"||Te({a:Ie})!="{}"||Te(Object(Ie))!="{}"})},{stringify:function(Ie,We,qe){var et=K(arguments),mt=We;if((z(We)||Ie!==void 0)&&!ie(Ie))return L(We)||(We=function(kt,ur){if(Y(mt)&&(ur=w(mt,this,kt,ur)),!ie(ur))return ur}),et[1]=We,m(Te,null,et)}}),!be[Ee]){var Nt=be.valueOf;se(be,Ee,function(Ie){return w(Nt,this)})}J(Ve,ke),Pe[we]=!0},function(c,p,i){var f=i(146).charAt,s=i(40),A=i(56),m=i(111),w="String Iterator",E=A.set,S=A.getterFor(w);m(String,"String",function(_){E(this,{type:w,string:s(_),index:0})},function(){var _,P=S(this),B=P.string,I=P.index;return I>=B.length?{value:void 0,done:!0}:(_=f(B,I),P.index+=_.length,{value:_,done:!1})})},function(c,p,i){(function(f){var s=function(A){return A&&A.Math==Math&&A};c.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof f=="object"&&f)||function(){return this}()||Function("return this")()}).call(this,i(82))},function(c,p,i){var f=i(16),s=i(36),A=i(7),m=i(15),w=i(34),E=i(28),S=i(58),_=i(40),P=i(37).f,B=i(134),I=A.Symbol,L=I&&I.prototype;if(s&&E(I)&&(!("description"in L)||I().description!==void 0)){var Y={},z=function(){var T=arguments.length<1||arguments[0]===void 0?void 0:_(arguments[0]),k=S(L,this)?new I(T):T===void 0?I():I(T);return T===""&&(Y[k]=!0),k};B(z,I),z.prototype=L,L.constructor=z;var Z=String(I("test"))=="Symbol(test)",ie=m(L.toString),q=m(L.valueOf),H=/^Symbol\((.*)\)[^)]+$/,$=m("".replace),Q=m("".slice);P(L,"description",{configurable:!0,get:function(){var T=q(this),k=ie(T);if(w(Y,T))return"";var D=Z?Q(k,7,-1):$(k,H,"$1");return D===""?void 0:D}}),f({global:!0,forced:!0},{Symbol:z})}},function(c,p,i){i(150)("iterator")},function(c,p,i){i.d(p,"a",function(){return m.a}),i.d(p,"c",function(){return m.e}),i.d(p,"h",function(){return H}),i.d(p,"i",function(){return Z}),i.d(p,"j",function(){return Y}),i.d(p,"b",function(){return ye}),i.d(p,"e",function(){return se}),i.d(p,"f",function(){return Oe}),i.d(p,"g",function(){return xt});var f,s,A,m=i(1),w=0,E=[],S=m.i.__b,_=m.i.__r,P=m.i.diffed,B=m.i.__c,I=m.i.unmount;function L(U,oe){m.i.__h&&m.i.__h(s,U,w||oe),w=0;var W=s.__H||(s.__H={__:[],__h:[]});return U>=W.__.length&&W.__.push({}),W.__[U]}function Y(U){return w=1,z(G,U)}function z(U,oe,W){var le=L(f++,2);return le.t=U,le.__c||(le.__=[W?W(oe):G(void 0,oe),function(Ce){var Ne=le.t(le.__[0],Ce);le.__[0]!==Ne&&(le.__=[Ne,le.__[1]],le.__c.setState({}))}],le.__c=s),le.__}function Z(U,oe){var W=L(f++,3);!m.i.__s&&M(W.__H,oe)&&(W.__=U,W.__H=oe,s.__H.__h.push(W))}function ie(U,oe){var W=L(f++,4);!m.i.__s&&M(W.__H,oe)&&(W.__=U,W.__H=oe,s.__h.push(W))}function q(U,oe){var W=L(f++,7);return M(W.__H,oe)&&(W.__=U(),W.__H=oe,W.__h=U),W.__}function H(U,oe){return w=8,q(function(){return U},oe)}function $(){var U;for(E.sort(function(oe,W){return oe.__v.__b-W.__v.__b});U=E.pop();)if(U.__P)try{U.__H.__h.forEach(k),U.__H.__h.forEach(D),U.__H.__h=[]}catch(oe){U.__H.__h=[],m.i.__e(oe,U.__v)}}m.i.__b=function(U){s=null,S&&S(U)},m.i.__r=function(U){_&&_(U),f=0;var oe=(s=U.__c).__H;oe&&(oe.__h.forEach(k),oe.__h.forEach(D),oe.__h=[])},m.i.diffed=function(U){P&&P(U);var oe=U.__c;oe&&oe.__H&&oe.__H.__h.length&&(E.push(oe)!==1&&A===m.i.requestAnimationFrame||((A=m.i.requestAnimationFrame)||T)($)),s=null},m.i.__c=function(U,oe){oe.some(function(W){try{W.__h.forEach(k),W.__h=W.__h.filter(function(le){return!le.__||D(le)})}catch(le){oe.some(function(Ce){Ce.__h&&(Ce.__h=[])}),oe=[],m.i.__e(le,W.__v)}}),B&&B(U,oe)},m.i.unmount=function(U){I&&I(U);var oe,W=U.__c;W&&W.__H&&(W.__H.__.forEach(function(le){try{k(le)}catch(Ce){oe=Ce}}),oe&&m.i.__e(oe,W.__v))};var Q=typeof requestAnimationFrame=="function";function T(U){var oe,W=function(){clearTimeout(le),Q&&cancelAnimationFrame(oe),setTimeout(U)},le=setTimeout(W,100);Q&&(oe=requestAnimationFrame(W))}function k(U){var oe=s,W=U.__c;typeof W=="function"&&(U.__c=void 0,W()),s=oe}function D(U){var oe=s;U.__c=U.__(),s=oe}function M(U,oe){return!U||U.length!==oe.length||oe.some(function(W,le){return W!==U[le]})}function G(U,oe){return typeof oe=="function"?oe(U):oe}function ce(U,oe){for(var W in oe)U[W]=oe[W];return U}function fe(U,oe){for(var W in U)if(W!=="__source"&&!(W in oe))return!0;for(var le in oe)if(le!=="__source"&&U[le]!==oe[le])return!0;return!1}function ye(U){this.props=U}function Oe(U,oe){function W(Ce){var Ne=this.props.ref,Ye=Ne==Ce.ref;return!Ye&&Ne&&(Ne.call?Ne(null):Ne.current=null),oe?!oe(this.props,Ce)||!Ye:fe(this.props,Ce)}function le(Ce){return this.shouldComponentUpdate=W,Object(m.e)(U,Ce)}return le.displayName="Memo("+(U.displayName||U.name)+")",le.prototype.isReactComponent=!0,le.__f=!0,le}(ye.prototype=new m.a).isPureReactComponent=!0,ye.prototype.shouldComponentUpdate=function(U,oe){return fe(this.props,U)||fe(this.state,oe)};var Ae=m.i.__b;m.i.__b=function(U){U.type&&U.type.__f&&U.ref&&(U.props.ref=U.ref,U.ref=null),Ae&&Ae(U)};var K=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function se(U){function oe(W,le){var Ce=ce({},W);return delete Ce.ref,U(Ce,!(le=W.ref||le)||typeof le=="object"&&!("current"in le)?null:le)}return oe.$$typeof=K,oe.render=oe,oe.prototype.isReactComponent=oe.__f=!0,oe.displayName="ForwardRef("+(U.displayName||U.name)+")",oe}var pe=function(U,oe){return U==null?null:Object(m.k)(Object(m.k)(U).map(oe))},me={map:pe,forEach:pe,count:function(U){return U?Object(m.k)(U).length:0},only:function(U){var oe=Object(m.k)(U);if(oe.length!==1)throw"Children.only";return oe[0]},toArray:m.k},Pe=m.i.__e;m.i.__e=function(U,oe,W){if(U.then){for(var le,Ce=oe;Ce=Ce.__;)if((le=Ce.__c)&&le.__c)return oe.__e==null&&(oe.__e=W.__e,oe.__k=W.__k),le.__c(U,oe)}Pe(U,oe,W)};var ze=m.i.unmount;function je(U,oe,W){return U&&(U.__c&&U.__c.__H&&(U.__c.__H.__.forEach(function(le){typeof le.__c=="function"&&le.__c()}),U.__c.__H=null),(U=ce({},U)).__c!=null&&(U.__c.__P===W&&(U.__c.__P=oe),U.__c=null),U.__k=U.__k&&U.__k.map(function(le){return je(le,oe,W)})),U}function De(U,oe,W){return U&&(U.__v=null,U.__k=U.__k&&U.__k.map(function(le){return De(le,oe,W)}),U.__c&&U.__c.__P===oe&&(U.__e&&W.insertBefore(U.__e,U.__d),U.__c.__e=!0,U.__c.__P=W)),U}function Ue(){this.__u=0,this.t=null,this.__b=null}function J(U){var oe=U.__.__c;return oe&&oe.__e&&oe.__e(U)}function V(){this.u=null,this.o=null}m.i.unmount=function(U){var oe=U.__c;oe&&oe.__R&&oe.__R(),oe&&U.__h===!0&&(U.type=null),ze&&ze(U)},(Ue.prototype=new m.a).__c=function(U,oe){var W=oe.__c,le=this;le.t==null&&(le.t=[]),le.t.push(W);var Ce=J(le.__v),Ne=!1,Ye=function(){Ne||(Ne=!0,W.__R=null,Ce?Ce(st):st())};W.__R=Ye;var st=function(){if(!--le.__u){if(le.state.__e){var Ut=le.state.__e;le.__v.__k[0]=De(Ut,Ut.__c.__P,Ut.__c.__O)}var Dt;for(le.setState({__e:le.__b=null});Dt=le.t.pop();)Dt.forceUpdate()}},zt=oe.__h===!0;le.__u++||zt||le.setState({__e:le.__b=le.__v.__k[0]}),U.then(Ye,Ye)},Ue.prototype.componentWillUnmount=function(){this.t=[]},Ue.prototype.render=function(U,oe){if(this.__b){if(this.__v.__k){var W=document.createElement("div"),le=this.__v.__k[0].__c;this.__v.__k[0]=je(this.__b,W,le.__O=le.__P)}this.__b=null}var Ce=oe.__e&&Object(m.e)(m.b,null,U.fallback);return Ce&&(Ce.__h=null),[Object(m.e)(m.b,null,oe.__e?null:U.children),Ce]};var re=function(U,oe,W){if(++W[1]===W[0]&&U.o.delete(oe),U.props.revealOrder&&(U.props.revealOrder[0]!=="t"||!U.o.size))for(W=U.u;W;){for(;W.length>3;)W.pop()();if(W[1]<W[0])break;U.u=W=W[2]}};function we(U){return this.getChildContext=function(){return U.context},U.children}function ke(U){var oe=this,W=U.i;oe.componentWillUnmount=function(){Object(m.j)(null,oe.l),oe.l=null,oe.i=null},oe.i&&oe.i!==W&&oe.componentWillUnmount(),U.__v?(oe.l||(oe.i=W,oe.l={nodeType:1,parentNode:W,childNodes:[],appendChild:function(le){this.childNodes.push(le),oe.i.appendChild(le)},insertBefore:function(le,Ce){this.childNodes.push(le),oe.i.appendChild(le)},removeChild:function(le){this.childNodes.splice(this.childNodes.indexOf(le)>>>1,1),oe.i.removeChild(le)}}),Object(m.j)(Object(m.e)(we,{context:oe.context},U.__v),oe.l)):oe.l&&oe.componentWillUnmount()}(V.prototype=new m.a).__e=function(U){var oe=this,W=J(oe.__v),le=oe.o.get(U);return le[0]++,function(Ce){var Ne=function(){oe.props.revealOrder?(le.push(Ce),re(oe,U,le)):Ce()};W?W(Ne):Ne()}},V.prototype.render=function(U){this.u=null,this.o=new Map;var oe=Object(m.k)(U.children);U.revealOrder&&U.revealOrder[0]==="b"&&oe.reverse();for(var W=oe.length;W--;)this.o.set(oe[W],this.u=[1,0,this.u]);return U.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var U=this;this.o.forEach(function(oe,W){re(U,W,oe)})};var Ee=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Xe=/^(?: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]/,$e=typeof document!="undefined",Ke=function(U){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(U)};m.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(U){Object.defineProperty(m.a.prototype,U,{configurable:!0,get:function(){return this["UNSAFE_"+U]},set:function(oe){Object.defineProperty(this,U,{configurable:!0,writable:!0,value:oe})}})});var Ve=m.i.event;function be(){}function Qe(){return this.cancelBubble}function ee(){return this.defaultPrevented}m.i.event=function(U){return Ve&&(U=Ve(U)),U.persist=be,U.isPropagationStopped=Qe,U.isDefaultPrevented=ee,U.nativeEvent=U};var Te,it={configurable:!0,get:function(){return this.class}},gt=m.i.vnode;m.i.vnode=function(U){var oe=U.type,W=U.props,le=W;if(typeof oe=="string"){var Ce=oe.indexOf("-")===-1;for(var Ne in le={},W){var Ye=W[Ne];$e&&Ne==="children"&&oe==="noscript"||Ne==="value"&&"defaultValue"in W&&Ye==null||(Ne==="defaultValue"&&"value"in W&&W.value==null?Ne="value":Ne==="download"&&Ye===!0?Ye="":/ondoubleclick/i.test(Ne)?Ne="ondblclick":/^onchange(textarea|input)/i.test(Ne+oe)&&!Ke(W.type)?Ne="oninput":/^onfocus$/i.test(Ne)?Ne="onfocusin":/^onblur$/i.test(Ne)?Ne="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(Ne)?Ne=Ne.toLowerCase():Ce&&Xe.test(Ne)?Ne=Ne.replace(/[A-Z0-9]/,"-$&").toLowerCase():Ye===null&&(Ye=void 0),le[Ne]=Ye)}oe=="select"&&le.multiple&&Array.isArray(le.value)&&(le.value=Object(m.k)(W.children).forEach(function(st){st.props.selected=le.value.indexOf(st.props.value)!=-1})),oe=="select"&&le.defaultValue!=null&&(le.value=Object(m.k)(W.children).forEach(function(st){st.props.selected=le.multiple?le.defaultValue.indexOf(st.props.value)!=-1:le.defaultValue==st.props.value})),U.props=le,W.class!=W.className&&(it.enumerable="className"in W,W.className!=null&&(le.class=W.className),Object.defineProperty(le,"className",it))}U.$$typeof=Ee,gt&>(U)};var rt=m.i.__r;m.i.__r=function(U){rt&&rt(U),Te=U.__c};var ft={ReactCurrentDispatcher:{current:{readContext:function(U){return Te.__n[U.__c].props.value}}}};function Et(U){return!!U&&U.$$typeof===Ee}var xt=function(U,oe){return U(oe)},ot=m.b,Pt={useState:Y,useReducer:z,useEffect:Z,useLayoutEffect:ie,useRef:function(U){return w=5,q(function(){return{current:U}},[])},useImperativeHandle:function(U,oe,W){w=6,ie(function(){typeof U=="function"?U(oe()):U&&(U.current=oe())},W==null?W:W.concat(U))},useMemo:q,useCallback:H,useContext:function(U){var oe=s.context[U.__c],W=L(f++,9);return W.c=U,oe?(W.__==null&&(W.__=!0,oe.sub(s)),oe.props.value):U.__},useDebugValue:function(U,oe){m.i.useDebugValue&&m.i.useDebugValue(oe?oe(U):U)},version:"17.0.2",Children:me,render:function(U,oe,W){return oe.__k==null&&(oe.textContent=""),Object(m.j)(U,oe),typeof W=="function"&&W(),U?U.__c:null},hydrate:function(U,oe,W){return Object(m.h)(U,oe),typeof W=="function"&&W(),U?U.__c:null},unmountComponentAtNode:function(U){return!!U.__k&&(Object(m.j)(null,U),!0)},createPortal:function(U,oe){return Object(m.e)(ke,{__v:U,i:oe})},createElement:m.e,createContext:m.d,createFactory:function(U){return m.e.bind(null,U)},cloneElement:function(U){return Et(U)?m.c.apply(null,arguments):U},createRef:m.f,Fragment:m.b,isValidElement:Et,findDOMNode:function(U){return U&&(U.base||U.nodeType===1&&U)||null},Component:m.a,PureComponent:ye,memo:Oe,forwardRef:se,flushSync:function(U,oe){return U(oe)},unstable_batchedUpdates:xt,StrictMode:ot,Suspense:Ue,SuspenseList:V,lazy:function(U){var oe,W,le;function Ce(Ne){if(oe||(oe=U()).then(function(Ye){W=Ye.default||Ye},function(Ye){le=Ye}),le)throw le;if(!W)throw oe;return Object(m.e)(W,Ne)}return Ce.displayName="Lazy",Ce.__f=!0,Ce},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ft};p.d=Pt},function(c,p,i){var f=i(7),s=i(147),A=i(148),m=i(179),w=i(57),E=function(_){if(_&&_.forEach!==m)try{w(_,"forEach",m)}catch{_.forEach=m}};for(var S in s)s[S]&&E(f[S]&&f[S].prototype);E(A)},function(c,p,i){i(16)({target:"Object",stat:!0},{setPrototypeOf:i(97)})},function(c,p,i){var f=i(16),s=i(18),A=i(38),m=i(96),w=i(137);f({target:"Object",stat:!0,forced:s(function(){m(1)}),sham:!w},{getPrototypeOf:function(E){return m(A(E))}})},function(c,p,i){var f=i(16),s=i(46),A=i(76),m=i(198),w=i(157),E=i(32),S=i(33),_=i(54),P=i(18),B=s("Reflect","construct"),I=Object.prototype,L=[].push,Y=P(function(){function ie(){}return!(B(function(){},[],ie)instanceof ie)}),z=!P(function(){B(function(){})}),Z=Y||z;f({target:"Reflect",stat:!0,forced:Z,sham:Z},{construct:function(ie,q){w(ie),E(q);var H=arguments.length<3?ie:w(arguments[2]);if(z&&!Y)return B(ie,q,H);if(ie==H){switch(q.length){case 0:return new ie;case 1:return new ie(q[0]);case 2:return new ie(q[0],q[1]);case 3:return new ie(q[0],q[1],q[2]);case 4:return new ie(q[0],q[1],q[2],q[3])}var $=[null];return A(L,$,q),new(A(m,ie,$))}var Q=H.prototype,T=_(S(Q)?Q:I),k=A(ie,T,q);return S(k)?k:T}})},function(c,p){var i=Function.prototype,f=i.bind,s=i.call,A=f&&f.bind(s);c.exports=f?function(m){return m&&A(s,m)}:function(m){return m&&function(){return s.apply(m,arguments)}}},function(c,p,i){var f=i(7),s=i(51).f,A=i(57),m=i(44),w=i(108),E=i(134),S=i(95);c.exports=function(_,P){var B,I,L,Y,z,Z=_.target,ie=_.global,q=_.stat;if(B=ie?f:q?f[Z]||w(Z,{}):(f[Z]||{}).prototype)for(I in P){if(Y=P[I],L=_.noTargetGet?(z=s(B,I))&&z.value:B[I],!S(ie?I:Z+(q?".":"#")+I,_.forced)&&L!==void 0){if(typeof Y==typeof L)continue;E(Y,L)}(_.sham||L&&L.sham)&&A(Y,"sham",!0),m(B,I,Y,_)}}},function(c,p,i){var f=i(16),s=i(7),A=i(99),m=i(100),w=i(33),E=i(67),S=i(43),_=i(39),P=i(61),B=i(27),I=i(75),L=i(101),Y=I("slice"),z=B("species"),Z=s.Array,ie=Math.max;f({target:"Array",proto:!0,forced:!Y},{slice:function(q,H){var $,Q,T,k=_(this),D=S(k),M=E(q,D),G=E(H===void 0?D:H,D);if(A(k)&&($=k.constructor,(m($)&&($===Z||A($.prototype))||w($)&&($=$[z])===null)&&($=void 0),$===Z||$===void 0))return L(k,M,G);for(Q=new($===void 0?Z:$)(ie(G-M,0)),T=0;M<G;M++,T++)M in k&&P(Q,T,k[M]);return Q.length=T,Q}})},function(c,p){c.exports=function(i){try{return!!i()}catch{return!0}}},function(c,p,i){var f=i(16),s=i(102);f({target:"RegExp",proto:!0,forced:/./.exec!==s},{exec:s})},function(c,p,i){var f=i(16),s=i(38),A=i(66);f({target:"Object",stat:!0,forced:i(18)(function(){A(1)})},{keys:function(m){return A(s(m))}})},function(c,p,i){var f=i(16),s=i(18),A=i(39),m=i(51).f,w=i(36),E=s(function(){m(1)});f({target:"Object",stat:!0,forced:!w||E,sham:!w},{getOwnPropertyDescriptor:function(S,_){return m(A(S),_)}})},function(c,p,i){var f=i(16),s=i(74).filter;f({target:"Array",proto:!0,forced:!i(75)("filter")},{filter:function(A){return s(this,A,arguments.length>1?arguments[1]:void 0)}})},function(c,p,i){var f=i(16),s=i(36),A=i(135),m=i(39),w=i(51),E=i(61);f({target:"Object",stat:!0,sham:!s},{getOwnPropertyDescriptors:function(S){for(var _,P,B=m(S),I=w.f,L=A(B),Y={},z=0;L.length>z;)(P=I(B,_=L[z++]))!==void 0&&E(Y,_,P);return Y}})},function(c,p,i){var f=i(36),s=i(94).EXISTS,A=i(15),m=i(37).f,w=Function.prototype,E=A(w.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,_=A(S.exec);f&&!s&&m(w,"name",{configurable:!0,get:function(){try{return _(S,E(this))[1]}catch{return""}}})},function(c,p,i){var f=i(16),s=i(182);f({target:"Array",stat:!0,forced:!i(118)(function(A){Array.from(A)})},{from:s})},,function(c,p,i){var f=i(7),s=i(84),A=i(34),m=i(85),w=i(109),E=i(128),S=s("wks"),_=f.Symbol,P=_&&_.for,B=E?_:_&&_.withoutSetter||m;c.exports=function(I){if(!A(S,I)||!w&&typeof S[I]!="string"){var L="Symbol."+I;w&&A(_,I)?S[I]=_[I]:S[I]=E&&P?P(L):B(L)}return S[I]}},function(c,p){c.exports=function(i){return typeof i=="function"}},function(c,p,i){var f=i(16),s=i(7),A=i(18),m=i(99),w=i(33),E=i(38),S=i(43),_=i(61),P=i(119),B=i(75),I=i(27),L=i(65),Y=I("isConcatSpreadable"),z=9007199254740991,Z="Maximum allowed index exceeded",ie=s.TypeError,q=L>=51||!A(function(){var Q=[];return Q[Y]=!1,Q.concat()[0]!==Q}),H=B("concat"),$=function(Q){if(!w(Q))return!1;var T=Q[Y];return T!==void 0?!!T:m(Q)};f({target:"Array",proto:!0,forced:!q||!H},{concat:function(Q){var T,k,D,M,G,ce=E(this),fe=P(ce,0),ye=0;for(T=-1,D=arguments.length;T<D;T++)if($(G=T===-1?ce:arguments[T])){if(ye+(M=S(G))>z)throw ie(Z);for(k=0;k<M;k++,ye++)k in G&&_(fe,ye,G[k])}else{if(ye>=z)throw ie(Z);_(fe,ye++,G)}return fe.length=ye,fe}})},function(c,p,i){var f=i(105),s=typeof self=="object"&&self&&self.Object===Object&&self,A=f.a||s||Function("return this")();p.a=A},function(c,p,i){var f=i(16),s=i(200);f({target:"Object",stat:!0,forced:Object.assign!==s},{assign:s})},function(c,p,i){var f=i(7),s=i(33),A=f.String,m=f.TypeError;c.exports=function(w){if(s(w))return w;throw m(A(w)+" is not an object")}},function(c,p,i){var f=i(28);c.exports=function(s){return typeof s=="object"?s!==null:f(s)}},function(c,p,i){var f=i(15),s=i(38),A=f({}.hasOwnProperty);c.exports=Object.hasOwn||function(m,w){return A(s(m),w)}},function(c,p){var i=Function.prototype.call;c.exports=i.bind?i.bind(i):function(){return i.apply(i,arguments)}},function(c,p,i){var f=i(18);c.exports=!f(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(c,p,i){var f=i(7),s=i(36),A=i(129),m=i(32),w=i(87),E=f.TypeError,S=Object.defineProperty;p.f=s?S:function(_,P,B){if(m(_),P=w(P),m(B),A)try{return S(_,P,B)}catch{}if("get"in B||"set"in B)throw E("Accessors not supported");return"value"in B&&(_[P]=B.value),_}},function(c,p,i){var f=i(7),s=i(45),A=f.Object;c.exports=function(m){return A(s(m))}},function(c,p,i){var f=i(81),s=i(45);c.exports=function(A){return f(s(A))}},function(c,p,i){var f=i(7),s=i(98),A=f.String;c.exports=function(m){if(s(m)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return A(m)}},function(c,p,i){var f=i(16),s=i(74).map;f({target:"Array",proto:!0,forced:!i(75)("map")},{map:function(A){return s(this,A,arguments.length>1?arguments[1]:void 0)}})},function(c,p,i){(function(f){i.d(p,"d",function(){return m}),i.d(p,"c",function(){return w}),i.d(p,"b",function(){return E}),i.d(p,"a",function(){return _});var s=i(10),A=function(P,B){var I=typeof Symbol=="function"&&P[Symbol.iterator];if(!I)return P;var L,Y,z=I.call(P),Z=[];try{for(;(B===void 0||B-- >0)&&!(L=z.next()).done;)Z.push(L.value)}catch(ie){Y={error:ie}}finally{try{L&&!L.done&&(I=z.return)&&I.call(z)}finally{if(Y)throw Y.error}}return Z};function m(){var P=A(Object(s.j)(0),2)[1];return Object(s.h)(function(){P(function(B){return B+1})},[])}function w(P){if(!P||typeof P!="object")return!1;var B=Object.getPrototypeOf(P);return!B||B===Object.prototype}function E(P){return typeof Symbol=="function"?Symbol.for(P):"__$mobx-react "+P+"__"}var S={};function _(){return typeof window!="undefined"?window:f!==void 0?f:typeof self!="undefined"?self:S}}).call(this,i(82))},function(c,p,i){var f=i(90);c.exports=function(s){return f(s.length)}},function(c,p,i){var f=i(7),s=i(28),A=i(34),m=i(57),w=i(108),E=i(92),S=i(56),_=i(94).CONFIGURABLE,P=S.get,B=S.enforce,I=String(String).split("String");(c.exports=function(L,Y,z,Z){var ie,q=!!Z&&!!Z.unsafe,H=!!Z&&!!Z.enumerable,$=!!Z&&!!Z.noTargetGet,Q=Z&&Z.name!==void 0?Z.name:Y;s(z)&&(String(Q).slice(0,7)==="Symbol("&&(Q="["+String(Q).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!A(z,"name")||_&&z.name!==Q)&&m(z,"name",Q),(ie=B(z)).source||(ie.source=I.join(typeof Q=="string"?Q:""))),L!==f?(q?!$&&L[Y]&&(H=!0):delete L[Y],H?L[Y]=z:m(L,Y,z)):H?L[Y]=z:w(Y,z)})(Function.prototype,"toString",function(){return s(this)&&P(this).source||E(this)})},function(c,p,i){var f=i(7).TypeError;c.exports=function(s){if(s==null)throw f("Can't call method on "+s);return s}},function(c,p,i){var f=i(7),s=i(28),A=function(m){return s(m)?m:void 0};c.exports=function(m,w){return arguments.length<2?A(f[m]):f[m]&&f[m][w]}},function(c,p,i){var f=i(16),s=i(35),A=i(33),m=i(32),w=i(199),E=i(51),S=i(96);f({target:"Reflect",stat:!0},{get:function _(P,B){var I,L,Y=arguments.length<3?P:arguments[2];return m(P)===Y?P[B]:(I=E.f(P,B))?w(I)?I.value:I.get===void 0?void 0:s(I.get,Y):A(L=S(P))?_(L,B,Y):void 0}})},function(c,p,i){(function(f){var s=i(30),A=i(165),m=g&&!g.nodeType&&g,w=m&&typeof f=="object"&&f&&!f.nodeType&&f,E=w&&w.exports===m?s.a.Buffer:void 0,S=(E?E.isBuffer:void 0)||A.a;p.a=S}).call(this,i(121)(c))},function(c,p,i){(function(f){var s=i(105),A=g&&!g.nodeType&&g,m=A&&typeof f=="object"&&f&&!f.nodeType&&f,w=m&&m.exports===A&&s.a.process,E=function(){try{var S=m&&m.require&&m.require("util").types;return S||w&&w.binding&&w.binding("util")}catch{}}();p.a=E}).call(this,i(121)(c))},function(c,p,i){var f=i(15),s=f({}.toString),A=f("".slice);c.exports=function(m){return A(s(m),8,-1)}},function(c,p,i){var f=i(36),s=i(35),A=i(93),m=i(71),w=i(39),E=i(87),S=i(34),_=i(129),P=Object.getOwnPropertyDescriptor;p.f=f?P:function(B,I){if(B=w(B),I=E(I),_)try{return P(B,I)}catch{}if(S(B,I))return m(!s(A.f,B,I),B[I])}},function(c,p,i){var f=i(16),s=i(213).entries;f({target:"Object",stat:!0},{entries:function(A){return s(A)}})},function(c,p,i){var f=i(46);c.exports=f("navigator","userAgent")||""},function(c,p,i){var f,s=i(32),A=i(168),m=i(110),w=i(69),E=i(133),S=i(86),_=i(91),P=_("IE_PROTO"),B=function(){},I=function(z){return"<script>"+z+"<\/script>"},L=function(z){z.write(I("")),z.close();var Z=z.parentWindow.Object;return z=null,Z},Y=function(){try{f=new ActiveXObject("htmlfile")}catch{}var z,Z;Y=typeof document!="undefined"?document.domain&&f?L(f):((Z=S("iframe")).style.display="none",E.appendChild(Z),Z.src=String("javascript:"),(z=Z.contentWindow.document).open(),z.write(I("document.F=Object")),z.close(),z.F):L(f);for(var ie=m.length;ie--;)delete Y.prototype[m[ie]];return Y()};w[P]=!0,c.exports=Object.create||function(z,Z){var ie;return z!==null?(B.prototype=s(z),ie=new B,B.prototype=null,ie[P]=z):ie=Y(),Z===void 0?ie:A(ie,Z)}},function(c,p,i){var f=i(7),s=i(28),A=i(89),m=f.TypeError;c.exports=function(w){if(s(w))return w;throw m(A(w)+" is not a function")}},function(c,p,i){var f,s,A,m=i(170),w=i(7),E=i(15),S=i(33),_=i(57),P=i(34),B=i(107),I=i(91),L=i(69),Y="Object already initialized",z=w.TypeError,Z=w.WeakMap;if(m||B.state){var ie=B.state||(B.state=new Z),q=E(ie.get),H=E(ie.has),$=E(ie.set);f=function(T,k){if(H(ie,T))throw new z(Y);return k.facade=T,$(ie,T,k),k},s=function(T){return q(ie,T)||{}},A=function(T){return H(ie,T)}}else{var Q=I("state");L[Q]=!0,f=function(T,k){if(P(T,Q))throw new z(Y);return k.facade=T,_(T,Q,k),k},s=function(T){return P(T,Q)?T[Q]:{}},A=function(T){return P(T,Q)}}c.exports={set:f,get:s,has:A,enforce:function(T){return A(T)?s(T):f(T,{})},getterFor:function(T){return function(k){var D;if(!S(k)||(D=s(k)).type!==T)throw z("Incompatible receiver, "+T+" required");return D}}}},function(c,p,i){var f=i(36),s=i(37),A=i(71);c.exports=f?function(m,w,E){return s.f(m,w,A(1,E))}:function(m,w,E){return m[w]=E,m}},function(c,p,i){var f=i(15);c.exports=f({}.isPrototypeOf)},function(c,p,i){var f=i(55);c.exports=function(s,A){var m=s[A];return m==null?void 0:f(m)}},function(c,p,i){i(173)("Map",function(f){return function(){return f(this,arguments.length?arguments[0]:void 0)}},i(177))},function(c,p,i){var f=i(87),s=i(37),A=i(71);c.exports=function(m,w,E){var S=f(w);S in m?s.f(m,S,A(0,E)):m[S]=E}},function(c,p,i){var f=i(15),s=i(55),A=f(f.bind);c.exports=function(m,w){return s(m),w===void 0?m:A?A(m,w):function(){return m.apply(w,arguments)}}},function(c,p,i){var f=i(16),s=i(214),A=i(83);f({target:"Array",proto:!0},{fill:s}),A("fill")},function(c,p){c.exports=!1},function(c,p,i){var f,s,A=i(7),m=i(53),w=A.process,E=A.Deno,S=w&&w.versions||E&&E.version,_=S&&S.v8;_&&(s=(f=_.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!s&&m&&(!(f=m.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=m.match(/Chrome\/(\d+)/))&&(s=+f[1]),c.exports=s},function(c,p,i){var f=i(131),s=i(110);c.exports=Object.keys||function(A){return f(A,s)}},function(c,p,i){var f=i(68),s=Math.max,A=Math.min;c.exports=function(m,w){var E=f(m);return E<0?s(E+w,0):A(E,w)}},function(c,p){var i=Math.ceil,f=Math.floor;c.exports=function(s){var A=+s;return A!=A||A===0?0:(A>0?f:i)(A)}},function(c,p){c.exports={}},function(c,p){c.exports={}},function(c,p){c.exports=function(i,f){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:f}}},function(c,p,i){var f=i(131),s=i(110).concat("length","prototype");p.f=Object.getOwnPropertyNames||function(A){return f(A,s)}},function(c,p,i){var f=i(37).f,s=i(34),A=i(27)("toStringTag");c.exports=function(m,w,E){m&&!s(m=E?m:m.prototype,A)&&f(m,A,{configurable:!0,value:w})}},function(c,p,i){var f=i(62),s=i(15),A=i(81),m=i(38),w=i(43),E=i(119),S=s([].push),_=function(P){var B=P==1,I=P==2,L=P==3,Y=P==4,z=P==6,Z=P==7,ie=P==5||z;return function(q,H,$,Q){for(var T,k,D=m(q),M=A(D),G=f(H,$),ce=w(M),fe=0,ye=Q||E,Oe=B?ye(q,ce):I||Z?ye(q,0):void 0;ce>fe;fe++)if((ie||fe in M)&&(k=G(T=M[fe],fe,D),P))if(B)Oe[fe]=k;else if(k)switch(P){case 3:return!0;case 5:return T;case 6:return fe;case 2:S(Oe,T)}else switch(P){case 4:return!1;case 7:S(Oe,T)}return z?-1:L||Y?Y:Oe}};c.exports={forEach:_(0),map:_(1),filter:_(2),some:_(3),every:_(4),find:_(5),findIndex:_(6),filterReject:_(7)}},function(c,p,i){var f=i(18),s=i(27),A=i(65),m=s("species");c.exports=function(w){return A>=51||!f(function(){var E=[];return(E.constructor={})[m]=function(){return{foo:1}},E[w](Boolean).foo!==1})}},function(c,p){var i=Function.prototype,f=i.apply,s=i.bind,A=i.call;c.exports=typeof Reflect=="object"&&Reflect.apply||(s?A.bind(f):function(){return A.apply(f,arguments)})},function(c,p,i){var f=i(16),s=i(15),A=i(81),m=i(39),w=i(120),E=s([].join),S=A!=Object,_=w("join",",");f({target:"Array",proto:!0,forced:S||!_},{join:function(P){return E(m(this),P===void 0?",":P)}})},function(c,p,i){var f=i(76),s=i(35),A=i(15),m=i(122),w=i(154),E=i(32),S=i(45),_=i(156),P=i(123),B=i(90),I=i(40),L=i(59),Y=i(113),z=i(124),Z=i(102),ie=i(151),q=i(18),H=ie.UNSUPPORTED_Y,$=4294967295,Q=Math.min,T=[].push,k=A(/./.exec),D=A(T),M=A("".slice),G=!q(function(){var ce=/(?:)/,fe=ce.exec;ce.exec=function(){return fe.apply(this,arguments)};var ye="ab".split(ce);return ye.length!==2||ye[0]!=="a"||ye[1]!=="b"});m("split",function(ce,fe,ye){var Oe;return Oe="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(Ae,K){var se=I(S(this)),pe=K===void 0?$:K>>>0;if(pe===0)return[];if(Ae===void 0)return[se];if(!w(Ae))return s(fe,se,Ae,pe);for(var me,Pe,ze,je=[],De=(Ae.ignoreCase?"i":"")+(Ae.multiline?"m":"")+(Ae.unicode?"u":"")+(Ae.sticky?"y":""),Ue=0,J=new RegExp(Ae.source,De+"g");(me=s(Z,J,se))&&!((Pe=J.lastIndex)>Ue&&(D(je,M(se,Ue,me.index)),me.length>1&&me.index<se.length&&f(T,je,Y(me,1)),ze=me[0].length,Ue=Pe,je.length>=pe));)J.lastIndex===me.index&&J.lastIndex++;return Ue===se.length?!ze&&k(J,"")||D(je,""):D(je,M(se,Ue)),je.length>pe?Y(je,0,pe):je}:"0".split(void 0,0).length?function(Ae,K){return Ae===void 0&&K===0?[]:s(fe,this,Ae,K)}:fe,[function(Ae,K){var se=S(this),pe=Ae==null?void 0:L(Ae,ce);return pe?s(pe,Ae,se,K):s(Oe,I(se),Ae,K)},function(Ae,K){var se=E(this),pe=I(Ae),me=ye(Oe,se,pe,K,Oe!==fe);if(me.done)return me.value;var Pe=_(se,RegExp),ze=se.unicode,je=(se.ignoreCase?"i":"")+(se.multiline?"m":"")+(se.unicode?"u":"")+(H?"g":"y"),De=new Pe(H?"^(?:"+se.source+")":se,je),Ue=K===void 0?$:K>>>0;if(Ue===0)return[];if(pe.length===0)return z(De,pe)===null?[pe]:[];for(var J=0,V=0,re=[];V<pe.length;){De.lastIndex=H?0:V;var we,ke=z(De,H?M(pe,V):pe);if(ke===null||(we=Q(B(De.lastIndex+(H?V:0)),pe.length))===J)V=P(pe,V,ze);else{if(D(re,M(pe,J,V)),re.length===Ue)return re;for(var Ee=1;Ee<=ke.length-1;Ee++)if(D(re,ke[Ee]),re.length===Ue)return re;V=J=we}}return D(re,M(pe,J)),re}]},!G,H)},function(c,p,i){var f=i(36),s=i(7),A=i(15),m=i(95),w=i(44),E=i(34),S=i(143),_=i(58),P=i(88),B=i(130),I=i(18),L=i(72).f,Y=i(51).f,z=i(37).f,Z=i(196),ie=i(159).trim,q="Number",H=s.Number,$=H.prototype,Q=s.TypeError,T=A("".slice),k=A("".charCodeAt),D=function(Oe){var Ae=B(Oe,"number");return typeof Ae=="bigint"?Ae:M(Ae)},M=function(Oe){var Ae,K,se,pe,me,Pe,ze,je,De=B(Oe,"number");if(P(De))throw Q("Cannot convert a Symbol value to a number");if(typeof De=="string"&&De.length>2){if(De=ie(De),(Ae=k(De,0))===43||Ae===45){if((K=k(De,2))===88||K===120)return NaN}else if(Ae===48){switch(k(De,1)){case 66:case 98:se=2,pe=49;break;case 79:case 111:se=8,pe=55;break;default:return+De}for(Pe=(me=T(De,2)).length,ze=0;ze<Pe;ze++)if((je=k(me,ze))<48||je>pe)return NaN;return parseInt(me,se)}}return+De};if(m(q,!H(" 0o1")||!H("0b1")||H("+0x1"))){for(var G,ce=function(Oe){var Ae=arguments.length<1?0:H(D(Oe)),K=this;return _($,K)&&I(function(){Z(K)})?S(Object(Ae),K,ce):Ae},fe=f?L(H):"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(","),ye=0;fe.length>ye;ye++)E(H,G=fe[ye])&&!E(ce,G)&&z(ce,G,Y(H,G));ce.prototype=$,$.constructor=ce,w(s,q,ce)}},function(c,p,i){i(16)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(c,p,i){var f=i(7),s=i(15),A=i(18),m=i(50),w=f.Object,E=s("".split);c.exports=A(function(){return!w("z").propertyIsEnumerable(0)})?function(S){return m(S)=="String"?E(S,""):w(S)}:w},function(c,p){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}c.exports=i},function(c,p,i){var f=i(27),s=i(54),A=i(37),m=f("unscopables"),w=Array.prototype;w[m]==null&&A.f(w,m,{configurable:!0,value:s(null)}),c.exports=function(E){w[m][E]=!0}},function(c,p,i){var f=i(64),s=i(107);(c.exports=function(A,m){return s[A]||(s[A]=m!==void 0?m:{})})("versions",[]).push({version:"3.19.3",mode:f?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},function(c,p,i){var f=i(15),s=0,A=Math.random(),m=f(1 .toString);c.exports=function(w){return"Symbol("+(w===void 0?"":w)+")_"+m(++s+A,36)}},function(c,p,i){var f=i(7),s=i(33),A=f.document,m=s(A)&&s(A.createElement);c.exports=function(w){return m?A.createElement(w):{}}},function(c,p,i){var f=i(130),s=i(88);c.exports=function(A){var m=f(A,"string");return s(m)?m:m+""}},function(c,p,i){var f=i(7),s=i(46),A=i(28),m=i(58),w=i(128),E=f.Object;c.exports=w?function(S){return typeof S=="symbol"}:function(S){var _=s("Symbol");return A(_)&&m(_.prototype,E(S))}},function(c,p,i){var f=i(7).String;c.exports=function(s){try{return f(s)}catch{return"Object"}}},function(c,p,i){var f=i(68),s=Math.min;c.exports=function(A){return A>0?s(f(A),9007199254740991):0}},function(c,p,i){var f=i(84),s=i(85),A=f("keys");c.exports=function(m){return A[m]||(A[m]=s(m))}},function(c,p,i){var f=i(15),s=i(28),A=i(107),m=f(Function.toString);s(A.inspectSource)||(A.inspectSource=function(w){return m(w)}),c.exports=A.inspectSource},function(c,p,i){var f={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,A=s&&!f.call({1:2},1);p.f=A?function(m){var w=s(this,m);return!!w&&w.enumerable}:f},function(c,p,i){var f=i(36),s=i(34),A=Function.prototype,m=f&&Object.getOwnPropertyDescriptor,w=s(A,"name"),E=w&&function(){}.name==="something",S=w&&(!f||f&&m(A,"name").configurable);c.exports={EXISTS:w,PROPER:E,CONFIGURABLE:S}},function(c,p,i){var f=i(18),s=i(28),A=/#|\.prototype\./,m=function(P,B){var I=E[w(P)];return I==_||I!=S&&(s(B)?f(B):!!B)},w=m.normalize=function(P){return String(P).replace(A,".").toLowerCase()},E=m.data={},S=m.NATIVE="N",_=m.POLYFILL="P";c.exports=m},function(c,p,i){var f=i(7),s=i(34),A=i(28),m=i(38),w=i(91),E=i(137),S=w("IE_PROTO"),_=f.Object,P=_.prototype;c.exports=E?_.getPrototypeOf:function(B){var I=m(B);if(s(I,S))return I[S];var L=I.constructor;return A(L)&&I instanceof L?L.prototype:I instanceof _?P:null}},function(c,p,i){var f=i(15),s=i(32),A=i(172);c.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var m,w=!1,E={};try{(m=f(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(E,[]),w=E instanceof Array}catch{}return function(S,_){return s(S),A(_),w?m(S,_):S.__proto__=_,S}}():void 0)},function(c,p,i){var f=i(7),s=i(116),A=i(28),m=i(50),w=i(27)("toStringTag"),E=f.Object,S=m(function(){return arguments}())=="Arguments";c.exports=s?m:function(_){var P,B,I;return _===void 0?"Undefined":_===null?"Null":typeof(B=function(L,Y){try{return L[Y]}catch{}}(P=E(_),w))=="string"?B:S?m(P):(I=m(P))=="Object"&&A(P.callee)?"Arguments":I}},function(c,p,i){var f=i(50);c.exports=Array.isArray||function(s){return f(s)=="Array"}},function(c,p,i){var f=i(15),s=i(18),A=i(28),m=i(98),w=i(46),E=i(92),S=function(){},_=[],P=w("Reflect","construct"),B=/^\s*(?:class|function)\b/,I=f(B.exec),L=!B.exec(S),Y=function(z){if(!A(z))return!1;try{return P(S,_,z),!0}catch{return!1}};c.exports=!P||s(function(){var z;return Y(Y.call)||!Y(Object)||!Y(function(){z=!0})||z})?function(z){if(!A(z))return!1;switch(m(z)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return L||!!I(B,E(z))}:Y},function(c,p,i){var f=i(15);c.exports=f([].slice)},function(c,p,i){var f,s,A=i(35),m=i(15),w=i(40),E=i(184),S=i(151),_=i(84),P=i(54),B=i(56).get,I=i(185),L=i(186),Y=_("native-string-replace",String.prototype.replace),z=RegExp.prototype.exec,Z=z,ie=m("".charAt),q=m("".indexOf),H=m("".replace),$=m("".slice),Q=(s=/b*/g,A(z,f=/a/,"a"),A(z,s,"a"),f.lastIndex!==0||s.lastIndex!==0),T=S.BROKEN_CARET,k=/()??/.exec("")[1]!==void 0;(Q||k||T||I||L)&&(Z=function(D){var M,G,ce,fe,ye,Oe,Ae,K=this,se=B(K),pe=w(D),me=se.raw;if(me)return me.lastIndex=K.lastIndex,M=A(Z,me,pe),K.lastIndex=me.lastIndex,M;var Pe=se.groups,ze=T&&K.sticky,je=A(E,K),De=K.source,Ue=0,J=pe;if(ze&&(je=H(je,"y",""),q(je,"g")===-1&&(je+="g"),J=$(pe,K.lastIndex),K.lastIndex>0&&(!K.multiline||K.multiline&&ie(pe,K.lastIndex-1)!==`
- `)&&(De="(?: "+De+")",J=" "+J,Ue++),G=new RegExp("^(?:"+De+")",je)),k&&(G=new RegExp("^"+De+"$(?!\\s)",je)),Q&&(ce=K.lastIndex),fe=A(z,ze?G:K,J),ze?fe?(fe.input=$(fe.input,Ue),fe[0]=$(fe[0],Ue),fe.index=K.lastIndex,K.lastIndex+=fe[0].length):K.lastIndex=0:Q&&fe&&(K.lastIndex=K.global?fe.index+fe[0].length:ce),k&&fe&&fe.length>1&&A(Y,fe[0],G,function(){for(ye=1;ye<arguments.length-2;ye++)arguments[ye]===void 0&&(fe[ye]=void 0)}),fe&&Pe)for(fe.groups=Oe=P(null),ye=0;ye<Pe.length;ye++)Oe[(Ae=Pe[ye])[0]]=fe[Ae[1]];return fe}),c.exports=Z},function(c,p,i){var f=i(16),s=i(7),A=i(67),m=i(68),w=i(43),E=i(38),S=i(119),_=i(61),P=i(75)("splice"),B=s.TypeError,I=Math.max,L=Math.min,Y=9007199254740991,z="Maximum allowed length exceeded";f({target:"Array",proto:!0,forced:!P},{splice:function(Z,ie){var q,H,$,Q,T,k,D=E(this),M=w(D),G=A(Z,M),ce=arguments.length;if(ce===0?q=H=0:ce===1?(q=0,H=M-G):(q=ce-2,H=L(I(m(ie),0),M-G)),M+q-H>Y)throw B(z);for($=S(D,H),Q=0;Q<H;Q++)(T=G+Q)in D&&_($,Q,D[T]);if($.length=H,q<H){for(Q=G;Q<M-H;Q++)k=Q+q,(T=Q+H)in D?D[k]=D[T]:delete D[k];for(Q=M;Q>M-H+q;Q--)delete D[Q-1]}else if(q>H)for(Q=M-H;Q>G;Q--)k=Q+q-1,(T=Q+H-1)in D?D[k]=D[T]:delete D[k];for(Q=0;Q<q;Q++)D[Q+G]=arguments[Q+2];return D.length=M-H+q,$}})},function(c,p,i){var f=i(16),s=i(201);f({target:"String",proto:!0,forced:i(202)("anchor")},{anchor:function(A){return s(this,"a","name",A)}})},function(c,p,i){(function(f){var s=typeof f=="object"&&f&&f.Object===Object&&f;p.a=s}).call(this,i(82))},function(c,p,i){(function(f){var s=i(30),A=g&&!g.nodeType&&g,m=A&&typeof f=="object"&&f&&!f.nodeType&&f,w=m&&m.exports===A?s.a.Buffer:void 0,E=w?w.allocUnsafe:void 0;p.a=function(S,_){if(_)return S.slice();var P=S.length,B=E?E(P):new S.constructor(P);return S.copy(B),B}}).call(this,i(121)(c))},function(c,p,i){var f=i(7),s=i(108),A="__core-js_shared__",m=f[A]||s(A,{});c.exports=m},function(c,p,i){var f=i(7),s=Object.defineProperty;c.exports=function(A,m){try{s(f,A,{value:m,configurable:!0,writable:!0})}catch{f[A]=m}return m}},function(c,p,i){var f=i(65),s=i(18);c.exports=!!Object.getOwnPropertySymbols&&!s(function(){var A=Symbol();return!String(A)||!(Object(A)instanceof Symbol)||!Symbol.sham&&f&&f<41})},function(c,p){c.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(c,p,i){var f=i(16),s=i(35),A=i(64),m=i(94),w=i(28),E=i(171),S=i(96),_=i(97),P=i(73),B=i(57),I=i(44),L=i(27),Y=i(70),z=i(136),Z=m.PROPER,ie=m.CONFIGURABLE,q=z.IteratorPrototype,H=z.BUGGY_SAFARI_ITERATORS,$=L("iterator"),Q="keys",T="values",k="entries",D=function(){return this};c.exports=function(M,G,ce,fe,ye,Oe,Ae){E(ce,G,fe);var K,se,pe,me=function(V){if(V===ye&&Ue)return Ue;if(!H&&V in je)return je[V];switch(V){case Q:case T:case k:return function(){return new ce(this,V)}}return function(){return new ce(this)}},Pe=G+" Iterator",ze=!1,je=M.prototype,De=je[$]||je["@@iterator"]||ye&&je[ye],Ue=!H&&De||me(ye),J=G=="Array"&&je.entries||De;if(J&&(K=S(J.call(new M)))!==Object.prototype&&K.next&&(A||S(K)===q||(_?_(K,q):w(K[$])||I(K,$,D)),P(K,Pe,!0,!0),A&&(Y[Pe]=D)),Z&&ye==T&&De&&De.name!==T&&(!A&&ie?B(je,"name",T):(ze=!0,Ue=function(){return s(De,this)})),ye)if(se={values:me(T),keys:Oe?Ue:me(Q),entries:me(k)},Ae)for(pe in se)(H||ze||!(pe in je))&&I(je,pe,se[pe]);else f({target:G,proto:!0,forced:H||ze},se);return A&&!Ae||je[$]===Ue||I(je,$,Ue,{name:ye}),Y[G]=Ue,se}},function(c,p){p.f=Object.getOwnPropertySymbols},function(c,p,i){var f=i(7),s=i(67),A=i(43),m=i(61),w=f.Array,E=Math.max;c.exports=function(S,_,P){for(var B=A(S),I=s(_,B),L=s(P===void 0?B:P,B),Y=w(E(L-I,0)),z=0;I<L;I++,z++)m(Y,z,S[I]);return Y.length=z,Y}},function(c,p,i){var f=i(7),s=i(62),A=i(35),m=i(32),w=i(89),E=i(140),S=i(43),_=i(58),P=i(141),B=i(115),I=i(142),L=f.TypeError,Y=function(Z,ie){this.stopped=Z,this.result=ie},z=Y.prototype;c.exports=function(Z,ie,q){var H,$,Q,T,k,D,M,G=q&&q.that,ce=!(!q||!q.AS_ENTRIES),fe=!(!q||!q.IS_ITERATOR),ye=!(!q||!q.INTERRUPTED),Oe=s(ie,G),Ae=function(se){return H&&I(H,"normal",se),new Y(!0,se)},K=function(se){return ce?(m(se),ye?Oe(se[0],se[1],Ae):Oe(se[0],se[1])):ye?Oe(se,Ae):Oe(se)};if(fe)H=Z;else{if(!($=B(Z)))throw L(w(Z)+" is not iterable");if(E($)){for(Q=0,T=S(Z);T>Q;Q++)if((k=K(Z[Q]))&&_(z,k))return k;return new Y(!1)}H=P(Z,$)}for(D=H.next;!(M=A(D,H)).done;){try{k=K(M.value)}catch(se){I(H,"throw",se)}if(typeof k=="object"&&k&&_(z,k))return k}return new Y(!1)}},function(c,p,i){var f=i(98),s=i(59),A=i(70),m=i(27)("iterator");c.exports=function(w){if(w!=null)return s(w,m)||s(w,"@@iterator")||A[f(w)]}},function(c,p,i){var f={};f[i(27)("toStringTag")]="z",c.exports=String(f)==="[object z]"},function(c,p,i){var f=i(7),s=i(58),A=f.TypeError;c.exports=function(m,w){if(s(w,m))return m;throw A("Incorrect invocation")}},function(c,p,i){var f=i(27)("iterator"),s=!1;try{var A=0,m={next:function(){return{done:!!A++}},return:function(){s=!0}};m[f]=function(){return this},Array.from(m,function(){throw 2})}catch{}c.exports=function(w,E){if(!E&&!s)return!1;var S=!1;try{var _={};_[f]=function(){return{next:function(){return{done:S=!0}}}},w(_)}catch{}return S}},function(c,p,i){var f=i(180);c.exports=function(s,A){return new(f(s))(A===0?0:A)}},function(c,p,i){var f=i(18);c.exports=function(s,A){var m=[][s];return!!m&&f(function(){m.call(null,A||function(){throw 1},1)})}},function(c,p){c.exports=function(i){if(!i.webpackPolyfill){var f=Object.create(i);f.children||(f.children=[]),Object.defineProperty(f,"loaded",{enumerable:!0,get:function(){return f.l}}),Object.defineProperty(f,"id",{enumerable:!0,get:function(){return f.i}}),Object.defineProperty(f,"exports",{enumerable:!0}),f.webpackPolyfill=1}return f}},function(c,p,i){i(19);var f=i(15),s=i(44),A=i(102),m=i(18),w=i(27),E=i(57),S=w("species"),_=RegExp.prototype;c.exports=function(P,B,I,L){var Y=w(P),z=!m(function(){var H={};return H[Y]=function(){return 7},""[P](H)!=7}),Z=z&&!m(function(){var H=!1,$=/a/;return P==="split"&&(($={}).constructor={},$.constructor[S]=function(){return $},$.flags="",$[Y]=/./[Y]),$.exec=function(){return H=!0,null},$[Y](""),!H});if(!z||!Z||I){var ie=f(/./[Y]),q=B(Y,""[P],function(H,$,Q,T,k){var D=f(H),M=$.exec;return M===A||M===_.exec?z&&!k?{done:!0,value:ie($,Q,T)}:{done:!0,value:D(Q,$,T)}:{done:!1}});s(String.prototype,P,q[0]),s(_,Y,q[1])}L&&E(_[Y],"sham",!0)}},function(c,p,i){var f=i(146).charAt;c.exports=function(s,A,m){return A+(m?f(s,A).length:1)}},function(c,p,i){var f=i(7),s=i(35),A=i(32),m=i(28),w=i(50),E=i(102),S=f.TypeError;c.exports=function(_,P){var B=_.exec;if(m(B)){var I=s(B,_,P);return I!==null&&A(I),I}if(w(_)==="RegExp")return s(E,_,P);throw S("RegExp#exec called on incompatible receiver")}},function(c,p,i){var f=i(76),s=i(35),A=i(15),m=i(122),w=i(18),E=i(32),S=i(28),_=i(68),P=i(90),B=i(40),I=i(45),L=i(123),Y=i(59),z=i(197),Z=i(124),ie=i(27)("replace"),q=Math.max,H=Math.min,$=A([].concat),Q=A([].push),T=A("".indexOf),k=A("".slice),D="a".replace(/./,"$0")==="$0",M=!!/./[ie]&&/./[ie]("a","$0")==="";m("replace",function(G,ce,fe){var ye=M?"$":"$0";return[function(Oe,Ae){var K=I(this),se=Oe==null?void 0:Y(Oe,ie);return se?s(se,Oe,K,Ae):s(ce,B(K),Oe,Ae)},function(Oe,Ae){var K=E(this),se=B(Oe);if(typeof Ae=="string"&&T(Ae,ye)===-1&&T(Ae,"$<")===-1){var pe=fe(ce,K,se,Ae);if(pe.done)return pe.value}var me=S(Ae);me||(Ae=B(Ae));var Pe=K.global;if(Pe){var ze=K.unicode;K.lastIndex=0}for(var je=[];;){var De=Z(K,se);if(De===null||(Q(je,De),!Pe))break;B(De[0])===""&&(K.lastIndex=L(se,P(K.lastIndex),ze))}for(var Ue,J="",V=0,re=0;re<je.length;re++){for(var we=B((De=je[re])[0]),ke=q(H(_(De.index),se.length),0),Ee=[],Xe=1;Xe<De.length;Xe++)Q(Ee,(Ue=De[Xe])===void 0?Ue:String(Ue));var $e=De.groups;if(me){var Ke=$([we],Ee,ke,se);$e!==void 0&&Q(Ke,$e);var Ve=B(f(Ae,void 0,Ke))}else Ve=z(we,se,ke,Ee,$e,Ae);ke>=V&&(J+=k(se,V,ke)+Ve,V=ke+we.length)}return J+k(se,V)}]},!!w(function(){var G=/./;return G.exec=function(){var ce=[];return ce.groups={a:"7"},ce},"".replace(G,"$<a>")!=="7"})||!D||M)},function(c,p,i){var f=i(50),s=i(7);c.exports=f(s.process)=="process"},function(c,p,i){i(16)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(c,p,i){var f=i(109);c.exports=f&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(c,p,i){var f=i(36),s=i(18),A=i(86);c.exports=!f&&!s(function(){return Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a!=7})},function(c,p,i){var f=i(7),s=i(35),A=i(33),m=i(88),w=i(59),E=i(169),S=i(27),_=f.TypeError,P=S("toPrimitive");c.exports=function(B,I){if(!A(B)||m(B))return B;var L,Y=w(B,P);if(Y){if(I===void 0&&(I="default"),L=s(Y,B,I),!A(L)||m(L))return L;throw _("Can't convert object to primitive value")}return I===void 0&&(I="number"),E(B,I)}},function(c,p,i){var f=i(15),s=i(34),A=i(39),m=i(132).indexOf,w=i(69),E=f([].push);c.exports=function(S,_){var P,B=A(S),I=0,L=[];for(P in B)!s(w,P)&&s(B,P)&&E(L,P);for(;_.length>I;)s(B,P=_[I++])&&(~m(L,P)||E(L,P));return L}},function(c,p,i){var f=i(39),s=i(67),A=i(43),m=function(w){return function(E,S,_){var P,B=f(E),I=A(B),L=s(_,I);if(w&&S!=S){for(;I>L;)if((P=B[L++])!=P)return!0}else for(;I>L;L++)if((w||L in B)&&B[L]===S)return w||L||0;return!w&&-1}};c.exports={includes:m(!0),indexOf:m(!1)}},function(c,p,i){var f=i(46);c.exports=f("document","documentElement")},function(c,p,i){var f=i(34),s=i(135),A=i(51),m=i(37);c.exports=function(w,E){for(var S=s(E),_=m.f,P=A.f,B=0;B<S.length;B++){var I=S[B];f(w,I)||_(w,I,P(E,I))}}},function(c,p,i){var f=i(46),s=i(15),A=i(72),m=i(112),w=i(32),E=s([].concat);c.exports=f("Reflect","ownKeys")||function(S){var _=A.f(w(S)),P=m.f;return P?E(_,P(S)):_}},function(c,p,i){var f,s,A,m=i(18),w=i(28),E=i(54),S=i(96),_=i(44),P=i(27),B=i(64),I=P("iterator"),L=!1;[].keys&&("next"in(A=[].keys())?(s=S(S(A)))!==Object.prototype&&(f=s):L=!0),f==null||m(function(){var Y={};return f[I].call(Y)!==Y})?f={}:B&&(f=E(f)),w(f[I])||_(f,I,function(){return this}),c.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:L}},function(c,p,i){var f=i(18);c.exports=!f(function(){function s(){}return s.prototype.constructor=null,Object.getPrototypeOf(new s)!==s.prototype})},function(c,p,i){var f=i(16),s=i(15),A=i(69),m=i(33),w=i(34),E=i(37).f,S=i(72),_=i(139),P=i(174),B=i(85),I=i(176),L=!1,Y=B("meta"),z=0,Z=function(q){E(q,Y,{value:{objectID:"O"+z++,weakData:{}}})},ie=c.exports={enable:function(){ie.enable=function(){},L=!0;var q=S.f,H=s([].splice),$={};$[Y]=1,q($).length&&(S.f=function(Q){for(var T=q(Q),k=0,D=T.length;k<D;k++)if(T[k]===Y){H(T,k,1);break}return T},f({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:_.f}))},fastKey:function(q,H){if(!m(q))return typeof q=="symbol"?q:(typeof q=="string"?"S":"P")+q;if(!w(q,Y)){if(!P(q))return"F";if(!H)return"E";Z(q)}return q[Y].objectID},getWeakData:function(q,H){if(!w(q,Y)){if(!P(q))return!0;if(!H)return!1;Z(q)}return q[Y].weakData},onFreeze:function(q){return I&&L&&P(q)&&!w(q,Y)&&Z(q),q}};A[Y]=!0},function(c,p,i){var f=i(50),s=i(39),A=i(72).f,m=i(113),w=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];c.exports.f=function(E){return w&&f(E)=="Window"?function(S){try{return A(S)}catch{return m(w)}}(E):A(s(E))}},function(c,p,i){var f=i(27),s=i(70),A=f("iterator"),m=Array.prototype;c.exports=function(w){return w!==void 0&&(s.Array===w||m[A]===w)}},function(c,p,i){var f=i(7),s=i(35),A=i(55),m=i(32),w=i(89),E=i(115),S=f.TypeError;c.exports=function(_,P){var B=arguments.length<2?E(_):P;if(A(B))return m(s(B,_));throw S(w(_)+" is not iterable")}},function(c,p,i){var f=i(35),s=i(32),A=i(59);c.exports=function(m,w,E){var S,_;s(m);try{if(!(S=A(m,"return"))){if(w==="throw")throw E;return E}S=f(S,m)}catch(P){_=!0,S=P}if(w==="throw")throw E;if(_)throw S;return s(S),E}},function(c,p,i){var f=i(28),s=i(33),A=i(97);c.exports=function(m,w,E){var S,_;return A&&f(S=w.constructor)&&S!==E&&s(_=S.prototype)&&_!==E.prototype&&A(m,_),m}},function(c,p,i){var f=i(44);c.exports=function(s,A,m){for(var w in A)f(s,w,A[w],m);return s}},function(c,p,i){var f=i(46),s=i(37),A=i(27),m=i(36),w=A("species");c.exports=function(E){var S=f(E),_=s.f;m&&S&&!S[w]&&_(S,w,{configurable:!0,get:function(){return this}})}},function(c,p,i){var f=i(15),s=i(68),A=i(40),m=i(45),w=f("".charAt),E=f("".charCodeAt),S=f("".slice),_=function(P){return function(B,I){var L,Y,z=A(m(B)),Z=s(I),ie=z.length;return Z<0||Z>=ie?P?"":void 0:(L=E(z,Z))<55296||L>56319||Z+1===ie||(Y=E(z,Z+1))<56320||Y>57343?P?w(z,Z):L:P?S(z,Z,Z+2):Y-56320+(L-55296<<10)+65536}};c.exports={codeAt:_(!1),charAt:_(!0)}},function(c,p){c.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(c,p,i){var f=i(86)("span").classList,s=f&&f.constructor&&f.constructor.prototype;c.exports=s===Object.prototype?void 0:s},function(c,p,i){var f=i(27);p.f=f},function(c,p,i){var f=i(181),s=i(34),A=i(149),m=i(37).f;c.exports=function(w){var E=f.Symbol||(f.Symbol={});s(E,w)||m(E,w,{value:A.f(w)})}},function(c,p,i){var f=i(18),s=i(7).RegExp,A=f(function(){var E=s("a","y");return E.lastIndex=2,E.exec("abcd")!=null}),m=A||f(function(){return!s("a","y").sticky}),w=A||f(function(){var E=s("^r","gy");return E.lastIndex=2,E.exec("str")!=null});c.exports={BROKEN_CARET:w,MISSED_STICKY:m,UNSUPPORTED_Y:A}},function(c,p,i){var f=i(16),s=i(132).includes,A=i(83);f({target:"Array",proto:!0},{includes:function(m){return s(this,m,arguments.length>1?arguments[1]:void 0)}}),A("includes")},function(c,p,i){var f=i(16),s=i(15),A=i(193),m=i(45),w=i(40),E=i(194),S=s("".indexOf);f({target:"String",proto:!0,forced:!E("includes")},{includes:function(_){return!!~S(w(m(this)),w(A(_)),arguments.length>1?arguments[1]:void 0)}})},function(c,p,i){var f=i(33),s=i(50),A=i(27)("match");c.exports=function(m){var w;return f(m)&&((w=m[A])!==void 0?!!w:s(m)=="RegExp")}},function(c,p){var i,f,s=c.exports={};function A(){throw new Error("setTimeout has not been defined")}function m(){throw new Error("clearTimeout has not been defined")}function w(z){if(i===setTimeout)return setTimeout(z,0);if((i===A||!i)&&setTimeout)return i=setTimeout,setTimeout(z,0);try{return i(z,0)}catch{try{return i.call(null,z,0)}catch{return i.call(this,z,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:A}catch{i=A}try{f=typeof clearTimeout=="function"?clearTimeout:m}catch{f=m}})();var E,S=[],_=!1,P=-1;function B(){_&&E&&(_=!1,E.length?S=E.concat(S):P=-1,S.length&&I())}function I(){if(!_){var z=w(B);_=!0;for(var Z=S.length;Z;){for(E=S,S=[];++P<Z;)E&&E[P].run();P=-1,Z=S.length}E=null,_=!1,function(ie){if(f===clearTimeout)return clearTimeout(ie);if((f===m||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(ie);try{f(ie)}catch{try{return f.call(null,ie)}catch{return f.call(this,ie)}}}(z)}}function L(z,Z){this.fun=z,this.array=Z}function Y(){}s.nextTick=function(z){var Z=new Array(arguments.length-1);if(arguments.length>1)for(var ie=1;ie<arguments.length;ie++)Z[ie-1]=arguments[ie];S.push(new L(z,Z)),S.length!==1||_||w(I)},L.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=Y,s.addListener=Y,s.once=Y,s.off=Y,s.removeListener=Y,s.removeAllListeners=Y,s.emit=Y,s.prependListener=Y,s.prependOnceListener=Y,s.listeners=function(z){return[]},s.binding=function(z){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(z){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(c,p,i){var f=i(32),s=i(157),A=i(27)("species");c.exports=function(m,w){var E,S=f(m).constructor;return S===void 0||(E=f(S)[A])==null?w:s(E)}},function(c,p,i){var f=i(7),s=i(100),A=i(89),m=f.TypeError;c.exports=function(w){if(s(w))return w;throw m(A(w)+" is not a constructor")}},function(c,p,i){var f=i(16),s=i(159).trim;f({target:"String",proto:!0,forced:i(195)("trim")},{trim:function(){return s(this)}})},function(c,p,i){var f=i(15),s=i(45),A=i(40),m=i(160),w=f("".replace),E="["+m+"]",S=RegExp("^"+E+E+"*"),_=RegExp(E+E+"*$"),P=function(B){return function(I){var L=A(s(I));return 1&B&&(L=w(L,S,"")),2&B&&(L=w(L,_,"")),L}};c.exports={start:P(1),end:P(2),trim:P(3)}},function(c,p){c.exports=`
- \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},function(c,p,i){var f=i(35),s=i(122),A=i(32),m=i(90),w=i(40),E=i(45),S=i(59),_=i(123),P=i(124);s("match",function(B,I,L){return[function(Y){var z=E(this),Z=Y==null?void 0:S(Y,B);return Z?f(Z,Y,z):new RegExp(Y)[B](w(z))},function(Y){var z=A(this),Z=w(Y),ie=L(I,z,Z);if(ie.done)return ie.value;if(!z.global)return P(z,Z);var q=z.unicode;z.lastIndex=0;for(var H,$=[],Q=0;(H=P(z,Z))!==null;){var T=w(H[0]);$[Q]=T,T===""&&(z.lastIndex=_(Z,m(z.lastIndex),q)),Q++}return Q===0?null:$}]})},function(c,p,i){var f,s,A,m,w=i(7),E=i(76),S=i(62),_=i(28),P=i(34),B=i(18),I=i(133),L=i(101),Y=i(86),z=i(163),Z=i(126),ie=w.setImmediate,q=w.clearImmediate,H=w.process,$=w.Dispatch,Q=w.Function,T=w.MessageChannel,k=w.String,D=0,M={},G="onreadystatechange";try{f=w.location}catch{}var ce=function(Ae){if(P(M,Ae)){var K=M[Ae];delete M[Ae],K()}},fe=function(Ae){return function(){ce(Ae)}},ye=function(Ae){ce(Ae.data)},Oe=function(Ae){w.postMessage(k(Ae),f.protocol+"//"+f.host)};ie&&q||(ie=function(Ae){var K=L(arguments,1);return M[++D]=function(){E(_(Ae)?Ae:Q(Ae),void 0,K)},s(D),D},q=function(Ae){delete M[Ae]},Z?s=function(Ae){H.nextTick(fe(Ae))}:$&&$.now?s=function(Ae){$.now(fe(Ae))}:T&&!z?(m=(A=new T).port2,A.port1.onmessage=ye,s=S(m.postMessage,m)):w.addEventListener&&_(w.postMessage)&&!w.importScripts&&f&&f.protocol!=="file:"&&!B(Oe)?(s=Oe,w.addEventListener("message",ye,!1)):s=G in Y("script")?function(Ae){I.appendChild(Y("script")).onreadystatechange=function(){I.removeChild(this),ce(Ae)}}:function(Ae){setTimeout(fe(Ae),0)}),c.exports={set:ie,clear:q}},function(c,p,i){var f=i(53);c.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(f)},function(c,p,i){var f=i(55),s=function(A){var m,w;this.promise=new A(function(E,S){if(m!==void 0||w!==void 0)throw TypeError("Bad Promise constructor");m=E,w=S}),this.resolve=f(m),this.reject=f(w)};c.exports.f=function(A){return new s(A)}},function(c,p,i){p.a=function(){return!1}},function(c,p,i){(function(f){i.d(p,"a",function(){return H});var s=i(0);function A(T){throw new Error("[mobx-utils] "+T)}function m(T,k){k===void 0&&(k="Illegal state"),T||A(k)}var w=function(T){return T&&T!==Object.prototype&&Object.getOwnPropertyNames(T).concat(w(Object.getPrototypeOf(T))||[])},E=function(T){return function(k){var D=w(k);return D.filter(function(M,G){return D.indexOf(M)===G})}(T).filter(function(k){return k!=="constructor"&&!~k.indexOf("__")})},S="pending",_="fulfilled",P="rejected";function B(T){switch(this.state){case S:return T.pending&&T.pending(this.value);case P:return T.rejected&&T.rejected(this.value);case _:return T.fulfilled?T.fulfilled(this.value):this.value}}function I(T,k){if(m(arguments.length<=2,"fromPromise expects up to two arguments"),m(typeof T=="function"||typeof T=="object"&&T&&typeof T.then=="function","Please pass a promise or function to fromPromise"),T.isPromiseBasedObservable===!0)return T;typeof T=="function"&&(T=new Promise(T));var D=T;T.then(Object(s.k)("observableFromPromise-resolve",function(G){D.value=G,D.state=_}),Object(s.k)("observableFromPromise-reject",function(G){D.value=G,D.state=P})),D.isPromiseBasedObservable=!0,D.case=B;var M=k&&k.state===_?k.value:void 0;return Object(s.q)(D,{value:M,state:S},{},{deep:!1}),D}(function(T){T.reject=Object(s.k)("fromPromise.reject",function(k){var D=T(Promise.reject(k));return D.state=P,D.value=k,D}),T.resolve=Object(s.k)("fromPromise.resolve",function(k){k===void 0&&(k=void 0);var D=T(Promise.resolve(k));return D.state=_,D.value=k,D})})(I||(I={}));var L=function(T,k,D,M){var G,ce=arguments.length,fe=ce<3?k:M===null?M=Object.getOwnPropertyDescriptor(k,D):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(T,k,D,M);else for(var ye=T.length-1;ye>=0;ye--)(G=T[ye])&&(fe=(ce<3?G(fe):ce>3?G(k,D,fe):G(k,D))||fe);return ce>3&&fe&&Object.defineProperty(k,D,fe),fe};(function(){function T(k,D){var M=this;Object(s.G)(function(){M.current=D,M.subscription=k.subscribe(M)})}T.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},T.prototype.next=function(k){this.current=k},T.prototype.complete=function(){this.dispose()},T.prototype.error=function(k){this.current=k,this.dispose()},L([s.C.ref],T.prototype,"current",void 0),L([s.k.bound],T.prototype,"next",null),L([s.k.bound],T.prototype,"complete",null),L([s.k.bound],T.prototype,"error",null)})();var Y=function(){return Y=Object.assign||function(T){for(var k,D=1,M=arguments.length;D<M;D++)for(var G in k=arguments[D])Object.prototype.hasOwnProperty.call(k,G)&&(T[G]=k[G]);return T},Y.apply(this,arguments)},z=function(T,k,D,M){var G,ce=arguments.length,fe=ce<3?k:M===null?M=Object.getOwnPropertyDescriptor(k,D):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(T,k,D,M);else for(var ye=T.length-1;ye>=0;ye--)(G=T[ye])&&(fe=(ce<3?G(fe):ce>3?G(k,D,fe):G(k,D))||fe);return ce>3&&fe&&Object.defineProperty(k,D,fe),fe},Z=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function T(k){var D=this;this.model=k,this.localValues=s.C.map({}),this.localComputedValues=s.C.map({}),this.isPropertyDirty=function(M){return D.localValues.has(M)},m(Object(s.A)(k),"createViewModel expects an observable object"),E(k).forEach(function(M){if(M!==s.a&&M!=="__mobxDidRunLazyInitializers"){if(m(Z.indexOf(M)===-1,"The propertyname "+M+" is reserved and cannot be used with viewModels"),Object(s.w)(k,M)){var G=Object(s.h)(k,M).derivation;D.localComputedValues.set(M,Object(s.m)(G.bind(D)))}var ce=Object.getOwnPropertyDescriptor(k,M),fe=ce?{enumerable:ce.enumerable}:{};Object.defineProperty(D,M,Y(Y({},fe),{configurable:!0,get:function(){return Object(s.w)(k,M)?D.localComputedValues.get(M).get():D.isPropertyDirty(M)?D.localValues.get(M):D.model[M]},set:Object(s.k)(function(ye){ye!==D.model[M]?D.localValues.set(M,ye):D.localValues.delete(M)})}))}})}Object.defineProperty(T.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),T.prototype.submit=function(){var k=this;Object(s.B)(this.localValues).forEach(function(D){var M=k.localValues.get(D),G=k.model[D];Object(s.y)(G)?G.replace(M):Object(s.z)(G)?(G.clear(),G.merge(M)):Object(s.v)(M)||(k.model[D]=M)}),this.localValues.clear()},T.prototype.reset=function(){this.localValues.clear()},T.prototype.resetProperty=function(k){this.localValues.delete(k)},z([s.m],T.prototype,"isDirty",null),z([s.m],T.prototype,"changedValues",null),z([s.k.bound],T.prototype,"submit",null),z([s.k.bound],T.prototype,"reset",null),z([s.k.bound],T.prototype,"resetProperty",null)})();function ie(T){if(!T)return"ROOT";for(var k=[];T.parent;)k.push(T.path),T=T.parent;return k.reverse().join("/")}function q(T){return Object(s.A)(T)||Object(s.y)(T)||Object(s.z)(T)}function H(T,k){var D=new WeakMap;function M(fe){var ye=D.get(fe.object);(function(Oe,Ae){switch(Oe.type){case"add":G(Oe.newValue,Ae,Oe.name);break;case"update":ce(Oe.oldValue),G(Oe.newValue,Ae,Oe.name||""+Oe.index);break;case"remove":case"delete":ce(Oe.oldValue);break;case"splice":Oe.removed.map(ce),Oe.added.forEach(function(pe,me){return G(pe,Ae,""+(Oe.index+me))});for(var K=Oe.index+Oe.addedCount;K<Oe.object.length;K++)if(q(Oe.object[K])){var se=D.get(Oe.object[K]);se&&(se.path=""+K)}}})(fe,ye),k(fe,ie(ye),T)}function G(fe,ye,Oe){if(q(fe)){var Ae=D.get(fe);if(Ae){if(Ae.parent!==ye||Ae.path!==Oe)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+ie(ye)+"/"+Oe+"', but it already exists at '"+ie(Ae.parent)+"/"+Ae.path+"'")}else{var K={parent:ye,path:Oe,dispose:Object(s.D)(fe,M)};D.set(fe,K),Object(s.p)(fe).forEach(function(se){var pe=se[0];return G(se[1],K,pe)})}}}function ce(fe){if(q(fe)){var ye=D.get(fe);if(!ye)return;D.delete(fe),ye.dispose(),Object(s.L)(fe).forEach(ce)}}return G(T,void 0,""),function(){ce(T)}}var $,Q=($=function(T,k){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,M){D.__proto__=M}||function(D,M){for(var G in M)M.hasOwnProperty(G)&&(D[G]=M[G])},$(T,k)},function(T,k){function D(){this.constructor=T}$(T,k),T.prototype=k===null?Object.create(k):(D.prototype=k.prototype,new D)});(function(T){function k(D,M,G){var ce=G===void 0?{}:G,fe=ce.name,ye=fe===void 0?"ogm"+(1e3*Math.random()|0):fe,Oe=ce.keyToName,Ae=Oe===void 0?function(pe){return""+pe}:Oe,K=T.call(this)||this;K._keyToName=Ae,K._groupBy=M,K._ogmInfoKey=Symbol("ogmInfo"+ye),K._base=D;for(var se=0;se<D.length;se++)K._addItem(D[se]);return K._disposeBaseObserver=Object(s.D)(K._base,function(pe){if(pe.type==="splice")Object(s.J)(function(){for(var me=0,Pe=pe.removed;me<Pe.length;me++){var ze=Pe[me];K._removeItem(ze)}for(var je=0,De=pe.added;je<De.length;je++){var Ue=De[je];K._addItem(Ue)}});else{if(pe.type!=="update")throw new Error("illegal state");Object(s.J)(function(){K._removeItem(pe.oldValue),K._addItem(pe.newValue)})}}),K}Q(k,T),k.prototype.clear=function(){throw new Error("not supported")},k.prototype.delete=function(D){throw new Error("not supported")},k.prototype.set=function(D,M){throw new Error("not supported")},k.prototype.dispose=function(){this._disposeBaseObserver();for(var D=0;D<this._base.length;D++){var M=this._base[D];M[this._ogmInfoKey].reaction(),delete M[this._ogmInfoKey]}},k.prototype._getGroupArr=function(D){var M=T.prototype.get.call(this,D);return M===void 0&&(M=Object(s.C)([],{name:"GroupArray["+this._keyToName(D)+"]",deep:!1}),T.prototype.set.call(this,D,M)),M},k.prototype._removeFromGroupArr=function(D,M){var G=T.prototype.get.call(this,D);G.length===1?T.prototype.delete.call(this,D):(M===G.length-1||(G[M]=G[G.length-1],G[M][this._ogmInfoKey].groupArrIndex=M),G.length--)},k.prototype._addItem=function(D){var M=this,G=this._groupBy(D),ce=this._getGroupArr(G),fe={groupByValue:G,groupArrIndex:ce.length,reaction:Object(s.F)(function(){return M._groupBy(D)},function(ye,Oe){var Ae=D[M._ogmInfoKey];M._removeFromGroupArr(Ae.groupByValue,Ae.groupArrIndex);var K=M._getGroupArr(ye),se=K.length;K.push(D),Ae.groupByValue=ye,Ae.groupArrIndex=se})};Object.defineProperty(D,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:fe}),ce.push(D)},k.prototype._removeItem=function(D){var M=D[this._ogmInfoKey];this._removeFromGroupArr(M.groupByValue,M.groupArrIndex),M.reaction(),delete D[this._ogmInfoKey]}})(s.b),function(){function T(k,D){this.base=k,this.args=D,this.closestIdx=0,this.isDisposed=!1;for(var M=this.closest=this.root=k,G=0;G<this.args.length-1&&(M=M.get(D[G]));G++)this.closest=M;this.closestIdx=G}return T.prototype.exists=function(){this.assertNotDisposed();var k=this.args.length;return this.closestIdx>=k-1&&this.closest.has(this.args[k-1])},T.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},T.prototype.set=function(k){this.assertNotDisposed();for(var D=this.args.length,M=this.closest,G=this.closestIdx;G<D-1;G++){var ce=new Map;M.set(this.args[G],ce),M=ce}this.closestIdx=D-1,this.closest=M,M.set(this.args[D-1],k)},T.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var k=this.args.length;this.closest.delete(this.args[k-1]);for(var D=this.root,M=[D],G=0;G<k-1;G++)D=D.get(this.args[G]),M.push(D);for(G=M.length-1;G>0;G--)M[G].size===0&&M[G-1].delete(this.args[G-1]);this.isDisposed=!0},T.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},T}(),Promise.resolve(),typeof queueMicrotask!="undefined"||f!==void 0&&f.nextTick}).call(this,i(155))},function(c,p,i){var f;(function(s,A,m){if(s){for(var w,E={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},S={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},_={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},P={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},B=1;B<20;++B)E[111+B]="f"+B;for(B=0;B<=9;++B)E[B+96]=B.toString();q.prototype.bind=function(H,$,Q){var T=this;return H=H instanceof Array?H:[H],T._bindMultiple.call(T,H,$,Q),T},q.prototype.unbind=function(H,$){return this.bind.call(this,H,function(){},$)},q.prototype.trigger=function(H,$){var Q=this;return Q._directMap[H+":"+$]&&Q._directMap[H+":"+$]({},H),Q},q.prototype.reset=function(){var H=this;return H._callbacks={},H._directMap={},H},q.prototype.stopCallback=function(H,$){if((" "+$.className+" ").indexOf(" mousetrap ")>-1||ie($,this.target))return!1;if("composedPath"in H&&typeof H.composedPath=="function"){var Q=H.composedPath()[0];Q!==H.target&&($=Q)}return $.tagName=="INPUT"||$.tagName=="SELECT"||$.tagName=="TEXTAREA"||$.isContentEditable},q.prototype.handleKey=function(){var H=this;return H._handleKey.apply(H,arguments)},q.addKeycodes=function(H){for(var $ in H)H.hasOwnProperty($)&&(E[$]=H[$]);w=null},q.init=function(){var H=q(A);for(var $ in H)$.charAt(0)!=="_"&&(q[$]=function(Q){return function(){return H[Q].apply(H,arguments)}}($))},q.init(),s.Mousetrap=q,c.exports&&(c.exports=q),(f=function(){return q}.call(p,i,p,c))===void 0||(c.exports=f)}function I(H,$,Q){H.addEventListener?H.addEventListener($,Q,!1):H.attachEvent("on"+$,Q)}function L(H){if(H.type=="keypress"){var $=String.fromCharCode(H.which);return H.shiftKey||($=$.toLowerCase()),$}return E[H.which]?E[H.which]:S[H.which]?S[H.which]:String.fromCharCode(H.which).toLowerCase()}function Y(H){return H=="shift"||H=="ctrl"||H=="alt"||H=="meta"}function z(H,$,Q){return Q||(Q=function(){if(!w)for(var T in w={},E)T>95&&T<112||E.hasOwnProperty(T)&&(w[E[T]]=T);return w}()[H]?"keydown":"keypress"),Q=="keypress"&&$.length&&(Q="keydown"),Q}function Z(H,$){var Q,T,k,D=[];for(Q=function(M){return M==="+"?["+"]:(M=M.replace(/\+{2}/g,"+plus")).split("+")}(H),k=0;k<Q.length;++k)T=Q[k],P[T]&&(T=P[T]),$&&$!="keypress"&&_[T]&&(T=_[T],D.push("shift")),Y(T)&&D.push(T);return{key:T,modifiers:D,action:$=z(T,D,$)}}function ie(H,$){return H!==null&&H!==A&&(H===$||ie(H.parentNode,$))}function q(H){var $=this;if(H=H||A,!($ instanceof q))return new q(H);$.target=H,$._callbacks={},$._directMap={};var Q,T={},k=!1,D=!1,M=!1;function G(K){K=K||{};var se,pe=!1;for(se in T)K[se]?pe=!0:T[se]=0;pe||(M=!1)}function ce(K,se,pe,me,Pe,ze){var je,De,Ue,J,V=[],re=pe.type;if(!$._callbacks[K])return[];for(re=="keyup"&&Y(K)&&(se=[K]),je=0;je<$._callbacks[K].length;++je)if(De=$._callbacks[K][je],(me||!De.seq||T[De.seq]==De.level)&&re==De.action&&(re=="keypress"&&!pe.metaKey&&!pe.ctrlKey||(Ue=se,J=De.modifiers,Ue.sort().join(",")===J.sort().join(",")))){var we=!me&&De.combo==Pe,ke=me&&De.seq==me&&De.level==ze;(we||ke)&&$._callbacks[K].splice(je,1),V.push(De)}return V}function fe(K,se,pe,me){$.stopCallback(se,se.target||se.srcElement,pe,me)||K(se,pe)===!1&&(function(Pe){Pe.preventDefault?Pe.preventDefault():Pe.returnValue=!1}(se),function(Pe){Pe.stopPropagation?Pe.stopPropagation():Pe.cancelBubble=!0}(se))}function ye(K){typeof K.which!="number"&&(K.which=K.keyCode);var se=L(K);se&&(K.type!="keyup"||k!==se?$.handleKey(se,function(pe){var me=[];return pe.shiftKey&&me.push("shift"),pe.altKey&&me.push("alt"),pe.ctrlKey&&me.push("ctrl"),pe.metaKey&&me.push("meta"),me}(K),K):k=!1)}function Oe(K,se,pe,me){function Pe(Ue){return function(){M=Ue,++T[K],clearTimeout(Q),Q=setTimeout(G,1e3)}}function ze(Ue){fe(pe,Ue,K),me!=="keyup"&&(k=L(Ue)),setTimeout(G,10)}T[K]=0;for(var je=0;je<se.length;++je){var De=je+1===se.length?ze:Pe(me||Z(se[je+1]).action);Ae(se[je],De,me,K,je)}}function Ae(K,se,pe,me,Pe){$._directMap[K+":"+pe]=se;var ze,je=(K=K.replace(/\s+/g," ")).split(" ");je.length>1?Oe(K,je,se,pe):(ze=Z(K,pe),$._callbacks[ze.key]=$._callbacks[ze.key]||[],ce(ze.key,ze.modifiers,{type:ze.action},me,K,Pe),$._callbacks[ze.key][me?"unshift":"push"]({callback:se,modifiers:ze.modifiers,action:ze.action,seq:me,level:Pe,combo:K}))}$._handleKey=function(K,se,pe){var me,Pe=ce(K,se,pe),ze={},je=0,De=!1;for(me=0;me<Pe.length;++me)Pe[me].seq&&(je=Math.max(je,Pe[me].level));for(me=0;me<Pe.length;++me)if(Pe[me].seq){if(Pe[me].level!=je)continue;De=!0,ze[Pe[me].seq]=1,fe(Pe[me].callback,pe,Pe[me].combo,Pe[me].seq)}else De||fe(Pe[me].callback,pe,Pe[me].combo);var Ue=pe.type=="keypress"&&D;pe.type!=M||Y(K)||Ue||G(ze),D=De&&pe.type=="keydown"},$._bindMultiple=function(K,se,pe){for(var me=0;me<K.length;++me)Ae(K[me],se,pe)},I(H,"keypress",ye),I(H,"keydown",ye),I(H,"keyup",ye)}})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)},function(c,p,i){var f=i(36),s=i(37),A=i(32),m=i(39),w=i(66);c.exports=f?Object.defineProperties:function(E,S){A(E);for(var _,P=m(S),B=w(S),I=B.length,L=0;I>L;)s.f(E,_=B[L++],P[_]);return E}},function(c,p,i){var f=i(7),s=i(35),A=i(28),m=i(33),w=f.TypeError;c.exports=function(E,S){var _,P;if(S==="string"&&A(_=E.toString)&&!m(P=s(_,E))||A(_=E.valueOf)&&!m(P=s(_,E))||S!=="string"&&A(_=E.toString)&&!m(P=s(_,E)))return P;throw w("Can't convert object to primitive value")}},function(c,p,i){var f=i(7),s=i(28),A=i(92),m=f.WeakMap;c.exports=s(m)&&/native code/.test(A(m))},function(c,p,i){var f=i(136).IteratorPrototype,s=i(54),A=i(71),m=i(73),w=i(70),E=function(){return this};c.exports=function(S,_,P,B){var I=_+" Iterator";return S.prototype=s(f,{next:A(+!B,P)}),m(S,I,!1,!0),w[I]=E,S}},function(c,p,i){var f=i(7),s=i(28),A=f.String,m=f.TypeError;c.exports=function(w){if(typeof w=="object"||s(w))return w;throw m("Can't set "+A(w)+" as a prototype")}},function(c,p,i){var f=i(16),s=i(7),A=i(15),m=i(95),w=i(44),E=i(138),S=i(114),_=i(117),P=i(28),B=i(33),I=i(18),L=i(118),Y=i(73),z=i(143);c.exports=function(Z,ie,q){var H=Z.indexOf("Map")!==-1,$=Z.indexOf("Weak")!==-1,Q=H?"set":"add",T=s[Z],k=T&&T.prototype,D=T,M={},G=function(K){var se=A(k[K]);w(k,K,K=="add"?function(pe){return se(this,pe===0?0:pe),this}:K=="delete"?function(pe){return!($&&!B(pe))&&se(this,pe===0?0:pe)}:K=="get"?function(pe){return $&&!B(pe)?void 0:se(this,pe===0?0:pe)}:K=="has"?function(pe){return!($&&!B(pe))&&se(this,pe===0?0:pe)}:function(pe,me){return se(this,pe===0?0:pe,me),this})};if(m(Z,!P(T)||!($||k.forEach&&!I(function(){new T().entries().next()}))))D=q.getConstructor(ie,Z,H,Q),E.enable();else if(m(Z,!0)){var ce=new D,fe=ce[Q]($?{}:-0,1)!=ce,ye=I(function(){ce.has(1)}),Oe=L(function(K){new T(K)}),Ae=!$&&I(function(){for(var K=new T,se=5;se--;)K[Q](se,se);return!K.has(-0)});Oe||((D=ie(function(K,se){_(K,k);var pe=z(new T,K,D);return se!=null&&S(se,pe[Q],{that:pe,AS_ENTRIES:H}),pe})).prototype=k,k.constructor=D),(ye||Ae)&&(G("delete"),G("has"),H&&G("get")),(Ae||fe)&&G(Q),$&&k.clear&&delete k.clear}return M[Z]=D,f({global:!0,forced:D!=T},M),Y(D,Z),$||q.setStrong(D,Z,H),D}},function(c,p,i){var f=i(18),s=i(33),A=i(50),m=i(175),w=Object.isExtensible,E=f(function(){});c.exports=E||m?function(S){return!!s(S)&&(!m||A(S)!="ArrayBuffer")&&(!w||w(S))}:w},function(c,p,i){var f=i(18);c.exports=f(function(){if(typeof ArrayBuffer=="function"){var s=new ArrayBuffer(8);Object.isExtensible(s)&&Object.defineProperty(s,"a",{value:8})}})},function(c,p,i){var f=i(18);c.exports=!f(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(c,p,i){var f=i(37).f,s=i(54),A=i(144),m=i(62),w=i(117),E=i(114),S=i(111),_=i(145),P=i(36),B=i(138).fastKey,I=i(56),L=I.set,Y=I.getterFor;c.exports={getConstructor:function(z,Z,ie,q){var H=z(function(D,M){w(D,$),L(D,{type:Z,index:s(null),first:void 0,last:void 0,size:0}),P||(D.size=0),M!=null&&E(M,D[q],{that:D,AS_ENTRIES:ie})}),$=H.prototype,Q=Y(Z),T=function(D,M,G){var ce,fe,ye=Q(D),Oe=k(D,M);return Oe?Oe.value=G:(ye.last=Oe={index:fe=B(M,!0),key:M,value:G,previous:ce=ye.last,next:void 0,removed:!1},ye.first||(ye.first=Oe),ce&&(ce.next=Oe),P?ye.size++:D.size++,fe!=="F"&&(ye.index[fe]=Oe)),D},k=function(D,M){var G,ce=Q(D),fe=B(M);if(fe!=="F")return ce.index[fe];for(G=ce.first;G;G=G.next)if(G.key==M)return G};return A($,{clear:function(){for(var D=Q(this),M=D.index,G=D.first;G;)G.removed=!0,G.previous&&(G.previous=G.previous.next=void 0),delete M[G.index],G=G.next;D.first=D.last=void 0,P?D.size=0:this.size=0},delete:function(D){var M=this,G=Q(M),ce=k(M,D);if(ce){var fe=ce.next,ye=ce.previous;delete G.index[ce.index],ce.removed=!0,ye&&(ye.next=fe),fe&&(fe.previous=ye),G.first==ce&&(G.first=fe),G.last==ce&&(G.last=ye),P?G.size--:M.size--}return!!ce},forEach:function(D){for(var M,G=Q(this),ce=m(D,arguments.length>1?arguments[1]:void 0);M=M?M.next:G.first;)for(ce(M.value,M.key,this);M&&M.removed;)M=M.previous},has:function(D){return!!k(this,D)}}),A($,ie?{get:function(D){var M=k(this,D);return M&&M.value},set:function(D,M){return T(this,D===0?0:D,M)}}:{add:function(D){return T(this,D=D===0?0:D,D)}}),P&&f($,"size",{get:function(){return Q(this).size}}),H},setStrong:function(z,Z,ie){var q=Z+" Iterator",H=Y(Z),$=Y(q);S(z,Z,function(Q,T){L(this,{type:q,target:Q,state:H(Q),kind:T,last:void 0})},function(){for(var Q=$(this),T=Q.kind,k=Q.last;k&&k.removed;)k=k.previous;return Q.target&&(Q.last=k=k?k.next:Q.state.first)?T=="keys"?{value:k.key,done:!1}:T=="values"?{value:k.value,done:!1}:{value:[k.key,k.value],done:!1}:(Q.target=void 0,{value:void 0,done:!0})},ie?"entries":"values",!ie,!0),_(Z)}}},function(c,p,i){var f=i(116),s=i(98);c.exports=f?{}.toString:function(){return"[object "+s(this)+"]"}},function(c,p,i){var f=i(74).forEach,s=i(120)("forEach");c.exports=s?[].forEach:function(A){return f(this,A,arguments.length>1?arguments[1]:void 0)}},function(c,p,i){var f=i(7),s=i(99),A=i(100),m=i(33),w=i(27)("species"),E=f.Array;c.exports=function(S){var _;return s(S)&&(_=S.constructor,(A(_)&&(_===E||s(_.prototype))||m(_)&&(_=_[w])===null)&&(_=void 0)),_===void 0?E:_}},function(c,p,i){var f=i(7);c.exports=f},function(c,p,i){var f=i(7),s=i(62),A=i(35),m=i(38),w=i(183),E=i(140),S=i(100),_=i(43),P=i(61),B=i(141),I=i(115),L=f.Array;c.exports=function(Y){var z=m(Y),Z=S(this),ie=arguments.length,q=ie>1?arguments[1]:void 0,H=q!==void 0;H&&(q=s(q,ie>2?arguments[2]:void 0));var $,Q,T,k,D,M,G=I(z),ce=0;if(!G||this==L&&E(G))for($=_(z),Q=Z?new this($):L($);$>ce;ce++)M=H?q(z[ce],ce):z[ce],P(Q,ce,M);else for(D=(k=B(z,G)).next,Q=Z?new this:[];!(T=A(D,k)).done;ce++)M=H?w(k,q,[T.value,ce],!0):T.value,P(Q,ce,M);return Q.length=ce,Q}},function(c,p,i){var f=i(32),s=i(142);c.exports=function(A,m,w,E){try{return E?m(f(w)[0],w[1]):m(w)}catch(S){s(A,"throw",S)}}},function(c,p,i){var f=i(32);c.exports=function(){var s=f(this),A="";return s.global&&(A+="g"),s.ignoreCase&&(A+="i"),s.multiline&&(A+="m"),s.dotAll&&(A+="s"),s.unicode&&(A+="u"),s.sticky&&(A+="y"),A}},function(c,p,i){var f=i(18),s=i(7).RegExp;c.exports=f(function(){var A=s(".","s");return!(A.dotAll&&A.exec(`
- `)&&A.flags==="s")})},function(c,p,i){var f=i(18),s=i(7).RegExp;c.exports=f(function(){var A=s("(?<a>b)","g");return A.exec("b").groups.a!=="b"||"b".replace(A,"$<a>c")!=="bc"})},function(c,p,i){var f=i(16),s=i(15),A=i(55),m=i(38),w=i(43),E=i(40),S=i(18),_=i(188),P=i(120),B=i(189),I=i(190),L=i(65),Y=i(191),z=[],Z=s(z.sort),ie=s(z.push),q=S(function(){z.sort(void 0)}),H=S(function(){z.sort(null)}),$=P("sort"),Q=!S(function(){if(L)return L<70;if(!(B&&B>3)){if(I)return!0;if(Y)return Y<603;var T,k,D,M,G="";for(T=65;T<76;T++){switch(k=String.fromCharCode(T),T){case 66:case 69:case 70:case 72:D=3;break;case 68:case 71:D=4;break;default:D=2}for(M=0;M<47;M++)z.push({k:k+M,v:D})}for(z.sort(function(ce,fe){return fe.v-ce.v}),M=0;M<z.length;M++)k=z[M].k.charAt(0),G.charAt(G.length-1)!==k&&(G+=k);return G!=="DGBEFHACIJK"}});f({target:"Array",proto:!0,forced:q||!H||!$||!Q},{sort:function(T){T!==void 0&&A(T);var k=m(this);if(Q)return T===void 0?Z(k):Z(k,T);var D,M,G=[],ce=w(k);for(M=0;M<ce;M++)M in k&&ie(G,k[M]);for(_(G,function(fe){return function(ye,Oe){return Oe===void 0?-1:ye===void 0?1:fe!==void 0?+fe(ye,Oe)||0:E(ye)>E(Oe)?1:-1}}(T)),D=G.length,M=0;M<D;)k[M]=G[M++];for(;M<ce;)delete k[M++];return k}})},function(c,p,i){var f=i(113),s=Math.floor,A=function(E,S){var _=E.length,P=s(_/2);return _<8?m(E,S):w(E,A(f(E,0,P),S),A(f(E,P),S),S)},m=function(E,S){for(var _,P,B=E.length,I=1;I<B;){for(P=I,_=E[I];P&&S(E[P-1],_)>0;)E[P]=E[--P];P!==I++&&(E[P]=_)}return E},w=function(E,S,_,P){for(var B=S.length,I=_.length,L=0,Y=0;L<B||Y<I;)E[L+Y]=L<B&&Y<I?P(S[L],_[Y])<=0?S[L++]:_[Y++]:L<B?S[L++]:_[Y++];return E};c.exports=A},function(c,p,i){var f=i(53).match(/firefox\/(\d+)/i);c.exports=!!f&&+f[1]},function(c,p,i){var f=i(53);c.exports=/MSIE|Trident/.test(f)},function(c,p,i){var f=i(53).match(/AppleWebKit\/(\d+)\./);c.exports=!!f&&+f[1]},function(c,p,i){var f=i(16),s=i(74).find,A=i(83),m="find",w=!0;m in[]&&Array(1).find(function(){w=!1}),f({target:"Array",proto:!0,forced:w},{find:function(E){return s(this,E,arguments.length>1?arguments[1]:void 0)}}),A(m)},function(c,p,i){var f=i(7),s=i(154),A=f.TypeError;c.exports=function(m){if(s(m))throw A("The method doesn't accept regular expressions");return m}},function(c,p,i){var f=i(27)("match");c.exports=function(s){var A=/./;try{"/./"[s](A)}catch{try{return A[f]=!1,"/./"[s](A)}catch{}}return!1}},function(c,p,i){var f=i(94).PROPER,s=i(18),A=i(160);c.exports=function(m){return s(function(){return!!A[m]()||"\u200B\x85\u180E"[m]()!=="\u200B\x85\u180E"||f&&A[m].name!==m})}},function(c,p,i){var f=i(15);c.exports=f(1 .valueOf)},function(c,p,i){var f=i(15),s=i(38),A=Math.floor,m=f("".charAt),w=f("".replace),E=f("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,_=/\$([$&'`]|\d{1,2})/g;c.exports=function(P,B,I,L,Y,z){var Z=I+P.length,ie=L.length,q=_;return Y!==void 0&&(Y=s(Y),q=S),w(z,q,function(H,$){var Q;switch(m($,0)){case"$":return"$";case"&":return P;case"`":return E(B,0,I);case"'":return E(B,Z);case"<":Q=Y[E($,1,-1)];break;default:var T=+$;if(T===0)return H;if(T>ie){var k=A(T/10);return k===0?H:k<=ie?L[k-1]===void 0?m($,1):L[k-1]+m($,1):H}Q=L[T-1]}return Q===void 0?"":Q})}},function(c,p,i){var f=i(7),s=i(15),A=i(55),m=i(33),w=i(34),E=i(101),S=f.Function,_=s([].concat),P=s([].join),B={},I=function(L,Y,z){if(!w(B,Y)){for(var Z=[],ie=0;ie<Y;ie++)Z[ie]="a["+ie+"]";B[Y]=S("C,a","return new C("+P(Z,",")+")")}return B[Y](L,z)};c.exports=S.bind||function(L){var Y=A(this),z=Y.prototype,Z=E(arguments,1),ie=function(){var q=_(Z,E(arguments));return this instanceof ie?I(Y,q.length,q):Y.apply(L,q)};return m(z)&&(ie.prototype=z),ie}},function(c,p,i){var f=i(34);c.exports=function(s){return s!==void 0&&(f(s,"value")||f(s,"writable"))}},function(c,p,i){var f=i(36),s=i(15),A=i(35),m=i(18),w=i(66),E=i(112),S=i(93),_=i(38),P=i(81),B=Object.assign,I=Object.defineProperty,L=s([].concat);c.exports=!B||m(function(){if(f&&B({b:1},B(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var Y={},z={},Z=Symbol(),ie="abcdefghijklmnopqrst";return Y[Z]=7,ie.split("").forEach(function(q){z[q]=q}),B({},Y)[Z]!=7||w(B({},z)).join("")!=ie})?function(Y,z){for(var Z=_(Y),ie=arguments.length,q=1,H=E.f,$=S.f;ie>q;)for(var Q,T=P(arguments[q++]),k=H?L(w(T),H(T)):w(T),D=k.length,M=0;D>M;)Q=k[M++],f&&!A($,T,Q)||(Z[Q]=T[Q]);return Z}:B},function(c,p,i){var f=i(15),s=i(45),A=i(40),m=/"/g,w=f("".replace);c.exports=function(E,S,_,P){var B=A(s(E)),I="<"+S;return _!==""&&(I+=" "+_+'="'+w(A(P),m,""")+'"'),I+">"+B+"</"+S+">"}},function(c,p,i){var f=i(18);c.exports=function(s){return f(function(){var A=""[s]('"');return A!==A.toLowerCase()||A.split('"').length>3})}},function(c,p,i){var f=i(16),s=Math.hypot,A=Math.abs,m=Math.sqrt;f({target:"Math",stat:!0,forced:!!s&&s(1/0,NaN)!==1/0},{hypot:function(w,E){for(var S,_,P=0,B=0,I=arguments.length,L=0;B<I;)L<(S=A(arguments[B++]))?(P=P*(_=L/S)*_+1,L=S):P+=S>0?(_=S/L)*_:S;return L===1/0?1/0:L*m(P)}})},function(c,p,i){var f,s,A,m,w=i(16),E=i(64),S=i(7),_=i(46),P=i(35),B=i(205),I=i(44),L=i(144),Y=i(97),z=i(73),Z=i(145),ie=i(55),q=i(28),H=i(33),$=i(117),Q=i(92),T=i(114),k=i(118),D=i(156),M=i(162).set,G=i(206),ce=i(209),fe=i(210),ye=i(164),Oe=i(211),Ae=i(56),K=i(95),se=i(27),pe=i(212),me=i(126),Pe=i(65),ze=se("species"),je="Promise",De=Ae.getterFor(je),Ue=Ae.set,J=Ae.getterFor(je),V=B&&B.prototype,re=B,we=V,ke=S.TypeError,Ee=S.document,Xe=S.process,$e=ye.f,Ke=$e,Ve=!!(Ee&&Ee.createEvent&&S.dispatchEvent),be=q(S.PromiseRejectionEvent),Qe="unhandledrejection",ee=!1,Te=K(je,function(){var W=Q(re),le=W!==String(re);if(!le&&Pe===66||E&&!we.finally)return!0;if(Pe>=51&&/native code/.test(W))return!1;var Ce=new re(function(Ye){Ye(1)}),Ne=function(Ye){Ye(function(){},function(){})};return(Ce.constructor={})[ze]=Ne,!(ee=Ce.then(function(){})instanceof Ne)||!le&&pe&&!be}),it=Te||!k(function(W){re.all(W).catch(function(){})}),gt=function(W){var le;return!(!H(W)||!q(le=W.then))&&le},rt=function(W,le){if(!W.notified){W.notified=!0;var Ce=W.reactions;G(function(){for(var Ne=W.value,Ye=W.state==1,st=0;Ce.length>st;){var zt,Ut,Dt,Nt=Ce[st++],Ie=Ye?Nt.ok:Nt.fail,We=Nt.resolve,qe=Nt.reject,et=Nt.domain;try{Ie?(Ye||(W.rejection===2&&ot(W),W.rejection=1),Ie===!0?zt=Ne:(et&&et.enter(),zt=Ie(Ne),et&&(et.exit(),Dt=!0)),zt===Nt.promise?qe(ke("Promise-chain cycle")):(Ut=gt(zt))?P(Ut,zt,We,qe):We(zt)):qe(Ne)}catch(mt){et&&!Dt&&et.exit(),qe(mt)}}W.reactions=[],W.notified=!1,le&&!W.rejection&&Et(W)})}},ft=function(W,le,Ce){var Ne,Ye;Ve?((Ne=Ee.createEvent("Event")).promise=le,Ne.reason=Ce,Ne.initEvent(W,!1,!0),S.dispatchEvent(Ne)):Ne={promise:le,reason:Ce},!be&&(Ye=S["on"+W])?Ye(Ne):W===Qe&&fe("Unhandled promise rejection",Ce)},Et=function(W){P(M,S,function(){var le,Ce=W.facade,Ne=W.value;if(xt(W)&&(le=Oe(function(){me?Xe.emit("unhandledRejection",Ne,Ce):ft(Qe,Ce,Ne)}),W.rejection=me||xt(W)?2:1,le.error))throw le.value})},xt=function(W){return W.rejection!==1&&!W.parent},ot=function(W){P(M,S,function(){var le=W.facade;me?Xe.emit("rejectionHandled",le):ft("rejectionhandled",le,W.value)})},Pt=function(W,le,Ce){return function(Ne){W(le,Ne,Ce)}},U=function(W,le,Ce){W.done||(W.done=!0,Ce&&(W=Ce),W.value=le,W.state=2,rt(W,!0))},oe=function(W,le,Ce){if(!W.done){W.done=!0,Ce&&(W=Ce);try{if(W.facade===le)throw ke("Promise can't be resolved itself");var Ne=gt(le);Ne?G(function(){var Ye={done:!1};try{P(Ne,le,Pt(oe,Ye,W),Pt(U,Ye,W))}catch(st){U(Ye,st,W)}}):(W.value=le,W.state=1,rt(W,!1))}catch(Ye){U({done:!1},Ye,W)}}};if(Te&&(we=(re=function(W){$(this,we),ie(W),P(f,this);var le=De(this);try{W(Pt(oe,le),Pt(U,le))}catch(Ce){U(le,Ce)}}).prototype,(f=function(W){Ue(this,{type:je,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=L(we,{then:function(W,le){var Ce=J(this),Ne=Ce.reactions,Ye=$e(D(this,re));return Ye.ok=!q(W)||W,Ye.fail=q(le)&&le,Ye.domain=me?Xe.domain:void 0,Ce.parent=!0,Ne[Ne.length]=Ye,Ce.state!=0&&rt(Ce,!1),Ye.promise},catch:function(W){return this.then(void 0,W)}}),s=function(){var W=new f,le=De(W);this.promise=W,this.resolve=Pt(oe,le),this.reject=Pt(U,le)},ye.f=$e=function(W){return W===re||W===A?new s(W):Ke(W)},!E&&q(B)&&V!==Object.prototype)){m=V.then,ee||(I(V,"then",function(W,le){var Ce=this;return new re(function(Ne,Ye){P(m,Ce,Ne,Ye)}).then(W,le)},{unsafe:!0}),I(V,"catch",we.catch,{unsafe:!0}));try{delete V.constructor}catch{}Y&&Y(V,we)}w({global:!0,wrap:!0,forced:Te},{Promise:re}),z(re,je,!1,!0),Z(je),A=_(je),w({target:je,stat:!0,forced:Te},{reject:function(W){var le=$e(this);return P(le.reject,void 0,W),le.promise}}),w({target:je,stat:!0,forced:E||Te},{resolve:function(W){return ce(E&&this===A?re:this,W)}}),w({target:je,stat:!0,forced:it},{all:function(W){var le=this,Ce=$e(le),Ne=Ce.resolve,Ye=Ce.reject,st=Oe(function(){var zt=ie(le.resolve),Ut=[],Dt=0,Nt=1;T(W,function(Ie){var We=Dt++,qe=!1;Nt++,P(zt,le,Ie).then(function(et){qe||(qe=!0,Ut[We]=et,--Nt||Ne(Ut))},Ye)}),--Nt||Ne(Ut)});return st.error&&Ye(st.value),Ce.promise},race:function(W){var le=this,Ce=$e(le),Ne=Ce.reject,Ye=Oe(function(){var st=ie(le.resolve);T(W,function(zt){P(st,le,zt).then(Ce.resolve,Ne)})});return Ye.error&&Ne(Ye.value),Ce.promise}})},function(c,p,i){var f=i(7);c.exports=f.Promise},function(c,p,i){var f,s,A,m,w,E,S,_,P=i(7),B=i(62),I=i(51).f,L=i(162).set,Y=i(163),z=i(207),Z=i(208),ie=i(126),q=P.MutationObserver||P.WebKitMutationObserver,H=P.document,$=P.process,Q=P.Promise,T=I(P,"queueMicrotask"),k=T&&T.value;k||(f=function(){var D,M;for(ie&&(D=$.domain)&&D.exit();s;){M=s.fn,s=s.next;try{M()}catch(G){throw s?m():A=void 0,G}}A=void 0,D&&D.enter()},Y||ie||Z||!q||!H?!z&&Q&&Q.resolve?((S=Q.resolve(void 0)).constructor=Q,_=B(S.then,S),m=function(){_(f)}):ie?m=function(){$.nextTick(f)}:(L=B(L,P),m=function(){L(f)}):(w=!0,E=H.createTextNode(""),new q(f).observe(E,{characterData:!0}),m=function(){E.data=w=!w})),c.exports=k||function(D){var M={fn:D,next:void 0};A&&(A.next=M),s||(s=M,m()),A=M}},function(c,p,i){var f=i(53),s=i(7);c.exports=/ipad|iphone|ipod/i.test(f)&&s.Pebble!==void 0},function(c,p,i){var f=i(53);c.exports=/web0s(?!.*chrome)/i.test(f)},function(c,p,i){var f=i(32),s=i(33),A=i(164);c.exports=function(m,w){if(f(m),s(w)&&w.constructor===m)return w;var E=A.f(m);return(0,E.resolve)(w),E.promise}},function(c,p,i){var f=i(7);c.exports=function(s,A){var m=f.console;m&&m.error&&(arguments.length==1?m.error(s):m.error(s,A))}},function(c,p){c.exports=function(i){try{return{error:!1,value:i()}}catch(f){return{error:!0,value:f}}}},function(c,p){c.exports=typeof window=="object"},function(c,p,i){var f=i(36),s=i(15),A=i(66),m=i(39),w=s(i(93).f),E=s([].push),S=function(_){return function(P){for(var B,I=m(P),L=A(I),Y=L.length,z=0,Z=[];Y>z;)B=L[z++],f&&!w(I,B)||E(Z,_?[B,I[B]]:I[B]);return Z}};c.exports={entries:S(!0),values:S(!1)}},function(c,p,i){var f=i(38),s=i(67),A=i(43);c.exports=function(m){for(var w=f(this),E=A(w),S=arguments.length,_=s(S>1?arguments[1]:void 0,E),P=S>2?arguments[2]:void 0,B=P===void 0?E:s(P,E);B>_;)w[_++]=m;return w}},function(c,p,i){i.r(p),i.d(p,"observer",function(){return Fn}),i.d(p,"LogicFlow",function(){return ef}),i.d(p,"h",function(){return ee.g}),i.d(p,"LogicFlowUtil",function(){return f}),i.d(p,"BaseNode",function(){return vr}),i.d(p,"RectNode",function(){return Xs}),i.d(p,"CircleNode",function(){return qs}),i.d(p,"PolygonNode",function(){return rl}),i.d(p,"DiamondNode",function(){return ul}),i.d(p,"EllipseNode",function(){return pl}),i.d(p,"TextNode",function(){return yl}),i.d(p,"HtmlNode",function(){return bl}),i.d(p,"BaseEdge",function(){return gi}),i.d(p,"LineEdge",function(){return Ml}),i.d(p,"PolylineEdge",function(){return Rl}),i.d(p,"BezierEdge",function(){return Ql}),i.d(p,"Arrow",function(){return bw}),i.d(p,"BaseEdgeModel",function(){return pc}),i.d(p,"BezierEdgeModel",function(){return rs}),i.d(p,"LineEdgeModel",function(){return Ac}),i.d(p,"PolylineEdgeModel",function(){return wc}),i.d(p,"BaseNodeModel",function(){return Ar}),i.d(p,"CircleNodeModel",function(){return ss}),i.d(p,"DiamondNodeModel",function(){return hs}),i.d(p,"EllipseNodeModel",function(){return vs}),i.d(p,"PolygonNodeModel",function(){return xs}),i.d(p,"RectNodeModel",function(){return ks}),i.d(p,"TextNodeModel",function(){return Ns}),i.d(p,"HtmlNodeModel",function(){return Ts}),i.d(p,"EditConfigModel",function(){return Qf}),i.d(p,"GraphModel",function(){return kd}),i.d(p,"SnaplineModel",function(){return cy}),i.d(p,"Keyboard",function(){return Ky}),i.d(p,"get",function(){return $d}),i.d(p,"defaults",function(){return th});var f={};i.r(f),i.d(f,"createUuid",function(){return Xr}),i.d(f,"refreshGraphId",function(){return _v}),i.d(f,"createDrag",function(){return kc}),i.d(f,"StepDrag",function(){return Jr});var s=i(0),A=i(10);if(!A.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!s.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var m=i(42),w=Object(m.b)("observerBatching");function E(e){e()}var S=!1;function _(){return S}function P(e){return Object(s.t)(e)}var B,I=1e4,L=new Set;function Y(){B===void 0&&(B=setTimeout(z,1e4))}function z(){B=void 0;var e=Date.now();L.forEach(function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,L.delete(t))}),L.size>0&&Y()}var Z=!1,ie=[],q={};function H(e){return"observer"+e}function $(e,t,n){t===void 0&&(t="observed"),n===void 0&&(n=q),_();var r,a=function(b){return function(){Z?ie.push(b):b()}}((n.useForceUpdate||m.d)()),o=A.d.useRef(null);if(!o.current){var u=new s.c(H(t),function(){l.mounted?a():(u.dispose(),o.current=null)}),l=function(b){return{cleanAt:Date.now()+I,reaction:b}}(u);o.current=l,r=o,L.add(r),Y()}var d=o.current.reaction;return A.d.useDebugValue(d,P),A.d.useEffect(function(){var b;return b=o,L.delete(b),o.current?o.current.mounted=!0:(o.current={reaction:new s.c(H(t),function(){a()}),cleanAt:1/0},a()),function(){o.current.reaction.dispose(),o.current=null}},[]),function(b){Z=!0,ie=[];try{var O=b();Z=!1;var j=ie.length>0?ie:void 0;return A.d.useLayoutEffect(function(){j&&j.forEach(function(C){return C()})},[j]),O}finally{Z=!1}}(function(){var b,O;if(d.track(function(){try{b=e()}catch(j){O=j}}),O)throw O;return b})}var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Q.apply(this,arguments)};function T(e,t){var n,r,a,o=Q({forwardRef:!1},t),u=e.displayName||e.name,l=function(d,b){return $(function(){return e(d,b)},u)};return l.displayName=u,n=o.forwardRef?Object(A.f)(Object(A.e)(l)):Object(A.f)(l),r=e,a=n,Object.keys(r).forEach(function(d){k[d]||Object.defineProperty(a,d,Object.getOwnPropertyDescriptor(r,d))}),n.displayName=u,n}var k={$$typeof:!0,render:!0,compare:!0,type:!0};function D(e){var t=e.children,n=e.render,r=t||n;return typeof r!="function"?null:$(r)}function M(e,t,n,r,a){var o=t==="children"?"render":"children",u=typeof e[t]=="function",l=typeof e[o]=="function";return u&&l?new Error("MobX Observer: Do not use children and render in the same time in`"+n):u||l?null:new Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}D.propTypes={children:M,render:M},D.displayName="Observer";var G;(G=A.g)||(G=E),Object(s.n)({reactionScheduler:G}),Object(m.a)()[w]=!0;var ce=0,fe={};function ye(e){return fe[e]||(fe[e]=function(t){if(typeof Symbol=="function")return Symbol(t);var n="__$mobx-react "+t+" ("+ce+")";return ce++,n}(e)),fe[e]}function Oe(e,t){if(Ae(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!Object.hasOwnProperty.call(t,n[a])||!Ae(e[n[a]],t[n[a]]))return!1;return!0}function Ae(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function K(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var se=ye("patchMixins"),pe=ye("patchedDefinition");function me(e,t){for(var n=this,r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];t.locks++;try{var u;return e!=null&&(u=e.apply(this,a)),u}finally{t.locks--,t.locks===0&&t.methods.forEach(function(l){l.apply(n,a)})}}function Pe(e,t){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];me.call.apply(me,[this,e,t].concat(r))}}function ze(e,t,n){var r=function(l,d){var b=l[se]=l[se]||{},O=b[d]=b[d]||{};return O.locks=O.locks||0,O.methods=O.methods||[],O}(e,t);r.methods.indexOf(n)<0&&r.methods.push(n);var a=Object.getOwnPropertyDescriptor(e,t);if(!a||!a[pe]){var o=e[t],u=je(e,t,a?a.enumerable:void 0,r,o);Object.defineProperty(e,t,u)}}function je(e,t,n,r,a){var o,u=Pe(a,r);return(o={})[pe]=!0,o.get=function(){return u},o.set=function(l){if(this===e)u=Pe(l,r);else{var d=je(this,t,n,r,l);Object.defineProperty(this,t,d)}},o.configurable=!0,o.enumerable=n,o}var De=s.a||"$mobx",Ue=ye("isMobXReactObserver"),J=ye("isUnmounted"),V=ye("skipRender"),re=ye("isForcingUpdate");function we(e){var t=e.prototype;if(e[Ue]?ke(t):e[Ue]=!0,t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==A.b)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==Xe)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=Xe;$e(t,"props"),$e(t,"state");var n=t.render;return t.render=function(){return Ee.call(this,n)},ze(t,"componentWillUnmount",function(){var r;(r=this.render[De])===null||r===void 0||r.dispose(),this[J]=!0,!this.render[De]&&ke(this)}),e}function ke(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function Ee(e){var t=this;K(this,V,!1),K(this,re,!1);var n=ke(this),r=e.bind(this),a=!1,o=new s.c(n+".render()",function(){if(!a&&(a=!0,t[J]!==!0)){var l=!0;try{K(t,re,!0),t[V]||A.a.prototype.forceUpdate.call(t),l=!1}finally{K(t,re,!1),l&&o.dispose()}}});function u(){a=!1;var l=void 0,d=void 0;if(o.track(function(){try{d=Object(s.d)(!1,r)}catch(b){l=b}}),l)throw l;return d}return o.reactComponent=this,u[De]=o,this.render=u,u.call(this)}function Xe(e,t){return this.state!==t||!Oe(this.props,e)}function $e(e,t){var n=ye("reactProp_"+t+"_valueHolder"),r=ye("reactProp_"+t+"_atomHolder");function a(){return this[r]||K(this,r,Object(s.o)("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var o=!1;return s.f&&s.e&&(o=Object(s.f)(!0)),a.call(this).reportObserved(),s.f&&s.e&&Object(s.e)(o),this[n]},set:function(o){this[re]||Oe(this[n],o)?K(this,n,o):(K(this,n,o),K(this,V,!0),a.call(this).reportChanged(),K(this,V,!1))}})}var Ke=typeof Symbol=="function"&&Symbol.for,Ve=Ke?Symbol.for("react.forward_ref"):typeof A.e=="function"&&Object(A.e)(function(e){return null}).$$typeof,be=Ke?Symbol.for("react.memo"):typeof A.f=="function"&&Object(A.f)(function(e){return null}).$$typeof;function Qe(e){if(e.isMobxInjector,be&&e.$$typeof===be)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(Ve&&e.$$typeof===Ve){var t=e.render;if(typeof t!="function")throw new Error("render property of ForwardRef was not a function");return Object(A.e)(function(){var n=arguments;return Object(A.c)(D,null,function(){return t.apply(void 0,n)})})}return typeof e!="function"||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(A.a,e)?we(e):T(e)}if(!A.a)throw new Error("mobx-react requires React to be available");if(!s.C)throw new Error("mobx-react requires mobx to be available");var ee=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);var Te=function(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},it=function(){this.__data__=[],this.size=0},gt=function(e,t){return e===t||e!=e&&t!=t},rt=function(e,t){for(var n=e.length;n--;)if(gt(e[n][0],t))return n;return-1},ft=Array.prototype.splice,Et=function(e){var t=this.__data__,n=rt(t,e);return!(n<0)&&(n==t.length-1?t.pop():ft.call(t,n,1),--this.size,!0)},xt=function(e){var t=this.__data__,n=rt(t,e);return n<0?void 0:t[n][1]},ot=function(e){return rt(this.__data__,e)>-1},Pt=function(e,t){var n=this.__data__,r=rt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}U.prototype.clear=it,U.prototype.delete=Et,U.prototype.get=xt,U.prototype.has=ot,U.prototype.set=Pt;var oe=U,W=function(){this.__data__=new oe,this.size=0},le=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce=function(e){return this.__data__.get(e)},Ne=function(e){return this.__data__.has(e)},Ye=i(30),st=Ye.a.Symbol,zt=Object.prototype,Ut=zt.hasOwnProperty,Dt=zt.toString,Nt=st?st.toStringTag:void 0,Ie=function(e){var t=Ut.call(e,Nt),n=e[Nt];try{e[Nt]=void 0;var r=!0}catch{}var a=Dt.call(e);return r&&(t?e[Nt]=n:delete e[Nt]),a},We=Object.prototype.toString,qe=function(e){return We.call(e)},et=st?st.toStringTag:void 0,mt=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":et&&et in Object(e)?Ie(e):qe(e)},kt=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},ur,Gn=function(e){if(!kt(e))return!1;var t=mt(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Yn=Ye.a["__core-js_shared__"],Lr=(ur=/[^.]+$/.exec(Yn&&Yn.keys&&Yn.keys.IE_PROTO||""))?"Symbol(src)_1."+ur:"",Cu=function(e){return!!Lr&&Lr in e},Yo=Function.prototype.toString,xn=function(e){if(e!=null){try{return Yo.call(e)}catch{}try{return e+""}catch{}}return""},Pi=/^\[object .+?Constructor\]$/,Ge=Function.prototype,Nu=Object.prototype,Di=Ge.toString,Ci=Nu.hasOwnProperty,yn=RegExp("^"+Di.call(Ci).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gn=function(e){return!(!kt(e)||Cu(e))&&(Gn(e)?yn:Pi).test(xn(e))},Ni=function(e,t){return e==null?void 0:e[t]},Un=function(e,t){var n=Ni(e,t);return gn(n)?n:void 0},xr=Un(Ye.a,"Map"),Nn=Un(Object,"create"),Uo=function(){this.__data__=Nn?Nn(null):{},this.size=0},Mi=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Mu=Object.prototype.hasOwnProperty,io=function(e){var t=this.__data__;if(Nn){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return Mu.call(t,e)?t[e]:void 0},Bu=Object.prototype.hasOwnProperty,Bi=function(e){var t=this.__data__;return Nn?t[e]!==void 0:Bu.call(t,e)},Tu=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Nn&&t===void 0?"__lodash_hash_undefined__":t,this};function cr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}cr.prototype.clear=Uo,cr.prototype.delete=Mi,cr.prototype.get=io,cr.prototype.has=Bi,cr.prototype.set=Tu;var Ti=cr,Hn=function(){this.size=0,this.__data__={hash:new Ti,map:new(xr||oe),string:new Ti}},Iu=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},ao=function(e,t){var n=e.__data__;return Iu(t)?n[typeof t=="string"?"string":"hash"]:n.map},Ho=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Vo=function(e){return ao(this,e).get(e)},Ru=function(e){return ao(this,e).has(e)},Ii=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function _r(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_r.prototype.clear=Hn,_r.prototype.delete=Ho,_r.prototype.get=Vo,_r.prototype.has=Ru,_r.prototype.set=Ii;var jr=_r,Ri=function(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!xr||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jr(r)}return n.set(e,t),this.size=n.size,this};function Sr(e){var t=this.__data__=new oe(e);this.size=t.size}Sr.prototype.clear=W,Sr.prototype.delete=le,Sr.prototype.get=Ce,Sr.prototype.has=Ne,Sr.prototype.set=Ri;var Vn=Sr,zi=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Li=function(e){return this.__data__.has(e)};function Qr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new jr;++t<n;)this.add(e[t])}Qr.prototype.add=Qr.prototype.push=zi,Qr.prototype.has=Li;var Qi=Qr,zu=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Fi=function(e,t){return e.has(t)},Gi=function(e,t,n,r,a,o){var u=1&n,l=e.length,d=t.length;if(l!=d&&!(u&&d>l))return!1;var b=o.get(e),O=o.get(t);if(b&&O)return b==t&&O==e;var j=-1,C=!0,R=2&n?new Qi:void 0;for(o.set(e,t),o.set(t,e);++j<l;){var X=e[j],te=t[j];if(r)var ue=u?r(te,X,j,t,e,o):r(X,te,j,e,t,o);if(ue!==void 0){if(ue)continue;C=!1;break}if(R){if(!zu(t,function(ae,ge){if(!Fi(R,ge)&&(X===ae||a(X,ae,n,r,o)))return R.push(ge)})){C=!1;break}}else if(X!==te&&!a(X,te,n,r,o)){C=!1;break}}return o.delete(e),o.delete(t),C},Fr=Ye.a.Uint8Array,Yi=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n},Lu=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n},Ui=st?st.prototype:void 0,Wo=Ui?Ui.valueOf:void 0,Gr=function(e,t,n,r,a,o,u){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Fr(e),new Fr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return gt(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Yi;case"[object Set]":var d=1&r;if(l||(l=Lu),e.size!=t.size&&!d)return!1;var b=u.get(e);if(b)return b==t;r|=2,u.set(e,t);var O=Gi(l(e),l(t),r,a,o,u);return u.delete(e),O;case"[object Symbol]":if(Wo)return Wo.call(e)==Wo.call(t)}return!1},Wn=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Xt=Array.isArray,Hi=function(e,t,n){var r=t(e);return Xt(e)?r:Wn(r,n(e))},Vi=function(e,t){for(var n=-1,r=e==null?0:e.length,a=0,o=[];++n<r;){var u=e[n];t(u,n,e)&&(o[a++]=u)}return o},Wi=function(){return[]},Qu=Object.prototype.propertyIsEnumerable,sr=Object.getOwnPropertySymbols,_n=sr?function(e){return e==null?[]:(e=Object(e),Vi(sr(e),function(t){return Qu.call(e,t)}))}:Wi,Fu=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},jn=function(e){return e!=null&&typeof e=="object"},An=function(e){return jn(e)&&mt(e)=="[object Arguments]"},Xi=Object.prototype,Ji=Xi.hasOwnProperty,Gu=Xi.propertyIsEnumerable,uo=An(function(){return arguments}())?An:function(e){return jn(e)&&Ji.call(e,"callee")&&!Gu.call(e,"callee")},Xn=uo,Yr=i(48),Yu=/^(?:0|[1-9]\d*)$/,rn=function(e,t){var n=typeof e;return!!(t=t==null?9007199254740991:t)&&(n=="number"||n!="symbol"&&Yu.test(e))&&e>-1&&e%1==0&&e<t},lr=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},dt={};dt["[object Float32Array]"]=dt["[object Float64Array]"]=dt["[object Int8Array]"]=dt["[object Int16Array]"]=dt["[object Int32Array]"]=dt["[object Uint8Array]"]=dt["[object Uint8ClampedArray]"]=dt["[object Uint16Array]"]=dt["[object Uint32Array]"]=!0,dt["[object Arguments]"]=dt["[object Array]"]=dt["[object ArrayBuffer]"]=dt["[object Boolean]"]=dt["[object DataView]"]=dt["[object Date]"]=dt["[object Error]"]=dt["[object Function]"]=dt["[object Map]"]=dt["[object Number]"]=dt["[object Object]"]=dt["[object RegExp]"]=dt["[object Set]"]=dt["[object String]"]=dt["[object WeakMap]"]=!1;var vn=function(e){return jn(e)&&lr(e.length)&&!!dt[mt(e)]},fr=function(e){return function(t){return e(t)}},Ht=i(49),Zi=Ht.a&&Ht.a.isTypedArray,Xo=Zi?fr(Zi):vn,Ki=Object.prototype.hasOwnProperty,Sn=function(e,t){var n=Xt(e),r=!n&&Xn(e),a=!n&&!r&&Object(Yr.a)(e),o=!n&&!r&&!a&&Xo(e),u=n||r||a||o,l=u?Fu(e.length,String):[],d=l.length;for(var b in e)!t&&!Ki.call(e,b)||u&&(b=="length"||a&&(b=="offset"||b=="parent")||o&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||rn(b,d))||l.push(b);return l},qi=Object.prototype,co=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||qi)},kn=function(e,t){return function(n){return e(t(n))}},$i=kn(Object.keys,Object),Uu=Object.prototype.hasOwnProperty,Jo=function(e){if(!co(e))return $i(e);var t=[];for(var n in Object(e))Uu.call(e,n)&&n!="constructor"&&t.push(n);return t},Mt=function(e){return e!=null&&lr(e.length)&&!Gn(e)},kr=function(e){return Mt(e)?Sn(e):Jo(e)},so=function(e){return Hi(e,kr,_n)},pn=Object.prototype.hasOwnProperty,ea=function(e,t,n,r,a,o){var u=1&n,l=so(e),d=l.length;if(d!=so(t).length&&!u)return!1;for(var b=d;b--;){var O=l[b];if(!(u?O in t:pn.call(t,O)))return!1}var j=o.get(e),C=o.get(t);if(j&&C)return j==t&&C==e;var R=!0;o.set(e,t),o.set(t,e);for(var X=u;++b<d;){var te=e[O=l[b]],ue=t[O];if(r)var ae=u?r(ue,te,O,t,e,o):r(te,ue,O,e,t,o);if(!(ae===void 0?te===ue||a(te,ue,n,r,o):ae)){R=!1;break}X||(X=O=="constructor")}if(R&&!X){var ge=e.constructor,ve=t.constructor;ge==ve||!("constructor"in e)||!("constructor"in t)||typeof ge=="function"&&ge instanceof ge&&typeof ve=="function"&&ve instanceof ve||(R=!1)}return o.delete(e),o.delete(t),R},Ur=Un(Ye.a,"DataView"),lo=Un(Ye.a,"Promise"),fo=Un(Ye.a,"Set"),po=Un(Ye.a,"WeakMap"),ta="[object Map]",dn="[object Promise]",bn="[object Set]",Pr="[object WeakMap]",Zo="[object DataView]",Ko=xn(Ur),qo=xn(xr),na=xn(lo),Hu=xn(fo),ho=xn(po),pr=mt;(Ur&&pr(new Ur(new ArrayBuffer(1)))!=Zo||xr&&pr(new xr)!=ta||lo&&pr(lo.resolve())!=dn||fo&&pr(new fo)!=bn||po&&pr(new po)!=Pr)&&(pr=function(e){var t=mt(e),n=t=="[object Object]"?e.constructor:void 0,r=n?xn(n):"";if(r)switch(r){case Ko:return Zo;case qo:return ta;case na:return dn;case Hu:return bn;case ho:return Pr}return t});var h=pr,y="[object Arguments]",x="[object Array]",N="[object Object]",F=Object.prototype.hasOwnProperty,ne=function(e,t,n,r,a,o){var u=Xt(e),l=Xt(t),d=u?x:h(e),b=l?x:h(t),O=(d=d==y?N:d)==N,j=(b=b==y?N:b)==N,C=d==b;if(C&&Object(Yr.a)(e)){if(!Object(Yr.a)(t))return!1;u=!0,O=!1}if(C&&!O)return o||(o=new Vn),u||Xo(e)?Gi(e,t,n,r,a,o):Gr(e,t,d,n,r,a,o);if(!(1&n)){var R=O&&F.call(e,"__wrapped__"),X=j&&F.call(t,"__wrapped__");if(R||X){var te=R?e.value():e,ue=X?t.value():t;return o||(o=new Vn),a(te,ue,n,r,o)}}return!!C&&(o||(o=new Vn),ea(e,t,n,r,a,o))},he=function e(t,n,r,a,o){return t===n||(t==null||n==null||!jn(t)&&!jn(n)?t!=t&&n!=n:ne(t,n,r,a,e,o))},Se=function(e,t,n,r){var a=n.length,o=a,u=!r;if(e==null)return!o;for(e=Object(e);a--;){var l=n[a];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<o;){var d=(l=n[a])[0],b=e[d],O=l[1];if(u&&l[2]){if(b===void 0&&!(d in e))return!1}else{var j=new Vn;if(r)var C=r(b,O,d,e,t,j);if(!(C===void 0?he(O,b,3,r,j):C))return!1}}return!0},Le=function(e){return e==e&&!kt(e)},lt=function(e){for(var t=kr(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Le(a)]}return t},tt=function(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}},wt=function(e){var t=lt(e);return t.length==1&&t[0][2]?tt(t[0][0],t[0][1]):function(n){return n===e||Se(n,e,t)}},ct=function(e){return typeof e=="symbol"||jn(e)&&mt(e)=="[object Symbol]"},bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mn=/^\w*$/,jt=function(e,t){if(Xt(e))return!1;var n=typeof e;return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!ct(e))||mn.test(e)||!bt.test(e)||t!=null&&e in Object(t)};function on(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var u=e.apply(this,r);return n.cache=o.set(a,u)||o,u};return n.cache=new(on.Cache||jr),n}on.Cache=jr;var Hr=on,Vu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ra=/\\(\\)?/g,oa=function(e){var t=Hr(e,function(r){return n.size===500&&n.clear(),r}),n=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Vu,function(n,r,a,o){t.push(a?o.replace(ra,"$1"):r||n)}),t}),yo=st?st.prototype:void 0,$o=yo?yo.toString:void 0,an=function e(t){if(typeof t=="string")return t;if(Xt(t))return Te(t,e)+"";if(ct(t))return $o?$o.call(t):"";var n=t+"";return n=="0"&&1/t==-1/0?"-0":n},ia=function(e){return e==null?"":an(e)},Vr=function(e,t){return Xt(e)?e:jt(e,t)?[e]:oa(ia(e))},ei=function(e){if(typeof e=="string"||ct(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},Wu=function(e,t){for(var n=0,r=(t=Vr(t,e)).length;e!=null&&n<r;)e=e[ei(t[n++])];return n&&n==r?e:void 0},hf=function(e,t,n){var r=e==null?void 0:Wu(e,t);return r===void 0?n:r},fA=function(e,t){return e!=null&&t in Object(e)},pA=function(e,t,n){for(var r=-1,a=(t=Vr(t,e)).length,o=!1;++r<a;){var u=ei(t[r]);if(!(o=e!=null&&n(e,u)))break;e=e[u]}return o||++r!=a?o:!!(a=e==null?0:e.length)&&lr(a)&&rn(u,a)&&(Xt(e)||Xn(e))},yf=function(e,t){return e!=null&&pA(e,t,fA)},dA=function(e,t){return jt(e)&&Le(t)?tt(ei(e),t):function(n){var r=hf(n,e);return r===void 0&&r===t?yf(n,e):he(t,r,3)}},Xu=function(e){return e},hA=function(e){return function(t){return t==null?void 0:t[e]}},yA=function(e){return function(t){return Wu(t,e)}},gA=function(e){return jt(e)?hA(ei(e)):yA(e)},AA=function(e){return typeof e=="function"?e:e==null?Xu:typeof e=="object"?Xt(e)?dA(e[0],e[1]):wt(e):gA(e)},gf=function(e){return function(t,n,r){for(var a=-1,o=Object(t),u=r(t),l=u.length;l--;){var d=u[e?l:++a];if(n(o[d],d,o)===!1)break}return t}}(),vA=function(e,t){return function(n,r){if(n==null)return n;if(!Mt(n))return e(n,r);for(var a=n.length,o=t?a:-1,u=Object(n);(t?o--:++o<a)&&r(u[o],o,u)!==!1;);return n}}(function(e,t){return e&&gf(e,t,kr)}),bA=function(e,t){var n=-1,r=Mt(e)?Array(e.length):[];return vA(e,function(a,o,u){r[++n]=t(a,o,u)}),r},aa=function(e,t){return(Xt(e)?Te:bA)(e,AA(t))},ua=function(){try{var e=Un(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ju=function(e,t,n){t=="__proto__"&&ua?ua(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},mA=Object.prototype.hasOwnProperty,ca=function(e,t,n){var r=e[t];mA.call(e,t)&>(r,n)&&(n!==void 0||t in e)||Ju(e,t,n)},go=function(e,t,n,r){var a=!n;n||(n={});for(var o=-1,u=t.length;++o<u;){var l=t[o],d=r?r(n[l],e[l],l,n,e):void 0;d===void 0&&(d=e[l]),a?Ju(n,l,d):ca(n,l,d)}return n},wA=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Af=Math.max,vf=function(e,t,n){return t=Af(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=Af(r.length-t,0),u=Array(o);++a<o;)u[a]=r[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=r[a];return l[t]=n(u),wA(e,this,l)}},OA=function(e){return function(){return e}},EA=ua?function(e,t){return ua(e,"toString",{configurable:!0,enumerable:!1,value:OA(t),writable:!0})}:Xu,xA=Date.now,_A=function(e){var t=0,n=0;return function(){var r=xA(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},bf=_A(EA),jA=function(e,t){return bf(vf(e,t,Xu),e+"")},SA=function(e,t,n){if(!kt(n))return!1;var r=typeof t;return!!(r=="number"?Mt(n)&&rn(t,n.length):r=="string"&&t in n)&>(n[t],e)},mf=function(e){return jA(function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,u=a>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,u&&SA(n[0],n[1],u)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var l=n[r];l&&e(t,l,r,o)}return t})},kA=Object.prototype.hasOwnProperty,un=mf(function(e,t){if(co(t)||Mt(t))go(t,kr(t),e);else for(var n in t)kA.call(t,n)&&ca(e,n,t[n])}),PA=function(e,t,n,r){if(!kt(e))return e;for(var a=-1,o=(t=Vr(t,e)).length,u=o-1,l=e;l!=null&&++a<o;){var d=ei(t[a]),b=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=u){var O=l[d];(b=r?r(O,d,l):void 0)===void 0&&(b=kt(O)?O:rn(t[a+1])?[]:{})}ca(l,d,b),l=l[d]}return e},DA=function(e,t,n){for(var r=-1,a=t.length,o={};++r<a;){var u=t[r],l=Wu(e,u);n(l,u)&&PA(o,Vr(u,e),l)}return o},CA=function(e,t){return DA(e,t,function(n,r){return yf(e,r)})},wf=st?st.isConcatSpreadable:void 0,NA=function(e){return Xt(e)||Xn(e)||!!(wf&&e&&e[wf])},MA=function e(t,n,r,a,o){var u=-1,l=t.length;for(r||(r=NA),o||(o=[]);++u<l;){var d=t[u];n>0&&r(d)?n>1?e(d,n-1,r,a,o):Wn(o,d):a||(o[o.length]=d)}return o},BA=function(e){return e!=null&&e.length?MA(e,1):[]},Lt,Of,Ef,xf,_f,jf,Sf,kf,Pf,Df,Cf,Nf,Mf,Bf,Tf,If,Rf,ti=function(e){return bf(vf(e,void 0,BA),e+"")}(function(e,t){return e==null?{}:CA(e,t)});function qt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function TA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Ot,Lf,pt,Gt,at,St,IA={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},Zu=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey"],Qf=(Of=Jt((Lt=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),qt(this,"isSilentMode",Of,this),qt(this,"stopZoomGraph",Ef,this),qt(this,"stopScrollGraph",xf,this),qt(this,"stopMoveGraph",_f,this),qt(this,"adjustEdge",jf,this),qt(this,"adjustEdgeMiddle",Sf,this),qt(this,"adjustEdgeStartAndEnd",kf,this),qt(this,"adjustNodePosition",Pf,this),qt(this,"hideAnchors",Df,this),qt(this,"hoverOutline",Cf,this),qt(this,"nodeSelectedOutline",Nf,this),qt(this,"edgeSelectedOutline",Mf,this),qt(this,"nodeTextEdit",Bf,this),qt(this,"edgeTextEdit",Tf,this),qt(this,"nodeTextDraggable",If,this),qt(this,"edgeTextDraggable",Rf,this),zf(this,"multipleSelectKey",""),zf(this,"defaultConfig",{}),un(this,this.getConfigDetail(r))}var t,n;return t=e,(n=[{key:"updateEditConfig",value:function(r){var a=this.getConfigDetail(r);un(this,a)}},{key:"getConfigDetail",value:function(r){var a=r.isSilentMode,o=r.textEdit,u={};if(a===!1&&un(u,this.defaultConfig),a===!0){var l=ti(IA,Zu);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable},un(u,l)}o===!1&&un(u,{nodeTextEdit:!1,edgeTextEdit:!1});var d=ti(r,Zu);return un(u,d)}},{key:"getConfig",value:function(){return ti(this,Zu)}}])&&TA(t.prototype,n),e}()).prototype,"isSilentMode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ef=Jt(Lt.prototype,"stopZoomGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xf=Jt(Lt.prototype,"stopScrollGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_f=Jt(Lt.prototype,"stopMoveGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),jf=Jt(Lt.prototype,"adjustEdge",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Sf=Jt(Lt.prototype,"adjustEdgeMiddle",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),kf=Jt(Lt.prototype,"adjustEdgeStartAndEnd",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Pf=Jt(Lt.prototype,"adjustNodePosition",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Df=Jt(Lt.prototype,"hideAnchors",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cf=Jt(Lt.prototype,"hoverOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Nf=Jt(Lt.prototype,"nodeSelectedOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Mf=Jt(Lt.prototype,"edgeSelectedOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bf=Jt(Lt.prototype,"nodeTextEdit",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Tf=Jt(Lt.prototype,"edgeTextEdit",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),If=Jt(Lt.prototype,"nodeTextDraggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rf=Jt(Lt.prototype,"edgeTextDraggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Jt(Lt.prototype,"updateEditConfig",[s.k],Object.getOwnPropertyDescriptor(Lt.prototype,"updateEditConfig"),Lt.prototype),Lt);i(77),function(e){e[e.DEFAULT=1]="DEFAULT",e[e.TEXT_EDIT=2]="TEXT_EDIT",e[e.SHOW_MENU=3]="SHOW_MENU",e[e.ALLOW_CONNECT=4]="ALLOW_CONNECT",e[e.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(Ot||(Ot={})),function(e){e.KEY="logic-flow",e.NODE_NAME="lf-node",e.EDGE_NAME="lf-edge"}(Lf||(Lf={})),function(e){e.NODE="node",e.CIRCLE_NODE="circle-node",e.POLYGON_NODE="polygon-node",e.RECT_NODE="rect-node",e.TEXT_NODE="text-node",e.ELLIPSE_NODE="ellipse-node",e.DIAMOND_NODE="diamond-node",e.HTML_NODE="html-node",e.EDGE="edge",e.LINE_EDGE="line-edge",e.POLYLINE_EDGE="polyline-edge",e.BEZIER_EDGE="bezier-edge",e.GRAPH="graph"}(pt||(pt={})),function(e){e.NODE="node",e.EDGE="edge",e.GRAPH="graph"}(Gt||(Gt={})),function(e){e.ELEMENT_CLICK="element:click",e.NODE_CLICK="node:click",e.NODE_DBCLICK="node:dbclick",e.NODE_DELETE="node:delete",e.NODE_ADD="node:add",e.NODE_DND_ADD="node:dnd-add",e.NODE_DND_DRAG="node:dnd-drag",e.NODE_MOUSEDOWN="node:mousedown",e.NODE_DRAGSTART="node:dragstart",e.NODE_DRAG="node:drag",e.NODE_DROP="node:drop",e.NODE_MOUSEUP="node:mouseup",e.NODE_MOUSEMOVE="node:mousemove",e.NODE_MOUSEENTER="node:mouseenter",e.NODE_MOUSELEAVE="node:mouseleave",e.NODE_CONTEXTMENU="node:contextmenu",e.EDGE_DELETE="edge:delete",e.EDGE_ADD="edge:add",e.EDGE_CLICK="edge:click",e.EDGE_DBCLICK="edge:dbclick",e.EDGE_MOUSEENTER="edge:mouseenter",e.EDGE_MOUSELEAVE="edge:mouseleave",e.EDGE_CONTEXTMENU="edge:contextmenu",e.EDGE_ADJUST="edge:adjust",e.EDGE_EXCHANGE_NODE="edge:exchange-node",e.ANCHOR_DRAGSTART="anchor:dragstart",e.ANCHOR_DRAG="anchor:drag",e.ANCHOR_DROP="anchor:drop",e.BLANK_MOUSEDOWN="blank:mousedown",e.BLANK_DRAGSTART="blank:dragstart",e.BLANK_DRAG="blank:drag",e.BLANK_DROP="blank:drop",e.BLANK_MOUSEMOVE="blank:mousemove",e.BLANK_MOUSEUP="blank:mouseup",e.BLANK_CLICK="blank:click",e.BLANK_CONTEXTMENU="blank:contextmenu",e.SELECTION_MOUSEDOWN="selection:mousedown",e.SELECTION_DRAGSTART="selection:dragstart",e.SELECTION_DRAG="selection:drag",e.SELECTION_DROP="selection:drop",e.SELECTION_MOUSEMOVE="selection:mousemove",e.SELECTION_MOUSEUP="selection:mouseup",e.SELECTION_CONTEXTMENU="selection:contextmenu",e.CONNECTION_NOT_ALLOWED="connection:not-allowed",e.HISTORY_CHANGE="history:change",e.TEXT_UPDATE="text:update",e.GRAPH_TRANSFORM="graph:transform",e.GRAPH_RENDERED="graph:rendered"}(at||(at={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(St||(St={}));var wn,Bt,Ff,Gf,Yf,Uf,Hf,Vf,Wf;function sa(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Xf(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Xf(n,r)}}(e,t)||function(){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 Xf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wr(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function RA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ku(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mn(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.INCREASE=1]="INCREASE"})(wn||(wn={}));var zA=(Bt=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Ku(this,"MINI_SCALE_SIZE",.2),Ku(this,"MAX_SCALE_SIZE",16),Wr(this,"SCALE_X",Ff,this),Wr(this,"SKEW_Y",Gf,this),Wr(this,"SKEW_X",Yf,this),Wr(this,"SCALE_Y",Uf,this),Wr(this,"TRANSLATE_X",Hf,this),Wr(this,"TRANSLATE_Y",Vf,this),Wr(this,"ZOOM_SIZE",Wf,this),Ku(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,n=[{key:"setZoomMiniSize",value:function(r){this.MINI_SCALE_SIZE=r}},{key:"setZoomMaxSize",value:function(r){this.MAX_SCALE_SIZE=r}},{key:"HtmlPointToCanvasPoint",value:function(r){var a=sa(r,2),o=a[0],u=a[1];return[(o-this.TRANSLATE_X)/this.SCALE_X,(u-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(r){var a=sa(r,2),o=a[0],u=a[1];return[o*this.SCALE_X+this.TRANSLATE_X,u*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(r,a,o){var u=sa(r,2),l=u[0],d=u[1];return[l+a/this.SCALE_X,d+o/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(r,a){return[r/this.SCALE_X,a/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var r=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(r,")")}}},{key:"zoom",value:function(){var r=arguments.length>0&&arguments[0]!==void 0&&arguments[0],a=arguments.length>1?arguments[1]:void 0,o=this.SCALE_X,u=this.SCALE_Y;return r===!0?(o+=this.ZOOM_SIZE,u+=this.ZOOM_SIZE):r===!1?(o-=this.ZOOM_SIZE,u-=this.ZOOM_SIZE):typeof r=="number"&&(o=r,u=r),o<this.MINI_SCALE_SIZE||o>this.MAX_SCALE_SIZE||(a&&(this.TRANSLATE_X-=(o-this.SCALE_X)*a[0],this.TRANSLATE_Y-=(u-this.SCALE_Y)*a[1]),this.SCALE_X=o,this.SCALE_Y=u,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(r){this.eventCenter.emit(at.GRAPH_TRANSFORM,{type:r,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(r,a){this.TRANSLATE_X+=r,this.TRANSLATE_Y+=a,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(r,a,o,u){var l=sa(this.CanvasPointToHtmlPoint([r,a]),2),d=o/2-l[0],b=u/2-l[1];this.TRANSLATE_X+=d,this.TRANSLATE_Y+=b,this.emitGraphTransform("focusOn")}}],n&&RA(t.prototype,n),e}(),Ff=Mn(Bt.prototype,"SCALE_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Gf=Mn(Bt.prototype,"SKEW_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Yf=Mn(Bt.prototype,"SKEW_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Uf=Mn(Bt.prototype,"SCALE_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Hf=Mn(Bt.prototype,"TRANSLATE_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Vf=Mn(Bt.prototype,"TRANSLATE_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Wf=Mn(Bt.prototype,"ZOOM_SIZE",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Mn(Bt.prototype,"zoom",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"zoom"),Bt.prototype),Mn(Bt.prototype,"resetZoom",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"resetZoom"),Bt.prototype),Mn(Bt.prototype,"translate",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"translate"),Bt.prototype),Mn(Bt.prototype,"focusOn",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"focusOn"),Bt.prototype),Bt),LA=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e},QA=function(e,t){return e&&go(t,kr(t),e)},FA=function(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t},GA=Object.prototype.hasOwnProperty,YA=function(e){if(!kt(e))return FA(e);var t=co(e),n=[];for(var r in e)(r!="constructor"||!t&&GA.call(e,r))&&n.push(r);return n},ni=function(e){return Mt(e)?Sn(e,!0):YA(e)},UA=function(e,t){return e&&go(t,ni(t),e)},Jf=i(106),Zf=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},HA=function(e,t){return go(e,_n(e),t)},qu=kn(Object.getPrototypeOf,Object),Kf=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Wn(t,_n(e)),e=qu(e);return t}:Wi,VA=function(e,t){return go(e,Kf(e),t)},WA=function(e){return Hi(e,ni,Kf)},XA=Object.prototype.hasOwnProperty,JA=function(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&XA.call(e,"index")&&(n.index=e.index,n.input=e.input),n},$u=function(e){var t=new e.constructor(e.byteLength);return new Fr(t).set(new Fr(e)),t},ZA=function(e,t){var n=t?$u(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},KA=/\w*$/,qA=function(e){var t=new e.constructor(e.source,KA.exec(e));return t.lastIndex=e.lastIndex,t},qf=st?st.prototype:void 0,$f=qf?qf.valueOf:void 0,$A=function(e){return $f?Object($f.call(e)):{}},ep=function(e,t){var n=t?$u(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},ev=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return $u(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return ZA(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ep(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return qA(e);case"[object Symbol]":return $A(e)}},tp=Object.create,tv=function(){function e(){}return function(t){if(!kt(t))return{};if(tp)return tp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),np=function(e){return typeof e.constructor!="function"||co(e)?{}:tv(qu(e))},nv=function(e){return jn(e)&&h(e)=="[object Map]"},rp=Ht.a&&Ht.a.isMap,rv=rp?fr(rp):nv,ov=function(e){return jn(e)&&h(e)=="[object Set]"},op=Ht.a&&Ht.a.isSet,iv=op?fr(op):ov,ip="[object Arguments]",ap="[object Function]",av="[object Object]",_t={};_t[ip]=_t["[object Array]"]=_t["[object ArrayBuffer]"]=_t["[object DataView]"]=_t["[object Boolean]"]=_t["[object Date]"]=_t["[object Float32Array]"]=_t["[object Float64Array]"]=_t["[object Int8Array]"]=_t["[object Int16Array]"]=_t["[object Int32Array]"]=_t["[object Map]"]=_t["[object Number]"]=_t["[object Object]"]=_t["[object RegExp]"]=_t["[object Set]"]=_t["[object String]"]=_t["[object Symbol]"]=_t["[object Uint8Array]"]=_t["[object Uint8ClampedArray]"]=_t["[object Uint16Array]"]=_t["[object Uint32Array]"]=!0,_t["[object Error]"]=_t[ap]=_t["[object WeakMap]"]=!1;var uv=function e(t,n,r,a,o,u){var l,d=1&n,b=2&n,O=4&n;if(r&&(l=o?r(t,a,o,u):r(t)),l!==void 0)return l;if(!kt(t))return t;var j=Xt(t);if(j){if(l=JA(t),!d)return Zf(t,l)}else{var C=h(t),R=C==ap||C=="[object GeneratorFunction]";if(Object(Yr.a)(t))return Object(Jf.a)(t,d);if(C==av||C==ip||R&&!o){if(l=b||R?{}:np(t),!d)return b?VA(t,UA(l,t)):HA(t,QA(l,t))}else{if(!_t[C])return o?t:{};l=ev(t,C,d)}}u||(u=new Vn);var X=u.get(t);if(X)return X;u.set(t,l),iv(t)?t.forEach(function(ue){l.add(e(ue,n,r,ue,t,u))}):rv(t)&&t.forEach(function(ue,ae){l.set(ae,e(ue,n,r,ae,t,u))});var te=j?void 0:(O?b?WA:so:b?ni:kr)(t);return LA(te||t,function(ue,ae){te&&(ue=t[ae=ue]),ca(l,ae,e(ue,n,r,ae,t,u))}),l},Ct=function(e){return uv(e,5)},ec=function(e,t,n){(n!==void 0&&!gt(e[t],n)||n===void 0&&!(t in e))&&Ju(e,t,n)},cv=function(e){return jn(e)&&Mt(e)},sv=Function.prototype,lv=Object.prototype,up=sv.toString,fv=lv.hasOwnProperty,pv=up.call(Object),dv=function(e){if(!jn(e)||mt(e)!="[object Object]")return!1;var t=qu(e);if(t===null)return!0;var n=fv.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&up.call(n)==pv},tc=function(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]},hv=function(e){return go(e,ni(e))},yv=function(e,t,n,r,a,o,u){var l=tc(e,n),d=tc(t,n),b=u.get(d);if(b)ec(e,n,b);else{var O=o?o(l,d,n+"",e,t,u):void 0,j=O===void 0;if(j){var C=Xt(d),R=!C&&Object(Yr.a)(d),X=!C&&!R&&Xo(d);O=d,C||R||X?Xt(l)?O=l:cv(l)?O=Zf(l):R?(j=!1,O=Object(Jf.a)(d,!0)):X?(j=!1,O=ep(d,!0)):O=[]:dv(d)||Xn(d)?(O=l,Xn(l)?O=hv(l):kt(l)&&!Gn(l)||(O=np(d))):j=!1}j&&(u.set(d,O),a(O,d,r,o,u),u.delete(d)),ec(e,n,O)}},gv=function e(t,n,r,a,o){t!==n&&gf(n,function(u,l){if(o||(o=new Vn),kt(u))yv(t,n,l,r,e,a,o);else{var d=a?a(tc(t,l),u,l+"",t,n,o):void 0;d===void 0&&(d=u),ec(t,l,d)}},ni)},cp=mf(function(e,t,n){gv(e,t,n)}),Av={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"}},sp=function(e){var t=Ct(Av);return e&&(t=cp(t,e)),t};i(78),i(158);function vv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var bv=function(){function e(){var r,a,o;(function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")})(this,e),o={},(a="_events")in(r=this)?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}var t,n;return t=e,(n=[{key:"on",value:function(r,a,o){var u=this;return r==null||r.split(",").forEach(function(l){l=l.trim(),u._events[l]||(u._events[l]=[]),u._events[l].push({callback:a,once:!!o})}),this}},{key:"once",value:function(r,a){var o=this;r==null||r.split(",").forEach(function(u){return u=u.trim(),o.on(u,a,!0)})}},{key:"emit",value:function(r,a){var o=this;r==null||r.split(",").forEach(function(u){var l=o._events[u]||[],d=o._events["*"]||[],b=function(O){for(var j=O.length,C=0;C<j;C++)if(O[C]){var R=O[C],X=R.callback;R.once&&(O.splice(C,1),O.length===0&&delete o._events[u],j--,C--),X.apply(o,[a])}};b(l),b(d)})}},{key:"off",value:function(r,a){var o=this;return r||(this._events={}),r.split(",").forEach(function(u){if(a){for(var l=o._events[u]||[],d=l.length,b=0;b<d;b++)l[b].callback===a&&(l.splice(b,1),d--,b--);l.length===0&&delete o._events[u]}else delete o._events[u]}),this}},{key:"getEvents",value:function(){return this._events}}])&&vv(t.prototype,n),e}();function Ao(e,t){return t*Math.round(e/t)||e}function lp(e,t){return e%t}function nc(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return fp(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return fp(n,r)}}(e,t)||function(){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 fp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rc,oc=function(e,t,n){var r=nc(e,2),a=r[0],o=r[1],u=nc(t,2),l=u[0],d=u[1],b=nc(n,2),O=b[0],j=b[1];return a>l&&a<O&&o>d&&o<j},pp=function(e,t){var n=!1;switch(t.multipleSelectKey){case"meta":n=e.metaKey;break;case"alt":n=e.altKey;break;case"shift":n=e.shiftKey;break;default:n=!1}return n},mv=(i(79),i(161),i(125),i(80),i(12),i(13),i(14),i(47),i(31),new Uint8Array(16));function wv(){if(!rc&&!(rc=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rc(mv)}for(var Ov=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ev=function(e){return typeof e=="string"&&Ov.test(e)},Zt=[],ic=0;ic<256;++ic)Zt.push((ic+256).toString(16).substr(1));var xv=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Zt[e[t+0]]+Zt[e[t+1]]+Zt[e[t+2]]+Zt[e[t+3]]+"-"+Zt[e[t+4]]+Zt[e[t+5]]+"-"+Zt[e[t+6]]+Zt[e[t+7]]+"-"+Zt[e[t+8]]+Zt[e[t+9]]+"-"+Zt[e[t+10]]+Zt[e[t+11]]+Zt[e[t+12]]+Zt[e[t+13]]+Zt[e[t+14]]+Zt[e[t+15]]).toLowerCase();if(!Ev(n))throw TypeError("Stringified UUID is invalid");return n},ac=function(e,t,n){var r=(e=e||{}).random||(e.rng||wv)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return xv(r)},Xr=function(){return ac()},_v=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.nodes.reduce(function(r,a){return r[a.id]=t+ac(),a.id=r[a.id],r},{});return e.edges.forEach(function(r){r.id=t+ac(),r.sourceNodeId=n[r.sourceNodeId],r.targetNodeId=n[r.targetNodeId]}),e},ri=(i(104),i(203),function(e,t,n){var r=e.x,a=e.y;return(r-t.x)*(r-n.x)<=0&&(a-t.y)*(a-n.y)<=0});function uc(e){return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uc(e)}function dp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dp(Object(n),!0).forEach(function(r){jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe,yp,gp,Ap,vp,bp,mp,wp,Op,Ep,xp,_p,jp,Sp,kp,Pp,Dp,Cp,Np,Mp,cc=function(e){return e.anchors},la=function(e,t){for(var n,r=t.nodes,a=r.length-1;a>=0;a--){var o=r[a];if(Pv(e,o)){var u=kv(e,o);if(u){var l={node:o,anchorIndex:u.index,anchor:u.anchor};n&&!Sv(o,n.node,t)||(n=l)}}}return n},Sv=function(e,t,n){return e.zIndex>t.zIndex||n.nodesMap[e.id].index>n.nodesMap[t.id].index},kv=function(e,t){for(var n,r=cc(t),a=Number.MAX_SAFE_INTEGER,o=0;o<r.length;o++){var u=Jn(e.x,e.y,r[o].x,r[o].y);u<a&&(a=u,n={index:o,anchor:hp(hp({},r[o]),{},{x:r[o].x,y:r[o].y,id:r[o].id})})}return n},Jn=function(e,t,n,r){return Math.hypot(e-n,t-r)},Dr=function(e,t){var n=!1,r=On(t);return e.x>=r.minX-0&&e.x<=r.maxX+0&&e.y>=r.minY-0&&e.y<=r.maxY+0&&(n=!0),n},Pv=function(e,t){var n=!1,r=On(t);return e.x>=r.minX-5&&e.x<=r.maxX+5&&e.y>=r.minY-5&&e.y<=r.maxY+5&&(n=!0),n},On=function(e){var t=e.x,n=e.y,r=e.width,a=e.height;return{minX:t-r/2,minY:n-a/2,maxX:t+r/2,maxY:n+a/2,x:t,y:n,width:r,height:a,centerX:t,centerY:n}},Bp=function(e,t,n){var r,a=function(u){var l=u,d=l.x,b=l.y,O=l.width,j=l.height,C=l.radius;return[{x:d-O/2+C,y:b-j/2+C,r:C},{x:d+O/2-C,y:b-j/2+C,r:C},{x:d-O/2+C,y:b+j/2-C,r:C},{x:d+O/2-C,y:b+j/2-C,r:C}]}(n),o=Number.MAX_SAFE_INTEGER;return a.forEach(function(u){var l=Jn(e.x,e.y,u.x,u.y);l<o&&(o=l,r=u)}),sc(e,t,r)},sc=function(e,t,n){var r,a=n,o=a.x,u=a.y,l=a.r;if(t===St.HORIZONTAL){var d=o-Math.sqrt(l*l-(e.y-u)*(e.y-u)),b=o+Math.sqrt(l*l-(e.y-u)*(e.y-u));r={x:Math.abs(d-e.x)<Math.abs(b-e.x)?d:b,y:e.y}}else if(t===St.VERTICAL){var O=u-Math.sqrt(l*l-(e.x-o)*(e.x-o)),j=u+Math.sqrt(l*l-(e.x-o)*(e.x-o)),C=Math.abs(O-e.y)<Math.abs(j-e.y)?O:j;r={x:e.x,y:C}}return r},Tp=function(e,t){var n=t,r=!1,a=n.x-n.width/2+n.radius,o=n.x+n.width/2-n.radius,u=n.y-n.height/2+n.radius,l=n.y+n.height/2-n.radius,d=n.x,b=n.y,O=n.width,j=n.height;return e.y===b+j/2||e.y===b-j/2?r=e.x>a&&e.x<o:e.x!==d+O/2&&e.x!==d-O/2||(r=e.y>u&&e.y<l),r},Ip=function(e,t,n){var r,a=n,o=a.x,u=a.y,l=a.rx,d=a.ry;if(t===St.HORIZONTAL){var b=o-Math.sqrt(l*l-(e.y-u)*(e.y-u)*l*l/(d*d)),O=o+Math.sqrt(l*l-(e.y-u)*(e.y-u)*l*l/(d*d));r={x:Math.abs(b-e.x)<Math.abs(O-e.x)?b:O,y:e.y}}else if(t===St.VERTICAL){var j=u-Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(l*l)),C=u+Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(l*l)),R=Math.abs(j-e.y)<Math.abs(C-e.y)?j:C;r={x:e.x,y:R}}return r},Rp=function(e,t,n){for(var r,a=n.pointsPosition,o=Number.MAX_SAFE_INTEGER,u=[],l=0;l<a.length;l++)u.push({start:a[l],end:a[(l+1)%a.length]});return u.forEach(function(d){var b=d.start,O=d.end,j=b,C=O;b.x>O.x&&(j=O,C=b);var R={x:e.x,y:e.y};if(j.x===C.x&&t===St.HORIZONTAL&&(R={x:j.x,y:e.y}),j.y===C.y&&t===St.VERTICAL&&(R={x:e.x,y:j.y}),j.x!==C.x&&j.y!==C.y){var X=(C.y-j.y)/(C.x-j.x),te=(j.x*C.y-C.x*j.y)/(j.x-C.x);t===St.HORIZONTAL?R={x:(e.y-te)/X,y:e.y}:t===St.VERTICAL&&(R={x:e.x,y:X*e.x+te})}if(ri(R,b,O)){var ue=Jn(R.x,R.y,e.x,e.y);ue<o&&(o=ue,r=R)}}),r},zp=function(e,t,n,r){var a=e.x,o=e.y;return t.x>e.x?a=e.x+n/2:t.x<e.x&&(a=e.x-n/2),t.y>e.y?o=e.y+r/2:t.y<e.y&&(o=e.y-r/2),{x:a,y:o}},Lp=function(e){var t=e.rows,n=e.style,r=e.rowsLength,a=e.className,o=document.createElement("div");o.style.fontSize=n.fontSize,o.style.width=n.width,o.className=a,o.style.lineHeight=n.lineHeight,o.style.padding=n.padding,n.fontFamily&&(o.style.fontFamily=n.fontFamily),r>1?t.forEach(function(l){var d=document.createElement("div");d.textContent=l,o.appendChild(d)}):o.textContent=t,document.body.appendChild(o);var u=o.clientHeight;return document.body.removeChild(o),u},lc=function(e){var t=e.rows,n=e.rowsLength,r=e.fontSize,a=0;return t&&t.forEach(function(o){var u=ud(o);a=u>a?u:a}),{width:Math.ceil(a/2)*r+r/4,height:n*(r+2)+r/4}},fa=function(e){return uc(e)!=="object"?{isAllPass:!!e,msg:e?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:e},Qp={node:!1,edge:!1},Dv={node:!0,edge:!0},Cv={stroke:"red",strokeDasharray:"10 200",className:"lf-edge-animation"},$t=function(e){try{return JSON.parse(JSON.stringify(e))}catch{return e}},Nv=1e3,Mv=999,fc=function(){return++Nv};function Fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(n),!0).forEach(function(r){Pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Bv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var pc=(xe=function(){function e(r,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),Pn(this,"id",Xr()),Yt(this,"type",yp,this),Yt(this,"sourceNodeId",gp,this),Yt(this,"targetNodeId",Ap,this),Yt(this,"startPoint",vp,this),Yt(this,"endPoint",bp,this),Yt(this,"text",mp,this),Yt(this,"properties",wp,this),Yt(this,"points",Op,this),Yt(this,"pointsList",Ep,this),Yt(this,"isSelected",xp,this),Yt(this,"isHovered",_p,this),Yt(this,"isHitable",jp,this),Yt(this,"draggable",Sp,this),Yt(this,"visible",kp,this),Yt(this,"isAnimation",Pp,this),Pn(this,"graphModel",void 0),Yt(this,"zIndex",Dp,this),Pn(this,"BaseType",Gt.EDGE),Pn(this,"modelType",pt.EDGE),Yt(this,"state",Cp,this),Pn(this,"additionStateData",void 0),Pn(this,"sourceAnchorId",""),Pn(this,"targetAnchorId",""),Pn(this,"menu",void 0),Pn(this,"customTextPosition",!1),Pn(this,"animationData",Cv),Yt(this,"style",Np,this),Yt(this,"arrowConfig",Mp,this),this.graphModel=a,this.initEdgeData(r),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(r)}var t,n;return t=e,n=[{key:"initEdgeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,o=a&&a(r.type);o&&(r.id=o);var u=this.createId();u&&(r.id=u)}un(this,$v(r)),this.graphModel.overlapMode===wn.INCREASE&&(this.zIndex=r.zIndex||fc())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return Bn(Bn({},this.graphModel.theme.baseEdge),this.style)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.edgeText;return Ct(r)}},{key:"getAnimation",value:function(){var r=this.animationData;return Ct(r)}},{key:"getEdgeAnimationStyle",value:function(){var r=this.graphModel.theme.edgeAnimation;return Ct(r)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Ct(r)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var r,a;return(r=this.graphModel)===null||r===void 0||(a=r.nodesMap[this.sourceNodeId])===null||a===void 0?void 0:a.model}},{key:"targetNode",get:function(){var r,a;return(r=this.graphModel)===null||r===void 0||(a=r.nodesMap[this.targetNodeId])===null||a===void 0?void 0:a.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(r,a){var o,u;return cc(r).forEach(function(l){var d=ld(l,a);u?d<u&&(u=d,o=l):(u=d,o=l)}),o}},{key:"getEndAnchor",value:function(r){var a,o,u=this;return cc(r).forEach(function(l){var d=ld(l,u.startPoint);o?d<o&&(o=d,a=l):(o=d,a=l)}),a}},{key:"getProperties",value:function(){return Object(s.I)(this.properties)}},{key:"getData",value:function(){var r=this.text,a=r.x,o=r.y,u=r.value,l={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(s.I)(this.properties)};return u&&(l.text={x:a,y:o,value:u}),this.graphModel.overlapMode===wn.INCREASE&&(l.zIndex=this.zIndex),l}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(r,a){this.properties[r]=$t(a),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=Bn(Bn({},this.properties),$t(r)),this.setAttributes()}},{key:"setStyle",value:function(r,a){this.style=Bn(Bn({},this.style),{},Pn({},r,$t(a)))}},{key:"setStyles",value:function(r){this.style=Bn(Bn({},this.style),$t(r))}},{key:"updateStyles",value:function(r){this.style=Bn({},$t(r))}},{key:"formatText",value:function(r){var a=this.textPosition,o=a.x,u=a.y;r.text&&typeof r.text!="string"?Object.prototype.toString.call(r.text)==="[object Object]"&&(this.text={x:r.text.x||o,y:r.text.y||u,value:r.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:r.text||"",x:o,y:u,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var r=this.textPosition,a=r.x,o=r.y;this.text.x=a,this.text.y=o}},{key:"moveText",value:function(r,a){if(this.text){var o=this.text,u=o.x,l=o.y,d=o.value,b=o.draggable,O=o.editable;this.text={value:d,draggable:b,x:u+r,y:l+a,editable:O}}}},{key:"setText",value:function(r){r&&un(this.text,r)}},{key:"updateText",value:function(r){this.text=Bn(Bn({},this.text),{},{value:r})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var r=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:r.x,y:r.y}),this.sourceAnchorId||(this.sourceAnchorId=r.id)}if(!this.targetAnchorId||!this.endPoint){var a=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:a.x,y:a.y}),this.targetAnchorId||(this.targetAnchorId=a.id)}}},{key:"setSelected",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=r}},{key:"setHovered",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=r}},{key:"setHitable",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=r}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(r,a){this.state=r,this.additionStateData=a}},{key:"updateStartPoint",value:function(r){this.startPoint=r}},{key:"moveStartPoint",value:function(r,a){this.startPoint.x+=r,this.startPoint.y+=a}},{key:"updateEndPoint",value:function(r){this.endPoint=r}},{key:"moveEndPoint",value:function(r,a){this.endPoint.x+=r,this.endPoint.y+=a}},{key:"setZIndex",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.zIndex=r}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(r){un(this,r)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(r){var a=r.startPoint,o=r.endPoint;this.updateStartPoint({x:a.x,y:a.y}),this.updateEndPoint({x:o.x,y:o.y})}}],n&&Bv(t.prototype,n),e}(),yp=nt(xe.prototype,"type",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),gp=nt(xe.prototype,"sourceNodeId",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ap=nt(xe.prototype,"targetNodeId",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),vp=nt(xe.prototype,"startPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),bp=nt(xe.prototype,"endPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),mp=nt(xe.prototype,"text",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),wp=nt(xe.prototype,"properties",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Op=nt(xe.prototype,"points",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ep=nt(xe.prototype,"pointsList",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),xp=nt(xe.prototype,"isSelected",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_p=nt(xe.prototype,"isHovered",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),jp=nt(xe.prototype,"isHitable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Sp=nt(xe.prototype,"draggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),kp=nt(xe.prototype,"visible",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Pp=nt(xe.prototype,"isAnimation",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dp=nt(xe.prototype,"zIndex",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Cp=nt(xe.prototype,"state",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Np=nt(xe.prototype,"style",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Mp=nt(xe.prototype,"arrowConfig",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),nt(xe.prototype,"sourceNode",[s.m],Object.getOwnPropertyDescriptor(xe.prototype,"sourceNode"),xe.prototype),nt(xe.prototype,"targetNode",[s.m],Object.getOwnPropertyDescriptor(xe.prototype,"targetNode"),xe.prototype),nt(xe.prototype,"textPosition",[s.m],Object.getOwnPropertyDescriptor(xe.prototype,"textPosition"),xe.prototype),nt(xe.prototype,"setProperty",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setProperty"),xe.prototype),nt(xe.prototype,"setProperties",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setProperties"),xe.prototype),nt(xe.prototype,"setStyle",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setStyle"),xe.prototype),nt(xe.prototype,"setStyles",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setStyles"),xe.prototype),nt(xe.prototype,"updateStyles",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateStyles"),xe.prototype),nt(xe.prototype,"formatText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"formatText"),xe.prototype),nt(xe.prototype,"resetTextPosition",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"resetTextPosition"),xe.prototype),nt(xe.prototype,"moveText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"moveText"),xe.prototype),nt(xe.prototype,"setText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setText"),xe.prototype),nt(xe.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateText"),xe.prototype),nt(xe.prototype,"setAnchors",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setAnchors"),xe.prototype),nt(xe.prototype,"setSelected",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setSelected"),xe.prototype),nt(xe.prototype,"setHovered",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setHovered"),xe.prototype),nt(xe.prototype,"setHitable",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setHitable"),xe.prototype),nt(xe.prototype,"openEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"openEdgeAnimation"),xe.prototype),nt(xe.prototype,"closeEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"closeEdgeAnimation"),xe.prototype),nt(xe.prototype,"setElementState",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setElementState"),xe.prototype),nt(xe.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateStartPoint"),xe.prototype),nt(xe.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"moveStartPoint"),xe.prototype),nt(xe.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateEndPoint"),xe.prototype),nt(xe.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"moveEndPoint"),xe.prototype),nt(xe.prototype,"setZIndex",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setZIndex"),xe.prototype),nt(xe.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"initPoints"),xe.prototype),nt(xe.prototype,"updateAttributes",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateAttributes"),xe.prototype),nt(xe.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"getAdjustStart"),xe.prototype),nt(xe.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"getAdjustEnd"),xe.prototype),nt(xe.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateAfterAdjustStartAndEnd"),xe.prototype),xe),dc=pc;function hc(e){return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}function Gp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gp(Object(n),!0).forEach(function(r){Hp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yc(){return yc=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Rv(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},yc.apply(this,arguments)}function Rv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=vo(e))!==null;);return e}function gc(e,t){return gc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},gc(e,t)}function zv(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=vo(e);if(t){var a=vo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Lv(this,n)}}function Lv(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Up(e)}function Up(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vo(e){return vo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vo(e)}function Hp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ut,Vp,Ac=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&gc(o,u)})(a,e);var t,n,r=zv(a);function a(){var o;Tv(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Hp(Up(o=r.call.apply(r,[this].concat(l))),"modelType",pt.LINE_EDGE),o}return t=a,(n=[{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.line;return Yp(Yp({},yc(vo(a.prototype),"getEdgeStyle",this).call(this)),Ct(o))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Iv(t.prototype,n),a}(dc);function vc(e){return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function Qv(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Wp(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Wp(n,r)}}(e,t)||function(){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 Wp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xp(Object(n),!0).forEach(function(r){mc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fv(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Gv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oi(){return oi=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Uv(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},oi.apply(this,arguments)}function Uv(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Cr(e))!==null;);return e}function bc(e,t){return bc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},bc(e,t)}function Hv(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Cr(e);if(t){var a=Cr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Vv(this,n)}}function Vv(e,t){if(t&&(vc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ii(e)}function ii(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cr(e)}function mc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var wc=(ut=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&bc(o,u)})(a,e);var t,n,r=Hv(a);function a(){var o;Gv(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return mc(ii(o=r.call.apply(r,[this].concat(l))),"modelType",pt.POLYLINE_EDGE),mc(ii(o),"draginngPointList",void 0),Fv(ii(o),"dbClickPosition",Vp,ii(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=30,oi(Cr(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.polyline;return Jp(Jp({},oi(Cr(a.prototype),"getEdgeStyle",this).call(this)),Ct(o))}},{key:"getTextPosition",value:function(){var o,u=(o=this.text)===null||o===void 0?void 0:o.value;if(this.dbClickPosition&&!u){var l=this.dbClickPosition;return{x:l.x,y:l.y}}var d=bo(this.points),b=Qv(Kv(d),2),O=b[0],j=b[1];return{x:(O.x+j.x)/2,y:(O.y+j.y)/2}}},{key:"getAfterAnchor",value:function(o,u,l){var d,b;return l.forEach(function(O){var j;o===St.HORIZONTAL?j=Math.abs(u.y-O.y):o===St.VERTICAL&&(j=Math.abs(u.x-O.x)),(!b||b>j)&&(b=j,d=O)}),d}},{key:"getCorssPoint",value:function(o,u,l){var d;return o===St.HORIZONTAL?d={x:l.x,y:u.y}:o===St.VERTICAL&&(d={x:u.x,y:l.y}),d}},{key:"removeCrossPoints",value:function(o,u,l){var d=l.map(function(ae){return ae});if(o===1){var b=d[o],O=d[u],j=d[o-1];if(rd(j,b,this.sourceNode)){if(od(b,O,this.sourceNode)){var C=id(b,O,this.sourceNode);C&&(d[o]=C,d.splice(o-1,1),o--,u--)}}else this.sourceNode.anchors.forEach(function(ae){(ae.x===j.x&&ae.x===b.x||ae.y===j.y&&ae.y===b.y)&&Jn(ae.x,ae.y,b.x,b.y)<Jn(j.x,j.y,b.x,b.y)&&(d[o-1]=ae)})}if(u===l.length-2){var R=d[o],X=d[u],te=d[u+1];if(rd(X,te,this.targetNode)){if(od(R,X,this.targetNode)){var ue=id(R,X,this.targetNode);ue&&(d[u]=ue,d.splice(u+1,1))}}else this.targetNode.anchors.forEach(function(ae){(ae.x===te.x&&ae.x===X.x||ae.y===te.y&&ae.y===X.y)&&Jn(ae.x,ae.y,X.x,X.y)<Jn(te.x,te.y,X.x,X.y)&&(d[u+1]=ae)})}return d}},{key:"getDragingPoints",value:function(o,u,l,d,b){var O=b.map(function(R){return R}),j=this.getAfterAnchor(o,l,d),C=this.getCorssPoint(o,l,j);return u==="start"?(O.unshift(C),O.unshift(j)):(O.push(C),O.push(j)),O}},{key:"updateCrossPoints",value:function(o){var u=o.map(function(ve){return ve}),l=o[0],d=o[1],b=o[u.length-2],O=o[u.length-1],j=this.sourceNode,C=this.targetNode,R=j.modelType,X=C.modelType,te=Aa(l,d),ue=u[0];switch(R){case pt.RECT_NODE:j.radius!==0&&(Tp(l,j)||(ue=Bp(l,te,j)));break;case pt.CIRCLE_NODE:ue=sc(l,te,j);break;case pt.ELLIPSE_NODE:ue=Ip(l,te,j);break;case pt.DIAMOND_NODE:case pt.POLYGON_NODE:ue=Rp(l,te,j)}u[0]=ue;var ae=Aa(b,O),ge=u[u.length-1];switch(X){case pt.RECT_NODE:C.radius!==0&&(Tp(O,C)||(ge=Bp(O,ae,C)));break;case pt.CIRCLE_NODE:ge=sc(O,ae,C);break;case pt.ELLIPSE_NODE:ge=Ip(O,ae,C);break;case pt.DIAMOND_NODE:case pt.POLYGON_NODE:ge=Rp(O,ae,C)}return u[u.length-1]=ge,u}},{key:"getData",value:function(){var o=oi(Cr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(l){return{x:l.x,y:l.y}});return Object.assign({},o,{pointsList:u})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(o){return"".concat(o.x,",").concat(o.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var o=nd({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(u){return"".concat(u.x,",").concat(u.y)}).join(" ")}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePoints()}},{key:"moveStartPoint",value:function(o,u){this.startPoint.x+=o,this.startPoint.y+=u,this.updatePoints()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"moveEndPoint",value:function(o,u){this.endPoint.x+=o,this.endPoint.y+=u,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map(function(o){return o})}},{key:"dragAppendSimple",value:function(o,u){this.isDragging=!0;var l=o.start,d=o.end,b=o.startIndex,O=o.endIndex,j=o.direction,C=this.pointsList,R=C;return j===St.HORIZONTAL?(C[b]={x:l.x,y:l.y+u.y},C[O]={x:d.x,y:d.y+u.y},R=this.pointsList.map(function(X){return X})):j===St.VERTICAL&&(C[b]={x:l.x+u.x,y:l.y},C[O]={x:d.x+u.x,y:d.y},R=this.pointsList.map(function(X){return X})),this.updatePointsAfterDrage(R),this.draginngPointList=R,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},C[b]),end:Object.assign({},C[O]),startIndex:b,endIndex:O,direction:j}}},{key:"dragAppend",value:function(o,u){this.isDragging=!0;var l=o.start,d=o.end,b=o.startIndex,O=o.endIndex,j=o.direction,C=this.pointsList;if(j===St.HORIZONTAL){C[b]={x:l.x,y:l.y+u.y},C[O]={x:d.x,y:d.y+u.y};var R=this.pointsList.map(function(He){return He});if(b!==0&&O!==this.pointsList.length-1&&(R=this.removeCrossPoints(b,O,R)),b===0){var X={x:l.x,y:l.y+u.y};if(!Dr(X,this.sourceNode)){var te=this.sourceNode.anchors;R=this.getDragingPoints(j,"start",X,te,R)}}if(O===this.pointsList.length-1){var ue={x:d.x,y:d.y+u.y};if(!Dr(ue,this.targetNode)){var ae=this.targetNode.anchors;R=this.getDragingPoints(j,"end",ue,ae,R)}}R=Sc(R),this.updatePointsAfterDrage(R),this.draginngPointList=R}else if(j===St.VERTICAL){C[b]={x:l.x+u.x,y:l.y},C[O]={x:d.x+u.x,y:d.y};var ge=this.pointsList.map(function(He){return He});if(b!==0&&O!==this.pointsList.length-1&&(ge=this.removeCrossPoints(b,O,ge)),b===0){var ve={x:l.x+u.x,y:l.y};if(!Dr(ve,this.sourceNode)){var Me=this.sourceNode.anchors;ge=this.getDragingPoints(j,"start",ve,Me,ge)}}if(O===this.pointsList.length-1){var _e={x:d.x+u.x,y:d.y};if(!Dr(_e,this.targetNode)){var Fe=this.targetNode.anchors;ge=this.getDragingPoints(j,"end",_e,Fe,ge)}}ge=Sc(ge),this.updatePointsAfterDrage(ge),this.draginngPointList=ge}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},C[b]),end:Object.assign({},C[O]),startIndex:b,endIndex:O,direction:j}}},{key:"dragAppendEnd",value:function(){if(this.draginngPointList){var o=bo(this.points);this.pointsList=o.map(function(d){return d}),this.draginngPointList=[];var u=o[0];this.startPoint=Object.assign({},u);var l=o[o.length-1];this.endPoint=Object.assign({},l)}this.isDragging=!1}},{key:"updatePointsAfterDrage",value:function(o){var u=this.updateCrossPoints(o);this.points=u.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 u=o.startPoint,l=o.endPoint,d=o.sourceNode,b=o.targetNode,O=nd({x:u.x,y:u.y},{x:l.x,y:l.y},d,b,this.offset||0);this.pointsList=O,this.initPoints()}}])&&Yv(t.prototype,n),a}(dc),Vp=cn(ut.prototype,"dbClickPosition",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),cn(ut.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"initPoints"),ut.prototype),cn(ut.prototype,"updatePoints",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updatePoints"),ut.prototype),cn(ut.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updateStartPoint"),ut.prototype),cn(ut.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"moveStartPoint"),ut.prototype),cn(ut.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updateEndPoint"),ut.prototype),cn(ut.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"moveEndPoint"),ut.prototype),cn(ut.prototype,"dragAppendStart",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppendStart"),ut.prototype),cn(ut.prototype,"dragAppendSimple",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppendSimple"),ut.prototype),cn(ut.prototype,"dragAppend",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppend"),ut.prototype),cn(ut.prototype,"dragAppendEnd",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppendEnd"),ut.prototype),cn(ut.prototype,"updatePointsAfterDrage",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updatePointsAfterDrage"),ut.prototype),cn(ut.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"getAdjustStart"),ut.prototype),cn(ut.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"getAdjustEnd"),ut.prototype),cn(ut.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updateAfterAdjustStartAndEnd"),ut.prototype),ut),ai=function(e){var t=e.start,n=e.end,r=e.offset,a=e.verticalLength,o=e.type,u={leftX:0,leftY:0,rightX:0,rightY:0},l=Math.atan((n.y-t.y)/(n.x-t.x)),d=Math.atan(r/a),b=Math.sqrt(a*a+r*r);return o==="start"?n.x>=t.x?(u.leftX=t.x+b*Math.sin(l+d),u.leftY=t.y-b*Math.cos(l+d),u.rightX=t.x-b*Math.sin(l-d),u.rightY=t.y+b*Math.cos(l-d)):(u.leftX=t.x-b*Math.sin(l+d),u.leftY=t.y+b*Math.cos(l+d),u.rightX=t.x+b*Math.sin(l-d),u.rightY=t.y-b*Math.cos(l-d)):o==="end"&&(n.x>=t.x?(u.leftX=n.x+b*Math.sin(l-d),u.leftY=n.y-b*Math.cos(l-d),u.rightX=n.x-b*Math.sin(l+d),u.rightY=n.y+b*Math.cos(l+d)):(u.leftX=n.x-b*Math.sin(l-d),u.leftY=n.y+b*Math.cos(l-d),u.rightX=n.x+b*Math.sin(l+d),u.rightY=n.y-b*Math.cos(l+d))),u};function Zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zp(Object(n),!0).forEach(function(r){Wv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xv(e){return function(t){if(Array.isArray(t))return xc(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Kp(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Oc(e){return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function Ec(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||Kp(e,t)||function(){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 Kp(e,t){if(e){if(typeof e=="string")return xc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xc(e,t):void 0}}function xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _c=function(e){var t=[],n={};return e.forEach(function(r){var a="".concat(r.x,"-").concat(r.y);r.id=a,n[a]=r}),Object.keys(n).forEach(function(r){t.push(n[r])}),t},da=function(e,t){return e.width===0&&e.height===0?e:{centerX:e.centerX,centerY:e.centerY,minX:e.minX-t,minY:e.minY-t,maxX:e.maxX+t,maxY:e.maxY+t,height:e.height+2*t,width:e.width+2*t}},ha=function(e,t){var n=function(r,a){var o=Math.abs(r.x-a.centerX),u=Math.abs(r.y-a.centerY);return o/a.width>u/a.height?St.HORIZONTAL:St.VERTICAL}(t,e);return n===St.HORIZONTAL?{x:t.x>e.centerX?e.maxX:e.minX,y:t.y}:{x:t.x,y:t.y>e.centerY?e.maxY:e.minY}},qp=function(e,t){var n=Math.min(e.minX,t.minX),r=Math.min(e.minY,t.minY),a=Math.max(e.maxX,t.maxX),o=Math.max(e.maxY,t.maxY);return{centerX:(n+a)/2,centerY:(r+o)/2,minX:n,minY:r,maxX:a,maxY:o,height:o-r,width:a-n}},ui=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[],r=[];e.forEach(function(O){n.push(O.x),r.push(O.y)});var a=Math.min.apply(Math,n),o=Math.max.apply(Math,n),u=Math.min.apply(Math,r),l=Math.max.apply(Math,r),d=o-a,b=l-u;return t&&(d+=t,b+=t),{centerX:(a+o)/2,centerY:(u+l)/2,maxX:o,maxY:l,minX:a,minY:u,x:(a+o)/2,y:(u+l)/2,height:b,width:d}},ya=function(e){var t=e.minX,n=e.minY,r=e.maxX,a=e.maxY;return[{x:t,y:n},{x:r,y:n},{x:r,y:a},{x:t,y:a}]},ga=function(e,t){var n=e.x,r=e.y;return n<t.minX||n>t.maxX||r<t.minY||r>t.maxY},jc=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},$p=function(e,t,n,r,a){return jc(e,t)+jc(e,n)+function(o,u){var l=0;return u.forEach(function(d){d&&(o.x===d.x&&(l+=-2),o.y===d.y&&(l+=-2))}),l}(e,[t,n,r,a])},Jv=function e(t,n,r,a,o){o||(o=0),t.unshift(n[a]),r[a]&&r[a]!==a&&o<=100&&e(t,n,r,r[a],o+1)},ci=function(e,t,n,r){var a=t.x-e.x,o=t.y-e.y,u=r.x-n.x,l=r.y-n.y,d=(-o*(e.x-n.x)+a*(e.y-n.y))/(-u*o+a*l),b=(u*(e.y-n.y)-l*(e.x-n.x))/(-u*o+a*l);return d>=0&&d<=1&&b>=0&&b<=1},ed=function(e,t,n){if(n.width===0&&n.height===0)return!1;var r=Ec(ya(n),4),a=r[0],o=r[1],u=r[2],l=r[3];return ci(e,t,a,o)||ci(e,t,a,l)||ci(e,t,o,u)||ci(e,t,u,l)},Zv=function(e,t,n,r,a,o,u){var l=[],d=[t],b={},O={},j={};O[t.id]=0,j[t.id]=$p(t,n,t);var C={};e.forEach(function(te){C[te.id]=te});for(var R=function(){var te,ue,ae,ge=void 0,ve=1/0;if(d.forEach(function(_e){j[_e.id]<ve&&(ve=j[_e.id],ge=_e)}),ge===n){var Me=[];return Jv(Me,C,b,n.id),{v:Me}}ue=ge,(ae=(te=d).indexOf(ue))>-1&&te.splice(ae,1),l.push(ge),function(_e,Fe,He,Re){var yt=[];return _e.forEach(function(vt){vt!==Fe&&(vt.x!==Fe.x&&vt.y!==Fe.y||ed(vt,Fe,He)||ed(vt,Fe,Re)||yt.push(vt))}),_c(yt)}(e,ge,r,a).forEach(function(_e){if(l.indexOf(_e)===-1){d.indexOf(_e)===-1&&d.push(_e);var Fe=j[ge.id]+jc(ge,_e);O[_e.id]&&Fe>=O[_e.id]||(b[_e.id]=ge.id,O[_e.id]=Fe,j[_e.id]=O[_e.id]+$p(_e,n,t,o,u))}})};d.length;){var X=R();if(Oc(X)==="object")return X.v}return[t,n]},td=function(e){return On(e)},Sc=function(e){for(var t=e,n=1;n<t.length-1;){var r=t[n-1],a=t[n],o=t[n+1];r.x===a.x&&a.x===o.x||r.y===a.y&&a.y===o.y?t.splice(n,1):n++}return t},nd=function(e,t,n,r,a){var o,u,l=td(n),d=td(r),b=da(l,a),O=da(d,a),j=ha(b,e),C=ha(O,t);if(o=b,u=O,2*Math.abs(o.centerX-u.centerX)<o.width+u.width&&2*Math.abs(o.centerY-u.centerY)<o.height+u.height){var R=qv(e,t,j,C);return[e,j].concat(Xv(R),[C,t])}var X=ui([j,C]),te=qp(b,X),ue=qp(O,X),ae=[];ae=(ae=ae.concat(ya(te))).concat(ya(ue));var ge={x:(e.x+t.x)/2,y:(e.y+t.y)/2};[X,te,ue].forEach(function(Me){ae=ae.concat(function(_e,Fe){return function(He,Re){return Re<He.minX||Re>He.maxX?[]:[{x:Re,y:He.minY},{x:Re,y:He.maxY}]}(_e,Fe.x).concat(function(He,Re){return Re<He.minY||Re>He.maxY?[]:[{x:He.minX,y:Re},{x:He.maxX,y:Re}]}(_e,Fe.y))}(Me,ge).filter(function(_e){return ga(_e,b)&&ga(_e,O)}))}),[{x:j.x,y:C.y},{x:C.x,y:j.y}].forEach(function(Me){ga(Me,b)&&ga(Me,O)&&ae.push(Me)}),ae.unshift(j),ae.push(C),ae=_c(ae);var ve=Zv(ae,j,C,l,d,e,t);return ve.unshift(e),ve.push(t),ve.length>2&&(ve=Sc(ve)),_c(ve)},Kv=function(e){var t;if(e.length===1)t=[e[0],e[0]];else if(e.length>=2){for(var n=e[0],r=e[1],a=Jn(n.x,n.y,r.x,r.y),o=1;o<e.length-1;o++){var u=e[o],l=e[o+1],d=Jn(u.x,u.y,l.x,l.y);d>a&&(a=d,n=u,r=l)}t=[n,r]}return t},rd=function(e,t,n){var r=Dr(e,n),a=Dr(t,n);return r&&a},od=function(e,t,n){var r=Dr(e,n),a=Dr(t,n);return!(r&&a)&&(r||a)},id=function(e,t,n){for(var r,a,o=On(n),u=ya(o),l=0;l<u.length;l++)ci(e,t,u[l],u[(l+1)%u.length])&&(a=[u[l],u[(l+1)%u.length]]);return a&&(r=function(d,b,O,j){var C=(b.y-d.y)*(j.x-O.x)-(d.x-b.x)*(O.y-j.y);if(C===0)return!1;var R=((b.x-d.x)*(j.x-O.x)*(O.y-d.y)+(b.y-d.y)*(j.x-O.x)*d.x-(j.y-O.y)*(b.x-d.x)*O.x)/C,X=-((b.y-d.y)*(j.y-O.y)*(O.x-d.x)+(b.x-d.x)*(j.y-O.y)*d.y-(j.x-O.x)*(b.y-d.y)*O.y)/C;return(R-d.x)*(R-b.x)<=0&&(X-d.y)*(X-b.y)<=0&&(R-O.x)*(R-j.x)<=0&&(X-O.y)*(X-j.y)<=0&&{x:R,y:X}}(e,t,a[0],a[1])),r},Aa=function(e,t){var n;return e.x===t.x?n=St.VERTICAL:e.y===t.y&&(n=St.HORIZONTAL),n},bo=function(e){var t=e.split(" "),n=[];return t&&t.forEach(function(r){var a=Ec(r.split(","),2),o=a[0],u=a[1];n.push({x:Number(o),y:Number(u)})}),n},qv=function(e,t,n,r){var a=[];if(Aa(e,n)===Aa(t,r))e.y===n.y?(a.push({x:n.x,y:(n.y+r.y)/2}),a.push({x:r.x,y:(n.y+r.y)/2})):(a.push({x:(n.x+r.x)/2,y:n.y}),a.push({x:(n.x+r.x)/2,y:r.y}));else{var o={x:n.x,y:r.y},u=ri(o,e,n),l=ri(o,t,r);if(u||l)o={x:r.x,y:n.y};else{var d=ad(o,e,n),b=ad(o,t,r);d&&b&&(o={x:r.x,y:n.y})}a.push(o)}return a},ad=function(e,t,n){return e.x===t.x&&e.x===n.x||e.y===t.y&&e.y===n.y},ud=function(e){if(!e)return 0;for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);e.match(/[A-Z]/)?t+=1.5:t+=r>=1&&r<=126||r>=65376&&r<=65439?1:2}return t},cd=function(e){var t=e.start,n=e.end,r=e.sourceNode,a=e.targetNode,o=e.offset,u=On(r),l=On(a),d=da(u,o),b=da(l,o);return{sNext:ha(d,t),ePre:ha(b,n)}},va=function(e){var t=e.replace(/M/g,"").replace(/C/g,",").split(",");return[ba(t[0]),ba(t[1]),ba(t[2]),ba(t[3])]},ba=function(e){var t=Ec(e.replace(/(^\s*)/g,"").split(" "),2);return{x:+t[0],y:+t[1]}},sd=function(e,t){for(var n,r=e.x,a=e.y,o=bo(t),u=Number.MAX_SAFE_INTEGER,l=[],d=0;d<o.length;d++)l.push({start:o[d],end:o[(d+1)%o.length]});if(l.forEach(function(C){var R=C.start,X=C.end;if(R.x===X.x){var te={x:R.x,y:a};if(ri(te,R,X)){var ue=Math.abs(R.x-r);ue<u&&(u=ue,n=te)}}else if(R.y===X.y){var ae={x:r,y:R.y};if(ri(ae,R,X)){var ge=Math.abs(R.y-a);ge<u&&(u=ge,n=ae)}}}),!n){var b=l[0],O=b.start,j=b.end;n={x:O.x+(j.x-O.x)/2,y:O.y+(j.y-O.y)/2}}return n},$v=function(e){return ti(e,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},ld=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))};i(204);var mo=function(){};function eb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zn=window.document;function kc(e){var t=e.onDragStart,n=t===void 0?mo:t,r=e.onDraging,a=r===void 0?mo:r,o=e.onDragEnd,u=o===void 0?mo:o,l=e.step,d=l===void 0?1:l,b=e.isStopPropagation,O=b===void 0||b,j=!1,C=!1,R=0,X=0,te=0,ue=0;function ae(ve){if(O&&ve.stopPropagation(),C&&(j=!0,te+=ve.clientX-R,ue+=ve.clientY-X,R=ve.clientX,X=ve.clientY,Math.abs(te)>d||Math.abs(ue)>d)){var Me=te%d,_e=ue%d,Fe=te-Me,He=ue-_e;te=Me,ue=_e,a({deltaX:Fe,deltaY:He,event:ve})}}function ge(ve){if(O&&ve.stopPropagation(),C=!1,Zn.removeEventListener("mousemove",ae,!1),Zn.removeEventListener("mouseup",ge,!1),j)return j=!1,u({event:ve})}return function(ve){if(ve.button===0)return O&&ve.stopPropagation(),C=!0,R=ve.clientX,X=ve.clientY,Zn.addEventListener("mousemove",ae,!1),Zn.addEventListener("mouseup",ge,!1),n({event:ve})}}var de,fd,pd,dd,hd,yd,gd,Ad,vd,bd,md,wd,Od,Jr=function(){function e(r){var a=this,o=r.onDragStart,u=o===void 0?mo:o,l=r.onDraging,d=l===void 0?mo:l,b=r.onDragEnd,O=b===void 0?mo:b,j=r.eventType,C=j===void 0?"":j,R=r.eventCenter,X=R===void 0?null:R,te=r.step,ue=te===void 0?1:te,ae=r.isStopPropagation,ge=ae===void 0||ae,ve=r.model,Me=ve===void 0?null:ve;(function(_e,Fe){if(!(_e instanceof Fe))throw new TypeError("Cannot call a class as a function")})(this,e),Qt(this,"onDragStart",void 0),Qt(this,"onDraging",void 0),Qt(this,"onDragEnd",void 0),Qt(this,"step",void 0),Qt(this,"isStopPropagation",void 0),Qt(this,"isDraging",!1),Qt(this,"isStartDraging",!1),Qt(this,"startX",0),Qt(this,"startY",0),Qt(this,"sumDeltaX",0),Qt(this,"sumDeltaY",0),Qt(this,"eventType",void 0),Qt(this,"eventCenter",void 0),Qt(this,"model",void 0),Qt(this,"startTime",void 0),Qt(this,"isGrag",void 0),Qt(this,"handleMouseDown",function(_e){var Fe,He;if(_e.button===0){a.isStopPropagation&&_e.stopPropagation(),a.isStartDraging=!0,a.startX=_e.clientX,a.startY=_e.clientY,Zn.addEventListener("mousemove",a.handleMouseMove,!1),Zn.addEventListener("mouseup",a.handleMouseUp,!1);var Re=(Fe=a.model)===null||Fe===void 0?void 0:Fe.getData();(He=a.eventCenter)===null||He===void 0||He.emit(at["".concat(a.eventType,"_MOUSEDOWN")],{e:_e,data:Re}),a.startTime=new Date().getTime()}}),Qt(this,"handleMouseMove",function(_e){if(a.isStopPropagation&&_e.stopPropagation(),a.isStartDraging&&(a.sumDeltaX+=_e.clientX-a.startX,a.sumDeltaY+=_e.clientY-a.startY,a.startX=_e.clientX,a.startY=_e.clientY,a.step<=1||Math.abs(a.sumDeltaX)>a.step||Math.abs(a.sumDeltaY)>a.step)){var Fe,He=a.sumDeltaX%a.step,Re=a.sumDeltaY%a.step,yt=a.sumDeltaX-He,vt=a.sumDeltaY-Re;a.sumDeltaX=He,a.sumDeltaY=Re;var It,Wt=(Fe=a.model)===null||Fe===void 0?void 0:Fe.getData();a.isDraging||((It=a.eventCenter)===null||It===void 0||It.emit(at["".concat(a.eventType,"_DRAGSTART")],{e:_e,data:Wt}),a.onDragStart({event:_e})),a.isDraging=!0,Promise.resolve().then(function(){var Kt,nn;a.onDraging({deltaX:yt,deltaY:vt,event:_e}),(Kt=a.eventCenter)===null||Kt===void 0||Kt.emit(at["".concat(a.eventType,"_MOUSEMOVE")],{e:_e,data:Wt}),(nn=a.eventCenter)===null||nn===void 0||nn.emit(at["".concat(a.eventType,"_DRAG")],{e:_e,data:Wt})})}}),Qt(this,"handleMouseUp",function(_e){a.isStartDraging=!1,a.isStopPropagation&&_e.stopPropagation(),Promise.resolve().then(function(){var Fe,He,Re;Zn.removeEventListener("mousemove",a.handleMouseMove,!1),Zn.removeEventListener("mouseup",a.handleMouseUp,!1);var yt=(Fe=a.model)===null||Fe===void 0?void 0:Fe.getData();(He=a.eventCenter)===null||He===void 0||He.emit(at["".concat(a.eventType,"_MOUSEUP")],{e:_e,data:yt}),a.isDraging&&(a.isDraging=!1,a.onDragEnd({event:_e}),(Re=a.eventCenter)===null||Re===void 0||Re.emit(at["".concat(a.eventType,"_DROP")],{e:_e,data:yt}))})}),Qt(this,"cancelDrag",function(){Zn.removeEventListener("mousemove",a.handleMouseMove,!1),Zn.removeEventListener("mouseup",a.handleMouseUp,!1),a.isDraging=!1}),this.onDragStart=u,this.onDraging=d,this.onDragEnd=O,this.step=ue,this.isStopPropagation=ge,this.eventType=C,this.eventCenter=X,this.model=Me}var t,n;return t=e,(n=[{key:"setStep",value:function(r){this.step=r}}])&&eb(t.prototype,n),e}();function Ed(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ed(Object(n),!0).forEach(function(r){dr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ed(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xd(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||_d(e,t)||function(){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 wo(e){return function(t){if(Array.isArray(t))return Pc(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||_d(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _d(e,t){if(e){if(typeof e=="string")return Pc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pc(e,t):void 0}}function Pc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wa(e){return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function Dn(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function tb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var jd,Sd=200,kd=(de=function(){function e(r){(function(j,C){if(!(j instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e),dr(this,"rootEl",void 0),Dn(this,"width",fd,this),Dn(this,"height",pd,this),dr(this,"theme",void 0),dr(this,"eventCenter",void 0),dr(this,"modelMap",new Map),dr(this,"topElement",void 0),dr(this,"animation",void 0),dr(this,"idGenerator",void 0),dr(this,"nodeMoveRules",[]),Dn(this,"edgeType",dd,this),Dn(this,"nodes",hd,this),Dn(this,"edges",yd,this),Dn(this,"overlapMode",gd,this),Dn(this,"background",Ad,this),Dn(this,"transformModel",vd,this),Dn(this,"editConfigModel",bd,this),Dn(this,"gridSize",md,this),Dn(this,"partial",wd,this),Dn(this,"fakerNode",Od,this);var a,o=r.container,u=r.background,l=u===void 0?{}:u,d=r.grid,b=r.idGenerator,O=r.animation;this.background=l,wa(d)==="object"&&(this.gridSize=d.size),this.rootEl=o,this.editConfigModel=new Qf(r),this.eventCenter=new bv,this.transformModel=new zA(this.eventCenter),this.theme=sp(r.style),this.edgeType=r.edgeType||"polyline",r.width||(r.width=o.getBoundingClientRect().width),r.height||(r.height=o.getBoundingClientRect().height),this.width=r.width,this.height=r.height,this.animation=(a=O)&&typeof a!="boolean"?cp(Ct(Qp),a):Ct(a===!0?Dv:Qp),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=b}var t,n;return t=e,n=[{key:"nodesMap",get:function(){return this.nodes.reduce(function(r,a,o){return r[a.id]={index:o,model:a},r},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(r,a,o){return r[a.id]={index:o,model:a},r},{})}},{key:"modelsMap",get:function(){return[].concat(wo(this.nodes),wo(this.edges)).reduce(function(r,a){return r[a.id]=a,r},{})}},{key:"sortElements",get:function(){var r=[];this.nodes.forEach(function(j){return r.push(j)}),this.edges.forEach(function(j){return r.push(j)}),r=r.sort(function(j,C){return j.zIndex-C.zIndex});for(var a=[],o=-1,u=[-200,-200],l=[this.width+Sd,this.height+Sd],d=0;d<r.length;d++){var b=r[d];b.visible&&(!this.partial||b.isSelected||this.isElementInArea(b,u,l,!1,!1))&&(b.zIndex===9999&&(o=a.length),a.push(b))}if(o!==-1){var O=a[a.length-1];a[a.length-1]=a[o],a[o]=O}return a}},{key:"textEditElement",get:function(){var r=this.nodes.find(function(o){return o.state===Ot.TEXT_EDIT}),a=this.edges.find(function(o){return o.state===Ot.TEXT_EDIT});return r||a}},{key:"selectElements",get:function(){var r=new Map;return this.nodes.forEach(function(a){a.isSelected&&r.set(a.id,a)}),this.edges.forEach(function(a){a.isSelected&&r.set(a.id,a)}),r}},{key:"getAreaElement",value:function(r,a){var o=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],l=[],d=[];this.nodes.forEach(function(j){return d.push(j)}),this.edges.forEach(function(j){return d.push(j)});for(var b=0;b<d.length;b++){var O=d[b];this.isElementInArea(O,r,a,o,u)&&l.push(O)}return l}},{key:"getModel",value:function(r){return this.modelMap.get(r)}},{key:"getNodeModelById",value:function(r){var a;return this.fakerNode&&r===this.fakerNode.id?this.fakerNode:(a=this.nodesMap[r])===null||a===void 0?void 0:a.model}},{key:"getPointByClient",value:function(r){var a=r.x,o=r.y,u=this.rootEl.getBoundingClientRect(),l={x:a-u.left,y:o-u.top},d=xd(this.transformModel.HtmlPointToCanvasPoint([l.x,l.y]),2);return{domOverlayPosition:l,canvasOverlayPosition:{x:d[0],y:d[1]}}}},{key:"isElementInArea",value:function(r,a,o){var u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],l=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(r.BaseType===Gt.NODE){for(var d=On(r=r),b=d.minX,O=d.minY,j=d.maxX,C=d.maxY,R=[{x:b,y:O},{x:j,y:O},{x:j,y:C},{x:b,y:C}],X=l,te=0;te<R.length;te++){var ue=R[te],ae=ue.x,ge=ue.y,ve=this.transformModel.CanvasPointToHtmlPoint([ae,ge]),Me=xd(ve,2);if(ae=Me[0],ge=Me[1],oc([ae,ge],a,o)!==l){X=!l;break}}return X}if(r.BaseType===Gt.EDGE){var _e=r=r,Fe=_e.startPoint,He=_e.endPoint,Re=this.transformModel.CanvasPointToHtmlPoint([Fe.x,Fe.y]),yt=this.transformModel.CanvasPointToHtmlPoint([He.x,He.y]),vt=oc(Re,a,o),It=oc(yt,a,o);return u?vt&&It:vt||It}return!1}},{key:"graphDataToModel",value:function(r){var a=this;this.nodes=aa(r.nodes,function(o){var u=a.getModel(o.type);if(!u)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8282\u70B9\u3002"));var l=o.x,d=o.y;return l&&d&&(o.x=Ao(l,a.gridSize),o.y=Ao(d,a.gridSize),wa(o.text)==="object"&&(o.text.x-=lp(l,a.gridSize),o.text.y-=lp(d,a.gridSize))),new u(o,a)}),this.edges=aa(r.edges,function(o){var u=a.getModel(o.type);if(!u)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8FB9\u3002"));return new u(o,a)})}},{key:"modelToGraphData",value:function(){var r=[];this.edges.forEach(function(o){var u=o.getData();u&&r.push(u)});var a=[];return this.nodes.forEach(function(o){var u=o.getData();u&&a.push(u)}),{nodes:a,edges:r}}},{key:"modelToHistoryData",value:function(){for(var r=!1,a=[],o=0;o<this.nodes.length;o++){var u=this.nodes[o];if(u.isDragging){r=!0;break}a.push(u.getHistoryData())}if(r)return!1;for(var l=!1,d=[],b=0;b<this.edges.length;b++){var O=this.edges[b];if(O.isDragging){l=!0;break}d.push(O.getHistoryData())}return!l&&{nodes:a,edges:d}}},{key:"getEdgeModelById",value:function(r){var a;return(a=this.edgesMap[r])===null||a===void 0?void 0:a.model}},{key:"getElement",value:function(r){return this.modelsMap[r]}},{key:"getNodeEdges",value:function(r){for(var a=[],o=0;o<this.edges.length;o++){var u=this.edges[o],l=this.edges[o].sourceNodeId===r,d=this.edges[o].targetNodeId===r;(l||d)&&a.push(u)}return a}},{key:"getSelectElements",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],a=this.selectElements,o={nodes:[],edges:[]};return a.forEach(function(u){if(u.BaseType===Gt.NODE&&o.nodes.push(u.getData()),u.BaseType===Gt.EDGE){var l=u.getData(),d=a.get(l.sourceNodeId)&&a.get(l.targetNodeId);(r||d)&&o.edges.push(l)}}),o}},{key:"updateAttributes",value:function(r,a){this.getElement(r).updateAttributes(a)}},{key:"changeNodeId",value:function(r,a){return a||(a=Xr()),this.nodesMap[a]?"":this.nodesMap[r]?(this.edges.forEach(function(o){o.sourceNodeId===r&&(o.sourceNodeId=a),o.targetNodeId===r&&(o.targetNodeId=a)}),this.nodesMap[r].model.id=a,a):""}},{key:"changeEdgeId",value:function(r,a){return a||(a=Xr()),this.edgesMap[a]?"":this.edgesMap[r]?(this.edges.forEach(function(o){o.id===r&&(o.id=a)}),a):""}},{key:"setFakerNode",value:function(r){this.fakerNode=r}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(r,a){return this.modelMap.set(r,a)}},{key:"toFront",value:function(r){var a,o,u,l=((a=this.nodesMap[r])===null||a===void 0?void 0:a.model)||((o=this.edgesMap[r])===null||o===void 0?void 0:o.model);l&&(this.overlapMode===wn.DEFAULT&&((u=this.topElement)===null||u===void 0||u.setZIndex(),l.setZIndex(9999),this.topElement=l),this.overlapMode===wn.INCREASE&&this.setElementZIndex(r,"top"))}},{key:"setElementZIndex",value:function(r,a){var o,u,l,d=((o=this.nodesMap[r])===null||o===void 0?void 0:o.model)||((u=this.edgesMap[r])===null||u===void 0?void 0:u.model);d&&(typeof a=="number"&&(l=a),a==="top"&&(l=fc()),a==="bottom"&&(l=--Mv),d.setZIndex(l))}},{key:"deleteNode",value:function(r){var a=this.nodesMap[r].model.getData();this.deleteEdgeBySource(r),this.deleteEdgeByTarget(r),this.nodes.splice(this.nodesMap[r].index,1),this.eventCenter.emit(at.NODE_DELETE,{data:a})}},{key:"addNode",value:function(r){var a=$t(r);a.id&&this.nodesMap[r.id]&&delete a.id;var o=this.getModel(a.type);if(!o)throw new Error("\u627E\u4E0D\u5230".concat(a.type,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var u=new o(a,this);this.nodes.push(u);var l=u.getData();return this.eventCenter.emit(at.NODE_ADD,{data:l}),u}},{key:"cloneNode",value:function(r){var a=this.getNodeModelById(r),o=a.getData();o.x+=30,o.y+=30,delete o.id,o.text&&(o.text.x+=30,o.text.y+=30);var u=this.addNode(o);return u.setSelected(!0),a.setSelected(!1),u.getData()}},{key:"moveNode",value:function(r,a,o){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],l=this.nodesMap[r];if(l){var d=l.model,b=d.move(a,o,u);b&&this.moveEdge(r,a,o)}}},{key:"moveNode2Coordinate",value:function(r,a,o){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],l=this.nodesMap[r];if(l){var d=l.model,b=d.x,O=d.y,j=a-b,C=o-O;this.moveNode(r,j,C,u)}}},{key:"editText",value:function(r){this.setElementStateById(r,Ot.TEXT_EDIT)}},{key:"addEdge",value:function(r){var a=$t(r),o=a.type;o||(o=this.edgeType),a.id&&this.edgesMap[a.id]&&delete a.id;var u=this.getModel(o);if(!u)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 u(ma(ma({},a),{},{type:o}),this),d=l.getData();return this.edges.push(l),this.eventCenter.emit(at.EDGE_ADD,{data:d}),l}},{key:"moveEdge",value:function(r,a,o){for(var u=0;u<this.edges.length;u++){var l,d=this.edges[u],b=d.textPosition,O=b.x,j=b.y,C=this.edges[u].sourceNodeId===r,R=this.edges[u].targetNodeId===r;if(C&&d.moveStartPoint(a,o),R&&d.moveEndPoint(a,o),C||R)if(d.customTextPosition===!0)d.resetTextPosition();else if(d.modelType===pt.POLYLINE_EDGE&&(l=d.text)!==null&&l!==void 0&&l.value){var X=d.text,te=sd(X,d.points);d.moveText(te.x-X.x,te.y-X.y)}else{var ue=d.textPosition,ae=ue.x,ge=ue.y;d.moveText(ae-O,ge-j)}}}},{key:"deleteEdgeBySourceAndTarget",value:function(r,a){for(var o=0;o<this.edges.length;o++)if(this.edges[o].sourceNodeId===r&&this.edges[o].targetNodeId===a){var u=this.edges[o].getData();this.edges.splice(o,1),o--,this.eventCenter.emit(at.EDGE_DELETE,{data:u})}}},{key:"deleteEdgeById",value:function(r){if(this.edgesMap[r]){var a=this.edgesMap[r].index,o=this.edgesMap[r].model.getData();this.edges.splice(a,1),this.eventCenter.emit(at.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeBySource",value:function(r){for(var a=0;a<this.edges.length;a++)if(this.edges[a].sourceNodeId===r){var o=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(at.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeByTarget",value:function(r){for(var a=0;a<this.edges.length;a++)if(this.edges[a].targetNodeId===r){var o=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(at.EDGE_DELETE,{data:o})}}},{key:"setElementStateById",value:function(r,a,o){this.nodes.forEach(function(u){u.id===r?u.setElementState(a,o):u.setElementState(Ot.DEFAULT)}),this.edges.forEach(function(u){u.id===r?u.setElementState(a,o):u.setElementState(Ot.DEFAULT)})}},{key:"updateText",value:function(r,a){this.nodes.forEach(function(o){o.id===r&&o.updateText(a)}),this.edges.forEach(function(o){o.id===r&&o.updateText(a)})}},{key:"selectNodeById",value:function(r){var a,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];o||this.clearSelectElements();var u=(a=this.nodesMap[r])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectEdgeById",value:function(r){var a,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];o||this.clearSelectElements();var u=(a=this.edgesMap[r])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectElementById",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a||this.clearSelectElements();var o=this.getElement(r);o==null||o.setSelected(!0)}},{key:"clearSelectElements",value:function(){var r;this.selectElements.forEach(function(a){a==null||a.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===wn.DEFAULT&&((r=this.topElement)===null||r===void 0||r.setZIndex())}},{key:"moveNodes",value:function(r,a,o){var u=this,l=arguments.length>3&&arguments[3]!==void 0&&arguments[3];r.forEach(function(d){return u.moveNode(d,a,o,l)})}},{key:"addNodeMoveRules",value:function(r){this.nodeMoveRules.includes(r)||this.nodeMoveRules.push(r)}},{key:"setDefaultEdgeType",value:function(r){this.edgeType=r}},{key:"changeNodeType",value:function(r,a){var o=this.getNodeModelById(r);if(o){var u=o.getData();u.type=a;var l=this.getModel(a);if(!l)throw new Error("\u627E\u4E0D\u5230".concat(a,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var d=new l(u,this);this.nodes.splice(this.nodesMap[r].index,1,d),this.getNodeEdges(r).forEach(function(b){if(b.sourceNodeId===r){var O=zp(d,b.startPoint,d.width,d.height);b.updateStartPoint(O)}if(b.targetNodeId===r){var j=zp(d,b.endPoint,d.width,d.height);b.updateEndPoint(j)}})}}},{key:"changeEdgeType",value:function(r,a){var o=this.getEdgeModelById(r);if(o&&o.type!==a){var u=o.getData();u.type=a;var l=this.getModel(a);if(!l)throw new Error("\u627E\u4E0D\u5230".concat(a,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));delete u.pointsList;var d=new l(u,this);this.edges.splice(this.edgesMap[r].index,1,d)}}},{key:"getNodeIncomingEdge",value:function(r){var a=[];return this.edges.forEach(function(o){o.targetNodeId===r&&a.push(o)}),a}},{key:"getNodeOutgoingEdge",value:function(r){var a=[];return this.edges.forEach(function(o){o.sourceNodeId===r&&a.push(o)}),a}},{key:"getNodeIncomingNode",value:function(r){var a=this,o=[];return this.edges.forEach(function(u){u.targetNodeId===r&&o.push(a.nodesMap[u.sourceNodeId].model)}),o}},{key:"getNodeOutgoingNode",value:function(r){var a=this,o=[];return this.edges.forEach(function(u){u.sourceNodeId===r&&o.push(a.nodesMap[u.targetNodeId].model)}),o}},{key:"setTheme",value:function(r){this.theme=sp(ma(ma({},this.theme),r))}},{key:"resize",value:function(r,a){this.width=r!=null?r:this.width,this.height=a!=null?a:this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var r=this.nodes,a=[],o=[];r.forEach(function(j){var C=j.x,R=j.y,X=j.width,te=j.height,ue=j.getNodeStyle().strokeWidth,ae=ue===void 0?0:ue;a=a.concat([C+X/2+ae,C-X/2-ae]),o=o.concat([R+te/2+ae,R-te/2-ae])});var u=Math.min.apply(Math,wo(a)),l=Math.max.apply(Math,wo(a)),d=Math.min.apply(Math,wo(o)),b=l-u||0,O=Math.max.apply(Math,wo(o))-d||0;return{virtualRectWidth:b,virtualRectHeight:O,virtualRectCenterPositionX:u+b/2,virtualRectCenterPositionY:d+O/2}}},{key:"translateCenter",value:function(){var r=this.nodes,a=this.width,o=this.height,u=this.rootEl,l=this.transformModel;if(r.length){var d=a||u.clientWidth,b=o||u.clientHeight,O=this.getVirtualRectSize(),j=O.virtualRectCenterPositionX,C=O.virtualRectCenterPositionY;l.focusOn(j,C,d,b)}}},{key:"fitView",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,o=this.nodes,u=this.width,l=this.height,d=this.rootEl,b=this.transformModel;if(o.length){var O=u||d.clientWidth,j=l||d.clientHeight,C=this.getVirtualRectSize(),R=C.virtualRectWidth,X=C.virtualRectHeight,te=C.virtualRectCenterPositionX,ue=C.virtualRectCenterPositionY,ae=(R+a)/O,ge=(X+r)/j,ve=0;ve=1/Math.max(ae,ge);var Me=[O/2,j/2];b.zoom(ve,Me),b.focusOn(te,ue,O,j)}}},{key:"openEdgeAnimation",value:function(r){this.getEdgeModelById(r).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(r){this.getEdgeModelById(r).closeEdgeAnimation()}}],n&&tb(t.prototype,n),e}(),fd=Je(de.prototype,"width",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pd=Je(de.prototype,"height",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dd=Je(de.prototype,"edgeType",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hd=Je(de.prototype,"nodes",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),yd=Je(de.prototype,"edges",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),gd=Je(de.prototype,"overlapMode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wn.DEFAULT}}),Ad=Je(de.prototype,"background",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vd=Je(de.prototype,"transformModel",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bd=Je(de.prototype,"editConfigModel",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),md=Je(de.prototype,"gridSize",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wd=Je(de.prototype,"partial",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Od=Je(de.prototype,"fakerNode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Je(de.prototype,"nodesMap",[s.m],Object.getOwnPropertyDescriptor(de.prototype,"nodesMap"),de.prototype),Je(de.prototype,"edgesMap",[s.m],Object.getOwnPropertyDescriptor(de.prototype,"edgesMap"),de.prototype),Je(de.prototype,"modelsMap",[s.m],Object.getOwnPropertyDescriptor(de.prototype,"modelsMap"),de.prototype),Je(de.prototype,"sortElements",[s.m],Object.getOwnPropertyDescriptor(de.prototype,"sortElements"),de.prototype),Je(de.prototype,"textEditElement",[s.m],Object.getOwnPropertyDescriptor(de.prototype,"textEditElement"),de.prototype),Je(de.prototype,"selectElements",[s.m],Object.getOwnPropertyDescriptor(de.prototype,"selectElements"),de.prototype),Je(de.prototype,"setFakerNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"setFakerNode"),de.prototype),Je(de.prototype,"removeFakerNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"removeFakerNode"),de.prototype),Je(de.prototype,"setModel",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"setModel"),de.prototype),Je(de.prototype,"toFront",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"toFront"),de.prototype),Je(de.prototype,"setElementZIndex",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"setElementZIndex"),de.prototype),Je(de.prototype,"deleteNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteNode"),de.prototype),Je(de.prototype,"addNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"addNode"),de.prototype),Je(de.prototype,"cloneNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"cloneNode"),de.prototype),Je(de.prototype,"moveNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNode"),de.prototype),Je(de.prototype,"moveNode2Coordinate",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNode2Coordinate"),de.prototype),Je(de.prototype,"editText",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"editText"),de.prototype),Je(de.prototype,"addEdge",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"addEdge"),de.prototype),Je(de.prototype,"moveEdge",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"moveEdge"),de.prototype),Je(de.prototype,"deleteEdgeBySourceAndTarget",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeBySourceAndTarget"),de.prototype),Je(de.prototype,"deleteEdgeById",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeById"),de.prototype),Je(de.prototype,"deleteEdgeBySource",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeBySource"),de.prototype),Je(de.prototype,"deleteEdgeByTarget",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeByTarget"),de.prototype),Je(de.prototype,"setElementStateById",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"setElementStateById"),de.prototype),Je(de.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"updateText"),de.prototype),Je(de.prototype,"selectNodeById",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"selectNodeById"),de.prototype),Je(de.prototype,"selectEdgeById",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"selectEdgeById"),de.prototype),Je(de.prototype,"selectElementById",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"selectElementById"),de.prototype),Je(de.prototype,"clearSelectElements",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"clearSelectElements"),de.prototype),Je(de.prototype,"moveNodes",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNodes"),de.prototype),Je(de.prototype,"setDefaultEdgeType",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"setDefaultEdgeType"),de.prototype),Je(de.prototype,"changeNodeType",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"changeNodeType"),de.prototype),Je(de.prototype,"changeEdgeType",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"changeEdgeType"),de.prototype),Je(de.prototype,"getNodeIncomingEdge",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeIncomingEdge"),de.prototype),Je(de.prototype,"getNodeOutgoingEdge",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeOutgoingEdge"),de.prototype),Je(de.prototype,"getNodeIncomingNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeIncomingNode"),de.prototype),Je(de.prototype,"getNodeOutgoingNode",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeOutgoingNode"),de.prototype),Je(de.prototype,"setTheme",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"setTheme"),de.prototype),Je(de.prototype,"resize",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"resize"),de.prototype),Je(de.prototype,"clearData",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"clearData"),de.prototype),Je(de.prototype,"translateCenter",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"translateCenter"),de.prototype),Je(de.prototype,"fitView",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"fitView"),de.prototype),Je(de.prototype,"openEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"openEdgeAnimation"),de.prototype),Je(de.prototype,"closeEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(de.prototype,"closeEdgeAnimation"),de.prototype),de),nb=kd;function Dc(e){return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function Cc(){return Cc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cc.apply(this,arguments)}function rb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nc(e,t){return Nc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Nc(e,t)}function ob(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Oa(e);if(t){var a=Oa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ib(this,n)}}function ib(e,t){if(t&&(Dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kn(e)}function Kn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oa(e){return Oa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Oa(e)}function hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pd,ab=Fn(jd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Nc(o,u)})(a,e);var t,n,r=ob(a);function a(o){var u;(function(O,j){if(!(O instanceof j))throw new TypeError("Cannot call a class as a function")})(this,a),hr(Kn(u=r.call(this)),"stepDrag",void 0),hr(Kn(u),"stepScrollX",0),hr(Kn(u),"stepScrollY",0),hr(Kn(u),"onDraging",function(O){var j=O.deltaX,C=O.deltaY;u.setState({isDraging:!0});var R=u.props.graphModel,X=R.transformModel;R.editConfigModel.stopMoveGraph||X.translate(j,C)}),hr(Kn(u),"onDragEnd",function(){u.setState({isDraging:!1})}),hr(Kn(u),"zoomHandler",function(O){var j=u.props,C=j.graphModel,R=C.editConfigModel,X=C.transformModel,te=C.gridSize,ue=j.graphModel,ae=O.deltaX,ge=O.deltaY;if(R.stopScrollGraph||O.ctrlKey===!0){if(!R.stopZoomGraph){O.preventDefault();var ve=ue.getPointByClient({x:O.clientX,y:O.clientY}).canvasOverlayPosition,Me=ve.x,_e=ve.y;X.zoom(O.deltaY<0,[Me,_e])}}else{if(O.preventDefault(),u.stepScrollX+=ae,u.stepScrollY+=ge,Math.abs(u.stepScrollX)>=te){var Fe=u.stepScrollX%te,He=u.stepScrollX-Fe;X.translate(-He*X.SCALE_X,0),u.stepScrollX=Fe}if(Math.abs(u.stepScrollY)>=te){var Re=u.stepScrollY%te,yt=u.stepScrollY-Re;X.translate(0,-yt*X.SCALE_Y),u.stepScrollY=Re}}}),hr(Kn(u),"clickHandler",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){var j=u.props.graphModel;j.selectElements.size>0&&j.clearSelectElements(),j.eventCenter.emit(at.BLANK_CLICK,{e:O})}}),hr(Kn(u),"handleContextMenu",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){O.preventDefault();var j=u.props.graphModel,C=j.getPointByClient({x:O.clientX,y:O.clientY});j.eventCenter.emit(at.BLANK_CONTEXTMENU,{e:O,position:C})}}),hr(Kn(u),"mouseDownHandler",function(O){var j=u.props.graphModel,C=j.eventCenter,R=j.editConfigModel,X=j.transformModel.SCALE_X,te=j.gridSize,ue=O.target,ae=!R.adjustEdge&&!R.adjustNodePosition;(ue.getAttribute("name")==="canvas-overlay"||ae)&&(R.stopMoveGraph?C.emit(at.BLANK_MOUSEDOWN,{e:O}):(u.stepDrag.setStep(te*X),u.stepDrag.handleMouseDown(O)),u.clickHandler(O))});var l=o.graphModel,d=l.gridSize,b=l.eventCenter;return u.stepDrag=new Jr({onDraging:u.onDraging,onDragEnd:u.onDragEnd,step:d,eventType:"BLANK",isStopPropagation:!1,eventCenter:b,model:null}),u.state={isDraging:!1},u}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props,l=u.children,d=u.dnd,b=this.state.isDraging;return Object(ee.g)("svg",Cc({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:b?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},d.eventMap()),Object(ee.g)("g",{transform:o},l))}}])&&rb(t.prototype,n),a}(ee.a))||jd;function Mc(e){return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function ub(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bc(e,t){return Bc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bc(e,t)}function sb(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ea(e);if(t){var a=Ea(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return lb(this,n)}}function lb(e,t){if(t&&(Mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dd(e)}function Dd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ea(e){return Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ea(e)}function fb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pb=Fn(Pd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Bc(o,u)})(a,e);var t,n,r=sb(a);function a(){var o;ub(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return fb(Dd(o=r.call.apply(r,[this].concat(l))),"setToolOverlayRef",function(b){var O=o.props.tool.getInstance();O.components.forEach(function(j){return j(O,b)}),O.components=[]}),o}return t=a,(n=[{key:"getTools",value:function(){var o=this.props,u=o.tool,l=o.graphModel,d=u.getTools().map(function(b){return Object(ee.g)(b,{graphModel:l,logicFlow:u.instance})});return u.components=d,d}},{key:"render",value:function(){return Object(ee.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&cb(t.prototype,n),a}(ee.a))||Pd;function Tc(e){return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function db(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ic(e,t){return Ic=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ic(e,t)}function yb(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=xa(e);if(t){var a=xa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return gb(this,n)}}function gb(e,t){if(t&&(Tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},xa(e)}var Cd,Ab=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Ic(o,u)})(a,e);var t,n,r=yb(a);function a(){return db(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.background;return Object(ee.g)("div",{className:"lf-background"},Object(ee.g)("div",{style:o,className:"lf-background-area"}))}}])&&hb(t.prototype,n),a}(ee.a);function Rc(e){return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function vb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zc(e,t){return zc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},zc(e,t)}function mb(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=_a(e);if(t){var a=_a(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return wb(this,n)}}function wb(e,t){if(t&&(Rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nd(e)}function Nd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _a(e){return _a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_a(e)}function Ob(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Md=Fn(Cd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&zc(o,u)})(a,e);var t,n,r=mb(a);function a(){var o;vb(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Ob(Nd(o=r.call.apply(r,[this].concat(l))),"id",Xr()),o}return t=a,(n=[{key:"renderDot",value:function(){var o=this.props,u=o.config,l=u.color,d=u.thickness,b=d===void 0?2:d,O=o.size,j=o.visible,C=Math.min(Math.max(2,b),O/2),R=1;return j||(R=0),Object(ee.g)("rect",{width:C,height:C,rx:C/2,ry:C/2,fill:l,opacity:R})}},{key:"renderMesh",value:function(){var o=this.props,u=o.config,l=u.color,d=u.thickness,b=d===void 0?1:d,O=o.size,j=o.visible,C=Math.min(Math.max(1,b),O/2),R="M ".concat(O," 0 H0 M0 0 V0 ").concat(O),X=1;return j||(X=0),Object(ee.g)("path",{d:R,stroke:l,strokeWidth:C,opacity:X})}},{key:"render",value:function(){var o=this.props,u=o.type,l=o.size,d=o.graphModel.transformModel,b=[d.SCALE_X,d.SKEW_Y,d.SKEW_X,d.SCALE_Y,d.TRANSLATE_X,d.TRANSLATE_Y].join(","),O="matrix(".concat(b,")");return Object(ee.g)("div",{className:"lf-grid"},Object(ee.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(ee.g)("defs",null,Object(ee.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:O,x:"0",y:"0",width:l,height:l},u==="dot"&&this.renderDot(),u==="mesh"&&this.renderMesh())),Object(ee.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&bb(t.prototype,n),a}(ee.a))||Cd;Md.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},i(52);function Lc(e){return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(e)}function Eb(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Bd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Bd(n,r)}}(e,t)||function(){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 Bd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Td,Zr=function(e){var t={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(n){var r=Eb(n,2),a=r[0],o=r[1];(a==="style"||Lc(o)!=="object")&&(t[a]=o)}),Object(ee.g)("line",t)};function Qc(e){return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(e)}function Id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Id(Object(n),!0).forEach(function(r){xb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Id(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fc(e,t){return Fc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Fc(e,t)}function Sb(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Sa(e);if(t){var a=Sa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return kb(this,n)}}function kb(e,t){if(t&&(Qc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Sa(e){return Sa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Sa(e)}var Rd,Pb=Fn(Td=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Fc(o,u)})(a,e);var t,n,r=Sb(a);function a(){return _b(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.snaplineModel,u=o.position,l=o.isShowHorizontal,d=o.isShowVertical,b=o.getStyle(),O=u.x,j=O===void 0?0:O,C=u.y,R=C===void 0?0:C,X=ja(ja({x1:-1e5,y1:R,x2:1e5,y2:R},b),{},{stroke:l?b.stroke:"none"}),te=ja(ja({x1:j,y1:-1e5,x2:j,y2:1e5},b),{},{stroke:d?b.stroke:"none"});return Object(ee.g)("g",{className:"lf-snapline"},Object(ee.g)(Zr,X),Object(ee.g)(Zr,te))}}])&&jb(t.prototype,n),a}(ee.a))||Td;function Gc(e){return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gc(e)}function Db(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return zd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return zd(n,r)}}(e,t)||function(){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 zd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nr(e){var t=e.x,n=e.y,r=e.width,a=e.height,o=e.className,u=e.radius,l=t-r/2,d=n-a/2,b={};return Object.entries(e).forEach(function(O){var j=Db(O,2),C=j[0],R=j[1];Gc(R)!=="object"&&(b[C]=R)}),b.className=o?"lf-basic-shape ".concat(o):"lf-basic-shape",u&&(b.rx=u,b.ry=u),b.x=l,b.y=d,Object(ee.g)("rect",b)}function Yc(e){return Yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yc(e)}function Oo(){return Oo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oo.apply(this,arguments)}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Qd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ld(Object(n),!0).forEach(function(r){Cb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uc(e,t){return Uc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Uc(e,t)}function Bb(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ka(e);if(t){var a=ka(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Tb(this,n)}}function Tb(e,t){if(t&&(Yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ka(e)}Nr.defaultProps={className:"",radius:""};var Fd,Ib=Fn(Rd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Uc(o,u)})(a,e);var t,n,r=Bb(a);function a(){return Nb(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getNodesOutline",value:function(){var o=this.props.graphModel,u=o.nodes,l=o.editConfigModel,d=l.hoverOutline,b=l.nodeSelectedOutline,O=[];return u.forEach(function(j){if(j.isHovered||j.isSelected){var C=j.isHovered,R=j.isSelected,X=j.x,te=j.y,ue=j.width,ae=j.height;if(b&&R||d&&C){var ge=j.getOutlineStyle(),ve={};if(Object.keys(ge).forEach(function(_e){_e!=="hover"&&(ve[_e]=ge[_e])}),C){var Me=ge.hover;ve=Qd(Qd({},ve),Me)}O.push(Object(ee.g)(Nr,Oo({className:"lf-outline-node",x:X,y:te,width:ue+10,height:ae+10},ve)))}}}),O}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,u=o.edges,l=o.editConfigModel,d=l.edgeSelectedOutline,b=l.hoverOutline,O=[],j=0;j<u.length;j++){var C=u[j];(d&&C.isSelected||b&&C.isHovered)&&(C.modelType===pt.LINE_EDGE?O.push(this.getLineOutline(C)):C.modelType===pt.POLYLINE_EDGE?O.push(this.getPolylineOutline(C)):C.modelType===pt.BEZIER_EDGE&&O.push(this.getBezierOutline(C)))}return O}},{key:"getLineOutline",value:function(o){var u=o.startPoint,l=o.endPoint,d=(u.x+l.x)/2,b=(u.y+l.y)/2,O=Math.abs(u.x-l.x)+10,j=Math.abs(u.y-l.y)+10,C=o.getOutlineStyle();return Object(ee.g)(Nr,Oo({className:"lf-outline-edge",x:d,y:b,width:O,height:j},C))}},{key:"getPolylineOutline",value:function(o){var u=o.points,l=bo(u),d=ui(l,8),b=d.x,O=d.y,j=d.width,C=d.height,R=o.getOutlineStyle();return Object(ee.g)(Nr,Oo({className:"lf-outline",x:b,y:O,width:j,height:C},R))}},{key:"getBezierOutline",value:function(o){var u=o.path,l=va(u),d=ui(l,8),b=d.x,O=d.y,j=d.width,C=d.height,R=o.getOutlineStyle();return Object(ee.g)(Nr,Oo({className:"lf-outline",x:b,y:O,width:j,height:C},R))}},{key:"render",value:function(){return Object(ee.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&Mb(t.prototype,n),a}(ee.a))||Rd;function Hc(e){return Hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hc(e)}function Rb(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Gd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Gd(n,r)}}(e,t)||function(){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 Gd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function si(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,o=e.r,u=o===void 0?4:o,l=e.className,d={cx:n,cy:a,r:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(b){var O=Rb(b,2),j=O[0],C=O[1];Hc(C)!=="object"&&(d[j]=C)}),d.className=l?"lf-basic-shape ".concat(l):"lf-basic-shape",Object(ee.g)("circle",d)}function Vc(e){return Vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vc(e)}function zb(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Yd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Yd(n,r)}}(e,t)||function(){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 Yd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function li(){return li=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},li.apply(this,arguments)}function Ud(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vd(e,t,n){return t&&Hd(e.prototype,t),n&&Hd(e,n),e}function Wd(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wc(e,t)}function Wc(e,t){return Wc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Wc(e,t)}function Xd(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Da(e);if(t){var a=Da(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Lb(this,n)}}function Lb(e,t){if(t&&(Vc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pa(e)}function Pa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Da(e){return Da=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(e)}function Xc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jd,Zd=function(e){Wd(n,e);var t=Xd(n);function n(){var r;return Ud(this,n),Xc(Pa(r=t.call(this)),"dragHandler",void 0),Xc(Pa(r),"onDraging",function(a){var o=a.event,u=r.props,l=u.graphModel,d=u.bezierModel,b=u.type,O=l.getPointByClient({x:o.clientX,y:o.clientY}).canvasOverlayPosition,j=O.x,C=O.y;d.updateAdjustAnchor({x:j,y:C},b)}),Xc(Pa(r),"onDragEnd",function(){r.props.bezierModel.isDragging=!1}),r.dragHandler=new Jr({onDraging:r.onDraging,onDragEnd:r.onDragEnd}),r}return Vd(n,[{key:"render",value:function(){var r=this,a=this.props.position,o=a.x,u=a.y,l=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(ee.g)(si,li({className:"lf-bezier-adjust-anchor",x:o,y:u},l,{onMouseDown:function(d){r.dragHandler.handleMouseDown(d)}}))}}]),n}(ee.a),Qb=Fn(Fd=function(e){Wd(n,e);var t=Xd(n);function n(){return Ud(this,n),t.apply(this,arguments)}return Vd(n,[{key:"getBezierAdjust",value:function(r,a){var o=r.path,u=r.id,l=zb(va(o),4),d=l[0],b=l[1],O=l[2],j=l[3],C=r.getEdgeStyle().adjustLine,R=[];return R.push(Object(ee.g)(Zr,li({x1:d.x,y1:d.y,x2:b.x,y2:b.y},C))),R.push(Object(ee.g)(Zd,{position:b,bezierModel:r,graphModel:a,key:"".concat(u,"_ePre"),type:"sNext"})),R.push(Object(ee.g)(Zr,li({x1:j.x,y1:j.y,x2:O.x,y2:O.y},C))),R.push(Object(ee.g)(Zd,{position:O,bezierModel:r,graphModel:a,key:"".concat(u,"_sNext"),type:"ePre"})),R}},{key:"selectedBezierEdge",value:function(){for(var r=this.props.graphModel,a=r.edges,o=[],u=0;u<a.length;u++){var l=a[u];l.isSelected&&l.modelType===pt.BEZIER_EDGE&&l.draggable&&o.push(this.getBezierAdjust(l,r))}return o}},{key:"render",value:function(){return Object(ee.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(ee.a))||Fd;function Jc(e){return Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jc(e)}function Fb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zc(e,t){return Zc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zc(e,t)}function Yb(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ca(e);if(t){var a=Ca(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){if(t&&(Jc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}var Kd,Hb=Fn(Jd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Zc(o,u)})(a,e);var t,n,r=Yb(a);function a(){return Fb(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props.children;return Object(ee.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(ee.g)("g",{transform:o},u))}}])&&Gb(t.prototype,n),a}(ee.a))||Jd;function Kc(e){return Kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kc(e)}function qc(){return qc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}function Vb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $c(e,t){return $c=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$c(e,t)}function Xb(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Na(e);if(t){var a=Na(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Jb(this,n)}}function Jb(e,t){if(t&&(Kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Na(e){return Na=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Na(e)}var Zb=Fn(Kd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&$c(o,u)})(a,e);var t,n,r=Xb(a);function a(){return Vb(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getComponent",value:function(o,u){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",d=this.props.getView,b=d(o.type);return Object(ee.g)(b,{key:o.id,model:o,graphModel:u,overlay:l})}},{key:"render",value:function(){var o=this,u=this.props,l=u.graphModel,d=u.tool,b=u.options,O=u.dnd,j=u.snaplineModel,C={};b.width&&(C.width="".concat(l.width,"px")),b.height&&(C.height="".concat(l.height,"px"));var R=l.fakerNode,X=l.editConfigModel.adjustEdge;return Object(ee.g)("div",{className:"lf-graph",style:C},Object(ee.g)(ab,{graphModel:l,dnd:O},Object(ee.g)("g",{className:"lf-base"},aa(l.sortElements,function(te){return o.getComponent(te,l)})),R?this.getComponent(R,l):""),Object(ee.g)(Hb,{graphModel:l},Object(ee.g)(Ib,{graphModel:l}),X?Object(ee.g)(Qb,{graphModel:l}):"",b.isSilentMode||b.snapline===!1?"":Object(ee.g)(Pb,{snaplineModel:j})),Object(ee.g)(pb,{graphModel:l,tool:d}),b.background&&Object(ee.g)(Ab,{background:b.background}),b.grid&&Object(ee.g)(Md,qc({},b.grid,{graphModel:l})))}}],n&&Wb(t.prototype,n),a}(ee.a))||Kd,Kb=Zb;function qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qd(Object(n),!0).forEach(function(r){yr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $b=function(){function e(r){var a=this;(function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")})(this,e),yr(this,"nodeConfig",void 0),yr(this,"lf",void 0),yr(this,"fakerNode",void 0),yr(this,"stopDrag",function(){a.nodeConfig=null,window.document.removeEventListener("mouseup",a.stopDrag)}),yr(this,"dragEnter",function(u){a.nodeConfig&&!a.fakerNode&&(a.fakerNode=a.lf.createFakerNode(Ma(Ma({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY}))))}),yr(this,"onDragOver",function(u){if(u.preventDefault(),a.fakerNode){var l=a.clientToLocalPoint({x:u.clientX,y:u.clientY}),d=l.x,b=l.y;a.fakerNode.moveTo(d,b);var O=a.fakerNode.getData();a.lf.setNodeSnapLine(O),a.lf.graphModel.eventCenter.emit(at.NODE_DND_DRAG,{data:O})}return!1}),yr(this,"onDragLeave",function(){a.fakerNode&&(a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)}),yr(this,"onDrop",function(u){if(a.lf.graphModel&&u&&a.nodeConfig){var l=a.lf.addNode(Ma(Ma({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY})));u.preventDefault(),u.stopPropagation(),a.nodeConfig=null,a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null;var d=l.getData();a.lf.graphModel.eventCenter.emit(at.NODE_DND_ADD,{data:d})}});var o=r.lf;this.lf=o}var t,n;return t=e,(n=[{key:"clientToLocalPoint",value:function(r){var a=r.x,o=r.y,u=hf(this.lf.options,["grid","size"]),l=this.lf.graphModel.getPointByClient({x:a,y:o}).canvasOverlayPosition,d=l.x,b=l.y;return{x:Ao(d,u),y:Ao(b,u)}}},{key:"startDrag",value:function(r){this.nodeConfig=r,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&qb(t.prototype,n),e}();function $d(e){var t=e.container,n=e.grid,r=e.width,a=e.height;if(!t)throw new Error("\u8BF7\u68C0\u67E5 container \u53C2\u6570\u662F\u5426\u6709\u6548");if(typeof r=="string"||typeof a=="string")throw new Error("width\u6216height\u4E0D\u652F\u6301\u4F20\u5165\u5B57\u7B26\u4E32\uFF0C\u8BF7\u4F20\u6570\u5B57");return n&&(e.grid=un({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),un({},th,e)}var At,eh,th={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function es(e){return es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},es(e)}function ts(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return nh(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return nh(n,r)}}(e,t)||function(){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 nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(n),!0).forEach(function(r){oh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function em(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function tm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fi(){return fi=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=rm(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},fi.apply(this,arguments)}function rm(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Mr(e))!==null;);return e}function ns(e,t){return ns=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ns(e,t)}function om(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Mr(e);if(t){var a=Mr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return im(this,n)}}function im(e,t){if(t&&(es(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ta(e)}function Ta(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mr(e){return Mr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Mr(e)}function oh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tn(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var rs=(At=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&ns(o,u)})(a,e);var t,n,r=om(a);function a(){var o;tm(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return oh(Ta(o=r.call.apply(r,[this].concat(l))),"modelType",pt.BEZIER_EDGE),em(Ta(o),"path",eh,Ta(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=100,fi(Mr(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.bezier;return Ba(Ba({},fi(Mr(a.prototype),"getEdgeStyle",this).call(this)),Ct(o))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var o=0,u=0;return this.pointsList.forEach(function(l){var d=l.x,b=l.y;o+=d,u+=b}),{x:o/this.pointsList.length,y:u/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=fi(Mr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(l){return{x:l.x,y:l.y}});return Ba(Ba({},o),{},{pointsList:u})}},{key:"getControls",value:function(){var o=this.startPoint,u=this.endPoint;return cd({start:o,end:u,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(o){var u=ts(o,4),l=u[0],d=u[1],b=u[2],O=u[3];return"M ".concat(l.x," ").concat(l.y,`
- C `).concat(d.x," ").concat(d.y,`,
- `).concat(b.x," ").concat(b.y,`,
- `).concat(O.x," ").concat(O.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(),u=o.sNext,l=o.ePre;this.updatePath(u,l)}},{key:"updatePath",value:function(o,u){var l={x:this.startPoint.x,y:this.startPoint.y},d={x:this.endPoint.x,y:this.endPoint.y};if(!o||!u){var b=this.getControls();o=b.sNext,u=b.ePre}this.pointsList=[l,o,u,d],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,u){this.startPoint.x+=o,this.startPoint.y+=u;var l=ts(this.pointsList,3),d=l[1],b=l[2];d.x+=o,d.y+=u,this.updatePath(d,b)}},{key:"moveEndPoint",value:function(o,u){this.endPoint.x+=o,this.endPoint.y+=u;var l=ts(this.pointsList,3),d=l[1],b=l[2];b.x+=o,b.y+=u,this.updatePath(d,b)}},{key:"updateAdjustAnchor",value:function(o,u){u==="sNext"?this.pointsList[1]=o:u==="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 u=o.startPoint,l=o.endPoint,d=o.sourceNode,b=o.targetNode,O=cd({start:u,end:l,sourceNode:d,targetNode:b,offset:this.offset}),j=O.sNext,C=O.ePre;this.pointsList=[u,j,C,l],this.initPoints()}}])&&nm(t.prototype,n),a}(dc),eh=Tn(At.prototype,"path",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Tn(At.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"initPoints"),At.prototype),Tn(At.prototype,"updatePoints",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"updatePoints"),At.prototype),Tn(At.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"updateStartPoint"),At.prototype),Tn(At.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"updateEndPoint"),At.prototype),Tn(At.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"moveStartPoint"),At.prototype),Tn(At.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"moveEndPoint"),At.prototype),Tn(At.prototype,"updateAdjustAnchor",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"updateAdjustAnchor"),At.prototype),Tn(At.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"getAdjustStart"),At.prototype),Tn(At.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"getAdjustEnd"),At.prototype),Tn(At.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(At.prototype,"updateAfterAdjustStartAndEnd"),At.prototype),At),Be,ih,ah,uh,ch,sh,lh,fh,ph,dh,hh,yh,gh,Ah,vh,bh,mh,wh,Oh,am=function(e){return e==null};function os(e){return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},os(e)}function um(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(d,b){if(!!d){if(typeof d=="string")return Eh(d,b);var O=Object.prototype.toString.call(d).slice(8,-1);if(O==="Object"&&d.constructor&&(O=d.constructor.name),O==="Map"||O==="Set")return Array.from(d);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return Eh(d,b)}}(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(d){throw d},f:a}}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 o,u=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return u=d.done,d},e:function(d){l=!0,o=d},f:function(){try{u||n.return==null||n.return()}finally{if(l)throw o}}}}function Eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xh(Object(n),!0).forEach(function(r){En(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function cm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var gr,_h,Ar=(Be=function(){function e(r,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),En(this,"id",Xr()),Vt(this,"type",ih,this),Vt(this,"x",ah,this),Vt(this,"y",uh,this),Vt(this,"text",ch,this),Vt(this,"properties",sh,this),Vt(this,"_width",lh,this),Vt(this,"_height",fh,this),Vt(this,"anchorsOffset",ph,this),Vt(this,"isSelected",dh,this),Vt(this,"isHovered",hh,this),Vt(this,"isDragging",yh,this),Vt(this,"isHitable",gh,this),Vt(this,"draggable",Ah,this),Vt(this,"visible",vh,this),En(this,"graphModel",void 0),Vt(this,"zIndex",bh,this),Vt(this,"state",mh,this),Vt(this,"autoToFront",wh,this),Vt(this,"style",Oh,this),En(this,"BaseType",Gt.NODE),En(this,"modelType",pt.NODE),En(this,"additionStateData",void 0),En(this,"targetRules",[]),En(this,"sourceRules",[]),En(this,"moveRules",[]),En(this,"hasSetTargetRules",!1),En(this,"hasSetSourceRules",!1),this.graphModel=a,this.initNodeData(r),this.setAttributes()}var t,n;return t=e,n=[{key:"width",get:function(){return this._width},set:function(r){this._width=r}},{key:"height",get:function(){return this._height},set:function(r){this._height=r}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,o=a&&a(r.type);o&&(r.id=o);var u=this.createId();u&&(r.id=u)}this.formatText(r),un(this,function(l){return ti(l,["id","type","x","y","text","properties"])}(r)),this.graphModel.overlapMode===wn.INCREASE&&(this.zIndex=r.zIndex||fc())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(r){r.text||(r.text={value:"",x:r.x,y:r.y,draggable:!1,editable:!0}),r.text&&typeof r.text=="string"?r.text={value:r.text,x:r.x,y:r.y,draggable:!1,editable:!0}:r.text&&r.text.editable===void 0&&(r.text.editable=!0)}},{key:"getData",value:function(){var r=this.text,a=r.x,o=r.y,u=r.value,l=this.properties;Object(s.x)(l)&&(l=Object(s.I)(l));var d={id:this.id,type:this.type,x:this.x,y:this.y,properties:l};return this.graphModel.overlapMode===wn.INCREASE&&(d.zIndex=this.zIndex),u&&(d.text={x:a,y:o,value:u}),d}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(s.I)(this.properties)}},{key:"getNodeStyle",value:function(){return sn(sn({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.nodeText;return Ct(r)}},{key:"getAnchorStyle",value:function(r){var a=this.graphModel.theme.anchor;return Ct(a)}},{key:"getAnchorLineStyle",value:function(){var r=this.graphModel.theme.anchorLine;return Ct(r)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Ct(r)}},{key:"isAllowConnectedAsSource",value:function(r,a,o){var u=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var l,d=!0,b=0;b<u.length;b++){var O=u[b];if(!O.validate.call(this,this,r,a,o)){d=!1,l=O.message;break}}return{isAllPass:d,msg:l}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(r,a,o){var u=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var l,d=!0,b=0;b<u.length;b++){var O=u[b];if(!O.validate.call(this,r,this,a,o)){d=!1,l=O.message;break}}return{isAllPass:d,msg:l}}},{key:"isAllowMoveNode",value:function(r,a){var o,u=!0,l=!0,d=um(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(d.s();!(o=d.n()).done;){var b=(0,o.value)(this,r,a);if(!b)return!1;if(os(b)==="object"){var O=b;if(O.x===!1&&O.y===!1)return!1;u=u&&O.x,l=l&&O.y}}}catch(j){d.e(j)}finally{d.f()}return{x:u,y:l}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var r=this.anchorsOffset,a=this.id,o=this.x,u=this.y;return r&&r.length>0?r.map(function(l,d){return l.length?(l=l,{id:"".concat(a,"_").concat(d),x:o+l[0],y:u+l[1]}):sn(sn({},l=l),{},{x:o+l.x,y:u+l.y,id:l.id||"".concat(a,"_").concat(d)})}):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(r){if(!am(r))for(var a=0;a<this.anchors.length;a++){var o=this.anchors[a];if(o.id===r)return o}}},{key:"addNodeMoveRules",value:function(r){this.moveRules.includes(r)||this.moveRules.push(r)}},{key:"move",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,l=!1;if(o)u=!0,l=!0;else{var d=this.isAllowMoveNode(r,a);typeof d=="boolean"?(u=d,l=d):(u=d.x,l=d.y)}if(u){var b=this.x+r;this.x=b,this.text&&this.moveText(r,0)}if(l){var O=this.y+a;this.y=O,this.text&&this.moveText(0,a)}return u||l}},{key:"moveTo",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=r-this.x,l=a-this.y;return!(!o&&!this.isAllowMoveNode(u,l)||(this.text&&this.text&&this.moveText(u,l),this.x=r,this.y=a,0))}},{key:"moveText",value:function(r,a){var o=this.text,u=o.x,l=o.y,d=o.value,b=o.draggable,O=o.editable;this.text={value:d,editable:O,draggable:b,x:u+r,y:l+a}}},{key:"updateText",value:function(r){this.text=sn(sn({},this.text),{},{value:r})}},{key:"setSelected",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=r}},{key:"setHovered",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=r}},{key:"setHitable",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=r}},{key:"setElementState",value:function(r,a){this.state=r,this.additionStateData=a}},{key:"setProperty",value:function(r,a){this.properties=sn(sn({},this.properties),{},En({},r,$t(a))),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=sn(sn({},this.properties),$t(r)),this.setAttributes()}},{key:"setStyle",value:function(r,a){this.style=sn(sn({},this.style),{},En({},r,$t(a)))}},{key:"setStyles",value:function(r){this.style=sn(sn({},this.style),$t(r))}},{key:"updateStyles",value:function(r){this.style=sn({},$t(r))}},{key:"setZIndex",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.zIndex=r}},{key:"updateAttributes",value:function(r){un(this,r)}}],n&&cm(t.prototype,n),e}(),ih=ht(Be.prototype,"type",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ah=ht(Be.prototype,"x",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),uh=ht(Be.prototype,"y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ch=ht(Be.prototype,"text",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),sh=ht(Be.prototype,"properties",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),lh=ht(Be.prototype,"_width",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),fh=ht(Be.prototype,"_height",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),ph=ht(Be.prototype,"anchorsOffset",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),dh=ht(Be.prototype,"isSelected",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),hh=ht(Be.prototype,"isHovered",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),yh=ht(Be.prototype,"isDragging",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),gh=ht(Be.prototype,"isHitable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ah=ht(Be.prototype,"draggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),vh=ht(Be.prototype,"visible",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),bh=ht(Be.prototype,"zIndex",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),mh=ht(Be.prototype,"state",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wh=ht(Be.prototype,"autoToFront",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Oh=ht(Be.prototype,"style",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ht(Be.prototype,"incoming",[s.m],Object.getOwnPropertyDescriptor(Be.prototype,"incoming"),Be.prototype),ht(Be.prototype,"outgoing",[s.m],Object.getOwnPropertyDescriptor(Be.prototype,"outgoing"),Be.prototype),ht(Be.prototype,"addNodeMoveRules",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"addNodeMoveRules"),Be.prototype),ht(Be.prototype,"move",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"move"),Be.prototype),ht(Be.prototype,"moveTo",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"moveTo"),Be.prototype),ht(Be.prototype,"moveText",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"moveText"),Be.prototype),ht(Be.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"updateText"),Be.prototype),ht(Be.prototype,"setSelected",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setSelected"),Be.prototype),ht(Be.prototype,"setHovered",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setHovered"),Be.prototype),ht(Be.prototype,"setHitable",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setHitable"),Be.prototype),ht(Be.prototype,"setElementState",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setElementState"),Be.prototype),ht(Be.prototype,"setProperty",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setProperty"),Be.prototype),ht(Be.prototype,"setProperties",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setProperties"),Be.prototype),ht(Be.prototype,"setStyle",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setStyle"),Be.prototype),ht(Be.prototype,"setStyles",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setStyles"),Be.prototype),ht(Be.prototype,"updateStyles",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"updateStyles"),Be.prototype),ht(Be.prototype,"setZIndex",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"setZIndex"),Be.prototype),ht(Be.prototype,"updateAttributes",[s.k],Object.getOwnPropertyDescriptor(Be.prototype,"updateAttributes"),Be.prototype),Be);function is(e){return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(e)}function jh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jh(Object(n),!0).forEach(function(r){kh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sm(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function as(){return as=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=pm(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},as.apply(this,arguments)}function pm(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Eo(e))!==null;);return e}function us(e,t){return us=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},us(e,t)}function dm(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Eo(e);if(t){var a=Eo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return hm(this,n)}}function hm(e,t){if(t&&(is(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ia(e)}function Ia(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Eo(e){return Eo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(e)}function kh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cs(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var en,Ph,Dh,ss=(gr=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&us(o,u)})(a,e);var t,n,r=dm(a);function a(){var o;lm(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return kh(Ia(o=r.call.apply(r,[this].concat(l))),"modelType",pt.CIRCLE_NODE),sm(Ia(o),"r",_h,Ia(o)),o}return t=a,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var o=as(Eo(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.circle;return Sh(Sh({},o),Ct(u))}},{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,l=this.r;return[{x:o,y:u-l,id:"".concat(this.id,"_0")},{x:o+l,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+l,id:"".concat(this.id,"_2")},{x:o-l,y:u,id:"".concat(this.id,"_3")}]}}])&&fm(t.prototype,n),a}(Ar),_h=cs(gr.prototype,"r",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),cs(gr.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(gr.prototype,"width"),gr.prototype),cs(gr.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(gr.prototype,"height"),gr.prototype),gr);i(127);function ls(e){return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}function fs(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Ch(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ch(n,r)}}(e,t)||function(){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 Ch(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nh(Object(n),!0).forEach(function(r){Th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bh(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function ym(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ps(){return ps=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Am(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ps.apply(this,arguments)}function Am(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=_o(e))!==null;);return e}function ds(e,t){return ds=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ds(e,t)}function vm(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=_o(e);if(t){var a=_o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return bm(this,n)}}function bm(e,t){if(t&&(ls(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xo(e)}function xo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_o(e)}function Th(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jo(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var qn,Ih,Rh,hs=(en=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&ds(o,u)})(a,e);var t,n,r=vm(a);function a(){var o;ym(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Th(xo(o=r.call.apply(r,[this].concat(l))),"modelType",pt.DIAMOND_NODE),Bh(xo(o),"rx",Ph,xo(o)),Bh(xo(o),"ry",Dh,xo(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=ps(_o(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.diamond;return Mh(Mh({},o),Ct(u))}},{key:"points",get:function(){var o=this.x,u=this.y,l=this.rx,d=this.ry;return[[o,u-d],[o+l,u],[o,u+d],[o-l,u]]}},{key:"pointsPosition",get:function(){return this.points.map(function(o){return{x:o[0],y:o[1]}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(l){var d=fs(l,1)[0];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(l){var d=fs(l,2)[1];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"getDefaultAnchor",value:function(){var o=this;return this.points.map(function(u,l){var d=fs(u,2);return{x:d[0],y:d[1],id:"".concat(o.id,"_").concat(l)}})}}])&&gm(t.prototype,n),a}(Ar),Ph=jo(en.prototype,"rx",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Dh=jo(en.prototype,"ry",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),jo(en.prototype,"points",[s.m],Object.getOwnPropertyDescriptor(en.prototype,"points"),en.prototype),jo(en.prototype,"pointsPosition",[s.m],Object.getOwnPropertyDescriptor(en.prototype,"pointsPosition"),en.prototype),jo(en.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(en.prototype,"width"),en.prototype),jo(en.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(en.prototype,"height"),en.prototype),en);function ys(e){return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ys(e)}function zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Lh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zh(Object(n),!0).forEach(function(r){Fh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qh(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gs(){return gs=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Om(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},gs.apply(this,arguments)}function Om(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ko(e))!==null;);return e}function As(e,t){return As=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},As(e,t)}function Em(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ko(e);if(t){var a=ko(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return xm(this,n)}}function xm(e,t){if(t&&(ys(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return So(e)}function So(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ko(e){return ko=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(e)}function Fh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ra(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Cn,Gh,vs=(qn=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&As(o,u)})(a,e);var t,n,r=Em(a);function a(){var o;mm(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Fh(So(o=r.call.apply(r,[this].concat(l))),"modelType",pt.ELLIPSE_NODE),Qh(So(o),"rx",Ih,So(o)),Qh(So(o),"ry",Rh,So(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=gs(ko(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.ellipse;return Lh(Lh({},o),Ct(u))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,l=this.rx,d=this.ry;return[{x:o,y:u-d,id:"".concat(this.id,"_0")},{x:o+l,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d,id:"".concat(this.id,"_2")},{x:o-l,y:u,id:"".concat(this.id,"_3")}]}}])&&wm(t.prototype,n),a}(Ar),Ih=Ra(qn.prototype,"rx",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Rh=Ra(qn.prototype,"ry",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Ra(qn.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(qn.prototype,"width"),qn.prototype),Ra(qn.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(qn.prototype,"height"),qn.prototype),qn);function bs(e){return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function ms(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Yh(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Yh(n,r)}}(e,t)||function(){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 Yh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uh(Object(n),!0).forEach(function(r){Vh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _m(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function jm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ws(){return ws=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=km(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ws.apply(this,arguments)}function km(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Po(e))!==null;);return e}function Os(e,t){return Os=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Os(e,t)}function Pm(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Po(e);if(t){var a=Po(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Dm(this,n)}}function Dm(e,t){if(t&&(bs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return za(e)}function za(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Po(e){return Po=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Po(e)}function Vh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function La(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Es,Wh,xs=(Cn=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Os(o,u)})(a,e);var t,n,r=Pm(a);function a(){var o;jm(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Vh(za(o=r.call.apply(r,[this].concat(l))),"modelType",pt.POLYGON_NODE),_m(za(o),"points",Gh,za(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=ws(Po(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.polygon;return Hh(Hh({},o),Ct(u))}},{key:"pointsPosition",get:function(){var o=this.x,u=this.y,l=this.width,d=this.height;return this.points.map(function(b){return{x:b[0]+o-l/2,y:b[1]+u-d/2}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(l){var d=ms(l,1)[0];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(l){var d=ms(l,2)[1];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"getDefaultAnchor",value:function(){var o=this,u=this.x,l=this.y,d=this.width,b=this.height;return this.points.map(function(O,j){var C=ms(O,2),R=C[0],X=C[1];return{x:u+R-d/2,y:l+X-b/2,id:"".concat(o.id,"_").concat(j)}})}}])&&Sm(t.prototype,n),a}(Ar),Gh=La(Cn.prototype,"points",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),La(Cn.prototype,"pointsPosition",[s.m],Object.getOwnPropertyDescriptor(Cn.prototype,"pointsPosition"),Cn.prototype),La(Cn.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(Cn.prototype,"width"),Cn.prototype),La(Cn.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(Cn.prototype,"height"),Cn.prototype),Cn);function _s(e){return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function Xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xh(Object(n),!0).forEach(function(r){Zh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cm(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function js(){return js=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Bm(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},js.apply(this,arguments)}function Bm(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Do(e))!==null;);return e}function Ss(e,t){return Ss=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ss(e,t)}function Tm(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Do(e);if(t){var a=Do(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Im(this,n)}}function Im(e,t){if(t&&(_s(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qa(e)}function Qa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Do(e){return Do=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(e)}function Zh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Br,ks=(Es=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Ss(o,u)})(a,e);var t,n,r=Tm(a);function a(){var o;Nm(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Zh(Qa(o=r.call.apply(r,[this].concat(l))),"modelType",pt.RECT_NODE),Cm(Qa(o),"radius",Wh,Qa(o)),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,l=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+l/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-l/2,y:u,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var o=js(Do(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.rect;return Jh(Jh({},o),Ct(u))}}])&&Mm(t.prototype,n),a}(Ar),Wh=function(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}(Es.prototype,"radius",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Es);function Ps(e){return Ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ps(e)}function Kh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kh(Object(n),!0).forEach(function(r){ey(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ds(){return Ds=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Lm(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Ds.apply(this,arguments)}function Lm(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Co(e))!==null;);return e}function Cs(e,t){return Cs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Cs(e,t)}function Qm(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Co(e);if(t){var a=Co(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Fm(this,n)}}function Fm(e,t){if(t&&(Ps(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $h(e)}function $h(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Co(e){return Co=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Co(e)}function ey(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ty(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Ns=(Br=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Cs(o,u)})(a,e);var t,n,r=Qm(a);function a(){var o;Rm(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return ey($h(o=r.call.apply(r,[this].concat(l))),"modelType",pt.TEXT_NODE),o}return t=a,(n=[{key:"getTextStyle",value:function(){var o=Ds(Co(a.prototype),"getTextStyle",this).call(this),u=this.graphModel.theme.text;return qh(qh({},o),Ct(u))}},{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return lc({rows:o,fontSize:u,rowsLength:o.length}).width}},{key:"height",get:function(){var o=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return lc({rows:o,fontSize:u,rowsLength:o.length}).height}}])&&zm(t.prototype,n),a}(Ar),ty(Br.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(Br.prototype,"width"),Br.prototype),ty(Br.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(Br.prototype,"height"),Br.prototype),Br);function Ms(e){return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(e)}function Gm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ym(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bs(e,t){return Bs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bs(e,t)}function Um(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Fa(e);if(t){var a=Fa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Hm(this,n)}}function Hm(e,t){if(t&&(Ms(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ny(e)}function ny(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fa(e){return Fa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(e)}function Vm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var In,ry,oy,iy,Ts=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Bs(o,u)})(a,e);var t,n,r=Um(a);function a(){var o;Gm(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Vm(ny(o=r.call.apply(r,[this].concat(l))),"modelType",pt.HTML_NODE),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,l=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+l/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-l/2,y:u,id:"".concat(this.id,"_3")}]}}])&&Ym(t.prototype,n),a}(Ar);function ay(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Is(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pi(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,l){return l(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var cy=(In=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),uy(this,"graphModel",void 0),Is(this,"isShowHorizontal",ry,this),Is(this,"isShowVertical",oy,this),Is(this,"position",iy,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=r}var t,n;return t=e,n=[{key:"getStyle",value:function(){return function(r){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?ay(Object(o),!0).forEach(function(u){uy(r,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):ay(Object(o)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(o,u))})}return r}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(r,a){for(var o=r.x,u=r.y,l=!1,d=!1,b=0;b<a.length;b++){var O=a[b];if(O.id!==r.id&&(o===O.x&&(l=!0),u===O.y&&(d=!0),l&&d))break}return{isShowVertical:l,isShowHorizontal:d,position:{x:o,y:u}}}},{key:"getHorizontalSnapline",value:function(r,a){var o,u,l=!1,d=r.id;if(d){var b=this.graphModel.fakerNode;if(b&&b.id===d)u=On(b);else{var O=this.graphModel.getNodeModelById(d);u=On(O)}}for(var j=0;j<a.length;j++){var C=a[j];if(C.id!==r.id){var R=On(C);if(R.minY===u.minY||R.maxY===u.minY){l=!0,o=u.minY;break}if(R.minY===u.maxY||R.maxY===u.maxY){l=!0,o=u.maxY;break}}}return un({isShowHorizontal:l,position:{y:o}})}},{key:"getVerticalSnapline",value:function(r,a){var o,u,l=!1,d=r.id;if(d){var b=this.graphModel.fakerNode;if(b&&b.id===d)u=On(b);else{var O=this.graphModel.getNodeModelById(d);u=On(O)}}for(var j=0;j<a.length;j++){var C=a[j];if(C.id!==r.id){var R=On(C);if(R.minX===u.minX||R.maxX===u.minX){l=!0,o=u.minX;break}if(R.minX===u.maxX||R.maxX===u.maxX){l=!0,o=u.maxX;break}}}return un({isShowVertical:l,position:{x:o}})}},{key:"getSnapLinePosition",value:function(r,a){var o=this.getCenterSnapLine(r,a),u=o.isShowHorizontal,l=o.isShowVertical;if(!u){var d=this.getHorizontalSnapline(r,a);d.isShowHorizontal&&(o.isShowHorizontal=d.isShowHorizontal,o.position.y=d.position.y)}if(!l){var b=this.getVerticalSnapline(r,a);b.isShowVertical&&(o.isShowVertical=b.isShowVertical,o.position.x=b.position.x)}return o}},{key:"setSnaplineInfo",value:function(r){var a=r.isShowHorizontal,o=r.isShowVertical,u=r.position;this.position=u,this.isShowHorizontal=a,this.isShowVertical=o}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(r){var a=this.graphModel.nodes,o=this.getSnapLinePosition(r,a);this.setSnaplineInfo(o)}}],n&&Wm(t.prototype,n),e}(),ry=pi(In.prototype,"isShowHorizontal",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),oy=pi(In.prototype,"isShowVertical",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),iy=pi(In.prototype,"position",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pi(In.prototype,"clearSnapline",[s.k],Object.getOwnPropertyDescriptor(In.prototype,"clearSnapline"),In.prototype),pi(In.prototype,"setNodeSnapLine",[s.k],Object.getOwnPropertyDescriptor(In.prototype,"setNodeSnapLine"),In.prototype),In);function Rs(e){return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function di(){return di=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},di.apply(this,arguments)}function sy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ly(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sy(Object(n),!0).forEach(function(r){er(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return fy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return fy(n,r)}}(e,t)||function(){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 fy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zs(e,t){return zs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},zs(e,t)}function Zm(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ga(e);if(t){var a=Ga(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Km(this,n)}}function Km(e,t){if(t&&(Rs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $n(e)}function $n(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ga(e){return Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ga(e)}function er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qm=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&zs(o,u)})(a,e);var t,n,r=Zm(a);function a(){var o;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,a),er($n(o=r.call(this)),"preTargetNode",void 0),er($n(o),"sourceRuleResults",void 0),er($n(o),"targetRuleResults",void 0),er($n(o),"dragHandler",void 0),er($n(o),"t",void 0),er($n(o),"onDragStart",function(u){var l=u.event,d=o.props,b=d.anchorData,O=d.nodeModel,j=d.graphModel,C=j.overlapMode;j.selectNodeById(O.id),C!==wn.INCREASE&&O.autoToFront&&j.toFront(O.id),j.eventCenter.emit(at.ANCHOR_DRAGSTART,{data:b,e:l,nodeModel:O}),o.setState({startX:b.x,startY:b.y,endX:b.x,endY:b.y})}),er($n(o),"onDraging",function(u){var l=u.event,d=o.props,b=d.graphModel,O=d.nodeModel,j=d.anchorData,C=b.transformModel,R=b.eventCenter,X=b.width,te=b.height,ue=b.editConfigModel,ae=l.clientX,ge=l.clientY,ve=b.getPointByClient({x:ae,y:ge}),Me=ve.domOverlayPosition,_e=Me.x,Fe=Me.y,He=ve.canvasOverlayPosition,Re=He.x,yt=He.y;o.t&&clearInterval(o.t);var vt=[];_e<10?vt=[10,0]:_e+10>X?vt=[-10,0]:Fe<10?vt=[0,10]:Fe+10>te&&(vt=[0,-10]),o.setState({endX:Re,endY:yt,draging:!0}),o.moveAnchorEnd(Re,yt),vt.length>0&&!ue.stopMoveGraph&&(o.t=setInterval(function(){var It=Xm(vt,2),Wt=It[0],Kt=It[1];C.translate(Wt,Kt);var nn=o.state,fn=nn.endX,wr=nn.endY;o.setState({endX:fn-Wt,endY:wr-Kt}),o.moveAnchorEnd(fn-Wt,wr-Kt)},50)),R.emit(at.ANCHOR_DRAG,{data:j,e:l,nodeModel:O})}),er($n(o),"onDragEnd",function(u){o.t&&clearInterval(o.t),o.checkEnd(u),o.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),o.sourceRuleResults.clear(),o.targetRuleResults.clear()}),er($n(o),"checkEnd",function(u){var l=o.props,d=l.graphModel,b=l.nodeModel,O=l.anchorData,j=O.x,C=O.y,R=O.id,X=d.edgeType,te=o.state,ue=te.endX,ae=te.endY,ge=te.draging,ve=la({x:ue,y:ae},d);if(o.preTargetNode&&o.preTargetNode.state!==Ot.DEFAULT&&o.preTargetNode.setElementState(Ot.DEFAULT),ge&&ve&&ve.node){var Me=ve.node,_e=ve.anchor.id,Fe="".concat(b.id,"_").concat(Me.id,"_").concat(_e,"_").concat(R),He=o.sourceRuleResults.get(Fe)||{},Re=He.isAllPass,yt=He.msg,vt=o.targetRuleResults.get(Fe)||{},It=vt.isAllPass,Wt=vt.msg;if(Re&&It){Me.setElementState(Ot.DEFAULT);var Kt=d.addEdge({type:X,sourceNodeId:b.id,sourceAnchorId:R,startPoint:{x:j,y:C},targetNodeId:ve.node.id,targetAnchorId:ve.anchor.id,endPoint:{x:ve.anchor.x,y:ve.anchor.y}}),nn=o.props.anchorData;d.eventCenter.emit(at.ANCHOR_DROP,{data:nn,e:u,nodeModel:b,edgeModel:Kt})}else{var fn=Me.getData();d.eventCenter.emit(at.CONNECTION_NOT_ALLOWED,{data:fn,msg:Wt||yt})}}}),o.sourceRuleResults=new Map,o.targetRuleResults=new Map,o.state={startX:0,startY:0,endX:0,endY:0,draging:!1},o.dragHandler=new Jr({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd}),o}return t=a,(n=[{key:"getAnchorShape",value:function(){var o=this.props,u=o.anchorData,l=o.style,d=o.node.getAnchorShape(u);if(d)return d;var b=u.x,O=u.y,j=ly(ly({},l),l.hover);return Object(ee.g)("g",null,Object(ee.g)(si,di({className:"lf-node-anchor-hover"},j,{x:b,y:O})),Object(ee.g)(si,di({className:"lf-node-anchor"},l,{x:b,y:O})))}},{key:"moveAnchorEnd",value:function(o,u){var l=this.props,d=l.graphModel,b=l.nodeModel,O=l.anchorData,j=la({x:o,y:u},d);if(j){var C=j.node,R=j.anchor.id;if(this.preTargetNode&&this.preTargetNode!==j.node&&this.preTargetNode.setElementState(Ot.DEFAULT),O.id===R)return;this.preTargetNode=C;var X="".concat(b.id,"_").concat(C.id,"_").concat(R,"_").concat(O.id);if(!this.targetRuleResults.has(X)){var te=j.anchor,ue=b.isAllowConnectedAsSource(C,O,te),ae=C.isAllowConnectedAsTarget(b,O,te);this.sourceRuleResults.set(X,fa(ue)),this.targetRuleResults.set(X,fa(ae))}var ge=this.sourceRuleResults.get(X).isAllPass,ve=this.targetRuleResults.get(X).isAllPass;ge&&ve?C.setElementState(Ot.ALLOW_CONNECT):C.setElementState(Ot.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Ot.DEFAULT&&this.preTargetNode.setElementState(Ot.DEFAULT)}},{key:"isShowLine",value:function(){var o=this.state,u=o.startX,l=o.startY,d=o.endX,b=o.endY;return Jn(u,l,d,b)>10}},{key:"render",value:function(){var o=this,u=this.state,l=u.startX,d=u.startY,b=u.endX,O=u.endY,j=this.props,C=j.anchorData.edgeAddable,R=j.edgeStyle;return Object(ee.g)("g",{className:"lf-anchor"},Object(ee.g)("g",{onMouseDown:function(X){C!==!1&&o.dragHandler.handleMouseDown(X)}},this.getAnchorShape()),this.isShowLine()&&Object(ee.g)(Zr,di({x1:l,y1:d,x2:b,y2:O},R,{"pointer-events":"none"})))}}])&&Jm(t.prototype,n),a}(ee.a);i(63);function py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?py(Object(n),!0).forEach(function(r){e0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):py(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ls(e){return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}function t0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return dy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return dy(n,r)}}(e,t)||function(){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 dy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hy(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,o=e.value,u=e.fontSize,l=e.fill,d=l===void 0?"currentColor":l,b=e.overflowMode,O=b===void 0?"default":b,j=e.textWidth,C=j===void 0?"":j,R=e.model,X={textAnchor:"middle","dominant-baseline":"middle",x:n,y:a,fill:d};if(Object.entries(e).forEach(function(Me){var _e=t0(Me,2),Fe=_e[0],He=_e[1];Ls(He)!=="object"&&(X[Fe]=He)}),o){var te=String(o).split(/[\r\n]/g),ue=te.length;if(O!=="default"){var ae=R.BaseType,ge=R.modelType;if(ae===Gt.NODE&&ge!==pt.TEXT_NODE||ae===Gt.EDGE&&C)return function(Me){var _e=Me.value,Fe=Me.fontSize,He=Me.model,Re=Me.fontFamily,yt=Re===void 0?"":Re,vt=Me.lineHeight,It=Me.wrapPadding,Wt=It===void 0?"0, 0":It,Kt=Me.overflowMode,nn=Me.x,fn=Me.y,wr=He.width,eo=He.textHeight,Or=Me.textWidth||wr,bi=String(_e).split(/[\r\n]/g),yu=bi.length,gu=Lp({rows:bi,style:{fontSize:"".concat(Fe,"px"),width:"".concat(Or,"px"),fontFamily:yt,lineHeight:vt,padding:Wt},rowsLength:yu,className:"lf-get-text-height"}),To=He.height>gu?He.height:gu;eo&&(To=eo);var Io=Kt==="ellipsis";return Object(ee.g)("g",null,Object(ee.g)("foreignObject",{width:Or,height:To,x:nn-Or/2,y:fn-To/2},Object(ee.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:To,width:Or,padding:Wt}},Object(ee.g)("div",{className:Io?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:$m({},Me)},bi.map(function(Rr){return Object(ee.g)("div",{className:"lf-node-text--auto-wrap-inner"},Rr)})))))}(e)}if(ue>1){var ve=te.map(function(Me,_e){var Fe=(_e-(ue-1)/2)*(u+2);return Object(ee.g)("tspan",{className:"lf-text-tspan",x:n,y:a+Fe},Me)});return Object(ee.g)("text",X,ve)}return Object(ee.g)("text",X,o)}}function Qs(e){return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(e)}function Fs(){return Fs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fs.apply(this,arguments)}function n0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return yy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return yy(n,r)}}(e,t)||function(){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 yy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gs(e,t){return Gs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Gs(e,t)}function o0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ya(e);if(t){var a=Ya(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return i0(this,n)}}function i0(e,t){if(t&&(Qs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tr(e)}function Tr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ya(e){return Ya=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ya(e)}function Kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gy=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Gs(o,u)})(a,e);var t,n,r=o0(a);function a(o){var u;(function(b,O){if(!(b instanceof O))throw new TypeError("Cannot call a class as a function")})(this,a),Kr(Tr(u=r.call(this)),"dragHandler",void 0),Kr(Tr(u),"sumDeltaX",0),Kr(Tr(u),"sumDeltaY",0),Kr(Tr(u),"stepDrag",void 0),Kr(Tr(u),"onDraging",function(b){var O=b.deltaX,j=b.deltaY,C=u.props,R=C.model,X=n0(C.graphModel.transformModel.fixDeltaXY(O,j),2),te=X[0],ue=X[1];R.moveText(te,ue)}),Kr(Tr(u),"dblClickHandler",function(){u.props.editable&&u.props.model.setElementState(Ot.TEXT_EDIT)}),Kr(Tr(u),"mouseDownHandle",function(b){var O=u.props,j=O.draggable,C=O.graphModel.editConfigModel.nodeTextDraggable;(j||C)&&u.stepDrag.handleMouseDown(b)});var l=o.model,d=o.draggable;return u.stepDrag=new Jr({onDraging:u.onDraging,step:1,model:l,isStopPropagation:d}),u}return t=a,(n=[{key:"getShape",value:function(){var o=this.props,u=o.model,l=o.graphModel,d=u.text,b=l.editConfigModel,O=d.value,j=d.x,C=d.y,R=d.editable,X=d.draggable,te={x:j,y:C,className:"",value:O};R?te.className="lf-element-text":X||b.nodeTextDraggable?te.className="lf-text-draggable":te.className="lf-text-disabled";var ue=u.getTextStyle();return Object(ee.g)(hy,Fs({},te,ue,{model:u}))}},{key:"render",value:function(){if(this.props.model.text)return Object(ee.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&r0(t.prototype,n),a}(ee.a),a0=window.navigator.userAgent.match(/MSIE|Trident/)!==null,hi=new Map,Ay=function(e){var t=hi.get(e);t&&(window.cancelAnimationFrame(t),hi.delete(e))};function Ys(e){return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ys(e)}function Ua(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return vy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return vy(n,r)}}(e,t)||function(){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 vy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function by(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Us(e,t){return Us=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Us(e,t)}function u0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ha(e);if(t){var a=Ha(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return c0(this,n)}}function c0(e,t){if(t&&(Ys(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tn(e)}function tn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ha(e){return Ha=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ha(e)}function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vr=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&Us(u,l)})(o,e);var t,n,r,a=u0(o);function o(u){var l;(function(C,R){if(!(C instanceof R))throw new TypeError("Cannot call a class as a function")})(this,o),ln(tn(l=a.call(this)),"t",void 0),ln(tn(l),"moveOffset",void 0),ln(tn(l),"stepDrag",void 0),ln(tn(l),"contextMenuTime",void 0),ln(tn(l),"startTime",void 0),ln(tn(l),"clickTimer",void 0),ln(tn(l),"onDragStart",function(C){var R=C.event,X=R.clientX,te=R.clientY,ue=l.props,ae=ue.model,ge=ue.graphModel.getPointByClient({x:X,y:te}).canvasOverlayPosition,ve=ge.x,Me=ge.y;l.moveOffset={x:ae.x-ve,y:ae.y-Me}}),ln(tn(l),"onDraging",function(C){var R=C.event,X=l.props,te=X.model,ue=X.graphModel,ae=ue.editConfigModel,ge=ue.transformModel,ve=ue.width,Me=ue.height,_e=ue.gridSize;te.isDragging=!0;var Fe=R.clientX,He=R.clientY,Re=ue.getPointByClient({x:Fe,y:He}).canvasOverlayPosition,yt=Re.x,vt=Re.y,It=Ua(ge.CanvasPointToHtmlPoint([yt,vt]),2),Wt=It[0],Kt=It[1];if(!(Wt<0||Kt<0||Wt>ve||Kt>Me)){yt+=l.moveOffset.x,vt+=l.moveOffset.y,yt=Ao(yt,_e),vt=Ao(vt,_e);var nn,fn,wr,eo=Ua(ge.CanvasPointToHtmlPoint([yt-te.width/2,vt-te.height/2]),2),Or=eo[0],bi=eo[1],yu=Ua(ge.CanvasPointToHtmlPoint([yt+te.width/2,vt+te.height/2]),2),gu=yu[0],To=yu[1],Io=Math.max(_e,20),Rr=[];Or<0?Rr=[Io,0]:gu>ue.width?Rr=[-Io,0]:bi<0?Rr=[0,Io]:To>ue.height&&(Rr=[0,-Io]),l.t&&Ay(l.t),Rr.length>0&&!ae.stopMoveGraph?l.t=(nn=function(){var Au=Ua(Rr,2),vu=Au[0],ng=Au[1];ge.translate(vu,ng),ue.moveNode(te.id,-vu/ge.SCALE_X,-ng/ge.SCALE_X)},fn=Xr(),wr=window.requestAnimationFrame(function Au(){if(nn(),hi.get(fn)){var vu=window.requestAnimationFrame(Au);hi.set(fn,vu)}}),hi.set(fn,wr),fn):ue.moveNode2Coordinate(te.id,yt,vt)}}),ln(tn(l),"onDragEnd",function(){l.t&&Ay(l.t),l.props.model.isDragging=!1}),ln(tn(l),"handleClick",function(C){if(l.startTime&&!(new Date().getTime()-l.startTime>200)){var R=l.props,X=R.model,te=R.graphModel,ue={data:X.getData(),e:C,position:te.getPointByClient({x:C.clientX,y:C.clientY})},ae=C.button===2,ge=C.detail===2;if(!ae){var ve=te.editConfigModel;te.selectNodeById(X.id,pp(C,ve)),l.toFront(),ge?(ve.nodeTextEdit&&X.text.editable&&(X.setSelected(!1),te.setElementStateById(X.id,Ot.TEXT_EDIT)),te.eventCenter.emit(at.NODE_DBCLICK,ue)):(te.eventCenter.emit(at.ELEMENT_CLICK,ue),te.eventCenter.emit(at.NODE_CLICK,ue))}}}),ln(tn(l),"handleContextMenu",function(C){C.preventDefault();var R=l.props,X=R.model,te=R.graphModel,ue=X.getData(),ae=te.getPointByClient({x:C.clientX,y:C.clientY});te.setElementStateById(X.id,Ot.SHOW_MENU,ae.domOverlayPosition),te.selectNodeById(X.id),te.eventCenter.emit(at.NODE_CONTEXTMENU,{data:ue,e:C,position:ae}),l.toFront()}),ln(tn(l),"handleMouseDown",function(C){var R=l.props,X=R.model,te=R.graphModel;l.toFront(),l.startTime=new Date().getTime(),te.editConfigModel.adjustNodePosition&&X.draggable&&l.stepDrag&&l.stepDrag.handleMouseDown(C)}),ln(tn(l),"setHoverON",function(C){if(!l.state.isHovered){l.setState({isHovered:!0});var R=l.props,X=R.model,te=R.graphModel,ue=X.getData();X.setHovered(!0),te.eventCenter.emit(at.NODE_MOUSEENTER,{data:ue,e:C})}}),ln(tn(l),"setHoverOFF",function(C){l.setState({isHovered:!1});var R=l.props,X=R.model,te=R.graphModel,ue=X.getData();X.setHovered(!1),te.eventCenter.emit(at.NODE_MOUSELEAVE,{data:ue,e:C})}),ln(tn(l),"onMouseOut",function(C){a0&&l.setHoverOFF(C)});var d=u.graphModel,b=d.gridSize,O=d.eventCenter,j=u.model;return l.stepDrag=new Jr({onDragStart:l.onDragStart,onDraging:l.onDraging,onDragEnd:l.onDragEnd,step:b,eventType:"NODE",isStopPropagation:!1,eventCenter:O,model:j}),l.state={isHovered:!1},l}return t=o,r=[{key:"getModel",value:function(u){return u}}],(n=[{key:"getAnchorShape",value:function(u){return null}},{key:"getAnchors",value:function(){var u=this,l=this.props,d=l.model,b=l.graphModel,O=d.isSelected,j=d.isHitable,C=d.isDragging,R=this.state.isHovered;if(j&&(O||R)&&!C){var X=d.getAnchorLineStyle();return aa(d.anchors,function(te,ue){var ae=d.getAnchorStyle(te);return Object(ee.g)(qm,{anchorData:te,node:u,style:ae,edgeStyle:X,anchorIndex:ue,nodeModel:d,graphModel:b,setHoverOFF:u.setHoverOFF})})}return[]}},{key:"getText",value:function(){var u=this.props,l=u.model,d=u.graphModel;if(l.state===Ot.TEXT_EDIT)return"";if(l.text){var b=d.editConfigModel,O=!1;return(l.text.draggable||b.nodeTextDraggable)&&(O=!0),Object(ee.g)(gy,{editable:b.nodeTextEdit&&l.text.editable,model:l,graphModel:d,draggable:O})}}},{key:"getStateClassName",value:function(){var u=this.props.model,l=u.state,d=u.isDraging,b=u.isSelected,O="lf-node";switch(l){case Ot.ALLOW_CONNECT:O+=" lf-node-allow";break;case Ot.NOT_ALLOW_CONNECT:O+=" lf-node-not-allow";break;default:O+=" lf-node-default"}return d&&(O+=" lf-isDragging"),b&&(O+=" lf-node-selected"),O}},{key:"toFront",value:function(){var u=this.props,l=u.model,d=u.graphModel;d.overlapMode!==wn.INCREASE&&l.autoToFront&&d.toFront(l.id)}},{key:"render",value:function(){var u,l=this.props,d=l.model,b=l.graphModel,O=b.editConfigModel,j=O.hideAnchors,C=O.adjustNodePosition,R=b.gridSize,X=b.transformModel.SCALE_X,te=d.isHitable,ue=d.draggable,ae=Object(ee.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),j?null:this.getAnchors());return te?(C&&ue&&this.stepDrag.setStep(R*X),u=Object(ee.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},ae)):u=Object(ee.g)("g",{className:this.getStateClassName()},ae),u}}])&&by(t.prototype,n),r&&by(t,r),o}(ee.a);function Hs(e){return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hs(e)}function Vs(){return Vs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vs.apply(this,arguments)}function s0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ws(e,t){return Ws=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ws(e,t)}function f0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Va(e);if(t){var a=Va(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return p0(this,n)}}function p0(e,t){if(t&&(Hs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Va(e){return Va=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Va(e)}var Xs=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Ws(o,u)})(a,e);var t,n,r=f0(a);function a(){return s0(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(ee.g)(Nr,Vs({},u,{x:o.x,y:o.y,width:o.width,height:o.height,radius:o.radius}))}}])&&l0(t.prototype,n),a}(vr);function Js(e){return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Js(e)}function Zs(){return Zs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zs.apply(this,arguments)}function d0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ks(e,t){return Ks=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ks(e,t)}function y0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Wa(e);if(t){var a=Wa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return g0(this,n)}}function g0(e,t){if(t&&(Js(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wa(e)}var qs=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Ks(o,u)})(a,e);var t,n,r=y0(a);function a(){return d0(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,l=o.y,d=o.r,b=o.getNodeStyle();return Object(ee.g)(si,Zs({},b,{x:u,y:l,r:d}))}}])&&h0(t.prototype,n),a}(vr);function $s(e){return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function A0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return my(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return my(n,r)}}(e,t)||function(){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 my(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wy(e){var t=e.points,n=e.className,r={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(e).forEach(function(a){var o=A0(a,2),u=o[0],l=o[1];$s(l)!=="object"&&(r[u]=l)}),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=t.map(function(a){return a.join(",")}).join(" "),Object(ee.g)("polygon",r)}function el(e){return el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}function tl(){return tl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tl.apply(this,arguments)}function v0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nl(e,t){return nl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},nl(e,t)}function m0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Xa(e);if(t){var a=Xa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return w0(this,n)}}function w0(e,t){if(t&&(el(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Xa(e){return Xa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xa(e)}var rl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&nl(o,u)})(a,e);var t,n,r=m0(a);function a(){return v0(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,l=o.y,d=o.width,b=o.height,O=o.points,j=o.getNodeStyle(),C={transform:"matrix(1 0 0 1 ".concat(u-d/2," ").concat(l-b/2,")")};return Object(ee.g)("g",C,Object(ee.g)(wy,tl({},j,{points:O,x:u,y:l})))}}])&&b0(t.prototype,n),a}(vr);function ol(e){return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}function il(){return il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},il.apply(this,arguments)}function O0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function al(e,t){return al=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},al(e,t)}function x0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ja(e);if(t){var a=Ja(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _0(this,n)}}function _0(e,t){if(t&&(ol(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ja(e){return Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ja(e)}var ul=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&al(o,u)})(a,e);var t,n,r=x0(a);function a(){return O0(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(ee.g)("g",null,Object(ee.g)(wy,il({},u,{points:o.points,x:o.x,y:o.y})))}}])&&E0(t.prototype,n),a}(vr);function cl(e){return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cl(e)}function j0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Oy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Oy(n,r)}}(e,t)||function(){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 Oy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S0(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,o=e.rx,u=o===void 0?4:o,l=e.ry,d=l===void 0?4:l,b=e.className,O={cx:n,cy:a,rx:u,ry:d,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(j){var C=j0(j,2),R=C[0],X=C[1];cl(X)!=="object"&&(O[R]=X)}),O.className=b?"lf-basic-shape ".concat(b):"lf-basic-shape",Object(ee.g)("ellipse",O)}function sl(e){return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function ll(){return ll=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ll.apply(this,arguments)}function k0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fl(e,t){return fl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},fl(e,t)}function D0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Za(e);if(t){var a=Za(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return C0(this,n)}}function C0(e,t){if(t&&(sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Za(e)}var pl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&fl(o,u)})(a,e);var t,n,r=D0(a);function a(){return k0(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(ee.g)(S0,ll({},u,{x:o.x,y:o.y,rx:o.rx,ry:o.ry}))}}])&&P0(t.prototype,n),a}(vr);function dl(e){return dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dl(e)}function Ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(n),!0).forEach(function(r){N0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ey(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hl(e,t){return hl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},hl(e,t)}function T0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ka(e);if(t){var a=Ka(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return I0(this,n)}}function I0(e,t){if(t&&(dl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ka(e){return Ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ka(e)}var yl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&hl(o,u)})(a,e);var t,n,r=T0(a);function a(){return M0(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getBackgroud",value:function(){var o=this.props.model,u=o.getTextStyle(),l=o.text;if(l&&l.value&&u.background&&u.background.fill!=="transparnet"){var d=l.x,b=l.y,O=o.width,j=o.height,C=xy(xy({},u.background),{},{x:d,y:b-1,width:O,height:j});return Object(ee.g)(Nr,C)}}},{key:"getShape",value:function(){return Object(ee.g)("g",null,this.getBackgroud())}}])&&B0(t.prototype,n),a}(vr);function gl(e){return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}function Al(){return Al=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Al.apply(this,arguments)}function R0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vl(e,t){return vl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},vl(e,t)}function L0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=qa(e);if(t){var a=qa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Q0(this,n)}}function Q0(e,t){if(t&&(gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yi(e)}function yi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qa(e){return qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qa(e)}function $a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&vl(o,u)})(a,e);var t,n,r=L0(a);function a(){var o;R0(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return $a(yi(o=r.call.apply(r,[this].concat(l))),"ref",void 0),$a(yi(o),"currrentProperties",void 0),$a(yi(o),"preProperties",void 0),$a(yi(o),"setRef",function(b){o.ref=b}),o}return t=a,(n=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(o){o.appendChild(document.createElement("div"))}},{key:"shouldUpdate",value:function(){if(!this.preProperties||this.preProperties!==this.currrentProperties)return this.preProperties=this.currrentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var o=this.props.model,u=o.x,l=o.y,d=o.height,b=o.width,O=o.getNodeStyle();return this.currrentProperties=JSON.stringify(o.properties),Object(ee.g)("foreignObject",Al({},O,{x:u-b/2,y:l-d/2,width:b,height:d,ref:this.setRef}))}}])&&z0(t.prototype,n),a}(vr);function ml(e){return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}function wl(){return wl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wl.apply(this,arguments)}function _y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(n),!0).forEach(function(r){xl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_y(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ol(e,t){return Ol=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ol(e,t)}function G0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=eu(e);if(t){var a=eu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Y0(this,n)}}function Y0(e,t){if(t&&(ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return El(e)}function El(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(e){return eu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},eu(e)}function xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tr,U0=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Ol(o,u)})(a,e);var t,n,r=G0(a);function a(o){var u;return function(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}(this,a),xl(El(u=r.call(this,o)),"setHoverON",function(){u.setState({isHoverd:!0})}),xl(El(u),"setHoverOFF",function(){u.setState({isHoverd:!1})}),u.state={isHoverd:!1},u}return t=a,(n=[{key:"getBackgroud",value:function(){var o=this.props.model,u=o.getTextStyle(),l=o.text,d=u.background||{};if(this.state.isHoverd&&u.hover&&u.hover.background&&(d=qr(qr({},d),u.hover.background)),l&&l.value&&d.fill!=="transparent"){var b,O=u.fontSize,j=u.overflowMode,C=u.lineHeight,R=u.wrapPadding,X=u.textWidth,te=l.value,ue=l.x,ae=l.y,ge=String(te).split(/[\r\n]/g),ve=ge.length;if(j==="autoWrap"&&X){var Me=Lp({rows:ge,style:{fontSize:"".concat(O,"px"),width:"".concat(X,"px"),lineHeight:C,padding:R},rowsLength:ve,className:"lf-get-text-height"});b=qr(qr({},d),{},{x:ue-1,y:ae-1,width:X,height:Me})}else{ge&&ge.forEach(function(yt){ud(yt)});var _e=lc({rows:ge,fontSize:O,rowsLength:ve}),Fe=_e.width,He=_e.height;if(typeof d.wrapPadding=="string"){var Re=d.wrapPadding.split(",").filter(function(yt){return yt.trim()}).map(function(yt){return parseFloat(yt.trim())});Re.length>0&&Re.length<=4&&(Re.length===1?Re=[Re[0],Re[0],Re[0],Re[0]]:Re.length===2?Re=[Re[0],Re[1],Re[0],Re[1]]:Re.length===3&&(Re=[Re[0],Re[1],Re[2],Re[1]]),Fe+=Re[1]+Re[3],He+=Re[0]+Re[2],ue+=(Re[1]-Re[3])/2,ae+=(Re[2]-Re[0])/2)}b=qr(qr({},d),{},{x:ue-1,y:ae-1,width:Fe,height:He})}return Object(ee.g)(Nr,b)}}},{key:"getShape",value:function(){var o=this.props.model,u=o.text,l=u.value,d=u.x,b=u.y;if(l){var O=qr({x:d,y:b,className:"lf-element-text",value:l},o.getTextStyle());return Object(ee.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(ee.g)(hy,wl({},O,{model:o})))}}}])&&F0(t.prototype,n),a}(gy);function _l(e){return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function jl(){return jl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}function jy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jy(Object(n),!0).forEach(function(r){zn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Sy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Sy(n,r)}}(e,t)||function(){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 Sy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sl(e,t){return Sl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Sl(e,t)}function W0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=tu(e);if(t){var a=tu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return X0(this,n)}}function X0(e,t){if(t&&(_l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rn(e)}function Rn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tu(e){return tu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},tu(e)}function zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(tr||(tr={}));var ky=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Sl(o,u)})(a,e);var t,n,r=W0(a);function a(){var o;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,a),zn(Rn(o=r.call(this)),"dragHandler",void 0),zn(Rn(o),"oldEdge",void 0),zn(Rn(o),"preTargetNode",void 0),zn(Rn(o),"targetRuleResults",void 0),zn(Rn(o),"sourceRuleResults",void 0),zn(Rn(o),"onDragStart",function(){var u=o.props,l=u.x,d=u.y,b=u.edgeModel,O=b.startPoint,j=b.endPoint,C=b.pointsList;o.oldEdge={startPoint:O,endPoint:j,pointsList:C},o.setState({endX:l,endY:d,draging:!0}),b.isHitable=!1}),zn(Rn(o),"onDraging",function(u){var l=u.deltaX,d=u.deltaY,b=o.state,O=b.endX,j=b.endY,C=o.props,R=C.graphModel,X=C.type,te=H0(R.transformModel.moveCanvasPointByHtml([O,j],l,d),2),ue=te[0],ae=te[1];o.setState({endX:ue,endY:ae,draging:!0});var ge=o.props.edgeModel,ve=la({x:O,y:j},R);if(ve&&ve.node&&o.isAllowAdjust(ve)){var Me,_e=ge.startPoint,Fe=ge.endPoint,He=ge.sourceNode,Re=ge.targetNode;X===tr.SOURCE?Me={startPoint:{x:ve.anchor.x,y:ve.anchor.y},endPoint:{x:Fe.x,y:Fe.y},sourceNode:ve.node,targetNode:Re}:X===tr.TARGET&&(Me={startPoint:{x:_e.x,y:_e.y},endPoint:{x:ve.anchor.x,y:ve.anchor.y},sourceNode:He,targetNode:ve.node}),ge.updateAfterAdjustStartAndEnd(Me)}else X===tr.SOURCE?ge.updateStartPoint({x:ue,y:ae}):X===tr.TARGET&&ge.updateEndPoint({x:ue,y:ae})}),zn(Rn(o),"onDragEnd",function(){var u;o.setState({draging:!1});var l=o.props,d=l.graphModel,b=l.edgeModel,O=l.type;b.isHitable=!0;var j=o.state,C=j.endX,R=j.endY,X=j.draging,te=la({x:C,y:R},d);if(X){if(te&&te.node&&o.isAllowAdjust(te)){var ue,ae=b.getData(),ge=br(br({},ae),{},{sourceAnchorId:"",targetAnchorId:"",text:(ae==null||(ue=ae.text)===null||ue===void 0?void 0:ue.value)||""});O===tr.SOURCE?ge=br(br({},ge),{},{sourceNodeId:te.node.id,sourceAnchorId:te.anchor.id,startPoint:{x:te.anchor.x,y:te.anchor.y},targetNodeId:b.targetNodeId,endPoint:br({},b.endPoint)}):O===tr.TARGET&&(ge=br(br({},ge),{},{sourceNodeId:b.sourceNodeId,startPoint:br({},b.startPoint),targetNodeId:te.node.id,targetAnchorId:te.anchor.id,endPoint:{x:te.anchor.x,y:te.anchor.y}})),d.deleteEdgeById(b.id);var ve=d.addEdge(br({},ge));d.eventCenter.emit(at.EDGE_EXCHANGE_NODE,{data:{newEdge:ve.getData(),oldEdge:b.getData()}})}else o.recoveryEdge();(u=o.preTargetNode)===null||u===void 0||u.setElementState(Ot.DEFAULT)}}),zn(Rn(o),"recoveryEdge",function(){var u=o.props.edgeModel,l=o.oldEdge,d=l.startPoint,b=l.endPoint,O=l.pointsList;u.updateStartPoint(d),u.updateEndPoint(b),u.modelType!==pt.LINE_EDGE&&(u.pointsList=O,u.initPoints())}),zn(Rn(o),"getAdjustPointStyle",function(){return o.props.graphModel.theme.edgeAdjust}),o.state={draging:!1,endX:0,endY:0},o.targetRuleResults=new Map,o.sourceRuleResults=new Map,o.dragHandler=kc({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd}),o}return t=a,(n=[{key:"isAllowAdjust",value:function(o){var u=this.props,l=u.edgeModel,d=(l.id,l.sourceNode),b=l.targetNode,O=l.sourceAnchorId,j=l.targetAnchorId,C=u.type,R=null,X=null,te=null,ue=null;if(C===tr.SOURCE?(R=o.node,X=b,te=o.anchor,ue=b.getAnchorInfo(j)):(R=d,X=o.node,ue=o.anchor,te=d.getAnchorInfo(O)),this.preTargetNode&&this.preTargetNode!==o.node&&this.preTargetNode.setElementState(Ot.DEFAULT),this.preTargetNode=o.node,ue.id===te.id)return!1;var ae="".concat(R.id,"_").concat(X.id,"_").concat(te.id,"_").concat(ue.id);if(!this.targetRuleResults.has(ae)){var ge=R.isAllowConnectedAsSource(X,te,ue),ve=X.isAllowConnectedAsTarget(R,te,ue);this.sourceRuleResults.set(ae,fa(ge)),this.targetRuleResults.set(ae,fa(ve))}var Me=this.sourceRuleResults.get(ae).isAllPass,_e=this.targetRuleResults.get(ae).isAllPass,Fe=Me&&_e?Ot.ALLOW_CONNECT:Ot.NOT_ALLOW_CONNECT;return C===tr.SOURCE?R.setElementState(Fe):X.setElementState(Fe),Me&&_e}},{key:"render",value:function(){var o=this.props,u=o.x,l=o.y,d=this.state.draging,b=this.getAdjustPointStyle();return Object(ee.g)("g",null,Object(ee.g)(si,jl({className:"lf-edge-adjust-point"},b,{x:u,y:l,onMouseDown:this.dragHandler,"pointer-events":d?"none":""})))}}])&&V0(t.prototype,n),a}(ee.a);function kl(e){return kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(e)}function nu(){return nu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nu.apply(this,arguments)}function Py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Py(Object(n),!0).forEach(function(r){Qn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Py(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t){return Pl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Pl(e,t)}function K0(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ru(e);if(t){var a=ru(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return q0(this,n)}}function q0(e,t){if(t&&(kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ln(e)}function Ln(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ru(e)}function Qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gi=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Pl(o,u)})(a,e);var t,n,r=K0(a);function a(){var o;J0(this,a);for(var u=arguments.length,l=new Array(u),d=0;d<u;d++)l[d]=arguments[d];return Qn(Ln(o=r.call.apply(r,[this].concat(l))),"startTime",void 0),Qn(Ln(o),"contextMenuTime",void 0),Qn(Ln(o),"clickTimer",void 0),Qn(Ln(o),"handleHover",function(b,O){var j=o.props,C=j.model,R=j.graphModel.eventCenter;C.setHovered(b);var X=b?at.EDGE_MOUSEENTER:at.EDGE_MOUSELEAVE,te=C.getData();R.emit(X,{data:te,e:O})}),Qn(Ln(o),"setHoverON",function(b){o.props.model.isHovered||o.handleHover(!0,b)}),Qn(Ln(o),"setHoverOFF",function(b){o.handleHover(!1,b)}),Qn(Ln(o),"handleContextMenu",function(b){b.preventDefault(),o.contextMenuTime=new Date().getTime(),o.clickTimer&&clearTimeout(o.clickTimer);var O=o.props,j=O.model,C=O.graphModel,R=C.getPointByClient({x:b.clientX,y:b.clientY});C.setElementStateById(j.id,Ot.SHOW_MENU,R.domOverlayPosition),o.toFront(),C.selectEdgeById(j.id);var X=j==null?void 0:j.getData();C.eventCenter.emit(at.EDGE_CONTEXTMENU,{data:X,e:b,position:R})}),Qn(Ln(o),"handleMouseDown",function(b){b.stopPropagation(),o.startTime=new Date().getTime()}),Qn(Ln(o),"handleMouseUp",function(b){if(o.startTime&&!(new Date().getTime()-o.startTime>200||b.button===2)){var O=b.detail===2,j=o.props,C=j.model,R=j.graphModel,X=C==null?void 0:C.getData(),te=R.getPointByClient({x:b.clientX,y:b.clientY});if(O){var ue=R.editConfigModel,ae=R.textEditElement;if(ae&&ae.id===C.id&&R.setElementStateById(C.id,Ot.DEFAULT),ue.edgeTextEdit&&C.text.editable&&R.setElementStateById(C.id,Ot.TEXT_EDIT),C.modelType===pt.POLYLINE_EDGE){var ge=C,ve=R.getPointByClient({x:b.x,y:b.y}).canvasOverlayPosition,Me=ve.x,_e=ve.y,Fe=sd({x:Me,y:_e},ge.points);ge.dbClickPosition=Fe}R.eventCenter.emit(at.EDGE_DBCLICK,{data:X,e:b,position:te})}else R.eventCenter.emit(at.ELEMENT_CLICK,{data:X,e:b,position:te}),R.eventCenter.emit(at.EDGE_CLICK,{data:X,e:b,position:te});var He=R.editConfigModel;R.selectEdgeById(C.id,pp(b,He)),o.toFront()}}),Qn(Ln(o),"getIsDraging",function(){return!1}),o}return t=a,(n=[{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,u=o.model,l=o.graphModel;if(u.state===Ot.TEXT_EDIT)return"";var d=!1,b=l.editConfigModel;return(u.text.draggable||b.edgeTextDraggable)&&(d=!0),Object(ee.g)(U0,{editable:b.edgeTextEdit&&u.text.editable,model:u,graphModel:l,draggable:d})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.startPoint,l=o.endPoint,d=o.isSelected;return{start:u,end:l,hover:this.state.hover,isSelected:d}}},{key:"getArrowStyle",value:function(){var o=this.props,u=o.model,l=o.graphModel,d=u.getEdgeStyle(),b=u.getEdgeAnimationStyle(),O=l.theme.arrow,j=u.isAnimation?b.stroke:d.stroke;return Dy(Dy({},d),{},{fill:j,stroke:j},O)}},{key:"getArrow",value:function(){return Object(ee.g)("g",null,Object(ee.g)("defs",null,this.getStartArrow(),this.getEndArrow()))}},{key:"getStartArrow",value:function(){var o=this.props,u=o.model,l=o.graphModel,d=u.id,b=l.theme.arrow,O=b.offset,j=b.verticalLength,C=this.getArrowStyle(),R=C.stroke,X=C.strokeWidth;return Object(ee.g)("marker",{id:"marker-start-".concat(d),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(ee.g)("path",{stroke:R,fill:R,strokeWidth:X,d:"M 0 0 L ".concat(O," -").concat(j," L ").concat(O," ").concat(j," Z")}))}},{key:"getEndArrow",value:function(){var o=this.props,u=o.model,l=o.graphModel,d=u.id,b=l.theme.arrow,O=b.offset,j=b.verticalLength,C=this.getArrowStyle(),R=C.stroke,X=C.strokeWidth;return Object(ee.g)("marker",{id:"marker-end-".concat(d),refX:"-1",overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},Object(ee.g)("path",{stroke:R,fill:R,strokeWidth:X,transform:"rotate(180)",d:"M 0 0 L ".concat(O," -").concat(j," L ").concat(O," ").concat(j," Z")}))}},{key:"getAdjustPoints",value:function(){var o=this.props,u=o.model,l=o.graphModel,d=u.getAdjustStart(),b=u.getAdjustEnd();return Object(ee.g)("g",null,Object(ee.g)(ky,nu({type:"SOURCE"},d,{edgeModel:u,graphModel:l})),Object(ee.g)(ky,nu({type:"TARGET"},b,{edgeModel:u,graphModel:l})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(ee.g)("g",null)}},{key:"getAppend",value:function(){return Object(ee.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var o=this.props,u=o.graphModel,l=o.model;u.overlapMode!==wn.INCREASE&&u.toFront(l.id)}},{key:"render",value:function(){var o=this.props,u=o.model,l=u.isSelected,d=u.isHitable,b=o.graphModel,O=this.getIsDraging(),j=b.editConfigModel.adjustEdgeStartAndEnd,C=b.animation,R=l&&C.edge&&b.getSelectElements().edges.length===1;return Object(ee.g)("g",null,Object(ee.g)("g",{className:["lf-edge",!d&&"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(),R&&this.getAnimation(),this.getText(),this.getArrow()),j&&l&&!O?this.getAdjustPoints():"")}}])&&Z0(t.prototype,n),a}(ee.a);function Dl(e){return Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}function $0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Cy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Cy(n,r)}}(e,t)||function(){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 Cy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var No=function(e){var t={d:""};return Object.entries(e).forEach(function(n){var r=$0(n,2),a=r[0],o=r[1],u=Dl(o);a!=="style"&&u==="object"||(t[a]=o)}),Object(ee.g)("path",t)};function Cl(e){return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function ou(){return ou=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ou.apply(this,arguments)}function ew(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nl(e,t){return Nl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Nl(e,t)}function nw(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=iu(e);if(t){var a=iu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return rw(this,n)}}function rw(e,t){if(t&&(Cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function iu(e){return iu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},iu(e)}var Ml=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Nl(o,u)})(a,e);var t,n,r=nw(a);function a(){return ew(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.startPoint,l=o.endPoint,d=o.isAnimation,b=o.arrowConfig,O=o.getEdgeStyle(),j=o.getEdgeAnimationStyle(),C=j.strokeDasharray,R=j.stroke,X=j.strokeDashoffset,te=j.animationName,ue=j.animationDuration,ae=j.animationIterationCount,ge=j.animationTimingFunction,ve=j.animationDirection;return Object(ee.g)(Zr,ou({},O,{x1:u.x,y1:u.y,x2:l.x,y2:l.y},b,d?{strokeDasharray:C,stroke:R,style:{strokeDashoffset:X,animationName:te,animationDuration:ue,animationIterationCount:ae,animationTimingFunction:ge,animationDirection:ve}}:{}))}},{key:"getShape",value:function(){return Object(ee.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var o=this.props.model,u=o.getAnimation(),l=u.stroke,d=u.className,b=u.strokeDasharray,O=o.startPoint,j=o.endPoint,C=o.getEdgeStyle();return Object(ee.g)("g",null,Object(ee.g)(Zr,ou({},C,{x1:O.x,y1:O.y,x2:j.x,y2:j.y,className:d,strokeDasharray:b,stroke:l})))}},{key:"getAppendWidth",value:function(){var o=this.props.model,u=function(C){var R,X=C.start,te=C.end;if(X.x===te.x&&X.y===te.y)R="";else{var ue={start:X,end:te,offset:10,verticalLength:5},ae=ai(pa(pa({},ue),{},{type:"start"})),ge=ai(pa(pa({},ue),{},{type:"end"}));R="M".concat(ae.leftX," ").concat(ae.leftY,`
- L`).concat(ae.rightX," ").concat(ae.rightY,`
- L`).concat(ge.rightX," ").concat(ge.rightY,`
- L`).concat(ge.leftX," ").concat(ge.leftY," z")}return{d:R,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:o.startPoint,end:o.endPoint}),l=u.d,d=u.strokeWidth,b=u.fill,O=u.strokeDasharray,j=u.stroke;return Object(ee.g)(No,{d:l,fill:b,strokeWidth:d,stroke:j,strokeDasharray:O})}}])&&tw(t.prototype,n),a}(gi);function Bl(e){return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function ow(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Ny(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ny(n,r)}}(e,t)||function(){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 Ny(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var My=function(e){var t={points:"",fill:"none"};return Object.entries(e).forEach(function(n){var r=ow(n,2),a=r[0],o=r[1];(a==="style"||Bl(o)!=="object")&&(t[a]=o)}),Object(ee.g)("polyline",t)};function Tl(e){return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function By(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function au(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?By(Object(n),!0).forEach(function(r){rr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):By(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uu(){return uu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uu.apply(this,arguments)}function iw(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Ty(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ty(n,r)}}(e,t)||function(){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 Ty(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Il(e,t){return Il=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Il(e,t)}function uw(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=cu(e);if(t){var a=cu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cw(this,n)}}function cw(e,t){if(t&&(Tl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nr(e)}function nr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cu(e){return cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cu(e)}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Il(o,u)})(a,e);var t,n,r=uw(a);function a(){var o;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,a),rr(nr(o=r.call(this)),"drag",void 0),rr(nr(o),"isDraging",void 0),rr(nr(o),"appendInfo",void 0),rr(nr(o),"dragHandler",void 0),rr(nr(o),"onDragStart",function(){o.props.model.dragAppendStart()}),rr(nr(o),"onDraging",function(u){var l=u.deltaX,d=u.deltaY,b=o.props,O=b.model,j=b.graphModel;o.isDraging=!0;var C=j.transformModel,R=j.editConfigModel,X=iw(C.fixDeltaXY(l,d),2),te=X[0],ue=X[1],ae=O,ge=R.adjustEdgeMiddle;o.appendInfo=ge?ae.dragAppendSimple(o.appendInfo,{x:te,y:ue}):ae.dragAppend(o.appendInfo,{x:te,y:ue})}),rr(nr(o),"onDragEnd",function(){var u=o.props,l=u.model,d=u.graphModel.eventCenter,b=l;b.dragAppendEnd(),o.isDraging=!1,o.appendInfo=void 0,d.emit(at.EDGE_ADJUST,{data:b.getData()})}),rr(nr(o),"beforeDragStart",function(u,l){l.dragAble&&o.dragHandler(u),o.appendInfo=l}),rr(nr(o),"getIsDraging",function(){return o.isDraging}),o.drag=kc({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd,isStopPropagation:!1}),o}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.points,l=o.isAnimation,d=o.arrowConfig,b=o.getEdgeStyle(),O=o.getEdgeAnimationStyle(),j=O.strokeDasharray,C=O.stroke,R=O.strokeDashoffset,X=O.animationName,te=O.animationDuration,ue=O.animationIterationCount,ae=O.animationTimingFunction,ge=O.animationDirection;return Object(ee.g)(My,uu({points:u},b,d,l?{strokeDasharray:j,stroke:C,style:{strokeDashoffset:R,animationName:X,animationDuration:te,animationIterationCount:ue,animationTimingFunction:ae,animationDirection:ge}}:{}))}},{key:"getShape",value:function(){return Object(ee.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var o=this.props.model,u=o.getAnimation(),l=u.stroke,d=u.className,b=u.strokeDasharray,O=o.getEdgeStyle();return Object(ee.g)("g",null,Object(ee.g)(My,uu({points:o.points},O,{className:d,strokeDasharray:b,stroke:l})))}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.points,l=o.isSelected,d={start:null,end:null,hover:this.state.hover,isSelected:l},b=bo(u);return b.length>=2&&(d.start=b[b.length-2],d.end=b[b.length-1]),d}},{key:"getAppendAttributes",value:function(o){var u,l=o.start,d=o.end;if(l.x===d.x&&l.y===d.y)u="";else{var b={start:l,end:d,offset:10,verticalLength:5},O=ai(au(au({},b),{},{type:"start"})),j=ai(au(au({},b),{},{type:"end"}));u="M".concat(O.leftX," ").concat(O.leftY,`
- L`).concat(O.rightX," ").concat(O.rightY,`
- L`).concat(j.rightX," ").concat(j.rightY,`
- L`).concat(j.leftX," ").concat(j.leftY," z")}return{d:u,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var u=this.getAppendAttributes(o),l=u.d,d=u.strokeWidth,b=u.fill,O=u.strokeDasharray,j=u.stroke;return Object(ee.g)(No,{d:l,fill:b,strokeWidth:d,stroke:j,strokeDasharray:O})}},{key:"getAppendWidth",value:function(){for(var o=this,u=this.props,l=u.model,d=u.graphModel,b=l.pointsList,O=l.draggable,j=[],C=b.length,R=function(te){var ue="lf-polyline-append",ae={start:{x:b[te].x,y:b[te].y},end:{x:b[te+1].x,y:b[te+1].y},startIndex:te,endIndex:te+1,direction:"",dragAble:!0},ge=Object(ee.g)("g",{className:ue},o.getAppendShape(ae)),ve=d.editConfigModel,Me=ve.adjustEdge,_e=ve.adjustEdgeMiddle;if(Me&&O){o.dragHandler=o.drag;var Fe=ae.startIndex,He=ae.endIndex,Re=_e&&(Fe===0||He===C-1);ae.dragAble=!Re,ae.start.x===ae.end.x?(ae.dragAble&&(ue+="-ew-resize"),ae.direction=St.VERTICAL):ae.start.y===ae.end.y&&(ae.dragAble&&(ue+="-ns-resize"),ae.direction=St.HORIZONTAL),ge=Object(ee.g)("g",{className:o.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(yt){return o.beforeDragStart(yt,ae)}},Object(ee.g)("g",{className:ue},o.getAppendShape(ae)))}else o.dragHandler=function(){};j.push(ge)},X=0;X<C-1;X++)R(X);return Object(ee.g)("g",null,j)}}])&&aw(t.prototype,n),a}(gi);function zl(e){return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function sw(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Iy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Iy(n,r)}}(e,t)||function(){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 Iy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function su(){return su=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},su.apply(this,arguments)}function lw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ll(e,t){return Ll=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ll(e,t)}function pw(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=lu(e);if(t){var a=lu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return dw(this,n)}}function dw(e,t){if(t&&(zl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function lu(e){return lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(e)}var Ql=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Ll(o,u)})(a,e);var t,n,r=pw(a);function a(){return lw(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.getEdgeStyle(),l=o.path,d=o.isAnimation,b=o.arrowConfig,O=o.getEdgeAnimationStyle(),j=O.strokeDasharray,C=O.stroke,R=O.strokeDashoffset,X=O.animationName,te=O.animationDuration,ue=O.animationIterationCount,ae=O.animationTimingFunction,ge=O.animationDirection;return Object(ee.g)(No,su({d:l},u,b,d?{strokeDasharray:j,stroke:C,style:{strokeDashoffset:R,animationName:X,animationDuration:te,animationIterationCount:ue,animationTimingFunction:ae,animationDirection:ge}}:{}))}},{key:"getShape",value:function(){return Object(ee.g)("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var o=this.props.model,u=o.getAnimation(),l=u.stroke,d=u.className,b=u.strokeDasharray,O=o.getEdgeStyle();return Object(ee.g)("g",null,Object(ee.g)(No,su({d:o.path},O,{className:d,strokeDasharray:b,stroke:l})))}},{key:"getAppendWidth",value:function(){var o=this.props.model.path;return Object(ee.g)(No,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=this.state.hover,l=o,d=l.path,b=l.isSelected,O=function(C){var R=va(C);return[R[2],R[3]]}(d),j=sw(O,2);return{start:j[0],end:j[1],hover:u,isSelected:b}}}])&&fw(t.prototype,n),a}(gi);function Fl(e){return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function Ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gl(e,t){return Gl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Gl(e,t)}function Aw(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=fu(e);if(t){var a=fu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return vw(this,n)}}function vw(e,t){if(t&&(Fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function fu(e){return fu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fu(e)}var bw=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Gl(o,u)})(a,e);var t,n,r=Aw(a);function a(){return yw(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getArrowAttributes",value:function(){var o=this.props,u=o.arrowInfo,l=o.style,d=u.start,b=u.end,O={start:d,end:b,offset:l.offset,verticalLength:l.verticalLength,type:"end"},j=ai(O),C=j.leftX,R=j.leftY,X=j.rightX,te=j.rightY;return function(ue){for(var ae=1;ae<arguments.length;ae++){var ge=arguments[ae]!=null?arguments[ae]:{};ae%2?Ry(Object(ge),!0).forEach(function(ve){hw(ue,ve,ge[ve])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(ge)):Ry(Object(ge)).forEach(function(ve){Object.defineProperty(ue,ve,Object.getOwnPropertyDescriptor(ge,ve))})}return ue}({d:"M".concat(C," ").concat(R," L").concat(b.x," ").concat(b.y," L").concat(X," ").concat(te," z")},l)}},{key:"getShape",value:function(){var o=this.getArrowAttributes(),u=o.d,l=o.strokeWidth,d=o.stroke,b=o.fill;return Object(ee.g)(No,{d:u,fill:b,strokeWidth:l,stroke:d})}},{key:"render",value:function(){return Object(ee.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&gw(t.prototype,n),a}(ee.a),zy=function(e,t){return he(e,t)},mw=function(e){var t=e==null?0:e.length;return t?e[t-1]:void 0},Yl=function(){return Ye.a.Date.now()},ww=/\s/,Ow=function(e){for(var t=e.length;t--&&ww.test(e.charAt(t)););return t},Ew=/^\s+/,xw=function(e){return e&&e.slice(0,Ow(e)+1).replace(Ew,"")},_w=/^[-+]0x[0-9a-f]+$/i,jw=/^0b[01]+$/i,Sw=/^0o[0-7]+$/i,kw=parseInt,Ly=function(e){if(typeof e=="number")return e;if(ct(e))return NaN;if(kt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=kt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xw(e);var n=jw.test(e);return n||Sw.test(e)?kw(e.slice(2),n?2:8):_w.test(e)?NaN:+e},Pw=Math.max,Dw=Math.min,Cw=function(e,t,n){var r,a,o,u,l,d,b=0,O=!1,j=!1,C=!0;if(typeof e!="function")throw new TypeError("Expected a function");function R(ve){var Me=r,_e=a;return r=a=void 0,b=ve,u=e.apply(_e,Me)}function X(ve){return b=ve,l=setTimeout(ue,t),O?R(ve):u}function te(ve){var Me=ve-d;return d===void 0||Me>=t||Me<0||j&&ve-b>=o}function ue(){var ve=Yl();if(te(ve))return ae(ve);l=setTimeout(ue,function(Me){var _e=t-(Me-d);return j?Dw(_e,o-(Me-b)):_e}(ve))}function ae(ve){return l=void 0,C&&r?R(ve):(r=a=void 0,u)}function ge(){var ve=Yl(),Me=te(ve);if(r=arguments,a=this,d=ve,Me){if(l===void 0)return X(d);if(j)return clearTimeout(l),l=setTimeout(ue,t),R(d)}return l===void 0&&(l=setTimeout(ue,t)),u}return t=Ly(t)||0,kt(n)&&(O=!!n.leading,o=(j="maxWait"in n)?Pw(Ly(n.maxWait)||0,t):o,C="trailing"in n?!!n.trailing:C),ge.cancel=function(){l!==void 0&&clearTimeout(l),b=0,r=d=a=l=void 0},ge.flush=function(){return l===void 0?u:ae(Yl())},ge},Nw=i(166);function Mw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ir(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qy,Fy,Gy,Bw=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Ir(this,"undos",[]),Ir(this,"redos",[]),Ir(this,"callbacks",[]),Ir(this,"stopWatch",null),Ir(this,"curData",null),Ir(this,"maxSize",50),Ir(this,"waitTime",100),Ir(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,(n=[{key:"add",value:function(r){zy(mw(this.undos),r)||(this.undos.push(r),zy(this.curData,r)||(this.redos=[]),this.eventCenter.emit(at.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var r=this.undos.pop();this.redos.push(r);var a=this.undos.pop();return this.curData=Ct(a),a}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var r=this.redos.pop();return this.curData=Ct(r),r}}},{key:"watch",value:function(r){var a=this;this.stopWatch&&this.stopWatch(),this.undos.push(r.modelToGraphData()),this.stopWatch=Object(Nw.a)(r,Cw(function(){var o=r.modelToHistoryData();o&&a.add(o)},this.waitTime))}}])&&Mw(t.prototype,n),e}();function Ul(e){return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(e)}function Tw(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||function(n,r){if(!!n){if(typeof n=="string")return Yy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Yy(n,r)}}(e,t)||function(){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 Yy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uy(Object(n),!0).forEach(function(r){$r(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hl(e,t){return Hl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Hl(e,t)}function Iw(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=pu(e);if(t){var a=pu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Rw(this,n)}}function Rw(e,t){if(t&&(Ul(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bo(e)}function Bo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pu(e){return pu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pu(e)}function $r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vy,Wy,Xy,Vl=Fn((Gy=Fy=function(e){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&Hl(u,l)})(o,e);var t,n,r,a=Iw(o);function o(){var u;return function(l,d){if(!(l instanceof d))throw new TypeError("Cannot call a class as a function")}(this,o),$r(Bo(u=a.call(this)),"ref",Object(ee.f)()),$r(Bo(u),"__prevText",{type:"",text:"",id:""}),$r(Bo(u),"keyupHandler",function(l){var d=u.props.graphModel.textEditElement;l.key==="Enter"&&l.altKey&&d.setElementState(0)}),$r(Bo(u),"inputHandler",function(l){var d=l.target.innerText,b=u.props.graphModel.textEditElement;u.__prevText={type:b.type,text:d.replace(/(\r\n)+$|(\n)+$/,""),id:b.id}}),$r(Bo(u),"keydownHandler",function(l){l.stopPropagation()}),u.state={style:{left:0,top:0}},u}return t=o,r=[{key:"getDerivedStateFromProps",value:function(u){var l,d=u.graphModel,b=d.transformModel,O=d.theme,j=d.textEditElement;if(j){var C;if((C=j.text)===null||C===void 0||!C.value)if(j.BaseType===Gt.EDGE){var R=(j=j).text,X=j.textPosition,te=X.x,ue=X.y;R.x=te,R.y=ue,j.setText(R)}else j=j;var ae={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(j.BaseType===Gt.EDGE){var ge=O.edgeText,ve=ge.overflowMode,Me=ge.lineHeight,_e=ge.wrapPadding,Fe=ge.textWidth;Fe&&ve==="autoWrap"&&(l=Mo(Mo({},ae),{},{width:Fe,minWidth:Fe,lineHeight:Me,padding:_e}))}else if(j.BaseType===Gt.NODE){var He=O.nodeText,Re=He.overflowMode,yt=He.lineHeight,vt=He.wrapPadding,It=He.textWidth,Wt=j,Kt=Wt.width,nn=Wt.modelType;(nn!==pt.TEXT_NODE&&Re==="autoWrap"||nn===pt.TEXT_NODE&&It)&&(l=Mo(Mo({},ae),{},{width:It||Kt,minWidth:It||Kt,lineHeight:yt,padding:vt}))}var fn=j.text,wr=fn.x,eo=fn.y,Or=Tw(b.CanvasPointToHtmlPoint([wr,eo]),2);return{style:Mo({left:Or[0],top:Or[1]},l)}}}}],(n=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var u=this.props.graphModel,l=u.eventCenter,d=u.editConfigModel,b=d.edgeTextEdit,O=d.nodeTextEdit;(b||O)&&l.on("".concat(at.GRAPH_TRANSFORM,",").concat(at.NODE_CLICK,",").concat(at.BLANK_CLICK," "),function(){u.textEditElement&&u.textEditElement.setElementState(Ot.DEFAULT)})}},{key:"componentDidUpdate",value:function(){var u=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var l=this.__prevText,d=l.text,b=l.id;u.updateText(b,d),u.eventCenter.emit(at.TEXT_UPDATE,Mo({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(u){if(window.getSelection!==void 0&&document.createRange!==void 0){var l=document.createRange();l.selectNodeContents(u),l.collapse(!1);var d=window.getSelection();d.removeAllRanges(),d.addRange(l)}}},{key:"render",value:function(){var u,l=this.props.graphModel.textEditElement,d=this.state.style;return l?Object(ee.g)("div",{contentEditable:!0,className:"lf-text-input",style:d,ref:this.ref,key:l.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onInput:this.inputHandler},(u=l.text)===null||u===void 0?void 0:u.value):null}}])&&Hy(t.prototype,n),r&&Hy(t,r),o}(ee.a),$r(Fy,"toolName","textEdit"),Qy=Gy))||Qy,zw=function(e){return e.modelType===pt.LINE_EDGE?function(t){var n=t.startPoint,r=t.endPoint,a=(n.x+r.x)/2,o=(n.y+r.y)/2,u=Math.abs(n.x-r.x)+10,l=Math.abs(n.y-r.y)+10;return{x:a-u/2,y:o-l/2,x1:a+u/2,y1:o+l/2}}(e):e.modelType===pt.POLYLINE_EDGE?function(t){var n=t.points,r=bo(n),a=ui(r,8),o=a.x,u=a.y,l=a.width,d=a.height;return{x:o-l/2,y:u-d/2,x1:o+l/2,y1:u+d/2}}(e):e.modelType===pt.BEZIER_EDGE?function(t){var n=t.path,r=va(n),a=ui(r,8),o=a.x,u=a.y,l=a.width,d=a.height;return{x:o-l/2,y:u-d/2,x1:o+l/2,y1:u+d/2}}(e):void 0};function Wl(e){return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function Jy(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,l=[],d=!0,b=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(l.push(o.value),!r||l.length!==r);d=!0);}catch(O){b=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(b)throw u}}return l}}(e,t)||Zy(e,t)||function(){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 Lw(e){return function(t){if(Array.isArray(t))return Xl(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Zy(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Zy(e,t){if(e){if(typeof e=="string")return Xl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xl(e,t):void 0}}function Xl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jl(e,t){return Jl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Jl(e,t)}function Fw(e){var t=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=du(e);if(t){var a=du(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Gw(this,n)}}function Gw(e,t){if(t&&(Wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ai(e)}function Ai(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function du(e){return du=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},du(e)}function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zl=Fn((Xy=Wy=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Jl(o,u)})(a,e);var t,n,r=Fw(a);function a(o){var u;(function(O,j){if(!(O instanceof j))throw new TypeError("Cannot call a class as a function")})(this,a),vi(Ai(u=r.call(this)),"stepDrag",void 0),vi(Ai(u),"handleMouseDown",function(O){u.stepDrag.handleMouseDown(O)}),vi(Ai(u),"onDraging",function(O){var j=O.deltaX,C=O.deltaY,R=u.props.graphModel,X=R.getSelectElements(!0);R.moveNodes(X.nodes.map(function(te){return te.id}),j,C)}),vi(Ai(u),"handleContextMenu",function(O){O.preventDefault();var j=u.props,C=j.graphModel,R=j.graphModel,X=R.eventCenter,te=R.selectElements,ue=C.getPointByClient({x:O.clientX,y:O.clientY}),ae={nodes:[],edges:[]};Lw(te.values()).forEach(function(ge){ge.BaseType===Gt.NODE&&ae.nodes.push(ge.getData()),ge.BaseType===Gt.EDGE&&ae.edges.push(ge.getData())}),X.emit(at.SELECTION_CONTEXTMENU,{data:ae,e:O,position:ue})});var l=o.graphModel,d=l.gridSize,b=l.eventCenter;return u.stepDrag=new Jr({onDraging:u.onDraging,step:d,eventType:"SELECTION",eventCenter:b}),u}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel,u=o.selectElements,l=o.transformModel;if(!(u.size<=1)){var d=Number.MAX_SAFE_INTEGER,b=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,j=Number.MIN_SAFE_INTEGER;u.forEach(function(te){var ue={x:0,y:0,x1:0,y1:0};te.BaseType===Gt.NODE&&(ue=function(ae){var ge=ae.x,ve=ae.y,Me=ae.width,_e=ae.height;return{x:ge-Me/2,y:ve-_e/2,x1:ge+Me/2,y1:ve+_e/2}}(te)),te.BaseType===Gt.EDGE&&(ue=zw(te)),d=Math.min(d,ue.x),b=Math.min(b,ue.y),O=Math.max(O,ue.x1),j=Math.max(j,ue.y1)});var C=Jy(l.CanvasPointToHtmlPoint([d,b]),2);d=C[0],b=C[1];var R=Jy(l.CanvasPointToHtmlPoint([O,j]),2);O=R[0],j=R[1];var X={left:"".concat(d-10,"px"),top:"".concat(b-10,"px"),width:"".concat(O-d+20,"px"),height:"".concat(j-b+20,"px")};return Object(ee.g)("div",{className:"lf-multiple-select",style:X,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&Qw(t.prototype,n),a}(ee.a),vi(Wy,"toolName","multipleSelect"),Vy=Xy))||Vy;function Yw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uw=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),hu(this,"tools",void 0),hu(this,"components",void 0),hu(this,"toolMap",new Map),hu(this,"instance",void 0),this.instance=r,this.isDisabledTool(Vl.toolName)||this.registerTool(Vl.toolName,Vl),this.isDisabledTool(Zl.toolName)||this.registerTool(Zl.toolName,Zl)}var t,n;return t=e,(n=[{key:"isDisabledTool",value:function(r){return this.instance.options.disabledTools.indexOf(r)!==-1}},{key:"registerTool",value:function(r,a){this.toolMap.set(r,a)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&Yw(t.prototype,n),e}(),Hw=i(167),Vw=i.n(Hw);function Ww(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ky=function(){function e(r){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),Kl(this,"mousetrap",void 0),Kl(this,"options",void 0),Kl(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var a=r.lf;this.target=a.container,this.mousetrap=new Vw.a(this.target),r.keyboard.enabled&&this.enable(!0)}var t,n;return t=e,(n=[{key:"initShortcuts",value:function(){var r=this,a=this.options.keyboard.shortcuts;if(a)if(Xt(a))a.forEach(function(d){var b=d.keys,O=d.callback,j=d.action;return r.on(b,O,j)});else{var o=a.keys,u=a.callback,l=a.action;this.on(o,u,l)}}},{key:"on",value:function(r,a,o){this.mousetrap.bind(this.getKeys(r),a,o)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(r,a){this.mousetrap.unbind(this.getKeys(r),a)}},{key:"enable",value:function(r){(this.disabled||r)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(r){var a=this;return(Array.isArray(r)?r:[r]).map(function(o){return a.formatkey(o)})}},{key:"formatkey",value:function(r){return r.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&Ww(t.prototype,n),e}(),Xw=Ky,mr=null;function qy(e,t){return e.x+=t,e.y+=t,e.text&&(e.text.x+=t,e.text.y+=t),e}function $y(e,t){return e.startPoint&&(e.startPoint.x+=t,e.startPoint.y+=t),e.endPoint&&(e.endPoint.x+=t,e.endPoint.y+=t),e.pointsList&&e.pointsList.length>0&&e.pointsList.forEach(function(n){n.x+=t,n.y+=t}),e.text&&(e.text.x+=t,e.text.y+=t),e}function ql(e){return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eg(Object(n),!0).forEach(function(r){Tt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ef=function(){function e(a){var o,u,l=this;(function(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")})(this,e),Tt(this,"container",void 0),Tt(this,"width",void 0),Tt(this,"height",void 0),Tt(this,"graphModel",void 0),Tt(this,"history",void 0),Tt(this,"viewMap",new Map),Tt(this,"tool",void 0),Tt(this,"keyboard",void 0),Tt(this,"dnd",void 0),Tt(this,"options",void 0),Tt(this,"snaplineModel",void 0),Tt(this,"components",[]),Tt(this,"plugins",void 0),Tt(this,"extension",{}),Tt(this,"adapterIn",void 0),Tt(this,"adapterOut",void 0),Tt(this,"getView",function(d){return l.viewMap.get(d)}),a=$d(a),this.options=a,this.container=a.container,this.plugins=a.plugins,this.graphModel=new nb($l({},a)),this.tool=new Uw(this),this.history=new Bw(this.graphModel.eventCenter),this.dnd=new $b({lf:this}),this.keyboard=new Xw({lf:this,keyboard:a.keyboard}),a.isSilentMode||a.snapline===!1||(this.snaplineModel=new cy(this.graphModel),o=this.graphModel.eventCenter,u=this.snaplineModel,o.on("node:mousemove",function(d){var b=d.data;u.setNodeSnapLine(b)}),o.on("node:mouseup",function(){u.clearSnapline()})),function(d,b){var O=d.keyboard,j=O.options.keyboard;O.on(["cmd + c","ctrl + c"],function(){if(j.enabled&&!b.textEditElement){var C=d.options.guards,R=b.getSelectElements(!1);return C&&C.beforeClone&&!C.beforeClone(R)?(mr=null,!1):((mr=R).nodes.forEach(function(X){return qy(X,40)}),mr.edges.forEach(function(X){return $y(X,40)}),!1)}}),O.on(["cmd + v","ctrl + v"],function(){if(j.enabled&&!b.textEditElement){if(mr&&(mr.nodes||mr.edges)){d.clearSelectElements();var C=d.addElements(mr);if(!C)return;C.nodes.forEach(function(R){return d.selectElementById(R.id,!0)}),C.edges.forEach(function(R){return d.selectElementById(R.id,!0)}),mr.nodes.forEach(function(R){return qy(R,40)}),mr.edges.forEach(function(R){return $y(R,40)})}return!1}}),O.on(["cmd + z","ctrl + z"],function(){if(j.enabled&&!b.textEditElement)return d.undo(),!1}),O.on(["cmd + y","ctrl + y"],function(){if(j.enabled&&!b.textEditElement)return d.redo(),!1}),O.on(["backspace"],function(){if(j.enabled&&!b.textEditElement){var C=b.getSelectElements(!0);return d.clearSelectElements(),C.edges.forEach(function(R){return d.deleteEdge(R.id)}),C.nodes.forEach(function(R){return d.deleteNode(R.id)}),!1}})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(a.disabledPlugins)}var t,n,r;return t=e,n=[{key:"register",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof a=="string"){var l={BaseEdge:gi,BaseEdgeModel:pc,BaseNode:vr,BaseNodeModel:Ar,RectNode:Xs,RectNodeModel:ks,CircleNode:qs,CircleNodeModel:ss,PolygonNode:rl,PolygonNodeModel:xs,TextNode:yl,TextNodeModel:Ns,LineEdge:Ml,LineEdgeModel:Ac,DiamondNode:ul,DiamondNodeModel:hs,PolylineEdge:Rl,PolylineEdgeModel:wc,BezierEdge:Ql,BezierEdgeModel:rs,EllipseNode:pl,EllipseNodeModel:vs,HtmlNode:bl,HtmlNodeModel:Ts,h:ee.g,type:a};this.viewMap.forEach(function(C){var R=C.extendKey;R&&(l[R]=C)}),this.graphModel.modelMap.forEach(function(C){var R=C.extendKey;R&&(l[R]=C)});var d=o(l),b=d.view,O=d.model,j=b;u&&!j.isObervered&&(j.isObervered=!0,j=Qe(j)),this.setView(a,j),this.graphModel.setModel(a,O)}else this.registerElement(a)}},{key:"registerElement",value:function(a){var o=a.view;a.isObserverView===!1||o.isObervered||(o.isObervered=!0,o=Qe(o)),this.setView(a.type,o),this.graphModel.setModel(a.type,a.model)}},{key:"batchRegister",value:function(){var a=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(u){a.registerElement(u)})}},{key:"defaultRegister",value:function(){this.registerElement({view:Xs,model:ks,type:"rect"}),this.registerElement({type:"circle",view:qs,model:ss}),this.registerElement({type:"polygon",view:rl,model:xs}),this.registerElement({type:"line",view:Ml,model:Ac}),this.registerElement({type:"polyline",view:Rl,model:wc}),this.registerElement({type:"bezier",view:Ql,model:rs}),this.registerElement({type:"text",view:yl,model:Ns}),this.registerElement({type:"ellipse",view:pl,model:vs}),this.registerElement({type:"diamond",view:ul,model:hs}),this.registerElement({type:"html",view:bl,model:Ts})}},{key:"selectElementById",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.graphModel.selectElementById(a,o),o||this.graphModel.toFront(a)}},{key:"focusOn",value:function(a){var o=this.graphModel.transformModel,u=a.coordinate,l=a.id;if(!u){var d=this.getNodeModelById(l);d&&(u=d.getData());var b=this.getEdgeModelById(l);b&&(u=b.textPosition)}var O=u,j=O.x,C=O.y;o.focusOn(j,C,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(a){this.graphModel.setTheme(a)}},{key:"resize",value:function(a,o){this.options.width=a!=null?a:this.options.width,this.options.height=o!=null?o:this.options.height,this.graphModel.resize(a,o)}},{key:"setDefaultEdgeType",value:function(a){this.graphModel.setDefaultEdgeType(a)}},{key:"updateText",value:function(a,o){this.graphModel.updateText(a,o)}},{key:"deleteElement",value:function(a){var o,u,l,d=this.getModelById(a);return!!d&&(u=(l=(Tt(o={},Gt.NODE,this.deleteNode),Tt(o,Gt.EDGE,this.deleteEdge),o)[d.BaseType])===null||l===void 0?void 0:l.call(this,a))!==null&&u!==void 0&&u}},{key:"getModelById",value:function(a){return this.graphModel.getElement(a)}},{key:"getDataById",value:function(a){return this.graphModel.getElement(a).getData()}},{key:"changeNodeType",value:function(a,o){this.graphModel.changeNodeType(a,o)}},{key:"changeEdgeType",value:function(a,o){this.graphModel.changeEdgeType(a,o)}},{key:"getNodeEdges",value:function(a){return this.graphModel.getNodeEdges(a)}},{key:"addNode",value:function(a){return this.graphModel.addNode(a)}},{key:"deleteNode",value:function(a){var o=this.graphModel.getNodeModelById(a);if(!o)return!1;var u=o.getData(),l=this.options.guards,d=!l||!l.beforeDelete||l.beforeDelete(u);return d&&this.graphModel.deleteNode(a),d}},{key:"cloneNode",value:function(a){var o=this.graphModel.getNodeModelById(a).getData(),u=this.options.guards;if(!u||!u.beforeClone||u.beforeClone(o))return this.graphModel.cloneNode(a)}},{key:"changeNodeId",value:function(a,o){return this.graphModel.changeNodeId(a,o)}},{key:"getNodeModelById",value:function(a){return this.graphModel.getNodeModelById(a)}},{key:"getNodeDataById",value:function(a){return this.graphModel.getNodeModelById(a).getData()}},{key:"addEdge",value:function(a){return this.graphModel.addEdge(a)}},{key:"deleteEdge",value:function(a){var o=this.options.guards,u=this.graphModel.edgesMap[a];if(!u)return!1;var l=u.model.getData(),d=!o||!o.beforeDelete||o.beforeDelete(l);return d&&this.graphModel.deleteEdgeById(a),d}},{key:"deleteEdgeByNodeId",value:function(a){var o=a.sourceNodeId,u=a.targetNodeId;o&&u?this.graphModel.deleteEdgeBySourceAndTarget(o,u):o?this.graphModel.deleteEdgeBySource(o):u&&this.graphModel.deleteEdgeByTarget(u)}},{key:"changeEdgeId",value:function(a,o){return this.graphModel.changeEdgeId(a,o)}},{key:"getEdgeModelById",value:function(a){var o;return(o=this.graphModel.edgesMap[a])===null||o===void 0?void 0:o.model}},{key:"getEdgeModels",value:function(a){var o=this.graphModel.edges,u=a.sourceNodeId,l=a.targetNodeId;if(u&&l){var d=[];return o.forEach(function(j){j.sourceNodeId===u&&j.targetNodeId===l&&d.push(j)}),d}if(u){var b=[];return o.forEach(function(j){j.sourceNodeId===u&&b.push(j)}),b}if(l){var O=[];return o.forEach(function(j){j.targetNodeId===l&&O.push(j)}),O}return[]}},{key:"getEdgeDataById",value:function(a){var o;return(o=this.getEdgeModelById(a))===null||o===void 0?void 0:o.getData()}},{key:"getNodeIncomingEdge",value:function(a){return this.graphModel.getNodeIncomingEdge(a)}},{key:"getNodeOutgoingEdge",value:function(a){return this.graphModel.getNodeOutgoingEdge(a)}},{key:"getNodeIncomingNode",value:function(a){return this.graphModel.getNodeIncomingNode(a)}},{key:"getNodeOutgoingNode",value:function(a){return this.graphModel.getNodeOutgoingNode(a)}},{key:"editText",value:function(a){this.graphModel.editText(a)}},{key:"setProperties",value:function(a,o){var u;(u=this.graphModel.getElement(a))===null||u===void 0||u.setProperties($t(o))}},{key:"getProperties",value:function(a){var o;return(o=this.graphModel.getElement(a))===null||o===void 0?void 0:o.getProperties()}},{key:"toFront",value:function(a){this.graphModel.toFront(a)}},{key:"setElementZIndex",value:function(a,o){return this.graphModel.setElementZIndex(a,o)}},{key:"addElements",value:function(a){for(var o=this,u=a.nodes,l=a.edges,d={},b={nodes:[],edges:[]},O=0;O<u.length;O++){var j=u[O],C=j.id,R=this.addNode(j);if(!R)return;C&&(d[C]=R.id),b.nodes.push(R)}return l.forEach(function(X){var te=X.sourceNodeId,ue=X.targetNodeId;d[te]&&(X.sourceNodeId=d[te]),d[ue]&&(X.targetNodeId=d[ue]);var ae=o.graphModel.addEdge(X);b.edges.push(ae)}),b}},{key:"getAreaElement",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return this.graphModel.getAreaElement(a,o,u,l).map(function(d){return d.getData()})}},{key:"getSelectElements",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.graphModel.getSelectElements(a)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var a=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(a):a}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(a){this.graphModel.editConfigModel.updateEditConfig(a)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(a,o){return this.graphModel.getPointByClient({x:a,y:o})}},{key:"undo",value:function(){if(this.history.undoAble()){var a=$t(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"redo",value:function(){if(this.history.redoAble()){var a=$t(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"zoom",value:function(a,o){return this.graphModel.transformModel.zoom(a,o)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(a){this.graphModel.transformModel.setZoomMiniSize(a)}},{key:"setZoomMaxSize",value:function(a){this.graphModel.transformModel.setZoomMaxSize(a)}},{key:"getTransform",value:function(){var a=this.graphModel.transformModel;return{SCALE_X:a.SCALE_X,SCALE_Y:a.SCALE_Y,TRANSLATE_X:a.TRANSLATE_X,TRANSLATE_Y:a.TRANSLATE_Y}}},{key:"translate",value:function(a,o){this.graphModel.transformModel.translate(a,o)}},{key:"resetTranslate",value:function(){var a=this.graphModel.transformModel,o=a.TRANSLATE_X,u=a.TRANSLATE_Y;this.translate(-o,-u)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(a,o){o===void 0&&(o=a),this.graphModel.fitView(a,o)}},{key:"openEdgeAnimation",value:function(a){this.graphModel.openEdgeAnimation(a)}},{key:"closeEdgeAnimation",value:function(a){this.graphModel.closeEdgeAnimation(a)}},{key:"on",value:function(a,o){this.graphModel.eventCenter.on(a,o)}},{key:"off",value:function(a,o){this.graphModel.eventCenter.off(a,o)}},{key:"once",value:function(a,o){this.graphModel.eventCenter.once(a,o)}},{key:"emit",value:function(a,o){this.graphModel.eventCenter.emit(a,o)}},{key:"installPlugins",value:function(){var a,o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=(a=this.plugins)!==null&&a!==void 0?a:e.extensions;l.forEach(function(d){var b=d.pluginName||d.name;u.indexOf(b)===-1&&o.installPlugin(d)})}},{key:"installPlugin",value:function(a){if(ql(a)==="object"){var o=a.install,u=a.render;return o&&o.call(a,this,e),u&&this.components.push(u.bind(a)),void(this.extension[a.pluginName]=a)}var l=a,d=new l({lf:this,LogicFlow:e});d.render&&this.components.push(d.render.bind(d)),this.extension[l.pluginName]=d}},{key:"updateAttributes",value:function(a,o){this.graphModel.updateAttributes(a,o)}},{key:"createFakerNode",value:function(a){var o=this.graphModel.modelMap.get(a.type);if(o){var u=new o($l($l({},a),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(u),u}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(a){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(a)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(a,o){this.viewMap.set(a,o)}},{key:"renderRawData",value:function(a){this.graphModel.graphDataToModel($t(a)),this.options.isSilentMode||this.options.history===!1||this.history.watch(this.graphModel),Object(ee.j)(Object(ee.g)(Kb,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(at.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(a=this.adapterIn(a)),this.renderRawData(a)}}],r=[{key:"use",value:function(a){var o=a.pluginName;o||(o=a.name);var u=this.extensions.get(o);u&&u.destroy&&u.destroy(),this.extensions.set(o,a)}}],n&&tg(t.prototype,n),r&&tg(t,r),e}();function Fn(e){return Qe(e)}Tt(ef,"extensions",new Map),p.default=ef}])})})(nf,nf.exports);Ze.exports=nf.exports;var bu=Ze.exports;const iO=[{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 aO(v,g){return g={exports:{}},v(g,g.exports),g.exports}var uO=aO(function(v){var g=v.exports=function(c,p){if(p||(p=16),c===void 0&&(c=128),c<=0)return"0";for(var i=Math.log(Math.pow(2,c))/Math.log(p),f=2;i===1/0;f*=2)i=Math.log(Math.pow(2,c/f))/Math.log(p)*f;for(var s=i-Math.floor(i),A="",f=0;f<Math.floor(i);f++){var m=Math.floor(Math.random()*p).toString(p);A=m+A}if(s){var w=Math.pow(p,s),m=Math.floor(Math.random()*w).toString(p);A=m+A}var E=parseInt(A,p);return E!==1/0&&E>=Math.pow(2,c)?g(c,p):A};g.rack=function(c,p,i){var f=function(A){var m=0;do{if(m++>10)if(i)c+=i;else throw new Error("too many ID collisions, use more bits");var w=g(c,p)}while(Object.hasOwnProperty.call(s,w));return s[w]=A,w},s=f.hats={};return f.get=function(A){return f.hats[A]},f.set=function(A,m){return f.hats[A]=m,f},f.bits=c||128,f.base=p||16,f}});function ir(v){if(!(this instanceof ir))return new ir(v);v=v||[128,36,1],this._seed=v.length?uO.rack(v[0],v[1],v[2]):v}ir.prototype.next=function(v){return this._seed(v||!0)};ir.prototype.nextPrefixed=function(v,g){var c;do c=v+this.next(!0);while(this.assigned(c));return this.claim(c,g),c};ir.prototype.claim=function(v,g){this._seed.set(v,g||!0)};ir.prototype.assigned=function(v){return this._seed.get(v)||!1};ir.prototype.unclaim=function(v){delete this._seed.hats[v]};ir.prototype.clear=function(){var v=this._seed.hats,g;for(g in v)this.unclaim(g)};var cO=new ir([32,32,1]);function Go(){return cO.next()}var zg=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),sO=function(v){zg(g,v);function g(c,p){var i=this;return c.id||(c.id="Event_"+Go()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),i=v.call(this,c,p)||this,i}return g.prototype.setAttributes=function(){this.r=18},g.prototype.getConnectedTargetRules=function(){var c=v.prototype.getConnectedTargetRules.call(this),p={message:"\u8D77\u59CB\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u7EC8\u70B9",validate:function(){return!1}};return c.push(p),c},g.extendKey="StartEventModel",g}(Ze.exports.CircleNodeModel),lO=function(v){zg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.extendKey="StartEventNode",g}(Ze.exports.CircleNode),fO={type:"bpmn:startEvent",view:lO,model:sO},Lg=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),Ou=globalThis&&globalThis.__assign||function(){return Ou=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},Ou.apply(this,arguments)},pO=function(v){Lg(g,v);function g(c,p){var i=this;return c.id||(c.id="Event_"+Go()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),i=v.call(this,c,p)||this,i}return g.prototype.setAttributes=function(){this.r=18},g.prototype.getConnectedSourceRules=function(){var c=v.prototype.getConnectedSourceRules.call(this),p={message:"\u7ED3\u675F\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u8D77\u70B9",validate:function(){return!1}};return c.push(p),c},g.extendKey="EndEventModel",g}(Ze.exports.CircleNodeModel),dO=function(v){Lg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},g.prototype.getShape=function(){var c=this.props.model,p=c.getNodeStyle(),i=c.x,f=c.y,s=c.r,A=v.prototype.getShape.call(this);return Ze.exports.h("g",{},A,Ze.exports.h("circle",Ou(Ou({},p),{cx:i,cy:f,r:s-5})))},g.extendKey="EndEventView",g}(Ze.exports.CircleNode),hO={type:"bpmn:endEvent",view:dO,model:pO},Qg=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),_i=globalThis&&globalThis.__assign||function(){return _i=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},_i.apply(this,arguments)},yO=function(v){Qg(g,v);function g(c,p){var i=this;return c.id||(c.id="Gateway_"+Go()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),i=v.call(this,c,p)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return g.extendKey="ExclusiveGatewayModel",g}(Ze.exports.PolygonNodeModel),gO=function(v){Qg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getShape=function(){var c=this.props.model,p=c.x,i=c.y,f=c.width,s=c.height,A=c.points,m=c.getNodeStyle();return Ze.exports.h("g",{transform:"matrix(1 0 0 1 "+(p-f/2)+" "+(i-s/2)+")"},Ze.exports.h("polygon",_i(_i({},m),{x:p,y:i,points:A})),Ze.exports.h("path",_i({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},m)))},g.extendKey="ExclusiveGatewayNode",g}(Ze.exports.PolygonNode),AO={type:"bpmn:exclusiveGateway",view:gO,model:yO},Fg=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),Eu=globalThis&&globalThis.__assign||function(){return Eu=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},Eu.apply(this,arguments)},vO=function(v){Fg(g,v);function g(c,p){var i=this;return c.id||(c.id="Activity_"+Go()),i=v.call(this,c,p)||this,i}return g.extendKey="UserTaskModel",g}(Ze.exports.RectNodeModel),bO=function(v){Fg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getLabelShape=function(){var c=this.props.model,p=c.x,i=c.y,f=c.width,s=c.height,A=c.getNodeStyle();return Ze.exports.h("svg",{x:p-f/2+5,y:i-s/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Ze.exports.h("path",{fill:A.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},g.prototype.getShape=function(){var c=this.props.model,p=c.x,i=c.y,f=c.width,s=c.height,A=c.radius,m=c.getNodeStyle();return Ze.exports.h("g",{},[Ze.exports.h("rect",Eu(Eu({},m),{x:p-f/2,y:i-s/2,rx:A,ry:A,width:f,height:s})),this.getLabelShape()])},g.extendKey="UserTaskNode",g}(Ze.exports.RectNode),mO={type:"bpmn:userTask",view:bO,model:vO},Gg=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),rf=globalThis&&globalThis.__assign||function(){return rf=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},rf.apply(this,arguments)},wO=function(v){Gg(g,v);function g(c,p){var i=this;return c.id||(c.id="Activity_"+Go()),i=v.call(this,c,p)||this,i}return g.extendKey="ServiceTaskModel",g}(Ze.exports.RectNodeModel),OO=function(v){Gg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getLabelShape=function(){var c=this.props.model,p=c.x,i=c.y,f=c.width,s=c.height,A=c.getNodeStyle();return Ze.exports.h("svg",{x:p-f/2+5,y:i-s/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Ze.exports.h("path",{fill:A.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},g.prototype.getShape=function(){var c=this.props.model,p=c.x,i=c.y,f=c.width,s=c.height,A=c.radius,m=c.getNodeStyle();return Ze.exports.h("g",{},[Ze.exports.h("rect",rf({x:p-f/2,y:i-s/2,rx:A,ry:A,width:f,height:s},m)),this.getLabelShape()])},g.extendKey="ServiceTaskNode",g}(Ze.exports.RectNode),EO={type:"bpmn:serviceTask",view:OO,model:wO},Yg=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),xO=function(v){Yg(g,v);function g(c,p){var i=this;return c.id||(c.id="Flow_"+Go()),i=v.call(this,c,p)||this,i}return g.extendKey="SequenceFlowModel",g}(Ze.exports.PolylineEdgeModel),_O=function(v){Yg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.extendKey="SequenceFlowEdge",g}(Ze.exports.PolylineEdge),jO={type:"bpmn:sequenceFlow",view:_O,model:xO},ag={width:40,height:40},ug={width:40,height:40},cg={width:40,height:40},sg={width:100,height:80},lg={width:100,height:80},SO={rect:{radius:5,stroke:"rgb(24, 125, 255)"},circle:{r:18,stroke:"rgb(24, 125, 255)"},polygon:{stroke:"rgb(24, 125, 255)"},polyline:{stroke:"rgb(24, 125, 255)",hoverStroke:"rgb(24, 125, 255)",selectedStroke:"rgb(24, 125, 255)"},edgeText:{background:{fill:"white",height:14,stroke:"transparent",radius:3}}},kO=function(){function v(g){var c=g.lf;c.setTheme(SO),c.register(fO),c.register(hO),c.register(AO),c.register(mO),c.register(EO),c.options.customBpmnEdge||(c.register(jO),c.setDefaultEdgeType("bpmn:sequenceFlow"))}return v.pluginName="bpmnElement",v}(),PO=function(){function v(g){var c=this,p=g.lf;this.lf=p,this.customCssRules="",this.useGlobalRules=!0,p.getSnapshot=function(i,f){c.getSnapshot(i,f)},p.getSnapshotBlob=function(i){return c.getSnapshotBlob(i)},p.getSnapshotBase64=function(i){return c.getSnapshotBase64(i)}}return v.prototype.getSvgRootElement=function(g){var c=this;this.offsetX=Number.MAX_SAFE_INTEGER,this.offsetY=Number.MAX_SAFE_INTEGER,g.graphModel.nodes.forEach(function(i){var f=i.x,s=i.width,A=i.y,m=i.height,w=f-s/2,E=A-m/2;w<c.offsetX&&(c.offsetX=w-5),E<c.offsetY&&(c.offsetY=E-5)}),g.graphModel.edges.forEach(function(i){i.pointsList&&i.pointsList.forEach(function(f){var s=f.x,A=f.y;s<c.offsetX&&(c.offsetX=s-5),A<c.offsetY&&(c.offsetY=A-5)})});var p=g.container.querySelector(".lf-canvas-overlay");return p},v.prototype.triggerDownload=function(g){var c=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),p=document.createElement("a");p.setAttribute("download",this.fileName),p.setAttribute("href",g),p.setAttribute("target","_blank"),p.dispatchEvent(c)},v.prototype.removeAnchor=function(g){for(var c=g.childNodes,p=g.childNodes&&g.childNodes.length,i=0;i<p;i++){var f=c[i],s=f.classList&&Array.from(f.classList)||[];s.indexOf("lf-anchor")>-1&&(g.removeChild(g.childNodes[i]),p--,i--)}},v.prototype.getSnapshot=function(g,c){var p=this;this.fileName=g||"logic-flow."+Date.now()+".png";var i=this.getSvgRootElement(this.lf);this.getCanvasData(i,c).then(function(f){var s=f.toDataURL("image/png").replace("image/png","image/octet-stream");p.triggerDownload(s)})},v.prototype.getSnapshotBase64=function(g){var c=this,p=this.getSvgRootElement(this.lf);return new Promise(function(i){c.getCanvasData(p,g).then(function(f){var s=f.toDataURL("image/png");i({data:s,width:f.width,height:f.height})})})},v.prototype.getSnapshotBlob=function(g){var c=this,p=this.getSvgRootElement(this.lf);return new Promise(function(i){c.getCanvasData(p,g).then(function(f){f.toBlob(function(s){i({data:s,width:f.width,height:f.height})},"image/png")})})},v.prototype.getClassRules=function(){var g="";if(this.useGlobalRules)for(var c=document.styleSheets,p=0;p<c.length;p++)for(var i=c[p],f=0;f<i.cssRules.length;f++)g+=i.cssRules[f].cssText;return this.customCssRules&&(g+=this.customCssRules),g},v.prototype.getCanvasData=function(g,c){var p=this,i=g.cloneNode(!0),f=i.lastChild,s=f.childNodes&&f.childNodes.length;if(s)for(var A=0;A<s;A++){var m=f.childNodes[A],w=m.classList&&Array.from(m.classList);if(w&&w.indexOf("lf-base")<0)f.removeChild(f.childNodes[A]),s--,A--;else{var E=f.childNodes[A];E&&E.childNodes.forEach(function(T){var k=T;p.removeAnchor(k.firstChild)})}}i.lastChild.style.transform="matrix(1, 0, 0, 1, "+(-this.offsetX+10)+", "+(-this.offsetY+10)+")";var S=window.devicePixelRatio||1,_=document.createElement("canvas"),P=document.getElementsByClassName("lf-base")[0],B=P.getBoundingClientRect(),I=this.lf.graphModel,L=I.transformModel,Y=L.SCALE_X,z=L.SCALE_Y,Z=Math.ceil(B.width/Y),ie=Math.ceil(B.height/z);_.style.width=Z+"px",_.style.height=ie+"px",_.width=Z*S+80,_.height=ie*S+80;var q=_.getContext("2d");q.clearRect(0,0,_.width,_.height),q.scale(S,S),c?(q.fillStyle=c,q.fillRect(0,0,Z*S+80,ie*S+80)):q.clearRect(0,0,Z,ie);var H=new Image,$=document.createElement("style");$.innerHTML=this.getClassRules();var Q=document.createElement("foreignObject");return Q.appendChild($),i.appendChild(Q),new Promise(function(T){H.onload=function(){q.drawImage(H,0,0),T(_)};var k="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(i),D=k.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");H.src=D})},v.pluginName="snapshot",v}(),DO=new ir([32,32,1]);function fg(){return DO.next()}var hn=function(){};hn.ObjTree=function(){return this};hn.ObjTree.VERSION="0.23";hn.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
- `;hn.ObjTree.prototype.attr_prefix="-";hn.ObjTree.prototype.parseXML=function(v){var g;if(window.DOMParser){var c=new DOMParser,p=c.parseFromString(v,"application/xml");if(!p)return;g=p.documentElement}else window.ActiveXObject&&(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(v),g=c.documentElement);if(!!g)return this.parseDOM(g)};hn.ObjTree.prototype.parseHTTP=function(v,g,c){var p={};for(var i in g)p[i]=g[i];if(p.method||(typeof p.postBody=="undefined"&&typeof p.postbody=="undefined"&&typeof p.parameters=="undefined"?p.method="get":p.method="post"),c){p.asynchronous=!0;var f=this,s=c,A=p.onComplete;p.onComplete=function(E){var S;E&&E.responseXML&&E.responseXML.documentElement&&(S=f.parseDOM(E.responseXML.documentElement)),s(S,E),A&&A(E)}}else p.asynchronous=!1;var m;if(typeof HTTP!="undefined"&&HTTP.Request){p.uri=v;var w=new HTTP.Request(p);w&&(m=w.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var w=new Ajax.Request(v,p);w&&(m=w.transport)}if(c)return m;if(m&&m.responseXML&&m.responseXML.documentElement)return this.parseDOM(m.responseXML.documentElement)};hn.ObjTree.prototype.parseDOM=function(v){if(!!v){if(this.__force_array={},this.force_array)for(var g=0;g<this.force_array.length;g++)this.__force_array[this.force_array[g]]=1;var c=this.parseElement(v);if(this.__force_array[v.nodeName]&&(c=[c]),v.nodeType!=11){var p={};p[v.nodeName]=c,c=p}return c}};hn.ObjTree.prototype.parseElement=function(v){if(v.nodeType!=7){if(v.nodeType==3||v.nodeType==4){var g=v.nodeValue.match(/[^\x00-\x20]/);return g==null?void 0:v.nodeValue}var c,p={};if(v.attributes&&v.attributes.length){c={};for(var i=0;i<v.attributes.length;i++){var f=v.attributes[i].nodeName;if(typeof f=="string"){var s=v.attributes[i].nodeValue;!s||(f=this.attr_prefix+f,typeof p[f]=="undefined"&&(p[f]=0),p[f]++,this.addNode(c,f,p[f],s))}}}if(v.childNodes&&v.childNodes.length){var A=!0;c&&(A=!1);for(var i=0;i<v.childNodes.length&&A;i++){var m=v.childNodes[i].nodeType;m==3||m==4||(A=!1)}if(A){c||(c="");for(var i=0;i<v.childNodes.length;i++)c+=v.childNodes[i].nodeValue}else{c||(c={});for(var i=0;i<v.childNodes.length;i++){var f=v.childNodes[i].nodeName;if(typeof f=="string"){var s=this.parseElement(v.childNodes[i]);!s||(typeof p[f]=="undefined"&&(p[f]=0),p[f]++,this.addNode(c,f,p[f],s))}}}}return c}};hn.ObjTree.prototype.addNode=function(v,g,c,p){this.__force_array[g]?(c==1&&(v[g]=[]),v[g][v[g].length]=p):c==1?v[g]=p:c==2?v[g]=[v[g],p]:v[g][v[g].length]=p};hn.ObjTree.prototype.writeXML=function(v){var g=this.hash_to_xml(null,v);return this.xmlDecl+g};hn.ObjTree.prototype.hash_to_xml=function(v,g){var c=[],p=[];for(var i in g)if(!!g.hasOwnProperty(i)){var f=g[i];i.charAt(0)!=this.attr_prefix?typeof f=="undefined"||f==null?c[c.length]="<"+i+" />":typeof f=="object"&&f.constructor==Array?c[c.length]=this.array_to_xml(i,f):typeof f=="object"?c[c.length]=this.hash_to_xml(i,f):c[c.length]=this.scalar_to_xml(i,f):p[p.length]=" "+i.substring(1)+'="'+this.xml_escape(f)+'"'}var s=p.join(""),A=c.join("");return typeof v=="undefined"||v==null||(c.length>0?A.match(/\n/)?A="<"+v+s+`>
- `+A+"</"+v+`>
- `:A="<"+v+s+">"+A+"</"+v+`>
- `:A="<"+v+s+` />
- `),A};hn.ObjTree.prototype.array_to_xml=function(v,g){for(var c=[],p=0;p<g.length;p++){var i=g[p];typeof i=="undefined"||i==null?c[c.length]="<"+v+" />":typeof i=="object"&&i.constructor==Array?c[c.length]=this.array_to_xml(v,i):typeof i=="object"?c[c.length]=this.hash_to_xml(v,i):c[c.length]=this.scalar_to_xml(v,i)}return c.join("")};hn.ObjTree.prototype.scalar_to_xml=function(v,g){return v=="#text"?this.xml_escape(g):"<"+v+">"+this.xml_escape(g)+"</"+v+`>
- `};hn.ObjTree.prototype.xml_escape=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var Pu=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f},ar;(function(v){v.START="bpmn:startEvent",v.END="bpmn:endEvent",v.GATEWAY="bpmn:exclusiveGateway",v.USER="bpmn:userTask",v.SYSTEM="bpmn:serviceTask",v.FLOW="bpmn:sequenceFlow"})(ar||(ar={}));var Ug=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"];function of(v){var g={};return Object.entries(v).forEach(function(c){var p=Pu(c,2),i=p[0],f=p[1];typeof f!="object"?i.indexOf("-")===0?g[i]=f:g["-"+i]=f:g[i]=of(f)}),g}function lf(v){var g={};return Object.entries(v).forEach(function(c){var p=Pu(c,2),i=p[0],f=p[1];typeof f=="string"?i.indexOf("-")===0?g[i.substr(1)]=f:g[i]=f:typeof f=="object"?g[i]=lf(f):g[i]=f}),g}function CO(v,g){var c=new Map;g.nodes.forEach(function(i){var f,s={"-id":i.id};if(!((f=i.text)===null||f===void 0)&&f.value&&(s["-name"]=i.text.value),i.properties){var A=of(i.properties);Object.assign(s,A)}c.set(i.id,s),v[i.type]?Array.isArray(v[i.type])?v[i.type].push(s):v[i.type]=[v[i.type],s]:v[i.type]=s});var p=g.edges.map(function(i){var f,s,A=c.get(i.targetNodeId);A["bpmn:incoming"]?Array.isArray(A["bpmn:incoming"])?A["bpmn:incoming"].push(i.id):A["bpmn:incoming"]=[A["bpmn:incoming"],i.id]:A["bpmn:incoming"]=i.id;var m=c.get(i.sourceNodeId);m["bpmn:outgoing"]?Array.isArray(m["bpmn:outgoing"])?m["bpmn:outgoing"].push(i.id):m["bpmn:outgoing"]=[m["bpmn:outgoing"],i.id]:m["bpmn:outgoing"]=i.id;var w={"-id":i.id,"-sourceRef":i.sourceNodeId,"-targetRef":i.targetNodeId};if(!((f=i.text)===null||f===void 0)&&f.value&&(w["-name"]=(s=i.text)===null||s===void 0?void 0:s.value),i.properties){var E=of(i.properties);Object.assign(w,E)}return w});v[ar.FLOW]=p}function NO(v,g){v["bpmndi:BPMNEdge"]=g.edges.map(function(c){var p,i=c.id,f=c.pointsList.map(function(A){var m=A.x,w=A.y;return{"-x":m,"-y":w}}),s={"-id":i+"_di","-bpmnElement":i,"di:waypoint":f};return!((p=c.text)===null||p===void 0)&&p.value&&(s["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),s}),v["bpmndi:BPMNShape"]=g.nodes.map(function(c){var p,i=c.id,f=100,s=80,A=c.x,m=c.y,w=oo.shapeConfigMap.get(c.type);w&&(f=w.width,s=w.height),A-=f/2,m-=s/2;var E={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":A,"-y":m,"-width":f,"-height":s}};return!((p=c.text)===null||p===void 0)&&p.value&&(E["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),E})}function MO(v){var g=[],c=[],p=v["bpmn:definitions"];if(p){var i=p["bpmn:process"];Object.keys(i).forEach(function(f){if(f.indexOf("bpmn:")===0){var s=i[f];if(f===ar.FLOW){var A=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];c=TO(s,A)}else{var m=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];g=g.concat(BO(s,m,f))}}})}return{nodes:g,edges:c}}function BO(v,g,c){var p=[];if(Array.isArray(v))v.forEach(function(s){var A;Array.isArray(g)?A=g.find(function(w){return w["-bpmnElement"]===s["-id"]}):A=g;var m=pg(A,c,s);p.push(m)});else{var i=void 0;Array.isArray(g)?i=g.find(function(s){return s["-bpmnElement"]===v["-id"]}):i=g;var f=pg(i,c,v);p.push(f)}return p}function pg(v,g,c){var p=Number(v["dc:Bounds"]["-x"]),i=Number(v["dc:Bounds"]["-y"]),f=c["-name"],s=oo.shapeConfigMap.get(g);s&&(p+=s.width/2,i+=s.height/2);var A;Object.entries(c).forEach(function(S){var _=Pu(S,2),P=_[0],B=_[1];Ug.indexOf(P)===-1&&(A||(A={}),A[P]=B)}),A&&(A=lf(A));var m;if(f&&(m={x:p,y:i,value:f},v["bpmndi:BPMNLabel"]&&v["bpmndi:BPMNLabel"]["dc:Bounds"])){var w=v["bpmndi:BPMNLabel"]["dc:Bounds"];m.x=Number(w["-x"])+Number(w["-width"])/2,m.y=Number(w["-y"])+Number(w["-height"])/2}var E={id:v["-bpmnElement"],type:g,x:p,y:i,properties:A};return m&&(E.text=m),E}function TO(v,g){var c=[];if(Array.isArray(v))v.forEach(function(i){var f;Array.isArray(g)?f=g.find(function(s){return s["-bpmnElement"]===i["-id"]}):f=g,c.push(dg(f,i))});else{var p=void 0;Array.isArray(g)?p=g.find(function(i){return i["-bpmnElement"]===v["-id"]}):p=g,c.push(dg(p,v))}return c}function dg(v,g){var c,p=g["-name"];if(p){var i=v["bpmndi:BPMNLabel"]["dc:Bounds"],f=0;p.split(`
- `).forEach(function(m){f<m.length&&(f=m.length)}),c={value:p,x:Number(i["-x"])+f*10/2,y:Number(i["-y"])+7}}var s;Object.entries(g).forEach(function(m){var w=Pu(m,2),E=w[0],S=w[1];Ug.indexOf(E)===-1&&(s||(s={}),s[E]=S)}),s&&(s=lf(s));var A={id:g["-id"],type:ar.FLOW,pointsList:v["di:waypoint"].map(function(m){return{x:Number(m["-x"]),y:Number(m["-y"])}}),sourceNodeId:g["-sourceRef"],targetNodeId:g["-targetRef"],properties:s};return c&&(A.text=c),A}var oo={pluginName:"bpmn-adapter",install:function(v){v.adapterIn=this.adapterIn,v.adapterOut=this.adapterOut},shapeConfigMap:new Map,setCustomShape:function(v,g){this.shapeConfigMap.set(v,g)},adapterOut:function(v){var g={"-id":"Process_"+fg(),"-isExecutable":"false"};CO(g,v);var c={"-id":"BPMNPlane_1","-bpmnElement":g["-id"]};NO(c,v);var p={"bpmn:definitions":{"-id":"Definitions_"+fg(),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://bpmn.io/schema/bpmn","-exporter":"bpmn-js (https://demo.bpmn.io)","-exporterVersion":"7.3.0","bpmn:process":g,"bpmndi:BPMNDiagram":{"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":c}}};return p},adapterIn:function(v){if(v)return MO(v)}};oo.shapeConfigMap.set(ar.START,{width:ag.width,height:ag.height});oo.shapeConfigMap.set(ar.END,{width:ug.width,height:ug.height});oo.shapeConfigMap.set(ar.GATEWAY,{width:cg.width,height:cg.height});oo.shapeConfigMap.set(ar.SYSTEM,{width:sg.width,height:sg.height});oo.shapeConfigMap.set(ar.USER,{width:lg.width,height:lg.height});var hg=globalThis&&globalThis.__assign||function(){return hg=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},hg.apply(this,arguments)};globalThis&&globalThis.__read;var yg;(function(v){v.HORIZONTAL="horizontal",v.VERTICAL="vertical"})(yg||(yg={}));var IO=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f};globalThis&&globalThis.__spread;var RO=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f};globalThis&&globalThis.__spread;var zO=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f},LO=globalThis&&globalThis.__spread||function(){for(var v=[],g=0;g<arguments.length;g++)v=v.concat(zO(arguments[g]));return v},mi="lf:defaultNodeMenu",wi="lf:defaultEdgeMenu",Oi="lf:defaultGraphMenu",gg="lf:defaultSelectionMenu",QO=function(){function v(g){var c=this,p=g.lf;this.__menuDOM=document.createElement("ul"),this.lf=p,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){c.setMenuConfig(i)},this.lf.addMenuConfig=function(i){c.addMenuConfig(i)},this.lf.setMenuByType=function(i){c.setMenuByType(i)}}return v.prototype.init=function(){var g=this,c=[{text:"\u5220\u9664",callback:function(f){g.lf.deleteNode(f.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(f){g.lf.graphModel.editText(f.id)}},{text:"\u590D\u5236",callback:function(f){g.lf.cloneNode(f.id)}}];this.menuTypeMap.set(mi,c);var p=[{text:"\u5220\u9664",callback:function(f){g.lf.deleteEdge(f.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(f){g.lf.graphModel.editText(f.id)}}];this.menuTypeMap.set(wi,p),this.menuTypeMap.set(Oi,[]);var i=[{text:"\u5220\u9664",callback:function(f){g.lf.clearSelectElements(),f.edges.forEach(function(s){return g.lf.deleteEdge(s.id)}),f.nodes.forEach(function(s){return g.lf.deleteNode(s.id)})}}];this.menuTypeMap.set(gg,i)},v.prototype.render=function(g,c){var p=this;this.__container=c,this.__currentData=null,this.__menuDOM.className="lf-menu",c.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var f=i.target;Array.from(f.classList).indexOf("lf-menu-item")===-1&&Array.from(f.classList).indexOf("lf-menu")===-1;)f=f.parentElement;Array.from(f.classList).indexOf("lf-menu-item")>-1?(f.onclickCallback(p.__currentData),p.__menuDOM.style.display="none",p.__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 f=i.data,s=i.position,A=s.domOverlayPosition,m=A.x,w=A.y,E=f.id,S=p.lf.graphModel.getNodeModelById(E),_=[],P=p.menuTypeMap.get(S.type);S&&S.menu&&Array.isArray(S.menu)?_=S.menu:P?_=P:_=p.menuTypeMap.get(mi),p.__currentData=f,p.showMenu(m,w,_)}),this.lf.on("edge:contextmenu",function(i){var f=i.data,s=i.position,A=s.domOverlayPosition,m=A.x,w=A.y,E=f.id,S=p.lf.graphModel.getEdgeModelById(E),_=[],P=p.menuTypeMap.get(S.type);S&&S.menu&&Array.isArray(S.menu)?_=S.menu:P?_=P:_=p.menuTypeMap.get(wi),p.__currentData=f,p.showMenu(m,w,_)}),this.lf.on("blank:contextmenu",function(i){var f=i.position,s=p.menuTypeMap.get(Oi),A=f.domOverlayPosition,m=A.x,w=A.y;p.showMenu(m,w,s)}),this.lf.on("selection:contextmenu",function(i){var f=i.data,s=i.position,A=p.menuTypeMap.get(gg),m=s.domOverlayPosition,w=m.x,E=m.y;p.__currentData=f,p.showMenu(w,E,A)}),this.lf.on("node:mousedown",function(){p.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){p.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){p.__menuDOM.style.display="none"})},v.prototype.destroy=function(){var g;(g=this===null||this===void 0?void 0:this.__container)===null||g===void 0||g.removeChild(this.__menuDOM),this.__menuDOM=null},v.prototype.showMenu=function(g,c,p){if(!(!p||!p.length)){var i=this.__menuDOM;i.innerHTML="",i.append.apply(i,LO(this.__getMenuDom(p))),i.children.length&&(i.style.display="block",i.style.top=c+"px",i.style.left=g+"px")}},v.prototype.setMenuByType=function(g){!g.type||!g.menu||this.menuTypeMap.set(g.type,g.menu)},v.prototype.__getMenuDom=function(g){var c=[];return g&&g.length>0&&g.forEach(function(p){var i=document.createElement("li");if(p.className?i.className="lf-menu-item "+p.className:i.className="lf-menu-item",p.icon===!0){var f=document.createElement("span");f.className="lf-menu-item-icon",i.appendChild(f)}var s=document.createElement("span");s.className="lf-menu-item-text",p.text&&(s.innerText=p.text),i.appendChild(s),i.onclickCallback=p.callback,c.push(i)}),c},v.prototype.setMenuConfig=function(g){!g||(g.nodeMenu!==void 0&&this.menuTypeMap.set(mi,g.nodeMenu?g.nodeMenu:[]),g.edgeMenu!==void 0&&this.menuTypeMap.set(wi,g.edgeMenu?g.edgeMenu:[]),g.graphMenu!==void 0&&this.menuTypeMap.set(Oi,g.graphMenu?g.graphMenu:[]))},v.prototype.addMenuConfig=function(g){if(!!g){if(Array.isArray(g.nodeMenu)){var c=this.menuTypeMap.get(mi);this.menuTypeMap.set(mi,c.concat(g.nodeMenu))}if(Array.isArray(g.edgeMenu)){var c=this.menuTypeMap.get(wi);this.menuTypeMap.set(wi,c.concat(g.edgeMenu))}if(Array.isArray(g.graphMenu)){var c=this.menuTypeMap.get(Oi);this.menuTypeMap.set(Oi,c.concat(g.graphMenu))}}},v.prototype.changeMenuItem=function(g,c){if(g==="add")this.addMenuConfig(c);else if(g==="reset")this.setMenuConfig(c);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},v.pluginName="menu",v}();globalThis&&globalThis.__read;globalThis&&globalThis.__values;var Hg=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),Ei=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f};(function(v){Hg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getEdge=function(){for(var c=this.props.model.getEdgeStyle(),p=c.strokeWidth,i=c.stroke,f=c.strokeDashArray,s=this.props.model.points,A=s.split(" ").map(function(M){return M.split(",").map(function(G){return Number(G)})}),m=Ei(A[0],2),w=m[0],E=m[1],S="M"+w+" "+E,_=5,P=1;P<A.length-1;P++){var B=Ei(A[P-1],2),I=B[0],L=B[1],Y=Ei(A[P],2),z=Y[0],Z=Y[1],ie=Ei(A[P+1],2),q=ie[0],H=ie[1];if(z===I&&Z!==L){var $=Z>L?Z-_:Z+_;S=S+" L "+z+" "+$}if(Z===L&&z!==I){var Q=z>I?z-_:z+_;S=S+" L "+Q+" "+Z}if(S=S+" Q "+z+" "+Z,z===q&&Z!==H){var $=Z>H?Z-_:Z+_;S=S+" "+z+" "+$}if(Z===H&&z!==q){var Q=z>q?z-_:z+_;S=S+" "+Q+" "+Z}}var T=Ei(A[A.length-1],2),k=T[0],D=T[1];return S=S+" L "+k+" "+D,Ze.exports.h("path",{d:S,strokeWidth:p,stroke:i,fill:"none",strokeDashArray:f})},g.extendKey="curvedEdge",g})(Ze.exports.PolylineEdge);(function(v){Hg(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g})(Ze.exports.PolylineEdgeModel);var ff,Ft,Vg,ji,Wg,Ag,Xg={},Jg=[],FO=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function zr(v,g){for(var c in g)v[c]=g[c];return v}function Zg(v){var g=v.parentNode;g&&g.removeChild(v)}function Si(v,g,c){var p,i,f,s={};for(f in g)f=="key"?p=g[f]:f=="ref"?i=g[f]:s[f]=g[f];if(arguments.length>2&&(s.children=arguments.length>3?ff.call(arguments,2):c),typeof v=="function"&&v.defaultProps!=null)for(f in v.defaultProps)s[f]===void 0&&(s[f]=v.defaultProps[f]);return mu(v,s,p,i,null)}function mu(v,g,c,p,i){var f={type:v,props:g,key:c,ref:p,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++Vg:i};return i==null&&Ft.vnode!=null&&Ft.vnode(f),f}function pf(v){return v.children}function Qo(v,g){this.props=v,this.context=g}function Fo(v,g){if(g==null)return v.__?Fo(v.__,v.__.__k.indexOf(v)+1):null;for(var c;g<v.__k.length;g++)if((c=v.__k[g])!=null&&c.__e!=null)return c.__e;return typeof v.type=="function"?Fo(v):null}function Kg(v){var g,c;if((v=v.__)!=null&&v.__c!=null){for(v.__e=v.__c.base=null,g=0;g<v.__k.length;g++)if((c=v.__k[g])!=null&&c.__e!=null){v.__e=v.__c.base=c.__e;break}return Kg(v)}}function vg(v){(!v.__d&&(v.__d=!0)&&ji.push(v)&&!xu.__r++||Ag!==Ft.debounceRendering)&&((Ag=Ft.debounceRendering)||Wg)(xu)}function xu(){for(var v;xu.__r=ji.length;)v=ji.sort(function(g,c){return g.__v.__b-c.__v.__b}),ji=[],v.some(function(g){var c,p,i,f,s,A;g.__d&&(s=(f=(c=g).__v).__e,(A=c.__P)&&(p=[],(i=zr({},f)).__v=f.__v+1,tA(A,f,i,c.__n,A.ownerSVGElement!==void 0,f.__h!=null?[s]:null,p,s==null?Fo(f):s,f.__h),YO(p,f),f.__e!=s&&Kg(f)))})}function qg(v,g,c,p,i,f,s,A,m,w){var E,S,_,P,B,I,L,Y=p&&p.__k||Jg,z=Y.length;for(c.__k=[],E=0;E<g.length;E++)if((P=c.__k[E]=(P=g[E])==null||typeof P=="boolean"?null:typeof P=="string"||typeof P=="number"||typeof P=="bigint"?mu(null,P,null,null,P):Array.isArray(P)?mu(pf,{children:P},null,null,null):P.__b>0?mu(P.type,P.props,P.key,null,P.__v):P)!=null){if(P.__=c,P.__b=c.__b+1,(_=Y[E])===null||_&&P.key==_.key&&P.type===_.type)Y[E]=void 0;else for(S=0;S<z;S++){if((_=Y[S])&&P.key==_.key&&P.type===_.type){Y[S]=void 0;break}_=null}tA(v,P,_=_||Xg,i,f,s,A,m,w),B=P.__e,(S=P.ref)&&_.ref!=S&&(L||(L=[]),_.ref&&L.push(_.ref,null,P),L.push(S,P.__c||B,P)),B!=null?(I==null&&(I=B),typeof P.type=="function"&&P.__k===_.__k?P.__d=m=$g(P,m,v):m=eA(v,P,_,Y,B,m),typeof c.type=="function"&&(c.__d=m)):m&&_.__e==m&&m.parentNode!=v&&(m=Fo(_))}for(c.__e=I,E=z;E--;)Y[E]!=null&&(typeof c.type=="function"&&Y[E].__e!=null&&Y[E].__e==c.__d&&(c.__d=Fo(p,E+1)),rA(Y[E],Y[E]));if(L)for(E=0;E<L.length;E++)nA(L[E],L[++E],L[++E])}function $g(v,g,c){for(var p,i=v.__k,f=0;i&&f<i.length;f++)(p=i[f])&&(p.__=v,g=typeof p.type=="function"?$g(p,g,c):eA(c,p,p,i,p.__e,g));return g}function eA(v,g,c,p,i,f){var s,A,m;if(g.__d!==void 0)s=g.__d,g.__d=void 0;else if(c==null||i!=f||i.parentNode==null)e:if(f==null||f.parentNode!==v)v.appendChild(i),s=null;else{for(A=f,m=0;(A=A.nextSibling)&&m<p.length;m+=2)if(A==i)break e;v.insertBefore(i,f),s=f}return s!==void 0?s:i.nextSibling}function GO(v,g,c,p,i){var f;for(f in c)f==="children"||f==="key"||f in g||_u(v,f,null,c[f],p);for(f in g)i&&typeof g[f]!="function"||f==="children"||f==="key"||f==="value"||f==="checked"||c[f]===g[f]||_u(v,f,g[f],c[f],p)}function bg(v,g,c){g[0]==="-"?v.setProperty(g,c):v[g]=c==null?"":typeof c!="number"||FO.test(g)?c:c+"px"}function _u(v,g,c,p,i){var f;e:if(g==="style")if(typeof c=="string")v.style.cssText=c;else{if(typeof p=="string"&&(v.style.cssText=p=""),p)for(g in p)c&&g in c||bg(v.style,g,"");if(c)for(g in c)p&&c[g]===p[g]||bg(v.style,g,c[g])}else if(g[0]==="o"&&g[1]==="n")f=g!==(g=g.replace(/Capture$/,"")),g=g.toLowerCase()in v?g.toLowerCase().slice(2):g.slice(2),v.l||(v.l={}),v.l[g+f]=c,c?p||v.addEventListener(g,f?wg:mg,f):v.removeEventListener(g,f?wg:mg,f);else if(g!=="dangerouslySetInnerHTML"){if(i)g=g.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(g!=="href"&&g!=="list"&&g!=="form"&&g!=="tabIndex"&&g!=="download"&&g in v)try{v[g]=c==null?"":c;break e}catch{}typeof c=="function"||(c!=null&&(c!==!1||g[0]==="a"&&g[1]==="r")?v.setAttribute(g,c):v.removeAttribute(g))}}function mg(v){this.l[v.type+!1](Ft.event?Ft.event(v):v)}function wg(v){this.l[v.type+!0](Ft.event?Ft.event(v):v)}function tA(v,g,c,p,i,f,s,A,m){var w,E,S,_,P,B,I,L,Y,z,Z,ie,q,H=g.type;if(g.constructor!==void 0)return null;c.__h!=null&&(m=c.__h,A=g.__e=c.__e,g.__h=null,f=[A]),(w=Ft.__b)&&w(g);try{e:if(typeof H=="function"){if(L=g.props,Y=(w=H.contextType)&&p[w.__c],z=w?Y?Y.props.value:w.__:p,c.__c?I=(E=g.__c=c.__c).__=E.__E:("prototype"in H&&H.prototype.render?g.__c=E=new H(L,z):(g.__c=E=new Qo(L,z),E.constructor=H,E.render=HO),Y&&Y.sub(E),E.props=L,E.state||(E.state={}),E.context=z,E.__n=p,S=E.__d=!0,E.__h=[]),E.__s==null&&(E.__s=E.state),H.getDerivedStateFromProps!=null&&(E.__s==E.state&&(E.__s=zr({},E.__s)),zr(E.__s,H.getDerivedStateFromProps(L,E.__s))),_=E.props,P=E.state,S)H.getDerivedStateFromProps==null&&E.componentWillMount!=null&&E.componentWillMount(),E.componentDidMount!=null&&E.__h.push(E.componentDidMount);else{if(H.getDerivedStateFromProps==null&&L!==_&&E.componentWillReceiveProps!=null&&E.componentWillReceiveProps(L,z),!E.__e&&E.shouldComponentUpdate!=null&&E.shouldComponentUpdate(L,E.__s,z)===!1||g.__v===c.__v){E.props=L,E.state=E.__s,g.__v!==c.__v&&(E.__d=!1),E.__v=g,g.__e=c.__e,g.__k=c.__k,g.__k.forEach(function($){$&&($.__=g)}),E.__h.length&&s.push(E);break e}E.componentWillUpdate!=null&&E.componentWillUpdate(L,E.__s,z),E.componentDidUpdate!=null&&E.__h.push(function(){E.componentDidUpdate(_,P,B)})}if(E.context=z,E.props=L,E.__v=g,E.__P=v,Z=Ft.__r,ie=0,"prototype"in H&&H.prototype.render)E.state=E.__s,E.__d=!1,Z&&Z(g),w=E.render(E.props,E.state,E.context);else do E.__d=!1,Z&&Z(g),w=E.render(E.props,E.state,E.context),E.state=E.__s;while(E.__d&&++ie<25);E.state=E.__s,E.getChildContext!=null&&(p=zr(zr({},p),E.getChildContext())),S||E.getSnapshotBeforeUpdate==null||(B=E.getSnapshotBeforeUpdate(_,P)),q=w!=null&&w.type===pf&&w.key==null?w.props.children:w,qg(v,Array.isArray(q)?q:[q],g,c,p,i,f,s,A,m),E.base=g.__e,g.__h=null,E.__h.length&&s.push(E),I&&(E.__E=E.__=null),E.__e=!1}else f==null&&g.__v===c.__v?(g.__k=c.__k,g.__e=c.__e):g.__e=UO(c.__e,g,c,p,i,f,s,m);(w=Ft.diffed)&&w(g)}catch($){g.__v=null,(m||f!=null)&&(g.__e=A,g.__h=!!m,f[f.indexOf(A)]=null),Ft.__e($,g,c)}}function YO(v,g){Ft.__c&&Ft.__c(g,v),v.some(function(c){try{v=c.__h,c.__h=[],v.some(function(p){p.call(c)})}catch(p){Ft.__e(p,c.__v)}})}function UO(v,g,c,p,i,f,s,A){var m,w,E,S=c.props,_=g.props,P=g.type,B=0;if(P==="svg"&&(i=!0),f!=null){for(;B<f.length;B++)if((m=f[B])&&"setAttribute"in m==!!P&&(P?m.localName===P:m.nodeType===3)){v=m,f[B]=null;break}}if(v==null){if(P===null)return document.createTextNode(_);v=i?document.createElementNS("http://www.w3.org/2000/svg",P):document.createElement(P,_.is&&_),f=null,A=!1}if(P===null)S===_||A&&v.data===_||(v.data=_);else{if(f=f&&ff.call(v.childNodes),w=(S=c.props||Xg).dangerouslySetInnerHTML,E=_.dangerouslySetInnerHTML,!A){if(f!=null)for(S={},B=0;B<v.attributes.length;B++)S[v.attributes[B].name]=v.attributes[B].value;(E||w)&&(E&&(w&&E.__html==w.__html||E.__html===v.innerHTML)||(v.innerHTML=E&&E.__html||""))}if(GO(v,_,S,i,A),E)g.__k=[];else if(B=g.props.children,qg(v,Array.isArray(B)?B:[B],g,c,p,i&&P!=="foreignObject",f,s,f?f[0]:c.__k&&Fo(c,0),A),f!=null)for(B=f.length;B--;)f[B]!=null&&Zg(f[B]);A||("value"in _&&(B=_.value)!==void 0&&(B!==v.value||P==="progress"&&!B||P==="option"&&B!==S.value)&&_u(v,"value",B,S.value,!1),"checked"in _&&(B=_.checked)!==void 0&&B!==v.checked&&_u(v,"checked",B,S.checked,!1))}return v}function nA(v,g,c){try{typeof v=="function"?v(g):v.current=g}catch(p){Ft.__e(p,c)}}function rA(v,g,c){var p,i;if(Ft.unmount&&Ft.unmount(v),(p=v.ref)&&(p.current&&p.current!==v.__e||nA(p,null,g)),(p=v.__c)!=null){if(p.componentWillUnmount)try{p.componentWillUnmount()}catch(f){Ft.__e(f,g)}p.base=p.__P=null}if(p=v.__k)for(i=0;i<p.length;i++)p[i]&&rA(p[i],g,typeof v.type!="function");c||v.__e==null||Zg(v.__e),v.__e=v.__d=void 0}function HO(v,g,c){return this.constructor(v,c)}ff=Jg.slice,Ft={__e:function(v,g,c,p){for(var i,f,s;g=g.__;)if((i=g.__c)&&!i.__)try{if((f=i.constructor)&&f.getDerivedStateFromError!=null&&(i.setState(f.getDerivedStateFromError(v)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(v,p||{}),s=i.__d),s)return i.__E=i}catch(A){v=A}throw v}},Vg=0,Qo.prototype.setState=function(v,g){var c;c=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=zr({},this.state),typeof v=="function"&&(v=v(zr({},c),this.props)),v&&zr(c,v),v!=null&&this.__v&&(g&&this.__h.push(g),vg(this))},Qo.prototype.forceUpdate=function(v){this.__v&&(this.__e=!0,v&&this.__h.push(v),vg(this))},Qo.prototype.render=pf,ji=[],Wg=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,xu.__r=0;var ki=globalThis&&globalThis.__assign||function(){return ki=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},ki.apply(this,arguments)};function df(v){var g=v.x,c=v.y,p=v.width,i=v.height,f=v.radius,s=v.className,A=g-p/2,m=c-i/2,w=ki(ki({width:10,height:10,cx:0,cy:0,rx:f||0,ry:f||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+s},v),{x:A,y:m});return Ze.exports.h("rect",ki({},w))}df.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Lo;(function(v){v.NODE="node",v.CIRCLE_NODE="circle-node",v.POLYGON_NODE="polygon-node",v.RECT_NODE="rect-node",v.HTML_NODE="html-node",v.TEXT_NODE="text-node",v.ELLIPSE_NODE="ellipse-node",v.DIAMOND_NODE="diamond-node",v.EDGE="edge",v.LINE_EDGE="line-edge",v.POLYLINE_EDGE="polyline-edge",v.BEZIER_EDGE="bezier-edge",v.GRAPH="graph"})(Lo||(Lo={}));function wu(v){var g=v.x,c=v.y,p=v.width,i=v.height;return{minX:g-p/2,minY:c-i/2,maxX:g+p/2,maxY:c+i/2}}function Og(v){var g=wu(v),c=v.radius,p=g.minX,i=g.minY,f=g.maxX,s=g.maxY;return[{x:p+c,y:i+c},{x:f-c,y:i+c},{x:f-c,y:s-c},{x:p+c,y:s-c}]}function Eg(v){var g=v.point,c=v.beforeNode,p=v.afterNode,i=g.x,f=g.y,s={x:i,y:f},A=c.radius,m=wu(c),w=wu(p);if(i===m.minX){s.x=w.minX;var E=(f-c.y)/(c.height/2-A);E?s.y=p.y+(p.height/2-A)*E:s.y=p.y}else if(i===m.maxX){s.x=w.maxX;var E=(f-c.y)/(c.height/2-A);E?s.y=p.y+(p.height/2-A)*E:s.y=p.y}else if(f===m.minY){s.y=w.minY;var E=(i-c.x)/(c.width/2-A);E?s.x=p.x+(p.width/2-A)*E:s.x=p.x}else if(f===m.maxY){s.y=w.maxY;var E=(i-c.x)/(c.width/2-A);E?s.x=p.x+(p.width/2-A)*E:s.x=p.x}else{var S=Og(c),_=Og(p),P=wu(c),B=P.minX,I=P.minY,L=P.maxX,Y=P.maxY,z=-1;if(i-B<A&&f-I<A?z=0:L-i<A&&f-I<A?z=1:L-i<A&&Y-f<A?z=2:i-B<A&&I-f<A&&(z=3),z>-1){var Z=Math.atan2(f-S[z].y,i-S[z].x);s.x=_[z].x+A*Math.cos(Z),s.y=_[z].y+A*Math.sin(Z)}}return s}function xg(v){var g=v.point,c=v.beforeNode,p=v.afterNode,i=p.rx,f=p.ry,s=g,A=(g.y-c.y)/(g.x-c.x),m=i,w=f,E,S;return A>=1/0?(E=0,S=w):A<=-1/0?(E=0,S=-w):g.x-c.x>0?(E=m*w/Math.sqrt(w*w+m*m*A*A),S=m*w*A/Math.sqrt(w*w+m*m*A*A)):(E=-(m*w)/Math.sqrt(w*w+m*m*A*A),S=-(m*w*A)/Math.sqrt(w*w+m*m*A*A)),s={x:E+p.x,y:S+p.y},s}function _g(v){var g=v.point,c=v.beforeNode,p=v.afterNode,i=g,f,s,A=g.x-c.x,m=g.y-c.y,w=c.rx,E=c.ry,S=Math.sqrt((w-Math.abs(A))*(w-Math.abs(A))+m*m)/Math.sqrt(w*w+E*E),_=p.rx,P=p.ry,B=Math.sqrt((_*_+P*P)*S*S*(_*_/(_*_+P*P))),I=B*(P/_);return A>=0?f=_-B:f=B-_,m>0?s=I:s=-I,i={x:f+p.x,y:s+p.y},i}var VO=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),to=globalThis&&globalThis.__assign||function(){return to=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},to.apply(this,arguments)},WO=Ze.exports.LogicFlowUtil.StepDrag,XO=function(v){VO(g,v);function g(c){var p=v.call(this)||this;p.updatePosition=function(s){var A=s.deltaX,m=s.deltaY,w=p.nodeModel,E=w.x,S=w.y;p.nodeModel.x=E+A/2,p.nodeModel.y=S+m/2,p.nodeModel.moveText(A/2,m/2)},p.getResize=function(s){var A=s.index,m=s.deltaX,w=s.deltaY,E=s.width,S=s.height,_=s.pct,P=_===void 0?1:_,B={width:E,height:S};switch(A){case 0:B.width=E-m*P,B.height=S-w*P;break;case 1:B.width=E+m*P,B.height=S-w*P;break;case 2:B.width=E+m,B.height=S+w*P;break;case 3:B.width=E-m*P,B.height=S+w*P;break}return B},p.updateRect=function(s){var A=s.deltaX,m=s.deltaY,w=p.nodeModel,E=w.id,S=w.x,_=w.y,P=w.width,B=w.height,I=w.radius,L=p.index,Y=p.getResize({index:L,deltaX:A,deltaY:m,width:P,height:B,pct:1}),z=p.nodeModel,Z=z.minWidth,ie=z.minHeight,q=z.maxWidth,H=z.maxHeight;if(Y.width<Z||Y.width>q||Y.height<ie||Y.height>H){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:A,deltaY:m}),p.nodeModel.width=Y.width,p.nodeModel.height=Y.height,p.nodeModel.setProperties({nodeSize:{width:Y.width,height:Y.height}});var $=p.getNodeEdges(E),Q={x:S,y:_,width:P,height:B,radius:I},T={x:p.nodeModel.x,y:p.nodeModel.y,width:p.nodeModel.width,height:p.nodeModel.height,radius:I},k={point:"",beforeNode:Q,afterNode:T},D;$.sourceEdges.forEach(function(M){k.point=M.startPoint,D=Eg(k),M.updateStartPoint(D)}),$.targetEdges.forEach(function(M){k.point=M.endPoint,D=Eg(k),M.updateEndPoint(D)}),p.eventEmit({beforeNode:Q,afterNode:T})},p.updateEllipse=function(s){var A=s.deltaX,m=s.deltaY,w=p.nodeModel,E=w.id,S=w.rx,_=w.ry,P=w.x,B=w.y,I=p.index,L=S,Y=_,z=p.getResize({index:I,deltaX:A,deltaY:m,width:L,height:Y,pct:1/2}),Z=p.nodeModel,ie=Z.minWidth,q=Z.minHeight,H=Z.maxWidth,$=Z.maxHeight;if(z.width<ie/2||z.width>H/2||z.height<q/2||z.height>$/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:A,deltaY:m}),p.nodeModel.rx=p.nodeModel.rx+A/2,p.nodeModel.ry=p.nodeModel.ry+m/2,p.nodeModel.setProperties({nodeSize:{rx:z.width,ry:z.height}});var Q=p.getNodeEdges(E),T={x:P,y:B},k={rx:z.width,ry:z.height,x:p.nodeModel.x,y:p.nodeModel.y},D={point:{},beforeNode:T,afterNode:k},M;Q.sourceEdges.forEach(function(G){D.point=G.startPoint,M=xg(D),G.updateStartPoint(M)}),Q.targetEdges.forEach(function(G){D.point=G.endPoint,M=xg(D),G.updateEndPoint(M)}),p.eventEmit({beforeNode:to(to({},T),{rx:S,ry:_}),afterNode:k})},p.updateDiamond=function(s){var A=s.deltaX,m=s.deltaY,w=p.nodeModel,E=w.id,S=w.rx,_=w.ry,P=w.x,B=w.y,I=p.index,L=S,Y=_,z=p.getResize({index:I,deltaX:A,deltaY:m,width:L,height:Y,pct:1/2}),Z=p.nodeModel,ie=Z.minWidth,q=Z.minHeight,H=Z.maxWidth,$=Z.maxHeight;if(z.width<ie/2||z.width>H/2||z.height<q/2||z.height>$/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:A,deltaY:m}),p.nodeModel.rx=p.nodeModel.rx+A/2,p.nodeModel.ry=p.nodeModel.ry+m/2,p.nodeModel.setProperties({nodeSize:{rx:z.width,ry:z.height}});var Q={x:P,y:B,rx:S,ry:_},T={rx:z.width,ry:z.height,x:p.nodeModel.x,y:p.nodeModel.y},k={point:{},beforeNode:Q,afterNode:T},D,M=p.getNodeEdges(E);M.sourceEdges.forEach(function(G){k.point=G.startPoint,D=_g(k),G.updateStartPoint(D)}),M.targetEdges.forEach(function(G){k.point=G.endPoint,D=_g(k),G.updateEndPoint(D)}),p.eventEmit({beforeNode:Q,afterNode:T})},p.eventEmit=function(s){var A=s.beforeNode,m=s.afterNode,w=p.nodeModel,E=w.id,S=w.modelType,_=w.type,P=to({id:E,modelType:S,type:_},A),B=to({id:E,modelType:S,type:_},m);p.graphModel.eventCenter.emit("node:resize",{oldNodeSize:P,newNodeSize:B})},p.onDraging=function(s){var A=s.deltaX,m=s.deltaY,w=p.nodeModel.modelType;w===Lo.RECT_NODE||w===Lo.HTML_NODE?p.updateRect({deltaX:A,deltaY:m}):w===Lo.ELLIPSE_NODE?p.updateEllipse({deltaX:A,deltaY:m}):w===Lo.DIAMOND_NODE&&p.updateDiamond({deltaX:A,deltaY:m})},p.index=c.index,p.nodeModel=c.model,p.graphModel=c.graphModel;var i=p.graphModel.gridSize,f=2;return i>1&&(f=2*i),p.nodeModel.gridSize&&(f=2*p.nodeModel.gridSize),p.state={},p.dragHandler=new WO({onDraging:p.onDraging,step:f}),p}return g.prototype.getNodeEdges=function(c){for(var p=this.graphModel,i=p.edges,f=[],s=[],A=0;A<i.length;A++){var m=i[A];m.sourceNodeId===c?f.push(m):i[A].targetNodeId===c&&s.push(m)}return{sourceEdges:f,targetEdges:s}},g.prototype.render=function(){var c=this.props,p=c.x,i=c.y,f=c.index,s=c.model,A=s.getControlPointStyle();return Si("g",{className:"lf-resize-control-"+f},Si(df,to({className:"lf-node-control"},{x:p,y:i},A,{onMouseDown:this.dragHandler.handleMouseDown})))},g}(Qo),JO=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),ju=globalThis&&globalThis.__assign||function(){return ju=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},ju.apply(this,arguments)},Du=function(v){JO(g,v);function g(){var c=v.call(this)||this;return c.state={},c}return g.prototype.getResizeControl=function(){var c=this.props,p=c.model,i=c.graphModel,f=p.x,s=p.y,A=p.width,m=p.height,w={minX:f-A/2,minY:s-m/2,maxX:f+A/2,maxY:s+m/2},E=w.minX,S=w.minY,_=w.maxX,P=w.maxY,B=[{x:E,y:S},{x:_,y:S},{x:_,y:P},{x:E,y:P}];return B.map(function(I,L){return Si(XO,ju({index:L},I,{model:p,graphModel:i}))})},g.prototype.getGroupSolid=function(){var c=this.props.model,p=c.x,i=c.y,f=c.width,s=c.height,A=c.getResizeOutlineStyle();return Si(df,ju({fill:"none"},A,{x:p,y:i,width:f,height:s}))},g.prototype.render=function(){return Si("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},g}(Qo),oA=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),ZO=function(v){oA(g,v);function g(c,p){var i=v.call(this,c,p)||this,f=i.properties.nodeSize;return f&&(i.width=f.width,i.height=f.height),i}return g.prototype.initNodeData=function(c){v.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},g.prototype.getOutlineStyle=function(){var c=v.prototype.getOutlineStyle.call(this);return c.stroke="none",c.hover&&(c.hover.stroke="none"),c},g.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},g.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},g.prototype.resize=function(c,p){console.log(c,p)},g}(Ze.exports.RectNodeModel),KO=function(v){oA(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getControlGroup=function(){var c=this.props,p=c.model,i=c.graphModel;return Ze.exports.h(Du,{model:p,graphModel:i})},g.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},g.prototype.getShape=function(){var c=this.props.model.isSelected;return Ze.exports.h("g",null,this.getResizeShape(),c?this.getControlGroup():"")},g}(Ze.exports.RectNode),iA={type:"rect",view:KO,model:ZO},aA=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}();(function(v){aA(g,v);function g(c,p){var i=v.call(this,c,p)||this,f=i.properties.nodeSize;return f&&(i.rx=f.rx,i.ry=f.ry),i}return g.prototype.initNodeData=function(c){v.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},g.prototype.getOutlineStyle=function(){var c=v.prototype.getOutlineStyle.call(this);return c.stroke="none",c.hover&&(c.hover.stroke="none"),c},g.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},g.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},g})(Ze.exports.EllipseNodeModel);(function(v){aA(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getControlGroup=function(){var c=this.props,p=c.model,i=c.graphModel;return Ze.exports.h(Du,{model:p,graphModel:i})},g.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},g.prototype.getShape=function(){var c=this.props.model;return Ze.exports.h("g",null,this.getResizeShape(),c.isSelected?this.getControlGroup():"")},g})(Ze.exports.EllipseNode);var af=globalThis&&globalThis.__assign||function(){return af=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},af.apply(this,arguments)};function qO(v){var g=v.fillOpacity,c=g===void 0?1:g,p=v.strokeWidth,i=p===void 0?1:p,f=v.strokeOpacity,s=f===void 0?1:f,A=v.fill,m=A===void 0?"transparent":A,w=v.stroke,E=w===void 0?"#000":w,S=v.points,_=v.className,P=_===void 0?"lf-basic-shape":_,B={fill:m,fillOpacity:c,strokeWidth:i,stroke:E,strokeOpacity:s,points:"",className:P};return B.points=S.map(function(I){return I.join(",")}).join(" "),Ze.exports.h("polygon",af({},B))}var uA=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),uf=globalThis&&globalThis.__assign||function(){return uf=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},uf.apply(this,arguments)};(function(v){uA(g,v);function g(c,p){var i=v.call(this,c,p)||this,f=i.properties.nodeSize;return f&&(i.rx=f.rx,i.ry=f.ry),i}return g.prototype.initNodeData=function(c){v.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},g.prototype.getOutlineStyle=function(){var c=v.prototype.getOutlineStyle.call(this);return c.stroke="none",c.hover&&(c.hover.stroke="none"),c},g.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},g.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},g})(Ze.exports.DiamondNodeModel);(function(v){uA(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getControlGroup=function(){var c=this.props,p=c.model,i=c.graphModel;return Ze.exports.h(Du,{model:p,graphModel:i})},g.prototype.getResizeShape=function(){var c=this.props.model,p=c.points,i=c.getNodeStyle();return Ze.exports.h("g",null,Ze.exports.h(qO,uf({},i,{points:p})))},g.prototype.getShape=function(){var c=this.props.model.isSelected;return Ze.exports.h("g",null,this.getResizeShape(),c?this.getControlGroup():"")},g})(Ze.exports.DiamondNode);var cA=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}();(function(v){cA(g,v);function g(c,p){var i=v.call(this,c,p)||this,f=i.properties.nodeSize;return f&&(i.width=f.width,i.height=f.height),i}return g.prototype.initNodeData=function(c){v.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},g.prototype.getOutlineStyle=function(){var c=v.prototype.getOutlineStyle.call(this);return c.stroke="none",c.hover&&(c.hover.stroke="none"),c},g.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},g.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},g})(Ze.exports.HtmlNodeModel);(function(v){cA(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getControlGroup=function(){var c=this.props,p=c.model,i=c.graphModel;return Ze.exports.h(Du,{model:p,graphModel:i})},g.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},g.prototype.getShape=function(){var c=this.props.model.isSelected;return Ze.exports.h("g",null,this.getResizeShape(),c?this.getControlGroup():"")},g})(Ze.exports.HtmlNode);var sA=globalThis&&globalThis.__extends||function(){var v=function(g,c){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var f in i)i.hasOwnProperty(f)&&(p[f]=i[f])},v(g,c)};return function(g,c){v(g,c);function p(){this.constructor=g}g.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),Su=globalThis&&globalThis.__assign||function(){return Su=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},Su.apply(this,arguments)},$O=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f},jg=globalThis&&globalThis.__spread||function(){for(var v=[],g=0;g<arguments.length;g++)v=v.concat($O(arguments[g]));return v},Sg=500,kg=300;(function(v){sA(g,v);function g(){var c=v!==null&&v.apply(this,arguments)||this;return c.isGroup=!0,c.unfoldedWidth=Sg,c.unfoldedHight=kg,c}return g.prototype.initNodeData=function(c){var p=this;v.prototype.initNodeData.call(this,c);var i=[];Array.isArray(c.children)&&(i=c.children),this.children=new Set(i),this.width=Sg,this.height=kg,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=-1,this.radius=0,this.text.editable=!1,this.text.draggable=!1,this.isRestrict=!1,this.resizable=!1,this.autoToFront=!1,this.foldable=!1,this.properties.isFolded===void 0&&(this.properties.isFolded=!1),this.isFolded=this.properties.isFolded,setTimeout(function(){p.isFolded&&p.foldGroup(p.isFolded)})},g.prototype.getResizeOutlineStyle=function(){var c=v.prototype.getResizeOutlineStyle.call(this);return c.stroke="none",c},g.prototype.foldGroup=function(c){var p=this;this.setProperty("isFolded",c),this.isFolded=c,c?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(f){var s=p.graphModel.getElement(f);s.visible=!c,i=i.concat(s.incoming.edges.concat(s.outgoing.edges))}),this.foldEdge(c,i)},g.prototype.getAnchorStyle=function(c){var p=v.prototype.getAnchorStyle.call(this,c);return p.stroke="transparent",p.fill="transparent",p.hover.fill="transparent",p.hover.stroke="transparent",p},g.prototype.foldEdge=function(c,p){var i=this;p.forEach(function(f,s){var A=f.id,m=f.sourceNodeId,w=f.targetNodeId,E=f.startPoint,S=f.endPoint,_=f.type,P=f.properties,B=f.text,I={id:A+"__"+s,sourceNodeId:m,targetNodeId:w,startPoint:E,endPoint:S,type:_,properties:P,text:B==null?void 0:B.value};f.virtual&&i.graphModel.deleteEdgeById(f.id);var L=i.graphModel.group.getNodeGroup(w);L||(L=i.graphModel.getNodeModelById(w));var Y=i.graphModel.group.getNodeGroup(m);Y||(Y=i.graphModel.getNodeModelById(m)),c&&f.visible!==!1&&(i.children.has(m)||i.id===m?(I.startPoint=void 0,I.sourceNodeId=i.id):(I.endPoint=void 0,I.targetNodeId=i.id),(L.id!==i.id||Y.id!==i.id)&&i.createVirtualEdge(I),f.visible=!1),!c&&f.visible===!1&&(L&&L.isGroup&&L.isFolded?(I.targetNodeId=L.id,I.endPoint=void 0,i.createVirtualEdge(I)):Y&&Y.isGroup&&Y.isFolded?(I.sourceNodeId=Y.id,I.startPoint=void 0,i.createVirtualEdge(I)):f.visible=!0)})},g.prototype.createVirtualEdge=function(c){c.pointsList=void 0;var p=this.graphModel.addEdge(c);p.virtual=!0,p.getData=function(){return null},p.text.editable=!1,p.isFoldedEdge=!0},g.prototype.isInRange=function(c){var p=c.x1,i=c.y1,f=c.x2,s=c.y2;return p>=this.x-this.width/2&&f<=this.x+this.width/2&&i>=this.y-this.height/2&&s<=this.y+this.height/2},g.prototype.isAllowMoveTo=function(c){var p=c.x1,i=c.y1,f=c.x2,s=c.y2;return{x:p>=this.x-this.width/2&&f<=this.x+this.width/2,y:i>=this.y-this.height/2&&s<=this.y+this.height/2}},g.prototype.setAllowAppendChild=function(c){this.setProperty("groupAddable",c)},g.prototype.addChild=function(c){this.children.add(c)},g.prototype.removeChild=function(c){this.children.delete(c)},g.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},g.prototype.getData=function(){var c=v.prototype.getData.call(this);c.children=jg(this.children);var p=c.properties;return delete p.groupAddable,delete p.isFolded,c},g.prototype.getHistoryData=function(){var c=v.prototype.getData.call(this);c.children=jg(this.children);var p=c.properties;return delete p.groupAddable,p.isFolded&&(c.x=c.x+this.unfoldedWidth/2-this.foldedWidth/2,c.y=c.y+this.unfoldedHight/2-this.foldedHeight/2),c},g})(iA.model);(function(v){sA(g,v);function g(){return v!==null&&v.apply(this,arguments)||this}return g.prototype.getControlGroup=function(){var c=this.props.model,p=c.resizable,i=c.properties;return p&&!i.isFolded?v.prototype.getControlGroup.call(this):null},g.prototype.getAddedableShape=function(){var c=this.props.model,p=c.width,i=c.height,f=c.x,s=c.y,A=c.radius,m=c.properties;if(!m.groupAddable)return null;var w=this.props.model.getNodeStyle().strokeWidth,E=this.props.model.getAddableOutlineStyle(),S=p+w+8,_=i+w+8;return Ze.exports.h("rect",Su(Su({},E),{width:S,height:_,x:f-S/2,y:s-_/2,rx:A,ry:A}))},g.prototype.getFoldIcon=function(){var c=this.props.model,p=c.x-c.width/2+5,i=c.y-c.height/2+5;if(!c.foldable)return null;var f=Ze.exports.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:c.properties.isFolded?"M "+(p+3)+","+(i+6)+" "+(p+11)+","+(i+6)+" M"+(p+7)+","+(i+2)+" "+(p+7)+","+(i+10):"M "+(p+3)+","+(i+6)+" "+(p+11)+","+(i+6)+" "});return Ze.exports.h("g",{},[Ze.exports.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:c.x-c.width/2+5,y:c.y-c.height/2+5,onClick:function(){c.foldGroup(!c.properties.isFolded)}}),f])},g.prototype.getResizeShape=function(){return Ze.exports.h("g",{},[this.getAddedableShape(),v.prototype.getResizeShape.call(this),this.getFoldIcon()])},g})(iA.view);var eE=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f};globalThis&&globalThis.__spread;var tE=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f};globalThis&&globalThis.__spread;var Pg=globalThis&&globalThis.__assign||function(){return Pg=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},Pg.apply(this,arguments)},Dg=globalThis&&globalThis.__assign||function(){return Dg=Object.assign||function(v){for(var g,c=1,p=arguments.length;c<p;c++){g=arguments[c];for(var i in g)Object.prototype.hasOwnProperty.call(g,i)&&(v[i]=g[i])}return v},Dg.apply(this,arguments)},nE=globalThis&&globalThis.__read||function(v,g){var c=typeof Symbol=="function"&&v[Symbol.iterator];if(!c)return v;var p=c.call(v),i,f=[],s;try{for(;(g===void 0||g-- >0)&&!(i=p.next()).done;)f.push(i.value)}catch(A){s={error:A}}finally{try{i&&!i.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}return f};globalThis&&globalThis.__spread;const rE={class:"control-container"},oE=["title","onMouseenter"],iE=["disabled","onClick"],aE=ku({__name:"Control",props:{lf:{default:null},catTurboData:{type:Boolean}},emits:["catData"],setup(v,{emit:g}){const c=v,p=rg("controlButton3",null),i=rg("controlButton4",null);let f=no(-1),s=no([{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 A=(w,E)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((S,_)=>{let P=c.lf;E===1&&P.zoom(!0),E===6&&g("catData"),E===_&&P[S]()})},m=w=>{f.value=w};return Cg(()=>{c.lf.on("history:change",({data:{undoAble:w,redoAble:E}})=>{Rt(s)[3].disabled=Rt(p).disabled=!w,Rt(s)[4].disabled=Rt(i).disabled=!E})}),(w,E)=>{const S=xi("el-tooltip");return or(),ro("div",rE,[Er("ul",null,[(or(!0),ro(Ng,null,Mg(Rt(s),(_,P)=>(or(),ro("li",{key:P,title:_.text,class:"dark:color-bg_color",onMouseenter:og(B=>m(P),["prevent"]),onMouseleave:E[0]||(E[0]=og(B=>Bg(f)?f.value=-1:f=-1,["prevent"]))},[Ro(S,{content:_.text,visible:Rt(f)===P,placement:"right"},{default:zo(()=>[Er("button",{ref_for:!0,ref:"controlButton"+P,disabled:_.disabled,style:ig({cursor:_.disabled===!1?"pointer":"not-allowed",color:_.disabled===!1?"":"#00000040"}),onClick:B=>A(_,P)},[Er("span",{class:Tg("iconfont "+_.icon),style:ig({fontSize:`${_.size}px`})},null,6)],12,iE)]),_:2},1032,["content","visible"])],40,oE))),128))])])}}});var uE=cf(aE,[["__scopeId","data-v-44d797b9"]]);const cE={class:"node-panel"},sE=["onMousedown"],lE={key:0,class:"shape"},fE={class:"node-label"},pE=ku({__name:"NodePanel",props:{lf:{default:null},nodeList:{default:null}},setup(v){const g=v;let c=no({a:"efrwe",b:"wewe"});const p=i=>{g.lf.dnd.startDrag({type:i.type,properties:Rt(c)})};return(i,f)=>(or(),ro("div",cE,[(or(!0),ro(Ng,null,Mg(g.nodeList,s=>(or(),ro("div",{class:"node-item dark:color-bg_color",key:s.text,onMousedown:A=>p(s)},[Er("div",{class:Tg(["node-item-icon",s.class])},[s.type==="user"||s.type==="time"?(or(),ro("div",lE)):Ig("",!0)],2),Er("span",fE,Zw(s.text),1)],40,sE))),128))]))}});var dE=cf(pE,[["__scopeId","data-v-8d5e5256"]]),lA={exports:{}},hE=Kw(qw);(function(v,g){(function(c,p){v.exports=p(hE)})($w,function(c){return function(){var p={789:function(A){A.exports=c}},i={};function f(A){var m=i[A];if(m!==void 0)return m.exports;var w=i[A]={exports:{}};return p[A](w,w.exports,f),w.exports}f.d=function(A,m){for(var w in m)f.o(m,w)&&!f.o(A,w)&&Object.defineProperty(A,w,{enumerable:!0,get:m[w]})},f.o=function(A,m){return Object.prototype.hasOwnProperty.call(A,m)},f.r=function(A){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var s={};return function(){function A(k,D){(D==null||D>k.length)&&(D=k.length);for(var M=0,G=new Array(D);M<D;M++)G[M]=k[M];return G}function m(k,D){if(k){if(typeof k=="string")return A(k,D);var M=Object.prototype.toString.call(k).slice(8,-1);return M==="Object"&&k.constructor&&(M=k.constructor.name),M==="Map"||M==="Set"?Array.from(k):M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)?A(k,D):void 0}}function w(k,D){return function(M){if(Array.isArray(M))return M}(k)||function(M,G){var ce=M==null?null:typeof Symbol!="undefined"&&M[Symbol.iterator]||M["@@iterator"];if(ce!=null){var fe,ye,Oe=[],Ae=!0,K=!1;try{for(ce=ce.call(M);!(Ae=(fe=ce.next()).done)&&(Oe.push(fe.value),!G||Oe.length!==G);Ae=!0);}catch(se){K=!0,ye=se}finally{try{Ae||ce.return==null||ce.return()}finally{if(K)throw ye}}return Oe}}(k,D)||m(k,D)||function(){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 E(k){return function(D){if(Array.isArray(D))return A(D)}(k)||function(D){if(typeof Symbol!="undefined"&&D[Symbol.iterator]!=null||D["@@iterator"]!=null)return Array.from(D)}(k)||m(k)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function S(k,D,M){return D in k?Object.defineProperty(k,D,{value:M,enumerable:!0,configurable:!0,writable:!0}):k[D]=M,k}f.r(s),f.d(s,{default:function(){return T}});var _=f(789),P=(0,_.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var k=this.data,D=this.onClick;return(0,_.createVNode)("span",{class:"vjs-tree__brackets",onClick:D},[k])}}),B=(0,_.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(k,D){var M=D.emit;return{uiType:(0,_.computed)(function(){return k.isMultiple?"checkbox":"radio"}),model:(0,_.computed)({get:function(){return k.checked},set:function(G){return M("update:modelValue",G)}})}},render:function(){var k=this.uiType,D=this.model,M=this.$emit;return(0,_.createVNode)("label",{class:["vjs-check-controller",D?"is-checked":""],onClick:function(G){return G.stopPropagation()}},[(0,_.createVNode)("span",{class:"vjs-check-controller__inner is-".concat(k)},null),(0,_.createVNode)("input",{checked:D,class:"vjs-check-controller__original is-".concat(k),type:k,onChange:function(){return M("change",D)}},null)])}});function I(k,D){var M=Object.keys(k);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(k);D&&(G=G.filter(function(ce){return Object.getOwnPropertyDescriptor(k,ce).enumerable})),M.push.apply(M,G)}return M}function L(k){for(var D=1;D<arguments.length;D++){var M=arguments[D]!=null?arguments[D]:{};D%2?I(Object(M),!0).forEach(function(G){S(k,G,M[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(M)):I(Object(M)).forEach(function(G){Object.defineProperty(k,G,Object.getOwnPropertyDescriptor(M,G))})}return k}function Y(k){return Object.prototype.toString.call(k).slice(8,-1).toLowerCase()}function z(k){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,G=arguments.length>3?arguments[3]:void 0,ce=G||{},fe=ce.key,ye=ce.index,Oe=ce.type,Ae=Oe===void 0?"content":Oe,K=ce.showComma,se=K!==void 0&&K,pe=ce.length,me=pe===void 0?1:pe,Pe=Y(k);if(Pe==="array"){var ze=k.map(function(J,V,re){return z(J,"".concat(D,"[").concat(V,"]"),M+1,{index:V,showComma:V!==re.length-1,length:me,type:Ae})}).reduce(function(J,V){return J.concat(V)},[]);return[z("[",D,M,{showComma:!1,key:fe,length:k.length,type:"arrayStart"})[0]].concat(ze,z("]",D,M,{showComma:se,length:k.length,type:"arrayEnd"})[0])}if(Pe==="object"){var je=Object.keys(k),De=je.map(function(J,V,re){return z(k[J],J.includes(".")?"".concat(D,'["').concat(J,'"]'):"".concat(D,".").concat(J),M+1,{key:J,showComma:V!==re.length-1,length:me,type:Ae})}).reduce(function(J,V){return J.concat(V)},[]);return[z("{",D,M,{showComma:!1,key:fe,index:ye,length:je.length,type:"objectStart"})[0]].concat(De,z("}",D,M,{showComma:se,length:je.length,type:"objectEnd"})[0])}var Ue=Object.entries({content:k,level:M,key:fe,index:ye,path:D,showComma:se,length:me,type:Ae}).reduce(function(J,V){var re=w(V,2),we=re[0],ke=re[1];return ke!==void 0?L(L({},J),{},S({},we,ke)):J},{});return[Ue]}function Z(k,D){var M=Object.keys(k);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(k);D&&(G=G.filter(function(ce){return Object.getOwnPropertyDescriptor(k,ce).enumerable})),M.push.apply(M,G)}return M}function ie(k){for(var D=1;D<arguments.length;D++){var M=arguments[D]!=null?arguments[D]:{};D%2?Z(Object(M),!0).forEach(function(G){S(k,G,M[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(M)):Z(Object(M)).forEach(function(G){Object.defineProperty(k,G,Object.getOwnPropertyDescriptor(M,G))})}return k}var q={showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},customValueFormatter:Function,selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},selectOnClickNode:{type:Boolean,default:!0},collapsedOnClickBrackets:{type:Boolean,default:!0},pathSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0}},H=(0,_.defineComponent)({name:"TreeNode",props:ie(ie({},q),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,onTreeNodeClick:{type:Function},onBracketsClick:{type:Function},onSelectedChange:{type:Function}}),setup:function(k,D){var M=D.emit,G=(0,_.computed)(function(){return Y(k.node.content)}),ce=(0,_.computed)(function(){return"vjs-value vjs-value__".concat(G.value)}),fe=(0,_.computed)(function(){return k.showDoubleQuotes?'"'.concat(k.node.key,'"'):k.node.key}),ye=(0,_.computed)(function(){return k.selectableType==="multiple"}),Oe=(0,_.computed)(function(){return k.selectableType==="single"}),Ae=(0,_.computed)(function(){return k.pathSelectable(k.node.path,k.node.content)&&(ye.value||Oe.value)}),K=function(pe){var me=pe+"";return G.value==="string"&&(me='"'.concat(me,'"')),me},se=k.customValueFormatter?function(pe){var me;return(me=k.customValueFormatter)===null||me===void 0?void 0:me.call(k,pe,k.node.key,k.node.path,K(pe))}:null;return{state:(0,_.reactive)({valueClass:ce,prettyKey:fe,isMultiple:ye,selectable:Ae}),defaultFormatter:K,customFormatter:se,onBracketsClickHandler:function(){k.collapsedOnClickBrackets&&M("brackets-click",!k.collapsed,k.node.path)},onCheckedChange:function(){M("selected-change",k.node)},onNodeClick:function(){M("tree-node-click",k.node),Ae.value&&k.selectOnClickNode&&M("selected-change",k.node)}}},render:function(){var k=this.state,D=this.node,M=this.showSelectController,G=this.highlightSelectedNode,ce=this.checked,fe=this.showLength,ye=this.collapsed,Oe=this.showLine,Ae=this.defaultFormatter,K=this.customFormatter,se=this.onNodeClick,pe=this.onCheckedChange,me=this.onBracketsClickHandler;return(0,_.createVNode)("div",{class:{"vjs-tree__node":!0,"has-selector":M,"is-highlight":G&&ce},onClick:se},[M&&k.selectable&&D.type!=="objectEnd"&&D.type!=="arrayEnd"&&(0,_.createVNode)(B,{isMultiple:k.isMultiple,checked:ce,onChange:pe},null),Array.from(Array(D.level)).map(function(Pe,ze){return(0,_.createVNode)("div",{key:ze,class:{"vjs-tree__indent":!0,"has-line":Oe}},null)}),D.key&&(0,_.createVNode)("span",{class:"vjs-key"},["".concat(k.prettyKey,": ")]),(0,_.createVNode)("span",null,[D.type!=="content"?(0,_.createVNode)(P,{data:D.content,onClick:me},null):K?(0,_.createVNode)("span",{class:k.valueClass,innerHTML:K(D.content)},null):(0,_.createVNode)("span",{class:k.valueClass},[Ae(D.content)]),D.showComma&&(0,_.createVNode)("span",null,[","]),fe&&ye&&(0,_.createVNode)("span",{class:"vjs-comment"},[(0,_.createTextVNode)(" // "),D.length,(0,_.createTextVNode)(" items ")])])])}});function $(k,D){var M=Object.keys(k);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(k);D&&(G=G.filter(function(ce){return Object.getOwnPropertyDescriptor(k,ce).enumerable})),M.push.apply(M,G)}return M}function Q(k){for(var D=1;D<arguments.length;D++){var M=arguments[D]!=null?arguments[D]:{};D%2?$(Object(M),!0).forEach(function(G){S(k,G,M[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(M)):$(Object(M)).forEach(function(G){Object.defineProperty(k,G,Object.getOwnPropertyDescriptor(M,G))})}return k}var T=(0,_.defineComponent)({name:"Tree",props:Q(Q({},q),{},{data:{type:Object,default:null},deep:{type:Number,default:1/0},deepCollapseChildren:{type:Boolean,default:!1},collapsePath:{type:RegExp,default:null},path:{type:String,default:"root"},virtual:{type:Boolean,default:!1},virtualLines:{type:Number,default:10},itemHeight:{type:Number,default:20},modelValue:{type:[String,Array],default:function(){return""}}}),emits:["click","change","update:modelValue"],setup:function(k,D){var M=D.emit,G=(0,_.ref)(),ce=(0,_.reactive)({translateY:0,visibleData:null,hiddenPaths:z(k.data,k.path).reduce(function(K,se){var pe=k.deepCollapseChildren?se.level>=k.deep:se.level===k.deep,me=pe||k.collapsePath&&k.collapsePath.test(se.path);return se.type!=="objectStart"&&se.type!=="arrayStart"||!pe&&!me?K:Q(Q({},K),{},S({},se.path,1))},{})}),fe=(0,_.computed)(function(){var K=null;return z(k.data,k.path).reduce(function(se,pe,me){var Pe=Q(Q({},pe),{},{id:me}),ze=ce.hiddenPaths[Pe.path];if(K&&K.path===Pe.path){var je=K.type==="objectStart",De=Q(Q(Q({},K),Pe),{},{content:je?"{...}":"[...]",type:je?"objectCollapsed":"arrayCollapsed"});return K=null,se.concat(De)}return ze&&!K?(K=Pe,se):K?se:se.concat(Pe)},[])}),ye=(0,_.computed)(function(){var K=k.modelValue;return K&&k.selectableType==="multiple"&&Array.isArray(K)?K:[K]}),Oe=(0,_.computed)(function(){return!k.selectableType||k.selectOnClickNode||k.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),Ae=function(K){if(k.virtual){var se=G.value,pe=k.virtualLines,me=se&&se.scrollTop||0,Pe=Math.floor(me/k.itemHeight),ze=Pe<0?0:Pe+pe>K.length?K.length-pe:Pe;ze<0&&(ze=0);var je=ze+pe;ce.translateY=ze*k.itemHeight,ce.visibleData=K.filter(function(De,Ue){return Ue>=ze&&Ue<je})}else ce.visibleData=K};return(0,_.watchEffect)(function(){Oe.value&&function(K){throw new Error("[VueJSONPretty] ".concat(K))}(Oe.value)}),(0,_.watchEffect)(function(){fe.value&&Ae(fe.value)}),{tree:G,state:ce,flatData:fe,selectedPaths:ye,onTreeScroll:function(){Ae(fe.value)},onSelectedChange:function(K){var se=K.path,pe=k.selectableType;if(pe==="multiple"){var me=ye.value.findIndex(function(De){return De===se}),Pe=E(ye.value);me!==-1?Pe.splice(me,1):Pe.push(se),M("update:modelValue",Pe),M("change",Pe,E(ye.value))}else if(pe==="single"&&ye.value[0]!==se){var ze=w(ye.value,1)[0],je=se;M("update:modelValue",je),M("change",je,ze)}},onTreeNodeClick:function(K){var se=K.content,pe=K.path;M("click",pe,se)},onBracketsClick:function(K,se){if(K)ce.hiddenPaths=Q(Q({},ce.hiddenPaths),{},S({},se,1));else{var pe=Q({},ce.hiddenPaths);delete pe[se],ce.hiddenPaths=pe}}}},render:function(){var k=this.virtual,D=this.itemHeight,M=this.customValueFormatter,G=this.showDoubleQuotes,ce=this.showLength,fe=this.showLine,ye=this.showSelectController,Oe=this.selectOnClickNode,Ae=this.pathSelectable,K=this.highlightSelectedNode,se=this.collapsedOnClickBrackets,pe=this.state,me=this.flatData,Pe=this.selectedPaths,ze=this.selectableType,je=this.onTreeNodeClick,De=this.onBracketsClick,Ue=this.onSelectedChange,J=this.onTreeScroll,V=pe.visibleData&&pe.visibleData.map(function(re){return(0,_.createVNode)(H,{key:re.id,node:re,collapsed:!!pe.hiddenPaths[re.path],"custom-value-formatter":M,"show-double-quotes":G,"show-length":ce,"collapsed-on-click-brackets":se,checked:Pe.includes(re.path),"selectable-type":ze,"show-line":fe,"show-select-controller":ye,"select-on-click-node":Oe,"path-selectable":Ae,"highlight-selected-node":K,onTreeNodeClick:je,onBracketsClick:De,onSelectedChange:Ue},null)});return(0,_.createVNode)("div",{ref:"tree",class:{"vjs-tree":!0,"is-virtual":k},onScroll:J},[k?(0,_.createVNode)("div",{style:{height:"".concat(me.length*D,"px")}},[(0,_.createVNode)("div",{style:{transform:"translateY(".concat(pe.translateY,"px)")}},[V])]):V])}})}(),s}()})})(lA);var yE=eO(lA.exports);const gE=ku({__name:"DataDialog",props:{graphData:Object},setup(v){const g=v;return(c,p)=>(or(),tf(Rt(yE),{path:"res",deep:3,showLength:!0,data:g.graphData},null,8,["data"]))}}),AE=sf(uE),vE=sf(dE),bE=sf(gE),mE={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function wE(v){const{incoming:g,outgoing:c,properties:p,key:i}=v,{text:f,startPoint:s,endPoint:A,pointsList:m,logicFlowType:w}=p,E={id:i,type:w,sourceNodeId:g[0],targetNodeId:c[0],text:f,startPoint:s,endPoint:A,pointsList:m,properties:{}},S=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(v.properties).forEach(_=>{S.indexOf(_)===-1&&(E.properties[_]=v.properties[_])}),E}function OE(v){const{properties:g,key:c}=v,{x:p,y:i,text:f,logicFlowType:s}=g,A={id:c,type:s,x:p,y:i,text:f,properties:{}},m=["x","y","text","logicFlowType"];return Object.keys(v.properties).forEach(w=>{m.indexOf(w)===-1&&(A.properties[w]=v.properties[w])}),A}function EE(v){const g={nodes:[],edges:[]},c=v.flowElementList;return c&&c.length>0&&c.forEach(p=>{if(p.type===mE.SEQUENCE_FLOW){const i=wE(p);g.edges.push(i)}else{const i=OE(p);g.nodes.push(i)}}),g}const xE=v=>(tO("data-v-2f74f308"),v=v(),nO(),v),_E={class:"card-header"},jE={class:"font-medium"},SE=Rg(" \u6D41\u7A0B\u56FE\u7EC4\u4EF6\uFF0C\u91C7\u7528\u5F00\u6E90\u7684 "),kE=Rg(" LogicFlow "),PE={class:"logic-flow-view"},DE=xE(()=>Er("div",{id:"LF-Turbo"},null,-1)),CE={name:"FlowChart"},NE=ku({...CE,setup(v){let g=no(null),c=no(null),p=no(!1),i=no({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),f=iO;function s(){bu.use(PO),bu.use(kO),bu.use(QO);const w=new bu({...Rt(i),container:document.querySelector("#LF-Turbo")});g.value=w,Rt(g).setDefaultEdgeType("bpmn:sequenceFlow"),A()}function A(){const w=EE(oO);g.value.render(w)}function m(){c.value=Rt(g).getGraphData(),p.value=!0}return Cg(()=>{s()}),(w,E)=>{const S=xi("el-link"),_=xi("el-scrollbar"),P=xi("el-dialog"),B=xi("el-card");return or(),tf(B,null,{header:zo(()=>[Er("div",_E,[Er("span",jE,[SE,Ro(S,{href:"http://logic-flow.org/",target:"_blank",icon:Rt(Jw)("set-up"),style:{"font-size":"16px",margin:"0 4px 5px"}},{default:zo(()=>[kE]),_:1},8,["icon"])])])]),default:zo(()=>[Er("div",PE,[Rt(g)?(or(),tf(Rt(AE),{key:0,class:"demo-control",lf:Rt(g),catTurboData:!1,onCatData:m},null,8,["lf"])):Ig("",!0),Ro(Rt(vE),{lf:Rt(g),nodeList:Rt(f)},null,8,["lf","nodeList"]),DE,Ro(P,{customClass:"flow-dialog",title:"\u6570\u636E",modelValue:Rt(p),"onUpdate:modelValue":E[0]||(E[0]=I=>Bg(p)?p.value=I:p=I),width:"50%"},{default:zo(()=>[Ro(_,null,{default:zo(()=>[Ro(Rt(bE),{graphData:Rt(c)},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});var TE=cf(NE,[["__scopeId","data-v-2f74f308"]]);export{TE as default};
|