Rodney Chen
2024-05-09 a340c8f451865656db12fa50fe9cad888f65dd5b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
var Aw=Object.defineProperty,kw=Object.defineProperties;var Mw=Object.getOwnPropertyDescriptors;var Og=Object.getOwnPropertySymbols;var Tw=Object.prototype.hasOwnProperty,Dw=Object.prototype.propertyIsEnumerable;var _g=(Qe,nr,qe)=>nr in Qe?Aw(Qe,nr,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Qe[nr]=qe,Ef=(Qe,nr)=>{for(var qe in nr||(nr={}))Tw.call(nr,qe)&&_g(Qe,qe,nr[qe]);if(Og)for(var qe of Og(nr))Dw.call(nr,qe)&&_g(Qe,qe,nr[qe]);return Qe},wg=(Qe,nr)=>kw(Qe,Mw(nr));var Li=(Qe,nr,qe)=>new Promise((Ge,Bi)=>{var Vu=Ur=>{try{Zo(qe.next(Ur))}catch(Yt){Bi(Yt)}},Yu=Ur=>{try{Zo(qe.throw(Ur))}catch(Yt){Bi(Yt)}},Zo=Ur=>Ur.done?Ge(Ur.value):Promise.resolve(Ur.value).then(Vu,Yu);Zo((qe=qe.apply(Qe,nr)).next())});import{I as Nw,_ as xg,i as Cw,ac as Rw,w as Iw,__tla as Lw}from"./index-f0df2f76.js";import{p as zw,c as Bw,d as Eg,k as Hu,s as Uw,u as vr,q as jf,b as Hw,a7 as Wo,_ as fo,$ as zi,F as jg,aa as Fw,f as Fu,a9 as Sf,E as Xw,a6 as Vw,a0 as Xu,ab as Pf,ac as Yw,a8 as Sg,e as Gw,w as Pg,o as Ww,a3 as Zw}from"./vue-1631514e.js";import{al as Jw,T as Kw,E as $w}from"./antd-057b41b1.js";import{B as Qw,u as qw,__tla as tx}from"./index-206406c4.js";import{J as ex,__tla as rx}from"./index-0280fd00.js";let Ag,nx=Promise.all([(()=>{try{return Lw}catch(Qe){}})(),(()=>{try{return tx}catch(Qe){}})(),(()=>{try{return rx}catch(Qe){}})()]).then(()=>Li(void 0,null,function*(){const Qe=Symbol("flow-chart");function nr(m){zw(Qe,m)}function qe(){return Bw(Qe)}var Ge=(m=>(m.ZOOM_IN="zoomIn",m.ZOOM_OUT="zoomOut",m.RESET_ZOOM="resetZoom",m.UNDO="undo",m.REDO="redo",m.SNAPSHOT="snapshot",m.VIEW_DATA="viewData",m))(Ge||{});const Bi=Eg({name:"FlowChartToolbar",components:{Icon:Nw,Divider:Jw,Tooltip:Kw},props:{prefixCls:String},emits:["view-data"],setup(m,{emit:y}){const c=Hu([{type:Ge.ZOOM_IN,icon:"codicon:zoom-out",tooltip:"\u7F29\u5C0F"},{type:Ge.ZOOM_OUT,icon:"codicon:zoom-in",tooltip:"\u653E\u5927"},{type:Ge.RESET_ZOOM,icon:"codicon:screen-normal",tooltip:"\u91CD\u7F6E\u6BD4\u4F8B"},{separate:!0},{type:Ge.UNDO,icon:"ion:arrow-undo-outline",tooltip:"\u540E\u9000",disabled:!0},{type:Ge.REDO,icon:"ion:arrow-redo-outline",tooltip:"\u524D\u8FDB",disabled:!0},{separate:!0},{type:Ge.SNAPSHOT,icon:"ion:download-outline",tooltip:"\u4E0B\u8F7D"},{type:Ge.VIEW_DATA,icon:"carbon:document-view",tooltip:"\u67E5\u770B\u6570\u636E"}]),{logicFlow:f}=qe();function i({data:{undoAble:s,redoAble:g}}){const b=vr(c),x=b.findIndex(A=>A.type===Ge.UNDO),w=b.findIndex(A=>A.type===Ge.REDO);x!==-1&&(vr(c)[x].disabled=!s),w!==-1&&(vr(c)[w].disabled=!g)}const l=s=>{const g=vr(f);if(g)switch(s.type){case Ge.ZOOM_IN:g.zoom();break;case Ge.ZOOM_OUT:g.zoom(!0);break;case Ge.RESET_ZOOM:g.resetZoom();break;case Ge.UNDO:g.undo();break;case Ge.REDO:g.redo();break;case Ge.SNAPSHOT:g.getSnapshot();break;case Ge.VIEW_DATA:y("view-data");break}};return Uw(()=>Li(this,null,function*(){var s;vr(f)&&(yield jf(),(s=vr(f))==null||s.on("history:change",i))})),Hw(()=>{var s;(s=vr(f))==null||s.off("history:change",i)}),{toolbarItemList:c,onControl:l}}}),Vu=["onClick"];function Yu(m,y,c,f,i,l){const s=Wo("Icon"),g=Wo("Tooltip"),b=Wo("Divider");return fo(),zi("div",{class:Xu([`${m.prefixCls}-toolbar`,"flex items-center px-2 py-1"])},[(fo(!0),zi(jg,null,Fw(m.toolbarItemList,x=>(fo(),zi(jg,{key:x.type},[Fu(g,Yw({placement:"bottom"},x.disabled?{visible:!1}:{}),{title:Sf(()=>[Xw(Vw(x.tooltip),1)]),default:Sf(()=>[x.icon?(fo(),zi("span",{key:0,class:Xu(`${m.prefixCls}-toolbar__icon`),onClick:w=>m.onControl(x)},[Fu(s,{icon:x.icon,class:Xu(x.disabled?"cursor-not-allowed disabeld":"cursor-pointer")},null,8,["icon","class"])],10,Vu)):Pf("",!0)]),_:2},1040),x.separate?(fo(),Sg(b,{key:0,type:"vertical"})):Pf("",!0)],64))),128))],2)}const Zo=xg(Bi,[["render",Yu]]);var Ur={exports:{}};(function(m,y){(function(c,f){m.exports=f()})(window,function(){return function(c){var f={};function i(l){if(f[l])return f[l].exports;var s=f[l]={i:l,l:!1,exports:{}};return c[l].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=c,i.c=f,i.d=function(l,s,g){i.o(l,s)||Object.defineProperty(l,s,{enumerable:!0,get:g})},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,s){if(1&s&&(l=i(l)),8&s||4&s&&typeof l=="object"&&l&&l.__esModule)return l;var g=Object.create(null);if(i.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:l}),2&s&&typeof l!="string")for(var b in l)i.d(g,b,function(x){return l[x]}.bind(null,b));return g},i.n=function(l){var s=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(s,"a",s),s},i.o=function(l,s){return Object.prototype.hasOwnProperty.call(l,s)},i.p="",i(i.s=215)}([function(c,f,i){i.d(f,"a",function(){return $}),i.d(f,"b",function(){return it}),i.d(f,"c",function(){return Ct}),i.d(f,"d",function(){return $t}),i.d(f,"e",function(){return B}),i.d(f,"f",function(){return tt}),i.d(f,"g",function(){return B}),i.d(f,"h",function(){return Pt}),i.d(f,"i",function(){return s}),i.d(f,"j",function(){return Kt}),i.d(f,"k",function(){return U});var l,s,g,b,x,w,A,S={},P=[],D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function N(K,Z){for(var at in Z)K[at]=Z[at];return K}function I(K){var Z=K.parentNode;Z&&Z.removeChild(K)}function B(K,Z,at){var _t,At,wt,Wt={};for(wt in Z)wt=="key"?_t=Z[wt]:wt=="ref"?At=Z[wt]:Wt[wt]=Z[wt];if(arguments.length>2&&(Wt.children=arguments.length>3?l.call(arguments,2):at),typeof K=="function"&&K.defaultProps!=null)for(wt in K.defaultProps)Wt[wt]===void 0&&(Wt[wt]=K.defaultProps[wt]);return F(K,Wt,_t,At,null)}function F(K,Z,at,_t,At){var wt={type:K,props:Z,key:at,ref:_t,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:At!=null?At:++g};return At==null&&s.vnode!=null&&s.vnode(wt),wt}function tt(){return{current:null}}function it(K){return K.children}function $(K,Z){this.props=K,this.context=Z}function G(K,Z){if(Z==null)return K.__?G(K.__,K.__.__k.indexOf(K)+1):null;for(var at;Z<K.__k.length;Z++)if((at=K.__k[Z])!=null&&at.__e!=null)return at.__e;return typeof K.type=="function"?G(K):null}function J(K){var Z,at;if((K=K.__)!=null&&K.__c!=null){for(K.__e=K.__c.base=null,Z=0;Z<K.__k.length;Z++)if((at=K.__k[Z])!=null&&at.__e!=null){K.__e=K.__c.base=at.__e;break}return J(K)}}function z(K){(!K.__d&&(K.__d=!0)&&b.push(K)&&!T.__r++||w!==s.debounceRendering)&&((w=s.debounceRendering)||x)(T)}function T(){for(var K;T.__r=b.length;)K=b.sort(function(Z,at){return Z.__v.__b-at.__v.__b}),b=[],K.some(function(Z){var at,_t,At,wt,Wt,re;Z.__d&&(Wt=(wt=(at=Z).__v).__e,(re=at.__P)&&(_t=[],(At=N({},wt)).__v=wt.__v+1,vt(re,wt,At,at.__n,re.ownerSVGElement!==void 0,wt.__h!=null?[Wt]:null,_t,Wt!=null?Wt:G(wt),wt.__h),ut(_t,wt),wt.__e!=Wt&&J(wt)))})}function L(K,Z,at,_t,At,wt,Wt,re,Qt,Gt){var gt,Ht,et,zt,ue,ge,ie,ye=_t&&_t.__k||P,je=ye.length;for(at.__k=[],gt=0;gt<Z.length;gt++)if((zt=at.__k[gt]=(zt=Z[gt])==null||typeof zt=="boolean"?null:typeof zt=="string"||typeof zt=="number"||typeof zt=="bigint"?F(null,zt,null,null,zt):Array.isArray(zt)?F(it,{children:zt},null,null,null):zt.__b>0?F(zt.type,zt.props,zt.key,null,zt.__v):zt)!=null){if(zt.__=at,zt.__b=at.__b+1,(et=ye[gt])===null||et&&zt.key==et.key&&zt.type===et.type)ye[gt]=void 0;else for(Ht=0;Ht<je;Ht++){if((et=ye[Ht])&&zt.key==et.key&&zt.type===et.type){ye[Ht]=void 0;break}et=null}vt(K,zt,et=et||S,At,wt,Wt,re,Qt,Gt),ue=zt.__e,(Ht=zt.ref)&&et.ref!=Ht&&(ie||(ie=[]),et.ref&&ie.push(et.ref,null,zt),ie.push(Ht,zt.__c||ue,zt)),ue!=null?(ge==null&&(ge=ue),typeof zt.type=="function"&&zt.__k===et.__k?zt.__d=Qt=C(zt,Qt,K):Qt=Q(K,zt,et,ye,ue,Qt),typeof at.type=="function"&&(at.__d=Qt)):Qt&&et.__e==Qt&&Qt.parentNode!=K&&(Qt=G(et))}for(at.__e=ge,gt=je;gt--;)ye[gt]!=null&&(typeof at.type=="function"&&ye[gt].__e!=null&&ye[gt].__e==at.__d&&(at.__d=G(_t,gt+1)),jt(ye[gt],ye[gt]));if(ie)for(gt=0;gt<ie.length;gt++)mt(ie[gt],ie[++gt],ie[++gt])}function C(K,Z,at){for(var _t,At=K.__k,wt=0;At&&wt<At.length;wt++)(_t=At[wt])&&(_t.__=K,Z=typeof _t.type=="function"?C(_t,Z,at):Q(at,_t,_t,At,_t.__e,Z));return Z}function U(K,Z){return Z=Z||[],K==null||typeof K=="boolean"||(Array.isArray(K)?K.some(function(at){U(at,Z)}):Z.push(K)),Z}function Q(K,Z,at,_t,At,wt){var Wt,re,Qt;if(Z.__d!==void 0)Wt=Z.__d,Z.__d=void 0;else if(at==null||At!=wt||At.parentNode==null)t:if(wt==null||wt.parentNode!==K)K.appendChild(At),Wt=null;else{for(re=wt,Qt=0;(re=re.nextSibling)&&Qt<_t.length;Qt+=2)if(re==At)break t;K.insertBefore(At,wt),Wt=wt}return Wt!==void 0?Wt:At.nextSibling}function lt(K,Z,at){Z[0]==="-"?K.setProperty(Z,at):K[Z]=at==null?"":typeof at!="number"||D.test(Z)?at:at+"px"}function st(K,Z,at,_t,At){var wt;t:if(Z==="style")if(typeof at=="string")K.style.cssText=at;else{if(typeof _t=="string"&&(K.style.cssText=_t=""),_t)for(Z in _t)at&&Z in at||lt(K.style,Z,"");if(at)for(Z in at)_t&&at[Z]===_t[Z]||lt(K.style,Z,at[Z])}else if(Z[0]==="o"&&Z[1]==="n")wt=Z!==(Z=Z.replace(/Capture$/,"")),Z=Z.toLowerCase()in K?Z.toLowerCase().slice(2):Z.slice(2),K.l||(K.l={}),K.l[Z+wt]=at,at?_t||K.addEventListener(Z,wt?xt:yt,wt):K.removeEventListener(Z,wt?xt:yt,wt);else if(Z!=="dangerouslySetInnerHTML"){if(At)Z=Z.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(Z!=="href"&&Z!=="list"&&Z!=="form"&&Z!=="tabIndex"&&Z!=="download"&&Z in K)try{K[Z]=at!=null?at:"";break t}catch(Wt){}typeof at=="function"||(at!=null&&(at!==!1||Z[0]==="a"&&Z[1]==="r")?K.setAttribute(Z,at):K.removeAttribute(Z))}}function yt(K){this.l[K.type+!1](s.event?s.event(K):K)}function xt(K){this.l[K.type+!0](s.event?s.event(K):K)}function vt(K,Z,at,_t,At,wt,Wt,re,Qt){var Gt,gt,Ht,et,zt,ue,ge,ie,ye,je,Pe,ae=Z.type;if(Z.constructor!==void 0)return null;at.__h!=null&&(Qt=at.__h,re=Z.__e=at.__e,Z.__h=null,wt=[re]),(Gt=s.__b)&&Gt(Z);try{t:if(typeof ae=="function"){if(ie=Z.props,ye=(Gt=ae.contextType)&&_t[Gt.__c],je=Gt?ye?ye.props.value:Gt.__:_t,at.__c?ge=(gt=Z.__c=at.__c).__=gt.__E:("prototype"in ae&&ae.prototype.render?Z.__c=gt=new ae(ie,je):(Z.__c=gt=new $(ie,je),gt.constructor=ae,gt.render=It),ye&&ye.sub(gt),gt.props=ie,gt.state||(gt.state={}),gt.context=je,gt.__n=_t,Ht=gt.__d=!0,gt.__h=[]),gt.__s==null&&(gt.__s=gt.state),ae.getDerivedStateFromProps!=null&&(gt.__s==gt.state&&(gt.__s=N({},gt.__s)),N(gt.__s,ae.getDerivedStateFromProps(ie,gt.__s))),et=gt.props,zt=gt.state,Ht)ae.getDerivedStateFromProps==null&&gt.componentWillMount!=null&&gt.componentWillMount(),gt.componentDidMount!=null&&gt.__h.push(gt.componentDidMount);else{if(ae.getDerivedStateFromProps==null&&ie!==et&&gt.componentWillReceiveProps!=null&&gt.componentWillReceiveProps(ie,je),!gt.__e&&gt.shouldComponentUpdate!=null&&gt.shouldComponentUpdate(ie,gt.__s,je)===!1||Z.__v===at.__v){gt.props=ie,gt.state=gt.__s,Z.__v!==at.__v&&(gt.__d=!1),gt.__v=Z,Z.__e=at.__e,Z.__k=at.__k,Z.__k.forEach(function(Ne){Ne&&(Ne.__=Z)}),gt.__h.length&&Wt.push(gt);break t}gt.componentWillUpdate!=null&&gt.componentWillUpdate(ie,gt.__s,je),gt.componentDidUpdate!=null&&gt.__h.push(function(){gt.componentDidUpdate(et,zt,ue)})}gt.context=je,gt.props=ie,gt.state=gt.__s,(Gt=s.__r)&&Gt(Z),gt.__d=!1,gt.__v=Z,gt.__P=K,Gt=gt.render(gt.props,gt.state,gt.context),gt.state=gt.__s,gt.getChildContext!=null&&(_t=N(N({},_t),gt.getChildContext())),Ht||gt.getSnapshotBeforeUpdate==null||(ue=gt.getSnapshotBeforeUpdate(et,zt)),Pe=Gt!=null&&Gt.type===it&&Gt.key==null?Gt.props.children:Gt,L(K,Array.isArray(Pe)?Pe:[Pe],Z,at,_t,At,wt,Wt,re,Qt),gt.base=Z.__e,Z.__h=null,gt.__h.length&&Wt.push(gt),ge&&(gt.__E=gt.__=null),gt.__e=!1}else wt==null&&Z.__v===at.__v?(Z.__k=at.__k,Z.__e=at.__e):Z.__e=ht(at.__e,Z,at,_t,At,wt,Wt,Qt);(Gt=s.diffed)&&Gt(Z)}catch(Ne){Z.__v=null,(Qt||wt!=null)&&(Z.__e=re,Z.__h=!!Qt,wt[wt.indexOf(re)]=null),s.__e(Ne,Z,at)}}function ut(K,Z){s.__c&&s.__c(Z,K),K.some(function(at){try{K=at.__h,at.__h=[],K.some(function(_t){_t.call(at)})}catch(_t){s.__e(_t,at.__v)}})}function ht(K,Z,at,_t,At,wt,Wt,re){var Qt,Gt,gt,Ht=at.props,et=Z.props,zt=Z.type,ue=0;if(zt==="svg"&&(At=!0),wt!=null){for(;ue<wt.length;ue++)if((Qt=wt[ue])&&"setAttribute"in Qt==!!zt&&(zt?Qt.localName===zt:Qt.nodeType===3)){K=Qt,wt[ue]=null;break}}if(K==null){if(zt===null)return document.createTextNode(et);K=At?document.createElementNS("http://www.w3.org/2000/svg",zt):document.createElement(zt,et.is&&et),wt=null,re=!1}if(zt===null)Ht===et||re&&K.data===et||(K.data=et);else{if(wt=wt&&l.call(K.childNodes),Gt=(Ht=at.props||S).dangerouslySetInnerHTML,gt=et.dangerouslySetInnerHTML,!re){if(wt!=null)for(Ht={},ue=0;ue<K.attributes.length;ue++)Ht[K.attributes[ue].name]=K.attributes[ue].value;(gt||Gt)&&(gt&&(Gt&&gt.__html==Gt.__html||gt.__html===K.innerHTML)||(K.innerHTML=gt&&gt.__html||""))}if(function(ge,ie,ye,je,Pe){var ae;for(ae in ye)ae==="children"||ae==="key"||ae in ie||st(ge,ae,null,ye[ae],je);for(ae in ie)Pe&&typeof ie[ae]!="function"||ae==="children"||ae==="key"||ae==="value"||ae==="checked"||ye[ae]===ie[ae]||st(ge,ae,ie[ae],ye[ae],je)}(K,et,Ht,At,re),gt)Z.__k=[];else if(ue=Z.props.children,L(K,Array.isArray(ue)?ue:[ue],Z,at,_t,At&&zt!=="foreignObject",wt,Wt,wt?wt[0]:at.__k&&G(at,0),re),wt!=null)for(ue=wt.length;ue--;)wt[ue]!=null&&I(wt[ue]);re||("value"in et&&(ue=et.value)!==void 0&&(ue!==Ht.value||ue!==K.value||zt==="progress"&&!ue)&&st(K,"value",ue,Ht.value,!1),"checked"in et&&(ue=et.checked)!==void 0&&ue!==K.checked&&st(K,"checked",ue,Ht.checked,!1))}return K}function mt(K,Z,at){try{typeof K=="function"?K(Z):K.current=Z}catch(_t){s.__e(_t,at)}}function jt(K,Z,at){var _t,At;if(s.unmount&&s.unmount(K),(_t=K.ref)&&(_t.current&&_t.current!==K.__e||mt(_t,null,Z)),(_t=K.__c)!=null){if(_t.componentWillUnmount)try{_t.componentWillUnmount()}catch(wt){s.__e(wt,Z)}_t.base=_t.__P=null}if(_t=K.__k)for(At=0;At<_t.length;At++)_t[At]&&jt(_t[At],Z,typeof K.type!="function");at||K.__e==null||I(K.__e),K.__e=K.__d=void 0}function It(K,Z,at){return this.constructor(K,at)}function Kt(K,Z,at){var _t,At,wt;s.__&&s.__(K,Z),At=(_t=typeof at=="function")?null:at&&at.__k||Z.__k,wt=[],vt(Z,K=(!_t&&at||Z).__k=B(it,null,[K]),At||S,S,Z.ownerSVGElement!==void 0,!_t&&at?[at]:At?null:Z.firstChild?l.call(Z.childNodes):null,wt,!_t&&at?at:At?At.__e:Z.firstChild,_t),ut(wt,K)}function Pt(K,Z){Kt(K,Z,Pt)}function Ct(K,Z,at){var _t,At,wt,Wt=N({},K.props);for(wt in Z)wt=="key"?_t=Z[wt]:wt=="ref"?At=Z[wt]:Wt[wt]=Z[wt];return arguments.length>2&&(Wt.children=arguments.length>3?l.call(arguments,2):at),F(K.type,Wt,_t||K.key,At||K.ref,null)}function $t(K,Z){var at={__c:Z="__cC"+A++,__:K,Consumer:function(_t,At){return _t.children(At)},Provider:function(_t){var At,wt;return this.getChildContext||(At=[],(wt={})[Z]=this,this.getChildContext=function(){return wt},this.shouldComponentUpdate=function(Wt){this.props.value!==Wt.value&&At.some(z)},this.sub=function(Wt){At.push(Wt);var re=Wt.componentWillUnmount;Wt.componentWillUnmount=function(){At.splice(At.indexOf(Wt),1),re&&re.call(Wt)}}),_t.children}};return at.Provider.__=at.Consumer.contextType=at}l=P.slice,s={__e:function(K,Z){for(var at,_t,At;Z=Z.__;)if((at=Z.__c)&&!at.__)try{if((_t=at.constructor)&&_t.getDerivedStateFromError!=null&&(at.setState(_t.getDerivedStateFromError(K)),At=at.__d),at.componentDidCatch!=null&&(at.componentDidCatch(K),At=at.__d),At)return at.__E=at}catch(wt){K=wt}throw K}},g=0,$.prototype.setState=function(K,Z){var at;at=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=N({},this.state),typeof K=="function"&&(K=K(N({},at),this.props)),K&&N(at,K),K!=null&&this.__v&&(Z&&this.__h.push(Z),z(this))},$.prototype.forceUpdate=function(K){this.__v&&(this.__e=!0,K&&this.__h.push(K),z(this))},$.prototype.render=it,b=[],x=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,T.__r=0,A=0},function(c,f,i){(function(l,s){i.d(f,"a",function(){return z}),i.d(f,"b",function(){return ci}),i.d(f,"c",function(){return Hr}),i.d(f,"d",function(){return te}),i.d(f,"e",function(){return Dt}),i.d(f,"f",function(){return Tt}),i.d(f,"g",function(){return Zt}),i.d(f,"h",function(){return Ln}),i.d(f,"i",function(){return Pe}),i.d(f,"j",function(){return Lt}),i.d(f,"k",function(){return Qr}),i.d(f,"l",function(){return ii}),i.d(f,"m",function(){return ge}),i.d(f,"n",function(){return Rn}),i.d(f,"o",function(){return C}),i.d(f,"p",function(){return ya}),i.d(f,"q",function(){return qr}),i.d(f,"r",function(){return pa}),i.d(f,"s",function(){return jr}),i.d(f,"t",function(){return Qn}),i.d(f,"u",function(){return Oo}),i.d(f,"v",function(){return sc}),i.d(f,"w",function(){return ha}),i.d(f,"x",function(){return to}),i.d(f,"y",function(){return Rr}),i.d(f,"z",function(){return Ie}),i.d(f,"A",function(){return mr}),i.d(f,"B",function(){return tn}),i.d(f,"C",function(){return Gt}),i.d(f,"D",function(){return ga}),i.d(f,"E",function(){return Cn}),i.d(f,"F",function(){return Nn}),i.d(f,"G",function(){return ac}),i.d(f,"H",function(){return oa}),i.d(f,"I",function(){return fc}),i.d(f,"J",function(){return xr}),i.d(f,"K",function(){return rt}),i.d(f,"L",function(){return tr}),i.d(f,"M",function(){return ma});var g=[];Object.freeze(g);var b={};function x(){return++Xt.mobxGuid}function w(h){throw A(!1,h),"X"}function A(h,v){if(!h)throw new Error("[mobx] "+(v||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(b);function S(h){var v=!1;return function(){if(!v)return v=!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 v=Object.getPrototypeOf(h);return v===Object.prototype||v===null}function I(h,v,E){Object.defineProperty(h,v,{enumerable:!1,writable:!0,configurable:!0,value:E})}function B(h,v){var E="isMobX"+h;return v.prototype[E]=!0,function(M){return D(M)&&M[E]===!0}}function F(h){return h instanceof Map}function tt(h){return h instanceof Set}function it(h){var v=new Set;for(var E in h)v.add(E);return Object.getOwnPropertySymbols(h).forEach(function(M){Object.getOwnPropertyDescriptor(h,M).enumerable&&v.add(M)}),Array.from(v)}function $(h){return h&&h.toString?h.toString():new String(h).toString()}function G(h){return h===null?null:typeof h=="object"?""+h:h}var J=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"),T=function(){function h(v){v===void 0&&(v="Atom@"+x()),this.name=v,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Ht.NOT_TRACKING}return h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(v){return v()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(v){return v()})},h.prototype.reportObserved=function(){return ra(this)},h.prototype.reportChanged=function(){_r(),function(v){v.lowestObserverState!==Ht.STALE&&(v.lowestObserverState=Ht.STALE,v.observers.forEach(function(E){E.dependenciesState===Ht.UP_TO_DATE&&(E.isTracing!==et.NONE&&$r(E,v),E.onBecomeStale()),E.dependenciesState=Ht.STALE}))}(this),wr()},h.prototype.toString=function(){return this.name},h}(),L=B("Atom",T);function C(h,v,E){v===void 0&&(v=P),E===void 0&&(E=P);var M,H=new T(h);return v!==P&&ua("onBecomeObserved",H,v,M),E!==P&&Cn(H,E),H}var U={identity:function(h,v){return h===v},structural:function(h,v){return li(h,v)},default:function(h,v){return Object.is(h,v)},shallow:function(h,v){return li(h,v,1)}},Q=function(h,v){return Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,M){E.__proto__=M}||function(E,M){for(var H in M)M.hasOwnProperty(H)&&(E[H]=M[H])},Q(h,v)},lt=function(){return lt=Object.assign||function(h){for(var v,E=1,M=arguments.length;E<M;E++)for(var H in v=arguments[E])Object.prototype.hasOwnProperty.call(v,H)&&(h[H]=v[H]);return h},lt.apply(this,arguments)};function st(h){var v=typeof Symbol=="function"&&h[Symbol.iterator],E=0;return v?v.call(h):{next:function(){return h&&E>=h.length&&(h=void 0),{value:h&&h[E++],done:!h}}}}function yt(h,v){var E=typeof Symbol=="function"&&h[Symbol.iterator];if(!E)return h;var M,H,q=E.call(h),pt=[];try{for(;(v===void 0||v-- >0)&&!(M=q.next()).done;)pt.push(M.value)}catch(St){H={error:St}}finally{try{M&&!M.done&&(E=q.return)&&E.call(q)}finally{if(H)throw H.error}}return pt}function xt(){for(var h=[],v=0;v<arguments.length;v++)h=h.concat(yt(arguments[v]));return h}var vt=Symbol("mobx did run lazy initializers"),ut=Symbol("mobx pending decorators"),ht={},mt={};function jt(h,v){var E=v?ht:mt;return E[h]||(E[h]={configurable:!0,enumerable:v,get:function(){return It(this),this[h]},set:function(M){It(this),this[h]=M}})}function It(h){var v,E;if(h[vt]!==!0){var M=h[ut];if(M){I(h,vt,!0);var H=xt(Object.getOwnPropertySymbols(M),Object.keys(M));try{for(var q=st(H),pt=q.next();!pt.done;pt=q.next()){var St=M[pt.value];St.propertyCreator(h,St.prop,St.descriptor,St.decoratorTarget,St.decoratorArguments)}}catch(Ut){v={error:Ut}}finally{try{pt&&!pt.done&&(E=q.return)&&E.call(q)}finally{if(v)throw v.error}}}}}function Kt(h,v){return function(){var E,M=function(H,q,pt,St){if(St===!0)return v(H,q,pt,H,E),null;if(!Object.prototype.hasOwnProperty.call(H,ut)){var Ut=H[ut];I(H,ut,lt({},Ut))}return H[ut][q]={prop:q,propertyCreator:v,descriptor:pt,decoratorTarget:H,decoratorArguments:E},jt(q,h)};return Pt(arguments)?(E=g,M.apply(null,arguments)):(E=Array.prototype.slice.call(arguments),M)}}function Pt(h){return(h.length===2||h.length===3)&&(typeof h[1]=="string"||typeof h[1]=="symbol")||h.length===4&&h[3]===!0}function Ct(h,v,E){return to(h)?h:Array.isArray(h)?Gt.array(h,{name:E}):N(h)?Gt.object(h,void 0,{name:E}):F(h)?Gt.map(h,{name:E}):tt(h)?Gt.set(h,{name:E}):h}function $t(h){return h}function K(h){A(h);var v=Kt(!0,function(M,H,q,pt,St){var Ut=q?q.initializer?q.initializer.call(M):q.value:void 0;ro(M).addObservableProp(H,Ut,h)}),E=(l!==void 0&&l.env,v);return E.enhancer=h,E}var Z={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function at(h){return h==null?Z:typeof h=="string"?{name:h,deep:!0,proxy:!0}:h}Object.freeze(Z);var _t=K(Ct),At=K(function(h,v,E){return h==null||mr(h)||Rr(h)||Ie(h)||gr(h)?h:Array.isArray(h)?Gt.array(h,{name:E,deep:!1}):N(h)?Gt.object(h,void 0,{name:E,deep:!1}):F(h)?Gt.map(h,{name:E,deep:!1}):tt(h)?Gt.set(h,{name:E,deep:!1}):w(!1)}),wt=K($t),Wt=K(function(h,v,E){return li(h,v)?v:h});function re(h){return h.defaultDecorator?h.defaultDecorator.enhancer:h.deep===!1?$t:Ct}var Qt={box:function(h,v){arguments.length>2&&gt("box");var E=at(v);return new Te(h,re(E),E.name,!0,E.equals)},array:function(h,v){arguments.length>2&&gt("array");var E=at(v);return ui(h,re(E),E.name)},map:function(h,v){arguments.length>2&&gt("map");var E=at(v);return new ci(h,re(E),E.name)},set:function(h,v){arguments.length>2&&gt("set");var E=at(v);return new xo(h,re(E),E.name)},object:function(h,v,E){typeof arguments[1]=="string"&&gt("object");var M=at(E);if(M.proxy===!1)return qr({},h,v,M);var H=ca(M),q=qr({},void 0,void 0,M),pt=dc(q);return sa(pt,h,v,H),pt},ref:wt,shallow:At,deep:_t,struct:Wt},Gt=function(h,v,E){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return _t.apply(null,arguments);if(to(h))return h;var M=N(h)?Gt.object(h,v,E):Array.isArray(h)?Gt.array(h,v):F(h)?Gt.map(h,v):tt(h)?Gt.set(h,v):h;if(M!==h)return M;w(!1)};function gt(h){w("Expected one or two arguments to observable."+h+". Did you accidentally try to use observable."+h+" as decorator?")}Object.keys(Qt).forEach(function(h){return Gt[h]=Qt[h]});var Ht,et,zt=Kt(!1,function(h,v,E,M,H){var q=E.get,pt=E.set,St=H[0]||{};ro(h).addComputedProp(h,v,lt({get:q,set:pt,context:h},St))}),ue=zt({equals:U.structural}),ge=function(h,v,E){if(typeof v=="string"||h!==null&&typeof h=="object"&&arguments.length===1)return zt.apply(null,arguments);var M=typeof v=="object"?v:{};return M.get=h,M.set=typeof v=="function"?v:M.set,M.name=M.name||h.name||"",new Jr(M)};ge.struct=ue,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"}(Ht||(Ht={})),function(h){h[h.NONE=0]="NONE",h[h.LOG=1]="LOG",h[h.BREAK=2]="BREAK"}(et||(et={}));var ie=function(h){this.cause=h};function ye(h){return h instanceof ie}function je(h){switch(h.dependenciesState){case Ht.UP_TO_DATE:return!1;case Ht.NOT_TRACKING:case Ht.STALE:return!0;case Ht.POSSIBLY_STALE:for(var v=Tt(!0),E=Y(),M=h.observing,H=M.length,q=0;q<H;q++){var pt=M[q];if(Kr(pt)){if(Xt.disableErrorBoundaries)pt.get();else try{pt.get()}catch(St){return ct(E),Dt(v),!0}if(h.dependenciesState===Ht.STALE)return ct(E),Dt(v),!0}}return Vt(h),ct(E),Dt(v),!1}}function Pe(){return Xt.trackingDerivation!==null}function ae(h){var v=h.observers.size>0;Xt.computationDepth>0&&v&&w(!1),Xt.allowStateChanges||!v&&Xt.enforceActions!=="strict"||w(!1)}function Ne(h,v,E){var M=Tt(!0);Vt(h),h.newObserving=new Array(h.observing.length+100),h.unboundDepsCount=0,h.runId=++Xt.runId;var H,q=Xt.trackingDerivation;if(Xt.trackingDerivation=h,Xt.disableErrorBoundaries===!0)H=v.call(E);else try{H=v.call(E)}catch(pt){H=new ie(pt)}return Xt.trackingDerivation=q,function(pt){for(var St=pt.observing,Ut=pt.observing=pt.newObserving,de=Ht.UP_TO_DATE,oe=0,xe=pt.unboundDepsCount,se=0;se<xe;se++)(Oe=Ut[se]).diffValue===0&&(Oe.diffValue=1,oe!==se&&(Ut[oe]=Oe),oe++),Oe.dependenciesState>de&&(de=Oe.dependenciesState);for(Ut.length=oe,pt.newObserving=null,xe=St.length;xe--;)(Oe=St[xe]).diffValue===0&&ta(Oe,pt),Oe.diffValue=0;for(;oe--;){var Oe;(Oe=Ut[oe]).diffValue===1&&(Oe.diffValue=0,rc(Oe,pt))}de!==Ht.UP_TO_DATE&&(pt.dependenciesState=de,pt.onBecomeStale())}(h),Dt(M),H}function X(h){var v=h.observing;h.observing=[];for(var E=v.length;E--;)ta(v[E],h);h.dependenciesState=Ht.NOT_TRACKING}function rt(h){var v=Y();try{return h()}finally{ct(v)}}function Y(){var h=Xt.trackingDerivation;return Xt.trackingDerivation=null,h}function ct(h){Xt.trackingDerivation=h}function Tt(h){var v=Xt.allowStateReads;return Xt.allowStateReads=h,v}function Dt(h){Xt.allowStateReads=h}function Vt(h){if(h.dependenciesState!==Ht.UP_TO_DATE){h.dependenciesState=Ht.UP_TO_DATE;for(var v=h.observing,E=v.length;E--;)v[E].lowestObserverState=Ht.UP_TO_DATE}}var fe=0,Fe=1,Je=Object.getOwnPropertyDescriptor(function(){},"name");Je&&Je.configurable;function Ce(h,v,E){var M=function(){return Re(h,v,E||this,arguments)};return M.isMobxAction=!0,M}function Re(h,v,E,M){var H=Lt();try{return v.apply(E,M)}catch(q){throw H.error=q,q}finally{Zt(H)}}function Lt(h,v,E){var M=0,H=Y();_r();var q={prevDerivation:H,prevAllowStateChanges:ne(!0),prevAllowStateReads:Tt(!0),notifySpy:!1,startTime:M,actionId:Fe++,parentActionId:fe};return fe=q.actionId,q}function Zt(h){fe!==h.actionId&&w("invalid action stack. did you forget to finish an action?"),fe=h.parentActionId,h.error!==void 0&&(Xt.suppressReactionErrors=!0),we(h.prevAllowStateChanges),Dt(h.prevAllowStateReads),wr(),ct(h.prevDerivation),h.notifySpy,Xt.suppressReactionErrors=!1}function te(h,v){var E,M=ne(h);try{E=v()}finally{we(M)}return E}function ne(h){var v=Xt.allowStateChanges;return Xt.allowStateChanges=h,v}function we(h){Xt.allowStateChanges=h}var Te=function(h){function v(E,M,H,q,pt){H===void 0&&(H="ObservableValue@"+x()),pt===void 0&&(pt=U.default);var St=h.call(this,H)||this;return St.enhancer=M,St.name=H,St.equals=pt,St.hasUnreportedChange=!1,St.value=M(E,void 0,H),St}return function(E,M){function H(){this.constructor=E}Q(E,M),E.prototype=M===null?Object.create(M):(H.prototype=M.prototype,new H)}(v,h),v.prototype.dehanceValue=function(E){return this.dehancer!==void 0?this.dehancer(E):E},v.prototype.set=function(E){this.value,(E=this.prepareNewValue(E))!==Xt.UNCHANGED&&this.setNewValue(E)},v.prototype.prepareNewValue=function(E){if(ae(this),cr(this)){var M=ve(this,{object:this,type:"update",newValue:E});if(!M)return Xt.UNCHANGED;E=M.newValue}return E=this.enhancer(E,this.value,this.name),this.equals(this.value,E)?Xt.UNCHANGED:E},v.prototype.setNewValue=function(E){var M=this.value;this.value=E,this.reportChanged(),Er(this)&&Ke(this,{type:"update",object:this,newValue:E,oldValue:M})},v.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},v.prototype.intercept=function(E){return gn(this,E)},v.prototype.observe=function(E,M){return M&&E({object:this,type:"update",newValue:this.value,oldValue:void 0}),mn(this,E)},v.prototype.toJSON=function(){return this.get()},v.prototype.toString=function(){return this.name+"["+this.value+"]"},v.prototype.valueOf=function(){return G(this.get())},v.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},v}(T),hn=B("ObservableValue",Te),Jr=function(){function h(v){this.dependenciesState=Ht.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=Ht.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+x(),this.value=new ie(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=et.NONE,A(v.get,"missing option for computed: get"),this.derivation=v.get,this.name=v.name||"ComputedValue@"+x(),v.set&&(this.setter=Ce(this.name+"-setter",v.set)),this.equals=v.equals||(v.compareStructural||v.struct?U.structural:U.default),this.scope=v.context,this.requiresReaction=!!v.requiresReaction,this.keepAlive=!!v.keepAlive}return h.prototype.onBecomeStale=function(){(function(v){v.lowestObserverState===Ht.UP_TO_DATE&&(v.lowestObserverState=Ht.POSSIBLY_STALE,v.observers.forEach(function(E){E.dependenciesState===Ht.UP_TO_DATE&&(E.dependenciesState=Ht.POSSIBLY_STALE,E.isTracing!==et.NONE&&$r(E,v),E.onBecomeStale())}))})(this)},h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(v){return v()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(v){return v()})},h.prototype.get=function(){this.isComputing&&w("Cycle detected in computation "+this.name+": "+this.derivation),Xt.inBatch!==0||this.observers.size!==0||this.keepAlive?(ra(this),je(this)&&this.trackAndCompute()&&function(E){E.lowestObserverState!==Ht.STALE&&(E.lowestObserverState=Ht.STALE,E.observers.forEach(function(M){M.dependenciesState===Ht.POSSIBLY_STALE?M.dependenciesState=Ht.STALE:M.dependenciesState===Ht.UP_TO_DATE&&(E.lowestObserverState=Ht.UP_TO_DATE)}))}(this)):je(this)&&(this.warnAboutUntrackedRead(),_r(),this.value=this.computeValue(!1),wr());var v=this.value;if(ye(v))throw v.cause;return v},h.prototype.peek=function(){var v=this.computeValue(!1);if(ye(v))throw v.cause;return v},h.prototype.set=function(v){if(this.setter){A(!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,v)}finally{this.isRunningSetter=!1}}else A(!1,!1)},h.prototype.trackAndCompute=function(){var v=this.value,E=this.dependenciesState===Ht.NOT_TRACKING,M=this.computeValue(!0),H=E||ye(v)||ye(M)||!this.equals(v,M);return H&&(this.value=M),H},h.prototype.computeValue=function(v){var E;if(this.isComputing=!0,Xt.computationDepth++,v)E=Ne(this,this.derivation,this.scope);else if(Xt.disableErrorBoundaries===!0)E=this.derivation.call(this.scope);else try{E=this.derivation.call(this.scope)}catch(M){E=new ie(M)}return Xt.computationDepth--,this.isComputing=!1,E},h.prototype.suspend=function(){this.keepAlive||(X(this),this.value=void 0)},h.prototype.observe=function(v,E){var M=this,H=!0,q=void 0;return ii(function(){var pt=M.get();if(!H||E){var St=Y();v({type:"update",object:M,newValue:pt,oldValue:q}),ct(St)}H=!1,q=pt})},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 G(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(),Kr=B("ComputedValue",Jr),$n=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},ec={};function ri(){return typeof window<"u"?window:s!==void 0?s:typeof self<"u"?self:ec}var Tr=!0,qi=!1,Xt=function(){var h=ri();return h.__mobxInstanceCount>0&&!h.__mobxGlobals&&(Tr=!1),h.__mobxGlobals&&h.__mobxGlobals.version!==new $n().version&&(Tr=!1),Tr?h.__mobxGlobals?(h.__mobxInstanceCount+=1,h.__mobxGlobals.UNCHANGED||(h.__mobxGlobals.UNCHANGED={}),h.__mobxGlobals):(h.__mobxInstanceCount=1,h.__mobxGlobals=new $n):(setTimeout(function(){qi||w("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new $n)}();function rc(h,v){h.observers.add(v),h.lowestObserverState>v.dependenciesState&&(h.lowestObserverState=v.dependenciesState)}function ta(h,v){h.observers.delete(v),h.observers.size===0&&ea(h)}function ea(h){h.isPendingUnobservation===!1&&(h.isPendingUnobservation=!0,Xt.pendingUnobservations.push(h))}function _r(){Xt.inBatch++}function wr(){if(--Xt.inBatch==0){na();for(var h=Xt.pendingUnobservations,v=0;v<h.length;v++){var E=h[v];E.isPendingUnobservation=!1,E.observers.size===0&&(E.isBeingObserved&&(E.isBeingObserved=!1,E.onBecomeUnobserved()),E instanceof Jr&&E.suspend())}Xt.pendingUnobservations=[]}}function ra(h){var v=Xt.trackingDerivation;return v!==null?(v.runId!==h.lastAccessedBy&&(h.lastAccessedBy=v.runId,v.newObserving[v.unboundDepsCount++]=h,h.isBeingObserved||(h.isBeingObserved=!0,h.onBecomeObserved())),!0):(h.observers.size===0&&Xt.inBatch>0&&ea(h),!1)}function $r(h,v){if(h.isTracing===et.BREAK){var E=[];Dn(Qn(h),E,1),new Function(`debugger;
/*
Tracing '`+h.name+`'
 
You are entering this break point because derivation '`+h.name+"' is being traced and '"+v.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 Jr?h.derivation.toString().replace(/[*]\//g,"/"):"")+`
 
The dependencies for this derivation are:
 
`+E.join(`
`)+`
*/
    `)()}}function Dn(h,v,E){v.length>=1e3?v.push("(and many more)"):(v.push(""+new Array(E).join("    ")+h.name),h.dependencies&&h.dependencies.forEach(function(M){return Dn(M,v,E+1)}))}var Hr=function(){function h(v,E,M,H){v===void 0&&(v="Reaction@"+x()),H===void 0&&(H=!1),this.name=v,this.onInvalidate=E,this.errorHandler=M,this.requiresObservable=H,this.observing=[],this.newObserving=[],this.dependenciesState=Ht.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+x(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=et.NONE}return h.prototype.onBecomeStale=function(){this.schedule()},h.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Xt.pendingReactions.push(this),na())},h.prototype.isScheduled=function(){return this._isScheduled},h.prototype.runReaction=function(){if(!this.isDisposed){if(_r(),this._isScheduled=!1,je(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(v){this.reportExceptionInDerivation(v)}}wr()}},h.prototype.track=function(v){if(!this.isDisposed){_r(),this._isRunning=!0;var E=Ne(this,v,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&X(this),ye(E)&&this.reportExceptionInDerivation(E.cause),wr()}},h.prototype.reportExceptionInDerivation=function(v){var E=this;if(this.errorHandler)this.errorHandler(v,this);else{if(Xt.disableErrorBoundaries)throw v;Xt.suppressReactionErrors,Xt.globalReactionErrorHandlers.forEach(function(M){return M(v,E)})}},h.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(_r(),X(this),wr()))},h.prototype.getDisposer=function(){var v=this.dispose.bind(this);return v[z]=this,v},h.prototype.toString=function(){return"Reaction["+this.name+"]"},h.prototype.trace=function(v){v===void 0&&(v=!1),function(){for(var E=[],M=0;M<arguments.length;M++)E[M]=arguments[M];var H=!1;typeof E[E.length-1]=="boolean"&&(H=E.pop());var q=Nr(E);if(!q)return w(!1);q.isTracing,et.NONE,q.isTracing=H?et.BREAK:et.LOG}(this,v)},h}(),ni=function(h){return h()};function na(){Xt.inBatch>0||Xt.isRunningReactions||ni(nc)}function nc(){Xt.isRunningReactions=!0;for(var h=Xt.pendingReactions,v=0;h.length>0;){++v==100&&h.splice(0);for(var E=h.splice(0),M=0,H=E.length;M<H;M++)E[M].runReaction()}Xt.isRunningReactions=!1}var bo=B("Reaction",Hr);function oc(h){var v=ni;ni=function(E){return h(function(){return v(E)})}}function oa(h){return function(){}}function ic(){w(!1)}function yn(h){return function(v,E,M){if(M){if(M.value)return{value:Ce(h,M.value),enumerable:!1,configurable:!0,writable:!0};var H=M.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Ce(h,H.call(this))}}}return ia(h).apply(this,arguments)}}function ia(h){return function(v,E,M){Object.defineProperty(v,E,{configurable:!0,enumerable:!1,get:function(){},set:function(H){I(this,E,Qr(h,H))}})}}var Qr=function(h,v,E,M){return arguments.length===1&&typeof h=="function"?Ce(h.name||"<unnamed action>",h):arguments.length===2&&typeof v=="function"?Ce(h,v):arguments.length===1&&typeof h=="string"?yn(h):M!==!0?yn(v).apply(null,arguments):void I(h,v,Ce(h.name||v,E.value,this))};function ac(h,v){return Re(typeof h=="string"?h:h.name||"<unnamed action>",typeof h=="function"?h:v,this,void 0)}function Oo(h){return typeof h=="function"&&h.isMobxAction===!0}function oi(h,v,E){I(h,v,Ce(v,E.bind(h)))}function ii(h,v){v===void 0&&(v=b);var E,M=v&&v.name||h.name||"Autorun@"+x();if(!v.scheduler&&!v.delay)E=new Hr(M,function(){this.track(pt)},v.onError,v.requiresObservable);else{var H=aa(v),q=!1;E=new Hr(M,function(){q||(q=!0,H(function(){q=!1,E.isDisposed||E.track(pt)}))},v.onError,v.requiresObservable)}function pt(){h(E)}return E.schedule(),E.getDisposer()}Qr.bound=function(h,v,E,M){return M===!0?(oi(h,v,E.value),null):E?{configurable:!0,enumerable:!1,get:function(){return oi(this,v,E.value||E.initializer.call(this)),this[v]},set:ic}:{enumerable:!1,configurable:!0,set:function(H){oi(this,v,H)},get:function(){}}};var uc=function(h){return h()};function aa(h){return h.scheduler?h.scheduler:h.delay?function(v){return setTimeout(v,h.delay)}:uc}function Nn(h,v,E){E===void 0&&(E=b);var M,H,q,pt=E.name||"Reaction@"+x(),St=Qr(pt,E.onError?(M=E.onError,H=v,function(){try{return H.apply(this,arguments)}catch(ke){M.call(this,ke)}}):v),Ut=!E.scheduler&&!E.delay,de=aa(E),oe=!0,xe=!1,se=E.compareStructural?U.structural:E.equals||U.default,Oe=new Hr(pt,function(){oe||Ut?Sr():xe||(xe=!0,de(Sr))},E.onError,E.requiresObservable);function Sr(){if(xe=!1,!Oe.isDisposed){var ke=!1;Oe.track(function(){var sr=h(Oe);ke=oe||!se(q,sr),q=sr}),oe&&E.fireImmediately&&St(q,Oe),oe||ke!==!0||St(q,Oe),oe&&(oe=!1)}}return Oe.schedule(),Oe.getDisposer()}function Cn(h,v,E){return ua("onBecomeUnobserved",h,v,E)}function ua(h,v,E,M){var H=typeof M=="function"?jr(v,E):jr(v),q=typeof M=="function"?M:E,pt=h+"Listeners";return H[pt]?H[pt].add(q):H[pt]=new Set([q]),typeof H[h]!="function"?w(!1):function(){var St=H[pt];St&&(St.delete(q),St.size===0&&delete H[pt])}}function Rn(h){var v=h.enforceActions,E=h.computedRequiresReaction,M=h.computedConfigurable,H=h.disableErrorBoundaries,q=h.reactionScheduler,pt=h.reactionRequiresObservable,St=h.observableRequiresReaction;if(h.isolateGlobalState===!0&&((Xt.pendingReactions.length||Xt.inBatch||Xt.isRunningReactions)&&w("isolateGlobalState should be called before MobX is running any reactions"),qi=!0,Tr&&(--ri().__mobxInstanceCount==0&&(ri().__mobxGlobals=void 0),Xt=new $n)),v!==void 0){var Ut=void 0;switch(v){case!0:case"observed":Ut=!0;break;case!1:case"never":Ut=!1;break;case"strict":case"always":Ut="strict";break;default:w("Invalid value for 'enforceActions': '"+v+"', expected 'never', 'always' or 'observed'")}Xt.enforceActions=Ut,Xt.allowStateChanges=Ut!==!0&&Ut!=="strict"}E!==void 0&&(Xt.computedRequiresReaction=!!E),pt!==void 0&&(Xt.reactionRequiresObservable=!!pt),St!==void 0&&(Xt.observableRequiresReaction=!!St,Xt.allowStateReads=!Xt.observableRequiresReaction),M!==void 0&&(Xt.computedConfigurable=!!M),H!==void 0&&(Xt.disableErrorBoundaries=!!H),q&&oc(q)}function qr(h,v,E,M){var H=ca(M=at(M));return It(h),ro(h,M.name,H.enhancer),v&&sa(h,v,E,H),h}function ca(h){return h.defaultDecorator||(h.deep===!1?wt:_t)}function sa(h,v,E,M){var H,q;_r();try{var pt=J(v);try{for(var St=st(pt),Ut=St.next();!Ut.done;Ut=St.next()){var de=Ut.value,oe=Object.getOwnPropertyDescriptor(v,de),xe=(E&&de in E?E[de]:oe.get?zt:M)(h,de,oe,!0);xe&&Object.defineProperty(h,de,xe)}}catch(se){H={error:se}}finally{try{Ut&&!Ut.done&&(q=St.return)&&q.call(St)}finally{if(H)throw H.error}}}finally{wr()}}function Qn(h,v){return la(jr(h,v))}function la(h){var v,E,M={name:h.name};return h.observing&&h.observing.length>0&&(M.dependencies=(v=h.observing,E=[],v.forEach(function(H){E.indexOf(H)===-1&&E.push(H)}),E).map(la)),M}var cc=0;function fa(){this.message="FLOW_CANCELLED"}function pa(h){arguments.length!==1&&w("Flow expects 1 argument and cannot be used as decorator");var v=h.name||"<unnamed flow>";return function(){var E,M=this,H=arguments,q=++cc,pt=Qr(v+" - runid: "+q+" - init",h).apply(M,H),St=void 0,Ut=new Promise(function(de,oe){var xe=0;function se(ke){var sr;St=void 0;try{sr=Qr(v+" - runid: "+q+" - yield "+xe++,pt.next).call(pt,ke)}catch(no){return oe(no)}Sr(sr)}function Oe(ke){var sr;St=void 0;try{sr=Qr(v+" - runid: "+q+" - yield "+xe++,pt.throw).call(pt,ke)}catch(no){return oe(no)}Sr(sr)}function Sr(ke){if(!ke||typeof ke.then!="function")return ke.done?de(ke.value):(St=Promise.resolve(ke.value)).then(se,Oe);ke.then(Sr,oe)}E=oe,se(void 0)});return Ut.cancel=Qr(v+" - runid: "+q+" - cancel",function(){try{St&&qn(St);var de=pt.return(void 0),oe=Promise.resolve(de.value);oe.then(P,P),qn(oe),E(new fa)}catch(xe){E(xe)}}),Ut}}function qn(h){typeof h.cancel=="function"&&h.cancel()}function da(h,v){if(h==null)return!1;if(v!==void 0){if(mr(h)===!1||!h[z].values.has(v))return!1;var E=jr(h,v);return Kr(E)}return Kr(h)}function sc(h){return arguments.length>1?w(!1):da(h)}function ha(h,v){return typeof v!="string"?w(!1):da(h,v)}function ai(h,v){return h!=null&&(v!==void 0?!!mr(h)&&h[z].values.has(v):mr(h)||!!h[z]||L(h)||bo(h)||Kr(h))}function to(h){return arguments.length!==1&&w(!1),ai(h)}function tn(h){return mr(h)?h[z].getKeys():Ie(h)||gr(h)?Array.from(h.keys()):Rr(h)?h.map(function(v,E){return E}):w(!1)}function tr(h){return mr(h)?tn(h).map(function(v){return h[v]}):Ie(h)?tn(h).map(function(v){return h.get(v)}):gr(h)?Array.from(h.values()):Rr(h)?h.slice():w(!1)}function ya(h){return mr(h)?tn(h).map(function(v){return[v,h[v]]}):Ie(h)?tn(h).map(function(v){return[v,h.get(v)]}):gr(h)?Array.from(h.entries()):Rr(h)?h.map(function(v,E){return[E,v]}):w(!1)}function va(h,v,E){if(arguments.length!==2||gr(h))if(mr(h)){var M=h[z],H=M.values.get(v);H?M.write(v,E):M.addObservableProp(v,E,M.defaultEnhancer)}else if(Ie(h))h.set(v,E);else if(gr(h))h.add(v);else{if(!Rr(h))return w(!1);typeof v!="number"&&(v=parseInt(v,10)),A(v>=0,"Not a valid index: '"+v+"'"),_r(),v>=h.length&&(h.length=v+1),h[v]=E,wr()}else{_r();var q=v;try{for(var pt in q)va(h,pt,q[pt])}finally{wr()}}}function ga(h,v,E,M){return typeof E=="function"?function(H,q,pt,St){return Ln(H,q).observe(pt,St)}(h,v,E,M):function(H,q,pt){return Ln(H).observe(q,pt)}(h,v,E)}fa.prototype=Object.create(Error.prototype);var lc={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function vn(h,v,E,M){return M.detectCycles&&h.set(v,E),E}function Dr(h,v,E){if(!v.recurseEverything&&!to(h)||typeof h!="object")return h;if(h===null)return null;if(h instanceof Date)return h;if(hn(h))return Dr(h.get(),v,E);if(to(h)&&tn(h),v.detectCycles===!0&&h!==null&&E.has(h))return E.get(h);if(Rr(h)||Array.isArray(h)){var M=vn(E,h,[],v),H=h.map(function(se){return Dr(se,v,E)});M.length=H.length;for(var q=0,pt=H.length;q<pt;q++)M[q]=H[q];return M}if(gr(h)||Object.getPrototypeOf(h)===Set.prototype){if(v.exportMapsAsObjects===!1){var St=vn(E,h,new Set,v);return h.forEach(function(se){St.add(Dr(se,v,E))}),St}var Ut=vn(E,h,[],v);return h.forEach(function(se){Ut.push(Dr(se,v,E))}),Ut}if(Ie(h)||Object.getPrototypeOf(h)===Map.prototype){if(v.exportMapsAsObjects===!1){var de=vn(E,h,new Map,v);return h.forEach(function(se,Oe){de.set(Oe,Dr(se,v,E))}),de}var oe=vn(E,h,{},v);return h.forEach(function(se,Oe){oe[Oe]=Dr(se,v,E)}),oe}var xe=vn(E,h,{},v);return it(h).forEach(function(se){xe[se]=Dr(h[se],v,E)}),xe}function fc(h,v){var E;return typeof v=="boolean"&&(v={detectCycles:v}),v||(v=lc),v.detectCycles=v.detectCycles===void 0?v.recurseEverything===!0:v.detectCycles===!0,v.detectCycles&&(E=new Map),Dr(h,v,E)}function Nr(h){switch(h.length){case 0:return Xt.trackingDerivation;case 1:return jr(h[0]);case 2:return jr(h[0],h[1])}}function xr(h,v){v===void 0&&(v=void 0),_r();try{return h.apply(v)}finally{wr()}}function ma(h,v,E){return arguments.length===1||v&&typeof v=="object"?pc(h,v):ba(h,v,E||{})}function ba(h,v,E){var M;typeof E.timeout=="number"&&(M=setTimeout(function(){if(!q[z].isDisposed){q();var pt=new Error("WHEN_TIMEOUT");if(!E.onError)throw pt;E.onError(pt)}},E.timeout)),E.name=E.name||"When@"+x();var H=Ce(E.name+"-effect",v),q=ii(function(pt){h()&&(pt.dispose(),M&&clearTimeout(M),H())},E);return q}function pc(h,v){var E,M=new Promise(function(H,q){var pt=ba(h,H,lt(lt({},v),{onError:q}));E=function(){pt(),q("WHEN_CANCELLED")}});return M.cancel=E,M}function _o(h){return h[z]}function en(h){return typeof h=="string"||typeof h=="number"||typeof h=="symbol"}var eo={has:function(h,v){if(v===z||v==="constructor"||v===vt)return!0;var E=_o(h);return en(v)?E.has(v):v in h},get:function(h,v){if(v===z||v==="constructor"||v===vt)return h[v];var E=_o(h),M=E.values.get(v);if(M instanceof T){var H=M.get();return H===void 0&&E.has(v),H}return en(v)&&E.has(v),h[v]},set:function(h,v,E){return!!en(v)&&(va(h,v,E),!0)},deleteProperty:function(h,v){return!!en(v)&&(_o(h).remove(v),!0)},ownKeys:function(h){return _o(h).keysAtom.reportObserved(),Reflect.ownKeys(h)},preventExtensions:function(h){return w("Dynamic observable objects cannot be frozen"),!1}};function dc(h){var v=new Proxy(h,eo);return h[z].proxy=v,v}function cr(h){return h.interceptors!==void 0&&h.interceptors.length>0}function gn(h,v){var E=h.interceptors||(h.interceptors=[]);return E.push(v),S(function(){var M=E.indexOf(v);M!==-1&&E.splice(M,1)})}function ve(h,v){var E=Y();try{for(var M=xt(h.interceptors||[]),H=0,q=M.length;H<q&&(A(!(v=M[H](v))||v.type,"Intercept handlers should return nothing or a change object"),v);H++);return v}finally{ct(E)}}function Er(h){return h.changeListeners!==void 0&&h.changeListeners.length>0}function mn(h,v){var E=h.changeListeners||(h.changeListeners=[]);return E.push(v),S(function(){var M=E.indexOf(v);M!==-1&&E.splice(M,1)})}function Ke(h,v){var E=Y(),M=h.changeListeners;if(M){for(var H=0,q=(M=M.slice()).length;H<q;H++)M[H](v);ct(E)}}var Oa={get:function(h,v){return v===z?h[z]:v==="length"?h[z].getArrayLength():typeof v=="number"?Cr.get.call(h,v):typeof v!="string"||isNaN(v)?Cr.hasOwnProperty(v)?Cr[v]:h[v]:Cr.get.call(h,parseInt(v))},set:function(h,v,E){return v==="length"&&h[z].setArrayLength(E),typeof v=="number"&&Cr.set.call(h,v,E),typeof v=="symbol"||isNaN(v)?h[v]=E:Cr.set.call(h,parseInt(v),E),!0},preventExtensions:function(h){return w("Observable arrays cannot be frozen"),!1}};function ui(h,v,E,M){E===void 0&&(E="ObservableArray@"+x()),M===void 0&&(M=!1);var H,q,pt,St=new _a(E,v,M);H=St.values,q=z,pt=St,Object.defineProperty(H,q,{enumerable:!1,writable:!1,configurable:!0,value:pt});var Ut=new Proxy(St.values,Oa);if(St.proxy=Ut,h&&h.length){var de=ne(!0);St.spliceWithArray(0,0,h),we(de)}return Ut}var _a=function(){function h(v,E,M){this.owned=M,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new T(v||"ObservableArray@"+x()),this.enhancer=function(H,q){return E(H,q,v+"[..]")}}return h.prototype.dehanceValue=function(v){return this.dehancer!==void 0?this.dehancer(v):v},h.prototype.dehanceValues=function(v){return this.dehancer!==void 0&&v.length>0?v.map(this.dehancer):v},h.prototype.intercept=function(v){return gn(this,v)},h.prototype.observe=function(v,E){return E===void 0&&(E=!1),E&&v({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),mn(this,v)},h.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},h.prototype.setArrayLength=function(v){if(typeof v!="number"||v<0)throw new Error("[mobx.array] Out of range: "+v);var E=this.values.length;if(v!==E)if(v>E){for(var M=new Array(v-E),H=0;H<v-E;H++)M[H]=void 0;this.spliceWithArray(E,0,M)}else this.spliceWithArray(v,E-v)},h.prototype.updateArrayLength=function(v,E){if(v!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=E},h.prototype.spliceWithArray=function(v,E,M){var H=this;ae(this.atom);var q=this.values.length;if(v===void 0?v=0:v>q?v=q:v<0&&(v=Math.max(0,q+v)),E=arguments.length===1?q-v:E==null?0:Math.max(0,Math.min(E,q-v)),M===void 0&&(M=g),cr(this)){var pt=ve(this,{object:this.proxy,type:"splice",index:v,removedCount:E,added:M});if(!pt)return g;E=pt.removedCount,M=pt.added}M=M.length===0?M:M.map(function(Ut){return H.enhancer(Ut,void 0)});var St=this.spliceItemsIntoValues(v,E,M);return E===0&&M.length===0||this.notifyArraySplice(v,M,St),this.dehanceValues(St)},h.prototype.spliceItemsIntoValues=function(v,E,M){var H;if(M.length<1e4)return(H=this.values).splice.apply(H,xt([v,E],M));var q=this.values.slice(v,v+E);return this.values=this.values.slice(0,v).concat(M,this.values.slice(v+E)),q},h.prototype.notifyArrayChildUpdate=function(v,E,M){var H=!this.owned&&!1,q=Er(this),pt=q||H?{object:this.proxy,type:"update",index:v,newValue:E,oldValue:M}:null;this.atom.reportChanged(),q&&Ke(this,pt)},h.prototype.notifyArraySplice=function(v,E,M){var H=!this.owned&&!1,q=Er(this),pt=q||H?{object:this.proxy,type:"splice",index:v,removed:M,added:E,removedCount:M.length,addedCount:E.length}:null;this.atom.reportChanged(),q&&Ke(this,pt)},h}(),Cr={intercept:function(h){return this[z].intercept(h)},observe:function(h,v){return v===void 0&&(v=!1),this[z].observe(h,v)},clear:function(){return this.splice(0)},replace:function(h){var v=this[z];return v.spliceWithArray(0,v.values.length,h)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(h,v){for(var E=[],M=2;M<arguments.length;M++)E[M-2]=arguments[M];var H=this[z];switch(arguments.length){case 0:return[];case 1:return H.spliceWithArray(h);case 2:return H.spliceWithArray(h,v)}return H.spliceWithArray(h,v,E)},spliceWithArray:function(h,v,E){return this[z].spliceWithArray(h,v,E)},push:function(){for(var h=[],v=0;v<arguments.length;v++)h[v]=arguments[v];var E=this[z];return E.spliceWithArray(E.values.length,0,h),E.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=[],v=0;v<arguments.length;v++)h[v]=arguments[v];var E=this[z];return E.spliceWithArray(0,0,h),E.values.length},reverse:function(){var h=this.slice();return h.reverse.apply(h,arguments)},sort:function(h){var v=this.slice();return v.sort.apply(v,arguments)},remove:function(h){var v=this[z],E=v.dehanceValues(v.values).indexOf(h);return E>-1&&(this.splice(E,1),!0)},get:function(h){var v=this[z];if(v&&h<v.values.length)return v.atom.reportObserved(),v.dehanceValue(v.values[h])},set:function(h,v){var E=this[z],M=E.values;if(h<M.length){ae(E.atom);var H=M[h];if(cr(E)){var q=ve(E,{type:"update",object:E.proxy,index:h,newValue:v});if(!q)return;v=q.newValue}(v=E.enhancer(v,H))!==H&&(M[h]=v,E.notifyArrayChildUpdate(h,v,H))}else{if(h!==M.length)throw new Error("[mobx.array] Index out of bounds, "+h+" is larger than "+M.length);E.spliceWithArray(h,0,[v])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Cr[h]=function(){var v=this[z];v.atom.reportObserved();var E=v.dehanceValues(v.values);return E[h].apply(E,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Cr[h]=function(v,E){var M=this,H=this[z];return H.atom.reportObserved(),H.dehanceValues(H.values)[h](function(q,pt){return v.call(E,q,pt,M)},E)})}),["reduce","reduceRight"].forEach(function(h){Cr[h]=function(){var v=this,E=this[z];E.atom.reportObserved();var M=arguments[0];return arguments[0]=function(H,q,pt){return q=E.dehanceValue(q),M(H,q,pt,v)},E.values[h].apply(E.values,arguments)}});var wa,wo=B("ObservableArrayAdministration",_a);function Rr(h){return D(h)&&wo(h[z])}var xa,hc={},ci=function(){function h(v,E,M){if(E===void 0&&(E=Ct),M===void 0&&(M="ObservableMap@"+x()),this.enhancer=E,this.name=M,this[wa]=hc,this._keysAtom=C(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(v)}return h.prototype._has=function(v){return this._data.has(v)},h.prototype.has=function(v){var E=this;if(!Xt.trackingDerivation)return this._has(v);var M=this._hasMap.get(v);if(!M){var H=M=new Te(this._has(v),$t,this.name+"."+$(v)+"?",!1);this._hasMap.set(v,H),Cn(H,function(){return E._hasMap.delete(v)})}return M.get()},h.prototype.set=function(v,E){var M=this._has(v);if(cr(this)){var H=ve(this,{type:M?"update":"add",object:this,newValue:E,name:v});if(!H)return this;E=H.newValue}return M?this._updateValue(v,E):this._addValue(v,E),this},h.prototype.delete=function(v){var E=this;if(ae(this._keysAtom),cr(this)&&!(H=ve(this,{type:"delete",object:this,name:v})))return!1;if(this._has(v)){var M=Er(this),H=M?{type:"delete",object:this,oldValue:this._data.get(v).value,name:v}:null;return xr(function(){E._keysAtom.reportChanged(),E._updateHasMapEntry(v,!1),E._data.get(v).setNewValue(void 0),E._data.delete(v)}),M&&Ke(this,H),!0}return!1},h.prototype._updateHasMapEntry=function(v,E){var M=this._hasMap.get(v);M&&M.setNewValue(E)},h.prototype._updateValue=function(v,E){var M=this._data.get(v);if((E=M.prepareNewValue(E))!==Xt.UNCHANGED){var H=Er(this),q=H?{type:"update",object:this,oldValue:M.value,name:v,newValue:E}:null;M.setNewValue(E),H&&Ke(this,q)}},h.prototype._addValue=function(v,E){var M=this;ae(this._keysAtom),xr(function(){var pt=new Te(E,M.enhancer,M.name+"."+$(v),!1);M._data.set(v,pt),E=pt.value,M._updateHasMapEntry(v,!0),M._keysAtom.reportChanged()});var H=Er(this),q=H?{type:"add",object:this,name:v,newValue:E}:null;H&&Ke(this,q)},h.prototype.get=function(v){return this.has(v)?this.dehanceValue(this._data.get(v).get()):this.dehanceValue(void 0)},h.prototype.dehanceValue=function(v){return this.dehancer!==void 0?this.dehancer(v):v},h.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},h.prototype.values=function(){var v=this,E=this.keys();return Po({next:function(){var M=E.next(),H=M.done,q=M.value;return{done:H,value:H?void 0:v.get(q)}}})},h.prototype.entries=function(){var v=this,E=this.keys();return Po({next:function(){var M=E.next(),H=M.done,q=M.value;return{done:H,value:H?void 0:[q,v.get(q)]}}})},h.prototype[wa=z,Symbol.iterator]=function(){return this.entries()},h.prototype.forEach=function(v,E){var M,H;try{for(var q=st(this),pt=q.next();!pt.done;pt=q.next()){var St=yt(pt.value,2),Ut=St[0],de=St[1];v.call(E,de,Ut,this)}}catch(oe){M={error:oe}}finally{try{pt&&!pt.done&&(H=q.return)&&H.call(q)}finally{if(M)throw M.error}}},h.prototype.merge=function(v){var E=this;return Ie(v)&&(v=v.toJS()),xr(function(){var M=ne(!0);try{N(v)?it(v).forEach(function(H){return E.set(H,v[H])}):Array.isArray(v)?v.forEach(function(H){var q=yt(H,2),pt=q[0],St=q[1];return E.set(pt,St)}):F(v)?(v.constructor!==Map&&w("Cannot initialize from classes that inherit from Map: "+v.constructor.name),v.forEach(function(H,q){return E.set(q,H)})):v!=null&&w("Cannot initialize map from "+v)}finally{we(M)}}),this},h.prototype.clear=function(){var v=this;xr(function(){rt(function(){var E,M;try{for(var H=st(v.keys()),q=H.next();!q.done;q=H.next()){var pt=q.value;v.delete(pt)}}catch(St){E={error:St}}finally{try{q&&!q.done&&(M=H.return)&&M.call(H)}finally{if(E)throw E.error}}})})},h.prototype.replace=function(v){var E=this;return xr(function(){var M,H,q,pt,St=function(lr){if(F(lr)||Ie(lr))return lr;if(Array.isArray(lr))return new Map(lr);if(N(lr)){var ka=new Map;for(var oo in lr)ka.set(oo,lr[oo]);return ka}return w("Cannot convert to map from '"+lr+"'")}(v),Ut=new Map,de=!1;try{for(var oe=st(E._data.keys()),xe=oe.next();!xe.done;xe=oe.next()){var se=xe.value;if(!St.has(se))if(E.delete(se))de=!0;else{var Oe=E._data.get(se);Ut.set(se,Oe)}}}catch(lr){M={error:lr}}finally{try{xe&&!xe.done&&(H=oe.return)&&H.call(oe)}finally{if(M)throw M.error}}try{for(var Sr=st(St.entries()),ke=Sr.next();!ke.done;ke=Sr.next()){var sr=yt(ke.value,2),no=(se=sr[0],Oe=sr[1],E._data.has(se));if(E.set(se,Oe),E._data.has(se)){var vc=E._data.get(se);Ut.set(se,vc),no||(de=!0)}}}catch(lr){q={error:lr}}finally{try{ke&&!ke.done&&(pt=Sr.return)&&pt.call(Sr)}finally{if(q)throw q.error}}if(!de)if(E._data.size!==Ut.size)E._keysAtom.reportChanged();else for(var Pa=E._data.keys(),Aa=Ut.keys(),Ao=Pa.next(),pi=Aa.next();!Ao.done;){if(Ao.value!==pi.value){E._keysAtom.reportChanged();break}Ao=Pa.next(),pi=Aa.next()}E._data=Ut}),this},Object.defineProperty(h.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.toPOJO=function(){var v,E,M={};try{for(var H=st(this),q=H.next();!q.done;q=H.next()){var pt=yt(q.value,2),St=pt[0],Ut=pt[1];M[typeof St=="symbol"?St:$(St)]=Ut}}catch(de){v={error:de}}finally{try{q&&!q.done&&(E=H.return)&&E.call(H)}finally{if(v)throw v.error}}return M},h.prototype.toJS=function(){return new Map(this)},h.prototype.toJSON=function(){return this.toPOJO()},h.prototype.toString=function(){var v=this;return this.name+"[{ "+Array.from(this.keys()).map(function(E){return $(E)+": "+v.get(E)}).join(", ")+" }]"},h.prototype.observe=function(v,E){return mn(this,v)},h.prototype.intercept=function(v){return gn(this,v)},h}(),Ie=B("ObservableMap",ci),In={},xo=function(){function h(v,E,M){if(E===void 0&&(E=Ct),M===void 0&&(M="ObservableSet@"+x()),this.name=M,this[xa]=In,this._data=new Set,this._atom=C(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 E(H,q,M)},v&&this.replace(v)}return h.prototype.dehanceValue=function(v){return this.dehancer!==void 0?this.dehancer(v):v},h.prototype.clear=function(){var v=this;xr(function(){rt(function(){var E,M;try{for(var H=st(v._data.values()),q=H.next();!q.done;q=H.next()){var pt=q.value;v.delete(pt)}}catch(St){E={error:St}}finally{try{q&&!q.done&&(M=H.return)&&M.call(H)}finally{if(E)throw E.error}}})})},h.prototype.forEach=function(v,E){var M,H;try{for(var q=st(this),pt=q.next();!pt.done;pt=q.next()){var St=pt.value;v.call(E,St,St,this)}}catch(Ut){M={error:Ut}}finally{try{pt&&!pt.done&&(H=q.return)&&H.call(q)}finally{if(M)throw M.error}}},Object.defineProperty(h.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.add=function(v){var E=this;if(ae(this._atom),cr(this)&&!(H=ve(this,{type:"add",object:this,newValue:v})))return this;if(!this.has(v)){xr(function(){E._data.add(E.enhancer(v,void 0)),E._atom.reportChanged()});var M=Er(this),H=M?{type:"add",object:this,newValue:v}:null;M&&Ke(this,H)}return this},h.prototype.delete=function(v){var E=this;if(cr(this)&&!(H=ve(this,{type:"delete",object:this,oldValue:v})))return!1;if(this.has(v)){var M=Er(this),H=M?{type:"delete",object:this,oldValue:v}:null;return xr(function(){E._atom.reportChanged(),E._data.delete(v)}),M&&Ke(this,H),!0}return!1},h.prototype.has=function(v){return this._atom.reportObserved(),this._data.has(this.dehanceValue(v))},h.prototype.entries=function(){var v=0,E=Array.from(this.keys()),M=Array.from(this.values());return Po({next:function(){var H=v;return v+=1,H<M.length?{value:[E[H],M[H]],done:!1}:{done:!0}}})},h.prototype.keys=function(){return this.values()},h.prototype.values=function(){this._atom.reportObserved();var v=this,E=0,M=Array.from(this._data.values());return Po({next:function(){return E<M.length?{value:v.dehanceValue(M[E++]),done:!1}:{done:!0}}})},h.prototype.replace=function(v){var E=this;return gr(v)&&(v=v.toJS()),xr(function(){var M=ne(!0);try{Array.isArray(v)||tt(v)?(E.clear(),v.forEach(function(H){return E.add(H)})):v!=null&&w("Cannot initialize set from "+v)}finally{we(M)}}),this},h.prototype.observe=function(v,E){return mn(this,v)},h.prototype.intercept=function(v){return gn(this,v)},h.prototype.toJS=function(){return new Set(this)},h.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},h.prototype[xa=z,Symbol.iterator]=function(){return this.values()},h}(),gr=B("ObservableSet",xo),Ea=function(){function h(v,E,M,H){E===void 0&&(E=new Map),this.target=v,this.values=E,this.name=M,this.defaultEnhancer=H,this.keysAtom=new T(M+".keys")}return h.prototype.read=function(v){return this.values.get(v).get()},h.prototype.write=function(v,E){var M=this.target,H=this.values.get(v);if(H instanceof Jr)H.set(E);else{if(cr(this)){if(!(pt=ve(this,{type:"update",object:this.proxy||M,name:v,newValue:E})))return;E=pt.newValue}if((E=H.prepareNewValue(E))!==Xt.UNCHANGED){var q=Er(this),pt=q?{type:"update",object:this.proxy||M,oldValue:H.value,name:v,newValue:E}:null;H.setNewValue(E),q&&Ke(this,pt)}}},h.prototype.has=function(v){var E=this.pendingKeys||(this.pendingKeys=new Map),M=E.get(v);if(M)return M.get();var H=!!this.values.get(v);return M=new Te(H,$t,this.name+"."+$(v)+"?",!1),E.set(v,M),M.get()},h.prototype.addObservableProp=function(v,E,M){M===void 0&&(M=this.defaultEnhancer);var H=this.target;if(cr(this)){var q=ve(this,{object:this.proxy||H,name:v,type:"add",newValue:E});if(!q)return;E=q.newValue}var pt=new Te(E,M,this.name+"."+$(v),!1);this.values.set(v,pt),E=pt.value,Object.defineProperty(H,v,function(St){return Eo[St]||(Eo[St]={configurable:!0,enumerable:!0,get:function(){return this[z].read(St)},set:function(Ut){this[z].write(St,Ut)}})}(v)),this.notifyPropertyAddition(v,E)},h.prototype.addComputedProp=function(v,E,M){var H,q,pt,St=this.target;M.name=M.name||this.name+"."+$(E),this.values.set(E,new Jr(M)),(v===St||(H=v,q=E,!(pt=Object.getOwnPropertyDescriptor(H,q))||pt.configurable!==!1&&pt.writable!==!1))&&Object.defineProperty(v,E,function(Ut){return jo[Ut]||(jo[Ut]={configurable:Xt.computedConfigurable,enumerable:!1,get:function(){return So(this).read(Ut)},set:function(de){So(this).write(Ut,de)}})}(E))},h.prototype.remove=function(v){if(this.values.has(v)){var E=this.target;if(cr(this)&&!(Ut=ve(this,{object:this.proxy||E,name:v,type:"remove"})))return;try{_r();var M=Er(this),H=!1,q=this.values.get(v),pt=q&&q.get();if(q&&q.set(void 0),this.keysAtom.reportChanged(),this.values.delete(v),this.pendingKeys){var St=this.pendingKeys.get(v);St&&St.set(!1)}delete this.target[v];var Ut=M?{type:"remove",object:this.proxy||E,oldValue:pt,name:v}:null;M&&Ke(this,Ut)}finally{wr()}}},h.prototype.illegalAccess=function(v,E){},h.prototype.observe=function(v,E){return mn(this,v)},h.prototype.intercept=function(v){return gn(this,v)},h.prototype.notifyPropertyAddition=function(v,E){var M=Er(this),H=M?{type:"add",object:this.proxy||this.target,name:v,newValue:E}:null;if(M&&Ke(this,H),this.pendingKeys){var q=this.pendingKeys.get(v);q&&q.set(!0)}this.keysAtom.reportChanged()},h.prototype.getKeys=function(){var v,E;this.keysAtom.reportObserved();var M=[];try{for(var H=st(this.values),q=H.next();!q.done;q=H.next()){var pt=yt(q.value,2),St=pt[0];pt[1]instanceof Te&&M.push(St)}}catch(Ut){v={error:Ut}}finally{try{q&&!q.done&&(E=H.return)&&E.call(H)}finally{if(v)throw v.error}}return M},h}();function ro(h,v,E){if(v===void 0&&(v=""),E===void 0&&(E=Ct),Object.prototype.hasOwnProperty.call(h,z))return h[z];N(h)||(v=(h.constructor.name||"ObservableObject")+"@"+x()),v||(v="ObservableObject@"+x());var M=new Ea(h,new Map,$(v),E);return I(h,z,M),M}var Eo=Object.create(null),jo=Object.create(null);function So(h){var v=h[z];return v||(It(h),h[z])}var ja=B("ObservableObjectAdministration",Ea);function mr(h){return!!D(h)&&(It(h),ja(h[z]))}function jr(h,v){if(typeof h=="object"&&h!==null){if(Rr(h))return v!==void 0&&w(!1),h[z].atom;if(gr(h))return h[z];if(Ie(h)){var E=h;return v===void 0?E._keysAtom:((M=E._data.get(v)||E._hasMap.get(v))||w(!1),M)}var M;if(It(h),v&&!h[z]&&h[v],mr(h))return v?((M=h[z].values.get(v))||w(!1),M):w(!1);if(L(h)||Kr(h)||bo(h))return h}else if(typeof h=="function"&&bo(h[z]))return h[z];return w(!1)}function Ln(h,v){return h||w("Expecting some object"),v!==void 0?Ln(jr(h,v)):L(h)||Kr(h)||bo(h)||Ie(h)||gr(h)?h:(It(h),h[z]?h[z]:void w(!1))}var si=Object.prototype.toString;function li(h,v,E){return E===void 0&&(E=-1),fi(h,v,E)}function fi(h,v,E,M,H){if(h===v)return h!==0||1/h==1/v;if(h==null||v==null)return!1;if(h!=h)return v!=v;var q=typeof h;if(q!=="function"&&q!=="object"&&typeof v!="object")return!1;var pt=si.call(h);if(pt!==si.call(v))return!1;switch(pt){case"[object RegExp]":case"[object String]":return""+h==""+v;case"[object Number]":return+h!=+h?+v!=+v:+h==0?1/+h==1/v:+h==+v;case"[object Date]":case"[object Boolean]":return+h==+v;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(h)===Symbol.valueOf.call(v);case"[object Map]":case"[object Set]":E>=0&&E++}h=Sa(h),v=Sa(v);var St=pt==="[object Array]";if(!St){if(typeof h!="object"||typeof v!="object")return!1;var Ut=h.constructor,de=v.constructor;if(Ut!==de&&!(typeof Ut=="function"&&Ut instanceof Ut&&typeof de=="function"&&de instanceof de)&&"constructor"in h&&"constructor"in v)return!1}if(E===0)return!1;E<0&&(E=-1),H=H||[];for(var oe=(M=M||[]).length;oe--;)if(M[oe]===h)return H[oe]===v;if(M.push(h),H.push(v),St){if((oe=h.length)!==v.length)return!1;for(;oe--;)if(!fi(h[oe],v[oe],E-1,M,H))return!1}else{var xe=Object.keys(h),se=void 0;if(oe=xe.length,Object.keys(v).length!==oe)return!1;for(;oe--;)if(!yc(v,se=xe[oe])||!fi(h[se],v[se],E-1,M,H))return!1}return M.pop(),H.pop(),!0}function Sa(h){return Rr(h)?h.slice():F(h)||Ie(h)||tt(h)||gr(h)?Array.from(h.entries()):h}function yc(h,v){return Object.prototype.hasOwnProperty.call(h,v)}function Po(h){return h[Symbol.iterator]=bn,h}function bn(){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:oa,extras:{getDebugName:function(h,v){return(v!==void 0?jr(h,v):mr(h)||Ie(h)||gr(h)?Ln(h):jr(h)).name}},$mobx:z})}).call(this,i(155),i(82))},function(c,f,i){var l=i(116),s=i(44),g=i(179);l||s(Object.prototype,"toString",g,{unsafe:!0})},function(c,f,i){var l=i(40),s=i(83),g=i(70),b=i(56),x=i(111),w="Array Iterator",A=b.set,S=b.getterFor(w);c.exports=x(Array,"Array",function(P,D){A(this,{type:w,target:l(P),index:0,kind:D})},function(){var P=S(this),D=P.target,N=P.kind,I=P.index++;return!D||I>=D.length?(P.target=void 0,{value:void 0,done:!0}):N=="keys"?{value:I,done:!1}:N=="values"?{value:D[I],done:!1}:{value:[I,D[I]],done:!1}},"values"),g.Arguments=g.Array,s("keys"),s("values"),s("entries")},function(c,f,i){var l=i(7),s=i(147),g=i(148),b=i(3),x=i(57),w=i(27),A=w("iterator"),S=w("toStringTag"),P=b.values,D=function(I,B){if(I){if(I[A]!==P)try{x(I,A,P)}catch(tt){I[A]=P}if(I[S]||x(I,S,B),s[B]){for(var F in b)if(I[F]!==b[F])try{x(I,F,b[F])}catch(tt){I[F]=b[F]}}}};for(var N in s)D(l[N]&&l[N].prototype,N);D(g,"DOMTokenList")},function(c,f,i){var l=i(17),s=i(7),g=i(46),b=i(76),x=i(35),w=i(15),A=i(64),S=i(36),P=i(109),D=i(19),N=i(34),I=i(99),B=i(28),F=i(33),tt=i(58),it=i(88),$=i(32),G=i(38),J=i(40),z=i(87),T=i(41),L=i(71),C=i(54),U=i(66),Q=i(72),lt=i(139),st=i(112),yt=i(51),xt=i(37),vt=i(93),ut=i(101),ht=i(44),mt=i(84),jt=i(91),It=i(69),Kt=i(85),Pt=i(27),Ct=i(149),$t=i(150),K=i(73),Z=i(56),at=i(74).forEach,_t=jt("hidden"),At="Symbol",wt=Pt("toPrimitive"),Wt=Z.set,re=Z.getterFor(At),Qt=Object.prototype,Gt=s.Symbol,gt=Gt&&Gt.prototype,Ht=s.TypeError,et=s.QObject,zt=g("JSON","stringify"),ue=yt.f,ge=xt.f,ie=lt.f,ye=vt.f,je=w([].push),Pe=mt("symbols"),ae=mt("op-symbols"),Ne=mt("string-to-symbol-registry"),X=mt("symbol-to-string-registry"),rt=mt("wks"),Y=!et||!et.prototype||!et.prototype.findChild,ct=S&&D(function(){return C(ge({},"a",{get:function(){return ge(this,"a",{value:7}).a}})).a!=7})?function(Lt,Zt,te){var ne=ue(Qt,Zt);ne&&delete Qt[Zt],ge(Lt,Zt,te),ne&&Lt!==Qt&&ge(Qt,Zt,ne)}:ge,Tt=function(Lt,Zt){var te=Pe[Lt]=C(gt);return Wt(te,{type:At,tag:Lt,description:Zt}),S||(te.description=Zt),te},Dt=function(Lt,Zt,te){Lt===Qt&&Dt(ae,Zt,te),$(Lt);var ne=z(Zt);return $(te),N(Pe,ne)?(te.enumerable?(N(Lt,_t)&&Lt[_t][ne]&&(Lt[_t][ne]=!1),te=C(te,{enumerable:L(0,!1)})):(N(Lt,_t)||ge(Lt,_t,L(1,{})),Lt[_t][ne]=!0),ct(Lt,ne,te)):ge(Lt,ne,te)},Vt=function(Lt,Zt){$(Lt);var te=J(Zt),ne=U(te).concat(Ce(te));return at(ne,function(we){S&&!x(fe,te,we)||Dt(Lt,we,te[we])}),Lt},fe=function(Lt){var Zt=z(Lt),te=x(ye,this,Zt);return!(this===Qt&&N(Pe,Zt)&&!N(ae,Zt))&&(!(te||!N(this,Zt)||!N(Pe,Zt)||N(this,_t)&&this[_t][Zt])||te)},Fe=function(Lt,Zt){var te=J(Lt),ne=z(Zt);if(te!==Qt||!N(Pe,ne)||N(ae,ne)){var we=ue(te,ne);return!we||!N(Pe,ne)||N(te,_t)&&te[_t][ne]||(we.enumerable=!0),we}},Je=function(Lt){var Zt=ie(J(Lt)),te=[];return at(Zt,function(ne){N(Pe,ne)||N(It,ne)||je(te,ne)}),te},Ce=function(Lt){var Zt=Lt===Qt,te=ie(Zt?ae:J(Lt)),ne=[];return at(te,function(we){!N(Pe,we)||Zt&&!N(Qt,we)||je(ne,Pe[we])}),ne};if(P||(Gt=function(){if(tt(gt,this))throw Ht("Symbol is not a constructor");var Lt=arguments.length&&arguments[0]!==void 0?T(arguments[0]):void 0,Zt=Kt(Lt),te=function(ne){this===Qt&&x(te,ae,ne),N(this,_t)&&N(this[_t],Zt)&&(this[_t][Zt]=!1),ct(this,Zt,L(1,ne))};return S&&Y&&ct(Qt,Zt,{configurable:!0,set:te}),Tt(Zt,Lt)},ht(gt=Gt.prototype,"toString",function(){return re(this).tag}),ht(Gt,"withoutSetter",function(Lt){return Tt(Kt(Lt),Lt)}),vt.f=fe,xt.f=Dt,yt.f=Fe,Q.f=lt.f=Je,st.f=Ce,Ct.f=function(Lt){return Tt(Pt(Lt),Lt)},S&&(ge(gt,"description",{configurable:!0,get:function(){return re(this).description}}),A||ht(Qt,"propertyIsEnumerable",fe,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:Gt}),at(U(rt),function(Lt){$t(Lt)}),l({target:At,stat:!0,forced:!P},{for:function(Lt){var Zt=T(Lt);if(N(Ne,Zt))return Ne[Zt];var te=Gt(Zt);return Ne[Zt]=te,X[te]=Zt,te},keyFor:function(Lt){if(!it(Lt))throw Ht(Lt+" is not a symbol");if(N(X,Lt))return X[Lt]},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),l({target:"Object",stat:!0,forced:!P,sham:!S},{create:function(Lt,Zt){return Zt===void 0?C(Lt):Vt(C(Lt),Zt)},defineProperty:Dt,defineProperties:Vt,getOwnPropertyDescriptor:Fe}),l({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:Je,getOwnPropertySymbols:Ce}),l({target:"Object",stat:!0,forced:D(function(){st.f(1)})},{getOwnPropertySymbols:function(Lt){return st.f(G(Lt))}}),zt&&l({target:"JSON",stat:!0,forced:!P||D(function(){var Lt=Gt();return zt([Lt])!="[null]"||zt({a:Lt})!="{}"||zt(Object(Lt))!="{}"})},{stringify:function(Lt,Zt,te){var ne=ut(arguments),we=Zt;if((F(Zt)||Lt!==void 0)&&!it(Lt))return I(Zt)||(Zt=function(Te,hn){if(B(we)&&(hn=x(we,this,Te,hn)),!it(hn))return hn}),ne[1]=Zt,b(zt,null,ne)}}),!gt[wt]){var Re=gt.valueOf;ht(gt,wt,function(Lt){return x(Re,this)})}K(Gt,At),It[_t]=!0},function(c,f,i){var l=i(146).charAt,s=i(41),g=i(56),b=i(111),x="String Iterator",w=g.set,A=g.getterFor(x);b(String,"String",function(S){w(this,{type:x,string:s(S),index:0})},function(){var S,P=A(this),D=P.string,N=P.index;return N>=D.length?{value:void 0,done:!0}:(S=l(D,N),P.index+=S.length,{value:S,done:!1})})},function(c,f,i){(function(l){var s=function(g){return g&&g.Math==Math&&g};c.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof l=="object"&&l)||function(){return this}()||Function("return this")()}).call(this,i(82))},function(c,f,i){var l=i(17),s=i(36),g=i(7),b=i(15),x=i(34),w=i(28),A=i(58),S=i(41),P=i(37).f,D=i(134),N=g.Symbol,I=N&&N.prototype;if(s&&w(N)&&(!("description"in I)||N().description!==void 0)){var B={},F=function(){var T=arguments.length<1||arguments[0]===void 0?void 0:S(arguments[0]),L=A(I,this)?new N(T):T===void 0?N():N(T);return T===""&&(B[L]=!0),L};D(F,N),F.prototype=I,I.constructor=F;var tt=String(N("test"))=="Symbol(test)",it=b(I.toString),$=b(I.valueOf),G=/^Symbol\((.*)\)[^)]+$/,J=b("".replace),z=b("".slice);P(I,"description",{configurable:!0,get:function(){var T=$(this),L=it(T);if(x(B,T))return"";var C=tt?z(L,7,-1):J(L,G,"$1");return C===""?void 0:C}}),l({global:!0,forced:!0},{Symbol:F})}},function(c,f,i){i(150)("iterator")},function(c,f,i){i.d(f,"a",function(){return b.a}),i.d(f,"c",function(){return b.e}),i.d(f,"h",function(){return G}),i.d(f,"i",function(){return tt}),i.d(f,"j",function(){return B}),i.d(f,"b",function(){return yt}),i.d(f,"e",function(){return ht}),i.d(f,"f",function(){return xt}),i.d(f,"g",function(){return Pe});var l,s,g,b=i(0),x=0,w=[],A=b.i.__b,S=b.i.__r,P=b.i.diffed,D=b.i.__c,N=b.i.unmount;function I(X,rt){b.i.__h&&b.i.__h(s,X,x||rt),x=0;var Y=s.__H||(s.__H={__:[],__h:[]});return X>=Y.__.length&&Y.__.push({}),Y.__[X]}function B(X){return x=1,F(Q,X)}function F(X,rt,Y){var ct=I(l++,2);return ct.t=X,ct.__c||(ct.__=[Y?Y(rt):Q(void 0,rt),function(Tt){var Dt=ct.t(ct.__[0],Tt);ct.__[0]!==Dt&&(ct.__=[Dt,ct.__[1]],ct.__c.setState({}))}],ct.__c=s),ct.__}function tt(X,rt){var Y=I(l++,3);!b.i.__s&&U(Y.__H,rt)&&(Y.__=X,Y.__H=rt,s.__H.__h.push(Y))}function it(X,rt){var Y=I(l++,4);!b.i.__s&&U(Y.__H,rt)&&(Y.__=X,Y.__H=rt,s.__h.push(Y))}function $(X,rt){var Y=I(l++,7);return U(Y.__H,rt)&&(Y.__=X(),Y.__H=rt,Y.__h=X),Y.__}function G(X,rt){return x=8,$(function(){return X},rt)}function J(){var X;for(w.sort(function(rt,Y){return rt.__v.__b-Y.__v.__b});X=w.pop();)if(X.__P)try{X.__H.__h.forEach(L),X.__H.__h.forEach(C),X.__H.__h=[]}catch(rt){X.__H.__h=[],b.i.__e(rt,X.__v)}}b.i.__b=function(X){s=null,A&&A(X)},b.i.__r=function(X){S&&S(X),l=0;var rt=(s=X.__c).__H;rt&&(rt.__h.forEach(L),rt.__h.forEach(C),rt.__h=[])},b.i.diffed=function(X){P&&P(X);var rt=X.__c;rt&&rt.__H&&rt.__H.__h.length&&(w.push(rt)!==1&&g===b.i.requestAnimationFrame||((g=b.i.requestAnimationFrame)||T)(J)),s=null},b.i.__c=function(X,rt){rt.some(function(Y){try{Y.__h.forEach(L),Y.__h=Y.__h.filter(function(ct){return!ct.__||C(ct)})}catch(ct){rt.some(function(Tt){Tt.__h&&(Tt.__h=[])}),rt=[],b.i.__e(ct,Y.__v)}}),D&&D(X,rt)},b.i.unmount=function(X){N&&N(X);var rt,Y=X.__c;Y&&Y.__H&&(Y.__H.__.forEach(function(ct){try{L(ct)}catch(Tt){rt=Tt}}),rt&&b.i.__e(rt,Y.__v))};var z=typeof requestAnimationFrame=="function";function T(X){var rt,Y=function(){clearTimeout(ct),z&&cancelAnimationFrame(rt),setTimeout(X)},ct=setTimeout(Y,100);z&&(rt=requestAnimationFrame(Y))}function L(X){var rt=s,Y=X.__c;typeof Y=="function"&&(X.__c=void 0,Y()),s=rt}function C(X){var rt=s;X.__c=X.__(),s=rt}function U(X,rt){return!X||X.length!==rt.length||rt.some(function(Y,ct){return Y!==X[ct]})}function Q(X,rt){return typeof rt=="function"?rt(X):rt}function lt(X,rt){for(var Y in rt)X[Y]=rt[Y];return X}function st(X,rt){for(var Y in X)if(Y!=="__source"&&!(Y in rt))return!0;for(var ct in rt)if(ct!=="__source"&&X[ct]!==rt[ct])return!0;return!1}function yt(X){this.props=X}function xt(X,rt){function Y(Tt){var Dt=this.props.ref,Vt=Dt==Tt.ref;return!Vt&&Dt&&(Dt.call?Dt(null):Dt.current=null),rt?!rt(this.props,Tt)||!Vt:st(this.props,Tt)}function ct(Tt){return this.shouldComponentUpdate=Y,Object(b.e)(X,Tt)}return ct.displayName="Memo("+(X.displayName||X.name)+")",ct.prototype.isReactComponent=!0,ct.__f=!0,ct}(yt.prototype=new b.a).isPureReactComponent=!0,yt.prototype.shouldComponentUpdate=function(X,rt){return st(this.props,X)||st(this.state,rt)};var vt=b.i.__b;b.i.__b=function(X){X.type&&X.type.__f&&X.ref&&(X.props.ref=X.ref,X.ref=null),vt&&vt(X)};var ut=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ht(X){function rt(Y,ct){var Tt=lt({},Y);return delete Tt.ref,X(Tt,!(ct=Y.ref||ct)||typeof ct=="object"&&!("current"in ct)?null:ct)}return rt.$$typeof=ut,rt.render=rt,rt.prototype.isReactComponent=rt.__f=!0,rt.displayName="ForwardRef("+(X.displayName||X.name)+")",rt}var mt=function(X,rt){return X==null?null:Object(b.k)(Object(b.k)(X).map(rt))},jt={map:mt,forEach:mt,count:function(X){return X?Object(b.k)(X).length:0},only:function(X){var rt=Object(b.k)(X);if(rt.length!==1)throw"Children.only";return rt[0]},toArray:b.k},It=b.i.__e;b.i.__e=function(X,rt,Y){if(X.then){for(var ct,Tt=rt;Tt=Tt.__;)if((ct=Tt.__c)&&ct.__c)return rt.__e==null&&(rt.__e=Y.__e,rt.__k=Y.__k),ct.__c(X,rt)}It(X,rt,Y)};var Kt=b.i.unmount;function Pt(X,rt,Y){return X&&(X.__c&&X.__c.__H&&(X.__c.__H.__.forEach(function(ct){typeof ct.__c=="function"&&ct.__c()}),X.__c.__H=null),(X=lt({},X)).__c!=null&&(X.__c.__P===Y&&(X.__c.__P=rt),X.__c=null),X.__k=X.__k&&X.__k.map(function(ct){return Pt(ct,rt,Y)})),X}function Ct(X,rt,Y){return X&&(X.__v=null,X.__k=X.__k&&X.__k.map(function(ct){return Ct(ct,rt,Y)}),X.__c&&X.__c.__P===rt&&(X.__e&&Y.insertBefore(X.__e,X.__d),X.__c.__e=!0,X.__c.__P=Y)),X}function $t(){this.__u=0,this.t=null,this.__b=null}function K(X){var rt=X.__.__c;return rt&&rt.__e&&rt.__e(X)}function Z(){this.u=null,this.o=null}b.i.unmount=function(X){var rt=X.__c;rt&&rt.__R&&rt.__R(),rt&&X.__h===!0&&(X.type=null),Kt&&Kt(X)},($t.prototype=new b.a).__c=function(X,rt){var Y=rt.__c,ct=this;ct.t==null&&(ct.t=[]),ct.t.push(Y);var Tt=K(ct.__v),Dt=!1,Vt=function(){Dt||(Dt=!0,Y.__R=null,Tt?Tt(fe):fe())};Y.__R=Vt;var fe=function(){if(!--ct.__u){if(ct.state.__e){var Je=ct.state.__e;ct.__v.__k[0]=Ct(Je,Je.__c.__P,Je.__c.__O)}var Ce;for(ct.setState({__e:ct.__b=null});Ce=ct.t.pop();)Ce.forceUpdate()}},Fe=rt.__h===!0;ct.__u++||Fe||ct.setState({__e:ct.__b=ct.__v.__k[0]}),X.then(Vt,Vt)},$t.prototype.componentWillUnmount=function(){this.t=[]},$t.prototype.render=function(X,rt){if(this.__b){if(this.__v.__k){var Y=document.createElement("div"),ct=this.__v.__k[0].__c;this.__v.__k[0]=Pt(this.__b,Y,ct.__O=ct.__P)}this.__b=null}var Tt=rt.__e&&Object(b.e)(b.b,null,X.fallback);return Tt&&(Tt.__h=null),[Object(b.e)(b.b,null,rt.__e?null:X.children),Tt]};var at=function(X,rt,Y){if(++Y[1]===Y[0]&&X.o.delete(rt),X.props.revealOrder&&(X.props.revealOrder[0]!=="t"||!X.o.size))for(Y=X.u;Y;){for(;Y.length>3;)Y.pop()();if(Y[1]<Y[0])break;X.u=Y=Y[2]}};function _t(X){return this.getChildContext=function(){return X.context},X.children}function At(X){var rt=this,Y=X.i;rt.componentWillUnmount=function(){Object(b.j)(null,rt.l),rt.l=null,rt.i=null},rt.i&&rt.i!==Y&&rt.componentWillUnmount(),X.__v?(rt.l||(rt.i=Y,rt.l={nodeType:1,parentNode:Y,childNodes:[],appendChild:function(ct){this.childNodes.push(ct),rt.i.appendChild(ct)},insertBefore:function(ct,Tt){this.childNodes.push(ct),rt.i.appendChild(ct)},removeChild:function(ct){this.childNodes.splice(this.childNodes.indexOf(ct)>>>1,1),rt.i.removeChild(ct)}}),Object(b.j)(Object(b.e)(_t,{context:rt.context},X.__v),rt.l)):rt.l&&rt.componentWillUnmount()}(Z.prototype=new b.a).__e=function(X){var rt=this,Y=K(rt.__v),ct=rt.o.get(X);return ct[0]++,function(Tt){var Dt=function(){rt.props.revealOrder?(ct.push(Tt),at(rt,X,ct)):Tt()};Y?Y(Dt):Dt()}},Z.prototype.render=function(X){this.u=null,this.o=new Map;var rt=Object(b.k)(X.children);X.revealOrder&&X.revealOrder[0]==="b"&&rt.reverse();for(var Y=rt.length;Y--;)this.o.set(rt[Y],this.u=[1,0,this.u]);return X.children},Z.prototype.componentDidUpdate=Z.prototype.componentDidMount=function(){var X=this;this.o.forEach(function(rt,Y){at(X,Y,rt)})};var wt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Wt=/^(?: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]/,re=typeof document<"u",Qt=function(X){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(X)};b.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(X){Object.defineProperty(b.a.prototype,X,{configurable:!0,get:function(){return this["UNSAFE_"+X]},set:function(rt){Object.defineProperty(this,X,{configurable:!0,writable:!0,value:rt})}})});var Gt=b.i.event;function gt(){}function Ht(){return this.cancelBubble}function et(){return this.defaultPrevented}b.i.event=function(X){return Gt&&(X=Gt(X)),X.persist=gt,X.isPropagationStopped=Ht,X.isDefaultPrevented=et,X.nativeEvent=X};var zt,ue={configurable:!0,get:function(){return this.class}},ge=b.i.vnode;b.i.vnode=function(X){var rt=X.type,Y=X.props,ct=Y;if(typeof rt=="string"){var Tt=rt.indexOf("-")===-1;for(var Dt in ct={},Y){var Vt=Y[Dt];re&&Dt==="children"&&rt==="noscript"||Dt==="value"&&"defaultValue"in Y&&Vt==null||(Dt==="defaultValue"&&"value"in Y&&Y.value==null?Dt="value":Dt==="download"&&Vt===!0?Vt="":/ondoubleclick/i.test(Dt)?Dt="ondblclick":/^onchange(textarea|input)/i.test(Dt+rt)&&!Qt(Y.type)?Dt="oninput":/^onfocus$/i.test(Dt)?Dt="onfocusin":/^onblur$/i.test(Dt)?Dt="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(Dt)?Dt=Dt.toLowerCase():Tt&&Wt.test(Dt)?Dt=Dt.replace(/[A-Z0-9]/,"-$&").toLowerCase():Vt===null&&(Vt=void 0),ct[Dt]=Vt)}rt=="select"&&ct.multiple&&Array.isArray(ct.value)&&(ct.value=Object(b.k)(Y.children).forEach(function(fe){fe.props.selected=ct.value.indexOf(fe.props.value)!=-1})),rt=="select"&&ct.defaultValue!=null&&(ct.value=Object(b.k)(Y.children).forEach(function(fe){fe.props.selected=ct.multiple?ct.defaultValue.indexOf(fe.props.value)!=-1:ct.defaultValue==fe.props.value})),X.props=ct,Y.class!=Y.className&&(ue.enumerable="className"in Y,Y.className!=null&&(ct.class=Y.className),Object.defineProperty(ct,"className",ue))}X.$$typeof=wt,ge&&ge(X)};var ie=b.i.__r;b.i.__r=function(X){ie&&ie(X),zt=X.__c};var ye={ReactCurrentDispatcher:{current:{readContext:function(X){return zt.__n[X.__c].props.value}}}};function je(X){return!!X&&X.$$typeof===wt}var Pe=function(X,rt){return X(rt)},ae=b.b,Ne={useState:B,useReducer:F,useEffect:tt,useLayoutEffect:it,useRef:function(X){return x=5,$(function(){return{current:X}},[])},useImperativeHandle:function(X,rt,Y){x=6,it(function(){typeof X=="function"?X(rt()):X&&(X.current=rt())},Y==null?Y:Y.concat(X))},useMemo:$,useCallback:G,useContext:function(X){var rt=s.context[X.__c],Y=I(l++,9);return Y.c=X,rt?(Y.__==null&&(Y.__=!0,rt.sub(s)),rt.props.value):X.__},useDebugValue:function(X,rt){b.i.useDebugValue&&b.i.useDebugValue(rt?rt(X):X)},version:"17.0.2",Children:jt,render:function(X,rt,Y){return rt.__k==null&&(rt.textContent=""),Object(b.j)(X,rt),typeof Y=="function"&&Y(),X?X.__c:null},hydrate:function(X,rt,Y){return Object(b.h)(X,rt),typeof Y=="function"&&Y(),X?X.__c:null},unmountComponentAtNode:function(X){return!!X.__k&&(Object(b.j)(null,X),!0)},createPortal:function(X,rt){return Object(b.e)(At,{__v:X,i:rt})},createElement:b.e,createContext:b.d,createFactory:function(X){return b.e.bind(null,X)},cloneElement:function(X){return je(X)?b.c.apply(null,arguments):X},createRef:b.f,Fragment:b.b,isValidElement:je,findDOMNode:function(X){return X&&(X.base||X.nodeType===1&&X)||null},Component:b.a,PureComponent:yt,memo:xt,forwardRef:ht,flushSync:function(X,rt){return X(rt)},unstable_batchedUpdates:Pe,StrictMode:ae,Suspense:$t,SuspenseList:Z,lazy:function(X){var rt,Y,ct;function Tt(Dt){if(rt||(rt=X()).then(function(Vt){Y=Vt.default||Vt},function(Vt){ct=Vt}),ct)throw ct;if(!Y)throw rt;return Object(b.e)(Y,Dt)}return Tt.displayName="Lazy",Tt.__f=!0,Tt},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ye};f.d=Ne},function(c,f,i){var l=i(7),s=i(147),g=i(148),b=i(180),x=i(57),w=function(S){if(S&&S.forEach!==b)try{x(S,"forEach",b)}catch(P){S.forEach=b}};for(var A in s)s[A]&&w(l[A]&&l[A].prototype);w(g)},function(c,f,i){i(17)({target:"Object",stat:!0},{setPrototypeOf:i(97)})},function(c,f,i){var l=i(17),s=i(19),g=i(38),b=i(96),x=i(137);l({target:"Object",stat:!0,forced:s(function(){b(1)}),sham:!x},{getPrototypeOf:function(w){return b(g(w))}})},function(c,f,i){var l=i(17),s=i(46),g=i(76),b=i(200),x=i(157),w=i(32),A=i(33),S=i(54),P=i(19),D=s("Reflect","construct"),N=Object.prototype,I=[].push,B=P(function(){function it(){}return!(D(function(){},[],it)instanceof it)}),F=!P(function(){D(function(){})}),tt=B||F;l({target:"Reflect",stat:!0,forced:tt,sham:tt},{construct:function(it,$){x(it),w($);var G=arguments.length<3?it:x(arguments[2]);if(F&&!B)return D(it,$,G);if(it==G){switch($.length){case 0:return new it;case 1:return new it($[0]);case 2:return new it($[0],$[1]);case 3:return new it($[0],$[1],$[2]);case 4:return new it($[0],$[1],$[2],$[3])}var J=[null];return g(I,J,$),new(g(b,it,J))}var z=G.prototype,T=S(A(z)?z:N),L=g(it,T,$);return A(L)?L:T}})},function(c,f){var i=Function.prototype,l=i.bind,s=i.call,g=l&&l.bind(s);c.exports=l?function(b){return b&&g(s,b)}:function(b){return b&&function(){return s.apply(b,arguments)}}},function(c,f,i){var l=i(17),s=i(7),g=i(99),b=i(100),x=i(33),w=i(67),A=i(43),S=i(40),P=i(61),D=i(27),N=i(75),I=i(101),B=N("slice"),F=D("species"),tt=s.Array,it=Math.max;l({target:"Array",proto:!0,forced:!B},{slice:function($,G){var J,z,T,L=S(this),C=A(L),U=w($,C),Q=w(G===void 0?C:G,C);if(g(L)&&(J=L.constructor,(b(J)&&(J===tt||g(J.prototype))||x(J)&&(J=J[F])===null)&&(J=void 0),J===tt||J===void 0))return I(L,U,Q);for(z=new(J===void 0?tt:J)(it(Q-U,0)),T=0;U<Q;U++,T++)U in L&&P(z,T,L[U]);return z.length=T,z}})},function(c,f,i){var l=i(7),s=i(51).f,g=i(57),b=i(44),x=i(108),w=i(134),A=i(95);c.exports=function(S,P){var D,N,I,B,F,tt=S.target,it=S.global,$=S.stat;if(D=it?l:$?l[tt]||x(tt,{}):(l[tt]||{}).prototype)for(N in P){if(B=P[N],I=S.noTargetGet?(F=s(D,N))&&F.value:D[N],!A(it?N:tt+($?".":"#")+N,S.forced)&&I!==void 0){if(typeof B==typeof I)continue;w(B,I)}(S.sham||I&&I.sham)&&g(B,"sham",!0),b(D,N,B,S)}}},function(c,f,i){var l=i(17),s=i(102);l({target:"RegExp",proto:!0,forced:/./.exec!==s},{exec:s})},function(c,f){c.exports=function(i){try{return!!i()}catch(l){return!0}}},function(c,f,i){var l=i(17),s=i(38),g=i(66);l({target:"Object",stat:!0,forced:i(19)(function(){g(1)})},{keys:function(b){return g(s(b))}})},function(c,f,i){var l=i(17),s=i(19),g=i(40),b=i(51).f,x=i(36),w=s(function(){b(1)});l({target:"Object",stat:!0,forced:!x||w,sham:!x},{getOwnPropertyDescriptor:function(A,S){return b(g(A),S)}})},function(c,f,i){var l=i(36),s=i(94).EXISTS,g=i(15),b=i(37).f,x=Function.prototype,w=g(x.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,S=g(A.exec);l&&!s&&b(x,"name",{configurable:!0,get:function(){try{return S(A,w(this))[1]}catch(P){return""}}})},function(c,f,i){var l=i(17),s=i(74).filter;l({target:"Array",proto:!0,forced:!i(75)("filter")},{filter:function(g){return s(this,g,arguments.length>1?arguments[1]:void 0)}})},function(c,f,i){var l=i(17),s=i(183);l({target:"Array",stat:!0,forced:!i(118)(function(g){Array.from(g)})},{from:s})},function(c,f,i){var l=i(17),s=i(36),g=i(135),b=i(40),x=i(51),w=i(61);l({target:"Object",stat:!0,sham:!s},{getOwnPropertyDescriptors:function(A){for(var S,P,D=b(A),N=x.f,I=g(D),B={},F=0;I.length>F;)(P=N(D,S=I[F++]))!==void 0&&w(B,S,P);return B}})},,function(c,f,i){var l=i(7),s=i(84),g=i(34),b=i(85),x=i(109),w=i(128),A=s("wks"),S=l.Symbol,P=S&&S.for,D=w?S:S&&S.withoutSetter||b;c.exports=function(N){if(!g(A,N)||!x&&typeof A[N]!="string"){var I="Symbol."+N;x&&g(S,N)?A[N]=S[N]:A[N]=w&&P?P(I):D(I)}return A[N]}},function(c,f){c.exports=function(i){return typeof i=="function"}},function(c,f,i){var l=i(17),s=i(7),g=i(19),b=i(99),x=i(33),w=i(38),A=i(43),S=i(61),P=i(119),D=i(75),N=i(27),I=i(65),B=N("isConcatSpreadable"),F=9007199254740991,tt="Maximum allowed index exceeded",it=s.TypeError,$=I>=51||!g(function(){var z=[];return z[B]=!1,z.concat()[0]!==z}),G=D("concat"),J=function(z){if(!x(z))return!1;var T=z[B];return T!==void 0?!!T:b(z)};l({target:"Array",proto:!0,forced:!$||!G},{concat:function(z){var T,L,C,U,Q,lt=w(this),st=P(lt,0),yt=0;for(T=-1,C=arguments.length;T<C;T++)if(J(Q=T===-1?lt:arguments[T])){if(yt+(U=A(Q))>F)throw it(tt);for(L=0;L<U;L++,yt++)L in Q&&S(st,yt,Q[L])}else{if(yt>=F)throw it(tt);S(st,yt++,Q)}return st.length=yt,st}})},function(c,f,i){var l=i(17),s=i(199);l({target:"Object",stat:!0,forced:Object.assign!==s},{assign:s})},function(c,f,i){var l=i(105),s=typeof self=="object"&&self&&self.Object===Object&&self,g=l.a||s||Function("return this")();f.a=g},function(c,f,i){var l=i(7),s=i(33),g=l.String,b=l.TypeError;c.exports=function(x){if(s(x))return x;throw b(g(x)+" is not an object")}},function(c,f,i){var l=i(28);c.exports=function(s){return typeof s=="object"?s!==null:l(s)}},function(c,f,i){var l=i(15),s=i(38),g=l({}.hasOwnProperty);c.exports=Object.hasOwn||function(b,x){return g(s(b),x)}},function(c,f){var i=Function.prototype.call;c.exports=i.bind?i.bind(i):function(){return i.apply(i,arguments)}},function(c,f,i){var l=i(19);c.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(c,f,i){var l=i(7),s=i(36),g=i(129),b=i(32),x=i(87),w=l.TypeError,A=Object.defineProperty;f.f=s?A:function(S,P,D){if(b(S),P=x(P),b(D),g)try{return A(S,P,D)}catch(N){}if("get"in D||"set"in D)throw w("Accessors not supported");return"value"in D&&(S[P]=D.value),S}},function(c,f,i){var l=i(7),s=i(45),g=l.Object;c.exports=function(b){return g(s(b))}},function(c,f,i){var l=i(17),s=i(74).map;l({target:"Array",proto:!0,forced:!i(75)("map")},{map:function(g){return s(this,g,arguments.length>1?arguments[1]:void 0)}})},function(c,f,i){var l=i(81),s=i(45);c.exports=function(g){return l(s(g))}},function(c,f,i){var l=i(7),s=i(98),g=l.String;c.exports=function(b){if(s(b)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return g(b)}},function(c,f,i){(function(l){i.d(f,"d",function(){return b}),i.d(f,"c",function(){return x}),i.d(f,"b",function(){return w}),i.d(f,"a",function(){return S});var s=i(10),g=function(P,D){var N=typeof Symbol=="function"&&P[Symbol.iterator];if(!N)return P;var I,B,F=N.call(P),tt=[];try{for(;(D===void 0||D-- >0)&&!(I=F.next()).done;)tt.push(I.value)}catch(it){B={error:it}}finally{try{I&&!I.done&&(N=F.return)&&N.call(F)}finally{if(B)throw B.error}}return tt};function b(){var P=g(Object(s.j)(0),2)[1];return Object(s.h)(function(){P(function(D){return D+1})},[])}function x(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 A={};function S(){return typeof window<"u"?window:l!==void 0?l:typeof self<"u"?self:A}}).call(this,i(82))},function(c,f,i){var l=i(90);c.exports=function(s){return l(s.length)}},function(c,f,i){var l=i(7),s=i(28),g=i(34),b=i(57),x=i(108),w=i(92),A=i(56),S=i(94).CONFIGURABLE,P=A.get,D=A.enforce,N=String(String).split("String");(c.exports=function(I,B,F,tt){var it,$=!!tt&&!!tt.unsafe,G=!!tt&&!!tt.enumerable,J=!!tt&&!!tt.noTargetGet,z=tt&&tt.name!==void 0?tt.name:B;s(F)&&(String(z).slice(0,7)==="Symbol("&&(z="["+String(z).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!g(F,"name")||S&&F.name!==z)&&b(F,"name",z),(it=D(F)).source||(it.source=N.join(typeof z=="string"?z:""))),I!==l?($?!J&&I[B]&&(G=!0):delete I[B],G?I[B]=F:b(I,B,F)):G?I[B]=F:x(B,F)})(Function.prototype,"toString",function(){return s(this)&&P(this).source||w(this)})},function(c,f,i){var l=i(7).TypeError;c.exports=function(s){if(s==null)throw l("Can't call method on "+s);return s}},function(c,f,i){var l=i(7),s=i(28),g=function(b){return s(b)?b:void 0};c.exports=function(b,x){return arguments.length<2?g(l[b]):l[b]&&l[b][x]}},function(c,f,i){var l=i(17),s=i(35),g=i(33),b=i(32),x=i(201),w=i(51),A=i(96);l({target:"Reflect",stat:!0},{get:function S(P,D){var N,I,B=arguments.length<3?P:arguments[2];return b(P)===B?P[D]:(N=w.f(P,D))?x(N)?N.value:N.get===void 0?void 0:s(N.get,B):g(I=A(P))?S(I,D,B):void 0}})},function(c,f,i){(function(l){var s=i(31),g=i(166),b=y&&!y.nodeType&&y,x=b&&typeof l=="object"&&l&&!l.nodeType&&l,w=x&&x.exports===b?s.a.Buffer:void 0,A=(w?w.isBuffer:void 0)||g.a;f.a=A}).call(this,i(121)(c))},function(c,f,i){(function(l){var s=i(105),g=y&&!y.nodeType&&y,b=g&&typeof l=="object"&&l&&!l.nodeType&&l,x=b&&b.exports===g&&s.a.process,w=function(){try{var A=b&&b.require&&b.require("util").types;return A||x&&x.binding&&x.binding("util")}catch(S){}}();f.a=w}).call(this,i(121)(c))},function(c,f,i){var l=i(15),s=l({}.toString),g=l("".slice);c.exports=function(b){return g(s(b),8,-1)}},function(c,f,i){var l=i(36),s=i(35),g=i(93),b=i(71),x=i(40),w=i(87),A=i(34),S=i(129),P=Object.getOwnPropertyDescriptor;f.f=l?P:function(D,N){if(D=x(D),N=w(N),S)try{return P(D,N)}catch(I){}if(A(D,N))return b(!s(g.f,D,N),D[N])}},function(c,f,i){var l=i(17),s=i(213).entries;l({target:"Object",stat:!0},{entries:function(g){return s(g)}})},function(c,f,i){var l=i(46);c.exports=l("navigator","userAgent")||""},function(c,f,i){var l,s=i(32),g=i(169),b=i(110),x=i(69),w=i(133),A=i(86),S=i(91),P=S("IE_PROTO"),D=function(){},N=function(F){return"<script>"+F+"<\/script>"},I=function(F){F.write(N("")),F.close();var tt=F.parentWindow.Object;return F=null,tt},B=function(){try{l=new ActiveXObject("htmlfile")}catch($){}var F,tt;B=typeof document<"u"?document.domain&&l?I(l):((tt=A("iframe")).style.display="none",w.appendChild(tt),tt.src="javascript:",(F=tt.contentWindow.document).open(),F.write(N("document.F=Object")),F.close(),F.F):I(l);for(var it=b.length;it--;)delete B.prototype[b[it]];return B()};x[P]=!0,c.exports=Object.create||function(F,tt){var it;return F!==null?(D.prototype=s(F),it=new D,D.prototype=null,it[P]=F):it=B(),tt===void 0?it:g(it,tt)}},function(c,f,i){var l=i(7),s=i(28),g=i(89),b=l.TypeError;c.exports=function(x){if(s(x))return x;throw b(g(x)+" is not a function")}},function(c,f,i){var l,s,g,b=i(171),x=i(7),w=i(15),A=i(33),S=i(57),P=i(34),D=i(107),N=i(91),I=i(69),B="Object already initialized",F=x.TypeError,tt=x.WeakMap;if(b||D.state){var it=D.state||(D.state=new tt),$=w(it.get),G=w(it.has),J=w(it.set);l=function(T,L){if(G(it,T))throw new F(B);return L.facade=T,J(it,T,L),L},s=function(T){return $(it,T)||{}},g=function(T){return G(it,T)}}else{var z=N("state");I[z]=!0,l=function(T,L){if(P(T,z))throw new F(B);return L.facade=T,S(T,z,L),L},s=function(T){return P(T,z)?T[z]:{}},g=function(T){return P(T,z)}}c.exports={set:l,get:s,has:g,enforce:function(T){return g(T)?s(T):l(T,{})},getterFor:function(T){return function(L){var C;if(!A(L)||(C=s(L)).type!==T)throw F("Incompatible receiver, "+T+" required");return C}}}},function(c,f,i){var l=i(36),s=i(37),g=i(71);c.exports=l?function(b,x,w){return s.f(b,x,g(1,w))}:function(b,x,w){return b[x]=w,b}},function(c,f,i){var l=i(15);c.exports=l({}.isPrototypeOf)},function(c,f,i){var l=i(55);c.exports=function(s,g){var b=s[g];return b==null?void 0:l(b)}},function(c,f,i){i(174)("Map",function(l){return function(){return l(this,arguments.length?arguments[0]:void 0)}},i(178))},function(c,f,i){var l=i(87),s=i(37),g=i(71);c.exports=function(b,x,w){var A=l(x);A in b?s.f(b,A,g(0,w)):b[A]=w}},function(c,f,i){var l=i(15),s=i(55),g=l(l.bind);c.exports=function(b,x){return s(b),x===void 0?b:g?g(b,x):function(){return b.apply(x,arguments)}}},function(c,f,i){var l=i(17),s=i(15),g=i(81),b=i(40),x=i(120),w=s([].join),A=g!=Object,S=x("join",",");l({target:"Array",proto:!0,forced:A||!S},{join:function(P){return w(b(this),P===void 0?",":P)}})},function(c,f){c.exports=!1},function(c,f,i){var l,s,g=i(7),b=i(53),x=g.process,w=g.Deno,A=x&&x.versions||w&&w.version,S=A&&A.v8;S&&(s=(l=S.split("."))[0]>0&&l[0]<4?1:+(l[0]+l[1])),!s&&b&&(!(l=b.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=b.match(/Chrome\/(\d+)/))&&(s=+l[1]),c.exports=s},function(c,f,i){var l=i(131),s=i(110);c.exports=Object.keys||function(g){return l(g,s)}},function(c,f,i){var l=i(68),s=Math.max,g=Math.min;c.exports=function(b,x){var w=l(b);return w<0?s(w+x,0):g(w,x)}},function(c,f){var i=Math.ceil,l=Math.floor;c.exports=function(s){var g=+s;return g!=g||g===0?0:(g>0?l:i)(g)}},function(c,f){c.exports={}},function(c,f){c.exports={}},function(c,f){c.exports=function(i,l){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:l}}},function(c,f,i){var l=i(131),s=i(110).concat("length","prototype");f.f=Object.getOwnPropertyNames||function(g){return l(g,s)}},function(c,f,i){var l=i(37).f,s=i(34),g=i(27)("toStringTag");c.exports=function(b,x,w){b&&!s(b=w?b:b.prototype,g)&&l(b,g,{configurable:!0,value:x})}},function(c,f,i){var l=i(62),s=i(15),g=i(81),b=i(38),x=i(43),w=i(119),A=s([].push),S=function(P){var D=P==1,N=P==2,I=P==3,B=P==4,F=P==6,tt=P==7,it=P==5||F;return function($,G,J,z){for(var T,L,C=b($),U=g(C),Q=l(G,J),lt=x(U),st=0,yt=z||w,xt=D?yt($,lt):N||tt?yt($,0):void 0;lt>st;st++)if((it||st in U)&&(L=Q(T=U[st],st,C),P))if(D)xt[st]=L;else if(L)switch(P){case 3:return!0;case 5:return T;case 6:return st;case 2:A(xt,T)}else switch(P){case 4:return!1;case 7:A(xt,T)}return F?-1:I||B?B:xt}};c.exports={forEach:S(0),map:S(1),filter:S(2),some:S(3),every:S(4),find:S(5),findIndex:S(6),filterReject:S(7)}},function(c,f,i){var l=i(19),s=i(27),g=i(65),b=s("species");c.exports=function(x){return g>=51||!l(function(){var w=[];return(w.constructor={})[b]=function(){return{foo:1}},w[x](Boolean).foo!==1})}},function(c,f){var i=Function.prototype,l=i.apply,s=i.bind,g=i.call;c.exports=typeof Reflect=="object"&&Reflect.apply||(s?g.bind(l):function(){return g.apply(l,arguments)})},function(c,f,i){var l=i(76),s=i(35),g=i(15),b=i(122),x=i(154),w=i(32),A=i(45),S=i(156),P=i(123),D=i(90),N=i(41),I=i(59),B=i(113),F=i(124),tt=i(102),it=i(151),$=i(19),G=it.UNSUPPORTED_Y,J=4294967295,z=Math.min,T=[].push,L=g(/./.exec),C=g(T),U=g("".slice),Q=!$(function(){var lt=/(?:)/,st=lt.exec;lt.exec=function(){return st.apply(this,arguments)};var yt="ab".split(lt);return yt.length!==2||yt[0]!=="a"||yt[1]!=="b"});b("split",function(lt,st,yt){var xt;return xt="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(vt,ut){var ht=N(A(this)),mt=ut===void 0?J:ut>>>0;if(mt===0)return[];if(vt===void 0)return[ht];if(!x(vt))return s(st,ht,vt,mt);for(var jt,It,Kt,Pt=[],Ct=(vt.ignoreCase?"i":"")+(vt.multiline?"m":"")+(vt.unicode?"u":"")+(vt.sticky?"y":""),$t=0,K=new RegExp(vt.source,Ct+"g");(jt=s(tt,K,ht))&&!((It=K.lastIndex)>$t&&(C(Pt,U(ht,$t,jt.index)),jt.length>1&&jt.index<ht.length&&l(T,Pt,B(jt,1)),Kt=jt[0].length,$t=It,Pt.length>=mt));)K.lastIndex===jt.index&&K.lastIndex++;return $t===ht.length?!Kt&&L(K,"")||C(Pt,""):C(Pt,U(ht,$t)),Pt.length>mt?B(Pt,0,mt):Pt}:"0".split(void 0,0).length?function(vt,ut){return vt===void 0&&ut===0?[]:s(st,this,vt,ut)}:st,[function(vt,ut){var ht=A(this),mt=vt==null?void 0:I(vt,lt);return mt?s(mt,vt,ht,ut):s(xt,N(ht),vt,ut)},function(vt,ut){var ht=w(this),mt=N(vt),jt=yt(xt,ht,mt,ut,xt!==st);if(jt.done)return jt.value;var It=S(ht,RegExp),Kt=ht.unicode,Pt=(ht.ignoreCase?"i":"")+(ht.multiline?"m":"")+(ht.unicode?"u":"")+(G?"g":"y"),Ct=new It(G?"^(?:"+ht.source+")":ht,Pt),$t=ut===void 0?J:ut>>>0;if($t===0)return[];if(mt.length===0)return F(Ct,mt)===null?[mt]:[];for(var K=0,Z=0,at=[];Z<mt.length;){Ct.lastIndex=G?0:Z;var _t,At=F(Ct,G?U(mt,Z):mt);if(At===null||(_t=z(D(Ct.lastIndex+(G?Z:0)),mt.length))===K)Z=P(mt,Z,Kt);else{if(C(at,U(mt,K,Z)),at.length===$t)return at;for(var wt=1;wt<=At.length-1;wt++)if(C(at,At[wt]),at.length===$t)return at;Z=K=_t}}return C(at,U(mt,K)),at}]},!Q,G)},function(c,f,i){var l=i(36),s=i(7),g=i(15),b=i(95),x=i(44),w=i(34),A=i(143),S=i(58),P=i(88),D=i(130),N=i(19),I=i(72).f,B=i(51).f,F=i(37).f,tt=i(197),it=i(159).trim,$="Number",G=s.Number,J=G.prototype,z=s.TypeError,T=g("".slice),L=g("".charCodeAt),C=function(xt){var vt=D(xt,"number");return typeof vt=="bigint"?vt:U(vt)},U=function(xt){var vt,ut,ht,mt,jt,It,Kt,Pt,Ct=D(xt,"number");if(P(Ct))throw z("Cannot convert a Symbol value to a number");if(typeof Ct=="string"&&Ct.length>2){if(Ct=it(Ct),(vt=L(Ct,0))===43||vt===45){if((ut=L(Ct,2))===88||ut===120)return NaN}else if(vt===48){switch(L(Ct,1)){case 66:case 98:ht=2,mt=49;break;case 79:case 111:ht=8,mt=55;break;default:return+Ct}for(It=(jt=T(Ct,2)).length,Kt=0;Kt<It;Kt++)if((Pt=L(jt,Kt))<48||Pt>mt)return NaN;return parseInt(jt,ht)}}return+Ct};if(b($,!G(" 0o1")||!G("0b1")||G("+0x1"))){for(var Q,lt=function(xt){var vt=arguments.length<1?0:G(C(xt)),ut=this;return S(J,ut)&&N(function(){tt(ut)})?A(Object(vt),ut,lt):vt},st=l?I(G):"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(","),yt=0;st.length>yt;yt++)w(G,Q=st[yt])&&!w(lt,Q)&&F(lt,Q,B(G,Q));lt.prototype=J,J.constructor=lt,x(s,$,lt)}},function(c,f,i){i(17)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(c,f,i){var l=i(17),s=i(214),g=i(83);l({target:"Array",proto:!0},{fill:s}),g("fill")},function(c,f,i){var l=i(7),s=i(15),g=i(19),b=i(50),x=l.Object,w=s("".split);c.exports=g(function(){return!x("z").propertyIsEnumerable(0)})?function(A){return b(A)=="String"?w(A,""):x(A)}:x},function(c,f){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(l){typeof window=="object"&&(i=window)}c.exports=i},function(c,f,i){var l=i(27),s=i(54),g=i(37),b=l("unscopables"),x=Array.prototype;x[b]==null&&g.f(x,b,{configurable:!0,value:s(null)}),c.exports=function(w){x[b][w]=!0}},function(c,f,i){var l=i(64),s=i(107);(c.exports=function(g,b){return s[g]||(s[g]=b!==void 0?b:{})})("versions",[]).push({version:"3.19.3",mode:l?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},function(c,f,i){var l=i(15),s=0,g=Math.random(),b=l(1 .toString);c.exports=function(x){return"Symbol("+(x===void 0?"":x)+")_"+b(++s+g,36)}},function(c,f,i){var l=i(7),s=i(33),g=l.document,b=s(g)&&s(g.createElement);c.exports=function(x){return b?g.createElement(x):{}}},function(c,f,i){var l=i(130),s=i(88);c.exports=function(g){var b=l(g,"string");return s(b)?b:b+""}},function(c,f,i){var l=i(7),s=i(46),g=i(28),b=i(58),x=i(128),w=l.Object;c.exports=x?function(A){return typeof A=="symbol"}:function(A){var S=s("Symbol");return g(S)&&b(S.prototype,w(A))}},function(c,f,i){var l=i(7).String;c.exports=function(s){try{return l(s)}catch(g){return"Object"}}},function(c,f,i){var l=i(68),s=Math.min;c.exports=function(g){return g>0?s(l(g),9007199254740991):0}},function(c,f,i){var l=i(84),s=i(85),g=l("keys");c.exports=function(b){return g[b]||(g[b]=s(b))}},function(c,f,i){var l=i(15),s=i(28),g=i(107),b=l(Function.toString);s(g.inspectSource)||(g.inspectSource=function(x){return b(x)}),c.exports=g.inspectSource},function(c,f,i){var l={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,g=s&&!l.call({1:2},1);f.f=g?function(b){var x=s(this,b);return!!x&&x.enumerable}:l},function(c,f,i){var l=i(36),s=i(34),g=Function.prototype,b=l&&Object.getOwnPropertyDescriptor,x=s(g,"name"),w=x&&function(){}.name==="something",A=x&&(!l||l&&b(g,"name").configurable);c.exports={EXISTS:x,PROPER:w,CONFIGURABLE:A}},function(c,f,i){var l=i(19),s=i(28),g=/#|\.prototype\./,b=function(P,D){var N=w[x(P)];return N==S||N!=A&&(s(D)?l(D):!!D)},x=b.normalize=function(P){return String(P).replace(g,".").toLowerCase()},w=b.data={},A=b.NATIVE="N",S=b.POLYFILL="P";c.exports=b},function(c,f,i){var l=i(7),s=i(34),g=i(28),b=i(38),x=i(91),w=i(137),A=x("IE_PROTO"),S=l.Object,P=S.prototype;c.exports=w?S.getPrototypeOf:function(D){var N=b(D);if(s(N,A))return N[A];var I=N.constructor;return g(I)&&N instanceof I?I.prototype:N instanceof S?P:null}},function(c,f,i){var l=i(15),s=i(32),g=i(173);c.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b,x=!1,w={};try{(b=l(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(w,[]),x=w instanceof Array}catch(A){}return function(A,S){return s(A),g(S),x?b(A,S):A.__proto__=S,A}}():void 0)},function(c,f,i){var l=i(7),s=i(116),g=i(28),b=i(50),x=i(27)("toStringTag"),w=l.Object,A=b(function(){return arguments}())=="Arguments";c.exports=s?b:function(S){var P,D,N;return S===void 0?"Undefined":S===null?"Null":typeof(D=function(I,B){try{return I[B]}catch(F){}}(P=w(S),x))=="string"?D:A?b(P):(N=b(P))=="Object"&&g(P.callee)?"Arguments":N}},function(c,f,i){var l=i(50);c.exports=Array.isArray||function(s){return l(s)=="Array"}},function(c,f,i){var l=i(15),s=i(19),g=i(28),b=i(98),x=i(46),w=i(92),A=function(){},S=[],P=x("Reflect","construct"),D=/^\s*(?:class|function)\b/,N=l(D.exec),I=!D.exec(A),B=function(F){if(!g(F))return!1;try{return P(A,S,F),!0}catch(tt){return!1}};c.exports=!P||s(function(){var F;return B(B.call)||!B(Object)||!B(function(){F=!0})||F})?function(F){if(!g(F))return!1;switch(b(F)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return I||!!N(D,w(F))}:B},function(c,f,i){var l=i(15);c.exports=l([].slice)},function(c,f,i){var l,s,g=i(35),b=i(15),x=i(41),w=i(185),A=i(151),S=i(84),P=i(54),D=i(56).get,N=i(186),I=i(187),B=S("native-string-replace",String.prototype.replace),F=RegExp.prototype.exec,tt=F,it=b("".charAt),$=b("".indexOf),G=b("".replace),J=b("".slice),z=(s=/b*/g,g(F,l=/a/,"a"),g(F,s,"a"),l.lastIndex!==0||s.lastIndex!==0),T=A.BROKEN_CARET,L=/()??/.exec("")[1]!==void 0;(z||L||T||N||I)&&(tt=function(C){var U,Q,lt,st,yt,xt,vt,ut=this,ht=D(ut),mt=x(C),jt=ht.raw;if(jt)return jt.lastIndex=ut.lastIndex,U=g(tt,jt,mt),ut.lastIndex=jt.lastIndex,U;var It=ht.groups,Kt=T&&ut.sticky,Pt=g(w,ut),Ct=ut.source,$t=0,K=mt;if(Kt&&(Pt=G(Pt,"y",""),$(Pt,"g")===-1&&(Pt+="g"),K=J(mt,ut.lastIndex),ut.lastIndex>0&&(!ut.multiline||ut.multiline&&it(mt,ut.lastIndex-1)!==`
`)&&(Ct="(?: "+Ct+")",K=" "+K,$t++),Q=new RegExp("^(?:"+Ct+")",Pt)),L&&(Q=new RegExp("^"+Ct+"$(?!\\s)",Pt)),z&&(lt=ut.lastIndex),st=g(F,Kt?Q:ut,K),Kt?st?(st.input=J(st.input,$t),st[0]=J(st[0],$t),st.index=ut.lastIndex,ut.lastIndex+=st[0].length):ut.lastIndex=0:z&&st&&(ut.lastIndex=ut.global?st.index+st[0].length:lt),L&&st&&st.length>1&&g(B,st[0],Q,function(){for(yt=1;yt<arguments.length-2;yt++)arguments[yt]===void 0&&(st[yt]=void 0)}),st&&It)for(st.groups=xt=P(null),yt=0;yt<It.length;yt++)xt[(vt=It[yt])[0]]=st[vt[1]];return st}),c.exports=tt},function(c,f,i){var l=i(17),s=i(7),g=i(67),b=i(68),x=i(43),w=i(38),A=i(119),S=i(61),P=i(75)("splice"),D=s.TypeError,N=Math.max,I=Math.min,B=9007199254740991,F="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!P},{splice:function(tt,it){var $,G,J,z,T,L,C=w(this),U=x(C),Q=g(tt,U),lt=arguments.length;if(lt===0?$=G=0:lt===1?($=0,G=U-Q):($=lt-2,G=I(N(b(it),0),U-Q)),U+$-G>B)throw D(F);for(J=A(C,G),z=0;z<G;z++)(T=Q+z)in C&&S(J,z,C[T]);if(J.length=G,$<G){for(z=Q;z<U-G;z++)L=z+$,(T=z+G)in C?C[L]=C[T]:delete C[L];for(z=U;z>U-G+$;z--)delete C[z-1]}else if($>G)for(z=U-G;z>Q;z--)L=z+$-1,(T=z+G-1)in C?C[L]=C[T]:delete C[L];for(z=0;z<$;z++)C[z+Q]=arguments[z+2];return C.length=U-G+$,J}})},function(c,f,i){var l=i(17),s=i(202);l({target:"String",proto:!0,forced:i(203)("anchor")},{anchor:function(g){return s(this,"a","name",g)}})},function(c,f,i){(function(l){var s=typeof l=="object"&&l&&l.Object===Object&&l;f.a=s}).call(this,i(82))},function(c,f,i){(function(l){var s=i(31),g=y&&!y.nodeType&&y,b=g&&typeof l=="object"&&l&&!l.nodeType&&l,x=b&&b.exports===g?s.a.Buffer:void 0,w=x?x.allocUnsafe:void 0;f.a=function(A,S){if(S)return A.slice();var P=A.length,D=w?w(P):new A.constructor(P);return A.copy(D),D}}).call(this,i(121)(c))},function(c,f,i){var l=i(7),s=i(108),g="__core-js_shared__",b=l[g]||s(g,{});c.exports=b},function(c,f,i){var l=i(7),s=Object.defineProperty;c.exports=function(g,b){try{s(l,g,{value:b,configurable:!0,writable:!0})}catch(x){l[g]=b}return b}},function(c,f,i){var l=i(65),s=i(19);c.exports=!!Object.getOwnPropertySymbols&&!s(function(){var g=Symbol();return!String(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&l&&l<41})},function(c,f){c.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(c,f,i){var l=i(17),s=i(35),g=i(64),b=i(94),x=i(28),w=i(172),A=i(96),S=i(97),P=i(73),D=i(57),N=i(44),I=i(27),B=i(70),F=i(136),tt=b.PROPER,it=b.CONFIGURABLE,$=F.IteratorPrototype,G=F.BUGGY_SAFARI_ITERATORS,J=I("iterator"),z="keys",T="values",L="entries",C=function(){return this};c.exports=function(U,Q,lt,st,yt,xt,vt){w(lt,Q,st);var ut,ht,mt,jt=function(Z){if(Z===yt&&$t)return $t;if(!G&&Z in Pt)return Pt[Z];switch(Z){case z:case T:case L:return function(){return new lt(this,Z)}}return function(){return new lt(this)}},It=Q+" Iterator",Kt=!1,Pt=U.prototype,Ct=Pt[J]||Pt["@@iterator"]||yt&&Pt[yt],$t=!G&&Ct||jt(yt),K=Q=="Array"&&Pt.entries||Ct;if(K&&(ut=A(K.call(new U)))!==Object.prototype&&ut.next&&(g||A(ut)===$||(S?S(ut,$):x(ut[J])||N(ut,J,C)),P(ut,It,!0,!0),g&&(B[It]=C)),tt&&yt==T&&Ct&&Ct.name!==T&&(!g&&it?D(Pt,"name",T):(Kt=!0,$t=function(){return s(Ct,this)})),yt)if(ht={values:jt(T),keys:xt?$t:jt(z),entries:jt(L)},vt)for(mt in ht)(G||Kt||!(mt in Pt))&&N(Pt,mt,ht[mt]);else l({target:Q,proto:!0,forced:G||Kt},ht);return g&&!vt||Pt[J]===$t||N(Pt,J,$t,{name:yt}),B[Q]=$t,ht}},function(c,f){f.f=Object.getOwnPropertySymbols},function(c,f,i){var l=i(7),s=i(67),g=i(43),b=i(61),x=l.Array,w=Math.max;c.exports=function(A,S,P){for(var D=g(A),N=s(S,D),I=s(P===void 0?D:P,D),B=x(w(I-N,0)),F=0;N<I;N++,F++)b(B,F,A[N]);return B.length=F,B}},function(c,f,i){var l=i(7),s=i(62),g=i(35),b=i(32),x=i(89),w=i(140),A=i(43),S=i(58),P=i(141),D=i(115),N=i(142),I=l.TypeError,B=function(tt,it){this.stopped=tt,this.result=it},F=B.prototype;c.exports=function(tt,it,$){var G,J,z,T,L,C,U,Q=$&&$.that,lt=!(!$||!$.AS_ENTRIES),st=!(!$||!$.IS_ITERATOR),yt=!(!$||!$.INTERRUPTED),xt=s(it,Q),vt=function(ht){return G&&N(G,"normal",ht),new B(!0,ht)},ut=function(ht){return lt?(b(ht),yt?xt(ht[0],ht[1],vt):xt(ht[0],ht[1])):yt?xt(ht,vt):xt(ht)};if(st)G=tt;else{if(!(J=D(tt)))throw I(x(tt)+" is not iterable");if(w(J)){for(z=0,T=A(tt);T>z;z++)if((L=ut(tt[z]))&&S(F,L))return L;return new B(!1)}G=P(tt,J)}for(C=G.next;!(U=g(C,G)).done;){try{L=ut(U.value)}catch(ht){N(G,"throw",ht)}if(typeof L=="object"&&L&&S(F,L))return L}return new B(!1)}},function(c,f,i){var l=i(98),s=i(59),g=i(70),b=i(27)("iterator");c.exports=function(x){if(x!=null)return s(x,b)||s(x,"@@iterator")||g[l(x)]}},function(c,f,i){var l={};l[i(27)("toStringTag")]="z",c.exports=String(l)==="[object z]"},function(c,f,i){var l=i(7),s=i(58),g=l.TypeError;c.exports=function(b,x){if(s(x,b))return b;throw g("Incorrect invocation")}},function(c,f,i){var l=i(27)("iterator"),s=!1;try{var g=0,b={next:function(){return{done:!!g++}},return:function(){s=!0}};b[l]=function(){return this},Array.from(b,function(){throw 2})}catch(x){}c.exports=function(x,w){if(!w&&!s)return!1;var A=!1;try{var S={};S[l]=function(){return{next:function(){return{done:A=!0}}}},x(S)}catch(P){}return A}},function(c,f,i){var l=i(181);c.exports=function(s,g){return new(l(s))(g===0?0:g)}},function(c,f,i){var l=i(19);c.exports=function(s,g){var b=[][s];return!!b&&l(function(){b.call(null,g||function(){throw 1},1)})}},function(c,f){c.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(c,f,i){i(18);var l=i(15),s=i(44),g=i(102),b=i(19),x=i(27),w=i(57),A=x("species"),S=RegExp.prototype;c.exports=function(P,D,N,I){var B=x(P),F=!b(function(){var G={};return G[B]=function(){return 7},""[P](G)!=7}),tt=F&&!b(function(){var G=!1,J=/a/;return P==="split"&&((J={}).constructor={},J.constructor[A]=function(){return J},J.flags="",J[B]=/./[B]),J.exec=function(){return G=!0,null},J[B](""),!G});if(!F||!tt||N){var it=l(/./[B]),$=D(B,""[P],function(G,J,z,T,L){var C=l(G),U=J.exec;return U===g||U===S.exec?F&&!L?{done:!0,value:it(J,z,T)}:{done:!0,value:C(z,J,T)}:{done:!1}});s(String.prototype,P,$[0]),s(S,B,$[1])}I&&w(S[B],"sham",!0)}},function(c,f,i){var l=i(146).charAt;c.exports=function(s,g,b){return g+(b?l(s,g).length:1)}},function(c,f,i){var l=i(7),s=i(35),g=i(32),b=i(28),x=i(50),w=i(102),A=l.TypeError;c.exports=function(S,P){var D=S.exec;if(b(D)){var N=s(D,S,P);return N!==null&&g(N),N}if(x(S)==="RegExp")return s(w,S,P);throw A("RegExp#exec called on incompatible receiver")}},function(c,f,i){var l=i(76),s=i(35),g=i(15),b=i(122),x=i(19),w=i(32),A=i(28),S=i(68),P=i(90),D=i(41),N=i(45),I=i(123),B=i(59),F=i(198),tt=i(124),it=i(27)("replace"),$=Math.max,G=Math.min,J=g([].concat),z=g([].push),T=g("".indexOf),L=g("".slice),C="a".replace(/./,"$0")==="$0",U=!!/./[it]&&/./[it]("a","$0")==="";b("replace",function(Q,lt,st){var yt=U?"$":"$0";return[function(xt,vt){var ut=N(this),ht=xt==null?void 0:B(xt,it);return ht?s(ht,xt,ut,vt):s(lt,D(ut),xt,vt)},function(xt,vt){var ut=w(this),ht=D(xt);if(typeof vt=="string"&&T(vt,yt)===-1&&T(vt,"$<")===-1){var mt=st(lt,ut,ht,vt);if(mt.done)return mt.value}var jt=A(vt);jt||(vt=D(vt));var It=ut.global;if(It){var Kt=ut.unicode;ut.lastIndex=0}for(var Pt=[];;){var Ct=tt(ut,ht);if(Ct===null||(z(Pt,Ct),!It))break;D(Ct[0])===""&&(ut.lastIndex=I(ht,P(ut.lastIndex),Kt))}for(var $t,K="",Z=0,at=0;at<Pt.length;at++){for(var _t=D((Ct=Pt[at])[0]),At=$(G(S(Ct.index),ht.length),0),wt=[],Wt=1;Wt<Ct.length;Wt++)z(wt,($t=Ct[Wt])===void 0?$t:String($t));var re=Ct.groups;if(jt){var Qt=J([_t],wt,At,ht);re!==void 0&&z(Qt,re);var Gt=D(l(vt,void 0,Qt))}else Gt=F(_t,ht,At,wt,re,vt);At>=Z&&(K+=L(ht,Z,At)+Gt,Z=At+_t.length)}return K+L(ht,Z)}]},!!x(function(){var Q=/./;return Q.exec=function(){var lt=[];return lt.groups={a:"7"},lt},"".replace(Q,"$<a>")!=="7"})||!C||U)},function(c,f,i){var l=i(50),s=i(7);c.exports=l(s.process)=="process"},function(c,f,i){i(17)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(c,f,i){var l=i(109);c.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(c,f,i){var l=i(36),s=i(19),g=i(86);c.exports=!l&&!s(function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!=7})},function(c,f,i){var l=i(7),s=i(35),g=i(33),b=i(88),x=i(59),w=i(170),A=i(27),S=l.TypeError,P=A("toPrimitive");c.exports=function(D,N){if(!g(D)||b(D))return D;var I,B=x(D,P);if(B){if(N===void 0&&(N="default"),I=s(B,D,N),!g(I)||b(I))return I;throw S("Can't convert object to primitive value")}return N===void 0&&(N="number"),w(D,N)}},function(c,f,i){var l=i(15),s=i(34),g=i(40),b=i(132).indexOf,x=i(69),w=l([].push);c.exports=function(A,S){var P,D=g(A),N=0,I=[];for(P in D)!s(x,P)&&s(D,P)&&w(I,P);for(;S.length>N;)s(D,P=S[N++])&&(~b(I,P)||w(I,P));return I}},function(c,f,i){var l=i(40),s=i(67),g=i(43),b=function(x){return function(w,A,S){var P,D=l(w),N=g(D),I=s(S,N);if(x&&A!=A){for(;N>I;)if((P=D[I++])!=P)return!0}else for(;N>I;I++)if((x||I in D)&&D[I]===A)return x||I||0;return!x&&-1}};c.exports={includes:b(!0),indexOf:b(!1)}},function(c,f,i){var l=i(46);c.exports=l("document","documentElement")},function(c,f,i){var l=i(34),s=i(135),g=i(51),b=i(37);c.exports=function(x,w){for(var A=s(w),S=b.f,P=g.f,D=0;D<A.length;D++){var N=A[D];l(x,N)||S(x,N,P(w,N))}}},function(c,f,i){var l=i(46),s=i(15),g=i(72),b=i(112),x=i(32),w=s([].concat);c.exports=l("Reflect","ownKeys")||function(A){var S=g.f(x(A)),P=b.f;return P?w(S,P(A)):S}},function(c,f,i){var l,s,g,b=i(19),x=i(28),w=i(54),A=i(96),S=i(44),P=i(27),D=i(64),N=P("iterator"),I=!1;[].keys&&("next"in(g=[].keys())?(s=A(A(g)))!==Object.prototype&&(l=s):I=!0),l==null||b(function(){var B={};return l[N].call(B)!==B})?l={}:D&&(l=w(l)),x(l[N])||S(l,N,function(){return this}),c.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:I}},function(c,f,i){var l=i(19);c.exports=!l(function(){function s(){}return s.prototype.constructor=null,Object.getPrototypeOf(new s)!==s.prototype})},function(c,f,i){var l=i(17),s=i(15),g=i(69),b=i(33),x=i(34),w=i(37).f,A=i(72),S=i(139),P=i(175),D=i(85),N=i(177),I=!1,B=D("meta"),F=0,tt=function($){w($,B,{value:{objectID:"O"+F++,weakData:{}}})},it=c.exports={enable:function(){it.enable=function(){},I=!0;var $=A.f,G=s([].splice),J={};J[B]=1,$(J).length&&(A.f=function(z){for(var T=$(z),L=0,C=T.length;L<C;L++)if(T[L]===B){G(T,L,1);break}return T},l({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:S.f}))},fastKey:function($,G){if(!b($))return typeof $=="symbol"?$:(typeof $=="string"?"S":"P")+$;if(!x($,B)){if(!P($))return"F";if(!G)return"E";tt($)}return $[B].objectID},getWeakData:function($,G){if(!x($,B)){if(!P($))return!0;if(!G)return!1;tt($)}return $[B].weakData},onFreeze:function($){return N&&I&&P($)&&!x($,B)&&tt($),$}};g[B]=!0},function(c,f,i){var l=i(50),s=i(40),g=i(72).f,b=i(113),x=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];c.exports.f=function(w){return x&&l(w)=="Window"?function(A){try{return g(A)}catch(S){return b(x)}}(w):g(s(w))}},function(c,f,i){var l=i(27),s=i(70),g=l("iterator"),b=Array.prototype;c.exports=function(x){return x!==void 0&&(s.Array===x||b[g]===x)}},function(c,f,i){var l=i(7),s=i(35),g=i(55),b=i(32),x=i(89),w=i(115),A=l.TypeError;c.exports=function(S,P){var D=arguments.length<2?w(S):P;if(g(D))return b(s(D,S));throw A(x(S)+" is not iterable")}},function(c,f,i){var l=i(35),s=i(32),g=i(59);c.exports=function(b,x,w){var A,S;s(b);try{if(!(A=g(b,"return"))){if(x==="throw")throw w;return w}A=l(A,b)}catch(P){S=!0,A=P}if(x==="throw")throw w;if(S)throw A;return s(A),w}},function(c,f,i){var l=i(28),s=i(33),g=i(97);c.exports=function(b,x,w){var A,S;return g&&l(A=x.constructor)&&A!==w&&s(S=A.prototype)&&S!==w.prototype&&g(b,S),b}},function(c,f,i){var l=i(44);c.exports=function(s,g,b){for(var x in g)l(s,x,g[x],b);return s}},function(c,f,i){var l=i(46),s=i(37),g=i(27),b=i(36),x=g("species");c.exports=function(w){var A=l(w),S=s.f;b&&A&&!A[x]&&S(A,x,{configurable:!0,get:function(){return this}})}},function(c,f,i){var l=i(15),s=i(68),g=i(41),b=i(45),x=l("".charAt),w=l("".charCodeAt),A=l("".slice),S=function(P){return function(D,N){var I,B,F=g(b(D)),tt=s(N),it=F.length;return tt<0||tt>=it?P?"":void 0:(I=w(F,tt))<55296||I>56319||tt+1===it||(B=w(F,tt+1))<56320||B>57343?P?x(F,tt):I:P?A(F,tt,tt+2):B-56320+(I-55296<<10)+65536}};c.exports={codeAt:S(!1),charAt:S(!0)}},function(c,f){c.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(c,f,i){var l=i(86)("span").classList,s=l&&l.constructor&&l.constructor.prototype;c.exports=s===Object.prototype?void 0:s},function(c,f,i){var l=i(27);f.f=l},function(c,f,i){var l=i(182),s=i(34),g=i(149),b=i(37).f;c.exports=function(x){var w=l.Symbol||(l.Symbol={});s(w,x)||b(w,x,{value:g.f(x)})}},function(c,f,i){var l=i(19),s=i(7).RegExp,g=l(function(){var w=s("a","y");return w.lastIndex=2,w.exec("abcd")!=null}),b=g||l(function(){return!s("a","y").sticky}),x=g||l(function(){var w=s("^r","gy");return w.lastIndex=2,w.exec("str")!=null});c.exports={BROKEN_CARET:x,MISSED_STICKY:b,UNSUPPORTED_Y:g}},function(c,f,i){var l=i(17),s=i(132).includes,g=i(83);l({target:"Array",proto:!0},{includes:function(b){return s(this,b,arguments.length>1?arguments[1]:void 0)}}),g("includes")},function(c,f,i){var l=i(17),s=i(15),g=i(194),b=i(45),x=i(41),w=i(195),A=s("".indexOf);l({target:"String",proto:!0,forced:!w("includes")},{includes:function(S){return!!~A(x(b(this)),x(g(S)),arguments.length>1?arguments[1]:void 0)}})},function(c,f,i){var l=i(33),s=i(50),g=i(27)("match");c.exports=function(b){var x;return l(b)&&((x=b[g])!==void 0?!!x:s(b)=="RegExp")}},function(c,f){var i,l,s=c.exports={};function g(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}function x(F){if(i===setTimeout)return setTimeout(F,0);if((i===g||!i)&&setTimeout)return i=setTimeout,setTimeout(F,0);try{return i(F,0)}catch(tt){try{return i.call(null,F,0)}catch(it){return i.call(this,F,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:g}catch(F){i=g}try{l=typeof clearTimeout=="function"?clearTimeout:b}catch(F){l=b}})();var w,A=[],S=!1,P=-1;function D(){S&&w&&(S=!1,w.length?A=w.concat(A):P=-1,A.length&&N())}function N(){if(!S){var F=x(D);S=!0;for(var tt=A.length;tt;){for(w=A,A=[];++P<tt;)w&&w[P].run();P=-1,tt=A.length}w=null,S=!1,function(it){if(l===clearTimeout)return clearTimeout(it);if((l===b||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(it);try{l(it)}catch($){try{return l.call(null,it)}catch(G){return l.call(this,it)}}}(F)}}function I(F,tt){this.fun=F,this.array=tt}function B(){}s.nextTick=function(F){var tt=new Array(arguments.length-1);if(arguments.length>1)for(var it=1;it<arguments.length;it++)tt[it-1]=arguments[it];A.push(new I(F,tt)),A.length!==1||S||x(N)},I.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=B,s.addListener=B,s.once=B,s.off=B,s.removeListener=B,s.removeAllListeners=B,s.emit=B,s.prependListener=B,s.prependOnceListener=B,s.listeners=function(F){return[]},s.binding=function(F){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(F){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(c,f,i){var l=i(32),s=i(157),g=i(27)("species");c.exports=function(b,x){var w,A=l(b).constructor;return A===void 0||(w=l(A)[g])==null?x:s(w)}},function(c,f,i){var l=i(7),s=i(100),g=i(89),b=l.TypeError;c.exports=function(x){if(s(x))return x;throw b(g(x)+" is not a constructor")}},function(c,f,i){var l=i(17),s=i(159).trim;l({target:"String",proto:!0,forced:i(196)("trim")},{trim:function(){return s(this)}})},function(c,f,i){var l=i(15),s=i(45),g=i(41),b=i(160),x=l("".replace),w="["+b+"]",A=RegExp("^"+w+w+"*"),S=RegExp(w+w+"*$"),P=function(D){return function(N){var I=g(s(N));return 1&D&&(I=x(I,A,"")),2&D&&(I=x(I,S,"")),I}};c.exports={start:P(1),end:P(2),trim:P(3)}},function(c,f){c.exports=`    
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},function(c,f,i){var l=i(35),s=i(122),g=i(32),b=i(90),x=i(41),w=i(45),A=i(59),S=i(123),P=i(124);s("match",function(D,N,I){return[function(B){var F=w(this),tt=B==null?void 0:A(B,D);return tt?l(tt,B,F):new RegExp(B)[D](x(F))},function(B){var F=g(this),tt=x(B),it=I(N,F,tt);if(it.done)return it.value;if(!F.global)return P(F,tt);var $=F.unicode;F.lastIndex=0;for(var G,J=[],z=0;(G=P(F,tt))!==null;){var T=x(G[0]);J[z]=T,T===""&&(F.lastIndex=S(tt,b(F.lastIndex),$)),z++}return z===0?null:J}]})},function(c,f,i){var l=i(17),s=Math.hypot,g=Math.abs,b=Math.sqrt;l({target:"Math",stat:!0,forced:!!s&&s(1/0,NaN)!==1/0},{hypot:function(x,w){for(var A,S,P=0,D=0,N=arguments.length,I=0;D<N;)I<(A=g(arguments[D++]))?(P=P*(S=I/A)*S+1,I=A):P+=A>0?(S=A/I)*S:A;return I===1/0?1/0:I*b(P)}})},function(c,f,i){var l,s,g,b,x=i(7),w=i(76),A=i(62),S=i(28),P=i(34),D=i(19),N=i(133),I=i(101),B=i(86),F=i(164),tt=i(126),it=x.setImmediate,$=x.clearImmediate,G=x.process,J=x.Dispatch,z=x.Function,T=x.MessageChannel,L=x.String,C=0,U={},Q="onreadystatechange";try{l=x.location}catch(vt){}var lt=function(vt){if(P(U,vt)){var ut=U[vt];delete U[vt],ut()}},st=function(vt){return function(){lt(vt)}},yt=function(vt){lt(vt.data)},xt=function(vt){x.postMessage(L(vt),l.protocol+"//"+l.host)};it&&$||(it=function(vt){var ut=I(arguments,1);return U[++C]=function(){w(S(vt)?vt:z(vt),void 0,ut)},s(C),C},$=function(vt){delete U[vt]},tt?s=function(vt){G.nextTick(st(vt))}:J&&J.now?s=function(vt){J.now(st(vt))}:T&&!F?(b=(g=new T).port2,g.port1.onmessage=yt,s=A(b.postMessage,b)):x.addEventListener&&S(x.postMessage)&&!x.importScripts&&l&&l.protocol!=="file:"&&!D(xt)?(s=xt,x.addEventListener("message",yt,!1)):s=Q in B("script")?function(vt){N.appendChild(B("script")).onreadystatechange=function(){N.removeChild(this),lt(vt)}}:function(vt){setTimeout(st(vt),0)}),c.exports={set:it,clear:$}},function(c,f,i){var l=i(53);c.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(l)},function(c,f,i){var l=i(55),s=function(g){var b,x;this.promise=new g(function(w,A){if(b!==void 0||x!==void 0)throw TypeError("Bad Promise constructor");b=w,x=A}),this.resolve=l(b),this.reject=l(x)};c.exports.f=function(g){return new s(g)}},function(c,f,i){f.a=function(){return!1}},function(c,f,i){(function(l){i.d(f,"a",function(){return G});var s=i(1);function g(T){throw new Error("[mobx-utils] "+T)}function b(T,L){L===void 0&&(L="Illegal state"),T||g(L)}var x=function(T){return T&&T!==Object.prototype&&Object.getOwnPropertyNames(T).concat(x(Object.getPrototypeOf(T))||[])},w=function(T){return function(L){var C=x(L);return C.filter(function(U,Q){return C.indexOf(U)===Q})}(T).filter(function(L){return L!=="constructor"&&!~L.indexOf("__")})},A="pending",S="fulfilled",P="rejected";function D(T){switch(this.state){case A:return T.pending&&T.pending(this.value);case P:return T.rejected&&T.rejected(this.value);case S:return T.fulfilled?T.fulfilled(this.value):this.value}}function N(T,L){if(b(arguments.length<=2,"fromPromise expects up to two arguments"),b(typeof T=="function"||typeof T=="object"&&T&&typeof T.then=="function","Please pass a promise or function to fromPromise"),T.isPromiseBasedObservable===!0)return T;typeof T=="function"&&(T=new Promise(T));var C=T;T.then(Object(s.k)("observableFromPromise-resolve",function(Q){C.value=Q,C.state=S}),Object(s.k)("observableFromPromise-reject",function(Q){C.value=Q,C.state=P})),C.isPromiseBasedObservable=!0,C.case=D;var U=L&&L.state===S?L.value:void 0;return Object(s.q)(C,{value:U,state:A},{},{deep:!1}),C}(function(T){T.reject=Object(s.k)("fromPromise.reject",function(L){var C=T(Promise.reject(L));return C.state=P,C.value=L,C}),T.resolve=Object(s.k)("fromPromise.resolve",function(L){L===void 0&&(L=void 0);var C=T(Promise.resolve(L));return C.state=S,C.value=L,C})})(N||(N={}));var I=function(T,L,C,U){var Q,lt=arguments.length,st=lt<3?L:U===null?U=Object.getOwnPropertyDescriptor(L,C):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")st=Reflect.decorate(T,L,C,U);else for(var yt=T.length-1;yt>=0;yt--)(Q=T[yt])&&(st=(lt<3?Q(st):lt>3?Q(L,C,st):Q(L,C))||st);return lt>3&&st&&Object.defineProperty(L,C,st),st};(function(){function T(L,C){var U=this;Object(s.G)(function(){U.current=C,U.subscription=L.subscribe(U)})}T.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},T.prototype.next=function(L){this.current=L},T.prototype.complete=function(){this.dispose()},T.prototype.error=function(L){this.current=L,this.dispose()},I([s.C.ref],T.prototype,"current",void 0),I([s.k.bound],T.prototype,"next",null),I([s.k.bound],T.prototype,"complete",null),I([s.k.bound],T.prototype,"error",null)})();var B=function(){return B=Object.assign||function(T){for(var L,C=1,U=arguments.length;C<U;C++)for(var Q in L=arguments[C])Object.prototype.hasOwnProperty.call(L,Q)&&(T[Q]=L[Q]);return T},B.apply(this,arguments)},F=function(T,L,C,U){var Q,lt=arguments.length,st=lt<3?L:U===null?U=Object.getOwnPropertyDescriptor(L,C):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")st=Reflect.decorate(T,L,C,U);else for(var yt=T.length-1;yt>=0;yt--)(Q=T[yt])&&(st=(lt<3?Q(st):lt>3?Q(L,C,st):Q(L,C))||st);return lt>3&&st&&Object.defineProperty(L,C,st),st},tt=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function T(L){var C=this;this.model=L,this.localValues=s.C.map({}),this.localComputedValues=s.C.map({}),this.isPropertyDirty=function(U){return C.localValues.has(U)},b(Object(s.A)(L),"createViewModel expects an observable object"),w(L).forEach(function(U){if(U!==s.a&&U!=="__mobxDidRunLazyInitializers"){if(b(tt.indexOf(U)===-1,"The propertyname "+U+" is reserved and cannot be used with viewModels"),Object(s.w)(L,U)){var Q=Object(s.h)(L,U).derivation;C.localComputedValues.set(U,Object(s.m)(Q.bind(C)))}var lt=Object.getOwnPropertyDescriptor(L,U),st=lt?{enumerable:lt.enumerable}:{};Object.defineProperty(C,U,B(B({},st),{configurable:!0,get:function(){return Object(s.w)(L,U)?C.localComputedValues.get(U).get():C.isPropertyDirty(U)?C.localValues.get(U):C.model[U]},set:Object(s.k)(function(yt){yt!==C.model[U]?C.localValues.set(U,yt):C.localValues.delete(U)})}))}})}Object.defineProperty(T.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),T.prototype.submit=function(){var L=this;Object(s.B)(this.localValues).forEach(function(C){var U=L.localValues.get(C),Q=L.model[C];Object(s.y)(Q)?Q.replace(U):Object(s.z)(Q)?(Q.clear(),Q.merge(U)):Object(s.v)(U)||(L.model[C]=U)}),this.localValues.clear()},T.prototype.reset=function(){this.localValues.clear()},T.prototype.resetProperty=function(L){this.localValues.delete(L)},F([s.m],T.prototype,"isDirty",null),F([s.m],T.prototype,"changedValues",null),F([s.k.bound],T.prototype,"submit",null),F([s.k.bound],T.prototype,"reset",null),F([s.k.bound],T.prototype,"resetProperty",null)})();function it(T){if(!T)return"ROOT";for(var L=[];T.parent;)L.push(T.path),T=T.parent;return L.reverse().join("/")}function $(T){return Object(s.A)(T)||Object(s.y)(T)||Object(s.z)(T)}function G(T,L){var C=new WeakMap;function U(st){var yt=C.get(st.object);(function(xt,vt){switch(xt.type){case"add":Q(xt.newValue,vt,xt.name);break;case"update":lt(xt.oldValue),Q(xt.newValue,vt,xt.name||""+xt.index);break;case"remove":case"delete":lt(xt.oldValue);break;case"splice":xt.removed.map(lt),xt.added.forEach(function(mt,jt){return Q(mt,vt,""+(xt.index+jt))});for(var ut=xt.index+xt.addedCount;ut<xt.object.length;ut++)if($(xt.object[ut])){var ht=C.get(xt.object[ut]);ht&&(ht.path=""+ut)}}})(st,yt),L(st,it(yt),T)}function Q(st,yt,xt){if($(st)){var vt=C.get(st);if(vt){if(vt.parent!==yt||vt.path!==xt)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+it(yt)+"/"+xt+"', but it already exists at '"+it(vt.parent)+"/"+vt.path+"'")}else{var ut={parent:yt,path:xt,dispose:Object(s.D)(st,U)};C.set(st,ut),Object(s.p)(st).forEach(function(ht){var mt=ht[0];return Q(ht[1],ut,mt)})}}}function lt(st){if($(st)){var yt=C.get(st);if(!yt)return;C.delete(st),yt.dispose(),Object(s.L)(st).forEach(lt)}}return Q(T,void 0,""),function(){lt(T)}}var J,z=(J=function(T,L){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,U){C.__proto__=U}||function(C,U){for(var Q in U)U.hasOwnProperty(Q)&&(C[Q]=U[Q])},J(T,L)},function(T,L){function C(){this.constructor=T}J(T,L),T.prototype=L===null?Object.create(L):(C.prototype=L.prototype,new C)});(function(T){function L(C,U,Q){var lt=Q===void 0?{}:Q,st=lt.name,yt=st===void 0?"ogm"+(1e3*Math.random()|0):st,xt=lt.keyToName,vt=xt===void 0?function(mt){return""+mt}:xt,ut=T.call(this)||this;ut._keyToName=vt,ut._groupBy=U,ut._ogmInfoKey=Symbol("ogmInfo"+yt),ut._base=C;for(var ht=0;ht<C.length;ht++)ut._addItem(C[ht]);return ut._disposeBaseObserver=Object(s.D)(ut._base,function(mt){if(mt.type==="splice")Object(s.J)(function(){for(var jt=0,It=mt.removed;jt<It.length;jt++){var Kt=It[jt];ut._removeItem(Kt)}for(var Pt=0,Ct=mt.added;Pt<Ct.length;Pt++){var $t=Ct[Pt];ut._addItem($t)}});else{if(mt.type!=="update")throw new Error("illegal state");Object(s.J)(function(){ut._removeItem(mt.oldValue),ut._addItem(mt.newValue)})}}),ut}z(L,T),L.prototype.clear=function(){throw new Error("not supported")},L.prototype.delete=function(C){throw new Error("not supported")},L.prototype.set=function(C,U){throw new Error("not supported")},L.prototype.dispose=function(){this._disposeBaseObserver();for(var C=0;C<this._base.length;C++){var U=this._base[C];U[this._ogmInfoKey].reaction(),delete U[this._ogmInfoKey]}},L.prototype._getGroupArr=function(C){var U=T.prototype.get.call(this,C);return U===void 0&&(U=Object(s.C)([],{name:"GroupArray["+this._keyToName(C)+"]",deep:!1}),T.prototype.set.call(this,C,U)),U},L.prototype._removeFromGroupArr=function(C,U){var Q=T.prototype.get.call(this,C);Q.length===1?T.prototype.delete.call(this,C):(U===Q.length-1||(Q[U]=Q[Q.length-1],Q[U][this._ogmInfoKey].groupArrIndex=U),Q.length--)},L.prototype._addItem=function(C){var U=this,Q=this._groupBy(C),lt=this._getGroupArr(Q),st={groupByValue:Q,groupArrIndex:lt.length,reaction:Object(s.F)(function(){return U._groupBy(C)},function(yt,xt){var vt=C[U._ogmInfoKey];U._removeFromGroupArr(vt.groupByValue,vt.groupArrIndex);var ut=U._getGroupArr(yt),ht=ut.length;ut.push(C),vt.groupByValue=yt,vt.groupArrIndex=ht})};Object.defineProperty(C,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:st}),lt.push(C)},L.prototype._removeItem=function(C){var U=C[this._ogmInfoKey];this._removeFromGroupArr(U.groupByValue,U.groupArrIndex),U.reaction(),delete C[this._ogmInfoKey]}})(s.b),function(){function T(L,C){this.base=L,this.args=C,this.closestIdx=0,this.isDisposed=!1;for(var U=this.closest=this.root=L,Q=0;Q<this.args.length-1&&(U=U.get(C[Q]));Q++)this.closest=U;this.closestIdx=Q}return T.prototype.exists=function(){this.assertNotDisposed();var L=this.args.length;return this.closestIdx>=L-1&&this.closest.has(this.args[L-1])},T.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},T.prototype.set=function(L){this.assertNotDisposed();for(var C=this.args.length,U=this.closest,Q=this.closestIdx;Q<C-1;Q++){var lt=new Map;U.set(this.args[Q],lt),U=lt}this.closestIdx=C-1,this.closest=U,U.set(this.args[C-1],L)},T.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var L=this.args.length;this.closest.delete(this.args[L-1]);for(var C=this.root,U=[C],Q=0;Q<L-1;Q++)C=C.get(this.args[Q]),U.push(C);for(Q=U.length-1;Q>0;Q--)U[Q].size===0&&U[Q-1].delete(this.args[Q-1]);this.isDisposed=!0},T.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},T}(),Promise.resolve(),typeof queueMicrotask<"u"||l!==void 0&&l.nextTick}).call(this,i(155))},function(c,f,i){var l;(function(s,g,b){if(s){for(var x,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"},A={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},S={"~":"`","!":"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();$.prototype.bind=function(G,J,z){var T=this;return G=G instanceof Array?G:[G],T._bindMultiple.call(T,G,J,z),T},$.prototype.unbind=function(G,J){return this.bind.call(this,G,function(){},J)},$.prototype.trigger=function(G,J){var z=this;return z._directMap[G+":"+J]&&z._directMap[G+":"+J]({},G),z},$.prototype.reset=function(){var G=this;return G._callbacks={},G._directMap={},G},$.prototype.stopCallback=function(G,J){if((" "+J.className+" ").indexOf(" mousetrap ")>-1||it(J,this.target))return!1;if("composedPath"in G&&typeof G.composedPath=="function"){var z=G.composedPath()[0];z!==G.target&&(J=z)}return J.tagName=="INPUT"||J.tagName=="SELECT"||J.tagName=="TEXTAREA"||J.isContentEditable},$.prototype.handleKey=function(){var G=this;return G._handleKey.apply(G,arguments)},$.addKeycodes=function(G){for(var J in G)G.hasOwnProperty(J)&&(w[J]=G[J]);x=null},$.init=function(){var G=$(g);for(var J in G)J.charAt(0)!=="_"&&($[J]=function(z){return function(){return G[z].apply(G,arguments)}}(J))},$.init(),s.Mousetrap=$,c.exports&&(c.exports=$),(l=function(){return $}.call(f,i,f,c))===void 0||(c.exports=l)}function N(G,J,z){G.addEventListener?G.addEventListener(J,z,!1):G.attachEvent("on"+J,z)}function I(G){if(G.type=="keypress"){var J=String.fromCharCode(G.which);return G.shiftKey||(J=J.toLowerCase()),J}return w[G.which]?w[G.which]:A[G.which]?A[G.which]:String.fromCharCode(G.which).toLowerCase()}function B(G){return G=="shift"||G=="ctrl"||G=="alt"||G=="meta"}function F(G,J,z){return z||(z=function(){if(!x)for(var T in x={},w)T>95&&T<112||w.hasOwnProperty(T)&&(x[w[T]]=T);return x}()[G]?"keydown":"keypress"),z=="keypress"&&J.length&&(z="keydown"),z}function tt(G,J){var z,T,L,C=[];for(z=function(U){return U==="+"?["+"]:(U=U.replace(/\+{2}/g,"+plus")).split("+")}(G),L=0;L<z.length;++L)T=z[L],P[T]&&(T=P[T]),J&&J!="keypress"&&S[T]&&(T=S[T],C.push("shift")),B(T)&&C.push(T);return{key:T,modifiers:C,action:J=F(T,C,J)}}function it(G,J){return G!==null&&G!==g&&(G===J||it(G.parentNode,J))}function $(G){var J=this;if(G=G||g,!(J instanceof $))return new $(G);J.target=G,J._callbacks={},J._directMap={};var z,T={},L=!1,C=!1,U=!1;function Q(ut){ut=ut||{};var ht,mt=!1;for(ht in T)ut[ht]?mt=!0:T[ht]=0;mt||(U=!1)}function lt(ut,ht,mt,jt,It,Kt){var Pt,Ct,$t,K,Z=[],at=mt.type;if(!J._callbacks[ut])return[];for(at=="keyup"&&B(ut)&&(ht=[ut]),Pt=0;Pt<J._callbacks[ut].length;++Pt)if(Ct=J._callbacks[ut][Pt],(jt||!Ct.seq||T[Ct.seq]==Ct.level)&&at==Ct.action&&(at=="keypress"&&!mt.metaKey&&!mt.ctrlKey||($t=ht,K=Ct.modifiers,$t.sort().join(",")===K.sort().join(",")))){var _t=!jt&&Ct.combo==It,At=jt&&Ct.seq==jt&&Ct.level==Kt;(_t||At)&&J._callbacks[ut].splice(Pt,1),Z.push(Ct)}return Z}function st(ut,ht,mt,jt){J.stopCallback(ht,ht.target||ht.srcElement,mt,jt)||ut(ht,mt)===!1&&(function(It){It.preventDefault?It.preventDefault():It.returnValue=!1}(ht),function(It){It.stopPropagation?It.stopPropagation():It.cancelBubble=!0}(ht))}function yt(ut){typeof ut.which!="number"&&(ut.which=ut.keyCode);var ht=I(ut);ht&&(ut.type!="keyup"||L!==ht?J.handleKey(ht,function(mt){var jt=[];return mt.shiftKey&&jt.push("shift"),mt.altKey&&jt.push("alt"),mt.ctrlKey&&jt.push("ctrl"),mt.metaKey&&jt.push("meta"),jt}(ut),ut):L=!1)}function xt(ut,ht,mt,jt){function It($t){return function(){U=$t,++T[ut],clearTimeout(z),z=setTimeout(Q,1e3)}}function Kt($t){st(mt,$t,ut),jt!=="keyup"&&(L=I($t)),setTimeout(Q,10)}T[ut]=0;for(var Pt=0;Pt<ht.length;++Pt){var Ct=Pt+1===ht.length?Kt:It(jt||tt(ht[Pt+1]).action);vt(ht[Pt],Ct,jt,ut,Pt)}}function vt(ut,ht,mt,jt,It){J._directMap[ut+":"+mt]=ht;var Kt,Pt=(ut=ut.replace(/\s+/g," ")).split(" ");Pt.length>1?xt(ut,Pt,ht,mt):(Kt=tt(ut,mt),J._callbacks[Kt.key]=J._callbacks[Kt.key]||[],lt(Kt.key,Kt.modifiers,{type:Kt.action},jt,ut,It),J._callbacks[Kt.key][jt?"unshift":"push"]({callback:ht,modifiers:Kt.modifiers,action:Kt.action,seq:jt,level:It,combo:ut}))}J._handleKey=function(ut,ht,mt){var jt,It=lt(ut,ht,mt),Kt={},Pt=0,Ct=!1;for(jt=0;jt<It.length;++jt)It[jt].seq&&(Pt=Math.max(Pt,It[jt].level));for(jt=0;jt<It.length;++jt)if(It[jt].seq){if(It[jt].level!=Pt)continue;Ct=!0,Kt[It[jt].seq]=1,st(It[jt].callback,mt,It[jt].combo,It[jt].seq)}else Ct||st(It[jt].callback,mt,It[jt].combo);var $t=mt.type=="keypress"&&C;mt.type!=U||B(ut)||$t||Q(Kt),C=Ct&&mt.type=="keydown"},J._bindMultiple=function(ut,ht,mt){for(var jt=0;jt<ut.length;++jt)vt(ut[jt],ht,mt)},N(G,"keypress",yt),N(G,"keydown",yt),N(G,"keyup",yt)}})(typeof window<"u"?window:null,typeof window<"u"?document:null)},function(c,f,i){var l=i(36),s=i(37),g=i(32),b=i(40),x=i(66);c.exports=l?Object.defineProperties:function(w,A){g(w);for(var S,P=b(A),D=x(A),N=D.length,I=0;N>I;)s.f(w,S=D[I++],P[S]);return w}},function(c,f,i){var l=i(7),s=i(35),g=i(28),b=i(33),x=l.TypeError;c.exports=function(w,A){var S,P;if(A==="string"&&g(S=w.toString)&&!b(P=s(S,w))||g(S=w.valueOf)&&!b(P=s(S,w))||A!=="string"&&g(S=w.toString)&&!b(P=s(S,w)))return P;throw x("Can't convert object to primitive value")}},function(c,f,i){var l=i(7),s=i(28),g=i(92),b=l.WeakMap;c.exports=s(b)&&/native code/.test(g(b))},function(c,f,i){var l=i(136).IteratorPrototype,s=i(54),g=i(71),b=i(73),x=i(70),w=function(){return this};c.exports=function(A,S,P,D){var N=S+" Iterator";return A.prototype=s(l,{next:g(+!D,P)}),b(A,N,!1,!0),x[N]=w,A}},function(c,f,i){var l=i(7),s=i(28),g=l.String,b=l.TypeError;c.exports=function(x){if(typeof x=="object"||s(x))return x;throw b("Can't set "+g(x)+" as a prototype")}},function(c,f,i){var l=i(17),s=i(7),g=i(15),b=i(95),x=i(44),w=i(138),A=i(114),S=i(117),P=i(28),D=i(33),N=i(19),I=i(118),B=i(73),F=i(143);c.exports=function(tt,it,$){var G=tt.indexOf("Map")!==-1,J=tt.indexOf("Weak")!==-1,z=G?"set":"add",T=s[tt],L=T&&T.prototype,C=T,U={},Q=function(ut){var ht=g(L[ut]);x(L,ut,ut=="add"?function(mt){return ht(this,mt===0?0:mt),this}:ut=="delete"?function(mt){return!(J&&!D(mt))&&ht(this,mt===0?0:mt)}:ut=="get"?function(mt){return J&&!D(mt)?void 0:ht(this,mt===0?0:mt)}:ut=="has"?function(mt){return!(J&&!D(mt))&&ht(this,mt===0?0:mt)}:function(mt,jt){return ht(this,mt===0?0:mt,jt),this})};if(b(tt,!P(T)||!(J||L.forEach&&!N(function(){new T().entries().next()}))))C=$.getConstructor(it,tt,G,z),w.enable();else if(b(tt,!0)){var lt=new C,st=lt[z](J?{}:-0,1)!=lt,yt=N(function(){lt.has(1)}),xt=I(function(ut){new T(ut)}),vt=!J&&N(function(){for(var ut=new T,ht=5;ht--;)ut[z](ht,ht);return!ut.has(-0)});xt||((C=it(function(ut,ht){S(ut,L);var mt=F(new T,ut,C);return ht!=null&&A(ht,mt[z],{that:mt,AS_ENTRIES:G}),mt})).prototype=L,L.constructor=C),(yt||vt)&&(Q("delete"),Q("has"),G&&Q("get")),(vt||st)&&Q(z),J&&L.clear&&delete L.clear}return U[tt]=C,l({global:!0,forced:C!=T},U),B(C,tt),J||$.setStrong(C,tt,G),C}},function(c,f,i){var l=i(19),s=i(33),g=i(50),b=i(176),x=Object.isExtensible,w=l(function(){});c.exports=w||b?function(A){return!!s(A)&&(!b||g(A)!="ArrayBuffer")&&(!x||x(A))}:x},function(c,f,i){var l=i(19);c.exports=l(function(){if(typeof ArrayBuffer=="function"){var s=new ArrayBuffer(8);Object.isExtensible(s)&&Object.defineProperty(s,"a",{value:8})}})},function(c,f,i){var l=i(19);c.exports=!l(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(c,f,i){var l=i(37).f,s=i(54),g=i(144),b=i(62),x=i(117),w=i(114),A=i(111),S=i(145),P=i(36),D=i(138).fastKey,N=i(56),I=N.set,B=N.getterFor;c.exports={getConstructor:function(F,tt,it,$){var G=F(function(C,U){x(C,J),I(C,{type:tt,index:s(null),first:void 0,last:void 0,size:0}),P||(C.size=0),U!=null&&w(U,C[$],{that:C,AS_ENTRIES:it})}),J=G.prototype,z=B(tt),T=function(C,U,Q){var lt,st,yt=z(C),xt=L(C,U);return xt?xt.value=Q:(yt.last=xt={index:st=D(U,!0),key:U,value:Q,previous:lt=yt.last,next:void 0,removed:!1},yt.first||(yt.first=xt),lt&&(lt.next=xt),P?yt.size++:C.size++,st!=="F"&&(yt.index[st]=xt)),C},L=function(C,U){var Q,lt=z(C),st=D(U);if(st!=="F")return lt.index[st];for(Q=lt.first;Q;Q=Q.next)if(Q.key==U)return Q};return g(J,{clear:function(){for(var C=z(this),U=C.index,Q=C.first;Q;)Q.removed=!0,Q.previous&&(Q.previous=Q.previous.next=void 0),delete U[Q.index],Q=Q.next;C.first=C.last=void 0,P?C.size=0:this.size=0},delete:function(C){var U=this,Q=z(U),lt=L(U,C);if(lt){var st=lt.next,yt=lt.previous;delete Q.index[lt.index],lt.removed=!0,yt&&(yt.next=st),st&&(st.previous=yt),Q.first==lt&&(Q.first=st),Q.last==lt&&(Q.last=yt),P?Q.size--:U.size--}return!!lt},forEach:function(C){for(var U,Q=z(this),lt=b(C,arguments.length>1?arguments[1]:void 0);U=U?U.next:Q.first;)for(lt(U.value,U.key,this);U&&U.removed;)U=U.previous},has:function(C){return!!L(this,C)}}),g(J,it?{get:function(C){var U=L(this,C);return U&&U.value},set:function(C,U){return T(this,C===0?0:C,U)}}:{add:function(C){return T(this,C=C===0?0:C,C)}}),P&&l(J,"size",{get:function(){return z(this).size}}),G},setStrong:function(F,tt,it){var $=tt+" Iterator",G=B(tt),J=B($);A(F,tt,function(z,T){I(this,{type:$,target:z,state:G(z),kind:T,last:void 0})},function(){for(var z=J(this),T=z.kind,L=z.last;L&&L.removed;)L=L.previous;return z.target&&(z.last=L=L?L.next:z.state.first)?T=="keys"?{value:L.key,done:!1}:T=="values"?{value:L.value,done:!1}:{value:[L.key,L.value],done:!1}:(z.target=void 0,{value:void 0,done:!0})},it?"entries":"values",!it,!0),S(tt)}}},function(c,f,i){var l=i(116),s=i(98);c.exports=l?{}.toString:function(){return"[object "+s(this)+"]"}},function(c,f,i){var l=i(74).forEach,s=i(120)("forEach");c.exports=s?[].forEach:function(g){return l(this,g,arguments.length>1?arguments[1]:void 0)}},function(c,f,i){var l=i(7),s=i(99),g=i(100),b=i(33),x=i(27)("species"),w=l.Array;c.exports=function(A){var S;return s(A)&&(S=A.constructor,(g(S)&&(S===w||s(S.prototype))||b(S)&&(S=S[x])===null)&&(S=void 0)),S===void 0?w:S}},function(c,f,i){var l=i(7);c.exports=l},function(c,f,i){var l=i(7),s=i(62),g=i(35),b=i(38),x=i(184),w=i(140),A=i(100),S=i(43),P=i(61),D=i(141),N=i(115),I=l.Array;c.exports=function(B){var F=b(B),tt=A(this),it=arguments.length,$=it>1?arguments[1]:void 0,G=$!==void 0;G&&($=s($,it>2?arguments[2]:void 0));var J,z,T,L,C,U,Q=N(F),lt=0;if(!Q||this==I&&w(Q))for(J=S(F),z=tt?new this(J):I(J);J>lt;lt++)U=G?$(F[lt],lt):F[lt],P(z,lt,U);else for(C=(L=D(F,Q)).next,z=tt?new this:[];!(T=g(C,L)).done;lt++)U=G?x(L,$,[T.value,lt],!0):T.value,P(z,lt,U);return z.length=lt,z}},function(c,f,i){var l=i(32),s=i(142);c.exports=function(g,b,x,w){try{return w?b(l(x)[0],x[1]):b(x)}catch(A){s(g,"throw",A)}}},function(c,f,i){var l=i(32);c.exports=function(){var s=l(this),g="";return s.global&&(g+="g"),s.ignoreCase&&(g+="i"),s.multiline&&(g+="m"),s.dotAll&&(g+="s"),s.unicode&&(g+="u"),s.sticky&&(g+="y"),g}},function(c,f,i){var l=i(19),s=i(7).RegExp;c.exports=l(function(){var g=s(".","s");return!(g.dotAll&&g.exec(`
`)&&g.flags==="s")})},function(c,f,i){var l=i(19),s=i(7).RegExp;c.exports=l(function(){var g=s("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"})},function(c,f,i){var l=i(17),s=i(15),g=i(55),b=i(38),x=i(43),w=i(41),A=i(19),S=i(189),P=i(120),D=i(190),N=i(191),I=i(65),B=i(192),F=[],tt=s(F.sort),it=s(F.push),$=A(function(){F.sort(void 0)}),G=A(function(){F.sort(null)}),J=P("sort"),z=!A(function(){if(I)return I<70;if(!(D&&D>3)){if(N)return!0;if(B)return B<603;var T,L,C,U,Q="";for(T=65;T<76;T++){switch(L=String.fromCharCode(T),T){case 66:case 69:case 70:case 72:C=3;break;case 68:case 71:C=4;break;default:C=2}for(U=0;U<47;U++)F.push({k:L+U,v:C})}for(F.sort(function(lt,st){return st.v-lt.v}),U=0;U<F.length;U++)L=F[U].k.charAt(0),Q.charAt(Q.length-1)!==L&&(Q+=L);return Q!=="DGBEFHACIJK"}});l({target:"Array",proto:!0,forced:$||!G||!J||!z},{sort:function(T){T!==void 0&&g(T);var L=b(this);if(z)return T===void 0?tt(L):tt(L,T);var C,U,Q=[],lt=x(L);for(U=0;U<lt;U++)U in L&&it(Q,L[U]);for(S(Q,function(st){return function(yt,xt){return xt===void 0?-1:yt===void 0?1:st!==void 0?+st(yt,xt)||0:w(yt)>w(xt)?1:-1}}(T)),C=Q.length,U=0;U<C;)L[U]=Q[U++];for(;U<lt;)delete L[U++];return L}})},function(c,f,i){var l=i(113),s=Math.floor,g=function(w,A){var S=w.length,P=s(S/2);return S<8?b(w,A):x(w,g(l(w,0,P),A),g(l(w,P),A),A)},b=function(w,A){for(var S,P,D=w.length,N=1;N<D;){for(P=N,S=w[N];P&&A(w[P-1],S)>0;)w[P]=w[--P];P!==N++&&(w[P]=S)}return w},x=function(w,A,S,P){for(var D=A.length,N=S.length,I=0,B=0;I<D||B<N;)w[I+B]=I<D&&B<N?P(A[I],S[B])<=0?A[I++]:S[B++]:I<D?A[I++]:S[B++];return w};c.exports=g},function(c,f,i){var l=i(53).match(/firefox\/(\d+)/i);c.exports=!!l&&+l[1]},function(c,f,i){var l=i(53);c.exports=/MSIE|Trident/.test(l)},function(c,f,i){var l=i(53).match(/AppleWebKit\/(\d+)\./);c.exports=!!l&&+l[1]},function(c,f,i){var l=i(17),s=i(74).find,g=i(83),b="find",x=!0;b in[]&&Array(1).find(function(){x=!1}),l({target:"Array",proto:!0,forced:x},{find:function(w){return s(this,w,arguments.length>1?arguments[1]:void 0)}}),g(b)},function(c,f,i){var l=i(7),s=i(154),g=l.TypeError;c.exports=function(b){if(s(b))throw g("The method doesn't accept regular expressions");return b}},function(c,f,i){var l=i(27)("match");c.exports=function(s){var g=/./;try{"/./"[s](g)}catch(b){try{return g[l]=!1,"/./"[s](g)}catch(x){}}return!1}},function(c,f,i){var l=i(94).PROPER,s=i(19),g=i(160);c.exports=function(b){return s(function(){return!!g[b]()||"\u200B\x85\u180E"[b]()!=="\u200B\x85\u180E"||l&&g[b].name!==b})}},function(c,f,i){var l=i(15);c.exports=l(1 .valueOf)},function(c,f,i){var l=i(15),s=i(38),g=Math.floor,b=l("".charAt),x=l("".replace),w=l("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S=/\$([$&'`]|\d{1,2})/g;c.exports=function(P,D,N,I,B,F){var tt=N+P.length,it=I.length,$=S;return B!==void 0&&(B=s(B),$=A),x(F,$,function(G,J){var z;switch(b(J,0)){case"$":return"$";case"&":return P;case"`":return w(D,0,N);case"'":return w(D,tt);case"<":z=B[w(J,1,-1)];break;default:var T=+J;if(T===0)return G;if(T>it){var L=g(T/10);return L===0?G:L<=it?I[L-1]===void 0?b(J,1):I[L-1]+b(J,1):G}z=I[T-1]}return z===void 0?"":z})}},function(c,f,i){var l=i(36),s=i(15),g=i(35),b=i(19),x=i(66),w=i(112),A=i(93),S=i(38),P=i(81),D=Object.assign,N=Object.defineProperty,I=s([].concat);c.exports=!D||b(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={},F={},tt=Symbol(),it="abcdefghijklmnopqrst";return B[tt]=7,it.split("").forEach(function($){F[$]=$}),D({},B)[tt]!=7||x(D({},F)).join("")!=it})?function(B,F){for(var tt=S(B),it=arguments.length,$=1,G=w.f,J=A.f;it>$;)for(var z,T=P(arguments[$++]),L=G?I(x(T),G(T)):x(T),C=L.length,U=0;C>U;)z=L[U++],l&&!g(J,T,z)||(tt[z]=T[z]);return tt}:D},function(c,f,i){var l=i(7),s=i(15),g=i(55),b=i(33),x=i(34),w=i(101),A=l.Function,S=s([].concat),P=s([].join),D={},N=function(I,B,F){if(!x(D,B)){for(var tt=[],it=0;it<B;it++)tt[it]="a["+it+"]";D[B]=A("C,a","return new C("+P(tt,",")+")")}return D[B](I,F)};c.exports=A.bind||function(I){var B=g(this),F=B.prototype,tt=w(arguments,1),it=function(){var $=S(tt,w(arguments));return this instanceof it?N(B,$.length,$):B.apply(I,$)};return b(F)&&(it.prototype=F),it}},function(c,f,i){var l=i(34);c.exports=function(s){return s!==void 0&&(l(s,"value")||l(s,"writable"))}},function(c,f,i){var l=i(15),s=i(45),g=i(41),b=/"/g,x=l("".replace);c.exports=function(w,A,S,P){var D=g(s(w)),N="<"+A;return S!==""&&(N+=" "+S+'="'+x(g(P),b,"&quot;")+'"'),N+">"+D+"</"+A+">"}},function(c,f,i){var l=i(19);c.exports=function(s){return l(function(){var g=""[s]('"');return g!==g.toLowerCase()||g.split('"').length>3})}},function(c,f,i){var l,s,g,b,x=i(17),w=i(64),A=i(7),S=i(46),P=i(35),D=i(205),N=i(44),I=i(144),B=i(97),F=i(73),tt=i(145),it=i(55),$=i(28),G=i(33),J=i(117),z=i(92),T=i(114),L=i(118),C=i(156),U=i(163).set,Q=i(206),lt=i(209),st=i(210),yt=i(165),xt=i(211),vt=i(56),ut=i(95),ht=i(27),mt=i(212),jt=i(126),It=i(65),Kt=ht("species"),Pt="Promise",Ct=vt.getterFor(Pt),$t=vt.set,K=vt.getterFor(Pt),Z=D&&D.prototype,at=D,_t=Z,At=A.TypeError,wt=A.document,Wt=A.process,re=yt.f,Qt=re,Gt=!!(wt&&wt.createEvent&&A.dispatchEvent),gt=$(A.PromiseRejectionEvent),Ht="unhandledrejection",et=!1,zt=ut(Pt,function(){var Y=z(at),ct=Y!==String(at);if(!ct&&It===66||w&&!_t.finally)return!0;if(It>=51&&/native code/.test(Y))return!1;var Tt=new at(function(Vt){Vt(1)}),Dt=function(Vt){Vt(function(){},function(){})};return(Tt.constructor={})[Kt]=Dt,!(et=Tt.then(function(){})instanceof Dt)||!ct&&mt&&!gt}),ue=zt||!L(function(Y){at.all(Y).catch(function(){})}),ge=function(Y){var ct;return!(!G(Y)||!$(ct=Y.then))&&ct},ie=function(Y,ct){if(!Y.notified){Y.notified=!0;var Tt=Y.reactions;Q(function(){for(var Dt=Y.value,Vt=Y.state==1,fe=0;Tt.length>fe;){var Fe,Je,Ce,Re=Tt[fe++],Lt=Vt?Re.ok:Re.fail,Zt=Re.resolve,te=Re.reject,ne=Re.domain;try{Lt?(Vt||(Y.rejection===2&&ae(Y),Y.rejection=1),Lt===!0?Fe=Dt:(ne&&ne.enter(),Fe=Lt(Dt),ne&&(ne.exit(),Ce=!0)),Fe===Re.promise?te(At("Promise-chain cycle")):(Je=ge(Fe))?P(Je,Fe,Zt,te):Zt(Fe)):te(Dt)}catch(we){ne&&!Ce&&ne.exit(),te(we)}}Y.reactions=[],Y.notified=!1,ct&&!Y.rejection&&je(Y)})}},ye=function(Y,ct,Tt){var Dt,Vt;Gt?((Dt=wt.createEvent("Event")).promise=ct,Dt.reason=Tt,Dt.initEvent(Y,!1,!0),A.dispatchEvent(Dt)):Dt={promise:ct,reason:Tt},!gt&&(Vt=A["on"+Y])?Vt(Dt):Y===Ht&&st("Unhandled promise rejection",Tt)},je=function(Y){P(U,A,function(){var ct,Tt=Y.facade,Dt=Y.value;if(Pe(Y)&&(ct=xt(function(){jt?Wt.emit("unhandledRejection",Dt,Tt):ye(Ht,Tt,Dt)}),Y.rejection=jt||Pe(Y)?2:1,ct.error))throw ct.value})},Pe=function(Y){return Y.rejection!==1&&!Y.parent},ae=function(Y){P(U,A,function(){var ct=Y.facade;jt?Wt.emit("rejectionHandled",ct):ye("rejectionhandled",ct,Y.value)})},Ne=function(Y,ct,Tt){return function(Dt){Y(ct,Dt,Tt)}},X=function(Y,ct,Tt){Y.done||(Y.done=!0,Tt&&(Y=Tt),Y.value=ct,Y.state=2,ie(Y,!0))},rt=function(Y,ct,Tt){if(!Y.done){Y.done=!0,Tt&&(Y=Tt);try{if(Y.facade===ct)throw At("Promise can't be resolved itself");var Dt=ge(ct);Dt?Q(function(){var Vt={done:!1};try{P(Dt,ct,Ne(rt,Vt,Y),Ne(X,Vt,Y))}catch(fe){X(Vt,fe,Y)}}):(Y.value=ct,Y.state=1,ie(Y,!1))}catch(Vt){X({done:!1},Vt,Y)}}};if(zt&&(_t=(at=function(Y){J(this,_t),it(Y),P(l,this);var ct=Ct(this);try{Y(Ne(rt,ct),Ne(X,ct))}catch(Tt){X(ct,Tt)}}).prototype,(l=function(Y){$t(this,{type:Pt,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=I(_t,{then:function(Y,ct){var Tt=K(this),Dt=Tt.reactions,Vt=re(C(this,at));return Vt.ok=!$(Y)||Y,Vt.fail=$(ct)&&ct,Vt.domain=jt?Wt.domain:void 0,Tt.parent=!0,Dt[Dt.length]=Vt,Tt.state!=0&&ie(Tt,!1),Vt.promise},catch:function(Y){return this.then(void 0,Y)}}),s=function(){var Y=new l,ct=Ct(Y);this.promise=Y,this.resolve=Ne(rt,ct),this.reject=Ne(X,ct)},yt.f=re=function(Y){return Y===at||Y===g?new s(Y):Qt(Y)},!w&&$(D)&&Z!==Object.prototype)){b=Z.then,et||(N(Z,"then",function(Y,ct){var Tt=this;return new at(function(Dt,Vt){P(b,Tt,Dt,Vt)}).then(Y,ct)},{unsafe:!0}),N(Z,"catch",_t.catch,{unsafe:!0}));try{delete Z.constructor}catch(Y){}B&&B(Z,_t)}x({global:!0,wrap:!0,forced:zt},{Promise:at}),F(at,Pt,!1,!0),tt(Pt),g=S(Pt),x({target:Pt,stat:!0,forced:zt},{reject:function(Y){var ct=re(this);return P(ct.reject,void 0,Y),ct.promise}}),x({target:Pt,stat:!0,forced:w||zt},{resolve:function(Y){return lt(w&&this===g?at:this,Y)}}),x({target:Pt,stat:!0,forced:ue},{all:function(Y){var ct=this,Tt=re(ct),Dt=Tt.resolve,Vt=Tt.reject,fe=xt(function(){var Fe=it(ct.resolve),Je=[],Ce=0,Re=1;T(Y,function(Lt){var Zt=Ce++,te=!1;Re++,P(Fe,ct,Lt).then(function(ne){te||(te=!0,Je[Zt]=ne,--Re||Dt(Je))},Vt)}),--Re||Dt(Je)});return fe.error&&Vt(fe.value),Tt.promise},race:function(Y){var ct=this,Tt=re(ct),Dt=Tt.reject,Vt=xt(function(){var fe=it(ct.resolve);T(Y,function(Fe){P(fe,ct,Fe).then(Tt.resolve,Dt)})});return Vt.error&&Dt(Vt.value),Tt.promise}})},function(c,f,i){var l=i(7);c.exports=l.Promise},function(c,f,i){var l,s,g,b,x,w,A,S,P=i(7),D=i(62),N=i(51).f,I=i(163).set,B=i(164),F=i(207),tt=i(208),it=i(126),$=P.MutationObserver||P.WebKitMutationObserver,G=P.document,J=P.process,z=P.Promise,T=N(P,"queueMicrotask"),L=T&&T.value;L||(l=function(){var C,U;for(it&&(C=J.domain)&&C.exit();s;){U=s.fn,s=s.next;try{U()}catch(Q){throw s?b():g=void 0,Q}}g=void 0,C&&C.enter()},B||it||tt||!$||!G?!F&&z&&z.resolve?((A=z.resolve(void 0)).constructor=z,S=D(A.then,A),b=function(){S(l)}):it?b=function(){J.nextTick(l)}:(I=D(I,P),b=function(){I(l)}):(x=!0,w=G.createTextNode(""),new $(l).observe(w,{characterData:!0}),b=function(){w.data=x=!x})),c.exports=L||function(C){var U={fn:C,next:void 0};g&&(g.next=U),s||(s=U,b()),g=U}},function(c,f,i){var l=i(53),s=i(7);c.exports=/ipad|iphone|ipod/i.test(l)&&s.Pebble!==void 0},function(c,f,i){var l=i(53);c.exports=/web0s(?!.*chrome)/i.test(l)},function(c,f,i){var l=i(32),s=i(33),g=i(165);c.exports=function(b,x){if(l(b),s(x)&&x.constructor===b)return x;var w=g.f(b);return(0,w.resolve)(x),w.promise}},function(c,f,i){var l=i(7);c.exports=function(s,g){var b=l.console;b&&b.error&&(arguments.length==1?b.error(s):b.error(s,g))}},function(c,f){c.exports=function(i){try{return{error:!1,value:i()}}catch(l){return{error:!0,value:l}}}},function(c,f){c.exports=typeof window=="object"},function(c,f,i){var l=i(36),s=i(15),g=i(66),b=i(40),x=s(i(93).f),w=s([].push),A=function(S){return function(P){for(var D,N=b(P),I=g(N),B=I.length,F=0,tt=[];B>F;)D=I[F++],l&&!x(N,D)||w(tt,S?[D,N[D]]:N[D]);return tt}};c.exports={entries:A(!0),values:A(!1)}},function(c,f,i){var l=i(38),s=i(67),g=i(43);c.exports=function(b){for(var x=l(this),w=g(x),A=arguments.length,S=s(A>1?arguments[1]:void 0,w),P=A>2?arguments[2]:void 0,D=P===void 0?w:s(P,w);D>S;)x[S++]=b;return x}},function(c,f,i){i.r(f),i.d(f,"observer",function(){return Gr}),i.d(f,"LogicFlow",function(){return xf}),i.d(f,"h",function(){return et.g}),i.d(f,"LogicFlowUtil",function(){return l}),i.d(f,"BaseNode",function(){return jn}),i.d(f,"RectNode",function(){return yl}),i.d(f,"CircleNode",function(){return bl}),i.d(f,"PolygonNode",function(){return El}),i.d(f,"DiamondNode",function(){return Al}),i.d(f,"EllipseNode",function(){return Nl}),i.d(f,"TextNode",function(){return Il}),i.d(f,"HtmlNode",function(){return Ul}),i.d(f,"BaseEdge",function(){return Di}),i.d(f,"LineEdge",function(){return tf}),i.d(f,"PolylineEdge",function(){return af}),i.d(f,"BezierEdge",function(){return lf}),i.d(f,"Arrow",function(){return K1}),i.d(f,"BaseEdgeModel",function(){return Ic}),i.d(f,"BezierEdgeModel",function(){return Es}),i.d(f,"LineEdgeModel",function(){return Hc}),i.d(f,"PolylineEdgeModel",function(){return Yc}),i.d(f,"BaseNodeModel",function(){return En}),i.d(f,"CircleNodeModel",function(){return Ms}),i.d(f,"DiamondNodeModel",function(){return Rs}),i.d(f,"EllipseNodeModel",function(){return Bs}),i.d(f,"PolygonNodeModel",function(){return Ys}),i.d(f,"RectNodeModel",function(){return Js}),i.d(f,"TextNodeModel",function(){return qs}),i.d(f,"HtmlNodeModel",function(){return rl}),i.d(f,"EditConfigModel",function(){return rd}),i.d(f,"GraphModel",function(){return Wh}),i.d(f,"SnaplineModel",function(){return Pv}),i.d(f,"Keyboard",function(){return dg}),i.d(f,"get",function(){return gy}),i.d(f,"defaults",function(){return by}),i.d(f,"ElementState",function(){return _e}),i.d(f,"ModelType",function(){return he}),i.d(f,"ElementType",function(){return Xe}),i.d(f,"EventType",function(){return ee}),i.d(f,"formateAnchorConnectValidateData",function(){return gi});var l={};i.r(l),i.d(l,"createUuid",function(){return Bn}),i.d(l,"refreshGraphId",function(){return t0}),i.d(l,"createDrag",function(){return k0}),i.d(l,"StepDrag",function(){return On});var s=i(1),g=i(10);if(!g.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!s.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var b=i(42),x=Object(b.b)("observerBatching");function w(t){t()}var A=!1;function S(){return A}function P(t){return Object(s.t)(t)}var D,N=1e4,I=new Set;function B(){D===void 0&&(D=setTimeout(F,1e4))}function F(){D=void 0;var t=Date.now();I.forEach(function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,I.delete(e))}),I.size>0&&B()}var tt=!1,it=[],$={};function G(t){return"observer"+t}function J(t,e,r){e===void 0&&(e="observed"),r===void 0&&(r=$),S();var n,a=function(O){return function(){tt?it.push(O):O()}}((r.useForceUpdate||b.d)()),o=g.d.useRef(null);if(!o.current){var u=new s.c(G(e),function(){p.mounted?a():(u.dispose(),o.current=null)}),p=function(O){return{cleanAt:Date.now()+N,reaction:O}}(u);o.current=p,n=o,I.add(n),B()}var d=o.current.reaction;return g.d.useDebugValue(d,P),g.d.useEffect(function(){var O;return O=o,I.delete(O),o.current?o.current.mounted=!0:(o.current={reaction:new s.c(G(e),function(){a()}),cleanAt:1/0},a()),function(){o.current.reaction.dispose(),o.current=null}},[]),function(O){tt=!0,it=[];try{var _=O();tt=!1;var j=it.length>0?it:void 0;return g.d.useLayoutEffect(function(){j&&j.forEach(function(k){return k()})},[j]),_}finally{tt=!1}}(function(){var O,_;if(d.track(function(){try{O=t()}catch(j){_=j}}),_)throw _;return O})}var z=function(){return z=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var a in e=arguments[r])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},z.apply(this,arguments)};function T(t,e){var r,n,a,o=z({forwardRef:!1},e),u=t.displayName||t.name,p=function(d,O){return J(function(){return t(d,O)},u)};return p.displayName=u,r=o.forwardRef?Object(g.f)(Object(g.e)(p)):Object(g.f)(p),n=t,a=r,Object.keys(n).forEach(function(d){L[d]||Object.defineProperty(a,d,Object.getOwnPropertyDescriptor(n,d))}),r.displayName=u,r}var L={$$typeof:!0,render:!0,compare:!0,type:!0};function C(t){var e=t.children,r=t.render,n=e||r;return typeof n!="function"?null:J(n)}function U(t,e,r,n,a){var o=e==="children"?"render":"children",u=typeof t[e]=="function",p=typeof t[o]=="function";return u&&p?new Error("MobX Observer: Do not use children and render in the same time in`"+r):u||p?null:new Error("Invalid prop `"+a+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}C.propTypes={children:U,render:U},C.displayName="Observer";var Q;(Q=g.g)||(Q=w),Object(s.n)({reactionScheduler:Q}),Object(b.a)()[x]=!0;var lt=0,st={};function yt(t){return st[t]||(st[t]=function(e){if(typeof Symbol=="function")return Symbol(e);var r="__$mobx-react "+e+" ("+lt+")";return lt++,r}(t)),st[t]}function xt(t,e){if(vt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var a=0;a<r.length;a++)if(!Object.hasOwnProperty.call(e,r[a])||!vt(t[r[a]],e[r[a]]))return!1;return!0}function vt(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ut(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}var ht=yt("patchMixins"),mt=yt("patchedDefinition");function jt(t,e){for(var r=this,n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];e.locks++;try{var u;return t!=null&&(u=t.apply(this,a)),u}finally{e.locks--,e.locks===0&&e.methods.forEach(function(p){p.apply(r,a)})}}function It(t,e){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];jt.call.apply(jt,[this,t,e].concat(n))}}function Kt(t,e,r){var n=function(p,d){var O=p[ht]=p[ht]||{},_=O[d]=O[d]||{};return _.locks=_.locks||0,_.methods=_.methods||[],_}(t,e);n.methods.indexOf(r)<0&&n.methods.push(r);var a=Object.getOwnPropertyDescriptor(t,e);if(!a||!a[mt]){var o=t[e],u=Pt(t,e,a?a.enumerable:void 0,n,o);Object.defineProperty(t,e,u)}}function Pt(t,e,r,n,a){var o,u=It(a,n);return(o={})[mt]=!0,o.get=function(){return u},o.set=function(p){if(this===t)u=It(p,n);else{var d=Pt(this,e,r,n,p);Object.defineProperty(this,e,d)}},o.configurable=!0,o.enumerable=r,o}var Ct=s.a||"$mobx",$t=yt("isMobXReactObserver"),K=yt("isUnmounted"),Z=yt("skipRender"),at=yt("isForcingUpdate");function _t(t){var e=t.prototype;if(t[$t]?At(e):t[$t]=!0,e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==g.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==Wt)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=Wt;re(e,"props"),re(e,"state");var r=e.render;return e.render=function(){return wt.call(this,r)},Kt(e,"componentWillUnmount",function(){var n;(n=this.render[Ct])===null||n===void 0||n.dispose(),this[K]=!0,!this.render[Ct]&&At(this)}),t}function At(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function wt(t){var e=this;ut(this,Z,!1),ut(this,at,!1);var r=At(this),n=t.bind(this),a=!1,o=new s.c(r+".render()",function(){if(!a&&(a=!0,e[K]!==!0)){var p=!0;try{ut(e,at,!0),e[Z]||g.a.prototype.forceUpdate.call(e),p=!1}finally{ut(e,at,!1),p&&o.dispose()}}});function u(){a=!1;var p=void 0,d=void 0;if(o.track(function(){try{d=Object(s.d)(!1,n)}catch(O){p=O}}),p)throw p;return d}return o.reactComponent=this,u[Ct]=o,this.render=u,u.call(this)}function Wt(t,e){return this.state!==e||!xt(this.props,t)}function re(t,e){var r=yt("reactProp_"+e+"_valueHolder"),n=yt("reactProp_"+e+"_atomHolder");function a(){return this[n]||ut(this,n,Object(s.o)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var o=!1;return s.f&&s.e&&(o=Object(s.f)(!0)),a.call(this).reportObserved(),s.f&&s.e&&Object(s.e)(o),this[r]},set:function(o){this[at]||xt(this[r],o)?ut(this,r,o):(ut(this,r,o),ut(this,Z,!0),a.call(this).reportChanged(),ut(this,Z,!1))}})}var Qt=typeof Symbol=="function"&&Symbol.for,Gt=Qt?Symbol.for("react.forward_ref"):typeof g.e=="function"&&Object(g.e)(function(t){return null}).$$typeof,gt=Qt?Symbol.for("react.memo"):typeof g.f=="function"&&Object(g.f)(function(t){return null}).$$typeof;function Ht(t){if(t.isMobxInjector,gt&&t.$$typeof===gt)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(Gt&&t.$$typeof===Gt){var e=t.render;if(typeof e!="function")throw new Error("render property of ForwardRef was not a function");return Object(g.e)(function(){var r=arguments;return Object(g.c)(C,null,function(){return e.apply(void 0,r)})})}return typeof t!="function"||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(g.a,t)?_t(t):T(t)}if(!g.a)throw new Error("mobx-react requires React to be available");if(!s.C)throw new Error("mobx-react requires mobx to be available");var et=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 zt=function(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a},ue=function(){this.__data__=[],this.size=0},ge=function(t,e){return t===e||t!=t&&e!=e},ie=function(t,e){for(var r=t.length;r--;)if(ge(t[r][0],e))return r;return-1},ye=Array.prototype.splice,je=function(t){var e=this.__data__,r=ie(e,t);return!(r<0)&&(r==e.length-1?e.pop():ye.call(e,r,1),--this.size,!0)},Pe=function(t){var e=this.__data__,r=ie(e,t);return r<0?void 0:e[r][1]},ae=function(t){return ie(this.__data__,t)>-1},Ne=function(t,e){var r=this.__data__,n=ie(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function X(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}X.prototype.clear=ue,X.prototype.delete=je,X.prototype.get=Pe,X.prototype.has=ae,X.prototype.set=Ne;var rt=X,Y=function(){this.__data__=new rt,this.size=0},ct=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Tt=function(t){return this.__data__.get(t)},Dt=function(t){return this.__data__.has(t)},Vt=i(31),fe=Vt.a.Symbol,Fe=Object.prototype,Je=Fe.hasOwnProperty,Ce=Fe.toString,Re=fe?fe.toStringTag:void 0,Lt=function(t){var e=Je.call(t,Re),r=t[Re];try{t[Re]=void 0;var n=!0}catch(o){}var a=Ce.call(t);return n&&(e?t[Re]=r:delete t[Re]),a},Zt=Object.prototype.toString,te=function(t){return Zt.call(t)},ne=fe?fe.toStringTag:void 0,we=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":ne&&ne in Object(t)?Lt(t):te(t)},Te=function(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")},hn,Jr=function(t){if(!Te(t))return!1;var e=we(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"},Kr=Vt.a["__core-js_shared__"],$n=(hn=/[^.]+$/.exec(Kr&&Kr.keys&&Kr.keys.IE_PROTO||""))?"Symbol(src)_1."+hn:"",ec=function(t){return!!$n&&$n in t},ri=Function.prototype.toString,Tr=function(t){if(t!=null){try{return ri.call(t)}catch(e){}try{return t+""}catch(e){}}return""},qi=/^\[object .+?Constructor\]$/,Xt=Function.prototype,rc=Object.prototype,ta=Xt.toString,ea=rc.hasOwnProperty,_r=RegExp("^"+ta.call(ea).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wr=function(t){return!(!Te(t)||ec(t))&&(Jr(t)?_r:qi).test(Tr(t))},ra=function(t,e){return t==null?void 0:t[e]},$r=function(t,e){var r=ra(t,e);return wr(r)?r:void 0},Dn=$r(Vt.a,"Map"),Hr=$r(Object,"create"),ni=function(){this.__data__=Hr?Hr(null):{},this.size=0},na=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},nc=Object.prototype.hasOwnProperty,bo=function(t){var e=this.__data__;if(Hr){var r=e[t];return r==="__lodash_hash_undefined__"?void 0:r}return nc.call(e,t)?e[t]:void 0},oc=Object.prototype.hasOwnProperty,oa=function(t){var e=this.__data__;return Hr?e[t]!==void 0:oc.call(e,t)},ic=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Hr&&e===void 0?"__lodash_hash_undefined__":e,this};function yn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}yn.prototype.clear=ni,yn.prototype.delete=na,yn.prototype.get=bo,yn.prototype.has=oa,yn.prototype.set=ic;var ia=yn,Qr=function(){this.size=0,this.__data__={hash:new ia,map:new(Dn||rt),string:new ia}},ac=function(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null},Oo=function(t,e){var r=t.__data__;return ac(e)?r[typeof e=="string"?"string":"hash"]:r.map},oi=function(t){var e=Oo(this,t).delete(t);return this.size-=e?1:0,e},ii=function(t){return Oo(this,t).get(t)},uc=function(t){return Oo(this,t).has(t)},aa=function(t,e){var r=Oo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Nn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Nn.prototype.clear=Qr,Nn.prototype.delete=oi,Nn.prototype.get=ii,Nn.prototype.has=uc,Nn.prototype.set=aa;var Cn=Nn,ua=function(t,e){var r=this.__data__;if(r instanceof rt){var n=r.__data__;if(!Dn||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Cn(n)}return r.set(t,e),this.size=r.size,this};function Rn(t){var e=this.__data__=new rt(t);this.size=e.size}Rn.prototype.clear=Y,Rn.prototype.delete=ct,Rn.prototype.get=Tt,Rn.prototype.has=Dt,Rn.prototype.set=ua;var qr=Rn,ca=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},sa=function(t){return this.__data__.has(t)};function Qn(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Cn;++e<r;)this.add(t[e])}Qn.prototype.add=Qn.prototype.push=ca,Qn.prototype.has=sa;var la=Qn,cc=function(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1},fa=function(t,e){return t.has(e)},pa=function(t,e,r,n,a,o){var u=1&r,p=t.length,d=e.length;if(p!=d&&!(u&&d>p))return!1;var O=o.get(t),_=o.get(e);if(O&&_)return O==e&&_==t;var j=-1,k=!0,R=2&r?new la:void 0;for(o.set(t,e),o.set(e,t);++j<p;){var V=t[j],W=e[j];if(n)var ot=u?n(W,V,j,e,t,o):n(V,W,j,t,e,o);if(ot!==void 0){if(ot)continue;k=!1;break}if(R){if(!cc(e,function(nt,dt){if(!fa(R,dt)&&(V===nt||a(V,nt,r,n,o)))return R.push(dt)})){k=!1;break}}else if(V!==W&&!a(V,W,r,n,o)){k=!1;break}}return o.delete(t),o.delete(e),k},qn=Vt.a.Uint8Array,da=function(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r},sc=function(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r},ha=fe?fe.prototype:void 0,ai=ha?ha.valueOf:void 0,to=function(t,e,r,n,a,o,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new qn(t),new qn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ge(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=da;case"[object Set]":var d=1&n;if(p||(p=sc),t.size!=e.size&&!d)return!1;var O=u.get(t);if(O)return O==e;n|=2,u.set(t,e);var _=pa(p(t),p(e),n,a,o,u);return u.delete(t),_;case"[object Symbol]":if(ai)return ai.call(t)==ai.call(e)}return!1},tn=function(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t},tr=Array.isArray,ya=function(t,e,r){var n=e(t);return tr(t)?n:tn(n,r(t))},va=function(t,e){for(var r=-1,n=t==null?0:t.length,a=0,o=[];++r<n;){var u=t[r];e(u,r,t)&&(o[a++]=u)}return o},ga=function(){return[]},lc=Object.prototype.propertyIsEnumerable,vn=Object.getOwnPropertySymbols,Dr=vn?function(t){return t==null?[]:(t=Object(t),va(vn(t),function(e){return lc.call(t,e)}))}:ga,fc=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},Nr=function(t){return t!=null&&typeof t=="object"},xr=function(t){return Nr(t)&&we(t)=="[object Arguments]"},ma=Object.prototype,ba=ma.hasOwnProperty,pc=ma.propertyIsEnumerable,_o=xr(function(){return arguments}())?xr:function(t){return Nr(t)&&ba.call(t,"callee")&&!pc.call(t,"callee")},en=_o,eo=i(48),dc=/^(?:0|[1-9]\d*)$/,cr=function(t,e){var r=typeof t;return!!(e=e!=null?e:9007199254740991)&&(r=="number"||r!="symbol"&&dc.test(t))&&t>-1&&t%1==0&&t<e},gn=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991},ve={};ve["[object Float32Array]"]=ve["[object Float64Array]"]=ve["[object Int8Array]"]=ve["[object Int16Array]"]=ve["[object Int32Array]"]=ve["[object Uint8Array]"]=ve["[object Uint8ClampedArray]"]=ve["[object Uint16Array]"]=ve["[object Uint32Array]"]=!0,ve["[object Arguments]"]=ve["[object Array]"]=ve["[object ArrayBuffer]"]=ve["[object Boolean]"]=ve["[object DataView]"]=ve["[object Date]"]=ve["[object Error]"]=ve["[object Function]"]=ve["[object Map]"]=ve["[object Number]"]=ve["[object Object]"]=ve["[object RegExp]"]=ve["[object Set]"]=ve["[object String]"]=ve["[object WeakMap]"]=!1;var Er=function(t){return Nr(t)&&gn(t.length)&&!!ve[we(t)]},mn=function(t){return function(e){return t(e)}},Ke=i(49),Oa=Ke.a&&Ke.a.isTypedArray,ui=Oa?mn(Oa):Er,_a=Object.prototype.hasOwnProperty,Cr=function(t,e){var r=tr(t),n=!r&&en(t),a=!r&&!n&&Object(eo.a)(t),o=!r&&!n&&!a&&ui(t),u=r||n||a||o,p=u?fc(t.length,String):[],d=p.length;for(var O in t)!e&&!_a.call(t,O)||u&&(O=="length"||a&&(O=="offset"||O=="parent")||o&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||cr(O,d))||p.push(O);return p},wa=Object.prototype,wo=function(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||wa)},Rr=function(t,e){return function(r){return t(e(r))}},xa=Rr(Object.keys,Object),hc=Object.prototype.hasOwnProperty,ci=function(t){if(!wo(t))return xa(t);var e=[];for(var r in Object(t))hc.call(t,r)&&r!="constructor"&&e.push(r);return e},Ie=function(t){return t!=null&&gn(t.length)&&!Jr(t)},In=function(t){return Ie(t)?Cr(t):ci(t)},xo=function(t){return ya(t,In,Dr)},gr=Object.prototype.hasOwnProperty,Ea=function(t,e,r,n,a,o){var u=1&r,p=xo(t),d=p.length;if(d!=xo(e).length&&!u)return!1;for(var O=d;O--;){var _=p[O];if(!(u?_ in e:gr.call(e,_)))return!1}var j=o.get(t),k=o.get(e);if(j&&k)return j==e&&k==t;var R=!0;o.set(t,e),o.set(e,t);for(var V=u;++O<d;){var W=t[_=p[O]],ot=e[_];if(n)var nt=u?n(ot,W,_,e,t,o):n(W,ot,_,t,e,o);if(!(nt===void 0?W===ot||a(W,ot,r,n,o):nt)){R=!1;break}V||(V=_=="constructor")}if(R&&!V){var dt=t.constructor,bt=e.constructor;dt==bt||!("constructor"in t)||!("constructor"in e)||typeof dt=="function"&&dt instanceof dt&&typeof bt=="function"&&bt instanceof bt||(R=!1)}return o.delete(t),o.delete(e),R},ro=$r(Vt.a,"DataView"),Eo=$r(Vt.a,"Promise"),jo=$r(Vt.a,"Set"),So=$r(Vt.a,"WeakMap"),ja="[object Map]",mr="[object Promise]",jr="[object Set]",Ln="[object WeakMap]",si="[object DataView]",li=Tr(ro),fi=Tr(Dn),Sa=Tr(Eo),yc=Tr(jo),Po=Tr(So),bn=we;(ro&&bn(new ro(new ArrayBuffer(1)))!=si||Dn&&bn(new Dn)!=ja||Eo&&bn(Eo.resolve())!=mr||jo&&bn(new jo)!=jr||So&&bn(new So)!=Ln)&&(bn=function(t){var e=we(t),r=e=="[object Object]"?t.constructor:void 0,n=r?Tr(r):"";if(n)switch(n){case li:return si;case fi:return ja;case Sa:return mr;case yc:return jr;case Po:return Ln}return e});var h=bn,v="[object Arguments]",E="[object Array]",M="[object Object]",H=Object.prototype.hasOwnProperty,q=function(t,e,r,n,a,o){var u=tr(t),p=tr(e),d=u?E:h(t),O=p?E:h(e),_=(d=d==v?M:d)==M,j=(O=O==v?M:O)==M,k=d==O;if(k&&Object(eo.a)(t)){if(!Object(eo.a)(e))return!1;u=!0,_=!1}if(k&&!_)return o||(o=new qr),u||ui(t)?pa(t,e,r,n,a,o):to(t,e,d,r,n,a,o);if(!(1&r)){var R=_&&H.call(t,"__wrapped__"),V=j&&H.call(e,"__wrapped__");if(R||V){var W=R?t.value():t,ot=V?e.value():e;return o||(o=new qr),a(W,ot,r,n,o)}}return!!k&&(o||(o=new qr),Ea(t,e,r,n,a,o))},pt=function t(e,r,n,a,o){return e===r||(e==null||r==null||!Nr(e)&&!Nr(r)?e!=e&&r!=r:q(e,r,n,a,t,o))},St=function(t,e,r,n){var a=r.length,o=a,u=!n;if(t==null)return!o;for(t=Object(t);a--;){var p=r[a];if(u&&p[2]?p[1]!==t[p[0]]:!(p[0]in t))return!1}for(;++a<o;){var d=(p=r[a])[0],O=t[d],_=p[1];if(u&&p[2]){if(O===void 0&&!(d in t))return!1}else{var j=new qr;if(n)var k=n(O,_,d,t,e,j);if(!(k===void 0?pt(_,O,3,n,j):k))return!1}}return!0},Ut=function(t){return t==t&&!Te(t)},de=function(t){for(var e=In(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,Ut(a)]}return e},oe=function(t,e){return function(r){return r!=null&&r[t]===e&&(e!==void 0||t in Object(r))}},xe=function(t){var e=de(t);return e.length==1&&e[0][2]?oe(e[0][0],e[0][1]):function(r){return r===t||St(r,t,e)}},se=function(t){return typeof t=="symbol"||Nr(t)&&we(t)=="[object Symbol]"},Oe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sr=/^\w*$/,ke=function(t,e){if(tr(t))return!1;var r=typeof t;return!(r!="number"&&r!="symbol"&&r!="boolean"&&t!=null&&!se(t))||Sr.test(t)||!Oe.test(t)||e!=null&&t in Object(e)};function sr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var u=t.apply(this,n);return r.cache=o.set(a,u)||o,u};return r.cache=new(sr.Cache||Cn),r}sr.Cache=Cn;var no=sr,vc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pa=/\\(\\)?/g,Aa=function(t){var e=no(t,function(n){return r.size===500&&r.clear(),n}),r=e.cache;return e}(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(vc,function(r,n,a,o){e.push(a?o.replace(Pa,"$1"):n||r)}),e}),Ao=fe?fe.prototype:void 0,pi=Ao?Ao.toString:void 0,lr=function t(e){if(typeof e=="string")return e;if(tr(e))return zt(e,t)+"";if(se(e))return pi?pi.call(e):"";var r=e+"";return r=="0"&&1/e==-1/0?"-0":r},ka=function(t){return t==null?"":lr(t)},oo=function(t,e){return tr(t)?t:ke(t,e)?[t]:Aa(ka(t))},di=function(t){if(typeof t=="string"||se(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e},gc=function(t,e){for(var r=0,n=(e=oo(e,t)).length;t!=null&&r<n;)t=t[di(e[r++])];return r&&r==n?t:void 0},kp=function(t,e,r){var n=t==null?void 0:gc(t,e);return n===void 0?r:n},Um=function(t,e){return t!=null&&e in Object(t)},Hm=function(t,e,r){for(var n=-1,a=(e=oo(e,t)).length,o=!1;++n<a;){var u=di(e[n]);if(!(o=t!=null&&r(t,u)))break;t=t[u]}return o||++n!=a?o:!!(a=t==null?0:t.length)&&gn(a)&&cr(u,a)&&(tr(t)||en(t))},Mp=function(t,e){return t!=null&&Hm(t,e,Um)},Fm=function(t,e){return ke(t)&&Ut(e)?oe(di(t),e):function(r){var n=kp(r,t);return n===void 0&&n===e?Mp(r,t):pt(e,n,3)}},mc=function(t){return t},Xm=function(t){return function(e){return e==null?void 0:e[t]}},Vm=function(t){return function(e){return gc(e,t)}},Ym=function(t){return ke(t)?Xm(di(t)):Vm(t)},Gm=function(t){return typeof t=="function"?t:t==null?mc:typeof t=="object"?tr(t)?Fm(t[0],t[1]):xe(t):Ym(t)},Tp=function(t){return function(e,r,n){for(var a=-1,o=Object(e),u=n(e),p=u.length;p--;){var d=u[t?p:++a];if(r(o[d],d,o)===!1)break}return e}}(),Wm=function(t,e){return function(r,n){if(r==null)return r;if(!Ie(r))return t(r,n);for(var a=r.length,o=e?a:-1,u=Object(r);(e?o--:++o<a)&&n(u[o],o,u)!==!1;);return r}}(function(t,e){return t&&Tp(t,e,In)}),Zm=function(t,e){var r=-1,n=Ie(t)?Array(t.length):[];return Wm(t,function(a,o,u){n[++r]=e(a,o,u)}),n},Ma=function(t,e){return(tr(t)?zt:Zm)(t,Gm(e))};Object(s.n)({isolateGlobalState:!0});var Ta=function(){try{var t=$r(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),bc=function(t,e,r){e=="__proto__"&&Ta?Ta(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},Jm=Object.prototype.hasOwnProperty,Da=function(t,e,r){var n=t[e];Jm.call(t,e)&&ge(n,r)&&(r!==void 0||e in t)||bc(t,e,r)},ko=function(t,e,r,n){var a=!r;r||(r={});for(var o=-1,u=e.length;++o<u;){var p=e[o],d=n?n(r[p],t[p],p,r,t):void 0;d===void 0&&(d=t[p]),a?bc(r,p,d):Da(r,p,d)}return r},Km=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},Dp=Math.max,Np=function(t,e,r){return e=Dp(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,o=Dp(n.length-e,0),u=Array(o);++a<o;)u[a]=n[e+a];a=-1;for(var p=Array(e+1);++a<e;)p[a]=n[a];return p[e]=r(u),Km(t,this,p)}},$m=function(t){return function(){return t}},Qm=Ta?function(t,e){return Ta(t,"toString",{configurable:!0,enumerable:!1,value:$m(e),writable:!0})}:mc,qm=Date.now,tb=function(t){var e=0,r=0;return function(){var n=qm(),a=16-(n-r);if(r=n,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Cp=tb(Qm),eb=function(t,e){return Cp(Np(t,e,mc),t+"")},rb=function(t,e,r){if(!Te(r))return!1;var n=typeof e;return!!(n=="number"?Ie(r)&&cr(e,r.length):n=="string"&&e in r)&&ge(r[e],t)},Rp=function(t){return eb(function(e,r){var n=-1,a=r.length,o=a>1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(a--,o):void 0,u&&rb(r[0],r[1],u)&&(o=a<3?void 0:o,a=1),e=Object(e);++n<a;){var p=r[n];p&&t(e,p,n,o)}return e})},nb=Object.prototype.hasOwnProperty,fr=Rp(function(t,e){if(wo(e)||Ie(e))ko(e,In(e),t);else for(var r in e)nb.call(e,r)&&Da(t,r,e[r])}),ob=function(t,e,r,n){if(!Te(t))return t;for(var a=-1,o=(e=oo(e,t)).length,u=o-1,p=t;p!=null&&++a<o;){var d=di(e[a]),O=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return t;if(a!=u){var _=p[d];(O=n?n(_,d,p):void 0)===void 0&&(O=Te(_)?_:cr(e[a+1])?[]:{})}Da(p,d,O),p=p[d]}return t},ib=function(t,e,r){for(var n=-1,a=e.length,o={};++n<a;){var u=e[n],p=gc(t,u);r(p,u)&&ob(o,oo(u,t),p)}return o},ab=function(t,e){return ib(t,e,function(r,n){return Mp(t,n)})},Ip=fe?fe.isConcatSpreadable:void 0,ub=function(t){return tr(t)||en(t)||!!(Ip&&t&&t[Ip])},cb=function t(e,r,n,a,o){var u=-1,p=e.length;for(n||(n=ub),o||(o=[]);++u<p;){var d=e[u];r>0&&n(d)?r>1?t(d,r-1,n,a,o):tn(o,d):a||(o[o.length]=d)}return o},sb=function(t){return t!=null&&t.length?cb(t,1):[]},Le,Lp,zp,Bp,Up,Hp,Fp,Xp,Vp,Yp,Gp,Wp,Zp,Jp,Kp,$p,Qp,qp,hi=function(t){return Cp(Np(t,void 0,sb),t+"")}(function(t,e){return t==null?{}:ab(t,e)});function er(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function lb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function td(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $e(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var _e,ed,he,Xe,ee,Me,fb={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},Oc=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],rd=(Lp=$e((Le=function(){function t(n){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),er(this,"isSilentMode",Lp,this),er(this,"stopZoomGraph",zp,this),er(this,"stopScrollGraph",Bp,this),er(this,"stopMoveGraph",Up,this),er(this,"adjustEdge",Hp,this),er(this,"adjustEdgeMiddle",Fp,this),er(this,"adjustEdgeStartAndEnd",Xp,this),er(this,"adjustNodePosition",Vp,this),er(this,"hideAnchors",Yp,this),er(this,"hoverOutline",Gp,this),er(this,"nodeSelectedOutline",Wp,this),er(this,"edgeSelectedOutline",Zp,this),er(this,"nodeTextEdit",Jp,this),er(this,"edgeTextEdit",Kp,this),er(this,"nodeTextDraggable",$p,this),er(this,"edgeTextDraggable",Qp,this),er(this,"autoExpand",qp,this),td(this,"multipleSelectKey",""),td(this,"defaultConfig",{}),fr(this,this.getConfigDetail(n))}var e,r;return e=t,(r=[{key:"updateEditConfig",value:function(n){var a=this.getConfigDetail(n);fr(this,a)}},{key:"getConfigDetail",value:function(n){var a=n.isSilentMode,o=n.textEdit,u={};if(a===!1&&fr(u,this.defaultConfig),a===!0&&a!==this.isSilentMode){var p=hi(fb,Oc);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},fr(u,p)}o===!1&&fr(u,{nodeTextEdit:!1,edgeTextEdit:!1});var d=hi(n,Oc);return fr(u,d)}},{key:"getConfig",value:function(){return hi(this,Oc)}}])&&lb(e.prototype,r),t}()).prototype,"isSilentMode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zp=$e(Le.prototype,"stopZoomGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Bp=$e(Le.prototype,"stopScrollGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Up=$e(Le.prototype,"stopMoveGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hp=$e(Le.prototype,"adjustEdge",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Fp=$e(Le.prototype,"adjustEdgeMiddle",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xp=$e(Le.prototype,"adjustEdgeStartAndEnd",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Vp=$e(Le.prototype,"adjustNodePosition",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Yp=$e(Le.prototype,"hideAnchors",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gp=$e(Le.prototype,"hoverOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Wp=$e(Le.prototype,"nodeSelectedOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Zp=$e(Le.prototype,"edgeSelectedOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jp=$e(Le.prototype,"nodeTextEdit",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Kp=$e(Le.prototype,"edgeTextEdit",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),$p=$e(Le.prototype,"nodeTextDraggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Qp=$e(Le.prototype,"edgeTextDraggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qp=$e(Le.prototype,"autoExpand",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$e(Le.prototype,"updateEditConfig",[s.k],Object.getOwnPropertyDescriptor(Le.prototype,"updateEditConfig"),Le.prototype),Le);i(63),function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(_e||(_e={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(ed||(ed={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(he||(he={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(Xe||(Xe={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(ee||(ee={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(Me||(Me={}));var Pr,ze,nd,od,id,ad,ud,cd,sd;function Na(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return ld(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ld(r,n)}}(t,e)||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 ld(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function io(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function pb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fr(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"})(Pr||(Pr={}));var db=(ze=function(){function t(n){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),_c(this,"MINI_SCALE_SIZE",.2),_c(this,"MAX_SCALE_SIZE",16),io(this,"SCALE_X",nd,this),io(this,"SKEW_Y",od,this),io(this,"SKEW_X",id,this),io(this,"SCALE_Y",ad,this),io(this,"TRANSLATE_X",ud,this),io(this,"TRANSLATE_Y",cd,this),io(this,"ZOOM_SIZE",sd,this),_c(this,"eventCenter",void 0),this.eventCenter=n}var e,r;return e=t,r=[{key:"setZoomMiniSize",value:function(n){this.MINI_SCALE_SIZE=n}},{key:"setZoomMaxSize",value:function(n){this.MAX_SCALE_SIZE=n}},{key:"HtmlPointToCanvasPoint",value:function(n){var a=Na(n,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(n){var a=Na(n,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(n,a,o){var u=Na(n,2),p=u[0],d=u[1];return[p+a/this.SCALE_X,d+o/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(n,a){return[n/this.SCALE_X,a/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var n=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(n,")")}}},{key:"zoom",value:function(){var n=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 n===!0?(o+=this.ZOOM_SIZE,u+=this.ZOOM_SIZE):n===!1?(o-=this.ZOOM_SIZE,u-=this.ZOOM_SIZE):typeof n=="number"&&(o=n,u=n),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(n){this.eventCenter.emit(ee.GRAPH_TRANSFORM,{type:n,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(n,a){this.TRANSLATE_X+=n,this.TRANSLATE_Y+=a,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(n,a,o,u){var p=Na(this.CanvasPointToHtmlPoint([n,a]),2),d=o/2-p[0],O=u/2-p[1];this.TRANSLATE_X+=d,this.TRANSLATE_Y+=O,this.emitGraphTransform("focusOn")}}],r&&pb(e.prototype,r),t}(),nd=Fr(ze.prototype,"SCALE_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),od=Fr(ze.prototype,"SKEW_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),id=Fr(ze.prototype,"SKEW_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ad=Fr(ze.prototype,"SCALE_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ud=Fr(ze.prototype,"TRANSLATE_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),cd=Fr(ze.prototype,"TRANSLATE_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),sd=Fr(ze.prototype,"ZOOM_SIZE",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Fr(ze.prototype,"zoom",[s.k],Object.getOwnPropertyDescriptor(ze.prototype,"zoom"),ze.prototype),Fr(ze.prototype,"resetZoom",[s.k],Object.getOwnPropertyDescriptor(ze.prototype,"resetZoom"),ze.prototype),Fr(ze.prototype,"translate",[s.k],Object.getOwnPropertyDescriptor(ze.prototype,"translate"),ze.prototype),Fr(ze.prototype,"focusOn",[s.k],Object.getOwnPropertyDescriptor(ze.prototype,"focusOn"),ze.prototype),ze),hb=function(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t},yb=function(t,e){return t&&ko(e,In(e),t)},vb=function(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e},gb=Object.prototype.hasOwnProperty,mb=function(t){if(!Te(t))return vb(t);var e=wo(t),r=[];for(var n in t)(n!="constructor"||!e&&gb.call(t,n))&&r.push(n);return r},yi=function(t){return Ie(t)?Cr(t,!0):mb(t)},bb=function(t,e){return t&&ko(e,yi(e),t)},fd=i(106),pd=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e},Ob=function(t,e){return ko(t,Dr(t),e)},wc=Rr(Object.getPrototypeOf,Object),dd=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)tn(e,Dr(t)),t=wc(t);return e}:ga,_b=function(t,e){return ko(t,dd(t),e)},wb=function(t){return ya(t,yi,dd)},xb=Object.prototype.hasOwnProperty,Eb=function(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&xb.call(t,"index")&&(r.index=t.index,r.input=t.input),r},xc=function(t){var e=new t.constructor(t.byteLength);return new qn(e).set(new qn(t)),e},jb=function(t,e){var r=e?xc(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Sb=/\w*$/,Pb=function(t){var e=new t.constructor(t.source,Sb.exec(t));return e.lastIndex=t.lastIndex,e},hd=fe?fe.prototype:void 0,yd=hd?hd.valueOf:void 0,Ab=function(t){return yd?Object(yd.call(t)):{}},vd=function(t,e){var r=e?xc(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)},kb=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return xc(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return jb(t,r);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 vd(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Pb(t);case"[object Symbol]":return Ab(t)}},gd=Object.create,Mb=function(){function t(){}return function(e){if(!Te(e))return{};if(gd)return gd(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),md=function(t){return typeof t.constructor!="function"||wo(t)?{}:Mb(wc(t))},Tb=function(t){return Nr(t)&&h(t)=="[object Map]"},bd=Ke.a&&Ke.a.isMap,Db=bd?mn(bd):Tb,Nb=function(t){return Nr(t)&&h(t)=="[object Set]"},Od=Ke.a&&Ke.a.isSet,Cb=Od?mn(Od):Nb,_d="[object Arguments]",wd="[object Function]",Rb="[object Object]",Ae={};Ae[_d]=Ae["[object Array]"]=Ae["[object ArrayBuffer]"]=Ae["[object DataView]"]=Ae["[object Boolean]"]=Ae["[object Date]"]=Ae["[object Float32Array]"]=Ae["[object Float64Array]"]=Ae["[object Int8Array]"]=Ae["[object Int16Array]"]=Ae["[object Int32Array]"]=Ae["[object Map]"]=Ae["[object Number]"]=Ae["[object Object]"]=Ae["[object RegExp]"]=Ae["[object Set]"]=Ae["[object String]"]=Ae["[object Symbol]"]=Ae["[object Uint8Array]"]=Ae["[object Uint8ClampedArray]"]=Ae["[object Uint16Array]"]=Ae["[object Uint32Array]"]=!0,Ae["[object Error]"]=Ae[wd]=Ae["[object WeakMap]"]=!1;var Ib=function t(e,r,n,a,o,u){var p,d=1&r,O=2&r,_=4&r;if(n&&(p=o?n(e,a,o,u):n(e)),p!==void 0)return p;if(!Te(e))return e;var j=tr(e);if(j){if(p=Eb(e),!d)return pd(e,p)}else{var k=h(e),R=k==wd||k=="[object GeneratorFunction]";if(Object(eo.a)(e))return Object(fd.a)(e,d);if(k==Rb||k==_d||R&&!o){if(p=O||R?{}:md(e),!d)return O?_b(e,bb(p,e)):Ob(e,yb(p,e))}else{if(!Ae[k])return o?e:{};p=kb(e,k,d)}}u||(u=new qr);var V=u.get(e);if(V)return V;u.set(e,p),Cb(e)?e.forEach(function(ot){p.add(t(ot,r,n,ot,e,u))}):Db(e)&&e.forEach(function(ot,nt){p.set(nt,t(ot,r,n,nt,e,u))});var W=j?void 0:(_?O?wb:xo:O?yi:In)(e);return hb(W||e,function(ot,nt){W&&(ot=e[nt=ot]),Da(p,nt,t(ot,r,n,nt,e,u))}),p},De=function(t){return Ib(t,5)},Ec=function(t,e,r){(r!==void 0&&!ge(t[e],r)||r===void 0&&!(e in t))&&bc(t,e,r)},Lb=function(t){return Nr(t)&&Ie(t)},zb=Function.prototype,Bb=Object.prototype,xd=zb.toString,Ub=Bb.hasOwnProperty,Hb=xd.call(Object),Fb=function(t){if(!Nr(t)||we(t)!="[object Object]")return!1;var e=wc(t);if(e===null)return!0;var r=Ub.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&xd.call(r)==Hb},jc=function(t,e){if((e!=="constructor"||typeof t[e]!="function")&&e!="__proto__")return t[e]},Xb=function(t){return ko(t,yi(t))},Vb=function(t,e,r,n,a,o,u){var p=jc(t,r),d=jc(e,r),O=u.get(d);if(O)Ec(t,r,O);else{var _=o?o(p,d,r+"",t,e,u):void 0,j=_===void 0;if(j){var k=tr(d),R=!k&&Object(eo.a)(d),V=!k&&!R&&ui(d);_=d,k||R||V?tr(p)?_=p:Lb(p)?_=pd(p):R?(j=!1,_=Object(fd.a)(d,!0)):V?(j=!1,_=vd(d,!0)):_=[]:Fb(d)||en(d)?(_=p,en(p)?_=Xb(p):Te(p)&&!Jr(p)||(_=md(d))):j=!1}j&&(u.set(d,_),a(_,d,n,o,u),u.delete(d)),Ec(t,r,_)}},Yb=function t(e,r,n,a,o){e!==r&&Tp(r,function(u,p){if(o||(o=new qr),Te(u))Vb(e,r,p,n,t,a,o);else{var d=a?a(jc(e,p),u,p+"",e,r,o):void 0;d===void 0&&(d=u),Ec(e,p,d)}},yi)},Ed=Rp(function(t,e,r){Yb(t,e,r)}),Gb={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"}},jd=function(t){var e=De(Gb);return t&&(e=Ed(e,t)),e};i(77),i(158);function Wb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Zb=function(){function t(){var n,a,o;(function(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),o={},(a="_events")in(n=this)?Object.defineProperty(n,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[a]=o}var e,r;return e=t,(r=[{key:"on",value:function(n,a,o){var u=this;return n==null||n.split(",").forEach(function(p){p=p.trim(),u._events[p]||(u._events[p]=[]),u._events[p].push({callback:a,once:!!o})}),this}},{key:"once",value:function(n,a){var o=this;n==null||n.split(",").forEach(function(u){return u=u.trim(),o.on(u,a,!0)})}},{key:"emit",value:function(n,a){var o=this;n==null||n.split(",").forEach(function(u){var p=o._events[u]||[],d=o._events["*"]||[],O=function(_){for(var j=_.length,k=0;k<j;k++)if(_[k]){var R=_[k],V=R.callback;R.once&&(_.splice(k,1),_.length===0&&delete o._events[u],j--,k--),V.apply(o,[a])}};O(p),O(d)})}},{key:"off",value:function(n,a){var o=this;return n||(this._events={}),n.split(",").forEach(function(u){if(a){for(var p=o._events[u]||[],d=p.length,O=0;O<d;O++)p[O].callback===a&&(p.splice(O,1),d--,O--);p.length===0&&delete o._events[u]}else delete o._events[u]}),this}},{key:"getEvents",value:function(){return this._events}}])&&Wb(e.prototype,r),t}();function zn(t,e){return e*Math.round(t/e)||t}function Sd(t,e){return t%e}function Sc(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Pd(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Pd(r,n)}}(t,e)||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 Pd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Pc,Ac=function(t,e,r){var n=Sc(t,2),a=n[0],o=n[1],u=Sc(e,2),p=u[0],d=u[1],O=Sc(r,2),_=O[0],j=O[1];return a>p&&a<_&&o>d&&o<j},Ad=function(t,e){var r=!1;switch(e.multipleSelectKey){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;case"ctrl":r=t.ctrlKey;break;default:r=!1}return r},Jb=(i(78),i(161),i(125),i(79),i(30),i(12),i(13),i(14),i(47),new Uint8Array(16));function Kb(){if(!Pc&&!(Pc=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 Pc(Jb)}for(var $b=/^(?:[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,Qb=function(t){return typeof t=="string"&&$b.test(t)},rr=[],kc=0;kc<256;++kc)rr.push((kc+256).toString(16).substr(1));var qb=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(rr[t[e+0]]+rr[t[e+1]]+rr[t[e+2]]+rr[t[e+3]]+"-"+rr[t[e+4]]+rr[t[e+5]]+"-"+rr[t[e+6]]+rr[t[e+7]]+"-"+rr[t[e+8]]+rr[t[e+9]]+"-"+rr[t[e+10]]+rr[t[e+11]]+rr[t[e+12]]+rr[t[e+13]]+rr[t[e+14]]+rr[t[e+15]]).toLowerCase();if(!Qb(r))throw TypeError("Stringified UUID is invalid");return r},Mc=function(t,e,r){var n=(t=t||{}).random||(t.rng||Kb)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=n[a];return e}return qb(n)},Bn=function(){return Mc()},t0=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=t.nodes.reduce(function(n,a){return n[a.id]=e+Mc(),a.id=n[a.id],n},{});return t.edges.forEach(function(n){n.id=e+Mc(),n.sourceNodeId=r[n.sourceNodeId],n.targetNodeId=r[n.targetNodeId]}),t},vi=(i(104),i(162),function(t,e,r){var n=t.x,a=t.y;return(n-e.x)*(n-r.x)<=0&&(a-e.y)*(a-r.y)<=0});function Tc(t){return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tc(t)}function kd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Md(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kd(Object(r),!0).forEach(function(n){e0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function e0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ot,Td,Dd,Nd,Cd,Rd,Id,Ld,zd,Bd,Ud,Hd,Fd,Xd,Vd,Yd,Gd,Wd,Zd,Jd,Kd,Dc=function(t){return t.anchors},Ca=function(t,e){for(var r,n=e.nodes,a=n.length-1;a>=0;a--){var o=n[a];if(n0(t,o)){var u=o.getTargetAnchor(t);if(u){var p={node:o,anchorIndex:u.index,anchor:u.anchor};r&&!r0(o,r.node,e)||(r=p)}}}return r},r0=function(t,e,r){return t.zIndex>e.zIndex||r.nodesMap[t.id].index>r.nodesMap[e.id].index},rn=function(t,e,r,n){return Math.hypot(t-r,e-n)},Un=function(t,e){var r=!1,n=Ar(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},n0=function(t,e){var r=!1,n=Ar(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},Ar=function(t){var e=t.x,r=t.y,n=t.width,a=t.height;return{minX:e-n/2,minY:r-a/2,maxX:e+n/2,maxY:r+a/2,x:e,y:r,width:n,height:a,centerX:e,centerY:r}},$d=function(t,e,r){var n,a=function(u){var p=u,d=p.x,O=p.y,_=p.width,j=p.height,k=p.radius;return[{x:d-_/2+k,y:O-j/2+k,r:k},{x:d+_/2-k,y:O-j/2+k,r:k},{x:d-_/2+k,y:O+j/2-k,r:k},{x:d+_/2-k,y:O+j/2-k,r:k}]}(r),o=Number.MAX_SAFE_INTEGER;return a.forEach(function(u){var p=rn(t.x,t.y,u.x,u.y);p<o&&(o=p,n=u)}),Nc(t,e,n)},Nc=function(t,e,r){var n,a=r,o=a.x,u=a.y,p=a.r;if(e===Me.HORIZONTAL){var d=o-Math.sqrt(p*p-(t.y-u)*(t.y-u)),O=o+Math.sqrt(p*p-(t.y-u)*(t.y-u));n={x:Math.abs(d-t.x)<Math.abs(O-t.x)?d:O,y:t.y}}else if(e===Me.VERTICAL){var _=u-Math.sqrt(p*p-(t.x-o)*(t.x-o)),j=u+Math.sqrt(p*p-(t.x-o)*(t.x-o)),k=Math.abs(_-t.y)<Math.abs(j-t.y)?_:j;n={x:t.x,y:k}}return n},Qd=function(t,e){var r=e,n=!1,a=r.x-r.width/2+r.radius,o=r.x+r.width/2-r.radius,u=r.y-r.height/2+r.radius,p=r.y+r.height/2-r.radius,d=r.x,O=r.y,_=r.width,j=r.height;return t.y===O+j/2||t.y===O-j/2?n=t.x>a&&t.x<o:t.x!==d+_/2&&t.x!==d-_/2||(n=t.y>u&&t.y<p),n},qd=function(t,e,r){var n,a=r,o=a.x,u=a.y,p=a.rx,d=a.ry;if(e===Me.HORIZONTAL){var O=o-Math.sqrt(p*p-(t.y-u)*(t.y-u)*p*p/(d*d)),_=o+Math.sqrt(p*p-(t.y-u)*(t.y-u)*p*p/(d*d));n={x:Math.abs(O-t.x)<Math.abs(_-t.x)?O:_,y:t.y}}else if(e===Me.VERTICAL){var j=u-Math.sqrt(d*d-(t.x-o)*(t.x-o)*d*d/(p*p)),k=u+Math.sqrt(d*d-(t.x-o)*(t.x-o)*d*d/(p*p)),R=Math.abs(j-t.y)<Math.abs(k-t.y)?j:k;n={x:t.x,y:R}}return n},th=function(t,e,r){for(var n,a=r.pointsPosition,o=Number.MAX_SAFE_INTEGER,u=[],p=0;p<a.length;p++)u.push({start:a[p],end:a[(p+1)%a.length]});return u.forEach(function(d){var O=d.start,_=d.end,j=O,k=_;O.x>_.x&&(j=_,k=O);var R={x:t.x,y:t.y};if(j.x===k.x&&e===Me.HORIZONTAL&&(R={x:j.x,y:t.y}),j.y===k.y&&e===Me.VERTICAL&&(R={x:t.x,y:j.y}),j.x!==k.x&&j.y!==k.y){var V=(k.y-j.y)/(k.x-j.x),W=(j.x*k.y-k.x*j.y)/(j.x-k.x);e===Me.HORIZONTAL?R={x:(t.y-W)/V,y:t.y}:e===Me.VERTICAL&&(R={x:t.x,y:V*t.x+W})}if(vi(R,O,_)){var ot=rn(R.x,R.y,t.x,t.y);ot<o&&(o=ot,n=R)}}),n},eh=function(t,e,r,n){var a=t.x,o=t.y;return e.x>t.x?a=t.x+r/2:e.x<t.x&&(a=t.x-r/2),e.y>t.y?o=t.y+n/2:e.y<t.y&&(o=t.y-n/2),{x:a,y:o}},rh=function(t){var e=t.rows,r=t.style,n=t.rowsLength,a=t.className,o=document.createElement("div");o.style.fontSize=r.fontSize,o.style.width=r.width,o.className=a,o.style.lineHeight=r.lineHeight,o.style.padding=r.padding,r.fontFamily&&(o.style.fontFamily=r.fontFamily),n>1?e.forEach(function(p){var d=document.createElement("div");d.textContent=p,o.appendChild(d)}):o.textContent=e,document.body.appendChild(o);var u=o.clientHeight;return document.body.removeChild(o),u},Cc=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,a=0;return e&&e.forEach(function(o){var u=jh(o);a=u>a?u:a}),{width:Math.ceil(a/2)*n+n/4,height:r*(n+2)+n/4}},gi=function(t){return Tc(t)!=="object"?{isAllPass:!!t,msg:t?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:t},or=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},o0=1e3,i0=999,Rc=function(){return++o0};function nh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function br(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nh(Object(r),!0).forEach(function(n){Ir(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ve(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function a0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ir(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qt(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var Ic=(Ot=function(){function t(n,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,t),Ir(this,"id",""),Ve(this,"type",Td,this),Ve(this,"sourceNodeId",Dd,this),Ve(this,"targetNodeId",Nd,this),Ve(this,"startPoint",Cd,this),Ve(this,"endPoint",Rd,this),Ve(this,"text",Id,this),Ve(this,"properties",Ld,this),Ve(this,"points",zd,this),Ve(this,"pointsList",Bd,this),Ve(this,"isSelected",Ud,this),Ve(this,"isHovered",Hd,this),Ve(this,"isHitable",Fd,this),Ve(this,"draggable",Xd,this),Ve(this,"visible",Vd,this),Ir(this,"virtual",!1),Ve(this,"isAnimation",Yd,this),Ve(this,"isShowAdjustPoint",Gd,this),Ir(this,"graphModel",void 0),Ve(this,"zIndex",Wd,this),Ir(this,"BaseType",Xe.EDGE),Ir(this,"modelType",he.EDGE),Ve(this,"state",Zd,this),Ir(this,"additionStateData",void 0),Ir(this,"sourceAnchorId",""),Ir(this,"targetAnchorId",""),Ir(this,"menu",void 0),Ir(this,"customTextPosition",!1),Ve(this,"style",Jd,this),Ve(this,"arrowConfig",Kd,this),this.graphModel=a,this.initEdgeData(n),this.setAttributes()}var e,r;return e=t,r=[{key:"initEdgeData",value:function(n){if(n.properties||(n.properties={}),!n.id){var a=this.graphModel.idGenerator,o=a&&a(n.type),u=this.createId();n.id=u||o||Bn()}this.arrowConfig.markerEnd="url(#marker-end-".concat(n.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(n.id,")");var p=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=p,fr(this,P0(n)),this.graphModel.overlapMode===Pr.INCREASE&&(this.zIndex=n.zIndex||Rc()),this.setAnchors(),this.initPoints(),this.formatText(n)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return br(br({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return br({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var n=this.graphModel.theme.edgeText;return De(n)}},{key:"getEdgeAnimationStyle",value:function(){var n=this.graphModel.theme.edgeAnimation;return De(n)}},{key:"getArrowStyle",value:function(){var n=this.getEdgeStyle(),a=this.getEdgeAnimationStyle(),o=this.graphModel.theme.arrow,u=this.isAnimation?a.stroke:n.stroke;return br(br({},n),{},{fill:u,stroke:u},o)}},{key:"getOutlineStyle",value:function(){var n=this.graphModel.theme.outline;return De(n)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var n,a;return(n=this.graphModel)===null||n===void 0||(a=n.nodesMap[this.sourceNodeId])===null||a===void 0?void 0:a.model}},{key:"targetNode",get:function(){var n,a;return(n=this.graphModel)===null||n===void 0||(a=n.nodesMap[this.targetNodeId])===null||a===void 0?void 0:a.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(n,a){var o,u;return Dc(n).forEach(function(p){var d=kh(p,a);(u===void 0||d<u)&&(u=d,o=p)}),o}},{key:"getEndAnchor",value:function(n){var a,o,u=this;return Dc(n).forEach(function(p){var d=kh(p,u.startPoint);(o===void 0||d<o)&&(o=d,a=p)}),a}},{key:"getProperties",value:function(){return Object(s.I)(this.properties)}},{key:"getData",value:function(){var n=this.text,a=n.x,o=n.y,u=n.value,p={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(s.I)(this.properties)};return u&&(p.text={x:a,y:o,value:u}),this.graphModel.overlapMode===Pr.INCREASE&&(p.zIndex=this.zIndex),p}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(n,a){this.properties[n]=or(a),this.setAttributes()}},{key:"deleteProperty",value:function(n){delete this.properties[n],this.setAttributes()}},{key:"setProperties",value:function(n){this.properties=br(br({},Object(s.I)(this.properties)),or(n)),this.setAttributes()}},{key:"changeEdgeId",value:function(n){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(n,")")),o&&o==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(n,")")),this.id=n}},{key:"setStyle",value:function(n,a){this.style=br(br({},this.style),{},Ir({},n,or(a)))}},{key:"setStyles",value:function(n){this.style=br(br({},this.style),or(n))}},{key:"updateStyles",value:function(n){this.style=br({},or(n))}},{key:"formatText",value:function(n){var a=this.textPosition,o=a.x,u=a.y;n.text&&typeof n.text!="string"?Object.prototype.toString.call(n.text)==="[object Object]"&&(this.text={x:n.text.x||o,y:n.text.y||u,value:n.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:n.text||"",x:o,y:u,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var n=this.textPosition,a=n.x,o=n.y;this.text.x=a,this.text.y=o}},{key:"moveText",value:function(n,a){if(this.text){var o=this.text,u=o.x,p=o.y,d=o.value,O=o.draggable,_=o.editable;this.text={value:d,draggable:O,x:u+n,y:p+a,editable:_}}}},{key:"setText",value:function(n){n&&fr(this.text,n)}},{key:"updateText",value:function(n){this.text=br(br({},Object(s.I)(this.text)),{},{value:n})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var n=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:n.x,y:n.y}),this.sourceAnchorId||(this.sourceAnchorId=n.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 n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=n}},{key:"setHovered",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=n}},{key:"setHitable",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=n}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(n,a){this.state=n,this.additionStateData=a}},{key:"updateStartPoint",value:function(n){this.startPoint=n}},{key:"moveStartPoint",value:function(n,a){this.startPoint.x+=n,this.startPoint.y+=a}},{key:"updateEndPoint",value:function(n){this.endPoint=n}},{key:"moveEndPoint",value:function(n,a){this.endPoint.x+=n,this.endPoint.y+=a}},{key:"setZIndex",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.zIndex=n}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(n){fr(this,n)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(n){var a=n.startPoint,o=n.endPoint;this.updateStartPoint({x:a.x,y:a.y}),this.updateEndPoint({x:o.x,y:o.y})}}],r&&a0(e.prototype,r),t}(),Td=qt(Ot.prototype,"type",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Dd=qt(Ot.prototype,"sourceNodeId",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Nd=qt(Ot.prototype,"targetNodeId",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Cd=qt(Ot.prototype,"startPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Rd=qt(Ot.prototype,"endPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Id=qt(Ot.prototype,"text",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Ld=qt(Ot.prototype,"properties",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),zd=qt(Ot.prototype,"points",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Bd=qt(Ot.prototype,"pointsList",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ud=qt(Ot.prototype,"isSelected",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hd=qt(Ot.prototype,"isHovered",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fd=qt(Ot.prototype,"isHitable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xd=qt(Ot.prototype,"draggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vd=qt(Ot.prototype,"visible",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Yd=qt(Ot.prototype,"isAnimation",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gd=qt(Ot.prototype,"isShowAdjustPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wd=qt(Ot.prototype,"zIndex",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Zd=qt(Ot.prototype,"state",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Jd=qt(Ot.prototype,"style",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Kd=qt(Ot.prototype,"arrowConfig",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),qt(Ot.prototype,"sourceNode",[s.m],Object.getOwnPropertyDescriptor(Ot.prototype,"sourceNode"),Ot.prototype),qt(Ot.prototype,"targetNode",[s.m],Object.getOwnPropertyDescriptor(Ot.prototype,"targetNode"),Ot.prototype),qt(Ot.prototype,"textPosition",[s.m],Object.getOwnPropertyDescriptor(Ot.prototype,"textPosition"),Ot.prototype),qt(Ot.prototype,"setProperty",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setProperty"),Ot.prototype),qt(Ot.prototype,"deleteProperty",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"deleteProperty"),Ot.prototype),qt(Ot.prototype,"setProperties",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setProperties"),Ot.prototype),qt(Ot.prototype,"changeEdgeId",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"changeEdgeId"),Ot.prototype),qt(Ot.prototype,"setStyle",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setStyle"),Ot.prototype),qt(Ot.prototype,"setStyles",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setStyles"),Ot.prototype),qt(Ot.prototype,"updateStyles",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"updateStyles"),Ot.prototype),qt(Ot.prototype,"formatText",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"formatText"),Ot.prototype),qt(Ot.prototype,"resetTextPosition",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"resetTextPosition"),Ot.prototype),qt(Ot.prototype,"moveText",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"moveText"),Ot.prototype),qt(Ot.prototype,"setText",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setText"),Ot.prototype),qt(Ot.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"updateText"),Ot.prototype),qt(Ot.prototype,"setAnchors",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setAnchors"),Ot.prototype),qt(Ot.prototype,"setSelected",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setSelected"),Ot.prototype),qt(Ot.prototype,"setHovered",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setHovered"),Ot.prototype),qt(Ot.prototype,"setHitable",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setHitable"),Ot.prototype),qt(Ot.prototype,"openEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"openEdgeAnimation"),Ot.prototype),qt(Ot.prototype,"closeEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"closeEdgeAnimation"),Ot.prototype),qt(Ot.prototype,"setElementState",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setElementState"),Ot.prototype),qt(Ot.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"updateStartPoint"),Ot.prototype),qt(Ot.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"moveStartPoint"),Ot.prototype),qt(Ot.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"updateEndPoint"),Ot.prototype),qt(Ot.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"moveEndPoint"),Ot.prototype),qt(Ot.prototype,"setZIndex",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"setZIndex"),Ot.prototype),qt(Ot.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"initPoints"),Ot.prototype),qt(Ot.prototype,"updateAttributes",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"updateAttributes"),Ot.prototype),qt(Ot.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"getAdjustStart"),Ot.prototype),qt(Ot.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"getAdjustEnd"),Ot.prototype),qt(Ot.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(Ot.prototype,"updateAfterAdjustStartAndEnd"),Ot.prototype),Ot),Lc=Ic;function zc(t){return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zc(t)}function oh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ih(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?oh(Object(r),!0).forEach(function(n){uh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function u0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Bc(){return Bc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=s0(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Bc.apply(this,arguments)}function s0(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Mo(t))!==null;);return t}function Uc(t,e){return Uc=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Uc(t,e)}function l0(t){var e=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(r){return!1}}();return function(){var r,n=Mo(t);if(e){var a=Mo(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f0(this,r)}}function f0(t,e){if(e&&(zc(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ah(t)}function ah(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Mo(t){return Mo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mo(t)}function uh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ce,ch,Hc=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Uc(o,u)})(a,t);var e,r,n=l0(a);function a(){var o;u0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return uh(ah(o=n.call.apply(n,[this].concat(p))),"modelType",he.LINE_EDGE),o}return e=a,(r=[{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.line;return ih(ih({},Bc(Mo(a.prototype),"getEdgeStyle",this).call(this)),De(o))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&c0(e.prototype,r),a}(Lc);function Fc(t){return Fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fc(t)}function p0(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return sh(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return sh(r,n)}}(t,e)||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 sh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function fh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lh(Object(r),!0).forEach(function(n){Vc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function d0(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function h0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function mi(){return mi=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=v0(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},mi.apply(this,arguments)}function v0(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Hn(t))!==null;);return t}function Xc(t,e){return Xc=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Xc(t,e)}function g0(t){var e=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(r){return!1}}();return function(){var r,n=Hn(t);if(e){var a=Hn(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return m0(this,r)}}function m0(t,e){if(e&&(Fc(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bi(t)}function bi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hn(t){return Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Hn(t)}function Vc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pr(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var Yc=(ce=function(t){(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,t);var e,r,n=g0(a);function a(){var o;h0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return Vc(bi(o=n.call.apply(n,[this].concat(p))),"modelType",he.POLYLINE_EDGE),Vc(bi(o),"draggingPointList",void 0),d0(bi(o),"dbClickPosition",ch,bi(o)),o}return e=a,(r=[{key:"initEdgeData",value:function(o){this.offset=30,mi(Hn(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.polyline;return fh(fh({},mi(Hn(a.prototype),"getEdgeStyle",this).call(this)),De(o))}},{key:"getTextPosition",value:function(){var o,u=(o=this.text)===null||o===void 0?void 0:o.value;if(this.dbClickPosition&&!u){var p=this.dbClickPosition;return{x:p.x,y:p.y}}var d=ao(this.points),O=p0(j0(d),2),_=O[0],j=O[1];return{x:(_.x+j.x)/2,y:(_.y+j.y)/2}}},{key:"getAfterAnchor",value:function(o,u,p){var d,O;return p.forEach(function(_){var j;o===Me.HORIZONTAL?j=Math.abs(u.y-_.y):o===Me.VERTICAL&&(j=Math.abs(u.x-_.x)),(!O||O>j)&&(O=j,d=_)}),d}},{key:"getCrossPoint",value:function(o,u,p){var d;return o===Me.HORIZONTAL?d={x:p.x,y:u.y}:o===Me.VERTICAL&&(d={x:u.x,y:p.y}),d}},{key:"removeCrossPoints",value:function(o,u,p){var d=p.map(function(nt){return nt});if(o===1){var O=d[o],_=d[u],j=d[o-1];if(_h(j,O,this.sourceNode)){if(wh(O,_,this.sourceNode)){var k=xh(O,_,this.sourceNode);k&&(d[o]=k,d.splice(o-1,1),o--,u--)}}else this.sourceNode.anchors.forEach(function(nt){(nt.x===j.x&&nt.x===O.x||nt.y===j.y&&nt.y===O.y)&&rn(nt.x,nt.y,O.x,O.y)<rn(j.x,j.y,O.x,O.y)&&(d[o-1]=nt)})}if(u===p.length-2){var R=d[o],V=d[u],W=d[u+1];if(_h(V,W,this.targetNode)){if(wh(R,V,this.targetNode)){var ot=xh(R,V,this.targetNode);ot&&(d[u]=ot,d.splice(u+1,1))}}else this.targetNode.anchors.forEach(function(nt){(nt.x===W.x&&nt.x===V.x||nt.y===W.y&&nt.y===V.y)&&rn(nt.x,nt.y,V.x,V.y)<rn(W.x,W.y,V.x,V.y)&&(d[u+1]=nt)})}return d}},{key:"getDraggingPoints",value:function(o,u,p,d,O){var _=O.map(function(R){return R}),j=this.getAfterAnchor(o,p,d),k=this.getCrossPoint(o,p,j);return u==="start"?(_.unshift(k),_.unshift(j)):(_.push(k),_.push(j)),_}},{key:"updateCrossPoints",value:function(o){var u=o.map(function(bt){return bt}),p=o[0],d=o[1],O=o[u.length-2],_=o[u.length-1],j=this.sourceNode,k=this.targetNode,R=j.modelType,V=k.modelType,W=Ha(p,d),ot=u[0];switch(R){case he.RECT_NODE:j.radius!==0&&(Qd(p,j)||(ot=$d(p,W,j)));break;case he.CIRCLE_NODE:ot=Nc(p,W,j);break;case he.ELLIPSE_NODE:ot=qd(p,W,j);break;case he.DIAMOND_NODE:case he.POLYGON_NODE:ot=th(p,W,j)}u[0]=ot;var nt=Ha(O,_),dt=u[u.length-1];switch(V){case he.RECT_NODE:k.radius!==0&&(Qd(_,k)||(dt=$d(_,nt,k)));break;case he.CIRCLE_NODE:dt=Nc(_,nt,k);break;case he.ELLIPSE_NODE:dt=qd(_,nt,k);break;case he.DIAMOND_NODE:case he.POLYGON_NODE:dt=th(_,nt,k)}return u[u.length-1]=dt,u}},{key:"getData",value:function(){var o=mi(Hn(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(p){return{x:p.x,y:p.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=Oh({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 p=o.start,d=o.end,O=o.startIndex,_=o.endIndex,j=o.direction,k=this.pointsList,R=k;return j===Me.HORIZONTAL?(k[O]={x:p.x,y:p.y+u.y},k[_]={x:d.x,y:d.y+u.y},R=this.pointsList.map(function(V){return V})):j===Me.VERTICAL&&(k[O]={x:p.x+u.x,y:p.y},k[_]={x:d.x+u.x,y:d.y},R=this.pointsList.map(function(V){return V})),this.updatePointsAfterDrag(R),this.draggingPointList=R,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},k[O]),end:Object.assign({},k[_]),startIndex:O,endIndex:_,direction:j}}},{key:"dragAppend",value:function(o,u){this.isDragging=!0;var p=o.start,d=o.end,O=o.startIndex,_=o.endIndex,j=o.direction,k=this.pointsList;if(j===Me.HORIZONTAL){k[O]={x:p.x,y:p.y+u.y},k[_]={x:d.x,y:d.y+u.y};var R=this.pointsList.map(function(Mt){return Mt});if(O!==0&&_!==this.pointsList.length-1&&(R=this.removeCrossPoints(O,_,R)),O===0){var V={x:p.x,y:p.y+u.y};if(!Un(V,this.sourceNode)){var W=this.sourceNode.anchors;R=this.getDraggingPoints(j,"start",V,W,R)}}if(_===this.pointsList.length-1){var ot={x:d.x,y:d.y+u.y};if(!Un(ot,this.targetNode)){var nt=this.targetNode.anchors;R=this.getDraggingPoints(j,"end",ot,nt,R)}}this.updatePointsAfterDrag(R),this.draggingPointList=R}else if(j===Me.VERTICAL){k[O]={x:p.x+u.x,y:p.y},k[_]={x:d.x+u.x,y:d.y};var dt=this.pointsList.map(function(Mt){return Mt});if(O!==0&&_!==this.pointsList.length-1&&(dt=this.removeCrossPoints(O,_,dt)),O===0){var bt={x:p.x+u.x,y:p.y};if(!Un(bt,this.sourceNode)){var kt=this.sourceNode.anchors;dt=this.getDraggingPoints(j,"start",bt,kt,dt)}}if(_===this.pointsList.length-1){var Et={x:d.x+u.x,y:d.y};if(!Un(Et,this.targetNode)){var Ft=this.targetNode.anchors;dt=this.getDraggingPoints(j,"end",Et,Ft,dt)}}this.updatePointsAfterDrag(dt),this.draggingPointList=dt}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},k[O]),end:Object.assign({},k[_]),startIndex:O,endIndex:_,direction:j}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var o=bh(ao(this.points));this.pointsList=o.map(function(d){return d}),this.draggingPointList=[];var u=o[0];this.startPoint=Object.assign({},u);var p=o[o.length-1];this.endPoint=Object.assign({},p)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(o){var u=this.updateCrossPoints(o);this.points=u.map(function(p){return"".concat(p.x,",").concat(p.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,p=o.endPoint,d=o.sourceNode,O=o.targetNode,_=Oh({x:u.x,y:u.y},{x:p.x,y:p.y},d,O,this.offset||0);this.pointsList=_,this.initPoints()}}])&&y0(e.prototype,r),a}(Lc),ch=pr(ce.prototype,"dbClickPosition",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pr(ce.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"initPoints"),ce.prototype),pr(ce.prototype,"updatePoints",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"updatePoints"),ce.prototype),pr(ce.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"updateStartPoint"),ce.prototype),pr(ce.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveStartPoint"),ce.prototype),pr(ce.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"updateEndPoint"),ce.prototype),pr(ce.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveEndPoint"),ce.prototype),pr(ce.prototype,"dragAppendStart",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"dragAppendStart"),ce.prototype),pr(ce.prototype,"dragAppendSimple",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"dragAppendSimple"),ce.prototype),pr(ce.prototype,"dragAppend",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"dragAppend"),ce.prototype),pr(ce.prototype,"dragAppendEnd",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"dragAppendEnd"),ce.prototype),pr(ce.prototype,"updatePointsAfterDrag",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"updatePointsAfterDrag"),ce.prototype),pr(ce.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"getAdjustStart"),ce.prototype),pr(ce.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"getAdjustEnd"),ce.prototype),pr(ce.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(ce.prototype,"updateAfterAdjustStartAndEnd"),ce.prototype),ce),Oi=function(t){var e=t.start,r=t.end,n=t.offset,a=t.verticalLength,o=t.type,u={leftX:0,leftY:0,rightX:0,rightY:0},p=Math.atan((r.y-e.y)/(r.x-e.x)),d=Math.atan(n/a),O=Math.sqrt(a*a+n*n);return o==="start"?r.x>=e.x?(u.leftX=e.x+O*Math.sin(p+d),u.leftY=e.y-O*Math.cos(p+d),u.rightX=e.x-O*Math.sin(p-d),u.rightY=e.y+O*Math.cos(p-d)):(u.leftX=e.x-O*Math.sin(p+d),u.leftY=e.y+O*Math.cos(p+d),u.rightX=e.x+O*Math.sin(p-d),u.rightY=e.y-O*Math.cos(p-d)):o==="end"&&(r.x>=e.x?(u.leftX=r.x+O*Math.sin(p-d),u.leftY=r.y-O*Math.cos(p-d),u.rightX=r.x-O*Math.sin(p+d),u.rightY=r.y+O*Math.cos(p+d)):(u.leftX=r.x-O*Math.sin(p-d),u.leftY=r.y+O*Math.cos(p-d),u.rightX=r.x+O*Math.sin(p+d),u.rightY=r.y-O*Math.cos(p+d))),u},b0={x:1,y:0,z:0};function ph(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function O0(t){return n=function(o,u){return o.x*u.y-o.y*u.x}(e=b0,r=t),a=Math.acos(function(o,u){var p=[o.x,o.y,o.z];return[u.x,u.y,u.z].reduce(function(d,O,_){return d+O*p[_]})}(ph(e),ph(r))),n>=0?a:-a;var e,r,n,a}function dh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ra(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dh(Object(r),!0).forEach(function(n){_0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w0(t){return function(e){if(Array.isArray(e))return Wc(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||hh(t)||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 Gc(t){return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gc(t)}function Ia(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||hh(t,e)||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 hh(t,e){if(t){if(typeof t=="string")return Wc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wc(t,e):void 0}}function Wc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Zc=function(t){var e=[],r={};return t.forEach(function(n){var a="".concat(n.x,"-").concat(n.y);n.id=a,r[a]=n}),Object.keys(r).forEach(function(n){e.push(r[n])}),e},La=function(t,e){return t.width===0&&t.height===0?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},za=function(t,e,r){var n=function(a,o){var u=Math.abs(a.x-o.centerX),p=Math.abs(a.y-o.centerY);return u/o.width>p/o.height?Me.HORIZONTAL:Me.VERTICAL}(r,e);return n===Me.HORIZONTAL?{x:r.x>t.centerX?t.maxX:t.minX,y:r.y}:{x:r.x,y:r.y>t.centerY?t.maxY:t.minY}},yh=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),a=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{centerX:(r+a)/2,centerY:(n+o)/2,minX:r,minY:n,maxX:a,maxY:o,height:o-n,width:a-r}},_i=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach(function(_){r.push(_.x),n.push(_.y)});var a=Math.min.apply(Math,r),o=Math.max.apply(Math,r),u=Math.min.apply(Math,n),p=Math.max.apply(Math,n),d=o-a,O=p-u;return e&&(d+=e,O+=e),{centerX:(a+o)/2,centerY:(u+p)/2,maxX:o,maxY:p,minX:a,minY:u,x:(a+o)/2,y:(u+p)/2,height:O,width:d}},Ba=function(t){var e=t.minX,r=t.minY,n=t.maxX,a=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:a},{x:e,y:a}]},Ua=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Jc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},vh=function(t,e,r,n,a){return Jc(t,e)+Jc(t,r)+function(o,u){var p=0;return u.forEach(function(d){d&&(o.x===d.x&&(p+=-2),o.y===d.y&&(p+=-2))}),p}(t,[e,r,n,a])},x0=function t(e,r,n,a,o){o||(o=0),e.unshift(r[a]),n[a]&&n[a]!==a&&o<=100&&t(e,r,n,n[a],o+1)},wi=function(t,e,r,n){var a=e.x-t.x,o=e.y-t.y,u=n.x-r.x,p=n.y-r.y,d=(-o*(t.x-r.x)+a*(t.y-r.y))/(-u*o+a*p),O=(u*(t.y-r.y)-p*(t.x-r.x))/(-u*o+a*p);return d>=0&&d<=1&&O>=0&&O<=1},gh=function(t,e,r){if(r.width===0&&r.height===0)return!1;var n=Ia(Ba(r),4),a=n[0],o=n[1],u=n[2],p=n[3];return wi(t,e,a,o)||wi(t,e,a,p)||wi(t,e,o,u)||wi(t,e,u,p)},E0=function(t,e,r,n,a,o,u){var p=[],d=[e],O={},_={},j={};_[e.id]=0,j[e.id]=vh(e,r,e);var k={};t.forEach(function(W){k[W.id]=W});for(var R=function(){var W,ot,nt,dt=void 0,bt=1/0;if(d.forEach(function(Et){j[Et.id]<bt&&(bt=j[Et.id],dt=Et)}),dt===r){var kt=[];return x0(kt,k,O,r.id),{v:kt}}ot=dt,(nt=(W=d).indexOf(ot))>-1&&W.splice(nt,1),p.push(dt),function(Et,Ft,Mt,Bt){var Rt=[];return Et.forEach(function(le){le!==Ft&&(le.x!==Ft.x&&le.y!==Ft.y||gh(le,Ft,Mt)||gh(le,Ft,Bt)||Rt.push(le))}),Zc(Rt)}(t,dt,n,a).forEach(function(Et){if(p.indexOf(Et)===-1){d.indexOf(Et)===-1&&d.push(Et);var Ft=j[dt.id]+Jc(dt,Et);_[Et.id]&&Ft>=_[Et.id]||(O[Et.id]=dt.id,_[Et.id]=Ft,j[Et.id]=_[Et.id]+vh(Et,r,e,o,u))}})};d.length;){var V=R();if(Gc(V)==="object")return V.v}return[e,r]},mh=function(t){return Ar(t)},bh=function(t){for(var e=1;e<t.length-1;){var r=t[e-1],n=t[e],a=t[e+1];r.x===n.x&&n.x===a.x||r.y===n.y&&n.y===a.y?t.splice(e,1):e++}return t},Oh=function(t,e,r,n,a){var o,u,p=mh(r),d=mh(n),O=La(p,a),_=La(d,a),j=za(O,p,t),k=za(_,d,e);if(o=O,u=_,2*Math.abs(o.centerX-u.centerX)<o.width+u.width&&2*Math.abs(o.centerY-u.centerY)<o.height+u.height){var R=S0(t,e,j,k);return[t,j].concat(w0(R),[k,e])}var V=_i([j,k]),W=yh(O,V),ot=yh(_,V),nt=[];nt=(nt=nt.concat(Ba(W))).concat(Ba(ot));var dt={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[V,W,ot].forEach(function(kt){nt=nt.concat(function(Et,Ft){return function(Mt,Bt){return Bt<Mt.minX||Bt>Mt.maxX?[]:[{x:Bt,y:Mt.minY},{x:Bt,y:Mt.maxY}]}(Et,Ft.x).concat(function(Mt,Bt){return Bt<Mt.minY||Bt>Mt.maxY?[]:[{x:Mt.minX,y:Bt},{x:Mt.maxX,y:Bt}]}(Et,Ft.y))}(kt,dt).filter(function(Et){return Ua(Et,O)&&Ua(Et,_)}))}),[{x:j.x,y:k.y},{x:k.x,y:j.y}].forEach(function(kt){Ua(kt,O)&&Ua(kt,_)&&nt.push(kt)}),nt.unshift(j),nt.push(k),nt=Zc(nt);var bt=E0(nt,j,k,p,d,t,e);return bt.unshift(t),bt.push(e),bt.length>2&&(bt=bh(bt)),Zc(bt)},j0=function(t){var e;if(t.length===1)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],a=rn(r.x,r.y,n.x,n.y),o=1;o<t.length-1;o++){var u=t[o],p=t[o+1],d=rn(u.x,u.y,p.x,p.y);d>a&&(a=d,r=u,n=p)}e=[r,n]}return e},_h=function(t,e,r){var n=Un(t,r),a=Un(e,r);return n&&a},wh=function(t,e,r){var n=Un(t,r),a=Un(e,r);return!(n&&a)&&(n||a)},xh=function(t,e,r){for(var n,a,o=Ar(r),u=Ba(o),p=0;p<u.length;p++)wi(t,e,u[p],u[(p+1)%u.length])&&(a=[u[p],u[(p+1)%u.length]]);return a&&(n=function(d,O,_,j){var k=(O.y-d.y)*(j.x-_.x)-(d.x-O.x)*(_.y-j.y);if(k===0)return!1;var R=((O.x-d.x)*(j.x-_.x)*(_.y-d.y)+(O.y-d.y)*(j.x-_.x)*d.x-(j.y-_.y)*(O.x-d.x)*_.x)/k,V=-((O.y-d.y)*(j.y-_.y)*(_.x-d.x)+(O.x-d.x)*(j.y-_.y)*d.y-(j.x-_.x)*(O.y-d.y)*_.y)/k;return(R-d.x)*(R-O.x)<=0&&(V-d.y)*(V-O.y)<=0&&(R-_.x)*(R-j.x)<=0&&(V-_.y)*(V-j.y)<=0&&{x:R,y:V}}(t,e,a[0],a[1])),n},Ha=function(t,e){var r;return t.x===e.x?r=Me.VERTICAL:t.y===e.y&&(r=Me.HORIZONTAL),r},ao=function(t){var e=t.split(" "),r=[];return e&&e.forEach(function(n){var a=Ia(n.split(","),2),o=a[0],u=a[1];r.push({x:Number(o),y:Number(u)})}),r},S0=function(t,e,r,n){var a=[];if(Ha(t,r)===Ha(e,n))t.y===r.y?(a.push({x:r.x,y:(r.y+n.y)/2}),a.push({x:n.x,y:(r.y+n.y)/2})):(a.push({x:(r.x+n.x)/2,y:r.y}),a.push({x:(r.x+n.x)/2,y:n.y}));else{var o={x:r.x,y:n.y},u=vi(o,t,r),p=vi(o,e,n);if(u||p)o={x:n.x,y:r.y};else{var d=Eh(o,t,r),O=Eh(o,e,n);d&&O&&(o={x:n.x,y:r.y})}a.push(o)}return a},Eh=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},jh=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},Sh=function(t){var e=t.start,r=t.end,n=t.sourceNode,a=t.targetNode,o=t.offset,u=Ar(n),p=Ar(a),d=La(u,o),O=La(p,o);return{sNext:za(d,u,e),ePre:za(O,p,r)}},Fa=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Xa(e[0]),Xa(e[1]),Xa(e[2]),Xa(e[3])]},Xa=function(t){var e=Ia(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Ph=function(t){var e=Fa(t),r=Ia(e,4),n=function(a,o,u,p){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)+p.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)+p.y*Math.pow(d,3)}}(.95)}(r[0],r[1],r[2],r[3]);return[n,e[3]]},Ah=function(t,e){for(var r,n=t.x,a=t.y,o=ao(e),u=Number.MAX_SAFE_INTEGER,p=[],d=0;d<o.length;d++)p.push({start:o[d],end:o[(d+1)%o.length]});if(p.forEach(function(k){var R=k.start,V=k.end;if(R.x===V.x){var W={x:R.x,y:a};if(vi(W,R,V)){var ot=Math.abs(R.x-n);ot<u&&(u=ot,r=W)}}else if(R.y===V.y){var nt={x:n,y:R.y};if(vi(nt,R,V)){var dt=Math.abs(R.y-a);dt<u&&(u=dt,r=nt)}}}),!r){var O=p[0],_=O.start,j=O.end;r={x:_.x+(j.x-_.x)/2,y:_.y+(j.y-_.y)/2}}return r},P0=function(t){return hi(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},kh=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};i(204);var To=function(){};function A0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ye(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var nn=window.document;function k0(t){var e=t.onDragStart,r=e===void 0?To:e,n=t.onDragging,a=n===void 0?To:n,o=t.onDragEnd,u=o===void 0?To:o,p=t.step,d=p===void 0?1:p,O=t.isStopPropagation,_=O===void 0||O,j=!1,k=!1,R=0,V=0,W=0,ot=0;function nt(bt){if(_&&bt.stopPropagation(),k&&(j=!0,W+=bt.clientX-R,ot+=bt.clientY-V,R=bt.clientX,V=bt.clientY,Math.abs(W)>d||Math.abs(ot)>d)){var kt=W%d,Et=ot%d,Ft=W-kt,Mt=ot-Et;W=kt,ot=Et,a({deltaX:Ft,deltaY:Mt,event:bt})}}function dt(bt){if(_&&bt.stopPropagation(),k=!1,nn.removeEventListener("mousemove",nt,!1),nn.removeEventListener("mouseup",dt,!1),j)return j=!1,u({event:bt})}return function(bt){if(bt.button===0)return _&&bt.stopPropagation(),k=!0,R=bt.clientX,V=bt.clientY,nn.addEventListener("mousemove",nt,!1),nn.addEventListener("mouseup",dt,!1),r({event:bt})}}var ft,Mh,Th,Dh,Nh,Ch,Rh,Ih,Lh,zh,Bh,Uh,Hh,On=function(){function t(n){var a=this,o=n.onDragStart,u=o===void 0?To:o,p=n.onDragging,d=p===void 0?To:p,O=n.onDragEnd,_=O===void 0?To:O,j=n.eventType,k=j===void 0?"":j,R=n.eventCenter,V=R===void 0?null:R,W=n.step,ot=W===void 0?1:W,nt=n.isStopPropagation,dt=nt===void 0||nt,bt=n.model,kt=bt===void 0?null:bt,Et=n.data,Ft=Et===void 0?null:Et;(function(Mt,Bt){if(!(Mt instanceof Bt))throw new TypeError("Cannot call a class as a function")})(this,t),Ye(this,"onDragStart",void 0),Ye(this,"onDragging",void 0),Ye(this,"onDragEnd",void 0),Ye(this,"step",void 0),Ye(this,"isStopPropagation",void 0),Ye(this,"isDragging",!1),Ye(this,"isStartDragging",!1),Ye(this,"startX",0),Ye(this,"startY",0),Ye(this,"sumDeltaX",0),Ye(this,"sumDeltaY",0),Ye(this,"eventType",void 0),Ye(this,"eventCenter",void 0),Ye(this,"model",void 0),Ye(this,"data",void 0),Ye(this,"startTime",void 0),Ye(this,"handleMouseDown",function(Mt){var Bt,Rt;if(Mt.button===0){a.isStopPropagation&&Mt.stopPropagation(),a.isStartDragging=!0,a.startX=Mt.clientX,a.startY=Mt.clientY,nn.addEventListener("mousemove",a.handleMouseMove,!1),nn.addEventListener("mouseup",a.handleMouseUp,!1);var le=(Bt=a.model)===null||Bt===void 0?void 0:Bt.getData();(Rt=a.eventCenter)===null||Rt===void 0||Rt.emit(ee["".concat(a.eventType,"_MOUSEDOWN")],{e:Mt,data:a.data||le}),a.startTime=new Date().getTime()}}),Ye(this,"handleMouseMove",function(Mt){if(a.isStopPropagation&&Mt.stopPropagation(),a.isStartDragging&&(a.sumDeltaX+=Mt.clientX-a.startX,a.sumDeltaY+=Mt.clientY-a.startY,a.startX=Mt.clientX,a.startY=Mt.clientY,a.step<=1||Math.abs(a.sumDeltaX)>a.step||Math.abs(a.sumDeltaY)>a.step)){var Bt,Rt=a.sumDeltaX%a.step,le=a.sumDeltaY%a.step,Ee=a.sumDeltaX-Rt,be=a.sumDeltaY-le;a.sumDeltaX=Rt,a.sumDeltaY=le;var Se,Ue=(Bt=a.model)===null||Bt===void 0?void 0:Bt.getData();a.isDragging||((Se=a.eventCenter)===null||Se===void 0||Se.emit(ee["".concat(a.eventType,"_DRAGSTART")],{e:Mt,data:a.data||Ue}),a.onDragStart({event:Mt})),a.isDragging=!0,Promise.resolve().then(function(){var Ze,yr;a.onDragging({deltaX:Ee,deltaY:be,event:Mt}),(Ze=a.eventCenter)===null||Ze===void 0||Ze.emit(ee["".concat(a.eventType,"_MOUSEMOVE")],{e:Mt,data:a.data||Ue}),(yr=a.eventCenter)===null||yr===void 0||yr.emit(ee["".concat(a.eventType,"_DRAG")],{e:Mt,data:a.data||Ue})})}}),Ye(this,"handleMouseUp",function(Mt){a.isStartDragging=!1,a.isStopPropagation&&Mt.stopPropagation(),Promise.resolve().then(function(){var Bt,Rt,le;nn.removeEventListener("mousemove",a.handleMouseMove,!1),nn.removeEventListener("mouseup",a.handleMouseUp,!1);var Ee=(Bt=a.model)===null||Bt===void 0?void 0:Bt.getData();(Rt=a.eventCenter)===null||Rt===void 0||Rt.emit(ee["".concat(a.eventType,"_MOUSEUP")],{e:Mt,data:a.data||Ee}),a.isDragging&&(a.isDragging=!1,a.onDragEnd({event:Mt}),(le=a.eventCenter)===null||le===void 0||le.emit(ee["".concat(a.eventType,"_DROP")],{e:Mt,data:a.data||Ee}))})}),Ye(this,"cancelDrag",function(){nn.removeEventListener("mousemove",a.handleMouseMove,!1),nn.removeEventListener("mouseup",a.handleMouseUp,!1),a.onDragEnd({event:null}),a.isDragging=!1}),this.onDragStart=u,this.onDragging=d,this.onDragEnd=_,this.step=ot,this.isStopPropagation=dt,this.eventType=k,this.eventCenter=V,this.model=kt,this.data=Ft}var e,r;return e=t,(r=[{key:"setStep",value:function(n){this.step=n}}])&&A0(e.prototype,r),t}(),Fh={node:!1,edge:!1},M0={node:!0,edge:!0};function Xh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Va(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xh(Object(r),!0).forEach(function(n){on(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xi(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||Vh(t,e)||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 Do(t){return function(e){if(Array.isArray(e))return Kc(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||Vh(t)||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 Vh(t,e){if(t){if(typeof t=="string")return Kc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kc(t,e):void 0}}function Kc(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ya(t){return Ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ya(t)}function Lr(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function T0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function on(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jt(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var Yh,Gh=200,Wh=(ft=function(){function t(n){(function(V,W){if(!(V instanceof W))throw new TypeError("Cannot call a class as a function")})(this,t),on(this,"rootEl",void 0),Lr(this,"width",Mh,this),Lr(this,"height",Th,this),on(this,"theme",void 0),on(this,"eventCenter",void 0),on(this,"modelMap",new Map),on(this,"topElement",void 0),on(this,"animation",void 0),on(this,"idGenerator",void 0),on(this,"edgeGenerator",void 0),on(this,"nodeMoveRules",[]),Lr(this,"edgeType",Dh,this),Lr(this,"nodes",Nh,this),Lr(this,"edges",Ch,this),Lr(this,"overlapMode",Rh,this),Lr(this,"background",Ih,this),Lr(this,"transformModel",Lh,this),Lr(this,"editConfigModel",zh,this),Lr(this,"gridSize",Bh,this),Lr(this,"partial",Uh,this),Lr(this,"fakerNode",Hh,this);var a,o,u,p=n.container,d=n.background,O=d===void 0?{}:d,_=n.grid,j=n.idGenerator,k=n.edgeGenerator,R=n.animation;this.background=O,Ya(_)==="object"&&(this.gridSize=_.size),this.rootEl=p,this.editConfigModel=new rd(n),this.eventCenter=new Zb,this.transformModel=new db(this.eventCenter),this.theme=jd(n.style),this.edgeType=n.edgeType||"polyline",this.width=n.width,this.height=n.height,this.animation=(a=R)&&typeof a!="boolean"?Ed(De(Fh),a):De(a===!0?M0:Fh),this.partial=n.partial,this.overlapMode=n.overlapMode||0,this.idGenerator=j,this.edgeGenerator=(o=this,typeof(u=k)!="function"?function(V,W,ot){return Object.assign({type:o.edgeType},ot)}:function(V,W,ot){var nt=u(V,W,ot);return nt?typeof nt=="string"?Object.assign({},ot,{type:nt}):Object.assign({type:nt},ot):{type:o.edgeType}}),this.width=n.width||this.rootEl.getBoundingClientRect().width,this.height=n.height||this.rootEl.getBoundingClientRect().height,this.flowId=Bn()}var e,r;return e=t,r=[{key:"nodesMap",get:function(){return this.nodes.reduce(function(n,a,o){return n[a.id]={index:o,model:a},n},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(n,a,o){return n[a.id]={index:o,model:a},n},{})}},{key:"modelsMap",get:function(){return[].concat(Do(this.nodes),Do(this.edges)).reduce(function(n,a){return n[a.id]=a,n},{})}},{key:"sortElements",get:function(){var n=[];this.nodes.forEach(function(O){return n.push(O)}),this.edges.forEach(function(O){return n.push(O)}),n=n.sort(function(O,_){return O.zIndex-_.zIndex});for(var a=[],o=[-200,-200],u=[this.width+Gh,this.height+Gh],p=0;p<n.length;p++){var d=n[p];d.visible&&(!this.partial||d.isSelected||this.isElementInArea(d,o,u,!1,!1))&&a.push(d)}return a}},{key:"textEditElement",get:function(){var n=this.nodes.find(function(o){return o.state===_e.TEXT_EDIT}),a=this.edges.find(function(o){return o.state===_e.TEXT_EDIT});return n||a}},{key:"selectElements",get:function(){var n=new Map;return this.nodes.forEach(function(a){a.isSelected&&n.set(a.id,a)}),this.edges.forEach(function(a){a.isSelected&&n.set(a.id,a)}),n}},{key:"selectNodes",get:function(){var n=[];return this.nodes.forEach(function(a){a.isSelected&&n.push(a)}),n}},{key:"getAreaElement",value:function(n,a){var o=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],p=arguments.length>4&&arguments[4]!==void 0&&arguments[4],d=[],O=[];this.nodes.forEach(function(k){return O.push(k)}),this.edges.forEach(function(k){return O.push(k)});for(var _=0;_<O.length;_++){var j=O[_];p&&!j.visible||!this.isElementInArea(j,n,a,o,u)||d.push(j)}return d}},{key:"getModel",value:function(n){return this.modelMap.get(n)}},{key:"getNodeModelById",value:function(n){var a;return this.fakerNode&&n===this.fakerNode.id?this.fakerNode:(a=this.nodesMap[n])===null||a===void 0?void 0:a.model}},{key:"getPointByClient",value:function(n){var a=n.x,o=n.y,u=this.rootEl.getBoundingClientRect(),p={x:a-u.left,y:o-u.top},d=xi(this.transformModel.HtmlPointToCanvasPoint([p.x,p.y]),2);return{domOverlayPosition:p,canvasOverlayPosition:{x:d[0],y:d[1]}}}},{key:"isElementInArea",value:function(n,a,o){var u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],p=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(n.BaseType===Xe.NODE){for(var d=Ar(n=n),O=d.minX,_=d.minY,j=d.maxX,k=d.maxY,R=[{x:O,y:_},{x:j,y:_},{x:j,y:k},{x:O,y:k}],V=p,W=0;W<R.length;W++){var ot=R[W],nt=ot.x,dt=ot.y,bt=this.transformModel.CanvasPointToHtmlPoint([nt,dt]),kt=xi(bt,2);if(nt=kt[0],dt=kt[1],Ac([nt,dt],a,o)!==p){V=!p;break}}return V}if(n.BaseType===Xe.EDGE){var Et=n=n,Ft=Et.startPoint,Mt=Et.endPoint,Bt=this.transformModel.CanvasPointToHtmlPoint([Ft.x,Ft.y]),Rt=this.transformModel.CanvasPointToHtmlPoint([Mt.x,Mt.y]),le=Ac(Bt,a,o),Ee=Ac(Rt,a,o);return u?le&&Ee:le||Ee}return!1}},{key:"graphDataToModel",value:function(n){var a=this;if(this.width&&this.height||this.resize(),!n)return this.nodes=[],void(this.edges=[]);n.nodes?this.nodes=Ma(n.nodes,function(o){var u=a.getModel(o.type);if(!u)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8282\u70B9\u3002"));var p=o.x,d=o.y;return p&&d&&(o.x=zn(p,a.gridSize),o.y=zn(d,a.gridSize),Ya(o.text)==="object"&&(o.text.x-=Sd(p,a.gridSize),o.text.y-=Sd(d,a.gridSize))),new u(o,a)}):this.nodes=[],n.edges?this.edges=Ma(n.edges,function(o){var u=a.getModel(o.type);if(!u)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8FB9\u3002"));return new u(o,a)}):this.edges=[]}},{key:"modelToGraphData",value:function(){var n=[];this.edges.forEach(function(o){var u=o.getData();u&&!o.virtual&&n.push(u)});var a=[];return this.nodes.forEach(function(o){var u=o.getData();u&&!o.virtual&&a.push(u)}),{nodes:a,edges:n}}},{key:"modelToHistoryData",value:function(){for(var n=!1,a=[],o=0;o<this.nodes.length;o++){var u=this.nodes[o];if(u.isDragging){n=!0;break}a.push(u.getHistoryData())}if(n)return!1;for(var p=!1,d=[],O=0;O<this.edges.length;O++){var _=this.edges[O];if(_.isDragging){p=!0;break}d.push(_.getHistoryData())}return!p&&{nodes:a,edges:d}}},{key:"getEdgeModelById",value:function(n){var a;return(a=this.edgesMap[n])===null||a===void 0?void 0:a.model}},{key:"getElement",value:function(n){return this.modelsMap[n]}},{key:"getNodeEdges",value:function(n){for(var a=[],o=0;o<this.edges.length;o++){var u=this.edges[o],p=this.edges[o].sourceNodeId===n,d=this.edges[o].targetNodeId===n;(p||d)&&a.push(u)}return a}},{key:"getSelectElements",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],a=this.selectElements,o={nodes:[],edges:[]};return a.forEach(function(u){if(u.BaseType===Xe.NODE&&o.nodes.push(u.getData()),u.BaseType===Xe.EDGE){var p=u.getData(),d=a.get(p.sourceNodeId)&&a.get(p.targetNodeId);(n||d)&&o.edges.push(p)}}),o}},{key:"updateAttributes",value:function(n,a){this.getElement(n).updateAttributes(a)}},{key:"changeNodeId",value:function(n,a){return a||(a=Bn()),this.nodesMap[a]?"":this.nodesMap[n]?(this.edges.forEach(function(o){o.sourceNodeId===n&&(o.sourceNodeId=a),o.targetNodeId===n&&(o.targetNodeId=a)}),this.nodesMap[n].model.id=a,this.nodesMap[a]=this.nodesMap[n],a):""}},{key:"changeEdgeId",value:function(n,a){return a||(a=Bn()),this.edgesMap[a]?"":this.edgesMap[n]?(this.edges.forEach(function(o){o.id===n&&o.changeEdgeId(a)}),a):""}},{key:"setFakerNode",value:function(n){this.fakerNode=n}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(n,a){return this.modelMap.set(n,a)}},{key:"toFront",value:function(n){var a,o,u,p=((a=this.nodesMap[n])===null||a===void 0?void 0:a.model)||((o=this.edgesMap[n])===null||o===void 0?void 0:o.model);p&&(this.overlapMode===Pr.DEFAULT&&((u=this.topElement)===null||u===void 0||u.setZIndex(),p.setZIndex(9999),this.topElement=p),this.overlapMode===Pr.INCREASE&&this.setElementZIndex(n,"top"))}},{key:"setElementZIndex",value:function(n,a){var o,u,p,d=((o=this.nodesMap[n])===null||o===void 0?void 0:o.model)||((u=this.edgesMap[n])===null||u===void 0?void 0:u.model);d&&(typeof a=="number"&&(p=a),a==="top"&&(p=Rc()),a==="bottom"&&(p=--i0),d.setZIndex(p))}},{key:"deleteNode",value:function(n){var a=this.nodesMap[n].model.getData();this.deleteEdgeBySource(n),this.deleteEdgeByTarget(n),this.nodes.splice(this.nodesMap[n].index,1),this.eventCenter.emit(ee.NODE_DELETE,{data:a})}},{key:"addNode",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.NODE_ADD,o=arguments.length>2?arguments[2]:void 0,u=or(n);u.id&&this.nodesMap[n.id]&&delete u.id;var p=this.getModel(u.type);if(!p)throw new Error("\u627E\u4E0D\u5230".concat(u.type,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));u.x=zn(u.x,this.gridSize),u.y=zn(u.y,this.gridSize);var d=new p(u,this);this.nodes.push(d);var O=d.getData(),_={data:O};return o&&(_.e=o),this.eventCenter.emit(a,_),d}},{key:"cloneNode",value:function(n){var a=this.getNodeModelById(n),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(n,a,o){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],p=this.nodesMap[n];if(p){var d=p.model,O=d.getMoveDistance(a,o,u),_=xi(O,2);a=_[0],o=_[1],this.moveEdge(n,a,o)}}},{key:"moveNode2Coordinate",value:function(n,a,o){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],p=this.nodesMap[n];if(p){var d=p.model,O=d.x,_=d.y,j=a-O,k=o-_;this.moveNode(n,j,k,u)}}},{key:"editText",value:function(n){this.setElementStateById(n,_e.TEXT_EDIT)}},{key:"addEdge",value:function(n){var a=or(n),o=a.type;o||(o=this.edgeType),a.id&&this.edgesMap[a.id]&&delete a.id;var u=this.getModel(o);if(!u)throw new Error("\u627E\u4E0D\u5230".concat(o,"\u5BF9\u5E94\u7684\u8FB9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8FB9\u3002"));var p=new u(Va(Va({},a),{},{type:o}),this),d=p.getData();return this.edges.push(p),this.eventCenter.emit(ee.EDGE_ADD,{data:d}),p}},{key:"moveEdge",value:function(n,a,o){for(var u=0;u<this.edges.length;u++){var p=this.edges[u],d=p.textPosition,O=d.x,_=d.y,j=this.edges[u].sourceNodeId===n,k=this.edges[u].targetNodeId===n;j&&p.moveStartPoint(a,o),k&&p.moveEndPoint(a,o),(j||k)&&this.handleEdgeTextMove(p,O,_)}}},{key:"handleEdgeTextMove",value:function(n,a,o){var u;if(n.customTextPosition===!0)n.resetTextPosition();else if(n.modelType===he.POLYLINE_EDGE&&(u=n.text)!==null&&u!==void 0&&u.value){var p=n.text,d=Ah(p,n.points);n.moveText(d.x-p.x,d.y-p.y)}else{var O=n.textPosition,_=O.x,j=O.y;n.moveText(_-a,j-o)}}},{key:"deleteEdgeBySourceAndTarget",value:function(n,a){for(var o=0;o<this.edges.length;o++)if(this.edges[o].sourceNodeId===n&&this.edges[o].targetNodeId===a){var u=this.edges[o].getData();this.edges.splice(o,1),o--,this.eventCenter.emit(ee.EDGE_DELETE,{data:u})}}},{key:"deleteEdgeById",value:function(n){if(this.edgesMap[n]){var a=this.edgesMap[n].index,o=this.edgesMap[n].model.getData();this.edges.splice(a,1),this.eventCenter.emit(ee.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeBySource",value:function(n){for(var a=0;a<this.edges.length;a++)if(this.edges[a].sourceNodeId===n){var o=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(ee.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeByTarget",value:function(n){for(var a=0;a<this.edges.length;a++)if(this.edges[a].targetNodeId===n){var o=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(ee.EDGE_DELETE,{data:o})}}},{key:"setElementStateById",value:function(n,a,o){this.nodes.forEach(function(u){u.id===n?u.setElementState(a,o):u.setElementState(_e.DEFAULT)}),this.edges.forEach(function(u){u.id===n?u.setElementState(a,o):u.setElementState(_e.DEFAULT)})}},{key:"updateText",value:function(n,a){this.nodes.forEach(function(o){o.id===n&&o.updateText(a)}),this.edges.forEach(function(o){o.id===n&&o.updateText(a)})}},{key:"selectNodeById",value:function(n){var a,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];o||this.clearSelectElements();var u=(a=this.nodesMap[n])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectEdgeById",value:function(n){var a,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];o||this.clearSelectElements();var u=(a=this.edgesMap[n])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectElementById",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a||this.clearSelectElements();var o=this.getElement(n);o==null||o.setSelected(!0)}},{key:"clearSelectElements",value:function(){var n;this.selectElements.forEach(function(a){a==null||a.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===Pr.DEFAULT&&((n=this.topElement)===null||n===void 0||n.setZIndex())}},{key:"moveNodes",value:function(n,a,o){for(var u=this,p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=n.reduce(function(kt,Et){var Ft=u.nodesMap[Et].model.getMoveDistance(a,o,p);return kt[Et]=Ft,kt},{}),O=0;O<this.edges.length;O++){var _=this.edges[O],j=_.textPosition,k=j.x,R=j.y,V=d[_.sourceNodeId],W=void 0,ot=void 0;if(V){var nt=xi(V,2);W=nt[0],ot=nt[1],_.moveStartPoint(W,ot)}var dt=d[_.targetNodeId];if(dt){var bt=xi(dt,2);W=bt[0],ot=bt[1],_.moveEndPoint(W,ot)}(V||dt)&&this.handleEdgeTextMove(_,k,R)}}},{key:"addNodeMoveRules",value:function(n){this.nodeMoveRules.includes(n)||this.nodeMoveRules.push(n)}},{key:"setDefaultEdgeType",value:function(n){this.edgeType=n}},{key:"changeNodeType",value:function(n,a){var o=this.getNodeModelById(n);if(o){var u=o.getData();u.type=a;var p=this.getModel(a);if(!p)throw new Error("\u627E\u4E0D\u5230".concat(a,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var d=new p(u,this);this.nodes.splice(this.nodesMap[n].index,1,d),this.getNodeEdges(n).forEach(function(O){if(O.sourceNodeId===n){var _=eh(d,O.startPoint,d.width,d.height);O.updateStartPoint(_)}if(O.targetNodeId===n){var j=eh(d,O.endPoint,d.width,d.height);O.updateEndPoint(j)}})}}},{key:"changeEdgeType",value:function(n,a){var o=this.getEdgeModelById(n);if(o&&o.type!==a){var u=o.getData();u.type=a;var p=this.getModel(a);if(!p)throw new Error("\u627E\u4E0D\u5230".concat(a,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));delete u.pointsList;var d=new p(u,this);this.edges.splice(this.edgesMap[n].index,1,d)}}},{key:"getNodeIncomingEdge",value:function(n){var a=[];return this.edges.forEach(function(o){o.targetNodeId===n&&a.push(o)}),a}},{key:"getNodeOutgoingEdge",value:function(n){var a=[];return this.edges.forEach(function(o){o.sourceNodeId===n&&a.push(o)}),a}},{key:"getNodeIncomingNode",value:function(n){var a=this,o=[];return this.edges.forEach(function(u){u.targetNodeId===n&&o.push(a.nodesMap[u.sourceNodeId].model)}),o}},{key:"getNodeOutgoingNode",value:function(n){var a=this,o=[];return this.edges.forEach(function(u){u.sourceNodeId===n&&o.push(a.nodesMap[u.targetNodeId].model)}),o}},{key:"setTheme",value:function(n){this.theme=jd(Va(Va({},this.theme),n))}},{key:"resize",value:function(n,a){this.width=n||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 n=this.nodes,a=[],o=[];n.forEach(function(j){var k=j.x,R=j.y,V=j.width,W=j.height,ot=j.getNodeStyle().strokeWidth,nt=ot===void 0?0:ot;a=a.concat([k+V/2+nt,k-V/2-nt]),o=o.concat([R+W/2+nt,R-W/2-nt])});var u=Math.min.apply(Math,Do(a)),p=Math.max.apply(Math,Do(a)),d=Math.min.apply(Math,Do(o)),O=p-u||0,_=Math.max.apply(Math,Do(o))-d||0;return{virtualRectWidth:O,virtualRectHeight:_,virtualRectCenterPositionX:u+O/2,virtualRectCenterPositionY:d+_/2}}},{key:"translateCenter",value:function(){var n=this.nodes,a=this.width,o=this.height,u=this.rootEl,p=this.transformModel;if(n.length){var d=a||u.clientWidth,O=o||u.clientHeight,_=this.getVirtualRectSize(),j=_.virtualRectCenterPositionX,k=_.virtualRectCenterPositionY;p.focusOn(j,k,d,O)}}},{key:"fitView",value:function(){var n=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,p=this.height,d=this.rootEl,O=this.transformModel;if(o.length){var _=u||d.clientWidth,j=p||d.clientHeight,k=this.getVirtualRectSize(),R=k.virtualRectWidth,V=k.virtualRectHeight,W=k.virtualRectCenterPositionX,ot=k.virtualRectCenterPositionY,nt=(R+a)/_,dt=(V+n)/j,bt=0;bt=1/Math.max(nt,dt);var kt=[_/2,j/2];O.zoom(bt,kt),O.focusOn(W,ot,_,j)}}},{key:"openEdgeAnimation",value:function(n){this.getEdgeModelById(n).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(n){this.getEdgeModelById(n).closeEdgeAnimation()}}],r&&T0(e.prototype,r),t}(),Mh=Jt(ft.prototype,"width",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Th=Jt(ft.prototype,"height",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Dh=Jt(ft.prototype,"edgeType",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Nh=Jt(ft.prototype,"nodes",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ch=Jt(ft.prototype,"edges",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Rh=Jt(ft.prototype,"overlapMode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Pr.DEFAULT}}),Ih=Jt(ft.prototype,"background",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Lh=Jt(ft.prototype,"transformModel",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zh=Jt(ft.prototype,"editConfigModel",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Bh=Jt(ft.prototype,"gridSize",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Uh=Jt(ft.prototype,"partial",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hh=Jt(ft.prototype,"fakerNode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jt(ft.prototype,"nodesMap",[s.m],Object.getOwnPropertyDescriptor(ft.prototype,"nodesMap"),ft.prototype),Jt(ft.prototype,"edgesMap",[s.m],Object.getOwnPropertyDescriptor(ft.prototype,"edgesMap"),ft.prototype),Jt(ft.prototype,"modelsMap",[s.m],Object.getOwnPropertyDescriptor(ft.prototype,"modelsMap"),ft.prototype),Jt(ft.prototype,"sortElements",[s.m],Object.getOwnPropertyDescriptor(ft.prototype,"sortElements"),ft.prototype),Jt(ft.prototype,"textEditElement",[s.m],Object.getOwnPropertyDescriptor(ft.prototype,"textEditElement"),ft.prototype),Jt(ft.prototype,"selectElements",[s.m],Object.getOwnPropertyDescriptor(ft.prototype,"selectElements"),ft.prototype),Jt(ft.prototype,"selectNodes",[s.m],Object.getOwnPropertyDescriptor(ft.prototype,"selectNodes"),ft.prototype),Jt(ft.prototype,"setFakerNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"setFakerNode"),ft.prototype),Jt(ft.prototype,"removeFakerNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"removeFakerNode"),ft.prototype),Jt(ft.prototype,"setModel",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"setModel"),ft.prototype),Jt(ft.prototype,"toFront",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"toFront"),ft.prototype),Jt(ft.prototype,"setElementZIndex",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"setElementZIndex"),ft.prototype),Jt(ft.prototype,"deleteNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"deleteNode"),ft.prototype),Jt(ft.prototype,"addNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"addNode"),ft.prototype),Jt(ft.prototype,"cloneNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"cloneNode"),ft.prototype),Jt(ft.prototype,"moveNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"moveNode"),ft.prototype),Jt(ft.prototype,"moveNode2Coordinate",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"moveNode2Coordinate"),ft.prototype),Jt(ft.prototype,"editText",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"editText"),ft.prototype),Jt(ft.prototype,"addEdge",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"addEdge"),ft.prototype),Jt(ft.prototype,"moveEdge",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"moveEdge"),ft.prototype),Jt(ft.prototype,"deleteEdgeBySourceAndTarget",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"deleteEdgeBySourceAndTarget"),ft.prototype),Jt(ft.prototype,"deleteEdgeById",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"deleteEdgeById"),ft.prototype),Jt(ft.prototype,"deleteEdgeBySource",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"deleteEdgeBySource"),ft.prototype),Jt(ft.prototype,"deleteEdgeByTarget",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"deleteEdgeByTarget"),ft.prototype),Jt(ft.prototype,"setElementStateById",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"setElementStateById"),ft.prototype),Jt(ft.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"updateText"),ft.prototype),Jt(ft.prototype,"selectNodeById",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"selectNodeById"),ft.prototype),Jt(ft.prototype,"selectEdgeById",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"selectEdgeById"),ft.prototype),Jt(ft.prototype,"selectElementById",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"selectElementById"),ft.prototype),Jt(ft.prototype,"clearSelectElements",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"clearSelectElements"),ft.prototype),Jt(ft.prototype,"moveNodes",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"moveNodes"),ft.prototype),Jt(ft.prototype,"setDefaultEdgeType",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"setDefaultEdgeType"),ft.prototype),Jt(ft.prototype,"changeNodeType",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"changeNodeType"),ft.prototype),Jt(ft.prototype,"changeEdgeType",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"changeEdgeType"),ft.prototype),Jt(ft.prototype,"getNodeIncomingEdge",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"getNodeIncomingEdge"),ft.prototype),Jt(ft.prototype,"getNodeOutgoingEdge",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"getNodeOutgoingEdge"),ft.prototype),Jt(ft.prototype,"getNodeIncomingNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"getNodeIncomingNode"),ft.prototype),Jt(ft.prototype,"getNodeOutgoingNode",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"getNodeOutgoingNode"),ft.prototype),Jt(ft.prototype,"setTheme",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"setTheme"),ft.prototype),Jt(ft.prototype,"resize",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"resize"),ft.prototype),Jt(ft.prototype,"clearData",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"clearData"),ft.prototype),Jt(ft.prototype,"translateCenter",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"translateCenter"),ft.prototype),Jt(ft.prototype,"fitView",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"fitView"),ft.prototype),Jt(ft.prototype,"openEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"openEdgeAnimation"),ft.prototype),Jt(ft.prototype,"closeEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(ft.prototype,"closeEdgeAnimation"),ft.prototype),ft),D0=Wh;function $c(t){return $c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$c(t)}function Qc(){return Qc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qc.apply(this,arguments)}function N0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function qc(t,e){return qc=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},qc(t,e)}function C0(t){var e=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(r){return!1}}();return function(){var r,n=Ga(t);if(e){var a=Ga(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return R0(this,r)}}function R0(t,e){if(e&&($c(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return an(t)}function an(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ga(t){return Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ga(t)}function _n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zh,I0=Gr(Yh=function(t){(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&&qc(o,u)})(a,t);var e,r,n=C0(a);function a(o){var u;(function(_,j){if(!(_ instanceof j))throw new TypeError("Cannot call a class as a function")})(this,a),_n(an(u=n.call(this)),"stepDrag",void 0),_n(an(u),"stepScrollX",0),_n(an(u),"stepScrollY",0),_n(an(u),"onDragging",function(_){var j=_.deltaX,k=_.deltaY;u.setState({isDragging:!0});var R=u.props.graphModel,V=R.transformModel;R.editConfigModel.stopMoveGraph||V.translate(j,k)}),_n(an(u),"onDragEnd",function(){u.setState({isDragging:!1})}),_n(an(u),"zoomHandler",function(_){var j=u.props,k=j.graphModel,R=k.editConfigModel,V=k.transformModel,W=k.gridSize,ot=j.graphModel,nt=_.deltaX,dt=_.deltaY;if(R.stopScrollGraph||_.ctrlKey===!0){if(!R.stopZoomGraph){_.preventDefault();var bt=ot.getPointByClient({x:_.clientX,y:_.clientY}).canvasOverlayPosition,kt=bt.x,Et=bt.y;V.zoom(_.deltaY<0,[kt,Et])}}else{if(_.preventDefault(),u.stepScrollX+=nt,u.stepScrollY+=dt,Math.abs(u.stepScrollX)>=W){var Ft=u.stepScrollX%W,Mt=u.stepScrollX-Ft;V.translate(-Mt*V.SCALE_X,0),u.stepScrollX=Ft}if(Math.abs(u.stepScrollY)>=W){var Bt=u.stepScrollY%W,Rt=u.stepScrollY-Bt;V.translate(0,-Rt*V.SCALE_Y),u.stepScrollY=Bt}}}),_n(an(u),"clickHandler",function(_){if(_.target.getAttribute("name")==="canvas-overlay"){var j=u.props.graphModel;j.selectElements.size>0&&j.clearSelectElements(),j.eventCenter.emit(ee.BLANK_CLICK,{e:_})}}),_n(an(u),"handleContextMenu",function(_){if(_.target.getAttribute("name")==="canvas-overlay"){_.preventDefault();var j=u.props.graphModel,k=j.getPointByClient({x:_.clientX,y:_.clientY});j.eventCenter.emit(ee.BLANK_CONTEXTMENU,{e:_,position:k})}}),_n(an(u),"mouseDownHandler",function(_){var j=u.props.graphModel,k=j.eventCenter,R=j.editConfigModel,V=j.transformModel.SCALE_X,W=j.gridSize,ot=_.target,nt=!R.adjustEdge&&!R.adjustNodePosition;(ot.getAttribute("name")==="canvas-overlay"||nt)&&(R.stopMoveGraph?k.emit(ee.BLANK_MOUSEDOWN,{e:_}):(u.stepDrag.setStep(W*V),u.stepDrag.handleMouseDown(_)),u.clickHandler(_))});var p=o.graphModel,d=p.gridSize,O=p.eventCenter;return u.stepDrag=new On({onDragging:u.onDragging,onDragEnd:u.onDragEnd,step:d,eventType:"BLANK",isStopPropagation:!1,eventCenter:O,model:null}),u.state={isDragging:!1},u}return e=a,(r=[{key:"render",value:function(){var o=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props,p=u.children,d=u.dnd,O=this.state.isDragging;return Object(et.g)("svg",Qc({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:O?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},d.eventMap()),Object(et.g)("g",{transform:o},p))}}])&&N0(e.prototype,r),a}(et.a))||Yh;function ts(t){return ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ts(t)}function L0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function es(t,e){return es=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},es(t,e)}function B0(t){var e=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(r){return!1}}();return function(){var r,n=Wa(t);if(e){var a=Wa(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return U0(this,r)}}function U0(t,e){if(e&&(ts(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Wa(t){return Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wa(t)}var H0=Gr(Zh=function(t){(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&&es(o,u)})(a,t);var e,r,n=B0(a);function a(){return L0(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var o=this.props,u=o.tool,p=o.graphModel,d=u.getTools().map(function(O){return Object(et.g)(O,{graphModel:p,logicFlow:u.instance})});return u.components=d,d}},{key:"triggerToolRender",value:function(){var o=this.props,u=o.tool,p=o.graphModel,d=document.querySelector("#ToolOverlay_".concat(p.flowId)),O=u.getInstance();O.components.forEach(function(_){return _(O,d)}),O.components=[]}},{key:"render",value:function(){var o=this.props.graphModel;return Object(et.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(o.flowId)},this.getTools())}}])&&z0(e.prototype,r),a}(et.a))||Zh;function rs(t){return rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rs(t)}function F0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ns(t,e){return ns=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},ns(t,e)}function V0(t){var e=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(r){return!1}}();return function(){var r,n=Za(t);if(e){var a=Za(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Y0(this,r)}}function Y0(t,e){if(e&&(rs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Za(t){return Za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Za(t)}var Jh,G0=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&ns(o,u)})(a,t);var e,r,n=V0(a);function a(){return F0(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(){var o=this.props.background;return Object(et.g)("div",{className:"lf-background"},Object(et.g)("div",{style:o,className:"lf-background-area"}))}}])&&X0(e.prototype,r),a}(et.a);function os(t){return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},os(t)}function W0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function is(t,e){return is=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},is(t,e)}function J0(t){var e=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(r){return!1}}();return function(){var r,n=Ja(t);if(e){var a=Ja(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return K0(this,r)}}function K0(t,e){if(e&&(os(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kh(t)}function Kh(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ja(t){return Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ja(t)}function $0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $h=Gr(Jh=function(t){(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,t);var e,r,n=J0(a);function a(){var o;W0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return $0(Kh(o=n.call.apply(n,[this].concat(p))),"id",Bn()),o}return e=a,(r=[{key:"renderDot",value:function(){var o=this.props,u=o.config,p=u.color,d=u.thickness,O=d===void 0?2:d,_=o.size,j=o.visible,k=Math.min(Math.max(2,O),_/2),R=1;return j||(R=0),Object(et.g)("rect",{width:k,height:k,rx:k/2,ry:k/2,fill:p,opacity:R})}},{key:"renderMesh",value:function(){var o=this.props,u=o.config,p=u.color,d=u.thickness,O=d===void 0?1:d,_=o.size,j=o.visible,k=Math.min(Math.max(1,O),_/2),R="M ".concat(_," 0 H0 M0 0 V0 ").concat(_),V=1;return j||(V=0),Object(et.g)("path",{d:R,stroke:p,strokeWidth:k,opacity:V})}},{key:"render",value:function(){var o=this.props,u=o.type,p=o.size,d=o.graphModel.transformModel,O=[d.SCALE_X,d.SKEW_Y,d.SKEW_X,d.SCALE_Y,d.TRANSLATE_X,d.TRANSLATE_Y].join(","),_="matrix(".concat(O,")");return Object(et.g)("div",{className:"lf-grid"},Object(et.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(et.g)("defs",null,Object(et.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:_,x:"0",y:"0",width:p,height:p},u==="dot"&&this.renderDot(),u==="mesh"&&this.renderMesh())),Object(et.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Z0(e.prototype,r),a}(et.a))||Jh;$h.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},i(52);function as(t){return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},as(t)}function Q0(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Qh(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Qh(r,n)}}(t,e)||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 Qh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var qh,No=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach(function(r){var n=Q0(r,2),a=n[0],o=n[1];(a==="style"||as(o)!=="object")&&(e[a]=o)}),Object(et.g)("line",e)};function us(t){return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},us(t)}function ty(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ka(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ty(Object(r),!0).forEach(function(n){q0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ty(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function q0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function eO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function cs(t,e){return cs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},cs(t,e)}function rO(t){var e=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(r){return!1}}();return function(){var r,n=$a(t);if(e){var a=$a(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return nO(this,r)}}function nO(t,e){if(e&&(us(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function $a(t){return $a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$a(t)}var ey,oO=Gr(qh=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&cs(o,u)})(a,t);var e,r,n=rO(a);function a(){return tO(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(){var o=this.props.snaplineModel,u=o.position,p=o.isShowHorizontal,d=o.isShowVertical,O=o.getStyle(),_=u.x,j=_===void 0?0:_,k=u.y,R=k===void 0?0:k,V=Ka(Ka({x1:-1e5,y1:R,x2:1e5,y2:R},O),{},{stroke:p?O.stroke:"none"}),W=Ka(Ka({x1:j,y1:-1e5,x2:j,y2:1e5},O),{},{stroke:d?O.stroke:"none"});return Object(et.g)("g",{className:"lf-snapline"},Object(et.g)(No,V),Object(et.g)(No,W))}}])&&eO(e.prototype,r),a}(et.a))||qh;function ss(t){return ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ss(t)}function iO(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return ry(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ry(r,n)}}(t,e)||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(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fn(t){var e=t.x,r=t.y,n=t.width,a=t.height,o=t.className,u=t.radius,p=e-n/2,d=r-a/2,O={};return Object.entries(t).forEach(function(_){var j=iO(_,2),k=j[0],R=j[1];ss(R)!=="object"&&(O[k]=R)}),O.className=o?"lf-basic-shape ".concat(o):"lf-basic-shape",u&&(O.rx=u,O.ry=u),O.x=p,O.y=d,Object(et.g)("rect",O)}function ls(t){return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(t)}function Co(){return Co=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Co.apply(this,arguments)}function ny(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function oy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ny(Object(r),!0).forEach(function(n){aO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function aO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function fs(t,e){return fs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},fs(t,e)}function sO(t){var e=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(r){return!1}}();return function(){var r,n=Qa(t);if(e){var a=Qa(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return lO(this,r)}}function lO(t,e){if(e&&(ls(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Qa(t){return Qa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qa(t)}Fn.defaultProps={className:"",radius:""};var iy,fO=Gr(ey=function(t){(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,t);var e,r,n=sO(a);function a(){return uO(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getNodesOutline",value:function(){var o=this.props.graphModel,u=o.nodes,p=o.editConfigModel,d=p.hoverOutline,O=p.nodeSelectedOutline,_=[];return u.forEach(function(j){if(j.isHovered||j.isSelected){var k=j.isHovered,R=j.isSelected,V=j.x,W=j.y,ot=j.width,nt=j.height;if(O&&R||d&&k){var dt=j.getOutlineStyle(),bt={};if(Object.keys(dt).forEach(function(Et){Et!=="hover"&&(bt[Et]=dt[Et])}),k){var kt=dt.hover;bt=oy(oy({},bt),kt)}_.push(Object(et.g)(Fn,Co({className:"lf-outline-node",x:V,y:W,width:ot+10,height:nt+10},bt)))}}}),_}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,u=o.edges,p=o.editConfigModel,d=p.edgeSelectedOutline,O=p.hoverOutline,_=[],j=0;j<u.length;j++){var k=u[j];(d&&k.isSelected||O&&k.isHovered)&&(k.modelType===he.LINE_EDGE?_.push(this.getLineOutline(k)):k.modelType===he.POLYLINE_EDGE?_.push(this.getPolylineOutline(k)):k.modelType===he.BEZIER_EDGE&&_.push(this.getBezierOutline(k)))}return _}},{key:"getLineOutline",value:function(o){var u=o.startPoint,p=o.endPoint,d=(u.x+p.x)/2,O=(u.y+p.y)/2,_=Math.abs(u.x-p.x)+10,j=Math.abs(u.y-p.y)+10,k=o.getOutlineStyle();return Object(et.g)(Fn,Co({className:"lf-outline-edge",x:d,y:O,width:_,height:j},k))}},{key:"getPolylineOutline",value:function(o){var u=o.points,p=ao(u),d=_i(p,8),O=d.x,_=d.y,j=d.width,k=d.height,R=o.getOutlineStyle();return Object(et.g)(Fn,Co({className:"lf-outline",x:O,y:_,width:j,height:k},R))}},{key:"getBezierOutline",value:function(o){var u=o.path,p=Fa(u),d=_i(p,8),O=d.x,_=d.y,j=d.width,k=d.height,R=o.getOutlineStyle();return Object(et.g)(Fn,Co({className:"lf-outline",x:O,y:_,width:j,height:k},R))}},{key:"render",value:function(){return Object(et.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&cO(e.prototype,r),a}(et.a))||ey;function ps(t){return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ps(t)}function pO(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return ay(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ay(r,n)}}(t,e)||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(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ei(t){var e=t.x,r=e===void 0?0:e,n=t.y,a=n===void 0?0:n,o=t.r,u=o===void 0?4:o,p=t.className,d={cx:r,cy:a,r:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(function(O){var _=pO(O,2),j=_[0],k=_[1];ps(k)!=="object"&&(d[j]=k)}),d.className=p?"lf-basic-shape ".concat(p):"lf-basic-shape",Object(et.g)("circle",d)}function ds(t){return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ds(t)}function dO(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return uy(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return uy(r,n)}}(t,e)||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 uy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ji(){return ji=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ji.apply(this,arguments)}function cy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ly(t,e,r){return e&&sy(t.prototype,e),r&&sy(t,r),t}function fy(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&hs(t,e)}function hs(t,e){return hs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},hs(t,e)}function py(t){var e=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(r){return!1}}();return function(){var r,n=tu(t);if(e){var a=tu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return hO(this,r)}}function hO(t,e){if(e&&(ds(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qa(t)}function qa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tu(t){return tu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},tu(t)}function ys(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dy,hy=function(t){fy(r,t);var e=py(r);function r(){var n;return cy(this,r),ys(qa(n=e.call(this)),"dragHandler",void 0),ys(qa(n),"onDragging",function(a){var o=a.event,u=n.props,p=u.graphModel,d=u.bezierModel,O=u.type,_=p.getPointByClient({x:o.clientX,y:o.clientY}).canvasOverlayPosition,j=_.x,k=_.y;d.updateAdjustAnchor({x:j,y:k},O)}),ys(qa(n),"onDragEnd",function(){n.props.bezierModel.isDragging=!1}),n.dragHandler=new On({onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return ly(r,[{key:"render",value:function(){var n=this,a=this.props.position,o=a.x,u=a.y,p=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(et.g)(Ei,ji({className:"lf-bezier-adjust-anchor",x:o,y:u},p,{onMouseDown:function(d){n.dragHandler.handleMouseDown(d)}}))}}]),r}(et.a),yO=Gr(iy=function(t){fy(r,t);var e=py(r);function r(){return cy(this,r),e.apply(this,arguments)}return ly(r,[{key:"getBezierAdjust",value:function(n,a){var o=n.path,u=n.id,p=dO(Fa(o),4),d=p[0],O=p[1],_=p[2],j=p[3],k=n.getEdgeStyle().adjustLine,R=[];return R.push(Object(et.g)(No,ji({x1:d.x,y1:d.y,x2:O.x,y2:O.y},k))),R.push(Object(et.g)(hy,{position:O,bezierModel:n,graphModel:a,key:"".concat(u,"_ePre"),type:"sNext"})),R.push(Object(et.g)(No,ji({x1:j.x,y1:j.y,x2:_.x,y2:_.y},k))),R.push(Object(et.g)(hy,{position:_,bezierModel:n,graphModel:a,key:"".concat(u,"_sNext"),type:"ePre"})),R}},{key:"selectedBezierEdge",value:function(){for(var n=this.props.graphModel,a=n.edges,o=[],u=0;u<a.length;u++){var p=a[u];p.isSelected&&p.modelType===he.BEZIER_EDGE&&p.draggable&&o.push(this.getBezierAdjust(p,n))}return o}},{key:"render",value:function(){return Object(et.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(et.a))||iy;function vs(t){return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vs(t)}function vO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function gs(t,e){return gs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},gs(t,e)}function mO(t){var e=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(r){return!1}}();return function(){var r,n=eu(t);if(e){var a=eu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return bO(this,r)}}function bO(t,e){if(e&&(vs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function eu(t){return eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},eu(t)}var yy,OO=Gr(dy=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&gs(o,u)})(a,t);var e,r,n=mO(a);function a(){return vO(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(){var o=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props.children;return Object(et.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(et.g)("g",{transform:o},u))}}])&&gO(e.prototype,r),a}(et.a))||dy;function ms(t){return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ms(t)}function bs(){return bs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bs.apply(this,arguments)}function _O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Os(t,e){return Os=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Os(t,e)}function xO(t){var e=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(r){return!1}}();return function(){var r,n=ru(t);if(e){var a=ru(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return EO(this,r)}}function EO(t,e){if(e&&(ms(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ru(t){return ru=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ru(t)}var jO=Gr(yy=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Os(o,u)})(a,t);var e,r,n=xO(a);function a(){return _O(this,a),n.apply(this,arguments)}return e=a,r=[{key:"getComponent",value:function(o,u){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",d=this.props.getView,O=d(o.type);return Object(et.g)(O,{key:o.id,model:o,graphModel:u,overlay:p})}},{key:"render",value:function(){var o=this,u=this.props,p=u.graphModel,d=u.tool,O=u.options,_=u.dnd,j=u.snaplineModel,k={};O.width&&(k.width="".concat(p.width,"px")),O.height&&(k.height="".concat(p.height,"px"));var R=O.grid,V=p.fakerNode,W=p.editConfigModel.adjustEdge;return Object(et.g)("div",{className:"lf-graph","flow-id":p.flowId,style:k},Object(et.g)(I0,{graphModel:p,dnd:_},Object(et.g)("g",{className:"lf-base"},Ma(p.sortElements,function(ot){return o.getComponent(ot,p)})),V?this.getComponent(V,p):""),Object(et.g)(OO,{graphModel:p},Object(et.g)(fO,{graphModel:p}),W?Object(et.g)(yO,{graphModel:p}):"",O.snapline!==!1?Object(et.g)(oO,{snaplineModel:j}):""),Object(et.g)(H0,{graphModel:p,tool:d}),O.background&&Object(et.g)(G0,{background:O.background}),O.grid&&Object(et.g)($h,bs({},R,{graphModel:p})))}}],r&&wO(e.prototype,r),a}(et.a))||yy,SO=jO;function vy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function nu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vy(Object(r),!0).forEach(function(n){wn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function PO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function wn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var AO=function(){function t(n){var a=this;(function(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),wn(this,"nodeConfig",void 0),wn(this,"lf",void 0),wn(this,"fakerNode",void 0),wn(this,"stopDrag",function(){a.nodeConfig=null,window.document.removeEventListener("mouseup",a.stopDrag)}),wn(this,"dragEnter",function(u){a.nodeConfig&&!a.fakerNode&&(a.fakerNode=a.lf.createFakerNode(nu(nu({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY}))))}),wn(this,"onDragOver",function(u){if(u.preventDefault(),a.fakerNode){var p=a.clientToLocalPoint({x:u.clientX,y:u.clientY}),d=p.x,O=p.y;a.fakerNode.moveTo(d,O);var _=a.fakerNode.getData();a.lf.setNodeSnapLine(_),a.lf.graphModel.eventCenter.emit(ee.NODE_DND_DRAG,{data:_})}return!1}),wn(this,"onDragLeave",function(){a.fakerNode&&(a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)}),wn(this,"onDrop",function(u){a.lf.graphModel&&u&&a.nodeConfig&&(a.lf.addNode(nu(nu({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY})),ee.NODE_DND_ADD,u),u.preventDefault(),u.stopPropagation(),a.nodeConfig=null,a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)});var o=n.lf;this.lf=o}var e,r;return e=t,(r=[{key:"clientToLocalPoint",value:function(n){var a=n.x,o=n.y,u=kp(this.lf.options,["grid","size"]),p=this.lf.graphModel.getPointByClient({x:a,y:o}).canvasOverlayPosition,d=p.x,O=p.y;return{x:zn(d,u),y:zn(O,u)}}},{key:"startDrag",value:function(n){this.nodeConfig=n,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}}}])&&PO(e.prototype,r),t}();function gy(t){var e=t.container,r=t.grid,n=t.width,a=t.height;if(!e)throw new Error("\u8BF7\u68C0\u67E5 container \u53C2\u6570\u662F\u5426\u6709\u6548");if(typeof n=="string"||typeof a=="string")throw new Error("width\u6216height\u4E0D\u652F\u6301\u4F20\u5165\u5B57\u7B26\u4E32\uFF0C\u8BF7\u4F20\u6570\u5B57");return r&&(t.grid=fr({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),fr({},by,t)}var me,my,by={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function _s(t){return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_s(t)}function ws(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Oy(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Oy(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Oy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ou(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_y(Object(r),!0).forEach(function(n){wy(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_y(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function kO(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function MO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Si(){return Si=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=DO(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Si.apply(this,arguments)}function DO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Xn(t))!==null;);return t}function xs(t,e){return xs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},xs(t,e)}function NO(t){var e=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(r){return!1}}();return function(){var r,n=Xn(t);if(e){var a=Xn(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return CO(this,r)}}function CO(t,e){if(e&&(_s(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iu(t)}function iu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xn(t){return Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xn(t)}function wy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xr(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var Es=(me=function(t){(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,t);var e,r,n=NO(a);function a(){var o;MO(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return wy(iu(o=n.call.apply(n,[this].concat(p))),"modelType",he.BEZIER_EDGE),kO(iu(o),"path",my,iu(o)),o}return e=a,(r=[{key:"initEdgeData",value:function(o){this.offset=100,Si(Xn(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.bezier;return ou(ou({},Si(Xn(a.prototype),"getEdgeStyle",this).call(this)),De(o))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var o=0,u=0;return this.pointsList.forEach(function(p){var d=p.x,O=p.y;o+=d,u+=O}),{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=Si(Xn(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(p){return{x:p.x,y:p.y}});return ou(ou({},o),{},{pointsList:u})}},{key:"getControls",value:function(){var o=this.startPoint,u=this.endPoint;return Sh({start:o,end:u,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(o){var u=ws(o,4),p=u[0],d=u[1],O=u[2],_=u[3];return"M ".concat(p.x," ").concat(p.y,`
    C `).concat(d.x," ").concat(d.y,`,
    `).concat(O.x," ").concat(O.y,`,
    `).concat(_.x," ").concat(_.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,p=o.ePre;this.updatePath(u,p)}},{key:"updatePath",value:function(o,u){o=De(o),u=De(u);var p={x:this.startPoint.x,y:this.startPoint.y},d={x:this.endPoint.x,y:this.endPoint.y};if(!o||!u){var O=this.getControls();o=O.sNext,u=O.ePre}this.pointsList=[p,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 p=ws(this.pointsList,3),d=p[1],O=p[2];d.x+=o,d.y+=u,this.updatePath(d,O)}},{key:"moveEndPoint",value:function(o,u){this.endPoint.x+=o,this.endPoint.y+=u;var p=ws(this.pointsList,3),d=p[1],O=p[2];O.x+=o,O.y+=u,this.updatePath(d,O)}},{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,p=o.endPoint,d=o.sourceNode,O=o.targetNode,_=Sh({start:u,end:p,sourceNode:d,targetNode:O,offset:this.offset}),j=_.sNext,k=_.ePre;this.pointsList=[u,j,k,p],this.initPoints()}}])&&TO(e.prototype,r),a}(Lc),my=Xr(me.prototype,"path",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Xr(me.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"initPoints"),me.prototype),Xr(me.prototype,"updatePoints",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"updatePoints"),me.prototype),Xr(me.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"updateStartPoint"),me.prototype),Xr(me.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"updateEndPoint"),me.prototype),Xr(me.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"moveStartPoint"),me.prototype),Xr(me.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"moveEndPoint"),me.prototype),Xr(me.prototype,"updateAdjustAnchor",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"updateAdjustAnchor"),me.prototype),Xr(me.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"getAdjustStart"),me.prototype),Xr(me.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"getAdjustEnd"),me.prototype),Xr(me.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(me.prototype,"updateAfterAdjustStartAndEnd"),me.prototype),me),Nt,xy,Ey,jy,Sy,Py,Ay,ky,My,Ty,Dy,Ny,Cy,Ry,Iy,Ly,zy,By,Uy,Hy,RO=function(t){return t==null};function js(t){return js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},js(t)}function IO(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(d,O){if(d){if(typeof d=="string")return Fy(d,O);var _=Object.prototype.toString.call(d).slice(8,-1);if(_==="Object"&&d.constructor&&(_=d.constructor.name),_==="Map"||_==="Set")return Array.from(d);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return Fy(d,O)}}(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},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,p=!1;return{s:function(){r=r.call(t)},n:function(){var d=r.next();return u=d.done,d},e:function(d){p=!0,o=d},f:function(){try{u||r.return==null||r.return()}finally{if(p)throw o}}}}function Fy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function dr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xy(Object(r),!0).forEach(function(n){Or(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function We(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function LO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Or(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pe(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var xn,Vy,En=(Nt=function(){function t(n,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,t),Or(this,"id",""),We(this,"type",xy,this),We(this,"x",Ey,this),We(this,"y",jy,this),We(this,"text",Sy,this),We(this,"properties",Py,this),We(this,"_width",Ay,this),We(this,"_height",ky,this),We(this,"anchorsOffset",My,this),We(this,"isSelected",Ty,this),We(this,"isHovered",Dy,this),We(this,"isShowAnchor",Ny,this),We(this,"isDragging",Cy,this),We(this,"isHitable",Ry,this),We(this,"draggable",Iy,this),We(this,"visible",Ly,this),Or(this,"virtual",!1),Or(this,"graphModel",void 0),We(this,"zIndex",zy,this),We(this,"state",By,this),We(this,"autoToFront",Uy,this),We(this,"style",Hy,this),Or(this,"BaseType",Xe.NODE),Or(this,"modelType",he.NODE),Or(this,"additionStateData",void 0),Or(this,"targetRules",[]),Or(this,"sourceRules",[]),Or(this,"moveRules",[]),Or(this,"hasSetTargetRules",!1),Or(this,"hasSetSourceRules",!1),this.graphModel=a,this.initNodeData(n),this.setAttributes()}var e,r;return e=t,r=[{key:"width",get:function(){return this._width},set:function(n){this._width=n}},{key:"height",get:function(){return this._height},set:function(n){this._height=n}},{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(n){if(n.properties||(n.properties={}),!n.id){var a=this.graphModel.idGenerator,o=a&&a(n.type),u=this.createId();n.id=u||o||Bn()}this.formatText(n),fr(this,function(p){return hi(p,["id","type","x","y","text","properties","virtual"])}(n)),this.graphModel.overlapMode===Pr.INCREASE&&(this.zIndex=n.zIndex||Rc())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(n){n.text||(n.text={value:"",x:n.x,y:n.y,draggable:!1,editable:!0}),n.text&&typeof n.text=="string"?n.text={value:n.text,x:n.x,y:n.y,draggable:!1,editable:!0}:n.text&&n.text.editable===void 0&&(n.text.editable=!0)}},{key:"getData",value:function(){var n=this.text,a=n.x,o=n.y,u=n.value,p=this.properties;Object(s.x)(p)&&(p=Object(s.I)(p));var d={id:this.id,type:this.type,x:this.x,y:this.y,properties:p};return this.graphModel.overlapMode===Pr.INCREASE&&(d.zIndex=this.zIndex),u&&(d.text={x:a,y:o,value:u}),d}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(s.I)(this.properties)}},{key:"getNodeStyle",value:function(){return dr(dr({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var n=this.graphModel.theme.nodeText;return De(n)}},{key:"getAnchorStyle",value:function(n){var a=this.graphModel.theme.anchor;return De(a)}},{key:"getAnchorLineStyle",value:function(n){var a=this.graphModel.theme.anchorLine;return De(a)}},{key:"getOutlineStyle",value:function(){var n=this.graphModel.theme.outline;return De(n)}},{key:"isAllowConnectedAsSource",value:function(n,a,o,u){var p=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var d,O=!0,_=0;_<p.length;_++){var j=p[_];if(!j.validate.call(this,this,n,a,o,u)){O=!1,d=j.message;break}}return{isAllPass:O,msg:d}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(n,a,o,u){var p=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var d,O=!0,_=0;_<p.length;_++){var j=p[_];if(!j.validate.call(this,n,this,a,o,u)){O=!1,d=j.message;break}}return{isAllPass:O,msg:d}}},{key:"isAllowMoveNode",value:function(n,a){var o,u=!0,p=!0,d=IO(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(d.s();!(o=d.n()).done;){var O=(0,o.value)(this,n,a);if(!O)return!1;if(js(O)==="object"){var _=O;if(_.x===!1&&_.y===!1)return!1;u=u&&_.x,p=p&&_.y}}}catch(j){d.e(j)}finally{d.f()}return{x:u,y:p}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var n=this.anchorsOffset,a=this.id,o=this.x,u=this.y;return n&&n.length>0?n.map(function(p,d){return p.length?(p=p,{id:"".concat(a,"_").concat(d),x:o+p[0],y:u+p[1]}):dr(dr({},p=p),{},{x:o+p.x,y:u+p.y,id:p.id||"".concat(a,"_").concat(d)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(n){return function(a,o){for(var u,p=Dc(o),d=Number.MAX_SAFE_INTEGER,O=0;O<p.length;O++){var _=rn(a.x,a.y,p[O].x,p[O].y);_<d&&(d=_,u={index:O,anchor:Md(Md({},p[O]),{},{x:p[O].x,y:p[O].y,id:p[O].id})})}return u}(n,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(n){if(!RO(n))for(var a=0;a<this.anchors.length;a++){var o=this.anchors[a];if(o.id===n)return o}}},{key:"addNodeMoveRules",value:function(n){this.moveRules.includes(n)||this.moveRules.push(n)}},{key:"move",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,p=!1;if(o)u=!0,p=!0;else{var d=this.isAllowMoveNode(n,a);typeof d=="boolean"?(u=d,p=d):(u=d.x,p=d.y)}if(u){var O=this.x+n;this.x=O,this.text&&this.moveText(n,0)}if(p){var _=this.y+a;this.y=_,this.text&&this.moveText(0,a)}return u||p}},{key:"getMoveDistance",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,p=!1,d=0,O=0;if(o)u=!0,p=!0;else{var _=this.isAllowMoveNode(n,a);typeof _=="boolean"?(u=_,p=_):(u=_.x,p=_.y)}if(u&&n){var j=this.x+n;this.x=j,this.text&&this.moveText(n,0),d=n}if(p&&a){var k=this.y+a;this.y=k,this.text&&this.moveText(0,a),O=a}return[d,O]}},{key:"moveTo",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=n-this.x,p=a-this.y;return!(!o&&!this.isAllowMoveNode(u,p)||(this.text&&this.text&&this.moveText(u,p),this.x=n,this.y=a,0))}},{key:"moveText",value:function(n,a){var o=this.text,u=o.x,p=o.y,d=o.value,O=o.draggable,_=o.editable;this.text={value:d,editable:_,draggable:O,x:u+n,y:p+a}}},{key:"updateText",value:function(n){this.text=dr(dr({},Object(s.I)(this.text)),{},{value:n})}},{key:"setSelected",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=n}},{key:"setHovered",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=n,this.setIsShowAnchor(n)}},{key:"setIsShowAnchor",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=n}},{key:"setHitable",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=n}},{key:"setElementState",value:function(n,a){this.state=n,this.additionStateData=a}},{key:"setProperty",value:function(n,a){this.properties=dr(dr({},Object(s.I)(this.properties)),{},Or({},n,or(a))),this.setAttributes()}},{key:"setProperties",value:function(n){this.properties=dr(dr({},Object(s.I)(this.properties)),or(n)),this.setAttributes()}},{key:"deleteProperty",value:function(n){delete this.properties[n],this.setAttributes()}},{key:"setStyle",value:function(n,a){this.style=dr(dr({},this.style),{},Or({},n,or(a)))}},{key:"setStyles",value:function(n){this.style=dr(dr({},this.style),or(n))}},{key:"updateStyles",value:function(n){this.style=dr({},or(n))}},{key:"setZIndex",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.zIndex=n}},{key:"updateAttributes",value:function(n){fr(this,n)}}],r&&LO(e.prototype,r),t}(),xy=pe(Nt.prototype,"type",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ey=pe(Nt.prototype,"x",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),jy=pe(Nt.prototype,"y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Sy=pe(Nt.prototype,"text",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Py=pe(Nt.prototype,"properties",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Ay=pe(Nt.prototype,"_width",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),ky=pe(Nt.prototype,"_height",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),My=pe(Nt.prototype,"anchorsOffset",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ty=pe(Nt.prototype,"isSelected",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dy=pe(Nt.prototype,"isHovered",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ny=pe(Nt.prototype,"isShowAnchor",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cy=pe(Nt.prototype,"isDragging",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ry=pe(Nt.prototype,"isHitable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Iy=pe(Nt.prototype,"draggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ly=pe(Nt.prototype,"visible",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zy=pe(Nt.prototype,"zIndex",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),By=pe(Nt.prototype,"state",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Uy=pe(Nt.prototype,"autoToFront",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hy=pe(Nt.prototype,"style",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),pe(Nt.prototype,"incoming",[s.m],Object.getOwnPropertyDescriptor(Nt.prototype,"incoming"),Nt.prototype),pe(Nt.prototype,"outgoing",[s.m],Object.getOwnPropertyDescriptor(Nt.prototype,"outgoing"),Nt.prototype),pe(Nt.prototype,"addNodeMoveRules",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"addNodeMoveRules"),Nt.prototype),pe(Nt.prototype,"move",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"move"),Nt.prototype),pe(Nt.prototype,"getMoveDistance",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"getMoveDistance"),Nt.prototype),pe(Nt.prototype,"moveTo",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"moveTo"),Nt.prototype),pe(Nt.prototype,"moveText",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"moveText"),Nt.prototype),pe(Nt.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"updateText"),Nt.prototype),pe(Nt.prototype,"setSelected",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setSelected"),Nt.prototype),pe(Nt.prototype,"setHovered",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setHovered"),Nt.prototype),pe(Nt.prototype,"setIsShowAnchor",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setIsShowAnchor"),Nt.prototype),pe(Nt.prototype,"setHitable",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setHitable"),Nt.prototype),pe(Nt.prototype,"setElementState",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setElementState"),Nt.prototype),pe(Nt.prototype,"setProperty",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setProperty"),Nt.prototype),pe(Nt.prototype,"setProperties",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setProperties"),Nt.prototype),pe(Nt.prototype,"deleteProperty",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"deleteProperty"),Nt.prototype),pe(Nt.prototype,"setStyle",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setStyle"),Nt.prototype),pe(Nt.prototype,"setStyles",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setStyles"),Nt.prototype),pe(Nt.prototype,"updateStyles",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"updateStyles"),Nt.prototype),pe(Nt.prototype,"setZIndex",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"setZIndex"),Nt.prototype),pe(Nt.prototype,"updateAttributes",[s.k],Object.getOwnPropertyDescriptor(Nt.prototype,"updateAttributes"),Nt.prototype),Nt);function Ss(t){return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ss(t)}function Yy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Gy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Yy(Object(r),!0).forEach(function(n){Wy(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function zO(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function BO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function UO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ps(){return Ps=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=HO(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Ps.apply(this,arguments)}function HO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Ro(t))!==null;);return t}function As(t,e){return As=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},As(t,e)}function FO(t){var e=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(r){return!1}}();return function(){var r,n=Ro(t);if(e){var a=Ro(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return XO(this,r)}}function XO(t,e){if(e&&(Ss(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return au(t)}function au(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ro(t){return Ro=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ro(t)}function Wy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ks(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var ir,Zy,Jy,Ms=(xn=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&As(o,u)})(a,t);var e,r,n=FO(a);function a(){var o;BO(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return Wy(au(o=n.call.apply(n,[this].concat(p))),"modelType",he.CIRCLE_NODE),zO(au(o),"r",Vy,au(o)),o}return e=a,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var o=Ps(Ro(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.circle;return Gy(Gy({},o),De(u))}},{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,p=this.r;return[{x:o,y:u-p,id:"".concat(this.id,"_0")},{x:o+p,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+p,id:"".concat(this.id,"_2")},{x:o-p,y:u,id:"".concat(this.id,"_3")}]}}])&&UO(e.prototype,r),a}(En),Vy=ks(xn.prototype,"r",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),ks(xn.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(xn.prototype,"width"),xn.prototype),ks(xn.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(xn.prototype,"height"),xn.prototype),xn);i(127);function Ts(t){return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ts(t)}function Ds(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Ky(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ky(r,n)}}(t,e)||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(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function $y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Qy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$y(Object(r),!0).forEach(function(n){tv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$y(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qy(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function VO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ns(){return Ns=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=GO(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Ns.apply(this,arguments)}function GO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Lo(t))!==null;);return t}function Cs(t,e){return Cs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Cs(t,e)}function WO(t){var e=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(r){return!1}}();return function(){var r,n=Lo(t);if(e){var a=Lo(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return ZO(this,r)}}function ZO(t,e){if(e&&(Ts(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Io(t)}function Io(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lo(t){return Lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Lo(t)}function tv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zo(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var un,ev,rv,Rs=(ir=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Cs(o,u)})(a,t);var e,r,n=WO(a);function a(){var o;VO(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return tv(Io(o=n.call.apply(n,[this].concat(p))),"modelType",he.DIAMOND_NODE),qy(Io(o),"rx",Zy,Io(o)),qy(Io(o),"ry",Jy,Io(o)),o}return e=a,(r=[{key:"getNodeStyle",value:function(){var o=Ns(Lo(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.diamond;return Qy(Qy({},o),De(u))}},{key:"points",get:function(){var o=this.x,u=this.y,p=this.rx,d=this.ry;return[[o,u-d],[o+p,u],[o,u+d],[o-p,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(p){var d=Ds(p,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(p){var d=Ds(p,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,p){var d=Ds(u,2);return{x:d[0],y:d[1],id:"".concat(o.id,"_").concat(p)}})}}])&&YO(e.prototype,r),a}(En),Zy=zo(ir.prototype,"rx",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Jy=zo(ir.prototype,"ry",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),zo(ir.prototype,"points",[s.m],Object.getOwnPropertyDescriptor(ir.prototype,"points"),ir.prototype),zo(ir.prototype,"pointsPosition",[s.m],Object.getOwnPropertyDescriptor(ir.prototype,"pointsPosition"),ir.prototype),zo(ir.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(ir.prototype,"width"),ir.prototype),zo(ir.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(ir.prototype,"height"),ir.prototype),ir);function Is(t){return Is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Is(t)}function nv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ov(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nv(Object(r),!0).forEach(function(n){av(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iv(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function JO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function KO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ls(){return Ls=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=$O(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Ls.apply(this,arguments)}function $O(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Uo(t))!==null;);return t}function zs(t,e){return zs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},zs(t,e)}function QO(t){var e=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(r){return!1}}();return function(){var r,n=Uo(t);if(e){var a=Uo(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return qO(this,r)}}function qO(t,e){if(e&&(Is(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bo(t)}function Bo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uo(t){return Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Uo(t)}function av(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uu(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var zr,uv,Bs=(un=function(t){(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,t);var e,r,n=QO(a);function a(){var o;JO(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return av(Bo(o=n.call.apply(n,[this].concat(p))),"modelType",he.ELLIPSE_NODE),iv(Bo(o),"rx",ev,Bo(o)),iv(Bo(o),"ry",rv,Bo(o)),o}return e=a,(r=[{key:"getNodeStyle",value:function(){var o=Ls(Uo(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.ellipse;return ov(ov({},o),De(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,p=this.rx,d=this.ry;return[{x:o,y:u-d,id:"".concat(this.id,"_0")},{x:o+p,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d,id:"".concat(this.id,"_2")},{x:o-p,y:u,id:"".concat(this.id,"_3")}]}}])&&KO(e.prototype,r),a}(En),ev=uu(un.prototype,"rx",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),rv=uu(un.prototype,"ry",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),uu(un.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(un.prototype,"width"),un.prototype),uu(un.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(un.prototype,"height"),un.prototype),un);function Us(t){return Us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Us(t)}function Hs(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return cv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return cv(r,n)}}(t,e)||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 cv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function lv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sv(Object(r),!0).forEach(function(n){fv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function t_(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function e_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fs(){return Fs=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=n_(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Fs.apply(this,arguments)}function n_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Ho(t))!==null;);return t}function Xs(t,e){return Xs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Xs(t,e)}function o_(t){var e=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(r){return!1}}();return function(){var r,n=Ho(t);if(e){var a=Ho(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i_(this,r)}}function i_(t,e){if(e&&(Us(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cu(t)}function cu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ho(t){return Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ho(t)}function fv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function su(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var Vs,pv,Ys=(zr=function(t){(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,t);var e,r,n=o_(a);function a(){var o;e_(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return fv(cu(o=n.call.apply(n,[this].concat(p))),"modelType",he.POLYGON_NODE),t_(cu(o),"points",uv,cu(o)),o}return e=a,(r=[{key:"getNodeStyle",value:function(){var o=Fs(Ho(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.polygon;return lv(lv({},o),De(u))}},{key:"pointsPosition",get:function(){var o=this.x,u=this.y,p=this.width,d=this.height;return this.points.map(function(O){return{x:O[0]+o-p/2,y:O[1]+u-d/2}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(p){var d=Hs(p,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(p){var d=Hs(p,2)[1];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"getDefaultAnchor",value:function(){var o=this,u=this.x,p=this.y,d=this.width,O=this.height;return this.points.map(function(_,j){var k=Hs(_,2),R=k[0],V=k[1];return{x:u+R-d/2,y:p+V-O/2,id:"".concat(o.id,"_").concat(j)}})}}])&&r_(e.prototype,r),a}(En),uv=su(zr.prototype,"points",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),su(zr.prototype,"pointsPosition",[s.m],Object.getOwnPropertyDescriptor(zr.prototype,"pointsPosition"),zr.prototype),su(zr.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(zr.prototype,"width"),zr.prototype),su(zr.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(zr.prototype,"height"),zr.prototype),zr);function Gs(t){return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gs(t)}function dv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function hv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dv(Object(r),!0).forEach(function(n){yv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function a_(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function u_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ws(){return Ws=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=s_(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Ws.apply(this,arguments)}function s_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Fo(t))!==null;);return t}function Zs(t,e){return Zs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Zs(t,e)}function l_(t){var e=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(r){return!1}}();return function(){var r,n=Fo(t);if(e){var a=Fo(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f_(this,r)}}function f_(t,e){if(e&&(Gs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lu(t)}function lu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fo(t)}function yv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vn,Js=(Vs=function(t){(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,t);var e,r,n=l_(a);function a(){var o;u_(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return yv(lu(o=n.call.apply(n,[this].concat(p))),"modelType",he.RECT_NODE),a_(lu(o),"radius",pv,lu(o)),o}return e=a,(r=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,p=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+p/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-p/2,y:u,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var o=Ws(Fo(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.rect;return hv(hv({},o),De(u))}}])&&c_(e.prototype,r),a}(En),pv=function(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}(Vs.prototype,"radius",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Vs);function Ks(t){return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ks(t)}function vv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function gv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vv(Object(r),!0).forEach(function(n){bv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function p_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $s(){return $s=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,r){var n=h_(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},$s.apply(this,arguments)}function h_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Xo(t))!==null;);return t}function Qs(t,e){return Qs=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Qs(t,e)}function y_(t){var e=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(r){return!1}}();return function(){var r,n=Xo(t);if(e){var a=Xo(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return v_(this,r)}}function v_(t,e){if(e&&(Ks(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mv(t)}function mv(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xo(t)}function bv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ov(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var qs=(Vn=function(t){(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&&Qs(o,u)})(a,t);var e,r,n=y_(a);function a(){var o;p_(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return bv(mv(o=n.call.apply(n,[this].concat(p))),"modelType",he.TEXT_NODE),o}return e=a,(r=[{key:"getTextStyle",value:function(){var o=$s(Xo(a.prototype),"getTextStyle",this).call(this),u=this.graphModel.theme.text;return gv(gv({},o),De(u))}},{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return Cc({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 Cc({rows:o,fontSize:u,rowsLength:o.length}).height}}])&&d_(e.prototype,r),a}(En),Ov(Vn.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(Vn.prototype,"width"),Vn.prototype),Ov(Vn.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(Vn.prototype,"height"),Vn.prototype),Vn);function tl(t){return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tl(t)}function g_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function el(t,e){return el=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},el(t,e)}function b_(t){var e=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(r){return!1}}();return function(){var r,n=fu(t);if(e){var a=fu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return O_(this,r)}}function O_(t,e){if(e&&(tl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _v(t)}function _v(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fu(t){return fu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fu(t)}function __(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vr,wv,xv,Ev,rl=function(t){(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&&el(o,u)})(a,t);var e,r,n=b_(a);function a(){var o;g_(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return __(_v(o=n.call.apply(n,[this].concat(p))),"modelType",he.HTML_NODE),o}return e=a,(r=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,p=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+p/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-p/2,y:u,id:"".concat(this.id,"_3")}]}}])&&m_(e.prototype,r),a}(En);function jv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function nl(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function w_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Sv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pi(t,e,r,n,a){var o={};return Object.keys(n).forEach(function(u){o[u]=n[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(u,p){return p(t,e,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(t,e,o),o=null),o}var Pv=(Vr=function(){function t(n){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),Sv(this,"graphModel",void 0),nl(this,"isShowHorizontal",wv,this),nl(this,"isShowVertical",xv,this),nl(this,"position",Ev,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=n}var e,r;return e=t,r=[{key:"getStyle",value:function(){return function(n){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?jv(Object(o),!0).forEach(function(u){Sv(n,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):jv(Object(o)).forEach(function(u){Object.defineProperty(n,u,Object.getOwnPropertyDescriptor(o,u))})}return n}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(n,a){for(var o=n.x,u=n.y,p=!1,d=!1,O=0;O<a.length;O++){var _=a[O];if(_.id!==n.id&&(o===_.x&&(p=!0),u===_.y&&(d=!0),p&&d))break}return{isShowVertical:p,isShowHorizontal:d,position:{x:o,y:u}}}},{key:"getHorizontalSnapline",value:function(n,a){var o,u,p=!1,d=n.id;if(d){var O=this.graphModel.fakerNode;if(O&&O.id===d)u=Ar(O);else{var _=this.graphModel.getNodeModelById(d);u=Ar(_)}}for(var j=0;j<a.length;j++){var k=a[j];if(k.id!==n.id){var R=Ar(k);if(R.minY===u.minY||R.maxY===u.minY){p=!0,o=u.minY;break}if(R.minY===u.maxY||R.maxY===u.maxY){p=!0,o=u.maxY;break}}}return fr({isShowHorizontal:p,position:{y:o}})}},{key:"getVerticalSnapline",value:function(n,a){var o,u,p=!1,d=n.id;if(d){var O=this.graphModel.fakerNode;if(O&&O.id===d)u=Ar(O);else{var _=this.graphModel.getNodeModelById(d);u=Ar(_)}}for(var j=0;j<a.length;j++){var k=a[j];if(k.id!==n.id){var R=Ar(k);if(R.minX===u.minX||R.maxX===u.minX){p=!0,o=u.minX;break}if(R.minX===u.maxX||R.maxX===u.maxX){p=!0,o=u.maxX;break}}}return fr({isShowVertical:p,position:{x:o}})}},{key:"getSnapLinePosition",value:function(n,a){var o=this.getCenterSnapLine(n,a),u=o.isShowHorizontal,p=o.isShowVertical;if(!u){var d=this.getHorizontalSnapline(n,a);d.isShowHorizontal&&(o.isShowHorizontal=d.isShowHorizontal,o.position.y=d.position.y)}if(!p){var O=this.getVerticalSnapline(n,a);O.isShowVertical&&(o.isShowVertical=O.isShowVertical,o.position.x=O.position.x)}return o}},{key:"setSnaplineInfo",value:function(n){var a=n.isShowHorizontal,o=n.isShowVertical,u=n.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(n){var a=this.graphModel.nodes,o=this.getSnapLinePosition(n,a);this.setSnaplineInfo(o)}}],r&&w_(e.prototype,r),t}(),wv=Pi(Vr.prototype,"isShowHorizontal",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xv=Pi(Vr.prototype,"isShowVertical",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ev=Pi(Vr.prototype,"position",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Pi(Vr.prototype,"clearSnapline",[s.k],Object.getOwnPropertyDescriptor(Vr.prototype,"clearSnapline"),Vr.prototype),Pi(Vr.prototype,"setNodeSnapLine",[s.k],Object.getOwnPropertyDescriptor(Vr.prototype,"setNodeSnapLine"),Vr.prototype),Vr),Ai=new Map,Av=function(t){var e=Bn(),r=window.requestAnimationFrame(function n(){if(t(),Ai.get(e)){var a=window.requestAnimationFrame(n);Ai.set(e,a)}});return Ai.set(e,r),e},pu=function(t){var e=Ai.get(t);e&&(window.cancelAnimationFrame(e),Ai.delete(t))};function ol(t){return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ol(t)}function ki(){return ki=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ki.apply(this,arguments)}function kv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function du(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kv(Object(r),!0).forEach(function(n){sn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function x_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Mv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Mv(r,n)}}(t,e)||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 Mv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function E_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function il(t,e){return il=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},il(t,e)}function j_(t){var e=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(r){return!1}}();return function(){var r,n=hu(t);if(e){var a=hu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return S_(this,r)}}function S_(t,e){if(e&&(ol(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cn(t)}function cn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hu(t){return hu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},hu(t)}function sn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var P_=function(t){(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,t);var e,r,n=j_(a);function a(){var o;return function(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}(this,a),sn(cn(o=n.call(this)),"preTargetNode",void 0),sn(cn(o),"sourceRuleResults",void 0),sn(cn(o),"targetRuleResults",void 0),sn(cn(o),"dragHandler",void 0),sn(cn(o),"t",void 0),sn(cn(o),"onDragStart",function(u){var p=u.event,d=o.props,O=d.anchorData,_=d.nodeModel,j=d.graphModel,k=j.overlapMode;j.selectNodeById(_.id),k!==Pr.INCREASE&&_.autoToFront&&j.toFront(_.id),j.eventCenter.emit(ee.ANCHOR_DRAGSTART,{data:O,e:p,nodeModel:_}),o.setState({startX:O.x,startY:O.y,endX:O.x,endY:O.y})}),sn(cn(o),"onDragging",function(u){var p=u.event,d=o.props,O=d.graphModel,_=d.nodeModel,j=d.anchorData,k=O.transformModel,R=O.eventCenter,V=O.width,W=O.height,ot=O.editConfigModel,nt=ot.autoExpand,dt=ot.stopMoveGraph,bt=p.clientX,kt=p.clientY,Et=O.getPointByClient({x:bt,y:kt}),Ft=Et.domOverlayPosition,Mt=Ft.x,Bt=Ft.y,Rt=Et.canvasOverlayPosition,le=Rt.x,Ee=Rt.y;o.t&&pu(o.t);var be=[];Mt<10?be=[10,0]:Mt+10>V?be=[-10,0]:Bt<10?be=[0,10]:Bt+10>W&&(be=[0,-10]),o.setState({endX:le,endY:Ee,dragging:!0}),o.moveAnchorEnd(le,Ee),be.length>0&&!dt&&nt&&(o.t=Av(function(){var Se=x_(be,2),Ue=Se[0],Ze=Se[1];k.translate(Ue,Ze);var yr=o.state,pn=yr.endX,Br=yr.endY;o.setState({endX:pn-Ue,endY:Br-Ze}),o.moveAnchorEnd(pn-Ue,Br-Ze)})),R.emit(ee.ANCHOR_DRAG,{data:j,e:p,nodeModel:_})}),sn(cn(o),"onDragEnd",function(u){var p=u.event;o.t&&pu(o.t),o.checkEnd(p),o.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),o.sourceRuleResults.clear(),o.targetRuleResults.clear();var d=o.props,O=d.graphModel,_=d.nodeModel,j=d.anchorData;O.eventCenter.emit(ee.ANCHOR_DRAGEND,{data:j,e:p,nodeModel:_})}),sn(cn(o),"checkEnd",function(u){var p=o.props,d=p.graphModel,O=p.nodeModel,_=p.anchorData,j=_.x,k=_.y,R=_.id,V=(d.edgeType,o.state),W=V.endX,ot=V.endY,nt=V.dragging,dt=Ca({x:W,y:ot},d);if(o.preTargetNode&&o.preTargetNode.state!==_e.DEFAULT&&o.preTargetNode.setElementState(_e.DEFAULT),nt&&dt&&dt.node){var bt=dt.node,kt=dt.anchor.id,Et="".concat(O.id,"_").concat(bt.id,"_").concat(kt,"_").concat(R),Ft=o.sourceRuleResults.get(Et)||{},Mt=Ft.isAllPass,Bt=Ft.msg,Rt=o.targetRuleResults.get(Et)||{},le=Rt.isAllPass,Ee=Rt.msg;if(Mt&&le){bt.setElementState(_e.DEFAULT);var be=d.edgeGenerator(O.getData(),d.getNodeModelById(dt.node.id).getData()),Se=d.addEdge(du(du({},be),{},{sourceNodeId:O.id,sourceAnchorId:R,startPoint:{x:j,y:k},targetNodeId:dt.node.id,targetAnchorId:dt.anchor.id,endPoint:{x:dt.anchor.x,y:dt.anchor.y}})),Ue=o.props.anchorData;d.eventCenter.emit(ee.ANCHOR_DROP,{data:Ue,e:u,nodeModel:O,edgeModel:Se})}else{var Ze=bt.getData();d.eventCenter.emit(ee.CONNECTION_NOT_ALLOWED,{data:Ze,msg:Ee||Bt})}}}),o.sourceRuleResults=new Map,o.targetRuleResults=new Map,o.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},o.dragHandler=new On({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd}),o}return e=a,(r=[{key:"getAnchorShape",value:function(){var o=this.props,u=o.anchorData,p=o.style,d=o.node.getAnchorShape(u);if(d)return d;var O=u.x,_=u.y,j=du(du({},p),p.hover);return Object(et.g)("g",null,Object(et.g)(Ei,ki({className:"lf-node-anchor-hover"},j,{x:O,y:_})),Object(et.g)(Ei,ki({className:"lf-node-anchor"},p,{x:O,y:_})))}},{key:"moveAnchorEnd",value:function(o,u){var p=this.props,d=p.graphModel,O=p.nodeModel,_=p.anchorData,j=Ca({x:o,y:u},d);if(j){var k=j.node,R=j.anchor.id;if(this.preTargetNode&&this.preTargetNode!==j.node&&this.preTargetNode.setElementState(_e.DEFAULT),_.id===R)return;this.preTargetNode=k;var V="".concat(O.id,"_").concat(k.id,"_").concat(R,"_").concat(_.id);if(!this.targetRuleResults.has(V)){var W=j.anchor,ot=O.isAllowConnectedAsSource(k,_,W),nt=k.isAllowConnectedAsTarget(O,_,W);this.sourceRuleResults.set(V,gi(ot)),this.targetRuleResults.set(V,gi(nt))}var dt=this.sourceRuleResults.get(V).isAllPass,bt=this.targetRuleResults.get(V).isAllPass;dt&&bt?k.setElementState(_e.ALLOW_CONNECT):k.setElementState(_e.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==_e.DEFAULT&&this.preTargetNode.setElementState(_e.DEFAULT)}},{key:"isShowLine",value:function(){var o=this.state,u=o.startX,p=o.startY,d=o.endX,O=o.endY;return rn(u,p,d,O)>10}},{key:"render",value:function(){var o=this,u=this.state,p=u.startX,d=u.startY,O=u.endX,_=u.endY,j=this.props,k=j.anchorData.edgeAddable,R=j.edgeStyle;return Object(et.g)("g",{className:"lf-anchor"},Object(et.g)("g",{onMouseDown:function(V){k!==!1&&o.dragHandler.handleMouseDown(V)}},this.getAnchorShape()),this.isShowLine()&&Object(et.g)(No,ki({x1:p,y1:d,x2:O,y2:_},R,{"pointer-events":"none"})))}}])&&E_(e.prototype,r),a}(et.a);i(80);function Tv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function A_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tv(Object(r),!0).forEach(function(n){k_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function k_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function al(t){return al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},al(t)}function M_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Dv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Dv(r,n)}}(t,e)||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 Dv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Nv(t){var e=t.x,r=e===void 0?0:e,n=t.y,a=n===void 0?0:n,o=t.value,u=t.fontSize,p=t.fill,d=p===void 0?"currentColor":p,O=t.overflowMode,_=O===void 0?"default":O,j=t.textWidth,k=j===void 0?"":j,R=t.model,V={textAnchor:"middle","dominant-baseline":"middle",x:r,y:a,fill:d};if(Object.entries(t).forEach(function(kt){var Et=M_(kt,2),Ft=Et[0],Mt=Et[1];al(Mt)!=="object"&&(V[Ft]=Mt)}),o){var W=String(o).split(/[\r\n]/g),ot=W.length;if(_!=="default"){var nt=R.BaseType,dt=R.modelType;if(nt===Xe.NODE&&dt!==he.TEXT_NODE||nt===Xe.EDGE&&k)return function(kt){var Et=kt.value,Ft=kt.fontSize,Mt=kt.model,Bt=kt.fontFamily,Rt=Bt===void 0?"":Bt,le=kt.lineHeight,Ee=kt.wrapPadding,be=Ee===void 0?"0, 0":Ee,Se=kt.overflowMode,Ue=kt.x,Ze=kt.y,yr=Mt.width,pn=Mt.textHeight,Br=kt.textWidth||yr,Go=String(Et).split(/[\r\n]/g),Lu=Go.length,zu=rh({rows:Go,style:{fontSize:"".concat(Ft,"px"),width:"".concat(Br,"px"),fontFamily:Rt,lineHeight:le,padding:be},rowsLength:Lu,className:"lf-get-text-height"}),lo=Mt.height>zu?Mt.height:zu;pn&&(lo=pn);var Wn=Se==="ellipsis";return Wn&&(lo=Ft+2),Object(et.g)("g",null,Object(et.g)("foreignObject",{width:Br,height:lo,x:Ue-Br/2,y:Ze-lo/2},Object(et.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:lo,width:Br,padding:be}},Object(et.g)("div",{className:Wn?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Wn?Go.join(""):"",style:A_({},kt)},Go.map(function(Zn){return Object(et.g)("div",{className:"lf-node-text--auto-wrap-inner"},Zn)})))))}(t)}if(ot>1){var bt=W.map(function(kt,Et){var Ft=(Et-(ot-1)/2)*(u+2);return Object(et.g)("tspan",{className:"lf-text-tspan",x:r,y:a+Ft},kt)});return Object(et.g)("text",V,bt)}return Object(et.g)("text",V,o)}}function ul(t){return ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ul(t)}function cl(){return cl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cl.apply(this,arguments)}function T_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Cv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Cv(r,n)}}(t,e)||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 Cv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function D_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sl(t,e){return sl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},sl(t,e)}function N_(t){var e=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(r){return!1}}();return function(){var r,n=yu(t);if(e){var a=yu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return C_(this,r)}}function C_(t,e){if(e&&(ul(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yn(t)}function Yn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yu(t){return yu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},yu(t)}function uo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Rv=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&sl(o,u)})(a,t);var e,r,n=N_(a);function a(o){var u;(function(d,O){if(!(d instanceof O))throw new TypeError("Cannot call a class as a function")})(this,a),uo(Yn(u=n.call(this)),"dragHandler",void 0),uo(Yn(u),"sumDeltaX",0),uo(Yn(u),"sumDeltaY",0),uo(Yn(u),"stepDrag",void 0),uo(Yn(u),"onDragging",function(d){var O=d.deltaX,_=d.deltaY,j=u.props,k=j.model,R=T_(j.graphModel.transformModel.fixDeltaXY(O,_),2),V=R[0],W=R[1];k.moveText(V,W)}),uo(Yn(u),"dblClickHandler",function(){u.props.editable&&u.props.model.setElementState(_e.TEXT_EDIT)}),uo(Yn(u),"mouseDownHandle",function(d){var O=u.props,_=O.draggable,j=O.model,k=O.graphModel.editConfigModel.nodeTextDraggable;(_||k)&&(u.stepDrag.model=j,u.stepDrag.handleMouseDown(d))}),o.model;var p=o.draggable;return u.stepDrag=new On({onDragging:u.onDragging,step:1,isStopPropagation:p}),u}return e=a,(r=[{key:"getShape",value:function(){var o=this.props,u=o.model,p=o.graphModel,d=u.text,O=p.editConfigModel,_=d.value,j=d.x,k=d.y,R=d.editable,V=d.draggable,W={x:j,y:k,className:"",value:_};R?W.className="lf-element-text":V||O.nodeTextDraggable?W.className="lf-text-draggable":W.className="lf-text-disabled";var ot=u.getTextStyle();return Object(et.g)(Nv,cl({},W,ot,{model:u}))}},{key:"render",value:function(){if(this.props.model.text)return Object(et.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&D_(e.prototype,r),a}(et.a),R_=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function ll(t){return ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ll(t)}function vu(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Iv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Iv(r,n)}}(t,e)||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 Iv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function fl(t,e){return fl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},fl(t,e)}function I_(t){var e=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(r){return!1}}();return function(){var r,n=gu(t);if(e){var a=gu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return L_(this,r)}}function L_(t,e){if(e&&(ll(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ar(t)}function ar(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gu(t){return gu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},gu(t)}function hr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jn=function(t){(function(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),p&&fl(u,p)})(o,t);var e,r,n,a=I_(o);function o(u){var p;(function(k,R){if(!(k instanceof R))throw new TypeError("Cannot call a class as a function")})(this,o),hr(ar(p=a.call(this)),"t",void 0),hr(ar(p),"moveOffset",void 0),hr(ar(p),"stepDrag",void 0),hr(ar(p),"contextMenuTime",void 0),hr(ar(p),"startTime",void 0),hr(ar(p),"clickTimer",void 0),hr(ar(p),"onDragStart",function(k){var R=k.event,V=R.clientX,W=R.clientY,ot=p.props,nt=ot.model,dt=ot.graphModel.getPointByClient({x:V,y:W}).canvasOverlayPosition,bt=dt.x,kt=dt.y;p.moveOffset={x:nt.x-bt,y:nt.y-kt}}),hr(ar(p),"onDragging",function(k){var R=k.event,V=p.props,W=V.model,ot=V.graphModel,nt=ot.editConfigModel,dt=nt.stopMoveGraph,bt=nt.autoExpand,kt=ot.transformModel,Et=ot.selectNodes,Ft=ot.width,Mt=ot.height,Bt=ot.gridSize;W.isDragging=!0;var Rt=R.clientX,le=R.clientY,Ee=ot.getPointByClient({x:Rt,y:le}).canvasOverlayPosition,be=Ee.x,Se=Ee.y,Ue=vu(kt.CanvasPointToHtmlPoint([be,Se]),2),Ze=Ue[0],yr=Ue[1];if(be+=p.moveOffset.x,Se+=p.moveOffset.y,be=zn(be,Bt),Se=zn(Se,Bt),Ft&&Mt){if(!bt||dt||!(Ze<0||yr<0||Ze>Ft||yr>Mt)){var pn=vu(kt.CanvasPointToHtmlPoint([be-W.width/2,Se-W.height/2]),2),Br=pn[0],Go=pn[1],Lu=vu(kt.CanvasPointToHtmlPoint([be+W.width/2,Se+W.height/2]),2),zu=Lu[0],lo=Lu[1],Wn=Math.max(Bt,20),Zn=[];Br<0?Zn=[Wn,0]:zu>ot.width?Zn=[-Wn,0]:Go<0?Zn=[0,Wn]:lo>ot.height&&(Zn=[0,-Wn]),p.t&&pu(p.t);var Bu=Et.map(function(Uu){return Uu.id});Bu.indexOf(W.id)===-1&&(Bu=[W.id]),Zn.length>0&&!dt&&bt?p.t=Av(function(){var Uu=vu(Zn,2),mg=Uu[0],bg=Uu[1];kt.translate(mg,bg);var Sw=-mg/kt.SCALE_X,Pw=-bg/kt.SCALE_X;ot.moveNodes(Bu,Sw,Pw)}):ot.moveNodes(Bu,be-W.x,Se-W.y)}}else ot.moveNode2Coordinate(W.id,be,Se)}),hr(ar(p),"onDragEnd",function(){p.t&&pu(p.t),p.props.model.isDragging=!1}),hr(ar(p),"handleClick",function(k){if(p.startTime&&!(new Date().getTime()-p.startTime>200)){var R=p.props,V=R.model,W=R.graphModel,ot={data:V.getData(),e:k,position:W.getPointByClient({x:k.clientX,y:k.clientY}),isSelected:!1,isMultiple:!1},nt=k.button===2,dt=k.detail===2;if(!nt){var bt=W.editConfigModel,kt=Ad(k,bt);ot.isMultiple=kt,V.isSelected&&!dt&&kt?(ot.isSelected=!1,V.setSelected(!1)):(W.selectNodeById(V.id,kt),ot.isSelected=!0,p.toFront()),dt?(bt.nodeTextEdit&&V.text.editable&&(V.setSelected(!1),W.setElementStateById(V.id,_e.TEXT_EDIT)),W.eventCenter.emit(ee.NODE_DBCLICK,ot)):(W.eventCenter.emit(ee.ELEMENT_CLICK,ot),W.eventCenter.emit(ee.NODE_CLICK,ot))}}}),hr(ar(p),"handleContextMenu",function(k){k.preventDefault();var R=p.props,V=R.model,W=R.graphModel,ot=V.getData(),nt=W.getPointByClient({x:k.clientX,y:k.clientY});W.setElementStateById(V.id,_e.SHOW_MENU,nt.domOverlayPosition),V.isSelected||W.selectNodeById(V.id),W.eventCenter.emit(ee.NODE_CONTEXTMENU,{data:ot,e:k,position:nt}),p.toFront()}),hr(ar(p),"handleMouseDown",function(k){var R=p.props,V=R.model,W=R.graphModel;p.startTime=new Date().getTime(),W.editConfigModel.adjustNodePosition&&V.draggable&&p.stepDrag&&p.stepDrag.handleMouseDown(k)}),hr(ar(p),"setHoverON",function(k){var R=p.props,V=R.model,W=R.graphModel;if(!V.isHovered){var ot=V.getData();V.setHovered(!0),W.eventCenter.emit(ee.NODE_MOUSEENTER,{data:ot,e:k})}}),hr(ar(p),"setHoverOFF",function(k){var R=p.props,V=R.model,W=R.graphModel,ot=V.getData();V.isHovered&&(V.setHovered(!1),W.eventCenter.emit(ee.NODE_MOUSELEAVE,{data:ot,e:k}))}),hr(ar(p),"onMouseOut",function(k){R_&&p.setHoverOFF(k)});var d=u.graphModel,O=d.gridSize,_=d.eventCenter,j=u.model;return p.stepDrag=new On({onDragStart:p.onDragStart,onDragging:p.onDragging,onDragEnd:p.onDragEnd,step:O,eventType:"NODE",isStopPropagation:!1,eventCenter:_,model:j}),p}return e=o,n=[{key:"getModel",value:function(u){return u}}],(r=[{key:"getAnchorShape",value:function(u){return null}},{key:"getAnchors",value:function(){var u=this,p=this.props,d=p.model,O=p.graphModel,_=d.isSelected,j=d.isHitable,k=d.isDragging,R=d.isShowAnchor;return j&&(_||R)&&!k?Ma(d.anchors,function(V,W){var ot=d.getAnchorLineStyle(V),nt=d.getAnchorStyle(V);return Object(et.g)(P_,{anchorData:V,node:u,style:nt,edgeStyle:ot,anchorIndex:W,nodeModel:d,graphModel:O,setHoverOFF:u.setHoverOFF})}):[]}},{key:"getText",value:function(){var u=this.props,p=u.model,d=u.graphModel;if(p.state===_e.TEXT_EDIT)return"";if(p.text){var O=d.editConfigModel,_=!1;return(p.text.draggable||O.nodeTextDraggable)&&(_=!0),Object(et.g)(Rv,{editable:O.nodeTextEdit&&p.text.editable,model:p,graphModel:d,draggable:_})}}},{key:"getStateClassName",value:function(){var u=this.props.model,p=u.state,d=u.isDragging,O=u.isSelected,_="lf-node";switch(p){case _e.ALLOW_CONNECT:_+=" lf-node-allow";break;case _e.NOT_ALLOW_CONNECT:_+=" lf-node-not-allow";break;default:_+=" lf-node-default"}return d&&(_+=" lf-isDragging"),O&&(_+=" lf-node-selected"),_}},{key:"toFront",value:function(){var u=this.props,p=u.model,d=u.graphModel;d.overlapMode!==Pr.INCREASE&&p.autoToFront&&d.toFront(p.id)}},{key:"render",value:function(){var u,p=this.props,d=p.model,O=p.graphModel,_=O.editConfigModel,j=_.hideAnchors,k=_.adjustNodePosition,R=O.gridSize,V=O.transformModel.SCALE_X,W=d.isHitable,ot=d.draggable,nt=Object(et.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),j?null:this.getAnchors());return W?(k&&ot&&this.stepDrag.setStep(R*V),u=Object(et.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},nt)):u=Object(et.g)("g",{className:this.getStateClassName()},nt),u}}])&&Lv(e.prototype,r),n&&Lv(e,n),o}(et.a);function pl(t){return pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pl(t)}function dl(){return dl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dl.apply(this,arguments)}function z_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function hl(t,e){return hl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},hl(t,e)}function U_(t){var e=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(r){return!1}}();return function(){var r,n=mu(t);if(e){var a=mu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return H_(this,r)}}function H_(t,e){if(e&&(pl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function mu(t){return mu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},mu(t)}var yl=function(t){(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,t);var e,r,n=U_(a);function a(){return z_(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(et.g)(Fn,dl({},u,{x:o.x,y:o.y,width:o.width,height:o.height,radius:o.radius}))}}])&&B_(e.prototype,r),a}(jn);function vl(t){return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vl(t)}function gl(){return gl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},gl.apply(this,arguments)}function F_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ml(t,e){return ml=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},ml(t,e)}function V_(t){var e=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(r){return!1}}();return function(){var r,n=bu(t);if(e){var a=bu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Y_(this,r)}}function Y_(t,e){if(e&&(vl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function bu(t){return bu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},bu(t)}var bl=function(t){(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&&ml(o,u)})(a,t);var e,r,n=V_(a);function a(){return F_(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,p=o.y,d=o.r,O=o.getNodeStyle();return Object(et.g)(Ei,gl({},O,{x:u,y:p,r:d}))}}])&&X_(e.prototype,r),a}(jn);function Ol(t){return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ol(t)}function G_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return zv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return zv(r,n)}}(t,e)||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 zv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Bv(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach(function(a){var o=G_(a,2),u=o[0],p=o[1];Ol(p)!=="object"&&(n[u]=p)}),n.className=r?"lf-basic-shape ".concat(r):"lf-basic-shape",n.points=e.map(function(a){return a.join(",")}).join(" "),Object(et.g)("polygon",n)}function _l(t){return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_l(t)}function wl(){return wl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},wl.apply(this,arguments)}function W_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xl(t,e){return xl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},xl(t,e)}function J_(t){var e=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(r){return!1}}();return function(){var r,n=Ou(t);if(e){var a=Ou(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return K_(this,r)}}function K_(t,e){if(e&&(_l(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Ou(t){return Ou=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ou(t)}var El=function(t){(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&&xl(o,u)})(a,t);var e,r,n=J_(a);function a(){return W_(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,p=o.y,d=o.width,O=o.height,_=o.points,j=o.getNodeStyle(),k={transform:"matrix(1 0 0 1 ".concat(u-d/2," ").concat(p-O/2,")")};return Object(et.g)("g",k,Object(et.g)(Bv,wl({},j,{points:_,x:u,y:p})))}}])&&Z_(e.prototype,r),a}(jn);function jl(t){return jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jl(t)}function Sl(){return Sl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Sl.apply(this,arguments)}function $_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pl(t,e){return Pl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Pl(t,e)}function q_(t){var e=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(r){return!1}}();return function(){var r,n=_u(t);if(e){var a=_u(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return t1(this,r)}}function t1(t,e){if(e&&(jl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function _u(t){return _u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_u(t)}var Al=function(t){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Pl(o,u)})(a,t);var e,r,n=q_(a);function a(){return $_(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(et.g)("g",null,Object(et.g)(Bv,Sl({},u,{points:o.points,x:o.x,y:o.y})))}}])&&Q_(e.prototype,r),a}(jn);function kl(t){return kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kl(t)}function e1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Uv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Uv(r,n)}}(t,e)||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 Uv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function r1(t){var e=t.x,r=e===void 0?0:e,n=t.y,a=n===void 0?0:n,o=t.rx,u=o===void 0?4:o,p=t.ry,d=p===void 0?4:p,O=t.className,_={cx:r,cy:a,rx:u,ry:d,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(function(j){var k=e1(j,2),R=k[0],V=k[1];kl(V)!=="object"&&(_[R]=V)}),_.className=O?"lf-basic-shape ".concat(O):"lf-basic-shape",Object(et.g)("ellipse",_)}function Ml(t){return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ml(t)}function Tl(){return Tl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Tl.apply(this,arguments)}function n1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Dl(t,e){return Dl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Dl(t,e)}function i1(t){var e=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(r){return!1}}();return function(){var r,n=wu(t);if(e){var a=wu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return a1(this,r)}}function a1(t,e){if(e&&(Ml(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function wu(t){return wu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wu(t)}var Nl=function(t){(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,t);var e,r,n=i1(a);function a(){return n1(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(et.g)(r1,Tl({},u,{x:o.x,y:o.y,rx:o.rx,ry:o.ry}))}}])&&o1(e.prototype,r),a}(jn);function Cl(t){return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cl(t)}function Hv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Fv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hv(Object(r),!0).forEach(function(n){u1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function u1(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Rl(t,e){return Rl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Rl(t,e)}function l1(t){var e=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(r){return!1}}();return function(){var r,n=xu(t);if(e){var a=xu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return f1(this,r)}}function f1(t,e){if(e&&(Cl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function xu(t){return xu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xu(t)}var Il=function(t){(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&&Rl(o,u)})(a,t);var e,r,n=l1(a);function a(){return c1(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getBackground",value:function(){var o=this.props.model,u=o.getTextStyle(),p=o.width,d=o.height,O=o.x,_=o.y,j=Fv(Fv({},u.background),{},{x:O,y:_-1,width:p,height:d});return Object(et.g)(Fn,j)}},{key:"getShape",value:function(){return Object(et.g)("g",null,this.getBackground())}}])&&s1(e.prototype,r),a}(jn);function Ll(t){return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ll(t)}function zl(){return zl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zl.apply(this,arguments)}function p1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Bl(t,e){return Bl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Bl(t,e)}function h1(t){var e=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(r){return!1}}();return function(){var r,n=Eu(t);if(e){var a=Eu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return y1(this,r)}}function y1(t,e){if(e&&(Ll(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mi(t)}function Mi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Eu(t){return Eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Eu(t)}function ju(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ul=function(t){(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,t);var e,r,n=h1(a);function a(){var o;p1(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return ju(Mi(o=n.call.apply(n,[this].concat(p))),"ref",void 0),ju(Mi(o),"currentProperties",void 0),ju(Mi(o),"preProperties",void 0),ju(Mi(o),"setRef",function(O){o.ref=O}),o}return e=a,(r=[{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,p=o.y,d=o.height,O=o.width,_=o.getNodeStyle();return this.currentProperties=JSON.stringify(o.properties),Object(et.g)("foreignObject",zl({},_,{x:u-O/2,y:p-d/2,width:O,height:d,ref:this.setRef}))}}])&&d1(e.prototype,r),a}(jn);function Hl(t){return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hl(t)}function Fl(){return Fl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fl.apply(this,arguments)}function Xv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function co(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xv(Object(r),!0).forEach(function(n){Yl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xl(t,e){return Xl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Xl(t,e)}function g1(t){var e=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(r){return!1}}();return function(){var r,n=Su(t);if(e){var a=Su(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return m1(this,r)}}function m1(t,e){if(e&&(Hl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vl(t)}function Vl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Su(t){return Su=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Su(t)}function Yl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ln,b1=function(t){(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&&Xl(o,u)})(a,t);var e,r,n=g1(a);function a(o){var u;return function(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}(this,a),Yl(Vl(u=n.call(this,o)),"setHoverON",function(){u.setState({isHovered:!0})}),Yl(Vl(u),"setHoverOFF",function(){u.setState({isHovered:!1})}),u.state={isHovered:!1},u}return e=a,(r=[{key:"getBackground",value:function(){var o=this.props.model,u=o.getTextStyle(),p=o.text,d=o.width,O=u.background||{};if(this.state.isHovered&&u.hover&&u.hover.background&&(O=co(co({},O),u.hover.background)),p&&p.value&&O.fill!=="transparent"){var _,j=u.fontSize,k=u.overflowMode,R=u.lineHeight,V=u.wrapPadding,W=u.textWidth,ot=p.value,nt=p.x,dt=p.y,bt=String(ot).split(/[\r\n]/g),kt=bt.length;if(k==="autoWrap"&&W){var Et=rh({rows:bt,style:{fontSize:"".concat(j,"px"),width:"".concat(W,"px"),lineHeight:R,padding:V},rowsLength:kt,className:"lf-get-text-height"});_=co(co({},O),{},{x:nt-1,y:dt-1,width:W,height:Et})}else{bt&&bt.forEach(function(le){jh(le)});var Ft=Cc({rows:bt,fontSize:j,rowsLength:kt}),Mt=Ft.width,Bt=Ft.height;if(k==="ellipsis"&&(Mt=W||d,Bt=j+2),typeof O.wrapPadding=="string"){var Rt=O.wrapPadding.split(",").filter(function(le){return le.trim()}).map(function(le){return parseFloat(le.trim())});Rt.length>0&&Rt.length<=4&&(Rt.length===1?Rt=[Rt[0],Rt[0],Rt[0],Rt[0]]:Rt.length===2?Rt=[Rt[0],Rt[1],Rt[0],Rt[1]]:Rt.length===3&&(Rt=[Rt[0],Rt[1],Rt[2],Rt[1]]),Mt+=Rt[1]+Rt[3],Bt+=Rt[0]+Rt[2],nt+=(Rt[1]-Rt[3])/2,dt+=(Rt[2]-Rt[0])/2)}_=co(co({},O),{},{x:nt-1,y:dt-1,width:Mt,height:Bt})}return Object(et.g)(Fn,_)}}},{key:"getShape",value:function(){var o=this.props.model,u=o.text,p=u.value,d=u.x,O=u.y;if(p){var _=co({x:d,y:O,className:"lf-element-text",value:p},o.getTextStyle());return Object(et.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(et.g)(Nv,Fl({},_,{model:o})))}}}])&&v1(e.prototype,r),a}(Rv);function Gl(t){return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gl(t)}function Vv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Sn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vv(Object(r),!0).forEach(function(n){Mr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function O1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Yv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Yv(r,n)}}(t,e)||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 Yv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wl(t,e){return Wl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Wl(t,e)}function w1(t){var e=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(r){return!1}}();return function(){var r,n=Pu(t);if(e){var a=Pu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return x1(this,r)}}function x1(t,e){if(e&&(Gl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kr(t)}function kr(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pu(t){return Pu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Pu(t)}function Mr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ln||(ln={}));var Gv=function(t){(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,t);var e,r,n=w1(a);function a(o){var u;(function(_,j){if(!(_ instanceof j))throw new TypeError("Cannot call a class as a function")})(this,a),Mr(kr(u=n.call(this)),"stepDragData",void 0),Mr(kr(u),"stepDrag",void 0),Mr(kr(u),"oldEdge",void 0),Mr(kr(u),"preTargetNode",void 0),Mr(kr(u),"targetRuleResults",void 0),Mr(kr(u),"sourceRuleResults",void 0),Mr(kr(u),"handleMouseDown",function(_){u.stepDrag&&u.stepDrag.handleMouseDown(_)}),Mr(kr(u),"onDragStart",function(){var _=u.props,j=_.x,k=_.y,R=_.edgeModel,V=R.startPoint,W=R.endPoint,ot=R.pointsList;u.oldEdge={startPoint:V,endPoint:W,pointsList:ot},u.setState({endX:j,endY:k,dragging:!0})}),Mr(kr(u),"onDragging",function(_){var j=_.deltaX,k=_.deltaY,R=u.state,V=R.endX,W=R.endY,ot=u.props,nt=ot.graphModel,dt=ot.type,bt=nt.transformModel,kt=nt.editConfigModel,Et=O1(bt.moveCanvasPointByHtml([V,W],j,k),2),Ft=Et[0],Mt=Et[1];u.setState({endX:Ft,endY:Mt,dragging:!0});var Bt=u.props.edgeModel,Rt=Ca({x:V,y:W},nt);if(Rt&&Rt.node&&u.isAllowAdjust(Rt).pass){var le,Ee=Bt.startPoint,be=Bt.endPoint,Se=Bt.sourceNode,Ue=Bt.targetNode;dt===ln.SOURCE?le={startPoint:{x:Rt.anchor.x,y:Rt.anchor.y},endPoint:{x:be.x,y:be.y},sourceNode:Rt.node,targetNode:Ue}:dt===ln.TARGET&&(le={startPoint:{x:Ee.x,y:Ee.y},endPoint:{x:Rt.anchor.x,y:Rt.anchor.y},sourceNode:Se,targetNode:Rt.node}),Bt.updateAfterAdjustStartAndEnd(le)}else dt===ln.SOURCE?Bt.updateStartPoint({x:Ft,y:Mt}):dt===ln.TARGET&&Bt.updateEndPoint({x:Ft,y:Mt});Bt.text.value&&kt.adjustEdge&&Bt.setText(Object.assign({},Bt.text,Bt.textPosition))}),Mr(kr(u),"onDragEnd",function(_){var j=_.event;try{var k;u.setState({dragging:!1});var R=u.props,V=R.graphModel,W=R.edgeModel,ot=R.type,nt=u.state,dt=nt.endX,bt=nt.endY,kt=nt.dragging,Et=Ca({x:dt,y:bt},V);if(!kt)return;var Ft,Mt=!1;if(Et&&Et.node){var Bt=u.isAllowAdjust(Et),Rt=Bt.pass,le=Bt.msg,Ee=Bt.newTargetNode;if(Rt){var be,Se=W.getData();Ft=Sn(Sn({},Se),{},{sourceAnchorId:"",targetAnchorId:"",text:(Se==null||(be=Se.text)===null||be===void 0?void 0:be.value)||""}),ot===ln.SOURCE?(Ft=Sn(Sn({},V.edgeGenerator(V.getNodeModelById(Et.node.id).getData(),V.getNodeModelById(W.targetNodeId).getData(),Ft)),{},{sourceNodeId:Et.node.id,sourceAnchorId:Et.anchor.id,startPoint:{x:Et.anchor.x,y:Et.anchor.y},targetNodeId:W.targetNodeId,endPoint:Sn({},W.endPoint)}),W.sourceNodeId===Et.node.id&&W.sourceAnchorId===Et.anchor.id&&(Mt=!0)):ot===ln.TARGET&&(Ft=Sn(Sn({},V.edgeGenerator(V.getNodeModelById(W.sourceNodeId).getData(),V.getNodeModelById(Et.node.id).getData(),Ft)),{},{sourceNodeId:W.sourceNodeId,startPoint:Sn({},W.startPoint),targetNodeId:Et.node.id,targetAnchorId:Et.anchor.id,endPoint:{x:Et.anchor.x,y:Et.anchor.y}}),W.targetNodeId===Et.node.id&&W.targetAnchorId===Et.anchor.id&&(Mt=!0))}else{Mt=!0;var Ue=Ee.getData();V.eventCenter.emit(ee.CONNECTION_NOT_ALLOWED,{data:Ue,msg:le})}}else Mt=!0;if(Mt)u.recoveryEdge();else{var Ze=W.getData();V.deleteEdgeById(W.id);var yr=V.addEdge(Sn({},Ft));V.eventCenter.emit(ee.EDGE_EXCHANGE_NODE,{data:{newEdge:yr.getData(),oldEdge:Ze}})}(k=u.preTargetNode)===null||k===void 0||k.setElementState(_e.DEFAULT)}finally{u.props.graphModel.eventCenter.emit(ee.ADJUST_POINT_DRAGEND,{e:j,data:u.stepDragData})}}),Mr(kr(u),"recoveryEdge",function(){var _=u.props.edgeModel,j=u.oldEdge,k=j.startPoint,R=j.endPoint,V=j.pointsList;_.updateStartPoint(k),_.updateEndPoint(R),_.modelType!==he.LINE_EDGE&&(_.pointsList=V,_.initPoints())}),Mr(kr(u),"getAdjustPointStyle",function(){var _=u.props,j=_.graphModel.theme;return _.edgeModel,j.edgeAdjust}),u.state={dragging:!1,endX:0,endY:0},u.targetRuleResults=new Map,u.sourceRuleResults=new Map;var p=o.type,d=o.edgeModel,O=o.graphModel.eventCenter;return u.stepDragData={type:p,edgeData:d.getData()},u.stepDrag=new On({onDragStart:u.onDragStart,onDragging:u.onDragging,onDragEnd:u.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:O,data:u.stepDragData}),u}return e=a,(r=[{key:"isAllowAdjust",value:function(o){var u=this.props,p=u.edgeModel,d=p.id,O=p.sourceNode,_=p.targetNode,j=p.sourceAnchorId,k=p.targetAnchorId,R=u.type,V=null,W=null,ot=null,nt=null;if(R===ln.SOURCE?(V=o.node,W=_,ot=o.anchor,nt=_.getAnchorInfo(k)):(V=O,W=o.node,nt=o.anchor,ot=O.getAnchorInfo(j)),this.preTargetNode&&this.preTargetNode!==o.node&&this.preTargetNode.setElementState(_e.DEFAULT),this.preTargetNode=o.node,nt.id===ot.id)return{pass:!1,msg:"",newTargetNode:W};var dt="".concat(V.id,"_").concat(W.id,"_").concat(ot.id,"_").concat(nt.id);if(!this.targetRuleResults.has(dt)){var bt=V.isAllowConnectedAsSource(W,ot,nt,d),kt=W.isAllowConnectedAsTarget(V,ot,nt,d);this.sourceRuleResults.set(dt,gi(bt)),this.targetRuleResults.set(dt,gi(kt))}var Et=this.sourceRuleResults.get(dt),Ft=Et.isAllPass,Mt=Et.msg,Bt=this.targetRuleResults.get(dt),Rt=Bt.isAllPass,le=Bt.msg,Ee=Ft&&Rt?_e.ALLOW_CONNECT:_e.NOT_ALLOW_CONNECT;return R===ln.SOURCE?V.setElementState(Ee):W.setElementState(Ee),{pass:Ft&&Rt,msg:le||Mt,newTargetNode:W}}},{key:"render",value:function(){var o=this.props,u=o.x,p=o.y,d=o.getAdjustPointShape,O=o.edgeModel,_=this.state.dragging;return Object(et.g)("g",{pointerEvents:_?"none":"",onMouseDown:this.handleMouseDown},_?"":d(u,p,O))}}])&&_1(e.prototype,r),a}(et.a);function Zl(t){return Zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zl(t)}function Ti(){return Ti=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ti.apply(this,arguments)}function E1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Wv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Wv(r,n)}}(t,e)||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 Wv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function j1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jl(t,e){return Jl=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Jl(t,e)}function P1(t){var e=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(r){return!1}}();return function(){var r,n=Au(t);if(e){var a=Au(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return A1(this,r)}}function A1(t,e){if(e&&(Zl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yr(t)}function Yr(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Au(t){return Au=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Au(t)}function fn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Di=function(t){(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,t);var e,r,n=P1(a);function a(){var o;j1(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return fn(Yr(o=n.call.apply(n,[this].concat(p))),"startTime",void 0),fn(Yr(o),"contextMenuTime",void 0),fn(Yr(o),"clickTimer",void 0),fn(Yr(o),"textRef",Object(et.f)()),fn(Yr(o),"handleHover",function(O,_){var j=o.props,k=j.model,R=j.graphModel.eventCenter;k.setHovered(O);var V=O?ee.EDGE_MOUSEENTER:ee.EDGE_MOUSELEAVE,W=k.getData();R.emit(V,{data:W,e:_})}),fn(Yr(o),"setHoverON",function(O){o.props.model.isHovered||(o.textRef&&o.textRef.current&&o.textRef.current.setHoverON(),o.handleHover(!0,O))}),fn(Yr(o),"setHoverOFF",function(O){o.props.model.isHovered&&(o.textRef&&o.textRef.current&&o.textRef.current.setHoverOFF(),o.handleHover(!1,O))}),fn(Yr(o),"handleContextMenu",function(O){O.preventDefault(),o.contextMenuTime=new Date().getTime(),o.clickTimer&&clearTimeout(o.clickTimer);var _=o.props,j=_.model,k=_.graphModel,R=k.getPointByClient({x:O.clientX,y:O.clientY});k.setElementStateById(j.id,_e.SHOW_MENU,R.domOverlayPosition),o.toFront(),j.isSelected||k.selectEdgeById(j.id);var V=j==null?void 0:j.getData();k.eventCenter.emit(ee.EDGE_CONTEXTMENU,{data:V,e:O,position:R})}),fn(Yr(o),"handleMouseDown",function(O){O.stopPropagation(),o.startTime=new Date().getTime()}),fn(Yr(o),"handleMouseUp",function(O){if(o.startTime&&!(new Date().getTime()-o.startTime>200||O.button===2)){var _=O.detail===2,j=o.props,k=j.model,R=j.graphModel,V=k==null?void 0:k.getData(),W=R.getPointByClient({x:O.clientX,y:O.clientY});if(_){var ot=R.editConfigModel,nt=R.textEditElement;if(nt&&nt.id===k.id&&R.setElementStateById(k.id,_e.DEFAULT),ot.edgeTextEdit&&k.text.editable&&R.setElementStateById(k.id,_e.TEXT_EDIT),k.modelType===he.POLYLINE_EDGE){var dt=k,bt=R.getPointByClient({x:O.x,y:O.y}).canvasOverlayPosition,kt=bt.x,Et=bt.y,Ft=Ah({x:kt,y:Et},dt.points);dt.dbClickPosition=Ft}R.eventCenter.emit(ee.EDGE_DBCLICK,{data:V,e:O,position:W})}else R.eventCenter.emit(ee.ELEMENT_CLICK,{data:V,e:O,position:W}),R.eventCenter.emit(ee.EDGE_CLICK,{data:V,e:O,position:W});var Mt=R.editConfigModel;R.selectEdgeById(k.id,Ad(O,Mt)),o.toFront()}}),o}return e=a,(r=[{key:"getShape",value:function(){return Object(et.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,u=o.model,p=o.graphModel;if(u.state===_e.TEXT_EDIT)return null;var d=!1,O=p.editConfigModel;return(u.text.draggable||O.edgeTextDraggable)&&(d=!0),Object(et.g)(b1,{ref:this.textRef,editable:O.edgeTextEdit&&u.text.editable,model:u,graphModel:p,draggable:d})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.startPoint,p=o.endPoint,d=o.isSelected;return{start:u,end:p,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,p=o.getArrowStyle(),d=p.refY,O=d===void 0?0:d,_=p.refX,j=_===void 0?2:_,k=E1(this.getLastTwoPoints(),2),R=k[0],V=k[1],W="auto";return R!==null&&V!==null&&(W=O0({x:V.x-R.x,y:V.y-R.y,z:0})*(180/Math.PI)),Object(et.g)("g",null,Object(et.g)("defs",null,Object(et.g)("marker",{id:"marker-start-".concat(u),refX:-j,refY:O,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(et.g)("marker",{id:"marker-end-".concat(u),refX:j,refY:O,overflow:"visible",orient:W,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var o=this.props.model.getArrowStyle();return o.stroke,o.strokeWidth,o.offset,o.verticalLength,Object(et.g)("path",null)}},{key:"getEndArrow",value:function(){var o=this.props.model.getArrowStyle(),u=o.stroke,p=o.strokeWidth,d=o.offset,O=o.verticalLength;return Object(et.g)("path",{stroke:u,fill:u,strokeWidth:p,transform:"rotate(180)",d:"M 0 0 L ".concat(d," -").concat(O," L ").concat(d," ").concat(O," Z")})}},{key:"getAdjustPointShape",value:function(o,u,p){var d=p.getAdjustPointStyle();return Object(et.g)(Ei,Ti({className:"lf-edge-adjust-point"},d,{x:o,y:u}))}},{key:"getAdjustPoints",value:function(){var o=this.props,u=o.model,p=o.graphModel,d=u.getAdjustStart(),O=u.getAdjustEnd();return Object(et.g)("g",null,Object(et.g)(Gv,Ti({type:"SOURCE"},d,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:p})),Object(et.g)(Gv,Ti({type:"TARGET"},O,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:p})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(et.g)("g",null)}},{key:"getAppend",value:function(){return Object(et.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,p=o.model;u.overlapMode!==Pr.INCREASE&&u.toFront(p.id)}},{key:"render",value:function(){var o=this.props,u=o.model,p=u.isSelected,d=u.isHitable,O=u.isShowAdjustPoint;return o.graphModel.animation,Object(et.g)("g",null,Object(et.g)("g",{className:["lf-edge",!d&&"pointer-none",p&&"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()),O&&p?this.getAdjustPoints():"")}}])&&S1(e.prototype,r),a}(et.a);function Kl(t){return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kl(t)}function k1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Zv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Zv(r,n)}}(t,e)||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 Zv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ni=function(t){var e={d:""};return Object.entries(t).forEach(function(r){var n=k1(r,2),a=n[0],o=n[1],u=Kl(o);a!=="style"&&u==="object"||(e[a]=o)}),Object(et.g)("path",e)};function $l(t){return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$l(t)}function Ql(){return Ql=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ql.apply(this,arguments)}function M1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ql(t,e){return ql=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},ql(t,e)}function D1(t){var e=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(r){return!1}}();return function(){var r,n=ku(t);if(e){var a=ku(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return N1(this,r)}}function N1(t,e){if(e&&($l(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ku(t){return ku=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ku(t)}var tf=function(t){(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&&ql(o,u)})(a,t);var e,r,n=D1(a);function a(){return M1(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getEdge",value:function(){var o=this.props.model,u=o.startPoint,p=o.endPoint,d=o.isAnimation,O=o.arrowConfig,_=o.getEdgeStyle(),j=o.getEdgeAnimationStyle(),k=j.strokeDasharray,R=j.stroke,V=j.strokeDashoffset,W=j.animationName,ot=j.animationDuration,nt=j.animationIterationCount,dt=j.animationTimingFunction,bt=j.animationDirection;return Object(et.g)(No,Ql({},_,{x1:u.x,y1:u.y,x2:p.x,y2:p.y},O,d?{strokeDasharray:k,stroke:R,style:{strokeDashoffset:V,animationName:W,animationDuration:ot,animationIterationCount:nt,animationTimingFunction:dt,animationDirection:bt}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model,u=function(k){var R,V=k.start,W=k.end;if(V.x===W.x&&V.y===W.y)R="";else{var ot={start:V,end:W,offset:10,verticalLength:5},nt=Oi(Ra(Ra({},ot),{},{type:"start"})),dt=Oi(Ra(Ra({},ot),{},{type:"end"}));R="M".concat(nt.leftX," ").concat(nt.leftY,` 
    L`).concat(nt.rightX," ").concat(nt.rightY,` 
    L`).concat(dt.rightX," ").concat(dt.rightY,`
    L`).concat(dt.leftX," ").concat(dt.leftY," z")}return{d:R,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:o.startPoint,end:o.endPoint}),p=u.d,d=u.strokeWidth,O=u.fill,_=u.strokeDasharray,j=u.stroke;return Object(et.g)(Ni,{d:p,fill:O,strokeWidth:d,stroke:j,strokeDasharray:_})}}])&&T1(e.prototype,r),a}(Di);function ef(t){return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ef(t)}function C1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Jv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Jv(r,n)}}(t,e)||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 Jv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var R1=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach(function(r){var n=C1(r,2),a=n[0],o=n[1];(a==="style"||ef(o)!=="object")&&(e[a]=o)}),Object(et.g)("polyline",e)};function rf(t){return rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rf(t)}function Kv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Mu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kv(Object(r),!0).forEach(function(n){An(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nf(){return nf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nf.apply(this,arguments)}function I1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return $v(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return $v(r,n)}}(t,e)||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 $v(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function L1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function of(t,e){return of=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},of(t,e)}function z1(t){var e=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(r){return!1}}();return function(){var r,n=Tu(t);if(e){var a=Tu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return B1(this,r)}}function B1(t,e){if(e&&(rf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pn(t)}function Pn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tu(t){return Tu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tu(t)}function An(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var af=function(t){(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&&of(o,u)})(a,t);var e,r,n=z1(a);function a(){var o;return function(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}(this,a),An(Pn(o=n.call(this)),"drag",void 0),An(Pn(o),"isDragging",void 0),An(Pn(o),"isShowAdjustPointTemp",void 0),An(Pn(o),"appendInfo",void 0),An(Pn(o),"onDragStart",function(){var u=o.props.model;u.dragAppendStart(),o.isShowAdjustPointTemp=u.isShowAdjustPoint,u.isShowAdjustPoint=!1}),An(Pn(o),"onDragging",function(u){var p=u.deltaX,d=u.deltaY,O=o.props,_=O.model,j=O.graphModel;o.isDragging=!0;var k=j.transformModel,R=j.editConfigModel,V=I1(k.fixDeltaXY(p,d),2),W=V[0],ot=V[1],nt=_,dt=R.adjustEdgeMiddle;o.appendInfo=dt?nt.dragAppendSimple(o.appendInfo,{x:W,y:ot}):nt.dragAppend(o.appendInfo,{x:W,y:ot})}),An(Pn(o),"onDragEnd",function(){var u=o.props,p=u.model,d=u.graphModel.eventCenter,O=p;O.dragAppendEnd(),o.isDragging=!1,O.isShowAdjustPoint=o.isShowAdjustPointTemp,o.appendInfo=void 0,d.emit(ee.EDGE_ADJUST,{data:O.getData()})}),An(Pn(o),"beforeDragStart",function(u,p){p.dragAble&&o.drag.handleMouseDown(u),o.appendInfo=p}),o.drag=new On({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd,isStopPropagation:!1}),o}return e=a,(r=[{key:"getEdge",value:function(){var o=this.props.model,u=o.points,p=o.isAnimation,d=o.arrowConfig,O=o.getEdgeStyle(),_=o.getEdgeAnimationStyle(),j=_.strokeDasharray,k=_.stroke,R=_.strokeDashoffset,V=_.animationName,W=_.animationDuration,ot=_.animationIterationCount,nt=_.animationTimingFunction,dt=_.animationDirection;return Object(et.g)(R1,nf({points:u},O,d,p?{strokeDasharray:j,stroke:k,style:{strokeDashoffset:R,animationName:V,animationDuration:W,animationIterationCount:ot,animationTimingFunction:nt,animationDirection:dt}}:{}))}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.points,p=o.isSelected,d={start:null,end:null,hover:this.state.hover,isSelected:p},O=ao(u);return O.length>=2&&(d.start=O[O.length-2],d.end=O[O.length-1]),d}},{key:"getLastTwoPoints",value:function(){var o=this.props.model.points,u=ao(o);return u.length>=2?[u[u.length-2],u[u.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(o){var u,p=o.start,d=o.end;if(p.x===d.x&&p.y===d.y)u="";else{var O={start:p,end:d,offset:10,verticalLength:5},_=Oi(Mu(Mu({},O),{},{type:"start"})),j=Oi(Mu(Mu({},O),{},{type:"end"}));u="M".concat(_.leftX," ").concat(_.leftY,` 
      L`).concat(_.rightX," ").concat(_.rightY,` 
      L`).concat(j.rightX," ").concat(j.rightY,`
      L`).concat(j.leftX," ").concat(j.leftY," z")}return{d:u,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var u=this.getAppendAttributes(o),p=u.d,d=u.strokeWidth,O=u.fill,_=u.strokeDasharray,j=u.stroke;return Object(et.g)(Ni,{d:p,fill:O,strokeWidth:d,stroke:j,strokeDasharray:_})}},{key:"getAppendWidth",value:function(){for(var o=this,u=this.props,p=u.model,d=u.graphModel,O=p.pointsList,_=p.draggable,j=[],k=O.length,R=function(W){var ot="lf-polyline-append",nt={start:{x:O[W].x,y:O[W].y},end:{x:O[W+1].x,y:O[W+1].y},startIndex:W,endIndex:W+1,direction:"",dragAble:!0},dt=Object(et.g)("g",{className:ot},o.getAppendShape(nt)),bt=d.editConfigModel,kt=bt.adjustEdge,Et=bt.adjustEdgeMiddle;if(kt&&_){var Ft=nt.startIndex,Mt=nt.endIndex,Bt=Et&&(Ft===0||Mt===k-1);nt.dragAble=!Bt,nt.start.x===nt.end.x?(nt.dragAble&&(ot+="-ew-resize"),nt.direction=Me.VERTICAL):nt.start.y===nt.end.y&&(nt.dragAble&&(ot+="-ns-resize"),nt.direction=Me.HORIZONTAL),dt=Object(et.g)("g",{className:o.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(Rt){return o.beforeDragStart(Rt,nt)}},Object(et.g)("g",{className:ot},o.getAppendShape(nt)))}j.push(dt)},V=0;V<k-1;V++)R(V);return Object(et.g)("g",null,j)}}])&&L1(e.prototype,r),a}(Di);function uf(t){return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uf(t)}function U1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Qv(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Qv(r,n)}}(t,e)||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 Qv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cf(){return cf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cf.apply(this,arguments)}function H1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sf(t,e){return sf=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},sf(t,e)}function X1(t){var e=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(r){return!1}}();return function(){var r,n=Du(t);if(e){var a=Du(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return V1(this,r)}}function V1(t,e){if(e&&(uf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Du(t){return Du=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Du(t)}var lf=function(t){(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&&sf(o,u)})(a,t);var e,r,n=X1(a);function a(){return H1(this,a),n.apply(this,arguments)}return e=a,(r=[{key:"getEdge",value:function(){var o=this.props.model,u=o.getEdgeStyle(),p=o.path,d=o.isAnimation,O=o.arrowConfig,_=o.getEdgeAnimationStyle(),j=_.strokeDasharray,k=_.stroke,R=_.strokeDashoffset,V=_.animationName,W=_.animationDuration,ot=_.animationIterationCount,nt=_.animationTimingFunction,dt=_.animationDirection;return Object(et.g)(Ni,cf({d:p},u,O,d?{strokeDasharray:j,stroke:k,style:{strokeDashoffset:R,animationName:V,animationDuration:W,animationIterationCount:ot,animationTimingFunction:nt,animationDirection:dt}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model.path;return Object(et.g)(Ni,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=this.state.hover,p=o,d=p.path,O=p.isSelected,_=U1(Ph(d),2);return{start:_[0],end:_[1],hover:u,isSelected:O}}},{key:"getLastTwoPoints",value:function(){var o=this.props.model.path;return Ph(o)}}])&&F1(e.prototype,r),a}(Di);function ff(t){return ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ff(t)}function qv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Y1(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pf(t,e){return pf=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},pf(t,e)}function Z1(t){var e=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(r){return!1}}();return function(){var r,n=Nu(t);if(e){var a=Nu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return J1(this,r)}}function J1(t,e){if(e&&(ff(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Nu(t){return Nu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Nu(t)}var K1=function(t){(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&&pf(o,u)})(a,t);var e,r,n=Z1(a);function a(){return G1(this,a),n.apply(this,arguments)}return e=a,r=[{key:"getArrowAttributes",value:function(){var o=this.props,u=o.arrowInfo,p=o.style,d=u.start,O=u.end,_={start:d,end:O,offset:p.offset,verticalLength:p.verticalLength,type:"end"},j=Oi(_),k=j.leftX,R=j.leftY,V=j.rightX,W=j.rightY;return function(ot){for(var nt=1;nt<arguments.length;nt++){var dt=arguments[nt]!=null?arguments[nt]:{};nt%2?qv(Object(dt),!0).forEach(function(bt){Y1(ot,bt,dt[bt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ot,Object.getOwnPropertyDescriptors(dt)):qv(Object(dt)).forEach(function(bt){Object.defineProperty(ot,bt,Object.getOwnPropertyDescriptor(dt,bt))})}return ot}({d:"M".concat(k," ").concat(R," L").concat(O.x," ").concat(O.y," L").concat(V," ").concat(W," z")},p)}},{key:"getShape",value:function(){var o=this.getArrowAttributes(),u=o.d,p=o.strokeWidth,d=o.stroke,O=o.fill;return Object(et.g)(Ni,{d:u,fill:O,strokeWidth:p,stroke:d})}},{key:"render",value:function(){return Object(et.g)("g",{className:"lf-arrow"},this.getShape())}}],r&&W1(e.prototype,r),a}(et.a),tg=function(t,e){return pt(t,e)},$1=function(t){var e=t==null?0:t.length;return e?t[e-1]:void 0},df=function(){return Vt.a.Date.now()},Q1=/\s/,q1=function(t){for(var e=t.length;e--&&Q1.test(t.charAt(e)););return e},tw=/^\s+/,ew=function(t){return t&&t.slice(0,q1(t)+1).replace(tw,"")},rw=/^[-+]0x[0-9a-f]+$/i,nw=/^0b[01]+$/i,ow=/^0o[0-7]+$/i,iw=parseInt,eg=function(t){if(typeof t=="number")return t;if(se(t))return NaN;if(Te(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Te(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ew(t);var r=nw.test(t);return r||ow.test(t)?iw(t.slice(2),r?2:8):rw.test(t)?NaN:+t},aw=Math.max,uw=Math.min,cw=function(t,e,r){var n,a,o,u,p,d,O=0,_=!1,j=!1,k=!0;if(typeof t!="function")throw new TypeError("Expected a function");function R(bt){var kt=n,Et=a;return n=a=void 0,O=bt,u=t.apply(Et,kt)}function V(bt){return O=bt,p=setTimeout(ot,e),_?R(bt):u}function W(bt){var kt=bt-d;return d===void 0||kt>=e||kt<0||j&&bt-O>=o}function ot(){var bt=df();if(W(bt))return nt(bt);p=setTimeout(ot,function(kt){var Et=e-(kt-d);return j?uw(Et,o-(kt-O)):Et}(bt))}function nt(bt){return p=void 0,k&&n?R(bt):(n=a=void 0,u)}function dt(){var bt=df(),kt=W(bt);if(n=arguments,a=this,d=bt,kt){if(p===void 0)return V(d);if(j)return clearTimeout(p),p=setTimeout(ot,e),R(d)}return p===void 0&&(p=setTimeout(ot,e)),u}return e=eg(e)||0,Te(r)&&(_=!!r.leading,o=(j="maxWait"in r)?aw(eg(r.maxWait)||0,e):o,k="trailing"in r?!!r.trailing:k),dt.cancel=function(){p!==void 0&&clearTimeout(p),O=0,n=d=a=p=void 0},dt.flush=function(){return p===void 0?u:nt(df())},dt},sw=i(167);function lw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var rg,ng,og,fw=function(){function t(n){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),Gn(this,"undos",[]),Gn(this,"redos",[]),Gn(this,"callbacks",[]),Gn(this,"stopWatch",null),Gn(this,"curData",null),Gn(this,"maxSize",50),Gn(this,"waitTime",100),Gn(this,"eventCenter",void 0),this.eventCenter=n}var e,r;return e=t,(r=[{key:"add",value:function(n){tg($1(this.undos),n)||(this.undos.push(n),tg(this.curData,n)||(this.redos=[]),this.eventCenter.emit(ee.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 n=this.undos.pop();this.redos.push(n);var a=this.undos.pop();return this.curData=De(a),a}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var n=this.redos.pop();return this.curData=De(n),n}}},{key:"watch",value:function(n){var a=this;this.stopWatch&&this.stopWatch(),this.undos.push(n.modelToGraphData()),this.stopWatch=Object(sw.a)(n,cw(function(){var o=n.modelToHistoryData();o&&a.add(o)},this.waitTime))}}])&&lw(e.prototype,r),t}();function hf(t){return hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hf(t)}function pw(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||function(r,n){if(r){if(typeof r=="string")return ig(r,n);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ig(r,n)}}(t,e)||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 ig(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ag(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Vo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ag(Object(r),!0).forEach(function(n){so(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ag(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ug(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function yf(t,e){return yf=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},yf(t,e)}function dw(t){var e=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(r){return!1}}();return function(){var r,n=Cu(t);if(e){var a=Cu(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return hw(this,r)}}function hw(t,e){if(e&&(hf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yo(t)}function Yo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cu(t){return Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Cu(t)}function so(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cg,sg,lg,vf=Gr((og=ng=function(t){(function(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),p&&yf(u,p)})(o,t);var e,r,n,a=dw(o);function o(){var u;return function(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}(this,o),so(Yo(u=a.call(this)),"ref",Object(et.f)()),so(Yo(u),"__prevText",{type:"",text:"",id:""}),so(Yo(u),"keyupHandler",function(p){var d=u.props.graphModel.textEditElement;p.key==="Enter"&&p.altKey&&d.setElementState(0)}),so(Yo(u),"inputHandler",function(p){var d=p.target.innerText,O=u.props.graphModel.textEditElement;u.__prevText={type:O.type,text:d.replace(/(\r\n)+$|(\n)+$/,""),id:O.id}}),so(Yo(u),"keydownHandler",function(p){p.stopPropagation()}),u.state={style:{left:0,top:0}},u}return e=o,n=[{key:"getDerivedStateFromProps",value:function(u){var p,d=u.graphModel,O=d.transformModel,_=d.theme,j=d.textEditElement;if(j){var k;if((k=j.text)===null||k===void 0||!k.value)if(j.BaseType===Xe.EDGE){var R=(j=j).text,V=j.textPosition,W=V.x,ot=V.y;R.x=W,R.y=ot,j.setText(R)}else j=j;var nt={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(j.BaseType===Xe.EDGE){var dt=_.edgeText,bt=dt.overflowMode,kt=dt.lineHeight,Et=dt.wrapPadding,Ft=dt.textWidth;Ft&&bt==="autoWrap"&&(p=Vo(Vo({},nt),{},{width:Ft,minWidth:Ft,lineHeight:kt,padding:Et}))}else if(j.BaseType===Xe.NODE){var Mt=_.nodeText,Bt=Mt.overflowMode,Rt=Mt.lineHeight,le=Mt.wrapPadding,Ee=Mt.textWidth,be=j,Se=be.width,Ue=be.modelType;(Ue!==he.TEXT_NODE&&Bt==="autoWrap"||Ue===he.TEXT_NODE&&Ee)&&(p=Vo(Vo({},nt),{},{width:Ee||Se,minWidth:Ee||Se,lineHeight:Rt,padding:le}))}var Ze=j.text,yr=Ze.x,pn=Ze.y,Br=pw(O.CanvasPointToHtmlPoint([yr,pn]),2);return{style:Vo({left:Br[0],top:Br[1]},p)}}}}],(r=[{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 p=this.__prevText,d=p.text,O=p.id;u.updateText(O,d),u.eventCenter.emit(ee.TEXT_UPDATE,Vo({},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 p=document.createRange();p.selectNodeContents(u),p.collapse(!1);var d=window.getSelection();d.removeAllRanges(),d.addRange(p)}}},{key:"render",value:function(){var u,p=this.props.graphModel.textEditElement,d=this.state.style;return p?Object(et.g)("div",{contentEditable:!0,className:"lf-text-input",style:d,ref:this.ref,key:p.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(u=p.text)===null||u===void 0?void 0:u.value):null}}])&&ug(e.prototype,r),n&&ug(e,n),o}(et.a),so(ng,"toolName","textEdit"),rg=og))||rg,yw=function(t){return t.modelType===he.LINE_EDGE?function(e){var r=e.startPoint,n=e.endPoint,a=(r.x+n.x)/2,o=(r.y+n.y)/2,u=Math.abs(r.x-n.x)+10,p=Math.abs(r.y-n.y)+10;return{x:a-u/2,y:o-p/2,x1:a+u/2,y1:o+p/2}}(t):t.modelType===he.POLYLINE_EDGE?function(e){var r=e.points,n=ao(r),a=_i(n,8),o=a.x,u=a.y,p=a.width,d=a.height;return{x:o-p/2,y:u-d/2,x1:o+p/2,y1:u+d/2}}(t):t.modelType===he.BEZIER_EDGE?function(e){var r=e.path,n=Fa(r),a=_i(n,8),o=a.x,u=a.y,p=a.width,d=a.height;return{x:o-p/2,y:u-d/2,x1:o+p/2,y1:u+d/2}}(t):void 0};function gf(t){return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gf(t)}function fg(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(r);!(d=(o=a.next()).done)&&(p.push(o.value),!n||p.length!==n);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(t,e)||pg(t,e)||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 vw(t){return function(e){if(Array.isArray(e))return mf(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||pg(t)||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 pg(t,e){if(t){if(typeof t=="string")return mf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mf(t,e):void 0}}function mf(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function gw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function bf(t,e){return bf=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},bf(t,e)}function mw(t){var e=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(r){return!1}}();return function(){var r,n=Ru(t);if(e){var a=Ru(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return bw(this,r)}}function bw(t,e){if(e&&(gf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ci(t)}function Ci(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ru(t){return Ru=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ru(t)}function Ri(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Of=Gr((lg=sg=function(t){(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&&bf(o,u)})(a,t);var e,r,n=mw(a);function a(o){var u;(function(_,j){if(!(_ instanceof j))throw new TypeError("Cannot call a class as a function")})(this,a),Ri(Ci(u=n.call(this)),"stepDrag",void 0),Ri(Ci(u),"handleMouseDown",function(_){u.stepDrag.handleMouseDown(_)}),Ri(Ci(u),"onDragging",function(_){var j=_.deltaX,k=_.deltaY,R=u.props.graphModel,V=R.getSelectElements(!0);R.moveNodes(V.nodes.map(function(W){return W.id}),j,k)}),Ri(Ci(u),"handleContextMenu",function(_){_.preventDefault();var j=u.props,k=j.graphModel,R=j.graphModel,V=R.eventCenter,W=R.selectElements,ot=k.getPointByClient({x:_.clientX,y:_.clientY}),nt={nodes:[],edges:[]};vw(W.values()).forEach(function(dt){dt.BaseType===Xe.NODE&&nt.nodes.push(dt.getData()),dt.BaseType===Xe.EDGE&&nt.edges.push(dt.getData())}),V.emit(ee.SELECTION_CONTEXTMENU,{data:nt,e:_,position:ot})});var p=o.graphModel,d=p.gridSize,O=p.eventCenter;return u.stepDrag=new On({onDragging:u.onDragging,step:d,eventType:"SELECTION",eventCenter:O}),u}return e=a,(r=[{key:"render",value:function(){var o=this.props.graphModel,u=o.selectElements,p=o.transformModel;if(!(u.size<=1)){var d=Number.MAX_SAFE_INTEGER,O=Number.MAX_SAFE_INTEGER,_=Number.MIN_SAFE_INTEGER,j=Number.MIN_SAFE_INTEGER;u.forEach(function(W){var ot={x:0,y:0,x1:0,y1:0};W.BaseType===Xe.NODE&&(ot=function(nt){var dt=nt.x,bt=nt.y,kt=nt.width,Et=nt.height;return{x:dt-kt/2,y:bt-Et/2,x1:dt+kt/2,y1:bt+Et/2}}(W)),W.BaseType===Xe.EDGE&&(ot=yw(W)),d=Math.min(d,ot.x),O=Math.min(O,ot.y),_=Math.max(_,ot.x1),j=Math.max(j,ot.y1)});var k=fg(p.CanvasPointToHtmlPoint([d,O]),2);d=k[0],O=k[1];var R=fg(p.CanvasPointToHtmlPoint([_,j]),2);_=R[0],j=R[1];var V={left:"".concat(d-10,"px"),top:"".concat(O-10,"px"),width:"".concat(_-d+20,"px"),height:"".concat(j-O+20,"px")};return Object(et.g)("div",{className:"lf-multiple-select",style:V,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&gw(e.prototype,r),a}(et.a),Ri(sg,"toolName","multipleSelect"),cg=lg))||cg;function Ow(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Iu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _w=function(){function t(n){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,t),Iu(this,"tools",void 0),Iu(this,"components",void 0),Iu(this,"toolMap",new Map),Iu(this,"instance",void 0),this.instance=n,this.isDisabledTool(vf.toolName)||this.registerTool(vf.toolName,vf),this.isDisabledTool(Of.toolName)||this.registerTool(Of.toolName,Of);var a=n.graphModel;a.eventCenter.on("".concat(ee.GRAPH_TRANSFORM,",").concat(ee.NODE_CLICK,",").concat(ee.BLANK_CLICK," "),function(){var o=a.textEditElement,u=a.editConfigModel,p=u.edgeTextEdit,d=u.nodeTextEdit;(p||d)&&o&&a.textEditElement.setElementState(_e.DEFAULT)})}var e,r;return e=t,(r=[{key:"isDisabledTool",value:function(n){return this.instance.options.disabledTools.indexOf(n)!==-1}},{key:"registerTool",value:function(n,a){this.toolMap.set(n,a)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&Ow(e.prototype,r),t}(),ww=i(168),xw=i.n(ww);function Ew(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dg=function(){function t(n){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,t),_f(this,"mousetrap",void 0),_f(this,"options",void 0),_f(this,"target",void 0),n.keyboard||(n.keyboard={enabled:!1}),this.options=n;var a=n.lf;this.target=a.container,this.mousetrap=new xw.a(this.target),n.keyboard.enabled&&this.enable(!0)}var e,r;return e=t,(r=[{key:"initShortcuts",value:function(){var n=this,a=this.options.keyboard.shortcuts;if(a)if(tr(a))a.forEach(function(d){var O=d.keys,_=d.callback,j=d.action;return n.on(O,_,j)});else{var o=a.keys,u=a.callback,p=a.action;this.on(o,u,p)}}},{key:"on",value:function(n,a,o){this.mousetrap.bind(this.getKeys(n),a,o)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(n,a){this.mousetrap.unbind(this.getKeys(n),a)}},{key:"enable",value:function(n){(this.disabled||n)&&(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(n){var a=this;return(Array.isArray(n)?n:[n]).map(function(o){return a.formatKey(o)})}},{key:"formatKey",value:function(n){return n.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&Ew(e.prototype,r),t}(),jw=dg,kn=null;function hg(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function yg(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach(function(r){r.x+=e,r.y+=e}),t.text&&(t.text.x+=e,t.text.y+=e),t}function wf(t){return wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wf(t)}function vg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ii(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vg(Object(r),!0).forEach(function(n){Be(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function gg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Be(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xf=function(){function t(a){var o,u,p=this;(function(d,O){if(!(d instanceof O))throw new TypeError("Cannot call a class as a function")})(this,t),Be(this,"container",void 0),Be(this,"width",void 0),Be(this,"height",void 0),Be(this,"graphModel",void 0),Be(this,"history",void 0),Be(this,"viewMap",new Map),Be(this,"tool",void 0),Be(this,"keyboard",void 0),Be(this,"dnd",void 0),Be(this,"options",void 0),Be(this,"snaplineModel",void 0),Be(this,"components",[]),Be(this,"plugins",void 0),Be(this,"extension",{}),Be(this,"adapterIn",void 0),Be(this,"adapterOut",void 0),Be(this,"getView",function(d){return p.viewMap.get(d)}),a=gy(a),this.options=a,this.container=this.initContainer(a.container),this.plugins=a.plugins,this.graphModel=new D0(Ii({},a)),this.tool=new _w(this),this.history=new fw(this.graphModel.eventCenter),this.dnd=new AO({lf:this}),this.keyboard=new jw({lf:this,keyboard:a.keyboard}),a.snapline!==!1&&(this.snaplineModel=new Pv(this.graphModel),o=this.graphModel.eventCenter,u=this.snaplineModel,o.on("node:mousemove",function(d){var O=d.data;u.setNodeSnapLine(O)}),o.on("node:mouseup",function(){u.clearSnapline()})),function(d,O){var _=d.keyboard,j=_.options.keyboard;_.on(["cmd + c","ctrl + c"],function(){if(!j.enabled||O.textEditElement)return!0;var k=d.options.guards,R=O.getSelectElements(!1);return k&&k.beforeClone&&!k.beforeClone(R)||R.nodes.length===0&&R.edges.length===0?(kn=null,!0):((kn=R).nodes.forEach(function(V){return hg(V,40)}),kn.edges.forEach(function(V){return yg(V,40)}),!1)}),_.on(["cmd + v","ctrl + v"],function(){if(!j.enabled||O.textEditElement)return!0;if(kn&&(kn.nodes||kn.edges)){d.clearSelectElements();var k=d.addElements(kn);if(!k)return!0;k.nodes.forEach(function(R){return d.selectElementById(R.id,!0)}),k.edges.forEach(function(R){return d.selectElementById(R.id,!0)}),kn.nodes.forEach(function(R){return hg(R,40)}),kn.edges.forEach(function(R){return yg(R,40)})}return!1}),_.on(["cmd + z","ctrl + z"],function(){return!j.enabled||!!O.textEditElement||(d.undo(),!1)}),_.on(["cmd + y","ctrl + y"],function(){return!j.enabled||!!O.textEditElement||(d.redo(),!1)}),_.on(["backspace"],function(){if(!j.enabled||O.textEditElement)return!0;var k=O.getSelectElements(!0);return d.clearSelectElements(),k.edges.forEach(function(R){return d.deleteEdge(R.id)}),k.nodes.forEach(function(R){return d.deleteNode(R.id)}),!1})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(a.disabledPlugins)}var e,r,n;return e=t,r=[{key:"register",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof a=="string"){var p={BaseEdge:Di,BaseEdgeModel:Ic,BaseNode:jn,BaseNodeModel:En,RectNode:yl,RectNodeModel:Js,CircleNode:bl,CircleNodeModel:Ms,PolygonNode:El,PolygonNodeModel:Ys,TextNode:Il,TextNodeModel:qs,LineEdge:tf,LineEdgeModel:Hc,DiamondNode:Al,DiamondNodeModel:Rs,PolylineEdge:af,PolylineEdgeModel:Yc,BezierEdge:lf,BezierEdgeModel:Es,EllipseNode:Nl,EllipseNodeModel:Bs,HtmlNode:Ul,HtmlNodeModel:rl,h:et.g,type:a};this.viewMap.forEach(function(k){var R=k.extendKey;R&&(p[R]=k)}),this.graphModel.modelMap.forEach(function(k){var R=k.extendKey;R&&(p[R]=k)});var d=o(p),O=d.view,_=d.model,j=O;u&&!j.isObervered&&(j.isObervered=!0,j=Ht(j)),this.setView(a,j),this.graphModel.setModel(a,_)}else this.registerElement(a)}},{key:"registerElement",value:function(a){var o=a.view;a.isObserverView===!1||o.isObervered||(o.isObervered=!0,o=Ht(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:yl,model:Js,type:"rect"}),this.registerElement({type:"circle",view:bl,model:Ms}),this.registerElement({type:"polygon",view:El,model:Ys}),this.registerElement({type:"line",view:tf,model:Hc}),this.registerElement({type:"polyline",view:af,model:Yc}),this.registerElement({type:"bezier",view:lf,model:Es}),this.registerElement({type:"text",view:Il,model:qs}),this.registerElement({type:"ellipse",view:Nl,model:Bs}),this.registerElement({type:"diamond",view:Al,model:Rs}),this.registerElement({type:"html",view:Ul,model:rl})}},{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,p=a.id;if(!u){var d=this.getNodeModelById(p);d&&(u=d.getData());var O=this.getEdgeModelById(p);O&&(u=O.textPosition)}var _=u,j=_.x,k=_.y;o.focusOn(j,k,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,p,d=this.getModelById(a);return!!d&&(u=(p=(Be(o={},Xe.NODE,this.deleteNode),Be(o,Xe.EDGE,this.deleteEdge),o)[d.BaseType])===null||p===void 0?void 0:p.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]:ee.NODE_ADD,u=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(a,o,u)}},{key:"deleteNode",value:function(a){var o=this.graphModel.getNodeModelById(a);if(!o)return!1;var u=o.getData(),p=this.options.guards,d=!p||!p.beforeDelete||p.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 p=u.model.getData(),d=!o||!o.beforeDelete||o.beforeDelete(p);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,p=a.targetNodeId;if(u&&p){var d=[];return o.forEach(function(j){j.sourceNodeId===u&&j.targetNodeId===p&&d.push(j)}),d}if(u){var O=[];return o.forEach(function(j){j.sourceNodeId===u&&O.push(j)}),O}if(p){var _=[];return o.forEach(function(j){j.targetNodeId===p&&_.push(j)}),_}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(or(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,p=a.edges,d={},O={nodes:[],edges:[]},_=0;_<u.length;_++){var j=u[_],k=j.id,R=this.addNode(j);if(!R)return;k&&(d[k]=R.id),O.nodes.push(R)}return p.forEach(function(V){var W=V.sourceNodeId,ot=V.targetNodeId;d[W]&&(W=d[W]),d[ot]&&(ot=d[ot]);var nt=o.graphModel.addEdge(Ii(Ii({},V),{},{sourceNodeId:W,targetNodeId:ot}));O.edges.push(nt)}),O}},{key:"getAreaElement",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],p=!(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,p,d).map(function(O){return O.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),p=0;p<o;p++)u[p]=arguments[p];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=or(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"redo",value:function(){if(this.history.redoAble()){var a=or(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]:[],p=(a=this.plugins)!==null&&a!==void 0?a:t.extensions;p.forEach(function(d){var O=d.pluginName||d.name;u.indexOf(O)===-1&&o.installPlugin(d)})}},{key:"installPlugin",value:function(a){if(wf(a)==="object"){var o=a.install,u=a.render;return o&&o.call(a,this,t),u&&this.components.push(u.bind(a)),void(this.extension[a.pluginName]=a)}var p=a,d=new p({lf:this,LogicFlow:t,options:this.options.pluginsOptions});d.render&&this.components.push(d.render.bind(d)),this.extension[p.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(Ii(Ii({},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(or(a)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(et.j)(Object(et.g)(SO,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(ee.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)}}],n=[{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)}}],r&&gg(e.prototype,r),n&&gg(e,n),t}();function Gr(t){return Ht(t)}Be(xf,"extensions",new Map),f.default=xf}])})})(Ur,Ur.exports);var Yt=Ur.exports;const po=$w(Yt);function kg(m,y){return y={exports:{}},m(y,y.exports),y.exports}var Mg=kg(function(m){var y=m.exports=function(c,f){if(f||(f=16),c===void 0&&(c=128),c<=0)return"0";for(var i=Math.log(Math.pow(2,c))/Math.log(f),l=2;i===1/0;l*=2)i=Math.log(Math.pow(2,c/l))/Math.log(f)*l;for(var s=i-Math.floor(i),g="",l=0;l<Math.floor(i);l++){var b=Math.floor(Math.random()*f).toString(f);g=b+g}if(s){var x=Math.pow(f,s),b=Math.floor(Math.random()*x).toString(f);g=b+g}var w=parseInt(g,f);return w!==1/0&&w>=Math.pow(2,c)?y(c,f):g};y.rack=function(c,f,i){var l=function(g){var b=0;do{if(b++>10)if(i)c+=i;else throw new Error("too many ID collisions, use more bits");var x=y(c,f)}while(Object.hasOwnProperty.call(s,x));return s[x]=g,x},s=l.hats={};return l.get=function(g){return l.hats[g]},l.set=function(g,b){return l.hats[g]=b,l},l.bits=c||128,l.base=f||16,l}});function Wr(m){if(!(this instanceof Wr))return new Wr(m);m=m||[128,36,1],this._seed=m.length?Mg.rack(m[0],m[1],m[2]):m}Wr.prototype.next=function(m){return this._seed(m||!0)},Wr.prototype.nextPrefixed=function(m,y){var c;do c=m+this.next(!0);while(this.assigned(c));return this.claim(c,y),c},Wr.prototype.claim=function(m,y){this._seed.set(m,y||!0)},Wr.prototype.assigned=function(m){return this._seed.get(m)||!1},Wr.prototype.unclaim=function(m){delete this._seed.hats[m]},Wr.prototype.clear=function(){var m=this._seed.hats,y;for(y in m)this.unclaim(y)};var Tg=new Wr([32,32,1]);function ho(){return Tg.next()}var Af=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Dg=function(m){Af(y,m);function y(c,f){var i=this;return c.id||(c.id="Event_"+ho()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),i=m.call(this,c,f)||this,i}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedTargetRules=function(){var c=m.prototype.getConnectedTargetRules.call(this),f={message:"\u8D77\u59CB\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u7EC8\u70B9",validate:function(){return!1}};return c.push(f),c},y.extendKey="StartEventModel",y}(Yt.CircleNodeModel),Ng=function(m){Af(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.extendKey="StartEventNode",y}(Yt.CircleNode),Cg={type:"bpmn:startEvent",view:Ng,model:Dg},kf=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Ui=globalThis&&globalThis.__assign||function(){return Ui=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Ui.apply(this,arguments)},Rg=function(m){kf(y,m);function y(c,f){var i=this;return c.id||(c.id="Event_"+ho()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),i=m.call(this,c,f)||this,i}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedSourceRules=function(){var c=m.prototype.getConnectedSourceRules.call(this),f={message:"\u7ED3\u675F\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u8D77\u70B9",validate:function(){return!1}};return c.push(f),c},y.extendKey="EndEventModel",y}(Yt.CircleNodeModel),Ig=function(m){kf(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},y.prototype.getShape=function(){var c=this.props.model,f=c.getNodeStyle(),i=c.x,l=c.y,s=c.r,g=m.prototype.getShape.call(this);return Yt.h("g",{},g,Yt.h("circle",Ui(Ui({},f),{cx:i,cy:l,r:s-5})))},y.extendKey="EndEventView",y}(Yt.CircleNode),Lg={type:"bpmn:endEvent",view:Ig,model:Rg},Mf=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Jo=globalThis&&globalThis.__assign||function(){return Jo=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Jo.apply(this,arguments)},zg=function(m){Mf(y,m);function y(c,f){var i=this;return c.id||(c.id="Gateway_"+ho()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),i=m.call(this,c,f)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return y.extendKey="ExclusiveGatewayModel",y}(Yt.PolygonNodeModel),Bg=function(m){Mf(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getShape=function(){var c=this.props.model,f=c.x,i=c.y,l=c.width,s=c.height,g=c.points,b=c.getNodeStyle();return Yt.h("g",{transform:"matrix(1 0 0 1 "+(f-l/2)+" "+(i-s/2)+")"},Yt.h("polygon",Jo(Jo({},b),{x:f,y:i,points:g})),Yt.h("path",Jo({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},b)))},y.extendKey="ExclusiveGatewayNode",y}(Yt.PolygonNode),Ug={type:"bpmn:exclusiveGateway",view:Bg,model:zg},Tf=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Hi=globalThis&&globalThis.__assign||function(){return Hi=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Hi.apply(this,arguments)},Hg=function(m){Tf(y,m);function y(c,f){var i=this;return c.id||(c.id="Activity_"+ho()),i=m.call(this,c,f)||this,i}return y.extendKey="UserTaskModel",y}(Yt.RectNodeModel),Fg=function(m){Tf(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var c=this.props.model,f=c.x,i=c.y,l=c.width,s=c.height,g=c.getNodeStyle();return Yt.h("svg",{x:f-l/2+5,y:i-s/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Yt.h("path",{fill:g.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 c=this.props.model,f=c.x,i=c.y,l=c.width,s=c.height,g=c.radius,b=c.getNodeStyle();return Yt.h("g",{},[Yt.h("rect",Hi(Hi({},b),{x:f-l/2,y:i-s/2,rx:g,ry:g,width:l,height:s})),this.getLabelShape()])},y.extendKey="UserTaskNode",y}(Yt.RectNode),Xg={type:"bpmn:userTask",view:Fg,model:Hg},Df=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Gu=globalThis&&globalThis.__assign||function(){return Gu=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Gu.apply(this,arguments)},Vg=function(m){Df(y,m);function y(c,f){var i=this;return c.id||(c.id="Activity_"+ho()),i=m.call(this,c,f)||this,i}return y.extendKey="ServiceTaskModel",y}(Yt.RectNodeModel),Yg=function(m){Df(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var c=this.props.model,f=c.x,i=c.y,l=c.width,s=c.height,g=c.getNodeStyle();return Yt.h("svg",{x:f-l/2+5,y:i-s/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Yt.h("path",{fill:g.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 c=this.props.model,f=c.x,i=c.y,l=c.width,s=c.height,g=c.radius,b=c.getNodeStyle();return Yt.h("g",{},[Yt.h("rect",Gu({x:f-l/2,y:i-s/2,rx:g,ry:g,width:l,height:s},b)),this.getLabelShape()])},y.extendKey="ServiceTaskNode",y}(Yt.RectNode),Gg={type:"bpmn:serviceTask",view:Yg,model:Vg},Nf=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Wg=function(m){Nf(y,m);function y(c,f){var i=this;return c.id||(c.id="Flow_"+ho()),i=m.call(this,c,f)||this,i}return y.extendKey="SequenceFlowModel",y}(Yt.PolylineEdgeModel),Zg=function(m){Nf(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.extendKey="SequenceFlowEdge",y}(Yt.PolylineEdge),Jg={type:"bpmn:sequenceFlow",view:Zg,model:Wg},Cf={width:40,height:40},Rf={width:40,height:40},If={width:40,height:40},Lf={width:100,height:80},zf={width:100,height:80},Kg={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}}},$g=function(){function m(y){var c=y.lf;c.setTheme(Kg),c.register(Cg),c.register(Lg),c.register(Ug),c.register(Xg),c.register(Gg),c.options.customBpmnEdge||(c.register(Jg),c.setDefaultEdgeType("bpmn:sequenceFlow"))}return m.pluginName="bpmnElement",m}(),Qg=function(){function m(y){var c=this,f=y.lf;this.lf=f,this.customCssRules="",this.useGlobalRules=!0,f.getSnapshot=function(i,l){c.getSnapshot(i,l)},f.getSnapshotBlob=function(i){return c.getSnapshotBlob(i)},f.getSnapshotBase64=function(i){return c.getSnapshotBase64(i)}}return m.prototype.getSvgRootElement=function(y){var c=y.container.querySelector(".lf-canvas-overlay");return c},m.prototype.triggerDownload=function(y){var c=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),f=document.createElement("a");f.setAttribute("download",this.fileName),f.setAttribute("href",y),f.setAttribute("target","_blank"),f.dispatchEvent(c)},m.prototype.removeAnchor=function(y){for(var c=y.childNodes,f=y.childNodes&&y.childNodes.length,i=0;i<f;i++){var l=c[i],s=l.classList&&Array.from(l.classList)||[];s.indexOf("lf-anchor")>-1&&(y.removeChild(y.childNodes[i]),f--,i--)}},m.prototype.getSnapshot=function(y,c){var f=this;this.fileName=y||"logic-flow."+Date.now()+".png";var i=this.getSvgRootElement(this.lf);this.getCanvasData(i,c).then(function(l){var s=l.toDataURL("image/png").replace("image/png","image/octet-stream");f.triggerDownload(s)})},m.prototype.getSnapshotBase64=function(y){var c=this,f=this.getSvgRootElement(this.lf);return new Promise(function(i){c.getCanvasData(f,y).then(function(l){var s=l.toDataURL("image/png");i({data:s,width:l.width,height:l.height})})})},m.prototype.getSnapshotBlob=function(y){var c=this,f=this.getSvgRootElement(this.lf);return new Promise(function(i){c.getCanvasData(f,y).then(function(l){l.toBlob(function(s){i({data:s,width:l.width,height:l.height})},"image/png")})})},m.prototype.getClassRules=function(){var y="";if(this.useGlobalRules)for(var c=document.styleSheets,f=0;f<c.length;f++)for(var i=c[f],l=0;l<i.cssRules.length;l++)y+=i.cssRules[l].cssText;return this.customCssRules&&(y+=this.customCssRules),y},m.prototype.getCanvasData=function(y,c){var f=this,i=y.cloneNode(!0),l=i.lastChild,s=l.childNodes&&l.childNodes.length;if(s)for(var g=0;g<s;g++){var b=l.childNodes[g],x=b.classList&&Array.from(b.classList);if(x&&x.indexOf("lf-base")<0)l.removeChild(l.childNodes[g]),s--,g--;else{var w=l.childNodes[g];w&&w.childNodes.forEach(function(lt){var st=lt;f.removeAnchor(st.firstChild)})}}var A=window.devicePixelRatio||1,S=document.createElement("canvas"),P=this.lf.graphModel.rootEl.querySelector(".lf-base"),D=P.getBoundingClientRect(),N=document.querySelector(".lf-canvas-overlay").getBoundingClientRect(),I=D.x-N.x,B=D.y-N.y,F=this.lf.graphModel,tt=F.transformModel,it=tt.SCALE_X,$=tt.SCALE_Y,G=tt.TRANSLATE_X,J=tt.TRANSLATE_Y;i.lastChild.style.transform="matrix(1, 0, 0, 1, "+((-I+G)*(1/it)+10)+", "+((-B+J)*(1/$)+10)+")";var z=Math.ceil(D.width/it),T=Math.ceil(D.height/$);S.style.width=z+"px",S.style.height=T+"px",S.width=z*A+80,S.height=T*A+80;var L=S.getContext("2d");L.clearRect(0,0,S.width,S.height),L.scale(A,A),c?(L.fillStyle=c,L.fillRect(0,0,z*A+80,T*A+80)):L.clearRect(0,0,z,T);var C=new Image,U=document.createElement("style");U.innerHTML=this.getClassRules();var Q=document.createElement("foreignObject");return Q.appendChild(U),i.appendChild(Q),new Promise(function(lt){C.onload=function(){var xt=navigator.userAgent.indexOf("Firefox")>-1;try{xt?createImageBitmap(C,{resizeWidth:S.width,resizeHeight:S.height}).then(function(vt){L.drawImage(vt,0,0),lt(S)}):(L.drawImage(C,0,0),lt(S))}catch(vt){L.drawImage(C,0,0),lt(S)}};var st="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(i),yt=st.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");C.src=yt})},m.pluginName="snapshot",m}(),qg=new Wr([32,32,1]);function Bf(){return qg.next()}function Uf(m){return Object.prototype.toString.call(m)}function tm(m){return"  ".repeat(m)}function Fi(m){var y=m;return Uf(m)==="[object Object]"?(y={},Object.keys(m).forEach(function(c){var f=c;c.charAt(0)==="-"&&(f=c.substring(1)),y[f]=Fi(m[c])})):Array.isArray(m)&&(y=[],m.forEach(function(c,f){y[f]=Fi(c)})),y}function em(m){var y=m;try{typeof y!="string"&&(y=JSON.parse(m))}catch(c){y=JSON.stringify(Fi(m)).replace(/"/g,"'")}return y}var yo=`    
`;function Xi(m,y,c){var f=tm(c),i="";if(y==="#text")return yo+f+m;if(y==="#cdata-section")return yo+f+"<![CDATA["+m+"]]>";if(y==="#comment")return yo+f+"<!--"+m+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+em(m)+'"';if(Array.isArray(m))m.forEach(function(b){i+=Xi(b,y,c+1)});else if(Uf(m)==="[object Object]"){var l=Object.keys(m),s="",g="";i+=(c===0?"":yo+f)+"<"+y,l.forEach(function(b){b.charAt(0)==="-"?s+=Xi(m[b],b,c+1):g+=Xi(m[b],b,c+1)}),i+=s+(g!==""?">"+g+(yo+f)+"</"+y+">":" />")}else i+=yo+f+("<"+y+">"+m.toString()+"</"+y+">");return i}function rm(m){var y="";for(var c in m)y+=Xi(m[c],c,0);return y}var ur=function(){};ur.ObjTree=function(){return this},ur.ObjTree.VERSION="0.23",ur.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
`,ur.ObjTree.prototype.attr_prefix="-",ur.ObjTree.prototype.parseXML=function(m){var y;if(window.DOMParser){var c=new DOMParser,f=c.parseFromString(m,"application/xml");if(!f)return;y=f.documentElement}else window.ActiveXObject&&(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(m),y=c.documentElement);if(y)return this.parseDOM(y)},ur.ObjTree.prototype.parseHTTP=function(m,y,c){var f={};for(var i in y)f[i]=y[i];if(f.method||(typeof f.postBody>"u"&&typeof f.postbody>"u"&&typeof f.parameters>"u"?f.method="get":f.method="post"),c){f.asynchronous=!0;var l=this,s=c,g=f.onComplete;f.onComplete=function(w){var A;w&&w.responseXML&&w.responseXML.documentElement&&(A=l.parseDOM(w.responseXML.documentElement)),s(A,w),g&&g(w)}}else f.asynchronous=!1;var b;if(typeof HTTP<"u"&&HTTP.Request){f.uri=m;var x=new HTTP.Request(f);x&&(b=x.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var x=new Ajax.Request(m,f);x&&(b=x.transport)}if(c)return b;if(b&&b.responseXML&&b.responseXML.documentElement)return this.parseDOM(b.responseXML.documentElement)},ur.ObjTree.prototype.parseDOM=function(m){if(m){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 c=this.parseElement(m);if(this.__force_array[m.nodeName]&&(c=[c]),m.nodeType!=11){var f={};f[m.nodeName]=c,c=f}return c}},ur.ObjTree.prototype.parseElement=function(m){if(m.nodeType!=7){if(m.nodeType==3||m.nodeType==4||m.nodeType==8){var y=m.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:m.nodeValue}var c=null,f={};if(m.attributes&&m.attributes.length){c={};for(var i=0;i<m.attributes.length;i++){var l=m.attributes[i].nodeName;if(typeof l=="string"){var s=m.attributes[i].nodeValue;try{s=JSON.parse(m.attributes[i].nodeValue.replace(/'/g,'"'))}catch(x){s=m.attributes[i].nodeValue}s&&(l=this.attr_prefix+l,typeof f[l]>"u"&&(f[l]=0),f[l]++,this.addNode(c,l,f[l],s))}}}if(m.childNodes&&m.childNodes.length){var g=!0;c&&(g=!1);for(var i=0;i<m.childNodes.length&&g;i++){var b=m.childNodes[i].nodeType;b==3||b==4||b==8||(g=!1)}if(g){c||(c="");for(var i=0;i<m.childNodes.length;i++)c+=m.childNodes[i].nodeValue}else{c||(c={});for(var i=0;i<m.childNodes.length;i++){var l=m.childNodes[i].nodeName;if(typeof l=="string"){var s=this.parseElement(m.childNodes[i]);s&&(typeof f[l]>"u"&&(f[l]=0),f[l]++,this.addNode(c,l,f[l],s))}}}}else c===null&&(c={});return c}},ur.ObjTree.prototype.addNode=function(m,y,c,f){this.__force_array[y]?(c==1&&(m[y]=[]),m[y][m[y].length]=f):c==1?m[y]=f:c==2?m[y]=[m[y],f]:m[y][m[y].length]=f},ur.ObjTree.prototype.writeXML=function(m){var y=this.hash_to_xml(null,m);return this.xmlDecl+y},ur.ObjTree.prototype.hash_to_xml=function(m,y){var c=[],f=[];for(var i in y)if(y.hasOwnProperty(i)){var l=y[i];i.charAt(0)!=this.attr_prefix?typeof l>"u"||l==null?c[c.length]="<"+i+" />":typeof l=="object"&&l.constructor==Array?c[c.length]=this.array_to_xml(i,l):typeof l=="object"?c[c.length]=this.hash_to_xml(i,l):c[c.length]=this.scalar_to_xml(i,l):f[f.length]=" "+i.substring(1)+'="'+this.xml_escape(l)+'"'}var s=f.join(""),g=c.join("");return typeof m>"u"||m==null||(c.length>0?g.match(/\n/)?g="<"+m+s+`>
`+g+"</"+m+`>
`:g="<"+m+s+">"+g+"</"+m+`>
`:g="<"+m+s+` />
`),g},ur.ObjTree.prototype.array_to_xml=function(m,y){for(var c=[],f=0;f<y.length;f++){var i=y[f];typeof i>"u"||i==null?c[c.length]="<"+m+" />":typeof i=="object"&&i.constructor==Array?c[c.length]=this.array_to_xml(m,i):typeof i=="object"?c[c.length]=this.hash_to_xml(m,i):c[c.length]=this.scalar_to_xml(m,i)}return c.join("")},ur.ObjTree.prototype.scalar_to_xml=function(m,y){return m=="#text"?this.xml_escape(y):"<"+m+">"+this.xml_escape(y)+"</"+m+`>
`},ur.ObjTree.prototype.xml_escape=function(m){return m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var nm=function(m){return new ur.ObjTree().parseXML(m)},om=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Wu=globalThis&&globalThis.__assign||function(){return Wu=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Wu.apply(this,arguments)},Vi=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l},Zr;(function(m){m.START="bpmn:startEvent",m.END="bpmn:endEvent",m.GATEWAY="bpmn:exclusiveGateway",m.USER="bpmn:userTask",m.SYSTEM="bpmn:serviceTask",m.FLOW="bpmn:sequenceFlow"})(Zr||(Zr={}));var Hf=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],Ff=["properties","startPoint","endPoint","pointsList"];function Xf(m){var y=m?Ff.concat(m):Ff;return function(c){function f(i){var l={};return typeof i=="string"?i:Array.isArray(i)?i.map(function(s){return f(s)}):(Object.entries(i).forEach(function(s){var g=Vi(s,2),b=g[0],x=g[1];typeof x!="object"?b.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(b)?l[b]=x:l["-"+b]=x:y.includes(b)?l["-"+b]=f(x):l[b]=f(x)}),l)}return f(c)}}function Yi(m){var y={};return Object.entries(m).forEach(function(c){var f=Vi(c,2),i=f[0],l=f[1];i.indexOf("-")===0?y[i.substring(1)]=Fi(l):typeof l=="string"?y[i]=l:Object.prototype.toString.call(l)==="[object Object]"?y[i]=Yi(l):Array.isArray(l)?y[i]=l.map(function(s){return Yi(s)}):y[i]=l}),y}function im(m,y,c){var f=new Map;y.nodes.forEach(function(l){var s,g={"-id":l.id};if(!((s=l.text)===null||s===void 0)&&s.value&&(g["-name"]=l.text.value),l.properties){var b=Xf(c)(l.properties);Object.assign(g,b)}f.set(l.id,g),m[l.type]?Array.isArray(m[l.type])?m[l.type].push(g):m[l.type]=[m[l.type],g]:m[l.type]=g});var i=y.edges.map(function(l){var s,g,b=f.get(l.targetNodeId);b["bpmn:incoming"]?Array.isArray(b["bpmn:incoming"])?b["bpmn:incoming"].push(l.id):b["bpmn:incoming"]=[b["bpmn:incoming"],l.id]:b["bpmn:incoming"]=l.id;var x={"-id":l.id,"-sourceRef":l.sourceNodeId,"-targetRef":l.targetNodeId};if(!((s=l.text)===null||s===void 0)&&s.value&&(x["-name"]=(g=l.text)===null||g===void 0?void 0:g.value),l.properties){var w=Xf(c)(l.properties);Object.assign(x,w)}return x});y.edges.forEach(function(l){var s=f.get(l.sourceNodeId);s["bpmn:outgoing"]?Array.isArray(s["bpmn:outgoing"])?s["bpmn:outgoing"].push(l.id):s["bpmn:outgoing"]=[s["bpmn:outgoing"],l.id]:s["bpmn:outgoing"]=l.id}),m[Zr.FLOW]=i}function am(m,y){m["bpmndi:BPMNEdge"]=y.edges.map(function(c){var f,i=c.id,l=c.pointsList.map(function(g){var b=g.x,x=g.y;return{"-x":b,"-y":x}}),s={"-id":i+"_di","-bpmnElement":i,"di:waypoint":l};return!((f=c.text)===null||f===void 0)&&f.value&&(s["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),s}),m["bpmndi:BPMNShape"]=y.nodes.map(function(c){var f,i=c.id,l=100,s=80,g=c.x,b=c.y,x=Mn.shapeConfigMap.get(c.type);x&&(l=x.width,s=x.height),g-=l/2,b-=s/2;var w={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":g,"-y":b,"-width":l,"-height":s}};return!((f=c.text)===null||f===void 0)&&f.value&&(w["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),w})}function um(m){var y=[],c=[],f=m["bpmn:definitions"];if(f){var i=f["bpmn:process"];Object.keys(i).forEach(function(l){if(l.indexOf("bpmn:")===0){var s=i[l];if(l===Zr.FLOW){var g=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];c=sm(s,g)}else{var b=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];y=y.concat(cm(s,b,l))}}})}return{nodes:y,edges:c}}function cm(m,y,c){var f=[];if(Array.isArray(m))m.forEach(function(s){var g;Array.isArray(y)?g=y.find(function(x){return x["-bpmnElement"]===s["-id"]}):g=y;var b=Vf(g,c,s);f.push(b)});else{var i=void 0;Array.isArray(y)?i=y.find(function(s){return s["-bpmnElement"]===m["-id"]}):i=y;var l=Vf(i,c,m);f.push(l)}return f}function Vf(m,y,c){var f=Number(m["dc:Bounds"]["-x"]),i=Number(m["dc:Bounds"]["-y"]),l=c["-name"],s=Mn.shapeConfigMap.get(y);s&&(f+=s.width/2,i+=s.height/2);var g;Object.entries(c).forEach(function(A){var S=Vi(A,2),P=S[0],D=S[1];Hf.indexOf(P)===-1&&(g||(g={}),g[P]=D)}),g&&(g=Yi(g));var b;if(l&&(b={x:f,y:i,value:l},m["bpmndi:BPMNLabel"]&&m["bpmndi:BPMNLabel"]["dc:Bounds"])){var x=m["bpmndi:BPMNLabel"]["dc:Bounds"];b.x=Number(x["-x"])+Number(x["-width"])/2,b.y=Number(x["-y"])+Number(x["-height"])/2}var w={id:m["-bpmnElement"],type:y,x:f,y:i,properties:g};return b&&(w.text=b),w}function sm(m,y){var c=[];if(Array.isArray(m))m.forEach(function(i){var l;Array.isArray(y)?l=y.find(function(s){return s["-bpmnElement"]===i["-id"]}):l=y,c.push(Yf(l,i))});else{var f=void 0;Array.isArray(y)?f=y.find(function(i){return i["-bpmnElement"]===m["-id"]}):f=y,c.push(Yf(f,m))}return c}function Yf(m,y){var c,f=y["-name"];if(f){var i=m["bpmndi:BPMNLabel"]["dc:Bounds"],l=0;f.split(`
`).forEach(function(b){l<b.length&&(l=b.length)}),c={value:f,x:Number(i["-x"])+l*10/2,y:Number(i["-y"])+7}}var s;Object.entries(y).forEach(function(b){var x=Vi(b,2),w=x[0],A=x[1];Hf.indexOf(w)===-1&&(s||(s={}),s[w]=A)}),s&&(s=Yi(s));var g={id:y["-id"],type:Zr.FLOW,pointsList:m["di:waypoint"].map(function(b){return{x:Number(b["-x"]),y:Number(b["-y"])}}),sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:s};return c&&(g.text=c),g}var Mn=function(){function m(y){var c=this,f=y.lf;this.adapterOut=function(i,l){var s=Wu({},c.processAttributes);im(s,i,l);var g={"-id":"BPMNPlane_1","-bpmnElement":s["-id"]};am(g,i);var b=c.definitionAttributes;b["bpmn:process"]=s,b["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":g};var x={"bpmn:definitions":b};return x},this.adapterIn=function(i){if(i)return um(i)},f.adapterIn=function(i){return c.adapterIn(i)},f.adapterOut=function(i,l){return c.adapterOut(i,l)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+Bf()},this.definitionAttributes={"-id":"Definitions_"+Bf(),"-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 m.prototype.setCustomShape=function(y,c){m.shapeConfigMap.set(y,c)},m.pluginName="bpmn-adapter",m.shapeConfigMap=new Map,m}();Mn.shapeConfigMap.set(Zr.START,{width:Cf.width,height:Cf.height}),Mn.shapeConfigMap.set(Zr.END,{width:Rf.width,height:Rf.height}),Mn.shapeConfigMap.set(Zr.GATEWAY,{width:If.width,height:If.height}),Mn.shapeConfigMap.set(Zr.SYSTEM,{width:Lf.width,height:Lf.height}),Mn.shapeConfigMap.set(Zr.USER,{width:zf.width,height:zf.height}),function(m){om(y,m);function y(c){var f=m.call(this,c)||this;f.adapterXmlIn=function(l){var s=nm(l);return f.adapterIn(s)},f.adapterXmlOut=function(l,s){var g=f.adapterOut(l,s);return rm(g)};var i=c.lf;return i.adapterIn=f.adapterXmlIn,i.adapterOut=f.adapterXmlOut,f}return y.pluginName="bpmnXmlAdapter",y}(Mn);var Gf=globalThis&&globalThis.__assign||function(){return Gf=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Gf.apply(this,arguments)};globalThis&&globalThis.__read;var Wf;(function(m){m.HORIZONTAL="horizontal",m.VERTICAL="vertical"})(Wf||(Wf={}));var ox=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;var ix=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;var lm=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l},fm=globalThis&&globalThis.__spread||function(){for(var m=[],y=0;y<arguments.length;y++)m=m.concat(lm(arguments[y]));return m},Ko="lf:defaultNodeMenu",$o="lf:defaultEdgeMenu",Qo="lf:defaultGraphMenu",Zf="lf:defaultSelectionMenu",pm=function(){function m(y){var c=this,f=y.lf;this.__menuDOM=document.createElement("ul"),this.lf=f,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){c.setMenuConfig(i)},this.lf.addMenuConfig=function(i){c.addMenuConfig(i)},this.lf.setMenuByType=function(i){c.setMenuByType(i)}}return m.prototype.init=function(){var y=this,c=[{text:"\u5220\u9664",callback:function(l){y.lf.deleteNode(l.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(l){y.lf.graphModel.editText(l.id)}},{text:"\u590D\u5236",callback:function(l){y.lf.cloneNode(l.id)}}];this.menuTypeMap.set(Ko,c);var f=[{text:"\u5220\u9664",callback:function(l){y.lf.deleteEdge(l.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(l){y.lf.graphModel.editText(l.id)}}];this.menuTypeMap.set($o,f),this.menuTypeMap.set(Qo,[]);var i=[{text:"\u5220\u9664",callback:function(l){y.lf.clearSelectElements(),l.edges.forEach(function(s){return y.lf.deleteEdge(s.id)}),l.nodes.forEach(function(s){return y.lf.deleteNode(s.id)})}}];this.menuTypeMap.set(Zf,i)},m.prototype.render=function(y,c){var f=this;this.__container=c,this.__currentData=null,this.__menuDOM.className="lf-menu",c.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var 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(f.__currentData),f.__menuDOM.style.display="none",f.__currentData=null)},!0),this.lf.on("node:contextmenu",function(i){var l=i.data,s=i.position,g=s.domOverlayPosition,b=g.x,x=g.y,w=l.id,A=f.lf.graphModel.getNodeModelById(w),S=[],P=f.menuTypeMap.get(A.type);A&&A.menu&&Array.isArray(A.menu)?S=A.menu:P?S=P:S=f.menuTypeMap.get(Ko),f.__currentData=l,f.showMenu(b,x,S)}),this.lf.on("edge:contextmenu",function(i){var l=i.data,s=i.position,g=s.domOverlayPosition,b=g.x,x=g.y,w=l.id,A=f.lf.graphModel.getEdgeModelById(w),S=[],P=f.menuTypeMap.get(A.type);A&&A.menu&&Array.isArray(A.menu)?S=A.menu:P?S=P:S=f.menuTypeMap.get($o),f.__currentData=l,f.showMenu(b,x,S)}),this.lf.on("blank:contextmenu",function(i){var l=i.position,s=f.menuTypeMap.get(Qo),g=l.domOverlayPosition,b=g.x,x=g.y;f.showMenu(b,x,s)}),this.lf.on("selection:contextmenu",function(i){var l=i.data,s=i.position,g=f.menuTypeMap.get(Zf),b=s.domOverlayPosition,x=b.x,w=b.y;f.__currentData=l,f.showMenu(x,w,g)}),this.lf.on("node:mousedown",function(){f.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){f.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){f.__menuDOM.style.display="none"})},m.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},m.prototype.showMenu=function(y,c,f){if(!(!f||!f.length)){var i=this.__menuDOM;i.innerHTML="",i.append.apply(i,fm(this.__getMenuDom(f))),i.children.length&&(i.style.display="block",i.style.top=c+"px",i.style.left=y+"px")}},m.prototype.setMenuByType=function(y){!y.type||!y.menu||this.menuTypeMap.set(y.type,y.menu)},m.prototype.__getMenuDom=function(y){var c=[];return y&&y.length>0&&y.forEach(function(f){var i=document.createElement("li");if(f.className?i.className="lf-menu-item "+f.className:i.className="lf-menu-item",f.icon===!0){var l=document.createElement("span");l.className="lf-menu-item-icon",i.appendChild(l)}var s=document.createElement("span");s.className="lf-menu-item-text",f.text&&(s.innerText=f.text),i.appendChild(s),i.onclickCallback=f.callback,c.push(i)}),c},m.prototype.setMenuConfig=function(y){y&&(y.nodeMenu!==void 0&&this.menuTypeMap.set(Ko,y.nodeMenu?y.nodeMenu:[]),y.edgeMenu!==void 0&&this.menuTypeMap.set($o,y.edgeMenu?y.edgeMenu:[]),y.graphMenu!==void 0&&this.menuTypeMap.set(Qo,y.graphMenu?y.graphMenu:[]))},m.prototype.addMenuConfig=function(y){if(y){if(Array.isArray(y.nodeMenu)){var c=this.menuTypeMap.get(Ko);this.menuTypeMap.set(Ko,c.concat(y.nodeMenu))}if(Array.isArray(y.edgeMenu)){var c=this.menuTypeMap.get($o);this.menuTypeMap.set($o,c.concat(y.edgeMenu))}if(Array.isArray(y.graphMenu)){var c=this.menuTypeMap.get(Qo);this.menuTypeMap.set(Qo,c.concat(y.graphMenu))}}},m.prototype.changeMenuItem=function(y,c){if(y==="add")this.addMenuConfig(c);else if(y==="reset")this.setMenuConfig(c);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},m.pluginName="menu",m}();globalThis&&globalThis.__read;var dm=function(){function m(y){var c=this,f=y.lf;this.lf=f,this.lf.setPatternItems=function(i){c.setPatternItems(i)}}return m.prototype.render=function(y,c){var f=this;if(this.destroy(),!this.shapeList||this.shapeList.length===0){this.domContainer=c;return}this.panelEl=document.createElement("div"),this.panelEl.className="lf-dndpanel",this.shapeList.forEach(function(i){f.panelEl.appendChild(f.createDndItem(i))}),c.appendChild(this.panelEl),this.domContainer=c},m.prototype.destroy=function(){this.domContainer&&this.panelEl&&this.domContainer.contains(this.panelEl)&&this.domContainer.removeChild(this.panelEl)},m.prototype.setPatternItems=function(y){this.shapeList=y,this.domContainer&&this.render(this.lf,this.domContainer)},m.prototype.createDndItem=function(y){var c=this,f=document.createElement("div");f.className=y.className?"lf-dnd-item "+y.className:"lf-dnd-item";var i=document.createElement("div");if(i.className="lf-dnd-shape",y.icon&&(i.style.backgroundImage="url("+y.icon+")"),f.appendChild(i),y.label){var l=document.createElement("div");l.innerText=y.label,l.className="lf-dnd-text",f.appendChild(l)}return f.onmousedown=function(){y.type&&c.lf.dnd.startDrag({type:y.type,properties:y.properties,text:y.text}),y.callback&&y.callback(c.lf,c.domContainer)},f.ondblclick=function(s){c.lf.graphModel.eventCenter.emit("dnd:panel-dbclick",{e:s,data:y})},f.onclick=function(s){c.lf.graphModel.eventCenter.emit("dnd:panel-click",{e:s,data:y})},f.oncontextmenu=function(s){c.lf.graphModel.eventCenter.emit("dnd:panel-contextmenu",{e:s,data:y})},f},m.pluginName="dndPanel",m}(),hm=function(){function m(y){var c=this,f=y.lf;this.__disabled=!1,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.__draw=function(l){var s=c.lf.getPointByClient(l.clientX,l.clientY).domOverlayPosition,g=s.x,b=s.y;c.endPoint={x:g,y:b};var x=c.startPoint,w=x.x,A=x.y,S=c.wrapper.style,P=w,D=A,N=g-w,I=b-A;g<w&&(P=g,N=w-g),b<A&&(D=b,I=A-b),S.left=P+"px",S.top=D+"px",S.width=N+"px",S.height=I+"px"},this.__drawOff=function(){document.removeEventListener("mousemove",c.__draw),document.removeEventListener("mouseup",c.__drawOff),c.wrapper.oncontextmenu=null,c.__domContainer.removeChild(c.wrapper);var l=c.startPoint,s=l.x,g=l.y,b=c.endPoint,x=b.x,w=b.y;if(!(Math.abs(x-s)<10&&Math.abs(w-g)<10)){var A=[Math.min(s,x),Math.min(g,w)],S=[Math.max(s,x),Math.max(g,w)],P=c.lf.graphModel.getAreaElement(A,S,c.isWholeEdge,c.isWholeNode,!0),D=c.lf.graphModel.group;P.forEach(function(N){(!D||!D.getNodeGroup(N.id))&&c.lf.selectElementById(N.id,!0)}),c.lf.emit("selection:selected",P)}},this.lf=f;var i=f.getEditConfig().stopMoveGraph;this.isDefaultStopMoveGraph=i,f.openSelectionSelect=function(){c.openSelectionSelect()},f.closeSelectionSelect=function(){c.closeSelectionSelect()}}return m.prototype.render=function(y,c){var f=this;this.__domContainer=c,y.on("blank:mousedown",function(i){var l=i.e,s=y.getEditConfig();if(!(!s.stopMoveGraph||f.__disabled)){var g=l.button===2;if(!g){var b=y.getPointByClient(l.clientX,l.clientY).domOverlayPosition,x=b.x,w=b.y;f.startPoint={x,y:w},f.endPoint={x,y:w};var A=document.createElement("div");A.className="lf-selection-select",A.oncontextmenu=function(S){S.preventDefault()},A.style.top=f.startPoint.y+"px",A.style.left=f.startPoint.x+"px",c.appendChild(A),f.wrapper=A,document.addEventListener("mousemove",f.__draw),document.addEventListener("mouseup",f.__drawOff)}}})},m.prototype.setSelectionSense=function(y,c){y===void 0&&(y=!0),c===void 0&&(c=!0),this.isWholeEdge=y,this.isWholeNode=c},m.prototype.openSelectionSelect=function(){var y=this.lf.getEditConfig().stopMoveGraph;y||(this.isDefaultStopMoveGraph=!1,this.lf.updateEditConfig({stopMoveGraph:!0})),this.open()},m.prototype.closeSelectionSelect=function(){this.isDefaultStopMoveGraph||this.lf.updateEditConfig({stopMoveGraph:!1}),this.close()},m.prototype.open=function(){this.__disabled=!1},m.prototype.close=function(){this.__disabled=!0},m.pluginName="selectionSelect",m}();globalThis&&globalThis.__values;function ym(m){if(m.length<=1)return!1;for(var y=0,c=m.length-1;y!==c&&y+1!==c&&c-1!==y;)y++,c--;return y===c?[--y,c]:[y,c]}var Jf=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),vo=globalThis&&globalThis.__assign||function(){return vo=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},vo.apply(this,arguments)},dn=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l};(function(m){Jf(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.pointFilter=function(c){for(var f=c,i=1;i<f.length-1;){var l=dn(f[i-1],2),s=l[0],g=l[1],b=dn(f[i],2),x=b[0],w=b[1],A=dn(f[i+1],2),S=A[0],P=A[1];s===x&&x===S||g===w&&w===P?f.splice(i,1):i++}return f},y.prototype.getEdge=function(){var c=this.props.model,f=c.points,i=c.isAnimation,l=c.arrowConfig,s=c.radius,g=s===void 0?5:s,b=c.getEdgeStyle(),x=c.getEdgeAnimationStyle(),w=this.pointFilter(f.split(" ").map(function(Pt){return Pt.split(",").map(function(Ct){return Number(Ct)})})),A=ym(w);if(A){var S=dn(A,2),P=S[0],D=S[1],N=w[P],I=w[D],B=N.some(function(Pt,Ct){return Pt===I[Ct]});if(!B){var F=(I[1]-N[1])/2,tt=[I[0],I[1]-F],it=[N[0],N[1]+F];w.splice(P+1,0,it,tt)}}for(var $=dn(w[0],2),G=$[0],J=$[1],z="M"+G+" "+J,T=1;T<w.length-1;T++){var L=dn(w[T-1],2),C=L[0],U=L[1],Q=dn(w[T],2),lt=Q[0],st=Q[1],yt=dn(w[T+1],2),xt=yt[0],vt=yt[1];if(lt===C&&st!==U){var ut=st>U?st-g:st+g;z=z+" L "+lt+" "+ut}if(st===U&&lt!==C){var ht=lt>C?lt-g:lt+g;z=z+" L "+ht+" "+st}if(z=z+" Q "+lt+" "+st,lt===xt&&st!==vt){var ut=st>vt?st-g:st+g;z=z+" "+lt+" "+ut}if(st===vt&&lt!==xt){var ht=lt>xt?lt-g:lt+g;z=z+" "+ht+" "+st}}var mt=dn(w[w.length-1],2),jt=mt[0],It=mt[1];z=z+" L "+jt+" "+It;var Kt=vo(vo(vo({d:z,style:i?x:{}},b),l),{fill:"none"});return Yt.h("path",vo({d:z},Kt))},y})(Yt.PolylineEdge),function(m){Jf(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y}(Yt.PolylineEdgeModel);var Zu,He,Kf,Jn,$f,Qf,Ju,qf={},tp=[],vm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ku=Array.isArray;function Tn(m,y){for(var c in y)m[c]=y[c];return m}function ep(m){var y=m.parentNode;y&&y.removeChild(m)}function qo(m,y,c){var f,i,l,s={};for(l in y)l=="key"?f=y[l]:l=="ref"?i=y[l]:s[l]=y[l];if(arguments.length>2&&(s.children=arguments.length>3?Zu.call(arguments,2):c),typeof m=="function"&&m.defaultProps!=null)for(l in m.defaultProps)s[l]===void 0&&(s[l]=m.defaultProps[l]);return Gi(m,s,f,i,null)}function Gi(m,y,c,f,i){var l={type:m,props:y,key:c,ref:f,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i!=null?i:++Kf};return i==null&&He.vnode!=null&&He.vnode(l),l}function $u(m){return m.children}function go(m,y){this.props=m,this.context=y}function ti(m,y){if(y==null)return m.__?ti(m.__,m.__.__k.indexOf(m)+1):null;for(var c;y<m.__k.length;y++)if((c=m.__k[y])!=null&&c.__e!=null)return c.__e;return typeof m.type=="function"?ti(m):null}function rp(m){var y,c;if((m=m.__)!=null&&m.__c!=null){for(m.__e=m.__c.base=null,y=0;y<m.__k.length;y++)if((c=m.__k[y])!=null&&c.__e!=null){m.__e=m.__c.base=c.__e;break}return rp(m)}}function np(m){(!m.__d&&(m.__d=!0)&&Jn.push(m)&&!Wi.__r++||$f!==He.debounceRendering)&&(($f=He.debounceRendering)||Qf)(Wi)}function Wi(){var m,y,c,f,i,l,s,g;for(Jn.sort(Ju);m=Jn.shift();)m.__d&&(y=Jn.length,f=void 0,i=void 0,s=(l=(c=m).__v).__e,(g=c.__P)&&(f=[],(i=Tn({},l)).__v=l.__v+1,fp(g,l,i,c.__n,g.ownerSVGElement!==void 0,l.__h!=null?[s]:null,f,s!=null?s:ti(l),l.__h),mm(f,l),l.__e!=s&&rp(l)),Jn.length>y&&Jn.sort(Ju));Wi.__r=0}function op(m,y,c,f,i,l,s,g,b,x){var w,A,S,P,D,N,I,B=f&&f.__k||tp,F=B.length;for(c.__k=[],w=0;w<y.length;w++)if((P=c.__k[w]=(P=y[w])==null||typeof P=="boolean"||typeof P=="function"?null:typeof P=="string"||typeof P=="number"||typeof P=="bigint"?Gi(null,P,null,null,P):Ku(P)?Gi($u,{children:P},null,null,null):P.__b>0?Gi(P.type,P.props,P.key,P.ref?P.ref:null,P.__v):P)!=null){if(P.__=c,P.__b=c.__b+1,(S=B[w])===null||S&&P.key==S.key&&P.type===S.type)B[w]=void 0;else for(A=0;A<F;A++){if((S=B[A])&&P.key==S.key&&P.type===S.type){B[A]=void 0;break}S=null}fp(m,P,S=S||qf,i,l,s,g,b,x),D=P.__e,(A=P.ref)&&S.ref!=A&&(I||(I=[]),S.ref&&I.push(S.ref,null,P),I.push(A,P.__c||D,P)),D!=null?(N==null&&(N=D),typeof P.type=="function"&&P.__k===S.__k?P.__d=b=ip(P,b,m):b=ap(m,P,S,B,D,b),typeof c.type=="function"&&(c.__d=b)):b&&S.__e==b&&b.parentNode!=m&&(b=ti(S))}for(c.__e=N,w=F;w--;)B[w]!=null&&(typeof c.type=="function"&&B[w].__e!=null&&B[w].__e==c.__d&&(c.__d=up(f).nextSibling),dp(B[w],B[w]));if(I)for(w=0;w<I.length;w++)pp(I[w],I[++w],I[++w])}function ip(m,y,c){for(var f,i=m.__k,l=0;i&&l<i.length;l++)(f=i[l])&&(f.__=m,y=typeof f.type=="function"?ip(f,y,c):ap(c,f,f,i,f.__e,y));return y}function ap(m,y,c,f,i,l){var s,g,b;if(y.__d!==void 0)s=y.__d,y.__d=void 0;else if(c==null||i!=l||i.parentNode==null)t:if(l==null||l.parentNode!==m)m.appendChild(i),s=null;else{for(g=l,b=0;(g=g.nextSibling)&&b<f.length;b+=1)if(g==i)break t;m.insertBefore(i,l),s=l}return s!==void 0?s:i.nextSibling}function up(m){var y,c,f;if(m.type==null||typeof m.type=="string")return m.__e;if(m.__k){for(y=m.__k.length-1;y>=0;y--)if((c=m.__k[y])&&(f=up(c)))return f}return null}function gm(m,y,c,f,i){var l;for(l in c)l==="children"||l==="key"||l in y||Zi(m,l,null,c[l],f);for(l in y)i&&typeof y[l]!="function"||l==="children"||l==="key"||l==="value"||l==="checked"||c[l]===y[l]||Zi(m,l,y[l],c[l],f)}function cp(m,y,c){y[0]==="-"?m.setProperty(y,c!=null?c:""):m[y]=c==null?"":typeof c!="number"||vm.test(y)?c:c+"px"}function Zi(m,y,c,f,i){var l;t:if(y==="style")if(typeof c=="string")m.style.cssText=c;else{if(typeof f=="string"&&(m.style.cssText=f=""),f)for(y in f)c&&y in c||cp(m.style,y,"");if(c)for(y in c)f&&c[y]===f[y]||cp(m.style,y,c[y])}else if(y[0]==="o"&&y[1]==="n")l=y!==(y=y.replace(/Capture$/,"")),y=y.toLowerCase()in m?y.toLowerCase().slice(2):y.slice(2),m.l||(m.l={}),m.l[y+l]=c,c?f||m.addEventListener(y,l?lp:sp,l):m.removeEventListener(y,l?lp:sp,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!=="rowSpan"&&y!=="colSpan"&&y in m)try{m[y]=c!=null?c:"";break t}catch(s){}typeof c=="function"||(c==null||c===!1&&y[4]!=="-"?m.removeAttribute(y):m.setAttribute(y,c))}}function sp(m){return this.l[m.type+!1](He.event?He.event(m):m)}function lp(m){return this.l[m.type+!0](He.event?He.event(m):m)}function fp(m,y,c,f,i,l,s,g,b){var x,w,A,S,P,D,N,I,B,F,tt,it,$,G,J,z=y.type;if(y.constructor!==void 0)return null;c.__h!=null&&(b=c.__h,g=y.__e=c.__e,y.__h=null,l=[g]),(x=He.__b)&&x(y);try{t:if(typeof z=="function"){if(I=y.props,B=(x=z.contextType)&&f[x.__c],F=x?B?B.props.value:x.__:f,c.__c?N=(w=y.__c=c.__c).__=w.__E:("prototype"in z&&z.prototype.render?y.__c=w=new z(I,F):(y.__c=w=new go(I,F),w.constructor=z,w.render=Om),B&&B.sub(w),w.props=I,w.state||(w.state={}),w.context=F,w.__n=f,A=w.__d=!0,w.__h=[],w._sb=[]),w.__s==null&&(w.__s=w.state),z.getDerivedStateFromProps!=null&&(w.__s==w.state&&(w.__s=Tn({},w.__s)),Tn(w.__s,z.getDerivedStateFromProps(I,w.__s))),S=w.props,P=w.state,w.__v=y,A)z.getDerivedStateFromProps==null&&w.componentWillMount!=null&&w.componentWillMount(),w.componentDidMount!=null&&w.__h.push(w.componentDidMount);else{if(z.getDerivedStateFromProps==null&&I!==S&&w.componentWillReceiveProps!=null&&w.componentWillReceiveProps(I,F),!w.__e&&w.shouldComponentUpdate!=null&&w.shouldComponentUpdate(I,w.__s,F)===!1||y.__v===c.__v){for(y.__v!==c.__v&&(w.props=I,w.state=w.__s,w.__d=!1),w.__e=!1,y.__e=c.__e,y.__k=c.__k,y.__k.forEach(function(T){T&&(T.__=y)}),tt=0;tt<w._sb.length;tt++)w.__h.push(w._sb[tt]);w._sb=[],w.__h.length&&s.push(w);break t}w.componentWillUpdate!=null&&w.componentWillUpdate(I,w.__s,F),w.componentDidUpdate!=null&&w.__h.push(function(){w.componentDidUpdate(S,P,D)})}if(w.context=F,w.props=I,w.__P=m,it=He.__r,$=0,"prototype"in z&&z.prototype.render){for(w.state=w.__s,w.__d=!1,it&&it(y),x=w.render(w.props,w.state,w.context),G=0;G<w._sb.length;G++)w.__h.push(w._sb[G]);w._sb=[]}else do w.__d=!1,it&&it(y),x=w.render(w.props,w.state,w.context),w.state=w.__s;while(w.__d&&++$<25);w.state=w.__s,w.getChildContext!=null&&(f=Tn(Tn({},f),w.getChildContext())),A||w.getSnapshotBeforeUpdate==null||(D=w.getSnapshotBeforeUpdate(S,P)),op(m,Ku(J=x!=null&&x.type===$u&&x.key==null?x.props.children:x)?J:[J],y,c,f,i,l,s,g,b),w.base=y.__e,y.__h=null,w.__h.length&&s.push(w),N&&(w.__E=w.__=null),w.__e=!1}else l==null&&y.__v===c.__v?(y.__k=c.__k,y.__e=c.__e):y.__e=bm(c.__e,y,c,f,i,l,s,b);(x=He.diffed)&&x(y)}catch(T){y.__v=null,(b||l!=null)&&(y.__e=g,y.__h=!!b,l[l.indexOf(g)]=null),He.__e(T,y,c)}}function mm(m,y){He.__c&&He.__c(y,m),m.some(function(c){try{m=c.__h,c.__h=[],m.some(function(f){f.call(c)})}catch(f){He.__e(f,c.__v)}})}function bm(m,y,c,f,i,l,s,g){var b,x,w,A=c.props,S=y.props,P=y.type,D=0;if(P==="svg"&&(i=!0),l!=null){for(;D<l.length;D++)if((b=l[D])&&"setAttribute"in b==!!P&&(P?b.localName===P:b.nodeType===3)){m=b,l[D]=null;break}}if(m==null){if(P===null)return document.createTextNode(S);m=i?document.createElementNS("http://www.w3.org/2000/svg",P):document.createElement(P,S.is&&S),l=null,g=!1}if(P===null)A===S||g&&m.data===S||(m.data=S);else{if(l=l&&Zu.call(m.childNodes),x=(A=c.props||qf).dangerouslySetInnerHTML,w=S.dangerouslySetInnerHTML,!g){if(l!=null)for(A={},D=0;D<m.attributes.length;D++)A[m.attributes[D].name]=m.attributes[D].value;(w||x)&&(w&&(x&&w.__html==x.__html||w.__html===m.innerHTML)||(m.innerHTML=w&&w.__html||""))}if(gm(m,S,A,i,g),w)y.__k=[];else if(op(m,Ku(D=y.props.children)?D:[D],y,c,f,i&&P!=="foreignObject",l,s,l?l[0]:c.__k&&ti(c,0),g),l!=null)for(D=l.length;D--;)l[D]!=null&&ep(l[D]);g||("value"in S&&(D=S.value)!==void 0&&(D!==m.value||P==="progress"&&!D||P==="option"&&D!==A.value)&&Zi(m,"value",D,A.value,!1),"checked"in S&&(D=S.checked)!==void 0&&D!==m.checked&&Zi(m,"checked",D,A.checked,!1))}return m}function pp(m,y,c){try{typeof m=="function"?m(y):m.current=y}catch(f){He.__e(f,c)}}function dp(m,y,c){var f,i;if(He.unmount&&He.unmount(m),(f=m.ref)&&(f.current&&f.current!==m.__e||pp(f,null,y)),(f=m.__c)!=null){if(f.componentWillUnmount)try{f.componentWillUnmount()}catch(l){He.__e(l,y)}f.base=f.__P=null,m.__c=void 0}if(f=m.__k)for(i=0;i<f.length;i++)f[i]&&dp(f[i],y,c||typeof m.type!="function");c||m.__e==null||ep(m.__e),m.__=m.__e=m.__d=void 0}function Om(m,y,c){return this.constructor(m,c)}Zu=tp.slice,He={__e:function(m,y,c,f){for(var i,l,s;y=y.__;)if((i=y.__c)&&!i.__)try{if((l=i.constructor)&&l.getDerivedStateFromError!=null&&(i.setState(l.getDerivedStateFromError(m)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(m,f||{}),s=i.__d),s)return i.__E=i}catch(g){m=g}throw m}},Kf=0,go.prototype.setState=function(m,y){var c;c=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Tn({},this.state),typeof m=="function"&&(m=m(Tn({},c),this.props)),m&&Tn(c,m),m!=null&&this.__v&&(y&&this._sb.push(y),np(this))},go.prototype.forceUpdate=function(m){this.__v&&(this.__e=!0,m&&this.__h.push(m),np(this))},go.prototype.render=$u,Jn=[],Qf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ju=function(m,y){return m.__v.__b-y.__v.__b},Wi.__r=0;var ei=globalThis&&globalThis.__assign||function(){return ei=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},ei.apply(this,arguments)};function Qu(m){var y=m.x,c=m.y,f=m.width,i=m.height,l=m.radius,s=m.className,g=y-f/2,b=c-i/2,x=ei(ei({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 "+s},m),{x:g,y:b});return Yt.h("rect",ei({},x))}Qu.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var mo;(function(m){m.NODE="node",m.CIRCLE_NODE="circle-node",m.POLYGON_NODE="polygon-node",m.RECT_NODE="rect-node",m.HTML_NODE="html-node",m.TEXT_NODE="text-node",m.ELLIPSE_NODE="ellipse-node",m.DIAMOND_NODE="diamond-node",m.EDGE="edge",m.LINE_EDGE="line-edge",m.POLYLINE_EDGE="polyline-edge",m.BEZIER_EDGE="bezier-edge",m.GRAPH="graph"})(mo||(mo={}));function Ji(m){var y=m.x,c=m.y,f=m.width,i=m.height;return{minX:y-f/2,minY:c-i/2,maxX:y+f/2,maxY:c+i/2}}function hp(m){var y=Ji(m),c=m.radius,f=y.minX,i=y.minY,l=y.maxX,s=y.maxY;return[{x:f+c,y:i+c},{x:l-c,y:i+c},{x:l-c,y:s-c},{x:f+c,y:s-c}]}function yp(m){var y=m.point,c=m.beforeNode,f=m.afterNode,i=y.x,l=y.y,s={x:i,y:l},g=c.radius,b=Ji(c),x=Ji(f);if(i===b.minX){s.x=x.minX;var w=(l-c.y)/(c.height/2-g);w?s.y=f.y+(f.height/2-g)*w:s.y=f.y}else if(i===b.maxX){s.x=x.maxX;var w=(l-c.y)/(c.height/2-g);w?s.y=f.y+(f.height/2-g)*w:s.y=f.y}else if(l===b.minY){s.y=x.minY;var w=(i-c.x)/(c.width/2-g);w?s.x=f.x+(f.width/2-g)*w:s.x=f.x}else if(l===b.maxY){s.y=x.maxY;var w=(i-c.x)/(c.width/2-g);w?s.x=f.x+(f.width/2-g)*w:s.x=f.x}else{var A=hp(c),S=hp(f),P=Ji(c),D=P.minX,N=P.minY,I=P.maxX,B=P.maxY,F=-1;if(i-D<g&&l-N<g?F=0:I-i<g&&l-N<g?F=1:I-i<g&&B-l<g?F=2:i-D<g&&N-l<g&&(F=3),F>-1){var tt=Math.atan2(l-A[F].y,i-A[F].x);s.x=S[F].x+g*Math.cos(tt),s.y=S[F].y+g*Math.sin(tt)}}return s}function vp(m){var y=m.point,c=m.beforeNode,f=m.afterNode,i=f.rx,l=f.ry,s=y,g=(y.y-c.y)/(y.x-c.x),b=i,x=l,w,A;return g>=1/0?(w=0,A=x):g<=-1/0?(w=0,A=-x):y.x-c.x>0?(w=b*x/Math.sqrt(x*x+b*b*g*g),A=b*x*g/Math.sqrt(x*x+b*b*g*g)):(w=-(b*x)/Math.sqrt(x*x+b*b*g*g),A=-(b*x*g)/Math.sqrt(x*x+b*b*g*g)),s={x:w+f.x,y:A+f.y},s}function gp(m){var y=m.point,c=m.beforeNode,f=m.afterNode,i=y,l,s,g=y.x-c.x,b=y.y-c.y,x=c.rx,w=c.ry,A=Math.sqrt((x-Math.abs(g))*(x-Math.abs(g))+b*b)/Math.sqrt(x*x+w*w),S=f.rx,P=f.ry,D=Math.sqrt((S*S+P*P)*A*A*(S*S/(S*S+P*P))),N=D*(P/S);return g>=0?l=S-D:l=D-S,b>0?s=N:s=-N,i={x:l+f.x,y:s+f.y},i}var _m=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Kn=globalThis&&globalThis.__assign||function(){return Kn=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Kn.apply(this,arguments)},wm=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l},xm=Yt.LogicFlowUtil.StepDrag,Em=function(m){_m(y,m);function y(c){var f=m.call(this)||this;return f.updatePosition=function(i){var l=i.deltaX,s=i.deltaY,g=f.nodeModel,b=g.x,x=g.y;f.nodeModel.x=b+l/2,f.nodeModel.y=x+s/2,f.nodeModel.moveText(l/2,s/2)},f.getResize=function(i){var l=i.index,s=i.deltaX,g=i.deltaY,b=i.width,x=i.height,w=i.PCTResizeInfo,A=i.pct,S=A===void 0?1:A,P={width:b,height:x,deltaX:s,deltaY:g};if(w){var D=4,N=0,I=0;switch(l){case 0:I=(s*-1-g)/D;break;case 1:I=(s-g)/D;break;case 2:I=(s+g)/D;break;case 3:I=(s*-1+g)/D;break}I!==0&&(N=Math.round(I/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),F=Math.round(w.ResizePCT.hightPCT*w.ResizeBasis.basisHeight/100);switch(l){case 0:s=b-B,g=x-F;break;case 1:s=B-b,g=x-F;break;case 2:s=B-b,g=F-x;break;case 3:s=b-B,g=F-x;break}return P.width=B,P.height=F,P.deltaX=s/S,P.deltaY=g/S,P}switch(l){case 0:P.width=b-s*S,P.height=x-g*S;break;case 1:P.width=b+s*S,P.height=x-g*S;break;case 2:P.width=b+s*S,P.height=x+g*S;break;case 3:P.width=b-s*S,P.height=x+g*S;break}return P},f.updateRect=function(i){var l=i.deltaX,s=i.deltaY,g=f.nodeModel,b=g.id,x=g.x,w=g.y,A=g.width,S=g.height,P=g.radius,D=g.PCTResizeInfo,N=f.index,I=f.getResize({index:N,deltaX:l,deltaY:s,width:A,height:S,PCTResizeInfo:D,pct:1}),B=f.nodeModel,F=B.minWidth,tt=B.minHeight,it=B.maxWidth,$=B.maxHeight;if(I.width<F||I.width>it||I.height<tt||I.height>$){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:I.deltaX,deltaY:I.deltaY}),f.nodeModel.width=I.width,f.nodeModel.height=I.height,f.nodeModel.setProperties({nodeSize:{width:I.width,height:I.height}});var G=f.getNodeEdges(b),J={x,y:w,width:A,height:S,radius:P},z={x:f.nodeModel.x,y:f.nodeModel.y,width:f.nodeModel.width,height:f.nodeModel.height,radius:P},T={point:"",beforeNode:J,afterNode:z},L;G.sourceEdges.forEach(function(C){T.point=C.startPoint,L=yp(T),C.updateStartPoint(L)}),G.targetEdges.forEach(function(C){T.point=C.endPoint,L=yp(T),C.updateEndPoint(L)}),f.eventEmit({beforeNode:J,afterNode:z})},f.updateEllipse=function(i){var l=i.deltaX,s=i.deltaY,g=f.nodeModel,b=g.id,x=g.rx,w=g.ry,A=g.x,S=g.y,P=g.PCTResizeInfo,D=f.index,N=x,I=w,B=f.getResize({index:D,deltaX:l,deltaY:s,width:N,height:I,PCTResizeInfo:P,pct:1/2}),F=f.nodeModel,tt=F.minWidth,it=F.minHeight,$=F.maxWidth,G=F.maxHeight;if(B.width<tt/2||B.width>$/2||B.height<it/2||B.height>G/2){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),f.nodeModel.rx=B.width,f.nodeModel.ry=B.height,f.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var J=f.getNodeEdges(b),z={x:A,y:S},T={rx:B.width,ry:B.height,x:f.nodeModel.x,y:f.nodeModel.y},L={point:{},beforeNode:z,afterNode:T},C;J.sourceEdges.forEach(function(U){L.point=U.startPoint,C=vp(L),U.updateStartPoint(C)}),J.targetEdges.forEach(function(U){L.point=U.endPoint,C=vp(L),U.updateEndPoint(C)}),f.eventEmit({beforeNode:Kn(Kn({},z),{rx:x,ry:w}),afterNode:T})},f.updateDiamond=function(i){var l=i.deltaX,s=i.deltaY,g=f.nodeModel,b=g.id,x=g.rx,w=g.ry,A=g.x,S=g.y,P=g.PCTResizeInfo,D=f.index,N=x,I=w,B=f.getResize({index:D,deltaX:l,deltaY:s,width:N,height:I,PCTResizeInfo:P,pct:1/2}),F=f.nodeModel,tt=F.minWidth,it=F.minHeight,$=F.maxWidth,G=F.maxHeight;if(B.width<tt/2||B.width>$/2||B.height<it/2||B.height>G/2){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),f.nodeModel.rx=B.width,f.nodeModel.ry=B.height,f.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var J={x:A,y:S,rx:x,ry:w},z={rx:B.width,ry:B.height,x:f.nodeModel.x,y:f.nodeModel.y},T={point:{},beforeNode:J,afterNode:z},L,C=f.getNodeEdges(b);C.sourceEdges.forEach(function(U){T.point=U.startPoint,L=gp(T),U.updateStartPoint(L)}),C.targetEdges.forEach(function(U){T.point=U.endPoint,L=gp(T),U.updateEndPoint(L)}),f.eventEmit({beforeNode:J,afterNode:z})},f.eventEmit=function(i){var l=i.beforeNode,s=i.afterNode,g=f.nodeModel,b=g.id,x=g.modelType,w=g.type,A=Kn({id:b,modelType:x,type:w},l),S=Kn({id:b,modelType:x,type:w},s);f.graphModel.eventCenter.emit("node:resize",{oldNodeSize:A,newNodeSize:S})},f.onDragging=function(i){var l,s=i.deltaX,g=i.deltaY,b=f.graphModel.transformModel,x=f.nodeModel.modelType;l=wm(b.fixDeltaXY(s,g),2),s=l[0],g=l[1],x===mo.RECT_NODE||x===mo.HTML_NODE?f.updateRect({deltaX:s,deltaY:g}):x===mo.ELLIPSE_NODE?f.updateEllipse({deltaX:s,deltaY:g}):x===mo.DIAMOND_NODE&&f.updateDiamond({deltaX:s,deltaY:g})},f.onDragEnd=function(){var i=f.graphModel.gridSize,l=i===void 0?1:i,s=l*Math.round(f.nodeModel.x/l),g=l*Math.round(f.nodeModel.y/l);f.nodeModel.moveTo(s,g)},f.index=c.index,f.nodeModel=c.model,f.graphModel=c.graphModel,f.state={},f.dragHandler=new xm({onDragging:f.onDragging,onDragEnd:f.onDragEnd,step:1}),f}return y.prototype.getNodeEdges=function(c){for(var f=this.graphModel,i=f.edges,l=[],s=[],g=0;g<i.length;g++){var b=i[g];b.sourceNodeId===c?l.push(b):i[g].targetNodeId===c&&s.push(b)}return{sourceEdges:l,targetEdges:s}},y.prototype.render=function(){var c=this.props,f=c.x,i=c.y,l=c.index,s=c.model,g=s.getControlPointStyle();return qo("g",{className:"lf-resize-control-"+l},qo(Qu,Kn({className:"lf-node-control"},{x:f,y:i},g,{onMouseDown:this.dragHandler.handleMouseDown})))},y}(go),jm=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Ki=globalThis&&globalThis.__assign||function(){return Ki=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Ki.apply(this,arguments)},$i=function(m){jm(y,m);function y(){var c=m.call(this)||this;return c.state={},c}return y.prototype.getResizeControl=function(){var c=this.props,f=c.model,i=c.graphModel,l=f.x,s=f.y,g=f.width,b=f.height,x={minX:l-g/2,minY:s-b/2,maxX:l+g/2,maxY:s+b/2},w=x.minX,A=x.minY,S=x.maxX,P=x.maxY,D=[{x:w,y:A},{x:S,y:A},{x:S,y:P},{x:w,y:P}];return D.map(function(N,I){return qo(Em,Ki({index:I},N,{model:f,graphModel:i}))})},y.prototype.getGroupSolid=function(){var c=this.props.model,f=c.x,i=c.y,l=c.width,s=c.height,g=c.getResizeOutlineStyle();return qo(Qu,Ki({fill:"none"},g,{x:f,y:i,width:l,height:s}))},y.prototype.render=function(){return qo("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},y}(go),mp=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Sm=function(m){mp(y,m);function y(c,f){var i=m.call(this,c,f)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c,f){},y.prototype.enableProportionResize=function(c){if(c===void 0&&(c=!0),c){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y}(Yt.RectNodeModel),Pm=function(m){mp(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,i=c.graphModel;return Yt.h($i,{model:f,graphModel:i})},y.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,f=c.model.isSelected,i=c.graphModel.editConfigModel.isSilentMode;return Yt.h("g",null,this.getResizeShape(),f&&!i?this.getControlGroup():"")},y}(Yt.RectNode),bp={type:"rect",view:Pm,model:Sm},Op=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}();(function(m){Op(y,m);function y(c,f){var i=m.call(this,c,f)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c){if(c===void 0&&(c=!0),c){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(Yt.EllipseNodeModel),function(m){Op(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,i=c.graphModel;return Yt.h($i,{model:f,graphModel:i})},y.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,f=c.model,i=c.graphModel.editConfigModel.isSilentMode;return Yt.h("g",null,this.getResizeShape(),f.isSelected&&!i?this.getControlGroup():"")},y}(Yt.EllipseNode);var qu=globalThis&&globalThis.__assign||function(){return qu=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},qu.apply(this,arguments)};function Am(m){var y=m.fillOpacity,c=y===void 0?1:y,f=m.strokeWidth,i=f===void 0?1:f,l=m.strokeOpacity,s=l===void 0?1:l,g=m.fill,b=g===void 0?"transparent":g,x=m.stroke,w=x===void 0?"#000":x,A=m.points,S=m.className,P=S===void 0?"lf-basic-shape":S,D={fill:b,fillOpacity:c,strokeWidth:i,stroke:w,strokeOpacity:s,points:"",className:P};return D.points=A.map(function(N){return N.join(",")}).join(" "),Yt.h("polygon",qu({},D))}var _p=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),tc=globalThis&&globalThis.__assign||function(){return tc=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},tc.apply(this,arguments)};(function(m){_p(y,m);function y(c,f){var i=m.call(this,c,f)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c){if(c===void 0&&(c=!0),c){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(Yt.DiamondNodeModel),function(m){_p(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,i=c.graphModel;return Yt.h($i,{model:f,graphModel:i})},y.prototype.getResizeShape=function(){var c=this.props.model,f=c.points,i=c.getNodeStyle();return Yt.h("g",null,Yt.h(Am,tc({},i,{points:f})))},y.prototype.getShape=function(){var c=this.props,f=c.model.isSelected,i=c.graphModel.editConfigModel.isSilentMode;return Yt.h("g",null,this.getResizeShape(),f&&!i?this.getControlGroup():"")},y}(Yt.DiamondNode);var wp=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}();(function(m){wp(y,m);function y(c,f){var i=m.call(this,c,f)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c){if(c===void 0&&(c=!0),c){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(Yt.HtmlNodeModel),function(m){wp(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,i=c.graphModel;return Yt.h($i,{model:f,graphModel:i})},y.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,f=c.model.isSelected,i=c.graphModel.editConfigModel.isSilentMode;return Yt.h("g",null,this.getResizeShape(),f&&!i?this.getControlGroup():"")},y}(Yt.HtmlNode);var xp=globalThis&&globalThis.__extends||function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},m(y,c)};return function(y,c){m(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Qi=globalThis&&globalThis.__assign||function(){return Qi=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Qi.apply(this,arguments)},km=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l},Mm=globalThis&&globalThis.__spread||function(){for(var m=[],y=0;y<arguments.length;y++)m=m.concat(km(arguments[y]));return m},Ep=500,jp=300,Tm=-1e4;(function(m){xp(y,m);function y(){var c=m!==null&&m.apply(this,arguments)||this;return c.isGroup=!0,c.unfoldedWidth=Ep,c.unfoldedHight=jp,c.childrenLastFoldStatus={},c}return y.prototype.initNodeData=function(c){var f=this;m.prototype.initNodeData.call(this,c);var i=[];Array.isArray(c.children)&&(i=c.children),this.children=new Set(i),this.width=Ep,this.height=jp,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=Tm,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(){f.isFolded&&f.foldGroup(f.isFolded)})},y.prototype.getResizeOutlineStyle=function(){var c=m.prototype.getResizeOutlineStyle.call(this);return c.stroke="none",c},y.prototype.foldGroup=function(c){var f=this;if(c!==this.isFolded){this.setProperty("isFolded",c),this.isFolded=c,c?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(l){var s=f.graphModel.getElement(l),g=s.isFolded;if(s.isGroup&&!s.isFolded&&s.foldGroup(c),s.isGroup&&!c){var b=f.childrenLastFoldStatus[l];b!==void 0&&b!==s.isFolded&&s.foldGroup(b)}f.childrenLastFoldStatus[l]=g,s.visible=!c,i=i.concat(s.incoming.edges.concat(s.outgoing.edges))}),this.foldEdge(c,i)}},y.prototype.getAnchorStyle=function(c){var f=m.prototype.getAnchorStyle.call(this,c);return f.stroke="transparent",f.fill="transparent",f.hover.fill="transparent",f.hover.stroke="transparent",f},y.prototype.foldEdge=function(c,f){var i=this;f.forEach(function(l,s){var g=l.id,b=l.sourceNodeId,x=l.targetNodeId,w=l.startPoint,A=l.endPoint,S=l.type,P=l.text,D=l.getProperties(),N={id:g+"__"+s,sourceNodeId:b,targetNodeId:x,startPoint:w,endPoint:A,type:S,properties:D,text:P==null?void 0:P.value};l.virtual&&i.graphModel.deleteEdgeById(l.id);var I=i.graphModel.group.getNodeGroup(x);I||(I=i.graphModel.getNodeModelById(x));var B=i.graphModel.group.getNodeGroup(b);B||(B=i.graphModel.getNodeModelById(b)),c&&l.visible!==!1&&(i.children.has(b)||i.id===b?(N.startPoint=void 0,N.sourceNodeId=i.id):(N.endPoint=void 0,N.targetNodeId=i.id),(I.id!==i.id||B.id!==i.id)&&i.createVirtualEdge(N),l.visible=!1),!c&&l.visible===!1&&(I&&I.isGroup&&I.isFolded?(N.targetNodeId=I.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(c){c.pointsList=void 0;var f=this.graphModel.addEdge(c);f.virtual=!0,f.text.editable=!1,f.isFoldedEdge=!0},y.prototype.isInRange=function(c){var f=c.x1,i=c.y1,l=c.x2,s=c.y2;return f>=this.x-this.width/2&&l<=this.x+this.width/2&&i>=this.y-this.height/2&&s<=this.y+this.height/2},y.prototype.isAllowMoveTo=function(c){var f=c.x1,i=c.y1,l=c.x2,s=c.y2;return{x:f>=this.x-this.width/2&&l<=this.x+this.width/2,y:i>=this.y-this.height/2&&s<=this.y+this.height/2}},y.prototype.setAllowAppendChild=function(c){this.setProperty("groupAddable",c)},y.prototype.addChild=function(c){this.children.add(c)},y.prototype.removeChild=function(c){this.children.delete(c)},y.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},y.prototype.getData=function(){var c=this,f=m.prototype.getData.call(this);f.children=[],this.children.forEach(function(l){var s=c.graphModel.getNodeModelById(l);s&&!s.virtual&&f.children.push(l)});var i=f.properties;return delete i.groupAddable,delete i.isFolded,f},y.prototype.getHistoryData=function(){var c=m.prototype.getData.call(this);c.children=Mm(this.children),c.isGroup=!0;var f=c.properties;return delete f.groupAddable,f.isFolded&&(c.x=c.x+this.unfoldedWidth/2-this.foldedWidth/2,c.y=c.y+this.unfoldedHight/2-this.foldedHeight/2),c},y.prototype.isAllowAppendIn=function(c){return!0},y.prototype.toBack=function(){this.zIndex--},y})(bp.model),function(m){xp(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props.model,f=c.resizable,i=c.properties;return f&&!i.isFolded?m.prototype.getControlGroup.call(this):null},y.prototype.getAddableShape=function(){var c=this.props.model,f=c.width,i=c.height,l=c.x,s=c.y,g=c.radius,b=c.properties;if(!b.groupAddable)return null;var x=this.props.model.getNodeStyle().strokeWidth,w=this.props.model.getAddableOutlineStyle(),A=f+x+8,S=i+x+8;return Yt.h("rect",Qi(Qi({},w),{width:A,height:S,x:l-A/2,y:s-S/2,rx:g,ry:g}))},y.prototype.getFoldIcon=function(){var c=this.props.model,f=c.x-c.width/2+5,i=c.y-c.height/2+5;if(!c.foldable)return null;var l=Yt.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:c.properties.isFolded?"M "+(f+3)+","+(i+6)+" "+(f+11)+","+(i+6)+" M"+(f+7)+","+(i+2)+" "+(f+7)+","+(i+10):"M "+(f+3)+","+(i+6)+" "+(f+11)+","+(i+6)+" "});return Yt.h("g",{},[Yt.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:c.x-c.width/2+5,y:c.y-c.height/2+5,onClick:function(){c.foldGroup(!c.properties.isFolded)}}),l])},y.prototype.getResizeShape=function(){return Yt.h("g",{},[this.getAddableShape(),m.prototype.getResizeShape.call(this),this.getFoldIcon()])},y}(bp.view);var ax=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;var Sp=globalThis&&globalThis.__assign||function(){return Sp=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Sp.apply(this,arguments)},Pp=globalThis&&globalThis.__assign||function(){return Pp=Object.assign||function(m){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(m[i]=y[i])}return m},Pp.apply(this,arguments)},ux=globalThis&&globalThis.__read||function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var f=c.call(m),i,l=[],s;try{for(;(y===void 0||y-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(g){s={error:g}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;const Dm={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function Nm(m){const{incoming:y,outgoing:c,properties:f,key:i}=m,{text:l,startPoint:s,endPoint:g,pointsList:b,logicFlowType:x}=f,w={id:i,type:x,sourceNodeId:y[0],targetNodeId:c[0],text:l,startPoint:s,endPoint:g,pointsList:b,properties:{}},A=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(m.properties).forEach(S=>{A.indexOf(S)===-1&&(w.properties[S]=m.properties[S])}),w}function Cm(m){const{properties:y,key:c}=m,{x:f,y:i,text:l,logicFlowType:s}=y,g={id:c,type:s,x:f,y:i,text:l,properties:{}},b=["x","y","text","logicFlowType"];return Object.keys(m.properties).forEach(x=>{b.indexOf(x)===-1&&(g.properties[x]=m.properties[x])}),g}function Rm(m){const y={nodes:[],edges:[]},c=m.flowElementList;return c&&c.length>0&&c.forEach(f=>{if(f.type===Dm.SEQUENCE_FLOW){const i=Nm(f);y.edges.push(i)}else{const i=Cm(f);y.nodes.push(i)}}),y}function Im(m){return[{text:"\u9009\u533A",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAOVJREFUOBGtVMENwzAIjKP++2026ETdpv10iy7WFbqFyyW6GBywLCv5gI+Dw2Bluj1znuSjhb99Gkn6QILDY2imo60p8nsnc9bEo3+QJ+AKHfMdZHnl78wyTnyHZD53Zzx73MRSgYvnqgCUHj6gwdck7Zsp1VOrz0Uz8NbKunzAW+Gu4fYW28bUYutYlzSa7B84Fh7d1kjLwhcSdYAYrdkMQVpsBr5XgDGuXwQfQr0y9zwLda+DUYXLaGKdd2ZTtvbolaO87pdo24hP7ov16N0zArH1ur3iwJpXxm+v7oAJNR4JEP8DoAuSFEkYH7cAAAAASUVORK5CYII=",callback:()=>{m.updateEditConfig({stopMoveGraph:!0})}},{type:"circle",text:"\u5F00\u59CB",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAnBJREFUOBGdVL1rU1EcPfdGBddmaZLiEhdx1MHZQXApraCzQ7GKLgoRBxMfcRELuihWKcXFRcEWF8HBf0DdDCKYRZpnl7p0svLe9Zzbd29eQhTbC8nv+9zf130AT63jvooOGS8Vf9Nt5zxba7sXQwODfkWpkbjTQfCGUd9gIp3uuPP8bZ946g56dYQvnBg+b1HB8VIQmMFrazKcKSvFW2dQTxJnJdQ77urmXWOMBCmXM2Rke4S7UAW+/8ywwFoewmBps2tu7mbTdp8VMOkIRAkKfrVawalJTtIliclFbaOBqa0M2xImHeVIfd/nKAfVq/LGnPss5Kh00VEdSzfwnBXPUpmykNss4lUI9C1ga+8PNrBD5YeqRY2Zz8PhjooIbfJXjowvQJBqkmEkVnktWhwu2SM7SMx7Cj0N9IC0oQXRo8xwAGzQms+xrB/nNSUWVveI48ayrFGyC2+E2C+aWrZHXvOuz+CiV6iycWe1Rd1Q6+QUG07nb5SbPrL4426d+9E1axKjY3AoRrlEeSQo2Eu0T6BWAAr6COhTcWjRaYfKG5csnvytvUr/WY4rrPMB53Uo7jZRjXaG6/CFfNMaXEu75nG47X+oepU7PKJvvzGDY1YLSKHJrK7vFUwXKkaxwhCW3u+sDFMVrIju54RYYbFKpALZAo7sB6wcKyyrd+aBMryMT2gPyD6GsQoRFkGHr14TthZni9ck0z+Pnmee460mHXbRAypKNy3nuMdrWgVKj8YVV8E7PSzp1BZ9SJnJAsXdryw/h5ctboUVi4AFiCd+lQaYMw5z3LGTBKjLQOeUF35k89f58Vv/tGh+l+PE/wG0rgfIUbZK5AAAAABJRU5ErkJggg=="},{type:"rect",text:"\u7528\u6237\u4EFB\u52A1",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAEFVwZaAAAABGdBTUEAALGPC/xhBQAAAqlJREFUOBF9VM9rE0EUfrMJNUKLihGbpLGtaCOIR8VjQMGDePCgCCIiCNqzCAp2MyYUCXhUtF5E0D+g1t48qAd7CCLqQUQKEWkStcEfVGlLdp/fm3aW2QQdyLzf33zz5m2IsAZ9XhDpyaaIZkTS4ASzK41TFao88GuJ3hsr2pAbipHxuSYyKRugagICGANkfFnNh3HeE2N0b3nN2cgnpcictw5veJIzxmDamSlxxQZicq/mflxhbaH8BLRbuRwNtZp0JAhoplVRUdzmCe/vO27wFuuA3S5qXruGdboy5/PRGFsbFGKo/haRtQHIrM83bVeTrOgNhZReWaYGnE4aUQgTJNvijJFF4jQ8BxJE5xfKatZWmZcTQ+BVgh7s8SgPlCkcec4mGTmieTP4xd7PcpIEg1TX6gdeLW8rTVMVLVvb7ctXoH0Cydl2QOPJBG21STE5OsnbweVYzAnD3A7PVILuY0yiiyDwSm2g441r6rMSgp6iK42yqroI2QoXeJVeA+YeZSa47gZdXaZWQKTrG93rukk/l2Al6Kzh5AZEl7dDQy+JjgFahQjRopSxPbrbvK7GRe9ePWBo1wcU7sYrFZtavXALwGw/7Dnc50urrHJuTPSoO2IMV3gUQGNg87IbSOIY9BpiT9HV7FCZ94nPXb3MSnwHn/FFFE1vG6DTby+r31KAkUktB3Qf6ikUPWxW1BkXSPQeMHHiW0+HAd2GelJsZz1OJegCxqzl+CLVHa/IibuHeJ1HAKzhuDR+ymNaRFM+4jU6UWKXorRmbyqkq/D76FffevwdCp+jN3UAN/C9JRVTDuOxC/oh+EdMnqIOrlYteKSfadVRGLJFJPSB/ti/6K8f0CNymg/iH2gO/f0DwE0yjAFO6l8JaR5j0VPwPwfaYHqOqrCI319WzwhwzNW/aQAAAABJRU5ErkJggg==",cls:"important-node"},{type:"rect",text:"\u7CFB\u7EDF\u4EFB\u52A1",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAEFVwZaAAAABGdBTUEAALGPC/xhBQAAAqlJREFUOBF9VM9rE0EUfrMJNUKLihGbpLGtaCOIR8VjQMGDePCgCCIiCNqzCAp2MyYUCXhUtF5E0D+g1t48qAd7CCLqQUQKEWkStcEfVGlLdp/fm3aW2QQdyLzf33zz5m2IsAZ9XhDpyaaIZkTS4ASzK41TFao88GuJ3hsr2pAbipHxuSYyKRugagICGANkfFnNh3HeE2N0b3nN2cgnpcictw5veJIzxmDamSlxxQZicq/mflxhbaH8BLRbuRwNtZp0JAhoplVRUdzmCe/vO27wFuuA3S5qXruGdboy5/PRGFsbFGKo/haRtQHIrM83bVeTrOgNhZReWaYGnE4aUQgTJNvijJFF4jQ8BxJE5xfKatZWmZcTQ+BVgh7s8SgPlCkcec4mGTmieTP4xd7PcpIEg1TX6gdeLW8rTVMVLVvb7ctXoH0Cydl2QOPJBG21STE5OsnbweVYzAnD3A7PVILuY0yiiyDwSm2g441r6rMSgp6iK42yqroI2QoXeJVeA+YeZSa47gZdXaZWQKTrG93rukk/l2Al6Kzh5AZEl7dDQy+JjgFahQjRopSxPbrbvK7GRe9ePWBo1wcU7sYrFZtavXALwGw/7Dnc50urrHJuTPSoO2IMV3gUQGNg87IbSOIY9BpiT9HV7FCZ94nPXb3MSnwHn/FFFE1vG6DTby+r31KAkUktB3Qf6ikUPWxW1BkXSPQeMHHiW0+HAd2GelJsZz1OJegCxqzl+CLVHa/IibuHeJ1HAKzhuDR+ymNaRFM+4jU6UWKXorRmbyqkq/D76FffevwdCp+jN3UAN/C9JRVTDuOxC/oh+EdMnqIOrlYteKSfadVRGLJFJPSB/ti/6K8f0CNymg/iH2gO/f0DwE0yjAFO6l8JaR5j0VPwPwfaYHqOqrCI319WzwhwzNW/aQAAAABJRU5ErkJggg==",cls:"import_icon"},{type:"diamond",text:"\u6761\u4EF6\u5224\u65AD",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAAHeEJUAAAAABGdBTUEAALGPC/xhBQAAAvVJREFUOBGNVEFrE0EU/mY3bQoiFlOkaUJrQUQoWMGePLX24EH0IIoHKQiCV0G8iE1covgLiqA/QTzVm1JPogc9tIJYFaQtlhQxqYjSpunu+L7JvmUTU3AgmTfvffPNN++9WSA1DO182f6xwILzD5btfAoQmwL5KJEwiQyVbSVZ0IgRyV6PTpIJ81E5ZvqfHQR0HUOBHW4L5Et2kQ6Zf7iAOhTFAA8s0pEP7AXO1uAA52SbqGk6h/6J45LaLhO64ByfcUzM39V7ZiAdS2yCePPEIQYvTUHqM/n7dgQNfBKWPjpF4ISk8q3J4nB11qw6X8l+FsF3EhlkEMfrjIer3wJTLwS2aCNcj4DbGxXTw00JmAuO+Ni6bBxVUCvS5d9aa04+so4pHW5jLTywuXAL7jJ+D06sl82Sgl2JuVBQn498zkc2bGKxULHjCnSMadBKYDYYHAtsby1EQ5lNGrQd4Y3v4Zo0XdGEmDno46yCM9Tk+RiJmUYHS/aXHPNTcjxcbTFna000PFJHIVZ5lFRqRpJWk9/+QtlOUYJj9HG5pVFEU7zqIYDVsw2s+AJaD8wTd2umgSCCyUxgGsS1Y6TBwXQQTFuZaHcd8gAGioE90hlsY+wMcs30RduYtxanjMGal8H5dMW67dmT1JFtYUEe8LiQLRsPZ6IIc7A4J5tqco3T0pnv/4u0kyzrYUq7gASuEyI8VXKvB9Odytv6jS/PNaZBln0nioJG/AVQRZvApOdhjj3Jt8QC8Im09SafwdBdvIpztpxWxpeKCC+EsFdS8DCyuCn2munFpL7ctHKp+Xc5cMybeIyMAN33SPL3ZR9QV1XVwLyzHm6Iv0/yeUuUb7PPlZC4D4HZkeu6dpF4v9j9MreGtMbxMMRLIcjJic9yHi7WQ3yVKzZVWUr5UrViJvn1FfUlwe/KYVfYyWRLSGNu16hR01U9IacajXPei0wx/5BqgInvJN+MMNtNme7ReU9SBbgntovn0kKHpFg7UogZvaZiOue/q1SBo9ktHzQAAAAASUVORK5CYII="},{type:"circle",text:"\u7ED3\u675F",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAA1BJREFUOBFtVE1IVUEYPXOf+tq40Y3vPcmFIdSjIorWoRG0ERWUgnb5FwVhYQSl72oUoZAboxKNFtWiwKRN0M+jpfSzqJAQclHo001tKkjl3emc8V69igP3znzfnO/M9zcDcKT67azmjYWTwl9Vn7Vumeqzj1DVb6cleQY4oAVnIOPb+mKAGxQmKI5CWNJ2aLPatxWa3aB9K7/fB+/Z0jUF6TmMlFLQqrkECWQzOZxYGjTlOl8eeKaIY5yHnFn486xBustDjWT6dG7pmjHOJd+33t0iitTPkK6tEvjxq4h2MozQ6WFSX/LkDUGfFwfhEZj1Auz/U4pyAi5Sznd7uKzznXeVHlI/Aywmk6j7fsUsEuCGADrWARXXwjxWQsUbIupDHJI7kF5dRktg0eN81IbiZXiTESic50iwS+t1oJgL83jAiBupLDCQqwziaWSoAFSeIR3P5Xv5az00wyIn35QRYTwdSYbz8pH8fxUUAtxnFvYmEmgI0wYXUXcCCSpeEVpXlsRhBnCEATxWylL9+EKCAYhe1NGstUa6356kS9NVvt3DU2fd+Wtbm/+lSbylJqsqkSm9CRhvoJVlvKPvF1RKY/FcPn5j4UfIMLn8D4UYb54BNsilTDXKnF4CfTobA0FpoW/LSp306wkXM+XaOJhZaFkcNM82ASNAWMrhrUbRfmyeI1FvRBTpN06WKxa9BK0o2E4Pd3zfBBEwPsv9sQBnmLVbLEIZ/Xe9LYwJu/Er17W6HYVBc7vmuk0xUQ+pqxdom5Fnp55SiytXLPYoMXNM4u4SNSCFWnrVIzKG3EGyMXo6n/BQOe+bX3FClY4PwydVhthOZ9NnS+ntiLh0fxtlUJHAuGaFoVmttpVMeum0p3WEXbcll94l1wM/gZ0Ccczop77VvN2I7TlsZCsuXf1WHvWEhjO8DPtyOVg2/mvK9QqboEth+7pD6NUQC1HN/TwvydGBARi9MZSzLE4b8Ru3XhX2PBxf8E1er2A6516o0w4sIA+lwURhAON82Kwe2iDAC1Watq4XHaGQ7skLcFOtI5lDxuM2gZe6WFIotPAhbaeYlU4to5cuarF1QrcZ/lwrLaCJl66JBocYZnrNlvm2+MBCTmUymPrYZVbjdlr/BxlMjmNmNI3SAAAAAElFTkSuQmCC"}]}const Lm=Eg({name:"FlowChart",components:{BasicModal:Qw,FlowChartToolbar:Zo,JsonPreview:ex},props:{flowOptions:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})},toolbar:{type:Boolean,default:!0},patternItems:{type:Array}},setup(m){const y=Hu(null),c=Hu({}),f=Hu(null),{prefixCls:i}=Cw("flow-chart"),l=Rw(),[s,{openModal:g}]=qw();nr({logicFlow:f});const b=Gw(()=>{const{flowOptions:S}=m;return Ef({grid:!0,background:{color:l.getDarkMode==="light"?"#f7f9ff":"#151515"},keyboard:{enabled:!0}},S)});Pg(()=>m.data,()=>{w()}),Pg(()=>vr(b),S=>{var P;(P=vr(f))==null||P.updateEditConfig(S)});function x(){return Li(this,null,function*(){yield jf();const S=vr(y);if(!S)return;po.use(dm),po.use(Qg),po.use($g),po.use(pm),po.use(hm),f.value=new po(wg(Ef({},vr(b)),{container:S}));const P=vr(f);P==null||P.setDefaultEdgeType("line"),w(),P==null||P.setPatternItems(m.patternItems||Im(P))})}function w(){return Li(this,null,function*(){yield jf();const S=vr(f);if(!S)return;const P=Rm(m.data);S.render(P)})}function A(){const S=vr(f);S&&(c.value=vr(S).getGraphData(),g())}return Ww(x),{register:s,prefixCls:i,lfElRef:y,handlePreview:A,graphData:c}}}),zm={ref:"lfElRef",class:"h-full"};function Bm(m,y,c,f,i,l){const s=Wo("FlowChartToolbar"),g=Wo("JsonPreview"),b=Wo("BasicModal");return fo(),zi("div",{class:Xu(["h-full",m.prefixCls])},[m.toolbar?(fo(),Sg(s,{key:0,prefixCls:m.prefixCls,onViewData:m.handlePreview},null,8,["prefixCls","onViewData"])):Pf("",!0),Zw("div",zm,null,512),Fu(b,{onRegister:m.register,title:"\u6D41\u7A0B\u6570\u636E",width:"50%"},{default:Sf(()=>[Fu(g,{data:m.graphData},null,8,["data"])]),_:1},8,["onRegister"])],2)}let Ap;Ap=xg(Lm,[["render",Bm]]),Ag=Iw(Ap)}));export{Ag as F,nx as __tla};