vue-pure-admin/dist/static/js/index-3761fe67.js

80 lines
568 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

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

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

import{P as a1,d as Ru,r as jr,o as Bg,u as fn,b as Ai,j as co,h as Pr,F as Fg,k as Hg,e as ar,ai as lg,f as Fo,w as Ho,C as fg,ao as Xg,_ as hf,ab as Gg,E as u1,c as uf,Y as yf,g as pg,p as s1,q as c1}from"./index-3eff57df.js";import{u as l1}from"./hooks-adba4fcf.js";import{V as f1}from"./styles-5922e3fa.js";import{d as p1}from"./set-up-e6942411.js";import"./vue.runtime.esm-bundler-70a89678.js";const d1=[{incoming:[],outgoing:["Flow_33inf2k"],dockers:[],type:2,properties:{a:"efrwe",b:"wewe",name:"开始",x:280,y:200,text:{x:280,y:200,value:"开始"},logicFlowType:"bpmn:startEvent"},key:"Event_1d42u4p"},{incoming:["Flow_379e0o9"],outgoing:[],dockers:[],type:3,properties:{a:"efrwe",b:"wewe",name:"结束",x:920,y:200,text:{x:920,y:200,value:"结束"},logicFlowType:"bpmn:endEvent"},key:"Event_08p8i6q"},{incoming:["Flow_0pfouf0"],outgoing:["Flow_3918lhh"],dockers:[],type:6,properties:{a:"efrwe",b:"wewe",name:"网关",x:580,y:200,text:{x:580,y:200,value:"网关"},logicFlowType:"bpmn:exclusiveGateway"},key:"Gateway_1fngqgj"},{incoming:["Flow_33inf2k"],outgoing:["Flow_0pfouf0"],dockers:[],type:4,properties:{a:"efrwe",b:"wewe",name:"用户",x:420,y:200,text:{x:420,y:200,value:"用户"},logicFlowType:"bpmn:userTask"},key:"Activity_2mgtaia"},{incoming:["Flow_3918lhh"],outgoing:["Flow_379e0o9"],dockers:[],type:5,properties:{a:"efrwe",b:"wewe",name:"服务",x:760,y:200,text:{x:760,y:200,value:"服务"},logicFlowType:"bpmn:serviceTask"},key:"Activity_1sp8qc8"},{incoming:["Event_1d42u4p"],outgoing:["Activity_2mgtaia"],type:1,dockers:[],properties:{name:"边",text:{x:331,y:200,value:"边"},startPoint:{x:298,y:200},endPoint:{x:370,y:200},pointsList:[{x:298,y:200},{x:370,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_33inf2k"},{incoming:["Activity_2mgtaia"],outgoing:["Gateway_1fngqgj"],type:1,dockers:[],properties:{name:"边2",text:{x:507,y:200,value:"边2"},startPoint:{x:470,y:200},endPoint:{x:555,y:200},pointsList:[{x:470,y:200},{x:555,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_0pfouf0"},{incoming:["Gateway_1fngqgj"],outgoing:["Activity_1sp8qc8"],type:1,dockers:[],properties:{name:"边3",text:{x:664,y:200,value:"边3"},startPoint:{x:605,y:200},endPoint:{x:710,y:200},pointsList:[{x:605,y:200},{x:710,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_3918lhh"},{incoming:["Activity_1sp8qc8"],outgoing:["Event_08p8i6q"],type:1,dockers:[],properties:{name:"边4",text:{x:871,y:200,value:"边4"},startPoint:{x:810,y:200},endPoint:{x:902,y:200},pointsList:[{x:810,y:200},{x:902,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_379e0o9"}],h1={flowElementList:d1};var sf={exports:{}};(function(v,y){(function(s,p){v.exports=p()})(window,function(){return function(s){var p={};function i(l){if(p[l])return p[l].exports;var c=p[l]={i:l,l:!1,exports:{}};return s[l].call(c.exports,c,c.exports,i),c.l=!0,c.exports}return i.m=s,i.c=p,i.d=function(l,c,b){i.o(l,c)||Object.defineProperty(l,c,{enumerable:!0,get:b})},i.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},i.t=function(l,c){if(1&c&&(l=i(l)),8&c||4&c&&typeof l=="object"&&l&&l.__esModule)return l;var b=Object.create(null);if(i.r(b),Object.defineProperty(b,"default",{enumerable:!0,value:l}),2&c&&typeof l!="string")for(var _ in l)i.d(b,_,function(E){return l[E]}.bind(null,_));return b},i.n=function(l){var c=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(c,"a",c),c},i.o=function(l,c){return Object.prototype.hasOwnProperty.call(l,c)},i.p="",i(i.s=215)}([function(s,p,i){i.d(p,"a",function(){return Z}),i.d(p,"b",function(){return ie}),i.d(p,"c",function(){return Re}),i.d(p,"d",function(){return $e}),i.d(p,"e",function(){return B}),i.d(p,"f",function(){return ee}),i.d(p,"g",function(){return B}),i.d(p,"h",function(){return ke}),i.d(p,"i",function(){return c}),i.d(p,"j",function(){return We}),i.d(p,"k",function(){return F});var l,c,b,_,E,w,k,j={},P=[],D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function N(q,$){for(var ae in $)q[ae]=$[ae];return q}function L(q){var $=q.parentNode;$&&$.removeChild(q)}function B(q,$,ae){var _e,Te,we,Ke={};for(we in $)we=="key"?_e=$[we]:we=="ref"?Te=$[we]:Ke[we]=$[we];if(arguments.length>2&&(Ke.children=arguments.length>3?l.call(arguments,2):ae),typeof q=="function"&&q.defaultProps!=null)for(we in q.defaultProps)Ke[we]===void 0&&(Ke[we]=q.defaultProps[we]);return X(q,Ke,_e,Te,null)}function X(q,$,ae,_e,Te){var we={type:q,props:$,key:ae,ref:_e,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:Te??++b};return Te==null&&c.vnode!=null&&c.vnode(we),we}function ee(){return{current:null}}function ie(q){return q.children}function Z(q,$){this.props=q,this.context=$}function V(q,$){if($==null)return q.__?V(q.__,q.__.__k.indexOf(q)+1):null;for(var ae;$<q.__k.length;$++)if((ae=q.__k[$])!=null&&ae.__e!=null)return ae.__e;return typeof q.type=="function"?V(q):null}function K(q){var $,ae;if((q=q.__)!=null&&q.__c!=null){for(q.__e=q.__c.base=null,$=0;$<q.__k.length;$++)if((ae=q.__k[$])!=null&&ae.__e!=null){q.__e=q.__c.base=ae.__e;break}return K(q)}}function z(q){(!q.__d&&(q.__d=!0)&&_.push(q)&&!M.__r++||w!==c.debounceRendering)&&((w=c.debounceRendering)||E)(M)}function M(){for(var q;M.__r=_.length;)q=_.sort(function($,ae){return $.__v.__b-ae.__v.__b}),_=[],q.some(function($){var ae,_e,Te,we,Ke,nt;$.__d&&(Ke=(we=(ae=$).__v).__e,(nt=ae.__P)&&(_e=[],(Te=N({},we)).__v=we.__v+1,ge(nt,we,Te,ae.__n,nt.ownerSVGElement!==void 0,we.__h!=null?[Ke]:null,_e,Ke??V(we),we.__h),ue(_e,we),we.__e!=Ke&&K(we)))})}function I(q,$,ae,_e,Te,we,Ke,nt,Ze,Ue){var ve,Fe,te,Le,ut,vt,it,ht=_e&&_e.__k||P,St=ht.length;for(ae.__k=[],ve=0;ve<$.length;ve++)if((Le=ae.__k[ve]=(Le=$[ve])==null||typeof Le=="boolean"?null:typeof Le=="string"||typeof Le=="number"||typeof Le=="bigint"?X(null,Le,null,null,Le):Array.isArray(Le)?X(ie,{children:Le},null,null,null):Le.__b>0?X(Le.type,Le.props,Le.key,null,Le.__v):Le)!=null){if(Le.__=ae,Le.__b=ae.__b+1,(te=ht[ve])===null||te&&Le.key==te.key&&Le.type===te.type)ht[ve]=void 0;else for(Fe=0;Fe<St;Fe++){if((te=ht[Fe])&&Le.key==te.key&&Le.type===te.type){ht[Fe]=void 0;break}te=null}ge(q,Le,te=te||j,Te,we,Ke,nt,Ze,Ue),ut=Le.__e,(Fe=Le.ref)&&te.ref!=Fe&&(it||(it=[]),te.ref&&it.push(te.ref,null,Le),it.push(Fe,Le.__c||ut,Le)),ut!=null?(vt==null&&(vt=ut),typeof Le.type=="function"&&Le.__k===te.__k?Le.__d=Ze=R(Le,Ze,q):Ze=J(q,Le,te,ht,ut,Ze),typeof ae.type=="function"&&(ae.__d=Ze)):Ze&&te.__e==Ze&&Ze.parentNode!=q&&(Ze=V(te))}for(ae.__e=vt,ve=St;ve--;)ht[ve]!=null&&(typeof ae.type=="function"&&ht[ve].__e!=null&&ht[ve].__e==ae.__d&&(ae.__d=V(_e,ve+1)),Se(ht[ve],ht[ve]));if(it)for(ve=0;ve<it.length;ve++)be(it[ve],it[++ve],it[++ve])}function R(q,$,ae){for(var _e,Te=q.__k,we=0;Te&&we<Te.length;we++)(_e=Te[we])&&(_e.__=q,$=typeof _e.type=="function"?R(_e,$,ae):J(ae,_e,_e,Te,_e.__e,$));return $}function F(q,$){return $=$||[],q==null||typeof q=="boolean"||(Array.isArray(q)?q.some(function(ae){F(ae,$)}):$.push(q)),$}function J(q,$,ae,_e,Te,we){var Ke,nt,Ze;if($.__d!==void 0)Ke=$.__d,$.__d=void 0;else if(ae==null||Te!=we||Te.parentNode==null)e:if(we==null||we.parentNode!==q)q.appendChild(Te),Ke=null;else{for(nt=we,Ze=0;(nt=nt.nextSibling)&&Ze<_e.length;Ze+=2)if(nt==Te)break e;q.insertBefore(Te,we),Ke=we}return Ke!==void 0?Ke:Te.nextSibling}function le(q,$,ae){$[0]==="-"?q.setProperty($,ae):q[$]=ae==null?"":typeof ae!="number"||D.test($)?ae:ae+"px"}function ce(q,$,ae,_e,Te){var we;e:if($==="style")if(typeof ae=="string")q.style.cssText=ae;else{if(typeof _e=="string"&&(q.style.cssText=_e=""),_e)for($ in _e)ae&&$ in ae||le(q.style,$,"");if(ae)for($ in ae)_e&&ae[$]===_e[$]||le(q.style,$,ae[$])}else if($[0]==="o"&&$[1]==="n")we=$!==($=$.replace(/Capture$/,"")),$=$.toLowerCase()in q?$.toLowerCase().slice(2):$.slice(2),q.l||(q.l={}),q.l[$+we]=ae,ae?_e||q.addEventListener($,we?xe:ye,we):q.removeEventListener($,we?xe:ye,we);else if($!=="dangerouslySetInnerHTML"){if(Te)$=$.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if($!=="href"&&$!=="list"&&$!=="form"&&$!=="tabIndex"&&$!=="download"&&$ in q)try{q[$]=ae??"";break e}catch{}typeof ae=="function"||(ae!=null&&(ae!==!1||$[0]==="a"&&$[1]==="r")?q.setAttribute($,ae):q.removeAttribute($))}}function ye(q){this.l[q.type+!1](c.event?c.event(q):q)}function xe(q){this.l[q.type+!0](c.event?c.event(q):q)}function ge(q,$,ae,_e,Te,we,Ke,nt,Ze){var Ue,ve,Fe,te,Le,ut,vt,it,ht,St,Pt,at=$.type;if($.constructor!==void 0)return null;ae.__h!=null&&(Ze=ae.__h,nt=$.__e=ae.__e,$.__h=null,we=[nt]),(Ue=c.__b)&&Ue($);try{e:if(typeof at=="function"){if(it=$.props,ht=(Ue=at.contextType)&&_e[Ue.__c],St=Ue?ht?ht.props.value:Ue.__:_e,ae.__c?vt=(ve=$.__c=ae.__c).__=ve.__E:("prototype"in at&&at.prototype.render?$.__c=ve=new at(it,St):($.__c=ve=new Z(it,St),ve.constructor=at,ve.render=Ie),ht&&ht.sub(ve),ve.props=it,ve.state||(ve.state={}),ve.context=St,ve.__n=_e,Fe=ve.__d=!0,ve.__h=[]),ve.__s==null&&(ve.__s=ve.state),at.getDerivedStateFromProps!=null&&(ve.__s==ve.state&&(ve.__s=N({},ve.__s)),N(ve.__s,at.getDerivedStateFromProps(it,ve.__s))),te=ve.props,Le=ve.state,Fe)at.getDerivedStateFromProps==null&&ve.componentWillMount!=null&&ve.componentWillMount(),ve.componentDidMount!=null&&ve.__h.push(ve.componentDidMount);else{if(at.getDerivedStateFromProps==null&&it!==te&&ve.componentWillReceiveProps!=null&&ve.componentWillReceiveProps(it,St),!ve.__e&&ve.shouldComponentUpdate!=null&&ve.shouldComponentUpdate(it,ve.__s,St)===!1||$.__v===ae.__v){ve.props=it,ve.state=ve.__s,$.__v!==ae.__v&&(ve.__d=!1),ve.__v=$,$.__e=ae.__e,$.__k=ae.__k,$.__k.forEach(function(Nt){Nt&&(Nt.__=$)}),ve.__h.length&&Ke.push(ve);break e}ve.componentWillUpdate!=null&&ve.componentWillUpdate(it,ve.__s,St),ve.componentDidUpdate!=null&&ve.__h.push(function(){ve.componentDidUpdate(te,Le,ut)})}ve.context=St,ve.props=it,ve.state=ve.__s,(Ue=c.__r)&&Ue($),ve.__d=!1,ve.__v=$,ve.__P=q,Ue=ve.render(ve.props,ve.state,ve.context),ve.state=ve.__s,ve.getChildContext!=null&&(_e=N(N({},_e),ve.getChildContext())),Fe||ve.getSnapshotBeforeUpdate==null||(ut=ve.getSnapshotBeforeUpdate(te,Le)),Pt=Ue!=null&&Ue.type===ie&&Ue.key==null?Ue.props.children:Ue,I(q,Array.isArray(Pt)?Pt:[Pt],$,ae,_e,Te,we,Ke,nt,Ze),ve.base=$.__e,$.__h=null,ve.__h.length&&Ke.push(ve),vt&&(ve.__E=ve.__=null),ve.__e=!1}else we==null&&$.__v===ae.__v?($.__k=ae.__k,$.__e=ae.__e):$.__e=he(ae.__e,$,ae,_e,Te,we,Ke,Ze);(Ue=c.diffed)&&Ue($)}catch(Nt){$.__v=null,(Ze||we!=null)&&($.__e=nt,$.__h=!!Ze,we[we.indexOf(nt)]=null),c.__e(Nt,$,ae)}}function ue(q,$){c.__c&&c.__c($,q),q.some(function(ae){try{q=ae.__h,ae.__h=[],q.some(function(_e){_e.call(ae)})}catch(_e){c.__e(_e,ae.__v)}})}function he(q,$,ae,_e,Te,we,Ke,nt){var Ze,Ue,ve,Fe=ae.props,te=$.props,Le=$.type,ut=0;if(Le==="svg"&&(Te=!0),we!=null){for(;ut<we.length;ut++)if((Ze=we[ut])&&"setAttribute"in Ze==!!Le&&(Le?Ze.localName===Le:Ze.nodeType===3)){q=Ze,we[ut]=null;break}}if(q==null){if(Le===null)return document.createTextNode(te);q=Te?document.createElementNS("http://www.w3.org/2000/svg",Le):document.createElement(Le,te.is&&te),we=null,nt=!1}if(Le===null)Fe===te||nt&&q.data===te||(q.data=te);else{if(we=we&&l.call(q.childNodes),Ue=(Fe=ae.props||j).dangerouslySetInnerHTML,ve=te.dangerouslySetInnerHTML,!nt){if(we!=null)for(Fe={},ut=0;ut<q.attributes.length;ut++)Fe[q.attributes[ut].name]=q.attributes[ut].value;(ve||Ue)&&(ve&&(Ue&&ve.__html==Ue.__html||ve.__html===q.innerHTML)||(q.innerHTML=ve&&ve.__html||""))}if(function(vt,it,ht,St,Pt){var at;for(at in ht)at==="children"||at==="key"||at in it||ce(vt,at,null,ht[at],St);for(at in it)Pt&&typeof it[at]!="function"||at==="children"||at==="key"||at==="value"||at==="checked"||ht[at]===it[at]||ce(vt,at,it[at],ht[at],St)}(q,te,Fe,Te,nt),ve)$.__k=[];else if(ut=$.props.children,I(q,Array.isArray(ut)?ut:[ut],$,ae,_e,Te&&Le!=="foreignObject",we,Ke,we?we[0]:ae.__k&&V(ae,0),nt),we!=null)for(ut=we.length;ut--;)we[ut]!=null&&L(we[ut]);nt||("value"in te&&(ut=te.value)!==void 0&&(ut!==Fe.value||ut!==q.value||Le==="progress"&&!ut)&&ce(q,"value",ut,Fe.value,!1),"checked"in te&&(ut=te.checked)!==void 0&&ut!==q.checked&&ce(q,"checked",ut,Fe.checked,!1))}return q}function be(q,$,ae){try{typeof q=="function"?q($):q.current=$}catch(_e){c.__e(_e,ae)}}function Se(q,$,ae){var _e,Te;if(c.unmount&&c.unmount(q),(_e=q.ref)&&(_e.current&&_e.current!==q.__e||be(_e,null,$)),(_e=q.__c)!=null){if(_e.componentWillUnmount)try{_e.componentWillUnmount()}catch(we){c.__e(we,$)}_e.base=_e.__P=null}if(_e=q.__k)for(Te=0;Te<_e.length;Te++)_e[Te]&&Se(_e[Te],$,typeof q.type!="function");ae||q.__e==null||L(q.__e),q.__e=q.__d=void 0}function Ie(q,$,ae){return this.constructor(q,ae)}function We(q,$,ae){var _e,Te,we;c.__&&c.__(q,$),Te=(_e=typeof ae=="function")?null:ae&&ae.__k||$.__k,we=[],ge($,q=(!_e&&ae||$).__k=B(ie,null,[q]),Te||j,j,$.ownerSVGElement!==void 0,!_e&&ae?[ae]:Te?null:$.firstChild?l.call($.childNodes):null,we,!_e&&ae?ae:Te?Te.__e:$.firstChild,_e),ue(we,q)}function ke(q,$){We(q,$,ke)}function Re(q,$,ae){var _e,Te,we,Ke=N({},q.props);for(we in $)we=="key"?_e=$[we]:we=="ref"?Te=$[we]:Ke[we]=$[we];return arguments.length>2&&(Ke.children=arguments.length>3?l.call(arguments,2):ae),X(q.type,Ke,_e||q.key,Te||q.ref,null)}function $e(q,$){var ae={__c:$="__cC"+k++,__:q,Consumer:function(_e,Te){return _e.children(Te)},Provider:function(_e){var Te,we;return this.getChildContext||(Te=[],(we={})[$]=this,this.getChildContext=function(){return we},this.shouldComponentUpdate=function(Ke){this.props.value!==Ke.value&&Te.some(z)},this.sub=function(Ke){Te.push(Ke);var nt=Ke.componentWillUnmount;Ke.componentWillUnmount=function(){Te.splice(Te.indexOf(Ke),1),nt&&nt.call(Ke)}}),_e.children}};return ae.Provider.__=ae.Consumer.contextType=ae}l=P.slice,c={__e:function(q,$){for(var ae,_e,Te;$=$.__;)if((ae=$.__c)&&!ae.__)try{if((_e=ae.constructor)&&_e.getDerivedStateFromError!=null&&(ae.setState(_e.getDerivedStateFromError(q)),Te=ae.__d),ae.componentDidCatch!=null&&(ae.componentDidCatch(q),Te=ae.__d),Te)return ae.__E=ae}catch(we){q=we}throw q}},b=0,Z.prototype.setState=function(q,$){var ae;ae=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=N({},this.state),typeof q=="function"&&(q=q(N({},ae),this.props)),q&&N(ae,q),q!=null&&this.__v&&($&&this.__h.push($),z(this))},Z.prototype.forceUpdate=function(q){this.__v&&(this.__e=!0,q&&this.__h.push(q),z(this))},Z.prototype.render=ie,_=[],E=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,M.__r=0,k=0},function(s,p,i){(function(l,c){i.d(p,"a",function(){return z}),i.d(p,"b",function(){return Jo}),i.d(p,"c",function(){return Ln}),i.d(p,"d",function(){return et}),i.d(p,"e",function(){return De}),i.d(p,"f",function(){return Me}),i.d(p,"g",function(){return Ye}),i.d(p,"h",function(){return Nr}),i.d(p,"i",function(){return Pt}),i.d(p,"j",function(){return ze}),i.d(p,"k",function(){return Vn}),i.d(p,"l",function(){return Ko}),i.d(p,"m",function(){return vt}),i.d(p,"n",function(){return Mr}),i.d(p,"o",function(){return R}),i.d(p,"p",function(){return Zi}),i.d(p,"q",function(){return Wn}),i.d(p,"r",function(){return $i}),i.d(p,"s",function(){return On}),i.d(p,"t",function(){return $r}),i.d(p,"u",function(){return fo}),i.d(p,"v",function(){return Vu}),i.d(p,"w",function(){return qi}),i.d(p,"x",function(){return qr}),i.d(p,"y",function(){return Dn}),i.d(p,"z",function(){return It}),i.d(p,"A",function(){return hn}),i.d(p,"B",function(){return $n}),i.d(p,"C",function(){return Ue}),i.d(p,"D",function(){return Qi}),i.d(p,"E",function(){return Ar}),i.d(p,"F",function(){return Tr}),i.d(p,"G",function(){return Gu}),i.d(p,"H",function(){return Fi}),i.d(p,"I",function(){return $u}),i.d(p,"J",function(){return mn}),i.d(p,"K",function(){return oe}),i.d(p,"L",function(){return Zt}),i.d(p,"M",function(){return ea});var b=[];Object.freeze(b);var _={};function E(){return++He.mobxGuid}function w(h){throw k(!1,h),"X"}function k(h,g){if(!h)throw new Error("[mobx] "+(g||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(_);function j(h){var g=!1;return function(){if(!g)return g=!0,h.apply(this,arguments)}}var P=function(){};function D(h){return h!==null&&typeof h=="object"}function N(h){if(h===null||typeof h!="object")return!1;var g=Object.getPrototypeOf(h);return g===Object.prototype||g===null}function L(h,g,x){Object.defineProperty(h,g,{enumerable:!1,writable:!0,configurable:!0,value:x})}function B(h,g){var x="isMobX"+h;return g.prototype[x]=!0,function(A){return D(A)&&A[x]===!0}}function X(h){return h instanceof Map}function ee(h){return h instanceof Set}function ie(h){var g=new Set;for(var x in h)g.add(x);return Object.getOwnPropertySymbols(h).forEach(function(A){Object.getOwnPropertyDescriptor(h,A).enumerable&&g.add(A)}),Array.from(g)}function Z(h){return h&&h.toString?h.toString():new String(h).toString()}function V(h){return h===null?null:typeof h=="object"?""+h:h}var K=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:Object.getOwnPropertyNames,z=Symbol("mobx administration"),M=function(){function h(g){g===void 0&&(g="Atom@"+E()),this.name=g,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Fe.NOT_TRACKING}return h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(g){return g()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(g){return g()})},h.prototype.reportObserved=function(){return zi(this)},h.prototype.reportChanged=function(){vn(),function(g){g.lowestObserverState!==Fe.STALE&&(g.lowestObserverState=Fe.STALE,g.observers.forEach(function(x){x.dependenciesState===Fe.UP_TO_DATE&&(x.isTracing!==te.NONE&&Yn(x,g),x.onBecomeStale()),x.dependenciesState=Fe.STALE}))}(this),bn()},h.prototype.toString=function(){return this.name},h}(),I=B("Atom",M);function R(h,g,x){g===void 0&&(g=P),x===void 0&&(x=P);var A,H=new M(h);return g!==P&&Gi("onBecomeObserved",H,g,A),x!==P&&Ar(H,x),H}var F={identity:function(h,g){return h===g},structural:function(h,g){return ei(h,g)},default:function(h,g){return Object.is(h,g)},shallow:function(h,g){return ei(h,g,1)}},J=function(h,g){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,A){x.__proto__=A}||function(x,A){for(var H in A)A.hasOwnProperty(H)&&(x[H]=A[H])},J(h,g)};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var le=function(){return le=Object.assign||function(h){for(var g,x=1,A=arguments.length;x<A;x++)for(var H in g=arguments[x])Object.prototype.hasOwnProperty.call(g,H)&&(h[H]=g[H]);return h},le.apply(this,arguments)};function ce(h){var g=typeof Symbol=="function"&&h[Symbol.iterator],x=0;return g?g.call(h):{next:function(){return h&&x>=h.length&&(h=void 0),{value:h&&h[x++],done:!h}}}}function ye(h,g){var x=typeof Symbol=="function"&&h[Symbol.iterator];if(!x)return h;var A,H,Q=x.call(h),pe=[];try{for(;(g===void 0||g-- >0)&&!(A=Q.next()).done;)pe.push(A.value)}catch(je){H={error:je}}finally{try{A&&!A.done&&(x=Q.return)&&x.call(Q)}finally{if(H)throw H.error}}return pe}function xe(){for(var h=[],g=0;g<arguments.length;g++)h=h.concat(ye(arguments[g]));return h}var ge=Symbol("mobx did run lazy initializers"),ue=Symbol("mobx pending decorators"),he={},be={};function Se(h,g){var x=g?he:be;return x[h]||(x[h]={configurable:!0,enumerable:g,get:function(){return Ie(this),this[h]},set:function(A){Ie(this),this[h]=A}})}function Ie(h){var g,x;if(h[ge]!==!0){var A=h[ue];if(A){L(h,ge,!0);var H=xe(Object.getOwnPropertySymbols(A),Object.keys(A));try{for(var Q=ce(H),pe=Q.next();!pe.done;pe=Q.next()){var je=A[pe.value];je.propertyCreator(h,je.prop,je.descriptor,je.decoratorTarget,je.decoratorArguments)}}catch(Be){g={error:Be}}finally{try{pe&&!pe.done&&(x=Q.return)&&x.call(Q)}finally{if(g)throw g.error}}}}}function We(h,g){return function(){var x,A=function(H,Q,pe,je){if(je===!0)return g(H,Q,pe,H,x),null;if(!Object.prototype.hasOwnProperty.call(H,ue)){var Be=H[ue];L(H,ue,le({},Be))}return H[ue][Q]={prop:Q,propertyCreator:g,descriptor:pe,decoratorTarget:H,decoratorArguments:x},Se(Q,h)};return ke(arguments)?(x=b,A.apply(null,arguments)):(x=Array.prototype.slice.call(arguments),A)}}function ke(h){return(h.length===2||h.length===3)&&(typeof h[1]=="string"||typeof h[1]=="symbol")||h.length===4&&h[3]===!0}function Re(h,g,x){return qr(h)?h:Array.isArray(h)?Ue.array(h,{name:x}):N(h)?Ue.object(h,void 0,{name:x}):X(h)?Ue.map(h,{name:x}):ee(h)?Ue.set(h,{name:x}):h}function $e(h){return h}function q(h){k(h);var g=We(!0,function(A,H,Q,pe,je){var Be=Q?Q.initializer?Q.initializer.call(A):Q.value:void 0;Jr(A).addObservableProp(H,Be,h)}),x=(l!==void 0&&l.env,g);return x.enhancer=h,x}var $={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function ae(h){return h==null?$:typeof h=="string"?{name:h,deep:!0,proxy:!0}:h}Object.freeze($);var _e=q(Re),Te=q(function(h,g,x){return h==null||hn(h)||Dn(h)||It(h)||dn(h)?h:Array.isArray(h)?Ue.array(h,{name:x,deep:!1}):N(h)?Ue.object(h,void 0,{name:x,deep:!1}):X(h)?Ue.map(h,{name:x,deep:!1}):ee(h)?Ue.set(h,{name:x,deep:!1}):w(!1)}),we=q($e),Ke=q(function(h,g,x){return ei(h,g)?g:h});function nt(h){return h.defaultDecorator?h.defaultDecorator.enhancer:h.deep===!1?$e:Re}var Ze={box:function(h,g){arguments.length>2&&ve("box");var x=ae(g);return new Mt(h,nt(x),x.name,!0,x.equals)},array:function(h,g){arguments.length>2&&ve("array");var x=ae(g);return Zo(h,nt(x),x.name)},map:function(h,g){arguments.length>2&&ve("map");var x=ae(g);return new Jo(h,nt(x),x.name)},set:function(h,g){arguments.length>2&&ve("set");var x=ae(g);return new yo(h,nt(x),x.name)},object:function(h,g,x){typeof arguments[1]=="string"&&ve("object");var A=ae(x);if(A.proxy===!1)return Wn({},h,g,A);var H=Ui(A),Q=Wn({},void 0,void 0,A),pe=qu(Q);return Yi(pe,h,g,H),pe},ref:we,shallow:Te,deep:_e,struct:Ke},Ue=function(h,g,x){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return _e.apply(null,arguments);if(qr(h))return h;var A=N(h)?Ue.object(h,g,x):Array.isArray(h)?Ue.array(h,g):X(h)?Ue.map(h,g):ee(h)?Ue.set(h,g):h;if(A!==h)return A;w(!1)};function ve(h){w("Expected one or two arguments to observable."+h+". Did you accidentally try to use observable."+h+" as decorator?")}Object.keys(Ze).forEach(function(h){return Ue[h]=Ze[h]});var Fe,te,Le=We(!1,function(h,g,x,A,H){var Q=x.get,pe=x.set,je=H[0]||{};Jr(h).addComputedProp(h,g,le({get:Q,set:pe,context:h},je))}),ut=Le({equals:F.structural}),vt=function(h,g,x){if(typeof g=="string"||h!==null&&typeof h=="object"&&arguments.length===1)return Le.apply(null,arguments);var A=typeof g=="object"?g:{};return A.get=h,A.set=typeof g=="function"?g:A.set,A.name=A.name||h.name||"",new Gn(A)};vt.struct=ut,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"}(Fe||(Fe={})),function(h){h[h.NONE=0]="NONE",h[h.LOG=1]="LOG",h[h.BREAK=2]="BREAK"}(te||(te={}));var it=function(h){this.cause=h};function ht(h){return h instanceof it}function St(h){switch(h.dependenciesState){case Fe.UP_TO_DATE:return!1;case Fe.NOT_TRACKING:case Fe.STALE:return!0;case Fe.POSSIBLY_STALE:for(var g=Me(!0),x=Y(),A=h.observing,H=A.length,Q=0;Q<H;Q++){var pe=A[Q];if(Un(pe)){if(He.disableErrorBoundaries)pe.get();else try{pe.get()}catch{return se(x),De(g),!0}if(h.dependenciesState===Fe.STALE)return se(x),De(g),!0}}return Xe(h),se(x),De(g),!1}}function Pt(){return He.trackingDerivation!==null}function at(h){var g=h.observers.size>0;He.computationDepth>0&&g&&w(!1),He.allowStateChanges||!g&&He.enforceActions!=="strict"||w(!1)}function Nt(h,g,x){var A=Me(!0);Xe(h),h.newObserving=new Array(h.observing.length+100),h.unboundDepsCount=0,h.runId=++He.runId;var H,Q=He.trackingDerivation;if(He.trackingDerivation=h,He.disableErrorBoundaries===!0)H=g.call(x);else try{H=g.call(x)}catch(pe){H=new it(pe)}return He.trackingDerivation=Q,function(pe){for(var je=pe.observing,Be=pe.observing=pe.newObserving,pt=Fe.UP_TO_DATE,ot=0,xt=pe.unboundDepsCount,ct=0;ct<xt;ct++)(_t=Be[ct]).diffValue===0&&(_t.diffValue=1,ot!==ct&&(Be[ot]=_t),ot++),_t.dependenciesState>pt&&(pt=_t.dependenciesState);for(Be.length=ot,pe.newObserving=null,xt=je.length;xt--;)(_t=je[xt]).diffValue===0&&Ii(_t,pe),_t.diffValue=0;for(;ot--;){var _t;(_t=Be[ot]).diffValue===1&&(_t.diffValue=0,Bu(_t,pe))}pt!==Fe.UP_TO_DATE&&(pe.dependenciesState=pt,pe.onBecomeStale())}(h),De(A),H}function G(h){var g=h.observing;h.observing=[];for(var x=g.length;x--;)Ii(g[x],h);h.dependenciesState=Fe.NOT_TRACKING}function oe(h){var g=Y();try{return h()}finally{se(g)}}function Y(){var h=He.trackingDerivation;return He.trackingDerivation=null,h}function se(h){He.trackingDerivation=h}function Me(h){var g=He.allowStateReads;return He.allowStateReads=h,g}function De(h){He.allowStateReads=h}function Xe(h){if(h.dependenciesState!==Fe.UP_TO_DATE){h.dependenciesState=Fe.UP_TO_DATE;for(var g=h.observing,x=g.length;x--;)g[x].lowestObserverState=Fe.UP_TO_DATE}}var lt=0,Ht=1,$t=Object.getOwnPropertyDescriptor(function(){},"name");$t&&$t.configurable;function Ct(h,g,x){var A=function(){return Rt(h,g,x||this,arguments)};return A.isMobxAction=!0,A}function Rt(h,g,x,A){var H=ze();try{return g.apply(x,A)}catch(Q){throw H.error=Q,Q}finally{Ye(H)}}function ze(h,g,x){var A=0,H=Y();vn();var Q={prevDerivation:H,prevAllowStateChanges:rt(!0),prevAllowStateReads:Me(!0),notifySpy:!1,startTime:A,actionId:Ht++,parentActionId:lt};return lt=Q.actionId,Q}function Ye(h){lt!==h.actionId&&w("invalid action stack. did you forget to finish an action?"),lt=h.parentActionId,h.error!==void 0&&(He.suppressReactionErrors=!0),wt(h.prevAllowStateChanges),De(h.prevAllowStateReads),bn(),se(h.prevDerivation),h.notifySpy,He.suppressReactionErrors=!1}function et(h,g){var x,A=rt(h);try{x=g()}finally{wt(A)}return x}function rt(h){var g=He.allowStateChanges;return He.allowStateChanges=h,g}function wt(h){He.allowStateChanges=h}var Mt=function(h){function g(x,A,H,Q,pe){H===void 0&&(H="ObservableValue@"+E()),pe===void 0&&(pe=F.default);var je=h.call(this,H)||this;return je.enhancer=A,je.name=H,je.equals=pe,je.hasUnreportedChange=!1,je.value=A(x,void 0,H),je}return function(x,A){function H(){this.constructor=x}J(x,A),x.prototype=A===null?Object.create(A):(H.prototype=A.prototype,new H)}(g,h),g.prototype.dehanceValue=function(x){return this.dehancer!==void 0?this.dehancer(x):x},g.prototype.set=function(x){this.value,(x=this.prepareNewValue(x))!==He.UNCHANGED&&this.setNewValue(x)},g.prototype.prepareNewValue=function(x){if(at(this),rn(this)){var A=gt(this,{object:this,type:"update",newValue:x});if(!A)return He.UNCHANGED;x=A.newValue}return x=this.enhancer(x,this.value,this.name),this.equals(this.value,x)?He.UNCHANGED:x},g.prototype.setNewValue=function(x){var A=this.value;this.value=x,this.reportChanged(),_n(this)&&Kt(this,{type:"update",object:this,newValue:x,oldValue:A})},g.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},g.prototype.intercept=function(x){return pr(this,x)},g.prototype.observe=function(x,A){return A&&x({object:this,type:"update",newValue:this.value,oldValue:void 0}),dr(this,x)},g.prototype.toJSON=function(){return this.get()},g.prototype.toString=function(){return this.name+"["+this.value+"]"},g.prototype.valueOf=function(){return V(this.get())},g.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},g}(M),cr=B("ObservableValue",Mt),Gn=function(){function h(g){this.dependenciesState=Fe.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=Fe.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+E(),this.value=new it(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=te.NONE,k(g.get,"missing option for computed: get"),this.derivation=g.get,this.name=g.name||"ComputedValue@"+E(),g.set&&(this.setter=Ct(this.name+"-setter",g.set)),this.equals=g.equals||(g.compareStructural||g.struct?F.structural:F.default),this.scope=g.context,this.requiresReaction=!!g.requiresReaction,this.keepAlive=!!g.keepAlive}return h.prototype.onBecomeStale=function(){(function(g){g.lowestObserverState===Fe.UP_TO_DATE&&(g.lowestObserverState=Fe.POSSIBLY_STALE,g.observers.forEach(function(x){x.dependenciesState===Fe.UP_TO_DATE&&(x.dependenciesState=Fe.POSSIBLY_STALE,x.isTracing!==te.NONE&&Yn(x,g),x.onBecomeStale())}))})(this)},h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(g){return g()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(g){return g()})},h.prototype.get=function(){this.isComputing&&w("Cycle detected in computation "+this.name+": "+this.derivation),He.inBatch!==0||this.observers.size!==0||this.keepAlive?(zi(this),St(this)&&this.trackAndCompute()&&function(x){x.lowestObserverState!==Fe.STALE&&(x.lowestObserverState=Fe.STALE,x.observers.forEach(function(A){A.dependenciesState===Fe.POSSIBLY_STALE?A.dependenciesState=Fe.STALE:A.dependenciesState===Fe.UP_TO_DATE&&(x.lowestObserverState=Fe.UP_TO_DATE)}))}(this)):St(this)&&(this.warnAboutUntrackedRead(),vn(),this.value=this.computeValue(!1),bn());var g=this.value;if(ht(g))throw g.cause;return g},h.prototype.peek=function(){var g=this.computeValue(!1);if(ht(g))throw g.cause;return g},h.prototype.set=function(g){if(this.setter){k(!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,g)}finally{this.isRunningSetter=!1}}else k(!1,!1)},h.prototype.trackAndCompute=function(){var g=this.value,x=this.dependenciesState===Fe.NOT_TRACKING,A=this.computeValue(!0),H=x||ht(g)||ht(A)||!this.equals(g,A);return H&&(this.value=A),H},h.prototype.computeValue=function(g){var x;if(this.isComputing=!0,He.computationDepth++,g)x=Nt(this,this.derivation,this.scope);else if(He.disableErrorBoundaries===!0)x=this.derivation.call(this.scope);else try{x=this.derivation.call(this.scope)}catch(A){x=new it(A)}return He.computationDepth--,this.isComputing=!1,x},h.prototype.suspend=function(){this.keepAlive||(G(this),this.value=void 0)},h.prototype.observe=function(g,x){var A=this,H=!0,Q=void 0;return Ko(function(){var pe=A.get();if(!H||x){var je=Y();g({type:"update",object:A,newValue:pe,oldValue:Q}),se(je)}H=!1,Q=pe})},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 V(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(),Un=B("ComputedValue",Gn),Wr=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},zu={};function Vo(){return typeof window<"u"?window:c!==void 0?c:typeof self<"u"?self:zu}var kn=!0,Ri=!1,He=function(){var h=Vo();return h.__mobxInstanceCount>0&&!h.__mobxGlobals&&(kn=!1),h.__mobxGlobals&&h.__mobxGlobals.version!==new Wr().version&&(kn=!1),kn?h.__mobxGlobals?(h.__mobxInstanceCount+=1,h.__mobxGlobals.UNCHANGED||(h.__mobxGlobals.UNCHANGED={}),h.__mobxGlobals):(h.__mobxInstanceCount=1,h.__mobxGlobals=new Wr):(setTimeout(function(){Ri||w("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Wr)}();function Bu(h,g){h.observers.add(g),h.lowestObserverState>g.dependenciesState&&(h.lowestObserverState=g.dependenciesState)}function Ii(h,g){h.observers.delete(g),h.observers.size===0&&Li(h)}function Li(h){h.isPendingUnobservation===!1&&(h.isPendingUnobservation=!0,He.pendingUnobservations.push(h))}function vn(){He.inBatch++}function bn(){if(--He.inBatch==0){Bi();for(var h=He.pendingUnobservations,g=0;g<h.length;g++){var x=h[g];x.isPendingUnobservation=!1,x.observers.size===0&&(x.isBeingObserved&&(x.isBeingObserved=!1,x.onBecomeUnobserved()),x instanceof Gn&&x.suspend())}He.pendingUnobservations=[]}}function zi(h){var g=He.trackingDerivation;return g!==null?(g.runId!==h.lastAccessedBy&&(h.lastAccessedBy=g.runId,g.newObserving[g.unboundDepsCount++]=h,h.isBeingObserved||(h.isBeingObserved=!0,h.onBecomeObserved())),!0):(h.observers.size===0&&He.inBatch>0&&Li(h),!1)}function Yn(h,g){if(h.isTracing===te.BREAK){var x=[];kr($r(h),x,1),new Function(`debugger;
/*
Tracing '`+h.name+`'
You are entering this break point because derivation '`+h.name+"' is being traced and '"+g.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 kr(h,g,x){g.length>=1e3?g.push("(and many more)"):(g.push(""+new Array(x).join(" ")+h.name),h.dependencies&&h.dependencies.forEach(function(A){return kr(A,g,x+1)}))}var Ln=function(){function h(g,x,A,H){g===void 0&&(g="Reaction@"+E()),H===void 0&&(H=!1),this.name=g,this.onInvalidate=x,this.errorHandler=A,this.requiresObservable=H,this.observing=[],this.newObserving=[],this.dependenciesState=Fe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+E(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=te.NONE}return h.prototype.onBecomeStale=function(){this.schedule()},h.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,He.pendingReactions.push(this),Bi())},h.prototype.isScheduled=function(){return this._isScheduled},h.prototype.runReaction=function(){if(!this.isDisposed){if(vn(),this._isScheduled=!1,St(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(g){this.reportExceptionInDerivation(g)}}bn()}},h.prototype.track=function(g){if(!this.isDisposed){vn(),this._isRunning=!0;var x=Nt(this,g,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&G(this),ht(x)&&this.reportExceptionInDerivation(x.cause),bn()}},h.prototype.reportExceptionInDerivation=function(g){var x=this;if(this.errorHandler)this.errorHandler(g,this);else{if(He.disableErrorBoundaries)throw g;He.suppressReactionErrors,He.globalReactionErrorHandlers.forEach(function(A){return A(g,x)})}},h.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(vn(),G(this),bn()))},h.prototype.getDisposer=function(){var g=this.dispose.bind(this);return g[z]=this,g},h.prototype.toString=function(){return"Reaction["+this.name+"]"},h.prototype.trace=function(g){g===void 0&&(g=!1),function(){for(var x=[],A=0;A<arguments.length;A++)x[A]=arguments[A];var H=!1;typeof x[x.length-1]=="boolean"&&(H=x.pop());var Q=An(x);if(!Q)return w(!1);Q.isTracing,te.NONE,Q.isTracing=H?te.BREAK:te.LOG}(this,g)},h}(),Wo=function(h){return h()};function Bi(){He.inBatch>0||He.isRunningReactions||Wo(Fu)}function Fu(){He.isRunningReactions=!0;for(var h=He.pendingReactions,g=0;h.length>0;){++g==100&&h.splice(0);for(var x=h.splice(0),A=0,H=x.length;A<H;A++)x[A].runReaction()}He.isRunningReactions=!1}var lo=B("Reaction",Ln);function Hu(h){var g=Wo;Wo=function(x){return h(function(){return g(x)})}}function Fi(h){return function(){}}function Xu(){w(!1)}function lr(h){return function(g,x,A){if(A){if(A.value)return{value:Ct(h,A.value),enumerable:!1,configurable:!0,writable:!0};var H=A.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Ct(h,H.call(this))}}}return Hi(h).apply(this,arguments)}}function Hi(h){return function(g,x,A){Object.defineProperty(g,x,{configurable:!0,enumerable:!1,get:function(){},set:function(H){L(this,x,Vn(h,H))}})}}var Vn=function(h,g,x,A){return arguments.length===1&&typeof h=="function"?Ct(h.name||"<unnamed action>",h):arguments.length===2&&typeof g=="function"?Ct(h,g):arguments.length===1&&typeof h=="string"?lr(h):A!==!0?lr(g).apply(null,arguments):void L(h,g,Ct(h.name||g,x.value,this))};function Gu(h,g){return Rt(typeof h=="string"?h:h.name||"<unnamed action>",typeof h=="function"?h:g,this,void 0)}function fo(h){return typeof h=="function"&&h.isMobxAction===!0}function $o(h,g,x){L(h,g,Ct(g,x.bind(h)))}function Ko(h,g){g===void 0&&(g=_);var x,A=g&&g.name||h.name||"Autorun@"+E();if(!g.scheduler&&!g.delay)x=new Ln(A,function(){this.track(pe)},g.onError,g.requiresObservable);else{var H=Xi(g),Q=!1;x=new Ln(A,function(){Q||(Q=!0,H(function(){Q=!1,x.isDisposed||x.track(pe)}))},g.onError,g.requiresObservable)}function pe(){h(x)}return x.schedule(),x.getDisposer()}Vn.bound=function(h,g,x,A){return A===!0?($o(h,g,x.value),null):x?{configurable:!0,enumerable:!1,get:function(){return $o(this,g,x.value||x.initializer.call(this)),this[g]},set:Xu}:{enumerable:!1,configurable:!0,set:function(H){$o(this,g,H)},get:function(){}}};var Uu=function(h){return h()};function Xi(h){return h.scheduler?h.scheduler:h.delay?function(g){return setTimeout(g,h.delay)}:Uu}function Tr(h,g,x){x===void 0&&(x=_);var A,H,Q,pe=x.name||"Reaction@"+E(),je=Vn(pe,x.onError?(A=x.onError,H=g,function(){try{return H.apply(this,arguments)}catch(Tt){A.call(this,Tt)}}):g),Be=!x.scheduler&&!x.delay,pt=Xi(x),ot=!0,xt=!1,ct=x.compareStructural?F.structural:x.equals||F.default,_t=new Ln(pe,function(){ot||Be?wn():xt||(xt=!0,pt(wn))},x.onError,x.requiresObservable);function wn(){if(xt=!1,!_t.isDisposed){var Tt=!1;_t.track(function(){var on=h(_t);Tt=ot||!ct(Q,on),Q=on}),ot&&x.fireImmediately&&je(Q,_t),ot||Tt!==!0||je(Q,_t),ot&&(ot=!1)}}return _t.schedule(),_t.getDisposer()}function Ar(h,g,x){return Gi("onBecomeUnobserved",h,g,x)}function Gi(h,g,x,A){var H=typeof A=="function"?On(g,x):On(g),Q=typeof A=="function"?A:x,pe=h+"Listeners";return H[pe]?H[pe].add(Q):H[pe]=new Set([Q]),typeof H[h]!="function"?w(!1):function(){var je=H[pe];je&&(je.delete(Q),je.size===0&&delete H[pe])}}function Mr(h){var g=h.enforceActions,x=h.computedRequiresReaction,A=h.computedConfigurable,H=h.disableErrorBoundaries,Q=h.reactionScheduler,pe=h.reactionRequiresObservable,je=h.observableRequiresReaction;if(h.isolateGlobalState===!0&&((He.pendingReactions.length||He.inBatch||He.isRunningReactions)&&w("isolateGlobalState should be called before MobX is running any reactions"),Ri=!0,kn&&(--Vo().__mobxInstanceCount==0&&(Vo().__mobxGlobals=void 0),He=new Wr)),g!==void 0){var Be=void 0;switch(g){case!0:case"observed":Be=!0;break;case!1:case"never":Be=!1;break;case"strict":case"always":Be="strict";break;default:w("Invalid value for 'enforceActions': '"+g+"', expected 'never', 'always' or 'observed'")}He.enforceActions=Be,He.allowStateChanges=Be!==!0&&Be!=="strict"}x!==void 0&&(He.computedRequiresReaction=!!x),pe!==void 0&&(He.reactionRequiresObservable=!!pe),je!==void 0&&(He.observableRequiresReaction=!!je,He.allowStateReads=!He.observableRequiresReaction),A!==void 0&&(He.computedConfigurable=!!A),H!==void 0&&(He.disableErrorBoundaries=!!H),Q&&Hu(Q)}function Wn(h,g,x,A){var H=Ui(A=ae(A));return Ie(h),Jr(h,A.name,H.enhancer),g&&Yi(h,g,x,H),h}function Ui(h){return h.defaultDecorator||(h.deep===!1?we:_e)}function Yi(h,g,x,A){var H,Q;vn();try{var pe=K(g);try{for(var je=ce(pe),Be=je.next();!Be.done;Be=je.next()){var pt=Be.value,ot=Object.getOwnPropertyDescriptor(g,pt),xt=(x&&pt in x?x[pt]:ot.get?Le:A)(h,pt,ot,!0);xt&&Object.defineProperty(h,pt,xt)}}catch(ct){H={error:ct}}finally{try{Be&&!Be.done&&(Q=je.return)&&Q.call(je)}finally{if(H)throw H.error}}}finally{bn()}}function $r(h,g){return Vi(On(h,g))}function Vi(h){var g,x,A={name:h.name};return h.observing&&h.observing.length>0&&(A.dependencies=(g=h.observing,x=[],g.forEach(function(H){x.indexOf(H)===-1&&x.push(H)}),x).map(Vi)),A}var Yu=0;function Wi(){this.message="FLOW_CANCELLED"}function $i(h){arguments.length!==1&&w("Flow expects 1 argument and cannot be used as decorator");var g=h.name||"<unnamed flow>";return function(){var x,A=this,H=arguments,Q=++Yu,pe=Vn(g+" - runid: "+Q+" - init",h).apply(A,H),je=void 0,Be=new Promise(function(pt,ot){var xt=0;function ct(Tt){var on;je=void 0;try{on=Vn(g+" - runid: "+Q+" - yield "+xt++,pe.next).call(pe,Tt)}catch(Qr){return ot(Qr)}wn(on)}function _t(Tt){var on;je=void 0;try{on=Vn(g+" - runid: "+Q+" - yield "+xt++,pe.throw).call(pe,Tt)}catch(Qr){return ot(Qr)}wn(on)}function wn(Tt){if(!Tt||typeof Tt.then!="function")return Tt.done?pt(Tt.value):(je=Promise.resolve(Tt.value)).then(ct,_t);Tt.then(wn,ot)}x=ot,ct(void 0)});return Be.cancel=Vn(g+" - runid: "+Q+" - cancel",function(){try{je&&Kr(je);var pt=pe.return(void 0),ot=Promise.resolve(pt.value);ot.then(P,P),Kr(ot),x(new Wi)}catch(xt){x(xt)}}),Be}}function Kr(h){typeof h.cancel=="function"&&h.cancel()}function Ki(h,g){if(h==null)return!1;if(g!==void 0){if(hn(h)===!1||!h[z].values.has(g))return!1;var x=On(h,g);return Un(x)}return Un(h)}function Vu(h){return arguments.length>1?w(!1):Ki(h)}function qi(h,g){return typeof g!="string"?w(!1):Ki(h,g)}function qo(h,g){return h!=null&&(g!==void 0?!!hn(h)&&h[z].values.has(g):hn(h)||!!h[z]||I(h)||lo(h)||Un(h))}function qr(h){return arguments.length!==1&&w(!1),qo(h)}function $n(h){return hn(h)?h[z].getKeys():It(h)||dn(h)?Array.from(h.keys()):Dn(h)?h.map(function(g,x){return x}):w(!1)}function Zt(h){return hn(h)?$n(h).map(function(g){return h[g]}):It(h)?$n(h).map(function(g){return h.get(g)}):dn(h)?Array.from(h.values()):Dn(h)?h.slice():w(!1)}function Zi(h){return hn(h)?$n(h).map(function(g){return[g,h[g]]}):It(h)?$n(h).map(function(g){return[g,h.get(g)]}):dn(h)?Array.from(h.entries()):Dn(h)?h.map(function(g,x){return[x,g]}):w(!1)}function Ji(h,g,x){if(arguments.length!==2||dn(h))if(hn(h)){var A=h[z],H=A.values.get(g);H?A.write(g,x):A.addObservableProp(g,x,A.defaultEnhancer)}else if(It(h))h.set(g,x);else if(dn(h))h.add(g);else{if(!Dn(h))return w(!1);typeof g!="number"&&(g=parseInt(g,10)),k(g>=0,"Not a valid index: '"+g+"'"),vn(),g>=h.length&&(h.length=g+1),h[g]=x,bn()}else{vn();var Q=g;try{for(var pe in Q)Ji(h,pe,Q[pe])}finally{bn()}}}function Qi(h,g,x,A){return typeof x=="function"?function(H,Q,pe,je){return Nr(H,Q).observe(pe,je)}(h,g,x,A):function(H,Q,pe){return Nr(H).observe(Q,pe)}(h,g,x)}Wi.prototype=Object.create(Error.prototype);var Wu={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function fr(h,g,x,A){return A.detectCycles&&h.set(g,x),x}function Tn(h,g,x){if(!g.recurseEverything&&!qr(h)||typeof h!="object")return h;if(h===null)return null;if(h instanceof Date)return h;if(cr(h))return Tn(h.get(),g,x);if(qr(h)&&$n(h),g.detectCycles===!0&&h!==null&&x.has(h))return x.get(h);if(Dn(h)||Array.isArray(h)){var A=fr(x,h,[],g),H=h.map(function(ct){return Tn(ct,g,x)});A.length=H.length;for(var Q=0,pe=H.length;Q<pe;Q++)A[Q]=H[Q];return A}if(dn(h)||Object.getPrototypeOf(h)===Set.prototype){if(g.exportMapsAsObjects===!1){var je=fr(x,h,new Set,g);return h.forEach(function(ct){je.add(Tn(ct,g,x))}),je}var Be=fr(x,h,[],g);return h.forEach(function(ct){Be.push(Tn(ct,g,x))}),Be}if(It(h)||Object.getPrototypeOf(h)===Map.prototype){if(g.exportMapsAsObjects===!1){var pt=fr(x,h,new Map,g);return h.forEach(function(ct,_t){pt.set(_t,Tn(ct,g,x))}),pt}var ot=fr(x,h,{},g);return h.forEach(function(ct,_t){ot[_t]=Tn(ct,g,x)}),ot}var xt=fr(x,h,{},g);return ie(h).forEach(function(ct){xt[ct]=Tn(h[ct],g,x)}),xt}function $u(h,g){var x;return typeof g=="boolean"&&(g={detectCycles:g}),g||(g=Wu),g.detectCycles=g.detectCycles===void 0?g.recurseEverything===!0:g.detectCycles===!0,g.detectCycles&&(x=new Map),Tn(h,g,x)}function An(h){switch(h.length){case 0:return He.trackingDerivation;case 1:return On(h[0]);case 2:return On(h[0],h[1])}}function mn(h,g){g===void 0&&(g=void 0),vn();try{return h.apply(g)}finally{bn()}}function ea(h,g,x){return arguments.length===1||g&&typeof g=="object"?Ku(h,g):ta(h,g,x||{})}function ta(h,g,x){var A;typeof x.timeout=="number"&&(A=setTimeout(function(){if(!Q[z].isDisposed){Q();var pe=new Error("WHEN_TIMEOUT");if(!x.onError)throw pe;x.onError(pe)}},x.timeout)),x.name=x.name||"When@"+E();var H=Ct(x.name+"-effect",g),Q=Ko(function(pe){h()&&(pe.dispose(),A&&clearTimeout(A),H())},x);return Q}function Ku(h,g){var x,A=new Promise(function(H,Q){var pe=ta(h,H,le(le({},g),{onError:Q}));x=function(){pe(),Q("WHEN_CANCELLED")}});return A.cancel=x,A}function po(h){return h[z]}function Kn(h){return typeof h=="string"||typeof h=="number"||typeof h=="symbol"}var Zr={has:function(h,g){if(g===z||g==="constructor"||g===ge)return!0;var x=po(h);return Kn(g)?x.has(g):g in h},get:function(h,g){if(g===z||g==="constructor"||g===ge)return h[g];var x=po(h),A=x.values.get(g);if(A instanceof M){var H=A.get();return H===void 0&&x.has(g),H}return Kn(g)&&x.has(g),h[g]},set:function(h,g,x){return!!Kn(g)&&(Ji(h,g,x),!0)},deleteProperty:function(h,g){return!!Kn(g)&&(po(h).remove(g),!0)},ownKeys:function(h){return po(h).keysAtom.reportObserved(),Reflect.ownKeys(h)},preventExtensions:function(h){return w("Dynamic observable objects cannot be frozen"),!1}};function qu(h){var g=new Proxy(h,Zr);return h[z].proxy=g,g}function rn(h){return h.interceptors!==void 0&&h.interceptors.length>0}function pr(h,g){var x=h.interceptors||(h.interceptors=[]);return x.push(g),j(function(){var A=x.indexOf(g);A!==-1&&x.splice(A,1)})}function gt(h,g){var x=Y();try{for(var A=xe(h.interceptors||[]),H=0,Q=A.length;H<Q&&(k(!(g=A[H](g))||g.type,"Intercept handlers should return nothing or a change object"),g);H++);return g}finally{se(x)}}function _n(h){return h.changeListeners!==void 0&&h.changeListeners.length>0}function dr(h,g){var x=h.changeListeners||(h.changeListeners=[]);return x.push(g),j(function(){var A=x.indexOf(g);A!==-1&&x.splice(A,1)})}function Kt(h,g){var x=Y(),A=h.changeListeners;if(A){for(var H=0,Q=(A=A.slice()).length;H<Q;H++)A[H](g);se(x)}}var na={get:function(h,g){return g===z?h[z]:g==="length"?h[z].getArrayLength():typeof g=="number"?Mn.get.call(h,g):typeof g!="string"||isNaN(g)?Mn.hasOwnProperty(g)?Mn[g]:h[g]:Mn.get.call(h,parseInt(g))},set:function(h,g,x){return g==="length"&&h[z].setArrayLength(x),typeof g=="number"&&Mn.set.call(h,g,x),typeof g=="symbol"||isNaN(g)?h[g]=x:Mn.set.call(h,parseInt(g),x),!0},preventExtensions:function(h){return w("Observable arrays cannot be frozen"),!1}};function Zo(h,g,x,A){x===void 0&&(x="ObservableArray@"+E()),A===void 0&&(A=!1);var H,Q,pe,je=new ra(x,g,A);H=je.values,Q=z,pe=je,Object.defineProperty(H,Q,{enumerable:!1,writable:!1,configurable:!0,value:pe});var Be=new Proxy(je.values,na);if(je.proxy=Be,h&&h.length){var pt=rt(!0);je.spliceWithArray(0,0,h),wt(pt)}return Be}var ra=function(){function h(g,x,A){this.owned=A,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new M(g||"ObservableArray@"+E()),this.enhancer=function(H,Q){return x(H,Q,g+"[..]")}}return h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.dehanceValues=function(g){return this.dehancer!==void 0&&g.length>0?g.map(this.dehancer):g},h.prototype.intercept=function(g){return pr(this,g)},h.prototype.observe=function(g,x){return x===void 0&&(x=!1),x&&g({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),dr(this,g)},h.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},h.prototype.setArrayLength=function(g){if(typeof g!="number"||g<0)throw new Error("[mobx.array] Out of range: "+g);var x=this.values.length;if(g!==x)if(g>x){for(var A=new Array(g-x),H=0;H<g-x;H++)A[H]=void 0;this.spliceWithArray(x,0,A)}else this.spliceWithArray(g,x-g)},h.prototype.updateArrayLength=function(g,x){if(g!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=x},h.prototype.spliceWithArray=function(g,x,A){var H=this;at(this.atom);var Q=this.values.length;if(g===void 0?g=0:g>Q?g=Q:g<0&&(g=Math.max(0,Q+g)),x=arguments.length===1?Q-g:x==null?0:Math.max(0,Math.min(x,Q-g)),A===void 0&&(A=b),rn(this)){var pe=gt(this,{object:this.proxy,type:"splice",index:g,removedCount:x,added:A});if(!pe)return b;x=pe.removedCount,A=pe.added}A=A.length===0?A:A.map(function(Be){return H.enhancer(Be,void 0)});var je=this.spliceItemsIntoValues(g,x,A);return x===0&&A.length===0||this.notifyArraySplice(g,A,je),this.dehanceValues(je)},h.prototype.spliceItemsIntoValues=function(g,x,A){var H;if(A.length<1e4)return(H=this.values).splice.apply(H,xe([g,x],A));var Q=this.values.slice(g,g+x);return this.values=this.values.slice(0,g).concat(A,this.values.slice(g+x)),Q},h.prototype.notifyArrayChildUpdate=function(g,x,A){var H=!this.owned&&!1,Q=_n(this),pe=Q||H?{object:this.proxy,type:"update",index:g,newValue:x,oldValue:A}:null;this.atom.reportChanged(),Q&&Kt(this,pe)},h.prototype.notifyArraySplice=function(g,x,A){var H=!this.owned&&!1,Q=_n(this),pe=Q||H?{object:this.proxy,type:"splice",index:g,removed:A,added:x,removedCount:A.length,addedCount:x.length}:null;this.atom.reportChanged(),Q&&Kt(this,pe)},h}(),Mn={intercept:function(h){return this[z].intercept(h)},observe:function(h,g){return g===void 0&&(g=!1),this[z].observe(h,g)},clear:function(){return this.splice(0)},replace:function(h){var g=this[z];return g.spliceWithArray(0,g.values.length,h)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(h,g){for(var x=[],A=2;A<arguments.length;A++)x[A-2]=arguments[A];var H=this[z];switch(arguments.length){case 0:return[];case 1:return H.spliceWithArray(h);case 2:return H.spliceWithArray(h,g)}return H.spliceWithArray(h,g,x)},spliceWithArray:function(h,g,x){return this[z].spliceWithArray(h,g,x)},push:function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];var x=this[z];return x.spliceWithArray(x.values.length,0,h),x.values.length},pop:function(){return this.splice(Math.max(this[z].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];var x=this[z];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 g=this.slice();return g.sort.apply(g,arguments)},remove:function(h){var g=this[z],x=g.dehanceValues(g.values).indexOf(h);return x>-1&&(this.splice(x,1),!0)},get:function(h){var g=this[z];if(g&&h<g.values.length)return g.atom.reportObserved(),g.dehanceValue(g.values[h])},set:function(h,g){var x=this[z],A=x.values;if(h<A.length){at(x.atom);var H=A[h];if(rn(x)){var Q=gt(x,{type:"update",object:x.proxy,index:h,newValue:g});if(!Q)return;g=Q.newValue}(g=x.enhancer(g,H))!==H&&(A[h]=g,x.notifyArrayChildUpdate(h,g,H))}else{if(h!==A.length)throw new Error("[mobx.array] Index out of bounds, "+h+" is larger than "+A.length);x.spliceWithArray(h,0,[g])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Mn[h]=function(){var g=this[z];g.atom.reportObserved();var x=g.dehanceValues(g.values);return x[h].apply(x,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Mn[h]=function(g,x){var A=this,H=this[z];return H.atom.reportObserved(),H.dehanceValues(H.values)[h](function(Q,pe){return g.call(x,Q,pe,A)},x)})}),["reduce","reduceRight"].forEach(function(h){Mn[h]=function(){var g=this,x=this[z];x.atom.reportObserved();var A=arguments[0];return arguments[0]=function(H,Q,pe){return Q=x.dehanceValue(Q),A(H,Q,pe,g)},x.values[h].apply(x.values,arguments)}});var oa,ho=B("ObservableArrayAdministration",ra);function Dn(h){return D(h)&&ho(h[z])}var ia,Zu={},Jo=function(){function h(g,x,A){if(x===void 0&&(x=Re),A===void 0&&(A="ObservableMap@"+E()),this.enhancer=x,this.name=A,this[oa]=Zu,this._keysAtom=R(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(g)}return h.prototype._has=function(g){return this._data.has(g)},h.prototype.has=function(g){var x=this;if(!He.trackingDerivation)return this._has(g);var A=this._hasMap.get(g);if(!A){var H=A=new Mt(this._has(g),$e,this.name+"."+Z(g)+"?",!1);this._hasMap.set(g,H),Ar(H,function(){return x._hasMap.delete(g)})}return A.get()},h.prototype.set=function(g,x){var A=this._has(g);if(rn(this)){var H=gt(this,{type:A?"update":"add",object:this,newValue:x,name:g});if(!H)return this;x=H.newValue}return A?this._updateValue(g,x):this._addValue(g,x),this},h.prototype.delete=function(g){var x=this;if(at(this._keysAtom),rn(this)&&!(H=gt(this,{type:"delete",object:this,name:g})))return!1;if(this._has(g)){var A=_n(this),H=A?{type:"delete",object:this,oldValue:this._data.get(g).value,name:g}:null;return mn(function(){x._keysAtom.reportChanged(),x._updateHasMapEntry(g,!1),x._data.get(g).setNewValue(void 0),x._data.delete(g)}),A&&Kt(this,H),!0}return!1},h.prototype._updateHasMapEntry=function(g,x){var A=this._hasMap.get(g);A&&A.setNewValue(x)},h.prototype._updateValue=function(g,x){var A=this._data.get(g);if((x=A.prepareNewValue(x))!==He.UNCHANGED){var H=_n(this),Q=H?{type:"update",object:this,oldValue:A.value,name:g,newValue:x}:null;A.setNewValue(x),H&&Kt(this,Q)}},h.prototype._addValue=function(g,x){var A=this;at(this._keysAtom),mn(function(){var pe=new Mt(x,A.enhancer,A.name+"."+Z(g),!1);A._data.set(g,pe),x=pe.value,A._updateHasMapEntry(g,!0),A._keysAtom.reportChanged()});var H=_n(this),Q=H?{type:"add",object:this,name:g,newValue:x}:null;H&&Kt(this,Q)},h.prototype.get=function(g){return this.has(g)?this.dehanceValue(this._data.get(g).get()):this.dehanceValue(void 0)},h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},h.prototype.values=function(){var g=this,x=this.keys();return mo({next:function(){var A=x.next(),H=A.done,Q=A.value;return{done:H,value:H?void 0:g.get(Q)}}})},h.prototype.entries=function(){var g=this,x=this.keys();return mo({next:function(){var A=x.next(),H=A.done,Q=A.value;return{done:H,value:H?void 0:[Q,g.get(Q)]}}})},h.prototype[oa=z,Symbol.iterator]=function(){return this.entries()},h.prototype.forEach=function(g,x){var A,H;try{for(var Q=ce(this),pe=Q.next();!pe.done;pe=Q.next()){var je=ye(pe.value,2),Be=je[0],pt=je[1];g.call(x,pt,Be,this)}}catch(ot){A={error:ot}}finally{try{pe&&!pe.done&&(H=Q.return)&&H.call(Q)}finally{if(A)throw A.error}}},h.prototype.merge=function(g){var x=this;return It(g)&&(g=g.toJS()),mn(function(){var A=rt(!0);try{N(g)?ie(g).forEach(function(H){return x.set(H,g[H])}):Array.isArray(g)?g.forEach(function(H){var Q=ye(H,2),pe=Q[0],je=Q[1];return x.set(pe,je)}):X(g)?(g.constructor!==Map&&w("Cannot initialize from classes that inherit from Map: "+g.constructor.name),g.forEach(function(H,Q){return x.set(Q,H)})):g!=null&&w("Cannot initialize map from "+g)}finally{wt(A)}}),this},h.prototype.clear=function(){var g=this;mn(function(){oe(function(){var x,A;try{for(var H=ce(g.keys()),Q=H.next();!Q.done;Q=H.next()){var pe=Q.value;g.delete(pe)}}catch(je){x={error:je}}finally{try{Q&&!Q.done&&(A=H.return)&&A.call(H)}finally{if(x)throw x.error}}})})},h.prototype.replace=function(g){var x=this;return mn(function(){var A,H,Q,pe,je=function(an){if(X(an)||It(an))return an;if(Array.isArray(an))return new Map(an);if(N(an)){var fa=new Map;for(var eo in an)fa.set(eo,an[eo]);return fa}return w("Cannot convert to map from '"+an+"'")}(g),Be=new Map,pt=!1;try{for(var ot=ce(x._data.keys()),xt=ot.next();!xt.done;xt=ot.next()){var ct=xt.value;if(!je.has(ct))if(x.delete(ct))pt=!0;else{var _t=x._data.get(ct);Be.set(ct,_t)}}}catch(an){A={error:an}}finally{try{xt&&!xt.done&&(H=ot.return)&&H.call(ot)}finally{if(A)throw A.error}}try{for(var wn=ce(je.entries()),Tt=wn.next();!Tt.done;Tt=wn.next()){var on=ye(Tt.value,2),Qr=(ct=on[0],_t=on[1],x._data.has(ct));if(x.set(ct,_t),x._data.has(ct)){var Qu=x._data.get(ct);Be.set(ct,Qu),Qr||(pt=!0)}}}catch(an){Q={error:an}}finally{try{Tt&&!Tt.done&&(pe=wn.return)&&pe.call(wn)}finally{if(Q)throw Q.error}}if(!pt)if(x._data.size!==Be.size)x._keysAtom.reportChanged();else for(var ca=x._data.keys(),la=Be.keys(),_o=ca.next(),ni=la.next();!_o.done;){if(_o.value!==ni.value){x._keysAtom.reportChanged();break}_o=ca.next(),ni=la.next()}x._data=Be}),this},Object.defineProperty(h.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.toPOJO=function(){var g,x,A={};try{for(var H=ce(this),Q=H.next();!Q.done;Q=H.next()){var pe=ye(Q.value,2),je=pe[0],Be=pe[1];A[typeof je=="symbol"?je:Z(je)]=Be}}catch(pt){g={error:pt}}finally{try{Q&&!Q.done&&(x=H.return)&&x.call(H)}finally{if(g)throw g.error}}return A},h.prototype.toJS=function(){return new Map(this)},h.prototype.toJSON=function(){return this.toPOJO()},h.prototype.toString=function(){var g=this;return this.name+"[{ "+Array.from(this.keys()).map(function(x){return Z(x)+": "+g.get(x)}).join(", ")+" }]"},h.prototype.observe=function(g,x){return dr(this,g)},h.prototype.intercept=function(g){return pr(this,g)},h}(),It=B("ObservableMap",Jo),Dr={},yo=function(){function h(g,x,A){if(x===void 0&&(x=Re),A===void 0&&(A="ObservableSet@"+E()),this.name=A,this[ia]=Dr,this._data=new Set,this._atom=R(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(H,Q){return x(H,Q,A)},g&&this.replace(g)}return h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.clear=function(){var g=this;mn(function(){oe(function(){var x,A;try{for(var H=ce(g._data.values()),Q=H.next();!Q.done;Q=H.next()){var pe=Q.value;g.delete(pe)}}catch(je){x={error:je}}finally{try{Q&&!Q.done&&(A=H.return)&&A.call(H)}finally{if(x)throw x.error}}})})},h.prototype.forEach=function(g,x){var A,H;try{for(var Q=ce(this),pe=Q.next();!pe.done;pe=Q.next()){var je=pe.value;g.call(x,je,je,this)}}catch(Be){A={error:Be}}finally{try{pe&&!pe.done&&(H=Q.return)&&H.call(Q)}finally{if(A)throw A.error}}},Object.defineProperty(h.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.add=function(g){var x=this;if(at(this._atom),rn(this)&&!(H=gt(this,{type:"add",object:this,newValue:g})))return this;if(!this.has(g)){mn(function(){x._data.add(x.enhancer(g,void 0)),x._atom.reportChanged()});var A=_n(this),H=A?{type:"add",object:this,newValue:g}:null;A&&Kt(this,H)}return this},h.prototype.delete=function(g){var x=this;if(rn(this)&&!(H=gt(this,{type:"delete",object:this,oldValue:g})))return!1;if(this.has(g)){var A=_n(this),H=A?{type:"delete",object:this,oldValue:g}:null;return mn(function(){x._atom.reportChanged(),x._data.delete(g)}),A&&Kt(this,H),!0}return!1},h.prototype.has=function(g){return this._atom.reportObserved(),this._data.has(this.dehanceValue(g))},h.prototype.entries=function(){var g=0,x=Array.from(this.keys()),A=Array.from(this.values());return mo({next:function(){var H=g;return g+=1,H<A.length?{value:[x[H],A[H]],done:!1}:{done:!0}}})},h.prototype.keys=function(){return this.values()},h.prototype.values=function(){this._atom.reportObserved();var g=this,x=0,A=Array.from(this._data.values());return mo({next:function(){return x<A.length?{value:g.dehanceValue(A[x++]),done:!1}:{done:!0}}})},h.prototype.replace=function(g){var x=this;return dn(g)&&(g=g.toJS()),mn(function(){var A=rt(!0);try{Array.isArray(g)||ee(g)?(x.clear(),g.forEach(function(H){return x.add(H)})):g!=null&&w("Cannot initialize set from "+g)}finally{wt(A)}}),this},h.prototype.observe=function(g,x){return dr(this,g)},h.prototype.intercept=function(g){return pr(this,g)},h.prototype.toJS=function(){return new Set(this)},h.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},h.prototype[ia=z,Symbol.iterator]=function(){return this.values()},h}(),dn=B("ObservableSet",yo),aa=function(){function h(g,x,A,H){x===void 0&&(x=new Map),this.target=g,this.values=x,this.name=A,this.defaultEnhancer=H,this.keysAtom=new M(A+".keys")}return h.prototype.read=function(g){return this.values.get(g).get()},h.prototype.write=function(g,x){var A=this.target,H=this.values.get(g);if(H instanceof Gn)H.set(x);else{if(rn(this)){if(!(pe=gt(this,{type:"update",object:this.proxy||A,name:g,newValue:x})))return;x=pe.newValue}if((x=H.prepareNewValue(x))!==He.UNCHANGED){var Q=_n(this),pe=Q?{type:"update",object:this.proxy||A,oldValue:H.value,name:g,newValue:x}:null;H.setNewValue(x),Q&&Kt(this,pe)}}},h.prototype.has=function(g){var x=this.pendingKeys||(this.pendingKeys=new Map),A=x.get(g);if(A)return A.get();var H=!!this.values.get(g);return A=new Mt(H,$e,this.name+"."+Z(g)+"?",!1),x.set(g,A),A.get()},h.prototype.addObservableProp=function(g,x,A){A===void 0&&(A=this.defaultEnhancer);var H=this.target;if(rn(this)){var Q=gt(this,{object:this.proxy||H,name:g,type:"add",newValue:x});if(!Q)return;x=Q.newValue}var pe=new Mt(x,A,this.name+"."+Z(g),!1);this.values.set(g,pe),x=pe.value,Object.defineProperty(H,g,function(je){return go[je]||(go[je]={configurable:!0,enumerable:!0,get:function(){return this[z].read(je)},set:function(Be){this[z].write(je,Be)}})}(g)),this.notifyPropertyAddition(g,x)},h.prototype.addComputedProp=function(g,x,A){var H,Q,pe,je=this.target;A.name=A.name||this.name+"."+Z(x),this.values.set(x,new Gn(A)),(g===je||(H=g,Q=x,!(pe=Object.getOwnPropertyDescriptor(H,Q))||pe.configurable!==!1&&pe.writable!==!1))&&Object.defineProperty(g,x,function(Be){return vo[Be]||(vo[Be]={configurable:He.computedConfigurable,enumerable:!1,get:function(){return bo(this).read(Be)},set:function(pt){bo(this).write(Be,pt)}})}(x))},h.prototype.remove=function(g){if(this.values.has(g)){var x=this.target;if(rn(this)&&!(Be=gt(this,{object:this.proxy||x,name:g,type:"remove"})))return;try{vn();var A=_n(this),H=!1,Q=this.values.get(g),pe=Q&&Q.get();if(Q&&Q.set(void 0),this.keysAtom.reportChanged(),this.values.delete(g),this.pendingKeys){var je=this.pendingKeys.get(g);je&&je.set(!1)}delete this.target[g];var Be=A?{type:"remove",object:this.proxy||x,oldValue:pe,name:g}:null;A&&Kt(this,Be)}finally{bn()}}},h.prototype.illegalAccess=function(g,x){},h.prototype.observe=function(g,x){return dr(this,g)},h.prototype.intercept=function(g){return pr(this,g)},h.prototype.notifyPropertyAddition=function(g,x){var A=_n(this),H=A?{type:"add",object:this.proxy||this.target,name:g,newValue:x}:null;if(A&&Kt(this,H),this.pendingKeys){var Q=this.pendingKeys.get(g);Q&&Q.set(!0)}this.keysAtom.reportChanged()},h.prototype.getKeys=function(){var g,x;this.keysAtom.reportObserved();var A=[];try{for(var H=ce(this.values),Q=H.next();!Q.done;Q=H.next()){var pe=ye(Q.value,2),je=pe[0];pe[1]instanceof Mt&&A.push(je)}}catch(Be){g={error:Be}}finally{try{Q&&!Q.done&&(x=H.return)&&x.call(H)}finally{if(g)throw g.error}}return A},h}();function Jr(h,g,x){if(g===void 0&&(g=""),x===void 0&&(x=Re),Object.prototype.hasOwnProperty.call(h,z))return h[z];N(h)||(g=(h.constructor.name||"ObservableObject")+"@"+E()),g||(g="ObservableObject@"+E());var A=new aa(h,new Map,Z(g),x);return L(h,z,A),A}var go=Object.create(null),vo=Object.create(null);function bo(h){var g=h[z];return g||(Ie(h),h[z])}var ua=B("ObservableObjectAdministration",aa);function hn(h){return!!D(h)&&(Ie(h),ua(h[z]))}function On(h,g){if(typeof h=="object"&&h!==null){if(Dn(h))return g!==void 0&&w(!1),h[z].atom;if(dn(h))return h[z];if(It(h)){var x=h;return g===void 0?x._keysAtom:((A=x._data.get(g)||x._hasMap.get(g))||w(!1),A)}var A;if(Ie(h),g&&!h[z]&&h[g],hn(h))return g?((A=h[z].values.get(g))||w(!1),A):w(!1);if(I(h)||Un(h)||lo(h))return h}else if(typeof h=="function"&&lo(h[z]))return h[z];return w(!1)}function Nr(h,g){return h||w("Expecting some object"),g!==void 0?Nr(On(h,g)):I(h)||Un(h)||lo(h)||It(h)||dn(h)?h:(Ie(h),h[z]?h[z]:void w(!1))}var Qo=Object.prototype.toString;function ei(h,g,x){return x===void 0&&(x=-1),ti(h,g,x)}function ti(h,g,x,A,H){if(h===g)return h!==0||1/h==1/g;if(h==null||g==null)return!1;if(h!=h)return g!=g;var Q=typeof h;if(Q!=="function"&&Q!=="object"&&typeof g!="object")return!1;var pe=Qo.call(h);if(pe!==Qo.call(g))return!1;switch(pe){case"[object RegExp]":case"[object String]":return""+h==""+g;case"[object Number]":return+h!=+h?+g!=+g:+h==0?1/+h==1/g:+h==+g;case"[object Date]":case"[object Boolean]":return+h==+g;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(h)===Symbol.valueOf.call(g);case"[object Map]":case"[object Set]":x>=0&&x++}h=sa(h),g=sa(g);var je=pe==="[object Array]";if(!je){if(typeof h!="object"||typeof g!="object")return!1;var Be=h.constructor,pt=g.constructor;if(Be!==pt&&!(typeof Be=="function"&&Be instanceof Be&&typeof pt=="function"&&pt instanceof pt)&&"constructor"in h&&"constructor"in g)return!1}if(x===0)return!1;x<0&&(x=-1),H=H||[];for(var ot=(A=A||[]).length;ot--;)if(A[ot]===h)return H[ot]===g;if(A.push(h),H.push(g),je){if((ot=h.length)!==g.length)return!1;for(;ot--;)if(!ti(h[ot],g[ot],x-1,A,H))return!1}else{var xt=Object.keys(h),ct=void 0;if(ot=xt.length,Object.keys(g).length!==ot)return!1;for(;ot--;)if(!Ju(g,ct=xt[ot])||!ti(h[ct],g[ct],x-1,A,H))return!1}return A.pop(),H.pop(),!0}function sa(h){return Dn(h)?h.slice():X(h)||It(h)||ee(h)||dn(h)?Array.from(h.entries()):h}function Ju(h,g){return Object.prototype.hasOwnProperty.call(h,g)}function mo(h){return h[Symbol.iterator]=hr,h}function hr(){return this}if(typeof Proxy>"u"||typeof Symbol>"u")throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Fi,extras:{getDebugName:function(h,g){return(g!==void 0?On(h,g):hn(h)||It(h)||dn(h)?Nr(h):On(h)).name}},$mobx:z})}).call(this,i(155),i(82))},function(s,p,i){var l=i(116),c=i(44),b=i(179);l||c(Object.prototype,"toString",b,{unsafe:!0})},function(s,p,i){var l=i(40),c=i(83),b=i(70),_=i(56),E=i(111),w="Array Iterator",k=_.set,j=_.getterFor(w);s.exports=E(Array,"Array",function(P,D){k(this,{type:w,target:l(P),index:0,kind:D})},function(){var P=j(this),D=P.target,N=P.kind,L=P.index++;return!D||L>=D.length?(P.target=void 0,{value:void 0,done:!0}):N=="keys"?{value:L,done:!1}:N=="values"?{value:D[L],done:!1}:{value:[L,D[L]],done:!1}},"values"),b.Arguments=b.Array,c("keys"),c("values"),c("entries")},function(s,p,i){var l=i(7),c=i(147),b=i(148),_=i(3),E=i(57),w=i(27),k=w("iterator"),j=w("toStringTag"),P=_.values,D=function(L,B){if(L){if(L[k]!==P)try{E(L,k,P)}catch{L[k]=P}if(L[j]||E(L,j,B),c[B]){for(var X in _)if(L[X]!==_[X])try{E(L,X,_[X])}catch{L[X]=_[X]}}}};for(var N in c)D(l[N]&&l[N].prototype,N);D(b,"DOMTokenList")},function(s,p,i){var l=i(17),c=i(7),b=i(46),_=i(76),E=i(35),w=i(15),k=i(64),j=i(36),P=i(109),D=i(19),N=i(34),L=i(99),B=i(28),X=i(33),ee=i(58),ie=i(88),Z=i(32),V=i(38),K=i(40),z=i(87),M=i(41),I=i(71),R=i(54),F=i(66),J=i(72),le=i(139),ce=i(112),ye=i(51),xe=i(37),ge=i(93),ue=i(101),he=i(44),be=i(84),Se=i(91),Ie=i(69),We=i(85),ke=i(27),Re=i(149),$e=i(150),q=i(73),$=i(56),ae=i(74).forEach,_e=Se("hidden"),Te="Symbol",we=ke("toPrimitive"),Ke=$.set,nt=$.getterFor(Te),Ze=Object.prototype,Ue=c.Symbol,ve=Ue&&Ue.prototype,Fe=c.TypeError,te=c.QObject,Le=b("JSON","stringify"),ut=ye.f,vt=xe.f,it=le.f,ht=ge.f,St=w([].push),Pt=be("symbols"),at=be("op-symbols"),Nt=be("string-to-symbol-registry"),G=be("symbol-to-string-registry"),oe=be("wks"),Y=!te||!te.prototype||!te.prototype.findChild,se=j&&D(function(){return R(vt({},"a",{get:function(){return vt(this,"a",{value:7}).a}})).a!=7})?function(ze,Ye,et){var rt=ut(Ze,Ye);rt&&delete Ze[Ye],vt(ze,Ye,et),rt&&ze!==Ze&&vt(Ze,Ye,rt)}:vt,Me=function(ze,Ye){var et=Pt[ze]=R(ve);return Ke(et,{type:Te,tag:ze,description:Ye}),j||(et.description=Ye),et},De=function(ze,Ye,et){ze===Ze&&De(at,Ye,et),Z(ze);var rt=z(Ye);return Z(et),N(Pt,rt)?(et.enumerable?(N(ze,_e)&&ze[_e][rt]&&(ze[_e][rt]=!1),et=R(et,{enumerable:I(0,!1)})):(N(ze,_e)||vt(ze,_e,I(1,{})),ze[_e][rt]=!0),se(ze,rt,et)):vt(ze,rt,et)},Xe=function(ze,Ye){Z(ze);var et=K(Ye),rt=F(et).concat(Ct(et));return ae(rt,function(wt){j&&!E(lt,et,wt)||De(ze,wt,et[wt])}),ze},lt=function(ze){var Ye=z(ze),et=E(ht,this,Ye);return!(this===Ze&&N(Pt,Ye)&&!N(at,Ye))&&(!(et||!N(this,Ye)||!N(Pt,Ye)||N(this,_e)&&this[_e][Ye])||et)},Ht=function(ze,Ye){var et=K(ze),rt=z(Ye);if(et!==Ze||!N(Pt,rt)||N(at,rt)){var wt=ut(et,rt);return!wt||!N(Pt,rt)||N(et,_e)&&et[_e][rt]||(wt.enumerable=!0),wt}},$t=function(ze){var Ye=it(K(ze)),et=[];return ae(Ye,function(rt){N(Pt,rt)||N(Ie,rt)||St(et,rt)}),et},Ct=function(ze){var Ye=ze===Ze,et=it(Ye?at:K(ze)),rt=[];return ae(et,function(wt){!N(Pt,wt)||Ye&&!N(Ze,wt)||St(rt,Pt[wt])}),rt};if(P||(Ue=function(){if(ee(ve,this))throw Fe("Symbol is not a constructor");var ze=arguments.length&&arguments[0]!==void 0?M(arguments[0]):void 0,Ye=We(ze),et=function(rt){this===Ze&&E(et,at,rt),N(this,_e)&&N(this[_e],Ye)&&(this[_e][Ye]=!1),se(this,Ye,I(1,rt))};return j&&Y&&se(Ze,Ye,{configurable:!0,set:et}),Me(Ye,ze)},he(ve=Ue.prototype,"toString",function(){return nt(this).tag}),he(Ue,"withoutSetter",function(ze){return Me(We(ze),ze)}),ge.f=lt,xe.f=De,ye.f=Ht,J.f=le.f=$t,ce.f=Ct,Re.f=function(ze){return Me(ke(ze),ze)},j&&(vt(ve,"description",{configurable:!0,get:function(){return nt(this).description}}),k||he(Ze,"propertyIsEnumerable",lt,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:Ue}),ae(F(oe),function(ze){$e(ze)}),l({target:Te,stat:!0,forced:!P},{for:function(ze){var Ye=M(ze);if(N(Nt,Ye))return Nt[Ye];var et=Ue(Ye);return Nt[Ye]=et,G[et]=Ye,et},keyFor:function(ze){if(!ie(ze))throw Fe(ze+" is not a symbol");if(N(G,ze))return G[ze]},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),l({target:"Object",stat:!0,forced:!P,sham:!j},{create:function(ze,Ye){return Ye===void 0?R(ze):Xe(R(ze),Ye)},defineProperty:De,defineProperties:Xe,getOwnPropertyDescriptor:Ht}),l({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:$t,getOwnPropertySymbols:Ct}),l({target:"Object",stat:!0,forced:D(function(){ce.f(1)})},{getOwnPropertySymbols:function(ze){return ce.f(V(ze))}}),Le&&l({target:"JSON",stat:!0,forced:!P||D(function(){var ze=Ue();return Le([ze])!="[null]"||Le({a:ze})!="{}"||Le(Object(ze))!="{}"})},{stringify:function(ze,Ye,et){var rt=ue(arguments),wt=Ye;if((X(Ye)||ze!==void 0)&&!ie(ze))return L(Ye)||(Ye=function(Mt,cr){if(B(wt)&&(cr=E(wt,this,Mt,cr)),!ie(cr))return cr}),rt[1]=Ye,_(Le,null,rt)}}),!ve[we]){var Rt=ve.valueOf;he(ve,we,function(ze){return E(Rt,this)})}q(Ue,Te),Ie[_e]=!0},function(s,p,i){var l=i(146).charAt,c=i(41),b=i(56),_=i(111),E="String Iterator",w=b.set,k=b.getterFor(E);_(String,"String",function(j){w(this,{type:E,string:c(j),index:0})},function(){var j,P=k(this),D=P.string,N=P.index;return N>=D.length?{value:void 0,done:!0}:(j=l(D,N),P.index+=j.length,{value:j,done:!1})})},function(s,p,i){(function(l){var c=function(b){return b&&b.Math==Math&&b};s.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof l=="object"&&l)||function(){return this}()||Function("return this")()}).call(this,i(82))},function(s,p,i){var l=i(17),c=i(36),b=i(7),_=i(15),E=i(34),w=i(28),k=i(58),j=i(41),P=i(37).f,D=i(134),N=b.Symbol,L=N&&N.prototype;if(c&&w(N)&&(!("description"in L)||N().description!==void 0)){var B={},X=function(){var M=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),I=k(L,this)?new N(M):M===void 0?N():N(M);return M===""&&(B[I]=!0),I};D(X,N),X.prototype=L,L.constructor=X;var ee=String(N("test"))=="Symbol(test)",ie=_(L.toString),Z=_(L.valueOf),V=/^Symbol\((.*)\)[^)]+$/,K=_("".replace),z=_("".slice);P(L,"description",{configurable:!0,get:function(){var M=Z(this),I=ie(M);if(E(B,M))return"";var R=ee?z(I,7,-1):K(I,V,"$1");return R===""?void 0:R}}),l({global:!0,forced:!0},{Symbol:X})}},function(s,p,i){i(150)("iterator")},function(s,p,i){i.d(p,"a",function(){return _.a}),i.d(p,"c",function(){return _.e}),i.d(p,"h",function(){return V}),i.d(p,"i",function(){return ee}),i.d(p,"j",function(){return B}),i.d(p,"b",function(){return ye}),i.d(p,"e",function(){return he}),i.d(p,"f",function(){return xe}),i.d(p,"g",function(){return Pt});var l,c,b,_=i(0),E=0,w=[],k=_.i.__b,j=_.i.__r,P=_.i.diffed,D=_.i.__c,N=_.i.unmount;function L(G,oe){_.i.__h&&_.i.__h(c,G,E||oe),E=0;var Y=c.__H||(c.__H={__:[],__h:[]});return G>=Y.__.length&&Y.__.push({}),Y.__[G]}function B(G){return E=1,X(J,G)}function X(G,oe,Y){var se=L(l++,2);return se.t=G,se.__c||(se.__=[Y?Y(oe):J(void 0,oe),function(Me){var De=se.t(se.__[0],Me);se.__[0]!==De&&(se.__=[De,se.__[1]],se.__c.setState({}))}],se.__c=c),se.__}function ee(G,oe){var Y=L(l++,3);!_.i.__s&&F(Y.__H,oe)&&(Y.__=G,Y.__H=oe,c.__H.__h.push(Y))}function ie(G,oe){var Y=L(l++,4);!_.i.__s&&F(Y.__H,oe)&&(Y.__=G,Y.__H=oe,c.__h.push(Y))}function Z(G,oe){var Y=L(l++,7);return F(Y.__H,oe)&&(Y.__=G(),Y.__H=oe,Y.__h=G),Y.__}function V(G,oe){return E=8,Z(function(){return G},oe)}function K(){var G;for(w.sort(function(oe,Y){return oe.__v.__b-Y.__v.__b});G=w.pop();)if(G.__P)try{G.__H.__h.forEach(I),G.__H.__h.forEach(R),G.__H.__h=[]}catch(oe){G.__H.__h=[],_.i.__e(oe,G.__v)}}_.i.__b=function(G){c=null,k&&k(G)},_.i.__r=function(G){j&&j(G),l=0;var oe=(c=G.__c).__H;oe&&(oe.__h.forEach(I),oe.__h.forEach(R),oe.__h=[])},_.i.diffed=function(G){P&&P(G);var oe=G.__c;oe&&oe.__H&&oe.__H.__h.length&&(w.push(oe)!==1&&b===_.i.requestAnimationFrame||((b=_.i.requestAnimationFrame)||M)(K)),c=null},_.i.__c=function(G,oe){oe.some(function(Y){try{Y.__h.forEach(I),Y.__h=Y.__h.filter(function(se){return!se.__||R(se)})}catch(se){oe.some(function(Me){Me.__h&&(Me.__h=[])}),oe=[],_.i.__e(se,Y.__v)}}),D&&D(G,oe)},_.i.unmount=function(G){N&&N(G);var oe,Y=G.__c;Y&&Y.__H&&(Y.__H.__.forEach(function(se){try{I(se)}catch(Me){oe=Me}}),oe&&_.i.__e(oe,Y.__v))};var z=typeof requestAnimationFrame=="function";function M(G){var oe,Y=function(){clearTimeout(se),z&&cancelAnimationFrame(oe),setTimeout(G)},se=setTimeout(Y,100);z&&(oe=requestAnimationFrame(Y))}function I(G){var oe=c,Y=G.__c;typeof Y=="function"&&(G.__c=void 0,Y()),c=oe}function R(G){var oe=c;G.__c=G.__(),c=oe}function F(G,oe){return!G||G.length!==oe.length||oe.some(function(Y,se){return Y!==G[se]})}function J(G,oe){return typeof oe=="function"?oe(G):oe}function le(G,oe){for(var Y in oe)G[Y]=oe[Y];return G}function ce(G,oe){for(var Y in G)if(Y!=="__source"&&!(Y in oe))return!0;for(var se in oe)if(se!=="__source"&&G[se]!==oe[se])return!0;return!1}function ye(G){this.props=G}function xe(G,oe){function Y(Me){var De=this.props.ref,Xe=De==Me.ref;return!Xe&&De&&(De.call?De(null):De.current=null),oe?!oe(this.props,Me)||!Xe:ce(this.props,Me)}function se(Me){return this.shouldComponentUpdate=Y,Object(_.e)(G,Me)}return se.displayName="Memo("+(G.displayName||G.name)+")",se.prototype.isReactComponent=!0,se.__f=!0,se}(ye.prototype=new _.a).isPureReactComponent=!0,ye.prototype.shouldComponentUpdate=function(G,oe){return ce(this.props,G)||ce(this.state,oe)};var ge=_.i.__b;_.i.__b=function(G){G.type&&G.type.__f&&G.ref&&(G.props.ref=G.ref,G.ref=null),ge&&ge(G)};var ue=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(G){function oe(Y,se){var Me=le({},Y);return delete Me.ref,G(Me,!(se=Y.ref||se)||typeof se=="object"&&!("current"in se)?null:se)}return oe.$$typeof=ue,oe.render=oe,oe.prototype.isReactComponent=oe.__f=!0,oe.displayName="ForwardRef("+(G.displayName||G.name)+")",oe}var be=function(G,oe){return G==null?null:Object(_.k)(Object(_.k)(G).map(oe))},Se={map:be,forEach:be,count:function(G){return G?Object(_.k)(G).length:0},only:function(G){var oe=Object(_.k)(G);if(oe.length!==1)throw"Children.only";return oe[0]},toArray:_.k},Ie=_.i.__e;_.i.__e=function(G,oe,Y){if(G.then){for(var se,Me=oe;Me=Me.__;)if((se=Me.__c)&&se.__c)return oe.__e==null&&(oe.__e=Y.__e,oe.__k=Y.__k),se.__c(G,oe)}Ie(G,oe,Y)};var We=_.i.unmount;function ke(G,oe,Y){return G&&(G.__c&&G.__c.__H&&(G.__c.__H.__.forEach(function(se){typeof se.__c=="function"&&se.__c()}),G.__c.__H=null),(G=le({},G)).__c!=null&&(G.__c.__P===Y&&(G.__c.__P=oe),G.__c=null),G.__k=G.__k&&G.__k.map(function(se){return ke(se,oe,Y)})),G}function Re(G,oe,Y){return G&&(G.__v=null,G.__k=G.__k&&G.__k.map(function(se){return Re(se,oe,Y)}),G.__c&&G.__c.__P===oe&&(G.__e&&Y.insertBefore(G.__e,G.__d),G.__c.__e=!0,G.__c.__P=Y)),G}function $e(){this.__u=0,this.t=null,this.__b=null}function q(G){var oe=G.__.__c;return oe&&oe.__e&&oe.__e(G)}function $(){this.u=null,this.o=null}_.i.unmount=function(G){var oe=G.__c;oe&&oe.__R&&oe.__R(),oe&&G.__h===!0&&(G.type=null),We&&We(G)},($e.prototype=new _.a).__c=function(G,oe){var Y=oe.__c,se=this;se.t==null&&(se.t=[]),se.t.push(Y);var Me=q(se.__v),De=!1,Xe=function(){De||(De=!0,Y.__R=null,Me?Me(lt):lt())};Y.__R=Xe;var lt=function(){if(!--se.__u){if(se.state.__e){var $t=se.state.__e;se.__v.__k[0]=Re($t,$t.__c.__P,$t.__c.__O)}var Ct;for(se.setState({__e:se.__b=null});Ct=se.t.pop();)Ct.forceUpdate()}},Ht=oe.__h===!0;se.__u++||Ht||se.setState({__e:se.__b=se.__v.__k[0]}),G.then(Xe,Xe)},$e.prototype.componentWillUnmount=function(){this.t=[]},$e.prototype.render=function(G,oe){if(this.__b){if(this.__v.__k){var Y=document.createElement("div"),se=this.__v.__k[0].__c;this.__v.__k[0]=ke(this.__b,Y,se.__O=se.__P)}this.__b=null}var Me=oe.__e&&Object(_.e)(_.b,null,G.fallback);return Me&&(Me.__h=null),[Object(_.e)(_.b,null,oe.__e?null:G.children),Me]};var ae=function(G,oe,Y){if(++Y[1]===Y[0]&&G.o.delete(oe),G.props.revealOrder&&(G.props.revealOrder[0]!=="t"||!G.o.size))for(Y=G.u;Y;){for(;Y.length>3;)Y.pop()();if(Y[1]<Y[0])break;G.u=Y=Y[2]}};function _e(G){return this.getChildContext=function(){return G.context},G.children}function Te(G){var oe=this,Y=G.i;oe.componentWillUnmount=function(){Object(_.j)(null,oe.l),oe.l=null,oe.i=null},oe.i&&oe.i!==Y&&oe.componentWillUnmount(),G.__v?(oe.l||(oe.i=Y,oe.l={nodeType:1,parentNode:Y,childNodes:[],appendChild:function(se){this.childNodes.push(se),oe.i.appendChild(se)},insertBefore:function(se,Me){this.childNodes.push(se),oe.i.appendChild(se)},removeChild:function(se){this.childNodes.splice(this.childNodes.indexOf(se)>>>1,1),oe.i.removeChild(se)}}),Object(_.j)(Object(_.e)(_e,{context:oe.context},G.__v),oe.l)):oe.l&&oe.componentWillUnmount()}($.prototype=new _.a).__e=function(G){var oe=this,Y=q(oe.__v),se=oe.o.get(G);return se[0]++,function(Me){var De=function(){oe.props.revealOrder?(se.push(Me),ae(oe,G,se)):Me()};Y?Y(De):De()}},$.prototype.render=function(G){this.u=null,this.o=new Map;var oe=Object(_.k)(G.children);G.revealOrder&&G.revealOrder[0]==="b"&&oe.reverse();for(var Y=oe.length;Y--;)this.o.set(oe[Y],this.u=[1,0,this.u]);return G.children},$.prototype.componentDidUpdate=$.prototype.componentDidMount=function(){var G=this;this.o.forEach(function(oe,Y){ae(G,Y,oe)})};var we=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ke=/^(?: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]/,nt=typeof document<"u",Ze=function(G){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(G)};_.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(G){Object.defineProperty(_.a.prototype,G,{configurable:!0,get:function(){return this["UNSAFE_"+G]},set:function(oe){Object.defineProperty(this,G,{configurable:!0,writable:!0,value:oe})}})});var Ue=_.i.event;function ve(){}function Fe(){return this.cancelBubble}function te(){return this.defaultPrevented}_.i.event=function(G){return Ue&&(G=Ue(G)),G.persist=ve,G.isPropagationStopped=Fe,G.isDefaultPrevented=te,G.nativeEvent=G};var Le,ut={configurable:!0,get:function(){return this.class}},vt=_.i.vnode;_.i.vnode=function(G){var oe=G.type,Y=G.props,se=Y;if(typeof oe=="string"){var Me=oe.indexOf("-")===-1;for(var De in se={},Y){var Xe=Y[De];nt&&De==="children"&&oe==="noscript"||De==="value"&&"defaultValue"in Y&&Xe==null||(De==="defaultValue"&&"value"in Y&&Y.value==null?De="value":De==="download"&&Xe===!0?Xe="":/ondoubleclick/i.test(De)?De="ondblclick":/^onchange(textarea|input)/i.test(De+oe)&&!Ze(Y.type)?De="oninput":/^onfocus$/i.test(De)?De="onfocusin":/^onblur$/i.test(De)?De="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(De)?De=De.toLowerCase():Me&&Ke.test(De)?De=De.replace(/[A-Z0-9]/,"-$&").toLowerCase():Xe===null&&(Xe=void 0),se[De]=Xe)}oe=="select"&&se.multiple&&Array.isArray(se.value)&&(se.value=Object(_.k)(Y.children).forEach(function(lt){lt.props.selected=se.value.indexOf(lt.props.value)!=-1})),oe=="select"&&se.defaultValue!=null&&(se.value=Object(_.k)(Y.children).forEach(function(lt){lt.props.selected=se.multiple?se.defaultValue.indexOf(lt.props.value)!=-1:se.defaultValue==lt.props.value})),G.props=se,Y.class!=Y.className&&(ut.enumerable="className"in Y,Y.className!=null&&(se.class=Y.className),Object.defineProperty(se,"className",ut))}G.$$typeof=we,vt&&vt(G)};var it=_.i.__r;_.i.__r=function(G){it&&it(G),Le=G.__c};var ht={ReactCurrentDispatcher:{current:{readContext:function(G){return Le.__n[G.__c].props.value}}}};function St(G){return!!G&&G.$$typeof===we}var Pt=function(G,oe){return G(oe)},at=_.b,Nt={useState:B,useReducer:X,useEffect:ee,useLayoutEffect:ie,useRef:function(G){return E=5,Z(function(){return{current:G}},[])},useImperativeHandle:function(G,oe,Y){E=6,ie(function(){typeof G=="function"?G(oe()):G&&(G.current=oe())},Y==null?Y:Y.concat(G))},useMemo:Z,useCallback:V,useContext:function(G){var oe=c.context[G.__c],Y=L(l++,9);return Y.c=G,oe?(Y.__==null&&(Y.__=!0,oe.sub(c)),oe.props.value):G.__},useDebugValue:function(G,oe){_.i.useDebugValue&&_.i.useDebugValue(oe?oe(G):G)},version:"17.0.2",Children:Se,render:function(G,oe,Y){return oe.__k==null&&(oe.textContent=""),Object(_.j)(G,oe),typeof Y=="function"&&Y(),G?G.__c:null},hydrate:function(G,oe,Y){return Object(_.h)(G,oe),typeof Y=="function"&&Y(),G?G.__c:null},unmountComponentAtNode:function(G){return!!G.__k&&(Object(_.j)(null,G),!0)},createPortal:function(G,oe){return Object(_.e)(Te,{__v:G,i:oe})},createElement:_.e,createContext:_.d,createFactory:function(G){return _.e.bind(null,G)},cloneElement:function(G){return St(G)?_.c.apply(null,arguments):G},createRef:_.f,Fragment:_.b,isValidElement:St,findDOMNode:function(G){return G&&(G.base||G.nodeType===1&&G)||null},Component:_.a,PureComponent:ye,memo:xe,forwardRef:he,flushSync:function(G,oe){return G(oe)},unstable_batchedUpdates:Pt,StrictMode:at,Suspense:$e,SuspenseList:$,lazy:function(G){var oe,Y,se;function Me(De){if(oe||(oe=G()).then(function(Xe){Y=Xe.default||Xe},function(Xe){se=Xe}),se)throw se;if(!Y)throw oe;return Object(_.e)(Y,De)}return Me.displayName="Lazy",Me.__f=!0,Me},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ht};p.d=Nt},function(s,p,i){var l=i(7),c=i(147),b=i(148),_=i(180),E=i(57),w=function(j){if(j&&j.forEach!==_)try{E(j,"forEach",_)}catch{j.forEach=_}};for(var k in c)c[k]&&w(l[k]&&l[k].prototype);w(b)},function(s,p,i){i(17)({target:"Object",stat:!0},{setPrototypeOf:i(97)})},function(s,p,i){var l=i(17),c=i(19),b=i(38),_=i(96),E=i(137);l({target:"Object",stat:!0,forced:c(function(){_(1)}),sham:!E},{getPrototypeOf:function(w){return _(b(w))}})},function(s,p,i){var l=i(17),c=i(46),b=i(76),_=i(200),E=i(157),w=i(32),k=i(33),j=i(54),P=i(19),D=c("Reflect","construct"),N=Object.prototype,L=[].push,B=P(function(){function ie(){}return!(D(function(){},[],ie)instanceof ie)}),X=!P(function(){D(function(){})}),ee=B||X;l({target:"Reflect",stat:!0,forced:ee,sham:ee},{construct:function(ie,Z){E(ie),w(Z);var V=arguments.length<3?ie:E(arguments[2]);if(X&&!B)return D(ie,Z,V);if(ie==V){switch(Z.length){case 0:return new ie;case 1:return new ie(Z[0]);case 2:return new ie(Z[0],Z[1]);case 3:return new ie(Z[0],Z[1],Z[2]);case 4:return new ie(Z[0],Z[1],Z[2],Z[3])}var K=[null];return b(L,K,Z),new(b(_,ie,K))}var z=V.prototype,M=j(k(z)?z:N),I=b(ie,M,Z);return k(I)?I:M}})},function(s,p){var i=Function.prototype,l=i.bind,c=i.call,b=l&&l.bind(c);s.exports=l?function(_){return _&&b(c,_)}:function(_){return _&&function(){return c.apply(_,arguments)}}},function(s,p,i){var l=i(17),c=i(7),b=i(99),_=i(100),E=i(33),w=i(67),k=i(43),j=i(40),P=i(61),D=i(27),N=i(75),L=i(101),B=N("slice"),X=D("species"),ee=c.Array,ie=Math.max;l({target:"Array",proto:!0,forced:!B},{slice:function(Z,V){var K,z,M,I=j(this),R=k(I),F=w(Z,R),J=w(V===void 0?R:V,R);if(b(I)&&(K=I.constructor,(_(K)&&(K===ee||b(K.prototype))||E(K)&&(K=K[X])===null)&&(K=void 0),K===ee||K===void 0))return L(I,F,J);for(z=new(K===void 0?ee:K)(ie(J-F,0)),M=0;F<J;F++,M++)F in I&&P(z,M,I[F]);return z.length=M,z}})},function(s,p,i){var l=i(7),c=i(51).f,b=i(57),_=i(44),E=i(108),w=i(134),k=i(95);s.exports=function(j,P){var D,N,L,B,X,ee=j.target,ie=j.global,Z=j.stat;if(D=ie?l:Z?l[ee]||E(ee,{}):(l[ee]||{}).prototype)for(N in P){if(B=P[N],L=j.noTargetGet?(X=c(D,N))&&X.value:D[N],!k(ie?N:ee+(Z?".":"#")+N,j.forced)&&L!==void 0){if(typeof B==typeof L)continue;w(B,L)}(j.sham||L&&L.sham)&&b(B,"sham",!0),_(D,N,B,j)}}},function(s,p,i){var l=i(17),c=i(102);l({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},function(s,p){s.exports=function(i){try{return!!i()}catch{return!0}}},function(s,p,i){var l=i(17),c=i(38),b=i(66);l({target:"Object",stat:!0,forced:i(19)(function(){b(1)})},{keys:function(_){return b(c(_))}})},function(s,p,i){var l=i(17),c=i(19),b=i(40),_=i(51).f,E=i(36),w=c(function(){_(1)});l({target:"Object",stat:!0,forced:!E||w,sham:!E},{getOwnPropertyDescriptor:function(k,j){return _(b(k),j)}})},function(s,p,i){var l=i(36),c=i(94).EXISTS,b=i(15),_=i(37).f,E=Function.prototype,w=b(E.toString),k=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=b(k.exec);l&&!c&&_(E,"name",{configurable:!0,get:function(){try{return j(k,w(this))[1]}catch{return""}}})},function(s,p,i){var l=i(17),c=i(74).filter;l({target:"Array",proto:!0,forced:!i(75)("filter")},{filter:function(b){return c(this,b,arguments.length>1?arguments[1]:void 0)}})},function(s,p,i){var l=i(17),c=i(183);l({target:"Array",stat:!0,forced:!i(118)(function(b){Array.from(b)})},{from:c})},function(s,p,i){var l=i(17),c=i(36),b=i(135),_=i(40),E=i(51),w=i(61);l({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(k){for(var j,P,D=_(k),N=E.f,L=b(D),B={},X=0;L.length>X;)(P=N(D,j=L[X++]))!==void 0&&w(B,j,P);return B}})},,function(s,p,i){var l=i(7),c=i(84),b=i(34),_=i(85),E=i(109),w=i(128),k=c("wks"),j=l.Symbol,P=j&&j.for,D=w?j:j&&j.withoutSetter||_;s.exports=function(N){if(!b(k,N)||!E&&typeof k[N]!="string"){var L="Symbol."+N;E&&b(j,N)?k[N]=j[N]:k[N]=w&&P?P(L):D(L)}return k[N]}},function(s,p){s.exports=function(i){return typeof i=="function"}},function(s,p,i){var l=i(17),c=i(7),b=i(19),_=i(99),E=i(33),w=i(38),k=i(43),j=i(61),P=i(119),D=i(75),N=i(27),L=i(65),B=N("isConcatSpreadable"),X=9007199254740991,ee="Maximum allowed index exceeded",ie=c.TypeError,Z=L>=51||!b(function(){var z=[];return z[B]=!1,z.concat()[0]!==z}),V=D("concat"),K=function(z){if(!E(z))return!1;var M=z[B];return M!==void 0?!!M:_(z)};l({target:"Array",proto:!0,forced:!Z||!V},{concat:function(z){var M,I,R,F,J,le=w(this),ce=P(le,0),ye=0;for(M=-1,R=arguments.length;M<R;M++)if(K(J=M===-1?le:arguments[M])){if(ye+(F=k(J))>X)throw ie(ee);for(I=0;I<F;I++,ye++)I in J&&j(ce,ye,J[I])}else{if(ye>=X)throw ie(ee);j(ce,ye++,J)}return ce.length=ye,ce}})},function(s,p,i){var l=i(17),c=i(199);l({target:"Object",stat:!0,forced:Object.assign!==c},{assign:c})},function(s,p,i){var l=i(105),c=typeof self=="object"&&self&&self.Object===Object&&self,b=l.a||c||Function("return this")();p.a=b},function(s,p,i){var l=i(7),c=i(33),b=l.String,_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not an object")}},function(s,p,i){var l=i(28);s.exports=function(c){return typeof c=="object"?c!==null:l(c)}},function(s,p,i){var l=i(15),c=i(38),b=l({}.hasOwnProperty);s.exports=Object.hasOwn||function(_,E){return b(c(_),E)}},function(s,p){var i=Function.prototype.call;s.exports=i.bind?i.bind(i):function(){return i.apply(i,arguments)}},function(s,p,i){var l=i(19);s.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(s,p,i){var l=i(7),c=i(36),b=i(129),_=i(32),E=i(87),w=l.TypeError,k=Object.defineProperty;p.f=c?k:function(j,P,D){if(_(j),P=E(P),_(D),b)try{return k(j,P,D)}catch{}if("get"in D||"set"in D)throw w("Accessors not supported");return"value"in D&&(j[P]=D.value),j}},function(s,p,i){var l=i(7),c=i(45),b=l.Object;s.exports=function(_){return b(c(_))}},function(s,p,i){var l=i(17),c=i(74).map;l({target:"Array",proto:!0,forced:!i(75)("map")},{map:function(b){return c(this,b,arguments.length>1?arguments[1]:void 0)}})},function(s,p,i){var l=i(81),c=i(45);s.exports=function(b){return l(c(b))}},function(s,p,i){var l=i(7),c=i(98),b=l.String;s.exports=function(_){if(c(_)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return b(_)}},function(s,p,i){(function(l){i.d(p,"d",function(){return _}),i.d(p,"c",function(){return E}),i.d(p,"b",function(){return w}),i.d(p,"a",function(){return j});var c=i(10),b=function(P,D){var N=typeof Symbol=="function"&&P[Symbol.iterator];if(!N)return P;var L,B,X=N.call(P),ee=[];try{for(;(D===void 0||D-- >0)&&!(L=X.next()).done;)ee.push(L.value)}catch(ie){B={error:ie}}finally{try{L&&!L.done&&(N=X.return)&&N.call(X)}finally{if(B)throw B.error}}return ee};function _(){var P=b(Object(c.j)(0),2)[1];return Object(c.h)(function(){P(function(D){return D+1})},[])}function E(P){if(!P||typeof P!="object")return!1;var D=Object.getPrototypeOf(P);return!D||D===Object.prototype}function w(P){return typeof Symbol=="function"?Symbol.for(P):"__$mobx-react "+P+"__"}var k={};function j(){return typeof window<"u"?window:l!==void 0?l:typeof self<"u"?self:k}}).call(this,i(82))},function(s,p,i){var l=i(90);s.exports=function(c){return l(c.length)}},function(s,p,i){var l=i(7),c=i(28),b=i(34),_=i(57),E=i(108),w=i(92),k=i(56),j=i(94).CONFIGURABLE,P=k.get,D=k.enforce,N=String(String).split("String");(s.exports=function(L,B,X,ee){var ie,Z=!!ee&&!!ee.unsafe,V=!!ee&&!!ee.enumerable,K=!!ee&&!!ee.noTargetGet,z=ee&&ee.name!==void 0?ee.name:B;c(X)&&(String(z).slice(0,7)==="Symbol("&&(z="["+String(z).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!b(X,"name")||j&&X.name!==z)&&_(X,"name",z),(ie=D(X)).source||(ie.source=N.join(typeof z=="string"?z:""))),L!==l?(Z?!K&&L[B]&&(V=!0):delete L[B],V?L[B]=X:_(L,B,X)):V?L[B]=X:E(B,X)})(Function.prototype,"toString",function(){return c(this)&&P(this).source||w(this)})},function(s,p,i){var l=i(7).TypeError;s.exports=function(c){if(c==null)throw l("Can't call method on "+c);return c}},function(s,p,i){var l=i(7),c=i(28),b=function(_){return c(_)?_:void 0};s.exports=function(_,E){return arguments.length<2?b(l[_]):l[_]&&l[_][E]}},function(s,p,i){var l=i(17),c=i(35),b=i(33),_=i(32),E=i(201),w=i(51),k=i(96);l({target:"Reflect",stat:!0},{get:function j(P,D){var N,L,B=arguments.length<3?P:arguments[2];return _(P)===B?P[D]:(N=w.f(P,D))?E(N)?N.value:N.get===void 0?void 0:c(N.get,B):b(L=k(P))?j(L,D,B):void 0}})},function(s,p,i){(function(l){var c=i(31),b=i(166),_=y&&!y.nodeType&&y,E=_&&typeof l=="object"&&l&&!l.nodeType&&l,w=E&&E.exports===_?c.a.Buffer:void 0,k=(w?w.isBuffer:void 0)||b.a;p.a=k}).call(this,i(121)(s))},function(s,p,i){(function(l){var c=i(105),b=y&&!y.nodeType&&y,_=b&&typeof l=="object"&&l&&!l.nodeType&&l,E=_&&_.exports===b&&c.a.process,w=function(){try{var k=_&&_.require&&_.require("util").types;return k||E&&E.binding&&E.binding("util")}catch{}}();p.a=w}).call(this,i(121)(s))},function(s,p,i){var l=i(15),c=l({}.toString),b=l("".slice);s.exports=function(_){return b(c(_),8,-1)}},function(s,p,i){var l=i(36),c=i(35),b=i(93),_=i(71),E=i(40),w=i(87),k=i(34),j=i(129),P=Object.getOwnPropertyDescriptor;p.f=l?P:function(D,N){if(D=E(D),N=w(N),j)try{return P(D,N)}catch{}if(k(D,N))return _(!c(b.f,D,N),D[N])}},function(s,p,i){var l=i(17),c=i(213).entries;l({target:"Object",stat:!0},{entries:function(b){return c(b)}})},function(s,p,i){var l=i(46);s.exports=l("navigator","userAgent")||""},function(s,p,i){var l,c=i(32),b=i(169),_=i(110),E=i(69),w=i(133),k=i(86),j=i(91),P=j("IE_PROTO"),D=function(){},N=function(X){return"<script>"+X+"<\/script>"},L=function(X){X.write(N("")),X.close();var ee=X.parentWindow.Object;return X=null,ee},B=function(){try{l=new ActiveXObject("htmlfile")}catch{}var X,ee;B=typeof document<"u"?document.domain&&l?L(l):((ee=k("iframe")).style.display="none",w.appendChild(ee),ee.src="javascript:",(X=ee.contentWindow.document).open(),X.write(N("document.F=Object")),X.close(),X.F):L(l);for(var ie=_.length;ie--;)delete B.prototype[_[ie]];return B()};E[P]=!0,s.exports=Object.create||function(X,ee){var ie;return X!==null?(D.prototype=c(X),ie=new D,D.prototype=null,ie[P]=X):ie=B(),ee===void 0?ie:b(ie,ee)}},function(s,p,i){var l=i(7),c=i(28),b=i(89),_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not a function")}},function(s,p,i){var l,c,b,_=i(171),E=i(7),w=i(15),k=i(33),j=i(57),P=i(34),D=i(107),N=i(91),L=i(69),B="Object already initialized",X=E.TypeError,ee=E.WeakMap;if(_||D.state){var ie=D.state||(D.state=new ee),Z=w(ie.get),V=w(ie.has),K=w(ie.set);l=function(M,I){if(V(ie,M))throw new X(B);return I.facade=M,K(ie,M,I),I},c=function(M){return Z(ie,M)||{}},b=function(M){return V(ie,M)}}else{var z=N("state");L[z]=!0,l=function(M,I){if(P(M,z))throw new X(B);return I.facade=M,j(M,z,I),I},c=function(M){return P(M,z)?M[z]:{}},b=function(M){return P(M,z)}}s.exports={set:l,get:c,has:b,enforce:function(M){return b(M)?c(M):l(M,{})},getterFor:function(M){return function(I){var R;if(!k(I)||(R=c(I)).type!==M)throw X("Incompatible receiver, "+M+" required");return R}}}},function(s,p,i){var l=i(36),c=i(37),b=i(71);s.exports=l?function(_,E,w){return c.f(_,E,b(1,w))}:function(_,E,w){return _[E]=w,_}},function(s,p,i){var l=i(15);s.exports=l({}.isPrototypeOf)},function(s,p,i){var l=i(55);s.exports=function(c,b){var _=c[b];return _==null?void 0:l(_)}},function(s,p,i){i(174)("Map",function(l){return function(){return l(this,arguments.length?arguments[0]:void 0)}},i(178))},function(s,p,i){var l=i(87),c=i(37),b=i(71);s.exports=function(_,E,w){var k=l(E);k in _?c.f(_,k,b(0,w)):_[k]=w}},function(s,p,i){var l=i(15),c=i(55),b=l(l.bind);s.exports=function(_,E){return c(_),E===void 0?_:b?b(_,E):function(){return _.apply(E,arguments)}}},function(s,p,i){var l=i(17),c=i(15),b=i(81),_=i(40),E=i(120),w=c([].join),k=b!=Object,j=E("join",",");l({target:"Array",proto:!0,forced:k||!j},{join:function(P){return w(_(this),P===void 0?",":P)}})},function(s,p){s.exports=!1},function(s,p,i){var l,c,b=i(7),_=i(53),E=b.process,w=b.Deno,k=E&&E.versions||w&&w.version,j=k&&k.v8;j&&(c=(l=j.split("."))[0]>0&&l[0]<4?1:+(l[0]+l[1])),!c&&_&&(!(l=_.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=_.match(/Chrome\/(\d+)/))&&(c=+l[1]),s.exports=c},function(s,p,i){var l=i(131),c=i(110);s.exports=Object.keys||function(b){return l(b,c)}},function(s,p,i){var l=i(68),c=Math.max,b=Math.min;s.exports=function(_,E){var w=l(_);return w<0?c(w+E,0):b(w,E)}},function(s,p){var i=Math.ceil,l=Math.floor;s.exports=function(c){var b=+c;return b!=b||b===0?0:(b>0?l:i)(b)}},function(s,p){s.exports={}},function(s,p){s.exports={}},function(s,p){s.exports=function(i,l){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:l}}},function(s,p,i){var l=i(131),c=i(110).concat("length","prototype");p.f=Object.getOwnPropertyNames||function(b){return l(b,c)}},function(s,p,i){var l=i(37).f,c=i(34),b=i(27)("toStringTag");s.exports=function(_,E,w){_&&!c(_=w?_:_.prototype,b)&&l(_,b,{configurable:!0,value:E})}},function(s,p,i){var l=i(62),c=i(15),b=i(81),_=i(38),E=i(43),w=i(119),k=c([].push),j=function(P){var D=P==1,N=P==2,L=P==3,B=P==4,X=P==6,ee=P==7,ie=P==5||X;return function(Z,V,K,z){for(var M,I,R=_(Z),F=b(R),J=l(V,K),le=E(F),ce=0,ye=z||w,xe=D?ye(Z,le):N||ee?ye(Z,0):void 0;le>ce;ce++)if((ie||ce in F)&&(I=J(M=F[ce],ce,R),P))if(D)xe[ce]=I;else if(I)switch(P){case 3:return!0;case 5:return M;case 6:return ce;case 2:k(xe,M)}else switch(P){case 4:return!1;case 7:k(xe,M)}return X?-1:L||B?B:xe}};s.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},function(s,p,i){var l=i(19),c=i(27),b=i(65),_=c("species");s.exports=function(E){return b>=51||!l(function(){var w=[];return(w.constructor={})[_]=function(){return{foo:1}},w[E](Boolean).foo!==1})}},function(s,p){var i=Function.prototype,l=i.apply,c=i.bind,b=i.call;s.exports=typeof Reflect=="object"&&Reflect.apply||(c?b.bind(l):function(){return b.apply(l,arguments)})},function(s,p,i){var l=i(76),c=i(35),b=i(15),_=i(122),E=i(154),w=i(32),k=i(45),j=i(156),P=i(123),D=i(90),N=i(41),L=i(59),B=i(113),X=i(124),ee=i(102),ie=i(151),Z=i(19),V=ie.UNSUPPORTED_Y,K=4294967295,z=Math.min,M=[].push,I=b(/./.exec),R=b(M),F=b("".slice),J=!Z(function(){var le=/(?:)/,ce=le.exec;le.exec=function(){return ce.apply(this,arguments)};var ye="ab".split(le);return ye.length!==2||ye[0]!=="a"||ye[1]!=="b"});_("split",function(le,ce,ye){var xe;return xe="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(ge,ue){var he=N(k(this)),be=ue===void 0?K:ue>>>0;if(be===0)return[];if(ge===void 0)return[he];if(!E(ge))return c(ce,he,ge,be);for(var Se,Ie,We,ke=[],Re=(ge.ignoreCase?"i":"")+(ge.multiline?"m":"")+(ge.unicode?"u":"")+(ge.sticky?"y":""),$e=0,q=new RegExp(ge.source,Re+"g");(Se=c(ee,q,he))&&!((Ie=q.lastIndex)>$e&&(R(ke,F(he,$e,Se.index)),Se.length>1&&Se.index<he.length&&l(M,ke,B(Se,1)),We=Se[0].length,$e=Ie,ke.length>=be));)q.lastIndex===Se.index&&q.lastIndex++;return $e===he.length?!We&&I(q,"")||R(ke,""):R(ke,F(he,$e)),ke.length>be?B(ke,0,be):ke}:"0".split(void 0,0).length?function(ge,ue){return ge===void 0&&ue===0?[]:c(ce,this,ge,ue)}:ce,[function(ge,ue){var he=k(this),be=ge==null?void 0:L(ge,le);return be?c(be,ge,he,ue):c(xe,N(he),ge,ue)},function(ge,ue){var he=w(this),be=N(ge),Se=ye(xe,he,be,ue,xe!==ce);if(Se.done)return Se.value;var Ie=j(he,RegExp),We=he.unicode,ke=(he.ignoreCase?"i":"")+(he.multiline?"m":"")+(he.unicode?"u":"")+(V?"g":"y"),Re=new Ie(V?"^(?:"+he.source+")":he,ke),$e=ue===void 0?K:ue>>>0;if($e===0)return[];if(be.length===0)return X(Re,be)===null?[be]:[];for(var q=0,$=0,ae=[];$<be.length;){Re.lastIndex=V?0:$;var _e,Te=X(Re,V?F(be,$):be);if(Te===null||(_e=z(D(Re.lastIndex+(V?$:0)),be.length))===q)$=P(be,$,We);else{if(R(ae,F(be,q,$)),ae.length===$e)return ae;for(var we=1;we<=Te.length-1;we++)if(R(ae,Te[we]),ae.length===$e)return ae;$=q=_e}}return R(ae,F(be,q)),ae}]},!J,V)},function(s,p,i){var l=i(36),c=i(7),b=i(15),_=i(95),E=i(44),w=i(34),k=i(143),j=i(58),P=i(88),D=i(130),N=i(19),L=i(72).f,B=i(51).f,X=i(37).f,ee=i(197),ie=i(159).trim,Z="Number",V=c.Number,K=V.prototype,z=c.TypeError,M=b("".slice),I=b("".charCodeAt),R=function(xe){var ge=D(xe,"number");return typeof ge=="bigint"?ge:F(ge)},F=function(xe){var ge,ue,he,be,Se,Ie,We,ke,Re=D(xe,"number");if(P(Re))throw z("Cannot convert a Symbol value to a number");if(typeof Re=="string"&&Re.length>2){if(Re=ie(Re),(ge=I(Re,0))===43||ge===45){if((ue=I(Re,2))===88||ue===120)return NaN}else if(ge===48){switch(I(Re,1)){case 66:case 98:he=2,be=49;break;case 79:case 111:he=8,be=55;break;default:return+Re}for(Ie=(Se=M(Re,2)).length,We=0;We<Ie;We++)if((ke=I(Se,We))<48||ke>be)return NaN;return parseInt(Se,he)}}return+Re};if(_(Z,!V(" 0o1")||!V("0b1")||V("+0x1"))){for(var J,le=function(xe){var ge=arguments.length<1?0:V(R(xe)),ue=this;return j(K,ue)&&N(function(){ee(ue)})?k(Object(ge),ue,le):ge},ce=l?L(V):"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;ce.length>ye;ye++)w(V,J=ce[ye])&&!w(le,J)&&X(le,J,B(V,J));le.prototype=K,K.constructor=le,E(c,Z,le)}},function(s,p,i){i(17)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(s,p,i){var l=i(17),c=i(214),b=i(83);l({target:"Array",proto:!0},{fill:c}),b("fill")},function(s,p,i){var l=i(7),c=i(15),b=i(19),_=i(50),E=l.Object,w=c("".split);s.exports=b(function(){return!E("z").propertyIsEnumerable(0)})?function(k){return _(k)=="String"?w(k,""):E(k)}:E},function(s,p){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}s.exports=i},function(s,p,i){var l=i(27),c=i(54),b=i(37),_=l("unscopables"),E=Array.prototype;E[_]==null&&b.f(E,_,{configurable:!0,value:c(null)}),s.exports=function(w){E[_][w]=!0}},function(s,p,i){var l=i(64),c=i(107);(s.exports=function(b,_){return c[b]||(c[b]=_!==void 0?_:{})})("versions",[]).push({version:"3.19.3",mode:l?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(s,p,i){var l=i(15),c=0,b=Math.random(),_=l(1 .toString);s.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+_(++c+b,36)}},function(s,p,i){var l=i(7),c=i(33),b=l.document,_=c(b)&&c(b.createElement);s.exports=function(E){return _?b.createElement(E):{}}},function(s,p,i){var l=i(130),c=i(88);s.exports=function(b){var _=l(b,"string");return c(_)?_:_+""}},function(s,p,i){var l=i(7),c=i(46),b=i(28),_=i(58),E=i(128),w=l.Object;s.exports=E?function(k){return typeof k=="symbol"}:function(k){var j=c("Symbol");return b(j)&&_(j.prototype,w(k))}},function(s,p,i){var l=i(7).String;s.exports=function(c){try{return l(c)}catch{return"Object"}}},function(s,p,i){var l=i(68),c=Math.min;s.exports=function(b){return b>0?c(l(b),9007199254740991):0}},function(s,p,i){var l=i(84),c=i(85),b=l("keys");s.exports=function(_){return b[_]||(b[_]=c(_))}},function(s,p,i){var l=i(15),c=i(28),b=i(107),_=l(Function.toString);c(b.inspectSource)||(b.inspectSource=function(E){return _(E)}),s.exports=b.inspectSource},function(s,p,i){var l={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,b=c&&!l.call({1:2},1);p.f=b?function(_){var E=c(this,_);return!!E&&E.enumerable}:l},function(s,p,i){var l=i(36),c=i(34),b=Function.prototype,_=l&&Object.getOwnPropertyDescriptor,E=c(b,"name"),w=E&&function(){}.name==="something",k=E&&(!l||l&&_(b,"name").configurable);s.exports={EXISTS:E,PROPER:w,CONFIGURABLE:k}},function(s,p,i){var l=i(19),c=i(28),b=/#|\.prototype\./,_=function(P,D){var N=w[E(P)];return N==j||N!=k&&(c(D)?l(D):!!D)},E=_.normalize=function(P){return String(P).replace(b,".").toLowerCase()},w=_.data={},k=_.NATIVE="N",j=_.POLYFILL="P";s.exports=_},function(s,p,i){var l=i(7),c=i(34),b=i(28),_=i(38),E=i(91),w=i(137),k=E("IE_PROTO"),j=l.Object,P=j.prototype;s.exports=w?j.getPrototypeOf:function(D){var N=_(D);if(c(N,k))return N[k];var L=N.constructor;return b(L)&&N instanceof L?L.prototype:N instanceof j?P:null}},function(s,p,i){var l=i(15),c=i(32),b=i(173);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var _,E=!1,w={};try{(_=l(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(w,[]),E=w instanceof Array}catch{}return function(k,j){return c(k),b(j),E?_(k,j):k.__proto__=j,k}}():void 0)},function(s,p,i){var l=i(7),c=i(116),b=i(28),_=i(50),E=i(27)("toStringTag"),w=l.Object,k=_(function(){return arguments}())=="Arguments";s.exports=c?_:function(j){var P,D,N;return j===void 0?"Undefined":j===null?"Null":typeof(D=function(L,B){try{return L[B]}catch{}}(P=w(j),E))=="string"?D:k?_(P):(N=_(P))=="Object"&&b(P.callee)?"Arguments":N}},function(s,p,i){var l=i(50);s.exports=Array.isArray||function(c){return l(c)=="Array"}},function(s,p,i){var l=i(15),c=i(19),b=i(28),_=i(98),E=i(46),w=i(92),k=function(){},j=[],P=E("Reflect","construct"),D=/^\s*(?:class|function)\b/,N=l(D.exec),L=!D.exec(k),B=function(X){if(!b(X))return!1;try{return P(k,j,X),!0}catch{return!1}};s.exports=!P||c(function(){var X;return B(B.call)||!B(Object)||!B(function(){X=!0})||X})?function(X){if(!b(X))return!1;switch(_(X)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return L||!!N(D,w(X))}:B},function(s,p,i){var l=i(15);s.exports=l([].slice)},function(s,p,i){var l,c,b=i(35),_=i(15),E=i(41),w=i(185),k=i(151),j=i(84),P=i(54),D=i(56).get,N=i(186),L=i(187),B=j("native-string-replace",String.prototype.replace),X=RegExp.prototype.exec,ee=X,ie=_("".charAt),Z=_("".indexOf),V=_("".replace),K=_("".slice),z=(c=/b*/g,b(X,l=/a/,"a"),b(X,c,"a"),l.lastIndex!==0||c.lastIndex!==0),M=k.BROKEN_CARET,I=/()??/.exec("")[1]!==void 0;(z||I||M||N||L)&&(ee=function(R){var F,J,le,ce,ye,xe,ge,ue=this,he=D(ue),be=E(R),Se=he.raw;if(Se)return Se.lastIndex=ue.lastIndex,F=b(ee,Se,be),ue.lastIndex=Se.lastIndex,F;var Ie=he.groups,We=M&&ue.sticky,ke=b(w,ue),Re=ue.source,$e=0,q=be;if(We&&(ke=V(ke,"y",""),Z(ke,"g")===-1&&(ke+="g"),q=K(be,ue.lastIndex),ue.lastIndex>0&&(!ue.multiline||ue.multiline&&ie(be,ue.lastIndex-1)!==`
`)&&(Re="(?: "+Re+")",q=" "+q,$e++),J=new RegExp("^(?:"+Re+")",ke)),I&&(J=new RegExp("^"+Re+"$(?!\\s)",ke)),z&&(le=ue.lastIndex),ce=b(X,We?J:ue,q),We?ce?(ce.input=K(ce.input,$e),ce[0]=K(ce[0],$e),ce.index=ue.lastIndex,ue.lastIndex+=ce[0].length):ue.lastIndex=0:z&&ce&&(ue.lastIndex=ue.global?ce.index+ce[0].length:le),I&&ce&&ce.length>1&&b(B,ce[0],J,function(){for(ye=1;ye<arguments.length-2;ye++)arguments[ye]===void 0&&(ce[ye]=void 0)}),ce&&Ie)for(ce.groups=xe=P(null),ye=0;ye<Ie.length;ye++)xe[(ge=Ie[ye])[0]]=ce[ge[1]];return ce}),s.exports=ee},function(s,p,i){var l=i(17),c=i(7),b=i(67),_=i(68),E=i(43),w=i(38),k=i(119),j=i(61),P=i(75)("splice"),D=c.TypeError,N=Math.max,L=Math.min,B=9007199254740991,X="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!P},{splice:function(ee,ie){var Z,V,K,z,M,I,R=w(this),F=E(R),J=b(ee,F),le=arguments.length;if(le===0?Z=V=0:le===1?(Z=0,V=F-J):(Z=le-2,V=L(N(_(ie),0),F-J)),F+Z-V>B)throw D(X);for(K=k(R,V),z=0;z<V;z++)(M=J+z)in R&&j(K,z,R[M]);if(K.length=V,Z<V){for(z=J;z<F-V;z++)I=z+Z,(M=z+V)in R?R[I]=R[M]:delete R[I];for(z=F;z>F-V+Z;z--)delete R[z-1]}else if(Z>V)for(z=F-V;z>J;z--)I=z+Z-1,(M=z+V-1)in R?R[I]=R[M]:delete R[I];for(z=0;z<Z;z++)R[z+J]=arguments[z+2];return R.length=F-V+Z,K}})},function(s,p,i){var l=i(17),c=i(202);l({target:"String",proto:!0,forced:i(203)("anchor")},{anchor:function(b){return c(this,"a","name",b)}})},function(s,p,i){(function(l){var c=typeof l=="object"&&l&&l.Object===Object&&l;p.a=c}).call(this,i(82))},function(s,p,i){(function(l){var c=i(31),b=y&&!y.nodeType&&y,_=b&&typeof l=="object"&&l&&!l.nodeType&&l,E=_&&_.exports===b?c.a.Buffer:void 0,w=E?E.allocUnsafe:void 0;p.a=function(k,j){if(j)return k.slice();var P=k.length,D=w?w(P):new k.constructor(P);return k.copy(D),D}}).call(this,i(121)(s))},function(s,p,i){var l=i(7),c=i(108),b="__core-js_shared__",_=l[b]||c(b,{});s.exports=_},function(s,p,i){var l=i(7),c=Object.defineProperty;s.exports=function(b,_){try{c(l,b,{value:_,configurable:!0,writable:!0})}catch{l[b]=_}return _}},function(s,p,i){var l=i(65),c=i(19);s.exports=!!Object.getOwnPropertySymbols&&!c(function(){var b=Symbol();return!String(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&l&&l<41})},function(s,p){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(s,p,i){var l=i(17),c=i(35),b=i(64),_=i(94),E=i(28),w=i(172),k=i(96),j=i(97),P=i(73),D=i(57),N=i(44),L=i(27),B=i(70),X=i(136),ee=_.PROPER,ie=_.CONFIGURABLE,Z=X.IteratorPrototype,V=X.BUGGY_SAFARI_ITERATORS,K=L("iterator"),z="keys",M="values",I="entries",R=function(){return this};s.exports=function(F,J,le,ce,ye,xe,ge){w(le,J,ce);var ue,he,be,Se=function($){if($===ye&&$e)return $e;if(!V&&$ in ke)return ke[$];switch($){case z:case M:case I:return function(){return new le(this,$)}}return function(){return new le(this)}},Ie=J+" Iterator",We=!1,ke=F.prototype,Re=ke[K]||ke["@@iterator"]||ye&&ke[ye],$e=!V&&Re||Se(ye),q=J=="Array"&&ke.entries||Re;if(q&&(ue=k(q.call(new F)))!==Object.prototype&&ue.next&&(b||k(ue)===Z||(j?j(ue,Z):E(ue[K])||N(ue,K,R)),P(ue,Ie,!0,!0),b&&(B[Ie]=R)),ee&&ye==M&&Re&&Re.name!==M&&(!b&&ie?D(ke,"name",M):(We=!0,$e=function(){return c(Re,this)})),ye)if(he={values:Se(M),keys:xe?$e:Se(z),entries:Se(I)},ge)for(be in he)(V||We||!(be in ke))&&N(ke,be,he[be]);else l({target:J,proto:!0,forced:V||We},he);return b&&!ge||ke[K]===$e||N(ke,K,$e,{name:ye}),B[J]=$e,he}},function(s,p){p.f=Object.getOwnPropertySymbols},function(s,p,i){var l=i(7),c=i(67),b=i(43),_=i(61),E=l.Array,w=Math.max;s.exports=function(k,j,P){for(var D=b(k),N=c(j,D),L=c(P===void 0?D:P,D),B=E(w(L-N,0)),X=0;N<L;N++,X++)_(B,X,k[N]);return B.length=X,B}},function(s,p,i){var l=i(7),c=i(62),b=i(35),_=i(32),E=i(89),w=i(140),k=i(43),j=i(58),P=i(141),D=i(115),N=i(142),L=l.TypeError,B=function(ee,ie){this.stopped=ee,this.result=ie},X=B.prototype;s.exports=function(ee,ie,Z){var V,K,z,M,I,R,F,J=Z&&Z.that,le=!(!Z||!Z.AS_ENTRIES),ce=!(!Z||!Z.IS_ITERATOR),ye=!(!Z||!Z.INTERRUPTED),xe=c(ie,J),ge=function(he){return V&&N(V,"normal",he),new B(!0,he)},ue=function(he){return le?(_(he),ye?xe(he[0],he[1],ge):xe(he[0],he[1])):ye?xe(he,ge):xe(he)};if(ce)V=ee;else{if(!(K=D(ee)))throw L(E(ee)+" is not iterable");if(w(K)){for(z=0,M=k(ee);M>z;z++)if((I=ue(ee[z]))&&j(X,I))return I;return new B(!1)}V=P(ee,K)}for(R=V.next;!(F=b(R,V)).done;){try{I=ue(F.value)}catch(he){N(V,"throw",he)}if(typeof I=="object"&&I&&j(X,I))return I}return new B(!1)}},function(s,p,i){var l=i(98),c=i(59),b=i(70),_=i(27)("iterator");s.exports=function(E){if(E!=null)return c(E,_)||c(E,"@@iterator")||b[l(E)]}},function(s,p,i){var l={};l[i(27)("toStringTag")]="z",s.exports=String(l)==="[object z]"},function(s,p,i){var l=i(7),c=i(58),b=l.TypeError;s.exports=function(_,E){if(c(E,_))return _;throw b("Incorrect invocation")}},function(s,p,i){var l=i(27)("iterator"),c=!1;try{var b=0,_={next:function(){return{done:!!b++}},return:function(){c=!0}};_[l]=function(){return this},Array.from(_,function(){throw 2})}catch{}s.exports=function(E,w){if(!w&&!c)return!1;var k=!1;try{var j={};j[l]=function(){return{next:function(){return{done:k=!0}}}},E(j)}catch{}return k}},function(s,p,i){var l=i(181);s.exports=function(c,b){return new(l(c))(b===0?0:b)}},function(s,p,i){var l=i(19);s.exports=function(c,b){var _=[][c];return!!_&&l(function(){_.call(null,b||function(){throw 1},1)})}},function(s,p){s.exports=function(i){if(!i.webpackPolyfill){var l=Object.create(i);l.children||(l.children=[]),Object.defineProperty(l,"loaded",{enumerable:!0,get:function(){return l.l}}),Object.defineProperty(l,"id",{enumerable:!0,get:function(){return l.i}}),Object.defineProperty(l,"exports",{enumerable:!0}),l.webpackPolyfill=1}return l}},function(s,p,i){i(18);var l=i(15),c=i(44),b=i(102),_=i(19),E=i(27),w=i(57),k=E("species"),j=RegExp.prototype;s.exports=function(P,D,N,L){var B=E(P),X=!_(function(){var V={};return V[B]=function(){return 7},""[P](V)!=7}),ee=X&&!_(function(){var V=!1,K=/a/;return P==="split"&&((K={}).constructor={},K.constructor[k]=function(){return K},K.flags="",K[B]=/./[B]),K.exec=function(){return V=!0,null},K[B](""),!V});if(!X||!ee||N){var ie=l(/./[B]),Z=D(B,""[P],function(V,K,z,M,I){var R=l(V),F=K.exec;return F===b||F===j.exec?X&&!I?{done:!0,value:ie(K,z,M)}:{done:!0,value:R(z,K,M)}:{done:!1}});c(String.prototype,P,Z[0]),c(j,B,Z[1])}L&&w(j[B],"sham",!0)}},function(s,p,i){var l=i(146).charAt;s.exports=function(c,b,_){return b+(_?l(c,b).length:1)}},function(s,p,i){var l=i(7),c=i(35),b=i(32),_=i(28),E=i(50),w=i(102),k=l.TypeError;s.exports=function(j,P){var D=j.exec;if(_(D)){var N=c(D,j,P);return N!==null&&b(N),N}if(E(j)==="RegExp")return c(w,j,P);throw k("RegExp#exec called on incompatible receiver")}},function(s,p,i){var l=i(76),c=i(35),b=i(15),_=i(122),E=i(19),w=i(32),k=i(28),j=i(68),P=i(90),D=i(41),N=i(45),L=i(123),B=i(59),X=i(198),ee=i(124),ie=i(27)("replace"),Z=Math.max,V=Math.min,K=b([].concat),z=b([].push),M=b("".indexOf),I=b("".slice),R="a".replace(/./,"$0")==="$0",F=!!/./[ie]&&/./[ie]("a","$0")==="";_("replace",function(J,le,ce){var ye=F?"$":"$0";return[function(xe,ge){var ue=N(this),he=xe==null?void 0:B(xe,ie);return he?c(he,xe,ue,ge):c(le,D(ue),xe,ge)},function(xe,ge){var ue=w(this),he=D(xe);if(typeof ge=="string"&&M(ge,ye)===-1&&M(ge,"$<")===-1){var be=ce(le,ue,he,ge);if(be.done)return be.value}var Se=k(ge);Se||(ge=D(ge));var Ie=ue.global;if(Ie){var We=ue.unicode;ue.lastIndex=0}for(var ke=[];;){var Re=ee(ue,he);if(Re===null||(z(ke,Re),!Ie))break;D(Re[0])===""&&(ue.lastIndex=L(he,P(ue.lastIndex),We))}for(var $e,q="",$=0,ae=0;ae<ke.length;ae++){for(var _e=D((Re=ke[ae])[0]),Te=Z(V(j(Re.index),he.length),0),we=[],Ke=1;Ke<Re.length;Ke++)z(we,($e=Re[Ke])===void 0?$e:String($e));var nt=Re.groups;if(Se){var Ze=K([_e],we,Te,he);nt!==void 0&&z(Ze,nt);var Ue=D(l(ge,void 0,Ze))}else Ue=X(_e,he,Te,we,nt,ge);Te>=$&&(q+=I(he,$,Te)+Ue,$=Te+_e.length)}return q+I(he,$)}]},!!E(function(){var J=/./;return J.exec=function(){var le=[];return le.groups={a:"7"},le},"".replace(J,"$<a>")!=="7"})||!R||F)},function(s,p,i){var l=i(50),c=i(7);s.exports=l(c.process)=="process"},function(s,p,i){i(17)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(s,p,i){var l=i(109);s.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(s,p,i){var l=i(36),c=i(19),b=i(86);s.exports=!l&&!c(function(){return Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a!=7})},function(s,p,i){var l=i(7),c=i(35),b=i(33),_=i(88),E=i(59),w=i(170),k=i(27),j=l.TypeError,P=k("toPrimitive");s.exports=function(D,N){if(!b(D)||_(D))return D;var L,B=E(D,P);if(B){if(N===void 0&&(N="default"),L=c(B,D,N),!b(L)||_(L))return L;throw j("Can't convert object to primitive value")}return N===void 0&&(N="number"),w(D,N)}},function(s,p,i){var l=i(15),c=i(34),b=i(40),_=i(132).indexOf,E=i(69),w=l([].push);s.exports=function(k,j){var P,D=b(k),N=0,L=[];for(P in D)!c(E,P)&&c(D,P)&&w(L,P);for(;j.length>N;)c(D,P=j[N++])&&(~_(L,P)||w(L,P));return L}},function(s,p,i){var l=i(40),c=i(67),b=i(43),_=function(E){return function(w,k,j){var P,D=l(w),N=b(D),L=c(j,N);if(E&&k!=k){for(;N>L;)if((P=D[L++])!=P)return!0}else for(;N>L;L++)if((E||L in D)&&D[L]===k)return E||L||0;return!E&&-1}};s.exports={includes:_(!0),indexOf:_(!1)}},function(s,p,i){var l=i(46);s.exports=l("document","documentElement")},function(s,p,i){var l=i(34),c=i(135),b=i(51),_=i(37);s.exports=function(E,w){for(var k=c(w),j=_.f,P=b.f,D=0;D<k.length;D++){var N=k[D];l(E,N)||j(E,N,P(w,N))}}},function(s,p,i){var l=i(46),c=i(15),b=i(72),_=i(112),E=i(32),w=c([].concat);s.exports=l("Reflect","ownKeys")||function(k){var j=b.f(E(k)),P=_.f;return P?w(j,P(k)):j}},function(s,p,i){var l,c,b,_=i(19),E=i(28),w=i(54),k=i(96),j=i(44),P=i(27),D=i(64),N=P("iterator"),L=!1;[].keys&&("next"in(b=[].keys())?(c=k(k(b)))!==Object.prototype&&(l=c):L=!0),l==null||_(function(){var B={};return l[N].call(B)!==B})?l={}:D&&(l=w(l)),E(l[N])||j(l,N,function(){return this}),s.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:L}},function(s,p,i){var l=i(19);s.exports=!l(function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype})},function(s,p,i){var l=i(17),c=i(15),b=i(69),_=i(33),E=i(34),w=i(37).f,k=i(72),j=i(139),P=i(175),D=i(85),N=i(177),L=!1,B=D("meta"),X=0,ee=function(Z){w(Z,B,{value:{objectID:"O"+X++,weakData:{}}})},ie=s.exports={enable:function(){ie.enable=function(){},L=!0;var Z=k.f,V=c([].splice),K={};K[B]=1,Z(K).length&&(k.f=function(z){for(var M=Z(z),I=0,R=M.length;I<R;I++)if(M[I]===B){V(M,I,1);break}return M},l({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:j.f}))},fastKey:function(Z,V){if(!_(Z))return typeof Z=="symbol"?Z:(typeof Z=="string"?"S":"P")+Z;if(!E(Z,B)){if(!P(Z))return"F";if(!V)return"E";ee(Z)}return Z[B].objectID},getWeakData:function(Z,V){if(!E(Z,B)){if(!P(Z))return!0;if(!V)return!1;ee(Z)}return Z[B].weakData},onFreeze:function(Z){return N&&L&&P(Z)&&!E(Z,B)&&ee(Z),Z}};b[B]=!0},function(s,p,i){var l=i(50),c=i(40),b=i(72).f,_=i(113),E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(w){return E&&l(w)=="Window"?function(k){try{return b(k)}catch{return _(E)}}(w):b(c(w))}},function(s,p,i){var l=i(27),c=i(70),b=l("iterator"),_=Array.prototype;s.exports=function(E){return E!==void 0&&(c.Array===E||_[b]===E)}},function(s,p,i){var l=i(7),c=i(35),b=i(55),_=i(32),E=i(89),w=i(115),k=l.TypeError;s.exports=function(j,P){var D=arguments.length<2?w(j):P;if(b(D))return _(c(D,j));throw k(E(j)+" is not iterable")}},function(s,p,i){var l=i(35),c=i(32),b=i(59);s.exports=function(_,E,w){var k,j;c(_);try{if(!(k=b(_,"return"))){if(E==="throw")throw w;return w}k=l(k,_)}catch(P){j=!0,k=P}if(E==="throw")throw w;if(j)throw k;return c(k),w}},function(s,p,i){var l=i(28),c=i(33),b=i(97);s.exports=function(_,E,w){var k,j;return b&&l(k=E.constructor)&&k!==w&&c(j=k.prototype)&&j!==w.prototype&&b(_,j),_}},function(s,p,i){var l=i(44);s.exports=function(c,b,_){for(var E in b)l(c,E,b[E],_);return c}},function(s,p,i){var l=i(46),c=i(37),b=i(27),_=i(36),E=b("species");s.exports=function(w){var k=l(w),j=c.f;_&&k&&!k[E]&&j(k,E,{configurable:!0,get:function(){return this}})}},function(s,p,i){var l=i(15),c=i(68),b=i(41),_=i(45),E=l("".charAt),w=l("".charCodeAt),k=l("".slice),j=function(P){return function(D,N){var L,B,X=b(_(D)),ee=c(N),ie=X.length;return ee<0||ee>=ie?P?"":void 0:(L=w(X,ee))<55296||L>56319||ee+1===ie||(B=w(X,ee+1))<56320||B>57343?P?E(X,ee):L:P?k(X,ee,ee+2):B-56320+(L-55296<<10)+65536}};s.exports={codeAt:j(!1),charAt:j(!0)}},function(s,p){s.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(s,p,i){var l=i(86)("span").classList,c=l&&l.constructor&&l.constructor.prototype;s.exports=c===Object.prototype?void 0:c},function(s,p,i){var l=i(27);p.f=l},function(s,p,i){var l=i(182),c=i(34),b=i(149),_=i(37).f;s.exports=function(E){var w=l.Symbol||(l.Symbol={});c(w,E)||_(w,E,{value:b.f(E)})}},function(s,p,i){var l=i(19),c=i(7).RegExp,b=l(function(){var w=c("a","y");return w.lastIndex=2,w.exec("abcd")!=null}),_=b||l(function(){return!c("a","y").sticky}),E=b||l(function(){var w=c("^r","gy");return w.lastIndex=2,w.exec("str")!=null});s.exports={BROKEN_CARET:E,MISSED_STICKY:_,UNSUPPORTED_Y:b}},function(s,p,i){var l=i(17),c=i(132).includes,b=i(83);l({target:"Array",proto:!0},{includes:function(_){return c(this,_,arguments.length>1?arguments[1]:void 0)}}),b("includes")},function(s,p,i){var l=i(17),c=i(15),b=i(194),_=i(45),E=i(41),w=i(195),k=c("".indexOf);l({target:"String",proto:!0,forced:!w("includes")},{includes:function(j){return!!~k(E(_(this)),E(b(j)),arguments.length>1?arguments[1]:void 0)}})},function(s,p,i){var l=i(33),c=i(50),b=i(27)("match");s.exports=function(_){var E;return l(_)&&((E=_[b])!==void 0?!!E:c(_)=="RegExp")}},function(s,p){var i,l,c=s.exports={};function b(){throw new Error("setTimeout has not been defined")}function _(){throw new Error("clearTimeout has not been defined")}function E(X){if(i===setTimeout)return setTimeout(X,0);if((i===b||!i)&&setTimeout)return i=setTimeout,setTimeout(X,0);try{return i(X,0)}catch{try{return i.call(null,X,0)}catch{return i.call(this,X,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:b}catch{i=b}try{l=typeof clearTimeout=="function"?clearTimeout:_}catch{l=_}})();var w,k=[],j=!1,P=-1;function D(){j&&w&&(j=!1,w.length?k=w.concat(k):P=-1,k.length&&N())}function N(){if(!j){var X=E(D);j=!0;for(var ee=k.length;ee;){for(w=k,k=[];++P<ee;)w&&w[P].run();P=-1,ee=k.length}w=null,j=!1,function(ie){if(l===clearTimeout)return clearTimeout(ie);if((l===_||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(ie);try{l(ie)}catch{try{return l.call(null,ie)}catch{return l.call(this,ie)}}}(X)}}function L(X,ee){this.fun=X,this.array=ee}function B(){}c.nextTick=function(X){var ee=new Array(arguments.length-1);if(arguments.length>1)for(var ie=1;ie<arguments.length;ie++)ee[ie-1]=arguments[ie];k.push(new L(X,ee)),k.length!==1||j||E(N)},L.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=B,c.addListener=B,c.once=B,c.off=B,c.removeListener=B,c.removeAllListeners=B,c.emit=B,c.prependListener=B,c.prependOnceListener=B,c.listeners=function(X){return[]},c.binding=function(X){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(X){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(s,p,i){var l=i(32),c=i(157),b=i(27)("species");s.exports=function(_,E){var w,k=l(_).constructor;return k===void 0||(w=l(k)[b])==null?E:c(w)}},function(s,p,i){var l=i(7),c=i(100),b=i(89),_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not a constructor")}},function(s,p,i){var l=i(17),c=i(159).trim;l({target:"String",proto:!0,forced:i(196)("trim")},{trim:function(){return c(this)}})},function(s,p,i){var l=i(15),c=i(45),b=i(41),_=i(160),E=l("".replace),w="["+_+"]",k=RegExp("^"+w+w+"*"),j=RegExp(w+w+"*$"),P=function(D){return function(N){var L=b(c(N));return 1&D&&(L=E(L,k,"")),2&D&&(L=E(L,j,"")),L}};s.exports={start:P(1),end:P(2),trim:P(3)}},function(s,p){s.exports=`
\v\f\r    \u2028\u2029\uFEFF`},function(s,p,i){var l=i(35),c=i(122),b=i(32),_=i(90),E=i(41),w=i(45),k=i(59),j=i(123),P=i(124);c("match",function(D,N,L){return[function(B){var X=w(this),ee=B==null?void 0:k(B,D);return ee?l(ee,B,X):new RegExp(B)[D](E(X))},function(B){var X=b(this),ee=E(B),ie=L(N,X,ee);if(ie.done)return ie.value;if(!X.global)return P(X,ee);var Z=X.unicode;X.lastIndex=0;for(var V,K=[],z=0;(V=P(X,ee))!==null;){var M=E(V[0]);K[z]=M,M===""&&(X.lastIndex=j(ee,_(X.lastIndex),Z)),z++}return z===0?null:K}]})},function(s,p,i){var l=i(17),c=Math.hypot,b=Math.abs,_=Math.sqrt;l({target:"Math",stat:!0,forced:!!c&&c(1/0,NaN)!==1/0},{hypot:function(E,w){for(var k,j,P=0,D=0,N=arguments.length,L=0;D<N;)L<(k=b(arguments[D++]))?(P=P*(j=L/k)*j+1,L=k):P+=k>0?(j=k/L)*j:k;return L===1/0?1/0:L*_(P)}})},function(s,p,i){var l,c,b,_,E=i(7),w=i(76),k=i(62),j=i(28),P=i(34),D=i(19),N=i(133),L=i(101),B=i(86),X=i(164),ee=i(126),ie=E.setImmediate,Z=E.clearImmediate,V=E.process,K=E.Dispatch,z=E.Function,M=E.MessageChannel,I=E.String,R=0,F={},J="onreadystatechange";try{l=E.location}catch{}var le=function(ge){if(P(F,ge)){var ue=F[ge];delete F[ge],ue()}},ce=function(ge){return function(){le(ge)}},ye=function(ge){le(ge.data)},xe=function(ge){E.postMessage(I(ge),l.protocol+"//"+l.host)};ie&&Z||(ie=function(ge){var ue=L(arguments,1);return F[++R]=function(){w(j(ge)?ge:z(ge),void 0,ue)},c(R),R},Z=function(ge){delete F[ge]},ee?c=function(ge){V.nextTick(ce(ge))}:K&&K.now?c=function(ge){K.now(ce(ge))}:M&&!X?(_=(b=new M).port2,b.port1.onmessage=ye,c=k(_.postMessage,_)):E.addEventListener&&j(E.postMessage)&&!E.importScripts&&l&&l.protocol!=="file:"&&!D(xe)?(c=xe,E.addEventListener("message",ye,!1)):c=J in B("script")?function(ge){N.appendChild(B("script")).onreadystatechange=function(){N.removeChild(this),le(ge)}}:function(ge){setTimeout(ce(ge),0)}),s.exports={set:ie,clear:Z}},function(s,p,i){var l=i(53);s.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(l)},function(s,p,i){var l=i(55),c=function(b){var _,E;this.promise=new b(function(w,k){if(_!==void 0||E!==void 0)throw TypeError("Bad Promise constructor");_=w,E=k}),this.resolve=l(_),this.reject=l(E)};s.exports.f=function(b){return new c(b)}},function(s,p,i){p.a=function(){return!1}},function(s,p,i){(function(l){i.d(p,"a",function(){return V});var c=i(1);function b(M){throw new Error("[mobx-utils] "+M)}function _(M,I){I===void 0&&(I="Illegal state"),M||b(I)}var E=function(M){return M&&M!==Object.prototype&&Object.getOwnPropertyNames(M).concat(E(Object.getPrototypeOf(M))||[])},w=function(M){return function(I){var R=E(I);return R.filter(function(F,J){return R.indexOf(F)===J})}(M).filter(function(I){return I!=="constructor"&&!~I.indexOf("__")})},k="pending",j="fulfilled",P="rejected";function D(M){switch(this.state){case k:return M.pending&&M.pending(this.value);case P:return M.rejected&&M.rejected(this.value);case j:return M.fulfilled?M.fulfilled(this.value):this.value}}function N(M,I){if(_(arguments.length<=2,"fromPromise expects up to two arguments"),_(typeof M=="function"||typeof M=="object"&&M&&typeof M.then=="function","Please pass a promise or function to fromPromise"),M.isPromiseBasedObservable===!0)return M;typeof M=="function"&&(M=new Promise(M));var R=M;M.then(Object(c.k)("observableFromPromise-resolve",function(J){R.value=J,R.state=j}),Object(c.k)("observableFromPromise-reject",function(J){R.value=J,R.state=P})),R.isPromiseBasedObservable=!0,R.case=D;var F=I&&I.state===j?I.value:void 0;return Object(c.q)(R,{value:F,state:k},{},{deep:!1}),R}(function(M){M.reject=Object(c.k)("fromPromise.reject",function(I){var R=M(Promise.reject(I));return R.state=P,R.value=I,R}),M.resolve=Object(c.k)("fromPromise.resolve",function(I){I===void 0&&(I=void 0);var R=M(Promise.resolve(I));return R.state=j,R.value=I,R})})(N||(N={}));var L=function(M,I,R,F){var J,le=arguments.length,ce=le<3?I:F===null?F=Object.getOwnPropertyDescriptor(I,R):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(M,I,R,F);else for(var ye=M.length-1;ye>=0;ye--)(J=M[ye])&&(ce=(le<3?J(ce):le>3?J(I,R,ce):J(I,R))||ce);return le>3&&ce&&Object.defineProperty(I,R,ce),ce};(function(){function M(I,R){var F=this;Object(c.G)(function(){F.current=R,F.subscription=I.subscribe(F)})}M.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},M.prototype.next=function(I){this.current=I},M.prototype.complete=function(){this.dispose()},M.prototype.error=function(I){this.current=I,this.dispose()},L([c.C.ref],M.prototype,"current",void 0),L([c.k.bound],M.prototype,"next",null),L([c.k.bound],M.prototype,"complete",null),L([c.k.bound],M.prototype,"error",null)})();var B=function(){return B=Object.assign||function(M){for(var I,R=1,F=arguments.length;R<F;R++)for(var J in I=arguments[R])Object.prototype.hasOwnProperty.call(I,J)&&(M[J]=I[J]);return M},B.apply(this,arguments)},X=function(M,I,R,F){var J,le=arguments.length,ce=le<3?I:F===null?F=Object.getOwnPropertyDescriptor(I,R):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(M,I,R,F);else for(var ye=M.length-1;ye>=0;ye--)(J=M[ye])&&(ce=(le<3?J(ce):le>3?J(I,R,ce):J(I,R))||ce);return le>3&&ce&&Object.defineProperty(I,R,ce),ce},ee=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function M(I){var R=this;this.model=I,this.localValues=c.C.map({}),this.localComputedValues=c.C.map({}),this.isPropertyDirty=function(F){return R.localValues.has(F)},_(Object(c.A)(I),"createViewModel expects an observable object"),w(I).forEach(function(F){if(F!==c.a&&F!=="__mobxDidRunLazyInitializers"){if(_(ee.indexOf(F)===-1,"The propertyname "+F+" is reserved and cannot be used with viewModels"),Object(c.w)(I,F)){var J=Object(c.h)(I,F).derivation;R.localComputedValues.set(F,Object(c.m)(J.bind(R)))}var le=Object.getOwnPropertyDescriptor(I,F),ce=le?{enumerable:le.enumerable}:{};Object.defineProperty(R,F,B(B({},ce),{configurable:!0,get:function(){return Object(c.w)(I,F)?R.localComputedValues.get(F).get():R.isPropertyDirty(F)?R.localValues.get(F):R.model[F]},set:Object(c.k)(function(ye){ye!==R.model[F]?R.localValues.set(F,ye):R.localValues.delete(F)})}))}})}Object.defineProperty(M.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),M.prototype.submit=function(){var I=this;Object(c.B)(this.localValues).forEach(function(R){var F=I.localValues.get(R),J=I.model[R];Object(c.y)(J)?J.replace(F):Object(c.z)(J)?(J.clear(),J.merge(F)):Object(c.v)(F)||(I.model[R]=F)}),this.localValues.clear()},M.prototype.reset=function(){this.localValues.clear()},M.prototype.resetProperty=function(I){this.localValues.delete(I)},X([c.m],M.prototype,"isDirty",null),X([c.m],M.prototype,"changedValues",null),X([c.k.bound],M.prototype,"submit",null),X([c.k.bound],M.prototype,"reset",null),X([c.k.bound],M.prototype,"resetProperty",null)})();function ie(M){if(!M)return"ROOT";for(var I=[];M.parent;)I.push(M.path),M=M.parent;return I.reverse().join("/")}function Z(M){return Object(c.A)(M)||Object(c.y)(M)||Object(c.z)(M)}function V(M,I){var R=new WeakMap;function F(ce){var ye=R.get(ce.object);(function(xe,ge){switch(xe.type){case"add":J(xe.newValue,ge,xe.name);break;case"update":le(xe.oldValue),J(xe.newValue,ge,xe.name||""+xe.index);break;case"remove":case"delete":le(xe.oldValue);break;case"splice":xe.removed.map(le),xe.added.forEach(function(be,Se){return J(be,ge,""+(xe.index+Se))});for(var ue=xe.index+xe.addedCount;ue<xe.object.length;ue++)if(Z(xe.object[ue])){var he=R.get(xe.object[ue]);he&&(he.path=""+ue)}}})(ce,ye),I(ce,ie(ye),M)}function J(ce,ye,xe){if(Z(ce)){var ge=R.get(ce);if(ge){if(ge.parent!==ye||ge.path!==xe)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+ie(ye)+"/"+xe+"', but it already exists at '"+ie(ge.parent)+"/"+ge.path+"'")}else{var ue={parent:ye,path:xe,dispose:Object(c.D)(ce,F)};R.set(ce,ue),Object(c.p)(ce).forEach(function(he){var be=he[0];return J(he[1],ue,be)})}}}function le(ce){if(Z(ce)){var ye=R.get(ce);if(!ye)return;R.delete(ce),ye.dispose(),Object(c.L)(ce).forEach(le)}}return J(M,void 0,""),function(){le(M)}}var K,z=(K=function(M,I){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,F){R.__proto__=F}||function(R,F){for(var J in F)F.hasOwnProperty(J)&&(R[J]=F[J])},K(M,I)},function(M,I){function R(){this.constructor=M}K(M,I),M.prototype=I===null?Object.create(I):(R.prototype=I.prototype,new R)});(function(M){function I(R,F,J){var le=J===void 0?{}:J,ce=le.name,ye=ce===void 0?"ogm"+(1e3*Math.random()|0):ce,xe=le.keyToName,ge=xe===void 0?function(be){return""+be}:xe,ue=M.call(this)||this;ue._keyToName=ge,ue._groupBy=F,ue._ogmInfoKey=Symbol("ogmInfo"+ye),ue._base=R;for(var he=0;he<R.length;he++)ue._addItem(R[he]);return ue._disposeBaseObserver=Object(c.D)(ue._base,function(be){if(be.type==="splice")Object(c.J)(function(){for(var Se=0,Ie=be.removed;Se<Ie.length;Se++){var We=Ie[Se];ue._removeItem(We)}for(var ke=0,Re=be.added;ke<Re.length;ke++){var $e=Re[ke];ue._addItem($e)}});else{if(be.type!=="update")throw new Error("illegal state");Object(c.J)(function(){ue._removeItem(be.oldValue),ue._addItem(be.newValue)})}}),ue}z(I,M),I.prototype.clear=function(){throw new Error("not supported")},I.prototype.delete=function(R){throw new Error("not supported")},I.prototype.set=function(R,F){throw new Error("not supported")},I.prototype.dispose=function(){this._disposeBaseObserver();for(var R=0;R<this._base.length;R++){var F=this._base[R];F[this._ogmInfoKey].reaction(),delete F[this._ogmInfoKey]}},I.prototype._getGroupArr=function(R){var F=M.prototype.get.call(this,R);return F===void 0&&(F=Object(c.C)([],{name:"GroupArray["+this._keyToName(R)+"]",deep:!1}),M.prototype.set.call(this,R,F)),F},I.prototype._removeFromGroupArr=function(R,F){var J=M.prototype.get.call(this,R);J.length===1?M.prototype.delete.call(this,R):(F===J.length-1||(J[F]=J[J.length-1],J[F][this._ogmInfoKey].groupArrIndex=F),J.length--)},I.prototype._addItem=function(R){var F=this,J=this._groupBy(R),le=this._getGroupArr(J),ce={groupByValue:J,groupArrIndex:le.length,reaction:Object(c.F)(function(){return F._groupBy(R)},function(ye,xe){var ge=R[F._ogmInfoKey];F._removeFromGroupArr(ge.groupByValue,ge.groupArrIndex);var ue=F._getGroupArr(ye),he=ue.length;ue.push(R),ge.groupByValue=ye,ge.groupArrIndex=he})};Object.defineProperty(R,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:ce}),le.push(R)},I.prototype._removeItem=function(R){var F=R[this._ogmInfoKey];this._removeFromGroupArr(F.groupByValue,F.groupArrIndex),F.reaction(),delete R[this._ogmInfoKey]}})(c.b),function(){function M(I,R){this.base=I,this.args=R,this.closestIdx=0,this.isDisposed=!1;for(var F=this.closest=this.root=I,J=0;J<this.args.length-1&&(F=F.get(R[J]));J++)this.closest=F;this.closestIdx=J}return M.prototype.exists=function(){this.assertNotDisposed();var I=this.args.length;return this.closestIdx>=I-1&&this.closest.has(this.args[I-1])},M.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])},M.prototype.set=function(I){this.assertNotDisposed();for(var R=this.args.length,F=this.closest,J=this.closestIdx;J<R-1;J++){var le=new Map;F.set(this.args[J],le),F=le}this.closestIdx=R-1,this.closest=F,F.set(this.args[R-1],I)},M.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var I=this.args.length;this.closest.delete(this.args[I-1]);for(var R=this.root,F=[R],J=0;J<I-1;J++)R=R.get(this.args[J]),F.push(R);for(J=F.length-1;J>0;J--)F[J].size===0&&F[J-1].delete(this.args[J-1]);this.isDisposed=!0},M.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},M}(),Promise.resolve(),typeof queueMicrotask<"u"||l!==void 0&&l.nextTick}).call(this,i(155))},function(s,p,i){var l;(function(c,b,_){if(c){for(var E,w={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"},k={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},j={"~":"`","!":"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"},D=1;D<20;++D)w[111+D]="f"+D;for(D=0;D<=9;++D)w[D+96]=D.toString();Z.prototype.bind=function(V,K,z){var M=this;return V=V instanceof Array?V:[V],M._bindMultiple.call(M,V,K,z),M},Z.prototype.unbind=function(V,K){return this.bind.call(this,V,function(){},K)},Z.prototype.trigger=function(V,K){var z=this;return z._directMap[V+":"+K]&&z._directMap[V+":"+K]({},V),z},Z.prototype.reset=function(){var V=this;return V._callbacks={},V._directMap={},V},Z.prototype.stopCallback=function(V,K){if((" "+K.className+" ").indexOf(" mousetrap ")>-1||ie(K,this.target))return!1;if("composedPath"in V&&typeof V.composedPath=="function"){var z=V.composedPath()[0];z!==V.target&&(K=z)}return K.tagName=="INPUT"||K.tagName=="SELECT"||K.tagName=="TEXTAREA"||K.isContentEditable},Z.prototype.handleKey=function(){var V=this;return V._handleKey.apply(V,arguments)},Z.addKeycodes=function(V){for(var K in V)V.hasOwnProperty(K)&&(w[K]=V[K]);E=null},Z.init=function(){var V=Z(b);for(var K in V)K.charAt(0)!=="_"&&(Z[K]=function(z){return function(){return V[z].apply(V,arguments)}}(K))},Z.init(),c.Mousetrap=Z,s.exports&&(s.exports=Z),(l=function(){return Z}.call(p,i,p,s))===void 0||(s.exports=l)}function N(V,K,z){V.addEventListener?V.addEventListener(K,z,!1):V.attachEvent("on"+K,z)}function L(V){if(V.type=="keypress"){var K=String.fromCharCode(V.which);return V.shiftKey||(K=K.toLowerCase()),K}return w[V.which]?w[V.which]:k[V.which]?k[V.which]:String.fromCharCode(V.which).toLowerCase()}function B(V){return V=="shift"||V=="ctrl"||V=="alt"||V=="meta"}function X(V,K,z){return z||(z=function(){if(!E)for(var M in E={},w)M>95&&M<112||w.hasOwnProperty(M)&&(E[w[M]]=M);return E}()[V]?"keydown":"keypress"),z=="keypress"&&K.length&&(z="keydown"),z}function ee(V,K){var z,M,I,R=[];for(z=function(F){return F==="+"?["+"]:(F=F.replace(/\+{2}/g,"+plus")).split("+")}(V),I=0;I<z.length;++I)M=z[I],P[M]&&(M=P[M]),K&&K!="keypress"&&j[M]&&(M=j[M],R.push("shift")),B(M)&&R.push(M);return{key:M,modifiers:R,action:K=X(M,R,K)}}function ie(V,K){return V!==null&&V!==b&&(V===K||ie(V.parentNode,K))}function Z(V){var K=this;if(V=V||b,!(K instanceof Z))return new Z(V);K.target=V,K._callbacks={},K._directMap={};var z,M={},I=!1,R=!1,F=!1;function J(ue){ue=ue||{};var he,be=!1;for(he in M)ue[he]?be=!0:M[he]=0;be||(F=!1)}function le(ue,he,be,Se,Ie,We){var ke,Re,$e,q,$=[],ae=be.type;if(!K._callbacks[ue])return[];for(ae=="keyup"&&B(ue)&&(he=[ue]),ke=0;ke<K._callbacks[ue].length;++ke)if(Re=K._callbacks[ue][ke],(Se||!Re.seq||M[Re.seq]==Re.level)&&ae==Re.action&&(ae=="keypress"&&!be.metaKey&&!be.ctrlKey||($e=he,q=Re.modifiers,$e.sort().join(",")===q.sort().join(",")))){var _e=!Se&&Re.combo==Ie,Te=Se&&Re.seq==Se&&Re.level==We;(_e||Te)&&K._callbacks[ue].splice(ke,1),$.push(Re)}return $}function ce(ue,he,be,Se){K.stopCallback(he,he.target||he.srcElement,be,Se)||ue(he,be)===!1&&(function(Ie){Ie.preventDefault?Ie.preventDefault():Ie.returnValue=!1}(he),function(Ie){Ie.stopPropagation?Ie.stopPropagation():Ie.cancelBubble=!0}(he))}function ye(ue){typeof ue.which!="number"&&(ue.which=ue.keyCode);var he=L(ue);he&&(ue.type!="keyup"||I!==he?K.handleKey(he,function(be){var Se=[];return be.shiftKey&&Se.push("shift"),be.altKey&&Se.push("alt"),be.ctrlKey&&Se.push("ctrl"),be.metaKey&&Se.push("meta"),Se}(ue),ue):I=!1)}function xe(ue,he,be,Se){function Ie($e){return function(){F=$e,++M[ue],clearTimeout(z),z=setTimeout(J,1e3)}}function We($e){ce(be,$e,ue),Se!=="keyup"&&(I=L($e)),setTimeout(J,10)}M[ue]=0;for(var ke=0;ke<he.length;++ke){var Re=ke+1===he.length?We:Ie(Se||ee(he[ke+1]).action);ge(he[ke],Re,Se,ue,ke)}}function ge(ue,he,be,Se,Ie){K._directMap[ue+":"+be]=he;var We,ke=(ue=ue.replace(/\s+/g," ")).split(" ");ke.length>1?xe(ue,ke,he,be):(We=ee(ue,be),K._callbacks[We.key]=K._callbacks[We.key]||[],le(We.key,We.modifiers,{type:We.action},Se,ue,Ie),K._callbacks[We.key][Se?"unshift":"push"]({callback:he,modifiers:We.modifiers,action:We.action,seq:Se,level:Ie,combo:ue}))}K._handleKey=function(ue,he,be){var Se,Ie=le(ue,he,be),We={},ke=0,Re=!1;for(Se=0;Se<Ie.length;++Se)Ie[Se].seq&&(ke=Math.max(ke,Ie[Se].level));for(Se=0;Se<Ie.length;++Se)if(Ie[Se].seq){if(Ie[Se].level!=ke)continue;Re=!0,We[Ie[Se].seq]=1,ce(Ie[Se].callback,be,Ie[Se].combo,Ie[Se].seq)}else Re||ce(Ie[Se].callback,be,Ie[Se].combo);var $e=be.type=="keypress"&&R;be.type!=F||B(ue)||$e||J(We),R=Re&&be.type=="keydown"},K._bindMultiple=function(ue,he,be){for(var Se=0;Se<ue.length;++Se)ge(ue[Se],he,be)},N(V,"keypress",ye),N(V,"keydown",ye),N(V,"keyup",ye)}})(typeof window<"u"?window:null,typeof window<"u"?document:null)},function(s,p,i){var l=i(36),c=i(37),b=i(32),_=i(40),E=i(66);s.exports=l?Object.defineProperties:function(w,k){b(w);for(var j,P=_(k),D=E(k),N=D.length,L=0;N>L;)c.f(w,j=D[L++],P[j]);return w}},function(s,p,i){var l=i(7),c=i(35),b=i(28),_=i(33),E=l.TypeError;s.exports=function(w,k){var j,P;if(k==="string"&&b(j=w.toString)&&!_(P=c(j,w))||b(j=w.valueOf)&&!_(P=c(j,w))||k!=="string"&&b(j=w.toString)&&!_(P=c(j,w)))return P;throw E("Can't convert object to primitive value")}},function(s,p,i){var l=i(7),c=i(28),b=i(92),_=l.WeakMap;s.exports=c(_)&&/native code/.test(b(_))},function(s,p,i){var l=i(136).IteratorPrototype,c=i(54),b=i(71),_=i(73),E=i(70),w=function(){return this};s.exports=function(k,j,P,D){var N=j+" Iterator";return k.prototype=c(l,{next:b(+!D,P)}),_(k,N,!1,!0),E[N]=w,k}},function(s,p,i){var l=i(7),c=i(28),b=l.String,_=l.TypeError;s.exports=function(E){if(typeof E=="object"||c(E))return E;throw _("Can't set "+b(E)+" as a prototype")}},function(s,p,i){var l=i(17),c=i(7),b=i(15),_=i(95),E=i(44),w=i(138),k=i(114),j=i(117),P=i(28),D=i(33),N=i(19),L=i(118),B=i(73),X=i(143);s.exports=function(ee,ie,Z){var V=ee.indexOf("Map")!==-1,K=ee.indexOf("Weak")!==-1,z=V?"set":"add",M=c[ee],I=M&&M.prototype,R=M,F={},J=function(ue){var he=b(I[ue]);E(I,ue,ue=="add"?function(be){return he(this,be===0?0:be),this}:ue=="delete"?function(be){return!(K&&!D(be))&&he(this,be===0?0:be)}:ue=="get"?function(be){return K&&!D(be)?void 0:he(this,be===0?0:be)}:ue=="has"?function(be){return!(K&&!D(be))&&he(this,be===0?0:be)}:function(be,Se){return he(this,be===0?0:be,Se),this})};if(_(ee,!P(M)||!(K||I.forEach&&!N(function(){new M().entries().next()}))))R=Z.getConstructor(ie,ee,V,z),w.enable();else if(_(ee,!0)){var le=new R,ce=le[z](K?{}:-0,1)!=le,ye=N(function(){le.has(1)}),xe=L(function(ue){new M(ue)}),ge=!K&&N(function(){for(var ue=new M,he=5;he--;)ue[z](he,he);return!ue.has(-0)});xe||((R=ie(function(ue,he){j(ue,I);var be=X(new M,ue,R);return he!=null&&k(he,be[z],{that:be,AS_ENTRIES:V}),be})).prototype=I,I.constructor=R),(ye||ge)&&(J("delete"),J("has"),V&&J("get")),(ge||ce)&&J(z),K&&I.clear&&delete I.clear}return F[ee]=R,l({global:!0,forced:R!=M},F),B(R,ee),K||Z.setStrong(R,ee,V),R}},function(s,p,i){var l=i(19),c=i(33),b=i(50),_=i(176),E=Object.isExtensible,w=l(function(){});s.exports=w||_?function(k){return!!c(k)&&(!_||b(k)!="ArrayBuffer")&&(!E||E(k))}:E},function(s,p,i){var l=i(19);s.exports=l(function(){if(typeof ArrayBuffer=="function"){var c=new ArrayBuffer(8);Object.isExtensible(c)&&Object.defineProperty(c,"a",{value:8})}})},function(s,p,i){var l=i(19);s.exports=!l(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(s,p,i){var l=i(37).f,c=i(54),b=i(144),_=i(62),E=i(117),w=i(114),k=i(111),j=i(145),P=i(36),D=i(138).fastKey,N=i(56),L=N.set,B=N.getterFor;s.exports={getConstructor:function(X,ee,ie,Z){var V=X(function(R,F){E(R,K),L(R,{type:ee,index:c(null),first:void 0,last:void 0,size:0}),P||(R.size=0),F!=null&&w(F,R[Z],{that:R,AS_ENTRIES:ie})}),K=V.prototype,z=B(ee),M=function(R,F,J){var le,ce,ye=z(R),xe=I(R,F);return xe?xe.value=J:(ye.last=xe={index:ce=D(F,!0),key:F,value:J,previous:le=ye.last,next:void 0,removed:!1},ye.first||(ye.first=xe),le&&(le.next=xe),P?ye.size++:R.size++,ce!=="F"&&(ye.index[ce]=xe)),R},I=function(R,F){var J,le=z(R),ce=D(F);if(ce!=="F")return le.index[ce];for(J=le.first;J;J=J.next)if(J.key==F)return J};return b(K,{clear:function(){for(var R=z(this),F=R.index,J=R.first;J;)J.removed=!0,J.previous&&(J.previous=J.previous.next=void 0),delete F[J.index],J=J.next;R.first=R.last=void 0,P?R.size=0:this.size=0},delete:function(R){var F=this,J=z(F),le=I(F,R);if(le){var ce=le.next,ye=le.previous;delete J.index[le.index],le.removed=!0,ye&&(ye.next=ce),ce&&(ce.previous=ye),J.first==le&&(J.first=ce),J.last==le&&(J.last=ye),P?J.size--:F.size--}return!!le},forEach:function(R){for(var F,J=z(this),le=_(R,arguments.length>1?arguments[1]:void 0);F=F?F.next:J.first;)for(le(F.value,F.key,this);F&&F.removed;)F=F.previous},has:function(R){return!!I(this,R)}}),b(K,ie?{get:function(R){var F=I(this,R);return F&&F.value},set:function(R,F){return M(this,R===0?0:R,F)}}:{add:function(R){return M(this,R=R===0?0:R,R)}}),P&&l(K,"size",{get:function(){return z(this).size}}),V},setStrong:function(X,ee,ie){var Z=ee+" Iterator",V=B(ee),K=B(Z);k(X,ee,function(z,M){L(this,{type:Z,target:z,state:V(z),kind:M,last:void 0})},function(){for(var z=K(this),M=z.kind,I=z.last;I&&I.removed;)I=I.previous;return z.target&&(z.last=I=I?I.next:z.state.first)?M=="keys"?{value:I.key,done:!1}:M=="values"?{value:I.value,done:!1}:{value:[I.key,I.value],done:!1}:(z.target=void 0,{value:void 0,done:!0})},ie?"entries":"values",!ie,!0),j(ee)}}},function(s,p,i){var l=i(116),c=i(98);s.exports=l?{}.toString:function(){return"[object "+c(this)+"]"}},function(s,p,i){var l=i(74).forEach,c=i(120)("forEach");s.exports=c?[].forEach:function(b){return l(this,b,arguments.length>1?arguments[1]:void 0)}},function(s,p,i){var l=i(7),c=i(99),b=i(100),_=i(33),E=i(27)("species"),w=l.Array;s.exports=function(k){var j;return c(k)&&(j=k.constructor,(b(j)&&(j===w||c(j.prototype))||_(j)&&(j=j[E])===null)&&(j=void 0)),j===void 0?w:j}},function(s,p,i){var l=i(7);s.exports=l},function(s,p,i){var l=i(7),c=i(62),b=i(35),_=i(38),E=i(184),w=i(140),k=i(100),j=i(43),P=i(61),D=i(141),N=i(115),L=l.Array;s.exports=function(B){var X=_(B),ee=k(this),ie=arguments.length,Z=ie>1?arguments[1]:void 0,V=Z!==void 0;V&&(Z=c(Z,ie>2?arguments[2]:void 0));var K,z,M,I,R,F,J=N(X),le=0;if(!J||this==L&&w(J))for(K=j(X),z=ee?new this(K):L(K);K>le;le++)F=V?Z(X[le],le):X[le],P(z,le,F);else for(R=(I=D(X,J)).next,z=ee?new this:[];!(M=b(R,I)).done;le++)F=V?E(I,Z,[M.value,le],!0):M.value,P(z,le,F);return z.length=le,z}},function(s,p,i){var l=i(32),c=i(142);s.exports=function(b,_,E,w){try{return w?_(l(E)[0],E[1]):_(E)}catch(k){c(b,"throw",k)}}},function(s,p,i){var l=i(32);s.exports=function(){var c=l(this),b="";return c.global&&(b+="g"),c.ignoreCase&&(b+="i"),c.multiline&&(b+="m"),c.dotAll&&(b+="s"),c.unicode&&(b+="u"),c.sticky&&(b+="y"),b}},function(s,p,i){var l=i(19),c=i(7).RegExp;s.exports=l(function(){var b=c(".","s");return!(b.dotAll&&b.exec(`
`)&&b.flags==="s")})},function(s,p,i){var l=i(19),c=i(7).RegExp;s.exports=l(function(){var b=c("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},function(s,p,i){var l=i(17),c=i(15),b=i(55),_=i(38),E=i(43),w=i(41),k=i(19),j=i(189),P=i(120),D=i(190),N=i(191),L=i(65),B=i(192),X=[],ee=c(X.sort),ie=c(X.push),Z=k(function(){X.sort(void 0)}),V=k(function(){X.sort(null)}),K=P("sort"),z=!k(function(){if(L)return L<70;if(!(D&&D>3)){if(N)return!0;if(B)return B<603;var M,I,R,F,J="";for(M=65;M<76;M++){switch(I=String.fromCharCode(M),M){case 66:case 69:case 70:case 72:R=3;break;case 68:case 71:R=4;break;default:R=2}for(F=0;F<47;F++)X.push({k:I+F,v:R})}for(X.sort(function(le,ce){return ce.v-le.v}),F=0;F<X.length;F++)I=X[F].k.charAt(0),J.charAt(J.length-1)!==I&&(J+=I);return J!=="DGBEFHACIJK"}});l({target:"Array",proto:!0,forced:Z||!V||!K||!z},{sort:function(M){M!==void 0&&b(M);var I=_(this);if(z)return M===void 0?ee(I):ee(I,M);var R,F,J=[],le=E(I);for(F=0;F<le;F++)F in I&&ie(J,I[F]);for(j(J,function(ce){return function(ye,xe){return xe===void 0?-1:ye===void 0?1:ce!==void 0?+ce(ye,xe)||0:w(ye)>w(xe)?1:-1}}(M)),R=J.length,F=0;F<R;)I[F]=J[F++];for(;F<le;)delete I[F++];return I}})},function(s,p,i){var l=i(113),c=Math.floor,b=function(w,k){var j=w.length,P=c(j/2);return j<8?_(w,k):E(w,b(l(w,0,P),k),b(l(w,P),k),k)},_=function(w,k){for(var j,P,D=w.length,N=1;N<D;){for(P=N,j=w[N];P&&k(w[P-1],j)>0;)w[P]=w[--P];P!==N++&&(w[P]=j)}return w},E=function(w,k,j,P){for(var D=k.length,N=j.length,L=0,B=0;L<D||B<N;)w[L+B]=L<D&&B<N?P(k[L],j[B])<=0?k[L++]:j[B++]:L<D?k[L++]:j[B++];return w};s.exports=b},function(s,p,i){var l=i(53).match(/firefox\/(\d+)/i);s.exports=!!l&&+l[1]},function(s,p,i){var l=i(53);s.exports=/MSIE|Trident/.test(l)},function(s,p,i){var l=i(53).match(/AppleWebKit\/(\d+)\./);s.exports=!!l&&+l[1]},function(s,p,i){var l=i(17),c=i(74).find,b=i(83),_="find",E=!0;_ in[]&&Array(1).find(function(){E=!1}),l({target:"Array",proto:!0,forced:E},{find:function(w){return c(this,w,arguments.length>1?arguments[1]:void 0)}}),b(_)},function(s,p,i){var l=i(7),c=i(154),b=l.TypeError;s.exports=function(_){if(c(_))throw b("The method doesn't accept regular expressions");return _}},function(s,p,i){var l=i(27)("match");s.exports=function(c){var b=/./;try{"/./"[c](b)}catch{try{return b[l]=!1,"/./"[c](b)}catch{}}return!1}},function(s,p,i){var l=i(94).PROPER,c=i(19),b=i(160);s.exports=function(_){return c(function(){return!!b[_]()||"…"[_]()!=="…"||l&&b[_].name!==_})}},function(s,p,i){var l=i(15);s.exports=l(1 .valueOf)},function(s,p,i){var l=i(15),c=i(38),b=Math.floor,_=l("".charAt),E=l("".replace),w=l("".slice),k=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;s.exports=function(P,D,N,L,B,X){var ee=N+P.length,ie=L.length,Z=j;return B!==void 0&&(B=c(B),Z=k),E(X,Z,function(V,K){var z;switch(_(K,0)){case"$":return"$";case"&":return P;case"`":return w(D,0,N);case"'":return w(D,ee);case"<":z=B[w(K,1,-1)];break;default:var M=+K;if(M===0)return V;if(M>ie){var I=b(M/10);return I===0?V:I<=ie?L[I-1]===void 0?_(K,1):L[I-1]+_(K,1):V}z=L[M-1]}return z===void 0?"":z})}},function(s,p,i){var l=i(36),c=i(15),b=i(35),_=i(19),E=i(66),w=i(112),k=i(93),j=i(38),P=i(81),D=Object.assign,N=Object.defineProperty,L=c([].concat);s.exports=!D||_(function(){if(l&&D({b:1},D(N({},"a",{enumerable:!0,get:function(){N(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var B={},X={},ee=Symbol(),ie="abcdefghijklmnopqrst";return B[ee]=7,ie.split("").forEach(function(Z){X[Z]=Z}),D({},B)[ee]!=7||E(D({},X)).join("")!=ie})?function(B,X){for(var ee=j(B),ie=arguments.length,Z=1,V=w.f,K=k.f;ie>Z;)for(var z,M=P(arguments[Z++]),I=V?L(E(M),V(M)):E(M),R=I.length,F=0;R>F;)z=I[F++],l&&!b(K,M,z)||(ee[z]=M[z]);return ee}:D},function(s,p,i){var l=i(7),c=i(15),b=i(55),_=i(33),E=i(34),w=i(101),k=l.Function,j=c([].concat),P=c([].join),D={},N=function(L,B,X){if(!E(D,B)){for(var ee=[],ie=0;ie<B;ie++)ee[ie]="a["+ie+"]";D[B]=k("C,a","return new C("+P(ee,",")+")")}return D[B](L,X)};s.exports=k.bind||function(L){var B=b(this),X=B.prototype,ee=w(arguments,1),ie=function(){var Z=j(ee,w(arguments));return this instanceof ie?N(B,Z.length,Z):B.apply(L,Z)};return _(X)&&(ie.prototype=X),ie}},function(s,p,i){var l=i(34);s.exports=function(c){return c!==void 0&&(l(c,"value")||l(c,"writable"))}},function(s,p,i){var l=i(15),c=i(45),b=i(41),_=/"/g,E=l("".replace);s.exports=function(w,k,j,P){var D=b(c(w)),N="<"+k;return j!==""&&(N+=" "+j+'="'+E(b(P),_,"&quot;")+'"'),N+">"+D+"</"+k+">"}},function(s,p,i){var l=i(19);s.exports=function(c){return l(function(){var b=""[c]('"');return b!==b.toLowerCase()||b.split('"').length>3})}},function(s,p,i){var l,c,b,_,E=i(17),w=i(64),k=i(7),j=i(46),P=i(35),D=i(205),N=i(44),L=i(144),B=i(97),X=i(73),ee=i(145),ie=i(55),Z=i(28),V=i(33),K=i(117),z=i(92),M=i(114),I=i(118),R=i(156),F=i(163).set,J=i(206),le=i(209),ce=i(210),ye=i(165),xe=i(211),ge=i(56),ue=i(95),he=i(27),be=i(212),Se=i(126),Ie=i(65),We=he("species"),ke="Promise",Re=ge.getterFor(ke),$e=ge.set,q=ge.getterFor(ke),$=D&&D.prototype,ae=D,_e=$,Te=k.TypeError,we=k.document,Ke=k.process,nt=ye.f,Ze=nt,Ue=!!(we&&we.createEvent&&k.dispatchEvent),ve=Z(k.PromiseRejectionEvent),Fe="unhandledrejection",te=!1,Le=ue(ke,function(){var Y=z(ae),se=Y!==String(ae);if(!se&&Ie===66||w&&!_e.finally)return!0;if(Ie>=51&&/native code/.test(Y))return!1;var Me=new ae(function(Xe){Xe(1)}),De=function(Xe){Xe(function(){},function(){})};return(Me.constructor={})[We]=De,!(te=Me.then(function(){})instanceof De)||!se&&be&&!ve}),ut=Le||!I(function(Y){ae.all(Y).catch(function(){})}),vt=function(Y){var se;return!(!V(Y)||!Z(se=Y.then))&&se},it=function(Y,se){if(!Y.notified){Y.notified=!0;var Me=Y.reactions;J(function(){for(var De=Y.value,Xe=Y.state==1,lt=0;Me.length>lt;){var Ht,$t,Ct,Rt=Me[lt++],ze=Xe?Rt.ok:Rt.fail,Ye=Rt.resolve,et=Rt.reject,rt=Rt.domain;try{ze?(Xe||(Y.rejection===2&&at(Y),Y.rejection=1),ze===!0?Ht=De:(rt&&rt.enter(),Ht=ze(De),rt&&(rt.exit(),Ct=!0)),Ht===Rt.promise?et(Te("Promise-chain cycle")):($t=vt(Ht))?P($t,Ht,Ye,et):Ye(Ht)):et(De)}catch(wt){rt&&!Ct&&rt.exit(),et(wt)}}Y.reactions=[],Y.notified=!1,se&&!Y.rejection&&St(Y)})}},ht=function(Y,se,Me){var De,Xe;Ue?((De=we.createEvent("Event")).promise=se,De.reason=Me,De.initEvent(Y,!1,!0),k.dispatchEvent(De)):De={promise:se,reason:Me},!ve&&(Xe=k["on"+Y])?Xe(De):Y===Fe&&ce("Unhandled promise rejection",Me)},St=function(Y){P(F,k,function(){var se,Me=Y.facade,De=Y.value;if(Pt(Y)&&(se=xe(function(){Se?Ke.emit("unhandledRejection",De,Me):ht(Fe,Me,De)}),Y.rejection=Se||Pt(Y)?2:1,se.error))throw se.value})},Pt=function(Y){return Y.rejection!==1&&!Y.parent},at=function(Y){P(F,k,function(){var se=Y.facade;Se?Ke.emit("rejectionHandled",se):ht("rejectionhandled",se,Y.value)})},Nt=function(Y,se,Me){return function(De){Y(se,De,Me)}},G=function(Y,se,Me){Y.done||(Y.done=!0,Me&&(Y=Me),Y.value=se,Y.state=2,it(Y,!0))},oe=function(Y,se,Me){if(!Y.done){Y.done=!0,Me&&(Y=Me);try{if(Y.facade===se)throw Te("Promise can't be resolved itself");var De=vt(se);De?J(function(){var Xe={done:!1};try{P(De,se,Nt(oe,Xe,Y),Nt(G,Xe,Y))}catch(lt){G(Xe,lt,Y)}}):(Y.value=se,Y.state=1,it(Y,!1))}catch(Xe){G({done:!1},Xe,Y)}}};if(Le&&(_e=(ae=function(Y){K(this,_e),ie(Y),P(l,this);var se=Re(this);try{Y(Nt(oe,se),Nt(G,se))}catch(Me){G(se,Me)}}).prototype,(l=function(Y){$e(this,{type:ke,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=L(_e,{then:function(Y,se){var Me=q(this),De=Me.reactions,Xe=nt(R(this,ae));return Xe.ok=!Z(Y)||Y,Xe.fail=Z(se)&&se,Xe.domain=Se?Ke.domain:void 0,Me.parent=!0,De[De.length]=Xe,Me.state!=0&&it(Me,!1),Xe.promise},catch:function(Y){return this.then(void 0,Y)}}),c=function(){var Y=new l,se=Re(Y);this.promise=Y,this.resolve=Nt(oe,se),this.reject=Nt(G,se)},ye.f=nt=function(Y){return Y===ae||Y===b?new c(Y):Ze(Y)},!w&&Z(D)&&$!==Object.prototype)){_=$.then,te||(N($,"then",function(Y,se){var Me=this;return new ae(function(De,Xe){P(_,Me,De,Xe)}).then(Y,se)},{unsafe:!0}),N($,"catch",_e.catch,{unsafe:!0}));try{delete $.constructor}catch{}B&&B($,_e)}E({global:!0,wrap:!0,forced:Le},{Promise:ae}),X(ae,ke,!1,!0),ee(ke),b=j(ke),E({target:ke,stat:!0,forced:Le},{reject:function(Y){var se=nt(this);return P(se.reject,void 0,Y),se.promise}}),E({target:ke,stat:!0,forced:w||Le},{resolve:function(Y){return le(w&&this===b?ae:this,Y)}}),E({target:ke,stat:!0,forced:ut},{all:function(Y){var se=this,Me=nt(se),De=Me.resolve,Xe=Me.reject,lt=xe(function(){var Ht=ie(se.resolve),$t=[],Ct=0,Rt=1;M(Y,function(ze){var Ye=Ct++,et=!1;Rt++,P(Ht,se,ze).then(function(rt){et||(et=!0,$t[Ye]=rt,--Rt||De($t))},Xe)}),--Rt||De($t)});return lt.error&&Xe(lt.value),Me.promise},race:function(Y){var se=this,Me=nt(se),De=Me.reject,Xe=xe(function(){var lt=ie(se.resolve);M(Y,function(Ht){P(lt,se,Ht).then(Me.resolve,De)})});return Xe.error&&De(Xe.value),Me.promise}})},function(s,p,i){var l=i(7);s.exports=l.Promise},function(s,p,i){var l,c,b,_,E,w,k,j,P=i(7),D=i(62),N=i(51).f,L=i(163).set,B=i(164),X=i(207),ee=i(208),ie=i(126),Z=P.MutationObserver||P.WebKitMutationObserver,V=P.document,K=P.process,z=P.Promise,M=N(P,"queueMicrotask"),I=M&&M.value;I||(l=function(){var R,F;for(ie&&(R=K.domain)&&R.exit();c;){F=c.fn,c=c.next;try{F()}catch(J){throw c?_():b=void 0,J}}b=void 0,R&&R.enter()},B||ie||ee||!Z||!V?!X&&z&&z.resolve?((k=z.resolve(void 0)).constructor=z,j=D(k.then,k),_=function(){j(l)}):ie?_=function(){K.nextTick(l)}:(L=D(L,P),_=function(){L(l)}):(E=!0,w=V.createTextNode(""),new Z(l).observe(w,{characterData:!0}),_=function(){w.data=E=!E})),s.exports=I||function(R){var F={fn:R,next:void 0};b&&(b.next=F),c||(c=F,_()),b=F}},function(s,p,i){var l=i(53),c=i(7);s.exports=/ipad|iphone|ipod/i.test(l)&&c.Pebble!==void 0},function(s,p,i){var l=i(53);s.exports=/web0s(?!.*chrome)/i.test(l)},function(s,p,i){var l=i(32),c=i(33),b=i(165);s.exports=function(_,E){if(l(_),c(E)&&E.constructor===_)return E;var w=b.f(_);return(0,w.resolve)(E),w.promise}},function(s,p,i){var l=i(7);s.exports=function(c,b){var _=l.console;_&&_.error&&(arguments.length==1?_.error(c):_.error(c,b))}},function(s,p){s.exports=function(i){try{return{error:!1,value:i()}}catch(l){return{error:!0,value:l}}}},function(s,p){s.exports=typeof window=="object"},function(s,p,i){var l=i(36),c=i(15),b=i(66),_=i(40),E=c(i(93).f),w=c([].push),k=function(j){return function(P){for(var D,N=_(P),L=b(N),B=L.length,X=0,ee=[];B>X;)D=L[X++],l&&!E(N,D)||w(ee,j?[D,N[D]]:N[D]);return ee}};s.exports={entries:k(!0),values:k(!1)}},function(s,p,i){var l=i(38),c=i(67),b=i(43);s.exports=function(_){for(var E=l(this),w=b(E),k=arguments.length,j=c(k>1?arguments[1]:void 0,w),P=k>2?arguments[2]:void 0,D=P===void 0?w:c(P,w);D>j;)E[j++]=_;return E}},function(s,p,i){i.r(p),i.d(p,"observer",function(){return Xn}),i.d(p,"LogicFlow",function(){return af}),i.d(p,"h",function(){return te.g}),i.d(p,"LogicFlowUtil",function(){return l}),i.d(p,"BaseNode",function(){return _r}),i.d(p,"RectNode",function(){return Jc}),i.d(p,"CircleNode",function(){return nl}),i.d(p,"PolygonNode",function(){return ul}),i.d(p,"DiamondNode",function(){return fl}),i.d(p,"EllipseNode",function(){return gl}),i.d(p,"TextNode",function(){return ml}),i.d(p,"HtmlNode",function(){return xl}),i.d(p,"BaseEdge",function(){return wi}),i.d(p,"LineEdge",function(){return Ll}),i.d(p,"PolylineEdge",function(){return Xl}),i.d(p,"BezierEdge",function(){return Vl}),i.d(p,"Arrow",function(){return kO}),i.d(p,"BaseEdgeModel",function(){return ms}),i.d(p,"BezierEdgeModel",function(){return uc}),i.d(p,"LineEdgeModel",function(){return Es}),i.d(p,"PolylineEdgeModel",function(){return ks}),i.d(p,"BaseNodeModel",function(){return mr}),i.d(p,"CircleNodeModel",function(){return dc}),i.d(p,"DiamondNodeModel",function(){return bc}),i.d(p,"EllipseNodeModel",function(){return wc}),i.d(p,"PolygonNodeModel",function(){return kc}),i.d(p,"RectNodeModel",function(){return Dc}),i.d(p,"TextNodeModel",function(){return Ic}),i.d(p,"HtmlNodeModel",function(){return Bc}),i.d(p,"EditConfigModel",function(){return Vf}),i.d(p,"GraphModel",function(){return Ld}),i.d(p,"SnaplineModel",function(){return vy}),i.d(p,"Keyboard",function(){return rg}),i.d(p,"get",function(){return uh}),i.d(p,"defaults",function(){return ch}),i.d(p,"ElementState",function(){return Ot}),i.d(p,"ModelType",function(){return dt}),i.d(p,"ElementType",function(){return Xt}),i.d(p,"EventType",function(){return tt}),i.d(p,"formateAnchorConnectValidateData",function(){return ui});var l={};i.r(l),i.d(l,"createUuid",function(){return Rr}),i.d(l,"refreshGraphId",function(){return Db}),i.d(l,"createDrag",function(){return um}),i.d(l,"StepDrag",function(){return yr});var c=i(1),b=i(10);if(!b.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!c.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var _=i(42),E=Object(_.b)("observerBatching");function w(e){e()}var k=!1;function j(){return k}function P(e){return Object(c.t)(e)}var D,N=1e4,L=new Set;function B(){D===void 0&&(D=setTimeout(X,1e4))}function X(){D=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&&B()}var ee=!1,ie=[],Z={};function V(e){return"observer"+e}function K(e,t,n){t===void 0&&(t="observed"),n===void 0&&(n=Z),j();var r,a=function(m){return function(){ee?ie.push(m):m()}}((n.useForceUpdate||_.d)()),o=b.d.useRef(null);if(!o.current){var u=new c.c(V(t),function(){f.mounted?a():(u.dispose(),o.current=null)}),f=function(m){return{cleanAt:Date.now()+N,reaction:m}}(u);o.current=f,r=o,L.add(r),B()}var d=o.current.reaction;return b.d.useDebugValue(d,P),b.d.useEffect(function(){var m;return m=o,L.delete(m),o.current?o.current.mounted=!0:(o.current={reaction:new c.c(V(t),function(){a()}),cleanAt:1/0},a()),function(){o.current.reaction.dispose(),o.current=null}},[]),function(m){ee=!0,ie=[];try{var O=m();ee=!1;var S=ie.length>0?ie:void 0;return b.d.useLayoutEffect(function(){S&&S.forEach(function(T){return T()})},[S]),O}finally{ee=!1}}(function(){var m,O;if(d.track(function(){try{m=e()}catch(S){O=S}}),O)throw O;return m})}var z=function(){return z=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},z.apply(this,arguments)};function M(e,t){var n,r,a,o=z({forwardRef:!1},t),u=e.displayName||e.name,f=function(d,m){return K(function(){return e(d,m)},u)};return f.displayName=u,n=o.forwardRef?Object(b.f)(Object(b.e)(f)):Object(b.f)(f),r=e,a=n,Object.keys(r).forEach(function(d){I[d]||Object.defineProperty(a,d,Object.getOwnPropertyDescriptor(r,d))}),n.displayName=u,n}var I={$$typeof:!0,render:!0,compare:!0,type:!0};function R(e){var t=e.children,n=e.render,r=t||n;return typeof r!="function"?null:K(r)}function F(e,t,n,r,a){var o=t==="children"?"render":"children",u=typeof e[t]=="function",f=typeof e[o]=="function";return u&&f?new Error("MobX Observer: Do not use children and render in the same time in`"+n):u||f?null:new Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}R.propTypes={children:F,render:F},R.displayName="Observer";var J;(J=b.g)||(J=w),Object(c.n)({reactionScheduler:J}),Object(_.a)()[E]=!0;var le=0,ce={};function ye(e){return ce[e]||(ce[e]=function(t){if(typeof Symbol=="function")return Symbol(t);var n="__$mobx-react "+t+" ("+le+")";return le++,n}(e)),ce[e]}function xe(e,t){if(ge(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])||!ge(e[n[a]],t[n[a]]))return!1;return!0}function ge(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ue(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var he=ye("patchMixins"),be=ye("patchedDefinition");function Se(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(f){f.apply(n,a)})}}function Ie(e,t){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];Se.call.apply(Se,[this,e,t].concat(r))}}function We(e,t,n){var r=function(f,d){var m=f[he]=f[he]||{},O=m[d]=m[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[be]){var o=e[t],u=ke(e,t,a?a.enumerable:void 0,r,o);Object.defineProperty(e,t,u)}}function ke(e,t,n,r,a){var o,u=Ie(a,r);return(o={})[be]=!0,o.get=function(){return u},o.set=function(f){if(this===e)u=Ie(f,r);else{var d=ke(this,t,n,r,f);Object.defineProperty(this,t,d)}},o.configurable=!0,o.enumerable=n,o}var Re=c.a||"$mobx",$e=ye("isMobXReactObserver"),q=ye("isUnmounted"),$=ye("skipRender"),ae=ye("isForcingUpdate");function _e(e){var t=e.prototype;if(e[$e]?Te(t):e[$e]=!0,t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==b.b)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==Ke)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=Ke;nt(t,"props"),nt(t,"state");var n=t.render;return t.render=function(){return we.call(this,n)},We(t,"componentWillUnmount",function(){var r;(r=this.render[Re])===null||r===void 0||r.dispose(),this[q]=!0,!this.render[Re]&&Te(this)}),e}function Te(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function we(e){var t=this;ue(this,$,!1),ue(this,ae,!1);var n=Te(this),r=e.bind(this),a=!1,o=new c.c(n+".render()",function(){if(!a&&(a=!0,t[q]!==!0)){var f=!0;try{ue(t,ae,!0),t[$]||b.a.prototype.forceUpdate.call(t),f=!1}finally{ue(t,ae,!1),f&&o.dispose()}}});function u(){a=!1;var f=void 0,d=void 0;if(o.track(function(){try{d=Object(c.d)(!1,r)}catch(m){f=m}}),f)throw f;return d}return o.reactComponent=this,u[Re]=o,this.render=u,u.call(this)}function Ke(e,t){return this.state!==t||!xe(this.props,e)}function nt(e,t){var n=ye("reactProp_"+t+"_valueHolder"),r=ye("reactProp_"+t+"_atomHolder");function a(){return this[r]||ue(this,r,Object(c.o)("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var o=!1;return c.f&&c.e&&(o=Object(c.f)(!0)),a.call(this).reportObserved(),c.f&&c.e&&Object(c.e)(o),this[n]},set:function(o){this[ae]||xe(this[n],o)?ue(this,n,o):(ue(this,n,o),ue(this,$,!0),a.call(this).reportChanged(),ue(this,$,!1))}})}var Ze=typeof Symbol=="function"&&Symbol.for,Ue=Ze?Symbol.for("react.forward_ref"):typeof b.e=="function"&&Object(b.e)(function(e){return null}).$$typeof,ve=Ze?Symbol.for("react.memo"):typeof b.f=="function"&&Object(b.f)(function(e){return null}).$$typeof;function Fe(e){if(e.isMobxInjector,ve&&e.$$typeof===ve)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(Ue&&e.$$typeof===Ue){var t=e.render;if(typeof t!="function")throw new Error("render property of ForwardRef was not a function");return Object(b.e)(function(){var n=arguments;return Object(b.c)(R,null,function(){return t.apply(void 0,n)})})}return typeof e!="function"||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(b.a,e)?_e(e):M(e)}if(!b.a)throw new Error("mobx-react requires React to be available");if(!c.C)throw new Error("mobx-react requires mobx to be available");var te=i(0);i(3),i(60),i(2),i(6),i(4),i(11),i(39),i(29),i(22),i(20),i(5),i(23),i(21),i(25),i(8),i(9),i(16),i(24),i(18),i(188),i(193),i(103),i(152),i(153);var Le=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},ut=function(){this.__data__=[],this.size=0},vt=function(e,t){return e===t||e!=e&&t!=t},it=function(e,t){for(var n=e.length;n--;)if(vt(e[n][0],t))return n;return-1},ht=Array.prototype.splice,St=function(e){var t=this.__data__,n=it(t,e);return!(n<0)&&(n==t.length-1?t.pop():ht.call(t,n,1),--this.size,!0)},Pt=function(e){var t=this.__data__,n=it(t,e);return n<0?void 0:t[n][1]},at=function(e){return it(this.__data__,e)>-1},Nt=function(e,t){var n=this.__data__,r=it(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function G(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])}}G.prototype.clear=ut,G.prototype.delete=St,G.prototype.get=Pt,G.prototype.has=at,G.prototype.set=Nt;var oe=G,Y=function(){this.__data__=new oe,this.size=0},se=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Me=function(e){return this.__data__.get(e)},De=function(e){return this.__data__.has(e)},Xe=i(31),lt=Xe.a.Symbol,Ht=Object.prototype,$t=Ht.hasOwnProperty,Ct=Ht.toString,Rt=lt?lt.toStringTag:void 0,ze=function(e){var t=$t.call(e,Rt),n=e[Rt];try{e[Rt]=void 0;var r=!0}catch{}var a=Ct.call(e);return r&&(t?e[Rt]=n:delete e[Rt]),a},Ye=Object.prototype.toString,et=function(e){return Ye.call(e)},rt=lt?lt.toStringTag:void 0,wt=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":rt&&rt in Object(e)?ze(e):et(e)},Mt=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},cr,Gn=function(e){if(!Mt(e))return!1;var t=wt(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Un=Xe.a["__core-js_shared__"],Wr=(cr=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||""))?"Symbol(src)_1."+cr:"",zu=function(e){return!!Wr&&Wr in e},Vo=Function.prototype.toString,kn=function(e){if(e!=null){try{return Vo.call(e)}catch{}try{return e+""}catch{}}return""},Ri=/^\[object .+?Constructor\]$/,He=Function.prototype,Bu=Object.prototype,Ii=He.toString,Li=Bu.hasOwnProperty,vn=RegExp("^"+Ii.call(Li).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bn=function(e){return!(!Mt(e)||zu(e))&&(Gn(e)?vn:Ri).test(kn(e))},zi=function(e,t){return e==null?void 0:e[t]},Yn=function(e,t){var n=zi(e,t);return bn(n)?n:void 0},kr=Yn(Xe.a,"Map"),Ln=Yn(Object,"create"),Wo=function(){this.__data__=Ln?Ln(null):{},this.size=0},Bi=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Fu=Object.prototype.hasOwnProperty,lo=function(e){var t=this.__data__;if(Ln){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return Fu.call(t,e)?t[e]:void 0},Hu=Object.prototype.hasOwnProperty,Fi=function(e){var t=this.__data__;return Ln?t[e]!==void 0:Hu.call(t,e)},Xu=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===void 0?"__lodash_hash_undefined__":t,this};function lr(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])}}lr.prototype.clear=Wo,lr.prototype.delete=Bi,lr.prototype.get=lo,lr.prototype.has=Fi,lr.prototype.set=Xu;var Hi=lr,Vn=function(){this.size=0,this.__data__={hash:new Hi,map:new(kr||oe),string:new Hi}},Gu=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},fo=function(e,t){var n=e.__data__;return Gu(t)?n[typeof t=="string"?"string":"hash"]:n.map},$o=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},Ko=function(e){return fo(this,e).get(e)},Uu=function(e){return fo(this,e).has(e)},Xi=function(e,t){var n=fo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Tr(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])}}Tr.prototype.clear=Vn,Tr.prototype.delete=$o,Tr.prototype.get=Ko,Tr.prototype.has=Uu,Tr.prototype.set=Xi;var Ar=Tr,Gi=function(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!kr||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ar(r)}return n.set(e,t),this.size=n.size,this};function Mr(e){var t=this.__data__=new oe(e);this.size=t.size}Mr.prototype.clear=Y,Mr.prototype.delete=se,Mr.prototype.get=Me,Mr.prototype.has=De,Mr.prototype.set=Gi;var Wn=Mr,Ui=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Yi=function(e){return this.__data__.has(e)};function $r(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ar;++t<n;)this.add(e[t])}$r.prototype.add=$r.prototype.push=Ui,$r.prototype.has=Yi;var Vi=$r,Yu=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},Wi=function(e,t){return e.has(t)},$i=function(e,t,n,r,a,o){var u=1&n,f=e.length,d=t.length;if(f!=d&&!(u&&d>f))return!1;var m=o.get(e),O=o.get(t);if(m&&O)return m==t&&O==e;var S=-1,T=!0,C=2&n?new Vi:void 0;for(o.set(e,t),o.set(t,e);++S<f;){var U=e[S],W=t[S];if(r)var ne=u?r(W,U,S,t,e,o):r(U,W,S,e,t,o);if(ne!==void 0){if(ne)continue;T=!1;break}if(C){if(!Yu(t,function(re,de){if(!Wi(C,de)&&(U===re||a(U,re,n,r,o)))return C.push(de)})){T=!1;break}}else if(U!==W&&!a(U,W,n,r,o)){T=!1;break}}return o.delete(e),o.delete(t),T},Kr=Xe.a.Uint8Array,Ki=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n},Vu=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n},qi=lt?lt.prototype:void 0,qo=qi?qi.valueOf:void 0,qr=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 Kr(e),new Kr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return vt(+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 f=Ki;case"[object Set]":var d=1&r;if(f||(f=Vu),e.size!=t.size&&!d)return!1;var m=u.get(e);if(m)return m==t;r|=2,u.set(e,t);var O=$i(f(e),f(t),r,a,o,u);return u.delete(e),O;case"[object Symbol]":if(qo)return qo.call(e)==qo.call(t)}return!1},$n=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Zt=Array.isArray,Zi=function(e,t,n){var r=t(e);return Zt(e)?r:$n(r,n(e))},Ji=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},Qi=function(){return[]},Wu=Object.prototype.propertyIsEnumerable,fr=Object.getOwnPropertySymbols,Tn=fr?function(e){return e==null?[]:(e=Object(e),Ji(fr(e),function(t){return Wu.call(e,t)}))}:Qi,$u=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},An=function(e){return e!=null&&typeof e=="object"},mn=function(e){return An(e)&&wt(e)=="[object Arguments]"},ea=Object.prototype,ta=ea.hasOwnProperty,Ku=ea.propertyIsEnumerable,po=mn(function(){return arguments}())?mn:function(e){return An(e)&&ta.call(e,"callee")&&!Ku.call(e,"callee")},Kn=po,Zr=i(48),qu=/^(?:0|[1-9]\d*)$/,rn=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&(n=="number"||n!="symbol"&&qu.test(e))&&e>-1&&e%1==0&&e<t},pr=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},gt={};gt["[object Float32Array]"]=gt["[object Float64Array]"]=gt["[object Int8Array]"]=gt["[object Int16Array]"]=gt["[object Int32Array]"]=gt["[object Uint8Array]"]=gt["[object Uint8ClampedArray]"]=gt["[object Uint16Array]"]=gt["[object Uint32Array]"]=!0,gt["[object Arguments]"]=gt["[object Array]"]=gt["[object ArrayBuffer]"]=gt["[object Boolean]"]=gt["[object DataView]"]=gt["[object Date]"]=gt["[object Error]"]=gt["[object Function]"]=gt["[object Map]"]=gt["[object Number]"]=gt["[object Object]"]=gt["[object RegExp]"]=gt["[object Set]"]=gt["[object String]"]=gt["[object WeakMap]"]=!1;var _n=function(e){return An(e)&&pr(e.length)&&!!gt[wt(e)]},dr=function(e){return function(t){return e(t)}},Kt=i(49),na=Kt.a&&Kt.a.isTypedArray,Zo=na?dr(na):_n,ra=Object.prototype.hasOwnProperty,Mn=function(e,t){var n=Zt(e),r=!n&&Kn(e),a=!n&&!r&&Object(Zr.a)(e),o=!n&&!r&&!a&&Zo(e),u=n||r||a||o,f=u?$u(e.length,String):[],d=f.length;for(var m in e)!t&&!ra.call(e,m)||u&&(m=="length"||a&&(m=="offset"||m=="parent")||o&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||rn(m,d))||f.push(m);return f},oa=Object.prototype,ho=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||oa)},Dn=function(e,t){return function(n){return e(t(n))}},ia=Dn(Object.keys,Object),Zu=Object.prototype.hasOwnProperty,Jo=function(e){if(!ho(e))return ia(e);var t=[];for(var n in Object(e))Zu.call(e,n)&&n!="constructor"&&t.push(n);return t},It=function(e){return e!=null&&pr(e.length)&&!Gn(e)},Dr=function(e){return It(e)?Mn(e):Jo(e)},yo=function(e){return Zi(e,Dr,Tn)},dn=Object.prototype.hasOwnProperty,aa=function(e,t,n,r,a,o){var u=1&n,f=yo(e),d=f.length;if(d!=yo(t).length&&!u)return!1;for(var m=d;m--;){var O=f[m];if(!(u?O in t:dn.call(t,O)))return!1}var S=o.get(e),T=o.get(t);if(S&&T)return S==t&&T==e;var C=!0;o.set(e,t),o.set(t,e);for(var U=u;++m<d;){var W=e[O=f[m]],ne=t[O];if(r)var re=u?r(ne,W,O,t,e,o):r(W,ne,O,e,t,o);if(!(re===void 0?W===ne||a(W,ne,n,r,o):re)){C=!1;break}U||(U=O=="constructor")}if(C&&!U){var de=e.constructor,Oe=t.constructor;de==Oe||!("constructor"in e)||!("constructor"in t)||typeof de=="function"&&de instanceof de&&typeof Oe=="function"&&Oe instanceof Oe||(C=!1)}return o.delete(e),o.delete(t),C},Jr=Yn(Xe.a,"DataView"),go=Yn(Xe.a,"Promise"),vo=Yn(Xe.a,"Set"),bo=Yn(Xe.a,"WeakMap"),ua="[object Map]",hn="[object Promise]",On="[object Set]",Nr="[object WeakMap]",Qo="[object DataView]",ei=kn(Jr),ti=kn(kr),sa=kn(go),Ju=kn(vo),mo=kn(bo),hr=wt;(Jr&&hr(new Jr(new ArrayBuffer(1)))!=Qo||kr&&hr(new kr)!=ua||go&&hr(go.resolve())!=hn||vo&&hr(new vo)!=On||bo&&hr(new bo)!=Nr)&&(hr=function(e){var t=wt(e),n=t=="[object Object]"?e.constructor:void 0,r=n?kn(n):"";if(r)switch(r){case ei:return Qo;case ti:return ua;case sa:return hn;case Ju:return On;case mo:return Nr}return t});var h=hr,g="[object Arguments]",x="[object Array]",A="[object Object]",H=Object.prototype.hasOwnProperty,Q=function(e,t,n,r,a,o){var u=Zt(e),f=Zt(t),d=u?x:h(e),m=f?x:h(t),O=(d=d==g?A:d)==A,S=(m=m==g?A:m)==A,T=d==m;if(T&&Object(Zr.a)(e)){if(!Object(Zr.a)(t))return!1;u=!0,O=!1}if(T&&!O)return o||(o=new Wn),u||Zo(e)?$i(e,t,n,r,a,o):qr(e,t,d,n,r,a,o);if(!(1&n)){var C=O&&H.call(e,"__wrapped__"),U=S&&H.call(t,"__wrapped__");if(C||U){var W=C?e.value():e,ne=U?t.value():t;return o||(o=new Wn),a(W,ne,n,r,o)}}return!!T&&(o||(o=new Wn),aa(e,t,n,r,a,o))},pe=function e(t,n,r,a,o){return t===n||(t==null||n==null||!An(t)&&!An(n)?t!=t&&n!=n:Q(t,n,r,a,e,o))},je=function(e,t,n,r){var a=n.length,o=a,u=!r;if(e==null)return!o;for(e=Object(e);a--;){var f=n[a];if(u&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++a<o;){var d=(f=n[a])[0],m=e[d],O=f[1];if(u&&f[2]){if(m===void 0&&!(d in e))return!1}else{var S=new Wn;if(r)var T=r(m,O,d,e,t,S);if(!(T===void 0?pe(O,m,3,r,S):T))return!1}}return!0},Be=function(e){return e==e&&!Mt(e)},pt=function(e){for(var t=Dr(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Be(a)]}return t},ot=function(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}},xt=function(e){var t=pt(e);return t.length==1&&t[0][2]?ot(t[0][0],t[0][1]):function(n){return n===e||je(n,e,t)}},ct=function(e){return typeof e=="symbol"||An(e)&&wt(e)=="[object Symbol]"},_t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/,Tt=function(e,t){if(Zt(e))return!1;var n=typeof e;return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!ct(e))||wn.test(e)||!_t.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||Ar),n}on.Cache=Ar;var Qr=on,Qu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ca=/\\(\\)?/g,la=function(e){var t=Qr(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(Qu,function(n,r,a,o){t.push(a?o.replace(ca,"$1"):r||n)}),t}),_o=lt?lt.prototype:void 0,ni=_o?_o.toString:void 0,an=function e(t){if(typeof t=="string")return t;if(Zt(t))return Le(t,e)+"";if(ct(t))return ni?ni.call(t):"";var n=t+"";return n=="0"&&1/t==-1/0?"-0":n},fa=function(e){return e==null?"":an(e)},eo=function(e,t){return Zt(e)?e:Tt(e,t)?[e]:la(fa(e))},ri=function(e){if(typeof e=="string"||ct(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},es=function(e,t){for(var n=0,r=(t=eo(t,e)).length;e!=null&&n<r;)e=e[ri(t[n++])];return n&&n==r?e:void 0},mf=function(e,t,n){var r=e==null?void 0:es(e,t);return r===void 0?n:r},bv=function(e,t){return e!=null&&t in Object(e)},mv=function(e,t,n){for(var r=-1,a=(t=eo(t,e)).length,o=!1;++r<a;){var u=ri(t[r]);if(!(o=e!=null&&n(e,u)))break;e=e[u]}return o||++r!=a?o:!!(a=e==null?0:e.length)&&pr(a)&&rn(u,a)&&(Zt(e)||Kn(e))},_f=function(e,t){return e!=null&&mv(e,t,bv)},_v=function(e,t){return Tt(e)&&Be(t)?ot(ri(e),t):function(n){var r=mf(n,e);return r===void 0&&r===t?_f(n,e):pe(t,r,3)}},ts=function(e){return e},Ov=function(e){return function(t){return t==null?void 0:t[e]}},wv=function(e){return function(t){return es(t,e)}},xv=function(e){return Tt(e)?Ov(ri(e)):wv(e)},Ev=function(e){return typeof e=="function"?e:e==null?ts:typeof e=="object"?Zt(e)?_v(e[0],e[1]):xt(e):xv(e)},Of=function(e){return function(t,n,r){for(var a=-1,o=Object(t),u=r(t),f=u.length;f--;){var d=u[e?f:++a];if(n(o[d],d,o)===!1)break}return t}}(),Sv=function(e,t){return function(n,r){if(n==null)return n;if(!It(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&&Of(e,t,Dr)}),jv=function(e,t){var n=-1,r=It(e)?Array(e.length):[];return Sv(e,function(a,o,u){r[++n]=t(a,o,u)}),r},pa=function(e,t){return(Zt(e)?Le:jv)(e,Ev(t))};Object(c.n)({isolateGlobalState:!0});var da=function(){try{var e=Yn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ns=function(e,t,n){t=="__proto__"&&da?da(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Pv=Object.prototype.hasOwnProperty,ha=function(e,t,n){var r=e[t];Pv.call(e,t)&&vt(r,n)&&(n!==void 0||t in e)||ns(e,t,n)},Oo=function(e,t,n,r){var a=!n;n||(n={});for(var o=-1,u=t.length;++o<u;){var f=t[o],d=r?r(n[f],e[f],f,n,e):void 0;d===void 0&&(d=e[f]),a?ns(n,f,d):ha(n,f,d)}return n},kv=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)},wf=Math.max,xf=function(e,t,n){return t=wf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=wf(r.length-t,0),u=Array(o);++a<o;)u[a]=r[t+a];a=-1;for(var f=Array(t+1);++a<t;)f[a]=r[a];return f[t]=n(u),kv(e,this,f)}},Tv=function(e){return function(){return e}},Av=da?function(e,t){return da(e,"toString",{configurable:!0,enumerable:!1,value:Tv(t),writable:!0})}:ts,Mv=Date.now,Dv=function(e){var t=0,n=0;return function(){var r=Mv(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Ef=Dv(Av),Nv=function(e,t){return Ef(xf(e,t,ts),e+"")},Cv=function(e,t,n){if(!Mt(n))return!1;var r=typeof t;return!!(r=="number"?It(n)&&rn(t,n.length):r=="string"&&t in n)&&vt(n[t],e)},Sf=function(e){return Nv(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&&Cv(n[0],n[1],u)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var f=n[r];f&&e(t,f,r,o)}return t})},Rv=Object.prototype.hasOwnProperty,un=Sf(function(e,t){if(ho(t)||It(t))Oo(t,Dr(t),e);else for(var n in t)Rv.call(t,n)&&ha(e,n,t[n])}),Iv=function(e,t,n,r){if(!Mt(e))return e;for(var a=-1,o=(t=eo(t,e)).length,u=o-1,f=e;f!=null&&++a<o;){var d=ri(t[a]),m=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=u){var O=f[d];(m=r?r(O,d,f):void 0)===void 0&&(m=Mt(O)?O:rn(t[a+1])?[]:{})}ha(f,d,m),f=f[d]}return e},Lv=function(e,t,n){for(var r=-1,a=t.length,o={};++r<a;){var u=t[r],f=es(e,u);n(f,u)&&Iv(o,eo(u,e),f)}return o},zv=function(e,t){return Lv(e,t,function(n,r){return _f(e,r)})},jf=lt?lt.isConcatSpreadable:void 0,Bv=function(e){return Zt(e)||Kn(e)||!!(jf&&e&&e[jf])},Fv=function e(t,n,r,a,o){var u=-1,f=t.length;for(r||(r=Bv),o||(o=[]);++u<f;){var d=t[u];n>0&&r(d)?n>1?e(d,n-1,r,a,o):$n(o,d):a||(o[o.length]=d)}return o},Hv=function(e){return e!=null&&e.length?Fv(e,1):[]},Lt,Pf,kf,Tf,Af,Mf,Df,Nf,Cf,Rf,If,Lf,zf,Bf,Ff,Hf,Xf,Gf,oi=function(e){return Ef(xf(e,void 0,Hv),e+"")}(function(e,t){return e==null?{}:zv(e,t)});function Jt(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 Xv(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 Uf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qt(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,f){return f(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,Yf,dt,Xt,tt,At,Gv={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},rs=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],Vf=(Pf=qt((Lt=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Jt(this,"isSilentMode",Pf,this),Jt(this,"stopZoomGraph",kf,this),Jt(this,"stopScrollGraph",Tf,this),Jt(this,"stopMoveGraph",Af,this),Jt(this,"adjustEdge",Mf,this),Jt(this,"adjustEdgeMiddle",Df,this),Jt(this,"adjustEdgeStartAndEnd",Nf,this),Jt(this,"adjustNodePosition",Cf,this),Jt(this,"hideAnchors",Rf,this),Jt(this,"hoverOutline",If,this),Jt(this,"nodeSelectedOutline",Lf,this),Jt(this,"edgeSelectedOutline",zf,this),Jt(this,"nodeTextEdit",Bf,this),Jt(this,"edgeTextEdit",Ff,this),Jt(this,"nodeTextDraggable",Hf,this),Jt(this,"edgeTextDraggable",Xf,this),Jt(this,"autoExpand",Gf,this),Uf(this,"multipleSelectKey",""),Uf(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 f=oi(Gv,rs);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},un(u,f)}o===!1&&un(u,{nodeTextEdit:!1,edgeTextEdit:!1});var d=oi(r,rs);return un(u,d)}},{key:"getConfig",value:function(){return oi(this,rs)}}])&&Xv(t.prototype,n),e}()).prototype,"isSilentMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),kf=qt(Lt.prototype,"stopZoomGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tf=qt(Lt.prototype,"stopScrollGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Af=qt(Lt.prototype,"stopMoveGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mf=qt(Lt.prototype,"adjustEdge",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Df=qt(Lt.prototype,"adjustEdgeMiddle",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nf=qt(Lt.prototype,"adjustEdgeStartAndEnd",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cf=qt(Lt.prototype,"adjustNodePosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Rf=qt(Lt.prototype,"hideAnchors",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),If=qt(Lt.prototype,"hoverOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Lf=qt(Lt.prototype,"nodeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zf=qt(Lt.prototype,"edgeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bf=qt(Lt.prototype,"nodeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ff=qt(Lt.prototype,"edgeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hf=qt(Lt.prototype,"nodeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xf=qt(Lt.prototype,"edgeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gf=qt(Lt.prototype,"autoExpand",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qt(Lt.prototype,"updateEditConfig",[c.k],Object.getOwnPropertyDescriptor(Lt.prototype,"updateEditConfig"),Lt.prototype),Lt);i(63),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"}(Yf||(Yf={})),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"}(dt||(dt={})),function(e){e.NODE="node",e.EDGE="edge",e.GRAPH="graph"}(Xt||(Xt={})),function(e){e.ELEMENT_CLICK="element:click",e.NODE_CLICK="node:click",e.NODE_DBCLICK="node:dbclick",e.NODE_DELETE="node:delete",e.NODE_ADD="node:add",e.NODE_DND_ADD="node:dnd-add",e.NODE_DND_DRAG="node:dnd-drag",e.NODE_MOUSEDOWN="node:mousedown",e.NODE_DRAGSTART="node:dragstart",e.NODE_DRAG="node:drag",e.NODE_DROP="node:drop",e.NODE_MOUSEUP="node:mouseup",e.NODE_MOUSEMOVE="node:mousemove",e.NODE_MOUSEENTER="node:mouseenter",e.NODE_MOUSELEAVE="node:mouseleave",e.NODE_CONTEXTMENU="node:contextmenu",e.EDGE_DELETE="edge:delete",e.EDGE_ADD="edge:add",e.EDGE_CLICK="edge:click",e.EDGE_DBCLICK="edge:dbclick",e.EDGE_MOUSEENTER="edge:mouseenter",e.EDGE_MOUSELEAVE="edge:mouseleave",e.EDGE_CONTEXTMENU="edge:contextmenu",e.EDGE_ADJUST="edge:adjust",e.EDGE_EXCHANGE_NODE="edge:exchange-node",e.ANCHOR_DRAGSTART="anchor:dragstart",e.ANCHOR_DRAG="anchor:drag",e.ANCHOR_DROP="anchor:drop",e.ANCHOR_DRAGEND="anchor:dragend",e.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",e.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",e.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",e.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",e.ADJUST_POINT_DRAG="adjustPoint:drag",e.ADJUST_POINT_DROP="adjustPoint:drop",e.ADJUST_POINT_DRAGEND="adjustPoint:dragend",e.BLANK_MOUSEDOWN="blank:mousedown",e.BLANK_DRAGSTART="blank:dragstart",e.BLANK_DRAG="blank:drag",e.BLANK_DROP="blank:drop",e.BLANK_MOUSEMOVE="blank:mousemove",e.BLANK_MOUSEUP="blank:mouseup",e.BLANK_CLICK="blank:click",e.BLANK_CONTEXTMENU="blank:contextmenu",e.SELECTION_MOUSEDOWN="selection:mousedown",e.SELECTION_DRAGSTART="selection:dragstart",e.SELECTION_DRAG="selection:drag",e.SELECTION_DROP="selection:drop",e.SELECTION_MOUSEMOVE="selection:mousemove",e.SELECTION_MOUSEUP="selection:mouseup",e.SELECTION_CONTEXTMENU="selection:contextmenu",e.CONNECTION_NOT_ALLOWED="connection:not-allowed",e.HISTORY_CHANGE="history:change",e.TEXT_UPDATE="text:update",e.GRAPH_TRANSFORM="graph:transform",e.GRAPH_RENDERED="graph:rendered"}(tt||(tt={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(At||(At={}));var xn,zt,Wf,$f,Kf,qf,Zf,Jf,Qf;function ya(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return ep(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 ep(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 ep(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 to(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 Uv(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 os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zn(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,f){return f(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"})(xn||(xn={}));var Yv=(zt=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),os(this,"MINI_SCALE_SIZE",.2),os(this,"MAX_SCALE_SIZE",16),to(this,"SCALE_X",Wf,this),to(this,"SKEW_Y",$f,this),to(this,"SKEW_X",Kf,this),to(this,"SCALE_Y",qf,this),to(this,"TRANSLATE_X",Zf,this),to(this,"TRANSLATE_Y",Jf,this),to(this,"ZOOM_SIZE",Qf,this),os(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=ya(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=ya(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=ya(r,2),f=u[0],d=u[1];return[f+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(tt.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 f=ya(this.CanvasPointToHtmlPoint([r,a]),2),d=o/2-f[0],m=u/2-f[1];this.TRANSLATE_X+=d,this.TRANSLATE_Y+=m,this.emitGraphTransform("focusOn")}}],n&&Uv(t.prototype,n),e}(),Wf=zn(zt.prototype,"SCALE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),$f=zn(zt.prototype,"SKEW_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Kf=zn(zt.prototype,"SKEW_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),qf=zn(zt.prototype,"SCALE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Zf=zn(zt.prototype,"TRANSLATE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Jf=zn(zt.prototype,"TRANSLATE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Qf=zn(zt.prototype,"ZOOM_SIZE",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),zn(zt.prototype,"zoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"zoom"),zt.prototype),zn(zt.prototype,"resetZoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"resetZoom"),zt.prototype),zn(zt.prototype,"translate",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"translate"),zt.prototype),zn(zt.prototype,"focusOn",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"focusOn"),zt.prototype),zt),Vv=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e},Wv=function(e,t){return e&&Oo(t,Dr(t),e)},$v=function(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t},Kv=Object.prototype.hasOwnProperty,qv=function(e){if(!Mt(e))return $v(e);var t=ho(e),n=[];for(var r in e)(r!="constructor"||!t&&Kv.call(e,r))&&n.push(r);return n},ii=function(e){return It(e)?Mn(e,!0):qv(e)},Zv=function(e,t){return e&&Oo(t,ii(t),e)},tp=i(106),np=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Jv=function(e,t){return Oo(e,Tn(e),t)},is=Dn(Object.getPrototypeOf,Object),rp=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)$n(t,Tn(e)),e=is(e);return t}:Qi,Qv=function(e,t){return Oo(e,rp(e),t)},eb=function(e){return Zi(e,ii,rp)},tb=Object.prototype.hasOwnProperty,nb=function(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&tb.call(e,"index")&&(n.index=e.index,n.input=e.input),n},as=function(e){var t=new e.constructor(e.byteLength);return new Kr(t).set(new Kr(e)),t},rb=function(e,t){var n=t?as(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},ob=/\w*$/,ib=function(e){var t=new e.constructor(e.source,ob.exec(e));return t.lastIndex=e.lastIndex,t},op=lt?lt.prototype:void 0,ip=op?op.valueOf:void 0,ab=function(e){return ip?Object(ip.call(e)):{}},ap=function(e,t){var n=t?as(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},ub=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return as(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return rb(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 ap(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 ib(e);case"[object Symbol]":return ab(e)}},up=Object.create,sb=function(){function e(){}return function(t){if(!Mt(t))return{};if(up)return up(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),sp=function(e){return typeof e.constructor!="function"||ho(e)?{}:sb(is(e))},cb=function(e){return An(e)&&h(e)=="[object Map]"},cp=Kt.a&&Kt.a.isMap,lb=cp?dr(cp):cb,fb=function(e){return An(e)&&h(e)=="[object Set]"},lp=Kt.a&&Kt.a.isSet,pb=lp?dr(lp):fb,fp="[object Arguments]",pp="[object Function]",db="[object Object]",kt={};kt[fp]=kt["[object Array]"]=kt["[object ArrayBuffer]"]=kt["[object DataView]"]=kt["[object Boolean]"]=kt["[object Date]"]=kt["[object Float32Array]"]=kt["[object Float64Array]"]=kt["[object Int8Array]"]=kt["[object Int16Array]"]=kt["[object Int32Array]"]=kt["[object Map]"]=kt["[object Number]"]=kt["[object Object]"]=kt["[object RegExp]"]=kt["[object Set]"]=kt["[object String]"]=kt["[object Symbol]"]=kt["[object Uint8Array]"]=kt["[object Uint8ClampedArray]"]=kt["[object Uint16Array]"]=kt["[object Uint32Array]"]=!0,kt["[object Error]"]=kt[pp]=kt["[object WeakMap]"]=!1;var hb=function e(t,n,r,a,o,u){var f,d=1&n,m=2&n,O=4&n;if(r&&(f=o?r(t,a,o,u):r(t)),f!==void 0)return f;if(!Mt(t))return t;var S=Zt(t);if(S){if(f=nb(t),!d)return np(t,f)}else{var T=h(t),C=T==pp||T=="[object GeneratorFunction]";if(Object(Zr.a)(t))return Object(tp.a)(t,d);if(T==db||T==fp||C&&!o){if(f=m||C?{}:sp(t),!d)return m?Qv(t,Zv(f,t)):Jv(t,Wv(f,t))}else{if(!kt[T])return o?t:{};f=ub(t,T,d)}}u||(u=new Wn);var U=u.get(t);if(U)return U;u.set(t,f),pb(t)?t.forEach(function(ne){f.add(e(ne,n,r,ne,t,u))}):lb(t)&&t.forEach(function(ne,re){f.set(re,e(ne,n,r,re,t,u))});var W=S?void 0:(O?m?eb:yo:m?ii:Dr)(t);return Vv(W||t,function(ne,re){W&&(ne=t[re=ne]),ha(f,re,e(ne,n,r,re,t,u))}),f},Dt=function(e){return hb(e,5)},us=function(e,t,n){(n!==void 0&&!vt(e[t],n)||n===void 0&&!(t in e))&&ns(e,t,n)},yb=function(e){return An(e)&&It(e)},gb=Function.prototype,vb=Object.prototype,dp=gb.toString,bb=vb.hasOwnProperty,mb=dp.call(Object),_b=function(e){if(!An(e)||wt(e)!="[object Object]")return!1;var t=is(e);if(t===null)return!0;var n=bb.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&dp.call(n)==mb},ss=function(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]},Ob=function(e){return Oo(e,ii(e))},wb=function(e,t,n,r,a,o,u){var f=ss(e,n),d=ss(t,n),m=u.get(d);if(m)us(e,n,m);else{var O=o?o(f,d,n+"",e,t,u):void 0,S=O===void 0;if(S){var T=Zt(d),C=!T&&Object(Zr.a)(d),U=!T&&!C&&Zo(d);O=d,T||C||U?Zt(f)?O=f:yb(f)?O=np(f):C?(S=!1,O=Object(tp.a)(d,!0)):U?(S=!1,O=ap(d,!0)):O=[]:_b(d)||Kn(d)?(O=f,Kn(f)?O=Ob(f):Mt(f)&&!Gn(f)||(O=sp(d))):S=!1}S&&(u.set(d,O),a(O,d,r,o,u),u.delete(d)),us(e,n,O)}},xb=function e(t,n,r,a,o){t!==n&&Of(n,function(u,f){if(o||(o=new Wn),Mt(u))wb(t,n,f,r,e,a,o);else{var d=a?a(ss(t,f),u,f+"",t,n,o):void 0;d===void 0&&(d=u),us(t,f,d)}},ii)},hp=Sf(function(e,t,n){xb(e,t,n)}),Eb={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"}},yp=function(e){var t=Dt(Eb);return e&&(t=hp(t,e)),t};i(77),i(158);function Sb(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 jb=function(){function e(){var r,a,o;(function(u,f){if(!(u instanceof f))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(f){f=f.trim(),u._events[f]||(u._events[f]=[]),u._events[f].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 f=o._events[u]||[],d=o._events["*"]||[],m=function(O){for(var S=O.length,T=0;T<S;T++)if(O[T]){var C=O[T],U=C.callback;C.once&&(O.splice(T,1),O.length===0&&delete o._events[u],S--,T--),U.apply(o,[a])}};m(f),m(d)})}},{key:"off",value:function(r,a){var o=this;return r||(this._events={}),r.split(",").forEach(function(u){if(a){for(var f=o._events[u]||[],d=f.length,m=0;m<d;m++)f[m].callback===a&&(f.splice(m,1),d--,m--);f.length===0&&delete o._events[u]}else delete o._events[u]}),this}},{key:"getEvents",value:function(){return this._events}}])&&Sb(t.prototype,n),e}();function Cr(e,t){return t*Math.round(e/t)||e}function gp(e,t){return e%t}function cs(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return vp(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 vp(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 vp(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 ls,fs=function(e,t,n){var r=cs(e,2),a=r[0],o=r[1],u=cs(t,2),f=u[0],d=u[1],m=cs(n,2),O=m[0],S=m[1];return a>f&&a<O&&o>d&&o<S},bp=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;case"ctrl":n=e.ctrlKey;break;default:n=!1}return n},Pb=(i(78),i(161),i(125),i(79),i(30),i(12),i(13),i(14),i(47),new Uint8Array(16));function kb(){if(!ls&&!(ls=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&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 ls(Pb)}for(var Tb=/^(?:[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,Ab=function(e){return typeof e=="string"&&Tb.test(e)},Qt=[],ps=0;ps<256;++ps)Qt.push((ps+256).toString(16).substr(1));var Mb=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]).toLowerCase();if(!Ab(n))throw TypeError("Stringified UUID is invalid");return n},ds=function(e,t,n){var r=(e=e||{}).random||(e.rng||kb)();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 Mb(r)},Rr=function(){return ds()},Db=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+ds(),a.id=r[a.id],r},{});return e.edges.forEach(function(r){r.id=t+ds(),r.sourceNodeId=n[r.sourceNodeId],r.targetNodeId=n[r.targetNodeId]}),e},ai=(i(104),i(162),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 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 mp(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 _p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mp(Object(n),!0).forEach(function(r){Nb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var me,Op,wp,xp,Ep,Sp,jp,Pp,kp,Tp,Ap,Mp,Dp,Np,Cp,Rp,Ip,Lp,zp,Bp,Fp,ys=function(e){return e.anchors},ga=function(e,t){for(var n,r=t.nodes,a=r.length-1;a>=0;a--){var o=r[a];if(Rb(e,o)){var u=o.getTargetAnchor(e);if(u){var f={node:o,anchorIndex:u.index,anchor:u.anchor};n&&!Cb(o,n.node,t)||(n=f)}}}return n},Cb=function(e,t,n){return e.zIndex>t.zIndex||n.nodesMap[e.id].index>n.nodesMap[t.id].index},qn=function(e,t,n,r){return Math.hypot(e-n,t-r)},Ir=function(e,t){var n=!1,r=En(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},Rb=function(e,t){var n=!1,r=En(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},En=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}},Hp=function(e,t,n){var r,a=function(u){var f=u,d=f.x,m=f.y,O=f.width,S=f.height,T=f.radius;return[{x:d-O/2+T,y:m-S/2+T,r:T},{x:d+O/2-T,y:m-S/2+T,r:T},{x:d-O/2+T,y:m+S/2-T,r:T},{x:d+O/2-T,y:m+S/2-T,r:T}]}(n),o=Number.MAX_SAFE_INTEGER;return a.forEach(function(u){var f=qn(e.x,e.y,u.x,u.y);f<o&&(o=f,r=u)}),gs(e,t,r)},gs=function(e,t,n){var r,a=n,o=a.x,u=a.y,f=a.r;if(t===At.HORIZONTAL){var d=o-Math.sqrt(f*f-(e.y-u)*(e.y-u)),m=o+Math.sqrt(f*f-(e.y-u)*(e.y-u));r={x:Math.abs(d-e.x)<Math.abs(m-e.x)?d:m,y:e.y}}else if(t===At.VERTICAL){var O=u-Math.sqrt(f*f-(e.x-o)*(e.x-o)),S=u+Math.sqrt(f*f-(e.x-o)*(e.x-o)),T=Math.abs(O-e.y)<Math.abs(S-e.y)?O:S;r={x:e.x,y:T}}return r},Xp=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,f=n.y+n.height/2-n.radius,d=n.x,m=n.y,O=n.width,S=n.height;return e.y===m+S/2||e.y===m-S/2?r=e.x>a&&e.x<o:e.x!==d+O/2&&e.x!==d-O/2||(r=e.y>u&&e.y<f),r},Gp=function(e,t,n){var r,a=n,o=a.x,u=a.y,f=a.rx,d=a.ry;if(t===At.HORIZONTAL){var m=o-Math.sqrt(f*f-(e.y-u)*(e.y-u)*f*f/(d*d)),O=o+Math.sqrt(f*f-(e.y-u)*(e.y-u)*f*f/(d*d));r={x:Math.abs(m-e.x)<Math.abs(O-e.x)?m:O,y:e.y}}else if(t===At.VERTICAL){var S=u-Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(f*f)),T=u+Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(f*f)),C=Math.abs(S-e.y)<Math.abs(T-e.y)?S:T;r={x:e.x,y:C}}return r},Up=function(e,t,n){for(var r,a=n.pointsPosition,o=Number.MAX_SAFE_INTEGER,u=[],f=0;f<a.length;f++)u.push({start:a[f],end:a[(f+1)%a.length]});return u.forEach(function(d){var m=d.start,O=d.end,S=m,T=O;m.x>O.x&&(S=O,T=m);var C={x:e.x,y:e.y};if(S.x===T.x&&t===At.HORIZONTAL&&(C={x:S.x,y:e.y}),S.y===T.y&&t===At.VERTICAL&&(C={x:e.x,y:S.y}),S.x!==T.x&&S.y!==T.y){var U=(T.y-S.y)/(T.x-S.x),W=(S.x*T.y-T.x*S.y)/(S.x-T.x);t===At.HORIZONTAL?C={x:(e.y-W)/U,y:e.y}:t===At.VERTICAL&&(C={x:e.x,y:U*e.x+W})}if(ai(C,m,O)){var ne=qn(C.x,C.y,e.x,e.y);ne<o&&(o=ne,r=C)}}),r},Yp=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}},Vp=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(f){var d=document.createElement("div");d.textContent=f,o.appendChild(d)}):o.textContent=t,document.body.appendChild(o);var u=o.clientHeight;return document.body.removeChild(o),u},vs=function(e){var t=e.rows,n=e.rowsLength,r=e.fontSize,a=0;return t&&t.forEach(function(o){var u=yd(o);a=u>a?u:a}),{width:Math.ceil(a/2)*r+r/4,height:n*(r+2)+r/4}},ui=function(e){return hs(e)!=="object"?{isAllPass:!!e,msg:e?"":"不允许连接"}:e},en=function(e){try{return JSON.parse(JSON.stringify(e))}catch{return e}},Ib=1e3,Lb=999,bs=function(){return++Ib};function Wp(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 yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wp(Object(n),!0).forEach(function(r){Nn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gt(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 zb(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 Nn(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,f){return f(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 ms=(me=function(){function e(r,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),Nn(this,"id",""),Gt(this,"type",Op,this),Gt(this,"sourceNodeId",wp,this),Gt(this,"targetNodeId",xp,this),Gt(this,"startPoint",Ep,this),Gt(this,"endPoint",Sp,this),Gt(this,"text",jp,this),Gt(this,"properties",Pp,this),Gt(this,"points",kp,this),Gt(this,"pointsList",Tp,this),Gt(this,"isSelected",Ap,this),Gt(this,"isHovered",Mp,this),Gt(this,"isHitable",Dp,this),Gt(this,"draggable",Np,this),Gt(this,"visible",Cp,this),Nn(this,"virtual",!1),Gt(this,"isAnimation",Rp,this),Gt(this,"isShowAdjustPoint",Ip,this),Nn(this,"graphModel",void 0),Gt(this,"zIndex",Lp,this),Nn(this,"BaseType",Xt.EDGE),Nn(this,"modelType",dt.EDGE),Gt(this,"state",zp,this),Nn(this,"additionStateData",void 0),Nn(this,"sourceAnchorId",""),Nn(this,"targetAnchorId",""),Nn(this,"menu",void 0),Nn(this,"customTextPosition",!1),Gt(this,"style",Bp,this),Gt(this,"arrowConfig",Fp,this),this.graphModel=a,this.initEdgeData(r),this.setAttributes()}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),u=this.createId();r.id=u||o||Rr()}this.arrowConfig.markerEnd="url(#marker-end-".concat(r.id,")");var f=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=f,un(this,im(r)),this.graphModel.overlapMode===xn.INCREASE&&(this.zIndex=r.zIndex||bs()),this.setAnchors(),this.initPoints(),this.formatText(r)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return yn(yn({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return yn({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.edgeText;return Dt(r)}},{key:"getEdgeAnimationStyle",value:function(){var r=this.graphModel.theme.edgeAnimation;return Dt(r)}},{key:"getArrowStyle",value:function(){var r=this.getEdgeStyle(),a=this.getEdgeAnimationStyle(),o=this.graphModel.theme.arrow,u=this.isAnimation?a.stroke:r.stroke;return yn(yn({},r),{},{fill:u,stroke:u},o)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Dt(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 ys(r).forEach(function(f){var d=md(f,a);(u===void 0||d<u)&&(u=d,o=f)}),o}},{key:"getEndAnchor",value:function(r){var a,o,u=this;return ys(r).forEach(function(f){var d=md(f,u.startPoint);(o===void 0||d<o)&&(o=d,a=f)}),a}},{key:"getProperties",value:function(){return Object(c.I)(this.properties)}},{key:"getData",value:function(){var r=this.text,a=r.x,o=r.y,u=r.value,f={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(c.I)(this.properties)};return u&&(f.text={x:a,y:o,value:u}),this.graphModel.overlapMode===xn.INCREASE&&(f.zIndex=this.zIndex),f}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(r,a){this.properties[r]=en(a),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=yn(yn({},Object(c.I)(this.properties)),en(r)),this.setAttributes()}},{key:"changeEdgeId",value:function(r){var a=this.arrowConfig,o=a.markerEnd,u=a.markerStart;u&&u==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(r,")")),o&&o==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(r,")")),this.id=r}},{key:"setStyle",value:function(r,a){this.style=yn(yn({},this.style),{},Nn({},r,en(a)))}},{key:"setStyles",value:function(r){this.style=yn(yn({},this.style),en(r))}},{key:"updateStyles",value:function(r){this.style=yn({},en(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,f=o.y,d=o.value,m=o.draggable,O=o.editable;this.text={value:d,draggable:m,x:u+r,y:f+a,editable:O}}}},{key:"setText",value:function(r){r&&un(this.text,r)}},{key:"updateText",value:function(r){this.text=yn(yn({},Object(c.I)(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&&zb(t.prototype,n),e}(),Op=Je(me.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),wp=Je(me.prototype,"sourceNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),xp=Je(me.prototype,"targetNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ep=Je(me.prototype,"startPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Sp=Je(me.prototype,"endPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),jp=Je(me.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Pp=Je(me.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),kp=Je(me.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Tp=Je(me.prototype,"pointsList",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ap=Je(me.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mp=Je(me.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dp=Je(me.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Np=Je(me.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Cp=Je(me.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Rp=Je(me.prototype,"isAnimation",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ip=Je(me.prototype,"isShowAdjustPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Lp=Je(me.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),zp=Je(me.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Bp=Je(me.prototype,"style",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Fp=Je(me.prototype,"arrowConfig",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),Je(me.prototype,"sourceNode",[c.m],Object.getOwnPropertyDescriptor(me.prototype,"sourceNode"),me.prototype),Je(me.prototype,"targetNode",[c.m],Object.getOwnPropertyDescriptor(me.prototype,"targetNode"),me.prototype),Je(me.prototype,"textPosition",[c.m],Object.getOwnPropertyDescriptor(me.prototype,"textPosition"),me.prototype),Je(me.prototype,"setProperty",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setProperty"),me.prototype),Je(me.prototype,"deleteProperty",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"deleteProperty"),me.prototype),Je(me.prototype,"setProperties",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setProperties"),me.prototype),Je(me.prototype,"changeEdgeId",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"changeEdgeId"),me.prototype),Je(me.prototype,"setStyle",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setStyle"),me.prototype),Je(me.prototype,"setStyles",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setStyles"),me.prototype),Je(me.prototype,"updateStyles",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateStyles"),me.prototype),Je(me.prototype,"formatText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"formatText"),me.prototype),Je(me.prototype,"resetTextPosition",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"resetTextPosition"),me.prototype),Je(me.prototype,"moveText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"moveText"),me.prototype),Je(me.prototype,"setText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setText"),me.prototype),Je(me.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateText"),me.prototype),Je(me.prototype,"setAnchors",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setAnchors"),me.prototype),Je(me.prototype,"setSelected",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setSelected"),me.prototype),Je(me.prototype,"setHovered",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setHovered"),me.prototype),Je(me.prototype,"setHitable",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setHitable"),me.prototype),Je(me.prototype,"openEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"openEdgeAnimation"),me.prototype),Je(me.prototype,"closeEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"closeEdgeAnimation"),me.prototype),Je(me.prototype,"setElementState",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setElementState"),me.prototype),Je(me.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateStartPoint"),me.prototype),Je(me.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"moveStartPoint"),me.prototype),Je(me.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateEndPoint"),me.prototype),Je(me.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"moveEndPoint"),me.prototype),Je(me.prototype,"setZIndex",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setZIndex"),me.prototype),Je(me.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"initPoints"),me.prototype),Je(me.prototype,"updateAttributes",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateAttributes"),me.prototype),Je(me.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"getAdjustStart"),me.prototype),Je(me.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"getAdjustEnd"),me.prototype),Je(me.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateAfterAdjustStartAndEnd"),me.prototype),me),_s=ms;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 $p(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 Kp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$p(Object(n),!0).forEach(function(r){Zp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$p(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fb(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<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=Hb(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 Hb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=wo(e))!==null;);return e}function xs(e,t){return xs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},xs(e,t)}function Xb(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=wo(e);if(t){var a=wo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Gb(this,n)}}function Gb(e,t){if(t&&(Os(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qp(e)}function qp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wo(e){return wo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wo(e)}function Zp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var st,Jp,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&&xs(o,u)})(a,e);var t,n,r=Xb(a);function a(){var o;Bb(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Zp(qp(o=r.call.apply(r,[this].concat(f))),"modelType",dt.LINE_EDGE),o}return t=a,(n=[{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.line;return Kp(Kp({},ws(wo(a.prototype),"getEdgeStyle",this).call(this)),Dt(o))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Fb(t.prototype,n),a}(_s);function Ss(e){return Ss=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},Ss(e)}function Ub(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Qp(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 Qp(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 Qp(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 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 td(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){Ps(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 Yb(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 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 si(){return si=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=$b(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},si.apply(this,arguments)}function $b(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Lr(e))!==null;);return e}function js(e,t){return js=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},js(e,t)}function Kb(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Lr(e);if(t){var a=Lr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return qb(this,n)}}function qb(e,t){if(t&&(Ss(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ci(e)}function ci(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lr(e){return Lr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Lr(e)}function Ps(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(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,f){return f(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 ks=(st=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&&js(o,u)})(a,e);var t,n,r=Kb(a);function a(){var o;Vb(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Ps(ci(o=r.call.apply(r,[this].concat(f))),"modelType",dt.POLYLINE_EDGE),Ps(ci(o),"draggingPointList",void 0),Yb(ci(o),"dbClickPosition",Jp,ci(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=30,si(Lr(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.polyline;return td(td({},si(Lr(a.prototype),"getEdgeStyle",this).call(this)),Dt(o))}},{key:"getTextPosition",value:function(){var o,u=(o=this.text)===null||o===void 0?void 0:o.value;if(this.dbClickPosition&&!u){var f=this.dbClickPosition;return{x:f.x,y:f.y}}var d=no(this.points),m=Ub(rm(d),2),O=m[0],S=m[1];return{x:(O.x+S.x)/2,y:(O.y+S.y)/2}}},{key:"getAfterAnchor",value:function(o,u,f){var d,m;return f.forEach(function(O){var S;o===At.HORIZONTAL?S=Math.abs(u.y-O.y):o===At.VERTICAL&&(S=Math.abs(u.x-O.x)),(!m||m>S)&&(m=S,d=O)}),d}},{key:"getCrossPoint",value:function(o,u,f){var d;return o===At.HORIZONTAL?d={x:f.x,y:u.y}:o===At.VERTICAL&&(d={x:u.x,y:f.y}),d}},{key:"removeCrossPoints",value:function(o,u,f){var d=f.map(function(re){return re});if(o===1){var m=d[o],O=d[u],S=d[o-1];if(fd(S,m,this.sourceNode)){if(pd(m,O,this.sourceNode)){var T=dd(m,O,this.sourceNode);T&&(d[o]=T,d.splice(o-1,1),o--,u--)}}else this.sourceNode.anchors.forEach(function(re){(re.x===S.x&&re.x===m.x||re.y===S.y&&re.y===m.y)&&qn(re.x,re.y,m.x,m.y)<qn(S.x,S.y,m.x,m.y)&&(d[o-1]=re)})}if(u===f.length-2){var C=d[o],U=d[u],W=d[u+1];if(fd(U,W,this.targetNode)){if(pd(C,U,this.targetNode)){var ne=dd(C,U,this.targetNode);ne&&(d[u]=ne,d.splice(u+1,1))}}else this.targetNode.anchors.forEach(function(re){(re.x===W.x&&re.x===U.x||re.y===W.y&&re.y===U.y)&&qn(re.x,re.y,U.x,U.y)<qn(W.x,W.y,U.x,U.y)&&(d[u+1]=re)})}return d}},{key:"getDraggingPoints",value:function(o,u,f,d,m){var O=m.map(function(C){return C}),S=this.getAfterAnchor(o,f,d),T=this.getCrossPoint(o,f,S);return u==="start"?(O.unshift(T),O.unshift(S)):(O.push(T),O.push(S)),O}},{key:"updateCrossPoints",value:function(o){var u=o.map(function(Oe){return Oe}),f=o[0],d=o[1],m=o[u.length-2],O=o[u.length-1],S=this.sourceNode,T=this.targetNode,C=S.modelType,U=T.modelType,W=xa(f,d),ne=u[0];switch(C){case dt.RECT_NODE:S.radius!==0&&(Xp(f,S)||(ne=Hp(f,W,S)));break;case dt.CIRCLE_NODE:ne=gs(f,W,S);break;case dt.ELLIPSE_NODE:ne=Gp(f,W,S);break;case dt.DIAMOND_NODE:case dt.POLYGON_NODE:ne=Up(f,W,S)}u[0]=ne;var re=xa(m,O),de=u[u.length-1];switch(U){case dt.RECT_NODE:T.radius!==0&&(Xp(O,T)||(de=Hp(O,re,T)));break;case dt.CIRCLE_NODE:de=gs(O,re,T);break;case dt.ELLIPSE_NODE:de=Gp(O,re,T);break;case dt.DIAMOND_NODE:case dt.POLYGON_NODE:de=Up(O,re,T)}return u[u.length-1]=de,u}},{key:"getData",value:function(){var o=si(Lr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(f){return{x:f.x,y:f.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=ld({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.draggingPointList=this.pointsList.map(function(o){return o})}},{key:"dragAppendSimple",value:function(o,u){this.isDragging=!0;var f=o.start,d=o.end,m=o.startIndex,O=o.endIndex,S=o.direction,T=this.pointsList,C=T;return S===At.HORIZONTAL?(T[m]={x:f.x,y:f.y+u.y},T[O]={x:d.x,y:d.y+u.y},C=this.pointsList.map(function(U){return U})):S===At.VERTICAL&&(T[m]={x:f.x+u.x,y:f.y},T[O]={x:d.x+u.x,y:d.y},C=this.pointsList.map(function(U){return U})),this.updatePointsAfterDrag(C),this.draggingPointList=C,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},T[m]),end:Object.assign({},T[O]),startIndex:m,endIndex:O,direction:S}}},{key:"dragAppend",value:function(o,u){this.isDragging=!0;var f=o.start,d=o.end,m=o.startIndex,O=o.endIndex,S=o.direction,T=this.pointsList;if(S===At.HORIZONTAL){T[m]={x:f.x,y:f.y+u.y},T[O]={x:d.x,y:d.y+u.y};var C=this.pointsList.map(function(Ae){return Ae});if(m!==0&&O!==this.pointsList.length-1&&(C=this.removeCrossPoints(m,O,C)),m===0){var U={x:f.x,y:f.y+u.y};if(!Ir(U,this.sourceNode)){var W=this.sourceNode.anchors;C=this.getDraggingPoints(S,"start",U,W,C)}}if(O===this.pointsList.length-1){var ne={x:d.x,y:d.y+u.y};if(!Ir(ne,this.targetNode)){var re=this.targetNode.anchors;C=this.getDraggingPoints(S,"end",ne,re,C)}}this.updatePointsAfterDrag(C),this.draggingPointList=C}else if(S===At.VERTICAL){T[m]={x:f.x+u.x,y:f.y},T[O]={x:d.x+u.x,y:d.y};var de=this.pointsList.map(function(Ae){return Ae});if(m!==0&&O!==this.pointsList.length-1&&(de=this.removeCrossPoints(m,O,de)),m===0){var Oe={x:f.x+u.x,y:f.y};if(!Ir(Oe,this.sourceNode)){var Ce=this.sourceNode.anchors;de=this.getDraggingPoints(S,"start",Oe,Ce,de)}}if(O===this.pointsList.length-1){var Ee={x:d.x+u.x,y:d.y};if(!Ir(Ee,this.targetNode)){var Ge=this.targetNode.anchors;de=this.getDraggingPoints(S,"end",Ee,Ge,de)}}this.updatePointsAfterDrag(de),this.draggingPointList=de}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},T[m]),end:Object.assign({},T[O]),startIndex:m,endIndex:O,direction:S}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var o=cd(no(this.points));this.pointsList=o.map(function(d){return d}),this.draggingPointList=[];var u=o[0];this.startPoint=Object.assign({},u);var f=o[o.length-1];this.endPoint=Object.assign({},f)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(o){var u=this.updateCrossPoints(o);this.points=u.map(function(f){return"".concat(f.x,",").concat(f.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,f=o.endPoint,d=o.sourceNode,m=o.targetNode,O=ld({x:u.x,y:u.y},{x:f.x,y:f.y},d,m,this.offset||0);this.pointsList=O,this.initPoints()}}])&&Wb(t.prototype,n),a}(_s),Jp=sn(st.prototype,"dbClickPosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sn(st.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"initPoints"),st.prototype),sn(st.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePoints"),st.prototype),sn(st.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateStartPoint"),st.prototype),sn(st.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveStartPoint"),st.prototype),sn(st.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateEndPoint"),st.prototype),sn(st.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveEndPoint"),st.prototype),sn(st.prototype,"dragAppendStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendStart"),st.prototype),sn(st.prototype,"dragAppendSimple",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendSimple"),st.prototype),sn(st.prototype,"dragAppend",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppend"),st.prototype),sn(st.prototype,"dragAppendEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendEnd"),st.prototype),sn(st.prototype,"updatePointsAfterDrag",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePointsAfterDrag"),st.prototype),sn(st.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustStart"),st.prototype),sn(st.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustEnd"),st.prototype),sn(st.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateAfterAdjustStartAndEnd"),st.prototype),st),li=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},f=Math.atan((n.y-t.y)/(n.x-t.x)),d=Math.atan(r/a),m=Math.sqrt(a*a+r*r);return o==="start"?n.x>=t.x?(u.leftX=t.x+m*Math.sin(f+d),u.leftY=t.y-m*Math.cos(f+d),u.rightX=t.x-m*Math.sin(f-d),u.rightY=t.y+m*Math.cos(f-d)):(u.leftX=t.x-m*Math.sin(f+d),u.leftY=t.y+m*Math.cos(f+d),u.rightX=t.x+m*Math.sin(f-d),u.rightY=t.y-m*Math.cos(f-d)):o==="end"&&(n.x>=t.x?(u.leftX=n.x+m*Math.sin(f-d),u.leftY=n.y-m*Math.cos(f-d),u.rightX=n.x-m*Math.sin(f+d),u.rightY=n.y+m*Math.cos(f+d)):(u.leftX=n.x-m*Math.sin(f-d),u.leftY=n.y+m*Math.cos(f-d),u.rightX=n.x+m*Math.sin(f+d),u.rightY=n.y-m*Math.cos(f+d))),u},Zb={x:1,y:0,z:0};function nd(e){var t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t,z:0}}function Jb(e){return r=function(o,u){return o.x*u.y-o.y*u.x}(t=Zb,n=e),a=Math.acos(function(o,u){var f=[o.x,o.y,o.z];return[u.x,u.y,u.z].reduce(function(d,m,O){return d+m*f[O]})}(nd(t),nd(n))),r>=0?a:-a;var t,n,r,a}function rd(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 va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rd(Object(n),!0).forEach(function(r){Qb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function em(e){return function(t){if(Array.isArray(t))return As(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||od(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 Ts(e){return Ts=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},Ts(e)}function ba(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||od(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 od(e,t){if(e){if(typeof e=="string")return As(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)?As(e,t):void 0}}function As(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 Ms=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},ma=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}},_a=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?At.HORIZONTAL:At.VERTICAL}(t,e);return n===At.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}},id=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}},fi=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),f=Math.max.apply(Math,r),d=o-a,m=f-u;return t&&(d+=t,m+=t),{centerX:(a+o)/2,centerY:(u+f)/2,maxX:o,maxY:f,minX:a,minY:u,x:(a+o)/2,y:(u+f)/2,height:m,width:d}},Oa=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}]},wa=function(e,t){var n=e.x,r=e.y;return n<t.minX||n>t.maxX||r<t.minY||r>t.maxY},Ds=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},ad=function(e,t,n,r,a){return Ds(e,t)+Ds(e,n)+function(o,u){var f=0;return u.forEach(function(d){d&&(o.x===d.x&&(f+=-2),o.y===d.y&&(f+=-2))}),f}(e,[t,n,r,a])},tm=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)},pi=function(e,t,n,r){var a=t.x-e.x,o=t.y-e.y,u=r.x-n.x,f=r.y-n.y,d=(-o*(e.x-n.x)+a*(e.y-n.y))/(-u*o+a*f),m=(u*(e.y-n.y)-f*(e.x-n.x))/(-u*o+a*f);return d>=0&&d<=1&&m>=0&&m<=1},ud=function(e,t,n){if(n.width===0&&n.height===0)return!1;var r=ba(Oa(n),4),a=r[0],o=r[1],u=r[2],f=r[3];return pi(e,t,a,o)||pi(e,t,a,f)||pi(e,t,o,u)||pi(e,t,u,f)},nm=function(e,t,n,r,a,o,u){var f=[],d=[t],m={},O={},S={};O[t.id]=0,S[t.id]=ad(t,n,t);var T={};e.forEach(function(W){T[W.id]=W});for(var C=function(){var W,ne,re,de=void 0,Oe=1/0;if(d.forEach(function(Ee){S[Ee.id]<Oe&&(Oe=S[Ee.id],de=Ee)}),de===n){var Ce=[];return tm(Ce,T,m,n.id),{v:Ce}}ne=de,(re=(W=d).indexOf(ne))>-1&&W.splice(re,1),f.push(de),function(Ee,Ge,Ae,Pe){var Qe=[];return Ee.forEach(function(yt){yt!==Ge&&(yt.x!==Ge.x&&yt.y!==Ge.y||ud(yt,Ge,Ae)||ud(yt,Ge,Pe)||Qe.push(yt))}),Ms(Qe)}(e,de,r,a).forEach(function(Ee){if(f.indexOf(Ee)===-1){d.indexOf(Ee)===-1&&d.push(Ee);var Ge=S[de.id]+Ds(de,Ee);O[Ee.id]&&Ge>=O[Ee.id]||(m[Ee.id]=de.id,O[Ee.id]=Ge,S[Ee.id]=O[Ee.id]+ad(Ee,n,t,o,u))}})};d.length;){var U=C();if(Ts(U)==="object")return U.v}return[t,n]},sd=function(e){return En(e)},cd=function(e){for(var t=1;t<e.length-1;){var n=e[t-1],r=e[t],a=e[t+1];n.x===r.x&&r.x===a.x||n.y===r.y&&r.y===a.y?e.splice(t,1):t++}return e},ld=function(e,t,n,r,a){var o,u,f=sd(n),d=sd(r),m=ma(f,a),O=ma(d,a),S=_a(m,e),T=_a(O,t);if(o=m,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 C=om(e,t,S,T);return[e,S].concat(em(C),[T,t])}var U=fi([S,T]),W=id(m,U),ne=id(O,U),re=[];re=(re=re.concat(Oa(W))).concat(Oa(ne));var de={x:(e.x+t.x)/2,y:(e.y+t.y)/2};[U,W,ne].forEach(function(Ce){re=re.concat(function(Ee,Ge){return function(Ae,Pe){return Pe<Ae.minX||Pe>Ae.maxX?[]:[{x:Pe,y:Ae.minY},{x:Pe,y:Ae.maxY}]}(Ee,Ge.x).concat(function(Ae,Pe){return Pe<Ae.minY||Pe>Ae.maxY?[]:[{x:Ae.minX,y:Pe},{x:Ae.maxX,y:Pe}]}(Ee,Ge.y))}(Ce,de).filter(function(Ee){return wa(Ee,m)&&wa(Ee,O)}))}),[{x:S.x,y:T.y},{x:T.x,y:S.y}].forEach(function(Ce){wa(Ce,m)&&wa(Ce,O)&&re.push(Ce)}),re.unshift(S),re.push(T),re=Ms(re);var Oe=nm(re,S,T,f,d,e,t);return Oe.unshift(e),Oe.push(t),Oe.length>2&&(Oe=cd(Oe)),Ms(Oe)},rm=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=qn(n.x,n.y,r.x,r.y),o=1;o<e.length-1;o++){var u=e[o],f=e[o+1],d=qn(u.x,u.y,f.x,f.y);d>a&&(a=d,n=u,r=f)}t=[n,r]}return t},fd=function(e,t,n){var r=Ir(e,n),a=Ir(t,n);return r&&a},pd=function(e,t,n){var r=Ir(e,n),a=Ir(t,n);return!(r&&a)&&(r||a)},dd=function(e,t,n){for(var r,a,o=En(n),u=Oa(o),f=0;f<u.length;f++)pi(e,t,u[f],u[(f+1)%u.length])&&(a=[u[f],u[(f+1)%u.length]]);return a&&(r=function(d,m,O,S){var T=(m.y-d.y)*(S.x-O.x)-(d.x-m.x)*(O.y-S.y);if(T===0)return!1;var C=((m.x-d.x)*(S.x-O.x)*(O.y-d.y)+(m.y-d.y)*(S.x-O.x)*d.x-(S.y-O.y)*(m.x-d.x)*O.x)/T,U=-((m.y-d.y)*(S.y-O.y)*(O.x-d.x)+(m.x-d.x)*(S.y-O.y)*d.y-(S.x-O.x)*(m.y-d.y)*O.y)/T;return(C-d.x)*(C-m.x)<=0&&(U-d.y)*(U-m.y)<=0&&(C-O.x)*(C-S.x)<=0&&(U-O.y)*(U-S.y)<=0&&{x:C,y:U}}(e,t,a[0],a[1])),r},xa=function(e,t){var n;return e.x===t.x?n=At.VERTICAL:e.y===t.y&&(n=At.HORIZONTAL),n},no=function(e){var t=e.split(" "),n=[];return t&&t.forEach(function(r){var a=ba(r.split(","),2),o=a[0],u=a[1];n.push({x:Number(o),y:Number(u)})}),n},om=function(e,t,n,r){var a=[];if(xa(e,n)===xa(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=ai(o,e,n),f=ai(o,t,r);if(u||f)o={x:r.x,y:n.y};else{var d=hd(o,e,n),m=hd(o,t,r);d&&m&&(o={x:r.x,y:n.y})}a.push(o)}return a},hd=function(e,t,n){return e.x===t.x&&e.x===n.x||e.y===t.y&&e.y===n.y},yd=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},gd=function(e){var t=e.start,n=e.end,r=e.sourceNode,a=e.targetNode,o=e.offset,u=En(r),f=En(a),d=ma(u,o),m=ma(f,o);return{sNext:_a(d,t),ePre:_a(m,n)}},Ea=function(e){var t=e.replace(/M/g,"").replace(/C/g,",").split(",");return[Sa(t[0]),Sa(t[1]),Sa(t[2]),Sa(t[3])]},Sa=function(e){var t=ba(e.replace(/(^\s*)/g,"").split(" "),2);return{x:+t[0],y:+t[1]}},vd=function(e){var t=Ea(e),n=ba(t,4),r=function(a,o,u,f){return function(d){if(d<0||d>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:a.x*Math.pow(1-d,3)+3*o.x*d*Math.pow(1-d,2)+3*u.x*Math.pow(d,2)*(1-d)+f.x*Math.pow(d,3),y:a.y*Math.pow(1-d,3)+3*o.y*d*Math.pow(1-d,2)+3*u.y*Math.pow(d,2)*(1-d)+f.y*Math.pow(d,3)}}(.95)}(n[0],n[1],n[2],n[3]);return[r,t[3]]},bd=function(e,t){for(var n,r=e.x,a=e.y,o=no(t),u=Number.MAX_SAFE_INTEGER,f=[],d=0;d<o.length;d++)f.push({start:o[d],end:o[(d+1)%o.length]});if(f.forEach(function(T){var C=T.start,U=T.end;if(C.x===U.x){var W={x:C.x,y:a};if(ai(W,C,U)){var ne=Math.abs(C.x-r);ne<u&&(u=ne,n=W)}}else if(C.y===U.y){var re={x:r,y:C.y};if(ai(re,C,U)){var de=Math.abs(C.y-a);de<u&&(u=de,n=re)}}}),!n){var m=f[0],O=m.start,S=m.end;n={x:O.x+(S.x-O.x)/2,y:O.y+(S.y-O.y)/2}}return n},im=function(e){return oi(e,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},md=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))};i(204);var xo=function(){};function am(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 Ut(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 um(e){var t=e.onDragStart,n=t===void 0?xo:t,r=e.onDragging,a=r===void 0?xo:r,o=e.onDragEnd,u=o===void 0?xo:o,f=e.step,d=f===void 0?1:f,m=e.isStopPropagation,O=m===void 0||m,S=!1,T=!1,C=0,U=0,W=0,ne=0;function re(Oe){if(O&&Oe.stopPropagation(),T&&(S=!0,W+=Oe.clientX-C,ne+=Oe.clientY-U,C=Oe.clientX,U=Oe.clientY,Math.abs(W)>d||Math.abs(ne)>d)){var Ce=W%d,Ee=ne%d,Ge=W-Ce,Ae=ne-Ee;W=Ce,ne=Ee,a({deltaX:Ge,deltaY:Ae,event:Oe})}}function de(Oe){if(O&&Oe.stopPropagation(),T=!1,Zn.removeEventListener("mousemove",re,!1),Zn.removeEventListener("mouseup",de,!1),S)return S=!1,u({event:Oe})}return function(Oe){if(Oe.button===0)return O&&Oe.stopPropagation(),T=!0,C=Oe.clientX,U=Oe.clientY,Zn.addEventListener("mousemove",re,!1),Zn.addEventListener("mouseup",de,!1),n({event:Oe})}}var fe,_d,Od,wd,xd,Ed,Sd,jd,Pd,kd,Td,Ad,Md,yr=function(){function e(r){var a=this,o=r.onDragStart,u=o===void 0?xo:o,f=r.onDragging,d=f===void 0?xo:f,m=r.onDragEnd,O=m===void 0?xo:m,S=r.eventType,T=S===void 0?"":S,C=r.eventCenter,U=C===void 0?null:C,W=r.step,ne=W===void 0?1:W,re=r.isStopPropagation,de=re===void 0||re,Oe=r.model,Ce=Oe===void 0?null:Oe,Ee=r.data,Ge=Ee===void 0?null:Ee;(function(Ae,Pe){if(!(Ae instanceof Pe))throw new TypeError("Cannot call a class as a function")})(this,e),Ut(this,"onDragStart",void 0),Ut(this,"onDragging",void 0),Ut(this,"onDragEnd",void 0),Ut(this,"step",void 0),Ut(this,"isStopPropagation",void 0),Ut(this,"isDragging",!1),Ut(this,"isStartDragging",!1),Ut(this,"startX",0),Ut(this,"startY",0),Ut(this,"sumDeltaX",0),Ut(this,"sumDeltaY",0),Ut(this,"eventType",void 0),Ut(this,"eventCenter",void 0),Ut(this,"model",void 0),Ut(this,"data",void 0),Ut(this,"startTime",void 0),Ut(this,"handleMouseDown",function(Ae){var Pe,Qe;if(Ae.button===0){a.isStopPropagation&&Ae.stopPropagation(),a.isStartDragging=!0,a.startX=Ae.clientX,a.startY=Ae.clientY,Zn.addEventListener("mousemove",a.handleMouseMove,!1),Zn.addEventListener("mouseup",a.handleMouseUp,!1);var yt=(Pe=a.model)===null||Pe===void 0?void 0:Pe.getData();(Qe=a.eventCenter)===null||Qe===void 0||Qe.emit(tt["".concat(a.eventType,"_MOUSEDOWN")],{e:Ae,data:a.data||yt}),a.startTime=new Date().getTime()}}),Ut(this,"handleMouseMove",function(Ae){if(a.isStopPropagation&&Ae.stopPropagation(),a.isStartDragging&&(a.sumDeltaX+=Ae.clientX-a.startX,a.sumDeltaY+=Ae.clientY-a.startY,a.startX=Ae.clientX,a.startY=Ae.clientY,a.step<=1||Math.abs(a.sumDeltaX)>a.step||Math.abs(a.sumDeltaY)>a.step)){var Pe,Qe=a.sumDeltaX%a.step,yt=a.sumDeltaY%a.step,Et=a.sumDeltaX-Qe,mt=a.sumDeltaY-yt;a.sumDeltaX=Qe,a.sumDeltaY=yt;var jt,Ft=(Pe=a.model)===null||Pe===void 0?void 0:Pe.getData();a.isDragging||((jt=a.eventCenter)===null||jt===void 0||jt.emit(tt["".concat(a.eventType,"_DRAGSTART")],{e:Ae,data:a.data||Ft}),a.onDragStart({event:Ae})),a.isDragging=!0,Promise.resolve().then(function(){var Wt,Pn;a.onDragging({deltaX:Et,deltaY:mt,event:Ae}),(Wt=a.eventCenter)===null||Wt===void 0||Wt.emit(tt["".concat(a.eventType,"_MOUSEMOVE")],{e:Ae,data:a.data||Ft}),(Pn=a.eventCenter)===null||Pn===void 0||Pn.emit(tt["".concat(a.eventType,"_DRAG")],{e:Ae,data:a.data||Ft})})}}),Ut(this,"handleMouseUp",function(Ae){a.isStartDragging=!1,a.isStopPropagation&&Ae.stopPropagation(),Promise.resolve().then(function(){var Pe,Qe,yt;Zn.removeEventListener("mousemove",a.handleMouseMove,!1),Zn.removeEventListener("mouseup",a.handleMouseUp,!1);var Et=(Pe=a.model)===null||Pe===void 0?void 0:Pe.getData();(Qe=a.eventCenter)===null||Qe===void 0||Qe.emit(tt["".concat(a.eventType,"_MOUSEUP")],{e:Ae,data:a.data||Et}),a.isDragging&&(a.isDragging=!1,a.onDragEnd({event:Ae}),(yt=a.eventCenter)===null||yt===void 0||yt.emit(tt["".concat(a.eventType,"_DROP")],{e:Ae,data:a.data||Et}))})}),Ut(this,"cancelDrag",function(){Zn.removeEventListener("mousemove",a.handleMouseMove,!1),Zn.removeEventListener("mouseup",a.handleMouseUp,!1),a.onDragEnd({event:null}),a.isDragging=!1}),this.onDragStart=u,this.onDragging=d,this.onDragEnd=O,this.step=ne,this.isStopPropagation=de,this.eventType=T,this.eventCenter=U,this.model=Ce,this.data=Ge}var t,n;return t=e,(n=[{key:"setStep",value:function(r){this.step=r}}])&&am(t.prototype,n),e}(),Dd={node:!1,edge:!1},sm={node:!0,edge:!0};function Nd(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?Nd(Object(n),!0).forEach(function(r){Jn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function di(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||Cd(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 Eo(e){return function(t){if(Array.isArray(t))return Ns(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Cd(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 Cd(e,t){if(e){if(typeof e=="string")return Ns(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)?Ns(e,t):void 0}}function Ns(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 Pa(e){return Pa=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},Pa(e)}function Cn(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 Jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ve(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,f){return f(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 Rd,Id=200,Ld=(fe=function(){function e(r){(function(U,W){if(!(U instanceof W))throw new TypeError("Cannot call a class as a function")})(this,e),Jn(this,"rootEl",void 0),Cn(this,"width",_d,this),Cn(this,"height",Od,this),Jn(this,"theme",void 0),Jn(this,"eventCenter",void 0),Jn(this,"modelMap",new Map),Jn(this,"topElement",void 0),Jn(this,"animation",void 0),Jn(this,"idGenerator",void 0),Jn(this,"edgeGenerator",void 0),Jn(this,"nodeMoveRules",[]),Cn(this,"edgeType",wd,this),Cn(this,"nodes",xd,this),Cn(this,"edges",Ed,this),Cn(this,"overlapMode",Sd,this),Cn(this,"background",jd,this),Cn(this,"transformModel",Pd,this),Cn(this,"editConfigModel",kd,this),Cn(this,"gridSize",Td,this),Cn(this,"partial",Ad,this),Cn(this,"fakerNode",Md,this);var a,o,u,f=r.container,d=r.background,m=d===void 0?{}:d,O=r.grid,S=r.idGenerator,T=r.edgeGenerator,C=r.animation;this.background=m,Pa(O)==="object"&&(this.gridSize=O.size),this.rootEl=f,this.editConfigModel=new Vf(r),this.eventCenter=new jb,this.transformModel=new Yv(this.eventCenter),this.theme=yp(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=(a=C)&&typeof a!="boolean"?hp(Dt(Dd),a):Dt(a===!0?sm:Dd),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=S,this.edgeGenerator=(o=this,typeof(u=T)!="function"?function(U,W,ne){return Object.assign({type:o.edgeType},ne)}:function(U,W,ne){var re=u(U,W,ne);return re?typeof re=="string"?Object.assign({},ne,{type:re}):Object.assign({type:re},ne):{type:o.edgeType}}),this.width=r.width||this.rootEl.getBoundingClientRect().width,this.height=r.height||this.rootEl.getBoundingClientRect().height,this.flowId=Rr()}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(Eo(this.nodes),Eo(this.edges)).reduce(function(r,a){return r[a.id]=a,r},{})}},{key:"sortElements",get:function(){var r=[];this.nodes.forEach(function(m){return r.push(m)}),this.edges.forEach(function(m){return r.push(m)}),r=r.sort(function(m,O){return m.zIndex-O.zIndex});for(var a=[],o=[-200,-200],u=[this.width+Id,this.height+Id],f=0;f<r.length;f++){var d=r[f];d.visible&&(!this.partial||d.isSelected||this.isElementInArea(d,o,u,!1,!1))&&a.push(d)}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:"selectNodes",get:function(){var r=[];return this.nodes.forEach(function(a){a.isSelected&&r.push(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],f=arguments.length>4&&arguments[4]!==void 0&&arguments[4],d=[],m=[];this.nodes.forEach(function(T){return m.push(T)}),this.edges.forEach(function(T){return m.push(T)});for(var O=0;O<m.length;O++){var S=m[O];f&&!S.visible||!this.isElementInArea(S,r,a,o,u)||d.push(S)}return d}},{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(),f={x:a-u.left,y:o-u.top},d=di(this.transformModel.HtmlPointToCanvasPoint([f.x,f.y]),2);return{domOverlayPosition:f,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],f=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(r.BaseType===Xt.NODE){for(var d=En(r=r),m=d.minX,O=d.minY,S=d.maxX,T=d.maxY,C=[{x:m,y:O},{x:S,y:O},{x:S,y:T},{x:m,y:T}],U=f,W=0;W<C.length;W++){var ne=C[W],re=ne.x,de=ne.y,Oe=this.transformModel.CanvasPointToHtmlPoint([re,de]),Ce=di(Oe,2);if(re=Ce[0],de=Ce[1],fs([re,de],a,o)!==f){U=!f;break}}return U}if(r.BaseType===Xt.EDGE){var Ee=r=r,Ge=Ee.startPoint,Ae=Ee.endPoint,Pe=this.transformModel.CanvasPointToHtmlPoint([Ge.x,Ge.y]),Qe=this.transformModel.CanvasPointToHtmlPoint([Ae.x,Ae.y]),yt=fs(Pe,a,o),Et=fs(Qe,a,o);return u?yt&&Et:yt||Et}return!1}},{key:"graphDataToModel",value:function(r){var a=this;if(this.width&&this.height||this.resize(),!r)return this.nodes=[],void(this.edges=[]);r.nodes?this.nodes=pa(r.nodes,function(o){var u=a.getModel(o.type);if(!u)throw new Error("找不到".concat(o.type,"对应的节点。"));var f=o.x,d=o.y;return f&&d&&(o.x=Cr(f,a.gridSize),o.y=Cr(d,a.gridSize),Pa(o.text)==="object"&&(o.text.x-=gp(f,a.gridSize),o.text.y-=gp(d,a.gridSize))),new u(o,a)}):this.nodes=[],r.edges?this.edges=pa(r.edges,function(o){var u=a.getModel(o.type);if(!u)throw new Error("找不到".concat(o.type,"对应的边。"));return new u(o,a)}):this.edges=[]}},{key:"modelToGraphData",value:function(){var r=[];this.edges.forEach(function(o){var u=o.getData();u&&!o.virtual&&r.push(u)});var a=[];return this.nodes.forEach(function(o){var u=o.getData();u&&!o.virtual&&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 f=!1,d=[],m=0;m<this.edges.length;m++){var O=this.edges[m];if(O.isDragging){f=!0;break}d.push(O.getHistoryData())}return!f&&{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],f=this.edges[o].sourceNodeId===r,d=this.edges[o].targetNodeId===r;(f||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===Xt.NODE&&o.nodes.push(u.getData()),u.BaseType===Xt.EDGE){var f=u.getData(),d=a.get(f.sourceNodeId)&&a.get(f.targetNodeId);(r||d)&&o.edges.push(f)}}),o}},{key:"updateAttributes",value:function(r,a){this.getElement(r).updateAttributes(a)}},{key:"changeNodeId",value:function(r,a){return a||(a=Rr()),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,this.nodesMap[a]=this.nodesMap[r],a):""}},{key:"changeEdgeId",value:function(r,a){return a||(a=Rr()),this.edgesMap[a]?"":this.edgesMap[r]?(this.edges.forEach(function(o){o.id===r&&o.changeEdgeId(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,f=((a=this.nodesMap[r])===null||a===void 0?void 0:a.model)||((o=this.edgesMap[r])===null||o===void 0?void 0:o.model);f&&(this.overlapMode===xn.DEFAULT&&((u=this.topElement)===null||u===void 0||u.setZIndex(),f.setZIndex(9999),this.topElement=f),this.overlapMode===xn.INCREASE&&this.setElementZIndex(r,"top"))}},{key:"setElementZIndex",value:function(r,a){var o,u,f,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"&&(f=a),a==="top"&&(f=bs()),a==="bottom"&&(f=--Lb),d.setZIndex(f))}},{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(tt.NODE_DELETE,{data:a})}},{key:"addNode",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt.NODE_ADD,o=en(r);o.id&&this.nodesMap[r.id]&&delete o.id;var u=this.getModel(o.type);if(!u)throw new Error("找不到".concat(o.type,"对应的节点,请确认是否已注册此类型节点。"));o.x=Cr(o.x,this.gridSize),o.y=Cr(o.y,this.gridSize);var f=new u(o,this);this.nodes.push(f);var d=f.getData();return this.eventCenter.emit(a,{data:d}),f}},{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],f=this.nodesMap[r];if(f){var d=f.model,m=d.getMoveDistance(a,o,u),O=di(m,2);a=O[0],o=O[1],this.moveEdge(r,a,o)}}},{key:"moveNode2Coordinate",value:function(r,a,o){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],f=this.nodesMap[r];if(f){var d=f.model,m=d.x,O=d.y,S=a-m,T=o-O;this.moveNode(r,S,T,u)}}},{key:"editText",value:function(r){this.setElementStateById(r,Ot.TEXT_EDIT)}},{key:"addEdge",value:function(r){var a=en(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("找不到".concat(o,"对应的边,请确认是否已注册此类型边。"));var f=new u(ja(ja({},a),{},{type:o}),this),d=f.getData();return this.edges.push(f),this.eventCenter.emit(tt.EDGE_ADD,{data:d}),f}},{key:"moveEdge",value:function(r,a,o){for(var u=0;u<this.edges.length;u++){var f,d=this.edges[u],m=d.textPosition,O=m.x,S=m.y,T=this.edges[u].sourceNodeId===r,C=this.edges[u].targetNodeId===r;if(T&&d.moveStartPoint(a,o),C&&d.moveEndPoint(a,o),T||C)if(d.customTextPosition===!0)d.resetTextPosition();else if(d.modelType===dt.POLYLINE_EDGE&&(f=d.text)!==null&&f!==void 0&&f.value){var U=d.text,W=bd(U,d.points);d.moveText(W.x-U.x,W.y-U.y)}else{var ne=d.textPosition,re=ne.x,de=ne.y;d.moveText(re-O,de-S)}}}},{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(tt.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(tt.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(tt.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(tt.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===xn.DEFAULT&&((r=this.topElement)===null||r===void 0||r.setZIndex())}},{key:"moveNodes",value:function(r,a,o){for(var u=this,f=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=r.reduce(function(re,de){var Oe=u.nodesMap[de].model.getMoveDistance(a,o,f);return re[de]=Oe,re},{}),m=0;m<this.edges.length;m++){var O=this.edges[m],S=d[O.sourceNodeId],T=void 0,C=void 0;if(S){var U=di(S,2);T=U[0],C=U[1],O.moveStartPoint(T,C)}var W=d[O.targetNodeId];if(W){var ne=di(W,2);T=ne[0],C=ne[1],O.moveEndPoint(T,C)}(S||W)&&O.moveText(T,C)}}},{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 f=this.getModel(a);if(!f)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));var d=new f(u,this);this.nodes.splice(this.nodesMap[r].index,1,d),this.getNodeEdges(r).forEach(function(m){if(m.sourceNodeId===r){var O=Yp(d,m.startPoint,d.width,d.height);m.updateStartPoint(O)}if(m.targetNodeId===r){var S=Yp(d,m.endPoint,d.width,d.height);m.updateEndPoint(S)}})}}},{key:"changeEdgeType",value:function(r,a){var o=this.getEdgeModelById(r);if(o&&o.type!==a){var u=o.getData();u.type=a;var f=this.getModel(a);if(!f)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));delete u.pointsList;var d=new f(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=yp(ja(ja({},this.theme),r))}},{key:"resize",value:function(r,a){this.width=r||this.rootEl.getBoundingClientRect().width,this.height=a||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var r=this.nodes,a=[],o=[];r.forEach(function(S){var T=S.x,C=S.y,U=S.width,W=S.height,ne=S.getNodeStyle().strokeWidth,re=ne===void 0?0:ne;a=a.concat([T+U/2+re,T-U/2-re]),o=o.concat([C+W/2+re,C-W/2-re])});var u=Math.min.apply(Math,Eo(a)),f=Math.max.apply(Math,Eo(a)),d=Math.min.apply(Math,Eo(o)),m=f-u||0,O=Math.max.apply(Math,Eo(o))-d||0;return{virtualRectWidth:m,virtualRectHeight:O,virtualRectCenterPositionX:u+m/2,virtualRectCenterPositionY:d+O/2}}},{key:"translateCenter",value:function(){var r=this.nodes,a=this.width,o=this.height,u=this.rootEl,f=this.transformModel;if(r.length){var d=a||u.clientWidth,m=o||u.clientHeight,O=this.getVirtualRectSize(),S=O.virtualRectCenterPositionX,T=O.virtualRectCenterPositionY;f.focusOn(S,T,d,m)}}},{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,f=this.height,d=this.rootEl,m=this.transformModel;if(o.length){var O=u||d.clientWidth,S=f||d.clientHeight,T=this.getVirtualRectSize(),C=T.virtualRectWidth,U=T.virtualRectHeight,W=T.virtualRectCenterPositionX,ne=T.virtualRectCenterPositionY,re=(C+a)/O,de=(U+r)/S,Oe=0;Oe=1/Math.max(re,de);var Ce=[O/2,S/2];m.zoom(Oe,Ce),m.focusOn(W,ne,O,S)}}},{key:"openEdgeAnimation",value:function(r){this.getEdgeModelById(r).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(r){this.getEdgeModelById(r).closeEdgeAnimation()}}],n&&cm(t.prototype,n),e}(),_d=Ve(fe.prototype,"width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Od=Ve(fe.prototype,"height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),wd=Ve(fe.prototype,"edgeType",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xd=Ve(fe.prototype,"nodes",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ed=Ve(fe.prototype,"edges",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Sd=Ve(fe.prototype,"overlapMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return xn.DEFAULT}}),jd=Ve(fe.prototype,"background",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Pd=Ve(fe.prototype,"transformModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kd=Ve(fe.prototype,"editConfigModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Td=Ve(fe.prototype,"gridSize",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ad=Ve(fe.prototype,"partial",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Md=Ve(fe.prototype,"fakerNode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ve(fe.prototype,"nodesMap",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"nodesMap"),fe.prototype),Ve(fe.prototype,"edgesMap",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"edgesMap"),fe.prototype),Ve(fe.prototype,"modelsMap",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"modelsMap"),fe.prototype),Ve(fe.prototype,"sortElements",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"sortElements"),fe.prototype),Ve(fe.prototype,"textEditElement",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"textEditElement"),fe.prototype),Ve(fe.prototype,"selectElements",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"selectElements"),fe.prototype),Ve(fe.prototype,"selectNodes",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"selectNodes"),fe.prototype),Ve(fe.prototype,"setFakerNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setFakerNode"),fe.prototype),Ve(fe.prototype,"removeFakerNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"removeFakerNode"),fe.prototype),Ve(fe.prototype,"setModel",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setModel"),fe.prototype),Ve(fe.prototype,"toFront",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"toFront"),fe.prototype),Ve(fe.prototype,"setElementZIndex",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setElementZIndex"),fe.prototype),Ve(fe.prototype,"deleteNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteNode"),fe.prototype),Ve(fe.prototype,"addNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"addNode"),fe.prototype),Ve(fe.prototype,"cloneNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"cloneNode"),fe.prototype),Ve(fe.prototype,"moveNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveNode"),fe.prototype),Ve(fe.prototype,"moveNode2Coordinate",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveNode2Coordinate"),fe.prototype),Ve(fe.prototype,"editText",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"editText"),fe.prototype),Ve(fe.prototype,"addEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"addEdge"),fe.prototype),Ve(fe.prototype,"moveEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveEdge"),fe.prototype),Ve(fe.prototype,"deleteEdgeBySourceAndTarget",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeBySourceAndTarget"),fe.prototype),Ve(fe.prototype,"deleteEdgeById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeById"),fe.prototype),Ve(fe.prototype,"deleteEdgeBySource",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeBySource"),fe.prototype),Ve(fe.prototype,"deleteEdgeByTarget",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeByTarget"),fe.prototype),Ve(fe.prototype,"setElementStateById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setElementStateById"),fe.prototype),Ve(fe.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"updateText"),fe.prototype),Ve(fe.prototype,"selectNodeById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"selectNodeById"),fe.prototype),Ve(fe.prototype,"selectEdgeById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"selectEdgeById"),fe.prototype),Ve(fe.prototype,"selectElementById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"selectElementById"),fe.prototype),Ve(fe.prototype,"clearSelectElements",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"clearSelectElements"),fe.prototype),Ve(fe.prototype,"moveNodes",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveNodes"),fe.prototype),Ve(fe.prototype,"setDefaultEdgeType",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setDefaultEdgeType"),fe.prototype),Ve(fe.prototype,"changeNodeType",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"changeNodeType"),fe.prototype),Ve(fe.prototype,"changeEdgeType",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"changeEdgeType"),fe.prototype),Ve(fe.prototype,"getNodeIncomingEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeIncomingEdge"),fe.prototype),Ve(fe.prototype,"getNodeOutgoingEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeOutgoingEdge"),fe.prototype),Ve(fe.prototype,"getNodeIncomingNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeIncomingNode"),fe.prototype),Ve(fe.prototype,"getNodeOutgoingNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeOutgoingNode"),fe.prototype),Ve(fe.prototype,"setTheme",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setTheme"),fe.prototype),Ve(fe.prototype,"resize",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"resize"),fe.prototype),Ve(fe.prototype,"clearData",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"clearData"),fe.prototype),Ve(fe.prototype,"translateCenter",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"translateCenter"),fe.prototype),Ve(fe.prototype,"fitView",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"fitView"),fe.prototype),Ve(fe.prototype,"openEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"openEdgeAnimation"),fe.prototype),Ve(fe.prototype,"closeEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"closeEdgeAnimation"),fe.prototype),fe),lm=Ld;function Cs(e){return Cs=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},Cs(e)}function Rs(){return Rs=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},Rs.apply(this,arguments)}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 Is(e,t){return Is=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Is(e,t)}function pm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 dm(this,n)}}function dm(e,t){if(t&&(Cs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qn(e)}function Qn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ka(e)}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zd,hm=Xn(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&&Is(o,u)})(a,e);var t,n,r=pm(a);function a(o){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),gr(Qn(u=r.call(this)),"stepDrag",void 0),gr(Qn(u),"stepScrollX",0),gr(Qn(u),"stepScrollY",0),gr(Qn(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY;u.setState({isDragging:!0});var C=u.props.graphModel,U=C.transformModel;C.editConfigModel.stopMoveGraph||U.translate(S,T)}),gr(Qn(u),"onDragEnd",function(){u.setState({isDragging:!1})}),gr(Qn(u),"zoomHandler",function(O){var S=u.props,T=S.graphModel,C=T.editConfigModel,U=T.transformModel,W=T.gridSize,ne=S.graphModel,re=O.deltaX,de=O.deltaY;if(C.stopScrollGraph||O.ctrlKey===!0){if(!C.stopZoomGraph){O.preventDefault();var Oe=ne.getPointByClient({x:O.clientX,y:O.clientY}).canvasOverlayPosition,Ce=Oe.x,Ee=Oe.y;U.zoom(O.deltaY<0,[Ce,Ee])}}else{if(O.preventDefault(),u.stepScrollX+=re,u.stepScrollY+=de,Math.abs(u.stepScrollX)>=W){var Ge=u.stepScrollX%W,Ae=u.stepScrollX-Ge;U.translate(-Ae*U.SCALE_X,0),u.stepScrollX=Ge}if(Math.abs(u.stepScrollY)>=W){var Pe=u.stepScrollY%W,Qe=u.stepScrollY-Pe;U.translate(0,-Qe*U.SCALE_Y),u.stepScrollY=Pe}}}),gr(Qn(u),"clickHandler",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){var S=u.props.graphModel;S.selectElements.size>0&&S.clearSelectElements(),S.eventCenter.emit(tt.BLANK_CLICK,{e:O})}}),gr(Qn(u),"handleContextMenu",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){O.preventDefault();var S=u.props.graphModel,T=S.getPointByClient({x:O.clientX,y:O.clientY});S.eventCenter.emit(tt.BLANK_CONTEXTMENU,{e:O,position:T})}}),gr(Qn(u),"mouseDownHandler",function(O){var S=u.props.graphModel,T=S.eventCenter,C=S.editConfigModel,U=S.transformModel.SCALE_X,W=S.gridSize,ne=O.target,re=!C.adjustEdge&&!C.adjustNodePosition;(ne.getAttribute("name")==="canvas-overlay"||re)&&(C.stopMoveGraph?T.emit(tt.BLANK_MOUSEDOWN,{e:O}):(u.stepDrag.setStep(W*U),u.stepDrag.handleMouseDown(O)),u.clickHandler(O))});var f=o.graphModel,d=f.gridSize,m=f.eventCenter;return u.stepDrag=new yr({onDragging:u.onDragging,onDragEnd:u.onDragEnd,step:d,eventType:"BLANK",isStopPropagation:!1,eventCenter:m,model:null}),u.state={isDragging:!1},u}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props,f=u.children,d=u.dnd,m=this.state.isDragging;return Object(te.g)("svg",Rs({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:m?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},d.eventMap()),Object(te.g)("g",{transform:o},f))}}])&&fm(t.prototype,n),a}(te.a))||Rd;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 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 zs(e,t){return zs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},zs(e,t)}function vm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ta(e);if(t){var a=Ta(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 function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ta(e){return Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(e)}var mm=Xn(zd=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=vm(a);function a(){return ym(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var o=this.props,u=o.tool,f=o.graphModel,d=u.getTools().map(function(m){return Object(te.g)(m,{graphModel:f,logicFlow:u.instance})});return u.components=d,d}},{key:"triggerToolRender",value:function(){var o=this.props,u=o.tool,f=o.graphModel,d=document.querySelector("#ToolOverlay_".concat(f.flowId)),m=u.getInstance();m.components.forEach(function(O){return O(m,d)}),m.components=[]}},{key:"render",value:function(){var o=this.props.graphModel;return Object(te.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(o.flowId)},this.getTools())}}])&&gm(t.prototype,n),a}(te.a))||zd;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 _m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Om(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 Fs(e,t){return Fs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Fs(e,t)}function wm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Aa(e);if(t){var a=Aa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return xm(this,n)}}function xm(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 function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Aa(e){return Aa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Aa(e)}var Bd,Em=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&&Fs(o,u)})(a,e);var t,n,r=wm(a);function a(){return _m(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.background;return Object(te.g)("div",{className:"lf-background"},Object(te.g)("div",{style:o,className:"lf-background-area"}))}}])&&Om(t.prototype,n),a}(te.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 Sm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 Xs(e,t){return Xs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Xs(e,t)}function Pm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ma(e);if(t){var a=Ma(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return km(this,n)}}function km(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 Fd(e)}function Fd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ma(e)}function Tm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hd=Xn(Bd=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&&Xs(o,u)})(a,e);var t,n,r=Pm(a);function a(){var o;Sm(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Tm(Fd(o=r.call.apply(r,[this].concat(f))),"id",Rr()),o}return t=a,(n=[{key:"renderDot",value:function(){var o=this.props,u=o.config,f=u.color,d=u.thickness,m=d===void 0?2:d,O=o.size,S=o.visible,T=Math.min(Math.max(2,m),O/2),C=1;return S||(C=0),Object(te.g)("rect",{width:T,height:T,rx:T/2,ry:T/2,fill:f,opacity:C})}},{key:"renderMesh",value:function(){var o=this.props,u=o.config,f=u.color,d=u.thickness,m=d===void 0?1:d,O=o.size,S=o.visible,T=Math.min(Math.max(1,m),O/2),C="M ".concat(O," 0 H0 M0 0 V0 ").concat(O),U=1;return S||(U=0),Object(te.g)("path",{d:C,stroke:f,strokeWidth:T,opacity:U})}},{key:"render",value:function(){var o=this.props,u=o.type,f=o.size,d=o.graphModel.transformModel,m=[d.SCALE_X,d.SKEW_Y,d.SKEW_X,d.SCALE_Y,d.TRANSLATE_X,d.TRANSLATE_Y].join(","),O="matrix(".concat(m,")");return Object(te.g)("div",{className:"lf-grid"},Object(te.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(te.g)("defs",null,Object(te.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:O,x:"0",y:"0",width:f,height:f},u==="dot"&&this.renderDot(),u==="mesh"&&this.renderMesh())),Object(te.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&jm(t.prototype,n),a}(te.a))||Bd;Hd.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},i(52);function Gs(e){return Gs=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},Gs(e)}function Am(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Xd(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 Xd(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 Xd(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 Gd,So=function(e){var t={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(n){var r=Am(n,2),a=r[0],o=r[1];(a==="style"||Gs(o)!=="object")&&(t[a]=o)}),Object(te.g)("line",t)};function Us(e){return Us=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},Us(e)}function Ud(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 Da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ud(Object(n),!0).forEach(function(r){Mm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dm(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 Ys(e,t){return Ys=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ys(e,t)}function Cm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 Rm(this,n)}}function Rm(e,t){if(t&&(Us(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 Yd,Im=Xn(Gd=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&&Ys(o,u)})(a,e);var t,n,r=Cm(a);function a(){return Dm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.snaplineModel,u=o.position,f=o.isShowHorizontal,d=o.isShowVertical,m=o.getStyle(),O=u.x,S=O===void 0?0:O,T=u.y,C=T===void 0?0:T,U=Da(Da({x1:-1e5,y1:C,x2:1e5,y2:C},m),{},{stroke:f?m.stroke:"none"}),W=Da(Da({x1:S,y1:-1e5,x2:S,y2:1e5},m),{},{stroke:d?m.stroke:"none"});return Object(te.g)("g",{className:"lf-snapline"},Object(te.g)(So,U),Object(te.g)(So,W))}}])&&Nm(t.prototype,n),a}(te.a))||Gd;function Vs(e){return Vs=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},Vs(e)}function Lm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Vd(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 Vd(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 Vd(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 zr(e){var t=e.x,n=e.y,r=e.width,a=e.height,o=e.className,u=e.radius,f=t-r/2,d=n-a/2,m={};return Object.entries(e).forEach(function(O){var S=Lm(O,2),T=S[0],C=S[1];Vs(C)!=="object"&&(m[T]=C)}),m.className=o?"lf-basic-shape ".concat(o):"lf-basic-shape",u&&(m.rx=u,m.ry=u),m.x=f,m.y=d,Object(te.g)("rect",m)}function Ws(e){return Ws=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},Ws(e)}function jo(){return jo=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},jo.apply(this,arguments)}function Wd(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 $d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(n),!0).forEach(function(r){zm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bm(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 $s(e,t){return $s=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$s(e,t)}function Hm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 Xm(this,n)}}function Xm(e,t){if(t&&(Ws(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)}zr.defaultProps={className:"",radius:""};var Kd,Gm=Xn(Yd=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&&$s(o,u)})(a,e);var t,n,r=Hm(a);function a(){return Bm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getNodesOutline",value:function(){var o=this.props.graphModel,u=o.nodes,f=o.editConfigModel,d=f.hoverOutline,m=f.nodeSelectedOutline,O=[];return u.forEach(function(S){if(S.isHovered||S.isSelected){var T=S.isHovered,C=S.isSelected,U=S.x,W=S.y,ne=S.width,re=S.height;if(m&&C||d&&T){var de=S.getOutlineStyle(),Oe={};if(Object.keys(de).forEach(function(Ee){Ee!=="hover"&&(Oe[Ee]=de[Ee])}),T){var Ce=de.hover;Oe=$d($d({},Oe),Ce)}O.push(Object(te.g)(zr,jo({className:"lf-outline-node",x:U,y:W,width:ne+10,height:re+10},Oe)))}}}),O}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,u=o.edges,f=o.editConfigModel,d=f.edgeSelectedOutline,m=f.hoverOutline,O=[],S=0;S<u.length;S++){var T=u[S];(d&&T.isSelected||m&&T.isHovered)&&(T.modelType===dt.LINE_EDGE?O.push(this.getLineOutline(T)):T.modelType===dt.POLYLINE_EDGE?O.push(this.getPolylineOutline(T)):T.modelType===dt.BEZIER_EDGE&&O.push(this.getBezierOutline(T)))}return O}},{key:"getLineOutline",value:function(o){var u=o.startPoint,f=o.endPoint,d=(u.x+f.x)/2,m=(u.y+f.y)/2,O=Math.abs(u.x-f.x)+10,S=Math.abs(u.y-f.y)+10,T=o.getOutlineStyle();return Object(te.g)(zr,jo({className:"lf-outline-edge",x:d,y:m,width:O,height:S},T))}},{key:"getPolylineOutline",value:function(o){var u=o.points,f=no(u),d=fi(f,8),m=d.x,O=d.y,S=d.width,T=d.height,C=o.getOutlineStyle();return Object(te.g)(zr,jo({className:"lf-outline",x:m,y:O,width:S,height:T},C))}},{key:"getBezierOutline",value:function(o){var u=o.path,f=Ea(u),d=fi(f,8),m=d.x,O=d.y,S=d.width,T=d.height,C=o.getOutlineStyle();return Object(te.g)(zr,jo({className:"lf-outline",x:m,y:O,width:S,height:T},C))}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&Fm(t.prototype,n),a}(te.a))||Yd;function Ks(e){return Ks=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},Ks(e)}function Um(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return qd(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 qd(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 qd(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 hi(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,f=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(m){var O=Um(m,2),S=O[0],T=O[1];Ks(T)!=="object"&&(d[S]=T)}),d.className=f?"lf-basic-shape ".concat(f):"lf-basic-shape",Object(te.g)("circle",d)}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 Ym(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(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 yi(){return yi=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},yi.apply(this,arguments)}function Jd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(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 eh(e,t,n){return t&&Qd(e.prototype,t),n&&Qd(e,n),e}function th(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&&Zs(e,t)}function Zs(e,t){return Zs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zs(e,t)}function nh(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ia(e);if(t){var a=Ia(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Vm(this,n)}}function Vm(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 Ra(e)}function Ra(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ia(e){return Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ia(e)}function Js(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rh,oh=function(e){th(n,e);var t=nh(n);function n(){var r;return Jd(this,n),Js(Ra(r=t.call(this)),"dragHandler",void 0),Js(Ra(r),"onDragging",function(a){var o=a.event,u=r.props,f=u.graphModel,d=u.bezierModel,m=u.type,O=f.getPointByClient({x:o.clientX,y:o.clientY}).canvasOverlayPosition,S=O.x,T=O.y;d.updateAdjustAnchor({x:S,y:T},m)}),Js(Ra(r),"onDragEnd",function(){r.props.bezierModel.isDragging=!1}),r.dragHandler=new yr({onDragging:r.onDragging,onDragEnd:r.onDragEnd}),r}return eh(n,[{key:"render",value:function(){var r=this,a=this.props.position,o=a.x,u=a.y,f=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(te.g)(hi,yi({className:"lf-bezier-adjust-anchor",x:o,y:u},f,{onMouseDown:function(d){r.dragHandler.handleMouseDown(d)}}))}}]),n}(te.a),Wm=Xn(Kd=function(e){th(n,e);var t=nh(n);function n(){return Jd(this,n),t.apply(this,arguments)}return eh(n,[{key:"getBezierAdjust",value:function(r,a){var o=r.path,u=r.id,f=Ym(Ea(o),4),d=f[0],m=f[1],O=f[2],S=f[3],T=r.getEdgeStyle().adjustLine,C=[];return C.push(Object(te.g)(So,yi({x1:d.x,y1:d.y,x2:m.x,y2:m.y},T))),C.push(Object(te.g)(oh,{position:m,bezierModel:r,graphModel:a,key:"".concat(u,"_ePre"),type:"sNext"})),C.push(Object(te.g)(So,yi({x1:S.x,y1:S.y,x2:O.x,y2:O.y},T))),C.push(Object(te.g)(oh,{position:O,bezierModel:r,graphModel:a,key:"".concat(u,"_sNext"),type:"ePre"})),C}},{key:"selectedBezierEdge",value:function(){for(var r=this.props.graphModel,a=r.edges,o=[],u=0;u<a.length;u++){var f=a[u];f.isSelected&&f.modelType===dt.BEZIER_EDGE&&f.draggable&&o.push(this.getBezierAdjust(f,r))}return o}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(te.a))||Kd;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 $m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Km(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 ec(e,t){return ec=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ec(e,t)}function qm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=La(e);if(t){var a=La(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Zm(this,n)}}function Zm(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 function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},La(e)}var ih,Jm=Xn(rh=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&&ec(o,u)})(a,e);var t,n,r=qm(a);function a(){return $m(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(te.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(te.g)("g",{transform:o},u))}}])&&Km(t.prototype,n),a}(te.a))||rh;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 nc(){return nc=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},nc.apply(this,arguments)}function Qm(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 rc(e,t){return rc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},rc(e,t)}function t0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 n0(this,n)}}function n0(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 za(e){return za=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},za(e)}var r0=Xn(ih=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&&rc(o,u)})(a,e);var t,n,r=t0(a);function a(){return Qm(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getComponent",value:function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",d=this.props.getView,m=d(o.type);return Object(te.g)(m,{key:o.id,model:o,graphModel:u,overlay:f})}},{key:"render",value:function(){var o=this,u=this.props,f=u.graphModel,d=u.tool,m=u.options,O=u.dnd,S=u.snaplineModel,T={};m.width&&(T.width="".concat(f.width,"px")),m.height&&(T.height="".concat(f.height,"px"));var C=m.grid,U=f.fakerNode,W=f.editConfigModel.adjustEdge;return Object(te.g)("div",{className:"lf-graph","flow-id":f.flowId,style:T},Object(te.g)(hm,{graphModel:f,dnd:O},Object(te.g)("g",{className:"lf-base"},pa(f.sortElements,function(ne){return o.getComponent(ne,f)})),U?this.getComponent(U,f):""),Object(te.g)(Jm,{graphModel:f},Object(te.g)(Gm,{graphModel:f}),W?Object(te.g)(Wm,{graphModel:f}):"",m.snapline!==!1?Object(te.g)(Im,{snaplineModel:S}):""),Object(te.g)(mm,{graphModel:f,tool:d}),m.background&&Object(te.g)(Em,{background:m.background}),m.grid&&Object(te.g)(Hd,nc({},C,{graphModel:f})))}}],n&&e0(t.prototype,n),a}(te.a))||ih,o0=r0;function ah(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?ah(Object(n),!0).forEach(function(r){vr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ah(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i0(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 vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a0=function(){function e(r){var a=this;(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),vr(this,"nodeConfig",void 0),vr(this,"lf",void 0),vr(this,"fakerNode",void 0),vr(this,"stopDrag",function(){a.nodeConfig=null,window.document.removeEventListener("mouseup",a.stopDrag)}),vr(this,"dragEnter",function(u){a.nodeConfig&&!a.fakerNode&&(a.fakerNode=a.lf.createFakerNode(Ba(Ba({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY}))))}),vr(this,"onDragOver",function(u){if(u.preventDefault(),a.fakerNode){var f=a.clientToLocalPoint({x:u.clientX,y:u.clientY}),d=f.x,m=f.y;a.fakerNode.moveTo(d,m);var O=a.fakerNode.getData();a.lf.setNodeSnapLine(O),a.lf.graphModel.eventCenter.emit(tt.NODE_DND_DRAG,{data:O})}return!1}),vr(this,"onDragLeave",function(){a.fakerNode&&(a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)}),vr(this,"onDrop",function(u){if(a.lf.graphModel&&u&&a.nodeConfig){var f=a.lf.addNode(Ba(Ba({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY})),tt.NODE_DND_ADD);u.preventDefault(),u.stopPropagation(),a.nodeConfig=null,a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null,f.getData()}});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=mf(this.lf.options,["grid","size"]),f=this.lf.graphModel.getPointByClient({x:a,y:o}).canvasOverlayPosition,d=f.x,m=f.y;return{x:Cr(d,u),y:Cr(m,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}}}])&&i0(t.prototype,n),e}();function uh(e){var t=e.container,n=e.grid,r=e.width,a=e.height;if(!t)throw new Error("请检查 container 参数是否有效");if(typeof r=="string"||typeof a=="string")throw new Error("width或height不支持传入字符串请传数字");return n&&(e.grid=un({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),un({},ch,e)}var bt,sh,ch={background:!1,grid:!1,textEdit:!0,disabledTools:[]};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 ic(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return lh(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 lh(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 lh(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 fh(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 Fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(n),!0).forEach(function(r){ph(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u0(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 s0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c0(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 gi(){return gi=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=l0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},gi.apply(this,arguments)}function l0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Br(e))!==null;);return e}function ac(e,t){return ac=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ac(e,t)}function f0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Br(e);if(t){var a=Br(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return p0(this,n)}}function p0(e,t){if(t&&(oc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ha(e)}function Ha(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Br(e){return Br=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Br(e)}function ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bn(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,f){return f(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 uc=(bt=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&&ac(o,u)})(a,e);var t,n,r=f0(a);function a(){var o;s0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return ph(Ha(o=r.call.apply(r,[this].concat(f))),"modelType",dt.BEZIER_EDGE),u0(Ha(o),"path",sh,Ha(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=100,gi(Br(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.bezier;return Fa(Fa({},gi(Br(a.prototype),"getEdgeStyle",this).call(this)),Dt(o))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var o=0,u=0;return this.pointsList.forEach(function(f){var d=f.x,m=f.y;o+=d,u+=m}),{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=gi(Br(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(f){return{x:f.x,y:f.y}});return Fa(Fa({},o),{},{pointsList:u})}},{key:"getControls",value:function(){var o=this.startPoint,u=this.endPoint;return gd({start:o,end:u,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(o){var u=ic(o,4),f=u[0],d=u[1],m=u[2],O=u[3];return"M ".concat(f.x," ").concat(f.y,`
C `).concat(d.x," ").concat(d.y,`,
`).concat(m.x," ").concat(m.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,f=o.ePre;this.updatePath(u,f)}},{key:"updatePath",value:function(o,u){o=Dt(o),u=Dt(u);var f={x:this.startPoint.x,y:this.startPoint.y},d={x:this.endPoint.x,y:this.endPoint.y};if(!o||!u){var m=this.getControls();o=m.sNext,u=m.ePre}this.pointsList=[f,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 f=ic(this.pointsList,3),d=f[1],m=f[2];d.x+=o,d.y+=u,this.updatePath(d,m)}},{key:"moveEndPoint",value:function(o,u){this.endPoint.x+=o,this.endPoint.y+=u;var f=ic(this.pointsList,3),d=f[1],m=f[2];m.x+=o,m.y+=u,this.updatePath(d,m)}},{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,f=o.endPoint,d=o.sourceNode,m=o.targetNode,O=gd({start:u,end:f,sourceNode:d,targetNode:m,offset:this.offset}),S=O.sNext,T=O.ePre;this.pointsList=[u,S,T,f],this.initPoints()}}])&&c0(t.prototype,n),a}(_s),sh=Bn(bt.prototype,"path",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Bn(bt.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"initPoints"),bt.prototype),Bn(bt.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updatePoints"),bt.prototype),Bn(bt.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateStartPoint"),bt.prototype),Bn(bt.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateEndPoint"),bt.prototype),Bn(bt.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveStartPoint"),bt.prototype),Bn(bt.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveEndPoint"),bt.prototype),Bn(bt.prototype,"updateAdjustAnchor",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAdjustAnchor"),bt.prototype),Bn(bt.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustStart"),bt.prototype),Bn(bt.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustEnd"),bt.prototype),Bn(bt.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAfterAdjustStartAndEnd"),bt.prototype),bt),Ne,dh,hh,yh,gh,vh,bh,mh,_h,Oh,wh,xh,Eh,Sh,jh,Ph,kh,Th,Ah,Mh,d0=function(e){return e==null};function sc(e){return sc=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},sc(e)}function h0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(d,m){if(d){if(typeof d=="string")return Dh(d,m);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 Dh(d,m)}}(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,f=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return u=d.done,d},e:function(d){f=!0,o=d},f:function(){try{u||n.return==null||n.return()}finally{if(f)throw o}}}}function Dh(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 cn(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){gn(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 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 y0(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 gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(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,f){return f(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 br,Ch,mr=(Ne=function(){function e(r,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),gn(this,"id",""),Vt(this,"type",dh,this),Vt(this,"x",hh,this),Vt(this,"y",yh,this),Vt(this,"text",gh,this),Vt(this,"properties",vh,this),Vt(this,"_width",bh,this),Vt(this,"_height",mh,this),Vt(this,"anchorsOffset",_h,this),Vt(this,"isSelected",Oh,this),Vt(this,"isHovered",wh,this),Vt(this,"isShowAnchor",xh,this),Vt(this,"isDragging",Eh,this),Vt(this,"isHitable",Sh,this),Vt(this,"draggable",jh,this),Vt(this,"visible",Ph,this),gn(this,"virtual",!1),gn(this,"graphModel",void 0),Vt(this,"zIndex",kh,this),Vt(this,"state",Th,this),Vt(this,"autoToFront",Ah,this),Vt(this,"style",Mh,this),gn(this,"BaseType",Xt.NODE),gn(this,"modelType",dt.NODE),gn(this,"additionStateData",void 0),gn(this,"targetRules",[]),gn(this,"sourceRules",[]),gn(this,"moveRules",[]),gn(this,"hasSetTargetRules",!1),gn(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),u=this.createId();r.id=u||o||Rr()}this.formatText(r),un(this,function(f){return oi(f,["id","type","x","y","text","properties","virtual"])}(r)),this.graphModel.overlapMode===xn.INCREASE&&(this.zIndex=r.zIndex||bs())}},{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,f=this.properties;Object(c.x)(f)&&(f=Object(c.I)(f));var d={id:this.id,type:this.type,x:this.x,y:this.y,properties:f};return this.graphModel.overlapMode===xn.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(c.I)(this.properties)}},{key:"getNodeStyle",value:function(){return cn(cn({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.nodeText;return Dt(r)}},{key:"getAnchorStyle",value:function(r){var a=this.graphModel.theme.anchor;return Dt(a)}},{key:"getAnchorLineStyle",value:function(r){var a=this.graphModel.theme.anchorLine;return Dt(a)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Dt(r)}},{key:"isAllowConnectedAsSource",value:function(r,a,o,u){var f=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var d,m=!0,O=0;O<f.length;O++){var S=f[O];if(!S.validate.call(this,this,r,a,o,u)){m=!1,d=S.message;break}}return{isAllPass:m,msg:d}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(r,a,o,u){var f=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var d,m=!0,O=0;O<f.length;O++){var S=f[O];if(!S.validate.call(this,r,this,a,o,u)){m=!1,d=S.message;break}}return{isAllPass:m,msg:d}}},{key:"isAllowMoveNode",value:function(r,a){var o,u=!0,f=!0,d=h0(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(d.s();!(o=d.n()).done;){var m=(0,o.value)(this,r,a);if(!m)return!1;if(sc(m)==="object"){var O=m;if(O.x===!1&&O.y===!1)return!1;u=u&&O.x,f=f&&O.y}}}catch(S){d.e(S)}finally{d.f()}return{x:u,y:f}}},{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(f,d){return f.length?(f=f,{id:"".concat(a,"_").concat(d),x:o+f[0],y:u+f[1]}):cn(cn({},f=f),{},{x:o+f.x,y:u+f.y,id:f.id||"".concat(a,"_").concat(d)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(r){return function(a,o){for(var u,f=ys(o),d=Number.MAX_SAFE_INTEGER,m=0;m<f.length;m++){var O=qn(a.x,a.y,f[m].x,f[m].y);O<d&&(d=O,u={index:m,anchor:_p(_p({},f[m]),{},{x:f[m].x,y:f[m].y,id:f[m].id})})}return u}(r,this)}},{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(!d0(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,f=!1;if(o)u=!0,f=!0;else{var d=this.isAllowMoveNode(r,a);typeof d=="boolean"?(u=d,f=d):(u=d.x,f=d.y)}if(u){var m=this.x+r;this.x=m,this.text&&this.moveText(r,0)}if(f){var O=this.y+a;this.y=O,this.text&&this.moveText(0,a)}return u||f}},{key:"getMoveDistance",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,f=!1,d=0,m=0;if(o)u=!0,f=!0;else{var O=this.isAllowMoveNode(r,a);typeof O=="boolean"?(u=O,f=O):(u=O.x,f=O.y)}if(u&&r){var S=this.x+r;this.x=S,this.text&&this.moveText(r,0),d=r}if(f&&a){var T=this.y+a;this.y=T,this.text&&this.moveText(0,a),m=a}return[d,m]}},{key:"moveTo",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=r-this.x,f=a-this.y;return!(!o&&!this.isAllowMoveNode(u,f)||(this.text&&this.text&&this.moveText(u,f),this.x=r,this.y=a,0))}},{key:"moveText",value:function(r,a){var o=this.text,u=o.x,f=o.y,d=o.value,m=o.draggable,O=o.editable;this.text={value:d,editable:O,draggable:m,x:u+r,y:f+a}}},{key:"updateText",value:function(r){this.text=cn(cn({},Object(c.I)(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,this.setIsShowAnchor(r)}},{key:"setIsShowAnchor",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=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=cn(cn({},Object(c.I)(this.properties)),{},gn({},r,en(a))),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=cn(cn({},Object(c.I)(this.properties)),en(r)),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setStyle",value:function(r,a){this.style=cn(cn({},this.style),{},gn({},r,en(a)))}},{key:"setStyles",value:function(r){this.style=cn(cn({},this.style),en(r))}},{key:"updateStyles",value:function(r){this.style=cn({},en(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&&y0(t.prototype,n),e}(),dh=ft(Ne.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),hh=ft(Ne.prototype,"x",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),yh=ft(Ne.prototype,"y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),gh=ft(Ne.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),vh=ft(Ne.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),bh=ft(Ne.prototype,"_width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),mh=ft(Ne.prototype,"_height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),_h=ft(Ne.prototype,"anchorsOffset",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Oh=ft(Ne.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),wh=ft(Ne.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xh=ft(Ne.prototype,"isShowAnchor",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Eh=ft(Ne.prototype,"isDragging",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Sh=ft(Ne.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),jh=ft(Ne.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ph=ft(Ne.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),kh=ft(Ne.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Th=ft(Ne.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ah=ft(Ne.prototype,"autoToFront",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Mh=ft(Ne.prototype,"style",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ft(Ne.prototype,"incoming",[c.m],Object.getOwnPropertyDescriptor(Ne.prototype,"incoming"),Ne.prototype),ft(Ne.prototype,"outgoing",[c.m],Object.getOwnPropertyDescriptor(Ne.prototype,"outgoing"),Ne.prototype),ft(Ne.prototype,"addNodeMoveRules",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"addNodeMoveRules"),Ne.prototype),ft(Ne.prototype,"move",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"move"),Ne.prototype),ft(Ne.prototype,"getMoveDistance",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"getMoveDistance"),Ne.prototype),ft(Ne.prototype,"moveTo",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"moveTo"),Ne.prototype),ft(Ne.prototype,"moveText",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"moveText"),Ne.prototype),ft(Ne.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateText"),Ne.prototype),ft(Ne.prototype,"setSelected",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setSelected"),Ne.prototype),ft(Ne.prototype,"setHovered",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setHovered"),Ne.prototype),ft(Ne.prototype,"setIsShowAnchor",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setIsShowAnchor"),Ne.prototype),ft(Ne.prototype,"setHitable",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setHitable"),Ne.prototype),ft(Ne.prototype,"setElementState",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setElementState"),Ne.prototype),ft(Ne.prototype,"setProperty",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setProperty"),Ne.prototype),ft(Ne.prototype,"setProperties",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setProperties"),Ne.prototype),ft(Ne.prototype,"deleteProperty",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"deleteProperty"),Ne.prototype),ft(Ne.prototype,"setStyle",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setStyle"),Ne.prototype),ft(Ne.prototype,"setStyles",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setStyles"),Ne.prototype),ft(Ne.prototype,"updateStyles",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateStyles"),Ne.prototype),ft(Ne.prototype,"setZIndex",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setZIndex"),Ne.prototype),ft(Ne.prototype,"updateAttributes",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateAttributes"),Ne.prototype),Ne);function cc(e){return cc=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},cc(e)}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 Ih(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){Lh(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 g0(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 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 lc(){return lc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=m0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},lc.apply(this,arguments)}function m0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Po(e))!==null;);return e}function fc(e,t){return fc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},fc(e,t)}function _0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 O0(this,n)}}function O0(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xa(e)}function Xa(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 Lh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pc(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,f){return f(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 tn,zh,Bh,dc=(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&&fc(o,u)})(a,e);var t,n,r=_0(a);function a(){var o;v0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Lh(Xa(o=r.call.apply(r,[this].concat(f))),"modelType",dt.CIRCLE_NODE),g0(Xa(o),"r",Ch,Xa(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=lc(Po(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.circle;return Ih(Ih({},o),Dt(u))}},{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,f=this.r;return[{x:o,y:u-f,id:"".concat(this.id,"_0")},{x:o+f,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+f,id:"".concat(this.id,"_2")},{x:o-f,y:u,id:"".concat(this.id,"_3")}]}}])&&b0(t.prototype,n),a}(mr),Ch=pc(br.prototype,"r",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),pc(br.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(br.prototype,"width"),br.prototype),pc(br.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(br.prototype,"height"),br.prototype),br);i(127);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 yc(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Fh(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 Fh(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 Fh(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 Hh(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 Xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hh(Object(n),!0).forEach(function(r){Uh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gh(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 w0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x0(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 gc(){return gc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=E0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},gc.apply(this,arguments)}function E0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=To(e))!==null;);return e}function vc(e,t){return vc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},vc(e,t)}function S0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=To(e);if(t){var a=To(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return j0(this,n)}}function j0(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 ko(e)}function ko(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function To(e){return To=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},To(e)}function Uh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ao(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,f){return f(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 er,Yh,Vh,bc=(tn=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&&vc(o,u)})(a,e);var t,n,r=S0(a);function a(){var o;w0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Uh(ko(o=r.call.apply(r,[this].concat(f))),"modelType",dt.DIAMOND_NODE),Gh(ko(o),"rx",zh,ko(o)),Gh(ko(o),"ry",Bh,ko(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=gc(To(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.diamond;return Xh(Xh({},o),Dt(u))}},{key:"points",get:function(){var o=this.x,u=this.y,f=this.rx,d=this.ry;return[[o,u-d],[o+f,u],[o,u+d],[o-f,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(f){var d=yc(f,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(f){var d=yc(f,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,f){var d=yc(u,2);return{x:d[0],y:d[1],id:"".concat(o.id,"_").concat(f)}})}}])&&x0(t.prototype,n),a}(mr),zh=Ao(tn.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Bh=Ao(tn.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Ao(tn.prototype,"points",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"points"),tn.prototype),Ao(tn.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"pointsPosition"),tn.prototype),Ao(tn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"width"),tn.prototype),Ao(tn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"height"),tn.prototype),tn);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 Wh(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 $h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wh(Object(n),!0).forEach(function(r){qh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kh(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 P0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k0(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(){return _c=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=T0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},_c.apply(this,arguments)}function T0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Do(e))!==null;);return e}function Oc(e,t){return Oc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Oc(e,t)}function A0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 M0(this,n)}}function M0(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 Mo(e)}function Mo(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 qh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ga(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,f){return f(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 Rn,Zh,wc=(er=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&&Oc(o,u)})(a,e);var t,n,r=A0(a);function a(){var o;P0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return qh(Mo(o=r.call.apply(r,[this].concat(f))),"modelType",dt.ELLIPSE_NODE),Kh(Mo(o),"rx",Yh,Mo(o)),Kh(Mo(o),"ry",Vh,Mo(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=_c(Do(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.ellipse;return $h($h({},o),Dt(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,f=this.rx,d=this.ry;return[{x:o,y:u-d,id:"".concat(this.id,"_0")},{x:o+f,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d,id:"".concat(this.id,"_2")},{x:o-f,y:u,id:"".concat(this.id,"_3")}]}}])&&k0(t.prototype,n),a}(mr),Yh=Ga(er.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Vh=Ga(er.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Ga(er.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(er.prototype,"width"),er.prototype),Ga(er.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(er.prototype,"height"),er.prototype),er);function xc(e){return xc=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},xc(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<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Jh(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 Jh(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 Jh(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 Qh(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 ey(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qh(Object(n),!0).forEach(function(r){ty(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D0(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 N0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C0(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 Sc(){return Sc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=R0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Sc.apply(this,arguments)}function R0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=No(e))!==null;);return e}function jc(e,t){return jc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},jc(e,t)}function I0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=No(e);if(t){var a=No(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return L0(this,n)}}function L0(e,t){if(t&&(xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ua(e)}function Ua(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function No(e){return No=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},No(e)}function ty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(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,f){return f(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,ny,kc=(Rn=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&&jc(o,u)})(a,e);var t,n,r=I0(a);function a(){var o;N0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return ty(Ua(o=r.call.apply(r,[this].concat(f))),"modelType",dt.POLYGON_NODE),D0(Ua(o),"points",Zh,Ua(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=Sc(No(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.polygon;return ey(ey({},o),Dt(u))}},{key:"pointsPosition",get:function(){var o=this.x,u=this.y,f=this.width,d=this.height;return this.points.map(function(m){return{x:m[0]+o-f/2,y:m[1]+u-d/2}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=Ec(f,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(f){var d=Ec(f,2)[1];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"getDefaultAnchor",value:function(){var o=this,u=this.x,f=this.y,d=this.width,m=this.height;return this.points.map(function(O,S){var T=Ec(O,2),C=T[0],U=T[1];return{x:u+C-d/2,y:f+U-m/2,id:"".concat(o.id,"_").concat(S)}})}}])&&C0(t.prototype,n),a}(mr),Zh=Ya(Rn.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Ya(Rn.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(Rn.prototype,"pointsPosition"),Rn.prototype),Ya(Rn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(Rn.prototype,"width"),Rn.prototype),Ya(Rn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(Rn.prototype,"height"),Rn.prototype),Rn);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 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 oy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(n),!0).forEach(function(r){iy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ry(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z0(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 B0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 Ac(){return Ac=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=H0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Ac.apply(this,arguments)}function H0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Co(e))!==null;);return e}function Mc(e,t){return Mc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Mc(e,t)}function X0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 G0(this,n)}}function G0(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 Va(e)}function Va(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 iy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fr,Dc=(Pc=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&&Mc(o,u)})(a,e);var t,n,r=X0(a);function a(){var o;B0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return iy(Va(o=r.call.apply(r,[this].concat(f))),"modelType",dt.RECT_NODE),z0(Va(o),"radius",ny,Va(o)),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,f=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+f/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-f/2,y:u,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var o=Ac(Co(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.rect;return oy(oy({},o),Dt(u))}}])&&F0(t.prototype,n),a}(mr),ny=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,f){return f(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}(Pc.prototype,"radius",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Pc);function Nc(e){return Nc=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},Nc(e)}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 uy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ay(Object(n),!0).forEach(function(r){cy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ay(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function U0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y0(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 Cc(){return Cc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=V0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Cc.apply(this,arguments)}function V0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ro(e))!==null;);return e}function Rc(e,t){return Rc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Rc(e,t)}function W0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ro(e);if(t){var a=Ro(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $0(this,n)}}function $0(e,t){if(t&&(Nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sy(e)}function sy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(e)}function cy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ly(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,f){return f(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 Ic=(Fr=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&&Rc(o,u)})(a,e);var t,n,r=W0(a);function a(){var o;U0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return cy(sy(o=r.call.apply(r,[this].concat(f))),"modelType",dt.TEXT_NODE),o}return t=a,(n=[{key:"getTextStyle",value:function(){var o=Cc(Ro(a.prototype),"getTextStyle",this).call(this),u=this.graphModel.theme.text;return uy(uy({},o),Dt(u))}},{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return vs({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 vs({rows:o,fontSize:u,rowsLength:o.length}).height}}])&&Y0(t.prototype,n),a}(mr),ly(Fr.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(Fr.prototype,"width"),Fr.prototype),ly(Fr.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(Fr.prototype,"height"),Fr.prototype),Fr);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 K0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q0(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 Z0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 J0(this,n)}}function J0(e,t){if(t&&(Lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fy(e)}function fy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wa(e)}function Q0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fn,py,dy,hy,Bc=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=Z0(a);function a(){var o;K0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Q0(fy(o=r.call.apply(r,[this].concat(f))),"modelType",dt.HTML_NODE),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,f=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+f/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-f/2,y:u,id:"".concat(this.id,"_3")}]}}])&&q0(t.prototype,n),a}(mr);function yy(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 Fc(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 e_(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 gy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vi(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,f){return f(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 vy=(Fn=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),gy(this,"graphModel",void 0),Fc(this,"isShowHorizontal",py,this),Fc(this,"isShowVertical",dy,this),Fc(this,"position",hy,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?yy(Object(o),!0).forEach(function(u){gy(r,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):yy(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,f=!1,d=!1,m=0;m<a.length;m++){var O=a[m];if(O.id!==r.id&&(o===O.x&&(f=!0),u===O.y&&(d=!0),f&&d))break}return{isShowVertical:f,isShowHorizontal:d,position:{x:o,y:u}}}},{key:"getHorizontalSnapline",value:function(r,a){var o,u,f=!1,d=r.id;if(d){var m=this.graphModel.fakerNode;if(m&&m.id===d)u=En(m);else{var O=this.graphModel.getNodeModelById(d);u=En(O)}}for(var S=0;S<a.length;S++){var T=a[S];if(T.id!==r.id){var C=En(T);if(C.minY===u.minY||C.maxY===u.minY){f=!0,o=u.minY;break}if(C.minY===u.maxY||C.maxY===u.maxY){f=!0,o=u.maxY;break}}}return un({isShowHorizontal:f,position:{y:o}})}},{key:"getVerticalSnapline",value:function(r,a){var o,u,f=!1,d=r.id;if(d){var m=this.graphModel.fakerNode;if(m&&m.id===d)u=En(m);else{var O=this.graphModel.getNodeModelById(d);u=En(O)}}for(var S=0;S<a.length;S++){var T=a[S];if(T.id!==r.id){var C=En(T);if(C.minX===u.minX||C.maxX===u.minX){f=!0,o=u.minX;break}if(C.minX===u.maxX||C.maxX===u.maxX){f=!0,o=u.maxX;break}}}return un({isShowVertical:f,position:{x:o}})}},{key:"getSnapLinePosition",value:function(r,a){var o=this.getCenterSnapLine(r,a),u=o.isShowHorizontal,f=o.isShowVertical;if(!u){var d=this.getHorizontalSnapline(r,a);d.isShowHorizontal&&(o.isShowHorizontal=d.isShowHorizontal,o.position.y=d.position.y)}if(!f){var m=this.getVerticalSnapline(r,a);m.isShowVertical&&(o.isShowVertical=m.isShowVertical,o.position.x=m.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&&e_(t.prototype,n),e}(),py=vi(Fn.prototype,"isShowHorizontal",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dy=vi(Fn.prototype,"isShowVertical",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hy=vi(Fn.prototype,"position",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vi(Fn.prototype,"clearSnapline",[c.k],Object.getOwnPropertyDescriptor(Fn.prototype,"clearSnapline"),Fn.prototype),vi(Fn.prototype,"setNodeSnapLine",[c.k],Object.getOwnPropertyDescriptor(Fn.prototype,"setNodeSnapLine"),Fn.prototype),Fn),bi=new Map,by=function(e){var t=Rr(),n=window.requestAnimationFrame(function r(){if(e(),bi.get(t)){var a=window.requestAnimationFrame(r);bi.set(t,a)}});return bi.set(t,n),t},$a=function(e){var t=bi.get(e);t&&(window.cancelAnimationFrame(t),bi.delete(e))};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 mi(){return mi=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},mi.apply(this,arguments)}function my(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 Ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?my(Object(n),!0).forEach(function(r){nr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):my(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return _y(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 _y(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 _y(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 n_(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 Xc(e,t){return Xc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Xc(e,t)}function r_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 o_(this,n)}}function o_(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 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 qa(e){return qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qa(e)}function nr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i_=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&&Xc(o,u)})(a,e);var t,n,r=r_(a);function a(){var o;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),nr(tr(o=r.call(this)),"preTargetNode",void 0),nr(tr(o),"sourceRuleResults",void 0),nr(tr(o),"targetRuleResults",void 0),nr(tr(o),"dragHandler",void 0),nr(tr(o),"t",void 0),nr(tr(o),"onDragStart",function(u){var f=u.event,d=o.props,m=d.anchorData,O=d.nodeModel,S=d.graphModel,T=S.overlapMode;S.selectNodeById(O.id),T!==xn.INCREASE&&O.autoToFront&&S.toFront(O.id),S.eventCenter.emit(tt.ANCHOR_DRAGSTART,{data:m,e:f,nodeModel:O}),o.setState({startX:m.x,startY:m.y,endX:m.x,endY:m.y})}),nr(tr(o),"onDragging",function(u){var f=u.event,d=o.props,m=d.graphModel,O=d.nodeModel,S=d.anchorData,T=m.transformModel,C=m.eventCenter,U=m.width,W=m.height,ne=m.editConfigModel,re=ne.autoExpand,de=ne.stopMoveGraph,Oe=f.clientX,Ce=f.clientY,Ee=m.getPointByClient({x:Oe,y:Ce}),Ge=Ee.domOverlayPosition,Ae=Ge.x,Pe=Ge.y,Qe=Ee.canvasOverlayPosition,yt=Qe.x,Et=Qe.y;o.t&&$a(o.t);var mt=[];Ae<10?mt=[10,0]:Ae+10>U?mt=[-10,0]:Pe<10?mt=[0,10]:Pe+10>W&&(mt=[0,-10]),o.setState({endX:yt,endY:Et,dragging:!0}),o.moveAnchorEnd(yt,Et),mt.length>0&&!de&&re&&(o.t=by(function(){var jt=t_(mt,2),Ft=jt[0],Wt=jt[1];T.translate(Ft,Wt);var Pn=o.state,ir=Pn.endX,In=Pn.endY;o.setState({endX:ir-Ft,endY:In-Wt}),o.moveAnchorEnd(ir-Ft,In-Wt)})),C.emit(tt.ANCHOR_DRAG,{data:S,e:f,nodeModel:O})}),nr(tr(o),"onDragEnd",function(u){var f=u.event;o.t&&$a(o.t),o.checkEnd(f),o.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),o.sourceRuleResults.clear(),o.targetRuleResults.clear();var d=o.props,m=d.graphModel,O=d.nodeModel,S=d.anchorData;m.eventCenter.emit(tt.ANCHOR_DRAGEND,{data:S,e:f,nodeModel:O})}),nr(tr(o),"checkEnd",function(u){var f=o.props,d=f.graphModel,m=f.nodeModel,O=f.anchorData,S=O.x,T=O.y,C=O.id,U=(d.edgeType,o.state),W=U.endX,ne=U.endY,re=U.dragging,de=ga({x:W,y:ne},d);if(o.preTargetNode&&o.preTargetNode.state!==Ot.DEFAULT&&o.preTargetNode.setElementState(Ot.DEFAULT),re&&de&&de.node){var Oe=de.node,Ce=de.anchor.id,Ee="".concat(m.id,"_").concat(Oe.id,"_").concat(Ce,"_").concat(C),Ge=o.sourceRuleResults.get(Ee)||{},Ae=Ge.isAllPass,Pe=Ge.msg,Qe=o.targetRuleResults.get(Ee)||{},yt=Qe.isAllPass,Et=Qe.msg;if(Ae&&yt){Oe.setElementState(Ot.DEFAULT);var mt=d.edgeGenerator(m.getData(),d.getNodeModelById(de.node.id).getData()),jt=d.addEdge(Ka(Ka({},mt),{},{sourceNodeId:m.id,sourceAnchorId:C,startPoint:{x:S,y:T},targetNodeId:de.node.id,targetAnchorId:de.anchor.id,endPoint:{x:de.anchor.x,y:de.anchor.y}})),Ft=o.props.anchorData;d.eventCenter.emit(tt.ANCHOR_DROP,{data:Ft,e:u,nodeModel:m,edgeModel:jt})}else{var Wt=Oe.getData();d.eventCenter.emit(tt.CONNECTION_NOT_ALLOWED,{data:Wt,msg:Et||Pe})}}}),o.sourceRuleResults=new Map,o.targetRuleResults=new Map,o.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},o.dragHandler=new yr({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd}),o}return t=a,(n=[{key:"getAnchorShape",value:function(){var o=this.props,u=o.anchorData,f=o.style,d=o.node.getAnchorShape(u);if(d)return d;var m=u.x,O=u.y,S=Ka(Ka({},f),f.hover);return Object(te.g)("g",null,Object(te.g)(hi,mi({className:"lf-node-anchor-hover"},S,{x:m,y:O})),Object(te.g)(hi,mi({className:"lf-node-anchor"},f,{x:m,y:O})))}},{key:"moveAnchorEnd",value:function(o,u){var f=this.props,d=f.graphModel,m=f.nodeModel,O=f.anchorData,S=ga({x:o,y:u},d);if(S){var T=S.node,C=S.anchor.id;if(this.preTargetNode&&this.preTargetNode!==S.node&&this.preTargetNode.setElementState(Ot.DEFAULT),O.id===C)return;this.preTargetNode=T;var U="".concat(m.id,"_").concat(T.id,"_").concat(C,"_").concat(O.id);if(!this.targetRuleResults.has(U)){var W=S.anchor,ne=m.isAllowConnectedAsSource(T,O,W),re=T.isAllowConnectedAsTarget(m,O,W);this.sourceRuleResults.set(U,ui(ne)),this.targetRuleResults.set(U,ui(re))}var de=this.sourceRuleResults.get(U).isAllPass,Oe=this.targetRuleResults.get(U).isAllPass;de&&Oe?T.setElementState(Ot.ALLOW_CONNECT):T.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,f=o.startY,d=o.endX,m=o.endY;return qn(u,f,d,m)>10}},{key:"render",value:function(){var o=this,u=this.state,f=u.startX,d=u.startY,m=u.endX,O=u.endY,S=this.props,T=S.anchorData.edgeAddable,C=S.edgeStyle;return Object(te.g)("g",{className:"lf-anchor"},Object(te.g)("g",{onMouseDown:function(U){T!==!1&&o.dragHandler.handleMouseDown(U)}},this.getAnchorShape()),this.isShowLine()&&Object(te.g)(So,mi({x1:f,y1:d,x2:m,y2:O},C,{"pointer-events":"none"})))}}])&&n_(t.prototype,n),a}(te.a);i(80);function Oy(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 a_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(n),!0).forEach(function(r){u_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 s_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return wy(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 wy(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 wy(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 xy(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,f=e.fill,d=f===void 0?"currentColor":f,m=e.overflowMode,O=m===void 0?"default":m,S=e.textWidth,T=S===void 0?"":S,C=e.model,U={textAnchor:"middle","dominant-baseline":"middle",x:n,y:a,fill:d};if(Object.entries(e).forEach(function(Ce){var Ee=s_(Ce,2),Ge=Ee[0],Ae=Ee[1];Gc(Ae)!=="object"&&(U[Ge]=Ae)}),o){var W=String(o).split(/[\r\n]/g),ne=W.length;if(O!=="default"){var re=C.BaseType,de=C.modelType;if(re===Xt.NODE&&de!==dt.TEXT_NODE||re===Xt.EDGE&&T)return function(Ce){var Ee=Ce.value,Ge=Ce.fontSize,Ae=Ce.model,Pe=Ce.fontFamily,Qe=Pe===void 0?"":Pe,yt=Ce.lineHeight,Et=Ce.wrapPadding,mt=Et===void 0?"0, 0":Et,jt=Ce.overflowMode,Ft=Ce.x,Wt=Ce.y,Pn=Ae.width,ir=Ae.textHeight,In=Ce.textWidth||Pn,zo=String(Ee).split(/[\r\n]/g),mu=zo.length,_u=Vp({rows:zo,style:{fontSize:"".concat(Ge,"px"),width:"".concat(In,"px"),fontFamily:Qe,lineHeight:yt,padding:mt},rowsLength:mu,className:"lf-get-text-height"}),ao=Ae.height>_u?Ae.height:_u;ir&&(ao=ir);var Gr=jt==="ellipsis";return Gr&&(ao=Ge+2),Object(te.g)("g",null,Object(te.g)("foreignObject",{width:In,height:ao,x:Ft-In/2,y:Wt-ao/2},Object(te.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:ao,width:In,padding:mt}},Object(te.g)("div",{className:Gr?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Gr?zo.join(""):"",style:a_({},Ce)},zo.map(function(Ur){return Object(te.g)("div",{className:"lf-node-text--auto-wrap-inner"},Ur)})))))}(e)}if(ne>1){var Oe=W.map(function(Ce,Ee){var Ge=(Ee-(ne-1)/2)*(u+2);return Object(te.g)("tspan",{className:"lf-text-tspan",x:n,y:a+Ge},Ce)});return Object(te.g)("text",U,Oe)}return Object(te.g)("text",U,o)}}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 Yc(){return Yc=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},Yc.apply(this,arguments)}function c_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ey(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 Ey(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 Ey(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 l_(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 Vc(e,t){return Vc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Vc(e,t)}function f_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 p_(this,n)}}function p_(e,t){if(t&&(Uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hr(e)}function Hr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Za(e)}function ro(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sy=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&&Vc(o,u)})(a,e);var t,n,r=f_(a);function a(o){var u;(function(m,O){if(!(m instanceof O))throw new TypeError("Cannot call a class as a function")})(this,a),ro(Hr(u=r.call(this)),"dragHandler",void 0),ro(Hr(u),"sumDeltaX",0),ro(Hr(u),"sumDeltaY",0),ro(Hr(u),"stepDrag",void 0),ro(Hr(u),"onDragging",function(m){var O=m.deltaX,S=m.deltaY,T=u.props,C=T.model,U=c_(T.graphModel.transformModel.fixDeltaXY(O,S),2),W=U[0],ne=U[1];C.moveText(W,ne)}),ro(Hr(u),"dblClickHandler",function(){u.props.editable&&u.props.model.setElementState(Ot.TEXT_EDIT)}),ro(Hr(u),"mouseDownHandle",function(m){var O=u.props,S=O.draggable,T=O.graphModel.editConfigModel.nodeTextDraggable;(S||T)&&u.stepDrag.handleMouseDown(m)});var f=o.model,d=o.draggable;return u.stepDrag=new yr({onDragging:u.onDragging,step:1,model:f,isStopPropagation:d}),u}return t=a,(n=[{key:"getShape",value:function(){var o=this.props,u=o.model,f=o.graphModel,d=u.text,m=f.editConfigModel,O=d.value,S=d.x,T=d.y,C=d.editable,U=d.draggable,W={x:S,y:T,className:"",value:O};C?W.className="lf-element-text":U||m.nodeTextDraggable?W.className="lf-text-draggable":W.className="lf-text-disabled";var ne=u.getTextStyle();return Object(te.g)(xy,Yc({},W,ne,{model:u}))}},{key:"render",value:function(){if(this.props.model.text)return Object(te.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&l_(t.prototype,n),a}(te.a),d_=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function Wc(e){return Wc=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},Wc(e)}function Ja(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return jy(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 jy(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 jy(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 Py(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 h_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 y_(this,n)}}function y_(e,t){if(t&&(Wc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nn(e)}function nn(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 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 _r=function(e){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&$c(u,f)})(o,e);var t,n,r,a=h_(o);function o(u){var f;(function(T,C){if(!(T instanceof C))throw new TypeError("Cannot call a class as a function")})(this,o),ln(nn(f=a.call(this)),"t",void 0),ln(nn(f),"moveOffset",void 0),ln(nn(f),"stepDrag",void 0),ln(nn(f),"contextMenuTime",void 0),ln(nn(f),"startTime",void 0),ln(nn(f),"clickTimer",void 0),ln(nn(f),"onDragStart",function(T){var C=T.event,U=C.clientX,W=C.clientY,ne=f.props,re=ne.model,de=ne.graphModel.getPointByClient({x:U,y:W}).canvasOverlayPosition,Oe=de.x,Ce=de.y;f.moveOffset={x:re.x-Oe,y:re.y-Ce}}),ln(nn(f),"onDragging",function(T){var C=T.event,U=f.props,W=U.model,ne=U.graphModel,re=ne.editConfigModel,de=re.stopMoveGraph,Oe=re.autoExpand,Ce=ne.transformModel,Ee=ne.selectNodes,Ge=ne.width,Ae=ne.height,Pe=ne.gridSize;W.isDragging=!0;var Qe=C.clientX,yt=C.clientY,Et=ne.getPointByClient({x:Qe,y:yt}).canvasOverlayPosition,mt=Et.x,jt=Et.y,Ft=Ja(Ce.CanvasPointToHtmlPoint([mt,jt]),2),Wt=Ft[0],Pn=Ft[1];if(mt+=f.moveOffset.x,jt+=f.moveOffset.y,mt=Cr(mt,Pe),jt=Cr(jt,Pe),Ge&&Ae){if(!Oe||de||!(Wt<0||Pn<0||Wt>Ge||Pn>Ae)){var ir=Ja(Ce.CanvasPointToHtmlPoint([mt-W.width/2,jt-W.height/2]),2),In=ir[0],zo=ir[1],mu=Ja(Ce.CanvasPointToHtmlPoint([mt+W.width/2,jt+W.height/2]),2),_u=mu[0],ao=mu[1],Gr=Math.max(Pe,20),Ur=[];In<0?Ur=[Gr,0]:_u>ne.width?Ur=[-Gr,0]:zo<0?Ur=[0,Gr]:ao>ne.height&&(Ur=[0,-Gr]),f.t&&$a(f.t);var Ou=Ee.map(function(wu){return wu.id});Ou.indexOf(W.id)===-1&&(Ou=[W.id]),Ur.length>0&&!de&&Oe?f.t=by(function(){var wu=Ja(Ur,2),sg=wu[0],cg=wu[1];Ce.translate(sg,cg);var o1=-sg/Ce.SCALE_X,i1=-cg/Ce.SCALE_X;ne.moveNodes(Ou,o1,i1)}):ne.moveNodes(Ou,mt-W.x,jt-W.y)}}else ne.moveNode2Coordinate(W.id,mt,jt)}),ln(nn(f),"onDragEnd",function(){f.t&&$a(f.t),f.props.model.isDragging=!1}),ln(nn(f),"handleClick",function(T){if(f.startTime&&!(new Date().getTime()-f.startTime>200)){var C=f.props,U=C.model,W=C.graphModel,ne={data:U.getData(),e:T,position:W.getPointByClient({x:T.clientX,y:T.clientY}),isSelected:!1,isMultiple:!1},re=T.button===2,de=T.detail===2;if(!re){var Oe=W.editConfigModel,Ce=bp(T,Oe);ne.isMultiple=Ce,U.isSelected&&!de&&Ce?(ne.isSelected=!1,U.setSelected(!1)):(W.selectNodeById(U.id,Ce),ne.isSelected=!0,f.toFront()),de?(Oe.nodeTextEdit&&U.text.editable&&(U.setSelected(!1),W.setElementStateById(U.id,Ot.TEXT_EDIT)),W.eventCenter.emit(tt.NODE_DBCLICK,ne)):(W.eventCenter.emit(tt.ELEMENT_CLICK,ne),W.eventCenter.emit(tt.NODE_CLICK,ne))}}}),ln(nn(f),"handleContextMenu",function(T){T.preventDefault();var C=f.props,U=C.model,W=C.graphModel,ne=U.getData(),re=W.getPointByClient({x:T.clientX,y:T.clientY});W.setElementStateById(U.id,Ot.SHOW_MENU,re.domOverlayPosition),U.isSelected||W.selectNodeById(U.id),W.eventCenter.emit(tt.NODE_CONTEXTMENU,{data:ne,e:T,position:re}),f.toFront()}),ln(nn(f),"handleMouseDown",function(T){var C=f.props,U=C.model,W=C.graphModel;f.startTime=new Date().getTime(),W.editConfigModel.adjustNodePosition&&U.draggable&&f.stepDrag&&f.stepDrag.handleMouseDown(T)}),ln(nn(f),"setHoverON",function(T){var C=f.props,U=C.model,W=C.graphModel;if(!U.isHovered){var ne=U.getData();U.setHovered(!0),W.eventCenter.emit(tt.NODE_MOUSEENTER,{data:ne,e:T})}}),ln(nn(f),"setHoverOFF",function(T){var C=f.props,U=C.model,W=C.graphModel,ne=U.getData();U.isHovered&&(U.setHovered(!1),W.eventCenter.emit(tt.NODE_MOUSELEAVE,{data:ne,e:T}))}),ln(nn(f),"onMouseOut",function(T){d_&&f.setHoverOFF(T)});var d=u.graphModel,m=d.gridSize,O=d.eventCenter,S=u.model;return f.stepDrag=new yr({onDragStart:f.onDragStart,onDragging:f.onDragging,onDragEnd:f.onDragEnd,step:m,eventType:"NODE",isStopPropagation:!1,eventCenter:O,model:S}),f}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,f=this.props,d=f.model,m=f.graphModel,O=d.isSelected,S=d.isHitable,T=d.isDragging,C=d.isShowAnchor;return S&&(O||C)&&!T?pa(d.anchors,function(U,W){var ne=d.getAnchorLineStyle(U),re=d.getAnchorStyle(U);return Object(te.g)(i_,{anchorData:U,node:u,style:re,edgeStyle:ne,anchorIndex:W,nodeModel:d,graphModel:m,setHoverOFF:u.setHoverOFF})}):[]}},{key:"getText",value:function(){var u=this.props,f=u.model,d=u.graphModel;if(f.state===Ot.TEXT_EDIT)return"";if(f.text){var m=d.editConfigModel,O=!1;return(f.text.draggable||m.nodeTextDraggable)&&(O=!0),Object(te.g)(Sy,{editable:m.nodeTextEdit&&f.text.editable,model:f,graphModel:d,draggable:O})}}},{key:"getStateClassName",value:function(){var u=this.props.model,f=u.state,d=u.isDragging,m=u.isSelected,O="lf-node";switch(f){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"),m&&(O+=" lf-node-selected"),O}},{key:"toFront",value:function(){var u=this.props,f=u.model,d=u.graphModel;d.overlapMode!==xn.INCREASE&&f.autoToFront&&d.toFront(f.id)}},{key:"render",value:function(){var u,f=this.props,d=f.model,m=f.graphModel,O=m.editConfigModel,S=O.hideAnchors,T=O.adjustNodePosition,C=m.gridSize,U=m.transformModel.SCALE_X,W=d.isHitable,ne=d.draggable,re=Object(te.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),S?null:this.getAnchors());return W?(T&&ne&&this.stepDrag.setStep(C*U),u=Object(te.g)("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},re)):u=Object(te.g)("g",{className:this.getStateClassName()},re),u}}])&&Py(t.prototype,n),r&&Py(t,r),o}(te.a);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 g_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v_(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 b_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 m_(this,n)}}function m_(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 eu(e){return eu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},eu(e)}var Jc=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=b_(a);function a(){return g_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(te.g)(zr,qc({},u,{x:o.x,y:o.y,width:o.width,height:o.height,radius:o.radius}))}}])&&v_(t.prototype,n),a}(_r);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 el(){return el=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},el.apply(this,arguments)}function __(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O_(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 tl(e,t){return tl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},tl(e,t)}function w_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 x_(this,n)}}function x_(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 tu(e){return tu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},tu(e)}var nl=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&&tl(o,u)})(a,e);var t,n,r=w_(a);function a(){return __(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,f=o.y,d=o.r,m=o.getNodeStyle();return Object(te.g)(hi,el({},m,{x:u,y:f,r:d}))}}])&&O_(t.prototype,n),a}(_r);function rl(e){return rl=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},rl(e)}function E_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return ky(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 ky(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 ky(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 Ty(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=E_(a,2),u=o[0],f=o[1];rl(f)!=="object"&&(r[u]=f)}),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=t.map(function(a){return a.join(",")}).join(" "),Object(te.g)("polygon",r)}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 S_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j_(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 P_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=nu(e);if(t){var a=nu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return k_(this,n)}}function k_(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 nu(e){return nu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nu(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=P_(a);function a(){return S_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,f=o.y,d=o.width,m=o.height,O=o.points,S=o.getNodeStyle(),T={transform:"matrix(1 0 0 1 ".concat(u-d/2," ").concat(f-m/2,")")};return Object(te.g)("g",T,Object(te.g)(Ty,il({},S,{points:O,x:u,y:f})))}}])&&j_(t.prototype,n),a}(_r);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 cl(){return cl=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},cl.apply(this,arguments)}function T_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A_(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 M_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 D_(this,n)}}function D_(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 ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ru(e)}var fl=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=M_(a);function a(){return T_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(te.g)("g",null,Object(te.g)(Ty,cl({},u,{points:o.points,x:o.x,y:o.y})))}}])&&A_(t.prototype,n),a}(_r);function pl(e){return pl=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},pl(e)}function N_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ay(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 Ay(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 Ay(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 C_(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,f=e.ry,d=f===void 0?4:f,m=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(S){var T=N_(S,2),C=T[0],U=T[1];pl(U)!=="object"&&(O[C]=U)}),O.className=m?"lf-basic-shape ".concat(m):"lf-basic-shape",Object(te.g)("ellipse",O)}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 hl(){return hl=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},hl.apply(this,arguments)}function R_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I_(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 yl(e,t){return yl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},yl(e,t)}function L_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ou(e);if(t){var a=ou(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return z_(this,n)}}function z_(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 ou(e){return ou=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ou(e)}var gl=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&&yl(o,u)})(a,e);var t,n,r=L_(a);function a(){return R_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(te.g)(C_,hl({},u,{x:o.x,y:o.y,rx:o.rx,ry:o.ry}))}}])&&I_(t.prototype,n),a}(_r);function vl(e){return vl=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},vl(e)}function My(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?My(Object(n),!0).forEach(function(r){B_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):My(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H_(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 bl(e,t){return bl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},bl(e,t)}function X_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 G_(this,n)}}function G_(e,t){if(t&&(vl(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&&bl(o,u)})(a,e);var t,n,r=X_(a);function a(){return F_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getBackground",value:function(){var o=this.props.model,u=o.getTextStyle(),f=o.width,d=o.height,m=o.x,O=o.y,S=Dy(Dy({},u.background),{},{x:m,y:O-1,width:f,height:d});return Object(te.g)(zr,S)}},{key:"getShape",value:function(){return Object(te.g)("g",null,this.getBackground())}}])&&H_(t.prototype,n),a}(_r);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 Ol(){return Ol=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},Ol.apply(this,arguments)}function U_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y_(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 wl(e,t){return wl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},wl(e,t)}function V_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=au(e);if(t){var a=au(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return W_(this,n)}}function W_(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 _i(e)}function _i(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function au(e){return au=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},au(e)}function uu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xl=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&&wl(o,u)})(a,e);var t,n,r=V_(a);function a(){var o;U_(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return uu(_i(o=r.call.apply(r,[this].concat(f))),"ref",void 0),uu(_i(o),"currentProperties",void 0),uu(_i(o),"preProperties",void 0),uu(_i(o),"setRef",function(m){o.ref=m}),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.currentProperties)return this.preProperties=this.currentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var o=this.props.model,u=o.x,f=o.y,d=o.height,m=o.width,O=o.getNodeStyle();return this.currentProperties=JSON.stringify(o.properties),Object(te.g)("foreignObject",Ol({},O,{x:u-m/2,y:f-d/2,width:m,height:d,ref:this.setRef}))}}])&&Y_(t.prototype,n),a}(_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 Sl(){return Sl=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},Sl.apply(this,arguments)}function Ny(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 oo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ny(Object(n),!0).forEach(function(r){kl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ny(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $_(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 K_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=su(e);if(t){var a=su(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return q_(this,n)}}function q_(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 Pl(e)}function Pl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function su(e){return su=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},su(e)}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 rr,Z_=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=K_(a);function a(o){var u;return function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}(this,a),kl(Pl(u=r.call(this,o)),"setHoverON",function(){u.setState({isHovered:!0})}),kl(Pl(u),"setHoverOFF",function(){u.setState({isHovered:!1})}),u.state={isHovered:!1},u}return t=a,(n=[{key:"getBackground",value:function(){var o=this.props.model,u=o.getTextStyle(),f=o.text,d=u.background||{};if(this.state.isHovered&&u.hover&&u.hover.background&&(d=oo(oo({},d),u.hover.background)),f&&f.value&&d.fill!=="transparent"){var m,O=u.fontSize,S=u.overflowMode,T=u.lineHeight,C=u.wrapPadding,U=u.textWidth,W=f.value,ne=f.x,re=f.y,de=String(W).split(/[\r\n]/g),Oe=de.length;if(S==="autoWrap"&&U){var Ce=Vp({rows:de,style:{fontSize:"".concat(O,"px"),width:"".concat(U,"px"),lineHeight:T,padding:C},rowsLength:Oe,className:"lf-get-text-height"});m=oo(oo({},d),{},{x:ne-1,y:re-1,width:U,height:Ce})}else{de&&de.forEach(function(Qe){yd(Qe)});var Ee=vs({rows:de,fontSize:O,rowsLength:Oe}),Ge=Ee.width,Ae=Ee.height;if(typeof d.wrapPadding=="string"){var Pe=d.wrapPadding.split(",").filter(function(Qe){return Qe.trim()}).map(function(Qe){return parseFloat(Qe.trim())});Pe.length>0&&Pe.length<=4&&(Pe.length===1?Pe=[Pe[0],Pe[0],Pe[0],Pe[0]]:Pe.length===2?Pe=[Pe[0],Pe[1],Pe[0],Pe[1]]:Pe.length===3&&(Pe=[Pe[0],Pe[1],Pe[2],Pe[1]]),Ge+=Pe[1]+Pe[3],Ae+=Pe[0]+Pe[2],ne+=(Pe[1]-Pe[3])/2,re+=(Pe[2]-Pe[0])/2)}m=oo(oo({},d),{},{x:ne-1,y:re-1,width:Ge,height:Ae})}return Object(te.g)(zr,m)}}},{key:"getShape",value:function(){var o=this.props.model,u=o.text,f=u.value,d=u.x,m=u.y;if(f){var O=oo({x:d,y:m,className:"lf-element-text",value:f},o.getTextStyle());return Object(te.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(te.g)(xy,Sl({},O,{model:o})))}}}])&&$_(t.prototype,n),a}(Sy);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 Cy(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 Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cy(Object(n),!0).forEach(function(r){jn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ry(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 Ry(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 Ry(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 Q_(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 eO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 tO(this,n)}}function tO(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 Sn(e)}function Sn(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 jn(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"})(rr||(rr={}));var Iy=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=eO(a);function a(o){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),jn(Sn(u=r.call(this)),"stepDragData",void 0),jn(Sn(u),"stepDrag",void 0),jn(Sn(u),"oldEdge",void 0),jn(Sn(u),"preTargetNode",void 0),jn(Sn(u),"targetRuleResults",void 0),jn(Sn(u),"sourceRuleResults",void 0),jn(Sn(u),"handleMouseDown",function(O){u.stepDrag&&u.stepDrag.handleMouseDown(O)}),jn(Sn(u),"onDragStart",function(){var O=u.props,S=O.x,T=O.y,C=O.edgeModel,U=C.startPoint,W=C.endPoint,ne=C.pointsList;u.oldEdge={startPoint:U,endPoint:W,pointsList:ne},u.setState({endX:S,endY:T,dragging:!0})}),jn(Sn(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY,C=u.state,U=C.endX,W=C.endY,ne=u.props,re=ne.graphModel,de=ne.type,Oe=re.transformModel,Ce=re.editConfigModel,Ee=J_(Oe.moveCanvasPointByHtml([U,W],S,T),2),Ge=Ee[0],Ae=Ee[1];u.setState({endX:Ge,endY:Ae,dragging:!0});var Pe=u.props.edgeModel,Qe=ga({x:U,y:W},re);if(Qe&&Qe.node&&u.isAllowAdjust(Qe).pass){var yt,Et=Pe.startPoint,mt=Pe.endPoint,jt=Pe.sourceNode,Ft=Pe.targetNode;de===rr.SOURCE?yt={startPoint:{x:Qe.anchor.x,y:Qe.anchor.y},endPoint:{x:mt.x,y:mt.y},sourceNode:Qe.node,targetNode:Ft}:de===rr.TARGET&&(yt={startPoint:{x:Et.x,y:Et.y},endPoint:{x:Qe.anchor.x,y:Qe.anchor.y},sourceNode:jt,targetNode:Qe.node}),Pe.updateAfterAdjustStartAndEnd(yt)}else de===rr.SOURCE?Pe.updateStartPoint({x:Ge,y:Ae}):de===rr.TARGET&&Pe.updateEndPoint({x:Ge,y:Ae});Pe.text.value&&Ce.adjustEdge&&Pe.setText(Object.assign({},Pe.text,Pe.textPosition))}),jn(Sn(u),"onDragEnd",function(O){var S=O.event;try{var T;u.setState({dragging:!1});var C=u.props,U=C.graphModel,W=C.edgeModel,ne=C.type,re=u.state,de=re.endX,Oe=re.endY,Ce=re.dragging,Ee=ga({x:de,y:Oe},U);if(!Ce)return;var Ge,Ae=!1;if(Ee&&Ee.node){var Pe=u.isAllowAdjust(Ee),Qe=Pe.pass,yt=Pe.msg,Et=Pe.newTargetNode;if(Qe){var mt,jt=W.getData();Ge=Or(Or({},jt),{},{sourceAnchorId:"",targetAnchorId:"",text:(jt==null||(mt=jt.text)===null||mt===void 0?void 0:mt.value)||""}),ne===rr.SOURCE?(Ge=Or(Or({},U.edgeGenerator(U.getNodeModelById(Ee.node.id).getData(),U.getNodeModelById(W.targetNodeId).getData(),Ge)),{},{sourceNodeId:Ee.node.id,sourceAnchorId:Ee.anchor.id,startPoint:{x:Ee.anchor.x,y:Ee.anchor.y},targetNodeId:W.targetNodeId,endPoint:Or({},W.endPoint)}),W.sourceNodeId===Ee.node.id&&W.sourceAnchorId===Ee.anchor.id&&(Ae=!0)):ne===rr.TARGET&&(Ge=Or(Or({},U.edgeGenerator(U.getNodeModelById(W.sourceNodeId).getData(),U.getNodeModelById(Ee.node.id).getData(),Ge)),{},{sourceNodeId:W.sourceNodeId,startPoint:Or({},W.startPoint),targetNodeId:Ee.node.id,targetAnchorId:Ee.anchor.id,endPoint:{x:Ee.anchor.x,y:Ee.anchor.y}}),W.targetNodeId===Ee.node.id&&W.targetAnchorId===Ee.anchor.id&&(Ae=!0))}else{Ae=!0;var Ft=Et.getData();U.eventCenter.emit(tt.CONNECTION_NOT_ALLOWED,{data:Ft,msg:yt})}}else Ae=!0;if(Ae)u.recoveryEdge();else{U.deleteEdgeById(W.id);var Wt=U.addEdge(Or({},Ge));U.eventCenter.emit(tt.EDGE_EXCHANGE_NODE,{data:{newEdge:Wt.getData(),oldEdge:W.getData()}})}(T=u.preTargetNode)===null||T===void 0||T.setElementState(Ot.DEFAULT)}finally{u.props.graphModel.eventCenter.emit(tt.ADJUST_POINT_DRAGEND,{e:S,data:u.stepDragData})}}),jn(Sn(u),"recoveryEdge",function(){var O=u.props.edgeModel,S=u.oldEdge,T=S.startPoint,C=S.endPoint,U=S.pointsList;O.updateStartPoint(T),O.updateEndPoint(C),O.modelType!==dt.LINE_EDGE&&(O.pointsList=U,O.initPoints())}),jn(Sn(u),"getAdjustPointStyle",function(){var O=u.props,S=O.graphModel.theme;return O.edgeModel,S.edgeAdjust}),u.state={dragging:!1,endX:0,endY:0},u.targetRuleResults=new Map,u.sourceRuleResults=new Map;var f=o.type,d=o.edgeModel,m=o.graphModel.eventCenter;return u.stepDragData={type:f,edgeData:d.getData()},u.stepDrag=new yr({onDragStart:u.onDragStart,onDragging:u.onDragging,onDragEnd:u.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:m,data:u.stepDragData}),u}return t=a,(n=[{key:"isAllowAdjust",value:function(o){var u=this.props,f=u.edgeModel,d=f.id,m=f.sourceNode,O=f.targetNode,S=f.sourceAnchorId,T=f.targetAnchorId,C=u.type,U=null,W=null,ne=null,re=null;if(C===rr.SOURCE?(U=o.node,W=O,ne=o.anchor,re=O.getAnchorInfo(T)):(U=m,W=o.node,re=o.anchor,ne=m.getAnchorInfo(S)),this.preTargetNode&&this.preTargetNode!==o.node&&this.preTargetNode.setElementState(Ot.DEFAULT),this.preTargetNode=o.node,re.id===ne.id)return{pass:!1,msg:"",newTargetNode:W};var de="".concat(U.id,"_").concat(W.id,"_").concat(ne.id,"_").concat(re.id);if(!this.targetRuleResults.has(de)){var Oe=U.isAllowConnectedAsSource(W,ne,re,d),Ce=W.isAllowConnectedAsTarget(U,ne,re,d);this.sourceRuleResults.set(de,ui(Oe)),this.targetRuleResults.set(de,ui(Ce))}var Ee=this.sourceRuleResults.get(de),Ge=Ee.isAllPass,Ae=Ee.msg,Pe=this.targetRuleResults.get(de),Qe=Pe.isAllPass,yt=Pe.msg,Et=Ge&&Qe?Ot.ALLOW_CONNECT:Ot.NOT_ALLOW_CONNECT;return C===rr.SOURCE?U.setElementState(Et):W.setElementState(Et),{pass:Ge&&Qe,msg:yt||Ae,newTargetNode:W}}},{key:"render",value:function(){var o=this.props,u=o.x,f=o.y,d=o.getAdjustPointShape,m=o.edgeModel,O=this.state.dragging;return Object(te.g)("g",{pointerEvents:O?"none":"",onMouseDown:this.handleMouseDown},O?"":d(u,f,m))}}])&&Q_(t.prototype,n),a}(te.a);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 Oi(){return Oi=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},Oi.apply(this,arguments)}function nO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ly(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 Ly(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 Ly(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 rO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oO(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 Dl(e,t){return Dl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Dl(e,t)}function iO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 aO(this,n)}}function aO(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 Hn(e)}function Hn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lu(e){return lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(e)}function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wi=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&&Dl(o,u)})(a,e);var t,n,r=iO(a);function a(){var o;rO(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return or(Hn(o=r.call.apply(r,[this].concat(f))),"startTime",void 0),or(Hn(o),"contextMenuTime",void 0),or(Hn(o),"clickTimer",void 0),or(Hn(o),"textRef",Object(te.f)()),or(Hn(o),"handleHover",function(m,O){var S=o.props,T=S.model,C=S.graphModel.eventCenter;T.setHovered(m);var U=m?tt.EDGE_MOUSEENTER:tt.EDGE_MOUSELEAVE,W=T.getData();C.emit(U,{data:W,e:O})}),or(Hn(o),"setHoverON",function(m){o.props.model.isHovered||(o.textRef&&o.textRef.current&&o.textRef.current.setHoverON(),o.handleHover(!0,m))}),or(Hn(o),"setHoverOFF",function(m){o.props.model.isHovered&&(o.textRef&&o.textRef.current&&o.textRef.current.setHoverOFF(),o.handleHover(!1,m))}),or(Hn(o),"handleContextMenu",function(m){m.preventDefault(),o.contextMenuTime=new Date().getTime(),o.clickTimer&&clearTimeout(o.clickTimer);var O=o.props,S=O.model,T=O.graphModel,C=T.getPointByClient({x:m.clientX,y:m.clientY});T.setElementStateById(S.id,Ot.SHOW_MENU,C.domOverlayPosition),o.toFront(),S.isSelected||T.selectEdgeById(S.id);var U=S==null?void 0:S.getData();T.eventCenter.emit(tt.EDGE_CONTEXTMENU,{data:U,e:m,position:C})}),or(Hn(o),"handleMouseDown",function(m){m.stopPropagation(),o.startTime=new Date().getTime()}),or(Hn(o),"handleMouseUp",function(m){if(o.startTime&&!(new Date().getTime()-o.startTime>200||m.button===2)){var O=m.detail===2,S=o.props,T=S.model,C=S.graphModel,U=T==null?void 0:T.getData(),W=C.getPointByClient({x:m.clientX,y:m.clientY});if(O){var ne=C.editConfigModel,re=C.textEditElement;if(re&&re.id===T.id&&C.setElementStateById(T.id,Ot.DEFAULT),ne.edgeTextEdit&&T.text.editable&&C.setElementStateById(T.id,Ot.TEXT_EDIT),T.modelType===dt.POLYLINE_EDGE){var de=T,Oe=C.getPointByClient({x:m.x,y:m.y}).canvasOverlayPosition,Ce=Oe.x,Ee=Oe.y,Ge=bd({x:Ce,y:Ee},de.points);de.dbClickPosition=Ge}C.eventCenter.emit(tt.EDGE_DBCLICK,{data:U,e:m,position:W})}else C.eventCenter.emit(tt.ELEMENT_CLICK,{data:U,e:m,position:W}),C.eventCenter.emit(tt.EDGE_CLICK,{data:U,e:m,position:W});var Ae=C.editConfigModel;C.selectEdgeById(T.id,bp(m,Ae)),o.toFront()}}),o}return t=a,(n=[{key:"getShape",value:function(){return Object(te.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,u=o.model,f=o.graphModel;if(u.state===Ot.TEXT_EDIT)return null;var d=!1,m=f.editConfigModel;return(u.text.draggable||m.edgeTextDraggable)&&(d=!0),Object(te.g)(Z_,{ref:this.textRef,editable:m.edgeTextEdit&&u.text.editable,model:u,graphModel:f,draggable:d})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.startPoint,f=o.endPoint,d=o.isSelected;return{start:u,end:f,hover:this.state.hover,isSelected:d}}},{key:"getLastTwoPoints",value:function(){var o=this.props.model;return[o.startPoint,o.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var o=this.props.model,u=o.id,f=o.getArrowStyle(),d=f.refY,m=d===void 0?0:d,O=f.refX,S=O===void 0?2:O,T=nO(this.getLastTwoPoints(),2),C=T[0],U=T[1],W="auto";return C!==null&&U!==null&&(W=Jb({x:U.x-C.x,y:U.y-C.y,z:0})*(180/Math.PI)),Object(te.g)("g",null,Object(te.g)("defs",null,Object(te.g)("marker",{id:"marker-start-".concat(u),refX:-S,refY:m,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(te.g)("marker",{id:"marker-end-".concat(u),refX:S,refY:m,overflow:"visible",orient:W,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var o=this.props.model.getArrowStyle(),u=o.stroke,f=o.strokeWidth,d=o.offset,m=o.verticalLength;return Object(te.g)("path",{stroke:u,fill:u,strokeWidth:f,d:"M 0 0 L ".concat(d," -").concat(m," L ").concat(d," ").concat(m," Z")})}},{key:"getEndArrow",value:function(){var o=this.props.model.getArrowStyle(),u=o.stroke,f=o.strokeWidth,d=o.offset,m=o.verticalLength;return Object(te.g)("path",{stroke:u,fill:u,strokeWidth:f,transform:"rotate(180)",d:"M 0 0 L ".concat(d," -").concat(m," L ").concat(d," ").concat(m," Z")})}},{key:"getAdjustPointShape",value:function(o,u,f){var d=f.getAdjustPointStyle();return Object(te.g)(hi,Oi({className:"lf-edge-adjust-point"},d,{x:o,y:u}))}},{key:"getAdjustPoints",value:function(){var o=this.props,u=o.model,f=o.graphModel,d=u.getAdjustStart(),m=u.getAdjustEnd();return Object(te.g)("g",null,Object(te.g)(Iy,Oi({type:"SOURCE"},d,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:f})),Object(te.g)(Iy,Oi({type:"TARGET"},m,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:f})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(te.g)("g",null)}},{key:"getAppend",value:function(){return Object(te.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var o=this.props,u=o.graphModel,f=o.model;u.overlapMode!==xn.INCREASE&&u.toFront(f.id)}},{key:"render",value:function(){var o=this.props,u=o.model,f=u.isSelected,d=u.isHitable,m=u.isShowAdjustPoint;return o.graphModel.animation,Object(te.g)("g",null,Object(te.g)("g",{className:["lf-edge",!d&&"pointer-none",f&&"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(),this.getText(),this.getArrow()),m&&f?this.getAdjustPoints():"")}}])&&oO(t.prototype,n),a}(te.a);function Nl(e){return Nl=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},Nl(e)}function uO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return zy(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 zy(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 zy(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 xi=function(e){var t={d:""};return Object.entries(e).forEach(function(n){var r=uO(n,2),a=r[0],o=r[1],u=Nl(o);a!=="style"&&u==="object"||(t[a]=o)}),Object(te.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 Rl(){return Rl=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},Rl.apply(this,arguments)}function sO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cO(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 lO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 fO(this,n)}}function fO(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 fu(e){return fu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fu(e)}var Ll=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=lO(a);function a(){return sO(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.startPoint,f=o.endPoint,d=o.isAnimation,m=o.arrowConfig,O=o.getEdgeStyle(),S=o.getEdgeAnimationStyle(),T=S.strokeDasharray,C=S.stroke,U=S.strokeDashoffset,W=S.animationName,ne=S.animationDuration,re=S.animationIterationCount,de=S.animationTimingFunction,Oe=S.animationDirection;return Object(te.g)(So,Rl({},O,{x1:u.x,y1:u.y,x2:f.x,y2:f.y},m,d?{strokeDasharray:T,stroke:C,style:{strokeDashoffset:U,animationName:W,animationDuration:ne,animationIterationCount:re,animationTimingFunction:de,animationDirection:Oe}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model,u=function(T){var C,U=T.start,W=T.end;if(U.x===W.x&&U.y===W.y)C="";else{var ne={start:U,end:W,offset:10,verticalLength:5},re=li(va(va({},ne),{},{type:"start"})),de=li(va(va({},ne),{},{type:"end"}));C="M".concat(re.leftX," ").concat(re.leftY,`
L`).concat(re.rightX," ").concat(re.rightY,`
L`).concat(de.rightX," ").concat(de.rightY,`
L`).concat(de.leftX," ").concat(de.leftY," z")}return{d:C,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:o.startPoint,end:o.endPoint}),f=u.d,d=u.strokeWidth,m=u.fill,O=u.strokeDasharray,S=u.stroke;return Object(te.g)(xi,{d:f,fill:m,strokeWidth:d,stroke:S,strokeDasharray:O})}}])&&cO(t.prototype,n),a}(wi);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 pO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return By(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 By(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 By(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 dO=function(e){var t={points:"",fill:"none"};return Object.entries(e).forEach(function(n){var r=pO(n,2),a=r[0],o=r[1];(a==="style"||zl(o)!=="object")&&(t[a]=o)}),Object(te.g)("polyline",t)};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 Fy(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 pu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fy(Object(n),!0).forEach(function(r){xr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fl(){return Fl=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},Fl.apply(this,arguments)}function hO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Hy(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 Hy(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 Hy(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 yO(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 gO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();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 vO(this,n)}}function vO(e,t){if(t&&(Bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wr(e)}function wr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function du(e){return du=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},du(e)}function xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xl=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=gO(a);function a(){var o;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),xr(wr(o=r.call(this)),"drag",void 0),xr(wr(o),"isDragging",void 0),xr(wr(o),"isShowAdjustPointTemp",void 0),xr(wr(o),"appendInfo",void 0),xr(wr(o),"onDragStart",function(){var u=o.props.model;u.dragAppendStart(),o.isShowAdjustPointTemp=u.isShowAdjustPoint,u.isShowAdjustPoint=!1}),xr(wr(o),"onDragging",function(u){var f=u.deltaX,d=u.deltaY,m=o.props,O=m.model,S=m.graphModel;o.isDragging=!0;var T=S.transformModel,C=S.editConfigModel,U=hO(T.fixDeltaXY(f,d),2),W=U[0],ne=U[1],re=O,de=C.adjustEdgeMiddle;o.appendInfo=de?re.dragAppendSimple(o.appendInfo,{x:W,y:ne}):re.dragAppend(o.appendInfo,{x:W,y:ne})}),xr(wr(o),"onDragEnd",function(){var u=o.props,f=u.model,d=u.graphModel.eventCenter,m=f;m.dragAppendEnd(),o.isDragging=!1,m.isShowAdjustPoint=o.isShowAdjustPointTemp,o.appendInfo=void 0,d.emit(tt.EDGE_ADJUST,{data:m.getData()})}),xr(wr(o),"beforeDragStart",function(u,f){f.dragAble&&o.drag.handleMouseDown(u),o.appendInfo=f}),o.drag=new yr({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd,isStopPropagation:!1}),o}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.points,f=o.isAnimation,d=o.arrowConfig,m=o.getEdgeStyle(),O=o.getEdgeAnimationStyle(),S=O.strokeDasharray,T=O.stroke,C=O.strokeDashoffset,U=O.animationName,W=O.animationDuration,ne=O.animationIterationCount,re=O.animationTimingFunction,de=O.animationDirection;return Object(te.g)(dO,Fl({points:u},m,d,f?{strokeDasharray:S,stroke:T,style:{strokeDashoffset:C,animationName:U,animationDuration:W,animationIterationCount:ne,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.points,f=o.isSelected,d={start:null,end:null,hover:this.state.hover,isSelected:f},m=no(u);return m.length>=2&&(d.start=m[m.length-2],d.end=m[m.length-1]),d}},{key:"getLastTwoPoints",value:function(){var o=this.props.model.points,u=no(o);return u.length>=2?[u[u.length-2],u[u.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(o){var u,f=o.start,d=o.end;if(f.x===d.x&&f.y===d.y)u="";else{var m={start:f,end:d,offset:10,verticalLength:5},O=li(pu(pu({},m),{},{type:"start"})),S=li(pu(pu({},m),{},{type:"end"}));u="M".concat(O.leftX," ").concat(O.leftY,`
L`).concat(O.rightX," ").concat(O.rightY,`
L`).concat(S.rightX," ").concat(S.rightY,`
L`).concat(S.leftX," ").concat(S.leftY," z")}return{d:u,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var u=this.getAppendAttributes(o),f=u.d,d=u.strokeWidth,m=u.fill,O=u.strokeDasharray,S=u.stroke;return Object(te.g)(xi,{d:f,fill:m,strokeWidth:d,stroke:S,strokeDasharray:O})}},{key:"getAppendWidth",value:function(){for(var o=this,u=this.props,f=u.model,d=u.graphModel,m=f.pointsList,O=f.draggable,S=[],T=m.length,C=function(W){var ne="lf-polyline-append",re={start:{x:m[W].x,y:m[W].y},end:{x:m[W+1].x,y:m[W+1].y},startIndex:W,endIndex:W+1,direction:"",dragAble:!0},de=Object(te.g)("g",{className:ne},o.getAppendShape(re)),Oe=d.editConfigModel,Ce=Oe.adjustEdge,Ee=Oe.adjustEdgeMiddle;if(Ce&&O){var Ge=re.startIndex,Ae=re.endIndex,Pe=Ee&&(Ge===0||Ae===T-1);re.dragAble=!Pe,re.start.x===re.end.x?(re.dragAble&&(ne+="-ew-resize"),re.direction=At.VERTICAL):re.start.y===re.end.y&&(re.dragAble&&(ne+="-ns-resize"),re.direction=At.HORIZONTAL),de=Object(te.g)("g",{className:o.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(Qe){return o.beforeDragStart(Qe,re)}},Object(te.g)("g",{className:ne},o.getAppendShape(re)))}S.push(de)},U=0;U<T-1;U++)C(U);return Object(te.g)("g",null,S)}}])&&yO(t.prototype,n),a}(wi);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 bO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Xy(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 Xy(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 Xy(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 Ul(){return Ul=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},Ul.apply(this,arguments)}function mO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _O(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 Yl(e,t){return Yl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Yl(e,t)}function OO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=hu(e);if(t){var a=hu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return wO(this,n)}}function wO(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 function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function hu(e){return hu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},hu(e)}var Vl=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&&Yl(o,u)})(a,e);var t,n,r=OO(a);function a(){return mO(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.getEdgeStyle(),f=o.path,d=o.isAnimation,m=o.arrowConfig,O=o.getEdgeAnimationStyle(),S=O.strokeDasharray,T=O.stroke,C=O.strokeDashoffset,U=O.animationName,W=O.animationDuration,ne=O.animationIterationCount,re=O.animationTimingFunction,de=O.animationDirection;return Object(te.g)(xi,Ul({d:f},u,m,d?{strokeDasharray:S,stroke:T,style:{strokeDashoffset:C,animationName:U,animationDuration:W,animationIterationCount:ne,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model.path;return Object(te.g)(xi,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=this.state.hover,f=o,d=f.path,m=f.isSelected,O=bO(vd(d),2);return{start:O[0],end:O[1],hover:u,isSelected:m}}},{key:"getLastTwoPoints",value:function(){var o=this.props.model.path;return vd(o)}}])&&_O(t.prototype,n),a}(wi);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 Gy(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 xO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SO(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 $l(e,t){return $l=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$l(e,t)}function jO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=yu(e);if(t){var a=yu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return PO(this,n)}}function PO(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 function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function yu(e){return yu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},yu(e)}var kO=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&&$l(o,u)})(a,e);var t,n,r=jO(a);function a(){return EO(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getArrowAttributes",value:function(){var o=this.props,u=o.arrowInfo,f=o.style,d=u.start,m=u.end,O={start:d,end:m,offset:f.offset,verticalLength:f.verticalLength,type:"end"},S=li(O),T=S.leftX,C=S.leftY,U=S.rightX,W=S.rightY;return function(ne){for(var re=1;re<arguments.length;re++){var de=arguments[re]!=null?arguments[re]:{};re%2?Gy(Object(de),!0).forEach(function(Oe){xO(ne,Oe,de[Oe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(de)):Gy(Object(de)).forEach(function(Oe){Object.defineProperty(ne,Oe,Object.getOwnPropertyDescriptor(de,Oe))})}return ne}({d:"M".concat(T," ").concat(C," L").concat(m.x," ").concat(m.y," L").concat(U," ").concat(W," z")},f)}},{key:"getShape",value:function(){var o=this.getArrowAttributes(),u=o.d,f=o.strokeWidth,d=o.stroke,m=o.fill;return Object(te.g)(xi,{d:u,fill:m,strokeWidth:f,stroke:d})}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&SO(t.prototype,n),a}(te.a),Uy=function(e,t){return pe(e,t)},TO=function(e){var t=e==null?0:e.length;return t?e[t-1]:void 0},Kl=function(){return Xe.a.Date.now()},AO=/\s/,MO=function(e){for(var t=e.length;t--&&AO.test(e.charAt(t)););return t},DO=/^\s+/,NO=function(e){return e&&e.slice(0,MO(e)+1).replace(DO,"")},CO=/^[-+]0x[0-9a-f]+$/i,RO=/^0b[01]+$/i,IO=/^0o[0-7]+$/i,LO=parseInt,Yy=function(e){if(typeof e=="number")return e;if(ct(e))return NaN;if(Mt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Mt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=NO(e);var n=RO.test(e);return n||IO.test(e)?LO(e.slice(2),n?2:8):CO.test(e)?NaN:+e},zO=Math.max,BO=Math.min,FO=function(e,t,n){var r,a,o,u,f,d,m=0,O=!1,S=!1,T=!0;if(typeof e!="function")throw new TypeError("Expected a function");function C(Oe){var Ce=r,Ee=a;return r=a=void 0,m=Oe,u=e.apply(Ee,Ce)}function U(Oe){return m=Oe,f=setTimeout(ne,t),O?C(Oe):u}function W(Oe){var Ce=Oe-d;return d===void 0||Ce>=t||Ce<0||S&&Oe-m>=o}function ne(){var Oe=Kl();if(W(Oe))return re(Oe);f=setTimeout(ne,function(Ce){var Ee=t-(Ce-d);return S?BO(Ee,o-(Ce-m)):Ee}(Oe))}function re(Oe){return f=void 0,T&&r?C(Oe):(r=a=void 0,u)}function de(){var Oe=Kl(),Ce=W(Oe);if(r=arguments,a=this,d=Oe,Ce){if(f===void 0)return U(d);if(S)return clearTimeout(f),f=setTimeout(ne,t),C(d)}return f===void 0&&(f=setTimeout(ne,t)),u}return t=Yy(t)||0,Mt(n)&&(O=!!n.leading,o=(S="maxWait"in n)?zO(Yy(n.maxWait)||0,t):o,T="trailing"in n?!!n.trailing:T),de.cancel=function(){f!==void 0&&clearTimeout(f),m=0,r=d=a=f=void 0},de.flush=function(){return f===void 0?u:re(Kl())},de},HO=i(167);function XO(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 Xr(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,$y,GO=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Xr(this,"undos",[]),Xr(this,"redos",[]),Xr(this,"callbacks",[]),Xr(this,"stopWatch",null),Xr(this,"curData",null),Xr(this,"maxSize",50),Xr(this,"waitTime",100),Xr(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,(n=[{key:"add",value:function(r){Uy(TO(this.undos),r)||(this.undos.push(r),Uy(this.curData,r)||(this.redos=[]),this.eventCenter.emit(tt.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=Dt(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=Dt(r),r}}},{key:"watch",value:function(r){var a=this;this.stopWatch&&this.stopWatch(),this.undos.push(r.modelToGraphData()),this.stopWatch=Object(HO.a)(r,FO(function(){var o=r.modelToHistoryData();o&&a.add(o)},this.waitTime))}}])&&XO(t.prototype,n),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 UO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ky(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 Ky(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 Ky(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 qy(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 Io(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qy(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zy(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 Zl(e,t){return Zl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zl(e,t)}function YO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=gu(e);if(t){var a=gu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return VO(this,n)}}function VO(e,t){if(t&&(ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lo(e)}function Lo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gu(e){return gu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gu(e)}function io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jy,Qy,eg,Jl=Xn(($y=Wy=function(e){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&Zl(u,f)})(o,e);var t,n,r,a=YO(o);function o(){var u;return function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}(this,o),io(Lo(u=a.call(this)),"ref",Object(te.f)()),io(Lo(u),"__prevText",{type:"",text:"",id:""}),io(Lo(u),"keyupHandler",function(f){var d=u.props.graphModel.textEditElement;f.key==="Enter"&&f.altKey&&d.setElementState(0)}),io(Lo(u),"inputHandler",function(f){var d=f.target.innerText,m=u.props.graphModel.textEditElement;u.__prevText={type:m.type,text:d.replace(/(\r\n)+$|(\n)+$/,""),id:m.id}}),io(Lo(u),"keydownHandler",function(f){f.stopPropagation()}),u.state={style:{left:0,top:0}},u}return t=o,r=[{key:"getDerivedStateFromProps",value:function(u){var f,d=u.graphModel,m=d.transformModel,O=d.theme,S=d.textEditElement;if(S){var T;if((T=S.text)===null||T===void 0||!T.value)if(S.BaseType===Xt.EDGE){var C=(S=S).text,U=S.textPosition,W=U.x,ne=U.y;C.x=W,C.y=ne,S.setText(C)}else S=S;var re={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(S.BaseType===Xt.EDGE){var de=O.edgeText,Oe=de.overflowMode,Ce=de.lineHeight,Ee=de.wrapPadding,Ge=de.textWidth;Ge&&Oe==="autoWrap"&&(f=Io(Io({},re),{},{width:Ge,minWidth:Ge,lineHeight:Ce,padding:Ee}))}else if(S.BaseType===Xt.NODE){var Ae=O.nodeText,Pe=Ae.overflowMode,Qe=Ae.lineHeight,yt=Ae.wrapPadding,Et=Ae.textWidth,mt=S,jt=mt.width,Ft=mt.modelType;(Ft!==dt.TEXT_NODE&&Pe==="autoWrap"||Ft===dt.TEXT_NODE&&Et)&&(f=Io(Io({},re),{},{width:Et||jt,minWidth:Et||jt,lineHeight:Qe,padding:yt}))}var Wt=S.text,Pn=Wt.x,ir=Wt.y,In=UO(m.CanvasPointToHtmlPoint([Pn,ir]),2);return{style:Io({left:In[0],top:In[1]},f)}}}}],(n=[{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 f=this.__prevText,d=f.text,m=f.id;u.updateText(m,d),u.eventCenter.emit(tt.TEXT_UPDATE,Io({},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 f=document.createRange();f.selectNodeContents(u),f.collapse(!1);var d=window.getSelection();d.removeAllRanges(),d.addRange(f)}}},{key:"render",value:function(){var u,f=this.props.graphModel.textEditElement,d=this.state.style;return f?Object(te.g)("div",{contentEditable:!0,className:"lf-text-input",style:d,ref:this.ref,key:f.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(u=f.text)===null||u===void 0?void 0:u.value):null}}])&&Zy(t.prototype,n),r&&Zy(t,r),o}(te.a),io(Wy,"toolName","textEdit"),Vy=$y))||Vy,WO=function(e){return e.modelType===dt.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,f=Math.abs(n.y-r.y)+10;return{x:a-u/2,y:o-f/2,x1:a+u/2,y1:o+f/2}}(e):e.modelType===dt.POLYLINE_EDGE?function(t){var n=t.points,r=no(n),a=fi(r,8),o=a.x,u=a.y,f=a.width,d=a.height;return{x:o-f/2,y:u-d/2,x1:o+f/2,y1:u+d/2}}(e):e.modelType===dt.BEZIER_EDGE?function(t){var n=t.path,r=Ea(n),a=fi(r,8),o=a.x,u=a.y,f=a.width,d=a.height;return{x:o-f/2,y:u-d/2,x1:o+f/2,y1:u+d/2}}(e):void 0};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 tg(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||ng(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 $O(e){return function(t){if(Array.isArray(t))return ef(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||ng(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 ng(e,t){if(e){if(typeof e=="string")return ef(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)?ef(e,t):void 0}}function ef(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 KO(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 tf(e,t){return tf=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},tf(e,t)}function qO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=vu(e);if(t){var a=vu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ZO(this,n)}}function ZO(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ei(e)}function Ei(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vu(e){return vu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vu(e)}function Si(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nf=Xn((eg=Qy=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&&tf(o,u)})(a,e);var t,n,r=qO(a);function a(o){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),Si(Ei(u=r.call(this)),"stepDrag",void 0),Si(Ei(u),"handleMouseDown",function(O){u.stepDrag.handleMouseDown(O)}),Si(Ei(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY,C=u.props.graphModel,U=C.getSelectElements(!0);C.moveNodes(U.nodes.map(function(W){return W.id}),S,T)}),Si(Ei(u),"handleContextMenu",function(O){O.preventDefault();var S=u.props,T=S.graphModel,C=S.graphModel,U=C.eventCenter,W=C.selectElements,ne=T.getPointByClient({x:O.clientX,y:O.clientY}),re={nodes:[],edges:[]};$O(W.values()).forEach(function(de){de.BaseType===Xt.NODE&&re.nodes.push(de.getData()),de.BaseType===Xt.EDGE&&re.edges.push(de.getData())}),U.emit(tt.SELECTION_CONTEXTMENU,{data:re,e:O,position:ne})});var f=o.graphModel,d=f.gridSize,m=f.eventCenter;return u.stepDrag=new yr({onDragging:u.onDragging,step:d,eventType:"SELECTION",eventCenter:m}),u}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel,u=o.selectElements,f=o.transformModel;if(!(u.size<=1)){var d=Number.MAX_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER;u.forEach(function(W){var ne={x:0,y:0,x1:0,y1:0};W.BaseType===Xt.NODE&&(ne=function(re){var de=re.x,Oe=re.y,Ce=re.width,Ee=re.height;return{x:de-Ce/2,y:Oe-Ee/2,x1:de+Ce/2,y1:Oe+Ee/2}}(W)),W.BaseType===Xt.EDGE&&(ne=WO(W)),d=Math.min(d,ne.x),m=Math.min(m,ne.y),O=Math.max(O,ne.x1),S=Math.max(S,ne.y1)});var T=tg(f.CanvasPointToHtmlPoint([d,m]),2);d=T[0],m=T[1];var C=tg(f.CanvasPointToHtmlPoint([O,S]),2);O=C[0],S=C[1];var U={left:"".concat(d-10,"px"),top:"".concat(m-10,"px"),width:"".concat(O-d+20,"px"),height:"".concat(S-m+20,"px")};return Object(te.g)("div",{className:"lf-multiple-select",style:U,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&KO(t.prototype,n),a}(te.a),Si(Qy,"toolName","multipleSelect"),Jy=eg))||Jy;function JO(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 bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QO=function(){function e(r){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),bu(this,"tools",void 0),bu(this,"components",void 0),bu(this,"toolMap",new Map),bu(this,"instance",void 0),this.instance=r,this.isDisabledTool(Jl.toolName)||this.registerTool(Jl.toolName,Jl),this.isDisabledTool(nf.toolName)||this.registerTool(nf.toolName,nf);var a=r.graphModel;a.eventCenter.on("".concat(tt.GRAPH_TRANSFORM,",").concat(tt.NODE_CLICK,",").concat(tt.BLANK_CLICK," "),function(){var o=a.textEditElement,u=a.editConfigModel,f=u.edgeTextEdit,d=u.nodeTextEdit;(f||d)&&o&&a.textEditElement.setElementState(Ot.DEFAULT)})}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}}])&&JO(t.prototype,n),e}(),e1=i(168),t1=i.n(e1);function n1(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 rf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rg=function(){function e(r){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),rf(this,"mousetrap",void 0),rf(this,"options",void 0),rf(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var a=r.lf;this.target=a.container,this.mousetrap=new t1.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(Zt(a))a.forEach(function(d){var m=d.keys,O=d.callback,S=d.action;return r.on(m,O,S)});else{var o=a.keys,u=a.callback,f=a.action;this.on(o,u,f)}}},{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")}}])&&n1(t.prototype,n),e}(),r1=rg,Er=null;function og(e,t){return e.x+=t,e.y+=t,e.text&&(e.text.x+=t,e.text.y+=t),e}function ig(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 of(e){return of=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},of(e)}function ag(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 ji(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ag(Object(n),!0).forEach(function(r){Bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ag(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ug(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 Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var af=function(){function e(a){var o,u,f=this;(function(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")})(this,e),Bt(this,"container",void 0),Bt(this,"width",void 0),Bt(this,"height",void 0),Bt(this,"graphModel",void 0),Bt(this,"history",void 0),Bt(this,"viewMap",new Map),Bt(this,"tool",void 0),Bt(this,"keyboard",void 0),Bt(this,"dnd",void 0),Bt(this,"options",void 0),Bt(this,"snaplineModel",void 0),Bt(this,"components",[]),Bt(this,"plugins",void 0),Bt(this,"extension",{}),Bt(this,"adapterIn",void 0),Bt(this,"adapterOut",void 0),Bt(this,"getView",function(d){return f.viewMap.get(d)}),a=uh(a),this.options=a,this.container=this.initContainer(a.container),this.plugins=a.plugins,this.graphModel=new lm(ji({},a)),this.tool=new QO(this),this.history=new GO(this.graphModel.eventCenter),this.dnd=new a0({lf:this}),this.keyboard=new r1({lf:this,keyboard:a.keyboard}),a.snapline!==!1&&(this.snaplineModel=new vy(this.graphModel),o=this.graphModel.eventCenter,u=this.snaplineModel,o.on("node:mousemove",function(d){var m=d.data;u.setNodeSnapLine(m)}),o.on("node:mouseup",function(){u.clearSnapline()})),function(d,m){var O=d.keyboard,S=O.options.keyboard;O.on(["cmd + c","ctrl + c"],function(){if(!S.enabled||m.textEditElement)return!0;var T=d.options.guards,C=m.getSelectElements(!1);return T&&T.beforeClone&&!T.beforeClone(C)||C.nodes.length===0&&C.edges.length===0?(Er=null,!0):((Er=C).nodes.forEach(function(U){return og(U,40)}),Er.edges.forEach(function(U){return ig(U,40)}),!1)}),O.on(["cmd + v","ctrl + v"],function(){if(!S.enabled||m.textEditElement)return!0;if(Er&&(Er.nodes||Er.edges)){d.clearSelectElements();var T=d.addElements(Er);if(!T)return!0;T.nodes.forEach(function(C){return d.selectElementById(C.id,!0)}),T.edges.forEach(function(C){return d.selectElementById(C.id,!0)}),Er.nodes.forEach(function(C){return og(C,40)}),Er.edges.forEach(function(C){return ig(C,40)})}return!1}),O.on(["cmd + z","ctrl + z"],function(){return!S.enabled||!!m.textEditElement||(d.undo(),!1)}),O.on(["cmd + y","ctrl + y"],function(){return!S.enabled||!!m.textEditElement||(d.redo(),!1)}),O.on(["backspace"],function(){if(!S.enabled||m.textEditElement)return!0;var T=m.getSelectElements(!0);return d.clearSelectElements(),T.edges.forEach(function(C){return d.deleteEdge(C.id)}),T.nodes.forEach(function(C){return d.deleteNode(C.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 f={BaseEdge:wi,BaseEdgeModel:ms,BaseNode:_r,BaseNodeModel:mr,RectNode:Jc,RectNodeModel:Dc,CircleNode:nl,CircleNodeModel:dc,PolygonNode:ul,PolygonNodeModel:kc,TextNode:ml,TextNodeModel:Ic,LineEdge:Ll,LineEdgeModel:Es,DiamondNode:fl,DiamondNodeModel:bc,PolylineEdge:Xl,PolylineEdgeModel:ks,BezierEdge:Vl,BezierEdgeModel:uc,EllipseNode:gl,EllipseNodeModel:wc,HtmlNode:xl,HtmlNodeModel:Bc,h:te.g,type:a};this.viewMap.forEach(function(T){var C=T.extendKey;C&&(f[C]=T)}),this.graphModel.modelMap.forEach(function(T){var C=T.extendKey;C&&(f[C]=T)});var d=o(f),m=d.view,O=d.model,S=m;u&&!S.isObervered&&(S.isObervered=!0,S=Fe(S)),this.setView(a,S),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=Fe(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:Jc,model:Dc,type:"rect"}),this.registerElement({type:"circle",view:nl,model:dc}),this.registerElement({type:"polygon",view:ul,model:kc}),this.registerElement({type:"line",view:Ll,model:Es}),this.registerElement({type:"polyline",view:Xl,model:ks}),this.registerElement({type:"bezier",view:Vl,model:uc}),this.registerElement({type:"text",view:ml,model:Ic}),this.registerElement({type:"ellipse",view:gl,model:wc}),this.registerElement({type:"diamond",view:fl,model:bc}),this.registerElement({type:"html",view:xl,model:Bc})}},{key:"selectElementById",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1],u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];this.graphModel.selectElementById(a,o),!o&&u&&this.graphModel.toFront(a)}},{key:"focusOn",value:function(a){var o=this.graphModel.transformModel,u=a.coordinate,f=a.id;if(!u){var d=this.getNodeModelById(f);d&&(u=d.getData());var m=this.getEdgeModelById(f);m&&(u=m.textPosition)}var O=u,S=O.x,T=O.y;o.focusOn(S,T,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(a){this.graphModel.setTheme(a)}},{key:"resize",value:function(a,o){this.graphModel.resize(a,o),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{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,f,d=this.getModelById(a);return!!d&&(u=(f=(Bt(o={},Xt.NODE,this.deleteNode),Bt(o,Xt.EDGE,this.deleteEdge),o)[d.BaseType])===null||f===void 0?void 0:f.call(this,a))!==null&&u!==void 0&&u}},{key:"getModelById",value:function(a){return this.graphModel.getElement(a)}},{key:"getDataById",value:function(a){var o;return(o=this.graphModel.getElement(a))===null||o===void 0?void 0:o.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){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt.NODE_ADD;return this.graphModel.addNode(a,o)}},{key:"deleteNode",value:function(a){var o=this.graphModel.getNodeModelById(a);if(!o)return!1;var u=o.getData(),f=this.options.guards,d=!f||!f.beforeDelete||f.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){var o;return(o=this.graphModel.getNodeModelById(a))===null||o===void 0?void 0:o.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 f=u.model.getData(),d=!o||!o.beforeDelete||o.beforeDelete(f);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,f=a.targetNodeId;if(u&&f){var d=[];return o.forEach(function(S){S.sourceNodeId===u&&S.targetNodeId===f&&d.push(S)}),d}if(u){var m=[];return o.forEach(function(S){S.sourceNodeId===u&&m.push(S)}),m}if(f){var O=[];return o.forEach(function(S){S.targetNodeId===f&&O.push(S)}),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(en(o))}},{key:"deleteProperty",value:function(a,o){var u;(u=this.graphModel.getElement(a))===null||u===void 0||u.deleteProperty(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,f=a.edges,d={},m={nodes:[],edges:[]},O=0;O<u.length;O++){var S=u[O],T=S.id,C=this.addNode(S);if(!C)return;T&&(d[T]=C.id),m.nodes.push(C)}return f.forEach(function(U){var W=U.sourceNodeId,ne=U.targetNodeId;d[W]&&(W=d[W]),d[ne]&&(ne=d[ne]);var re=o.graphModel.addEdge(ji(ji({},U),{},{sourceNodeId:W,targetNodeId:ne}));m.edges.push(re)}),m}},{key:"getAreaElement",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],f=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return this.graphModel.getAreaElement(a,o,u,f,d).map(function(m){return m.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();if(this.adapterOut){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];return this.adapterOut.apply(this,[a].concat(u))}return 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=en(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"redo",value:function(){if(this.history.redoAble()){var a=en(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:"initContainer",value:function(a){var o=document.createElement("div");return o.style.position="relative",o.style.width="100%",o.style.height="100%",a.innerHTML="",a.appendChild(o),o}},{key:"installPlugins",value:function(){var a,o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=(a=this.plugins)!==null&&a!==void 0?a:e.extensions;f.forEach(function(d){var m=d.pluginName||d.name;u.indexOf(m)===-1&&o.installPlugin(d)})}},{key:"installPlugin",value:function(a){if(of(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 f=a,d=new f({lf:this,LogicFlow:e,options:this.options.pluginsOptions});d.render&&this.components.push(d.render.bind(d)),this.extension[f.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(ji(ji({},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(en(a)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(te.j)(Object(te.g)(o0,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(tt.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&&ug(t.prototype,n),r&&ug(t,r),e}();function Xn(e){return Fe(e)}Bt(af,"extensions",new Map),p.default=af}])})})(sf,sf.exports);var qe=sf.exports;const xu=a1(qe),y1=[{type:"bpmn:startEvent",text:"开始",class:"bpmn-start"},{type:"bpmn:endEvent",text:"结束",class:"bpmn-end"},{type:"bpmn:exclusiveGateway",text:"网关",class:"bpmn-exclusiveGateway"},{type:"bpmn:userTask",text:"用户",class:"bpmn-user"}];function g1(v,y){return y={exports:{}},v(y,y.exports),y.exports}var v1=g1(function(v){var y=v.exports=function(s,p){if(p||(p=16),s===void 0&&(s=128),s<=0)return"0";for(var i=Math.log(Math.pow(2,s))/Math.log(p),l=2;i===1/0;l*=2)i=Math.log(Math.pow(2,s/l))/Math.log(p)*l;for(var c=i-Math.floor(i),b="",l=0;l<Math.floor(i);l++){var _=Math.floor(Math.random()*p).toString(p);b=_+b}if(c){var E=Math.pow(p,c),_=Math.floor(Math.random()*E).toString(p);b=_+b}var w=parseInt(b,p);return w!==1/0&&w>=Math.pow(2,s)?y(s,p):b};y.rack=function(s,p,i){var l=function(b){var _=0;do{if(_++>10)if(i)s+=i;else throw new Error("too many ID collisions, use more bits");var E=y(s,p)}while(Object.hasOwnProperty.call(c,E));return c[E]=b,E},c=l.hats={};return l.get=function(b){return l.hats[b]},l.set=function(b,_){return l.hats[b]=_,l},l.bits=s||128,l.base=p||16,l}});function ur(v){if(!(this instanceof ur))return new ur(v);v=v||[128,36,1],this._seed=v.length?v1.rack(v[0],v[1],v[2]):v}ur.prototype.next=function(v){return this._seed(v||!0)};ur.prototype.nextPrefixed=function(v,y){var s;do s=v+this.next(!0);while(this.assigned(s));return this.claim(s,y),s};ur.prototype.claim=function(v,y){this._seed.set(v,y||!0)};ur.prototype.assigned=function(v){return this._seed.get(v)||!1};ur.prototype.unclaim=function(v){delete this._seed.hats[v]};ur.prototype.clear=function(){var v=this._seed.hats,y;for(y in v)this.unclaim(y)};var b1=new ur([32,32,1]);function Yo(){return b1.next()}var Ug=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),m1=function(v){Ug(y,v);function y(s,p){var i=this;return s.id||(s.id="Event_"+Yo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=v.call(this,s,p)||this,i}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedTargetRules=function(){var s=v.prototype.getConnectedTargetRules.call(this),p={message:"起始节点不能作为边的终点",validate:function(){return!1}};return s.push(p),s},y.extendKey="StartEventModel",y}(qe.CircleNodeModel),_1=function(v){Ug(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.extendKey="StartEventNode",y}(qe.CircleNode),O1={type:"bpmn:startEvent",view:_1,model:m1},Yg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Pu=globalThis&&globalThis.__assign||function(){return Pu=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Pu.apply(this,arguments)},w1=function(v){Yg(y,v);function y(s,p){var i=this;return s.id||(s.id="Event_"+Yo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=v.call(this,s,p)||this,i}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedSourceRules=function(){var s=v.prototype.getConnectedSourceRules.call(this),p={message:"结束节点不能作为边的起点",validate:function(){return!1}};return s.push(p),s},y.extendKey="EndEventModel",y}(qe.CircleNodeModel),x1=function(v){Yg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},y.prototype.getShape=function(){var s=this.props.model,p=s.getNodeStyle(),i=s.x,l=s.y,c=s.r,b=v.prototype.getShape.call(this);return qe.h("g",{},b,qe.h("circle",Pu(Pu({},p),{cx:i,cy:l,r:c-5})))},y.extendKey="EndEventView",y}(qe.CircleNode),E1={type:"bpmn:endEvent",view:x1,model:w1},Vg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Mi=globalThis&&globalThis.__assign||function(){return Mi=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Mi.apply(this,arguments)},S1=function(v){Vg(y,v);function y(s,p){var i=this;return s.id||(s.id="Gateway_"+Yo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=v.call(this,s,p)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return y.extendKey="ExclusiveGatewayModel",y}(qe.PolygonNodeModel),j1=function(v){Vg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.points,_=s.getNodeStyle();return qe.h("g",{transform:"matrix(1 0 0 1 "+(p-l/2)+" "+(i-c/2)+")"},qe.h("polygon",Mi(Mi({},_),{x:p,y:i,points:b})),qe.h("path",Mi({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"},_)))},y.extendKey="ExclusiveGatewayNode",y}(qe.PolygonNode),P1={type:"bpmn:exclusiveGateway",view:j1,model:S1},Wg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),ku=globalThis&&globalThis.__assign||function(){return ku=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},ku.apply(this,arguments)},k1=function(v){Wg(y,v);function y(s,p){var i=this;return s.id||(s.id="Activity_"+Yo()),i=v.call(this,s,p)||this,i}return y.extendKey="UserTaskModel",y}(qe.RectNodeModel),T1=function(v){Wg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.getNodeStyle();return qe.h("svg",{x:p-l/2+5,y:i-c/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},qe.h("path",{fill:b.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"}))},y.prototype.getShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.radius,_=s.getNodeStyle();return qe.h("g",{},[qe.h("rect",ku(ku({},_),{x:p-l/2,y:i-c/2,rx:b,ry:b,width:l,height:c})),this.getLabelShape()])},y.extendKey="UserTaskNode",y}(qe.RectNode),A1={type:"bpmn:userTask",view:T1,model:k1},$g=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),cf=globalThis&&globalThis.__assign||function(){return cf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},cf.apply(this,arguments)},M1=function(v){$g(y,v);function y(s,p){var i=this;return s.id||(s.id="Activity_"+Yo()),i=v.call(this,s,p)||this,i}return y.extendKey="ServiceTaskModel",y}(qe.RectNodeModel),D1=function(v){$g(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.getNodeStyle();return qe.h("svg",{x:p-l/2+5,y:i-c/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},qe.h("path",{fill:b.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"}))},y.prototype.getShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.radius,_=s.getNodeStyle();return qe.h("g",{},[qe.h("rect",cf({x:p-l/2,y:i-c/2,rx:b,ry:b,width:l,height:c},_)),this.getLabelShape()])},y.extendKey="ServiceTaskNode",y}(qe.RectNode),N1={type:"bpmn:serviceTask",view:D1,model:M1},Kg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),C1=function(v){Kg(y,v);function y(s,p){var i=this;return s.id||(s.id="Flow_"+Yo()),i=v.call(this,s,p)||this,i}return y.extendKey="SequenceFlowModel",y}(qe.PolylineEdgeModel),R1=function(v){Kg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.extendKey="SequenceFlowEdge",y}(qe.PolylineEdge),I1={type:"bpmn:sequenceFlow",view:R1,model:C1},dg={width:40,height:40},hg={width:40,height:40},yg={width:40,height:40},gg={width:100,height:80},vg={width:100,height:80},L1={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}}},z1=function(){function v(y){var s=y.lf;s.setTheme(L1),s.register(O1),s.register(E1),s.register(P1),s.register(A1),s.register(N1),s.options.customBpmnEdge||(s.register(I1),s.setDefaultEdgeType("bpmn:sequenceFlow"))}return v.pluginName="bpmnElement",v}(),B1=function(){function v(y){var s=this,p=y.lf;this.lf=p,this.customCssRules="",this.useGlobalRules=!0,p.getSnapshot=function(i,l){s.getSnapshot(i,l)},p.getSnapshotBlob=function(i){return s.getSnapshotBlob(i)},p.getSnapshotBase64=function(i){return s.getSnapshotBase64(i)}}return v.prototype.getSvgRootElement=function(y){var s=y.container.querySelector(".lf-canvas-overlay");return s},v.prototype.triggerDownload=function(y){var s=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),p=document.createElement("a");p.setAttribute("download",this.fileName),p.setAttribute("href",y),p.setAttribute("target","_blank"),p.dispatchEvent(s)},v.prototype.removeAnchor=function(y){for(var s=y.childNodes,p=y.childNodes&&y.childNodes.length,i=0;i<p;i++){var l=s[i],c=l.classList&&Array.from(l.classList)||[];c.indexOf("lf-anchor")>-1&&(y.removeChild(y.childNodes[i]),p--,i--)}},v.prototype.getSnapshot=function(y,s){var p=this;this.fileName=y||"logic-flow."+Date.now()+".png";var i=this.getSvgRootElement(this.lf);this.getCanvasData(i,s).then(function(l){var c=l.toDataURL("image/png").replace("image/png","image/octet-stream");p.triggerDownload(c)})},v.prototype.getSnapshotBase64=function(y){var s=this,p=this.getSvgRootElement(this.lf);return new Promise(function(i){s.getCanvasData(p,y).then(function(l){var c=l.toDataURL("image/png");i({data:c,width:l.width,height:l.height})})})},v.prototype.getSnapshotBlob=function(y){var s=this,p=this.getSvgRootElement(this.lf);return new Promise(function(i){s.getCanvasData(p,y).then(function(l){l.toBlob(function(c){i({data:c,width:l.width,height:l.height})},"image/png")})})},v.prototype.getClassRules=function(){var y="";if(this.useGlobalRules)for(var s=document.styleSheets,p=0;p<s.length;p++)for(var i=s[p],l=0;l<i.cssRules.length;l++)y+=i.cssRules[l].cssText;return this.customCssRules&&(y+=this.customCssRules),y},v.prototype.getCanvasData=function(y,s){var p=this,i=y.cloneNode(!0),l=i.lastChild,c=l.childNodes&&l.childNodes.length;if(c)for(var b=0;b<c;b++){var _=l.childNodes[b],E=_.classList&&Array.from(_.classList);if(E&&E.indexOf("lf-base")<0)l.removeChild(l.childNodes[b]),c--,b--;else{var w=l.childNodes[b];w&&w.childNodes.forEach(function(le){var ce=le;p.removeAnchor(ce.firstChild)})}}var k=window.devicePixelRatio||1,j=document.createElement("canvas"),P=this.lf.graphModel.rootEl.querySelector(".lf-base"),D=P.getBoundingClientRect(),N=document.querySelector(".lf-canvas-overlay").getBoundingClientRect(),L=D.x-N.x,B=D.y-N.y,X=this.lf.graphModel,ee=X.transformModel,ie=ee.SCALE_X,Z=ee.SCALE_Y,V=ee.TRANSLATE_X,K=ee.TRANSLATE_Y;i.lastChild.style.transform="matrix(1, 0, 0, 1, "+(-L+10+V)+", "+(-B+10+K)+")";var z=Math.ceil(D.width/ie),M=Math.ceil(D.height/Z);j.style.width=z+"px",j.style.height=M+"px",j.width=z*k+80,j.height=M*k+80;var I=j.getContext("2d");I.clearRect(0,0,j.width,j.height),I.scale(k,k),s?(I.fillStyle=s,I.fillRect(0,0,z*k+80,M*k+80)):I.clearRect(0,0,z,M);var R=new Image,F=document.createElement("style");F.innerHTML=this.getClassRules();var J=document.createElement("foreignObject");return J.appendChild(F),i.appendChild(J),new Promise(function(le){R.onload=function(){var xe=navigator.userAgent.indexOf("Firefox")>-1;try{xe?createImageBitmap(R,{resizeWidth:j.width,resizeHeight:j.height}).then(function(ge){I.drawImage(ge,0,0),le(j)}):(I.drawImage(R,0,0),le(j))}catch{I.drawImage(R,0,0),le(j)}};var ce="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(i),ye=ce.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");R.src=ye})},v.pluginName="snapshot",v}(),F1=new ur([32,32,1]);function bg(){return F1.next()}function qg(v){return Object.prototype.toString.call(v)}function H1(v){return" ".repeat(v)}function Tu(v){var y=v;return qg(v)==="[object Object]"?(y={},Object.keys(v).forEach(function(s){var p=s;s.charAt(0)==="-"&&(p=s.substring(1)),y[p]=Tu(v[s])})):Array.isArray(v)&&(y=[],v.forEach(function(s,p){y[p]=Tu(s)})),y}function X1(v){var y=v;try{typeof y!="string"&&(y=JSON.parse(v))}catch{y=JSON.stringify(Tu(v)).replace(/"/g,"'")}return y}var Bo=`
`;function Eu(v,y,s){var p=H1(s),i="";if(y==="#text")return Bo+p+v;if(y==="#cdata-section")return Bo+p+"<![CDATA["+v+"]]>";if(y==="#comment")return Bo+p+"<!--"+v+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+X1(v)+'"';if(Array.isArray(v))v.forEach(function(_){i+=Eu(_,y,s+1)});else if(qg(v)==="[object Object]"){var l=Object.keys(v),c="",b="";i+=(s===0?"":Bo+p)+"<"+y,l.forEach(function(_){_.charAt(0)==="-"?c+=Eu(v[_],_,s+1):b+=Eu(v[_],_,s+1)}),i+=c+(b!==""?">"+b+(Bo+p)+"</"+y+">":" />")}else i+=Bo+p+("<"+y+">"+v.toString()+"</"+y+">");return i}function G1(v){var y="";for(var s in v)y+=Eu(v[s],s,0);return y}var pn=function(){};pn.ObjTree=function(){return this};pn.ObjTree.VERSION="0.23";pn.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
`;pn.ObjTree.prototype.attr_prefix="-";pn.ObjTree.prototype.parseXML=function(v){var y;if(window.DOMParser){var s=new DOMParser,p=s.parseFromString(v,"application/xml");if(!p)return;y=p.documentElement}else window.ActiveXObject&&(s=new ActiveXObject("Microsoft.XMLDOM"),s.async=!1,s.loadXML(v),y=s.documentElement);if(y)return this.parseDOM(y)};pn.ObjTree.prototype.parseHTTP=function(v,y,s){var p={};for(var i in y)p[i]=y[i];if(p.method||(typeof p.postBody>"u"&&typeof p.postbody>"u"&&typeof p.parameters>"u"?p.method="get":p.method="post"),s){p.asynchronous=!0;var l=this,c=s,b=p.onComplete;p.onComplete=function(w){var k;w&&w.responseXML&&w.responseXML.documentElement&&(k=l.parseDOM(w.responseXML.documentElement)),c(k,w),b&&b(w)}}else p.asynchronous=!1;var _;if(typeof HTTP<"u"&&HTTP.Request){p.uri=v;var E=new HTTP.Request(p);E&&(_=E.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var E=new Ajax.Request(v,p);E&&(_=E.transport)}if(s)return _;if(_&&_.responseXML&&_.responseXML.documentElement)return this.parseDOM(_.responseXML.documentElement)};pn.ObjTree.prototype.parseDOM=function(v){if(v){if(this.__force_array={},this.force_array)for(var y=0;y<this.force_array.length;y++)this.__force_array[this.force_array[y]]=1;var s=this.parseElement(v);if(this.__force_array[v.nodeName]&&(s=[s]),v.nodeType!=11){var p={};p[v.nodeName]=s,s=p}return s}};pn.ObjTree.prototype.parseElement=function(v){if(v.nodeType!=7){if(v.nodeType==3||v.nodeType==4||v.nodeType==8){var y=v.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:v.nodeValue}var s=null,p={};if(v.attributes&&v.attributes.length){s={};for(var i=0;i<v.attributes.length;i++){var l=v.attributes[i].nodeName;if(typeof l=="string"){var c=v.attributes[i].nodeValue;try{c=JSON.parse(v.attributes[i].nodeValue.replace(/'/g,'"'))}catch{c=v.attributes[i].nodeValue}c&&(l=this.attr_prefix+l,typeof p[l]>"u"&&(p[l]=0),p[l]++,this.addNode(s,l,p[l],c))}}}if(v.childNodes&&v.childNodes.length){var b=!0;s&&(b=!1);for(var i=0;i<v.childNodes.length&&b;i++){var _=v.childNodes[i].nodeType;_==3||_==4||_==8||(b=!1)}if(b){s||(s="");for(var i=0;i<v.childNodes.length;i++)s+=v.childNodes[i].nodeValue}else{s||(s={});for(var i=0;i<v.childNodes.length;i++){var l=v.childNodes[i].nodeName;if(typeof l=="string"){var c=this.parseElement(v.childNodes[i]);c&&(typeof p[l]>"u"&&(p[l]=0),p[l]++,this.addNode(s,l,p[l],c))}}}}else s===null&&(s={});return s}};pn.ObjTree.prototype.addNode=function(v,y,s,p){this.__force_array[y]?(s==1&&(v[y]=[]),v[y][v[y].length]=p):s==1?v[y]=p:s==2?v[y]=[v[y],p]:v[y][v[y].length]=p};pn.ObjTree.prototype.writeXML=function(v){var y=this.hash_to_xml(null,v);return this.xmlDecl+y};pn.ObjTree.prototype.hash_to_xml=function(v,y){var s=[],p=[];for(var i in y)if(y.hasOwnProperty(i)){var l=y[i];i.charAt(0)!=this.attr_prefix?typeof l>"u"||l==null?s[s.length]="<"+i+" />":typeof l=="object"&&l.constructor==Array?s[s.length]=this.array_to_xml(i,l):typeof l=="object"?s[s.length]=this.hash_to_xml(i,l):s[s.length]=this.scalar_to_xml(i,l):p[p.length]=" "+i.substring(1)+'="'+this.xml_escape(l)+'"'}var c=p.join(""),b=s.join("");return typeof v>"u"||v==null||(s.length>0?b.match(/\n/)?b="<"+v+c+`>
`+b+"</"+v+`>
`:b="<"+v+c+">"+b+"</"+v+`>
`:b="<"+v+c+` />
`),b};pn.ObjTree.prototype.array_to_xml=function(v,y){for(var s=[],p=0;p<y.length;p++){var i=y[p];typeof i>"u"||i==null?s[s.length]="<"+v+" />":typeof i=="object"&&i.constructor==Array?s[s.length]=this.array_to_xml(v,i):typeof i=="object"?s[s.length]=this.hash_to_xml(v,i):s[s.length]=this.scalar_to_xml(v,i)}return s.join("")};pn.ObjTree.prototype.scalar_to_xml=function(v,y){return v=="#text"?this.xml_escape(y):"<"+v+">"+this.xml_escape(y)+"</"+v+`>
`};pn.ObjTree.prototype.xml_escape=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var U1=function(v){return new pn.ObjTree().parseXML(v)},Y1=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),lf=globalThis&&globalThis.__assign||function(){return lf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},lf.apply(this,arguments)},Iu=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},sr;(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"})(sr||(sr={}));var Zg=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],mg=["properties","startPoint","endPoint","pointsList"];function _g(v){var y=v?mg.concat(v):mg;return function(s){function p(i){var l={};return typeof i=="string"?i:Array.isArray(i)?i.map(function(c){return p(c)}):(Object.entries(i).forEach(function(c){var b=Iu(c,2),_=b[0],E=b[1];typeof E!="object"?_.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(_)?l[_]=E:l["-"+_]=E:y.includes(_)?l["-"+_]=p(E):l[_]=p(E)}),l)}return p(s)}}function Au(v){var y={};return Object.entries(v).forEach(function(s){var p=Iu(s,2),i=p[0],l=p[1];i.indexOf("-")===0?y[i.substring(1)]=Tu(l):typeof l=="string"?y[i]=l:Object.prototype.toString.call(l)==="[object Object]"?y[i]=Au(l):Array.isArray(l)?y[i]=l.map(function(c){return Au(c)}):y[i]=l}),y}function V1(v,y,s){var p=new Map;y.nodes.forEach(function(l){var c,b={"-id":l.id};if(!((c=l.text)===null||c===void 0)&&c.value&&(b["-name"]=l.text.value),l.properties){var _=_g(s)(l.properties);Object.assign(b,_)}p.set(l.id,b),v[l.type]?Array.isArray(v[l.type])?v[l.type].push(b):v[l.type]=[v[l.type],b]:v[l.type]=b});var i=y.edges.map(function(l){var c,b,_=p.get(l.targetNodeId);_["bpmn:incoming"]?Array.isArray(_["bpmn:incoming"])?_["bpmn:incoming"].push(l.id):_["bpmn:incoming"]=[_["bpmn:incoming"],l.id]:_["bpmn:incoming"]=l.id;var E={"-id":l.id,"-sourceRef":l.sourceNodeId,"-targetRef":l.targetNodeId};if(!((c=l.text)===null||c===void 0)&&c.value&&(E["-name"]=(b=l.text)===null||b===void 0?void 0:b.value),l.properties){var w=_g(s)(l.properties);Object.assign(E,w)}return E});y.edges.forEach(function(l){var c=p.get(l.sourceNodeId);c["bpmn:outgoing"]?Array.isArray(c["bpmn:outgoing"])?c["bpmn:outgoing"].push(l.id):c["bpmn:outgoing"]=[c["bpmn:outgoing"],l.id]:c["bpmn:outgoing"]=l.id}),v[sr.FLOW]=i}function W1(v,y){v["bpmndi:BPMNEdge"]=y.edges.map(function(s){var p,i=s.id,l=s.pointsList.map(function(b){var _=b.x,E=b.y;return{"-x":_,"-y":E}}),c={"-id":i+"_di","-bpmnElement":i,"di:waypoint":l};return!((p=s.text)===null||p===void 0)&&p.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":s.text.x-s.text.value.length*10/2,"-y":s.text.y-7,"-width":s.text.value.length*10,"-height":14}}),c}),v["bpmndi:BPMNShape"]=y.nodes.map(function(s){var p,i=s.id,l=100,c=80,b=s.x,_=s.y,E=Vr.shapeConfigMap.get(s.type);E&&(l=E.width,c=E.height),b-=l/2,_-=c/2;var w={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":b,"-y":_,"-width":l,"-height":c}};return!((p=s.text)===null||p===void 0)&&p.value&&(w["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":s.text.x-s.text.value.length*10/2,"-y":s.text.y-7,"-width":s.text.value.length*10,"-height":14}}),w})}function $1(v){var y=[],s=[],p=v["bpmn:definitions"];if(p){var i=p["bpmn:process"];Object.keys(i).forEach(function(l){if(l.indexOf("bpmn:")===0){var c=i[l];if(l===sr.FLOW){var b=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];s=q1(c,b)}else{var _=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];y=y.concat(K1(c,_,l))}}})}return{nodes:y,edges:s}}function K1(v,y,s){var p=[];if(Array.isArray(v))v.forEach(function(c){var b;Array.isArray(y)?b=y.find(function(E){return E["-bpmnElement"]===c["-id"]}):b=y;var _=Og(b,s,c);p.push(_)});else{var i=void 0;Array.isArray(y)?i=y.find(function(c){return c["-bpmnElement"]===v["-id"]}):i=y;var l=Og(i,s,v);p.push(l)}return p}function Og(v,y,s){var p=Number(v["dc:Bounds"]["-x"]),i=Number(v["dc:Bounds"]["-y"]),l=s["-name"],c=Vr.shapeConfigMap.get(y);c&&(p+=c.width/2,i+=c.height/2);var b;Object.entries(s).forEach(function(k){var j=Iu(k,2),P=j[0],D=j[1];Zg.indexOf(P)===-1&&(b||(b={}),b[P]=D)}),b&&(b=Au(b));var _;if(l&&(_={x:p,y:i,value:l},v["bpmndi:BPMNLabel"]&&v["bpmndi:BPMNLabel"]["dc:Bounds"])){var E=v["bpmndi:BPMNLabel"]["dc:Bounds"];_.x=Number(E["-x"])+Number(E["-width"])/2,_.y=Number(E["-y"])+Number(E["-height"])/2}var w={id:v["-bpmnElement"],type:y,x:p,y:i,properties:b};return _&&(w.text=_),w}function q1(v,y){var s=[];if(Array.isArray(v))v.forEach(function(i){var l;Array.isArray(y)?l=y.find(function(c){return c["-bpmnElement"]===i["-id"]}):l=y,s.push(wg(l,i))});else{var p=void 0;Array.isArray(y)?p=y.find(function(i){return i["-bpmnElement"]===v["-id"]}):p=y,s.push(wg(p,v))}return s}function wg(v,y){var s,p=y["-name"];if(p){var i=v["bpmndi:BPMNLabel"]["dc:Bounds"],l=0;p.split(`
`).forEach(function(_){l<_.length&&(l=_.length)}),s={value:p,x:Number(i["-x"])+l*10/2,y:Number(i["-y"])+7}}var c;Object.entries(y).forEach(function(_){var E=Iu(_,2),w=E[0],k=E[1];Zg.indexOf(w)===-1&&(c||(c={}),c[w]=k)}),c&&(c=Au(c));var b={id:y["-id"],type:sr.FLOW,pointsList:v["di:waypoint"].map(function(_){return{x:Number(_["-x"]),y:Number(_["-y"])}}),sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:c};return s&&(b.text=s),b}var Vr=function(){function v(y){var s=this,p=y.lf;this.adapterOut=function(i,l){var c=lf({},s.processAttributes);V1(c,i,l);var b={"-id":"BPMNPlane_1","-bpmnElement":c["-id"]};W1(b,i);var _=s.definitionAttributes;_["bpmn:process"]=c,_["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":b};var E={"bpmn:definitions":_};return E},this.adapterIn=function(i){if(i)return $1(i)},p.adapterIn=function(i){return s.adapterIn(i)},p.adapterOut=function(i,l){return s.adapterOut(i,l)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+bg()},this.definitionAttributes={"-id":"Definitions_"+bg(),"-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://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return v.prototype.setCustomShape=function(y,s){v.shapeConfigMap.set(y,s)},v.pluginName="bpmn-adapter",v.shapeConfigMap=new Map,v}();Vr.shapeConfigMap.set(sr.START,{width:dg.width,height:dg.height});Vr.shapeConfigMap.set(sr.END,{width:hg.width,height:hg.height});Vr.shapeConfigMap.set(sr.GATEWAY,{width:yg.width,height:yg.height});Vr.shapeConfigMap.set(sr.SYSTEM,{width:gg.width,height:gg.height});Vr.shapeConfigMap.set(sr.USER,{width:vg.width,height:vg.height});(function(v){Y1(y,v);function y(s){var p=v.call(this,s)||this;p.adapterXmlIn=function(l){var c=U1(l);return p.adapterIn(c)},p.adapterXmlOut=function(l,c){var b=p.adapterOut(l,c);return G1(b)};var i=s.lf;return i.adapterIn=p.adapterXmlIn,i.adapterOut=p.adapterXmlOut,p}return y.pluginName="bpmnXmlAdapter",y})(Vr);var xg=globalThis&&globalThis.__assign||function(){return xg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},xg.apply(this,arguments)};globalThis&&globalThis.__read;var Eg;(function(v){v.HORIZONTAL="horizontal",v.VERTICAL="vertical"})(Eg||(Eg={}));var Z1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var J1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var Q1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},ew=globalThis&&globalThis.__spread||function(){for(var v=[],y=0;y<arguments.length;y++)v=v.concat(Q1(arguments[y]));return v},Pi="lf:defaultNodeMenu",ki="lf:defaultEdgeMenu",Ti="lf:defaultGraphMenu",Sg="lf:defaultSelectionMenu",tw=function(){function v(y){var s=this,p=y.lf;this.__menuDOM=document.createElement("ul"),this.lf=p,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){s.setMenuConfig(i)},this.lf.addMenuConfig=function(i){s.addMenuConfig(i)},this.lf.setMenuByType=function(i){s.setMenuByType(i)}}return v.prototype.init=function(){var y=this,s=[{text:"删除",callback:function(l){y.lf.deleteNode(l.id)}},{text:"编辑文本",callback:function(l){y.lf.graphModel.editText(l.id)}},{text:"复制",callback:function(l){y.lf.cloneNode(l.id)}}];this.menuTypeMap.set(Pi,s);var p=[{text:"删除",callback:function(l){y.lf.deleteEdge(l.id)}},{text:"编辑文本",callback:function(l){y.lf.graphModel.editText(l.id)}}];this.menuTypeMap.set(ki,p),this.menuTypeMap.set(Ti,[]);var i=[{text:"删除",callback:function(l){y.lf.clearSelectElements(),l.edges.forEach(function(c){return y.lf.deleteEdge(c.id)}),l.nodes.forEach(function(c){return y.lf.deleteNode(c.id)})}}];this.menuTypeMap.set(Sg,i)},v.prototype.render=function(y,s){var p=this;this.__container=s,this.__currentData=null,this.__menuDOM.className="lf-menu",s.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var l=i.target;Array.from(l.classList).indexOf("lf-menu-item")===-1&&Array.from(l.classList).indexOf("lf-menu")===-1;)l=l.parentElement;Array.from(l.classList).indexOf("lf-menu-item")>-1?(l.onclickCallback(p.__currentData),p.__menuDOM.style.display="none",p.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!")},!0),this.lf.on("node:contextmenu",function(i){var l=i.data,c=i.position,b=c.domOverlayPosition,_=b.x,E=b.y,w=l.id,k=p.lf.graphModel.getNodeModelById(w),j=[],P=p.menuTypeMap.get(k.type);k&&k.menu&&Array.isArray(k.menu)?j=k.menu:P?j=P:j=p.menuTypeMap.get(Pi),p.__currentData=l,p.showMenu(_,E,j)}),this.lf.on("edge:contextmenu",function(i){var l=i.data,c=i.position,b=c.domOverlayPosition,_=b.x,E=b.y,w=l.id,k=p.lf.graphModel.getEdgeModelById(w),j=[],P=p.menuTypeMap.get(k.type);k&&k.menu&&Array.isArray(k.menu)?j=k.menu:P?j=P:j=p.menuTypeMap.get(ki),p.__currentData=l,p.showMenu(_,E,j)}),this.lf.on("blank:contextmenu",function(i){var l=i.position,c=p.menuTypeMap.get(Ti),b=l.domOverlayPosition,_=b.x,E=b.y;p.showMenu(_,E,c)}),this.lf.on("selection:contextmenu",function(i){var l=i.data,c=i.position,b=p.menuTypeMap.get(Sg),_=c.domOverlayPosition,E=_.x,w=_.y;p.__currentData=l,p.showMenu(E,w,b)}),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 y;(y=this===null||this===void 0?void 0:this.__container)===null||y===void 0||y.removeChild(this.__menuDOM),this.__menuDOM=null},v.prototype.showMenu=function(y,s,p){if(!(!p||!p.length)){var i=this.__menuDOM;i.innerHTML="",i.append.apply(i,ew(this.__getMenuDom(p))),i.children.length&&(i.style.display="block",i.style.top=s+"px",i.style.left=y+"px")}},v.prototype.setMenuByType=function(y){!y.type||!y.menu||this.menuTypeMap.set(y.type,y.menu)},v.prototype.__getMenuDom=function(y){var s=[];return y&&y.length>0&&y.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 l=document.createElement("span");l.className="lf-menu-item-icon",i.appendChild(l)}var c=document.createElement("span");c.className="lf-menu-item-text",p.text&&(c.innerText=p.text),i.appendChild(c),i.onclickCallback=p.callback,s.push(i)}),s},v.prototype.setMenuConfig=function(y){y&&(y.nodeMenu!==void 0&&this.menuTypeMap.set(Pi,y.nodeMenu?y.nodeMenu:[]),y.edgeMenu!==void 0&&this.menuTypeMap.set(ki,y.edgeMenu?y.edgeMenu:[]),y.graphMenu!==void 0&&this.menuTypeMap.set(Ti,y.graphMenu?y.graphMenu:[]))},v.prototype.addMenuConfig=function(y){if(y){if(Array.isArray(y.nodeMenu)){var s=this.menuTypeMap.get(Pi);this.menuTypeMap.set(Pi,s.concat(y.nodeMenu))}if(Array.isArray(y.edgeMenu)){var s=this.menuTypeMap.get(ki);this.menuTypeMap.set(ki,s.concat(y.edgeMenu))}if(Array.isArray(y.graphMenu)){var s=this.menuTypeMap.get(Ti);this.menuTypeMap.set(Ti,s.concat(y.graphMenu))}}},v.prototype.changeMenuItem=function(y,s){if(y==="add")this.addMenuConfig(s);else if(y==="reset")this.setMenuConfig(s);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},v.pluginName="menu",v}();globalThis&&globalThis.__read;globalThis&&globalThis.__values;function nw(v){if(v.length<=1)return!1;for(var y=0,s=v.length-1;y!==s&&y+1!==s&&s-1!==y;)y++,s--;return y===s?[--y,s]:[y,s]}var Jg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Xo=globalThis&&globalThis.__assign||function(){return Xo=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Xo.apply(this,arguments)},Sr=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};(function(v){Jg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.pointFilter=function(s){for(var p=s,i=1;i<p.length-1;){var l=Sr(p[i-1],2),c=l[0],b=l[1],_=Sr(p[i],2),E=_[0],w=_[1],k=Sr(p[i+1],2),j=k[0],P=k[1];c===E&&E===j||b===w&&w===P?p.splice(i,1):i++}return p},y.prototype.getEdge=function(){var s=this.props.model,p=s.points,i=s.isAnimation,l=s.arrowConfig,c=s.radius,b=c===void 0?5:c,_=s.getEdgeStyle(),E=s.getEdgeAnimationStyle(),w=this.pointFilter(p.split(" ").map(function(ke){return ke.split(",").map(function(Re){return Number(Re)})})),k=nw(w);if(k){var j=Sr(k,2),P=j[0],D=j[1],N=w[P],L=w[D],B=N.some(function(ke,Re){return ke===L[Re]});if(!B){var X=(L[1]-N[1])/2,ee=[L[0],L[1]-X],ie=[N[0],N[1]+X];w.splice(P+1,0,ie,ee)}}for(var Z=Sr(w[0],2),V=Z[0],K=Z[1],z="M"+V+" "+K,M=1;M<w.length-1;M++){var I=Sr(w[M-1],2),R=I[0],F=I[1],J=Sr(w[M],2),le=J[0],ce=J[1],ye=Sr(w[M+1],2),xe=ye[0],ge=ye[1];if(le===R&&ce!==F){var ue=ce>F?ce-b:ce+b;z=z+" L "+le+" "+ue}if(ce===F&&le!==R){var he=le>R?le-b:le+b;z=z+" L "+he+" "+ce}if(z=z+" Q "+le+" "+ce,le===xe&&ce!==ge){var ue=ce>ge?ce-b:ce+b;z=z+" "+le+" "+ue}if(ce===ge&&le!==xe){var he=le>xe?le-b:le+b;z=z+" "+he+" "+ce}}var be=Sr(w[w.length-1],2),Se=be[0],Ie=be[1];z=z+" L "+Se+" "+Ie;var We=Xo(Xo(Xo({d:z,style:i?E:{}},_),l),{fill:"none"});return qe.h("path",Xo({d:z},We))},y})(qe.PolylineEdge);(function(v){Jg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y})(qe.PolylineEdgeModel);var gf,Yt,Qg,uo,jg,ev,ff,tv={},nv=[],rw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Yr(v,y){for(var s in y)v[s]=y[s];return v}function rv(v){var y=v.parentNode;y&&y.removeChild(v)}function Di(v,y,s){var p,i,l,c={};for(l in y)l=="key"?p=y[l]:l=="ref"?i=y[l]:c[l]=y[l];if(arguments.length>2&&(c.children=arguments.length>3?gf.call(arguments,2):s),typeof v=="function"&&v.defaultProps!=null)for(l in v.defaultProps)c[l]===void 0&&(c[l]=v.defaultProps[l]);return Su(v,c,p,i,null)}function Su(v,y,s,p,i){var l={type:v,props:y,key:s,ref:p,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Qg};return i==null&&Yt.vnode!=null&&Yt.vnode(l),l}function vf(v){return v.children}function Uo(v,y){this.props=v,this.context=y}function Ci(v,y){if(y==null)return v.__?Ci(v.__,v.__.__k.indexOf(v)+1):null;for(var s;y<v.__k.length;y++)if((s=v.__k[y])!=null&&s.__e!=null)return s.__e;return typeof v.type=="function"?Ci(v):null}function ov(v){var y,s;if((v=v.__)!=null&&v.__c!=null){for(v.__e=v.__c.base=null,y=0;y<v.__k.length;y++)if((s=v.__k[y])!=null&&s.__e!=null){v.__e=v.__c.base=s.__e;break}return ov(v)}}function Pg(v){(!v.__d&&(v.__d=!0)&&uo.push(v)&&!Mu.__r++||jg!==Yt.debounceRendering)&&((jg=Yt.debounceRendering)||ev)(Mu)}function Mu(){var v,y,s,p,i,l,c,b;for(uo.sort(ff);v=uo.shift();)v.__d&&(y=uo.length,p=void 0,i=void 0,c=(l=(s=v).__v).__e,(b=s.__P)&&(p=[],(i=Yr({},l)).__v=l.__v+1,cv(b,l,i,s.__n,b.ownerSVGElement!==void 0,l.__h!=null?[c]:null,p,c??Ci(l),l.__h),iw(p,l),l.__e!=c&&ov(l)),uo.length>y&&uo.sort(ff));Mu.__r=0}function iv(v,y,s,p,i,l,c,b,_,E){var w,k,j,P,D,N,L,B=p&&p.__k||nv,X=B.length;for(s.__k=[],w=0;w<y.length;w++)if((P=s.__k[w]=(P=y[w])==null||typeof P=="boolean"||typeof P=="function"?null:typeof P=="string"||typeof P=="number"||typeof P=="bigint"?Su(null,P,null,null,P):Array.isArray(P)?Su(vf,{children:P},null,null,null):P.__b>0?Su(P.type,P.props,P.key,P.ref?P.ref:null,P.__v):P)!=null){if(P.__=s,P.__b=s.__b+1,(j=B[w])===null||j&&P.key==j.key&&P.type===j.type)B[w]=void 0;else for(k=0;k<X;k++){if((j=B[k])&&P.key==j.key&&P.type===j.type){B[k]=void 0;break}j=null}cv(v,P,j=j||tv,i,l,c,b,_,E),D=P.__e,(k=P.ref)&&j.ref!=k&&(L||(L=[]),j.ref&&L.push(j.ref,null,P),L.push(k,P.__c||D,P)),D!=null?(N==null&&(N=D),typeof P.type=="function"&&P.__k===j.__k?P.__d=_=av(P,_,v):_=uv(v,P,j,B,D,_),typeof s.type=="function"&&(s.__d=_)):_&&j.__e==_&&_.parentNode!=v&&(_=Ci(j))}for(s.__e=N,w=X;w--;)B[w]!=null&&(typeof s.type=="function"&&B[w].__e!=null&&B[w].__e==s.__d&&(s.__d=sv(p).nextSibling),fv(B[w],B[w]));if(L)for(w=0;w<L.length;w++)lv(L[w],L[++w],L[++w])}function av(v,y,s){for(var p,i=v.__k,l=0;i&&l<i.length;l++)(p=i[l])&&(p.__=v,y=typeof p.type=="function"?av(p,y,s):uv(s,p,p,i,p.__e,y));return y}function uv(v,y,s,p,i,l){var c,b,_;if(y.__d!==void 0)c=y.__d,y.__d=void 0;else if(s==null||i!=l||i.parentNode==null)e:if(l==null||l.parentNode!==v)v.appendChild(i),c=null;else{for(b=l,_=0;(b=b.nextSibling)&&_<p.length;_+=1)if(b==i)break e;v.insertBefore(i,l),c=l}return c!==void 0?c:i.nextSibling}function sv(v){var y,s,p;if(v.type==null||typeof v.type=="string")return v.__e;if(v.__k){for(y=v.__k.length-1;y>=0;y--)if((s=v.__k[y])&&(p=sv(s)))return p}return null}function ow(v,y,s,p,i){var l;for(l in s)l==="children"||l==="key"||l in y||Du(v,l,null,s[l],p);for(l in y)i&&typeof y[l]!="function"||l==="children"||l==="key"||l==="value"||l==="checked"||s[l]===y[l]||Du(v,l,y[l],s[l],p)}function kg(v,y,s){y[0]==="-"?v.setProperty(y,s??""):v[y]=s==null?"":typeof s!="number"||rw.test(y)?s:s+"px"}function Du(v,y,s,p,i){var l;e:if(y==="style")if(typeof s=="string")v.style.cssText=s;else{if(typeof p=="string"&&(v.style.cssText=p=""),p)for(y in p)s&&y in s||kg(v.style,y,"");if(s)for(y in s)p&&s[y]===p[y]||kg(v.style,y,s[y])}else if(y[0]==="o"&&y[1]==="n")l=y!==(y=y.replace(/Capture$/,"")),y=y.toLowerCase()in v?y.toLowerCase().slice(2):y.slice(2),v.l||(v.l={}),v.l[y+l]=s,s?p||v.addEventListener(y,l?Ag:Tg,l):v.removeEventListener(y,l?Ag:Tg,l);else if(y!=="dangerouslySetInnerHTML"){if(i)y=y.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(y!=="width"&&y!=="height"&&y!=="href"&&y!=="list"&&y!=="form"&&y!=="tabIndex"&&y!=="download"&&y in v)try{v[y]=s??"";break e}catch{}typeof s=="function"||(s==null||s===!1&&y[4]!=="-"?v.removeAttribute(y):v.setAttribute(y,s))}}function Tg(v){return this.l[v.type+!1](Yt.event?Yt.event(v):v)}function Ag(v){return this.l[v.type+!0](Yt.event?Yt.event(v):v)}function cv(v,y,s,p,i,l,c,b,_){var E,w,k,j,P,D,N,L,B,X,ee,ie,Z,V,K,z=y.type;if(y.constructor!==void 0)return null;s.__h!=null&&(_=s.__h,b=y.__e=s.__e,y.__h=null,l=[b]),(E=Yt.__b)&&E(y);try{e:if(typeof z=="function"){if(L=y.props,B=(E=z.contextType)&&p[E.__c],X=E?B?B.props.value:E.__:p,s.__c?N=(w=y.__c=s.__c).__=w.__E:("prototype"in z&&z.prototype.render?y.__c=w=new z(L,X):(y.__c=w=new Uo(L,X),w.constructor=z,w.render=uw),B&&B.sub(w),w.props=L,w.state||(w.state={}),w.context=X,w.__n=p,k=w.__d=!0,w.__h=[],w._sb=[]),w.__s==null&&(w.__s=w.state),z.getDerivedStateFromProps!=null&&(w.__s==w.state&&(w.__s=Yr({},w.__s)),Yr(w.__s,z.getDerivedStateFromProps(L,w.__s))),j=w.props,P=w.state,w.__v=y,k)z.getDerivedStateFromProps==null&&w.componentWillMount!=null&&w.componentWillMount(),w.componentDidMount!=null&&w.__h.push(w.componentDidMount);else{if(z.getDerivedStateFromProps==null&&L!==j&&w.componentWillReceiveProps!=null&&w.componentWillReceiveProps(L,X),!w.__e&&w.shouldComponentUpdate!=null&&w.shouldComponentUpdate(L,w.__s,X)===!1||y.__v===s.__v){for(y.__v!==s.__v&&(w.props=L,w.state=w.__s,w.__d=!1),w.__e=!1,y.__e=s.__e,y.__k=s.__k,y.__k.forEach(function(M){M&&(M.__=y)}),ee=0;ee<w._sb.length;ee++)w.__h.push(w._sb[ee]);w._sb=[],w.__h.length&&c.push(w);break e}w.componentWillUpdate!=null&&w.componentWillUpdate(L,w.__s,X),w.componentDidUpdate!=null&&w.__h.push(function(){w.componentDidUpdate(j,P,D)})}if(w.context=X,w.props=L,w.__P=v,ie=Yt.__r,Z=0,"prototype"in z&&z.prototype.render){for(w.state=w.__s,w.__d=!1,ie&&ie(y),E=w.render(w.props,w.state,w.context),V=0;V<w._sb.length;V++)w.__h.push(w._sb[V]);w._sb=[]}else do w.__d=!1,ie&&ie(y),E=w.render(w.props,w.state,w.context),w.state=w.__s;while(w.__d&&++Z<25);w.state=w.__s,w.getChildContext!=null&&(p=Yr(Yr({},p),w.getChildContext())),k||w.getSnapshotBeforeUpdate==null||(D=w.getSnapshotBeforeUpdate(j,P)),K=E!=null&&E.type===vf&&E.key==null?E.props.children:E,iv(v,Array.isArray(K)?K:[K],y,s,p,i,l,c,b,_),w.base=y.__e,y.__h=null,w.__h.length&&c.push(w),N&&(w.__E=w.__=null),w.__e=!1}else l==null&&y.__v===s.__v?(y.__k=s.__k,y.__e=s.__e):y.__e=aw(s.__e,y,s,p,i,l,c,_);(E=Yt.diffed)&&E(y)}catch(M){y.__v=null,(_||l!=null)&&(y.__e=b,y.__h=!!_,l[l.indexOf(b)]=null),Yt.__e(M,y,s)}}function iw(v,y){Yt.__c&&Yt.__c(y,v),v.some(function(s){try{v=s.__h,s.__h=[],v.some(function(p){p.call(s)})}catch(p){Yt.__e(p,s.__v)}})}function aw(v,y,s,p,i,l,c,b){var _,E,w,k=s.props,j=y.props,P=y.type,D=0;if(P==="svg"&&(i=!0),l!=null){for(;D<l.length;D++)if((_=l[D])&&"setAttribute"in _==!!P&&(P?_.localName===P:_.nodeType===3)){v=_,l[D]=null;break}}if(v==null){if(P===null)return document.createTextNode(j);v=i?document.createElementNS("http://www.w3.org/2000/svg",P):document.createElement(P,j.is&&j),l=null,b=!1}if(P===null)k===j||b&&v.data===j||(v.data=j);else{if(l=l&&gf.call(v.childNodes),E=(k=s.props||tv).dangerouslySetInnerHTML,w=j.dangerouslySetInnerHTML,!b){if(l!=null)for(k={},D=0;D<v.attributes.length;D++)k[v.attributes[D].name]=v.attributes[D].value;(w||E)&&(w&&(E&&w.__html==E.__html||w.__html===v.innerHTML)||(v.innerHTML=w&&w.__html||""))}if(ow(v,j,k,i,b),w)y.__k=[];else if(D=y.props.children,iv(v,Array.isArray(D)?D:[D],y,s,p,i&&P!=="foreignObject",l,c,l?l[0]:s.__k&&Ci(s,0),b),l!=null)for(D=l.length;D--;)l[D]!=null&&rv(l[D]);b||("value"in j&&(D=j.value)!==void 0&&(D!==v.value||P==="progress"&&!D||P==="option"&&D!==k.value)&&Du(v,"value",D,k.value,!1),"checked"in j&&(D=j.checked)!==void 0&&D!==v.checked&&Du(v,"checked",D,k.checked,!1))}return v}function lv(v,y,s){try{typeof v=="function"?v(y):v.current=y}catch(p){Yt.__e(p,s)}}function fv(v,y,s){var p,i;if(Yt.unmount&&Yt.unmount(v),(p=v.ref)&&(p.current&&p.current!==v.__e||lv(p,null,y)),(p=v.__c)!=null){if(p.componentWillUnmount)try{p.componentWillUnmount()}catch(l){Yt.__e(l,y)}p.base=p.__P=null,v.__c=void 0}if(p=v.__k)for(i=0;i<p.length;i++)p[i]&&fv(p[i],y,s||typeof v.type!="function");s||v.__e==null||rv(v.__e),v.__=v.__e=v.__d=void 0}function uw(v,y,s){return this.constructor(v,s)}gf=nv.slice,Yt={__e:function(v,y,s,p){for(var i,l,c;y=y.__;)if((i=y.__c)&&!i.__)try{if((l=i.constructor)&&l.getDerivedStateFromError!=null&&(i.setState(l.getDerivedStateFromError(v)),c=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(v,p||{}),c=i.__d),c)return i.__E=i}catch(b){v=b}throw v}},Qg=0,Uo.prototype.setState=function(v,y){var s;s=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Yr({},this.state),typeof v=="function"&&(v=v(Yr({},s),this.props)),v&&Yr(s,v),v!=null&&this.__v&&(y&&this._sb.push(y),Pg(this))},Uo.prototype.forceUpdate=function(v){this.__v&&(this.__e=!0,v&&this.__h.push(v),Pg(this))},Uo.prototype.render=vf,uo=[],ev=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ff=function(v,y){return v.__v.__b-y.__v.__b},Mu.__r=0;var Ni=globalThis&&globalThis.__assign||function(){return Ni=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Ni.apply(this,arguments)};function bf(v){var y=v.x,s=v.y,p=v.width,i=v.height,l=v.radius,c=v.className,b=y-p/2,_=s-i/2,E=Ni(Ni({width:10,height:10,cx:0,cy:0,rx:l||0,ry:l||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+c},v),{x:b,y:_});return qe.h("rect",Ni({},E))}bf.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Go;(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"})(Go||(Go={}));function ju(v){var y=v.x,s=v.y,p=v.width,i=v.height;return{minX:y-p/2,minY:s-i/2,maxX:y+p/2,maxY:s+i/2}}function Mg(v){var y=ju(v),s=v.radius,p=y.minX,i=y.minY,l=y.maxX,c=y.maxY;return[{x:p+s,y:i+s},{x:l-s,y:i+s},{x:l-s,y:c-s},{x:p+s,y:c-s}]}function Dg(v){var y=v.point,s=v.beforeNode,p=v.afterNode,i=y.x,l=y.y,c={x:i,y:l},b=s.radius,_=ju(s),E=ju(p);if(i===_.minX){c.x=E.minX;var w=(l-s.y)/(s.height/2-b);w?c.y=p.y+(p.height/2-b)*w:c.y=p.y}else if(i===_.maxX){c.x=E.maxX;var w=(l-s.y)/(s.height/2-b);w?c.y=p.y+(p.height/2-b)*w:c.y=p.y}else if(l===_.minY){c.y=E.minY;var w=(i-s.x)/(s.width/2-b);w?c.x=p.x+(p.width/2-b)*w:c.x=p.x}else if(l===_.maxY){c.y=E.maxY;var w=(i-s.x)/(s.width/2-b);w?c.x=p.x+(p.width/2-b)*w:c.x=p.x}else{var k=Mg(s),j=Mg(p),P=ju(s),D=P.minX,N=P.minY,L=P.maxX,B=P.maxY,X=-1;if(i-D<b&&l-N<b?X=0:L-i<b&&l-N<b?X=1:L-i<b&&B-l<b?X=2:i-D<b&&N-l<b&&(X=3),X>-1){var ee=Math.atan2(l-k[X].y,i-k[X].x);c.x=j[X].x+b*Math.cos(ee),c.y=j[X].y+b*Math.sin(ee)}}return c}function Ng(v){var y=v.point,s=v.beforeNode,p=v.afterNode,i=p.rx,l=p.ry,c=y,b=(y.y-s.y)/(y.x-s.x),_=i,E=l,w,k;return b>=1/0?(w=0,k=E):b<=-1/0?(w=0,k=-E):y.x-s.x>0?(w=_*E/Math.sqrt(E*E+_*_*b*b),k=_*E*b/Math.sqrt(E*E+_*_*b*b)):(w=-(_*E)/Math.sqrt(E*E+_*_*b*b),k=-(_*E*b)/Math.sqrt(E*E+_*_*b*b)),c={x:w+p.x,y:k+p.y},c}function Cg(v){var y=v.point,s=v.beforeNode,p=v.afterNode,i=y,l,c,b=y.x-s.x,_=y.y-s.y,E=s.rx,w=s.ry,k=Math.sqrt((E-Math.abs(b))*(E-Math.abs(b))+_*_)/Math.sqrt(E*E+w*w),j=p.rx,P=p.ry,D=Math.sqrt((j*j+P*P)*k*k*(j*j/(j*j+P*P))),N=D*(P/j);return b>=0?l=j-D:l=D-j,_>0?c=N:c=-N,i={x:l+p.x,y:c+p.y},i}var sw=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),so=globalThis&&globalThis.__assign||function(){return so=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},so.apply(this,arguments)},cw=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},lw=qe.LogicFlowUtil.StepDrag,fw=function(v){sw(y,v);function y(s){var p=v.call(this)||this;return p.updatePosition=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.x,E=b.y;p.nodeModel.x=_+l/2,p.nodeModel.y=E+c/2,p.nodeModel.moveText(l/2,c/2)},p.getResize=function(i){var l=i.index,c=i.deltaX,b=i.deltaY,_=i.width,E=i.height,w=i.PCTResizeInfo,k=i.pct,j=k===void 0?1:k,P={width:_,height:E,deltaX:c,deltaY:b};if(w){var D=4,N=0,L=0;switch(l){case 0:L=(c*-1-b)/D;break;case 1:L=(c-b)/D;break;case 2:L=(c+b)/D;break;case 3:L=(c*-1+b)/D;break}L!==0&&(N=Math.round(L/w.ResizeBasis.basisHeight*1e5)/1e3),w.ResizePCT.widthPCT=Math.max(Math.min(w.ResizePCT.widthPCT+N,w.ScaleLimit.maxScaleLimit),w.ScaleLimit.minScaleLimit),w.ResizePCT.hightPCT=Math.max(Math.min(w.ResizePCT.hightPCT+N,w.ScaleLimit.maxScaleLimit),w.ScaleLimit.minScaleLimit);var B=Math.round(w.ResizePCT.widthPCT*w.ResizeBasis.basisWidth/100),X=Math.round(w.ResizePCT.hightPCT*w.ResizeBasis.basisHeight/100);switch(l){case 0:c=_-B,b=E-X;break;case 1:c=B-_,b=E-X;break;case 2:c=B-_,b=X-E;break;case 3:c=_-B,b=X-E;break}return P.width=B,P.height=X,P.deltaX=c/j,P.deltaY=b/j,P}switch(l){case 0:P.width=_-c*j,P.height=E-b*j;break;case 1:P.width=_+c*j,P.height=E-b*j;break;case 2:P.width=_+c*j,P.height=E+b*j;break;case 3:P.width=_-c*j,P.height=E+b*j;break}return P},p.updateRect=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.id,E=b.x,w=b.y,k=b.width,j=b.height,P=b.radius,D=b.PCTResizeInfo,N=p.index,L=p.getResize({index:N,deltaX:l,deltaY:c,width:k,height:j,PCTResizeInfo:D,pct:1}),B=p.nodeModel,X=B.minWidth,ee=B.minHeight,ie=B.maxWidth,Z=B.maxHeight;if(L.width<X||L.width>ie||L.height<ee||L.height>Z){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:L.deltaX,deltaY:L.deltaY}),p.nodeModel.width=L.width,p.nodeModel.height=L.height,p.nodeModel.setProperties({nodeSize:{width:L.width,height:L.height}});var V=p.getNodeEdges(_),K={x:E,y:w,width:k,height:j,radius:P},z={x:p.nodeModel.x,y:p.nodeModel.y,width:p.nodeModel.width,height:p.nodeModel.height,radius:P},M={point:"",beforeNode:K,afterNode:z},I;V.sourceEdges.forEach(function(R){M.point=R.startPoint,I=Dg(M),R.updateStartPoint(I)}),V.targetEdges.forEach(function(R){M.point=R.endPoint,I=Dg(M),R.updateEndPoint(I)}),p.eventEmit({beforeNode:K,afterNode:z})},p.updateEllipse=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.id,E=b.rx,w=b.ry,k=b.x,j=b.y,P=b.PCTResizeInfo,D=p.index,N=E,L=w,B=p.getResize({index:D,deltaX:l,deltaY:c,width:N,height:L,PCTResizeInfo:P,pct:1/2}),X=p.nodeModel,ee=X.minWidth,ie=X.minHeight,Z=X.maxWidth,V=X.maxHeight;if(B.width<ee/2||B.width>Z/2||B.height<ie/2||B.height>V/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),p.nodeModel.rx=B.width,p.nodeModel.ry=B.height,p.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var K=p.getNodeEdges(_),z={x:k,y:j},M={rx:B.width,ry:B.height,x:p.nodeModel.x,y:p.nodeModel.y},I={point:{},beforeNode:z,afterNode:M},R;K.sourceEdges.forEach(function(F){I.point=F.startPoint,R=Ng(I),F.updateStartPoint(R)}),K.targetEdges.forEach(function(F){I.point=F.endPoint,R=Ng(I),F.updateEndPoint(R)}),p.eventEmit({beforeNode:so(so({},z),{rx:E,ry:w}),afterNode:M})},p.updateDiamond=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.id,E=b.rx,w=b.ry,k=b.x,j=b.y,P=b.PCTResizeInfo,D=p.index,N=E,L=w,B=p.getResize({index:D,deltaX:l,deltaY:c,width:N,height:L,PCTResizeInfo:P,pct:1/2}),X=p.nodeModel,ee=X.minWidth,ie=X.minHeight,Z=X.maxWidth,V=X.maxHeight;if(B.width<ee/2||B.width>Z/2||B.height<ie/2||B.height>V/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),p.nodeModel.rx=B.width,p.nodeModel.ry=B.height,p.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var K={x:k,y:j,rx:E,ry:w},z={rx:B.width,ry:B.height,x:p.nodeModel.x,y:p.nodeModel.y},M={point:{},beforeNode:K,afterNode:z},I,R=p.getNodeEdges(_);R.sourceEdges.forEach(function(F){M.point=F.startPoint,I=Cg(M),F.updateStartPoint(I)}),R.targetEdges.forEach(function(F){M.point=F.endPoint,I=Cg(M),F.updateEndPoint(I)}),p.eventEmit({beforeNode:K,afterNode:z})},p.eventEmit=function(i){var l=i.beforeNode,c=i.afterNode,b=p.nodeModel,_=b.id,E=b.modelType,w=b.type,k=so({id:_,modelType:E,type:w},l),j=so({id:_,modelType:E,type:w},c);p.graphModel.eventCenter.emit("node:resize",{oldNodeSize:k,newNodeSize:j})},p.onDragging=function(i){var l,c=i.deltaX,b=i.deltaY,_=p.graphModel.transformModel,E=p.nodeModel.modelType;l=cw(_.fixDeltaXY(c,b),2),c=l[0],b=l[1],E===Go.RECT_NODE||E===Go.HTML_NODE?p.updateRect({deltaX:c,deltaY:b}):E===Go.ELLIPSE_NODE?p.updateEllipse({deltaX:c,deltaY:b}):E===Go.DIAMOND_NODE&&p.updateDiamond({deltaX:c,deltaY:b})},p.onDragEnd=function(){var i=p.graphModel.gridSize,l=i===void 0?1:i,c=l*Math.round(p.nodeModel.x/l),b=l*Math.round(p.nodeModel.y/l);p.nodeModel.moveTo(c,b)},p.index=s.index,p.nodeModel=s.model,p.graphModel=s.graphModel,p.state={},p.dragHandler=new lw({onDragging:p.onDragging,onDragEnd:p.onDragEnd,step:1}),p}return y.prototype.getNodeEdges=function(s){for(var p=this.graphModel,i=p.edges,l=[],c=[],b=0;b<i.length;b++){var _=i[b];_.sourceNodeId===s?l.push(_):i[b].targetNodeId===s&&c.push(_)}return{sourceEdges:l,targetEdges:c}},y.prototype.render=function(){var s=this.props,p=s.x,i=s.y,l=s.index,c=s.model,b=c.getControlPointStyle();return Di("g",{className:"lf-resize-control-"+l},Di(bf,so({className:"lf-node-control"},{x:p,y:i},b,{onMouseDown:this.dragHandler.handleMouseDown})))},y}(Uo),pw=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Nu=globalThis&&globalThis.__assign||function(){return Nu=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Nu.apply(this,arguments)},Lu=function(v){pw(y,v);function y(){var s=v.call(this)||this;return s.state={},s}return y.prototype.getResizeControl=function(){var s=this.props,p=s.model,i=s.graphModel,l=p.x,c=p.y,b=p.width,_=p.height,E={minX:l-b/2,minY:c-_/2,maxX:l+b/2,maxY:c+_/2},w=E.minX,k=E.minY,j=E.maxX,P=E.maxY,D=[{x:w,y:k},{x:j,y:k},{x:j,y:P},{x:w,y:P}];return D.map(function(N,L){return Di(fw,Nu({index:L},N,{model:p,graphModel:i}))})},y.prototype.getGroupSolid=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.getResizeOutlineStyle();return Di(bf,Nu({fill:"none"},b,{x:p,y:i,width:l,height:c}))},y.prototype.render=function(){return Di("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},y}(Uo),pv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),dw=function(v){pv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.resize=function(s,p){console.log(s,p)},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y}(qe.RectNodeModel),hw=function(v){pv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return qe.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p&&!i?this.getControlGroup():"")},y}(qe.RectNode),dv={type:"rect",view:hw,model:dw},hv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}();(function(v){hv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(qe.EllipseNodeModel);(function(v){hv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return qe.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model,i=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p.isSelected&&!i?this.getControlGroup():"")},y})(qe.EllipseNode);var pf=globalThis&&globalThis.__assign||function(){return pf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},pf.apply(this,arguments)};function yw(v){var y=v.fillOpacity,s=y===void 0?1:y,p=v.strokeWidth,i=p===void 0?1:p,l=v.strokeOpacity,c=l===void 0?1:l,b=v.fill,_=b===void 0?"transparent":b,E=v.stroke,w=E===void 0?"#000":E,k=v.points,j=v.className,P=j===void 0?"lf-basic-shape":j,D={fill:_,fillOpacity:s,strokeWidth:i,stroke:w,strokeOpacity:c,points:"",className:P};return D.points=k.map(function(N){return N.join(",")}).join(" "),qe.h("polygon",pf({},D))}var yv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),df=globalThis&&globalThis.__assign||function(){return df=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},df.apply(this,arguments)};(function(v){yv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(qe.DiamondNodeModel);(function(v){yv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return qe.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){var s=this.props.model,p=s.points,i=s.getNodeStyle();return qe.h("g",null,qe.h(yw,df({},i,{points:p})))},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p&&!i?this.getControlGroup():"")},y})(qe.DiamondNode);var gv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}();(function(v){gv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(qe.HtmlNodeModel);(function(v){gv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return qe.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p&&!i?this.getControlGroup():"")},y})(qe.HtmlNode);var vv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Cu=globalThis&&globalThis.__assign||function(){return Cu=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Cu.apply(this,arguments)},gw=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},vw=globalThis&&globalThis.__spread||function(){for(var v=[],y=0;y<arguments.length;y++)v=v.concat(gw(arguments[y]));return v},Rg=500,Ig=300,bw=-1e4;(function(v){vv(y,v);function y(){var s=v!==null&&v.apply(this,arguments)||this;return s.isGroup=!0,s.unfoldedWidth=Rg,s.unfoldedHight=Ig,s}return y.prototype.initNodeData=function(s){var p=this;v.prototype.initNodeData.call(this,s);var i=[];Array.isArray(s.children)&&(i=s.children),this.children=new Set(i),this.width=Rg,this.height=Ig,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=bw,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)})},y.prototype.getResizeOutlineStyle=function(){var s=v.prototype.getResizeOutlineStyle.call(this);return s.stroke="none",s},y.prototype.foldGroup=function(s){var p=this;this.setProperty("isFolded",s),this.isFolded=s,s?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(l){var c=p.graphModel.getElement(l);c.isGroup&&!c.isFolded&&c.foldGroup(s),c.visible=!s,i=i.concat(c.incoming.edges.concat(c.outgoing.edges))}),this.foldEdge(s,i)},y.prototype.getAnchorStyle=function(s){var p=v.prototype.getAnchorStyle.call(this,s);return p.stroke="transparent",p.fill="transparent",p.hover.fill="transparent",p.hover.stroke="transparent",p},y.prototype.foldEdge=function(s,p){var i=this;p.forEach(function(l,c){var b=l.id,_=l.sourceNodeId,E=l.targetNodeId,w=l.startPoint,k=l.endPoint,j=l.type,P=l.text,D=l.getProperties(),N={id:b+"__"+c,sourceNodeId:_,targetNodeId:E,startPoint:w,endPoint:k,type:j,properties:D,text:P==null?void 0:P.value};l.virtual&&i.graphModel.deleteEdgeById(l.id);var L=i.graphModel.group.getNodeGroup(E);L||(L=i.graphModel.getNodeModelById(E));var B=i.graphModel.group.getNodeGroup(_);B||(B=i.graphModel.getNodeModelById(_)),s&&l.visible!==!1&&(i.children.has(_)||i.id===_?(N.startPoint=void 0,N.sourceNodeId=i.id):(N.endPoint=void 0,N.targetNodeId=i.id),(L.id!==i.id||B.id!==i.id)&&i.createVirtualEdge(N),l.visible=!1),!s&&l.visible===!1&&(L&&L.isGroup&&L.isFolded?(N.targetNodeId=L.id,N.endPoint=void 0,i.createVirtualEdge(N)):B&&B.isGroup&&B.isFolded?(N.sourceNodeId=B.id,N.startPoint=void 0,i.createVirtualEdge(N)):l.visible=!0)})},y.prototype.createVirtualEdge=function(s){s.pointsList=void 0;var p=this.graphModel.addEdge(s);p.virtual=!0,p.text.editable=!1,p.isFoldedEdge=!0},y.prototype.isInRange=function(s){var p=s.x1,i=s.y1,l=s.x2,c=s.y2;return p>=this.x-this.width/2&&l<=this.x+this.width/2&&i>=this.y-this.height/2&&c<=this.y+this.height/2},y.prototype.isAllowMoveTo=function(s){var p=s.x1,i=s.y1,l=s.x2,c=s.y2;return{x:p>=this.x-this.width/2&&l<=this.x+this.width/2,y:i>=this.y-this.height/2&&c<=this.y+this.height/2}},y.prototype.setAllowAppendChild=function(s){this.setProperty("groupAddable",s)},y.prototype.addChild=function(s){this.children.add(s)},y.prototype.removeChild=function(s){this.children.delete(s)},y.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},y.prototype.getData=function(){var s=this,p=v.prototype.getData.call(this);p.children=[],this.children.forEach(function(l){var c=s.graphModel.getNodeModelById(l);c&&!c.virtual&&p.children.push(l)});var i=p.properties;return delete i.groupAddable,delete i.isFolded,p},y.prototype.getHistoryData=function(){var s=v.prototype.getData.call(this);s.children=vw(this.children),s.isGroup=!0;var p=s.properties;return delete p.groupAddable,p.isFolded&&(s.x=s.x+this.unfoldedWidth/2-this.foldedWidth/2,s.y=s.y+this.unfoldedHight/2-this.foldedHeight/2),s},y.prototype.isAllowAppendIn=function(s){return!0},y.prototype.toBack=function(){this.zIndex--},y})(dv.model);(function(v){vv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props.model,p=s.resizable,i=s.properties;return p&&!i.isFolded?v.prototype.getControlGroup.call(this):null},y.prototype.getAddableShape=function(){var s=this.props.model,p=s.width,i=s.height,l=s.x,c=s.y,b=s.radius,_=s.properties;if(!_.groupAddable)return null;var E=this.props.model.getNodeStyle().strokeWidth,w=this.props.model.getAddableOutlineStyle(),k=p+E+8,j=i+E+8;return qe.h("rect",Cu(Cu({},w),{width:k,height:j,x:l-k/2,y:c-j/2,rx:b,ry:b}))},y.prototype.getFoldIcon=function(){var s=this.props.model,p=s.x-s.width/2+5,i=s.y-s.height/2+5;if(!s.foldable)return null;var l=qe.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:s.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 qe.h("g",{},[qe.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:s.x-s.width/2+5,y:s.y-s.height/2+5,onClick:function(){s.foldGroup(!s.properties.isFolded)}}),l])},y.prototype.getResizeShape=function(){return qe.h("g",{},[this.getAddableShape(),v.prototype.getResizeShape.call(this),this.getFoldIcon()])},y})(dv.view);var mw=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var Lg=globalThis&&globalThis.__assign||function(){return Lg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Lg.apply(this,arguments)},zg=globalThis&&globalThis.__assign||function(){return zg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},zg.apply(this,arguments)},_w=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;const Ow={class:"control-container"},ww=["title","onMouseenter"],xw=["disabled","onClick"],Ew=Ru({__name:"Control",props:{lf:{default:null},catTurboData:{type:Boolean}},emits:["catData"],setup(v,{emit:y}){const s=v,p=jr(),i=jr(),l=jr(-1),c=jr([{icon:"icon-zoom-out-hs",text:"缩小",size:"18",disabled:!1},{icon:"icon-enlarge-hs",text:"放大",size:"18",disabled:!1},{icon:"icon-full-screen-hs",text:"适应",size:"15",disabled:!1},{icon:"icon-previous-hs",text:"上一步",size:"15",disabled:!0},{icon:"icon-next-step-hs",text:"下一步",size:"17",disabled:!0},{icon:"icon-download-hs",text:"下载图片",size:"17",disabled:!1},{icon:"icon-watch-hs",text:"查看数据",size:"17",disabled:!1}]),b=(E,w)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((k,j)=>{const P=s.lf;w===1&&P.zoom(!0),w===6&&y("catData"),w===j&&P[k]()})},_=E=>{l.value=E};return Bg(()=>{s.lf.on("history:change",({data:{undoAble:E,redoAble:w}})=>{fn(c)[3].disabled=fn(p).disabled=!E,fn(c)[4].disabled=fn(i).disabled=!w})}),(E,w)=>{const k=Ai("el-tooltip");return ar(),co("div",Ow,[Pr("ul",null,[(ar(!0),co(Fg,null,Hg(c.value,(j,P)=>(ar(),co("li",{key:P,title:j.text,class:"dark:text-bg_color",onMouseenter:lg(D=>_(P),["prevent"]),onMouseleave:w[0]||(w[0]=lg(D=>l.value=-1,["prevent"]))},[Fo(k,{content:j.text,visible:l.value===P,placement:"right"},{default:Ho(()=>[Pr("button",{ref_for:!0,ref:"controlButton"+P,disabled:j.disabled,style:fg({cursor:j.disabled===!1?"pointer":"not-allowed",color:j.disabled===!1?"":"#00000040",background:"transparent"}),onClick:D=>b(j,P)},[Pr("span",{class:Xg("iconfont "+j.icon),style:fg({fontSize:`${j.size}px`})},null,6)],12,xw)]),_:2},1032,["content","visible"])],40,ww))),128))])])}}});const Sw=hf(Ew,[["__scopeId","data-v-44af808d"]]),jw={class:"node-panel"},Pw=["onMousedown"],kw={key:0,class:"shape"},Tw={class:"node-label"},Aw=Ru({__name:"NodePanel",props:{lf:{default:null},nodeList:{default:null}},setup(v){const y=v,s=jr({a:"efrwe",b:"wewe"}),p=i=>{y.lf.dnd.startDrag({type:i.type,properties:fn(s)})};return(i,l)=>(ar(),co("div",jw,[(ar(!0),co(Fg,null,Hg(y.nodeList,c=>(ar(),co("div",{class:"node-item dark:text-bg_color",key:c.text,onMousedown:b=>p(c)},[Pr("div",{class:Xg(["node-item-icon",c.class])},[c.type==="user"||c.type==="time"?(ar(),co("div",kw)):Gg("",!0)],2),Pr("span",Tw,u1(c.text),1)],40,Pw))),128))]))}});const Mw=hf(Aw,[["__scopeId","data-v-5c49346d"]]),Dw=Ru({__name:"DataDialog",props:{graphData:Object},setup(v){const y=v;return(s,p)=>(ar(),uf(fn(f1),{path:"res",deep:3,showLength:!0,data:y.graphData},null,8,["data"]))}}),Nw=yf(Sw),Cw=yf(Mw),Rw=yf(Dw),Iw={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function Lw(v){const{incoming:y,outgoing:s,properties:p,key:i}=v,{text:l,startPoint:c,endPoint:b,pointsList:_,logicFlowType:E}=p,w={id:i,type:E,sourceNodeId:y[0],targetNodeId:s[0],text:l,startPoint:c,endPoint:b,pointsList:_,properties:{}},k=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(v.properties).forEach(j=>{k.indexOf(j)===-1&&(w.properties[j]=v.properties[j])}),w}function zw(v){const{properties:y,key:s}=v,{x:p,y:i,text:l,logicFlowType:c}=y,b={id:s,type:c,x:p,y:i,text:l,properties:{}},_=["x","y","text","logicFlowType"];return Object.keys(v.properties).forEach(E=>{_.indexOf(E)===-1&&(b.properties[E]=v.properties[E])}),b}function Bw(v){const y={nodes:[],edges:[]},s=v.flowElementList;return s&&s.length>0&&s.forEach(p=>{if(p.type===Iw.SEQUENCE_FLOW){const i=Lw(p);y.edges.push(i)}else{const i=zw(p);y.nodes.push(i)}}),y}const Fw=v=>(s1("data-v-75717ba2"),v=v(),c1(),v),Hw={class:"card-header"},Xw={class:"font-medium"},Gw={class:"logic-flow-view"},Uw=Fw(()=>Pr("div",{id:"turbo"},null,-1)),Yw=Ru({name:"FlowChart",__name:"index",setup(v){const y=jr(null),s=jr(null),p=jr(!1),i=jr({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),l=y1;function c(){xu.use(B1),xu.use(z1),xu.use(tw);const E=new xu({...fn(i),container:document.querySelector("#turbo")});y.value=E,fn(y).setDefaultEdgeType("bpmn:sequenceFlow"),b()}function b(){const E=Bw(h1);y.value.render(E)}function _(){s.value=fn(y).getGraphData(),p.value=!0}return Bg(()=>{c()}),(E,w)=>{const k=Ai("el-link"),j=Ai("el-scrollbar"),P=Ai("el-dialog"),D=Ai("el-card");return ar(),uf(D,{shadow:"never"},{header:Ho(()=>[Pr("div",Hw,[Pr("span",Xw,[pg(" 流程图组件,采用开源的 "),Fo(k,{href:"http://logic-flow.org/",target:"_blank",icon:fn(l1)(fn(p1)),style:{margin:"0 4px 5px","font-size":"16px"}},{default:Ho(()=>[pg(" LogicFlow ")]),_:1},8,["icon"])])])]),default:Ho(()=>[Pr("div",Gw,[y.value?(ar(),uf(fn(Nw),{key:0,class:"demo-control",lf:y.value,catTurboData:!1,onCatData:_},null,8,["lf"])):Gg("",!0),Fo(fn(Cw),{lf:y.value,nodeList:fn(l)},null,8,["lf","nodeList"]),Uw,Fo(P,{class:"flow-dialog",title:"数据",modelValue:p.value,"onUpdate:modelValue":w[0]||(w[0]=N=>p.value=N),width:"50%"},{default:Ho(()=>[Fo(j,null,{default:Ho(()=>[Fo(fn(Rw),{graphData:s.value},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});const Zw=hf(Yw,[["__scopeId","data-v-75717ba2"]]);export{Zw as default};