mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
115 lines
660 KiB
JavaScript
115 lines
660 KiB
JavaScript
import{b8 as fo,b9 as Or,ba as vt,bb as pm,bc as fr,bd as Za,be as po,bf as ai,bg as B0,bh as ur,bi as pr,bj as Ct,bk as iP,bl as xr,bm as Dd,bn as aP,bo as Ja,bp as sr,bq as Qa,br as z0,bs as Lo,bt as eu,bu as Bn,bv as F0,bw as ho,bx as $0,by as Bo,bz as zo,bA as mc,bB as wt,bC as tu,bD as Ki,bE as It,bF as co,bG as Ln,bH as ui,bI as nu,bJ as dr,bK as Kt,bL as yt,bM as si,bN as uP,bO as qi,bP as W0,bQ as $r,bR as G0,bS as H0,bT as hd,bU as ln,bV as sP,bW as cP,bX as ru,bY as U0,bZ as ci,b_ as X0,b$ as yo,c0 as Y0,c1 as Nd,c2 as lP,c3 as Zi,c4 as fP,c5 as Co,c6 as ou,c7 as V0,c8 as _c,c9 as Oc,ca as Vi,cb as Rd,cc as Cd,cd as K0,ce as q0,cf as pP,cg as Z0,ch as J0,ci as dP,cj as Q0,ck as hP,cl as yP,cm as gP,cn as vP,co as rc,cp as bP,cq as e_,cr as mP,cs as _P,ct as t_,cu as n_,cv as Id,cw as r_,cx as OP,cy as wP,cz as xP,cA as EP,cB as ii,cC as SP,cD as jP,cE as PP,cF as AP,cG as TP,cH as MP,cI as kP,cJ as DP,cK as NP,cL as RP,cM as CP,cN as IP,cO as LP,cP as BP,cQ as zP,cR as FP,cS as $P,cT as WP,cU as GP,cV as HP,cW as UP,cX as XP,cY as YP,cZ as VP,c_ as KP,V as qP,d as wc,r as so,o as o_,u as An,c as Ha,n as oi,h as lo,F as i_,y as a_,g as Fr,an as dm,j as Fi,w as $i,J as hm,at as u_,_ as Ld,k as s_,t as ZP,f as yd,X as Bd,i as ym,p as JP,m as QP}from"./index.js";import{u as eA}from"./hooks.js";import{V as tA}from"./styles.js";import{d as nA}from"./set-up.js";import"./vue.runtime.esm-bundler.js";var rA=0/0;function gm(r){return typeof r=="number"?r:fo(r)?rA:+r}function xc(r,u){return function(a,l){var o;if(a===void 0&&l===void 0)return u;if(a!==void 0&&(o=a),l!==void 0){if(o===void 0)return l;typeof a=="string"||typeof l=="string"?(a=Or(a),l=Or(l)):(a=gm(a),l=gm(l)),o=r(a,l)}return o}}var oA=xc(function(r,u){return r+u},0);const iA=oA;var aA="Expected a function";function uA(r,u){if(typeof u!="function")throw new TypeError(aA);return r=vt(r),function(){if(--r<1)return u.apply(this,arguments)}}var sA=pm&&new pm;const oc=sA;var cA=oc?function(r,u){return oc.set(r,u),r}:fr;const c_=cA;function Ka(r){return function(){var u=arguments;switch(u.length){case 0:return new r;case 1:return new r(u[0]);case 2:return new r(u[0],u[1]);case 3:return new r(u[0],u[1],u[2]);case 4:return new r(u[0],u[1],u[2],u[3]);case 5:return new r(u[0],u[1],u[2],u[3],u[4]);case 6:return new r(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new r(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var a=Za(r.prototype),l=r.apply(a,u);return po(l)?l:a}}var lA=1;function fA(r,u,a){var l=u&lA,o=Ka(r);function p(){var d=this&&this!==ai&&this instanceof p?o:r;return d.apply(l?a:this,arguments)}return p}var pA=Math.max;function l_(r,u,a,l){for(var o=-1,p=r.length,d=a.length,g=-1,v=u.length,O=pA(p-d,0),E=Array(v+O),w=!l;++g<v;)E[g]=u[g];for(;++o<d;)(w||o<p)&&(E[a[o]]=r[o]);for(;O--;)E[g++]=r[o++];return E}var dA=Math.max;function f_(r,u,a,l){for(var o=-1,p=r.length,d=-1,g=a.length,v=-1,O=u.length,E=dA(p-g,0),w=Array(E+O),j=!l;++o<E;)w[o]=r[o];for(var P=o;++v<O;)w[P+v]=u[v];for(;++d<g;)(j||o<p)&&(w[P+a[d]]=r[o++]);return w}function hA(r,u){for(var a=r.length,l=0;a--;)r[a]===u&&++l;return l}function Ec(){}var yA=4294967295;function Et(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=yA,this.__views__=[]}Et.prototype=Za(Ec.prototype);Et.prototype.constructor=Et;var gA=oc?function(r){return oc.get(r)}:B0;const zd=gA;var vA={};const Ui=vA;var bA=Object.prototype,mA=bA.hasOwnProperty;function Js(r){for(var u=r.name+"",a=Ui[u],l=mA.call(Ui,u)?a.length:0;l--;){var o=a[l],p=o.func;if(p==null||p==r)return o.name}return u}function cr(r,u){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=void 0}cr.prototype=Za(Ec.prototype);cr.prototype.constructor=cr;function p_(r){if(r instanceof Et)return r.clone();var u=new cr(r.__wrapped__,r.__chain__);return u.__actions__=ur(r.__actions__),u.__index__=r.__index__,u.__values__=r.__values__,u}var _A=Object.prototype,OA=_A.hasOwnProperty;function R(r){if(pr(r)&&!Ct(r)&&!(r instanceof Et)){if(r instanceof cr)return r;if(OA.call(r,"__wrapped__"))return p_(r)}return new cr(r)}R.prototype=Ec.prototype;R.prototype.constructor=R;function gd(r){var u=Js(r),a=R[u];if(typeof a!="function"||!(u in Et.prototype))return!1;if(r===a)return!0;var l=zd(a);return!!l&&r===l[0]}var wA=iP(c_);const d_=wA;var xA=/\{\n\/\* \[wrapped with (.+)\] \*/,EA=/,? & /;function SA(r){var u=r.match(xA);return u?u[1].split(EA):[]}var jA=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function PA(r,u){var a=u.length;if(!a)return r;var l=a-1;return u[l]=(a>1?"& ":"")+u[l],u=u.join(a>2?", ":" "),r.replace(jA,`{
|
||
/* [wrapped with `+u+`] */
|
||
`)}var AA=1,TA=2,MA=8,kA=16,DA=32,NA=64,RA=128,CA=256,IA=512,LA=[["ary",RA],["bind",AA],["bindKey",TA],["curry",MA],["curryRight",kA],["flip",IA],["partial",DA],["partialRight",NA],["rearg",CA]];function BA(r,u){return xr(LA,function(a){var l="_."+a[0];u&a[1]&&!Dd(r,l)&&r.push(l)}),r.sort()}function h_(r,u,a){var l=u+"";return aP(r,PA(l,BA(SA(l),a)))}var zA=1,FA=2,$A=4,WA=8,vm=32,bm=64;function y_(r,u,a,l,o,p,d,g,v,O){var E=u&WA,w=E?d:void 0,j=E?void 0:d,P=E?p:void 0,M=E?void 0:p;u|=E?vm:bm,u&=~(E?bm:vm),u&$A||(u&=~(zA|FA));var T=[r,u,o,P,w,M,j,g,v,O],k=a.apply(void 0,T);return gd(r)&&d_(k,T),k.placeholder=l,h_(k,r,u)}function Ji(r){var u=r;return u.placeholder}var GA=Math.min;function HA(r,u){for(var a=r.length,l=GA(u.length,a),o=ur(r);l--;){var p=u[l];r[l]=Ja(p,a)?o[p]:void 0}return r}var mm="__lodash_placeholder__";function Io(r,u){for(var a=-1,l=r.length,o=0,p=[];++a<l;){var d=r[a];(d===u||d===mm)&&(r[a]=mm,p[o++]=a)}return p}var UA=1,XA=2,YA=8,VA=16,KA=128,qA=512;function Sc(r,u,a,l,o,p,d,g,v,O){var E=u&KA,w=u&UA,j=u&XA,P=u&(YA|VA),M=u&qA,T=j?void 0:Ka(r);function k(){for(var I=arguments.length,L=Array(I),Y=I;Y--;)L[Y]=arguments[Y];if(P)var Q=Ji(k),X=hA(L,Q);if(l&&(L=l_(L,l,o,P)),p&&(L=f_(L,p,d,P)),I-=X,P&&I<O){var V=Io(L,Q);return y_(r,u,Sc,k.placeholder,a,L,V,g,v,O-I)}var Z=w?a:this,F=j?Z[r]:r;return I=L.length,g?L=HA(L,g):M&&I>1&&L.reverse(),E&&v<I&&(L.length=v),this&&this!==ai&&this instanceof k&&(F=T||Ka(F)),F.apply(Z,L)}return k}function ZA(r,u,a){var l=Ka(r);function o(){for(var p=arguments.length,d=Array(p),g=p,v=Ji(o);g--;)d[g]=arguments[g];var O=p<3&&d[0]!==v&&d[p-1]!==v?[]:Io(d,v);if(p-=O.length,p<a)return y_(r,u,Sc,o.placeholder,void 0,d,O,void 0,void 0,a-p);var E=this&&this!==ai&&this instanceof o?l:r;return sr(E,this,d)}return o}var JA=1;function QA(r,u,a,l){var o=u&JA,p=Ka(r);function d(){for(var g=-1,v=arguments.length,O=-1,E=l.length,w=Array(E+v),j=this&&this!==ai&&this instanceof d?p:r;++O<E;)w[O]=l[O];for(;v--;)w[O++]=arguments[++g];return sr(j,o?a:this,w)}return d}var _m="__lodash_placeholder__",ud=1,eT=2,tT=4,Om=8,Fa=128,wm=256,nT=Math.min;function rT(r,u){var a=r[1],l=u[1],o=a|l,p=o<(ud|eT|Fa),d=l==Fa&&a==Om||l==Fa&&a==wm&&r[7].length<=u[8]||l==(Fa|wm)&&u[7].length<=u[8]&&a==Om;if(!(p||d))return r;l&ud&&(r[2]=u[2],o|=a&ud?0:tT);var g=u[3];if(g){var v=r[3];r[3]=v?l_(v,g,u[4]):g,r[4]=v?Io(r[3],_m):u[4]}return g=u[5],g&&(v=r[5],r[5]=v?f_(v,g,u[6]):g,r[6]=v?Io(r[5],_m):u[6]),g=u[7],g&&(r[7]=g),l&Fa&&(r[8]=r[8]==null?u[8]:nT(r[8],u[8])),r[9]==null&&(r[9]=u[9]),r[0]=u[0],r[1]=o,r}var oT="Expected a function",xm=1,iT=2,sd=8,cd=16,ld=32,Em=64,Sm=Math.max;function go(r,u,a,l,o,p,d,g){var v=u&iT;if(!v&&typeof r!="function")throw new TypeError(oT);var O=l?l.length:0;if(O||(u&=~(ld|Em),l=o=void 0),d=d===void 0?d:Sm(vt(d),0),g=g===void 0?g:vt(g),O-=o?o.length:0,u&Em){var E=l,w=o;l=o=void 0}var j=v?void 0:zd(r),P=[r,u,a,l,o,E,w,p,d,g];if(j&&rT(P,j),r=P[0],u=P[1],a=P[2],l=P[3],o=P[4],g=P[9]=P[9]===void 0?v?0:r.length:Sm(P[9]-O,0),!g&&u&(sd|cd)&&(u&=~(sd|cd)),!u||u==xm)var M=fA(r,u,a);else u==sd||u==cd?M=ZA(r,u,g):(u==ld||u==(xm|ld))&&!o.length?M=QA(r,u,a,l):M=Sc.apply(void 0,P);var T=j?c_:d_;return h_(T(M,P),r,u)}var aT=128;function g_(r,u,a){return u=a?void 0:u,u=r&&u==null?r.length:u,go(r,aT,void 0,void 0,void 0,void 0,u)}var uT=Object.prototype,sT=uT.hasOwnProperty,cT=Qa(function(r,u){if(z0(u)||Lo(u)){eu(u,Bn(u),r);return}for(var a in u)sT.call(u,a)&&F0(r,a,u[a])});const lT=cT;var fT=Qa(function(r,u){eu(u,ho(u),r)});const jm=fT;var pT=Qa(function(r,u,a,l){eu(u,ho(u),r,l)});const ic=pT;var dT=Qa(function(r,u,a,l){eu(u,Bn(u),r,l)});const hT=dT;function Fd(r,u){for(var a=-1,l=u.length,o=Array(l),p=r==null;++a<l;)o[a]=p?void 0:$0(r,u[a]);return o}var yT=Bo(Fd);const gT=yT;var vT="[object DOMException]",bT="[object Error]";function $d(r){if(!pr(r))return!1;var u=zo(r);return u==bT||u==vT||typeof r.message=="string"&&typeof r.name=="string"&&!mc(r)}var mT=wt(function(r,u){try{return sr(r,void 0,u)}catch(a){return $d(a)?a:new Error(a)}});const v_=mT;var _T="Expected a function";function b_(r,u){var a;if(typeof u!="function")throw new TypeError(_T);return r=vt(r),function(){return--r>0&&(a=u.apply(this,arguments)),r<=1&&(u=void 0),a}}var OT=1,wT=32,Wd=wt(function(r,u,a){var l=OT;if(a.length){var o=Io(a,Ji(Wd));l|=wT}return go(r,l,u,a,o)});Wd.placeholder={};const m_=Wd;var xT=Bo(function(r,u){return xr(u,function(a){a=tu(a),Ki(r,a,m_(r[a],r))}),r});const ET=xT;var ST=1,jT=2,PT=32,Gd=wt(function(r,u,a){var l=ST|jT;if(a.length){var o=Io(a,Ji(Gd));l|=PT}return go(u,l,r,a,o)});Gd.placeholder={};const AT=Gd;function lr(r,u,a){var l=-1,o=r.length;u<0&&(u=-u>o?0:o+u),a=a>o?o:a,a<0&&(a+=o),o=u>a?0:a-u>>>0,u>>>=0;for(var p=Array(o);++l<o;)p[l]=r[l+u];return p}function Fo(r,u,a){var l=r.length;return a=a===void 0?l:a,!u&&a>=l?r:lr(r,u,a)}var TT="\\ud800-\\udfff",MT="\\u0300-\\u036f",kT="\\ufe20-\\ufe2f",DT="\\u20d0-\\u20ff",NT=MT+kT+DT,RT="\\ufe0e\\ufe0f",CT="\\u200d",IT=RegExp("["+CT+TT+NT+RT+"]");function Qi(r){return IT.test(r)}function LT(r){return r.split("")}var __="\\ud800-\\udfff",BT="\\u0300-\\u036f",zT="\\ufe20-\\ufe2f",FT="\\u20d0-\\u20ff",$T=BT+zT+FT,WT="\\ufe0e\\ufe0f",GT="["+__+"]",vd="["+$T+"]",bd="\\ud83c[\\udffb-\\udfff]",HT="(?:"+vd+"|"+bd+")",O_="[^"+__+"]",w_="(?:\\ud83c[\\udde6-\\uddff]){2}",x_="[\\ud800-\\udbff][\\udc00-\\udfff]",UT="\\u200d",E_=HT+"?",S_="["+WT+"]?",XT="(?:"+UT+"(?:"+[O_,w_,x_].join("|")+")"+S_+E_+")*",YT=S_+E_+XT,VT="(?:"+[O_+vd+"?",vd,w_,x_,GT].join("|")+")",KT=RegExp(bd+"(?="+bd+")|"+VT+YT,"g");function qT(r){return r.match(KT)||[]}function wr(r){return Qi(r)?qT(r):LT(r)}function j_(r){return function(u){u=It(u);var a=Qi(u)?wr(u):void 0,l=a?a[0]:u.charAt(0),o=a?Fo(a,1).join(""):u.slice(1);return l[r]()+o}}var ZT=j_("toUpperCase");const Hd=ZT;function P_(r){return Hd(It(r).toLowerCase())}function Ud(r,u,a,l){var o=-1,p=r==null?0:r.length;for(l&&p&&(a=r[++o]);++o<p;)a=u(a,r[o],o,r);return a}function Xd(r){return function(u){return r==null?void 0:r[u]}}var JT={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},QT=Xd(JT);const e2=QT;var t2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,n2="\\u0300-\\u036f",r2="\\ufe20-\\ufe2f",o2="\\u20d0-\\u20ff",i2=n2+r2+o2,a2="["+i2+"]",u2=RegExp(a2,"g");function A_(r){return r=It(r),r&&r.replace(t2,e2).replace(u2,"")}var s2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function c2(r){return r.match(s2)||[]}var l2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function f2(r){return l2.test(r)}var T_="\\ud800-\\udfff",p2="\\u0300-\\u036f",d2="\\ufe20-\\ufe2f",h2="\\u20d0-\\u20ff",y2=p2+d2+h2,M_="\\u2700-\\u27bf",k_="a-z\\xdf-\\xf6\\xf8-\\xff",g2="\\xac\\xb1\\xd7\\xf7",v2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",b2="\\u2000-\\u206f",m2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",D_="A-Z\\xc0-\\xd6\\xd8-\\xde",_2="\\ufe0e\\ufe0f",N_=g2+v2+b2+m2,R_="['’]",Pm="["+N_+"]",O2="["+y2+"]",C_="\\d+",w2="["+M_+"]",I_="["+k_+"]",L_="[^"+T_+N_+C_+M_+k_+D_+"]",x2="\\ud83c[\\udffb-\\udfff]",E2="(?:"+O2+"|"+x2+")",S2="[^"+T_+"]",B_="(?:\\ud83c[\\udde6-\\uddff]){2}",z_="[\\ud800-\\udbff][\\udc00-\\udfff]",Wi="["+D_+"]",j2="\\u200d",Am="(?:"+I_+"|"+L_+")",P2="(?:"+Wi+"|"+L_+")",Tm="(?:"+R_+"(?:d|ll|m|re|s|t|ve))?",Mm="(?:"+R_+"(?:D|LL|M|RE|S|T|VE))?",F_=E2+"?",$_="["+_2+"]?",A2="(?:"+j2+"(?:"+[S2,B_,z_].join("|")+")"+$_+F_+")*",T2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",M2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",k2=$_+F_+A2,D2="(?:"+[w2,B_,z_].join("|")+")"+k2,N2=RegExp([Wi+"?"+I_+"+"+Tm+"(?="+[Pm,Wi,"$"].join("|")+")",P2+"+"+Mm+"(?="+[Pm,Wi+Am,"$"].join("|")+")",Wi+"?"+Am+"+"+Tm,Wi+"+"+Mm,M2,T2,C_,D2].join("|"),"g");function R2(r){return r.match(N2)||[]}function W_(r,u,a){return r=It(r),u=a?void 0:u,u===void 0?f2(r)?R2(r):c2(r):r.match(u)||[]}var C2="['’]",I2=RegExp(C2,"g");function ea(r){return function(u){return Ud(W_(A_(u).replace(I2,"")),r,"")}}var L2=ea(function(r,u,a){return u=u.toLowerCase(),r+(a?P_(u):u)});const B2=L2;var z2=ai.isFinite,F2=Math.min;function Yd(r){var u=Math[r];return function(a,l){if(a=co(a),l=l==null?0:F2(vt(l),292),l&&z2(a)){var o=(It(a)+"e").split("e"),p=u(o[0]+"e"+(+o[1]+l));return o=(It(p)+"e").split("e"),+(o[0]+"e"+(+o[1]-l))}return u(a)}}var $2=Yd("ceil");const W2=$2;function G_(r){var u=R(r);return u.__chain__=!0,u}var G2=Math.ceil,H2=Math.max;function U2(r,u,a){(a?Ln(r,u,a):u===void 0)?u=1:u=H2(vt(u),0);var l=r==null?0:r.length;if(!l||u<1)return[];for(var o=0,p=0,d=Array(G2(l/u));o<l;)d[p++]=lr(r,o,o+=u);return d}function li(r,u,a){return r===r&&(a!==void 0&&(r=r<=a?r:a),u!==void 0&&(r=r>=u?r:u)),r}function X2(r,u,a){return a===void 0&&(a=u,u=void 0),a!==void 0&&(a=co(a),a=a===a?a:0),u!==void 0&&(u=co(u),u=u===u?u:0),li(co(r),u,a)}var Y2=1,V2=4;function K2(r,u){return u=typeof u=="function"?u:void 0,ui(r,Y2|V2,u)}var q2=4;function Z2(r,u){return u=typeof u=="function"?u:void 0,ui(r,q2,u)}function J2(){return new cr(this.value(),this.__chain__)}function Q2(r){for(var u=-1,a=r==null?0:r.length,l=0,o=[];++u<a;){var p=r[u];p&&(o[l++]=p)}return o}function eM(){var r=arguments.length;if(!r)return[];for(var u=Array(r-1),a=arguments[0],l=r;l--;)u[l-1]=arguments[l];return nu(Ct(a)?ur(a):[a],dr(u,1))}var tM="Expected a function";function nM(r){var u=r==null?0:r.length,a=yt;return r=u?Kt(r,function(l){if(typeof l[1]!="function")throw new TypeError(tM);return[a(l[0]),l[1]]}):[],wt(function(l){for(var o=-1;++o<u;){var p=r[o];if(sr(p[0],this,l))return sr(p[1],this,l)}})}function H_(r,u,a){var l=a.length;if(r==null)return!l;for(r=Object(r);l--;){var o=a[l],p=u[o],d=r[o];if(d===void 0&&!(o in r)||!p(d))return!1}return!0}function rM(r){var u=Bn(r);return function(a){return H_(a,r,u)}}var oM=1;function iM(r){return rM(ui(r,oM))}function aM(r,u){return u==null||H_(r,u,Bn(u))}function uM(r,u,a,l){for(var o=-1,p=r==null?0:r.length;++o<p;){var d=r[o];u(l,d,a(d),r)}return l}function sM(r,u,a,l){return si(r,function(o,p,d){u(l,o,a(o),d)}),l}function jc(r,u){return function(a,l){var o=Ct(a)?uM:sM,p=u?u():{};return o(a,r,yt(l),p)}}var cM=Object.prototype,lM=cM.hasOwnProperty,fM=jc(function(r,u,a){lM.call(r,a)?++r[a]:Ki(r,a,1)});const pM=fM;function dM(r,u){var a=Za(r);return u==null?a:uP(a,u)}var hM=8;function Vd(r,u,a){u=a?void 0:u;var l=go(r,hM,void 0,void 0,void 0,void 0,void 0,u);return l.placeholder=Vd.placeholder,l}Vd.placeholder={};var yM=16;function Kd(r,u,a){u=a?void 0:u;var l=go(r,yM,void 0,void 0,void 0,void 0,void 0,u);return l.placeholder=Kd.placeholder,l}Kd.placeholder={};function gM(r,u){return r==null||r!==r?u:r}var U_=Object.prototype,vM=U_.hasOwnProperty,bM=wt(function(r,u){r=Object(r);var a=-1,l=u.length,o=l>2?u[2]:void 0;for(o&&Ln(u[0],u[1],o)&&(l=1);++a<l;)for(var p=u[a],d=ho(p),g=-1,v=d.length;++g<v;){var O=d[g],E=r[O];(E===void 0||qi(E,U_[O])&&!vM.call(r,O))&&(r[O]=p[O])}return r});const mM=bM;function X_(r,u,a,l,o,p){return po(r)&&po(u)&&(p.set(u,r),W0(r,u,void 0,X_,p),p.delete(u)),r}var _M=Qa(function(r,u,a,l){W0(r,u,a,l)});const Y_=_M;var OM=wt(function(r){return r.push(void 0,X_),sr(Y_,void 0,r)});const wM=OM;var xM="Expected a function";function V_(r,u,a){if(typeof r!="function")throw new TypeError(xM);return setTimeout(function(){r.apply(void 0,a)},u)}var EM=wt(function(r,u){return V_(r,1,u)});const SM=EM;var jM=wt(function(r,u,a){return V_(r,co(u)||0,a)});const PM=jM;var AM=200;function iu(r,u,a,l){var o=-1,p=Dd,d=!0,g=r.length,v=[],O=u.length;if(!g)return v;a&&(u=Kt(u,$r(a))),l?(p=H0,d=!1):u.length>=AM&&(p=hd,d=!1,u=new G0(u));e:for(;++o<g;){var E=r[o],w=a==null?E:a(E);if(E=l||E!==0?E:0,d&&w===w){for(var j=O;j--;)if(u[j]===w)continue e;v.push(E)}else p(u,w,l)||v.push(E)}return v}var TM=wt(function(r,u){return ln(r)?iu(r,dr(u,1,ln,!0)):[]});const MM=TM;function qn(r){var u=r==null?0:r.length;return u?r[u-1]:void 0}var kM=wt(function(r,u){var a=qn(u);return ln(a)&&(a=void 0),ln(r)?iu(r,dr(u,1,ln,!0),yt(a)):[]});const DM=kM;var NM=wt(function(r,u){var a=qn(u);return ln(a)&&(a=void 0),ln(r)?iu(r,dr(u,1,ln,!0),void 0,a):[]});const RM=NM;var CM=xc(function(r,u){return r/u},1);const IM=CM;function LM(r,u,a){var l=r==null?0:r.length;return l?(u=a||u===void 0?1:vt(u),lr(r,u<0?0:u,l)):[]}function BM(r,u,a){var l=r==null?0:r.length;return l?(u=a||u===void 0?1:vt(u),u=l-u,lr(r,0,u<0?0:u)):[]}function Pc(r,u,a,l){for(var o=r.length,p=l?o:-1;(l?p--:++p<o)&&u(r[p],p,r););return a?lr(r,l?0:p,l?p+1:o):lr(r,l?p+1:0,l?o:p)}function zM(r,u){return r&&r.length?Pc(r,yt(u),!0,!0):[]}function FM(r,u){return r&&r.length?Pc(r,yt(u),!0):[]}function Gr(r){return typeof r=="function"?r:fr}function km(r,u){var a=Ct(r)?xr:si;return a(r,Gr(u))}function $M(r,u){for(var a=r==null?0:r.length;a--&&u(r[a],a,r)!==!1;);return r}var WM=sP(!0);const K_=WM;function qd(r,u){return r&&K_(r,u,Bn)}var GM=cP(qd,!0);const q_=GM;function Dm(r,u){var a=Ct(r)?$M:q_;return a(r,Gr(u))}function HM(r,u,a){r=It(r),u=Or(u);var l=r.length;a=a===void 0?l:li(vt(a),0,l);var o=a;return a-=u.length,a>=0&&r.slice(a,o)==u}function UM(r,u){return Kt(u,function(a){return[a,r[a]]})}function XM(r){var u=-1,a=Array(r.size);return r.forEach(function(l){a[++u]=[l,l]}),a}var YM="[object Map]",VM="[object Set]";function Z_(r){return function(u){var a=ru(u);return a==YM?U0(u):a==VM?XM(u):UM(u,r(u))}}var KM=Z_(Bn);const Nm=KM;var qM=Z_(ho);const Rm=qM;var ZM={"&":"&","<":"<",">":">",'"':""","'":"'"},JM=Xd(ZM);const QM=JM;var J_=/[&<>"']/g,ek=RegExp(J_.source);function Q_(r){return r=It(r),r&&ek.test(r)?r.replace(J_,QM):r}var e1=/[\\^$.*+?()[\]{}|]/g,tk=RegExp(e1.source);function nk(r){return r=It(r),r&&tk.test(r)?r.replace(e1,"\\$&"):r}function t1(r,u){for(var a=-1,l=r==null?0:r.length;++a<l;)if(!u(r[a],a,r))return!1;return!0}function rk(r,u){var a=!0;return si(r,function(l,o,p){return a=!!u(l,o,p),a}),a}function ok(r,u,a){var l=Ct(r)?t1:rk;return a&&Ln(r,u,a)&&(u=void 0),l(r,yt(u))}var ik=4294967295;function n1(r){return r?li(vt(r),0,ik):0}function ak(r,u,a,l){var o=r.length;for(a=vt(a),a<0&&(a=-a>o?0:o+a),l=l===void 0||l>o?o:vt(l),l<0&&(l+=o),l=a>l?0:n1(l);a<l;)r[a++]=u;return r}function uk(r,u,a,l){var o=r==null?0:r.length;return o?(a&&typeof a!="number"&&Ln(r,u,a)&&(a=0,l=o),ak(r,u,a,l)):[]}function r1(r,u){var a=[];return si(r,function(l,o,p){u(l,o,p)&&a.push(l)}),a}function sk(r,u){var a=Ct(r)?ci:r1;return a(r,yt(u))}function o1(r){return function(u,a,l){var o=Object(u);if(!Lo(u)){var p=yt(a);u=Bn(u),a=function(g){return p(o[g],g,o)}}var d=r(u,a,l);return d>-1?o[p?u[d]:d]:void 0}}var ck=Math.max;function i1(r,u,a){var l=r==null?0:r.length;if(!l)return-1;var o=a==null?0:vt(a);return o<0&&(o=ck(l+o,0)),X0(r,yt(u),o)}var lk=o1(i1);const fk=lk;function a1(r,u,a){var l;return a(r,function(o,p,d){if(u(o,p,d))return l=p,!1}),l}function pk(r,u){return a1(r,yt(u),yo)}var dk=o1(Y0);const hk=dk;function yk(r,u){return a1(r,yt(u),qd)}function Cm(r){return r&&r.length?r[0]:void 0}var gk=1/0;function vk(r,u){return dr(Nd(r,u),gk)}function bk(r,u,a){return a=a===void 0?1:vt(a),dr(Nd(r,u),a)}function mk(r,u){var a=r==null?0:r.length;return a?(u=u===void 0?1:vt(u),dr(r,u)):[]}var _k=512;function Ok(r){return go(r,_k)}var wk=Yd("floor");const xk=wk;var Ek="Expected a function",Sk=8,jk=32,Pk=128,Ak=256;function u1(r){return Bo(function(u){var a=u.length,l=a,o=cr.prototype.thru;for(r&&u.reverse();l--;){var p=u[l];if(typeof p!="function")throw new TypeError(Ek);if(o&&!d&&Js(p)=="wrapper")var d=new cr([],!0)}for(l=d?l:a;++l<a;){p=u[l];var g=Js(p),v=g=="wrapper"?zd(p):void 0;v&&gd(v[0])&&v[1]==(Pk|Sk|jk|Ak)&&!v[4].length&&v[9]==1?d=d[Js(v[0])].apply(d,v[3]):d=p.length==1&&gd(p)?d[g]():d.thru(p)}return function(){var O=arguments,E=O[0];if(d&&O.length==1&&Ct(E))return d.plant(E).value();for(var w=0,j=a?u[w].apply(this,O):E;++w<a;)j=u[w].call(this,j);return j}})}var Tk=u1();const Mk=Tk;var kk=u1(!0);const Dk=kk;function Nk(r,u){return r==null?r:lP(r,Gr(u),ho)}function Rk(r,u){return r==null?r:K_(r,Gr(u),ho)}function Ck(r,u){return r&&yo(r,Gr(u))}function Ik(r,u){return r&&qd(r,Gr(u))}function Ac(r,u){return ci(u,function(a){return Zi(r[a])})}function Lk(r){return r==null?[]:Ac(r,Bn(r))}function Bk(r){return r==null?[]:Ac(r,ho(r))}var zk=Object.prototype,Fk=zk.hasOwnProperty,$k=jc(function(r,u,a){Fk.call(r,a)?r[a].push(u):Ki(r,a,[u])});const Wk=$k;function Zd(r,u){return r>u}function Tc(r){return function(u,a){return typeof u=="string"&&typeof a=="string"||(u=co(u),a=co(a)),r(u,a)}}var Gk=Tc(Zd);const Hk=Gk;var Uk=Tc(function(r,u){return r>=u});const Xk=Uk;var Yk=Object.prototype,Vk=Yk.hasOwnProperty;function Kk(r,u){return r!=null&&Vk.call(r,u)}function qk(r,u){return r!=null&&fP(r,u,Kk)}var Zk=Math.max,Jk=Math.min;function Qk(r,u,a){return r>=Jk(u,a)&&r<Zk(u,a)}function eD(r,u,a){return u=Co(u),a===void 0?(a=u,u=0):a=Co(a),r=co(r),Qk(r,u,a)}var tD="[object String]";function Mc(r){return typeof r=="string"||!Ct(r)&&pr(r)&&zo(r)==tD}function Jd(r,u){return Kt(u,function(a){return r[a]})}function ta(r){return r==null?[]:Jd(r,Bn(r))}var nD=Math.max;function rD(r,u,a,l){r=Lo(r)?r:ta(r),a=a&&!l?vt(a):0;var o=r.length;return a<0&&(a=nD(o+a,0)),Mc(r)?a<=o&&r.indexOf(u,a)>-1:!!o&&ou(r,u,a)>-1}var oD=Math.max;function iD(r,u,a){var l=r==null?0:r.length;if(!l)return-1;var o=a==null?0:vt(a);return o<0&&(o=oD(l+o,0)),ou(r,u,o)}function aD(r){var u=r==null?0:r.length;return u?lr(r,0,-1):[]}var uD=Math.min;function Qd(r,u,a){for(var l=a?H0:Dd,o=r[0].length,p=r.length,d=p,g=Array(p),v=1/0,O=[];d--;){var E=r[d];d&&u&&(E=Kt(E,$r(u))),v=uD(E.length,v),g[d]=!a&&(u||o>=120&&E.length>=120)?new G0(d&&E):void 0}E=r[0];var w=-1,j=g[0];e:for(;++w<o&&O.length<v;){var P=E[w],M=u?u(P):P;if(P=a||P!==0?P:0,!(j?hd(j,M):l(O,M,a))){for(d=p;--d;){var T=g[d];if(!(T?hd(T,M):l(r[d],M,a)))continue e}j&&j.push(M),O.push(P)}}return O}function eh(r){return ln(r)?r:[]}var sD=wt(function(r){var u=Kt(r,eh);return u.length&&u[0]===r[0]?Qd(u):[]});const cD=sD;var lD=wt(function(r){var u=qn(r),a=Kt(r,eh);return u===qn(a)?u=void 0:a.pop(),a.length&&a[0]===r[0]?Qd(a,yt(u)):[]});const fD=lD;var pD=wt(function(r){var u=qn(r),a=Kt(r,eh);return u=typeof u=="function"?u:void 0,u&&a.pop(),a.length&&a[0]===r[0]?Qd(a,void 0,u):[]});const dD=pD;function hD(r,u,a,l){return yo(r,function(o,p,d){u(l,a(o),p,d)}),l}function s1(r,u){return function(a,l){return hD(a,r,u(l),{})}}var yD=Object.prototype,gD=yD.toString,vD=s1(function(r,u,a){u!=null&&typeof u.toString!="function"&&(u=gD.call(u)),r[u]=a},V0(fr));const bD=vD;var c1=Object.prototype,mD=c1.hasOwnProperty,_D=c1.toString,OD=s1(function(r,u,a){u!=null&&typeof u.toString!="function"&&(u=_D.call(u)),mD.call(r,u)?r[u].push(a):r[u]=[a]},yt);const wD=OD;function l1(r,u){return u.length<2?r:_c(r,lr(u,0,-1))}function au(r,u,a){u=Oc(u,r),r=l1(r,u);var l=r==null?r:r[tu(qn(u))];return l==null?void 0:sr(l,r,a)}var xD=wt(au);const ED=xD;var SD=wt(function(r,u,a){var l=-1,o=typeof u=="function",p=Lo(r)?Array(r.length):[];return si(r,function(d){p[++l]=o?sr(u,d,a):au(d,u,a)}),p});const jD=SD;var PD="[object ArrayBuffer]";function AD(r){return pr(r)&&zo(r)==PD}var Im=Vi&&Vi.isArrayBuffer,TD=Im?$r(Im):AD;const MD=TD;var kD="[object Boolean]";function DD(r){return r===!0||r===!1||pr(r)&&zo(r)==kD}var ND="[object Date]";function RD(r){return pr(r)&&zo(r)==ND}var Lm=Vi&&Vi.isDate,CD=Lm?$r(Lm):RD;const ID=CD;function LD(r){return pr(r)&&r.nodeType===1&&!mc(r)}var BD="[object Map]",zD="[object Set]",FD=Object.prototype,$D=FD.hasOwnProperty;function WD(r){if(r==null)return!0;if(Lo(r)&&(Ct(r)||typeof r=="string"||typeof r.splice=="function"||Rd(r)||Cd(r)||K0(r)))return!r.length;var u=ru(r);if(u==BD||u==zD)return!r.size;if(z0(r))return!q0(r).length;for(var a in r)if($D.call(r,a))return!1;return!0}function GD(r,u,a){a=typeof a=="function"?a:void 0;var l=a?a(r,u):void 0;return l===void 0?pP(r,u,void 0,a):!!l}var HD=ai.isFinite;function UD(r){return typeof r=="number"&&HD(r)}function f1(r){return typeof r=="number"&&r==vt(r)}function XD(r,u){return r===u||Z0(r,u,J0(u))}function YD(r,u,a){return a=typeof a=="function"?a:void 0,Z0(r,u,J0(u),a)}var VD="[object Number]";function p1(r){return typeof r=="number"||pr(r)&&zo(r)==VD}function KD(r){return p1(r)&&r!=+r}var qD=dP?Zi:Q0;const ZD=qD;var JD="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function QD(r){if(ZD(r))throw new Error(JD);return hP(r)}function eN(r){return r===null}var tN="[object RegExp]";function nN(r){return pr(r)&&zo(r)==tN}var Bm=Vi&&Vi.isRegExp,rN=Bm?$r(Bm):nN;const th=rN;var zm=9007199254740991;function oN(r){return f1(r)&&r>=-zm&&r<=zm}var iN="[object WeakMap]";function aN(r){return pr(r)&&ru(r)==iN}var uN="[object WeakSet]";function sN(r){return pr(r)&&zo(r)==uN}var cN=1;function lN(r){return yt(typeof r=="function"?r:ui(r,cN))}var fN=Array.prototype,pN=fN.join;function dN(r,u){return r==null?"":pN.call(r,u)}var hN=ea(function(r,u,a){return r+(a?"-":"")+u.toLowerCase()});const yN=hN;var gN=jc(function(r,u,a){Ki(r,a,u)});const vN=gN;function bN(r,u,a){for(var l=a+1;l--;)if(r[l]===u)return l;return l}var mN=Math.max,_N=Math.min;function ON(r,u,a){var l=r==null?0:r.length;if(!l)return-1;var o=l;return a!==void 0&&(o=vt(a),o=o<0?mN(l+o,0):_N(o,l-1)),u===u?bN(r,u,o):X0(r,yP,o,!0)}var wN=ea(function(r,u,a){return r+(a?" ":"")+u.toLowerCase()});const xN=wN;var EN=j_("toLowerCase");const SN=EN;function nh(r,u){return r<u}var jN=Tc(nh);const PN=jN;var AN=Tc(function(r,u){return r<=u});const TN=AN;function MN(r,u){var a={};return u=yt(u),yo(r,function(l,o,p){Ki(a,u(l,o,p),l)}),a}function kN(r,u){var a={};return u=yt(u),yo(r,function(l,o,p){Ki(a,o,u(l,o,p))}),a}var DN=1;function NN(r){return gP(ui(r,DN))}var RN=1;function CN(r,u){return vP(r,ui(u,RN))}function kc(r,u,a){for(var l=-1,o=r.length;++l<o;){var p=r[l],d=u(p);if(d!=null&&(g===void 0?d===d&&!fo(d):a(d,g)))var g=d,v=p}return v}function IN(r){return r&&r.length?kc(r,fr,Zd):void 0}function LN(r,u){return r&&r.length?kc(r,yt(u),Zd):void 0}function rh(r,u){for(var a,l=-1,o=r.length;++l<o;){var p=u(r[l]);p!==void 0&&(a=a===void 0?p:a+p)}return a}var BN=0/0;function d1(r,u){var a=r==null?0:r.length;return a?rh(r,u)/a:BN}function zN(r){return d1(r,fr)}function FN(r,u){return d1(r,yt(u))}var $N=wt(function(r,u){return function(a){return au(a,r,u)}});const WN=$N;var GN=wt(function(r,u){return function(a){return au(r,a,u)}});const HN=GN;function UN(r){return r&&r.length?kc(r,fr,nh):void 0}function XN(r,u){return r&&r.length?kc(r,yt(u),nh):void 0}function h1(r,u,a){var l=Bn(u),o=Ac(u,l),p=!(po(a)&&"chain"in a)||!!a.chain,d=Zi(r);return xr(o,function(g){var v=u[g];r[g]=v,d&&(r.prototype[g]=function(){var O=this.__chain__;if(p||O){var E=r(this.__wrapped__),w=E.__actions__=ur(this.__actions__);return w.push({func:v,args:arguments,thisArg:r}),E.__chain__=O,E}return v.apply(r,nu([this.value()],arguments))})}),r}var YN=xc(function(r,u){return r*u},1);const VN=YN;var KN="Expected a function";function uu(r){if(typeof r!="function")throw new TypeError(KN);return function(){var u=arguments;switch(u.length){case 0:return!r.call(this);case 1:return!r.call(this,u[0]);case 2:return!r.call(this,u[0],u[1]);case 3:return!r.call(this,u[0],u[1],u[2])}return!r.apply(this,u)}}function qN(r){for(var u,a=[];!(u=r.next()).done;)a.push(u.value);return a}var ZN="[object Map]",JN="[object Set]",fd=rc?rc.iterator:void 0;function y1(r){if(!r)return[];if(Lo(r))return Mc(r)?wr(r):ur(r);if(fd&&r[fd])return qN(r[fd]());var u=ru(r),a=u==ZN?U0:u==JN?bP:ta;return a(r)}function QN(){this.__values__===void 0&&(this.__values__=y1(this.value()));var r=this.__index__>=this.__values__.length,u=r?void 0:this.__values__[this.__index__++];return{done:r,value:u}}function g1(r,u){var a=r.length;if(a)return u+=u<0?a:0,Ja(u,a)?r[u]:void 0}function eR(r,u){return r&&r.length?g1(r,vt(u)):void 0}function tR(r){return r=vt(r),wt(function(u){return g1(u,r)})}function oh(r,u){return u=Oc(u,r),r=l1(r,u),r==null||delete r[tu(qn(u))]}function nR(r){return mc(r)?void 0:r}var rR=1,oR=2,iR=4,aR=Bo(function(r,u){var a={};if(r==null)return a;var l=!1;u=Kt(u,function(p){return p=Oc(p,r),l||(l=p.length>1),p}),eu(r,e_(r),a),l&&(a=ui(a,rR|oR|iR,nR));for(var o=u.length;o--;)oh(a,u[o]);return a});const uR=aR;function v1(r,u){if(r==null)return{};var a=Kt(e_(r),function(l){return[l]});return u=yt(u),mP(r,a,function(l,o){return u(l,o[0])})}function sR(r,u){return v1(r,uu(yt(u)))}function cR(r){return b_(2,r)}function lR(r,u){var a=r.length;for(r.sort(u);a--;)r[a]=r[a].value;return r}function b1(r,u){if(r!==u){var a=r!==void 0,l=r===null,o=r===r,p=fo(r),d=u!==void 0,g=u===null,v=u===u,O=fo(u);if(!g&&!O&&!p&&r>u||p&&d&&v&&!g&&!O||l&&d&&v||!a&&v||!o)return 1;if(!l&&!p&&!O&&r<u||O&&a&&o&&!l&&!p||g&&a&&o||!d&&o||!v)return-1}return 0}function fR(r,u,a){for(var l=-1,o=r.criteria,p=u.criteria,d=o.length,g=a.length;++l<d;){var v=b1(o[l],p[l]);if(v){if(l>=g)return v;var O=a[l];return v*(O=="desc"?-1:1)}}return r.index-u.index}function m1(r,u,a){u.length?u=Kt(u,function(p){return Ct(p)?function(d){return _c(d,p.length===1?p[0]:p)}:p}):u=[fr];var l=-1;u=Kt(u,$r(yt));var o=_P(r,function(p,d,g){var v=Kt(u,function(O){return O(p)});return{criteria:v,index:++l,value:p}});return lR(o,function(p,d){return fR(p,d,a)})}function pR(r,u,a,l){return r==null?[]:(Ct(u)||(u=u==null?[]:[u]),a=l?void 0:a,Ct(a)||(a=a==null?[]:[a]),m1(r,u,a))}function ih(r){return Bo(function(u){return u=Kt(u,$r(yt)),wt(function(a){var l=this;return r(u,function(o){return sr(o,l,a)})})})}var dR=ih(Kt);const hR=dR;var yR=wt;const gR=yR;var vR=Math.min,bR=gR(function(r,u){u=u.length==1&&Ct(u[0])?Kt(u[0],$r(yt)):Kt(dr(u,1),$r(yt));var a=u.length;return wt(function(l){for(var o=-1,p=vR(l.length,a);++o<p;)l[o]=u[o].call(this,l[o]);return sr(r,this,l)})});const mR=bR;var _R=ih(t1);const OR=_R;var wR=ih(t_);const xR=wR;var ER=9007199254740991,SR=Math.floor;function md(r,u){var a="";if(!r||u<1||u>ER)return a;do u%2&&(a+=r),u=SR(u/2),u&&(r+=r);while(u);return a}var jR=n_("length");const PR=jR;var _1="\\ud800-\\udfff",AR="\\u0300-\\u036f",TR="\\ufe20-\\ufe2f",MR="\\u20d0-\\u20ff",kR=AR+TR+MR,DR="\\ufe0e\\ufe0f",NR="["+_1+"]",_d="["+kR+"]",Od="\\ud83c[\\udffb-\\udfff]",RR="(?:"+_d+"|"+Od+")",O1="[^"+_1+"]",w1="(?:\\ud83c[\\udde6-\\uddff]){2}",x1="[\\ud800-\\udbff][\\udc00-\\udfff]",CR="\\u200d",E1=RR+"?",S1="["+DR+"]?",IR="(?:"+CR+"(?:"+[O1,w1,x1].join("|")+")"+S1+E1+")*",LR=S1+E1+IR,BR="(?:"+[O1+_d+"?",_d,w1,x1,NR].join("|")+")",Fm=RegExp(Od+"(?="+Od+")|"+BR+LR,"g");function zR(r){for(var u=Fm.lastIndex=0;Fm.test(r);)++u;return u}function na(r){return Qi(r)?zR(r):PR(r)}var FR=Math.ceil;function ac(r,u){u=u===void 0?" ":Or(u);var a=u.length;if(a<2)return a?md(u,r):u;var l=md(u,FR(r/na(u)));return Qi(u)?Fo(wr(l),0,r).join(""):l.slice(0,r)}var $R=Math.ceil,WR=Math.floor;function GR(r,u,a){r=It(r),u=vt(u);var l=u?na(r):0;if(!u||l>=u)return r;var o=(u-l)/2;return ac(WR(o),a)+r+ac($R(o),a)}function HR(r,u,a){r=It(r),u=vt(u);var l=u?na(r):0;return u&&l<u?r+ac(u-l,a):r}function UR(r,u,a){r=It(r),u=vt(u);var l=u?na(r):0;return u&&l<u?ac(u-l,a)+r:r}var XR=/^\s+/,YR=ai.parseInt;function VR(r,u,a){return a||u==null?u=0:u&&(u=+u),YR(It(r).replace(XR,""),u||0)}var KR=32,ah=wt(function(r,u){var a=Io(u,Ji(ah));return go(r,KR,void 0,u,a)});ah.placeholder={};const j1=ah;var qR=64,uh=wt(function(r,u){var a=Io(u,Ji(uh));return go(r,qR,void 0,u,a)});uh.placeholder={};const ZR=uh;var JR=jc(function(r,u,a){r[a?0:1].push(u)},function(){return[[],[]]});const QR=JR;function eC(r){for(var u,a=this;a instanceof Ec;){var l=p_(a);l.__index__=0,l.__values__=void 0,u?o.__wrapped__=l:u=l;var o=l;a=a.__wrapped__}return o.__wrapped__=r,u}function tC(r){return function(u){return r==null?void 0:_c(r,u)}}function nC(r,u,a,l){for(var o=a-1,p=r.length;++o<p;)if(l(r[o],u))return o;return-1}var rC=Array.prototype,$m=rC.splice;function sh(r,u,a,l){var o=l?nC:ou,p=-1,d=u.length,g=r;for(r===u&&(u=ur(u)),a&&(g=Kt(r,$r(a)));++p<d;)for(var v=0,O=u[p],E=a?a(O):O;(v=o(g,E,v,l))>-1;)g!==r&&$m.call(g,v,1),$m.call(r,v,1);return r}function P1(r,u){return r&&r.length&&u&&u.length?sh(r,u):r}var oC=wt(P1);const iC=oC;function aC(r,u,a){return r&&r.length&&u&&u.length?sh(r,u,yt(a)):r}function uC(r,u,a){return r&&r.length&&u&&u.length?sh(r,u,void 0,a):r}var sC=Array.prototype,cC=sC.splice;function A1(r,u){for(var a=r?u.length:0,l=a-1;a--;){var o=u[a];if(a==l||o!==p){var p=o;Ja(o)?cC.call(r,o,1):oh(r,o)}}return r}var lC=Bo(function(r,u){var a=r==null?0:r.length,l=Fd(r,u);return A1(r,Kt(u,function(o){return Ja(o,a)?+o:o}).sort(b1)),l});const fC=lC;var pC=Math.floor,dC=Math.random;function ch(r,u){return r+pC(dC()*(u-r+1))}var hC=parseFloat,yC=Math.min,gC=Math.random;function vC(r,u,a){if(a&&typeof a!="boolean"&&Ln(r,u,a)&&(u=a=void 0),a===void 0&&(typeof u=="boolean"?(a=u,u=void 0):typeof r=="boolean"&&(a=r,r=void 0)),r===void 0&&u===void 0?(r=0,u=1):(r=Co(r),u===void 0?(u=r,r=0):u=Co(u)),r>u){var l=r;r=u,u=l}if(a||r%1||u%1){var o=gC();return yC(r+o*(u-r+hC("1e-"+((o+"").length-1))),u)}return ch(r,u)}var bC=Math.ceil,mC=Math.max;function _C(r,u,a,l){for(var o=-1,p=mC(bC((u-r)/(a||1)),0),d=Array(p);p--;)d[l?p:++o]=r,r+=a;return d}function T1(r){return function(u,a,l){return l&&typeof l!="number"&&Ln(u,a,l)&&(a=l=void 0),u=Co(u),a===void 0?(a=u,u=0):a=Co(a),l=l===void 0?u<a?1:-1:Co(l),_C(u,a,l,r)}}var OC=T1();const wC=OC;var xC=T1(!0);const EC=xC;var SC=256,jC=Bo(function(r,u){return go(r,SC,void 0,void 0,void 0,u)});const PC=jC;function M1(r,u,a,l,o){return o(r,function(p,d,g){a=l?(l=!1,p):u(a,p,d,g)}),a}function AC(r,u,a){var l=Ct(r)?Ud:M1,o=arguments.length<3;return l(r,yt(u),a,o,si)}function TC(r,u,a,l){var o=r==null?0:r.length;for(l&&o&&(a=r[--o]);o--;)a=u(a,r[o],o,r);return a}function MC(r,u,a){var l=Ct(r)?TC:M1,o=arguments.length<3;return l(r,yt(u),a,o,q_)}function kC(r,u){var a=Ct(r)?ci:r1;return a(r,uu(yt(u)))}function DC(r,u){var a=[];if(!(r&&r.length))return a;var l=-1,o=[],p=r.length;for(u=yt(u);++l<p;){var d=r[l];u(d,l,r)&&(a.push(d),o.push(l))}return A1(r,o),a}function NC(r,u,a){return(a?Ln(r,u,a):u===void 0)?u=1:u=vt(u),md(It(r),u)}function RC(){var r=arguments,u=It(r[0]);return r.length<3?u:u.replace(r[1],r[2])}var CC="Expected a function";function IC(r,u){if(typeof r!="function")throw new TypeError(CC);return u=u===void 0?u:vt(u),wt(r,u)}function LC(r,u,a){u=Oc(u,r);var l=-1,o=u.length;for(o||(o=1,r=void 0);++l<o;){var p=r==null?void 0:r[tu(u[l])];p===void 0&&(l=o,p=a),r=Zi(p)?p.call(r):p}return r}var BC=Array.prototype,zC=BC.reverse;function wd(r){return r==null?r:zC.call(r)}var FC=Yd("round");const $C=FC;function k1(r){var u=r.length;return u?r[ch(0,u-1)]:void 0}function WC(r){return k1(ta(r))}function GC(r){var u=Ct(r)?k1:WC;return u(r)}function Dc(r,u){var a=-1,l=r.length,o=l-1;for(u=u===void 0?l:u;++a<u;){var p=ch(a,o),d=r[p];r[p]=r[a],r[a]=d}return r.length=u,r}function HC(r,u){return Dc(ur(r),li(u,0,r.length))}function UC(r,u){var a=ta(r);return Dc(a,li(u,0,a.length))}function XC(r,u,a){(a?Ln(r,u,a):u===void 0)?u=1:u=vt(u);var l=Ct(r)?HC:UC;return l(r,u)}function YC(r,u,a,l){return l=typeof l=="function"?l:void 0,r==null?r:Id(r,u,a,l)}function VC(r){return Dc(ur(r))}function KC(r){return Dc(ta(r))}function qC(r){var u=Ct(r)?VC:KC;return u(r)}var ZC="[object Map]",JC="[object Set]";function QC(r){if(r==null)return 0;if(Lo(r))return Mc(r)?na(r):r.length;var u=ru(r);return u==ZC||u==JC?r.size:q0(r).length}function eI(r,u,a){var l=r==null?0:r.length;return l?(a&&typeof a!="number"&&Ln(r,u,a)?(u=0,a=l):(u=u==null?0:vt(u),a=a===void 0?l:vt(a)),lr(r,u,a)):[]}var tI=ea(function(r,u,a){return r+(a?"_":"")+u.toLowerCase()});const nI=tI;function rI(r,u){var a;return si(r,function(l,o,p){return a=u(l,o,p),!a}),!!a}function oI(r,u,a){var l=Ct(r)?t_:rI;return a&&Ln(r,u,a)&&(u=void 0),l(r,yt(u))}var iI=wt(function(r,u){if(r==null)return[];var a=u.length;return a>1&&Ln(r,u[0],u[1])?u=[]:a>2&&Ln(u[0],u[1],u[2])&&(u=[u[0]]),m1(r,dr(u,1),[])});const aI=iI;var uI=4294967295,sI=uI-1,cI=Math.floor,lI=Math.min;function lh(r,u,a,l){var o=0,p=r==null?0:r.length;if(p===0)return 0;u=a(u);for(var d=u!==u,g=u===null,v=fo(u),O=u===void 0;o<p;){var E=cI((o+p)/2),w=a(r[E]),j=w!==void 0,P=w===null,M=w===w,T=fo(w);if(d)var k=l||M;else O?k=M&&(l||j):g?k=M&&j&&(l||!P):v?k=M&&j&&!P&&(l||!T):P||T?k=!1:k=l?w<=u:w<u;k?o=E+1:p=E}return lI(p,sI)}var fI=4294967295,pI=fI>>>1;function Nc(r,u,a){var l=0,o=r==null?l:r.length;if(typeof u=="number"&&u===u&&o<=pI){for(;l<o;){var p=l+o>>>1,d=r[p];d!==null&&!fo(d)&&(a?d<=u:d<u)?l=p+1:o=p}return o}return lh(r,u,fr,a)}function dI(r,u){return Nc(r,u)}function hI(r,u,a){return lh(r,u,yt(a))}function yI(r,u){var a=r==null?0:r.length;if(a){var l=Nc(r,u);if(l<a&&qi(r[l],u))return l}return-1}function gI(r,u){return Nc(r,u,!0)}function vI(r,u,a){return lh(r,u,yt(a),!0)}function bI(r,u){var a=r==null?0:r.length;if(a){var l=Nc(r,u,!0)-1;if(qi(r[l],u))return l}return-1}function D1(r,u){for(var a=-1,l=r.length,o=0,p=[];++a<l;){var d=r[a],g=u?u(d):d;if(!a||!qi(g,v)){var v=g;p[o++]=d===0?0:d}}return p}function mI(r){return r&&r.length?D1(r):[]}function _I(r,u){return r&&r.length?D1(r,yt(u)):[]}var OI=4294967295;function wI(r,u,a){return a&&typeof a!="number"&&Ln(r,u,a)&&(u=a=void 0),a=a===void 0?OI:a>>>0,a?(r=It(r),r&&(typeof u=="string"||u!=null&&!th(u))&&(u=Or(u),!u&&Qi(r))?Fo(wr(r),0,a):r.split(u,a)):[]}var xI="Expected a function",EI=Math.max;function SI(r,u){if(typeof r!="function")throw new TypeError(xI);return u=u==null?0:EI(vt(u),0),wt(function(a){var l=a[u],o=Fo(a,0,u);return l&&nu(o,l),sr(r,this,o)})}var jI=ea(function(r,u,a){return r+(a?" ":"")+Hd(u)});const PI=jI;function AI(r,u,a){return r=It(r),a=a==null?0:li(vt(a),0,r.length),u=Or(u),r.slice(a,a+u.length)==u}function TI(){return{}}function MI(){return""}function kI(){return!0}var DI=xc(function(r,u){return r-u},0);const NI=DI;function RI(r){return r&&r.length?rh(r,fr):0}function CI(r,u){return r&&r.length?rh(r,yt(u)):0}function II(r){var u=r==null?0:r.length;return u?lr(r,1,u):[]}function LI(r,u,a){return r&&r.length?(u=a||u===void 0?1:vt(u),lr(r,0,u<0?0:u)):[]}function BI(r,u,a){var l=r==null?0:r.length;return l?(u=a||u===void 0?1:vt(u),u=l-u,lr(r,u<0?0:u,l)):[]}function zI(r,u){return r&&r.length?Pc(r,yt(u),!1,!0):[]}function FI(r,u){return r&&r.length?Pc(r,yt(u)):[]}function $I(r,u){return u(r),r}var N1=Object.prototype,WI=N1.hasOwnProperty;function Wm(r,u,a,l){return r===void 0||qi(r,N1[a])&&!WI.call(l,a)?u:r}var GI={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function HI(r){return"\\"+GI[r]}var UI=/<%=([\s\S]+?)%>/g;const R1=UI;var XI=/<%-([\s\S]+?)%>/g;const YI=XI;var VI=/<%([\s\S]+?)%>/g;const KI=VI;var qI={escape:YI,evaluate:KI,interpolate:R1,variable:"",imports:{_:{escape:Q_}}};const xd=qI;var ZI="Invalid `variable` option passed into `_.template`",JI=/\b__p \+= '';/g,QI=/\b(__p \+=) '' \+/g,e3=/(__e\(.*?\)|\b__t\)) \+\n'';/g,t3=/[()=,{}\[\]\/\s]/,n3=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qs=/($^)/,r3=/['\n\r\u2028\u2029\\]/g,o3=Object.prototype,Gm=o3.hasOwnProperty;function i3(r,u,a){var l=xd.imports._.templateSettings||xd;a&&Ln(r,u,a)&&(u=void 0),r=It(r),u=ic({},u,l,Wm);var o=ic({},u.imports,l.imports,Wm),p=Bn(o),d=Jd(o,p),g,v,O=0,E=u.interpolate||qs,w="__p += '",j=RegExp((u.escape||qs).source+"|"+E.source+"|"+(E===R1?n3:qs).source+"|"+(u.evaluate||qs).source+"|$","g"),P=Gm.call(u,"sourceURL")?"//# sourceURL="+(u.sourceURL+"").replace(/\s/g," ")+`
|
||
`:"";r.replace(j,function(k,I,L,Y,Q,X){return L||(L=Y),w+=r.slice(O,X).replace(r3,HI),I&&(g=!0,w+=`' +
|
||
__e(`+I+`) +
|
||
'`),Q&&(v=!0,w+=`';
|
||
`+Q+`;
|
||
__p += '`),L&&(w+=`' +
|
||
((__t = (`+L+`)) == null ? '' : __t) +
|
||
'`),O=X+k.length,k}),w+=`';
|
||
`;var M=Gm.call(u,"variable")&&u.variable;if(!M)w=`with (obj) {
|
||
`+w+`
|
||
}
|
||
`;else if(t3.test(M))throw new Error(ZI);w=(v?w.replace(JI,""):w).replace(QI,"$1").replace(e3,"$1;"),w="function("+(M||"obj")+`) {
|
||
`+(M?"":`obj || (obj = {});
|
||
`)+"var __t, __p = ''"+(g?", __e = _.escape":"")+(v?`, __j = Array.prototype.join;
|
||
function print() { __p += __j.call(arguments, '') }
|
||
`:`;
|
||
`)+w+`return __p
|
||
}`;var T=v_(function(){return Function(p,P+"return "+w).apply(void 0,d)});if(T.source=w,$d(T))throw T;return T}function su(r,u){return u(r)}var a3=9007199254740991,pd=4294967295,u3=Math.min;function s3(r,u){if(r=vt(r),r<1||r>a3)return[];var a=pd,l=u3(r,pd);u=Gr(u),r-=pd;for(var o=r_(l,u);++a<r;)u(a);return o}function c3(){return this}function C1(r,u){var a=r;return a instanceof Et&&(a=a.value()),Ud(u,function(l,o){return o.func.apply(o.thisArg,nu([l],o.args))},a)}function dd(){return C1(this.__wrapped__,this.__actions__)}function l3(r){return It(r).toLowerCase()}function f3(r){return Ct(r)?Kt(r,tu):fo(r)?[r]:ur(OP(It(r)))}var Hm=9007199254740991;function p3(r){return r?li(vt(r),-Hm,Hm):r===0?r:0}function d3(r){return It(r).toUpperCase()}function h3(r,u,a){var l=Ct(r),o=l||Rd(r)||Cd(r);if(u=yt(u),a==null){var p=r&&r.constructor;o?a=l?new p:[]:po(r)?a=Zi(p)?Za(wP(r)):{}:a={}}return(o?xr:yo)(r,function(d,g,v){return u(a,d,g,v)}),a}function I1(r,u){for(var a=r.length;a--&&ou(u,r[a],0)>-1;);return a}function L1(r,u){for(var a=-1,l=r.length;++a<l&&ou(u,r[a],0)>-1;);return a}function y3(r,u,a){if(r=It(r),r&&(a||u===void 0))return xP(r);if(!r||!(u=Or(u)))return r;var l=wr(r),o=wr(u),p=L1(l,o),d=I1(l,o)+1;return Fo(l,p,d).join("")}function g3(r,u,a){if(r=It(r),r&&(a||u===void 0))return r.slice(0,EP(r)+1);if(!r||!(u=Or(u)))return r;var l=wr(r),o=I1(l,wr(u))+1;return Fo(l,0,o).join("")}var v3=/^\s+/;function b3(r,u,a){if(r=It(r),r&&(a||u===void 0))return r.replace(v3,"");if(!r||!(u=Or(u)))return r;var l=wr(r),o=L1(l,wr(u));return Fo(l,o).join("")}var m3=30,_3="...",O3=/\w*$/;function w3(r,u){var a=m3,l=_3;if(po(u)){var o="separator"in u?u.separator:o;a="length"in u?vt(u.length):a,l="omission"in u?Or(u.omission):l}r=It(r);var p=r.length;if(Qi(r)){var d=wr(r);p=d.length}if(a>=p)return r;var g=a-na(l);if(g<1)return l;var v=d?Fo(d,0,g).join(""):r.slice(0,g);if(o===void 0)return v+l;if(d&&(g+=v.length-g),th(o)){if(r.slice(g).search(o)){var O,E=v;for(o.global||(o=RegExp(o.source,It(O3.exec(o))+"g")),o.lastIndex=0;O=o.exec(E);)var w=O.index;v=v.slice(0,w===void 0?g:w)}}else if(r.indexOf(Or(o),g)!=g){var j=v.lastIndexOf(o);j>-1&&(v=v.slice(0,j))}return v+l}function x3(r){return g_(r,1)}var E3={"&":"&","<":"<",">":">",""":'"',"'":"'"},S3=Xd(E3);const j3=S3;var B1=/&(?:amp|lt|gt|quot|#39);/g,P3=RegExp(B1.source);function A3(r){return r=It(r),r&&P3.test(r)?r.replace(B1,j3):r}var T3=wt(function(r){var u=qn(r);return ln(u)&&(u=void 0),ii(dr(r,1,ln,!0),yt(u))});const M3=T3;var k3=wt(function(r){var u=qn(r);return u=typeof u=="function"?u:void 0,ii(dr(r,1,ln,!0),void 0,u)});const D3=k3;function N3(r){return r&&r.length?ii(r):[]}function R3(r,u){return r&&r.length?ii(r,yt(u)):[]}function C3(r,u){return u=typeof u=="function"?u:void 0,r&&r.length?ii(r,void 0,u):[]}var I3=0;function L3(r){var u=++I3;return It(r)+u}function B3(r,u){return r==null?!0:oh(r,u)}var z3=Math.max;function fh(r){if(!(r&&r.length))return[];var u=0;return r=ci(r,function(a){if(ln(a))return u=z3(a.length,u),!0}),r_(u,function(a){return Kt(r,n_(a))})}function z1(r,u){if(!(r&&r.length))return[];var a=fh(r);return u==null?a:Kt(a,function(l){return sr(u,void 0,l)})}function F1(r,u,a,l){return Id(r,u,a(_c(r,u)),l)}function F3(r,u,a){return r==null?r:F1(r,u,Gr(a))}function $3(r,u,a,l){return l=typeof l=="function"?l:void 0,r==null?r:F1(r,u,Gr(a),l)}var W3=ea(function(r,u,a){return r+(a?" ":"")+u.toUpperCase()});const G3=W3;function H3(r){return r==null?[]:Jd(r,ho(r))}var U3=wt(function(r,u){return ln(r)?iu(r,u):[]});const X3=U3;function Y3(r,u){return j1(Gr(u),r)}var V3=Bo(function(r){var u=r.length,a=u?r[0]:0,l=this.__wrapped__,o=function(p){return Fd(p,r)};return u>1||this.__actions__.length||!(l instanceof Et)||!Ja(a)?this.thru(o):(l=l.slice(a,+a+(u?1:0)),l.__actions__.push({func:su,args:[o],thisArg:void 0}),new cr(l,this.__chain__).thru(function(p){return u&&!p.length&&p.push(void 0),p}))});const K3=V3;function q3(){return G_(this)}function Z3(){var r=this.__wrapped__;if(r instanceof Et){var u=r;return this.__actions__.length&&(u=new Et(this)),u=u.reverse(),u.__actions__.push({func:su,args:[wd],thisArg:void 0}),new cr(u,this.__chain__)}return this.thru(wd)}function ph(r,u,a){var l=r.length;if(l<2)return l?ii(r[0]):[];for(var o=-1,p=Array(l);++o<l;)for(var d=r[o],g=-1;++g<l;)g!=o&&(p[o]=iu(p[o]||d,r[g],u,a));return ii(dr(p,1),u,a)}var J3=wt(function(r){return ph(ci(r,ln))});const Q3=J3;var eL=wt(function(r){var u=qn(r);return ln(u)&&(u=void 0),ph(ci(r,ln),yt(u))});const tL=eL;var nL=wt(function(r){var u=qn(r);return u=typeof u=="function"?u:void 0,ph(ci(r,ln),void 0,u)});const rL=nL;var oL=wt(fh);const iL=oL;function $1(r,u,a){for(var l=-1,o=r.length,p=u.length,d={};++l<o;){var g=l<p?u[l]:void 0;a(d,r[l],g)}return d}function aL(r,u){return $1(r||[],u||[],F0)}function uL(r,u){return $1(r||[],u||[],Id)}var sL=wt(function(r){var u=r.length,a=u>1?r[u-1]:void 0;return a=typeof a=="function"?(r.pop(),a):void 0,z1(r,a)});const cL=sL,Ye={chunk:U2,compact:Q2,concat:eM,difference:MM,differenceBy:DM,differenceWith:RM,drop:LM,dropRight:BM,dropRightWhile:zM,dropWhile:FM,fill:uk,findIndex:i1,findLastIndex:Y0,first:Cm,flatten:SP,flattenDeep:jP,flattenDepth:mk,fromPairs:PP,head:Cm,indexOf:iD,initial:aD,intersection:cD,intersectionBy:fD,intersectionWith:dD,join:dN,last:qn,lastIndexOf:ON,nth:eR,pull:iC,pullAll:P1,pullAllBy:aC,pullAllWith:uC,pullAt:fC,remove:DC,reverse:wd,slice:eI,sortedIndex:dI,sortedIndexBy:hI,sortedIndexOf:yI,sortedLastIndex:gI,sortedLastIndexBy:vI,sortedLastIndexOf:bI,sortedUniq:mI,sortedUniqBy:_I,tail:II,take:LI,takeRight:BI,takeRightWhile:zI,takeWhile:FI,union:AP,unionBy:M3,unionWith:D3,uniq:N3,uniqBy:R3,uniqWith:C3,unzip:fh,unzipWith:z1,without:X3,xor:Q3,xorBy:tL,xorWith:rL,zip:iL,zipObject:aL,zipObjectDeep:uL,zipWith:cL},zt={countBy:pM,each:km,eachRight:Dm,every:ok,filter:sk,find:fk,findLast:hk,flatMap:TP,flatMapDeep:vk,flatMapDepth:bk,forEach:km,forEachRight:Dm,groupBy:Wk,includes:rD,invokeMap:jD,keyBy:vN,map:Nd,orderBy:pR,partition:QR,reduce:AC,reduceRight:MC,reject:kC,sample:GC,sampleSize:XC,shuffle:qC,size:QC,some:oI,sortBy:aI},lL={now:MP},qt={after:uA,ary:g_,before:b_,bind:m_,bindKey:AT,curry:Vd,curryRight:Kd,debounce:kP,defer:SM,delay:PM,flip:Ok,memoize:DP,negate:uu,once:cR,overArgs:mR,partial:j1,partialRight:ZR,rearg:PC,rest:IC,spread:SI,throttle:NP,unary:x3,wrap:Y3},et={castArray:RP,clone:CP,cloneDeep:IP,cloneDeepWith:K2,cloneWith:Z2,conformsTo:aM,eq:qi,gt:Hk,gte:Xk,isArguments:K0,isArray:Ct,isArrayBuffer:MD,isArrayLike:Lo,isArrayLikeObject:ln,isBoolean:DD,isBuffer:Rd,isDate:ID,isElement:LD,isEmpty:WD,isEqual:LP,isEqualWith:GD,isError:$d,isFinite:UD,isFunction:Zi,isInteger:f1,isLength:BP,isMap:zP,isMatch:XD,isMatchWith:YD,isNaN:KD,isNative:QD,isNil:FP,isNull:eN,isNumber:p1,isObject:po,isObjectLike:pr,isPlainObject:mc,isRegExp:th,isSafeInteger:oN,isSet:$P,isString:Mc,isSymbol:fo,isTypedArray:Cd,isUndefined:WP,isWeakMap:aN,isWeakSet:sN,lt:PN,lte:TN,toArray:y1,toFinite:Co,toInteger:vt,toLength:n1,toNumber:co,toPlainObject:GP,toSafeInteger:p3,toString:It},Mn={add:iA,ceil:W2,divide:IM,floor:xk,max:IN,maxBy:LN,mean:zN,meanBy:FN,min:UN,minBy:XN,multiply:VN,round:$C,subtract:NI,sum:RI,sumBy:CI},dh={clamp:X2,inRange:eD,random:vC},ft={assign:lT,assignIn:jm,assignInWith:ic,assignWith:hT,at:gT,create:dM,defaults:mM,defaultsDeep:wM,entries:Nm,entriesIn:Rm,extend:jm,extendWith:ic,findKey:pk,findLastKey:yk,forIn:Nk,forInRight:Rk,forOwn:Ck,forOwnRight:Ik,functions:Lk,functionsIn:Bk,get:$0,has:qk,hasIn:HP,invert:bD,invertBy:wD,invoke:ED,keys:Bn,keysIn:ho,mapKeys:MN,mapValues:kN,merge:UP,mergeWith:Y_,omit:uR,omitBy:sR,pick:XP,pickBy:v1,result:LC,set:YP,setWith:YC,toPairs:Nm,toPairsIn:Rm,transform:h3,unset:B3,update:F3,updateWith:$3,values:ta,valuesIn:H3},Hr={at:K3,chain:G_,commit:J2,lodash:R,next:QN,plant:eC,reverse:Z3,tap:$I,thru:su,toIterator:c3,toJSON:dd,value:dd,valueOf:dd,wrapperChain:q3},Mt={camelCase:B2,capitalize:P_,deburr:A_,endsWith:HM,escape:Q_,escapeRegExp:nk,kebabCase:yN,lowerCase:xN,lowerFirst:SN,pad:GR,padEnd:HR,padStart:UR,parseInt:VR,repeat:NC,replace:RC,snakeCase:nI,split:wI,startCase:PI,startsWith:AI,template:i3,templateSettings:xd,toLower:l3,toUpper:d3,trim:y3,trimEnd:g3,trimStart:b3,truncate:w3,unescape:A3,upperCase:G3,upperFirst:Hd,words:W_},Rt={attempt:v_,bindAll:ET,cond:nM,conforms:iM,constant:V0,defaultTo:gM,flow:Mk,flowRight:Dk,identity:fr,iteratee:lN,matches:NN,matchesProperty:CN,method:WN,methodOf:HN,mixin:h1,noop:B0,nthArg:tR,over:hR,overEvery:OR,overSome:xR,property:VP,propertyOf:tC,range:wC,rangeRight:EC,stubArray:KP,stubFalse:Q0,stubObject:TI,stubString:MI,stubTrue:kI,times:s3,toPath:f3,uniqueId:L3};function fL(){var r=new Et(this.__wrapped__);return r.__actions__=ur(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=ur(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=ur(this.__views__),r}function pL(){if(this.__filtered__){var r=new Et(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}var dL=Math.max,hL=Math.min;function yL(r,u,a){for(var l=-1,o=a.length;++l<o;){var p=a[l],d=p.size;switch(p.type){case"drop":r+=d;break;case"dropRight":u-=d;break;case"take":u=hL(u,r+d);break;case"takeRight":r=dL(r,u-d);break}}return{start:r,end:u}}var gL=1,vL=2,bL=Math.min;function mL(){var r=this.__wrapped__.value(),u=this.__dir__,a=Ct(r),l=u<0,o=a?r.length:0,p=yL(0,o,this.__views__),d=p.start,g=p.end,v=g-d,O=l?g:d-1,E=this.__iteratees__,w=E.length,j=0,P=bL(v,this.__takeCount__);if(!a||!l&&o==v&&P==v)return C1(r,this.__actions__);var M=[];e:for(;v--&&j<P;){O+=u;for(var T=-1,k=r[O];++T<w;){var I=E[T],L=I.iteratee,Y=I.type,Q=L(k);if(Y==vL)k=Q;else if(!Q){if(Y==gL)continue e;break e}}M[j++]=k}return M}/**
|
||
* @license
|
||
* Lodash (Custom Build) <https://lodash.com/>
|
||
* Build: `lodash modularize exports="es" -o ./`
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/var _L="4.17.21",OL=2,wL=1,xL=3,W1=4294967295,EL=Array.prototype,SL=Object.prototype,G1=SL.hasOwnProperty,Um=rc?rc.iterator:void 0,jL=Math.max,Xm=Math.min,hh=function(r){return function(u,a,l){if(l==null){var o=po(a),p=o&&Bn(a),d=p&&p.length&&Ac(a,p);(d?d.length:o)||(l=a,a=u,u=this)}return r(u,a,l)}}(h1);R.after=qt.after;R.ary=qt.ary;R.assign=ft.assign;R.assignIn=ft.assignIn;R.assignInWith=ft.assignInWith;R.assignWith=ft.assignWith;R.at=ft.at;R.before=qt.before;R.bind=qt.bind;R.bindAll=Rt.bindAll;R.bindKey=qt.bindKey;R.castArray=et.castArray;R.chain=Hr.chain;R.chunk=Ye.chunk;R.compact=Ye.compact;R.concat=Ye.concat;R.cond=Rt.cond;R.conforms=Rt.conforms;R.constant=Rt.constant;R.countBy=zt.countBy;R.create=ft.create;R.curry=qt.curry;R.curryRight=qt.curryRight;R.debounce=qt.debounce;R.defaults=ft.defaults;R.defaultsDeep=ft.defaultsDeep;R.defer=qt.defer;R.delay=qt.delay;R.difference=Ye.difference;R.differenceBy=Ye.differenceBy;R.differenceWith=Ye.differenceWith;R.drop=Ye.drop;R.dropRight=Ye.dropRight;R.dropRightWhile=Ye.dropRightWhile;R.dropWhile=Ye.dropWhile;R.fill=Ye.fill;R.filter=zt.filter;R.flatMap=zt.flatMap;R.flatMapDeep=zt.flatMapDeep;R.flatMapDepth=zt.flatMapDepth;R.flatten=Ye.flatten;R.flattenDeep=Ye.flattenDeep;R.flattenDepth=Ye.flattenDepth;R.flip=qt.flip;R.flow=Rt.flow;R.flowRight=Rt.flowRight;R.fromPairs=Ye.fromPairs;R.functions=ft.functions;R.functionsIn=ft.functionsIn;R.groupBy=zt.groupBy;R.initial=Ye.initial;R.intersection=Ye.intersection;R.intersectionBy=Ye.intersectionBy;R.intersectionWith=Ye.intersectionWith;R.invert=ft.invert;R.invertBy=ft.invertBy;R.invokeMap=zt.invokeMap;R.iteratee=Rt.iteratee;R.keyBy=zt.keyBy;R.keys=Bn;R.keysIn=ft.keysIn;R.map=zt.map;R.mapKeys=ft.mapKeys;R.mapValues=ft.mapValues;R.matches=Rt.matches;R.matchesProperty=Rt.matchesProperty;R.memoize=qt.memoize;R.merge=ft.merge;R.mergeWith=ft.mergeWith;R.method=Rt.method;R.methodOf=Rt.methodOf;R.mixin=hh;R.negate=uu;R.nthArg=Rt.nthArg;R.omit=ft.omit;R.omitBy=ft.omitBy;R.once=qt.once;R.orderBy=zt.orderBy;R.over=Rt.over;R.overArgs=qt.overArgs;R.overEvery=Rt.overEvery;R.overSome=Rt.overSome;R.partial=qt.partial;R.partialRight=qt.partialRight;R.partition=zt.partition;R.pick=ft.pick;R.pickBy=ft.pickBy;R.property=Rt.property;R.propertyOf=Rt.propertyOf;R.pull=Ye.pull;R.pullAll=Ye.pullAll;R.pullAllBy=Ye.pullAllBy;R.pullAllWith=Ye.pullAllWith;R.pullAt=Ye.pullAt;R.range=Rt.range;R.rangeRight=Rt.rangeRight;R.rearg=qt.rearg;R.reject=zt.reject;R.remove=Ye.remove;R.rest=qt.rest;R.reverse=Ye.reverse;R.sampleSize=zt.sampleSize;R.set=ft.set;R.setWith=ft.setWith;R.shuffle=zt.shuffle;R.slice=Ye.slice;R.sortBy=zt.sortBy;R.sortedUniq=Ye.sortedUniq;R.sortedUniqBy=Ye.sortedUniqBy;R.split=Mt.split;R.spread=qt.spread;R.tail=Ye.tail;R.take=Ye.take;R.takeRight=Ye.takeRight;R.takeRightWhile=Ye.takeRightWhile;R.takeWhile=Ye.takeWhile;R.tap=Hr.tap;R.throttle=qt.throttle;R.thru=su;R.toArray=et.toArray;R.toPairs=ft.toPairs;R.toPairsIn=ft.toPairsIn;R.toPath=Rt.toPath;R.toPlainObject=et.toPlainObject;R.transform=ft.transform;R.unary=qt.unary;R.union=Ye.union;R.unionBy=Ye.unionBy;R.unionWith=Ye.unionWith;R.uniq=Ye.uniq;R.uniqBy=Ye.uniqBy;R.uniqWith=Ye.uniqWith;R.unset=ft.unset;R.unzip=Ye.unzip;R.unzipWith=Ye.unzipWith;R.update=ft.update;R.updateWith=ft.updateWith;R.values=ft.values;R.valuesIn=ft.valuesIn;R.without=Ye.without;R.words=Mt.words;R.wrap=qt.wrap;R.xor=Ye.xor;R.xorBy=Ye.xorBy;R.xorWith=Ye.xorWith;R.zip=Ye.zip;R.zipObject=Ye.zipObject;R.zipObjectDeep=Ye.zipObjectDeep;R.zipWith=Ye.zipWith;R.entries=ft.toPairs;R.entriesIn=ft.toPairsIn;R.extend=ft.assignIn;R.extendWith=ft.assignInWith;hh(R,R);R.add=Mn.add;R.attempt=Rt.attempt;R.camelCase=Mt.camelCase;R.capitalize=Mt.capitalize;R.ceil=Mn.ceil;R.clamp=dh.clamp;R.clone=et.clone;R.cloneDeep=et.cloneDeep;R.cloneDeepWith=et.cloneDeepWith;R.cloneWith=et.cloneWith;R.conformsTo=et.conformsTo;R.deburr=Mt.deburr;R.defaultTo=Rt.defaultTo;R.divide=Mn.divide;R.endsWith=Mt.endsWith;R.eq=et.eq;R.escape=Mt.escape;R.escapeRegExp=Mt.escapeRegExp;R.every=zt.every;R.find=zt.find;R.findIndex=Ye.findIndex;R.findKey=ft.findKey;R.findLast=zt.findLast;R.findLastIndex=Ye.findLastIndex;R.findLastKey=ft.findLastKey;R.floor=Mn.floor;R.forEach=zt.forEach;R.forEachRight=zt.forEachRight;R.forIn=ft.forIn;R.forInRight=ft.forInRight;R.forOwn=ft.forOwn;R.forOwnRight=ft.forOwnRight;R.get=ft.get;R.gt=et.gt;R.gte=et.gte;R.has=ft.has;R.hasIn=ft.hasIn;R.head=Ye.head;R.identity=fr;R.includes=zt.includes;R.indexOf=Ye.indexOf;R.inRange=dh.inRange;R.invoke=ft.invoke;R.isArguments=et.isArguments;R.isArray=Ct;R.isArrayBuffer=et.isArrayBuffer;R.isArrayLike=et.isArrayLike;R.isArrayLikeObject=et.isArrayLikeObject;R.isBoolean=et.isBoolean;R.isBuffer=et.isBuffer;R.isDate=et.isDate;R.isElement=et.isElement;R.isEmpty=et.isEmpty;R.isEqual=et.isEqual;R.isEqualWith=et.isEqualWith;R.isError=et.isError;R.isFinite=et.isFinite;R.isFunction=et.isFunction;R.isInteger=et.isInteger;R.isLength=et.isLength;R.isMap=et.isMap;R.isMatch=et.isMatch;R.isMatchWith=et.isMatchWith;R.isNaN=et.isNaN;R.isNative=et.isNative;R.isNil=et.isNil;R.isNull=et.isNull;R.isNumber=et.isNumber;R.isObject=po;R.isObjectLike=et.isObjectLike;R.isPlainObject=et.isPlainObject;R.isRegExp=et.isRegExp;R.isSafeInteger=et.isSafeInteger;R.isSet=et.isSet;R.isString=et.isString;R.isSymbol=et.isSymbol;R.isTypedArray=et.isTypedArray;R.isUndefined=et.isUndefined;R.isWeakMap=et.isWeakMap;R.isWeakSet=et.isWeakSet;R.join=Ye.join;R.kebabCase=Mt.kebabCase;R.last=qn;R.lastIndexOf=Ye.lastIndexOf;R.lowerCase=Mt.lowerCase;R.lowerFirst=Mt.lowerFirst;R.lt=et.lt;R.lte=et.lte;R.max=Mn.max;R.maxBy=Mn.maxBy;R.mean=Mn.mean;R.meanBy=Mn.meanBy;R.min=Mn.min;R.minBy=Mn.minBy;R.stubArray=Rt.stubArray;R.stubFalse=Rt.stubFalse;R.stubObject=Rt.stubObject;R.stubString=Rt.stubString;R.stubTrue=Rt.stubTrue;R.multiply=Mn.multiply;R.nth=Ye.nth;R.noop=Rt.noop;R.now=lL.now;R.pad=Mt.pad;R.padEnd=Mt.padEnd;R.padStart=Mt.padStart;R.parseInt=Mt.parseInt;R.random=dh.random;R.reduce=zt.reduce;R.reduceRight=zt.reduceRight;R.repeat=Mt.repeat;R.replace=Mt.replace;R.result=ft.result;R.round=Mn.round;R.sample=zt.sample;R.size=zt.size;R.snakeCase=Mt.snakeCase;R.some=zt.some;R.sortedIndex=Ye.sortedIndex;R.sortedIndexBy=Ye.sortedIndexBy;R.sortedIndexOf=Ye.sortedIndexOf;R.sortedLastIndex=Ye.sortedLastIndex;R.sortedLastIndexBy=Ye.sortedLastIndexBy;R.sortedLastIndexOf=Ye.sortedLastIndexOf;R.startCase=Mt.startCase;R.startsWith=Mt.startsWith;R.subtract=Mn.subtract;R.sum=Mn.sum;R.sumBy=Mn.sumBy;R.template=Mt.template;R.times=Rt.times;R.toFinite=et.toFinite;R.toInteger=vt;R.toLength=et.toLength;R.toLower=Mt.toLower;R.toNumber=et.toNumber;R.toSafeInteger=et.toSafeInteger;R.toString=et.toString;R.toUpper=Mt.toUpper;R.trim=Mt.trim;R.trimEnd=Mt.trimEnd;R.trimStart=Mt.trimStart;R.truncate=Mt.truncate;R.unescape=Mt.unescape;R.uniqueId=Rt.uniqueId;R.upperCase=Mt.upperCase;R.upperFirst=Mt.upperFirst;R.each=zt.forEach;R.eachRight=zt.forEachRight;R.first=Ye.head;hh(R,function(){var r={};return yo(R,function(u,a){G1.call(R.prototype,a)||(r[a]=u)}),r}(),{chain:!1});R.VERSION=_L;(R.templateSettings=Mt.templateSettings).imports._=R;xr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){R[r].placeholder=R});xr(["drop","take"],function(r,u){Et.prototype[r]=function(a){a=a===void 0?1:jL(vt(a),0);var l=this.__filtered__&&!u?new Et(this):this.clone();return l.__filtered__?l.__takeCount__=Xm(a,l.__takeCount__):l.__views__.push({size:Xm(a,W1),type:r+(l.__dir__<0?"Right":"")}),l},Et.prototype[r+"Right"]=function(a){return this.reverse()[r](a).reverse()}});xr(["filter","map","takeWhile"],function(r,u){var a=u+1,l=a==wL||a==xL;Et.prototype[r]=function(o){var p=this.clone();return p.__iteratees__.push({iteratee:yt(o),type:a}),p.__filtered__=p.__filtered__||l,p}});xr(["head","last"],function(r,u){var a="take"+(u?"Right":"");Et.prototype[r]=function(){return this[a](1).value()[0]}});xr(["initial","tail"],function(r,u){var a="drop"+(u?"":"Right");Et.prototype[r]=function(){return this.__filtered__?new Et(this):this[a](1)}});Et.prototype.compact=function(){return this.filter(fr)};Et.prototype.find=function(r){return this.filter(r).head()};Et.prototype.findLast=function(r){return this.reverse().find(r)};Et.prototype.invokeMap=wt(function(r,u){return typeof r=="function"?new Et(this):this.map(function(a){return au(a,r,u)})});Et.prototype.reject=function(r){return this.filter(uu(yt(r)))};Et.prototype.slice=function(r,u){r=vt(r);var a=this;return a.__filtered__&&(r>0||u<0)?new Et(a):(r<0?a=a.takeRight(-r):r&&(a=a.drop(r)),u!==void 0&&(u=vt(u),a=u<0?a.dropRight(-u):a.take(u-r)),a)};Et.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()};Et.prototype.toArray=function(){return this.take(W1)};yo(Et.prototype,function(r,u){var a=/^(?:filter|find|map|reject)|While$/.test(u),l=/^(?:head|last)$/.test(u),o=R[l?"take"+(u=="last"?"Right":""):u],p=l||/^find/.test(u);o&&(R.prototype[u]=function(){var d=this.__wrapped__,g=l?[1]:arguments,v=d instanceof Et,O=g[0],E=v||Ct(d),w=function(I){var L=o.apply(R,nu([I],g));return l&&j?L[0]:L};E&&a&&typeof O=="function"&&O.length!=1&&(v=E=!1);var j=this.__chain__,P=!!this.__actions__.length,M=p&&!j,T=v&&!P;if(!p&&E){d=T?d:new Et(this);var k=r.apply(d,g);return k.__actions__.push({func:su,args:[w],thisArg:void 0}),new cr(k,j)}return M&&T?r.apply(this,g):(k=this.thru(w),M?l?k.value()[0]:k.value():k)})});xr(["pop","push","shift","sort","splice","unshift"],function(r){var u=EL[r],a=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",l=/^(?:pop|shift)$/.test(r);R.prototype[r]=function(){var o=arguments;if(l&&!this.__chain__){var p=this.value();return u.apply(Ct(p)?p:[],o)}return this[a](function(d){return u.apply(Ct(d)?d:[],o)})}});yo(Et.prototype,function(r,u){var a=R[u];if(a){var l=a.name+"";G1.call(Ui,l)||(Ui[l]=[]),Ui[l].push({name:u,func:a})}});Ui[Sc(void 0,OL).name]=[{name:"wrapper",func:void 0}];Et.prototype.clone=fL;Et.prototype.reverse=pL;Et.prototype.value=mL;R.prototype.at=Hr.at;R.prototype.chain=Hr.wrapperChain;R.prototype.commit=Hr.commit;R.prototype.next=Hr.next;R.prototype.plant=Hr.plant;R.prototype.reverse=Hr.reverse;R.prototype.toJSON=R.prototype.valueOf=R.prototype.value=Hr.value;R.prototype.first=R.prototype.head;Um&&(R.prototype[Um]=Hr.toIterator);const PL=[{incoming:[],outgoing:["Flow_33inf2k"],dockers:[],type:2,properties:{a:"efrwe",b:"wewe",name:"开始",x:280,y:200,text:{x:280,y:200,value:"开始"},logicFlowType:"bpmn:startEvent"},key:"Event_1d42u4p"},{incoming:["Flow_379e0o9"],outgoing:[],dockers:[],type:3,properties:{a:"efrwe",b:"wewe",name:"结束",x:920,y:200,text:{x:920,y:200,value:"结束"},logicFlowType:"bpmn:endEvent"},key:"Event_08p8i6q"},{incoming:["Flow_0pfouf0"],outgoing:["Flow_3918lhh"],dockers:[],type:6,properties:{a:"efrwe",b:"wewe",name:"网关",x:580,y:200,text:{x:580,y:200,value:"网关"},logicFlowType:"bpmn:exclusiveGateway"},key:"Gateway_1fngqgj"},{incoming:["Flow_33inf2k"],outgoing:["Flow_0pfouf0"],dockers:[],type:4,properties:{a:"efrwe",b:"wewe",name:"用户",x:420,y:200,text:{x:420,y:200,value:"用户"},logicFlowType:"bpmn:userTask"},key:"Activity_2mgtaia"},{incoming:["Flow_3918lhh"],outgoing:["Flow_379e0o9"],dockers:[],type:5,properties:{a:"efrwe",b:"wewe",name:"服务",x:760,y:200,text:{x:760,y:200,value:"服务"},logicFlowType:"bpmn:serviceTask"},key:"Activity_1sp8qc8"},{incoming:["Event_1d42u4p"],outgoing:["Activity_2mgtaia"],type:1,dockers:[],properties:{name:"边",text:{x:331,y:200,value:"边"},startPoint:{x:298,y:200},endPoint:{x:370,y:200},pointsList:[{x:298,y:200},{x:370,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_33inf2k"},{incoming:["Activity_2mgtaia"],outgoing:["Gateway_1fngqgj"],type:1,dockers:[],properties:{name:"边2",text:{x:507,y:200,value:"边2"},startPoint:{x:470,y:200},endPoint:{x:555,y:200},pointsList:[{x:470,y:200},{x:555,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_0pfouf0"},{incoming:["Gateway_1fngqgj"],outgoing:["Activity_1sp8qc8"],type:1,dockers:[],properties:{name:"边3",text:{x:664,y:200,value:"边3"},startPoint:{x:605,y:200},endPoint:{x:710,y:200},pointsList:[{x:605,y:200},{x:710,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_3918lhh"},{incoming:["Activity_1sp8qc8"],outgoing:["Event_08p8i6q"],type:1,dockers:[],properties:{name:"边4",text:{x:871,y:200,value:"边4"},startPoint:{x:810,y:200},endPoint:{x:902,y:200},pointsList:[{x:810,y:200},{x:902,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_379e0o9"}],AL={flowElementList:PL};var Ed={exports:{}};(function(r,u){(function(a,l){r.exports=l()})(window,function(){return function(a){var l={};function o(p){if(l[p])return l[p].exports;var d=l[p]={i:p,l:!1,exports:{}};return a[p].call(d.exports,d,d.exports,o),d.l=!0,d.exports}return o.m=a,o.c=l,o.d=function(p,d,g){o.o(p,d)||Object.defineProperty(p,d,{enumerable:!0,get:g})},o.r=function(p){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},o.t=function(p,d){if(1&d&&(p=o(p)),8&d||4&d&&typeof p=="object"&&p&&p.__esModule)return p;var g=Object.create(null);if(o.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:p}),2&d&&typeof p!="string")for(var v in p)o.d(g,v,(function(O){return p[O]}).bind(null,v));return g},o.n=function(p){var d=p&&p.__esModule?function(){return p.default}:function(){return p};return o.d(d,"a",d),d},o.o=function(p,d){return Object.prototype.hasOwnProperty.call(p,d)},o.p="",o(o.s=215)}([function(a,l,o){o.d(l,"a",function(){return X}),o.d(l,"b",function(){return Q}),o.d(l,"c",function(){return Ce}),o.d(l,"d",function(){return Je}),o.d(l,"e",function(){return I}),o.d(l,"f",function(){return Y}),o.d(l,"g",function(){return I}),o.d(l,"h",function(){return Ae}),o.d(l,"i",function(){return d}),o.d(l,"j",function(){return Ze}),o.d(l,"k",function(){return G});var p,d,g,v,O,E,w,j={},P=[],M=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function T(ee,J){for(var ue in J)ee[ue]=J[ue];return ee}function k(ee){var J=ee.parentNode;J&&J.removeChild(ee)}function I(ee,J,ue){var we,Te,xe,Qe={};for(xe in J)xe=="key"?we=J[xe]:xe=="ref"?Te=J[xe]:Qe[xe]=J[xe];if(arguments.length>2&&(Qe.children=arguments.length>3?p.call(arguments,2):ue),typeof ee=="function"&&ee.defaultProps!=null)for(xe in ee.defaultProps)Qe[xe]===void 0&&(Qe[xe]=ee.defaultProps[xe]);return L(ee,Qe,we,Te,null)}function L(ee,J,ue,we,Te){var xe={type:ee,props:J,key:ue,ref:we,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:Te??++g};return Te==null&&d.vnode!=null&&d.vnode(xe),xe}function Y(){return{current:null}}function Q(ee){return ee.children}function X(ee,J){this.props=ee,this.context=J}function V(ee,J){if(J==null)return ee.__?V(ee.__,ee.__.__k.indexOf(ee)+1):null;for(var ue;J<ee.__k.length;J++)if((ue=ee.__k[J])!=null&&ue.__e!=null)return ue.__e;return typeof ee.type=="function"?V(ee):null}function Z(ee){var J,ue;if((ee=ee.__)!=null&&ee.__c!=null){for(ee.__e=ee.__c.base=null,J=0;J<ee.__k.length;J++)if((ue=ee.__k[J])!=null&&ue.__e!=null){ee.__e=ee.__c.base=ue.__e;break}return Z(ee)}}function F(ee){(!ee.__d&&(ee.__d=!0)&&v.push(ee)&&!C.__r++||E!==d.debounceRendering)&&((E=d.debounceRendering)||O)(C)}function C(){for(var ee;C.__r=v.length;)ee=v.sort(function(J,ue){return J.__v.__b-ue.__v.__b}),v=[],ee.some(function(J){var ue,we,Te,xe,Qe,it;J.__d&&(Qe=(xe=(ue=J).__v).__e,(it=ue.__P)&&(we=[],(Te=T({},xe)).__v=xe.__v+1,ve(it,xe,Te,ue.__n,it.ownerSVGElement!==void 0,xe.__h!=null?[Qe]:null,we,Qe??V(xe),xe.__h),se(we,xe),xe.__e!=Qe&&Z(xe)))})}function B(ee,J,ue,we,Te,xe,Qe,it,tt,Ve){var be,Ge,re,ze,lt,St,st,Ot=we&&we.__k||P,Lt=Ot.length;for(ue.__k=[],be=0;be<J.length;be++)if((ze=ue.__k[be]=(ze=J[be])==null||typeof ze=="boolean"?null:typeof ze=="string"||typeof ze=="number"||typeof ze=="bigint"?L(null,ze,null,null,ze):Array.isArray(ze)?L(Q,{children:ze},null,null,null):ze.__b>0?L(ze.type,ze.props,ze.key,null,ze.__v):ze)!=null){if(ze.__=ue,ze.__b=ue.__b+1,(re=Ot[be])===null||re&&ze.key==re.key&&ze.type===re.type)Ot[be]=void 0;else for(Ge=0;Ge<Lt;Ge++){if((re=Ot[Ge])&&ze.key==re.key&&ze.type===re.type){Ot[Ge]=void 0;break}re=null}ve(ee,ze,re=re||j,Te,xe,Qe,it,tt,Ve),lt=ze.__e,(Ge=ze.ref)&&re.ref!=Ge&&(st||(st=[]),re.ref&&st.push(re.ref,null,ze),st.push(Ge,ze.__c||lt,ze)),lt!=null?(St==null&&(St=lt),typeof ze.type=="function"&&ze.__k===re.__k?ze.__d=tt=$(ze,tt,ee):tt=te(ee,ze,re,Ot,lt,tt),typeof ue.type=="function"&&(ue.__d=tt)):tt&&re.__e==tt&&tt.parentNode!=ee&&(tt=V(re))}for(ue.__e=St,be=Lt;be--;)Ot[be]!=null&&(typeof ue.type=="function"&&Ot[be].__e!=null&&Ot[be].__e==ue.__d&&(ue.__d=V(we,be+1)),je(Ot[be],Ot[be]));if(st)for(be=0;be<st.length;be++)me(st[be],st[++be],st[++be])}function $(ee,J,ue){for(var we,Te=ee.__k,xe=0;Te&&xe<Te.length;xe++)(we=Te[xe])&&(we.__=ee,J=typeof we.type=="function"?$(we,J,ue):te(ue,we,we,Te,we.__e,J));return J}function G(ee,J){return J=J||[],ee==null||typeof ee=="boolean"||(Array.isArray(ee)?ee.some(function(ue){G(ue,J)}):J.push(ee)),J}function te(ee,J,ue,we,Te,xe){var Qe,it,tt;if(J.__d!==void 0)Qe=J.__d,J.__d=void 0;else if(ue==null||Te!=xe||Te.parentNode==null)e:if(xe==null||xe.parentNode!==ee)ee.appendChild(Te),Qe=null;else{for(it=xe,tt=0;(it=it.nextSibling)&&tt<we.length;tt+=2)if(it==Te)break e;ee.insertBefore(Te,xe),Qe=xe}return Qe!==void 0?Qe:Te.nextSibling}function pe(ee,J,ue){J[0]==="-"?ee.setProperty(J,ue):ee[J]=ue==null?"":typeof ue!="number"||M.test(J)?ue:ue+"px"}function le(ee,J,ue,we,Te){var xe;e:if(J==="style")if(typeof ue=="string")ee.style.cssText=ue;else{if(typeof we=="string"&&(ee.style.cssText=we=""),we)for(J in we)ue&&J in ue||pe(ee.style,J,"");if(ue)for(J in ue)we&&ue[J]===we[J]||pe(ee.style,J,ue[J])}else if(J[0]==="o"&&J[1]==="n")xe=J!==(J=J.replace(/Capture$/,"")),J=J.toLowerCase()in ee?J.toLowerCase().slice(2):J.slice(2),ee.l||(ee.l={}),ee.l[J+xe]=ue,ue?we||ee.addEventListener(J,xe?Ee:ge,xe):ee.removeEventListener(J,xe?Ee:ge,xe);else if(J!=="dangerouslySetInnerHTML"){if(Te)J=J.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(J!=="href"&&J!=="list"&&J!=="form"&&J!=="tabIndex"&&J!=="download"&&J in ee)try{ee[J]=ue??"";break e}catch{}typeof ue=="function"||(ue!=null&&(ue!==!1||J[0]==="a"&&J[1]==="r")?ee.setAttribute(J,ue):ee.removeAttribute(J))}}function ge(ee){this.l[ee.type+!1](d.event?d.event(ee):ee)}function Ee(ee){this.l[ee.type+!0](d.event?d.event(ee):ee)}function ve(ee,J,ue,we,Te,xe,Qe,it,tt){var Ve,be,Ge,re,ze,lt,St,st,Ot,Lt,Ft,ct=J.type;if(J.constructor!==void 0)return null;ue.__h!=null&&(tt=ue.__h,it=J.__e=ue.__e,J.__h=null,xe=[it]),(Ve=d.__b)&&Ve(J);try{e:if(typeof ct=="function"){if(st=J.props,Ot=(Ve=ct.contextType)&&we[Ve.__c],Lt=Ve?Ot?Ot.props.value:Ve.__:we,ue.__c?St=(be=J.__c=ue.__c).__=be.__E:("prototype"in ct&&ct.prototype.render?J.__c=be=new ct(st,Lt):(J.__c=be=new X(st,Lt),be.constructor=ct,be.render=Be),Ot&&Ot.sub(be),be.props=st,be.state||(be.state={}),be.context=Lt,be.__n=we,Ge=be.__d=!0,be.__h=[]),be.__s==null&&(be.__s=be.state),ct.getDerivedStateFromProps!=null&&(be.__s==be.state&&(be.__s=T({},be.__s)),T(be.__s,ct.getDerivedStateFromProps(st,be.__s))),re=be.props,ze=be.state,Ge)ct.getDerivedStateFromProps==null&&be.componentWillMount!=null&&be.componentWillMount(),be.componentDidMount!=null&&be.__h.push(be.componentDidMount);else{if(ct.getDerivedStateFromProps==null&&st!==re&&be.componentWillReceiveProps!=null&&be.componentWillReceiveProps(st,Lt),!be.__e&&be.shouldComponentUpdate!=null&&be.shouldComponentUpdate(st,be.__s,Lt)===!1||J.__v===ue.__v){be.props=st,be.state=be.__s,J.__v!==ue.__v&&(be.__d=!1),be.__v=J,J.__e=ue.__e,J.__k=ue.__k,J.__k.forEach(function(Yt){Yt&&(Yt.__=J)}),be.__h.length&&Qe.push(be);break e}be.componentWillUpdate!=null&&be.componentWillUpdate(st,be.__s,Lt),be.componentDidUpdate!=null&&be.__h.push(function(){be.componentDidUpdate(re,ze,lt)})}be.context=Lt,be.props=st,be.state=be.__s,(Ve=d.__r)&&Ve(J),be.__d=!1,be.__v=J,be.__P=ee,Ve=be.render(be.props,be.state,be.context),be.state=be.__s,be.getChildContext!=null&&(we=T(T({},we),be.getChildContext())),Ge||be.getSnapshotBeforeUpdate==null||(lt=be.getSnapshotBeforeUpdate(re,ze)),Ft=Ve!=null&&Ve.type===Q&&Ve.key==null?Ve.props.children:Ve,B(ee,Array.isArray(Ft)?Ft:[Ft],J,ue,we,Te,xe,Qe,it,tt),be.base=J.__e,J.__h=null,be.__h.length&&Qe.push(be),St&&(be.__E=be.__=null),be.__e=!1}else xe==null&&J.__v===ue.__v?(J.__k=ue.__k,J.__e=ue.__e):J.__e=ye(ue.__e,J,ue,we,Te,xe,Qe,tt);(Ve=d.diffed)&&Ve(J)}catch(Yt){J.__v=null,(tt||xe!=null)&&(J.__e=it,J.__h=!!tt,xe[xe.indexOf(it)]=null),d.__e(Yt,J,ue)}}function se(ee,J){d.__c&&d.__c(J,ee),ee.some(function(ue){try{ee=ue.__h,ue.__h=[],ee.some(function(we){we.call(ue)})}catch(we){d.__e(we,ue.__v)}})}function ye(ee,J,ue,we,Te,xe,Qe,it){var tt,Ve,be,Ge=ue.props,re=J.props,ze=J.type,lt=0;if(ze==="svg"&&(Te=!0),xe!=null){for(;lt<xe.length;lt++)if((tt=xe[lt])&&"setAttribute"in tt==!!ze&&(ze?tt.localName===ze:tt.nodeType===3)){ee=tt,xe[lt]=null;break}}if(ee==null){if(ze===null)return document.createTextNode(re);ee=Te?document.createElementNS("http://www.w3.org/2000/svg",ze):document.createElement(ze,re.is&&re),xe=null,it=!1}if(ze===null)Ge===re||it&&ee.data===re||(ee.data=re);else{if(xe=xe&&p.call(ee.childNodes),Ve=(Ge=ue.props||j).dangerouslySetInnerHTML,be=re.dangerouslySetInnerHTML,!it){if(xe!=null)for(Ge={},lt=0;lt<ee.attributes.length;lt++)Ge[ee.attributes[lt].name]=ee.attributes[lt].value;(be||Ve)&&(be&&(Ve&&be.__html==Ve.__html||be.__html===ee.innerHTML)||(ee.innerHTML=be&&be.__html||""))}if(function(St,st,Ot,Lt,Ft){var ct;for(ct in Ot)ct==="children"||ct==="key"||ct in st||le(St,ct,null,Ot[ct],Lt);for(ct in st)Ft&&typeof st[ct]!="function"||ct==="children"||ct==="key"||ct==="value"||ct==="checked"||Ot[ct]===st[ct]||le(St,ct,st[ct],Ot[ct],Lt)}(ee,re,Ge,Te,it),be)J.__k=[];else if(lt=J.props.children,B(ee,Array.isArray(lt)?lt:[lt],J,ue,we,Te&&ze!=="foreignObject",xe,Qe,xe?xe[0]:ue.__k&&V(ue,0),it),xe!=null)for(lt=xe.length;lt--;)xe[lt]!=null&&k(xe[lt]);it||("value"in re&&(lt=re.value)!==void 0&&(lt!==Ge.value||lt!==ee.value||ze==="progress"&&!lt)&&le(ee,"value",lt,Ge.value,!1),"checked"in re&&(lt=re.checked)!==void 0&<!==ee.checked&&le(ee,"checked",lt,Ge.checked,!1))}return ee}function me(ee,J,ue){try{typeof ee=="function"?ee(J):ee.current=J}catch(we){d.__e(we,ue)}}function je(ee,J,ue){var we,Te;if(d.unmount&&d.unmount(ee),(we=ee.ref)&&(we.current&&we.current!==ee.__e||me(we,null,J)),(we=ee.__c)!=null){if(we.componentWillUnmount)try{we.componentWillUnmount()}catch(xe){d.__e(xe,J)}we.base=we.__P=null}if(we=ee.__k)for(Te=0;Te<we.length;Te++)we[Te]&&je(we[Te],J,typeof ee.type!="function");ue||ee.__e==null||k(ee.__e),ee.__e=ee.__d=void 0}function Be(ee,J,ue){return this.constructor(ee,ue)}function Ze(ee,J,ue){var we,Te,xe;d.__&&d.__(ee,J),Te=(we=typeof ue=="function")?null:ue&&ue.__k||J.__k,xe=[],ve(J,ee=(!we&&ue||J).__k=I(Q,null,[ee]),Te||j,j,J.ownerSVGElement!==void 0,!we&&ue?[ue]:Te?null:J.firstChild?p.call(J.childNodes):null,xe,!we&&ue?ue:Te?Te.__e:J.firstChild,we),se(xe,ee)}function Ae(ee,J){Ze(ee,J,Ae)}function Ce(ee,J,ue){var we,Te,xe,Qe=T({},ee.props);for(xe in J)xe=="key"?we=J[xe]:xe=="ref"?Te=J[xe]:Qe[xe]=J[xe];return arguments.length>2&&(Qe.children=arguments.length>3?p.call(arguments,2):ue),L(ee.type,Qe,we||ee.key,Te||ee.ref,null)}function Je(ee,J){var ue={__c:J="__cC"+w++,__:ee,Consumer:function(we,Te){return we.children(Te)},Provider:function(we){var Te,xe;return this.getChildContext||(Te=[],(xe={})[J]=this,this.getChildContext=function(){return xe},this.shouldComponentUpdate=function(Qe){this.props.value!==Qe.value&&Te.some(F)},this.sub=function(Qe){Te.push(Qe);var it=Qe.componentWillUnmount;Qe.componentWillUnmount=function(){Te.splice(Te.indexOf(Qe),1),it&&it.call(Qe)}}),we.children}};return ue.Provider.__=ue.Consumer.contextType=ue}p=P.slice,d={__e:function(ee,J){for(var ue,we,Te;J=J.__;)if((ue=J.__c)&&!ue.__)try{if((we=ue.constructor)&&we.getDerivedStateFromError!=null&&(ue.setState(we.getDerivedStateFromError(ee)),Te=ue.__d),ue.componentDidCatch!=null&&(ue.componentDidCatch(ee),Te=ue.__d),Te)return ue.__E=ue}catch(xe){ee=xe}throw ee}},g=0,X.prototype.setState=function(ee,J){var ue;ue=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=T({},this.state),typeof ee=="function"&&(ee=ee(T({},ue),this.props)),ee&&T(ue,ee),ee!=null&&this.__v&&(J&&this.__h.push(J),F(this))},X.prototype.forceUpdate=function(ee){this.__v&&(this.__e=!0,ee&&this.__h.push(ee),F(this))},X.prototype.render=Q,v=[],O=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,C.__r=0,w=0},function(a,l,o){(function(p,d){o.d(l,"a",function(){return F}),o.d(l,"b",function(){return fa}),o.d(l,"c",function(){return hr}),o.d(l,"d",function(){return rt}),o.d(l,"e",function(){return Ne}),o.d(l,"f",function(){return De}),o.d(l,"g",function(){return Ke}),o.d(l,"h",function(){return wo}),o.d(l,"i",function(){return Ft}),o.d(l,"j",function(){return Fe}),o.d(l,"k",function(){return Pr}),o.d(l,"l",function(){return sa}),o.d(l,"m",function(){return St}),o.d(l,"n",function(){return _o}),o.d(l,"o",function(){return $}),o.d(l,"p",function(){return Su}),o.d(l,"q",function(){return Ar}),o.d(l,"r",function(){return wu}),o.d(l,"s",function(){return Hn}),o.d(l,"t",function(){return Go}),o.d(l,"u",function(){return pi}),o.d(l,"v",function(){return Hc}),o.d(l,"w",function(){return Eu}),o.d(l,"x",function(){return Uo}),o.d(l,"y",function(){return tr}),o.d(l,"z",function(){return Jt}),o.d(l,"A",function(){return Rn}),o.d(l,"B",function(){return Tr}),o.d(l,"C",function(){return Ve}),o.d(l,"D",function(){return Pu}),o.d(l,"E",function(){return mo}),o.d(l,"F",function(){return bo}),o.d(l,"G",function(){return $c}),o.d(l,"H",function(){return hu}),o.d(l,"I",function(){return Xc}),o.d(l,"J",function(){return Wn}),o.d(l,"K",function(){return ie}),o.d(l,"L",function(){return hn}),o.d(l,"M",function(){return Au});var g=[];Object.freeze(g);var v={};function O(){return++Ue.mobxGuid}function E(b){throw w(!1,b),"X"}function w(b,m){if(!b)throw new Error("[mobx] "+(m||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(v);function j(b){var m=!1;return function(){if(!m)return m=!0,b.apply(this,arguments)}}var P=function(){};function M(b){return b!==null&&typeof b=="object"}function T(b){if(b===null||typeof b!="object")return!1;var m=Object.getPrototypeOf(b);return m===Object.prototype||m===null}function k(b,m,S){Object.defineProperty(b,m,{enumerable:!1,writable:!0,configurable:!0,value:S})}function I(b,m){var S="isMobX"+b;return m.prototype[S]=!0,function(N){return M(N)&&N[S]===!0}}function L(b){return b instanceof Map}function Y(b){return b instanceof Set}function Q(b){var m=new Set;for(var S in b)m.add(S);return Object.getOwnPropertySymbols(b).forEach(function(N){Object.getOwnPropertyDescriptor(b,N).enumerable&&m.add(N)}),Array.from(m)}function X(b){return b&&b.toString?b.toString():new String(b).toString()}function V(b){return b===null?null:typeof b=="object"?""+b:b}var Z=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(b){return Object.getOwnPropertyNames(b).concat(Object.getOwnPropertySymbols(b))}:Object.getOwnPropertyNames,F=Symbol("mobx administration"),C=function(){function b(m){m===void 0&&(m="Atom@"+O()),this.name=m,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Ge.NOT_TRACKING}return b.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(m){return m()})},b.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(m){return m()})},b.prototype.reportObserved=function(){return pu(this)},b.prototype.reportChanged=function(){Fn(),function(m){m.lowestObserverState!==Ge.STALE&&(m.lowestObserverState=Ge.STALE,m.observers.forEach(function(S){S.dependenciesState===Ge.UP_TO_DATE&&(S.isTracing!==re.NONE&&jr(S,m),S.onBecomeStale()),S.dependenciesState=Ge.STALE}))}(this),$n()},b.prototype.toString=function(){return this.name},b}(),B=I("Atom",C);function $(b,m,S){m===void 0&&(m=P),S===void 0&&(S=P);var N,W=new C(b);return m!==P&&vu("onBecomeObserved",W,m,N),S!==P&&mo(W,S),W}var G={identity:function(b,m){return b===m},structural:function(b,m){return da(b,m)},default:function(b,m){return Object.is(b,m)},shallow:function(b,m){return da(b,m,1)}},te=function(b,m){return te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,N){S.__proto__=N}||function(S,N){for(var W in N)N.hasOwnProperty(W)&&(S[W]=N[W])},te(b,m)};/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
this file except in compliance with the License. You may obtain a copy of the
|
||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
||
See the Apache Version 2.0 License for specific language governing permissions
|
||
and limitations under the License.
|
||
***************************************************************************** */var pe=function(){return pe=Object.assign||function(b){for(var m,S=1,N=arguments.length;S<N;S++)for(var W in m=arguments[S])Object.prototype.hasOwnProperty.call(m,W)&&(b[W]=m[W]);return b},pe.apply(this,arguments)};function le(b){var m=typeof Symbol=="function"&&b[Symbol.iterator],S=0;return m?m.call(b):{next:function(){return b&&S>=b.length&&(b=void 0),{value:b&&b[S++],done:!b}}}}function ge(b,m){var S=typeof Symbol=="function"&&b[Symbol.iterator];if(!S)return b;var N,W,ne=S.call(b),he=[];try{for(;(m===void 0||m-- >0)&&!(N=ne.next()).done;)he.push(N.value)}catch(Pe){W={error:Pe}}finally{try{N&&!N.done&&(S=ne.return)&&S.call(ne)}finally{if(W)throw W.error}}return he}function Ee(){for(var b=[],m=0;m<arguments.length;m++)b=b.concat(ge(arguments[m]));return b}var ve=Symbol("mobx did run lazy initializers"),se=Symbol("mobx pending decorators"),ye={},me={};function je(b,m){var S=m?ye:me;return S[b]||(S[b]={configurable:!0,enumerable:m,get:function(){return Be(this),this[b]},set:function(N){Be(this),this[b]=N}})}function Be(b){var m,S;if(b[ve]!==!0){var N=b[se];if(N){k(b,ve,!0);var W=Ee(Object.getOwnPropertySymbols(N),Object.keys(N));try{for(var ne=le(W),he=ne.next();!he.done;he=ne.next()){var Pe=N[he.value];Pe.propertyCreator(b,Pe.prop,Pe.descriptor,Pe.decoratorTarget,Pe.decoratorArguments)}}catch(We){m={error:We}}finally{try{he&&!he.done&&(S=ne.return)&&S.call(ne)}finally{if(m)throw m.error}}}}}function Ze(b,m){return function(){var S,N=function(W,ne,he,Pe){if(Pe===!0)return m(W,ne,he,W,S),null;if(!Object.prototype.hasOwnProperty.call(W,se)){var We=W[se];k(W,se,pe({},We))}return W[se][ne]={prop:ne,propertyCreator:m,descriptor:he,decoratorTarget:W,decoratorArguments:S},je(ne,b)};return Ae(arguments)?(S=g,N.apply(null,arguments)):(S=Array.prototype.slice.call(arguments),N)}}function Ae(b){return(b.length===2||b.length===3)&&(typeof b[1]=="string"||typeof b[1]=="symbol")||b.length===4&&b[3]===!0}function Ce(b,m,S){return Uo(b)?b:Array.isArray(b)?Ve.array(b,{name:S}):T(b)?Ve.object(b,void 0,{name:S}):L(b)?Ve.map(b,{name:S}):Y(b)?Ve.set(b,{name:S}):b}function Je(b){return b}function ee(b){w(b);var m=Ze(!0,function(N,W,ne,he,Pe){var We=ne?ne.initializer?ne.initializer.call(N):ne.value:void 0;Yo(N).addObservableProp(W,We,b)}),S=(p!==void 0&&p.env,m);return S.enhancer=b,S}var J={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function ue(b){return b==null?J:typeof b=="string"?{name:b,deep:!0,proxy:!0}:b}Object.freeze(J);var we=ee(Ce),Te=ee(function(b,m,S){return b==null||Rn(b)||tr(b)||Jt(b)||Nn(b)?b:Array.isArray(b)?Ve.array(b,{name:S,deep:!1}):T(b)?Ve.object(b,void 0,{name:S,deep:!1}):L(b)?Ve.map(b,{name:S,deep:!1}):Y(b)?Ve.set(b,{name:S,deep:!1}):E(!1)}),xe=ee(Je),Qe=ee(function(b,m,S){return da(b,m)?m:b});function it(b){return b.defaultDecorator?b.defaultDecorator.enhancer:b.deep===!1?Je:Ce}var tt={box:function(b,m){arguments.length>2&&be("box");var S=ue(m);return new Ht(b,it(S),S.name,!0,S.equals)},array:function(b,m){arguments.length>2&&be("array");var S=ue(m);return la(b,it(S),S.name)},map:function(b,m){arguments.length>2&&be("map");var S=ue(m);return new fa(b,it(S),S.name)},set:function(b,m){arguments.length>2&&be("set");var S=ue(m);return new yi(b,it(S),S.name)},object:function(b,m,S){typeof arguments[1]=="string"&&be("object");var N=ue(S);if(N.proxy===!1)return Ar({},b,m,N);var W=bu(N),ne=Ar({},void 0,void 0,N),he=Vc(ne);return mu(he,b,m,W),he},ref:xe,shallow:Te,deep:we,struct:Qe},Ve=function(b,m,S){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return we.apply(null,arguments);if(Uo(b))return b;var N=T(b)?Ve.object(b,m,S):Array.isArray(b)?Ve.array(b,m):L(b)?Ve.map(b,m):Y(b)?Ve.set(b,m):b;if(N!==b)return N;E(!1)};function be(b){E("Expected one or two arguments to observable."+b+". Did you accidentally try to use observable."+b+" as decorator?")}Object.keys(tt).forEach(function(b){return Ve[b]=tt[b]});var Ge,re,ze=Ze(!1,function(b,m,S,N,W){var ne=S.get,he=S.set,Pe=W[0]||{};Yo(b).addComputedProp(b,m,pe({get:ne,set:he,context:b},Pe))}),lt=ze({equals:G.structural}),St=function(b,m,S){if(typeof m=="string"||b!==null&&typeof b=="object"&&arguments.length===1)return ze.apply(null,arguments);var N=typeof m=="object"?m:{};return N.get=b,N.set=typeof m=="function"?m:N.set,N.name=N.name||b.name||"",new Er(N)};St.struct=lt,function(b){b[b.NOT_TRACKING=-1]="NOT_TRACKING",b[b.UP_TO_DATE=0]="UP_TO_DATE",b[b.POSSIBLY_STALE=1]="POSSIBLY_STALE",b[b.STALE=2]="STALE"}(Ge||(Ge={})),function(b){b[b.NONE=0]="NONE",b[b.LOG=1]="LOG",b[b.BREAK=2]="BREAK"}(re||(re={}));var st=function(b){this.cause=b};function Ot(b){return b instanceof st}function Lt(b){switch(b.dependenciesState){case Ge.UP_TO_DATE:return!1;case Ge.NOT_TRACKING:case Ge.STALE:return!0;case Ge.POSSIBLY_STALE:for(var m=De(!0),S=K(),N=b.observing,W=N.length,ne=0;ne<W;ne++){var he=N[ne];if(Sr(he)){if(Ue.disableErrorBoundaries)he.get();else try{he.get()}catch{return ce(S),Ne(m),!0}if(b.dependenciesState===Ge.STALE)return ce(S),Ne(m),!0}}return Xe(b),ce(S),Ne(m),!1}}function Ft(){return Ue.trackingDerivation!==null}function ct(b){var m=b.observers.size>0;Ue.computationDepth>0&&m&&E(!1),Ue.allowStateChanges||!m&&Ue.enforceActions!=="strict"||E(!1)}function Yt(b,m,S){var N=De(!0);Xe(b),b.newObserving=new Array(b.observing.length+100),b.unboundDepsCount=0,b.runId=++Ue.runId;var W,ne=Ue.trackingDerivation;if(Ue.trackingDerivation=b,Ue.disableErrorBoundaries===!0)W=m.call(S);else try{W=m.call(S)}catch(he){W=new st(he)}return Ue.trackingDerivation=ne,function(he){for(var Pe=he.observing,We=he.observing=he.newObserving,mt=Ge.UP_TO_DATE,ut=0,Dt=he.unboundDepsCount,dt=0;dt<Dt;dt++)(At=We[dt]).diffValue===0&&(At.diffValue=1,ut!==dt&&(We[ut]=At),ut++),At.dependenciesState>mt&&(mt=At.dependenciesState);for(We.length=ut,he.newObserving=null,Dt=Pe.length;Dt--;)(At=Pe[Dt]).diffValue===0&&lu(At,he),At.diffValue=0;for(;ut--;){var At;(At=We[ut]).diffValue===1&&(At.diffValue=0,Lc(At,he))}mt!==Ge.UP_TO_DATE&&(he.dependenciesState=mt,he.onBecomeStale())}(b),Ne(N),W}function H(b){var m=b.observing;b.observing=[];for(var S=m.length;S--;)lu(m[S],b);b.dependenciesState=Ge.NOT_TRACKING}function ie(b){var m=K();try{return b()}finally{ce(m)}}function K(){var b=Ue.trackingDerivation;return Ue.trackingDerivation=null,b}function ce(b){Ue.trackingDerivation=b}function De(b){var m=Ue.allowStateReads;return Ue.allowStateReads=b,m}function Ne(b){Ue.allowStateReads=b}function Xe(b){if(b.dependenciesState!==Ge.UP_TO_DATE){b.dependenciesState=Ge.UP_TO_DATE;for(var m=b.observing,S=m.length;S--;)m[S].lowestObserverState=Ge.UP_TO_DATE}}var gt=0,nn=1,fn=Object.getOwnPropertyDescriptor(function(){},"name");fn&&fn.configurable;function Vt(b,m,S){var N=function(){return Zt(b,m,S||this,arguments)};return N.isMobxAction=!0,N}function Zt(b,m,S,N){var W=Fe();try{return m.apply(S,N)}catch(ne){throw W.error=ne,ne}finally{Ke(W)}}function Fe(b,m,S){var N=0,W=K();Fn();var ne={prevDerivation:W,prevAllowStateChanges:at(!0),prevAllowStateReads:De(!0),notifySpy:!1,startTime:N,actionId:nn++,parentActionId:gt};return gt=ne.actionId,ne}function Ke(b){gt!==b.actionId&&E("invalid action stack. did you forget to finish an action?"),gt=b.parentActionId,b.error!==void 0&&(Ue.suppressReactionErrors=!0),kt(b.prevAllowStateChanges),Ne(b.prevAllowStateReads),$n(),ce(b.prevDerivation),b.notifySpy,Ue.suppressReactionErrors=!1}function rt(b,m){var S,N=at(b);try{S=m()}finally{kt(N)}return S}function at(b){var m=Ue.allowStateChanges;return Ue.allowStateChanges=b,m}function kt(b){Ue.allowStateChanges=b}var Ht=function(b){function m(S,N,W,ne,he){W===void 0&&(W="ObservableValue@"+O()),he===void 0&&(he=G.default);var Pe=b.call(this,W)||this;return Pe.enhancer=N,Pe.name=W,Pe.equals=he,Pe.hasUnreportedChange=!1,Pe.value=N(S,void 0,W),Pe}return function(S,N){function W(){this.constructor=S}te(S,N),S.prototype=N===null?Object.create(N):(W.prototype=N.prototype,new W)}(m,b),m.prototype.dehanceValue=function(S){return this.dehancer!==void 0?this.dehancer(S):S},m.prototype.set=function(S){this.value,(S=this.prepareNewValue(S))!==Ue.UNCHANGED&&this.setNewValue(S)},m.prototype.prepareNewValue=function(S){if(ct(this),_n(this)){var N=xt(this,{object:this,type:"update",newValue:S});if(!N)return Ue.UNCHANGED;S=N.newValue}return S=this.enhancer(S,this.value,this.name),this.equals(this.value,S)?Ue.UNCHANGED:S},m.prototype.setNewValue=function(S){var N=this.value;this.value=S,this.reportChanged(),Gn(this)&&pn(this,{type:"update",object:this,newValue:S,oldValue:N})},m.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},m.prototype.intercept=function(S){return Vr(this,S)},m.prototype.observe=function(S,N){return N&&S({object:this,type:"update",newValue:this.value,oldValue:void 0}),Kr(this,S)},m.prototype.toJSON=function(){return this.get()},m.prototype.toString=function(){return this.name+"["+this.value+"]"},m.prototype.valueOf=function(){return V(this.get())},m.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},m}(C),Ur=I("ObservableValue",Ht),Er=function(){function b(m){this.dependenciesState=Ge.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=Ge.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+O(),this.value=new st(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=re.NONE,w(m.get,"missing option for computed: get"),this.derivation=m.get,this.name=m.name||"ComputedValue@"+O(),m.set&&(this.setter=Vt(this.name+"-setter",m.set)),this.equals=m.equals||(m.compareStructural||m.struct?G.structural:G.default),this.scope=m.context,this.requiresReaction=!!m.requiresReaction,this.keepAlive=!!m.keepAlive}return b.prototype.onBecomeStale=function(){(function(m){m.lowestObserverState===Ge.UP_TO_DATE&&(m.lowestObserverState=Ge.POSSIBLY_STALE,m.observers.forEach(function(S){S.dependenciesState===Ge.UP_TO_DATE&&(S.dependenciesState=Ge.POSSIBLY_STALE,S.isTracing!==re.NONE&&jr(S,m),S.onBecomeStale())}))})(this)},b.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(m){return m()})},b.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(m){return m()})},b.prototype.get=function(){this.isComputing&&E("Cycle detected in computation "+this.name+": "+this.derivation),Ue.inBatch!==0||this.observers.size!==0||this.keepAlive?(pu(this),Lt(this)&&this.trackAndCompute()&&function(S){S.lowestObserverState!==Ge.STALE&&(S.lowestObserverState=Ge.STALE,S.observers.forEach(function(N){N.dependenciesState===Ge.POSSIBLY_STALE?N.dependenciesState=Ge.STALE:N.dependenciesState===Ge.UP_TO_DATE&&(S.lowestObserverState=Ge.UP_TO_DATE)}))}(this)):Lt(this)&&(this.warnAboutUntrackedRead(),Fn(),this.value=this.computeValue(!1),$n());var m=this.value;if(Ot(m))throw m.cause;return m},b.prototype.peek=function(){var m=this.computeValue(!1);if(Ot(m))throw m.cause;return m},b.prototype.set=function(m){if(this.setter){w(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,m)}finally{this.isRunningSetter=!1}}else w(!1,!1)},b.prototype.trackAndCompute=function(){var m=this.value,S=this.dependenciesState===Ge.NOT_TRACKING,N=this.computeValue(!0),W=S||Ot(m)||Ot(N)||!this.equals(m,N);return W&&(this.value=N),W},b.prototype.computeValue=function(m){var S;if(this.isComputing=!0,Ue.computationDepth++,m)S=Yt(this,this.derivation,this.scope);else if(Ue.disableErrorBoundaries===!0)S=this.derivation.call(this.scope);else try{S=this.derivation.call(this.scope)}catch(N){S=new st(N)}return Ue.computationDepth--,this.isComputing=!1,S},b.prototype.suspend=function(){this.keepAlive||(H(this),this.value=void 0)},b.prototype.observe=function(m,S){var N=this,W=!0,ne=void 0;return sa(function(){var he=N.get();if(!W||S){var Pe=K();m({type:"update",object:N,newValue:he,oldValue:ne}),ce(Pe)}W=!1,ne=he})},b.prototype.warnAboutUntrackedRead=function(){},b.prototype.toJSON=function(){return this.get()},b.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},b.prototype.valueOf=function(){return V(this.get())},b.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},b}(),Sr=I("ComputedValue",Er),Wo=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},Ic={};function ia(){return typeof window<"u"?window:d!==void 0?d:typeof self<"u"?self:Ic}var Zn=!0,cu=!1,Ue=function(){var b=ia();return b.__mobxInstanceCount>0&&!b.__mobxGlobals&&(Zn=!1),b.__mobxGlobals&&b.__mobxGlobals.version!==new Wo().version&&(Zn=!1),Zn?b.__mobxGlobals?(b.__mobxInstanceCount+=1,b.__mobxGlobals.UNCHANGED||(b.__mobxGlobals.UNCHANGED={}),b.__mobxGlobals):(b.__mobxInstanceCount=1,b.__mobxGlobals=new Wo):(setTimeout(function(){cu||E("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Wo)}();function Lc(b,m){b.observers.add(m),b.lowestObserverState>m.dependenciesState&&(b.lowestObserverState=m.dependenciesState)}function lu(b,m){b.observers.delete(m),b.observers.size===0&&fu(b)}function fu(b){b.isPendingUnobservation===!1&&(b.isPendingUnobservation=!0,Ue.pendingUnobservations.push(b))}function Fn(){Ue.inBatch++}function $n(){if(--Ue.inBatch==0){du();for(var b=Ue.pendingUnobservations,m=0;m<b.length;m++){var S=b[m];S.isPendingUnobservation=!1,S.observers.size===0&&(S.isBeingObserved&&(S.isBeingObserved=!1,S.onBecomeUnobserved()),S instanceof Er&&S.suspend())}Ue.pendingUnobservations=[]}}function pu(b){var m=Ue.trackingDerivation;return m!==null?(m.runId!==b.lastAccessedBy&&(b.lastAccessedBy=m.runId,m.newObserving[m.unboundDepsCount++]=b,b.isBeingObserved||(b.isBeingObserved=!0,b.onBecomeObserved())),!0):(b.observers.size===0&&Ue.inBatch>0&&fu(b),!1)}function jr(b,m){if(b.isTracing===re.BREAK){var S=[];vo(Go(b),S,1),new Function(`debugger;
|
||
/*
|
||
Tracing '`+b.name+`'
|
||
|
||
You are entering this break point because derivation '`+b.name+"' is being traced and '"+m.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.
|
||
|
||
`+(b instanceof Er?b.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
||
|
||
The dependencies for this derivation are:
|
||
|
||
`+S.join(`
|
||
`)+`
|
||
*/
|
||
`)()}}function vo(b,m,S){m.length>=1e3?m.push("(and many more)"):(m.push(""+new Array(S).join(" ")+b.name),b.dependencies&&b.dependencies.forEach(function(N){return vo(N,m,S+1)}))}var hr=function(){function b(m,S,N,W){m===void 0&&(m="Reaction@"+O()),W===void 0&&(W=!1),this.name=m,this.onInvalidate=S,this.errorHandler=N,this.requiresObservable=W,this.observing=[],this.newObserving=[],this.dependenciesState=Ge.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+O(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=re.NONE}return b.prototype.onBecomeStale=function(){this.schedule()},b.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ue.pendingReactions.push(this),du())},b.prototype.isScheduled=function(){return this._isScheduled},b.prototype.runReaction=function(){if(!this.isDisposed){if(Fn(),this._isScheduled=!1,Lt(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(m){this.reportExceptionInDerivation(m)}}$n()}},b.prototype.track=function(m){if(!this.isDisposed){Fn(),this._isRunning=!0;var S=Yt(this,m,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&H(this),Ot(S)&&this.reportExceptionInDerivation(S.cause),$n()}},b.prototype.reportExceptionInDerivation=function(m){var S=this;if(this.errorHandler)this.errorHandler(m,this);else{if(Ue.disableErrorBoundaries)throw m;Ue.suppressReactionErrors,Ue.globalReactionErrorHandlers.forEach(function(N){return N(m,S)})}},b.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Fn(),H(this),$n()))},b.prototype.getDisposer=function(){var m=this.dispose.bind(this);return m[F]=this,m},b.prototype.toString=function(){return"Reaction["+this.name+"]"},b.prototype.trace=function(m){m===void 0&&(m=!1),function(){for(var S=[],N=0;N<arguments.length;N++)S[N]=arguments[N];var W=!1;typeof S[S.length-1]=="boolean"&&(W=S.pop());var ne=Qn(S);if(!ne)return E(!1);ne.isTracing,re.NONE,ne.isTracing=W?re.BREAK:re.LOG}(this,m)},b}(),aa=function(b){return b()};function du(){Ue.inBatch>0||Ue.isRunningReactions||aa(Bc)}function Bc(){Ue.isRunningReactions=!0;for(var b=Ue.pendingReactions,m=0;b.length>0;){++m==100&&b.splice(0);for(var S=b.splice(0),N=0,W=S.length;N<W;N++)S[N].runReaction()}Ue.isRunningReactions=!1}var fi=I("Reaction",hr);function zc(b){var m=aa;aa=function(S){return b(function(){return m(S)})}}function hu(b){return function(){}}function Fc(){E(!1)}function Xr(b){return function(m,S,N){if(N){if(N.value)return{value:Vt(b,N.value),enumerable:!1,configurable:!0,writable:!0};var W=N.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Vt(b,W.call(this))}}}return yu(b).apply(this,arguments)}}function yu(b){return function(m,S,N){Object.defineProperty(m,S,{configurable:!0,enumerable:!1,get:function(){},set:function(W){k(this,S,Pr(b,W))}})}}var Pr=function(b,m,S,N){return arguments.length===1&&typeof b=="function"?Vt(b.name||"<unnamed action>",b):arguments.length===2&&typeof m=="function"?Vt(b,m):arguments.length===1&&typeof b=="string"?Xr(b):N!==!0?Xr(m).apply(null,arguments):void k(b,m,Vt(b.name||m,S.value,this))};function $c(b,m){return Zt(typeof b=="string"?b:b.name||"<unnamed action>",typeof b=="function"?b:m,this,void 0)}function pi(b){return typeof b=="function"&&b.isMobxAction===!0}function ua(b,m,S){k(b,m,Vt(m,S.bind(b)))}function sa(b,m){m===void 0&&(m=v);var S,N=m&&m.name||b.name||"Autorun@"+O();if(!m.scheduler&&!m.delay)S=new hr(N,function(){this.track(he)},m.onError,m.requiresObservable);else{var W=gu(m),ne=!1;S=new hr(N,function(){ne||(ne=!0,W(function(){ne=!1,S.isDisposed||S.track(he)}))},m.onError,m.requiresObservable)}function he(){b(S)}return S.schedule(),S.getDisposer()}Pr.bound=function(b,m,S,N){return N===!0?(ua(b,m,S.value),null):S?{configurable:!0,enumerable:!1,get:function(){return ua(this,m,S.value||S.initializer.call(this)),this[m]},set:Fc}:{enumerable:!1,configurable:!0,set:function(W){ua(this,m,W)},get:function(){}}};var Wc=function(b){return b()};function gu(b){return b.scheduler?b.scheduler:b.delay?function(m){return setTimeout(m,b.delay)}:Wc}function bo(b,m,S){S===void 0&&(S=v);var N,W,ne,he=S.name||"Reaction@"+O(),Pe=Pr(he,S.onError?(N=S.onError,W=m,function(){try{return W.apply(this,arguments)}catch(Wt){N.call(this,Wt)}}):m),We=!S.scheduler&&!S.delay,mt=gu(S),ut=!0,Dt=!1,dt=S.compareStructural?G.structural:S.equals||G.default,At=new hr(he,function(){ut||We?Un():Dt||(Dt=!0,mt(Un))},S.onError,S.requiresObservable);function Un(){if(Dt=!1,!At.isDisposed){var Wt=!1;At.track(function(){var On=b(At);Wt=ut||!dt(ne,On),ne=On}),ut&&S.fireImmediately&&Pe(ne,At),ut||Wt!==!0||Pe(ne,At),ut&&(ut=!1)}}return At.schedule(),At.getDisposer()}function mo(b,m,S){return vu("onBecomeUnobserved",b,m,S)}function vu(b,m,S,N){var W=typeof N=="function"?Hn(m,S):Hn(m),ne=typeof N=="function"?N:S,he=b+"Listeners";return W[he]?W[he].add(ne):W[he]=new Set([ne]),typeof W[b]!="function"?E(!1):function(){var Pe=W[he];Pe&&(Pe.delete(ne),Pe.size===0&&delete W[he])}}function _o(b){var m=b.enforceActions,S=b.computedRequiresReaction,N=b.computedConfigurable,W=b.disableErrorBoundaries,ne=b.reactionScheduler,he=b.reactionRequiresObservable,Pe=b.observableRequiresReaction;if(b.isolateGlobalState===!0&&((Ue.pendingReactions.length||Ue.inBatch||Ue.isRunningReactions)&&E("isolateGlobalState should be called before MobX is running any reactions"),cu=!0,Zn&&(--ia().__mobxInstanceCount==0&&(ia().__mobxGlobals=void 0),Ue=new Wo)),m!==void 0){var We=void 0;switch(m){case!0:case"observed":We=!0;break;case!1:case"never":We=!1;break;case"strict":case"always":We="strict";break;default:E("Invalid value for 'enforceActions': '"+m+"', expected 'never', 'always' or 'observed'")}Ue.enforceActions=We,Ue.allowStateChanges=We!==!0&&We!=="strict"}S!==void 0&&(Ue.computedRequiresReaction=!!S),he!==void 0&&(Ue.reactionRequiresObservable=!!he),Pe!==void 0&&(Ue.observableRequiresReaction=!!Pe,Ue.allowStateReads=!Ue.observableRequiresReaction),N!==void 0&&(Ue.computedConfigurable=!!N),W!==void 0&&(Ue.disableErrorBoundaries=!!W),ne&&zc(ne)}function Ar(b,m,S,N){var W=bu(N=ue(N));return Be(b),Yo(b,N.name,W.enhancer),m&&mu(b,m,S,W),b}function bu(b){return b.defaultDecorator||(b.deep===!1?xe:we)}function mu(b,m,S,N){var W,ne;Fn();try{var he=Z(m);try{for(var Pe=le(he),We=Pe.next();!We.done;We=Pe.next()){var mt=We.value,ut=Object.getOwnPropertyDescriptor(m,mt),Dt=(S&&mt in S?S[mt]:ut.get?ze:N)(b,mt,ut,!0);Dt&&Object.defineProperty(b,mt,Dt)}}catch(dt){W={error:dt}}finally{try{We&&!We.done&&(ne=Pe.return)&&ne.call(Pe)}finally{if(W)throw W.error}}}finally{$n()}}function Go(b,m){return _u(Hn(b,m))}function _u(b){var m,S,N={name:b.name};return b.observing&&b.observing.length>0&&(N.dependencies=(m=b.observing,S=[],m.forEach(function(W){S.indexOf(W)===-1&&S.push(W)}),S).map(_u)),N}var Gc=0;function Ou(){this.message="FLOW_CANCELLED"}function wu(b){arguments.length!==1&&E("Flow expects 1 argument and cannot be used as decorator");var m=b.name||"<unnamed flow>";return function(){var S,N=this,W=arguments,ne=++Gc,he=Pr(m+" - runid: "+ne+" - init",b).apply(N,W),Pe=void 0,We=new Promise(function(mt,ut){var Dt=0;function dt(Wt){var On;Pe=void 0;try{On=Pr(m+" - runid: "+ne+" - yield "+Dt++,he.next).call(he,Wt)}catch(Vo){return ut(Vo)}Un(On)}function At(Wt){var On;Pe=void 0;try{On=Pr(m+" - runid: "+ne+" - yield "+Dt++,he.throw).call(he,Wt)}catch(Vo){return ut(Vo)}Un(On)}function Un(Wt){if(!Wt||typeof Wt.then!="function")return Wt.done?mt(Wt.value):(Pe=Promise.resolve(Wt.value)).then(dt,At);Wt.then(Un,ut)}S=ut,dt(void 0)});return We.cancel=Pr(m+" - runid: "+ne+" - cancel",function(){try{Pe&&Ho(Pe);var mt=he.return(void 0),ut=Promise.resolve(mt.value);ut.then(P,P),Ho(ut),S(new Ou)}catch(Dt){S(Dt)}}),We}}function Ho(b){typeof b.cancel=="function"&&b.cancel()}function xu(b,m){if(b==null)return!1;if(m!==void 0){if(Rn(b)===!1||!b[F].values.has(m))return!1;var S=Hn(b,m);return Sr(S)}return Sr(b)}function Hc(b){return arguments.length>1?E(!1):xu(b)}function Eu(b,m){return typeof m!="string"?E(!1):xu(b,m)}function ca(b,m){return b!=null&&(m!==void 0?!!Rn(b)&&b[F].values.has(m):Rn(b)||!!b[F]||B(b)||fi(b)||Sr(b))}function Uo(b){return arguments.length!==1&&E(!1),ca(b)}function Tr(b){return Rn(b)?b[F].getKeys():Jt(b)||Nn(b)?Array.from(b.keys()):tr(b)?b.map(function(m,S){return S}):E(!1)}function hn(b){return Rn(b)?Tr(b).map(function(m){return b[m]}):Jt(b)?Tr(b).map(function(m){return b.get(m)}):Nn(b)?Array.from(b.values()):tr(b)?b.slice():E(!1)}function Su(b){return Rn(b)?Tr(b).map(function(m){return[m,b[m]]}):Jt(b)?Tr(b).map(function(m){return[m,b.get(m)]}):Nn(b)?Array.from(b.entries()):tr(b)?b.map(function(m,S){return[S,m]}):E(!1)}function ju(b,m,S){if(arguments.length!==2||Nn(b))if(Rn(b)){var N=b[F],W=N.values.get(m);W?N.write(m,S):N.addObservableProp(m,S,N.defaultEnhancer)}else if(Jt(b))b.set(m,S);else if(Nn(b))b.add(m);else{if(!tr(b))return E(!1);typeof m!="number"&&(m=parseInt(m,10)),w(m>=0,"Not a valid index: '"+m+"'"),Fn(),m>=b.length&&(b.length=m+1),b[m]=S,$n()}else{Fn();var ne=m;try{for(var he in ne)ju(b,he,ne[he])}finally{$n()}}}function Pu(b,m,S,N){return typeof S=="function"?function(W,ne,he,Pe){return wo(W,ne).observe(he,Pe)}(b,m,S,N):function(W,ne,he){return wo(W).observe(ne,he)}(b,m,S)}Ou.prototype=Object.create(Error.prototype);var Uc={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Yr(b,m,S,N){return N.detectCycles&&b.set(m,S),S}function Jn(b,m,S){if(!m.recurseEverything&&!Uo(b)||typeof b!="object")return b;if(b===null)return null;if(b instanceof Date)return b;if(Ur(b))return Jn(b.get(),m,S);if(Uo(b)&&Tr(b),m.detectCycles===!0&&b!==null&&S.has(b))return S.get(b);if(tr(b)||Array.isArray(b)){var N=Yr(S,b,[],m),W=b.map(function(dt){return Jn(dt,m,S)});N.length=W.length;for(var ne=0,he=W.length;ne<he;ne++)N[ne]=W[ne];return N}if(Nn(b)||Object.getPrototypeOf(b)===Set.prototype){if(m.exportMapsAsObjects===!1){var Pe=Yr(S,b,new Set,m);return b.forEach(function(dt){Pe.add(Jn(dt,m,S))}),Pe}var We=Yr(S,b,[],m);return b.forEach(function(dt){We.push(Jn(dt,m,S))}),We}if(Jt(b)||Object.getPrototypeOf(b)===Map.prototype){if(m.exportMapsAsObjects===!1){var mt=Yr(S,b,new Map,m);return b.forEach(function(dt,At){mt.set(At,Jn(dt,m,S))}),mt}var ut=Yr(S,b,{},m);return b.forEach(function(dt,At){ut[At]=Jn(dt,m,S)}),ut}var Dt=Yr(S,b,{},m);return Q(b).forEach(function(dt){Dt[dt]=Jn(b[dt],m,S)}),Dt}function Xc(b,m){var S;return typeof m=="boolean"&&(m={detectCycles:m}),m||(m=Uc),m.detectCycles=m.detectCycles===void 0?m.recurseEverything===!0:m.detectCycles===!0,m.detectCycles&&(S=new Map),Jn(b,m,S)}function Qn(b){switch(b.length){case 0:return Ue.trackingDerivation;case 1:return Hn(b[0]);case 2:return Hn(b[0],b[1])}}function Wn(b,m){m===void 0&&(m=void 0),Fn();try{return b.apply(m)}finally{$n()}}function Au(b,m,S){return arguments.length===1||m&&typeof m=="object"?Yc(b,m):Tu(b,m,S||{})}function Tu(b,m,S){var N;typeof S.timeout=="number"&&(N=setTimeout(function(){if(!ne[F].isDisposed){ne();var he=new Error("WHEN_TIMEOUT");if(!S.onError)throw he;S.onError(he)}},S.timeout)),S.name=S.name||"When@"+O();var W=Vt(S.name+"-effect",m),ne=sa(function(he){b()&&(he.dispose(),N&&clearTimeout(N),W())},S);return ne}function Yc(b,m){var S,N=new Promise(function(W,ne){var he=Tu(b,W,pe(pe({},m),{onError:ne}));S=function(){he(),ne("WHEN_CANCELLED")}});return N.cancel=S,N}function di(b){return b[F]}function Mr(b){return typeof b=="string"||typeof b=="number"||typeof b=="symbol"}var Xo={has:function(b,m){if(m===F||m==="constructor"||m===ve)return!0;var S=di(b);return Mr(m)?S.has(m):m in b},get:function(b,m){if(m===F||m==="constructor"||m===ve)return b[m];var S=di(b),N=S.values.get(m);if(N instanceof C){var W=N.get();return W===void 0&&S.has(m),W}return Mr(m)&&S.has(m),b[m]},set:function(b,m,S){return!!Mr(m)&&(ju(b,m,S),!0)},deleteProperty:function(b,m){return!!Mr(m)&&(di(b).remove(m),!0)},ownKeys:function(b){return di(b).keysAtom.reportObserved(),Reflect.ownKeys(b)},preventExtensions:function(b){return E("Dynamic observable objects cannot be frozen"),!1}};function Vc(b){var m=new Proxy(b,Xo);return b[F].proxy=m,m}function _n(b){return b.interceptors!==void 0&&b.interceptors.length>0}function Vr(b,m){var S=b.interceptors||(b.interceptors=[]);return S.push(m),j(function(){var N=S.indexOf(m);N!==-1&&S.splice(N,1)})}function xt(b,m){var S=K();try{for(var N=Ee(b.interceptors||[]),W=0,ne=N.length;W<ne&&(w(!(m=N[W](m))||m.type,"Intercept handlers should return nothing or a change object"),m);W++);return m}finally{ce(S)}}function Gn(b){return b.changeListeners!==void 0&&b.changeListeners.length>0}function Kr(b,m){var S=b.changeListeners||(b.changeListeners=[]);return S.push(m),j(function(){var N=S.indexOf(m);N!==-1&&S.splice(N,1)})}function pn(b,m){var S=K(),N=b.changeListeners;if(N){for(var W=0,ne=(N=N.slice()).length;W<ne;W++)N[W](m);ce(S)}}var Mu={get:function(b,m){return m===F?b[F]:m==="length"?b[F].getArrayLength():typeof m=="number"?er.get.call(b,m):typeof m!="string"||isNaN(m)?er.hasOwnProperty(m)?er[m]:b[m]:er.get.call(b,parseInt(m))},set:function(b,m,S){return m==="length"&&b[F].setArrayLength(S),typeof m=="number"&&er.set.call(b,m,S),typeof m=="symbol"||isNaN(m)?b[m]=S:er.set.call(b,parseInt(m),S),!0},preventExtensions:function(b){return E("Observable arrays cannot be frozen"),!1}};function la(b,m,S,N){S===void 0&&(S="ObservableArray@"+O()),N===void 0&&(N=!1);var W,ne,he,Pe=new ku(S,m,N);W=Pe.values,ne=F,he=Pe,Object.defineProperty(W,ne,{enumerable:!1,writable:!1,configurable:!0,value:he});var We=new Proxy(Pe.values,Mu);if(Pe.proxy=We,b&&b.length){var mt=at(!0);Pe.spliceWithArray(0,0,b),kt(mt)}return We}var ku=function(){function b(m,S,N){this.owned=N,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new C(m||"ObservableArray@"+O()),this.enhancer=function(W,ne){return S(W,ne,m+"[..]")}}return b.prototype.dehanceValue=function(m){return this.dehancer!==void 0?this.dehancer(m):m},b.prototype.dehanceValues=function(m){return this.dehancer!==void 0&&m.length>0?m.map(this.dehancer):m},b.prototype.intercept=function(m){return Vr(this,m)},b.prototype.observe=function(m,S){return S===void 0&&(S=!1),S&&m({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Kr(this,m)},b.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},b.prototype.setArrayLength=function(m){if(typeof m!="number"||m<0)throw new Error("[mobx.array] Out of range: "+m);var S=this.values.length;if(m!==S)if(m>S){for(var N=new Array(m-S),W=0;W<m-S;W++)N[W]=void 0;this.spliceWithArray(S,0,N)}else this.spliceWithArray(m,S-m)},b.prototype.updateArrayLength=function(m,S){if(m!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=S},b.prototype.spliceWithArray=function(m,S,N){var W=this;ct(this.atom);var ne=this.values.length;if(m===void 0?m=0:m>ne?m=ne:m<0&&(m=Math.max(0,ne+m)),S=arguments.length===1?ne-m:S==null?0:Math.max(0,Math.min(S,ne-m)),N===void 0&&(N=g),_n(this)){var he=xt(this,{object:this.proxy,type:"splice",index:m,removedCount:S,added:N});if(!he)return g;S=he.removedCount,N=he.added}N=N.length===0?N:N.map(function(We){return W.enhancer(We,void 0)});var Pe=this.spliceItemsIntoValues(m,S,N);return S===0&&N.length===0||this.notifyArraySplice(m,N,Pe),this.dehanceValues(Pe)},b.prototype.spliceItemsIntoValues=function(m,S,N){var W;if(N.length<1e4)return(W=this.values).splice.apply(W,Ee([m,S],N));var ne=this.values.slice(m,m+S);return this.values=this.values.slice(0,m).concat(N,this.values.slice(m+S)),ne},b.prototype.notifyArrayChildUpdate=function(m,S,N){var W=!this.owned&&!1,ne=Gn(this),he=ne||W?{object:this.proxy,type:"update",index:m,newValue:S,oldValue:N}:null;this.atom.reportChanged(),ne&&pn(this,he)},b.prototype.notifyArraySplice=function(m,S,N){var W=!this.owned&&!1,ne=Gn(this),he=ne||W?{object:this.proxy,type:"splice",index:m,removed:N,added:S,removedCount:N.length,addedCount:S.length}:null;this.atom.reportChanged(),ne&&pn(this,he)},b}(),er={intercept:function(b){return this[F].intercept(b)},observe:function(b,m){return m===void 0&&(m=!1),this[F].observe(b,m)},clear:function(){return this.splice(0)},replace:function(b){var m=this[F];return m.spliceWithArray(0,m.values.length,b)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(b,m){for(var S=[],N=2;N<arguments.length;N++)S[N-2]=arguments[N];var W=this[F];switch(arguments.length){case 0:return[];case 1:return W.spliceWithArray(b);case 2:return W.spliceWithArray(b,m)}return W.spliceWithArray(b,m,S)},spliceWithArray:function(b,m,S){return this[F].spliceWithArray(b,m,S)},push:function(){for(var b=[],m=0;m<arguments.length;m++)b[m]=arguments[m];var S=this[F];return S.spliceWithArray(S.values.length,0,b),S.values.length},pop:function(){return this.splice(Math.max(this[F].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var b=[],m=0;m<arguments.length;m++)b[m]=arguments[m];var S=this[F];return S.spliceWithArray(0,0,b),S.values.length},reverse:function(){var b=this.slice();return b.reverse.apply(b,arguments)},sort:function(b){var m=this.slice();return m.sort.apply(m,arguments)},remove:function(b){var m=this[F],S=m.dehanceValues(m.values).indexOf(b);return S>-1&&(this.splice(S,1),!0)},get:function(b){var m=this[F];if(m&&b<m.values.length)return m.atom.reportObserved(),m.dehanceValue(m.values[b])},set:function(b,m){var S=this[F],N=S.values;if(b<N.length){ct(S.atom);var W=N[b];if(_n(S)){var ne=xt(S,{type:"update",object:S.proxy,index:b,newValue:m});if(!ne)return;m=ne.newValue}(m=S.enhancer(m,W))!==W&&(N[b]=m,S.notifyArrayChildUpdate(b,m,W))}else{if(b!==N.length)throw new Error("[mobx.array] Index out of bounds, "+b+" is larger than "+N.length);S.spliceWithArray(b,0,[m])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(b){typeof Array.prototype[b]=="function"&&(er[b]=function(){var m=this[F];m.atom.reportObserved();var S=m.dehanceValues(m.values);return S[b].apply(S,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(b){typeof Array.prototype[b]=="function"&&(er[b]=function(m,S){var N=this,W=this[F];return W.atom.reportObserved(),W.dehanceValues(W.values)[b](function(ne,he){return m.call(S,ne,he,N)},S)})}),["reduce","reduceRight"].forEach(function(b){er[b]=function(){var m=this,S=this[F];S.atom.reportObserved();var N=arguments[0];return arguments[0]=function(W,ne,he){return ne=S.dehanceValue(ne),N(W,ne,he,m)},S.values[b].apply(S.values,arguments)}});var Du,hi=I("ObservableArrayAdministration",ku);function tr(b){return M(b)&&hi(b[F])}var Nu,Kc={},fa=function(){function b(m,S,N){if(S===void 0&&(S=Ce),N===void 0&&(N="ObservableMap@"+O()),this.enhancer=S,this.name=N,this[Du]=Kc,this._keysAtom=$(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(m)}return b.prototype._has=function(m){return this._data.has(m)},b.prototype.has=function(m){var S=this;if(!Ue.trackingDerivation)return this._has(m);var N=this._hasMap.get(m);if(!N){var W=N=new Ht(this._has(m),Je,this.name+"."+X(m)+"?",!1);this._hasMap.set(m,W),mo(W,function(){return S._hasMap.delete(m)})}return N.get()},b.prototype.set=function(m,S){var N=this._has(m);if(_n(this)){var W=xt(this,{type:N?"update":"add",object:this,newValue:S,name:m});if(!W)return this;S=W.newValue}return N?this._updateValue(m,S):this._addValue(m,S),this},b.prototype.delete=function(m){var S=this;if(ct(this._keysAtom),_n(this)&&!(W=xt(this,{type:"delete",object:this,name:m})))return!1;if(this._has(m)){var N=Gn(this),W=N?{type:"delete",object:this,oldValue:this._data.get(m).value,name:m}:null;return Wn(function(){S._keysAtom.reportChanged(),S._updateHasMapEntry(m,!1),S._data.get(m).setNewValue(void 0),S._data.delete(m)}),N&&pn(this,W),!0}return!1},b.prototype._updateHasMapEntry=function(m,S){var N=this._hasMap.get(m);N&&N.setNewValue(S)},b.prototype._updateValue=function(m,S){var N=this._data.get(m);if((S=N.prepareNewValue(S))!==Ue.UNCHANGED){var W=Gn(this),ne=W?{type:"update",object:this,oldValue:N.value,name:m,newValue:S}:null;N.setNewValue(S),W&&pn(this,ne)}},b.prototype._addValue=function(m,S){var N=this;ct(this._keysAtom),Wn(function(){var he=new Ht(S,N.enhancer,N.name+"."+X(m),!1);N._data.set(m,he),S=he.value,N._updateHasMapEntry(m,!0),N._keysAtom.reportChanged()});var W=Gn(this),ne=W?{type:"add",object:this,name:m,newValue:S}:null;W&&pn(this,ne)},b.prototype.get=function(m){return this.has(m)?this.dehanceValue(this._data.get(m).get()):this.dehanceValue(void 0)},b.prototype.dehanceValue=function(m){return this.dehancer!==void 0?this.dehancer(m):m},b.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},b.prototype.values=function(){var m=this,S=this.keys();return mi({next:function(){var N=S.next(),W=N.done,ne=N.value;return{done:W,value:W?void 0:m.get(ne)}}})},b.prototype.entries=function(){var m=this,S=this.keys();return mi({next:function(){var N=S.next(),W=N.done,ne=N.value;return{done:W,value:W?void 0:[ne,m.get(ne)]}}})},b.prototype[Du=F,Symbol.iterator]=function(){return this.entries()},b.prototype.forEach=function(m,S){var N,W;try{for(var ne=le(this),he=ne.next();!he.done;he=ne.next()){var Pe=ge(he.value,2),We=Pe[0],mt=Pe[1];m.call(S,mt,We,this)}}catch(ut){N={error:ut}}finally{try{he&&!he.done&&(W=ne.return)&&W.call(ne)}finally{if(N)throw N.error}}},b.prototype.merge=function(m){var S=this;return Jt(m)&&(m=m.toJS()),Wn(function(){var N=at(!0);try{T(m)?Q(m).forEach(function(W){return S.set(W,m[W])}):Array.isArray(m)?m.forEach(function(W){var ne=ge(W,2),he=ne[0],Pe=ne[1];return S.set(he,Pe)}):L(m)?(m.constructor!==Map&&E("Cannot initialize from classes that inherit from Map: "+m.constructor.name),m.forEach(function(W,ne){return S.set(ne,W)})):m!=null&&E("Cannot initialize map from "+m)}finally{kt(N)}}),this},b.prototype.clear=function(){var m=this;Wn(function(){ie(function(){var S,N;try{for(var W=le(m.keys()),ne=W.next();!ne.done;ne=W.next()){var he=ne.value;m.delete(he)}}catch(Pe){S={error:Pe}}finally{try{ne&&!ne.done&&(N=W.return)&&N.call(W)}finally{if(S)throw S.error}}})})},b.prototype.replace=function(m){var S=this;return Wn(function(){var N,W,ne,he,Pe=function(wn){if(L(wn)||Jt(wn))return wn;if(Array.isArray(wn))return new Map(wn);if(T(wn)){var zu=new Map;for(var Ko in wn)zu.set(Ko,wn[Ko]);return zu}return E("Cannot convert to map from '"+wn+"'")}(m),We=new Map,mt=!1;try{for(var ut=le(S._data.keys()),Dt=ut.next();!Dt.done;Dt=ut.next()){var dt=Dt.value;if(!Pe.has(dt))if(S.delete(dt))mt=!0;else{var At=S._data.get(dt);We.set(dt,At)}}}catch(wn){N={error:wn}}finally{try{Dt&&!Dt.done&&(W=ut.return)&&W.call(ut)}finally{if(N)throw N.error}}try{for(var Un=le(Pe.entries()),Wt=Un.next();!Wt.done;Wt=Un.next()){var On=ge(Wt.value,2),Vo=(dt=On[0],At=On[1],S._data.has(dt));if(S.set(dt,At),S._data.has(dt)){var Zc=S._data.get(dt);We.set(dt,Zc),Vo||(mt=!0)}}}catch(wn){ne={error:wn}}finally{try{Wt&&!Wt.done&&(he=Un.return)&&he.call(Un)}finally{if(ne)throw ne.error}}if(!mt)if(S._data.size!==We.size)S._keysAtom.reportChanged();else for(var Lu=S._data.keys(),Bu=We.keys(),_i=Lu.next(),ya=Bu.next();!_i.done;){if(_i.value!==ya.value){S._keysAtom.reportChanged();break}_i=Lu.next(),ya=Bu.next()}S._data=We}),this},Object.defineProperty(b.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),b.prototype.toPOJO=function(){var m,S,N={};try{for(var W=le(this),ne=W.next();!ne.done;ne=W.next()){var he=ge(ne.value,2),Pe=he[0],We=he[1];N[typeof Pe=="symbol"?Pe:X(Pe)]=We}}catch(mt){m={error:mt}}finally{try{ne&&!ne.done&&(S=W.return)&&S.call(W)}finally{if(m)throw m.error}}return N},b.prototype.toJS=function(){return new Map(this)},b.prototype.toJSON=function(){return this.toPOJO()},b.prototype.toString=function(){var m=this;return this.name+"[{ "+Array.from(this.keys()).map(function(S){return X(S)+": "+m.get(S)}).join(", ")+" }]"},b.prototype.observe=function(m,S){return Kr(this,m)},b.prototype.intercept=function(m){return Vr(this,m)},b}(),Jt=I("ObservableMap",fa),Oo={},yi=function(){function b(m,S,N){if(S===void 0&&(S=Ce),N===void 0&&(N="ObservableSet@"+O()),this.name=N,this[Nu]=Oo,this._data=new Set,this._atom=$(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(W,ne){return S(W,ne,N)},m&&this.replace(m)}return b.prototype.dehanceValue=function(m){return this.dehancer!==void 0?this.dehancer(m):m},b.prototype.clear=function(){var m=this;Wn(function(){ie(function(){var S,N;try{for(var W=le(m._data.values()),ne=W.next();!ne.done;ne=W.next()){var he=ne.value;m.delete(he)}}catch(Pe){S={error:Pe}}finally{try{ne&&!ne.done&&(N=W.return)&&N.call(W)}finally{if(S)throw S.error}}})})},b.prototype.forEach=function(m,S){var N,W;try{for(var ne=le(this),he=ne.next();!he.done;he=ne.next()){var Pe=he.value;m.call(S,Pe,Pe,this)}}catch(We){N={error:We}}finally{try{he&&!he.done&&(W=ne.return)&&W.call(ne)}finally{if(N)throw N.error}}},Object.defineProperty(b.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),b.prototype.add=function(m){var S=this;if(ct(this._atom),_n(this)&&!(W=xt(this,{type:"add",object:this,newValue:m})))return this;if(!this.has(m)){Wn(function(){S._data.add(S.enhancer(m,void 0)),S._atom.reportChanged()});var N=Gn(this),W=N?{type:"add",object:this,newValue:m}:null;N&&pn(this,W)}return this},b.prototype.delete=function(m){var S=this;if(_n(this)&&!(W=xt(this,{type:"delete",object:this,oldValue:m})))return!1;if(this.has(m)){var N=Gn(this),W=N?{type:"delete",object:this,oldValue:m}:null;return Wn(function(){S._atom.reportChanged(),S._data.delete(m)}),N&&pn(this,W),!0}return!1},b.prototype.has=function(m){return this._atom.reportObserved(),this._data.has(this.dehanceValue(m))},b.prototype.entries=function(){var m=0,S=Array.from(this.keys()),N=Array.from(this.values());return mi({next:function(){var W=m;return m+=1,W<N.length?{value:[S[W],N[W]],done:!1}:{done:!0}}})},b.prototype.keys=function(){return this.values()},b.prototype.values=function(){this._atom.reportObserved();var m=this,S=0,N=Array.from(this._data.values());return mi({next:function(){return S<N.length?{value:m.dehanceValue(N[S++]),done:!1}:{done:!0}}})},b.prototype.replace=function(m){var S=this;return Nn(m)&&(m=m.toJS()),Wn(function(){var N=at(!0);try{Array.isArray(m)||Y(m)?(S.clear(),m.forEach(function(W){return S.add(W)})):m!=null&&E("Cannot initialize set from "+m)}finally{kt(N)}}),this},b.prototype.observe=function(m,S){return Kr(this,m)},b.prototype.intercept=function(m){return Vr(this,m)},b.prototype.toJS=function(){return new Set(this)},b.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},b.prototype[Nu=F,Symbol.iterator]=function(){return this.values()},b}(),Nn=I("ObservableSet",yi),Ru=function(){function b(m,S,N,W){S===void 0&&(S=new Map),this.target=m,this.values=S,this.name=N,this.defaultEnhancer=W,this.keysAtom=new C(N+".keys")}return b.prototype.read=function(m){return this.values.get(m).get()},b.prototype.write=function(m,S){var N=this.target,W=this.values.get(m);if(W instanceof Er)W.set(S);else{if(_n(this)){if(!(he=xt(this,{type:"update",object:this.proxy||N,name:m,newValue:S})))return;S=he.newValue}if((S=W.prepareNewValue(S))!==Ue.UNCHANGED){var ne=Gn(this),he=ne?{type:"update",object:this.proxy||N,oldValue:W.value,name:m,newValue:S}:null;W.setNewValue(S),ne&&pn(this,he)}}},b.prototype.has=function(m){var S=this.pendingKeys||(this.pendingKeys=new Map),N=S.get(m);if(N)return N.get();var W=!!this.values.get(m);return N=new Ht(W,Je,this.name+"."+X(m)+"?",!1),S.set(m,N),N.get()},b.prototype.addObservableProp=function(m,S,N){N===void 0&&(N=this.defaultEnhancer);var W=this.target;if(_n(this)){var ne=xt(this,{object:this.proxy||W,name:m,type:"add",newValue:S});if(!ne)return;S=ne.newValue}var he=new Ht(S,N,this.name+"."+X(m),!1);this.values.set(m,he),S=he.value,Object.defineProperty(W,m,function(Pe){return gi[Pe]||(gi[Pe]={configurable:!0,enumerable:!0,get:function(){return this[F].read(Pe)},set:function(We){this[F].write(Pe,We)}})}(m)),this.notifyPropertyAddition(m,S)},b.prototype.addComputedProp=function(m,S,N){var W,ne,he,Pe=this.target;N.name=N.name||this.name+"."+X(S),this.values.set(S,new Er(N)),(m===Pe||(W=m,ne=S,!(he=Object.getOwnPropertyDescriptor(W,ne))||he.configurable!==!1&&he.writable!==!1))&&Object.defineProperty(m,S,function(We){return vi[We]||(vi[We]={configurable:Ue.computedConfigurable,enumerable:!1,get:function(){return bi(this).read(We)},set:function(mt){bi(this).write(We,mt)}})}(S))},b.prototype.remove=function(m){if(this.values.has(m)){var S=this.target;if(_n(this)&&!(We=xt(this,{object:this.proxy||S,name:m,type:"remove"})))return;try{Fn();var N=Gn(this),W=!1,ne=this.values.get(m),he=ne&&ne.get();if(ne&&ne.set(void 0),this.keysAtom.reportChanged(),this.values.delete(m),this.pendingKeys){var Pe=this.pendingKeys.get(m);Pe&&Pe.set(!1)}delete this.target[m];var We=N?{type:"remove",object:this.proxy||S,oldValue:he,name:m}:null;N&&pn(this,We)}finally{$n()}}},b.prototype.illegalAccess=function(m,S){},b.prototype.observe=function(m,S){return Kr(this,m)},b.prototype.intercept=function(m){return Vr(this,m)},b.prototype.notifyPropertyAddition=function(m,S){var N=Gn(this),W=N?{type:"add",object:this.proxy||this.target,name:m,newValue:S}:null;if(N&&pn(this,W),this.pendingKeys){var ne=this.pendingKeys.get(m);ne&&ne.set(!0)}this.keysAtom.reportChanged()},b.prototype.getKeys=function(){var m,S;this.keysAtom.reportObserved();var N=[];try{for(var W=le(this.values),ne=W.next();!ne.done;ne=W.next()){var he=ge(ne.value,2),Pe=he[0];he[1]instanceof Ht&&N.push(Pe)}}catch(We){m={error:We}}finally{try{ne&&!ne.done&&(S=W.return)&&S.call(W)}finally{if(m)throw m.error}}return N},b}();function Yo(b,m,S){if(m===void 0&&(m=""),S===void 0&&(S=Ce),Object.prototype.hasOwnProperty.call(b,F))return b[F];T(b)||(m=(b.constructor.name||"ObservableObject")+"@"+O()),m||(m="ObservableObject@"+O());var N=new Ru(b,new Map,X(m),S);return k(b,F,N),N}var gi=Object.create(null),vi=Object.create(null);function bi(b){var m=b[F];return m||(Be(b),b[F])}var Cu=I("ObservableObjectAdministration",Ru);function Rn(b){return!!M(b)&&(Be(b),Cu(b[F]))}function Hn(b,m){if(typeof b=="object"&&b!==null){if(tr(b))return m!==void 0&&E(!1),b[F].atom;if(Nn(b))return b[F];if(Jt(b)){var S=b;return m===void 0?S._keysAtom:((N=S._data.get(m)||S._hasMap.get(m))||E(!1),N)}var N;if(Be(b),m&&!b[F]&&b[m],Rn(b))return m?((N=b[F].values.get(m))||E(!1),N):E(!1);if(B(b)||Sr(b)||fi(b))return b}else if(typeof b=="function"&&fi(b[F]))return b[F];return E(!1)}function wo(b,m){return b||E("Expecting some object"),m!==void 0?wo(Hn(b,m)):B(b)||Sr(b)||fi(b)||Jt(b)||Nn(b)?b:(Be(b),b[F]?b[F]:void E(!1))}var pa=Object.prototype.toString;function da(b,m,S){return S===void 0&&(S=-1),ha(b,m,S)}function ha(b,m,S,N,W){if(b===m)return b!==0||1/b==1/m;if(b==null||m==null)return!1;if(b!=b)return m!=m;var ne=typeof b;if(ne!=="function"&&ne!=="object"&&typeof m!="object")return!1;var he=pa.call(b);if(he!==pa.call(m))return!1;switch(he){case"[object RegExp]":case"[object String]":return""+b==""+m;case"[object Number]":return+b!=+b?+m!=+m:+b==0?1/+b==1/m:+b==+m;case"[object Date]":case"[object Boolean]":return+b==+m;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(b)===Symbol.valueOf.call(m);case"[object Map]":case"[object Set]":S>=0&&S++}b=Iu(b),m=Iu(m);var Pe=he==="[object Array]";if(!Pe){if(typeof b!="object"||typeof m!="object")return!1;var We=b.constructor,mt=m.constructor;if(We!==mt&&!(typeof We=="function"&&We instanceof We&&typeof mt=="function"&&mt instanceof mt)&&"constructor"in b&&"constructor"in m)return!1}if(S===0)return!1;S<0&&(S=-1),W=W||[];for(var ut=(N=N||[]).length;ut--;)if(N[ut]===b)return W[ut]===m;if(N.push(b),W.push(m),Pe){if((ut=b.length)!==m.length)return!1;for(;ut--;)if(!ha(b[ut],m[ut],S-1,N,W))return!1}else{var Dt=Object.keys(b),dt=void 0;if(ut=Dt.length,Object.keys(m).length!==ut)return!1;for(;ut--;)if(!qc(m,dt=Dt[ut])||!ha(b[dt],m[dt],S-1,N,W))return!1}return N.pop(),W.pop(),!0}function Iu(b){return tr(b)?b.slice():L(b)||Jt(b)||Y(b)||Nn(b)?Array.from(b.entries()):b}function qc(b,m){return Object.prototype.hasOwnProperty.call(b,m)}function mi(b){return b[Symbol.iterator]=qr,b}function qr(){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:hu,extras:{getDebugName:function(b,m){return(m!==void 0?Hn(b,m):Rn(b)||Jt(b)||Nn(b)?wo(b):Hn(b)).name}},$mobx:F})}).call(this,o(155),o(81))},function(a,l,o){var p=o(112),d=o(43),g=o(174);p||d(Object.prototype,"toString",g,{unsafe:!0})},function(a,l,o){var p=o(40),d=o(99),g=o(75),v=o(56),O=o(115),E="Array Iterator",w=v.set,j=v.getterFor(E);a.exports=O(Array,"Array",function(P,M){w(this,{type:E,target:p(P),index:0,kind:M})},function(){var P=j(this),M=P.target,T=P.kind,k=P.index++;return!M||k>=M.length?(P.target=void 0,{value:void 0,done:!0}):T=="keys"?{value:k,done:!1}:T=="values"?{value:M[k],done:!1}:{value:[k,M[k]],done:!1}},"values"),g.Arguments=g.Array,d("keys"),d("values"),d("entries")},function(a,l,o){var p=o(17),d=o(7),g=o(46),v=o(71),O=o(34),E=o(15),w=o(66),j=o(36),P=o(107),M=o(19),T=o(35),k=o(95),I=o(28),L=o(32),Y=o(58),Q=o(85),X=o(33),V=o(39),Z=o(40),F=o(84),C=o(41),B=o(64),$=o(57),G=o(72),te=o(68),pe=o(136),le=o(111),ge=o(50),Ee=o(37),ve=o(82),se=o(97),ye=o(43),me=o(87),je=o(91),Be=o(67),Ze=o(88),Ae=o(27),Ce=o(137),Je=o(138),ee=o(73),J=o(56),ue=o(74).forEach,we=je("hidden"),Te="Symbol",xe=Ae("toPrimitive"),Qe=J.set,it=J.getterFor(Te),tt=Object.prototype,Ve=d.Symbol,be=Ve&&Ve.prototype,Ge=d.TypeError,re=d.QObject,ze=g("JSON","stringify"),lt=ge.f,St=Ee.f,st=pe.f,Ot=ve.f,Lt=E([].push),Ft=me("symbols"),ct=me("op-symbols"),Yt=me("string-to-symbol-registry"),H=me("symbol-to-string-registry"),ie=me("wks"),K=!re||!re.prototype||!re.prototype.findChild,ce=j&&M(function(){return $(St({},"a",{get:function(){return St(this,"a",{value:7}).a}})).a!=7})?function(Fe,Ke,rt){var at=lt(tt,Ke);at&&delete tt[Ke],St(Fe,Ke,rt),at&&Fe!==tt&&St(tt,Ke,at)}:St,De=function(Fe,Ke){var rt=Ft[Fe]=$(be);return Qe(rt,{type:Te,tag:Fe,description:Ke}),j||(rt.description=Ke),rt},Ne=function(Fe,Ke,rt){Fe===tt&&Ne(ct,Ke,rt),X(Fe);var at=F(Ke);return X(rt),T(Ft,at)?(rt.enumerable?(T(Fe,we)&&Fe[we][at]&&(Fe[we][at]=!1),rt=$(rt,{enumerable:B(0,!1)})):(T(Fe,we)||St(Fe,we,B(1,{})),Fe[we][at]=!0),ce(Fe,at,rt)):St(Fe,at,rt)},Xe=function(Fe,Ke){X(Fe);var rt=Z(Ke),at=G(rt).concat(Vt(rt));return ue(at,function(kt){j&&!O(gt,rt,kt)||Ne(Fe,kt,rt[kt])}),Fe},gt=function(Fe){var Ke=F(Fe),rt=O(Ot,this,Ke);return!(this===tt&&T(Ft,Ke)&&!T(ct,Ke))&&(!(rt||!T(this,Ke)||!T(Ft,Ke)||T(this,we)&&this[we][Ke])||rt)},nn=function(Fe,Ke){var rt=Z(Fe),at=F(Ke);if(rt!==tt||!T(Ft,at)||T(ct,at)){var kt=lt(rt,at);return!kt||!T(Ft,at)||T(rt,we)&&rt[we][at]||(kt.enumerable=!0),kt}},fn=function(Fe){var Ke=st(Z(Fe)),rt=[];return ue(Ke,function(at){T(Ft,at)||T(Be,at)||Lt(rt,at)}),rt},Vt=function(Fe){var Ke=Fe===tt,rt=st(Ke?ct:Z(Fe)),at=[];return ue(rt,function(kt){!T(Ft,kt)||Ke&&!T(tt,kt)||Lt(at,Ft[kt])}),at};if(P||(Ve=function(){if(Y(be,this))throw Ge("Symbol is not a constructor");var Fe=arguments.length&&arguments[0]!==void 0?C(arguments[0]):void 0,Ke=Ze(Fe),rt=function(at){this===tt&&O(rt,ct,at),T(this,we)&&T(this[we],Ke)&&(this[we][Ke]=!1),ce(this,Ke,B(1,at))};return j&&K&&ce(tt,Ke,{configurable:!0,set:rt}),De(Ke,Fe)},ye(be=Ve.prototype,"toString",function(){return it(this).tag}),ye(Ve,"withoutSetter",function(Fe){return De(Ze(Fe),Fe)}),ve.f=gt,Ee.f=Ne,ge.f=nn,te.f=pe.f=fn,le.f=Vt,Ce.f=function(Fe){return De(Ae(Fe),Fe)},j&&(St(be,"description",{configurable:!0,get:function(){return it(this).description}}),w||ye(tt,"propertyIsEnumerable",gt,{unsafe:!0}))),p({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:Ve}),ue(G(ie),function(Fe){Je(Fe)}),p({target:Te,stat:!0,forced:!P},{for:function(Fe){var Ke=C(Fe);if(T(Yt,Ke))return Yt[Ke];var rt=Ve(Ke);return Yt[Ke]=rt,H[rt]=Ke,rt},keyFor:function(Fe){if(!Q(Fe))throw Ge(Fe+" is not a symbol");if(T(H,Fe))return H[Fe]},useSetter:function(){K=!0},useSimple:function(){K=!1}}),p({target:"Object",stat:!0,forced:!P,sham:!j},{create:function(Fe,Ke){return Ke===void 0?$(Fe):Xe($(Fe),Ke)},defineProperty:Ne,defineProperties:Xe,getOwnPropertyDescriptor:nn}),p({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:fn,getOwnPropertySymbols:Vt}),p({target:"Object",stat:!0,forced:M(function(){le.f(1)})},{getOwnPropertySymbols:function(Fe){return le.f(V(Fe))}}),ze&&p({target:"JSON",stat:!0,forced:!P||M(function(){var Fe=Ve();return ze([Fe])!="[null]"||ze({a:Fe})!="{}"||ze(Object(Fe))!="{}"})},{stringify:function(Fe,Ke,rt){var at=se(arguments),kt=Ke;if((L(Ke)||Fe!==void 0)&&!Q(Fe))return k(Ke)||(Ke=function(Ht,Ur){if(I(kt)&&(Ur=O(kt,this,Ht,Ur)),!Q(Ur))return Ur}),at[1]=Ke,v(ze,null,at)}}),!be[xe]){var Zt=be.valueOf;ye(be,xe,function(Fe){return O(Zt,this)})}ee(Ve,Te),Be[we]=!0},function(a,l,o){var p=o(7),d=o(149),g=o(150),v=o(3),O=o(55),E=o(27),w=E("iterator"),j=E("toStringTag"),P=v.values,M=function(k,I){if(k){if(k[w]!==P)try{O(k,w,P)}catch{k[w]=P}if(k[j]||O(k,j,I),d[I]){for(var L in v)if(k[L]!==v[L])try{O(k,L,v[L])}catch{k[L]=v[L]}}}};for(var T in d)M(p[T]&&p[T].prototype,T);M(g,"DOMTokenList")},function(a,l,o){var p=o(148).charAt,d=o(41),g=o(56),v=o(115),O="String Iterator",E=g.set,w=g.getterFor(O);v(String,"String",function(j){E(this,{type:O,string:d(j),index:0})},function(){var j,P=w(this),M=P.string,T=P.index;return T>=M.length?{value:void 0,done:!0}:(j=p(M,T),P.index+=j.length,{value:j,done:!1})})},function(a,l,o){(function(p){var d=function(g){return g&&g.Math==Math&&g};a.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof p=="object"&&p)||function(){return this}()||Function("return this")()}).call(this,o(81))},function(a,l,o){var p=o(17),d=o(36),g=o(7),v=o(15),O=o(35),E=o(28),w=o(58),j=o(41),P=o(37).f,M=o(131),T=g.Symbol,k=T&&T.prototype;if(d&&E(T)&&(!("description"in k)||T().description!==void 0)){var I={},L=function(){var C=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),B=w(k,this)?new T(C):C===void 0?T():T(C);return C===""&&(I[B]=!0),B};M(L,T),L.prototype=k,k.constructor=L;var Y=String(T("test"))=="Symbol(test)",Q=v(k.toString),X=v(k.valueOf),V=/^Symbol\((.*)\)[^)]+$/,Z=v("".replace),F=v("".slice);P(k,"description",{configurable:!0,get:function(){var C=X(this),B=Q(C);if(O(I,C))return"";var $=Y?F(B,7,-1):Z(B,V,"$1");return $===""?void 0:$}}),p({global:!0,forced:!0},{Symbol:L})}},function(a,l,o){o(138)("iterator")},function(a,l,o){o.d(l,"a",function(){return v.a}),o.d(l,"c",function(){return v.e}),o.d(l,"h",function(){return V}),o.d(l,"i",function(){return Y}),o.d(l,"j",function(){return I}),o.d(l,"b",function(){return ge}),o.d(l,"e",function(){return ye}),o.d(l,"f",function(){return Ee}),o.d(l,"g",function(){return Ft});var p,d,g,v=o(0),O=0,E=[],w=v.i.__b,j=v.i.__r,P=v.i.diffed,M=v.i.__c,T=v.i.unmount;function k(H,ie){v.i.__h&&v.i.__h(d,H,O||ie),O=0;var K=d.__H||(d.__H={__:[],__h:[]});return H>=K.__.length&&K.__.push({}),K.__[H]}function I(H){return O=1,L(te,H)}function L(H,ie,K){var ce=k(p++,2);return ce.t=H,ce.__c||(ce.__=[K?K(ie):te(void 0,ie),function(De){var Ne=ce.t(ce.__[0],De);ce.__[0]!==Ne&&(ce.__=[Ne,ce.__[1]],ce.__c.setState({}))}],ce.__c=d),ce.__}function Y(H,ie){var K=k(p++,3);!v.i.__s&&G(K.__H,ie)&&(K.__=H,K.__H=ie,d.__H.__h.push(K))}function Q(H,ie){var K=k(p++,4);!v.i.__s&&G(K.__H,ie)&&(K.__=H,K.__H=ie,d.__h.push(K))}function X(H,ie){var K=k(p++,7);return G(K.__H,ie)&&(K.__=H(),K.__H=ie,K.__h=H),K.__}function V(H,ie){return O=8,X(function(){return H},ie)}function Z(){var H;for(E.sort(function(ie,K){return ie.__v.__b-K.__v.__b});H=E.pop();)if(H.__P)try{H.__H.__h.forEach(B),H.__H.__h.forEach($),H.__H.__h=[]}catch(ie){H.__H.__h=[],v.i.__e(ie,H.__v)}}v.i.__b=function(H){d=null,w&&w(H)},v.i.__r=function(H){j&&j(H),p=0;var ie=(d=H.__c).__H;ie&&(ie.__h.forEach(B),ie.__h.forEach($),ie.__h=[])},v.i.diffed=function(H){P&&P(H);var ie=H.__c;ie&&ie.__H&&ie.__H.__h.length&&(E.push(ie)!==1&&g===v.i.requestAnimationFrame||((g=v.i.requestAnimationFrame)||C)(Z)),d=null},v.i.__c=function(H,ie){ie.some(function(K){try{K.__h.forEach(B),K.__h=K.__h.filter(function(ce){return!ce.__||$(ce)})}catch(ce){ie.some(function(De){De.__h&&(De.__h=[])}),ie=[],v.i.__e(ce,K.__v)}}),M&&M(H,ie)},v.i.unmount=function(H){T&&T(H);var ie,K=H.__c;K&&K.__H&&(K.__H.__.forEach(function(ce){try{B(ce)}catch(De){ie=De}}),ie&&v.i.__e(ie,K.__v))};var F=typeof requestAnimationFrame=="function";function C(H){var ie,K=function(){clearTimeout(ce),F&&cancelAnimationFrame(ie),setTimeout(H)},ce=setTimeout(K,100);F&&(ie=requestAnimationFrame(K))}function B(H){var ie=d,K=H.__c;typeof K=="function"&&(H.__c=void 0,K()),d=ie}function $(H){var ie=d;H.__c=H.__(),d=ie}function G(H,ie){return!H||H.length!==ie.length||ie.some(function(K,ce){return K!==H[ce]})}function te(H,ie){return typeof ie=="function"?ie(H):ie}function pe(H,ie){for(var K in ie)H[K]=ie[K];return H}function le(H,ie){for(var K in H)if(K!=="__source"&&!(K in ie))return!0;for(var ce in ie)if(ce!=="__source"&&H[ce]!==ie[ce])return!0;return!1}function ge(H){this.props=H}function Ee(H,ie){function K(De){var Ne=this.props.ref,Xe=Ne==De.ref;return!Xe&&Ne&&(Ne.call?Ne(null):Ne.current=null),ie?!ie(this.props,De)||!Xe:le(this.props,De)}function ce(De){return this.shouldComponentUpdate=K,Object(v.e)(H,De)}return ce.displayName="Memo("+(H.displayName||H.name)+")",ce.prototype.isReactComponent=!0,ce.__f=!0,ce}(ge.prototype=new v.a).isPureReactComponent=!0,ge.prototype.shouldComponentUpdate=function(H,ie){return le(this.props,H)||le(this.state,ie)};var ve=v.i.__b;v.i.__b=function(H){H.type&&H.type.__f&&H.ref&&(H.props.ref=H.ref,H.ref=null),ve&&ve(H)};var se=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ye(H){function ie(K,ce){var De=pe({},K);return delete De.ref,H(De,!(ce=K.ref||ce)||typeof ce=="object"&&!("current"in ce)?null:ce)}return ie.$$typeof=se,ie.render=ie,ie.prototype.isReactComponent=ie.__f=!0,ie.displayName="ForwardRef("+(H.displayName||H.name)+")",ie}var me=function(H,ie){return H==null?null:Object(v.k)(Object(v.k)(H).map(ie))},je={map:me,forEach:me,count:function(H){return H?Object(v.k)(H).length:0},only:function(H){var ie=Object(v.k)(H);if(ie.length!==1)throw"Children.only";return ie[0]},toArray:v.k},Be=v.i.__e;v.i.__e=function(H,ie,K){if(H.then){for(var ce,De=ie;De=De.__;)if((ce=De.__c)&&ce.__c)return ie.__e==null&&(ie.__e=K.__e,ie.__k=K.__k),ce.__c(H,ie)}Be(H,ie,K)};var Ze=v.i.unmount;function Ae(H,ie,K){return H&&(H.__c&&H.__c.__H&&(H.__c.__H.__.forEach(function(ce){typeof ce.__c=="function"&&ce.__c()}),H.__c.__H=null),(H=pe({},H)).__c!=null&&(H.__c.__P===K&&(H.__c.__P=ie),H.__c=null),H.__k=H.__k&&H.__k.map(function(ce){return Ae(ce,ie,K)})),H}function Ce(H,ie,K){return H&&(H.__v=null,H.__k=H.__k&&H.__k.map(function(ce){return Ce(ce,ie,K)}),H.__c&&H.__c.__P===ie&&(H.__e&&K.insertBefore(H.__e,H.__d),H.__c.__e=!0,H.__c.__P=K)),H}function Je(){this.__u=0,this.t=null,this.__b=null}function ee(H){var ie=H.__.__c;return ie&&ie.__e&&ie.__e(H)}function J(){this.u=null,this.o=null}v.i.unmount=function(H){var ie=H.__c;ie&&ie.__R&&ie.__R(),ie&&H.__h===!0&&(H.type=null),Ze&&Ze(H)},(Je.prototype=new v.a).__c=function(H,ie){var K=ie.__c,ce=this;ce.t==null&&(ce.t=[]),ce.t.push(K);var De=ee(ce.__v),Ne=!1,Xe=function(){Ne||(Ne=!0,K.__R=null,De?De(gt):gt())};K.__R=Xe;var gt=function(){if(!--ce.__u){if(ce.state.__e){var fn=ce.state.__e;ce.__v.__k[0]=Ce(fn,fn.__c.__P,fn.__c.__O)}var Vt;for(ce.setState({__e:ce.__b=null});Vt=ce.t.pop();)Vt.forceUpdate()}},nn=ie.__h===!0;ce.__u++||nn||ce.setState({__e:ce.__b=ce.__v.__k[0]}),H.then(Xe,Xe)},Je.prototype.componentWillUnmount=function(){this.t=[]},Je.prototype.render=function(H,ie){if(this.__b){if(this.__v.__k){var K=document.createElement("div"),ce=this.__v.__k[0].__c;this.__v.__k[0]=Ae(this.__b,K,ce.__O=ce.__P)}this.__b=null}var De=ie.__e&&Object(v.e)(v.b,null,H.fallback);return De&&(De.__h=null),[Object(v.e)(v.b,null,ie.__e?null:H.children),De]};var ue=function(H,ie,K){if(++K[1]===K[0]&&H.o.delete(ie),H.props.revealOrder&&(H.props.revealOrder[0]!=="t"||!H.o.size))for(K=H.u;K;){for(;K.length>3;)K.pop()();if(K[1]<K[0])break;H.u=K=K[2]}};function we(H){return this.getChildContext=function(){return H.context},H.children}function Te(H){var ie=this,K=H.i;ie.componentWillUnmount=function(){Object(v.j)(null,ie.l),ie.l=null,ie.i=null},ie.i&&ie.i!==K&&ie.componentWillUnmount(),H.__v?(ie.l||(ie.i=K,ie.l={nodeType:1,parentNode:K,childNodes:[],appendChild:function(ce){this.childNodes.push(ce),ie.i.appendChild(ce)},insertBefore:function(ce,De){this.childNodes.push(ce),ie.i.appendChild(ce)},removeChild:function(ce){this.childNodes.splice(this.childNodes.indexOf(ce)>>>1,1),ie.i.removeChild(ce)}}),Object(v.j)(Object(v.e)(we,{context:ie.context},H.__v),ie.l)):ie.l&&ie.componentWillUnmount()}(J.prototype=new v.a).__e=function(H){var ie=this,K=ee(ie.__v),ce=ie.o.get(H);return ce[0]++,function(De){var Ne=function(){ie.props.revealOrder?(ce.push(De),ue(ie,H,ce)):De()};K?K(Ne):Ne()}},J.prototype.render=function(H){this.u=null,this.o=new Map;var ie=Object(v.k)(H.children);H.revealOrder&&H.revealOrder[0]==="b"&&ie.reverse();for(var K=ie.length;K--;)this.o.set(ie[K],this.u=[1,0,this.u]);return H.children},J.prototype.componentDidUpdate=J.prototype.componentDidMount=function(){var H=this;this.o.forEach(function(ie,K){ue(H,K,ie)})};var xe=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Qe=/^(?: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]/,it=typeof document<"u",tt=function(H){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(H)};v.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(H){Object.defineProperty(v.a.prototype,H,{configurable:!0,get:function(){return this["UNSAFE_"+H]},set:function(ie){Object.defineProperty(this,H,{configurable:!0,writable:!0,value:ie})}})});var Ve=v.i.event;function be(){}function Ge(){return this.cancelBubble}function re(){return this.defaultPrevented}v.i.event=function(H){return Ve&&(H=Ve(H)),H.persist=be,H.isPropagationStopped=Ge,H.isDefaultPrevented=re,H.nativeEvent=H};var ze,lt={configurable:!0,get:function(){return this.class}},St=v.i.vnode;v.i.vnode=function(H){var ie=H.type,K=H.props,ce=K;if(typeof ie=="string"){var De=ie.indexOf("-")===-1;for(var Ne in ce={},K){var Xe=K[Ne];it&&Ne==="children"&&ie==="noscript"||Ne==="value"&&"defaultValue"in K&&Xe==null||(Ne==="defaultValue"&&"value"in K&&K.value==null?Ne="value":Ne==="download"&&Xe===!0?Xe="":/ondoubleclick/i.test(Ne)?Ne="ondblclick":/^onchange(textarea|input)/i.test(Ne+ie)&&!tt(K.type)?Ne="oninput":/^onfocus$/i.test(Ne)?Ne="onfocusin":/^onblur$/i.test(Ne)?Ne="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(Ne)?Ne=Ne.toLowerCase():De&&Qe.test(Ne)?Ne=Ne.replace(/[A-Z0-9]/,"-$&").toLowerCase():Xe===null&&(Xe=void 0),ce[Ne]=Xe)}ie=="select"&&ce.multiple&&Array.isArray(ce.value)&&(ce.value=Object(v.k)(K.children).forEach(function(gt){gt.props.selected=ce.value.indexOf(gt.props.value)!=-1})),ie=="select"&&ce.defaultValue!=null&&(ce.value=Object(v.k)(K.children).forEach(function(gt){gt.props.selected=ce.multiple?ce.defaultValue.indexOf(gt.props.value)!=-1:ce.defaultValue==gt.props.value})),H.props=ce,K.class!=K.className&&(lt.enumerable="className"in K,K.className!=null&&(ce.class=K.className),Object.defineProperty(ce,"className",lt))}H.$$typeof=xe,St&&St(H)};var st=v.i.__r;v.i.__r=function(H){st&&st(H),ze=H.__c};var Ot={ReactCurrentDispatcher:{current:{readContext:function(H){return ze.__n[H.__c].props.value}}}};function Lt(H){return!!H&&H.$$typeof===xe}var Ft=function(H,ie){return H(ie)},ct=v.b,Yt={useState:I,useReducer:L,useEffect:Y,useLayoutEffect:Q,useRef:function(H){return O=5,X(function(){return{current:H}},[])},useImperativeHandle:function(H,ie,K){O=6,Q(function(){typeof H=="function"?H(ie()):H&&(H.current=ie())},K==null?K:K.concat(H))},useMemo:X,useCallback:V,useContext:function(H){var ie=d.context[H.__c],K=k(p++,9);return K.c=H,ie?(K.__==null&&(K.__=!0,ie.sub(d)),ie.props.value):H.__},useDebugValue:function(H,ie){v.i.useDebugValue&&v.i.useDebugValue(ie?ie(H):H)},version:"17.0.2",Children:je,render:function(H,ie,K){return ie.__k==null&&(ie.textContent=""),Object(v.j)(H,ie),typeof K=="function"&&K(),H?H.__c:null},hydrate:function(H,ie,K){return Object(v.h)(H,ie),typeof K=="function"&&K(),H?H.__c:null},unmountComponentAtNode:function(H){return!!H.__k&&(Object(v.j)(null,H),!0)},createPortal:function(H,ie){return Object(v.e)(Te,{__v:H,i:ie})},createElement:v.e,createContext:v.d,createFactory:function(H){return v.e.bind(null,H)},cloneElement:function(H){return Lt(H)?v.c.apply(null,arguments):H},createRef:v.f,Fragment:v.b,isValidElement:Lt,findDOMNode:function(H){return H&&(H.base||H.nodeType===1&&H)||null},Component:v.a,PureComponent:ge,memo:Ee,forwardRef:ye,flushSync:function(H,ie){return H(ie)},unstable_batchedUpdates:Ft,StrictMode:ct,Suspense:Je,SuspenseList:J,lazy:function(H){var ie,K,ce;function De(Ne){if(ie||(ie=H()).then(function(Xe){K=Xe.default||Xe},function(Xe){ce=Xe}),ce)throw ce;if(!K)throw ie;return Object(v.e)(K,Ne)}return De.displayName="Lazy",De.__f=!0,De},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ot};l.d=Yt},function(a,l,o){var p=o(7),d=o(149),g=o(150),v=o(182),O=o(55),E=function(j){if(j&&j.forEach!==v)try{O(j,"forEach",v)}catch{j.forEach=v}};for(var w in d)d[w]&&E(p[w]&&p[w].prototype);E(g)},function(a,l,o){o(17)({target:"Object",stat:!0},{setPrototypeOf:o(101)})},function(a,l,o){var p=o(17),d=o(19),g=o(39),v=o(100),O=o(140);p({target:"Object",stat:!0,forced:d(function(){v(1)}),sham:!O},{getPrototypeOf:function(E){return v(g(E))}})},function(a,l,o){var p=o(17),d=o(46),g=o(71),v=o(200),O=o(157),E=o(33),w=o(32),j=o(57),P=o(19),M=d("Reflect","construct"),T=Object.prototype,k=[].push,I=P(function(){function Q(){}return!(M(function(){},[],Q)instanceof Q)}),L=!P(function(){M(function(){})}),Y=I||L;p({target:"Reflect",stat:!0,forced:Y,sham:Y},{construct:function(Q,X){O(Q),E(X);var V=arguments.length<3?Q:O(arguments[2]);if(L&&!I)return M(Q,X,V);if(Q==V){switch(X.length){case 0:return new Q;case 1:return new Q(X[0]);case 2:return new Q(X[0],X[1]);case 3:return new Q(X[0],X[1],X[2]);case 4:return new Q(X[0],X[1],X[2],X[3])}var Z=[null];return g(k,Z,X),new(g(v,Q,Z))}var F=V.prototype,C=j(w(F)?F:T),B=g(Q,C,X);return w(B)?B:C}})},function(a,l){var o=Function.prototype,p=o.bind,d=o.call,g=p&&p.bind(d);a.exports=p?function(v){return v&&g(d,v)}:function(v){return v&&function(){return d.apply(v,arguments)}}},function(a,l,o){var p=o(17),d=o(7),g=o(95),v=o(98),O=o(32),E=o(69),w=o(44),j=o(40),P=o(60),M=o(27),T=o(76),k=o(97),I=T("slice"),L=M("species"),Y=d.Array,Q=Math.max;p({target:"Array",proto:!0,forced:!I},{slice:function(X,V){var Z,F,C,B=j(this),$=w(B),G=E(X,$),te=E(V===void 0?$:V,$);if(g(B)&&(Z=B.constructor,(v(Z)&&(Z===Y||g(Z.prototype))||O(Z)&&(Z=Z[L])===null)&&(Z=void 0),Z===Y||Z===void 0))return k(B,G,te);for(F=new(Z===void 0?Y:Z)(Q(te-G,0)),C=0;G<te;G++,C++)G in B&&P(F,C,B[G]);return F.length=C,F}})},function(a,l,o){var p=o(7),d=o(50).f,g=o(55),v=o(43),O=o(109),E=o(131),w=o(94);a.exports=function(j,P){var M,T,k,I,L,Y=j.target,Q=j.global,X=j.stat;if(M=Q?p:X?p[Y]||O(Y,{}):(p[Y]||{}).prototype)for(T in P){if(I=P[T],k=j.noTargetGet?(L=d(M,T))&&L.value:M[T],!w(Q?T:Y+(X?".":"#")+T,j.forced)&&k!==void 0){if(typeof I==typeof k)continue;E(I,k)}(j.sham||k&&k.sham)&&g(I,"sham",!0),v(M,T,I,j)}}},function(a,l,o){var p=o(17),d=o(102);p({target:"RegExp",proto:!0,forced:/./.exec!==d},{exec:d})},function(a,l){a.exports=function(o){try{return!!o()}catch{return!0}}},function(a,l,o){var p=o(17),d=o(39),g=o(72);p({target:"Object",stat:!0,forced:o(19)(function(){g(1)})},{keys:function(v){return g(d(v))}})},function(a,l,o){var p=o(17),d=o(19),g=o(40),v=o(50).f,O=o(36),E=d(function(){v(1)});p({target:"Object",stat:!0,forced:!O||E,sham:!O},{getOwnPropertyDescriptor:function(w,j){return v(g(w),j)}})},function(a,l,o){var p=o(36),d=o(92).EXISTS,g=o(15),v=o(37).f,O=Function.prototype,E=g(O.toString),w=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=g(w.exec);p&&!d&&v(O,"name",{configurable:!0,get:function(){try{return j(w,E(this))[1]}catch{return""}}})},function(a,l,o){var p=o(17),d=o(74).filter;p({target:"Array",proto:!0,forced:!o(76)("filter")},{filter:function(g){return d(this,g,arguments.length>1?arguments[1]:void 0)}})},function(a,l,o){var p=o(17),d=o(183);p({target:"Array",stat:!0,forced:!o(119)(function(g){Array.from(g)})},{from:d})},function(a,l,o){var p=o(17),d=o(36),g=o(132),v=o(40),O=o(50),E=o(60);p({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(w){for(var j,P,M=v(w),T=O.f,k=g(M),I={},L=0;k.length>L;)(P=T(M,j=k[L++]))!==void 0&&E(I,j,P);return I}})},,function(a,l,o){var p=o(7),d=o(87),g=o(35),v=o(88),O=o(107),E=o(129),w=d("wks"),j=p.Symbol,P=j&&j.for,M=E?j:j&&j.withoutSetter||v;a.exports=function(T){if(!g(w,T)||!O&&typeof w[T]!="string"){var k="Symbol."+T;O&&g(j,T)?w[T]=j[T]:w[T]=E&&P?P(k):M(k)}return w[T]}},function(a,l){a.exports=function(o){return typeof o=="function"}},function(a,l,o){var p=o(17),d=o(7),g=o(19),v=o(95),O=o(32),E=o(39),w=o(44),j=o(60),P=o(114),M=o(76),T=o(27),k=o(65),I=T("isConcatSpreadable"),L=9007199254740991,Y="Maximum allowed index exceeded",Q=d.TypeError,X=k>=51||!g(function(){var F=[];return F[I]=!1,F.concat()[0]!==F}),V=M("concat"),Z=function(F){if(!O(F))return!1;var C=F[I];return C!==void 0?!!C:v(F)};p({target:"Array",proto:!0,forced:!X||!V},{concat:function(F){var C,B,$,G,te,pe=E(this),le=P(pe,0),ge=0;for(C=-1,$=arguments.length;C<$;C++)if(Z(te=C===-1?pe:arguments[C])){if(ge+(G=w(te))>L)throw Q(Y);for(B=0;B<G;B++,ge++)B in te&&j(le,ge,te[B])}else{if(ge>=L)throw Q(Y);j(le,ge++,te)}return le.length=ge,le}})},function(a,l,o){var p=o(17),d=o(199);p({target:"Object",stat:!0,forced:Object.assign!==d},{assign:d})},function(a,l,o){var p=o(105),d=typeof self=="object"&&self&&self.Object===Object&&self,g=p.a||d||Function("return this")();l.a=g},function(a,l,o){var p=o(28);a.exports=function(d){return typeof d=="object"?d!==null:p(d)}},function(a,l,o){var p=o(7),d=o(32),g=p.String,v=p.TypeError;a.exports=function(O){if(d(O))return O;throw v(g(O)+" is not an object")}},function(a,l){var o=Function.prototype.call;a.exports=o.bind?o.bind(o):function(){return o.apply(o,arguments)}},function(a,l,o){var p=o(15),d=o(39),g=p({}.hasOwnProperty);a.exports=Object.hasOwn||function(v,O){return g(d(v),O)}},function(a,l,o){var p=o(19);a.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(a,l,o){var p=o(7),d=o(36),g=o(130),v=o(33),O=o(84),E=p.TypeError,w=Object.defineProperty;l.f=d?w:function(j,P,M){if(v(j),P=O(P),v(M),g)try{return w(j,P,M)}catch{}if("get"in M||"set"in M)throw E("Accessors not supported");return"value"in M&&(j[P]=M.value),j}},function(a,l,o){var p=o(17),d=o(74).map;p({target:"Array",proto:!0,forced:!o(76)("map")},{map:function(g){return d(this,g,arguments.length>1?arguments[1]:void 0)}})},function(a,l,o){var p=o(7),d=o(45),g=p.Object;a.exports=function(v){return g(d(v))}},function(a,l,o){var p=o(83),d=o(45);a.exports=function(g){return p(d(g))}},function(a,l,o){var p=o(7),d=o(96),g=p.String;a.exports=function(v){if(d(v)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return g(v)}},function(a,l,o){(function(p){o.d(l,"d",function(){return v}),o.d(l,"c",function(){return O}),o.d(l,"b",function(){return E}),o.d(l,"a",function(){return j});var d=o(10),g=function(P,M){var T=typeof Symbol=="function"&&P[Symbol.iterator];if(!T)return P;var k,I,L=T.call(P),Y=[];try{for(;(M===void 0||M-- >0)&&!(k=L.next()).done;)Y.push(k.value)}catch(Q){I={error:Q}}finally{try{k&&!k.done&&(T=L.return)&&T.call(L)}finally{if(I)throw I.error}}return Y};function v(){var P=g(Object(d.j)(0),2)[1];return Object(d.h)(function(){P(function(M){return M+1})},[])}function O(P){if(!P||typeof P!="object")return!1;var M=Object.getPrototypeOf(P);return!M||M===Object.prototype}function E(P){return typeof Symbol=="function"?Symbol.for(P):"__$mobx-react "+P+"__"}var w={};function j(){return typeof window<"u"?window:p!==void 0?p:typeof self<"u"?self:w}}).call(this,o(81))},function(a,l,o){var p=o(7),d=o(28),g=o(35),v=o(55),O=o(109),E=o(90),w=o(56),j=o(92).CONFIGURABLE,P=w.get,M=w.enforce,T=String(String).split("String");(a.exports=function(k,I,L,Y){var Q,X=!!Y&&!!Y.unsafe,V=!!Y&&!!Y.enumerable,Z=!!Y&&!!Y.noTargetGet,F=Y&&Y.name!==void 0?Y.name:I;d(L)&&(String(F).slice(0,7)==="Symbol("&&(F="["+String(F).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!g(L,"name")||j&&L.name!==F)&&v(L,"name",F),(Q=M(L)).source||(Q.source=T.join(typeof F=="string"?F:""))),k!==p?(X?!Z&&k[I]&&(V=!0):delete k[I],V?k[I]=L:v(k,I,L)):V?k[I]=L:O(I,L)})(Function.prototype,"toString",function(){return d(this)&&P(this).source||E(this)})},function(a,l,o){var p=o(93);a.exports=function(d){return p(d.length)}},function(a,l,o){var p=o(7).TypeError;a.exports=function(d){if(d==null)throw p("Can't call method on "+d);return d}},function(a,l,o){var p=o(7),d=o(28),g=function(v){return d(v)?v:void 0};a.exports=function(v,O){return arguments.length<2?g(p[v]):p[v]&&p[v][O]}},function(a,l,o){var p=o(17),d=o(34),g=o(32),v=o(33),O=o(201),E=o(50),w=o(100);p({target:"Reflect",stat:!0},{get:function j(P,M){var T,k,I=arguments.length<3?P:arguments[2];return v(P)===I?P[M]:(T=E.f(P,M))?O(T)?T.value:T.get===void 0?void 0:d(T.get,I):g(k=w(P))?j(k,M,I):void 0}})},function(a,l,o){(function(p){var d=o(31),g=o(166),v=u&&!u.nodeType&&u,O=v&&typeof p=="object"&&p&&!p.nodeType&&p,E=O&&O.exports===v?d.a.Buffer:void 0,w=(E?E.isBuffer:void 0)||g.a;l.a=w}).call(this,o(121)(a))},function(a,l,o){(function(p){var d=o(105),g=u&&!u.nodeType&&u,v=g&&typeof p=="object"&&p&&!p.nodeType&&p,O=v&&v.exports===g&&d.a.process,E=function(){try{var w=v&&v.require&&v.require("util").types;return w||O&&O.binding&&O.binding("util")}catch{}}();l.a=E}).call(this,o(121)(a))},function(a,l,o){var p=o(36),d=o(34),g=o(82),v=o(64),O=o(40),E=o(84),w=o(35),j=o(130),P=Object.getOwnPropertyDescriptor;l.f=p?P:function(M,T){if(M=O(M),T=E(T),j)try{return P(M,T)}catch{}if(w(M,T))return v(!d(g.f,M,T),M[T])}},function(a,l,o){var p=o(15),d=p({}.toString),g=p("".slice);a.exports=function(v){return g(d(v),8,-1)}},function(a,l,o){var p=o(17),d=o(213).entries;p({target:"Object",stat:!0},{entries:function(g){return d(g)}})},function(a,l,o){var p=o(46);a.exports=p("navigator","userAgent")||""},function(a,l,o){var p=o(7),d=o(28),g=o(86),v=p.TypeError;a.exports=function(O){if(d(O))return O;throw v(g(O)+" is not a function")}},function(a,l,o){var p=o(36),d=o(37),g=o(64);a.exports=p?function(v,O,E){return d.f(v,O,g(1,E))}:function(v,O,E){return v[O]=E,v}},function(a,l,o){var p,d,g,v=o(170),O=o(7),E=o(15),w=o(32),j=o(55),P=o(35),M=o(108),T=o(91),k=o(67),I="Object already initialized",L=O.TypeError,Y=O.WeakMap;if(v||M.state){var Q=M.state||(M.state=new Y),X=E(Q.get),V=E(Q.has),Z=E(Q.set);p=function(C,B){if(V(Q,C))throw new L(I);return B.facade=C,Z(Q,C,B),B},d=function(C){return X(Q,C)||{}},g=function(C){return V(Q,C)}}else{var F=T("state");k[F]=!0,p=function(C,B){if(P(C,F))throw new L(I);return B.facade=C,j(C,F,B),B},d=function(C){return P(C,F)?C[F]:{}},g=function(C){return P(C,F)}}a.exports={set:p,get:d,has:g,enforce:function(C){return g(C)?d(C):p(C,{})},getterFor:function(C){return function(B){var $;if(!w(B)||($=d(B)).type!==C)throw L("Incompatible receiver, "+C+" required");return $}}}},function(a,l,o){var p,d=o(33),g=o(171),v=o(110),O=o(67),E=o(135),w=o(89),j=o(91),P=j("IE_PROTO"),M=function(){},T=function(L){return"<script>"+L+"<\/script>"},k=function(L){L.write(T("")),L.close();var Y=L.parentWindow.Object;return L=null,Y},I=function(){try{p=new ActiveXObject("htmlfile")}catch{}var L,Y;I=typeof document<"u"?document.domain&&p?k(p):((Y=w("iframe")).style.display="none",E.appendChild(Y),Y.src="javascript:",(L=Y.contentWindow.document).open(),L.write(T("document.F=Object")),L.close(),L.F):k(p);for(var Q=v.length;Q--;)delete I.prototype[v[Q]];return I()};O[P]=!0,a.exports=Object.create||function(L,Y){var Q;return L!==null?(M.prototype=d(L),Q=new M,M.prototype=null,Q[P]=L):Q=I(),Y===void 0?Q:g(Q,Y)}},function(a,l,o){var p=o(15);a.exports=p({}.isPrototypeOf)},function(a,l,o){var p=o(54);a.exports=function(d,g){var v=d[g];return v==null?void 0:p(v)}},function(a,l,o){var p=o(84),d=o(37),g=o(64);a.exports=function(v,O,E){var w=p(O);w in v?d.f(v,w,g(0,E)):v[w]=E}},function(a,l,o){var p=o(15),d=o(54),g=p(p.bind);a.exports=function(v,O){return d(v),O===void 0?v:g?g(v,O):function(){return v.apply(O,arguments)}}},function(a,l,o){o(177)("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},o(181))},function(a,l,o){var p=o(17),d=o(15),g=o(83),v=o(40),O=o(120),E=d([].join),w=g!=Object,j=O("join",",");p({target:"Array",proto:!0,forced:w||!j},{join:function(P){return E(v(this),P===void 0?",":P)}})},function(a,l){a.exports=function(o,p){return{enumerable:!(1&o),configurable:!(2&o),writable:!(4&o),value:p}}},function(a,l,o){var p,d,g=o(7),v=o(53),O=g.process,E=g.Deno,w=O&&O.versions||E&&E.version,j=w&&w.v8;j&&(d=(p=j.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!d&&v&&(!(p=v.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=v.match(/Chrome\/(\d+)/))&&(d=+p[1]),a.exports=d},function(a,l){a.exports=!1},function(a,l){a.exports={}},function(a,l,o){var p=o(133),d=o(110).concat("length","prototype");l.f=Object.getOwnPropertyNames||function(g){return p(g,d)}},function(a,l,o){var p=o(70),d=Math.max,g=Math.min;a.exports=function(v,O){var E=p(v);return E<0?d(E+O,0):g(E,O)}},function(a,l){var o=Math.ceil,p=Math.floor;a.exports=function(d){var g=+d;return g!=g||g===0?0:(g>0?p:o)(g)}},function(a,l){var o=Function.prototype,p=o.apply,d=o.bind,g=o.call;a.exports=typeof Reflect=="object"&&Reflect.apply||(d?g.bind(p):function(){return g.apply(p,arguments)})},function(a,l,o){var p=o(133),d=o(110);a.exports=Object.keys||function(g){return p(g,d)}},function(a,l,o){var p=o(37).f,d=o(35),g=o(27)("toStringTag");a.exports=function(v,O,E){v&&!d(v=E?v:v.prototype,g)&&p(v,g,{configurable:!0,value:O})}},function(a,l,o){var p=o(61),d=o(15),g=o(83),v=o(39),O=o(44),E=o(114),w=d([].push),j=function(P){var M=P==1,T=P==2,k=P==3,I=P==4,L=P==6,Y=P==7,Q=P==5||L;return function(X,V,Z,F){for(var C,B,$=v(X),G=g($),te=p(V,Z),pe=O(G),le=0,ge=F||E,Ee=M?ge(X,pe):T||Y?ge(X,0):void 0;pe>le;le++)if((Q||le in G)&&(B=te(C=G[le],le,$),P))if(M)Ee[le]=B;else if(B)switch(P){case 3:return!0;case 5:return C;case 6:return le;case 2:w(Ee,C)}else switch(P){case 4:return!1;case 7:w(Ee,C)}return L?-1:k||I?I:Ee}};a.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},function(a,l){a.exports={}},function(a,l,o){var p=o(19),d=o(27),g=o(65),v=d("species");a.exports=function(O){return g>=51||!p(function(){var E=[];return(E.constructor={})[v]=function(){return{foo:1}},E[O](Boolean).foo!==1})}},function(a,l,o){var p=o(71),d=o(34),g=o(15),v=o(122),O=o(154),E=o(33),w=o(45),j=o(156),P=o(123),M=o(93),T=o(41),k=o(59),I=o(113),L=o(124),Y=o(102),Q=o(151),X=o(19),V=Q.UNSUPPORTED_Y,Z=4294967295,F=Math.min,C=[].push,B=g(/./.exec),$=g(C),G=g("".slice),te=!X(function(){var pe=/(?:)/,le=pe.exec;pe.exec=function(){return le.apply(this,arguments)};var ge="ab".split(pe);return ge.length!==2||ge[0]!=="a"||ge[1]!=="b"});v("split",function(pe,le,ge){var Ee;return Ee="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(ve,se){var ye=T(w(this)),me=se===void 0?Z:se>>>0;if(me===0)return[];if(ve===void 0)return[ye];if(!O(ve))return d(le,ye,ve,me);for(var je,Be,Ze,Ae=[],Ce=(ve.ignoreCase?"i":"")+(ve.multiline?"m":"")+(ve.unicode?"u":"")+(ve.sticky?"y":""),Je=0,ee=new RegExp(ve.source,Ce+"g");(je=d(Y,ee,ye))&&!((Be=ee.lastIndex)>Je&&($(Ae,G(ye,Je,je.index)),je.length>1&&je.index<ye.length&&p(C,Ae,I(je,1)),Ze=je[0].length,Je=Be,Ae.length>=me));)ee.lastIndex===je.index&&ee.lastIndex++;return Je===ye.length?!Ze&&B(ee,"")||$(Ae,""):$(Ae,G(ye,Je)),Ae.length>me?I(Ae,0,me):Ae}:"0".split(void 0,0).length?function(ve,se){return ve===void 0&&se===0?[]:d(le,this,ve,se)}:le,[function(ve,se){var ye=w(this),me=ve==null?void 0:k(ve,pe);return me?d(me,ve,ye,se):d(Ee,T(ye),ve,se)},function(ve,se){var ye=E(this),me=T(ve),je=ge(Ee,ye,me,se,Ee!==le);if(je.done)return je.value;var Be=j(ye,RegExp),Ze=ye.unicode,Ae=(ye.ignoreCase?"i":"")+(ye.multiline?"m":"")+(ye.unicode?"u":"")+(V?"g":"y"),Ce=new Be(V?"^(?:"+ye.source+")":ye,Ae),Je=se===void 0?Z:se>>>0;if(Je===0)return[];if(me.length===0)return L(Ce,me)===null?[me]:[];for(var ee=0,J=0,ue=[];J<me.length;){Ce.lastIndex=V?0:J;var we,Te=L(Ce,V?G(me,J):me);if(Te===null||(we=F(M(Ce.lastIndex+(V?J:0)),me.length))===ee)J=P(me,J,Ze);else{if($(ue,G(me,ee,J)),ue.length===Je)return ue;for(var xe=1;xe<=Te.length-1;xe++)if($(ue,Te[xe]),ue.length===Je)return ue;J=ee=we}}return $(ue,G(me,ee)),ue}]},!te,V)},function(a,l,o){var p=o(36),d=o(7),g=o(15),v=o(94),O=o(43),E=o(35),w=o(145),j=o(58),P=o(85),M=o(128),T=o(19),k=o(68).f,I=o(50).f,L=o(37).f,Y=o(197),Q=o(159).trim,X="Number",V=d.Number,Z=V.prototype,F=d.TypeError,C=g("".slice),B=g("".charCodeAt),$=function(Ee){var ve=M(Ee,"number");return typeof ve=="bigint"?ve:G(ve)},G=function(Ee){var ve,se,ye,me,je,Be,Ze,Ae,Ce=M(Ee,"number");if(P(Ce))throw F("Cannot convert a Symbol value to a number");if(typeof Ce=="string"&&Ce.length>2){if(Ce=Q(Ce),(ve=B(Ce,0))===43||ve===45){if((se=B(Ce,2))===88||se===120)return NaN}else if(ve===48){switch(B(Ce,1)){case 66:case 98:ye=2,me=49;break;case 79:case 111:ye=8,me=55;break;default:return+Ce}for(Be=(je=C(Ce,2)).length,Ze=0;Ze<Be;Ze++)if((Ae=B(je,Ze))<48||Ae>me)return NaN;return parseInt(je,ye)}}return+Ce};if(v(X,!V(" 0o1")||!V("0b1")||V("+0x1"))){for(var te,pe=function(Ee){var ve=arguments.length<1?0:V($(Ee)),se=this;return j(Z,se)&&T(function(){Y(se)})?w(Object(ve),se,pe):ve},le=p?k(V):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),ge=0;le.length>ge;ge++)E(V,te=le[ge])&&!E(pe,te)&&L(pe,te,I(V,te));pe.prototype=Z,Z.constructor=pe,O(d,X,pe)}},function(a,l,o){o(17)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(a,l,o){var p=o(17),d=o(214),g=o(99);p({target:"Array",proto:!0},{fill:d}),g("fill")},function(a,l){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}a.exports=o},function(a,l,o){var p={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,g=d&&!p.call({1:2},1);l.f=g?function(v){var O=d(this,v);return!!O&&O.enumerable}:p},function(a,l,o){var p=o(7),d=o(15),g=o(19),v=o(51),O=p.Object,E=d("".split);a.exports=g(function(){return!O("z").propertyIsEnumerable(0)})?function(w){return v(w)=="String"?E(w,""):O(w)}:O},function(a,l,o){var p=o(128),d=o(85);a.exports=function(g){var v=p(g,"string");return d(v)?v:v+""}},function(a,l,o){var p=o(7),d=o(46),g=o(28),v=o(58),O=o(129),E=p.Object;a.exports=O?function(w){return typeof w=="symbol"}:function(w){var j=d("Symbol");return g(j)&&v(j.prototype,E(w))}},function(a,l,o){var p=o(7).String;a.exports=function(d){try{return p(d)}catch{return"Object"}}},function(a,l,o){var p=o(66),d=o(108);(a.exports=function(g,v){return d[g]||(d[g]=v!==void 0?v:{})})("versions",[]).push({version:"3.19.3",mode:p?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(a,l,o){var p=o(15),d=0,g=Math.random(),v=p(1 .toString);a.exports=function(O){return"Symbol("+(O===void 0?"":O)+")_"+v(++d+g,36)}},function(a,l,o){var p=o(7),d=o(32),g=p.document,v=d(g)&&d(g.createElement);a.exports=function(O){return v?g.createElement(O):{}}},function(a,l,o){var p=o(15),d=o(28),g=o(108),v=p(Function.toString);d(g.inspectSource)||(g.inspectSource=function(O){return v(O)}),a.exports=g.inspectSource},function(a,l,o){var p=o(87),d=o(88),g=p("keys");a.exports=function(v){return g[v]||(g[v]=d(v))}},function(a,l,o){var p=o(36),d=o(35),g=Function.prototype,v=p&&Object.getOwnPropertyDescriptor,O=d(g,"name"),E=O&&(function(){}).name==="something",w=O&&(!p||p&&v(g,"name").configurable);a.exports={EXISTS:O,PROPER:E,CONFIGURABLE:w}},function(a,l,o){var p=o(70),d=Math.min;a.exports=function(g){return g>0?d(p(g),9007199254740991):0}},function(a,l,o){var p=o(19),d=o(28),g=/#|\.prototype\./,v=function(P,M){var T=E[O(P)];return T==j||T!=w&&(d(M)?p(M):!!M)},O=v.normalize=function(P){return String(P).replace(g,".").toLowerCase()},E=v.data={},w=v.NATIVE="N",j=v.POLYFILL="P";a.exports=v},function(a,l,o){var p=o(51);a.exports=Array.isArray||function(d){return p(d)=="Array"}},function(a,l,o){var p=o(7),d=o(112),g=o(28),v=o(51),O=o(27)("toStringTag"),E=p.Object,w=v(function(){return arguments}())=="Arguments";a.exports=d?v:function(j){var P,M,T;return j===void 0?"Undefined":j===null?"Null":typeof(M=function(k,I){try{return k[I]}catch{}}(P=E(j),O))=="string"?M:w?v(P):(T=v(P))=="Object"&&g(P.callee)?"Arguments":T}},function(a,l,o){var p=o(15);a.exports=p([].slice)},function(a,l,o){var p=o(15),d=o(19),g=o(28),v=o(96),O=o(46),E=o(90),w=function(){},j=[],P=O("Reflect","construct"),M=/^\s*(?:class|function)\b/,T=p(M.exec),k=!M.exec(w),I=function(L){if(!g(L))return!1;try{return P(w,j,L),!0}catch{return!1}};a.exports=!P||d(function(){var L;return I(I.call)||!I(Object)||!I(function(){L=!0})||L})?function(L){if(!g(L))return!1;switch(v(L)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return k||!!T(M,E(L))}:I},function(a,l,o){var p=o(27),d=o(57),g=o(37),v=p("unscopables"),O=Array.prototype;O[v]==null&&g.f(O,v,{configurable:!0,value:d(null)}),a.exports=function(E){O[v][E]=!0}},function(a,l,o){var p=o(7),d=o(35),g=o(28),v=o(39),O=o(91),E=o(140),w=O("IE_PROTO"),j=p.Object,P=j.prototype;a.exports=E?j.getPrototypeOf:function(M){var T=v(M);if(d(T,w))return T[w];var k=T.constructor;return g(k)&&T instanceof k?k.prototype:T instanceof j?P:null}},function(a,l,o){var p=o(15),d=o(33),g=o(176);a.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var v,O=!1,E={};try{(v=p(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(E,[]),O=E instanceof Array}catch{}return function(w,j){return d(w),g(j),O?v(w,j):w.__proto__=j,w}}():void 0)},function(a,l,o){var p,d,g=o(34),v=o(15),O=o(41),E=o(185),w=o(151),j=o(87),P=o(57),M=o(56).get,T=o(186),k=o(187),I=j("native-string-replace",String.prototype.replace),L=RegExp.prototype.exec,Y=L,Q=v("".charAt),X=v("".indexOf),V=v("".replace),Z=v("".slice),F=(d=/b*/g,g(L,p=/a/,"a"),g(L,d,"a"),p.lastIndex!==0||d.lastIndex!==0),C=w.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0;(F||B||C||T||k)&&(Y=function($){var G,te,pe,le,ge,Ee,ve,se=this,ye=M(se),me=O($),je=ye.raw;if(je)return je.lastIndex=se.lastIndex,G=g(Y,je,me),se.lastIndex=je.lastIndex,G;var Be=ye.groups,Ze=C&&se.sticky,Ae=g(E,se),Ce=se.source,Je=0,ee=me;if(Ze&&(Ae=V(Ae,"y",""),X(Ae,"g")===-1&&(Ae+="g"),ee=Z(me,se.lastIndex),se.lastIndex>0&&(!se.multiline||se.multiline&&Q(me,se.lastIndex-1)!==`
|
||
`)&&(Ce="(?: "+Ce+")",ee=" "+ee,Je++),te=new RegExp("^(?:"+Ce+")",Ae)),B&&(te=new RegExp("^"+Ce+"$(?!\\s)",Ae)),F&&(pe=se.lastIndex),le=g(L,Ze?te:se,ee),Ze?le?(le.input=Z(le.input,Je),le[0]=Z(le[0],Je),le.index=se.lastIndex,se.lastIndex+=le[0].length):se.lastIndex=0:F&&le&&(se.lastIndex=se.global?le.index+le[0].length:pe),B&&le&&le.length>1&&g(I,le[0],te,function(){for(ge=1;ge<arguments.length-2;ge++)arguments[ge]===void 0&&(le[ge]=void 0)}),le&&Be)for(le.groups=Ee=P(null),ge=0;ge<Be.length;ge++)Ee[(ve=Be[ge])[0]]=le[ve[1]];return le}),a.exports=Y},function(a,l,o){var p=o(17),d=o(7),g=o(69),v=o(70),O=o(44),E=o(39),w=o(114),j=o(60),P=o(76)("splice"),M=d.TypeError,T=Math.max,k=Math.min,I=9007199254740991,L="Maximum allowed length exceeded";p({target:"Array",proto:!0,forced:!P},{splice:function(Y,Q){var X,V,Z,F,C,B,$=E(this),G=O($),te=g(Y,G),pe=arguments.length;if(pe===0?X=V=0:pe===1?(X=0,V=G-te):(X=pe-2,V=k(T(v(Q),0),G-te)),G+X-V>I)throw M(L);for(Z=w($,V),F=0;F<V;F++)(C=te+F)in $&&j(Z,F,$[C]);if(Z.length=V,X<V){for(F=te;F<G-V;F++)B=F+X,(C=F+V)in $?$[B]=$[C]:delete $[B];for(F=G;F>G-V+X;F--)delete $[F-1]}else if(X>V)for(F=G-V;F>te;F--)B=F+X-1,(C=F+V-1)in $?$[B]=$[C]:delete $[B];for(F=0;F<X;F++)$[F+te]=arguments[F+2];return $.length=G-V+X,Z}})},function(a,l,o){var p=o(17),d=o(202);p({target:"String",proto:!0,forced:o(203)("anchor")},{anchor:function(g){return d(this,"a","name",g)}})},function(a,l,o){(function(p){var d=typeof p=="object"&&p&&p.Object===Object&&p;l.a=d}).call(this,o(81))},function(a,l,o){(function(p){var d=o(31),g=u&&!u.nodeType&&u,v=g&&typeof p=="object"&&p&&!p.nodeType&&p,O=v&&v.exports===g?d.a.Buffer:void 0,E=O?O.allocUnsafe:void 0;l.a=function(w,j){if(j)return w.slice();var P=w.length,M=E?E(P):new w.constructor(P);return w.copy(M),M}}).call(this,o(121)(a))},function(a,l,o){var p=o(65),d=o(19);a.exports=!!Object.getOwnPropertySymbols&&!d(function(){var g=Symbol();return!String(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&p&&p<41})},function(a,l,o){var p=o(7),d=o(109),g="__core-js_shared__",v=p[g]||d(g,{});a.exports=v},function(a,l,o){var p=o(7),d=Object.defineProperty;a.exports=function(g,v){try{d(p,g,{value:v,configurable:!0,writable:!0})}catch{p[g]=v}return v}},function(a,l){a.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(a,l){l.f=Object.getOwnPropertySymbols},function(a,l,o){var p={};p[o(27)("toStringTag")]="z",a.exports=String(p)==="[object z]"},function(a,l,o){var p=o(7),d=o(69),g=o(44),v=o(60),O=p.Array,E=Math.max;a.exports=function(w,j,P){for(var M=g(w),T=d(j,M),k=d(P===void 0?M:P,M),I=O(E(k-T,0)),L=0;T<k;T++,L++)v(I,L,w[T]);return I.length=L,I}},function(a,l,o){var p=o(173);a.exports=function(d,g){return new(p(d))(g===0?0:g)}},function(a,l,o){var p=o(17),d=o(34),g=o(66),v=o(92),O=o(28),E=o(175),w=o(100),j=o(101),P=o(73),M=o(55),T=o(43),k=o(27),I=o(75),L=o(139),Y=v.PROPER,Q=v.CONFIGURABLE,X=L.IteratorPrototype,V=L.BUGGY_SAFARI_ITERATORS,Z=k("iterator"),F="keys",C="values",B="entries",$=function(){return this};a.exports=function(G,te,pe,le,ge,Ee,ve){E(pe,te,le);var se,ye,me,je=function(J){if(J===ge&&Je)return Je;if(!V&&J in Ae)return Ae[J];switch(J){case F:case C:case B:return function(){return new pe(this,J)}}return function(){return new pe(this)}},Be=te+" Iterator",Ze=!1,Ae=G.prototype,Ce=Ae[Z]||Ae["@@iterator"]||ge&&Ae[ge],Je=!V&&Ce||je(ge),ee=te=="Array"&&Ae.entries||Ce;if(ee&&(se=w(ee.call(new G)))!==Object.prototype&&se.next&&(g||w(se)===X||(j?j(se,X):O(se[Z])||T(se,Z,$)),P(se,Be,!0,!0),g&&(I[Be]=$)),Y&&ge==C&&Ce&&Ce.name!==C&&(!g&&Q?M(Ae,"name",C):(Ze=!0,Je=function(){return d(Ce,this)})),ge)if(ye={values:je(C),keys:Ee?Je:je(F),entries:je(B)},ve)for(me in ye)(V||Ze||!(me in Ae))&&T(Ae,me,ye[me]);else p({target:te,proto:!0,forced:V||Ze},ye);return g&&!ve||Ae[Z]===Je||T(Ae,Z,Je,{name:ge}),I[te]=Je,ye}},function(a,l,o){var p=o(7),d=o(61),g=o(34),v=o(33),O=o(86),E=o(142),w=o(44),j=o(58),P=o(143),M=o(117),T=o(144),k=p.TypeError,I=function(Y,Q){this.stopped=Y,this.result=Q},L=I.prototype;a.exports=function(Y,Q,X){var V,Z,F,C,B,$,G,te=X&&X.that,pe=!(!X||!X.AS_ENTRIES),le=!(!X||!X.IS_ITERATOR),ge=!(!X||!X.INTERRUPTED),Ee=d(Q,te),ve=function(ye){return V&&T(V,"normal",ye),new I(!0,ye)},se=function(ye){return pe?(v(ye),ge?Ee(ye[0],ye[1],ve):Ee(ye[0],ye[1])):ge?Ee(ye,ve):Ee(ye)};if(le)V=Y;else{if(!(Z=M(Y)))throw k(O(Y)+" is not iterable");if(E(Z)){for(F=0,C=w(Y);C>F;F++)if((B=se(Y[F]))&&j(L,B))return B;return new I(!1)}V=P(Y,Z)}for($=V.next;!(G=g($,V)).done;){try{B=se(G.value)}catch(ye){T(V,"throw",ye)}if(typeof B=="object"&&B&&j(L,B))return B}return new I(!1)}},function(a,l,o){var p=o(96),d=o(59),g=o(75),v=o(27)("iterator");a.exports=function(O){if(O!=null)return d(O,v)||d(O,"@@iterator")||g[p(O)]}},function(a,l,o){var p=o(7),d=o(58),g=p.TypeError;a.exports=function(v,O){if(d(O,v))return v;throw g("Incorrect invocation")}},function(a,l,o){var p=o(27)("iterator"),d=!1;try{var g=0,v={next:function(){return{done:!!g++}},return:function(){d=!0}};v[p]=function(){return this},Array.from(v,function(){throw 2})}catch{}a.exports=function(O,E){if(!E&&!d)return!1;var w=!1;try{var j={};j[p]=function(){return{next:function(){return{done:w=!0}}}},O(j)}catch{}return w}},function(a,l,o){var p=o(19);a.exports=function(d,g){var v=[][d];return!!v&&p(function(){v.call(null,g||function(){throw 1},1)})}},function(a,l){a.exports=function(o){if(!o.webpackPolyfill){var p=Object.create(o);p.children||(p.children=[]),Object.defineProperty(p,"loaded",{enumerable:!0,get:function(){return p.l}}),Object.defineProperty(p,"id",{enumerable:!0,get:function(){return p.i}}),Object.defineProperty(p,"exports",{enumerable:!0}),p.webpackPolyfill=1}return p}},function(a,l,o){o(18);var p=o(15),d=o(43),g=o(102),v=o(19),O=o(27),E=o(55),w=O("species"),j=RegExp.prototype;a.exports=function(P,M,T,k){var I=O(P),L=!v(function(){var V={};return V[I]=function(){return 7},""[P](V)!=7}),Y=L&&!v(function(){var V=!1,Z=/a/;return P==="split"&&((Z={}).constructor={},Z.constructor[w]=function(){return Z},Z.flags="",Z[I]=/./[I]),Z.exec=function(){return V=!0,null},Z[I](""),!V});if(!L||!Y||T){var Q=p(/./[I]),X=M(I,""[P],function(V,Z,F,C,B){var $=p(V),G=Z.exec;return G===g||G===j.exec?L&&!B?{done:!0,value:Q(Z,F,C)}:{done:!0,value:$(F,Z,C)}:{done:!1}});d(String.prototype,P,X[0]),d(j,I,X[1])}k&&E(j[I],"sham",!0)}},function(a,l,o){var p=o(148).charAt;a.exports=function(d,g,v){return g+(v?p(d,g).length:1)}},function(a,l,o){var p=o(7),d=o(34),g=o(33),v=o(28),O=o(51),E=o(102),w=p.TypeError;a.exports=function(j,P){var M=j.exec;if(v(M)){var T=d(M,j,P);return T!==null&&g(T),T}if(O(j)==="RegExp")return d(E,j,P);throw w("RegExp#exec called on incompatible receiver")}},function(a,l,o){var p=o(71),d=o(34),g=o(15),v=o(122),O=o(19),E=o(33),w=o(28),j=o(70),P=o(93),M=o(41),T=o(45),k=o(123),I=o(59),L=o(198),Y=o(124),Q=o(27)("replace"),X=Math.max,V=Math.min,Z=g([].concat),F=g([].push),C=g("".indexOf),B=g("".slice),$="a".replace(/./,"$0")==="$0",G=!!/./[Q]&&/./[Q]("a","$0")==="";v("replace",function(te,pe,le){var ge=G?"$":"$0";return[function(Ee,ve){var se=T(this),ye=Ee==null?void 0:I(Ee,Q);return ye?d(ye,Ee,se,ve):d(pe,M(se),Ee,ve)},function(Ee,ve){var se=E(this),ye=M(Ee);if(typeof ve=="string"&&C(ve,ge)===-1&&C(ve,"$<")===-1){var me=le(pe,se,ye,ve);if(me.done)return me.value}var je=w(ve);je||(ve=M(ve));var Be=se.global;if(Be){var Ze=se.unicode;se.lastIndex=0}for(var Ae=[];;){var Ce=Y(se,ye);if(Ce===null||(F(Ae,Ce),!Be))break;M(Ce[0])===""&&(se.lastIndex=k(ye,P(se.lastIndex),Ze))}for(var Je,ee="",J=0,ue=0;ue<Ae.length;ue++){for(var we=M((Ce=Ae[ue])[0]),Te=X(V(j(Ce.index),ye.length),0),xe=[],Qe=1;Qe<Ce.length;Qe++)F(xe,(Je=Ce[Qe])===void 0?Je:String(Je));var it=Ce.groups;if(je){var tt=Z([we],xe,Te,ye);it!==void 0&&F(tt,it);var Ve=M(p(ve,void 0,tt))}else Ve=L(we,ye,Te,xe,it,ve);Te>=J&&(ee+=B(ye,J,Te)+Ve,J=Te+we.length)}return ee+B(ye,J)}]},!!O(function(){var te=/./;return te.exec=function(){var pe=[];return pe.groups={a:"7"},pe},"".replace(te,"$<a>")!=="7"})||!$||G)},function(a,l,o){var p=o(51),d=o(7);a.exports=p(d.process)=="process"},function(a,l,o){o(17)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(a,l,o){var p=o(7),d=o(34),g=o(32),v=o(85),O=o(59),E=o(169),w=o(27),j=p.TypeError,P=w("toPrimitive");a.exports=function(M,T){if(!g(M)||v(M))return M;var k,I=O(M,P);if(I){if(T===void 0&&(T="default"),k=d(I,M,T),!g(k)||v(k))return k;throw j("Can't convert object to primitive value")}return T===void 0&&(T="number"),E(M,T)}},function(a,l,o){var p=o(107);a.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(a,l,o){var p=o(36),d=o(19),g=o(89);a.exports=!p&&!d(function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!=7})},function(a,l,o){var p=o(35),d=o(132),g=o(50),v=o(37);a.exports=function(O,E){for(var w=d(E),j=v.f,P=g.f,M=0;M<w.length;M++){var T=w[M];p(O,T)||j(O,T,P(E,T))}}},function(a,l,o){var p=o(46),d=o(15),g=o(68),v=o(111),O=o(33),E=d([].concat);a.exports=p("Reflect","ownKeys")||function(w){var j=g.f(O(w)),P=v.f;return P?E(j,P(w)):j}},function(a,l,o){var p=o(15),d=o(35),g=o(40),v=o(134).indexOf,O=o(67),E=p([].push);a.exports=function(w,j){var P,M=g(w),T=0,k=[];for(P in M)!d(O,P)&&d(M,P)&&E(k,P);for(;j.length>T;)d(M,P=j[T++])&&(~v(k,P)||E(k,P));return k}},function(a,l,o){var p=o(40),d=o(69),g=o(44),v=function(O){return function(E,w,j){var P,M=p(E),T=g(M),k=d(j,T);if(O&&w!=w){for(;T>k;)if((P=M[k++])!=P)return!0}else for(;T>k;k++)if((O||k in M)&&M[k]===w)return O||k||0;return!O&&-1}};a.exports={includes:v(!0),indexOf:v(!1)}},function(a,l,o){var p=o(46);a.exports=p("document","documentElement")},function(a,l,o){var p=o(51),d=o(40),g=o(68).f,v=o(113),O=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];a.exports.f=function(E){return O&&p(E)=="Window"?function(w){try{return g(w)}catch{return v(O)}}(E):g(d(E))}},function(a,l,o){var p=o(27);l.f=p},function(a,l,o){var p=o(172),d=o(35),g=o(137),v=o(37).f;a.exports=function(O){var E=p.Symbol||(p.Symbol={});d(E,O)||v(E,O,{value:g.f(O)})}},function(a,l,o){var p,d,g,v=o(19),O=o(28),E=o(57),w=o(100),j=o(43),P=o(27),M=o(66),T=P("iterator"),k=!1;[].keys&&("next"in(g=[].keys())?(d=w(w(g)))!==Object.prototype&&(p=d):k=!0),p==null||v(function(){var I={};return p[T].call(I)!==I})?p={}:M&&(p=E(p)),O(p[T])||j(p,T,function(){return this}),a.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:k}},function(a,l,o){var p=o(19);a.exports=!p(function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype})},function(a,l,o){var p=o(17),d=o(15),g=o(67),v=o(32),O=o(35),E=o(37).f,w=o(68),j=o(136),P=o(178),M=o(88),T=o(180),k=!1,I=M("meta"),L=0,Y=function(X){E(X,I,{value:{objectID:"O"+L++,weakData:{}}})},Q=a.exports={enable:function(){Q.enable=function(){},k=!0;var X=w.f,V=d([].splice),Z={};Z[I]=1,X(Z).length&&(w.f=function(F){for(var C=X(F),B=0,$=C.length;B<$;B++)if(C[B]===I){V(C,B,1);break}return C},p({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:j.f}))},fastKey:function(X,V){if(!v(X))return typeof X=="symbol"?X:(typeof X=="string"?"S":"P")+X;if(!O(X,I)){if(!P(X))return"F";if(!V)return"E";Y(X)}return X[I].objectID},getWeakData:function(X,V){if(!O(X,I)){if(!P(X))return!0;if(!V)return!1;Y(X)}return X[I].weakData},onFreeze:function(X){return T&&k&&P(X)&&!O(X,I)&&Y(X),X}};g[I]=!0},function(a,l,o){var p=o(27),d=o(75),g=p("iterator"),v=Array.prototype;a.exports=function(O){return O!==void 0&&(d.Array===O||v[g]===O)}},function(a,l,o){var p=o(7),d=o(34),g=o(54),v=o(33),O=o(86),E=o(117),w=p.TypeError;a.exports=function(j,P){var M=arguments.length<2?E(j):P;if(g(M))return v(d(M,j));throw w(O(j)+" is not iterable")}},function(a,l,o){var p=o(34),d=o(33),g=o(59);a.exports=function(v,O,E){var w,j;d(v);try{if(!(w=g(v,"return"))){if(O==="throw")throw E;return E}w=p(w,v)}catch(P){j=!0,w=P}if(O==="throw")throw E;if(j)throw w;return d(w),E}},function(a,l,o){var p=o(28),d=o(32),g=o(101);a.exports=function(v,O,E){var w,j;return g&&p(w=O.constructor)&&w!==E&&d(j=w.prototype)&&j!==E.prototype&&g(v,j),v}},function(a,l,o){var p=o(43);a.exports=function(d,g,v){for(var O in g)p(d,O,g[O],v);return d}},function(a,l,o){var p=o(46),d=o(37),g=o(27),v=o(36),O=g("species");a.exports=function(E){var w=p(E),j=d.f;v&&w&&!w[O]&&j(w,O,{configurable:!0,get:function(){return this}})}},function(a,l,o){var p=o(15),d=o(70),g=o(41),v=o(45),O=p("".charAt),E=p("".charCodeAt),w=p("".slice),j=function(P){return function(M,T){var k,I,L=g(v(M)),Y=d(T),Q=L.length;return Y<0||Y>=Q?P?"":void 0:(k=E(L,Y))<55296||k>56319||Y+1===Q||(I=E(L,Y+1))<56320||I>57343?P?O(L,Y):k:P?w(L,Y,Y+2):I-56320+(k-55296<<10)+65536}};a.exports={codeAt:j(!1),charAt:j(!0)}},function(a,l){a.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(a,l,o){var p=o(89)("span").classList,d=p&&p.constructor&&p.constructor.prototype;a.exports=d===Object.prototype?void 0:d},function(a,l,o){var p=o(19),d=o(7).RegExp,g=p(function(){var E=d("a","y");return E.lastIndex=2,E.exec("abcd")!=null}),v=g||p(function(){return!d("a","y").sticky}),O=g||p(function(){var E=d("^r","gy");return E.lastIndex=2,E.exec("str")!=null});a.exports={BROKEN_CARET:O,MISSED_STICKY:v,UNSUPPORTED_Y:g}},function(a,l,o){var p=o(17),d=o(134).includes,g=o(99);p({target:"Array",proto:!0},{includes:function(v){return d(this,v,arguments.length>1?arguments[1]:void 0)}}),g("includes")},function(a,l,o){var p=o(17),d=o(15),g=o(194),v=o(45),O=o(41),E=o(195),w=d("".indexOf);p({target:"String",proto:!0,forced:!E("includes")},{includes:function(j){return!!~w(O(v(this)),O(g(j)),arguments.length>1?arguments[1]:void 0)}})},function(a,l,o){var p=o(32),d=o(51),g=o(27)("match");a.exports=function(v){var O;return p(v)&&((O=v[g])!==void 0?!!O:d(v)=="RegExp")}},function(a,l){var o,p,d=a.exports={};function g(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}function O(L){if(o===setTimeout)return setTimeout(L,0);if((o===g||!o)&&setTimeout)return o=setTimeout,setTimeout(L,0);try{return o(L,0)}catch{try{return o.call(null,L,0)}catch{return o.call(this,L,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:g}catch{o=g}try{p=typeof clearTimeout=="function"?clearTimeout:v}catch{p=v}})();var E,w=[],j=!1,P=-1;function M(){j&&E&&(j=!1,E.length?w=E.concat(w):P=-1,w.length&&T())}function T(){if(!j){var L=O(M);j=!0;for(var Y=w.length;Y;){for(E=w,w=[];++P<Y;)E&&E[P].run();P=-1,Y=w.length}E=null,j=!1,function(Q){if(p===clearTimeout)return clearTimeout(Q);if((p===v||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(Q);try{p(Q)}catch{try{return p.call(null,Q)}catch{return p.call(this,Q)}}}(L)}}function k(L,Y){this.fun=L,this.array=Y}function I(){}d.nextTick=function(L){var Y=new Array(arguments.length-1);if(arguments.length>1)for(var Q=1;Q<arguments.length;Q++)Y[Q-1]=arguments[Q];w.push(new k(L,Y)),w.length!==1||j||O(T)},k.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=I,d.addListener=I,d.once=I,d.off=I,d.removeListener=I,d.removeAllListeners=I,d.emit=I,d.prependListener=I,d.prependOnceListener=I,d.listeners=function(L){return[]},d.binding=function(L){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(L){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(a,l,o){var p=o(33),d=o(157),g=o(27)("species");a.exports=function(v,O){var E,w=p(v).constructor;return w===void 0||(E=p(w)[g])==null?O:d(E)}},function(a,l,o){var p=o(7),d=o(98),g=o(86),v=p.TypeError;a.exports=function(O){if(d(O))return O;throw v(g(O)+" is not a constructor")}},function(a,l,o){var p=o(17),d=o(159).trim;p({target:"String",proto:!0,forced:o(196)("trim")},{trim:function(){return d(this)}})},function(a,l,o){var p=o(15),d=o(45),g=o(41),v=o(160),O=p("".replace),E="["+v+"]",w=RegExp("^"+E+E+"*"),j=RegExp(E+E+"*$"),P=function(M){return function(T){var k=g(d(T));return 1&M&&(k=O(k,w,"")),2&M&&(k=O(k,j,"")),k}};a.exports={start:P(1),end:P(2),trim:P(3)}},function(a,l){a.exports=`
|
||
\v\f\r \u2028\u2029\uFEFF`},function(a,l,o){var p=o(34),d=o(122),g=o(33),v=o(93),O=o(41),E=o(45),w=o(59),j=o(123),P=o(124);d("match",function(M,T,k){return[function(I){var L=E(this),Y=I==null?void 0:w(I,M);return Y?p(Y,I,L):new RegExp(I)[M](O(L))},function(I){var L=g(this),Y=O(I),Q=k(T,L,Y);if(Q.done)return Q.value;if(!L.global)return P(L,Y);var X=L.unicode;L.lastIndex=0;for(var V,Z=[],F=0;(V=P(L,Y))!==null;){var C=O(V[0]);Z[F]=C,C===""&&(L.lastIndex=j(Y,v(L.lastIndex),X)),F++}return F===0?null:Z}]})},function(a,l,o){var p=o(17),d=Math.hypot,g=Math.abs,v=Math.sqrt;p({target:"Math",stat:!0,forced:!!d&&d(1/0,NaN)!==1/0},{hypot:function(O,E){for(var w,j,P=0,M=0,T=arguments.length,k=0;M<T;)k<(w=g(arguments[M++]))?(P=P*(j=k/w)*j+1,k=w):P+=w>0?(j=w/k)*j:w;return k===1/0?1/0:k*v(P)}})},function(a,l,o){var p,d,g,v,O=o(7),E=o(71),w=o(61),j=o(28),P=o(35),M=o(19),T=o(135),k=o(97),I=o(89),L=o(164),Y=o(126),Q=O.setImmediate,X=O.clearImmediate,V=O.process,Z=O.Dispatch,F=O.Function,C=O.MessageChannel,B=O.String,$=0,G={},te="onreadystatechange";try{p=O.location}catch{}var pe=function(ve){if(P(G,ve)){var se=G[ve];delete G[ve],se()}},le=function(ve){return function(){pe(ve)}},ge=function(ve){pe(ve.data)},Ee=function(ve){O.postMessage(B(ve),p.protocol+"//"+p.host)};Q&&X||(Q=function(ve){var se=k(arguments,1);return G[++$]=function(){E(j(ve)?ve:F(ve),void 0,se)},d($),$},X=function(ve){delete G[ve]},Y?d=function(ve){V.nextTick(le(ve))}:Z&&Z.now?d=function(ve){Z.now(le(ve))}:C&&!L?(v=(g=new C).port2,g.port1.onmessage=ge,d=w(v.postMessage,v)):O.addEventListener&&j(O.postMessage)&&!O.importScripts&&p&&p.protocol!=="file:"&&!M(Ee)?(d=Ee,O.addEventListener("message",ge,!1)):d=te in I("script")?function(ve){T.appendChild(I("script")).onreadystatechange=function(){T.removeChild(this),pe(ve)}}:function(ve){setTimeout(le(ve),0)}),a.exports={set:Q,clear:X}},function(a,l,o){var p=o(53);a.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(p)},function(a,l,o){var p=o(54),d=function(g){var v,O;this.promise=new g(function(E,w){if(v!==void 0||O!==void 0)throw TypeError("Bad Promise constructor");v=E,O=w}),this.resolve=p(v),this.reject=p(O)};a.exports.f=function(g){return new d(g)}},function(a,l,o){l.a=function(){return!1}},function(a,l,o){(function(p){o.d(l,"a",function(){return V});var d=o(1);function g(C){throw new Error("[mobx-utils] "+C)}function v(C,B){B===void 0&&(B="Illegal state"),C||g(B)}var O=function(C){return C&&C!==Object.prototype&&Object.getOwnPropertyNames(C).concat(O(Object.getPrototypeOf(C))||[])},E=function(C){return function(B){var $=O(B);return $.filter(function(G,te){return $.indexOf(G)===te})}(C).filter(function(B){return B!=="constructor"&&!~B.indexOf("__")})},w="pending",j="fulfilled",P="rejected";function M(C){switch(this.state){case w:return C.pending&&C.pending(this.value);case P:return C.rejected&&C.rejected(this.value);case j:return C.fulfilled?C.fulfilled(this.value):this.value}}function T(C,B){if(v(arguments.length<=2,"fromPromise expects up to two arguments"),v(typeof C=="function"||typeof C=="object"&&C&&typeof C.then=="function","Please pass a promise or function to fromPromise"),C.isPromiseBasedObservable===!0)return C;typeof C=="function"&&(C=new Promise(C));var $=C;C.then(Object(d.k)("observableFromPromise-resolve",function(te){$.value=te,$.state=j}),Object(d.k)("observableFromPromise-reject",function(te){$.value=te,$.state=P})),$.isPromiseBasedObservable=!0,$.case=M;var G=B&&B.state===j?B.value:void 0;return Object(d.q)($,{value:G,state:w},{},{deep:!1}),$}(function(C){C.reject=Object(d.k)("fromPromise.reject",function(B){var $=C(Promise.reject(B));return $.state=P,$.value=B,$}),C.resolve=Object(d.k)("fromPromise.resolve",function(B){B===void 0&&(B=void 0);var $=C(Promise.resolve(B));return $.state=j,$.value=B,$})})(T||(T={}));var k=function(C,B,$,G){var te,pe=arguments.length,le=pe<3?B:G===null?G=Object.getOwnPropertyDescriptor(B,$):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(C,B,$,G);else for(var ge=C.length-1;ge>=0;ge--)(te=C[ge])&&(le=(pe<3?te(le):pe>3?te(B,$,le):te(B,$))||le);return pe>3&&le&&Object.defineProperty(B,$,le),le};(function(){function C(B,$){var G=this;Object(d.G)(function(){G.current=$,G.subscription=B.subscribe(G)})}C.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},C.prototype.next=function(B){this.current=B},C.prototype.complete=function(){this.dispose()},C.prototype.error=function(B){this.current=B,this.dispose()},k([d.C.ref],C.prototype,"current",void 0),k([d.k.bound],C.prototype,"next",null),k([d.k.bound],C.prototype,"complete",null),k([d.k.bound],C.prototype,"error",null)})();var I=function(){return I=Object.assign||function(C){for(var B,$=1,G=arguments.length;$<G;$++)for(var te in B=arguments[$])Object.prototype.hasOwnProperty.call(B,te)&&(C[te]=B[te]);return C},I.apply(this,arguments)},L=function(C,B,$,G){var te,pe=arguments.length,le=pe<3?B:G===null?G=Object.getOwnPropertyDescriptor(B,$):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(C,B,$,G);else for(var ge=C.length-1;ge>=0;ge--)(te=C[ge])&&(le=(pe<3?te(le):pe>3?te(B,$,le):te(B,$))||le);return pe>3&&le&&Object.defineProperty(B,$,le),le},Y=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function C(B){var $=this;this.model=B,this.localValues=d.C.map({}),this.localComputedValues=d.C.map({}),this.isPropertyDirty=function(G){return $.localValues.has(G)},v(Object(d.A)(B),"createViewModel expects an observable object"),E(B).forEach(function(G){if(G!==d.a&&G!=="__mobxDidRunLazyInitializers"){if(v(Y.indexOf(G)===-1,"The propertyname "+G+" is reserved and cannot be used with viewModels"),Object(d.w)(B,G)){var te=Object(d.h)(B,G).derivation;$.localComputedValues.set(G,Object(d.m)(te.bind($)))}var pe=Object.getOwnPropertyDescriptor(B,G),le=pe?{enumerable:pe.enumerable}:{};Object.defineProperty($,G,I(I({},le),{configurable:!0,get:function(){return Object(d.w)(B,G)?$.localComputedValues.get(G).get():$.isPropertyDirty(G)?$.localValues.get(G):$.model[G]},set:Object(d.k)(function(ge){ge!==$.model[G]?$.localValues.set(G,ge):$.localValues.delete(G)})}))}})}Object.defineProperty(C.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),C.prototype.submit=function(){var B=this;Object(d.B)(this.localValues).forEach(function($){var G=B.localValues.get($),te=B.model[$];Object(d.y)(te)?te.replace(G):Object(d.z)(te)?(te.clear(),te.merge(G)):Object(d.v)(G)||(B.model[$]=G)}),this.localValues.clear()},C.prototype.reset=function(){this.localValues.clear()},C.prototype.resetProperty=function(B){this.localValues.delete(B)},L([d.m],C.prototype,"isDirty",null),L([d.m],C.prototype,"changedValues",null),L([d.k.bound],C.prototype,"submit",null),L([d.k.bound],C.prototype,"reset",null),L([d.k.bound],C.prototype,"resetProperty",null)})();function Q(C){if(!C)return"ROOT";for(var B=[];C.parent;)B.push(C.path),C=C.parent;return B.reverse().join("/")}function X(C){return Object(d.A)(C)||Object(d.y)(C)||Object(d.z)(C)}function V(C,B){var $=new WeakMap;function G(le){var ge=$.get(le.object);(function(Ee,ve){switch(Ee.type){case"add":te(Ee.newValue,ve,Ee.name);break;case"update":pe(Ee.oldValue),te(Ee.newValue,ve,Ee.name||""+Ee.index);break;case"remove":case"delete":pe(Ee.oldValue);break;case"splice":Ee.removed.map(pe),Ee.added.forEach(function(me,je){return te(me,ve,""+(Ee.index+je))});for(var se=Ee.index+Ee.addedCount;se<Ee.object.length;se++)if(X(Ee.object[se])){var ye=$.get(Ee.object[se]);ye&&(ye.path=""+se)}}})(le,ge),B(le,Q(ge),C)}function te(le,ge,Ee){if(X(le)){var ve=$.get(le);if(ve){if(ve.parent!==ge||ve.path!==Ee)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+Q(ge)+"/"+Ee+"', but it already exists at '"+Q(ve.parent)+"/"+ve.path+"'")}else{var se={parent:ge,path:Ee,dispose:Object(d.D)(le,G)};$.set(le,se),Object(d.p)(le).forEach(function(ye){var me=ye[0];return te(ye[1],se,me)})}}}function pe(le){if(X(le)){var ge=$.get(le);if(!ge)return;$.delete(le),ge.dispose(),Object(d.L)(le).forEach(pe)}}return te(C,void 0,""),function(){pe(C)}}var Z,F=(Z=function(C,B){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,G){$.__proto__=G}||function($,G){for(var te in G)G.hasOwnProperty(te)&&($[te]=G[te])},Z(C,B)},function(C,B){function $(){this.constructor=C}Z(C,B),C.prototype=B===null?Object.create(B):($.prototype=B.prototype,new $)});(function(C){function B($,G,te){var pe=te===void 0?{}:te,le=pe.name,ge=le===void 0?"ogm"+(1e3*Math.random()|0):le,Ee=pe.keyToName,ve=Ee===void 0?function(me){return""+me}:Ee,se=C.call(this)||this;se._keyToName=ve,se._groupBy=G,se._ogmInfoKey=Symbol("ogmInfo"+ge),se._base=$;for(var ye=0;ye<$.length;ye++)se._addItem($[ye]);return se._disposeBaseObserver=Object(d.D)(se._base,function(me){if(me.type==="splice")Object(d.J)(function(){for(var je=0,Be=me.removed;je<Be.length;je++){var Ze=Be[je];se._removeItem(Ze)}for(var Ae=0,Ce=me.added;Ae<Ce.length;Ae++){var Je=Ce[Ae];se._addItem(Je)}});else{if(me.type!=="update")throw new Error("illegal state");Object(d.J)(function(){se._removeItem(me.oldValue),se._addItem(me.newValue)})}}),se}F(B,C),B.prototype.clear=function(){throw new Error("not supported")},B.prototype.delete=function($){throw new Error("not supported")},B.prototype.set=function($,G){throw new Error("not supported")},B.prototype.dispose=function(){this._disposeBaseObserver();for(var $=0;$<this._base.length;$++){var G=this._base[$];G[this._ogmInfoKey].reaction(),delete G[this._ogmInfoKey]}},B.prototype._getGroupArr=function($){var G=C.prototype.get.call(this,$);return G===void 0&&(G=Object(d.C)([],{name:"GroupArray["+this._keyToName($)+"]",deep:!1}),C.prototype.set.call(this,$,G)),G},B.prototype._removeFromGroupArr=function($,G){var te=C.prototype.get.call(this,$);te.length===1?C.prototype.delete.call(this,$):(G===te.length-1||(te[G]=te[te.length-1],te[G][this._ogmInfoKey].groupArrIndex=G),te.length--)},B.prototype._addItem=function($){var G=this,te=this._groupBy($),pe=this._getGroupArr(te),le={groupByValue:te,groupArrIndex:pe.length,reaction:Object(d.F)(function(){return G._groupBy($)},function(ge,Ee){var ve=$[G._ogmInfoKey];G._removeFromGroupArr(ve.groupByValue,ve.groupArrIndex);var se=G._getGroupArr(ge),ye=se.length;se.push($),ve.groupByValue=ge,ve.groupArrIndex=ye})};Object.defineProperty($,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:le}),pe.push($)},B.prototype._removeItem=function($){var G=$[this._ogmInfoKey];this._removeFromGroupArr(G.groupByValue,G.groupArrIndex),G.reaction(),delete $[this._ogmInfoKey]}})(d.b),function(){function C(B,$){this.base=B,this.args=$,this.closestIdx=0,this.isDisposed=!1;for(var G=this.closest=this.root=B,te=0;te<this.args.length-1&&(G=G.get($[te]));te++)this.closest=G;this.closestIdx=te}return C.prototype.exists=function(){this.assertNotDisposed();var B=this.args.length;return this.closestIdx>=B-1&&this.closest.has(this.args[B-1])},C.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])},C.prototype.set=function(B){this.assertNotDisposed();for(var $=this.args.length,G=this.closest,te=this.closestIdx;te<$-1;te++){var pe=new Map;G.set(this.args[te],pe),G=pe}this.closestIdx=$-1,this.closest=G,G.set(this.args[$-1],B)},C.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var B=this.args.length;this.closest.delete(this.args[B-1]);for(var $=this.root,G=[$],te=0;te<B-1;te++)$=$.get(this.args[te]),G.push($);for(te=G.length-1;te>0;te--)G[te].size===0&&G[te-1].delete(this.args[te-1]);this.isDisposed=!0},C.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},C}(),Promise.resolve(),typeof queueMicrotask<"u"||p!==void 0&&p.nextTick}).call(this,o(155))},function(a,l,o){var p;(function(d,g,v){if(d){for(var O,E={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},w={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},j={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},P={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},M=1;M<20;++M)E[111+M]="f"+M;for(M=0;M<=9;++M)E[M+96]=M.toString();X.prototype.bind=function(V,Z,F){var C=this;return V=V instanceof Array?V:[V],C._bindMultiple.call(C,V,Z,F),C},X.prototype.unbind=function(V,Z){return this.bind.call(this,V,function(){},Z)},X.prototype.trigger=function(V,Z){var F=this;return F._directMap[V+":"+Z]&&F._directMap[V+":"+Z]({},V),F},X.prototype.reset=function(){var V=this;return V._callbacks={},V._directMap={},V},X.prototype.stopCallback=function(V,Z){if((" "+Z.className+" ").indexOf(" mousetrap ")>-1||Q(Z,this.target))return!1;if("composedPath"in V&&typeof V.composedPath=="function"){var F=V.composedPath()[0];F!==V.target&&(Z=F)}return Z.tagName=="INPUT"||Z.tagName=="SELECT"||Z.tagName=="TEXTAREA"||Z.isContentEditable},X.prototype.handleKey=function(){var V=this;return V._handleKey.apply(V,arguments)},X.addKeycodes=function(V){for(var Z in V)V.hasOwnProperty(Z)&&(E[Z]=V[Z]);O=null},X.init=function(){var V=X(g);for(var Z in V)Z.charAt(0)!=="_"&&(X[Z]=function(F){return function(){return V[F].apply(V,arguments)}}(Z))},X.init(),d.Mousetrap=X,a.exports&&(a.exports=X),(p=(function(){return X}).call(l,o,l,a))===void 0||(a.exports=p)}function T(V,Z,F){V.addEventListener?V.addEventListener(Z,F,!1):V.attachEvent("on"+Z,F)}function k(V){if(V.type=="keypress"){var Z=String.fromCharCode(V.which);return V.shiftKey||(Z=Z.toLowerCase()),Z}return E[V.which]?E[V.which]:w[V.which]?w[V.which]:String.fromCharCode(V.which).toLowerCase()}function I(V){return V=="shift"||V=="ctrl"||V=="alt"||V=="meta"}function L(V,Z,F){return F||(F=function(){if(!O)for(var C in O={},E)C>95&&C<112||E.hasOwnProperty(C)&&(O[E[C]]=C);return O}()[V]?"keydown":"keypress"),F=="keypress"&&Z.length&&(F="keydown"),F}function Y(V,Z){var F,C,B,$=[];for(F=function(G){return G==="+"?["+"]:(G=G.replace(/\+{2}/g,"+plus")).split("+")}(V),B=0;B<F.length;++B)C=F[B],P[C]&&(C=P[C]),Z&&Z!="keypress"&&j[C]&&(C=j[C],$.push("shift")),I(C)&&$.push(C);return{key:C,modifiers:$,action:Z=L(C,$,Z)}}function Q(V,Z){return V!==null&&V!==g&&(V===Z||Q(V.parentNode,Z))}function X(V){var Z=this;if(V=V||g,!(Z instanceof X))return new X(V);Z.target=V,Z._callbacks={},Z._directMap={};var F,C={},B=!1,$=!1,G=!1;function te(se){se=se||{};var ye,me=!1;for(ye in C)se[ye]?me=!0:C[ye]=0;me||(G=!1)}function pe(se,ye,me,je,Be,Ze){var Ae,Ce,Je,ee,J=[],ue=me.type;if(!Z._callbacks[se])return[];for(ue=="keyup"&&I(se)&&(ye=[se]),Ae=0;Ae<Z._callbacks[se].length;++Ae)if(Ce=Z._callbacks[se][Ae],(je||!Ce.seq||C[Ce.seq]==Ce.level)&&ue==Ce.action&&(ue=="keypress"&&!me.metaKey&&!me.ctrlKey||(Je=ye,ee=Ce.modifiers,Je.sort().join(",")===ee.sort().join(",")))){var we=!je&&Ce.combo==Be,Te=je&&Ce.seq==je&&Ce.level==Ze;(we||Te)&&Z._callbacks[se].splice(Ae,1),J.push(Ce)}return J}function le(se,ye,me,je){Z.stopCallback(ye,ye.target||ye.srcElement,me,je)||se(ye,me)===!1&&(function(Be){Be.preventDefault?Be.preventDefault():Be.returnValue=!1}(ye),function(Be){Be.stopPropagation?Be.stopPropagation():Be.cancelBubble=!0}(ye))}function ge(se){typeof se.which!="number"&&(se.which=se.keyCode);var ye=k(se);ye&&(se.type!="keyup"||B!==ye?Z.handleKey(ye,function(me){var je=[];return me.shiftKey&&je.push("shift"),me.altKey&&je.push("alt"),me.ctrlKey&&je.push("ctrl"),me.metaKey&&je.push("meta"),je}(se),se):B=!1)}function Ee(se,ye,me,je){function Be(Je){return function(){G=Je,++C[se],clearTimeout(F),F=setTimeout(te,1e3)}}function Ze(Je){le(me,Je,se),je!=="keyup"&&(B=k(Je)),setTimeout(te,10)}C[se]=0;for(var Ae=0;Ae<ye.length;++Ae){var Ce=Ae+1===ye.length?Ze:Be(je||Y(ye[Ae+1]).action);ve(ye[Ae],Ce,je,se,Ae)}}function ve(se,ye,me,je,Be){Z._directMap[se+":"+me]=ye;var Ze,Ae=(se=se.replace(/\s+/g," ")).split(" ");Ae.length>1?Ee(se,Ae,ye,me):(Ze=Y(se,me),Z._callbacks[Ze.key]=Z._callbacks[Ze.key]||[],pe(Ze.key,Ze.modifiers,{type:Ze.action},je,se,Be),Z._callbacks[Ze.key][je?"unshift":"push"]({callback:ye,modifiers:Ze.modifiers,action:Ze.action,seq:je,level:Be,combo:se}))}Z._handleKey=function(se,ye,me){var je,Be=pe(se,ye,me),Ze={},Ae=0,Ce=!1;for(je=0;je<Be.length;++je)Be[je].seq&&(Ae=Math.max(Ae,Be[je].level));for(je=0;je<Be.length;++je)if(Be[je].seq){if(Be[je].level!=Ae)continue;Ce=!0,Ze[Be[je].seq]=1,le(Be[je].callback,me,Be[je].combo,Be[je].seq)}else Ce||le(Be[je].callback,me,Be[je].combo);var Je=me.type=="keypress"&&$;me.type!=G||I(se)||Je||te(Ze),$=Ce&&me.type=="keydown"},Z._bindMultiple=function(se,ye,me){for(var je=0;je<se.length;++je)ve(se[je],ye,me)},T(V,"keypress",ge),T(V,"keydown",ge),T(V,"keyup",ge)}})(typeof window<"u"?window:null,typeof window<"u"?document:null)},function(a,l,o){var p=o(7),d=o(34),g=o(28),v=o(32),O=p.TypeError;a.exports=function(E,w){var j,P;if(w==="string"&&g(j=E.toString)&&!v(P=d(j,E))||g(j=E.valueOf)&&!v(P=d(j,E))||w!=="string"&&g(j=E.toString)&&!v(P=d(j,E)))return P;throw O("Can't convert object to primitive value")}},function(a,l,o){var p=o(7),d=o(28),g=o(90),v=p.WeakMap;a.exports=d(v)&&/native code/.test(g(v))},function(a,l,o){var p=o(36),d=o(37),g=o(33),v=o(40),O=o(72);a.exports=p?Object.defineProperties:function(E,w){g(E);for(var j,P=v(w),M=O(w),T=M.length,k=0;T>k;)d.f(E,j=M[k++],P[j]);return E}},function(a,l,o){var p=o(7);a.exports=p},function(a,l,o){var p=o(7),d=o(95),g=o(98),v=o(32),O=o(27)("species"),E=p.Array;a.exports=function(w){var j;return d(w)&&(j=w.constructor,(g(j)&&(j===E||d(j.prototype))||v(j)&&(j=j[O])===null)&&(j=void 0)),j===void 0?E:j}},function(a,l,o){var p=o(112),d=o(96);a.exports=p?{}.toString:function(){return"[object "+d(this)+"]"}},function(a,l,o){var p=o(139).IteratorPrototype,d=o(57),g=o(64),v=o(73),O=o(75),E=function(){return this};a.exports=function(w,j,P,M){var T=j+" Iterator";return w.prototype=d(p,{next:g(+!M,P)}),v(w,T,!1,!0),O[T]=E,w}},function(a,l,o){var p=o(7),d=o(28),g=p.String,v=p.TypeError;a.exports=function(O){if(typeof O=="object"||d(O))return O;throw v("Can't set "+g(O)+" as a prototype")}},function(a,l,o){var p=o(17),d=o(7),g=o(15),v=o(94),O=o(43),E=o(141),w=o(116),j=o(118),P=o(28),M=o(32),T=o(19),k=o(119),I=o(73),L=o(145);a.exports=function(Y,Q,X){var V=Y.indexOf("Map")!==-1,Z=Y.indexOf("Weak")!==-1,F=V?"set":"add",C=d[Y],B=C&&C.prototype,$=C,G={},te=function(se){var ye=g(B[se]);O(B,se,se=="add"?function(me){return ye(this,me===0?0:me),this}:se=="delete"?function(me){return!(Z&&!M(me))&&ye(this,me===0?0:me)}:se=="get"?function(me){return Z&&!M(me)?void 0:ye(this,me===0?0:me)}:se=="has"?function(me){return!(Z&&!M(me))&&ye(this,me===0?0:me)}:function(me,je){return ye(this,me===0?0:me,je),this})};if(v(Y,!P(C)||!(Z||B.forEach&&!T(function(){new C().entries().next()}))))$=X.getConstructor(Q,Y,V,F),E.enable();else if(v(Y,!0)){var pe=new $,le=pe[F](Z?{}:-0,1)!=pe,ge=T(function(){pe.has(1)}),Ee=k(function(se){new C(se)}),ve=!Z&&T(function(){for(var se=new C,ye=5;ye--;)se[F](ye,ye);return!se.has(-0)});Ee||(($=Q(function(se,ye){j(se,B);var me=L(new C,se,$);return ye!=null&&w(ye,me[F],{that:me,AS_ENTRIES:V}),me})).prototype=B,B.constructor=$),(ge||ve)&&(te("delete"),te("has"),V&&te("get")),(ve||le)&&te(F),Z&&B.clear&&delete B.clear}return G[Y]=$,p({global:!0,forced:$!=C},G),I($,Y),Z||X.setStrong($,Y,V),$}},function(a,l,o){var p=o(19),d=o(32),g=o(51),v=o(179),O=Object.isExtensible,E=p(function(){});a.exports=E||v?function(w){return!!d(w)&&(!v||g(w)!="ArrayBuffer")&&(!O||O(w))}:O},function(a,l,o){var p=o(19);a.exports=p(function(){if(typeof ArrayBuffer=="function"){var d=new ArrayBuffer(8);Object.isExtensible(d)&&Object.defineProperty(d,"a",{value:8})}})},function(a,l,o){var p=o(19);a.exports=!p(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(a,l,o){var p=o(37).f,d=o(57),g=o(146),v=o(61),O=o(118),E=o(116),w=o(115),j=o(147),P=o(36),M=o(141).fastKey,T=o(56),k=T.set,I=T.getterFor;a.exports={getConstructor:function(L,Y,Q,X){var V=L(function($,G){O($,Z),k($,{type:Y,index:d(null),first:void 0,last:void 0,size:0}),P||($.size=0),G!=null&&E(G,$[X],{that:$,AS_ENTRIES:Q})}),Z=V.prototype,F=I(Y),C=function($,G,te){var pe,le,ge=F($),Ee=B($,G);return Ee?Ee.value=te:(ge.last=Ee={index:le=M(G,!0),key:G,value:te,previous:pe=ge.last,next:void 0,removed:!1},ge.first||(ge.first=Ee),pe&&(pe.next=Ee),P?ge.size++:$.size++,le!=="F"&&(ge.index[le]=Ee)),$},B=function($,G){var te,pe=F($),le=M(G);if(le!=="F")return pe.index[le];for(te=pe.first;te;te=te.next)if(te.key==G)return te};return g(Z,{clear:function(){for(var $=F(this),G=$.index,te=$.first;te;)te.removed=!0,te.previous&&(te.previous=te.previous.next=void 0),delete G[te.index],te=te.next;$.first=$.last=void 0,P?$.size=0:this.size=0},delete:function($){var G=this,te=F(G),pe=B(G,$);if(pe){var le=pe.next,ge=pe.previous;delete te.index[pe.index],pe.removed=!0,ge&&(ge.next=le),le&&(le.previous=ge),te.first==pe&&(te.first=le),te.last==pe&&(te.last=ge),P?te.size--:G.size--}return!!pe},forEach:function($){for(var G,te=F(this),pe=v($,arguments.length>1?arguments[1]:void 0);G=G?G.next:te.first;)for(pe(G.value,G.key,this);G&&G.removed;)G=G.previous},has:function($){return!!B(this,$)}}),g(Z,Q?{get:function($){var G=B(this,$);return G&&G.value},set:function($,G){return C(this,$===0?0:$,G)}}:{add:function($){return C(this,$=$===0?0:$,$)}}),P&&p(Z,"size",{get:function(){return F(this).size}}),V},setStrong:function(L,Y,Q){var X=Y+" Iterator",V=I(Y),Z=I(X);w(L,Y,function(F,C){k(this,{type:X,target:F,state:V(F),kind:C,last:void 0})},function(){for(var F=Z(this),C=F.kind,B=F.last;B&&B.removed;)B=B.previous;return F.target&&(F.last=B=B?B.next:F.state.first)?C=="keys"?{value:B.key,done:!1}:C=="values"?{value:B.value,done:!1}:{value:[B.key,B.value],done:!1}:(F.target=void 0,{value:void 0,done:!0})},Q?"entries":"values",!Q,!0),j(Y)}}},function(a,l,o){var p=o(74).forEach,d=o(120)("forEach");a.exports=d?[].forEach:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}},function(a,l,o){var p=o(7),d=o(61),g=o(34),v=o(39),O=o(184),E=o(142),w=o(98),j=o(44),P=o(60),M=o(143),T=o(117),k=p.Array;a.exports=function(I){var L=v(I),Y=w(this),Q=arguments.length,X=Q>1?arguments[1]:void 0,V=X!==void 0;V&&(X=d(X,Q>2?arguments[2]:void 0));var Z,F,C,B,$,G,te=T(L),pe=0;if(!te||this==k&&E(te))for(Z=j(L),F=Y?new this(Z):k(Z);Z>pe;pe++)G=V?X(L[pe],pe):L[pe],P(F,pe,G);else for($=(B=M(L,te)).next,F=Y?new this:[];!(C=g($,B)).done;pe++)G=V?O(B,X,[C.value,pe],!0):C.value,P(F,pe,G);return F.length=pe,F}},function(a,l,o){var p=o(33),d=o(144);a.exports=function(g,v,O,E){try{return E?v(p(O)[0],O[1]):v(O)}catch(w){d(g,"throw",w)}}},function(a,l,o){var p=o(33);a.exports=function(){var d=p(this),g="";return d.global&&(g+="g"),d.ignoreCase&&(g+="i"),d.multiline&&(g+="m"),d.dotAll&&(g+="s"),d.unicode&&(g+="u"),d.sticky&&(g+="y"),g}},function(a,l,o){var p=o(19),d=o(7).RegExp;a.exports=p(function(){var g=d(".","s");return!(g.dotAll&&g.exec(`
|
||
`)&&g.flags==="s")})},function(a,l,o){var p=o(19),d=o(7).RegExp;a.exports=p(function(){var g=d("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"})},function(a,l,o){var p=o(17),d=o(15),g=o(54),v=o(39),O=o(44),E=o(41),w=o(19),j=o(189),P=o(120),M=o(190),T=o(191),k=o(65),I=o(192),L=[],Y=d(L.sort),Q=d(L.push),X=w(function(){L.sort(void 0)}),V=w(function(){L.sort(null)}),Z=P("sort"),F=!w(function(){if(k)return k<70;if(!(M&&M>3)){if(T)return!0;if(I)return I<603;var C,B,$,G,te="";for(C=65;C<76;C++){switch(B=String.fromCharCode(C),C){case 66:case 69:case 70:case 72:$=3;break;case 68:case 71:$=4;break;default:$=2}for(G=0;G<47;G++)L.push({k:B+G,v:$})}for(L.sort(function(pe,le){return le.v-pe.v}),G=0;G<L.length;G++)B=L[G].k.charAt(0),te.charAt(te.length-1)!==B&&(te+=B);return te!=="DGBEFHACIJK"}});p({target:"Array",proto:!0,forced:X||!V||!Z||!F},{sort:function(C){C!==void 0&&g(C);var B=v(this);if(F)return C===void 0?Y(B):Y(B,C);var $,G,te=[],pe=O(B);for(G=0;G<pe;G++)G in B&&Q(te,B[G]);for(j(te,function(le){return function(ge,Ee){return Ee===void 0?-1:ge===void 0?1:le!==void 0?+le(ge,Ee)||0:E(ge)>E(Ee)?1:-1}}(C)),$=te.length,G=0;G<$;)B[G]=te[G++];for(;G<pe;)delete B[G++];return B}})},function(a,l,o){var p=o(113),d=Math.floor,g=function(E,w){var j=E.length,P=d(j/2);return j<8?v(E,w):O(E,g(p(E,0,P),w),g(p(E,P),w),w)},v=function(E,w){for(var j,P,M=E.length,T=1;T<M;){for(P=T,j=E[T];P&&w(E[P-1],j)>0;)E[P]=E[--P];P!==T++&&(E[P]=j)}return E},O=function(E,w,j,P){for(var M=w.length,T=j.length,k=0,I=0;k<M||I<T;)E[k+I]=k<M&&I<T?P(w[k],j[I])<=0?w[k++]:j[I++]:k<M?w[k++]:j[I++];return E};a.exports=g},function(a,l,o){var p=o(53).match(/firefox\/(\d+)/i);a.exports=!!p&&+p[1]},function(a,l,o){var p=o(53);a.exports=/MSIE|Trident/.test(p)},function(a,l,o){var p=o(53).match(/AppleWebKit\/(\d+)\./);a.exports=!!p&&+p[1]},function(a,l,o){var p=o(17),d=o(74).find,g=o(99),v="find",O=!0;v in[]&&Array(1).find(function(){O=!1}),p({target:"Array",proto:!0,forced:O},{find:function(E){return d(this,E,arguments.length>1?arguments[1]:void 0)}}),g(v)},function(a,l,o){var p=o(7),d=o(154),g=p.TypeError;a.exports=function(v){if(d(v))throw g("The method doesn't accept regular expressions");return v}},function(a,l,o){var p=o(27)("match");a.exports=function(d){var g=/./;try{"/./"[d](g)}catch{try{return g[p]=!1,"/./"[d](g)}catch{}}return!1}},function(a,l,o){var p=o(92).PROPER,d=o(19),g=o(160);a.exports=function(v){return d(function(){return!!g[v]()||"
"[v]()!=="
"||p&&g[v].name!==v})}},function(a,l,o){var p=o(15);a.exports=p(1 .valueOf)},function(a,l,o){var p=o(15),d=o(39),g=Math.floor,v=p("".charAt),O=p("".replace),E=p("".slice),w=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;a.exports=function(P,M,T,k,I,L){var Y=T+P.length,Q=k.length,X=j;return I!==void 0&&(I=d(I),X=w),O(L,X,function(V,Z){var F;switch(v(Z,0)){case"$":return"$";case"&":return P;case"`":return E(M,0,T);case"'":return E(M,Y);case"<":F=I[E(Z,1,-1)];break;default:var C=+Z;if(C===0)return V;if(C>Q){var B=g(C/10);return B===0?V:B<=Q?k[B-1]===void 0?v(Z,1):k[B-1]+v(Z,1):V}F=k[C-1]}return F===void 0?"":F})}},function(a,l,o){var p=o(36),d=o(15),g=o(34),v=o(19),O=o(72),E=o(111),w=o(82),j=o(39),P=o(83),M=Object.assign,T=Object.defineProperty,k=d([].concat);a.exports=!M||v(function(){if(p&&M({b:1},M(T({},"a",{enumerable:!0,get:function(){T(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},L={},Y=Symbol(),Q="abcdefghijklmnopqrst";return I[Y]=7,Q.split("").forEach(function(X){L[X]=X}),M({},I)[Y]!=7||O(M({},L)).join("")!=Q})?function(I,L){for(var Y=j(I),Q=arguments.length,X=1,V=E.f,Z=w.f;Q>X;)for(var F,C=P(arguments[X++]),B=V?k(O(C),V(C)):O(C),$=B.length,G=0;$>G;)F=B[G++],p&&!g(Z,C,F)||(Y[F]=C[F]);return Y}:M},function(a,l,o){var p=o(7),d=o(15),g=o(54),v=o(32),O=o(35),E=o(97),w=p.Function,j=d([].concat),P=d([].join),M={},T=function(k,I,L){if(!O(M,I)){for(var Y=[],Q=0;Q<I;Q++)Y[Q]="a["+Q+"]";M[I]=w("C,a","return new C("+P(Y,",")+")")}return M[I](k,L)};a.exports=w.bind||function(k){var I=g(this),L=I.prototype,Y=E(arguments,1),Q=function(){var X=j(Y,E(arguments));return this instanceof Q?T(I,X.length,X):I.apply(k,X)};return v(L)&&(Q.prototype=L),Q}},function(a,l,o){var p=o(35);a.exports=function(d){return d!==void 0&&(p(d,"value")||p(d,"writable"))}},function(a,l,o){var p=o(15),d=o(45),g=o(41),v=/"/g,O=p("".replace);a.exports=function(E,w,j,P){var M=g(d(E)),T="<"+w;return j!==""&&(T+=" "+j+'="'+O(g(P),v,""")+'"'),T+">"+M+"</"+w+">"}},function(a,l,o){var p=o(19);a.exports=function(d){return p(function(){var g=""[d]('"');return g!==g.toLowerCase()||g.split('"').length>3})}},function(a,l,o){var p,d,g,v,O=o(17),E=o(66),w=o(7),j=o(46),P=o(34),M=o(205),T=o(43),k=o(146),I=o(101),L=o(73),Y=o(147),Q=o(54),X=o(28),V=o(32),Z=o(118),F=o(90),C=o(116),B=o(119),$=o(156),G=o(163).set,te=o(206),pe=o(209),le=o(210),ge=o(165),Ee=o(211),ve=o(56),se=o(94),ye=o(27),me=o(212),je=o(126),Be=o(65),Ze=ye("species"),Ae="Promise",Ce=ve.getterFor(Ae),Je=ve.set,ee=ve.getterFor(Ae),J=M&&M.prototype,ue=M,we=J,Te=w.TypeError,xe=w.document,Qe=w.process,it=ge.f,tt=it,Ve=!!(xe&&xe.createEvent&&w.dispatchEvent),be=X(w.PromiseRejectionEvent),Ge="unhandledrejection",re=!1,ze=se(Ae,function(){var K=F(ue),ce=K!==String(ue);if(!ce&&Be===66||E&&!we.finally)return!0;if(Be>=51&&/native code/.test(K))return!1;var De=new ue(function(Xe){Xe(1)}),Ne=function(Xe){Xe(function(){},function(){})};return(De.constructor={})[Ze]=Ne,!(re=De.then(function(){})instanceof Ne)||!ce&&me&&!be}),lt=ze||!B(function(K){ue.all(K).catch(function(){})}),St=function(K){var ce;return!(!V(K)||!X(ce=K.then))&&ce},st=function(K,ce){if(!K.notified){K.notified=!0;var De=K.reactions;te(function(){for(var Ne=K.value,Xe=K.state==1,gt=0;De.length>gt;){var nn,fn,Vt,Zt=De[gt++],Fe=Xe?Zt.ok:Zt.fail,Ke=Zt.resolve,rt=Zt.reject,at=Zt.domain;try{Fe?(Xe||(K.rejection===2&&ct(K),K.rejection=1),Fe===!0?nn=Ne:(at&&at.enter(),nn=Fe(Ne),at&&(at.exit(),Vt=!0)),nn===Zt.promise?rt(Te("Promise-chain cycle")):(fn=St(nn))?P(fn,nn,Ke,rt):Ke(nn)):rt(Ne)}catch(kt){at&&!Vt&&at.exit(),rt(kt)}}K.reactions=[],K.notified=!1,ce&&!K.rejection&&Lt(K)})}},Ot=function(K,ce,De){var Ne,Xe;Ve?((Ne=xe.createEvent("Event")).promise=ce,Ne.reason=De,Ne.initEvent(K,!1,!0),w.dispatchEvent(Ne)):Ne={promise:ce,reason:De},!be&&(Xe=w["on"+K])?Xe(Ne):K===Ge&&le("Unhandled promise rejection",De)},Lt=function(K){P(G,w,function(){var ce,De=K.facade,Ne=K.value;if(Ft(K)&&(ce=Ee(function(){je?Qe.emit("unhandledRejection",Ne,De):Ot(Ge,De,Ne)}),K.rejection=je||Ft(K)?2:1,ce.error))throw ce.value})},Ft=function(K){return K.rejection!==1&&!K.parent},ct=function(K){P(G,w,function(){var ce=K.facade;je?Qe.emit("rejectionHandled",ce):Ot("rejectionhandled",ce,K.value)})},Yt=function(K,ce,De){return function(Ne){K(ce,Ne,De)}},H=function(K,ce,De){K.done||(K.done=!0,De&&(K=De),K.value=ce,K.state=2,st(K,!0))},ie=function(K,ce,De){if(!K.done){K.done=!0,De&&(K=De);try{if(K.facade===ce)throw Te("Promise can't be resolved itself");var Ne=St(ce);Ne?te(function(){var Xe={done:!1};try{P(Ne,ce,Yt(ie,Xe,K),Yt(H,Xe,K))}catch(gt){H(Xe,gt,K)}}):(K.value=ce,K.state=1,st(K,!1))}catch(Xe){H({done:!1},Xe,K)}}};if(ze&&(we=(ue=function(K){Z(this,we),Q(K),P(p,this);var ce=Ce(this);try{K(Yt(ie,ce),Yt(H,ce))}catch(De){H(ce,De)}}).prototype,(p=function(K){Je(this,{type:Ae,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=k(we,{then:function(K,ce){var De=ee(this),Ne=De.reactions,Xe=it($(this,ue));return Xe.ok=!X(K)||K,Xe.fail=X(ce)&&ce,Xe.domain=je?Qe.domain:void 0,De.parent=!0,Ne[Ne.length]=Xe,De.state!=0&&st(De,!1),Xe.promise},catch:function(K){return this.then(void 0,K)}}),d=function(){var K=new p,ce=Ce(K);this.promise=K,this.resolve=Yt(ie,ce),this.reject=Yt(H,ce)},ge.f=it=function(K){return K===ue||K===g?new d(K):tt(K)},!E&&X(M)&&J!==Object.prototype)){v=J.then,re||(T(J,"then",function(K,ce){var De=this;return new ue(function(Ne,Xe){P(v,De,Ne,Xe)}).then(K,ce)},{unsafe:!0}),T(J,"catch",we.catch,{unsafe:!0}));try{delete J.constructor}catch{}I&&I(J,we)}O({global:!0,wrap:!0,forced:ze},{Promise:ue}),L(ue,Ae,!1,!0),Y(Ae),g=j(Ae),O({target:Ae,stat:!0,forced:ze},{reject:function(K){var ce=it(this);return P(ce.reject,void 0,K),ce.promise}}),O({target:Ae,stat:!0,forced:E||ze},{resolve:function(K){return pe(E&&this===g?ue:this,K)}}),O({target:Ae,stat:!0,forced:lt},{all:function(K){var ce=this,De=it(ce),Ne=De.resolve,Xe=De.reject,gt=Ee(function(){var nn=Q(ce.resolve),fn=[],Vt=0,Zt=1;C(K,function(Fe){var Ke=Vt++,rt=!1;Zt++,P(nn,ce,Fe).then(function(at){rt||(rt=!0,fn[Ke]=at,--Zt||Ne(fn))},Xe)}),--Zt||Ne(fn)});return gt.error&&Xe(gt.value),De.promise},race:function(K){var ce=this,De=it(ce),Ne=De.reject,Xe=Ee(function(){var gt=Q(ce.resolve);C(K,function(nn){P(gt,ce,nn).then(De.resolve,Ne)})});return Xe.error&&Ne(Xe.value),De.promise}})},function(a,l,o){var p=o(7);a.exports=p.Promise},function(a,l,o){var p,d,g,v,O,E,w,j,P=o(7),M=o(61),T=o(50).f,k=o(163).set,I=o(164),L=o(207),Y=o(208),Q=o(126),X=P.MutationObserver||P.WebKitMutationObserver,V=P.document,Z=P.process,F=P.Promise,C=T(P,"queueMicrotask"),B=C&&C.value;B||(p=function(){var $,G;for(Q&&($=Z.domain)&&$.exit();d;){G=d.fn,d=d.next;try{G()}catch(te){throw d?v():g=void 0,te}}g=void 0,$&&$.enter()},I||Q||Y||!X||!V?!L&&F&&F.resolve?((w=F.resolve(void 0)).constructor=F,j=M(w.then,w),v=function(){j(p)}):Q?v=function(){Z.nextTick(p)}:(k=M(k,P),v=function(){k(p)}):(O=!0,E=V.createTextNode(""),new X(p).observe(E,{characterData:!0}),v=function(){E.data=O=!O})),a.exports=B||function($){var G={fn:$,next:void 0};g&&(g.next=G),d||(d=G,v()),g=G}},function(a,l,o){var p=o(53),d=o(7);a.exports=/ipad|iphone|ipod/i.test(p)&&d.Pebble!==void 0},function(a,l,o){var p=o(53);a.exports=/web0s(?!.*chrome)/i.test(p)},function(a,l,o){var p=o(33),d=o(32),g=o(165);a.exports=function(v,O){if(p(v),d(O)&&O.constructor===v)return O;var E=g.f(v);return(0,E.resolve)(O),E.promise}},function(a,l,o){var p=o(7);a.exports=function(d,g){var v=p.console;v&&v.error&&(arguments.length==1?v.error(d):v.error(d,g))}},function(a,l){a.exports=function(o){try{return{error:!1,value:o()}}catch(p){return{error:!0,value:p}}}},function(a,l){a.exports=typeof window=="object"},function(a,l,o){var p=o(36),d=o(15),g=o(72),v=o(40),O=d(o(82).f),E=d([].push),w=function(j){return function(P){for(var M,T=v(P),k=g(T),I=k.length,L=0,Y=[];I>L;)M=k[L++],p&&!O(T,M)||E(Y,j?[M,T[M]]:T[M]);return Y}};a.exports={entries:w(!0),values:w(!1)}},function(a,l,o){var p=o(39),d=o(69),g=o(44);a.exports=function(v){for(var O=p(this),E=g(O),w=arguments.length,j=d(w>1?arguments[1]:void 0,E),P=w>2?arguments[2]:void 0,M=P===void 0?E:d(P,E);M>j;)O[j++]=v;return O}},function(a,l,o){o.r(l),o.d(l,"observer",function(){return _r}),o.d(l,"LogicFlow",function(){return ad}),o.d(l,"h",function(){return re.g}),o.d(l,"LogicFlowUtil",function(){return p}),o.d(l,"BaseNode",function(){return no}),o.d(l,"RectNode",function(){return Jf}),o.d(l,"CircleNode",function(){return np}),o.d(l,"PolygonNode",function(){return up}),o.d(l,"DiamondNode",function(){return fp}),o.d(l,"EllipseNode",function(){return gp}),o.d(l,"TextNode",function(){return mp}),o.d(l,"HtmlNode",function(){return xp}),o.d(l,"BaseEdge",function(){return Ca}),o.d(l,"LineEdge",function(){return Lp}),o.d(l,"PolylineEdge",function(){return Wp}),o.d(l,"BezierEdge",function(){return Xp}),o.d(l,"Arrow",function(){return Pj}),o.d(l,"BaseEdgeModel",function(){return vl}),o.d(l,"BezierEdgeModel",function(){return uf}),o.d(l,"LineEdgeModel",function(){return wl}),o.d(l,"PolylineEdgeModel",function(){return jl}),o.d(l,"BaseNodeModel",function(){return to}),o.d(l,"CircleNodeModel",function(){return df}),o.d(l,"DiamondNodeModel",function(){return bf}),o.d(l,"EllipseNodeModel",function(){return wf}),o.d(l,"PolygonNodeModel",function(){return Af}),o.d(l,"RectNodeModel",function(){return Df}),o.d(l,"TextNodeModel",function(){return If}),o.d(l,"HtmlNodeModel",function(){return zf}),o.d(l,"EditConfigModel",function(){return Vh}),o.d(l,"GraphModel",function(){return zg}),o.d(l,"SnaplineModel",function(){return mb}),o.d(l,"Keyboard",function(){return im}),o.d(l,"get",function(){return cv}),o.d(l,"defaults",function(){return fv}),o.d(l,"ElementState",function(){return Tt}),o.d(l,"ModelType",function(){return _t}),o.d(l,"ElementType",function(){return rn}),o.d(l,"EventType",function(){return ot}),o.d(l,"formateAnchorConnectValidateData",function(){return _a});var p={};o.r(p),o.d(p,"createUuid",function(){return Eo}),o.d(p,"refreshGraphId",function(){return kw}),o.d(p,"createDrag",function(){return ax}),o.d(p,"StepDrag",function(){return Zr});var d=o(1),g=o(10);if(!g.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!d.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var v=o(42),O=Object(v.b)("observerBatching");function E(e){e()}var w=!1;function j(){return w}function P(e){return Object(d.t)(e)}var M,T=1e4,k=new Set;function I(){M===void 0&&(M=setTimeout(L,1e4))}function L(){M=void 0;var e=Date.now();k.forEach(function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,k.delete(t))}),k.size>0&&I()}var Y=!1,Q=[],X={};function V(e){return"observer"+e}function Z(e,t,n){t===void 0&&(t="observed"),n===void 0&&(n=X),j();var i,c=function(_){return function(){Y?Q.push(_):_()}}((n.useForceUpdate||v.d)()),s=g.d.useRef(null);if(!s.current){var f=new d.c(V(t),function(){h.mounted?c():(f.dispose(),s.current=null)}),h=function(_){return{cleanAt:Date.now()+T,reaction:_}}(f);s.current=h,i=s,k.add(i),I()}var y=s.current.reaction;return g.d.useDebugValue(y,P),g.d.useEffect(function(){var _;return _=s,k.delete(_),s.current?s.current.mounted=!0:(s.current={reaction:new d.c(V(t),function(){c()}),cleanAt:1/0},c()),function(){s.current.reaction.dispose(),s.current=null}},[]),function(_){Y=!0,Q=[];try{var x=_();Y=!1;var A=Q.length>0?Q:void 0;return g.d.useLayoutEffect(function(){A&&A.forEach(function(D){return D()})},[A]),x}finally{Y=!1}}(function(){var _,x;if(y.track(function(){try{_=e()}catch(A){x=A}}),x)throw x;return _})}var F=function(){return F=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var c in t=arguments[n])Object.prototype.hasOwnProperty.call(t,c)&&(e[c]=t[c]);return e},F.apply(this,arguments)};function C(e,t){var n,i,c,s=F({forwardRef:!1},t),f=e.displayName||e.name,h=function(y,_){return Z(function(){return e(y,_)},f)};return h.displayName=f,n=s.forwardRef?Object(g.f)(Object(g.e)(h)):Object(g.f)(h),i=e,c=n,Object.keys(i).forEach(function(y){B[y]||Object.defineProperty(c,y,Object.getOwnPropertyDescriptor(i,y))}),n.displayName=f,n}var B={$$typeof:!0,render:!0,compare:!0,type:!0};function $(e){var t=e.children,n=e.render,i=t||n;return typeof i!="function"?null:Z(i)}function G(e,t,n,i,c){var s=t==="children"?"render":"children",f=typeof e[t]=="function",h=typeof e[s]=="function";return f&&h?new Error("MobX Observer: Do not use children and render in the same time in`"+n):f||h?null:new Error("Invalid prop `"+c+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}$.propTypes={children:G,render:G},$.displayName="Observer";var te;(te=g.g)||(te=E),Object(d.n)({reactionScheduler:te}),Object(v.a)()[O]=!0;var pe=0,le={};function ge(e){return le[e]||(le[e]=function(t){if(typeof Symbol=="function")return Symbol(t);var n="__$mobx-react "+t+" ("+pe+")";return pe++,n}(e)),le[e]}function Ee(e,t){if(ve(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var c=0;c<n.length;c++)if(!Object.hasOwnProperty.call(t,n[c])||!ve(e[n[c]],t[n[c]]))return!1;return!0}function ve(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function se(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var ye=ge("patchMixins"),me=ge("patchedDefinition");function je(e,t){for(var n=this,i=arguments.length,c=new Array(i>2?i-2:0),s=2;s<i;s++)c[s-2]=arguments[s];t.locks++;try{var f;return e!=null&&(f=e.apply(this,c)),f}finally{t.locks--,t.locks===0&&t.methods.forEach(function(h){h.apply(n,c)})}}function Be(e,t){return function(){for(var n=arguments.length,i=new Array(n),c=0;c<n;c++)i[c]=arguments[c];je.call.apply(je,[this,e,t].concat(i))}}function Ze(e,t,n){var i=function(h,y){var _=h[ye]=h[ye]||{},x=_[y]=_[y]||{};return x.locks=x.locks||0,x.methods=x.methods||[],x}(e,t);i.methods.indexOf(n)<0&&i.methods.push(n);var c=Object.getOwnPropertyDescriptor(e,t);if(!c||!c[me]){var s=e[t],f=Ae(e,t,c?c.enumerable:void 0,i,s);Object.defineProperty(e,t,f)}}function Ae(e,t,n,i,c){var s,f=Be(c,i);return(s={})[me]=!0,s.get=function(){return f},s.set=function(h){if(this===e)f=Be(h,i);else{var y=Ae(this,t,n,i,h);Object.defineProperty(this,t,y)}},s.configurable=!0,s.enumerable=n,s}var Ce=d.a||"$mobx",Je=ge("isMobXReactObserver"),ee=ge("isUnmounted"),J=ge("skipRender"),ue=ge("isForcingUpdate");function we(e){var t=e.prototype;if(e[Je]?Te(t):e[Je]=!0,t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==g.b)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==Qe)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=Qe;it(t,"props"),it(t,"state");var n=t.render;return t.render=function(){return xe.call(this,n)},Ze(t,"componentWillUnmount",function(){var i;(i=this.render[Ce])===null||i===void 0||i.dispose(),this[ee]=!0,!this.render[Ce]&&Te(this)}),e}function Te(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function xe(e){var t=this;se(this,J,!1),se(this,ue,!1);var n=Te(this),i=e.bind(this),c=!1,s=new d.c(n+".render()",function(){if(!c&&(c=!0,t[ee]!==!0)){var h=!0;try{se(t,ue,!0),t[J]||g.a.prototype.forceUpdate.call(t),h=!1}finally{se(t,ue,!1),h&&s.dispose()}}});function f(){c=!1;var h=void 0,y=void 0;if(s.track(function(){try{y=Object(d.d)(!1,i)}catch(_){h=_}}),h)throw h;return y}return s.reactComponent=this,f[Ce]=s,this.render=f,f.call(this)}function Qe(e,t){return this.state!==t||!Ee(this.props,e)}function it(e,t){var n=ge("reactProp_"+t+"_valueHolder"),i=ge("reactProp_"+t+"_atomHolder");function c(){return this[i]||se(this,i,Object(d.o)("reactive "+t)),this[i]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var s=!1;return d.f&&d.e&&(s=Object(d.f)(!0)),c.call(this).reportObserved(),d.f&&d.e&&Object(d.e)(s),this[n]},set:function(s){this[ue]||Ee(this[n],s)?se(this,n,s):(se(this,n,s),se(this,J,!0),c.call(this).reportChanged(),se(this,J,!1))}})}var tt=typeof Symbol=="function"&&Symbol.for,Ve=tt?Symbol.for("react.forward_ref"):typeof g.e=="function"&&Object(g.e)(function(e){return null}).$$typeof,be=tt?Symbol.for("react.memo"):typeof g.f=="function"&&Object(g.f)(function(e){return null}).$$typeof;function Ge(e){if(e.isMobxInjector,be&&e.$$typeof===be)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(Ve&&e.$$typeof===Ve){var t=e.render;if(typeof t!="function")throw new Error("render property of ForwardRef was not a function");return Object(g.e)(function(){var n=arguments;return Object(g.c)($,null,function(){return t.apply(void 0,n)})})}return typeof e!="function"||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(g.a,e)?we(e):C(e)}if(!g.a)throw new Error("mobx-react requires React to be available");if(!d.C)throw new Error("mobx-react requires mobx to be available");var re=o(0);o(4),o(8),o(2),o(3),o(62),o(6),o(5),o(11),o(38),o(29),o(22),o(20),o(23),o(21),o(25),o(9),o(16),o(24),o(18),o(188),o(193),o(103),o(152),o(153);var ze=function(e,t){for(var n=-1,i=e==null?0:e.length,c=Array(i);++n<i;)c[n]=t(e[n],n,e);return c},lt=function(){this.__data__=[],this.size=0},St=function(e,t){return e===t||e!=e&&t!=t},st=function(e,t){for(var n=e.length;n--;)if(St(e[n][0],t))return n;return-1},Ot=Array.prototype.splice,Lt=function(e){var t=this.__data__,n=st(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ot.call(t,n,1),--this.size,!0)},Ft=function(e){var t=this.__data__,n=st(t,e);return n<0?void 0:t[n][1]},ct=function(e){return st(this.__data__,e)>-1},Yt=function(e,t){var n=this.__data__,i=st(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};function H(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}H.prototype.clear=lt,H.prototype.delete=Lt,H.prototype.get=Ft,H.prototype.has=ct,H.prototype.set=Yt;var ie=H,K=function(){this.__data__=new ie,this.size=0},ce=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},De=function(e){return this.__data__.get(e)},Ne=function(e){return this.__data__.has(e)},Xe=o(31),gt=Xe.a.Symbol,nn=Object.prototype,fn=nn.hasOwnProperty,Vt=nn.toString,Zt=gt?gt.toStringTag:void 0,Fe=function(e){var t=fn.call(e,Zt),n=e[Zt];try{e[Zt]=void 0;var i=!0}catch{}var c=Vt.call(e);return i&&(t?e[Zt]=n:delete e[Zt]),c},Ke=Object.prototype.toString,rt=function(e){return Ke.call(e)},at=gt?gt.toStringTag:void 0,kt=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":at&&at in Object(e)?Fe(e):rt(e)},Ht=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},Ur,Er=function(e){if(!Ht(e))return!1;var t=kt(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Sr=Xe.a["__core-js_shared__"],Wo=(Ur=/[^.]+$/.exec(Sr&&Sr.keys&&Sr.keys.IE_PROTO||""))?"Symbol(src)_1."+Ur:"",Ic=function(e){return!!Wo&&Wo in e},ia=Function.prototype.toString,Zn=function(e){if(e!=null){try{return ia.call(e)}catch{}try{return e+""}catch{}}return""},cu=/^\[object .+?Constructor\]$/,Ue=Function.prototype,Lc=Object.prototype,lu=Ue.toString,fu=Lc.hasOwnProperty,Fn=RegExp("^"+lu.call(fu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$n=function(e){return!(!Ht(e)||Ic(e))&&(Er(e)?Fn:cu).test(Zn(e))},pu=function(e,t){return e==null?void 0:e[t]},jr=function(e,t){var n=pu(e,t);return $n(n)?n:void 0},vo=jr(Xe.a,"Map"),hr=jr(Object,"create"),aa=function(){this.__data__=hr?hr(null):{},this.size=0},du=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Bc=Object.prototype.hasOwnProperty,fi=function(e){var t=this.__data__;if(hr){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return Bc.call(t,e)?t[e]:void 0},zc=Object.prototype.hasOwnProperty,hu=function(e){var t=this.__data__;return hr?t[e]!==void 0:zc.call(t,e)},Fc=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hr&&t===void 0?"__lodash_hash_undefined__":t,this};function Xr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Xr.prototype.clear=aa,Xr.prototype.delete=du,Xr.prototype.get=fi,Xr.prototype.has=hu,Xr.prototype.set=Fc;var yu=Xr,Pr=function(){this.size=0,this.__data__={hash:new yu,map:new(vo||ie),string:new yu}},$c=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},pi=function(e,t){var n=e.__data__;return $c(t)?n[typeof t=="string"?"string":"hash"]:n.map},ua=function(e){var t=pi(this,e).delete(e);return this.size-=t?1:0,t},sa=function(e){return pi(this,e).get(e)},Wc=function(e){return pi(this,e).has(e)},gu=function(e,t){var n=pi(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function bo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}bo.prototype.clear=Pr,bo.prototype.delete=ua,bo.prototype.get=sa,bo.prototype.has=Wc,bo.prototype.set=gu;var mo=bo,vu=function(e,t){var n=this.__data__;if(n instanceof ie){var i=n.__data__;if(!vo||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new mo(i)}return n.set(e,t),this.size=n.size,this};function _o(e){var t=this.__data__=new ie(e);this.size=t.size}_o.prototype.clear=K,_o.prototype.delete=ce,_o.prototype.get=De,_o.prototype.has=Ne,_o.prototype.set=vu;var Ar=_o,bu=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},mu=function(e){return this.__data__.has(e)};function Go(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mo;++t<n;)this.add(e[t])}Go.prototype.add=Go.prototype.push=bu,Go.prototype.has=mu;var _u=Go,Gc=function(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1},Ou=function(e,t){return e.has(t)},wu=function(e,t,n,i,c,s){var f=1&n,h=e.length,y=t.length;if(h!=y&&!(f&&y>h))return!1;var _=s.get(e),x=s.get(t);if(_&&x)return _==t&&x==e;var A=-1,D=!0,z=2&n?new _u:void 0;for(s.set(e,t),s.set(t,e);++A<h;){var U=e[A],q=t[A];if(i)var ae=f?i(q,U,A,t,e,s):i(U,q,A,e,t,s);if(ae!==void 0){if(ae)continue;D=!1;break}if(z){if(!Gc(t,function(oe,fe){if(!Ou(z,fe)&&(U===oe||c(U,oe,n,i,s)))return z.push(fe)})){D=!1;break}}else if(U!==q&&!c(U,q,n,i,s)){D=!1;break}}return s.delete(e),s.delete(t),D},Ho=Xe.a.Uint8Array,xu=function(e){var t=-1,n=Array(e.size);return e.forEach(function(i,c){n[++t]=[c,i]}),n},Hc=function(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n},Eu=gt?gt.prototype:void 0,ca=Eu?Eu.valueOf:void 0,Uo=function(e,t,n,i,c,s,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new Ho(e),new Ho(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return St(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=xu;case"[object Set]":var y=1&i;if(h||(h=Hc),e.size!=t.size&&!y)return!1;var _=f.get(e);if(_)return _==t;i|=2,f.set(e,t);var x=wu(h(e),h(t),i,c,s,f);return f.delete(e),x;case"[object Symbol]":if(ca)return ca.call(e)==ca.call(t)}return!1},Tr=function(e,t){for(var n=-1,i=t.length,c=e.length;++n<i;)e[c+n]=t[n];return e},hn=Array.isArray,Su=function(e,t,n){var i=t(e);return hn(e)?i:Tr(i,n(e))},ju=function(e,t){for(var n=-1,i=e==null?0:e.length,c=0,s=[];++n<i;){var f=e[n];t(f,n,e)&&(s[c++]=f)}return s},Pu=function(){return[]},Uc=Object.prototype.propertyIsEnumerable,Yr=Object.getOwnPropertySymbols,Jn=Yr?function(e){return e==null?[]:(e=Object(e),ju(Yr(e),function(t){return Uc.call(e,t)}))}:Pu,Xc=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i},Qn=function(e){return e!=null&&typeof e=="object"},Wn=function(e){return Qn(e)&&kt(e)=="[object Arguments]"},Au=Object.prototype,Tu=Au.hasOwnProperty,Yc=Au.propertyIsEnumerable,di=Wn(function(){return arguments}())?Wn:function(e){return Qn(e)&&Tu.call(e,"callee")&&!Yc.call(e,"callee")},Mr=di,Xo=o(48),Vc=/^(?:0|[1-9]\d*)$/,_n=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&(n=="number"||n!="symbol"&&Vc.test(e))&&e>-1&&e%1==0&&e<t},Vr=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},xt={};xt["[object Float32Array]"]=xt["[object Float64Array]"]=xt["[object Int8Array]"]=xt["[object Int16Array]"]=xt["[object Int32Array]"]=xt["[object Uint8Array]"]=xt["[object Uint8ClampedArray]"]=xt["[object Uint16Array]"]=xt["[object Uint32Array]"]=!0,xt["[object Arguments]"]=xt["[object Array]"]=xt["[object ArrayBuffer]"]=xt["[object Boolean]"]=xt["[object DataView]"]=xt["[object Date]"]=xt["[object Error]"]=xt["[object Function]"]=xt["[object Map]"]=xt["[object Number]"]=xt["[object Object]"]=xt["[object RegExp]"]=xt["[object Set]"]=xt["[object String]"]=xt["[object WeakMap]"]=!1;var Gn=function(e){return Qn(e)&&Vr(e.length)&&!!xt[kt(e)]},Kr=function(e){return function(t){return e(t)}},pn=o(49),Mu=pn.a&&pn.a.isTypedArray,la=Mu?Kr(Mu):Gn,ku=Object.prototype.hasOwnProperty,er=function(e,t){var n=hn(e),i=!n&&Mr(e),c=!n&&!i&&Object(Xo.a)(e),s=!n&&!i&&!c&&la(e),f=n||i||c||s,h=f?Xc(e.length,String):[],y=h.length;for(var _ in e)!t&&!ku.call(e,_)||f&&(_=="length"||c&&(_=="offset"||_=="parent")||s&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||_n(_,y))||h.push(_);return h},Du=Object.prototype,hi=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||Du)},tr=function(e,t){return function(n){return e(t(n))}},Nu=tr(Object.keys,Object),Kc=Object.prototype.hasOwnProperty,fa=function(e){if(!hi(e))return Nu(e);var t=[];for(var n in Object(e))Kc.call(e,n)&&n!="constructor"&&t.push(n);return t},Jt=function(e){return e!=null&&Vr(e.length)&&!Er(e)},Oo=function(e){return Jt(e)?er(e):fa(e)},yi=function(e){return Su(e,Oo,Jn)},Nn=Object.prototype.hasOwnProperty,Ru=function(e,t,n,i,c,s){var f=1&n,h=yi(e),y=h.length;if(y!=yi(t).length&&!f)return!1;for(var _=y;_--;){var x=h[_];if(!(f?x in t:Nn.call(t,x)))return!1}var A=s.get(e),D=s.get(t);if(A&&D)return A==t&&D==e;var z=!0;s.set(e,t),s.set(t,e);for(var U=f;++_<y;){var q=e[x=h[_]],ae=t[x];if(i)var oe=f?i(ae,q,x,t,e,s):i(q,ae,x,e,t,s);if(!(oe===void 0?q===ae||c(q,ae,n,i,s):oe)){z=!1;break}U||(U=x=="constructor")}if(z&&!U){var fe=e.constructor,_e=t.constructor;fe==_e||!("constructor"in e)||!("constructor"in t)||typeof fe=="function"&&fe instanceof fe&&typeof _e=="function"&&_e instanceof _e||(z=!1)}return s.delete(e),s.delete(t),z},Yo=jr(Xe.a,"DataView"),gi=jr(Xe.a,"Promise"),vi=jr(Xe.a,"Set"),bi=jr(Xe.a,"WeakMap"),Cu="[object Map]",Rn="[object Promise]",Hn="[object Set]",wo="[object WeakMap]",pa="[object DataView]",da=Zn(Yo),ha=Zn(vo),Iu=Zn(gi),qc=Zn(vi),mi=Zn(bi),qr=kt;(Yo&&qr(new Yo(new ArrayBuffer(1)))!=pa||vo&&qr(new vo)!=Cu||gi&&qr(gi.resolve())!=Rn||vi&&qr(new vi)!=Hn||bi&&qr(new bi)!=wo)&&(qr=function(e){var t=kt(e),n=t=="[object Object]"?e.constructor:void 0,i=n?Zn(n):"";if(i)switch(i){case da:return pa;case ha:return Cu;case Iu:return Rn;case qc:return Hn;case mi:return wo}return t});var b=qr,m="[object Arguments]",S="[object Array]",N="[object Object]",W=Object.prototype.hasOwnProperty,ne=function(e,t,n,i,c,s){var f=hn(e),h=hn(t),y=f?S:b(e),_=h?S:b(t),x=(y=y==m?N:y)==N,A=(_=_==m?N:_)==N,D=y==_;if(D&&Object(Xo.a)(e)){if(!Object(Xo.a)(t))return!1;f=!0,x=!1}if(D&&!x)return s||(s=new Ar),f||la(e)?wu(e,t,n,i,c,s):Uo(e,t,y,n,i,c,s);if(!(1&n)){var z=x&&W.call(e,"__wrapped__"),U=A&&W.call(t,"__wrapped__");if(z||U){var q=z?e.value():e,ae=U?t.value():t;return s||(s=new Ar),c(q,ae,n,i,s)}}return!!D&&(s||(s=new Ar),Ru(e,t,n,i,c,s))},he=function e(t,n,i,c,s){return t===n||(t==null||n==null||!Qn(t)&&!Qn(n)?t!=t&&n!=n:ne(t,n,i,c,e,s))},Pe=function(e,t,n,i){var c=n.length,s=c,f=!i;if(e==null)return!s;for(e=Object(e);c--;){var h=n[c];if(f&&h[2]?h[1]!==e[h[0]]:!(h[0]in e))return!1}for(;++c<s;){var y=(h=n[c])[0],_=e[y],x=h[1];if(f&&h[2]){if(_===void 0&&!(y in e))return!1}else{var A=new Ar;if(i)var D=i(_,x,y,e,t,A);if(!(D===void 0?he(x,_,3,i,A):D))return!1}}return!0},We=function(e){return e==e&&!Ht(e)},mt=function(e){for(var t=Oo(e),n=t.length;n--;){var i=t[n],c=e[i];t[n]=[i,c,We(c)]}return t},ut=function(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}},Dt=function(e){var t=mt(e);return t.length==1&&t[0][2]?ut(t[0][0],t[0][1]):function(n){return n===e||Pe(n,e,t)}},dt=function(e){return typeof e=="symbol"||Qn(e)&&kt(e)=="[object Symbol]"},At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Un=/^\w*$/,Wt=function(e,t){if(hn(e))return!1;var n=typeof e;return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!dt(e))||Un.test(e)||!At.test(e)||t!=null&&e in Object(t)};function On(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var n=function(){var i=arguments,c=t?t.apply(this,i):i[0],s=n.cache;if(s.has(c))return s.get(c);var f=e.apply(this,i);return n.cache=s.set(c,f)||s,f};return n.cache=new(On.Cache||mo),n}On.Cache=mo;var Vo=On,Zc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lu=/\\(\\)?/g,Bu=function(e){var t=Vo(e,function(i){return n.size===500&&n.clear(),i}),n=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Zc,function(n,i,c,s){t.push(c?s.replace(Lu,"$1"):i||n)}),t}),_i=gt?gt.prototype:void 0,ya=_i?_i.toString:void 0,wn=function e(t){if(typeof t=="string")return t;if(hn(t))return ze(t,e)+"";if(dt(t))return ya?ya.call(t):"";var n=t+"";return n=="0"&&1/t==-1/0?"-0":n},zu=function(e){return e==null?"":wn(e)},Ko=function(e,t){return hn(e)?e:Wt(e,t)?[e]:Bu(zu(e))},ga=function(e){if(typeof e=="string"||dt(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},Jc=function(e,t){for(var n=0,i=(t=Ko(t,e)).length;e!=null&&n<i;)e=e[ga(t[n++])];return n&&n==i?e:void 0},Oh=function(e,t,n){var i=e==null?void 0:Jc(e,t);return i===void 0?n:i},vO=function(e,t){return e!=null&&t in Object(e)},bO=function(e,t,n){for(var i=-1,c=(t=Ko(t,e)).length,s=!1;++i<c;){var f=ga(t[i]);if(!(s=e!=null&&n(e,f)))break;e=e[f]}return s||++i!=c?s:!!(c=e==null?0:e.length)&&Vr(c)&&_n(f,c)&&(hn(e)||Mr(e))},wh=function(e,t){return e!=null&&bO(e,t,vO)},mO=function(e,t){return Wt(e)&&We(t)?ut(ga(e),t):function(n){var i=Oh(n,e);return i===void 0&&i===t?wh(n,e):he(t,i,3)}},Qc=function(e){return e},_O=function(e){return function(t){return t==null?void 0:t[e]}},OO=function(e){return function(t){return Jc(t,e)}},wO=function(e){return Wt(e)?_O(ga(e)):OO(e)},xO=function(e){return typeof e=="function"?e:e==null?Qc:typeof e=="object"?hn(e)?mO(e[0],e[1]):Dt(e):wO(e)},xh=function(e){return function(t,n,i){for(var c=-1,s=Object(t),f=i(t),h=f.length;h--;){var y=f[e?h:++c];if(n(s[y],y,s)===!1)break}return t}}(),EO=function(e,t){return function(n,i){if(n==null)return n;if(!Jt(n))return e(n,i);for(var c=n.length,s=t?c:-1,f=Object(n);(t?s--:++s<c)&&i(f[s],s,f)!==!1;);return n}}(function(e,t){return e&&xh(e,t,Oo)}),SO=function(e,t){var n=-1,i=Jt(e)?Array(e.length):[];return EO(e,function(c,s,f){i[++n]=t(c,s,f)}),i},Fu=function(e,t){return(hn(e)?ze:SO)(e,xO(t))};Object(d.n)({isolateGlobalState:!0});var $u=function(){try{var e=jr(Object,"defineProperty");return e({},"",{}),e}catch{}}(),el=function(e,t,n){t=="__proto__"&&$u?$u(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},jO=Object.prototype.hasOwnProperty,Wu=function(e,t,n){var i=e[t];jO.call(e,t)&&St(i,n)&&(n!==void 0||t in e)||el(e,t,n)},Oi=function(e,t,n,i){var c=!n;n||(n={});for(var s=-1,f=t.length;++s<f;){var h=t[s],y=i?i(n[h],e[h],h,n,e):void 0;y===void 0&&(y=e[h]),c?el(n,h,y):Wu(n,h,y)}return n},PO=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Eh=Math.max,Sh=function(e,t,n){return t=Eh(t===void 0?e.length-1:t,0),function(){for(var i=arguments,c=-1,s=Eh(i.length-t,0),f=Array(s);++c<s;)f[c]=i[t+c];c=-1;for(var h=Array(t+1);++c<t;)h[c]=i[c];return h[t]=n(f),PO(e,this,h)}},AO=function(e){return function(){return e}},TO=$u?function(e,t){return $u(e,"toString",{configurable:!0,enumerable:!1,value:AO(t),writable:!0})}:Qc,MO=Date.now,kO=function(e){var t=0,n=0;return function(){var i=MO(),c=16-(i-n);if(n=i,c>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},jh=kO(TO),DO=function(e,t){return jh(Sh(e,t,Qc),e+"")},NO=function(e,t,n){if(!Ht(n))return!1;var i=typeof t;return!!(i=="number"?Jt(n)&&_n(t,n.length):i=="string"&&t in n)&&St(n[t],e)},Ph=function(e){return DO(function(t,n){var i=-1,c=n.length,s=c>1?n[c-1]:void 0,f=c>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(c--,s):void 0,f&&NO(n[0],n[1],f)&&(s=c<3?void 0:s,c=1),t=Object(t);++i<c;){var h=n[i];h&&e(t,h,i,s)}return t})},RO=Object.prototype.hasOwnProperty,xn=Ph(function(e,t){if(hi(t)||Jt(t))Oi(t,Oo(t),e);else for(var n in t)RO.call(t,n)&&Wu(e,n,t[n])}),CO=function(e,t,n,i){if(!Ht(e))return e;for(var c=-1,s=(t=Ko(t,e)).length,f=s-1,h=e;h!=null&&++c<s;){var y=ga(t[c]),_=n;if(y==="__proto__"||y==="constructor"||y==="prototype")return e;if(c!=f){var x=h[y];(_=i?i(x,y,h):void 0)===void 0&&(_=Ht(x)?x:_n(t[c+1])?[]:{})}Wu(h,y,_),h=h[y]}return e},IO=function(e,t,n){for(var i=-1,c=t.length,s={};++i<c;){var f=t[i],h=Jc(e,f);n(h,f)&&CO(s,Ko(f,e),h)}return s},LO=function(e,t){return IO(e,t,function(n,i){return wh(e,i)})},Ah=gt?gt.isConcatSpreadable:void 0,BO=function(e){return hn(e)||Mr(e)||!!(Ah&&e&&e[Ah])},zO=function e(t,n,i,c,s){var f=-1,h=t.length;for(i||(i=BO),s||(s=[]);++f<h;){var y=t[f];n>0&&i(y)?n>1?e(y,n-1,i,c,s):Tr(s,y):c||(s[s.length]=y)}return s},FO=function(e){return e!=null&&e.length?zO(e,1):[]},Qt,Th,Mh,kh,Dh,Nh,Rh,Ch,Ih,Lh,Bh,zh,Fh,$h,Wh,Gh,Hh,Uh,va=function(e){return jh(Sh(e,void 0,FO),e+"")}(function(e,t){return e==null?{}:LO(e,t)});function yn(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function $O(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Xh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dn(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var Tt,Yh,_t,rn,ot,Gt,WO={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},tl=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],Vh=(Th=dn((Qt=function(){function e(i){(function(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")})(this,e),yn(this,"isSilentMode",Th,this),yn(this,"stopZoomGraph",Mh,this),yn(this,"stopScrollGraph",kh,this),yn(this,"stopMoveGraph",Dh,this),yn(this,"adjustEdge",Nh,this),yn(this,"adjustEdgeMiddle",Rh,this),yn(this,"adjustEdgeStartAndEnd",Ch,this),yn(this,"adjustNodePosition",Ih,this),yn(this,"hideAnchors",Lh,this),yn(this,"hoverOutline",Bh,this),yn(this,"nodeSelectedOutline",zh,this),yn(this,"edgeSelectedOutline",Fh,this),yn(this,"nodeTextEdit",$h,this),yn(this,"edgeTextEdit",Wh,this),yn(this,"nodeTextDraggable",Gh,this),yn(this,"edgeTextDraggable",Hh,this),yn(this,"autoExpand",Uh,this),Xh(this,"multipleSelectKey",""),Xh(this,"defaultConfig",{}),xn(this,this.getConfigDetail(i))}var t,n;return t=e,(n=[{key:"updateEditConfig",value:function(i){var c=this.getConfigDetail(i);xn(this,c)}},{key:"getConfigDetail",value:function(i){var c=i.isSilentMode,s=i.textEdit,f={};if(c===!1&&xn(f,this.defaultConfig),c===!0&&c!==this.isSilentMode){var h=va(WO,tl);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},xn(f,h)}s===!1&&xn(f,{nodeTextEdit:!1,edgeTextEdit:!1});var y=va(i,tl);return xn(f,y)}},{key:"getConfig",value:function(){return va(this,tl)}}])&&$O(t.prototype,n),e}()).prototype,"isSilentMode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mh=dn(Qt.prototype,"stopZoomGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),kh=dn(Qt.prototype,"stopScrollGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dh=dn(Qt.prototype,"stopMoveGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nh=dn(Qt.prototype,"adjustEdge",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Rh=dn(Qt.prototype,"adjustEdgeMiddle",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ch=dn(Qt.prototype,"adjustEdgeStartAndEnd",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ih=dn(Qt.prototype,"adjustNodePosition",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Lh=dn(Qt.prototype,"hideAnchors",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Bh=dn(Qt.prototype,"hoverOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zh=dn(Qt.prototype,"nodeSelectedOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Fh=dn(Qt.prototype,"edgeSelectedOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),$h=dn(Qt.prototype,"nodeTextEdit",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Wh=dn(Qt.prototype,"edgeTextEdit",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Gh=dn(Qt.prototype,"nodeTextDraggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hh=dn(Qt.prototype,"edgeTextDraggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Uh=dn(Qt.prototype,"autoExpand",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),dn(Qt.prototype,"updateEditConfig",[d.k],Object.getOwnPropertyDescriptor(Qt.prototype,"updateEditConfig"),Qt.prototype),Qt);o(63),function(e){e[e.DEFAULT=1]="DEFAULT",e[e.TEXT_EDIT=2]="TEXT_EDIT",e[e.SHOW_MENU=3]="SHOW_MENU",e[e.ALLOW_CONNECT=4]="ALLOW_CONNECT",e[e.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(Tt||(Tt={})),function(e){e.KEY="logic-flow",e.NODE_NAME="lf-node",e.EDGE_NAME="lf-edge"}(Yh||(Yh={})),function(e){e.NODE="node",e.CIRCLE_NODE="circle-node",e.POLYGON_NODE="polygon-node",e.RECT_NODE="rect-node",e.TEXT_NODE="text-node",e.ELLIPSE_NODE="ellipse-node",e.DIAMOND_NODE="diamond-node",e.HTML_NODE="html-node",e.EDGE="edge",e.LINE_EDGE="line-edge",e.POLYLINE_EDGE="polyline-edge",e.BEZIER_EDGE="bezier-edge",e.GRAPH="graph"}(_t||(_t={})),function(e){e.NODE="node",e.EDGE="edge",e.GRAPH="graph"}(rn||(rn={})),function(e){e.ELEMENT_CLICK="element:click",e.NODE_CLICK="node:click",e.NODE_DBCLICK="node:dbclick",e.NODE_DELETE="node:delete",e.NODE_ADD="node:add",e.NODE_DND_ADD="node:dnd-add",e.NODE_DND_DRAG="node:dnd-drag",e.NODE_MOUSEDOWN="node:mousedown",e.NODE_DRAGSTART="node:dragstart",e.NODE_DRAG="node:drag",e.NODE_DROP="node:drop",e.NODE_MOUSEUP="node:mouseup",e.NODE_MOUSEMOVE="node:mousemove",e.NODE_MOUSEENTER="node:mouseenter",e.NODE_MOUSELEAVE="node:mouseleave",e.NODE_CONTEXTMENU="node:contextmenu",e.EDGE_DELETE="edge:delete",e.EDGE_ADD="edge:add",e.EDGE_CLICK="edge:click",e.EDGE_DBCLICK="edge:dbclick",e.EDGE_MOUSEENTER="edge:mouseenter",e.EDGE_MOUSELEAVE="edge:mouseleave",e.EDGE_CONTEXTMENU="edge:contextmenu",e.EDGE_ADJUST="edge:adjust",e.EDGE_EXCHANGE_NODE="edge:exchange-node",e.ANCHOR_DRAGSTART="anchor:dragstart",e.ANCHOR_DRAG="anchor:drag",e.ANCHOR_DROP="anchor:drop",e.ANCHOR_DRAGEND="anchor:dragend",e.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",e.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",e.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",e.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",e.ADJUST_POINT_DRAG="adjustPoint:drag",e.ADJUST_POINT_DROP="adjustPoint:drop",e.ADJUST_POINT_DRAGEND="adjustPoint:dragend",e.BLANK_MOUSEDOWN="blank:mousedown",e.BLANK_DRAGSTART="blank:dragstart",e.BLANK_DRAG="blank:drag",e.BLANK_DROP="blank:drop",e.BLANK_MOUSEMOVE="blank:mousemove",e.BLANK_MOUSEUP="blank:mouseup",e.BLANK_CLICK="blank:click",e.BLANK_CONTEXTMENU="blank:contextmenu",e.SELECTION_MOUSEDOWN="selection:mousedown",e.SELECTION_DRAGSTART="selection:dragstart",e.SELECTION_DRAG="selection:drag",e.SELECTION_DROP="selection:drop",e.SELECTION_MOUSEMOVE="selection:mousemove",e.SELECTION_MOUSEUP="selection:mouseup",e.SELECTION_CONTEXTMENU="selection:contextmenu",e.CONNECTION_NOT_ALLOWED="connection:not-allowed",e.HISTORY_CHANGE="history:change",e.TEXT_UPDATE="text:update",e.GRAPH_TRANSFORM="graph:transform",e.GRAPH_RENDERED="graph:rendered"}(ot||(ot={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(Gt||(Gt={}));var Xn,en,Kh,qh,Zh,Jh,Qh,ey,ty;function Gu(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return ny(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return ny(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ny(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function qo(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function GO(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yr(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.INCREASE=1]="INCREASE"})(Xn||(Xn={}));var HO=(en=function(){function e(i){(function(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")})(this,e),nl(this,"MINI_SCALE_SIZE",.2),nl(this,"MAX_SCALE_SIZE",16),qo(this,"SCALE_X",Kh,this),qo(this,"SKEW_Y",qh,this),qo(this,"SKEW_X",Zh,this),qo(this,"SCALE_Y",Jh,this),qo(this,"TRANSLATE_X",Qh,this),qo(this,"TRANSLATE_Y",ey,this),qo(this,"ZOOM_SIZE",ty,this),nl(this,"eventCenter",void 0),this.eventCenter=i}var t,n;return t=e,n=[{key:"setZoomMiniSize",value:function(i){this.MINI_SCALE_SIZE=i}},{key:"setZoomMaxSize",value:function(i){this.MAX_SCALE_SIZE=i}},{key:"HtmlPointToCanvasPoint",value:function(i){var c=Gu(i,2),s=c[0],f=c[1];return[(s-this.TRANSLATE_X)/this.SCALE_X,(f-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(i){var c=Gu(i,2),s=c[0],f=c[1];return[s*this.SCALE_X+this.TRANSLATE_X,f*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(i,c,s){var f=Gu(i,2),h=f[0],y=f[1];return[h+c/this.SCALE_X,y+s/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(i,c){return[i/this.SCALE_X,c/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var i=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(i,")")}}},{key:"zoom",value:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0],c=arguments.length>1?arguments[1]:void 0,s=this.SCALE_X,f=this.SCALE_Y;return i===!0?(s+=this.ZOOM_SIZE,f+=this.ZOOM_SIZE):i===!1?(s-=this.ZOOM_SIZE,f-=this.ZOOM_SIZE):typeof i=="number"&&(s=i,f=i),s<this.MINI_SCALE_SIZE||s>this.MAX_SCALE_SIZE||(c&&(this.TRANSLATE_X-=(s-this.SCALE_X)*c[0],this.TRANSLATE_Y-=(f-this.SCALE_Y)*c[1]),this.SCALE_X=s,this.SCALE_Y=f,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(i){this.eventCenter.emit(ot.GRAPH_TRANSFORM,{type:i,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(i,c){this.TRANSLATE_X+=i,this.TRANSLATE_Y+=c,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(i,c,s,f){var h=Gu(this.CanvasPointToHtmlPoint([i,c]),2),y=s/2-h[0],_=f/2-h[1];this.TRANSLATE_X+=y,this.TRANSLATE_Y+=_,this.emitGraphTransform("focusOn")}}],n&&GO(t.prototype,n),e}(),Kh=yr(en.prototype,"SCALE_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),qh=yr(en.prototype,"SKEW_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Zh=yr(en.prototype,"SKEW_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Jh=yr(en.prototype,"SCALE_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Qh=yr(en.prototype,"TRANSLATE_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ey=yr(en.prototype,"TRANSLATE_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ty=yr(en.prototype,"ZOOM_SIZE",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),yr(en.prototype,"zoom",[d.k],Object.getOwnPropertyDescriptor(en.prototype,"zoom"),en.prototype),yr(en.prototype,"resetZoom",[d.k],Object.getOwnPropertyDescriptor(en.prototype,"resetZoom"),en.prototype),yr(en.prototype,"translate",[d.k],Object.getOwnPropertyDescriptor(en.prototype,"translate"),en.prototype),yr(en.prototype,"focusOn",[d.k],Object.getOwnPropertyDescriptor(en.prototype,"focusOn"),en.prototype),en),UO=function(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e},XO=function(e,t){return e&&Oi(t,Oo(t),e)},YO=function(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t},VO=Object.prototype.hasOwnProperty,KO=function(e){if(!Ht(e))return YO(e);var t=hi(e),n=[];for(var i in e)(i!="constructor"||!t&&VO.call(e,i))&&n.push(i);return n},ba=function(e){return Jt(e)?er(e,!0):KO(e)},qO=function(e,t){return e&&Oi(t,ba(t),e)},ry=o(106),oy=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t},ZO=function(e,t){return Oi(e,Jn(e),t)},rl=tr(Object.getPrototypeOf,Object),iy=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Tr(t,Jn(e)),e=rl(e);return t}:Pu,JO=function(e,t){return Oi(e,iy(e),t)},QO=function(e){return Su(e,ba,iy)},ew=Object.prototype.hasOwnProperty,tw=function(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&ew.call(e,"index")&&(n.index=e.index,n.input=e.input),n},ol=function(e){var t=new e.constructor(e.byteLength);return new Ho(t).set(new Ho(e)),t},nw=function(e,t){var n=t?ol(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},rw=/\w*$/,ow=function(e){var t=new e.constructor(e.source,rw.exec(e));return t.lastIndex=e.lastIndex,t},ay=gt?gt.prototype:void 0,uy=ay?ay.valueOf:void 0,iw=function(e){return uy?Object(uy.call(e)):{}},sy=function(e,t){var n=t?ol(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},aw=function(e,t,n){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return ol(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return nw(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return sy(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return ow(e);case"[object Symbol]":return iw(e)}},cy=Object.create,uw=function(){function e(){}return function(t){if(!Ht(t))return{};if(cy)return cy(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),ly=function(e){return typeof e.constructor!="function"||hi(e)?{}:uw(rl(e))},sw=function(e){return Qn(e)&&b(e)=="[object Map]"},fy=pn.a&&pn.a.isMap,cw=fy?Kr(fy):sw,lw=function(e){return Qn(e)&&b(e)=="[object Set]"},py=pn.a&&pn.a.isSet,fw=py?Kr(py):lw,dy="[object Arguments]",hy="[object Function]",pw="[object Object]",$t={};$t[dy]=$t["[object Array]"]=$t["[object ArrayBuffer]"]=$t["[object DataView]"]=$t["[object Boolean]"]=$t["[object Date]"]=$t["[object Float32Array]"]=$t["[object Float64Array]"]=$t["[object Int8Array]"]=$t["[object Int16Array]"]=$t["[object Int32Array]"]=$t["[object Map]"]=$t["[object Number]"]=$t["[object Object]"]=$t["[object RegExp]"]=$t["[object Set]"]=$t["[object String]"]=$t["[object Symbol]"]=$t["[object Uint8Array]"]=$t["[object Uint8ClampedArray]"]=$t["[object Uint16Array]"]=$t["[object Uint32Array]"]=!0,$t["[object Error]"]=$t[hy]=$t["[object WeakMap]"]=!1;var dw=function e(t,n,i,c,s,f){var h,y=1&n,_=2&n,x=4&n;if(i&&(h=s?i(t,c,s,f):i(t)),h!==void 0)return h;if(!Ht(t))return t;var A=hn(t);if(A){if(h=tw(t),!y)return oy(t,h)}else{var D=b(t),z=D==hy||D=="[object GeneratorFunction]";if(Object(Xo.a)(t))return Object(ry.a)(t,y);if(D==pw||D==dy||z&&!s){if(h=_||z?{}:ly(t),!y)return _?JO(t,qO(h,t)):ZO(t,XO(h,t))}else{if(!$t[D])return s?t:{};h=aw(t,D,y)}}f||(f=new Ar);var U=f.get(t);if(U)return U;f.set(t,h),fw(t)?t.forEach(function(ae){h.add(e(ae,n,i,ae,t,f))}):cw(t)&&t.forEach(function(ae,oe){h.set(oe,e(ae,n,i,oe,t,f))});var q=A?void 0:(x?_?QO:yi:_?ba:Oo)(t);return UO(q||t,function(ae,oe){q&&(ae=t[oe=ae]),Wu(h,oe,e(ae,n,i,oe,t,f))}),h},Xt=function(e){return dw(e,5)},il=function(e,t,n){(n!==void 0&&!St(e[t],n)||n===void 0&&!(t in e))&&el(e,t,n)},hw=function(e){return Qn(e)&&Jt(e)},yw=Function.prototype,gw=Object.prototype,yy=yw.toString,vw=gw.hasOwnProperty,bw=yy.call(Object),mw=function(e){if(!Qn(e)||kt(e)!="[object Object]")return!1;var t=rl(e);if(t===null)return!0;var n=vw.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&yy.call(n)==bw},al=function(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]},_w=function(e){return Oi(e,ba(e))},Ow=function(e,t,n,i,c,s,f){var h=al(e,n),y=al(t,n),_=f.get(y);if(_)il(e,n,_);else{var x=s?s(h,y,n+"",e,t,f):void 0,A=x===void 0;if(A){var D=hn(y),z=!D&&Object(Xo.a)(y),U=!D&&!z&&la(y);x=y,D||z||U?hn(h)?x=h:hw(h)?x=oy(h):z?(A=!1,x=Object(ry.a)(y,!0)):U?(A=!1,x=sy(y,!0)):x=[]:mw(y)||Mr(y)?(x=h,Mr(h)?x=_w(h):Ht(h)&&!Er(h)||(x=ly(y))):A=!1}A&&(f.set(y,x),c(x,y,i,s,f),f.delete(y)),il(e,n,x)}},ww=function e(t,n,i,c,s){t!==n&&xh(n,function(f,h){if(s||(s=new Ar),Ht(f))Ow(t,n,h,i,e,c,s);else{var y=c?c(al(t,h),f,h+"",t,n,s):void 0;y===void 0&&(y=f),il(t,h,y)}},ba)},gy=Ph(function(e,t,n){ww(e,t,n)}),xw={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"}},vy=function(e){var t=Xt(xw);return e&&(t=gy(t,e)),t};o(77),o(158);function Ew(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Sw=function(){function e(){var i,c,s;(function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),s={},(c="_events")in(i=this)?Object.defineProperty(i,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[c]=s}var t,n;return t=e,(n=[{key:"on",value:function(i,c,s){var f=this;return i==null||i.split(",").forEach(function(h){h=h.trim(),f._events[h]||(f._events[h]=[]),f._events[h].push({callback:c,once:!!s})}),this}},{key:"once",value:function(i,c){var s=this;i==null||i.split(",").forEach(function(f){return f=f.trim(),s.on(f,c,!0)})}},{key:"emit",value:function(i,c){var s=this;i==null||i.split(",").forEach(function(f){var h=s._events[f]||[],y=s._events["*"]||[],_=function(x){for(var A=x.length,D=0;D<A;D++)if(x[D]){var z=x[D],U=z.callback;z.once&&(x.splice(D,1),x.length===0&&delete s._events[f],A--,D--),U.apply(s,[c])}};_(h),_(y)})}},{key:"off",value:function(i,c){var s=this;return i||(this._events={}),i.split(",").forEach(function(f){if(c){for(var h=s._events[f]||[],y=h.length,_=0;_<y;_++)h[_].callback===c&&(h.splice(_,1),y--,_--);h.length===0&&delete s._events[f]}else delete s._events[f]}),this}},{key:"getEvents",value:function(){return this._events}}])&&Ew(t.prototype,n),e}();function xo(e,t){return t*Math.round(e/t)||e}function by(e,t){return e%t}function ul(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return my(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return my(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function my(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var sl,cl=function(e,t,n){var i=ul(e,2),c=i[0],s=i[1],f=ul(t,2),h=f[0],y=f[1],_=ul(n,2),x=_[0],A=_[1];return c>h&&c<x&&s>y&&s<A},_y=function(e,t){var n=!1;switch(t.multipleSelectKey){case"meta":n=e.metaKey;break;case"alt":n=e.altKey;break;case"shift":n=e.shiftKey;break;case"ctrl":n=e.ctrlKey;break;default:n=!1}return n},jw=(o(78),o(161),o(125),o(79),o(30),o(12),o(13),o(14),o(47),new Uint8Array(16));function Pw(){if(!sl&&!(sl=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 sl(jw)}for(var Aw=/^(?:[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,Tw=function(e){return typeof e=="string"&&Aw.test(e)},gn=[],ll=0;ll<256;++ll)gn.push((ll+256).toString(16).substr(1));var Mw=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(gn[e[t+0]]+gn[e[t+1]]+gn[e[t+2]]+gn[e[t+3]]+"-"+gn[e[t+4]]+gn[e[t+5]]+"-"+gn[e[t+6]]+gn[e[t+7]]+"-"+gn[e[t+8]]+gn[e[t+9]]+"-"+gn[e[t+10]]+gn[e[t+11]]+gn[e[t+12]]+gn[e[t+13]]+gn[e[t+14]]+gn[e[t+15]]).toLowerCase();if(!Tw(n))throw TypeError("Stringified UUID is invalid");return n},fl=function(e,t,n){var i=(e=e||{}).random||(e.rng||Pw)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var c=0;c<16;++c)t[n+c]=i[c];return t}return Mw(i)},Eo=function(){return fl()},kw=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.nodes.reduce(function(i,c){return i[c.id]=t+fl(),c.id=i[c.id],i},{});return e.edges.forEach(function(i){i.id=t+fl(),i.sourceNodeId=n[i.sourceNodeId],i.targetNodeId=n[i.targetNodeId]}),e},ma=(o(104),o(162),function(e,t,n){var i=e.x,c=e.y;return(i-t.x)*(i-n.x)<=0&&(c-t.y)*(c-n.y)<=0});function pl(e){return pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pl(e)}function Oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function wy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(n),!0).forEach(function(i){Dw(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Dw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oe,xy,Ey,Sy,jy,Py,Ay,Ty,My,ky,Dy,Ny,Ry,Cy,Iy,Ly,By,zy,Fy,$y,Wy,dl=function(e){return e.anchors},Hu=function(e,t){for(var n,i=t.nodes,c=i.length-1;c>=0;c--){var s=i[c];if(Rw(e,s)){var f=s.getTargetAnchor(e);if(f){var h={node:s,anchorIndex:f.index,anchor:f.anchor};n&&!Nw(s,n.node,t)||(n=h)}}}return n},Nw=function(e,t,n){return e.zIndex>t.zIndex||n.nodesMap[e.id].index>n.nodesMap[t.id].index},gr=function(e,t,n,i){return Math.hypot(e-n,t-i)},So=function(e,t){var n=!1,i=Yn(t);return e.x>=i.minX-0&&e.x<=i.maxX+0&&e.y>=i.minY-0&&e.y<=i.maxY+0&&(n=!0),n},Rw=function(e,t){var n=!1,i=Yn(t);return e.x>=i.minX-5&&e.x<=i.maxX+5&&e.y>=i.minY-5&&e.y<=i.maxY+5&&(n=!0),n},Yn=function(e){var t=e.x,n=e.y,i=e.width,c=e.height;return{minX:t-i/2,minY:n-c/2,maxX:t+i/2,maxY:n+c/2,x:t,y:n,width:i,height:c,centerX:t,centerY:n}},Gy=function(e,t,n){var i,c=function(f){var h=f,y=h.x,_=h.y,x=h.width,A=h.height,D=h.radius;return[{x:y-x/2+D,y:_-A/2+D,r:D},{x:y+x/2-D,y:_-A/2+D,r:D},{x:y-x/2+D,y:_+A/2-D,r:D},{x:y+x/2-D,y:_+A/2-D,r:D}]}(n),s=Number.MAX_SAFE_INTEGER;return c.forEach(function(f){var h=gr(e.x,e.y,f.x,f.y);h<s&&(s=h,i=f)}),hl(e,t,i)},hl=function(e,t,n){var i,c=n,s=c.x,f=c.y,h=c.r;if(t===Gt.HORIZONTAL){var y=s-Math.sqrt(h*h-(e.y-f)*(e.y-f)),_=s+Math.sqrt(h*h-(e.y-f)*(e.y-f));i={x:Math.abs(y-e.x)<Math.abs(_-e.x)?y:_,y:e.y}}else if(t===Gt.VERTICAL){var x=f-Math.sqrt(h*h-(e.x-s)*(e.x-s)),A=f+Math.sqrt(h*h-(e.x-s)*(e.x-s)),D=Math.abs(x-e.y)<Math.abs(A-e.y)?x:A;i={x:e.x,y:D}}return i},Hy=function(e,t){var n=t,i=!1,c=n.x-n.width/2+n.radius,s=n.x+n.width/2-n.radius,f=n.y-n.height/2+n.radius,h=n.y+n.height/2-n.radius,y=n.x,_=n.y,x=n.width,A=n.height;return e.y===_+A/2||e.y===_-A/2?i=e.x>c&&e.x<s:e.x!==y+x/2&&e.x!==y-x/2||(i=e.y>f&&e.y<h),i},Uy=function(e,t,n){var i,c=n,s=c.x,f=c.y,h=c.rx,y=c.ry;if(t===Gt.HORIZONTAL){var _=s-Math.sqrt(h*h-(e.y-f)*(e.y-f)*h*h/(y*y)),x=s+Math.sqrt(h*h-(e.y-f)*(e.y-f)*h*h/(y*y));i={x:Math.abs(_-e.x)<Math.abs(x-e.x)?_:x,y:e.y}}else if(t===Gt.VERTICAL){var A=f-Math.sqrt(y*y-(e.x-s)*(e.x-s)*y*y/(h*h)),D=f+Math.sqrt(y*y-(e.x-s)*(e.x-s)*y*y/(h*h)),z=Math.abs(A-e.y)<Math.abs(D-e.y)?A:D;i={x:e.x,y:z}}return i},Xy=function(e,t,n){for(var i,c=n.pointsPosition,s=Number.MAX_SAFE_INTEGER,f=[],h=0;h<c.length;h++)f.push({start:c[h],end:c[(h+1)%c.length]});return f.forEach(function(y){var _=y.start,x=y.end,A=_,D=x;_.x>x.x&&(A=x,D=_);var z={x:e.x,y:e.y};if(A.x===D.x&&t===Gt.HORIZONTAL&&(z={x:A.x,y:e.y}),A.y===D.y&&t===Gt.VERTICAL&&(z={x:e.x,y:A.y}),A.x!==D.x&&A.y!==D.y){var U=(D.y-A.y)/(D.x-A.x),q=(A.x*D.y-D.x*A.y)/(A.x-D.x);t===Gt.HORIZONTAL?z={x:(e.y-q)/U,y:e.y}:t===Gt.VERTICAL&&(z={x:e.x,y:U*e.x+q})}if(ma(z,_,x)){var ae=gr(z.x,z.y,e.x,e.y);ae<s&&(s=ae,i=z)}}),i},Yy=function(e,t,n,i){var c=e.x,s=e.y;return t.x>e.x?c=e.x+n/2:t.x<e.x&&(c=e.x-n/2),t.y>e.y?s=e.y+i/2:t.y<e.y&&(s=e.y-i/2),{x:c,y:s}},Vy=function(e){var t=e.rows,n=e.style,i=e.rowsLength,c=e.className,s=document.createElement("div");s.style.fontSize=n.fontSize,s.style.width=n.width,s.className=c,s.style.lineHeight=n.lineHeight,s.style.padding=n.padding,n.fontFamily&&(s.style.fontFamily=n.fontFamily),i>1?t.forEach(function(h){var y=document.createElement("div");y.textContent=h,s.appendChild(y)}):s.textContent=t,document.body.appendChild(s);var f=s.clientHeight;return document.body.removeChild(s),f},yl=function(e){var t=e.rows,n=e.rowsLength,i=e.fontSize,c=0;return t&&t.forEach(function(s){var f=vg(s);c=f>c?f:c}),{width:Math.ceil(c/2)*i+i/4,height:n*(i+2)+i/4}},_a=function(e){return pl(e)!=="object"?{isAllPass:!!e,msg:e?"":"不允许连接"}:e},vn=function(e){try{return JSON.parse(JSON.stringify(e))}catch{return e}},Cw=1e3,Iw=999,gl=function(){return++Cw};function Ky(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ky(Object(n),!0).forEach(function(i){nr(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ky(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function on(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function Lw(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function nr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var vl=(Oe=function(){function e(i,c){(function(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),nr(this,"id",""),on(this,"type",xy,this),on(this,"sourceNodeId",Ey,this),on(this,"targetNodeId",Sy,this),on(this,"startPoint",jy,this),on(this,"endPoint",Py,this),on(this,"text",Ay,this),on(this,"properties",Ty,this),on(this,"points",My,this),on(this,"pointsList",ky,this),on(this,"isSelected",Dy,this),on(this,"isHovered",Ny,this),on(this,"isHitable",Ry,this),on(this,"draggable",Cy,this),on(this,"visible",Iy,this),nr(this,"virtual",!1),on(this,"isAnimation",Ly,this),on(this,"isShowAdjustPoint",By,this),nr(this,"graphModel",void 0),on(this,"zIndex",zy,this),nr(this,"BaseType",rn.EDGE),nr(this,"modelType",_t.EDGE),on(this,"state",Fy,this),nr(this,"additionStateData",void 0),nr(this,"sourceAnchorId",""),nr(this,"targetAnchorId",""),nr(this,"menu",void 0),nr(this,"customTextPosition",!1),on(this,"style",$y,this),on(this,"arrowConfig",Wy,this),this.graphModel=c,this.initEdgeData(i),this.setAttributes()}var t,n;return t=e,n=[{key:"initEdgeData",value:function(i){if(i.properties||(i.properties={}),!i.id){var c=this.graphModel.idGenerator,s=c&&c(i.type),f=this.createId();i.id=f||s||Eo()}this.arrowConfig.markerEnd="url(#marker-end-".concat(i.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(i.id,")");var h=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=h,xn(this,ox(i)),this.graphModel.overlapMode===Xn.INCREASE&&(this.zIndex=i.zIndex||gl()),this.setAnchors(),this.initPoints(),this.formatText(i)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return Cn(Cn({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return Cn({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var i=this.graphModel.theme.edgeText;return Xt(i)}},{key:"getEdgeAnimationStyle",value:function(){var i=this.graphModel.theme.edgeAnimation;return Xt(i)}},{key:"getArrowStyle",value:function(){var i=this.getEdgeStyle(),c=this.getEdgeAnimationStyle(),s=this.graphModel.theme.arrow,f=this.isAnimation?c.stroke:i.stroke;return Cn(Cn({},i),{},{fill:f,stroke:f},s)}},{key:"getOutlineStyle",value:function(){var i=this.graphModel.theme.outline;return Xt(i)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var i,c;return(i=this.graphModel)===null||i===void 0||(c=i.nodesMap[this.sourceNodeId])===null||c===void 0?void 0:c.model}},{key:"targetNode",get:function(){var i,c;return(i=this.graphModel)===null||i===void 0||(c=i.nodesMap[this.targetNodeId])===null||c===void 0?void 0:c.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(i,c){var s,f;return dl(i).forEach(function(h){var y=Og(h,c);(f===void 0||y<f)&&(f=y,s=h)}),s}},{key:"getEndAnchor",value:function(i){var c,s,f=this;return dl(i).forEach(function(h){var y=Og(h,f.startPoint);(s===void 0||y<s)&&(s=y,c=h)}),c}},{key:"getProperties",value:function(){return Object(d.I)(this.properties)}},{key:"getData",value:function(){var i=this.text,c=i.x,s=i.y,f=i.value,h={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(d.I)(this.properties)};return f&&(h.text={x:c,y:s,value:f}),this.graphModel.overlapMode===Xn.INCREASE&&(h.zIndex=this.zIndex),h}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(i,c){this.properties[i]=vn(c),this.setAttributes()}},{key:"deleteProperty",value:function(i){delete this.properties[i],this.setAttributes()}},{key:"setProperties",value:function(i){this.properties=Cn(Cn({},Object(d.I)(this.properties)),vn(i)),this.setAttributes()}},{key:"changeEdgeId",value:function(i){var c=this.arrowConfig,s=c.markerEnd,f=c.markerStart;f&&f==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(i,")")),s&&s==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(i,")")),this.id=i}},{key:"setStyle",value:function(i,c){this.style=Cn(Cn({},this.style),{},nr({},i,vn(c)))}},{key:"setStyles",value:function(i){this.style=Cn(Cn({},this.style),vn(i))}},{key:"updateStyles",value:function(i){this.style=Cn({},vn(i))}},{key:"formatText",value:function(i){var c=this.textPosition,s=c.x,f=c.y;i.text&&typeof i.text!="string"?Object.prototype.toString.call(i.text)==="[object Object]"&&(this.text={x:i.text.x||s,y:i.text.y||f,value:i.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:i.text||"",x:s,y:f,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var i=this.textPosition,c=i.x,s=i.y;this.text.x=c,this.text.y=s}},{key:"moveText",value:function(i,c){if(this.text){var s=this.text,f=s.x,h=s.y,y=s.value,_=s.draggable,x=s.editable;this.text={value:y,draggable:_,x:f+i,y:h+c,editable:x}}}},{key:"setText",value:function(i){i&&xn(this.text,i)}},{key:"updateText",value:function(i){this.text=Cn(Cn({},Object(d.I)(this.text)),{},{value:i})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var i=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:i.x,y:i.y}),this.sourceAnchorId||(this.sourceAnchorId=i.id)}if(!this.targetAnchorId||!this.endPoint){var c=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:c.x,y:c.y}),this.targetAnchorId||(this.targetAnchorId=c.id)}}},{key:"setSelected",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=i}},{key:"setHovered",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=i}},{key:"setHitable",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=i}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(i,c){this.state=i,this.additionStateData=c}},{key:"updateStartPoint",value:function(i){this.startPoint=i}},{key:"moveStartPoint",value:function(i,c){this.startPoint.x+=i,this.startPoint.y+=c}},{key:"updateEndPoint",value:function(i){this.endPoint=i}},{key:"moveEndPoint",value:function(i,c){this.endPoint.x+=i,this.endPoint.y+=c}},{key:"setZIndex",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.zIndex=i}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(i){xn(this,i)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(i){var c=i.startPoint,s=i.endPoint;this.updateStartPoint({x:c.x,y:c.y}),this.updateEndPoint({x:s.x,y:s.y})}}],n&&Lw(t.prototype,n),e}(),xy=nt(Oe.prototype,"type",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ey=nt(Oe.prototype,"sourceNodeId",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Sy=nt(Oe.prototype,"targetNodeId",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),jy=nt(Oe.prototype,"startPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Py=nt(Oe.prototype,"endPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Ay=nt(Oe.prototype,"text",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Ty=nt(Oe.prototype,"properties",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),My=nt(Oe.prototype,"points",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ky=nt(Oe.prototype,"pointsList",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Dy=nt(Oe.prototype,"isSelected",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ny=nt(Oe.prototype,"isHovered",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ry=nt(Oe.prototype,"isHitable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Cy=nt(Oe.prototype,"draggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Iy=nt(Oe.prototype,"visible",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ly=nt(Oe.prototype,"isAnimation",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),By=nt(Oe.prototype,"isShowAdjustPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zy=nt(Oe.prototype,"zIndex",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Fy=nt(Oe.prototype,"state",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),$y=nt(Oe.prototype,"style",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Wy=nt(Oe.prototype,"arrowConfig",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),nt(Oe.prototype,"sourceNode",[d.m],Object.getOwnPropertyDescriptor(Oe.prototype,"sourceNode"),Oe.prototype),nt(Oe.prototype,"targetNode",[d.m],Object.getOwnPropertyDescriptor(Oe.prototype,"targetNode"),Oe.prototype),nt(Oe.prototype,"textPosition",[d.m],Object.getOwnPropertyDescriptor(Oe.prototype,"textPosition"),Oe.prototype),nt(Oe.prototype,"setProperty",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setProperty"),Oe.prototype),nt(Oe.prototype,"deleteProperty",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"deleteProperty"),Oe.prototype),nt(Oe.prototype,"setProperties",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setProperties"),Oe.prototype),nt(Oe.prototype,"changeEdgeId",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"changeEdgeId"),Oe.prototype),nt(Oe.prototype,"setStyle",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setStyle"),Oe.prototype),nt(Oe.prototype,"setStyles",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setStyles"),Oe.prototype),nt(Oe.prototype,"updateStyles",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateStyles"),Oe.prototype),nt(Oe.prototype,"formatText",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"formatText"),Oe.prototype),nt(Oe.prototype,"resetTextPosition",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"resetTextPosition"),Oe.prototype),nt(Oe.prototype,"moveText",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"moveText"),Oe.prototype),nt(Oe.prototype,"setText",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setText"),Oe.prototype),nt(Oe.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateText"),Oe.prototype),nt(Oe.prototype,"setAnchors",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setAnchors"),Oe.prototype),nt(Oe.prototype,"setSelected",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setSelected"),Oe.prototype),nt(Oe.prototype,"setHovered",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setHovered"),Oe.prototype),nt(Oe.prototype,"setHitable",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setHitable"),Oe.prototype),nt(Oe.prototype,"openEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"openEdgeAnimation"),Oe.prototype),nt(Oe.prototype,"closeEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"closeEdgeAnimation"),Oe.prototype),nt(Oe.prototype,"setElementState",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setElementState"),Oe.prototype),nt(Oe.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateStartPoint"),Oe.prototype),nt(Oe.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"moveStartPoint"),Oe.prototype),nt(Oe.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateEndPoint"),Oe.prototype),nt(Oe.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"moveEndPoint"),Oe.prototype),nt(Oe.prototype,"setZIndex",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setZIndex"),Oe.prototype),nt(Oe.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"initPoints"),Oe.prototype),nt(Oe.prototype,"updateAttributes",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateAttributes"),Oe.prototype),nt(Oe.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"getAdjustStart"),Oe.prototype),nt(Oe.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"getAdjustEnd"),Oe.prototype),nt(Oe.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateAfterAdjustStartAndEnd"),Oe.prototype),Oe),bl=vl;function ml(e){return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}function qy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Zy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qy(Object(n),!0).forEach(function(i){Qy(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qy(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Bw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zw(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _l(){return _l=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=Fw(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},_l.apply(this,arguments)}function Fw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=wi(e))!==null;);return e}function Ol(e,t){return Ol=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ol(e,t)}function $w(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=wi(e);if(t){var c=wi(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return Ww(this,n)}}function Ww(e,t){if(t&&(ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jy(e)}function Jy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wi(e){return wi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wi(e)}function Qy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pt,eg,wl=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Ol(s,f)})(c,e);var t,n,i=$w(c);function c(){var s;Bw(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return Qy(Jy(s=i.call.apply(i,[this].concat(h))),"modelType",_t.LINE_EDGE),s}return t=c,(n=[{key:"getEdgeStyle",value:function(){var s=this.graphModel.theme.line;return Zy(Zy({},_l(wi(c.prototype),"getEdgeStyle",this).call(this)),Xt(s))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&zw(t.prototype,n),c}(bl);function xl(e){return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}function Gw(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return tg(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return tg(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function tg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ng(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function rg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ng(Object(n),!0).forEach(function(i){Sl(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ng(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Hw(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function Uw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xw(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Oa(){return Oa=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=Yw(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},Oa.apply(this,arguments)}function Yw(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=jo(e))!==null;);return e}function El(e,t){return El=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},El(e,t)}function Vw(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=jo(e);if(t){var c=jo(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return Kw(this,n)}}function Kw(e,t){if(t&&(xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wa(e)}function wa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jo(e){return jo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jo(e)}function Sl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function En(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var jl=(pt=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&El(s,f)})(c,e);var t,n,i=Vw(c);function c(){var s;Uw(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return Sl(wa(s=i.call.apply(i,[this].concat(h))),"modelType",_t.POLYLINE_EDGE),Sl(wa(s),"draggingPointList",void 0),Hw(wa(s),"dbClickPosition",eg,wa(s)),s}return t=c,(n=[{key:"initEdgeData",value:function(s){this.offset=30,Oa(jo(c.prototype),"initEdgeData",this).call(this,s)}},{key:"getEdgeStyle",value:function(){var s=this.graphModel.theme.polyline;return rg(rg({},Oa(jo(c.prototype),"getEdgeStyle",this).call(this)),Xt(s))}},{key:"getTextPosition",value:function(){var s,f=(s=this.text)===null||s===void 0?void 0:s.value;if(this.dbClickPosition&&!f){var h=this.dbClickPosition;return{x:h.x,y:h.y}}var y=Zo(this.points),_=Gw(nx(y),2),x=_[0],A=_[1];return{x:(x.x+A.x)/2,y:(x.y+A.y)/2}}},{key:"getAfterAnchor",value:function(s,f,h){var y,_;return h.forEach(function(x){var A;s===Gt.HORIZONTAL?A=Math.abs(f.y-x.y):s===Gt.VERTICAL&&(A=Math.abs(f.x-x.x)),(!_||_>A)&&(_=A,y=x)}),y}},{key:"getCrossPoint",value:function(s,f,h){var y;return s===Gt.HORIZONTAL?y={x:h.x,y:f.y}:s===Gt.VERTICAL&&(y={x:f.x,y:h.y}),y}},{key:"removeCrossPoints",value:function(s,f,h){var y=h.map(function(oe){return oe});if(s===1){var _=y[s],x=y[f],A=y[s-1];if(dg(A,_,this.sourceNode)){if(hg(_,x,this.sourceNode)){var D=yg(_,x,this.sourceNode);D&&(y[s]=D,y.splice(s-1,1),s--,f--)}}else this.sourceNode.anchors.forEach(function(oe){(oe.x===A.x&&oe.x===_.x||oe.y===A.y&&oe.y===_.y)&&gr(oe.x,oe.y,_.x,_.y)<gr(A.x,A.y,_.x,_.y)&&(y[s-1]=oe)})}if(f===h.length-2){var z=y[s],U=y[f],q=y[f+1];if(dg(U,q,this.targetNode)){if(hg(z,U,this.targetNode)){var ae=yg(z,U,this.targetNode);ae&&(y[f]=ae,y.splice(f+1,1))}}else this.targetNode.anchors.forEach(function(oe){(oe.x===q.x&&oe.x===U.x||oe.y===q.y&&oe.y===U.y)&&gr(oe.x,oe.y,U.x,U.y)<gr(q.x,q.y,U.x,U.y)&&(y[f+1]=oe)})}return y}},{key:"getDraggingPoints",value:function(s,f,h,y,_){var x=_.map(function(z){return z}),A=this.getAfterAnchor(s,h,y),D=this.getCrossPoint(s,h,A);return f==="start"?(x.unshift(D),x.unshift(A)):(x.push(D),x.push(A)),x}},{key:"updateCrossPoints",value:function(s){var f=s.map(function(_e){return _e}),h=s[0],y=s[1],_=s[f.length-2],x=s[f.length-1],A=this.sourceNode,D=this.targetNode,z=A.modelType,U=D.modelType,q=Zu(h,y),ae=f[0];switch(z){case _t.RECT_NODE:A.radius!==0&&(Hy(h,A)||(ae=Gy(h,q,A)));break;case _t.CIRCLE_NODE:ae=hl(h,q,A);break;case _t.ELLIPSE_NODE:ae=Uy(h,q,A);break;case _t.DIAMOND_NODE:case _t.POLYGON_NODE:ae=Xy(h,q,A)}f[0]=ae;var oe=Zu(_,x),fe=f[f.length-1];switch(U){case _t.RECT_NODE:D.radius!==0&&(Hy(x,D)||(fe=Gy(x,oe,D)));break;case _t.CIRCLE_NODE:fe=hl(x,oe,D);break;case _t.ELLIPSE_NODE:fe=Uy(x,oe,D);break;case _t.DIAMOND_NODE:case _t.POLYGON_NODE:fe=Xy(x,oe,D)}return f[f.length-1]=fe,f}},{key:"getData",value:function(){var s=Oa(jo(c.prototype),"getData",this).call(this),f=this.pointsList.map(function(h){return{x:h.x,y:h.y}});return Object.assign({},s,{pointsList:f})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(s){return"".concat(s.x,",").concat(s.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var s=pg({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=s,this.points=s.map(function(f){return"".concat(f.x,",").concat(f.y)}).join(" ")}},{key:"updateStartPoint",value:function(s){this.startPoint=s,this.updatePoints()}},{key:"moveStartPoint",value:function(s,f){this.startPoint.x+=s,this.startPoint.y+=f,this.updatePoints()}},{key:"updateEndPoint",value:function(s){this.endPoint=s,this.updatePoints()}},{key:"moveEndPoint",value:function(s,f){this.endPoint.x+=s,this.endPoint.y+=f,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map(function(s){return s})}},{key:"dragAppendSimple",value:function(s,f){this.isDragging=!0;var h=s.start,y=s.end,_=s.startIndex,x=s.endIndex,A=s.direction,D=this.pointsList,z=D;return A===Gt.HORIZONTAL?(D[_]={x:h.x,y:h.y+f.y},D[x]={x:y.x,y:y.y+f.y},z=this.pointsList.map(function(U){return U})):A===Gt.VERTICAL&&(D[_]={x:h.x+f.x,y:h.y},D[x]={x:y.x+f.x,y:y.y},z=this.pointsList.map(function(U){return U})),this.updatePointsAfterDrag(z),this.draggingPointList=z,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},D[_]),end:Object.assign({},D[x]),startIndex:_,endIndex:x,direction:A}}},{key:"dragAppend",value:function(s,f){this.isDragging=!0;var h=s.start,y=s.end,_=s.startIndex,x=s.endIndex,A=s.direction,D=this.pointsList;if(A===Gt.HORIZONTAL){D[_]={x:h.x,y:h.y+f.y},D[x]={x:y.x,y:y.y+f.y};var z=this.pointsList.map(function(ke){return ke});if(_!==0&&x!==this.pointsList.length-1&&(z=this.removeCrossPoints(_,x,z)),_===0){var U={x:h.x,y:h.y+f.y};if(!So(U,this.sourceNode)){var q=this.sourceNode.anchors;z=this.getDraggingPoints(A,"start",U,q,z)}}if(x===this.pointsList.length-1){var ae={x:y.x,y:y.y+f.y};if(!So(ae,this.targetNode)){var oe=this.targetNode.anchors;z=this.getDraggingPoints(A,"end",ae,oe,z)}}this.updatePointsAfterDrag(z),this.draggingPointList=z}else if(A===Gt.VERTICAL){D[_]={x:h.x+f.x,y:h.y},D[x]={x:y.x+f.x,y:y.y};var fe=this.pointsList.map(function(ke){return ke});if(_!==0&&x!==this.pointsList.length-1&&(fe=this.removeCrossPoints(_,x,fe)),_===0){var _e={x:h.x+f.x,y:h.y};if(!So(_e,this.sourceNode)){var Me=this.sourceNode.anchors;fe=this.getDraggingPoints(A,"start",_e,Me,fe)}}if(x===this.pointsList.length-1){var Se={x:y.x+f.x,y:y.y};if(!So(Se,this.targetNode)){var He=this.targetNode.anchors;fe=this.getDraggingPoints(A,"end",Se,He,fe)}}this.updatePointsAfterDrag(fe),this.draggingPointList=fe}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},D[_]),end:Object.assign({},D[x]),startIndex:_,endIndex:x,direction:A}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var s=fg(Zo(this.points));this.pointsList=s.map(function(y){return y}),this.draggingPointList=[];var f=s[0];this.startPoint=Object.assign({},f);var h=s[s.length-1];this.endPoint=Object.assign({},h)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(s){var f=this.updateCrossPoints(s);this.points=f.map(function(h){return"".concat(h.x,",").concat(h.y)}).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var s=this.pointsList;return s[s.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(s){var f=s.startPoint,h=s.endPoint,y=s.sourceNode,_=s.targetNode,x=pg({x:f.x,y:f.y},{x:h.x,y:h.y},y,_,this.offset||0);this.pointsList=x,this.initPoints()}}])&&Xw(t.prototype,n),c}(bl),eg=En(pt.prototype,"dbClickPosition",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),En(pt.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"initPoints"),pt.prototype),En(pt.prototype,"updatePoints",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"updatePoints"),pt.prototype),En(pt.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"updateStartPoint"),pt.prototype),En(pt.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"moveStartPoint"),pt.prototype),En(pt.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"updateEndPoint"),pt.prototype),En(pt.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"moveEndPoint"),pt.prototype),En(pt.prototype,"dragAppendStart",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"dragAppendStart"),pt.prototype),En(pt.prototype,"dragAppendSimple",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"dragAppendSimple"),pt.prototype),En(pt.prototype,"dragAppend",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"dragAppend"),pt.prototype),En(pt.prototype,"dragAppendEnd",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"dragAppendEnd"),pt.prototype),En(pt.prototype,"updatePointsAfterDrag",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"updatePointsAfterDrag"),pt.prototype),En(pt.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"getAdjustStart"),pt.prototype),En(pt.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"getAdjustEnd"),pt.prototype),En(pt.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(pt.prototype,"updateAfterAdjustStartAndEnd"),pt.prototype),pt),xa=function(e){var t=e.start,n=e.end,i=e.offset,c=e.verticalLength,s=e.type,f={leftX:0,leftY:0,rightX:0,rightY:0},h=Math.atan((n.y-t.y)/(n.x-t.x)),y=Math.atan(i/c),_=Math.sqrt(c*c+i*i);return s==="start"?n.x>=t.x?(f.leftX=t.x+_*Math.sin(h+y),f.leftY=t.y-_*Math.cos(h+y),f.rightX=t.x-_*Math.sin(h-y),f.rightY=t.y+_*Math.cos(h-y)):(f.leftX=t.x-_*Math.sin(h+y),f.leftY=t.y+_*Math.cos(h+y),f.rightX=t.x+_*Math.sin(h-y),f.rightY=t.y-_*Math.cos(h-y)):s==="end"&&(n.x>=t.x?(f.leftX=n.x+_*Math.sin(h-y),f.leftY=n.y-_*Math.cos(h-y),f.rightX=n.x-_*Math.sin(h+y),f.rightY=n.y+_*Math.cos(h+y)):(f.leftX=n.x-_*Math.sin(h-y),f.leftY=n.y+_*Math.cos(h-y),f.rightX=n.x+_*Math.sin(h+y),f.rightY=n.y-_*Math.cos(h+y))),f},qw={x:1,y:0,z:0};function og(e){var t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t,z:0}}function Zw(e){return i=function(s,f){return s.x*f.y-s.y*f.x}(t=qw,n=e),c=Math.acos(function(s,f){var h=[s.x,s.y,s.z];return[f.x,f.y,f.z].reduce(function(y,_,x){return y+_*h[x]})}(og(t),og(n))),i>=0?c:-c;var t,n,i,c}function ig(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Uu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ig(Object(n),!0).forEach(function(i){Jw(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ig(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Jw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qw(e){return function(t){if(Array.isArray(t))return Al(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||ag(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Pl(e){return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}function Xu(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||ag(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ag(e,t){if(e){if(typeof e=="string")return Al(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Al(e,t):void 0}}function Al(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Tl=function(e){var t=[],n={};return e.forEach(function(i){var c="".concat(i.x,"-").concat(i.y);i.id=c,n[c]=i}),Object.keys(n).forEach(function(i){t.push(n[i])}),t},Yu=function(e,t){return e.width===0&&e.height===0?e:{centerX:e.centerX,centerY:e.centerY,minX:e.minX-t,minY:e.minY-t,maxX:e.maxX+t,maxY:e.maxY+t,height:e.height+2*t,width:e.width+2*t}},Vu=function(e,t,n){var i=function(c,s){var f=Math.abs(c.x-s.centerX),h=Math.abs(c.y-s.centerY);return f/s.width>h/s.height?Gt.HORIZONTAL:Gt.VERTICAL}(n,t);return i===Gt.HORIZONTAL?{x:n.x>e.centerX?e.maxX:e.minX,y:n.y}:{x:n.x,y:n.y>e.centerY?e.maxY:e.minY}},ug=function(e,t){var n=Math.min(e.minX,t.minX),i=Math.min(e.minY,t.minY),c=Math.max(e.maxX,t.maxX),s=Math.max(e.maxY,t.maxY);return{centerX:(n+c)/2,centerY:(i+s)/2,minX:n,minY:i,maxX:c,maxY:s,height:s-i,width:c-n}},Ea=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[],i=[];e.forEach(function(x){n.push(x.x),i.push(x.y)});var c=Math.min.apply(Math,n),s=Math.max.apply(Math,n),f=Math.min.apply(Math,i),h=Math.max.apply(Math,i),y=s-c,_=h-f;return t&&(y+=t,_+=t),{centerX:(c+s)/2,centerY:(f+h)/2,maxX:s,maxY:h,minX:c,minY:f,x:(c+s)/2,y:(f+h)/2,height:_,width:y}},Ku=function(e){var t=e.minX,n=e.minY,i=e.maxX,c=e.maxY;return[{x:t,y:n},{x:i,y:n},{x:i,y:c},{x:t,y:c}]},qu=function(e,t){var n=e.x,i=e.y;return n<t.minX||n>t.maxX||i<t.minY||i>t.maxY},Ml=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},sg=function(e,t,n,i,c){return Ml(e,t)+Ml(e,n)+function(s,f){var h=0;return f.forEach(function(y){y&&(s.x===y.x&&(h+=-2),s.y===y.y&&(h+=-2))}),h}(e,[t,n,i,c])},ex=function e(t,n,i,c,s){s||(s=0),t.unshift(n[c]),i[c]&&i[c]!==c&&s<=100&&e(t,n,i,i[c],s+1)},Sa=function(e,t,n,i){var c=t.x-e.x,s=t.y-e.y,f=i.x-n.x,h=i.y-n.y,y=(-s*(e.x-n.x)+c*(e.y-n.y))/(-f*s+c*h),_=(f*(e.y-n.y)-h*(e.x-n.x))/(-f*s+c*h);return y>=0&&y<=1&&_>=0&&_<=1},cg=function(e,t,n){if(n.width===0&&n.height===0)return!1;var i=Xu(Ku(n),4),c=i[0],s=i[1],f=i[2],h=i[3];return Sa(e,t,c,s)||Sa(e,t,c,h)||Sa(e,t,s,f)||Sa(e,t,f,h)},tx=function(e,t,n,i,c,s,f){var h=[],y=[t],_={},x={},A={};x[t.id]=0,A[t.id]=sg(t,n,t);var D={};e.forEach(function(q){D[q.id]=q});for(var z=function(){var q,ae,oe,fe=void 0,_e=1/0;if(y.forEach(function(Se){A[Se.id]<_e&&(_e=A[Se.id],fe=Se)}),fe===n){var Me=[];return ex(Me,D,_,n.id),{v:Me}}ae=fe,(oe=(q=y).indexOf(ae))>-1&&q.splice(oe,1),h.push(fe),function(Se,He,ke,$e){var Ie=[];return Se.forEach(function(ht){ht!==He&&(ht.x!==He.x&&ht.y!==He.y||cg(ht,He,ke)||cg(ht,He,$e)||Ie.push(ht))}),Tl(Ie)}(e,fe,i,c).forEach(function(Se){if(h.indexOf(Se)===-1){y.indexOf(Se)===-1&&y.push(Se);var He=A[fe.id]+Ml(fe,Se);x[Se.id]&&He>=x[Se.id]||(_[Se.id]=fe.id,x[Se.id]=He,A[Se.id]=x[Se.id]+sg(Se,n,t,s,f))}})};y.length;){var U=z();if(Pl(U)==="object")return U.v}return[t,n]},lg=function(e){return Yn(e)},fg=function(e){for(var t=1;t<e.length-1;){var n=e[t-1],i=e[t],c=e[t+1];n.x===i.x&&i.x===c.x||n.y===i.y&&i.y===c.y?e.splice(t,1):t++}return e},pg=function(e,t,n,i,c){var s,f,h=lg(n),y=lg(i),_=Yu(h,c),x=Yu(y,c),A=Vu(_,h,e),D=Vu(x,y,t);if(s=_,f=x,2*Math.abs(s.centerX-f.centerX)<s.width+f.width&&2*Math.abs(s.centerY-f.centerY)<s.height+f.height){var z=rx(e,t,A,D);return[e,A].concat(Qw(z),[D,t])}var U=Ea([A,D]),q=ug(_,U),ae=ug(x,U),oe=[];oe=(oe=oe.concat(Ku(q))).concat(Ku(ae));var fe={x:(e.x+t.x)/2,y:(e.y+t.y)/2};[U,q,ae].forEach(function(Me){oe=oe.concat(function(Se,He){return function(ke,$e){return $e<ke.minX||$e>ke.maxX?[]:[{x:$e,y:ke.minY},{x:$e,y:ke.maxY}]}(Se,He.x).concat(function(ke,$e){return $e<ke.minY||$e>ke.maxY?[]:[{x:ke.minX,y:$e},{x:ke.maxX,y:$e}]}(Se,He.y))}(Me,fe).filter(function(Se){return qu(Se,_)&&qu(Se,x)}))}),[{x:A.x,y:D.y},{x:D.x,y:A.y}].forEach(function(Me){qu(Me,_)&&qu(Me,x)&&oe.push(Me)}),oe.unshift(A),oe.push(D),oe=Tl(oe);var _e=tx(oe,A,D,h,y,e,t);return _e.unshift(e),_e.push(t),_e.length>2&&(_e=fg(_e)),Tl(_e)},nx=function(e){var t;if(e.length===1)t=[e[0],e[0]];else if(e.length>=2){for(var n=e[0],i=e[1],c=gr(n.x,n.y,i.x,i.y),s=1;s<e.length-1;s++){var f=e[s],h=e[s+1],y=gr(f.x,f.y,h.x,h.y);y>c&&(c=y,n=f,i=h)}t=[n,i]}return t},dg=function(e,t,n){var i=So(e,n),c=So(t,n);return i&&c},hg=function(e,t,n){var i=So(e,n),c=So(t,n);return!(i&&c)&&(i||c)},yg=function(e,t,n){for(var i,c,s=Yn(n),f=Ku(s),h=0;h<f.length;h++)Sa(e,t,f[h],f[(h+1)%f.length])&&(c=[f[h],f[(h+1)%f.length]]);return c&&(i=function(y,_,x,A){var D=(_.y-y.y)*(A.x-x.x)-(y.x-_.x)*(x.y-A.y);if(D===0)return!1;var z=((_.x-y.x)*(A.x-x.x)*(x.y-y.y)+(_.y-y.y)*(A.x-x.x)*y.x-(A.y-x.y)*(_.x-y.x)*x.x)/D,U=-((_.y-y.y)*(A.y-x.y)*(x.x-y.x)+(_.x-y.x)*(A.y-x.y)*y.y-(A.x-x.x)*(_.y-y.y)*x.y)/D;return(z-y.x)*(z-_.x)<=0&&(U-y.y)*(U-_.y)<=0&&(z-x.x)*(z-A.x)<=0&&(U-x.y)*(U-A.y)<=0&&{x:z,y:U}}(e,t,c[0],c[1])),i},Zu=function(e,t){var n;return e.x===t.x?n=Gt.VERTICAL:e.y===t.y&&(n=Gt.HORIZONTAL),n},Zo=function(e){var t=e.split(" "),n=[];return t&&t.forEach(function(i){var c=Xu(i.split(","),2),s=c[0],f=c[1];n.push({x:Number(s),y:Number(f)})}),n},rx=function(e,t,n,i){var c=[];if(Zu(e,n)===Zu(t,i))e.y===n.y?(c.push({x:n.x,y:(n.y+i.y)/2}),c.push({x:i.x,y:(n.y+i.y)/2})):(c.push({x:(n.x+i.x)/2,y:n.y}),c.push({x:(n.x+i.x)/2,y:i.y}));else{var s={x:n.x,y:i.y},f=ma(s,e,n),h=ma(s,t,i);if(f||h)s={x:i.x,y:n.y};else{var y=gg(s,e,n),_=gg(s,t,i);y&&_&&(s={x:i.x,y:n.y})}c.push(s)}return c},gg=function(e,t,n){return e.x===t.x&&e.x===n.x||e.y===t.y&&e.y===n.y},vg=function(e){if(!e)return 0;for(var t=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);e.match(/[A-Z]/)?t+=1.5:t+=i>=1&&i<=126||i>=65376&&i<=65439?1:2}return t},bg=function(e){var t=e.start,n=e.end,i=e.sourceNode,c=e.targetNode,s=e.offset,f=Yn(i),h=Yn(c),y=Yu(f,s),_=Yu(h,s);return{sNext:Vu(y,f,t),ePre:Vu(_,h,n)}},kl=function(e){var t=e.replace(/M/g,"").replace(/C/g,",").split(",");return[Ju(t[0]),Ju(t[1]),Ju(t[2]),Ju(t[3])]},Ju=function(e){var t=Xu(e.replace(/(^\s*)/g,"").split(" "),2);return{x:+t[0],y:+t[1]}},mg=function(e,t){var n=Xu(e,4),i=function(c,s,f,h,y){for(var _=function(fe){if(fe<0||fe>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:c.x*Math.pow(1-fe,3)+3*s.x*fe*Math.pow(1-fe,2)+3*f.x*Math.pow(fe,2)*(1-fe)+h.x*Math.pow(fe,3),y:c.y*Math.pow(1-fe,3)+3*s.y*fe*Math.pow(1-fe,2)+3*f.y*Math.pow(fe,2)*(1-fe)+h.y*Math.pow(fe,3)}},x=0,A=2,D=h.x,z=h.y,U=h;x<y&&A<50;){var q=U=_(1-A/100),ae=q.x,oe=q.y;x=gr(D,z,ae,oe),A++}return U}(n[0],n[1],n[2],n[3],t);return[i,e[3]]},_g=function(e,t){for(var n,i=e.x,c=e.y,s=Zo(t),f=Number.MAX_SAFE_INTEGER,h=[],y=0;y<s.length;y++)h.push({start:s[y],end:s[(y+1)%s.length]});if(h.forEach(function(D){var z=D.start,U=D.end;if(z.x===U.x){var q={x:z.x,y:c};if(ma(q,z,U)){var ae=Math.abs(z.x-i);ae<f&&(f=ae,n=q)}}else if(z.y===U.y){var oe={x:i,y:z.y};if(ma(oe,z,U)){var fe=Math.abs(z.y-c);fe<f&&(f=fe,n=oe)}}}),!n){var _=h[0],x=_.start,A=_.end;n={x:x.x+(A.x-x.x)/2,y:x.y+(A.y-x.y)/2}}return n},ox=function(e){return va(e,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Og=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))};o(204);var xi=function(){};function ix(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function an(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kr=window.document;function ax(e){var t=e.onDragStart,n=t===void 0?xi:t,i=e.onDragging,c=i===void 0?xi:i,s=e.onDragEnd,f=s===void 0?xi:s,h=e.step,y=h===void 0?1:h,_=e.isStopPropagation,x=_===void 0||_,A=!1,D=!1,z=0,U=0,q=0,ae=0;function oe(_e){if(x&&_e.stopPropagation(),D&&(A=!0,q+=_e.clientX-z,ae+=_e.clientY-U,z=_e.clientX,U=_e.clientY,Math.abs(q)>y||Math.abs(ae)>y)){var Me=q%y,Se=ae%y,He=q-Me,ke=ae-Se;q=Me,ae=Se,c({deltaX:He,deltaY:ke,event:_e})}}function fe(_e){if(x&&_e.stopPropagation(),D=!1,kr.removeEventListener("mousemove",oe,!1),kr.removeEventListener("mouseup",fe,!1),A)return A=!1,f({event:_e})}return function(_e){if(_e.button===0)return x&&_e.stopPropagation(),D=!0,z=_e.clientX,U=_e.clientY,kr.addEventListener("mousemove",oe,!1),kr.addEventListener("mouseup",fe,!1),n({event:_e})}}var de,wg,xg,Eg,Sg,jg,Pg,Ag,Tg,Mg,kg,Dg,Ng,Zr=function(){function e(i){var c=this,s=i.onDragStart,f=s===void 0?xi:s,h=i.onDragging,y=h===void 0?xi:h,_=i.onDragEnd,x=_===void 0?xi:_,A=i.eventType,D=A===void 0?"":A,z=i.eventCenter,U=z===void 0?null:z,q=i.step,ae=q===void 0?1:q,oe=i.isStopPropagation,fe=oe===void 0||oe,_e=i.model,Me=_e===void 0?null:_e,Se=i.data,He=Se===void 0?null:Se;(function(ke,$e){if(!(ke instanceof $e))throw new TypeError("Cannot call a class as a function")})(this,e),an(this,"onDragStart",void 0),an(this,"onDragging",void 0),an(this,"onDragEnd",void 0),an(this,"step",void 0),an(this,"isStopPropagation",void 0),an(this,"isDragging",!1),an(this,"isStartDragging",!1),an(this,"startX",0),an(this,"startY",0),an(this,"sumDeltaX",0),an(this,"sumDeltaY",0),an(this,"eventType",void 0),an(this,"eventCenter",void 0),an(this,"model",void 0),an(this,"data",void 0),an(this,"startTime",void 0),an(this,"handleMouseDown",function(ke){var $e,Ie;if(ke.button===0){c.isStopPropagation&&ke.stopPropagation(),c.isStartDragging=!0,c.startX=ke.clientX,c.startY=ke.clientY,kr.addEventListener("mousemove",c.handleMouseMove,!1),kr.addEventListener("mouseup",c.handleMouseUp,!1);var ht=($e=c.model)===null||$e===void 0?void 0:$e.getData();(Ie=c.eventCenter)===null||Ie===void 0||Ie.emit(ot["".concat(c.eventType,"_MOUSEDOWN")],{e:ke,data:c.data||ht}),c.startTime=new Date().getTime()}}),an(this,"handleMouseMove",function(ke){if(c.isStopPropagation&&ke.stopPropagation(),c.isStartDragging&&(c.sumDeltaX+=ke.clientX-c.startX,c.sumDeltaY+=ke.clientY-c.startY,c.startX=ke.clientX,c.startY=ke.clientY,c.step<=1||Math.abs(c.sumDeltaX)>c.step||Math.abs(c.sumDeltaY)>c.step)){var $e,Ie=c.sumDeltaX%c.step,ht=c.sumDeltaY%c.step,Nt=c.sumDeltaX-Ie,Pt=c.sumDeltaY-ht;c.sumDeltaX=Ie,c.sumDeltaY=ht;var Bt,tn=($e=c.model)===null||$e===void 0?void 0:$e.getData();c.isDragging||((Bt=c.eventCenter)===null||Bt===void 0||Bt.emit(ot["".concat(c.eventType,"_DRAGSTART")],{e:ke,data:c.data||tn}),c.onDragStart({event:ke})),c.isDragging=!0,Promise.resolve().then(function(){var cn,Pn;c.onDragging({deltaX:Nt,deltaY:Pt,event:ke}),(cn=c.eventCenter)===null||cn===void 0||cn.emit(ot["".concat(c.eventType,"_MOUSEMOVE")],{e:ke,data:c.data||tn}),(Pn=c.eventCenter)===null||Pn===void 0||Pn.emit(ot["".concat(c.eventType,"_DRAG")],{e:ke,data:c.data||tn})})}}),an(this,"handleMouseUp",function(ke){c.isStartDragging=!1,c.isStopPropagation&&ke.stopPropagation(),Promise.resolve().then(function(){var $e,Ie,ht;kr.removeEventListener("mousemove",c.handleMouseMove,!1),kr.removeEventListener("mouseup",c.handleMouseUp,!1);var Nt=($e=c.model)===null||$e===void 0?void 0:$e.getData();(Ie=c.eventCenter)===null||Ie===void 0||Ie.emit(ot["".concat(c.eventType,"_MOUSEUP")],{e:ke,data:c.data||Nt}),c.isDragging&&(c.isDragging=!1,c.onDragEnd({event:ke}),(ht=c.eventCenter)===null||ht===void 0||ht.emit(ot["".concat(c.eventType,"_DROP")],{e:ke,data:c.data||Nt}))})}),an(this,"cancelDrag",function(){kr.removeEventListener("mousemove",c.handleMouseMove,!1),kr.removeEventListener("mouseup",c.handleMouseUp,!1),c.onDragEnd({event:null}),c.isDragging=!1}),this.onDragStart=f,this.onDragging=y,this.onDragEnd=x,this.step=ae,this.isStopPropagation=fe,this.eventType=D,this.eventCenter=U,this.model=Me,this.data=He}var t,n;return t=e,(n=[{key:"setStep",value:function(i){this.step=i}}])&&ix(t.prototype,n),e}(),Rg={node:!1,edge:!1},ux={node:!0,edge:!0};function Cg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(n),!0).forEach(function(i){Dr(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cg(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function ja(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||Ig(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ei(e){return function(t){if(Array.isArray(t))return Dl(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Ig(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ig(e,t){if(e){if(typeof e=="string")return Dl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dl(e,t):void 0}}function Dl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function es(e){return es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},es(e)}function rr(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function sx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Dr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qe(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var Lg,Bg=200,zg=(de=function(){function e(i){(function(U,q){if(!(U instanceof q))throw new TypeError("Cannot call a class as a function")})(this,e),Dr(this,"rootEl",void 0),rr(this,"width",wg,this),rr(this,"height",xg,this),Dr(this,"theme",void 0),Dr(this,"eventCenter",void 0),Dr(this,"modelMap",new Map),Dr(this,"topElement",void 0),Dr(this,"animation",void 0),Dr(this,"idGenerator",void 0),Dr(this,"edgeGenerator",void 0),Dr(this,"nodeMoveRules",[]),rr(this,"edgeType",Eg,this),rr(this,"nodes",Sg,this),rr(this,"edges",jg,this),rr(this,"overlapMode",Pg,this),rr(this,"background",Ag,this),rr(this,"transformModel",Tg,this),rr(this,"editConfigModel",Mg,this),rr(this,"gridSize",kg,this),rr(this,"partial",Dg,this),rr(this,"fakerNode",Ng,this);var c,s,f,h=i.container,y=i.background,_=y===void 0?{}:y,x=i.grid,A=i.idGenerator,D=i.edgeGenerator,z=i.animation;this.background=_,es(x)==="object"&&(this.gridSize=x.size),this.rootEl=h,this.editConfigModel=new Vh(i),this.eventCenter=new Sw,this.transformModel=new HO(this.eventCenter),this.theme=vy(i.style),this.edgeType=i.edgeType||"polyline",this.width=i.width,this.height=i.height,this.animation=(c=z)&&typeof c!="boolean"?gy(Xt(Rg),c):Xt(c===!0?ux:Rg),this.partial=i.partial,this.overlapMode=i.overlapMode||0,this.idGenerator=A,this.edgeGenerator=(s=this,typeof(f=D)!="function"?function(U,q,ae){return Object.assign({type:s.edgeType},ae)}:function(U,q,ae){var oe=f(U,q,ae);return oe?typeof oe=="string"?Object.assign({},ae,{type:oe}):Object.assign({type:oe},ae):{type:s.edgeType}}),this.width=i.width||this.rootEl.getBoundingClientRect().width,this.height=i.height||this.rootEl.getBoundingClientRect().height,this.flowId=Eo()}var t,n;return t=e,n=[{key:"nodesMap",get:function(){return this.nodes.reduce(function(i,c,s){return i[c.id]={index:s,model:c},i},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(i,c,s){return i[c.id]={index:s,model:c},i},{})}},{key:"modelsMap",get:function(){return[].concat(Ei(this.nodes),Ei(this.edges)).reduce(function(i,c){return i[c.id]=c,i},{})}},{key:"sortElements",get:function(){var i=[];this.nodes.forEach(function(_){return i.push(_)}),this.edges.forEach(function(_){return i.push(_)}),i=i.sort(function(_,x){return _.zIndex-x.zIndex});for(var c=[],s=[-200,-200],f=[this.width+Bg,this.height+Bg],h=0;h<i.length;h++){var y=i[h];y.visible&&(!this.partial||y.isSelected||this.isElementInArea(y,s,f,!1,!1))&&c.push(y)}return c}},{key:"textEditElement",get:function(){var i=this.nodes.find(function(s){return s.state===Tt.TEXT_EDIT}),c=this.edges.find(function(s){return s.state===Tt.TEXT_EDIT});return i||c}},{key:"selectElements",get:function(){var i=new Map;return this.nodes.forEach(function(c){c.isSelected&&i.set(c.id,c)}),this.edges.forEach(function(c){c.isSelected&&i.set(c.id,c)}),i}},{key:"selectNodes",get:function(){var i=[];return this.nodes.forEach(function(c){c.isSelected&&i.push(c)}),i}},{key:"getAreaElement",value:function(i,c){var s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],f=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],h=arguments.length>4&&arguments[4]!==void 0&&arguments[4],y=[],_=[];this.nodes.forEach(function(D){return _.push(D)}),this.edges.forEach(function(D){return _.push(D)});for(var x=0;x<_.length;x++){var A=_[x];h&&!A.visible||!this.isElementInArea(A,i,c,s,f)||y.push(A)}return y}},{key:"getModel",value:function(i){return this.modelMap.get(i)}},{key:"getNodeModelById",value:function(i){var c;return this.fakerNode&&i===this.fakerNode.id?this.fakerNode:(c=this.nodesMap[i])===null||c===void 0?void 0:c.model}},{key:"getPointByClient",value:function(i){var c=i.x,s=i.y,f=this.rootEl.getBoundingClientRect(),h={x:c-f.left,y:s-f.top},y=ja(this.transformModel.HtmlPointToCanvasPoint([h.x,h.y]),2);return{domOverlayPosition:h,canvasOverlayPosition:{x:y[0],y:y[1]}}}},{key:"isElementInArea",value:function(i,c,s){var f=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],h=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(i.BaseType===rn.NODE){for(var y=Yn(i=i),_=y.minX,x=y.minY,A=y.maxX,D=y.maxY,z=[{x:_,y:x},{x:A,y:x},{x:A,y:D},{x:_,y:D}],U=h,q=0;q<z.length;q++){var ae=z[q],oe=ae.x,fe=ae.y,_e=this.transformModel.CanvasPointToHtmlPoint([oe,fe]),Me=ja(_e,2);if(oe=Me[0],fe=Me[1],cl([oe,fe],c,s)!==h){U=!h;break}}return U}if(i.BaseType===rn.EDGE){var Se=i=i,He=Se.startPoint,ke=Se.endPoint,$e=this.transformModel.CanvasPointToHtmlPoint([He.x,He.y]),Ie=this.transformModel.CanvasPointToHtmlPoint([ke.x,ke.y]),ht=cl($e,c,s),Nt=cl(Ie,c,s);return f?ht&&Nt:ht||Nt}return!1}},{key:"graphDataToModel",value:function(i){var c=this;if(this.width&&this.height||this.resize(),!i)return this.nodes=[],void(this.edges=[]);i.nodes?this.nodes=Fu(i.nodes,function(s){var f=c.getModel(s.type);if(!f)throw new Error("找不到".concat(s.type,"对应的节点。"));var h=s.x,y=s.y;return h&&y&&(s.x=xo(h,c.gridSize),s.y=xo(y,c.gridSize),es(s.text)==="object"&&(s.text.x-=by(h,c.gridSize),s.text.y-=by(y,c.gridSize))),new f(s,c)}):this.nodes=[],i.edges?this.edges=Fu(i.edges,function(s){var f=c.getModel(s.type);if(!f)throw new Error("找不到".concat(s.type,"对应的边。"));return new f(s,c)}):this.edges=[]}},{key:"modelToGraphData",value:function(){var i=[];this.edges.forEach(function(s){var f=s.getData();f&&!s.virtual&&i.push(f)});var c=[];return this.nodes.forEach(function(s){var f=s.getData();f&&!s.virtual&&c.push(f)}),{nodes:c,edges:i}}},{key:"modelToHistoryData",value:function(){for(var i=!1,c=[],s=0;s<this.nodes.length;s++){var f=this.nodes[s];if(f.isDragging){i=!0;break}c.push(f.getHistoryData())}if(i)return!1;for(var h=!1,y=[],_=0;_<this.edges.length;_++){var x=this.edges[_];if(x.isDragging){h=!0;break}y.push(x.getHistoryData())}return!h&&{nodes:c,edges:y}}},{key:"getEdgeModelById",value:function(i){var c;return(c=this.edgesMap[i])===null||c===void 0?void 0:c.model}},{key:"getElement",value:function(i){return this.modelsMap[i]}},{key:"getNodeEdges",value:function(i){for(var c=[],s=0;s<this.edges.length;s++){var f=this.edges[s],h=this.edges[s].sourceNodeId===i,y=this.edges[s].targetNodeId===i;(h||y)&&c.push(f)}return c}},{key:"getSelectElements",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],c=this.selectElements,s={nodes:[],edges:[]};return c.forEach(function(f){if(f.BaseType===rn.NODE&&s.nodes.push(f.getData()),f.BaseType===rn.EDGE){var h=f.getData(),y=c.get(h.sourceNodeId)&&c.get(h.targetNodeId);(i||y)&&s.edges.push(h)}}),s}},{key:"updateAttributes",value:function(i,c){this.getElement(i).updateAttributes(c)}},{key:"changeNodeId",value:function(i,c){return c||(c=Eo()),this.nodesMap[c]?"":this.nodesMap[i]?(this.edges.forEach(function(s){s.sourceNodeId===i&&(s.sourceNodeId=c),s.targetNodeId===i&&(s.targetNodeId=c)}),this.nodesMap[i].model.id=c,this.nodesMap[c]=this.nodesMap[i],c):""}},{key:"changeEdgeId",value:function(i,c){return c||(c=Eo()),this.edgesMap[c]?"":this.edgesMap[i]?(this.edges.forEach(function(s){s.id===i&&s.changeEdgeId(c)}),c):""}},{key:"setFakerNode",value:function(i){this.fakerNode=i}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(i,c){return this.modelMap.set(i,c)}},{key:"toFront",value:function(i){var c,s,f,h=((c=this.nodesMap[i])===null||c===void 0?void 0:c.model)||((s=this.edgesMap[i])===null||s===void 0?void 0:s.model);h&&(this.overlapMode===Xn.DEFAULT&&((f=this.topElement)===null||f===void 0||f.setZIndex(),h.setZIndex(9999),this.topElement=h),this.overlapMode===Xn.INCREASE&&this.setElementZIndex(i,"top"))}},{key:"setElementZIndex",value:function(i,c){var s,f,h,y=((s=this.nodesMap[i])===null||s===void 0?void 0:s.model)||((f=this.edgesMap[i])===null||f===void 0?void 0:f.model);y&&(typeof c=="number"&&(h=c),c==="top"&&(h=gl()),c==="bottom"&&(h=--Iw),y.setZIndex(h))}},{key:"deleteNode",value:function(i){var c=this.nodesMap[i].model.getData();this.deleteEdgeBySource(i),this.deleteEdgeByTarget(i),this.nodes.splice(this.nodesMap[i].index,1),this.eventCenter.emit(ot.NODE_DELETE,{data:c})}},{key:"addNode",value:function(i){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ot.NODE_ADD,s=arguments.length>2?arguments[2]:void 0,f=vn(i);f.id&&this.nodesMap[i.id]&&delete f.id;var h=this.getModel(f.type);if(!h)throw new Error("找不到".concat(f.type,"对应的节点,请确认是否已注册此类型节点。"));f.x=xo(f.x,this.gridSize),f.y=xo(f.y,this.gridSize);var y=new h(f,this);this.nodes.push(y);var _=y.getData(),x={data:_};return s&&(x.e=s),this.eventCenter.emit(c,x),y}},{key:"cloneNode",value:function(i){var c=this.getNodeModelById(i),s=c.getData();s.x+=30,s.y+=30,delete s.id,s.text&&(s.text.x+=30,s.text.y+=30);var f=this.addNode(s);return f.setSelected(!0),c.setSelected(!1),f.getData()}},{key:"moveNode",value:function(i,c,s){var f=arguments.length>3&&arguments[3]!==void 0&&arguments[3],h=this.nodesMap[i];if(h){var y=h.model,_=y.getMoveDistance(c,s,f),x=ja(_,2);c=x[0],s=x[1],this.moveEdge(i,c,s)}}},{key:"moveNode2Coordinate",value:function(i,c,s){var f=arguments.length>3&&arguments[3]!==void 0&&arguments[3],h=this.nodesMap[i];if(h){var y=h.model,_=y.x,x=y.y,A=c-_,D=s-x;this.moveNode(i,A,D,f)}}},{key:"editText",value:function(i){this.setElementStateById(i,Tt.TEXT_EDIT)}},{key:"addEdge",value:function(i){var c=vn(i),s=c.type;s||(s=this.edgeType),c.id&&this.edgesMap[c.id]&&delete c.id;var f=this.getModel(s);if(!f)throw new Error("找不到".concat(s,"对应的边,请确认是否已注册此类型边。"));var h=new f(Qu(Qu({},c),{},{type:s}),this),y=h.getData();return this.edges.push(h),this.eventCenter.emit(ot.EDGE_ADD,{data:y}),h}},{key:"moveEdge",value:function(i,c,s){for(var f=0;f<this.edges.length;f++){var h=this.edges[f],y=h.textPosition,_=y.x,x=y.y,A=this.edges[f].sourceNodeId===i,D=this.edges[f].targetNodeId===i;A&&h.moveStartPoint(c,s),D&&h.moveEndPoint(c,s),(A||D)&&this.handleEdgeTextMove(h,_,x)}}},{key:"handleEdgeTextMove",value:function(i,c,s){var f;if(i.customTextPosition===!0)i.resetTextPosition();else if(i.modelType===_t.POLYLINE_EDGE&&(f=i.text)!==null&&f!==void 0&&f.value){var h=i.text,y=_g(h,i.points);i.moveText(y.x-h.x,y.y-h.y)}else{var _=i.textPosition,x=_.x,A=_.y;i.moveText(x-c,A-s)}}},{key:"deleteEdgeBySourceAndTarget",value:function(i,c){for(var s=0;s<this.edges.length;s++)if(this.edges[s].sourceNodeId===i&&this.edges[s].targetNodeId===c){var f=this.edges[s].getData();this.edges.splice(s,1),s--,this.eventCenter.emit(ot.EDGE_DELETE,{data:f})}}},{key:"deleteEdgeById",value:function(i){if(this.edgesMap[i]){var c=this.edgesMap[i].index,s=this.edgesMap[i].model.getData();this.edges.splice(c,1),this.eventCenter.emit(ot.EDGE_DELETE,{data:s})}}},{key:"deleteEdgeBySource",value:function(i){for(var c=0;c<this.edges.length;c++)if(this.edges[c].sourceNodeId===i){var s=this.edges[c].getData();this.edges.splice(c,1),c--,this.eventCenter.emit(ot.EDGE_DELETE,{data:s})}}},{key:"deleteEdgeByTarget",value:function(i){for(var c=0;c<this.edges.length;c++)if(this.edges[c].targetNodeId===i){var s=this.edges[c].getData();this.edges.splice(c,1),c--,this.eventCenter.emit(ot.EDGE_DELETE,{data:s})}}},{key:"setElementStateById",value:function(i,c,s){this.nodes.forEach(function(f){f.id===i?f.setElementState(c,s):f.setElementState(Tt.DEFAULT)}),this.edges.forEach(function(f){f.id===i?f.setElementState(c,s):f.setElementState(Tt.DEFAULT)})}},{key:"updateText",value:function(i,c){this.nodes.forEach(function(s){s.id===i&&s.updateText(c)}),this.edges.forEach(function(s){s.id===i&&s.updateText(c)})}},{key:"selectNodeById",value:function(i){var c,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s||this.clearSelectElements();var f=(c=this.nodesMap[i])===null||c===void 0?void 0:c.model;f==null||f.setSelected(!0)}},{key:"selectEdgeById",value:function(i){var c,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s||this.clearSelectElements();var f=(c=this.edgesMap[i])===null||c===void 0?void 0:c.model;f==null||f.setSelected(!0)}},{key:"selectElementById",value:function(i){var c=arguments.length>1&&arguments[1]!==void 0&&arguments[1];c||this.clearSelectElements();var s=this.getElement(i);s==null||s.setSelected(!0)}},{key:"clearSelectElements",value:function(){var i;this.selectElements.forEach(function(c){c==null||c.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===Xn.DEFAULT&&((i=this.topElement)===null||i===void 0||i.setZIndex())}},{key:"moveNodes",value:function(i,c,s){for(var f=this,h=arguments.length>3&&arguments[3]!==void 0&&arguments[3],y=i.reduce(function(Me,Se){var He=f.nodesMap[Se].model.getMoveDistance(c,s,h);return Me[Se]=He,Me},{}),_=0;_<this.edges.length;_++){var x=this.edges[_],A=x.textPosition,D=A.x,z=A.y,U=y[x.sourceNodeId],q=void 0,ae=void 0;if(U){var oe=ja(U,2);q=oe[0],ae=oe[1],x.moveStartPoint(q,ae)}var fe=y[x.targetNodeId];if(fe){var _e=ja(fe,2);q=_e[0],ae=_e[1],x.moveEndPoint(q,ae)}(U||fe)&&this.handleEdgeTextMove(x,D,z)}}},{key:"addNodeMoveRules",value:function(i){this.nodeMoveRules.includes(i)||this.nodeMoveRules.push(i)}},{key:"setDefaultEdgeType",value:function(i){this.edgeType=i}},{key:"changeNodeType",value:function(i,c){var s=this.getNodeModelById(i);if(s){var f=s.getData();f.type=c;var h=this.getModel(c);if(!h)throw new Error("找不到".concat(c,"对应的节点,请确认是否已注册此类型节点。"));var y=new h(f,this);this.nodes.splice(this.nodesMap[i].index,1,y),this.getNodeEdges(i).forEach(function(_){if(_.sourceNodeId===i){var x=Yy(y,_.startPoint,y.width,y.height);_.updateStartPoint(x)}if(_.targetNodeId===i){var A=Yy(y,_.endPoint,y.width,y.height);_.updateEndPoint(A)}})}}},{key:"changeEdgeType",value:function(i,c){var s=this.getEdgeModelById(i);if(s&&s.type!==c){var f=s.getData();f.type=c;var h=this.getModel(c);if(!h)throw new Error("找不到".concat(c,"对应的节点,请确认是否已注册此类型节点。"));delete f.pointsList;var y=new h(f,this);this.edges.splice(this.edgesMap[i].index,1,y)}}},{key:"getNodeIncomingEdge",value:function(i){var c=[];return this.edges.forEach(function(s){s.targetNodeId===i&&c.push(s)}),c}},{key:"getNodeOutgoingEdge",value:function(i){var c=[];return this.edges.forEach(function(s){s.sourceNodeId===i&&c.push(s)}),c}},{key:"getNodeIncomingNode",value:function(i){var c=this,s=[];return this.edges.forEach(function(f){f.targetNodeId===i&&s.push(c.nodesMap[f.sourceNodeId].model)}),s}},{key:"getNodeOutgoingNode",value:function(i){var c=this,s=[];return this.edges.forEach(function(f){f.sourceNodeId===i&&s.push(c.nodesMap[f.targetNodeId].model)}),s}},{key:"setTheme",value:function(i){this.theme=vy(Qu(Qu({},this.theme),i))}},{key:"resize",value:function(i,c){this.width=i||this.rootEl.getBoundingClientRect().width,this.height=c||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var i=this.nodes,c=[],s=[];i.forEach(function(A){var D=A.x,z=A.y,U=A.width,q=A.height,ae=A.getNodeStyle().strokeWidth,oe=ae===void 0?0:ae;c=c.concat([D+U/2+oe,D-U/2-oe]),s=s.concat([z+q/2+oe,z-q/2-oe])});var f=Math.min.apply(Math,Ei(c)),h=Math.max.apply(Math,Ei(c)),y=Math.min.apply(Math,Ei(s)),_=h-f||0,x=Math.max.apply(Math,Ei(s))-y||0;return{virtualRectWidth:_,virtualRectHeight:x,virtualRectCenterPositionX:f+_/2,virtualRectCenterPositionY:y+x/2}}},{key:"translateCenter",value:function(){var i=this.nodes,c=this.width,s=this.height,f=this.rootEl,h=this.transformModel;if(i.length){var y=c||f.clientWidth,_=s||f.clientHeight,x=this.getVirtualRectSize(),A=x.virtualRectCenterPositionX,D=x.virtualRectCenterPositionY;h.focusOn(A,D,y,_)}}},{key:"fitView",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,s=this.nodes,f=this.width,h=this.height,y=this.rootEl,_=this.transformModel;if(s.length){var x=f||y.clientWidth,A=h||y.clientHeight,D=this.getVirtualRectSize(),z=D.virtualRectWidth,U=D.virtualRectHeight,q=D.virtualRectCenterPositionX,ae=D.virtualRectCenterPositionY,oe=(z+c)/x,fe=(U+i)/A,_e=0;_e=1/Math.max(oe,fe);var Me=[x/2,A/2];_.zoom(_e,Me),_.focusOn(q,ae,x,A)}}},{key:"openEdgeAnimation",value:function(i){this.getEdgeModelById(i).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(i){this.getEdgeModelById(i).closeEdgeAnimation()}}],n&&sx(t.prototype,n),e}(),wg=qe(de.prototype,"width",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xg=qe(de.prototype,"height",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Eg=qe(de.prototype,"edgeType",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Sg=qe(de.prototype,"nodes",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),jg=qe(de.prototype,"edges",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Pg=qe(de.prototype,"overlapMode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xn.DEFAULT}}),Ag=qe(de.prototype,"background",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Tg=qe(de.prototype,"transformModel",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mg=qe(de.prototype,"editConfigModel",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kg=qe(de.prototype,"gridSize",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Dg=qe(de.prototype,"partial",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ng=qe(de.prototype,"fakerNode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qe(de.prototype,"nodesMap",[d.m],Object.getOwnPropertyDescriptor(de.prototype,"nodesMap"),de.prototype),qe(de.prototype,"edgesMap",[d.m],Object.getOwnPropertyDescriptor(de.prototype,"edgesMap"),de.prototype),qe(de.prototype,"modelsMap",[d.m],Object.getOwnPropertyDescriptor(de.prototype,"modelsMap"),de.prototype),qe(de.prototype,"sortElements",[d.m],Object.getOwnPropertyDescriptor(de.prototype,"sortElements"),de.prototype),qe(de.prototype,"textEditElement",[d.m],Object.getOwnPropertyDescriptor(de.prototype,"textEditElement"),de.prototype),qe(de.prototype,"selectElements",[d.m],Object.getOwnPropertyDescriptor(de.prototype,"selectElements"),de.prototype),qe(de.prototype,"selectNodes",[d.m],Object.getOwnPropertyDescriptor(de.prototype,"selectNodes"),de.prototype),qe(de.prototype,"setFakerNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"setFakerNode"),de.prototype),qe(de.prototype,"removeFakerNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"removeFakerNode"),de.prototype),qe(de.prototype,"setModel",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"setModel"),de.prototype),qe(de.prototype,"toFront",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"toFront"),de.prototype),qe(de.prototype,"setElementZIndex",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"setElementZIndex"),de.prototype),qe(de.prototype,"deleteNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteNode"),de.prototype),qe(de.prototype,"addNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"addNode"),de.prototype),qe(de.prototype,"cloneNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"cloneNode"),de.prototype),qe(de.prototype,"moveNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNode"),de.prototype),qe(de.prototype,"moveNode2Coordinate",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNode2Coordinate"),de.prototype),qe(de.prototype,"editText",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"editText"),de.prototype),qe(de.prototype,"addEdge",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"addEdge"),de.prototype),qe(de.prototype,"moveEdge",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"moveEdge"),de.prototype),qe(de.prototype,"deleteEdgeBySourceAndTarget",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeBySourceAndTarget"),de.prototype),qe(de.prototype,"deleteEdgeById",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeById"),de.prototype),qe(de.prototype,"deleteEdgeBySource",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeBySource"),de.prototype),qe(de.prototype,"deleteEdgeByTarget",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"deleteEdgeByTarget"),de.prototype),qe(de.prototype,"setElementStateById",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"setElementStateById"),de.prototype),qe(de.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"updateText"),de.prototype),qe(de.prototype,"selectNodeById",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"selectNodeById"),de.prototype),qe(de.prototype,"selectEdgeById",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"selectEdgeById"),de.prototype),qe(de.prototype,"selectElementById",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"selectElementById"),de.prototype),qe(de.prototype,"clearSelectElements",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"clearSelectElements"),de.prototype),qe(de.prototype,"moveNodes",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"moveNodes"),de.prototype),qe(de.prototype,"setDefaultEdgeType",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"setDefaultEdgeType"),de.prototype),qe(de.prototype,"changeNodeType",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"changeNodeType"),de.prototype),qe(de.prototype,"changeEdgeType",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"changeEdgeType"),de.prototype),qe(de.prototype,"getNodeIncomingEdge",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeIncomingEdge"),de.prototype),qe(de.prototype,"getNodeOutgoingEdge",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeOutgoingEdge"),de.prototype),qe(de.prototype,"getNodeIncomingNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeIncomingNode"),de.prototype),qe(de.prototype,"getNodeOutgoingNode",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"getNodeOutgoingNode"),de.prototype),qe(de.prototype,"setTheme",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"setTheme"),de.prototype),qe(de.prototype,"resize",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"resize"),de.prototype),qe(de.prototype,"clearData",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"clearData"),de.prototype),qe(de.prototype,"translateCenter",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"translateCenter"),de.prototype),qe(de.prototype,"fitView",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"fitView"),de.prototype),qe(de.prototype,"openEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"openEdgeAnimation"),de.prototype),qe(de.prototype,"closeEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(de.prototype,"closeEdgeAnimation"),de.prototype),de),cx=zg;function Nl(e){return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function Rl(){return Rl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Rl.apply(this,arguments)}function lx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Cl(e,t){return Cl=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Cl(e,t)}function fx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=ts(e);if(t){var c=ts(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return px(this,n)}}function px(e,t){if(t&&(Nl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nr(e)}function Nr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ts(e)}function Jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fg,dx=_r(Lg=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Cl(s,f)})(c,e);var t,n,i=fx(c);function c(s){var f;(function(x,A){if(!(x instanceof A))throw new TypeError("Cannot call a class as a function")})(this,c),Jr(Nr(f=i.call(this)),"stepDrag",void 0),Jr(Nr(f),"stepScrollX",0),Jr(Nr(f),"stepScrollY",0),Jr(Nr(f),"onDragging",function(x){var A=x.deltaX,D=x.deltaY;f.setState({isDragging:!0});var z=f.props.graphModel,U=z.transformModel;z.editConfigModel.stopMoveGraph||U.translate(A,D)}),Jr(Nr(f),"onDragEnd",function(){f.setState({isDragging:!1})}),Jr(Nr(f),"zoomHandler",function(x){var A=f.props,D=A.graphModel,z=D.editConfigModel,U=D.transformModel,q=D.gridSize,ae=A.graphModel,oe=x.deltaX,fe=x.deltaY;if(z.stopScrollGraph||x.ctrlKey===!0){if(!z.stopZoomGraph){x.preventDefault();var _e=ae.getPointByClient({x:x.clientX,y:x.clientY}).canvasOverlayPosition,Me=_e.x,Se=_e.y;U.zoom(x.deltaY<0,[Me,Se])}}else{if(x.preventDefault(),f.stepScrollX+=oe,f.stepScrollY+=fe,Math.abs(f.stepScrollX)>=q){var He=f.stepScrollX%q,ke=f.stepScrollX-He;U.translate(-ke*U.SCALE_X,0),f.stepScrollX=He}if(Math.abs(f.stepScrollY)>=q){var $e=f.stepScrollY%q,Ie=f.stepScrollY-$e;U.translate(0,-Ie*U.SCALE_Y),f.stepScrollY=$e}}}),Jr(Nr(f),"clickHandler",function(x){if(x.target.getAttribute("name")==="canvas-overlay"){var A=f.props.graphModel;A.selectElements.size>0&&A.clearSelectElements(),A.eventCenter.emit(ot.BLANK_CLICK,{e:x})}}),Jr(Nr(f),"handleContextMenu",function(x){if(x.target.getAttribute("name")==="canvas-overlay"){x.preventDefault();var A=f.props.graphModel,D=A.getPointByClient({x:x.clientX,y:x.clientY});A.eventCenter.emit(ot.BLANK_CONTEXTMENU,{e:x,position:D})}}),Jr(Nr(f),"mouseDownHandler",function(x){var A=f.props.graphModel,D=A.eventCenter,z=A.editConfigModel,U=A.transformModel.SCALE_X,q=A.gridSize,ae=x.target,oe=!z.adjustEdge&&!z.adjustNodePosition;(ae.getAttribute("name")==="canvas-overlay"||oe)&&(z.stopMoveGraph?D.emit(ot.BLANK_MOUSEDOWN,{e:x}):(f.stepDrag.setStep(q*U),f.stepDrag.handleMouseDown(x)),f.clickHandler(x))});var h=s.graphModel,y=h.gridSize,_=h.eventCenter;return f.stepDrag=new Zr({onDragging:f.onDragging,onDragEnd:f.onDragEnd,step:y,eventType:"BLANK",isStopPropagation:!1,eventCenter:_,model:null}),f.state={isDragging:!1},f}return t=c,(n=[{key:"render",value:function(){var s=this.props.graphModel.transformModel.getTransformStyle().transform,f=this.props,h=f.children,y=f.dnd,_=this.state.isDragging;return Object(re.g)("svg",Rl({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:_?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},y.eventMap()),Object(re.g)("g",{transform:s},h))}}])&&lx(t.prototype,n),c}(re.a))||Lg;function Il(e){return Il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(e)}function hx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ll(e,t){return Ll=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ll(e,t)}function gx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=ns(e);if(t){var c=ns(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return vx(this,n)}}function vx(e,t){if(t&&(Il(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(e)}var bx=_r(Fg=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Ll(s,f)})(c,e);var t,n,i=gx(c);function c(){return hx(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var s=this.props,f=s.tool,h=s.graphModel,y=f.getTools().map(function(_){return Object(re.g)(_,{graphModel:h,logicFlow:f.instance})});return f.components=y,y}},{key:"triggerToolRender",value:function(){var s=this.props,f=s.tool,h=s.graphModel,y=document.querySelector("#ToolOverlay_".concat(h.flowId)),_=f.getInstance();_.components.forEach(function(x){return x(_,y)}),_.components=[]}},{key:"render",value:function(){var s=this.props.graphModel;return Object(re.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(s.flowId)},this.getTools())}}])&&yx(t.prototype,n),c}(re.a))||Fg;function Bl(e){return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function mx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _x(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function zl(e,t){return zl=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},zl(e,t)}function Ox(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=rs(e);if(t){var c=rs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return wx(this,n)}}function wx(e,t){if(t&&(Bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function rs(e){return rs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},rs(e)}var $g,xx=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&zl(s,f)})(c,e);var t,n,i=Ox(c);function c(){return mx(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var s=this.props.background;return Object(re.g)("div",{className:"lf-background"},Object(re.g)("div",{style:s,className:"lf-background-area"}))}}])&&_x(t.prototype,n),c}(re.a);function Fl(e){return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function Ex(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function $l(e,t){return $l=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},$l(e,t)}function jx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=os(e);if(t){var c=os(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return Px(this,n)}}function Px(e,t){if(t&&(Fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wg(e)}function Wg(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},os(e)}function Ax(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gg=_r($g=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&$l(s,f)})(c,e);var t,n,i=jx(c);function c(){var s;Ex(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return Ax(Wg(s=i.call.apply(i,[this].concat(h))),"id",Eo()),s}return t=c,(n=[{key:"renderDot",value:function(){var s=this.props,f=s.config,h=f.color,y=f.thickness,_=y===void 0?2:y,x=s.size,A=s.visible,D=Math.min(Math.max(2,_),x/2),z=1;return A||(z=0),Object(re.g)("rect",{width:D,height:D,rx:D/2,ry:D/2,fill:h,opacity:z})}},{key:"renderMesh",value:function(){var s=this.props,f=s.config,h=f.color,y=f.thickness,_=y===void 0?1:y,x=s.size,A=s.visible,D=Math.min(Math.max(1,_),x/2),z="M ".concat(x," 0 H0 M0 0 V0 ").concat(x),U=1;return A||(U=0),Object(re.g)("path",{d:z,stroke:h,strokeWidth:D,opacity:U})}},{key:"render",value:function(){var s=this.props,f=s.type,h=s.size,y=s.graphModel.transformModel,_=[y.SCALE_X,y.SKEW_Y,y.SKEW_X,y.SCALE_Y,y.TRANSLATE_X,y.TRANSLATE_Y].join(","),x="matrix(".concat(_,")");return Object(re.g)("div",{className:"lf-grid"},Object(re.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(re.g)("defs",null,Object(re.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:x,x:"0",y:"0",width:h,height:h},f==="dot"&&this.renderDot(),f==="mesh"&&this.renderMesh())),Object(re.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Sx(t.prototype,n),c}(re.a))||$g;Gg.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},o(52);function Wl(e){return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function Tx(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Hg(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Hg(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Hg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Ug,Si=function(e){var t={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(n){var i=Tx(n,2),c=i[0],s=i[1];(c==="style"||Wl(s)!=="object")&&(t[c]=s)}),Object(re.g)("line",t)};function Gl(e){return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function Xg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function is(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xg(Object(n),!0).forEach(function(i){Mx(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xg(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Mx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Hl(e,t){return Hl=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Hl(e,t)}function Nx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=as(e);if(t){var c=as(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return Rx(this,n)}}function Rx(e,t){if(t&&(Gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function as(e){return as=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},as(e)}var Yg,Cx=_r(Ug=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Hl(s,f)})(c,e);var t,n,i=Nx(c);function c(){return kx(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var s=this.props.snaplineModel,f=s.position,h=s.isShowHorizontal,y=s.isShowVertical,_=s.getStyle(),x=f.x,A=x===void 0?0:x,D=f.y,z=D===void 0?0:D,U=is(is({x1:-1e5,y1:z,x2:1e5,y2:z},_),{},{stroke:h?_.stroke:"none"}),q=is(is({x1:A,y1:-1e5,x2:A,y2:1e5},_),{},{stroke:y?_.stroke:"none"});return Object(re.g)("g",{className:"lf-snapline"},Object(re.g)(Si,U),Object(re.g)(Si,q))}}])&&Dx(t.prototype,n),c}(re.a))||Ug;function Ul(e){return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(e)}function Ix(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Vg(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Vg(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Vg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Po(e){var t=e.x,n=e.y,i=e.width,c=e.height,s=e.className,f=e.radius,h=t-i/2,y=n-c/2,_={};return Object.entries(e).forEach(function(x){var A=Ix(x,2),D=A[0],z=A[1];Ul(z)!=="object"&&(_[D]=z)}),_.className=s?"lf-basic-shape ".concat(s):"lf-basic-shape",f&&(_.rx=f,_.ry=f),_.x=h,_.y=y,Object(re.g)("rect",_)}function Xl(e){return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function ji(){return ji=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ji.apply(this,arguments)}function Kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function qg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kg(Object(n),!0).forEach(function(i){Lx(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kg(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Lx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Yl(e,t){return Yl=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Yl(e,t)}function Fx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=us(e);if(t){var c=us(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return $x(this,n)}}function $x(e,t){if(t&&(Xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},us(e)}Po.defaultProps={className:"",radius:""};var Zg,Wx=_r(Yg=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Yl(s,f)})(c,e);var t,n,i=Fx(c);function c(){return Bx(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getNodesOutline",value:function(){var s=this.props.graphModel,f=s.nodes,h=s.editConfigModel,y=h.hoverOutline,_=h.nodeSelectedOutline,x=[];return f.forEach(function(A){if(A.isHovered||A.isSelected){var D=A.isHovered,z=A.isSelected,U=A.x,q=A.y,ae=A.width,oe=A.height;if(_&&z||y&&D){var fe=A.getOutlineStyle(),_e={};if(Object.keys(fe).forEach(function(Se){Se!=="hover"&&(_e[Se]=fe[Se])}),D){var Me=fe.hover;_e=qg(qg({},_e),Me)}x.push(Object(re.g)(Po,ji({className:"lf-outline-node",x:U,y:q,width:ae+10,height:oe+10},_e)))}}}),x}},{key:"getEdgeOutline",value:function(){for(var s=this.props.graphModel,f=s.edges,h=s.editConfigModel,y=h.edgeSelectedOutline,_=h.hoverOutline,x=[],A=0;A<f.length;A++){var D=f[A];(y&&D.isSelected||_&&D.isHovered)&&(D.modelType===_t.LINE_EDGE?x.push(this.getLineOutline(D)):D.modelType===_t.POLYLINE_EDGE?x.push(this.getPolylineOutline(D)):D.modelType===_t.BEZIER_EDGE&&x.push(this.getBezierOutline(D)))}return x}},{key:"getLineOutline",value:function(s){var f=s.startPoint,h=s.endPoint,y=(f.x+h.x)/2,_=(f.y+h.y)/2,x=Math.abs(f.x-h.x)+10,A=Math.abs(f.y-h.y)+10,D=s.getOutlineStyle();return Object(re.g)(Po,ji({className:"lf-outline-edge",x:y,y:_,width:x,height:A},D))}},{key:"getPolylineOutline",value:function(s){var f=s.points,h=Zo(f),y=Ea(h,8),_=y.x,x=y.y,A=y.width,D=y.height,z=s.getOutlineStyle();return Object(re.g)(Po,ji({className:"lf-outline",x:_,y:x,width:A,height:D},z))}},{key:"getBezierOutline",value:function(s){var f=s.path,h=kl(f),y=Ea(h,8),_=y.x,x=y.y,A=y.width,D=y.height,z=s.getOutlineStyle();return Object(re.g)(Po,ji({className:"lf-outline",x:_,y:x,width:A,height:D},z))}},{key:"render",value:function(){return Object(re.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&zx(t.prototype,n),c}(re.a))||Yg;function Vl(e){return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function Gx(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Jg(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Jg(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Jg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Pa(e){var t=e.x,n=t===void 0?0:t,i=e.y,c=i===void 0?0:i,s=e.r,f=s===void 0?4:s,h=e.className,y={cx:n,cy:c,r:f,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(_){var x=Gx(_,2),A=x[0],D=x[1];Vl(D)!=="object"&&(y[A]=D)}),y.className=h?"lf-basic-shape ".concat(h):"lf-basic-shape",Object(re.g)("circle",y)}function Kl(e){return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function Hx(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Qg(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Qg(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Aa(){return Aa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Aa.apply(this,arguments)}function ev(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tv(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function nv(e,t,n){return t&&tv(e.prototype,t),n&&tv(e,n),e}function rv(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ql(e,t)}function ql(e,t){return ql=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ql(e,t)}function ov(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=cs(e);if(t){var c=cs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return Ux(this,n)}}function Ux(e,t){if(t&&(Kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ss(e)}function ss(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cs(e)}function Zl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iv,av=function(e){rv(n,e);var t=ov(n);function n(){var i;return ev(this,n),Zl(ss(i=t.call(this)),"dragHandler",void 0),Zl(ss(i),"onDragging",function(c){var s=c.event,f=i.props,h=f.graphModel,y=f.bezierModel,_=f.type,x=h.getPointByClient({x:s.clientX,y:s.clientY}).canvasOverlayPosition,A=x.x,D=x.y;y.updateAdjustAnchor({x:A,y:D},_)}),Zl(ss(i),"onDragEnd",function(){i.props.bezierModel.isDragging=!1}),i.dragHandler=new Zr({onDragging:i.onDragging,onDragEnd:i.onDragEnd}),i}return nv(n,[{key:"render",value:function(){var i=this,c=this.props.position,s=c.x,f=c.y,h=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(re.g)(Pa,Aa({className:"lf-bezier-adjust-anchor",x:s,y:f},h,{onMouseDown:function(y){i.dragHandler.handleMouseDown(y)}}))}}]),n}(re.a),Xx=_r(Zg=function(e){rv(n,e);var t=ov(n);function n(){return ev(this,n),t.apply(this,arguments)}return nv(n,[{key:"getBezierAdjust",value:function(i,c){var s=i.path,f=i.id,h=Hx(kl(s),4),y=h[0],_=h[1],x=h[2],A=h[3],D=i.getEdgeStyle().adjustLine,z=[];return z.push(Object(re.g)(Si,Aa({x1:y.x,y1:y.y,x2:_.x,y2:_.y},D))),z.push(Object(re.g)(av,{position:_,bezierModel:i,graphModel:c,key:"".concat(f,"_ePre"),type:"sNext"})),z.push(Object(re.g)(Si,Aa({x1:A.x,y1:A.y,x2:x.x,y2:x.y},D))),z.push(Object(re.g)(av,{position:x,bezierModel:i,graphModel:c,key:"".concat(f,"_sNext"),type:"ePre"})),z}},{key:"selectedBezierEdge",value:function(){for(var i=this.props.graphModel,c=i.edges,s=[],f=0;f<c.length;f++){var h=c[f];h.isSelected&&h.modelType===_t.BEZIER_EDGE&&h.draggable&&s.push(this.getBezierAdjust(h,i))}return s}},{key:"render",value:function(){return Object(re.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(re.a))||Zg;function Jl(e){return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}function Yx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ql(e,t){return Ql=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ql(e,t)}function Kx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=ls(e);if(t){var c=ls(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return qx(this,n)}}function qx(e,t){if(t&&(Jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ls(e){return ls=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ls(e)}var uv,Zx=_r(iv=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Ql(s,f)})(c,e);var t,n,i=Kx(c);function c(){return Yx(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var s=this.props.graphModel.transformModel.getTransformStyle().transform,f=this.props.children;return Object(re.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(re.g)("g",{transform:s},f))}}])&&Vx(t.prototype,n),c}(re.a))||iv;function ef(e){return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(e)}function tf(){return tf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},tf.apply(this,arguments)}function Jx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qx(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function nf(e,t){return nf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},nf(e,t)}function eE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=fs(e);if(t){var c=fs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return tE(this,n)}}function tE(e,t){if(t&&(ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fs(e)}var nE=_r(uv=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&nf(s,f)})(c,e);var t,n,i=eE(c);function c(){return Jx(this,c),i.apply(this,arguments)}return t=c,n=[{key:"getComponent",value:function(s,f){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",y=this.props.getView,_=y(s.type);return Object(re.g)(_,{key:s.id,model:s,graphModel:f,overlay:h})}},{key:"render",value:function(){var s=this,f=this.props,h=f.graphModel,y=f.tool,_=f.options,x=f.dnd,A=f.snaplineModel,D={};_.width&&(D.width="".concat(h.width,"px")),_.height&&(D.height="".concat(h.height,"px"));var z=_.grid,U=h.fakerNode,q=h.editConfigModel.adjustEdge;return Object(re.g)("div",{className:"lf-graph","flow-id":h.flowId,style:D},Object(re.g)(dx,{graphModel:h,dnd:x},Object(re.g)("g",{className:"lf-base"},Fu(h.sortElements,function(ae){return s.getComponent(ae,h)})),U?this.getComponent(U,h):""),Object(re.g)(Zx,{graphModel:h},Object(re.g)(Wx,{graphModel:h}),q?Object(re.g)(Xx,{graphModel:h}):"",_.snapline!==!1?Object(re.g)(Cx,{snaplineModel:A}):""),Object(re.g)(bx,{graphModel:h,tool:y}),_.background&&Object(re.g)(xx,{background:_.background}),_.grid&&Object(re.g)(Gg,tf({},z,{graphModel:h})))}}],n&&Qx(t.prototype,n),c}(re.a))||uv,rE=nE;function sv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function ps(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sv(Object(n),!0).forEach(function(i){Qr(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sv(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function oE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Qr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iE=function(){function e(i){var c=this;(function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),Qr(this,"nodeConfig",void 0),Qr(this,"lf",void 0),Qr(this,"fakerNode",void 0),Qr(this,"stopDrag",function(){c.nodeConfig=null,window.document.removeEventListener("mouseup",c.stopDrag)}),Qr(this,"dragEnter",function(f){c.nodeConfig&&!c.fakerNode&&(c.fakerNode=c.lf.createFakerNode(ps(ps({},c.nodeConfig),c.clientToLocalPoint({x:f.clientX,y:f.clientY}))))}),Qr(this,"onDragOver",function(f){if(f.preventDefault(),c.fakerNode){var h=c.clientToLocalPoint({x:f.clientX,y:f.clientY}),y=h.x,_=h.y;c.fakerNode.moveTo(y,_);var x=c.fakerNode.getData();c.lf.setNodeSnapLine(x),c.lf.graphModel.eventCenter.emit(ot.NODE_DND_DRAG,{data:x})}return!1}),Qr(this,"onDragLeave",function(){c.fakerNode&&(c.lf.removeNodeSnapLine(),c.lf.graphModel.removeFakerNode(),c.fakerNode=null)}),Qr(this,"onDrop",function(f){c.lf.graphModel&&f&&c.nodeConfig&&(c.lf.addNode(ps(ps({},c.nodeConfig),c.clientToLocalPoint({x:f.clientX,y:f.clientY})),ot.NODE_DND_ADD,f),f.preventDefault(),f.stopPropagation(),c.nodeConfig=null,c.lf.removeNodeSnapLine(),c.lf.graphModel.removeFakerNode(),c.fakerNode=null)});var s=i.lf;this.lf=s}var t,n;return t=e,(n=[{key:"clientToLocalPoint",value:function(i){var c=i.x,s=i.y,f=Oh(this.lf.options,["grid","size"]),h=this.lf.graphModel.getPointByClient({x:c,y:s}).canvasOverlayPosition,y=h.x,_=h.y;return{x:xo(y,f),y:xo(_,f)}}},{key:"startDrag",value:function(i){this.nodeConfig=i,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}}}])&&oE(t.prototype,n),e}();function cv(e){var t=e.container,n=e.grid,i=e.width,c=e.height;if(!t)throw new Error("请检查 container 参数是否有效");if(typeof i=="string"||typeof c=="string")throw new Error("width或height不支持传入字符串,请传数字");return n&&(e.grid=xn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),xn({},fv,e)}var jt,lv,fv={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function rf(e){return rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rf(e)}function of(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return pv(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return pv(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function pv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function dv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(n),!0).forEach(function(i){hv(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dv(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function aE(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function uE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ta(){return Ta=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=cE(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},Ta.apply(this,arguments)}function cE(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ao(e))!==null;);return e}function af(e,t){return af=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},af(e,t)}function lE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ao(e);if(t){var c=Ao(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return fE(this,n)}}function fE(e,t){if(t&&(rf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hs(e)}function hs(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ao(e){return Ao=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ao(e)}function hv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vr(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var uf=(jt=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&af(s,f)})(c,e);var t,n,i=lE(c);function c(){var s;uE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return hv(hs(s=i.call.apply(i,[this].concat(h))),"modelType",_t.BEZIER_EDGE),aE(hs(s),"path",lv,hs(s)),s}return t=c,(n=[{key:"initEdgeData",value:function(s){this.offset=100,Ta(Ao(c.prototype),"initEdgeData",this).call(this,s)}},{key:"getEdgeStyle",value:function(){var s=this.graphModel.theme.bezier;return ds(ds({},Ta(Ao(c.prototype),"getEdgeStyle",this).call(this)),Xt(s))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var s=0,f=0;return this.pointsList.forEach(function(h){var y=h.x,_=h.y;s+=y,f+=_}),{x:s/this.pointsList.length,y:f/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 s=Ta(Ao(c.prototype),"getData",this).call(this),f=this.pointsList.map(function(h){return{x:h.x,y:h.y}});return ds(ds({},s),{},{pointsList:f})}},{key:"getControls",value:function(){var s=this.startPoint,f=this.endPoint;return bg({start:s,end:f,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(s){var f=of(s,4),h=f[0],y=f[1],_=f[2],x=f[3];return"M ".concat(h.x," ").concat(h.y,`
|
||
C `).concat(y.x," ").concat(y.y,`,
|
||
`).concat(_.x," ").concat(_.y,`,
|
||
`).concat(x.x," ").concat(x.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var s=this.getControls(),f=s.sNext,h=s.ePre;this.updatePath(f,h)}},{key:"updatePath",value:function(s,f){s=Xt(s),f=Xt(f);var h={x:this.startPoint.x,y:this.startPoint.y},y={x:this.endPoint.x,y:this.endPoint.y};if(!s||!f){var _=this.getControls();s=_.sNext,f=_.ePre}this.pointsList=[h,s,f,y],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(s){this.startPoint=s,this.updatePoints()}},{key:"updateEndPoint",value:function(s){this.endPoint=s,this.updatePoints()}},{key:"moveStartPoint",value:function(s,f){this.startPoint.x+=s,this.startPoint.y+=f;var h=of(this.pointsList,3),y=h[1],_=h[2];y.x+=s,y.y+=f,this.updatePath(y,_)}},{key:"moveEndPoint",value:function(s,f){this.endPoint.x+=s,this.endPoint.y+=f;var h=of(this.pointsList,3),y=h[1],_=h[2];_.x+=s,_.y+=f,this.updatePath(y,_)}},{key:"updateAdjustAnchor",value:function(s,f){f==="sNext"?this.pointsList[1]=s:f==="ePre"&&(this.pointsList[2]=s),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 s=this.pointsList;return s[s.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(s){var f=s.startPoint,h=s.endPoint,y=s.sourceNode,_=s.targetNode,x=bg({start:f,end:h,sourceNode:y,targetNode:_,offset:this.offset}),A=x.sNext,D=x.ePre;this.pointsList=[f,A,D,h],this.initPoints()}}])&&sE(t.prototype,n),c}(bl),lv=vr(jt.prototype,"path",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),vr(jt.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"initPoints"),jt.prototype),vr(jt.prototype,"updatePoints",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"updatePoints"),jt.prototype),vr(jt.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"updateStartPoint"),jt.prototype),vr(jt.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"updateEndPoint"),jt.prototype),vr(jt.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"moveStartPoint"),jt.prototype),vr(jt.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"moveEndPoint"),jt.prototype),vr(jt.prototype,"updateAdjustAnchor",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"updateAdjustAnchor"),jt.prototype),vr(jt.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"getAdjustStart"),jt.prototype),vr(jt.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"getAdjustEnd"),jt.prototype),vr(jt.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(jt.prototype,"updateAfterAdjustStartAndEnd"),jt.prototype),jt),Re,yv,gv,vv,bv,mv,_v,Ov,wv,xv,Ev,Sv,jv,Pv,Av,Tv,Mv,kv,Dv,Nv,pE=function(e){return e==null};function sf(e){return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function dE(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(y,_){if(y){if(typeof y=="string")return Rv(y,_);var x=Object.prototype.toString.call(y).slice(8,-1);if(x==="Object"&&y.constructor&&(x=y.constructor.name),x==="Map"||x==="Set")return Array.from(y);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return Rv(y,_)}}(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,c=function(){};return{s:c,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(y){throw y},f:c}}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 s,f=!0,h=!1;return{s:function(){n=n.call(e)},n:function(){var y=n.next();return f=y.done,y},e:function(y){h=!0,s=y},f:function(){try{f||n.return==null||n.return()}finally{if(h)throw s}}}}function Rv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Cv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cv(Object(n),!0).forEach(function(i){In(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cv(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function sn(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function hE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bt(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var eo,Iv,to=(Re=function(){function e(i,c){(function(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),In(this,"id",""),sn(this,"type",yv,this),sn(this,"x",gv,this),sn(this,"y",vv,this),sn(this,"text",bv,this),sn(this,"properties",mv,this),sn(this,"_width",_v,this),sn(this,"_height",Ov,this),sn(this,"anchorsOffset",wv,this),sn(this,"isSelected",xv,this),sn(this,"isHovered",Ev,this),sn(this,"isShowAnchor",Sv,this),sn(this,"isDragging",jv,this),sn(this,"isHitable",Pv,this),sn(this,"draggable",Av,this),sn(this,"visible",Tv,this),In(this,"virtual",!1),In(this,"graphModel",void 0),sn(this,"zIndex",Mv,this),sn(this,"state",kv,this),sn(this,"autoToFront",Dv,this),sn(this,"style",Nv,this),In(this,"BaseType",rn.NODE),In(this,"modelType",_t.NODE),In(this,"additionStateData",void 0),In(this,"targetRules",[]),In(this,"sourceRules",[]),In(this,"moveRules",[]),In(this,"hasSetTargetRules",!1),In(this,"hasSetSourceRules",!1),this.graphModel=c,this.initNodeData(i),this.setAttributes()}var t,n;return t=e,n=[{key:"width",get:function(){return this._width},set:function(i){this._width=i}},{key:"height",get:function(){return this._height},set:function(i){this._height=i}},{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(i){if(i.properties||(i.properties={}),!i.id){var c=this.graphModel.idGenerator,s=c&&c(i.type),f=this.createId();i.id=f||s||Eo()}this.formatText(i),xn(this,function(h){return va(h,["id","type","x","y","text","properties","virtual"])}(i)),this.graphModel.overlapMode===Xn.INCREASE&&(this.zIndex=i.zIndex||gl())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(i){i.text||(i.text={value:"",x:i.x,y:i.y,draggable:!1,editable:!0}),i.text&&typeof i.text=="string"?i.text={value:i.text,x:i.x,y:i.y,draggable:!1,editable:!0}:i.text&&i.text.editable===void 0&&(i.text.editable=!0)}},{key:"getData",value:function(){var i=this.text,c=i.x,s=i.y,f=i.value,h=this.properties;Object(d.x)(h)&&(h=Object(d.I)(h));var y={id:this.id,type:this.type,x:this.x,y:this.y,properties:h};return this.graphModel.overlapMode===Xn.INCREASE&&(y.zIndex=this.zIndex),f&&(y.text={x:c,y:s,value:f}),y}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(d.I)(this.properties)}},{key:"getNodeStyle",value:function(){return Sn(Sn({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var i=this.graphModel.theme.nodeText;return Xt(i)}},{key:"getAnchorStyle",value:function(i){var c=this.graphModel.theme.anchor;return Xt(c)}},{key:"getAnchorLineStyle",value:function(i){var c=this.graphModel.theme.anchorLine;return Xt(c)}},{key:"getOutlineStyle",value:function(){var i=this.graphModel.theme.outline;return Xt(i)}},{key:"isAllowConnectedAsSource",value:function(i,c,s,f){var h=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var y,_=!0,x=0;x<h.length;x++){var A=h[x];if(!A.validate.call(this,this,i,c,s,f)){_=!1,y=A.message;break}}return{isAllPass:_,msg:y}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(i,c,s,f){var h=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var y,_=!0,x=0;x<h.length;x++){var A=h[x];if(!A.validate.call(this,i,this,c,s,f)){_=!1,y=A.message;break}}return{isAllPass:_,msg:y}}},{key:"isAllowMoveNode",value:function(i,c){var s,f=!0,h=!0,y=dE(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(y.s();!(s=y.n()).done;){var _=(0,s.value)(this,i,c);if(!_)return!1;if(sf(_)==="object"){var x=_;if(x.x===!1&&x.y===!1)return!1;f=f&&x.x,h=h&&x.y}}}catch(A){y.e(A)}finally{y.f()}return{x:f,y:h}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var i=this.anchorsOffset,c=this.id,s=this.x,f=this.y;return i&&i.length>0?i.map(function(h,y){return h.length?(h=h,{id:"".concat(c,"_").concat(y),x:s+h[0],y:f+h[1]}):Sn(Sn({},h=h),{},{x:s+h.x,y:f+h.y,id:h.id||"".concat(c,"_").concat(y)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(i){return function(c,s){for(var f,h=dl(s),y=Number.MAX_SAFE_INTEGER,_=0;_<h.length;_++){var x=gr(c.x,c.y,h[_].x,h[_].y);x<y&&(y=x,f={index:_,anchor:wy(wy({},h[_]),{},{x:h[_].x,y:h[_].y,id:h[_].id})})}return f}(i,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(i){if(!pE(i))for(var c=0;c<this.anchors.length;c++){var s=this.anchors[c];if(s.id===i)return s}}},{key:"addNodeMoveRules",value:function(i){this.moveRules.includes(i)||this.moveRules.push(i)}},{key:"move",value:function(i,c){var s=arguments.length>2&&arguments[2]!==void 0&&arguments[2],f=!1,h=!1;if(s)f=!0,h=!0;else{var y=this.isAllowMoveNode(i,c);typeof y=="boolean"?(f=y,h=y):(f=y.x,h=y.y)}if(f){var _=this.x+i;this.x=_,this.text&&this.moveText(i,0)}if(h){var x=this.y+c;this.y=x,this.text&&this.moveText(0,c)}return f||h}},{key:"getMoveDistance",value:function(i,c){var s=arguments.length>2&&arguments[2]!==void 0&&arguments[2],f=!1,h=!1,y=0,_=0;if(s)f=!0,h=!0;else{var x=this.isAllowMoveNode(i,c);typeof x=="boolean"?(f=x,h=x):(f=x.x,h=x.y)}if(f&&i){var A=this.x+i;this.x=A,this.text&&this.moveText(i,0),y=i}if(h&&c){var D=this.y+c;this.y=D,this.text&&this.moveText(0,c),_=c}return[y,_]}},{key:"moveTo",value:function(i,c){var s=arguments.length>2&&arguments[2]!==void 0&&arguments[2],f=i-this.x,h=c-this.y;return!(!s&&!this.isAllowMoveNode(f,h)||(this.text&&this.text&&this.moveText(f,h),this.x=i,this.y=c,0))}},{key:"moveText",value:function(i,c){var s=this.text,f=s.x,h=s.y,y=s.value,_=s.draggable,x=s.editable;this.text={value:y,editable:x,draggable:_,x:f+i,y:h+c}}},{key:"updateText",value:function(i){this.text=Sn(Sn({},Object(d.I)(this.text)),{},{value:i})}},{key:"setSelected",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=i}},{key:"setHovered",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=i,this.setIsShowAnchor(i)}},{key:"setIsShowAnchor",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=i}},{key:"setHitable",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=i}},{key:"setElementState",value:function(i,c){this.state=i,this.additionStateData=c}},{key:"setProperty",value:function(i,c){this.properties=Sn(Sn({},Object(d.I)(this.properties)),{},In({},i,vn(c))),this.setAttributes()}},{key:"setProperties",value:function(i){this.properties=Sn(Sn({},Object(d.I)(this.properties)),vn(i)),this.setAttributes()}},{key:"deleteProperty",value:function(i){delete this.properties[i],this.setAttributes()}},{key:"setStyle",value:function(i,c){this.style=Sn(Sn({},this.style),{},In({},i,vn(c)))}},{key:"setStyles",value:function(i){this.style=Sn(Sn({},this.style),vn(i))}},{key:"updateStyles",value:function(i){this.style=Sn({},vn(i))}},{key:"setZIndex",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.zIndex=i}},{key:"updateAttributes",value:function(i){xn(this,i)}}],n&&hE(t.prototype,n),e}(),yv=bt(Re.prototype,"type",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),gv=bt(Re.prototype,"x",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),vv=bt(Re.prototype,"y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),bv=bt(Re.prototype,"text",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),mv=bt(Re.prototype,"properties",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),_v=bt(Re.prototype,"_width",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Ov=bt(Re.prototype,"_height",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),wv=bt(Re.prototype,"anchorsOffset",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),xv=bt(Re.prototype,"isSelected",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ev=bt(Re.prototype,"isHovered",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Sv=bt(Re.prototype,"isShowAnchor",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),jv=bt(Re.prototype,"isDragging",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Pv=bt(Re.prototype,"isHitable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Av=bt(Re.prototype,"draggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Tv=bt(Re.prototype,"visible",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Mv=bt(Re.prototype,"zIndex",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),kv=bt(Re.prototype,"state",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Dv=bt(Re.prototype,"autoToFront",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Nv=bt(Re.prototype,"style",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),bt(Re.prototype,"incoming",[d.m],Object.getOwnPropertyDescriptor(Re.prototype,"incoming"),Re.prototype),bt(Re.prototype,"outgoing",[d.m],Object.getOwnPropertyDescriptor(Re.prototype,"outgoing"),Re.prototype),bt(Re.prototype,"addNodeMoveRules",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"addNodeMoveRules"),Re.prototype),bt(Re.prototype,"move",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"move"),Re.prototype),bt(Re.prototype,"getMoveDistance",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"getMoveDistance"),Re.prototype),bt(Re.prototype,"moveTo",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"moveTo"),Re.prototype),bt(Re.prototype,"moveText",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"moveText"),Re.prototype),bt(Re.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"updateText"),Re.prototype),bt(Re.prototype,"setSelected",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setSelected"),Re.prototype),bt(Re.prototype,"setHovered",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setHovered"),Re.prototype),bt(Re.prototype,"setIsShowAnchor",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setIsShowAnchor"),Re.prototype),bt(Re.prototype,"setHitable",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setHitable"),Re.prototype),bt(Re.prototype,"setElementState",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setElementState"),Re.prototype),bt(Re.prototype,"setProperty",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setProperty"),Re.prototype),bt(Re.prototype,"setProperties",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setProperties"),Re.prototype),bt(Re.prototype,"deleteProperty",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"deleteProperty"),Re.prototype),bt(Re.prototype,"setStyle",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setStyle"),Re.prototype),bt(Re.prototype,"setStyles",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setStyles"),Re.prototype),bt(Re.prototype,"updateStyles",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"updateStyles"),Re.prototype),bt(Re.prototype,"setZIndex",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"setZIndex"),Re.prototype),bt(Re.prototype,"updateAttributes",[d.k],Object.getOwnPropertyDescriptor(Re.prototype,"updateAttributes"),Re.prototype),Re);function cf(e){return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function Lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Bv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(n),!0).forEach(function(i){zv(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lv(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function yE(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function gE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function lf(){return lf=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=bE(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},lf.apply(this,arguments)}function bE(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Pi(e))!==null;);return e}function ff(e,t){return ff=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ff(e,t)}function mE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Pi(e);if(t){var c=Pi(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return _E(this,n)}}function _E(e,t){if(t&&(cf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ys(e)}function ys(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pi(e){return Pi=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Pi(e)}function zv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pf(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var bn,Fv,$v,df=(eo=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&ff(s,f)})(c,e);var t,n,i=mE(c);function c(){var s;gE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return zv(ys(s=i.call.apply(i,[this].concat(h))),"modelType",_t.CIRCLE_NODE),yE(ys(s),"r",Iv,ys(s)),s}return t=c,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var s=lf(Pi(c.prototype),"getNodeStyle",this).call(this),f=this.graphModel.theme.circle;return Bv(Bv({},s),Xt(f))}},{key:"getDefaultAnchor",value:function(){var s=this.x,f=this.y,h=this.r;return[{x:s,y:f-h,id:"".concat(this.id,"_0")},{x:s+h,y:f,id:"".concat(this.id,"_1")},{x:s,y:f+h,id:"".concat(this.id,"_2")},{x:s-h,y:f,id:"".concat(this.id,"_3")}]}}])&&vE(t.prototype,n),c}(to),Iv=pf(eo.prototype,"r",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),pf(eo.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(eo.prototype,"width"),eo.prototype),pf(eo.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(eo.prototype,"height"),eo.prototype),eo);o(127);function hf(e){return hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hf(e)}function yf(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Wv(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Wv(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Wv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Hv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(n),!0).forEach(function(i){Xv(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Uv(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function OE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gf(){return gf=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=xE(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},gf.apply(this,arguments)}function xE(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ti(e))!==null;);return e}function vf(e,t){return vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vf(e,t)}function EE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ti(e);if(t){var c=Ti(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return SE(this,n)}}function SE(e,t){if(t&&(hf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ai(e)}function Ai(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ti(e){return Ti=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ti(e)}function Xv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mi(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var Rr,Yv,Vv,bf=(bn=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&vf(s,f)})(c,e);var t,n,i=EE(c);function c(){var s;OE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return Xv(Ai(s=i.call.apply(i,[this].concat(h))),"modelType",_t.DIAMOND_NODE),Uv(Ai(s),"rx",Fv,Ai(s)),Uv(Ai(s),"ry",$v,Ai(s)),s}return t=c,(n=[{key:"getNodeStyle",value:function(){var s=gf(Ti(c.prototype),"getNodeStyle",this).call(this),f=this.graphModel.theme.diamond;return Hv(Hv({},s),Xt(f))}},{key:"points",get:function(){var s=this.x,f=this.y,h=this.rx,y=this.ry;return[[s,f-y],[s+h,f],[s,f+y],[s-h,f]]}},{key:"pointsPosition",get:function(){return this.points.map(function(s){return{x:s[0],y:s[1]}})}},{key:"width",get:function(){var s=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var y=yf(h,1)[0];y<s&&(s=y),y>f&&(f=y)}),f-s}},{key:"height",get:function(){var s=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var y=yf(h,2)[1];y<s&&(s=y),y>f&&(f=y)}),f-s}},{key:"getDefaultAnchor",value:function(){var s=this;return this.points.map(function(f,h){var y=yf(f,2);return{x:y[0],y:y[1],id:"".concat(s.id,"_").concat(h)}})}}])&&wE(t.prototype,n),c}(to),Fv=Mi(bn.prototype,"rx",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),$v=Mi(bn.prototype,"ry",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Mi(bn.prototype,"points",[d.m],Object.getOwnPropertyDescriptor(bn.prototype,"points"),bn.prototype),Mi(bn.prototype,"pointsPosition",[d.m],Object.getOwnPropertyDescriptor(bn.prototype,"pointsPosition"),bn.prototype),Mi(bn.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(bn.prototype,"width"),bn.prototype),Mi(bn.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(bn.prototype,"height"),bn.prototype),bn);function mf(e){return mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(e)}function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function qv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kv(Object(n),!0).forEach(function(i){Jv(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Zv(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function jE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _f(){return _f=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=AE(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},_f.apply(this,arguments)}function AE(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Di(e))!==null;);return e}function Of(e,t){return Of=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Of(e,t)}function TE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Di(e);if(t){var c=Di(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return ME(this,n)}}function ME(e,t){if(t&&(mf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ki(e)}function ki(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Di(e){return Di=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Di(e)}function Jv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gs(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var or,Qv,wf=(Rr=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Of(s,f)})(c,e);var t,n,i=TE(c);function c(){var s;jE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return Jv(ki(s=i.call.apply(i,[this].concat(h))),"modelType",_t.ELLIPSE_NODE),Zv(ki(s),"rx",Yv,ki(s)),Zv(ki(s),"ry",Vv,ki(s)),s}return t=c,(n=[{key:"getNodeStyle",value:function(){var s=_f(Di(c.prototype),"getNodeStyle",this).call(this),f=this.graphModel.theme.ellipse;return qv(qv({},s),Xt(f))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var s=this.x,f=this.y,h=this.rx,y=this.ry;return[{x:s,y:f-y,id:"".concat(this.id,"_0")},{x:s+h,y:f,id:"".concat(this.id,"_1")},{x:s,y:f+y,id:"".concat(this.id,"_2")},{x:s-h,y:f,id:"".concat(this.id,"_3")}]}}])&&PE(t.prototype,n),c}(to),Yv=gs(Rr.prototype,"rx",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Vv=gs(Rr.prototype,"ry",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),gs(Rr.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"width"),Rr.prototype),gs(Rr.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"height"),Rr.prototype),Rr);function xf(e){return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xf(e)}function Ef(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return eb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return eb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function eb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function tb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function nb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tb(Object(n),!0).forEach(function(i){rb(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function kE(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function DE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Sf(){return Sf=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=RE(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},Sf.apply(this,arguments)}function RE(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ni(e))!==null;);return e}function jf(e,t){return jf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},jf(e,t)}function CE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ni(e);if(t){var c=Ni(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return IE(this,n)}}function IE(e,t){if(t&&(xf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vs(e)}function vs(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ni(e){return Ni=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ni(e)}function rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bs(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var Pf,ob,Af=(or=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&jf(s,f)})(c,e);var t,n,i=CE(c);function c(){var s;DE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return rb(vs(s=i.call.apply(i,[this].concat(h))),"modelType",_t.POLYGON_NODE),kE(vs(s),"points",Qv,vs(s)),s}return t=c,(n=[{key:"getNodeStyle",value:function(){var s=Sf(Ni(c.prototype),"getNodeStyle",this).call(this),f=this.graphModel.theme.polygon;return nb(nb({},s),Xt(f))}},{key:"pointsPosition",get:function(){var s=this.x,f=this.y,h=this.width,y=this.height;return this.points.map(function(_){return{x:_[0]+s-h/2,y:_[1]+f-y/2}})}},{key:"width",get:function(){var s=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var y=Ef(h,1)[0];y<s&&(s=y),y>f&&(f=y)}),f-s}},{key:"height",get:function(){var s=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var y=Ef(h,2)[1];y<s&&(s=y),y>f&&(f=y)}),f-s}},{key:"getDefaultAnchor",value:function(){var s=this,f=this.x,h=this.y,y=this.width,_=this.height;return this.points.map(function(x,A){var D=Ef(x,2),z=D[0],U=D[1];return{x:f+z-y/2,y:h+U-_/2,id:"".concat(s.id,"_").concat(A)}})}}])&&NE(t.prototype,n),c}(to),Qv=bs(or.prototype,"points",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),bs(or.prototype,"pointsPosition",[d.m],Object.getOwnPropertyDescriptor(or.prototype,"pointsPosition"),or.prototype),bs(or.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(or.prototype,"width"),or.prototype),bs(or.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(or.prototype,"height"),or.prototype),or);function Tf(e){return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}function ib(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function ab(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ib(Object(n),!0).forEach(function(i){ub(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ib(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function LE(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function BE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Mf(){return Mf=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=FE(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},Mf.apply(this,arguments)}function FE(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ri(e))!==null;);return e}function kf(e,t){return kf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},kf(e,t)}function $E(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ri(e);if(t){var c=Ri(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return WE(this,n)}}function WE(e,t){if(t&&(Tf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ms(e)}function ms(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ri(e){return Ri=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ri(e)}function ub(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var To,Df=(Pf=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&kf(s,f)})(c,e);var t,n,i=$E(c);function c(){var s;BE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return ub(ms(s=i.call.apply(i,[this].concat(h))),"modelType",_t.RECT_NODE),LE(ms(s),"radius",ob,ms(s)),s}return t=c,(n=[{key:"getDefaultAnchor",value:function(){var s=this.x,f=this.y,h=this.width,y=this.height;return[{x:s,y:f-y/2,id:"".concat(this.id,"_0")},{x:s+h/2,y:f,id:"".concat(this.id,"_1")},{x:s,y:f+y/2,id:"".concat(this.id,"_2")},{x:s-h/2,y:f,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var s=Mf(Ri(c.prototype),"getNodeStyle",this).call(this),f=this.graphModel.theme.rect;return ab(ab({},s),Xt(f))}}])&&zE(t.prototype,n),c}(to),ob=function(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}(Pf.prototype,"radius",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Pf);function Nf(e){return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function sb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function cb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sb(Object(n),!0).forEach(function(i){fb(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function GE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Rf(){return Rf=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var i=UE(e,t);if(i){var c=Object.getOwnPropertyDescriptor(i,t);return c.get?c.get.call(arguments.length<3?e:n):c.value}},Rf.apply(this,arguments)}function UE(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ci(e))!==null;);return e}function Cf(e,t){return Cf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Cf(e,t)}function XE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ci(e);if(t){var c=Ci(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return YE(this,n)}}function YE(e,t){if(t&&(Nf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lb(e)}function lb(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ci(e){return Ci=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ci(e)}function fb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pb(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var If=(To=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Cf(s,f)})(c,e);var t,n,i=XE(c);function c(){var s;GE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return fb(lb(s=i.call.apply(i,[this].concat(h))),"modelType",_t.TEXT_NODE),s}return t=c,(n=[{key:"getTextStyle",value:function(){var s=Rf(Ci(c.prototype),"getTextStyle",this).call(this),f=this.graphModel.theme.text;return cb(cb({},s),Xt(f))}},{key:"width",get:function(){var s=String(this.text.value).split(/[\r\n]/g),f=this.getTextStyle().fontSize;return yl({rows:s,fontSize:f,rowsLength:s.length}).width}},{key:"height",get:function(){var s=String(this.text.value).split(/[\r\n]/g),f=this.getTextStyle().fontSize;return yl({rows:s,fontSize:f,rowsLength:s.length}).height}}])&&HE(t.prototype,n),c}(to),pb(To.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(To.prototype,"width"),To.prototype),pb(To.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(To.prototype,"height"),To.prototype),To);function Lf(e){return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function VE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Bf(e,t){return Bf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Bf(e,t)}function qE(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=_s(e);if(t){var c=_s(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return ZE(this,n)}}function ZE(e,t){if(t&&(Lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return db(e)}function db(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _s(e){return _s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_s(e)}function JE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var br,hb,yb,gb,zf=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Bf(s,f)})(c,e);var t,n,i=qE(c);function c(){var s;VE(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return JE(db(s=i.call.apply(i,[this].concat(h))),"modelType",_t.HTML_NODE),s}return t=c,(n=[{key:"getDefaultAnchor",value:function(){var s=this.x,f=this.y,h=this.width,y=this.height;return[{x:s,y:f-y/2,id:"".concat(this.id,"_0")},{x:s+h/2,y:f,id:"".concat(this.id,"_1")},{x:s,y:f+y/2,id:"".concat(this.id,"_2")},{x:s-h/2,y:f,id:"".concat(this.id,"_3")}]}}])&&KE(t.prototype,n),c}(to);function vb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Ff(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function QE(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function bb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ma(e,t,n,i,c){var s={};return Object.keys(i).forEach(function(f){s[f]=i[f]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=n.slice().reverse().reduce(function(f,h){return h(e,t,f)||f},s),c&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(c):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(e,t,s),s=null),s}var mb=(br=function(){function e(i){(function(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")})(this,e),bb(this,"graphModel",void 0),Ff(this,"isShowHorizontal",hb,this),Ff(this,"isShowVertical",yb,this),Ff(this,"position",gb,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=i}var t,n;return t=e,n=[{key:"getStyle",value:function(){return function(i){for(var c=1;c<arguments.length;c++){var s=arguments[c]!=null?arguments[c]:{};c%2?vb(Object(s),!0).forEach(function(f){bb(i,f,s[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):vb(Object(s)).forEach(function(f){Object.defineProperty(i,f,Object.getOwnPropertyDescriptor(s,f))})}return i}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(i,c){for(var s=i.x,f=i.y,h=!1,y=!1,_=0;_<c.length;_++){var x=c[_];if(x.id!==i.id&&(s===x.x&&(h=!0),f===x.y&&(y=!0),h&&y))break}return{isShowVertical:h,isShowHorizontal:y,position:{x:s,y:f}}}},{key:"getHorizontalSnapline",value:function(i,c){var s,f,h=!1,y=i.id;if(y){var _=this.graphModel.fakerNode;if(_&&_.id===y)f=Yn(_);else{var x=this.graphModel.getNodeModelById(y);f=Yn(x)}}for(var A=0;A<c.length;A++){var D=c[A];if(D.id!==i.id){var z=Yn(D);if(z.minY===f.minY||z.maxY===f.minY){h=!0,s=f.minY;break}if(z.minY===f.maxY||z.maxY===f.maxY){h=!0,s=f.maxY;break}}}return xn({isShowHorizontal:h,position:{y:s}})}},{key:"getVerticalSnapline",value:function(i,c){var s,f,h=!1,y=i.id;if(y){var _=this.graphModel.fakerNode;if(_&&_.id===y)f=Yn(_);else{var x=this.graphModel.getNodeModelById(y);f=Yn(x)}}for(var A=0;A<c.length;A++){var D=c[A];if(D.id!==i.id){var z=Yn(D);if(z.minX===f.minX||z.maxX===f.minX){h=!0,s=f.minX;break}if(z.minX===f.maxX||z.maxX===f.maxX){h=!0,s=f.maxX;break}}}return xn({isShowVertical:h,position:{x:s}})}},{key:"getSnapLinePosition",value:function(i,c){var s=this.getCenterSnapLine(i,c),f=s.isShowHorizontal,h=s.isShowVertical;if(!f){var y=this.getHorizontalSnapline(i,c);y.isShowHorizontal&&(s.isShowHorizontal=y.isShowHorizontal,s.position.y=y.position.y)}if(!h){var _=this.getVerticalSnapline(i,c);_.isShowVertical&&(s.isShowVertical=_.isShowVertical,s.position.x=_.position.x)}return s}},{key:"setSnaplineInfo",value:function(i){var c=i.isShowHorizontal,s=i.isShowVertical,f=i.position;this.position=f,this.isShowHorizontal=c,this.isShowVertical=s}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(i){var c=this.graphModel.nodes,s=this.getSnapLinePosition(i,c);this.setSnaplineInfo(s)}}],n&&QE(t.prototype,n),e}(),hb=Ma(br.prototype,"isShowHorizontal",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yb=Ma(br.prototype,"isShowVertical",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),gb=Ma(br.prototype,"position",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ma(br.prototype,"clearSnapline",[d.k],Object.getOwnPropertyDescriptor(br.prototype,"clearSnapline"),br.prototype),Ma(br.prototype,"setNodeSnapLine",[d.k],Object.getOwnPropertyDescriptor(br.prototype,"setNodeSnapLine"),br.prototype),br),ka=new Map,_b=function(e){var t=Eo(),n=window.requestAnimationFrame(function i(){if(e(),ka.get(t)){var c=window.requestAnimationFrame(i);ka.set(t,c)}});return ka.set(t,n),t},Os=function(e){var t=ka.get(e);t&&(window.cancelAnimationFrame(t),ka.delete(e))};function $f(e){return $f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(e)}function Da(){return Da=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Da.apply(this,arguments)}function Ob(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function ws(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ob(Object(n),!0).forEach(function(i){Ir(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ob(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function eS(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return wb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return wb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function wb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function tS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wf(e,t){return Wf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Wf(e,t)}function nS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=xs(e);if(t){var c=xs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return rS(this,n)}}function rS(e,t){if(t&&($f(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cr(e)}function Cr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},xs(e)}function Ir(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oS=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Wf(s,f)})(c,e);var t,n,i=nS(c);function c(){var s;return function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}(this,c),Ir(Cr(s=i.call(this)),"preTargetNode",void 0),Ir(Cr(s),"sourceRuleResults",void 0),Ir(Cr(s),"targetRuleResults",void 0),Ir(Cr(s),"dragHandler",void 0),Ir(Cr(s),"t",void 0),Ir(Cr(s),"onDragStart",function(f){var h=f.event,y=s.props,_=y.anchorData,x=y.nodeModel,A=y.graphModel,D=A.overlapMode;A.selectNodeById(x.id),D!==Xn.INCREASE&&x.autoToFront&&A.toFront(x.id),A.eventCenter.emit(ot.ANCHOR_DRAGSTART,{data:_,e:h,nodeModel:x}),s.setState({startX:_.x,startY:_.y,endX:_.x,endY:_.y})}),Ir(Cr(s),"onDragging",function(f){var h=f.event,y=s.props,_=y.graphModel,x=y.nodeModel,A=y.anchorData,D=_.transformModel,z=_.eventCenter,U=_.width,q=_.height,ae=_.editConfigModel,oe=ae.autoExpand,fe=ae.stopMoveGraph,_e=h.clientX,Me=h.clientY,Se=_.getPointByClient({x:_e,y:Me}),He=Se.domOverlayPosition,ke=He.x,$e=He.y,Ie=Se.canvasOverlayPosition,ht=Ie.x,Nt=Ie.y;s.t&&Os(s.t);var Pt=[];ke<10?Pt=[10,0]:ke+10>U?Pt=[-10,0]:$e<10?Pt=[0,10]:$e+10>q&&(Pt=[0,-10]),s.setState({endX:ht,endY:Nt,dragging:!0}),s.moveAnchorEnd(ht,Nt),Pt.length>0&&!fe&&oe&&(s.t=_b(function(){var Bt=eS(Pt,2),tn=Bt[0],cn=Bt[1];D.translate(tn,cn);var Pn=s.state,zr=Pn.endX,ir=Pn.endY;s.setState({endX:zr-tn,endY:ir-cn}),s.moveAnchorEnd(zr-tn,ir-cn)})),z.emit(ot.ANCHOR_DRAG,{data:A,e:h,nodeModel:x})}),Ir(Cr(s),"onDragEnd",function(f){var h=f.event;s.t&&Os(s.t),s.checkEnd(h),s.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),s.sourceRuleResults.clear(),s.targetRuleResults.clear();var y=s.props,_=y.graphModel,x=y.nodeModel,A=y.anchorData;_.eventCenter.emit(ot.ANCHOR_DRAGEND,{data:A,e:h,nodeModel:x})}),Ir(Cr(s),"checkEnd",function(f){var h=s.props,y=h.graphModel,_=h.nodeModel,x=h.anchorData,A=x.x,D=x.y,z=x.id,U=(y.edgeType,s.state),q=U.endX,ae=U.endY,oe=U.dragging,fe=Hu({x:q,y:ae},y);if(s.preTargetNode&&s.preTargetNode.state!==Tt.DEFAULT&&s.preTargetNode.setElementState(Tt.DEFAULT),oe&&fe&&fe.node){var _e=fe.node,Me=fe.anchor.id,Se="".concat(_.id,"_").concat(_e.id,"_").concat(Me,"_").concat(z),He=s.sourceRuleResults.get(Se)||{},ke=He.isAllPass,$e=He.msg,Ie=s.targetRuleResults.get(Se)||{},ht=Ie.isAllPass,Nt=Ie.msg;if(ke&&ht){_e.setElementState(Tt.DEFAULT);var Pt=y.edgeGenerator(_.getData(),y.getNodeModelById(fe.node.id).getData()),Bt=y.addEdge(ws(ws({},Pt),{},{sourceNodeId:_.id,sourceAnchorId:z,startPoint:{x:A,y:D},targetNodeId:fe.node.id,targetAnchorId:fe.anchor.id,endPoint:{x:fe.anchor.x,y:fe.anchor.y}})),tn=s.props.anchorData;y.eventCenter.emit(ot.ANCHOR_DROP,{data:tn,e:f,nodeModel:_,edgeModel:Bt})}else{var cn=_e.getData();y.eventCenter.emit(ot.CONNECTION_NOT_ALLOWED,{data:cn,msg:Nt||$e})}}}),s.sourceRuleResults=new Map,s.targetRuleResults=new Map,s.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},s.dragHandler=new Zr({onDragStart:s.onDragStart,onDragging:s.onDragging,onDragEnd:s.onDragEnd}),s}return t=c,(n=[{key:"getAnchorShape",value:function(){var s=this.props,f=s.anchorData,h=s.style,y=s.node.getAnchorShape(f);if(y)return y;var _=f.x,x=f.y,A=ws(ws({},h),h.hover);return Object(re.g)("g",null,Object(re.g)(Pa,Da({className:"lf-node-anchor-hover"},A,{x:_,y:x})),Object(re.g)(Pa,Da({className:"lf-node-anchor"},h,{x:_,y:x})))}},{key:"moveAnchorEnd",value:function(s,f){var h=this.props,y=h.graphModel,_=h.nodeModel,x=h.anchorData,A=Hu({x:s,y:f},y);if(A){var D=A.node,z=A.anchor.id;if(this.preTargetNode&&this.preTargetNode!==A.node&&this.preTargetNode.setElementState(Tt.DEFAULT),x.id===z)return;this.preTargetNode=D;var U="".concat(_.id,"_").concat(D.id,"_").concat(z,"_").concat(x.id);if(!this.targetRuleResults.has(U)){var q=A.anchor,ae=_.isAllowConnectedAsSource(D,x,q),oe=D.isAllowConnectedAsTarget(_,x,q);this.sourceRuleResults.set(U,_a(ae)),this.targetRuleResults.set(U,_a(oe))}var fe=this.sourceRuleResults.get(U).isAllPass,_e=this.targetRuleResults.get(U).isAllPass;fe&&_e?D.setElementState(Tt.ALLOW_CONNECT):D.setElementState(Tt.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Tt.DEFAULT&&this.preTargetNode.setElementState(Tt.DEFAULT)}},{key:"isShowLine",value:function(){var s=this.state,f=s.startX,h=s.startY,y=s.endX,_=s.endY;return gr(f,h,y,_)>10}},{key:"render",value:function(){var s=this,f=this.state,h=f.startX,y=f.startY,_=f.endX,x=f.endY,A=this.props,D=A.anchorData.edgeAddable,z=A.edgeStyle;return Object(re.g)("g",{className:"lf-anchor"},Object(re.g)("g",{onMouseDown:function(U){D!==!1&&s.dragHandler.handleMouseDown(U)}},this.getAnchorShape()),this.isShowLine()&&Object(re.g)(Si,Da({x1:h,y1:y,x2:_,y2:x},z,{"pointer-events":"none"})))}}])&&tS(t.prototype,n),c}(re.a);o(80);function xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function iS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xb(Object(n),!0).forEach(function(i){aS(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function aS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gf(e){return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(e)}function uS(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Eb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Eb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Eb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Sb(e){var t=e.x,n=t===void 0?0:t,i=e.y,c=i===void 0?0:i,s=e.value,f=e.fontSize,h=e.fill,y=h===void 0?"currentColor":h,_=e.overflowMode,x=_===void 0?"default":_,A=e.textWidth,D=A===void 0?"":A,z=e.model,U={textAnchor:"middle","dominant-baseline":"middle",x:n,y:c,fill:y};if(Object.entries(e).forEach(function(Me){var Se=uS(Me,2),He=Se[0],ke=Se[1];Gf(ke)!=="object"&&(U[He]=ke)}),s){var q=String(s).split(/[\r\n]/g),ae=q.length;if(x!=="default"){var oe=z.BaseType,fe=z.modelType;if(oe===rn.NODE&&fe!==_t.TEXT_NODE||oe===rn.EDGE&&D)return function(Me){var Se=Me.value,He=Me.fontSize,ke=Me.model,$e=Me.fontFamily,Ie=$e===void 0?"":$e,ht=Me.lineHeight,Nt=Me.wrapPadding,Pt=Nt===void 0?"0, 0":Nt,Bt=Me.overflowMode,tn=Me.x,cn=Me.y,Pn=ke.width,zr=ke.textHeight,ir=Me.textWidth||Pn,Bi=String(Se).split(/[\r\n]/g),Xs=Bi.length,Ys=Vy({rows:Bi,style:{fontSize:"".concat(He,"px"),width:"".concat(ir,"px"),fontFamily:Ie,lineHeight:ht,padding:Pt},rowsLength:Xs,className:"lf-get-text-height"}),ti=ke.height>Ys?ke.height:Ys;zr&&(ti=zr);var Do=Bt==="ellipsis";return Do&&(ti=He+2),Object(re.g)("g",null,Object(re.g)("foreignObject",{width:ir,height:ti,x:tn-ir/2,y:cn-ti/2},Object(re.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:ti,width:ir,padding:Pt}},Object(re.g)("div",{className:Do?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Do?Bi.join(""):"",style:iS({},Me)},Bi.map(function(No){return Object(re.g)("div",{className:"lf-node-text--auto-wrap-inner"},No)})))))}(e)}if(ae>1){var _e=q.map(function(Me,Se){var He=(Se-(ae-1)/2)*(f+2);return Object(re.g)("tspan",{className:"lf-text-tspan",x:n,y:c+He},Me)});return Object(re.g)("text",U,_e)}return Object(re.g)("text",U,s)}}function Hf(e){return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function Uf(){return Uf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Uf.apply(this,arguments)}function sS(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return jb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return jb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function cS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Xf(e,t){return Xf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Xf(e,t)}function lS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Es(e);if(t){var c=Es(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return fS(this,n)}}function fS(e,t){if(t&&(Hf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mo(e)}function Mo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Es(e){return Es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Es(e)}function Jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pb=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Xf(s,f)})(c,e);var t,n,i=lS(c);function c(s){var f;(function(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")})(this,c),Jo(Mo(f=i.call(this)),"dragHandler",void 0),Jo(Mo(f),"sumDeltaX",0),Jo(Mo(f),"sumDeltaY",0),Jo(Mo(f),"stepDrag",void 0),Jo(Mo(f),"onDragging",function(y){var _=y.deltaX,x=y.deltaY,A=f.props,D=A.model,z=sS(A.graphModel.transformModel.fixDeltaXY(_,x),2),U=z[0],q=z[1];D.moveText(U,q)}),Jo(Mo(f),"dblClickHandler",function(){f.props.editable&&f.props.model.setElementState(Tt.TEXT_EDIT)}),Jo(Mo(f),"mouseDownHandle",function(y){var _=f.props,x=_.draggable,A=_.model,D=_.graphModel.editConfigModel.nodeTextDraggable;(x||D)&&(f.stepDrag.model=A,f.stepDrag.handleMouseDown(y))}),s.model;var h=s.draggable;return f.stepDrag=new Zr({onDragging:f.onDragging,step:1,isStopPropagation:h}),f}return t=c,(n=[{key:"getShape",value:function(){var s=this.props,f=s.model,h=s.graphModel,y=f.text,_=h.editConfigModel,x=y.value,A=y.x,D=y.y,z=y.editable,U=y.draggable,q={x:A,y:D,className:"",value:x};z?q.className="lf-element-text":U||_.nodeTextDraggable?q.className="lf-text-draggable":q.className="lf-text-disabled";var ae=f.getTextStyle();return Object(re.g)(Sb,Uf({},q,ae,{model:f}))}},{key:"render",value:function(){if(this.props.model.text)return Object(re.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&cS(t.prototype,n),c}(re.a),pS=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function Yf(e){return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yf(e)}function Ss(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Ab(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Ab(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ab(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Tb(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Vf(e,t){return Vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vf(e,t)}function dS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=js(e);if(t){var c=js(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return hS(this,n)}}function hS(e,t){if(t&&(Yf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mn(e)}function mn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},js(e)}function jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var no=function(e){(function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(h&&h.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),h&&Vf(f,h)})(s,e);var t,n,i,c=dS(s);function s(f){var h;(function(D,z){if(!(D instanceof z))throw new TypeError("Cannot call a class as a function")})(this,s),jn(mn(h=c.call(this)),"t",void 0),jn(mn(h),"moveOffset",void 0),jn(mn(h),"stepDrag",void 0),jn(mn(h),"contextMenuTime",void 0),jn(mn(h),"startTime",void 0),jn(mn(h),"clickTimer",void 0),jn(mn(h),"onDragStart",function(D){var z=D.event,U=z.clientX,q=z.clientY,ae=h.props,oe=ae.model,fe=ae.graphModel.getPointByClient({x:U,y:q}).canvasOverlayPosition,_e=fe.x,Me=fe.y;h.moveOffset={x:oe.x-_e,y:oe.y-Me}}),jn(mn(h),"onDragging",function(D){var z=D.event,U=h.props,q=U.model,ae=U.graphModel,oe=ae.editConfigModel,fe=oe.stopMoveGraph,_e=oe.autoExpand,Me=ae.transformModel,Se=ae.selectNodes,He=ae.width,ke=ae.height,$e=ae.gridSize;q.isDragging=!0;var Ie=z.clientX,ht=z.clientY,Nt=ae.getPointByClient({x:Ie,y:ht}).canvasOverlayPosition,Pt=Nt.x,Bt=Nt.y,tn=Ss(Me.CanvasPointToHtmlPoint([Pt,Bt]),2),cn=tn[0],Pn=tn[1];if(Pt+=h.moveOffset.x,Bt+=h.moveOffset.y,Pt=xo(Pt,$e),Bt=xo(Bt,$e),He&&ke){if(!_e||fe||!(cn<0||Pn<0||cn>He||Pn>ke)){var zr=Ss(Me.CanvasPointToHtmlPoint([Pt-q.width/2,Bt-q.height/2]),2),ir=zr[0],Bi=zr[1],Xs=Ss(Me.CanvasPointToHtmlPoint([Pt+q.width/2,Bt+q.height/2]),2),Ys=Xs[0],ti=Xs[1],Do=Math.max($e,20),No=[];ir<0?No=[Do,0]:Ys>ae.width?No=[-Do,0]:Bi<0?No=[0,Do]:ti>ae.height&&(No=[0,-Do]),h.t&&Os(h.t);var Vs=Se.map(function(Ks){return Ks.id});Vs.indexOf(q.id)===-1&&(Vs=[q.id]),No.length>0&&!fe&&_e?h.t=_b(function(){var Ks=Ss(No,2),lm=Ks[0],fm=Ks[1];Me.translate(lm,fm);var rP=-lm/Me.SCALE_X,oP=-fm/Me.SCALE_X;ae.moveNodes(Vs,rP,oP)}):ae.moveNodes(Vs,Pt-q.x,Bt-q.y)}}else ae.moveNode2Coordinate(q.id,Pt,Bt)}),jn(mn(h),"onDragEnd",function(){h.t&&Os(h.t),h.props.model.isDragging=!1}),jn(mn(h),"handleClick",function(D){if(h.startTime&&!(new Date().getTime()-h.startTime>200)){var z=h.props,U=z.model,q=z.graphModel,ae={data:U.getData(),e:D,position:q.getPointByClient({x:D.clientX,y:D.clientY}),isSelected:!1,isMultiple:!1},oe=D.button===2,fe=D.detail===2;if(!oe){var _e=q.editConfigModel,Me=_y(D,_e);ae.isMultiple=Me,U.isSelected&&!fe&&Me?(ae.isSelected=!1,U.setSelected(!1)):(q.selectNodeById(U.id,Me),ae.isSelected=!0,h.toFront()),fe?(_e.nodeTextEdit&&U.text.editable&&(U.setSelected(!1),q.setElementStateById(U.id,Tt.TEXT_EDIT)),q.eventCenter.emit(ot.NODE_DBCLICK,ae)):(q.eventCenter.emit(ot.ELEMENT_CLICK,ae),q.eventCenter.emit(ot.NODE_CLICK,ae))}}}),jn(mn(h),"handleContextMenu",function(D){D.preventDefault();var z=h.props,U=z.model,q=z.graphModel,ae=U.getData(),oe=q.getPointByClient({x:D.clientX,y:D.clientY});q.setElementStateById(U.id,Tt.SHOW_MENU,oe.domOverlayPosition),U.isSelected||q.selectNodeById(U.id),q.eventCenter.emit(ot.NODE_CONTEXTMENU,{data:ae,e:D,position:oe}),h.toFront()}),jn(mn(h),"handleMouseDown",function(D){var z=h.props,U=z.model,q=z.graphModel;h.startTime=new Date().getTime(),q.editConfigModel.adjustNodePosition&&U.draggable&&h.stepDrag&&h.stepDrag.handleMouseDown(D)}),jn(mn(h),"setHoverON",function(D){var z=h.props,U=z.model,q=z.graphModel;if(!U.isHovered){var ae=U.getData();U.setHovered(!0),q.eventCenter.emit(ot.NODE_MOUSEENTER,{data:ae,e:D})}}),jn(mn(h),"setHoverOFF",function(D){var z=h.props,U=z.model,q=z.graphModel,ae=U.getData();U.isHovered&&(U.setHovered(!1),q.eventCenter.emit(ot.NODE_MOUSELEAVE,{data:ae,e:D}))}),jn(mn(h),"onMouseOut",function(D){pS&&h.setHoverOFF(D)});var y=f.graphModel,_=y.gridSize,x=y.eventCenter,A=f.model;return h.stepDrag=new Zr({onDragStart:h.onDragStart,onDragging:h.onDragging,onDragEnd:h.onDragEnd,step:_,eventType:"NODE",isStopPropagation:!1,eventCenter:x,model:A}),h}return t=s,i=[{key:"getModel",value:function(f){return f}}],(n=[{key:"getAnchorShape",value:function(f){return null}},{key:"getAnchors",value:function(){var f=this,h=this.props,y=h.model,_=h.graphModel,x=y.isSelected,A=y.isHitable,D=y.isDragging,z=y.isShowAnchor;return A&&(x||z)&&!D?Fu(y.anchors,function(U,q){var ae=y.getAnchorLineStyle(U),oe=y.getAnchorStyle(U);return Object(re.g)(oS,{anchorData:U,node:f,style:oe,edgeStyle:ae,anchorIndex:q,nodeModel:y,graphModel:_,setHoverOFF:f.setHoverOFF})}):[]}},{key:"getText",value:function(){var f=this.props,h=f.model,y=f.graphModel;if(h.state===Tt.TEXT_EDIT)return"";if(h.text){var _=y.editConfigModel,x=!1;return(h.text.draggable||_.nodeTextDraggable)&&(x=!0),Object(re.g)(Pb,{editable:_.nodeTextEdit&&h.text.editable,model:h,graphModel:y,draggable:x})}}},{key:"getStateClassName",value:function(){var f=this.props.model,h=f.state,y=f.isDragging,_=f.isSelected,x="lf-node";switch(h){case Tt.ALLOW_CONNECT:x+=" lf-node-allow";break;case Tt.NOT_ALLOW_CONNECT:x+=" lf-node-not-allow";break;default:x+=" lf-node-default"}return y&&(x+=" lf-isDragging"),_&&(x+=" lf-node-selected"),x}},{key:"toFront",value:function(){var f=this.props,h=f.model,y=f.graphModel;y.overlapMode!==Xn.INCREASE&&h.autoToFront&&y.toFront(h.id)}},{key:"render",value:function(){var f,h=this.props,y=h.model,_=h.graphModel,x=_.editConfigModel,A=x.hideAnchors,D=x.adjustNodePosition,z=_.gridSize,U=_.transformModel.SCALE_X,q=y.isHitable,ae=y.draggable,oe=Object(re.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),A?null:this.getAnchors());return q?(D&&ae&&this.stepDrag.setStep(z*U),f=Object(re.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},oe)):f=Object(re.g)("g",{className:this.getStateClassName()},oe),f}}])&&Tb(t.prototype,n),i&&Tb(t,i),s}(re.a);function Kf(e){return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function qf(){return qf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},qf.apply(this,arguments)}function yS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Zf(e,t){return Zf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Zf(e,t)}function vS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ps(e);if(t){var c=Ps(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return bS(this,n)}}function bS(e,t){if(t&&(Kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ps(e)}var Jf=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Zf(s,f)})(c,e);var t,n,i=vS(c);function c(){return yS(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getShape",value:function(){var s=this.props.model,f=s.getNodeStyle();return Object(re.g)(Po,qf({},f,{x:s.x,y:s.y,width:s.width,height:s.height,radius:s.radius}))}}])&&gS(t.prototype,n),c}(no);function Qf(e){return Qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qf(e)}function ep(){return ep=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ep.apply(this,arguments)}function mS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _S(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function tp(e,t){return tp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},tp(e,t)}function OS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=As(e);if(t){var c=As(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return wS(this,n)}}function wS(e,t){if(t&&(Qf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},As(e)}var np=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&tp(s,f)})(c,e);var t,n,i=OS(c);function c(){return mS(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getShape",value:function(){var s=this.props.model,f=s.x,h=s.y,y=s.r,_=s.getNodeStyle();return Object(re.g)(Pa,ep({},_,{x:f,y:h,r:y}))}}])&&_S(t.prototype,n),c}(no);function rp(e){return rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rp(e)}function xS(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Mb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Mb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Mb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function kb(e){var t=e.points,n=e.className,i={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(e).forEach(function(c){var s=xS(c,2),f=s[0],h=s[1];rp(h)!=="object"&&(i[f]=h)}),i.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",i.points=t.map(function(c){return c.join(",")}).join(" "),Object(re.g)("polygon",i)}function op(e){return op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},op(e)}function ip(){return ip=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ip.apply(this,arguments)}function ES(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ap(e,t){return ap=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ap(e,t)}function jS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ts(e);if(t){var c=Ts(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return PS(this,n)}}function PS(e,t){if(t&&(op(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ts(e)}var up=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&ap(s,f)})(c,e);var t,n,i=jS(c);function c(){return ES(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getShape",value:function(){var s=this.props.model,f=s.x,h=s.y,y=s.width,_=s.height,x=s.points,A=s.getNodeStyle(),D={transform:"matrix(1 0 0 1 ".concat(f-y/2," ").concat(h-_/2,")")};return Object(re.g)("g",D,Object(re.g)(kb,ip({},A,{points:x,x:f,y:h})))}}])&&SS(t.prototype,n),c}(no);function sp(e){return sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sp(e)}function cp(){return cp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},cp.apply(this,arguments)}function AS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function lp(e,t){return lp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},lp(e,t)}function MS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ms(e);if(t){var c=Ms(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return kS(this,n)}}function kS(e,t){if(t&&(sp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ms(e){return Ms=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ms(e)}var fp=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&lp(s,f)})(c,e);var t,n,i=MS(c);function c(){return AS(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getShape",value:function(){var s=this.props.model,f=s.getNodeStyle();return Object(re.g)("g",null,Object(re.g)(kb,cp({},f,{points:s.points,x:s.x,y:s.y})))}}])&&TS(t.prototype,n),c}(no);function pp(e){return pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pp(e)}function DS(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Db(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Db(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Db(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function NS(e){var t=e.x,n=t===void 0?0:t,i=e.y,c=i===void 0?0:i,s=e.rx,f=s===void 0?4:s,h=e.ry,y=h===void 0?4:h,_=e.className,x={cx:n,cy:c,rx:f,ry:y,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(A){var D=DS(A,2),z=D[0],U=D[1];pp(U)!=="object"&&(x[z]=U)}),x.className=_?"lf-basic-shape ".concat(_):"lf-basic-shape",Object(re.g)("ellipse",x)}function dp(e){return dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(e)}function hp(){return hp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},hp.apply(this,arguments)}function RS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function yp(e,t){return yp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},yp(e,t)}function IS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=ks(e);if(t){var c=ks(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return LS(this,n)}}function LS(e,t){if(t&&(dp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ks(e){return ks=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ks(e)}var gp=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&yp(s,f)})(c,e);var t,n,i=IS(c);function c(){return RS(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getShape",value:function(){var s=this.props.model,f=s.getNodeStyle();return Object(re.g)(NS,hp({},f,{x:s.x,y:s.y,rx:s.rx,ry:s.ry}))}}])&&CS(t.prototype,n),c}(no);function vp(e){return vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vp(e)}function Nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Rb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nb(Object(n),!0).forEach(function(i){BS(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function BS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function bp(e,t){return bp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},bp(e,t)}function $S(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ds(e);if(t){var c=Ds(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return WS(this,n)}}function WS(e,t){if(t&&(vp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ds(e){return Ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ds(e)}var mp=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&bp(s,f)})(c,e);var t,n,i=$S(c);function c(){return zS(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getBackground",value:function(){var s=this.props.model,f=s.getTextStyle(),h=s.width,y=s.height,_=s.x,x=s.y,A=Rb(Rb({},f.background),{},{x:_,y:x-1,width:h,height:y});return Object(re.g)(Po,A)}},{key:"getShape",value:function(){return Object(re.g)("g",null,this.getBackground())}}])&&FS(t.prototype,n),c}(no);function _p(e){return _p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_p(e)}function Op(){return Op=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Op.apply(this,arguments)}function GS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function wp(e,t){return wp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},wp(e,t)}function US(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ns(e);if(t){var c=Ns(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return XS(this,n)}}function XS(e,t){if(t&&(_p(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Na(e)}function Na(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ns(e){return Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ns(e)}function Rs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xp=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&wp(s,f)})(c,e);var t,n,i=US(c);function c(){var s;GS(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return Rs(Na(s=i.call.apply(i,[this].concat(h))),"ref",void 0),Rs(Na(s),"currentProperties",void 0),Rs(Na(s),"preProperties",void 0),Rs(Na(s),"setRef",function(_){s.ref=_}),s}return t=c,(n=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(s){s.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 s=this.props.model,f=s.x,h=s.y,y=s.height,_=s.width,x=s.getNodeStyle();return this.currentProperties=JSON.stringify(s.properties),Object(re.g)("foreignObject",Op({},x,{x:f-_/2,y:h-y/2,width:_,height:y,ref:this.setRef}))}}])&&HS(t.prototype,n),c}(no);function Ep(e){return Ep=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ep(e)}function Sp(){return Sp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Sp.apply(this,arguments)}function Cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Qo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cb(Object(n),!0).forEach(function(i){Ap(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function YS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function jp(e,t){return jp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},jp(e,t)}function VS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Cs(e);if(t){var c=Cs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return KS(this,n)}}function KS(e,t){if(t&&(Ep(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pp(e)}function Pp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cs(e)}function Ap(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lr,qS=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&jp(s,f)})(c,e);var t,n,i=VS(c);function c(s){var f;return function(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")}(this,c),Ap(Pp(f=i.call(this,s)),"setHoverON",function(){f.setState({isHovered:!0})}),Ap(Pp(f),"setHoverOFF",function(){f.setState({isHovered:!1})}),f.state={isHovered:!1},f}return t=c,(n=[{key:"getBackground",value:function(){var s=this.props.model,f=s.getTextStyle(),h=s.text,y=s.width,_=f.background||{};if(this.state.isHovered&&f.hover&&f.hover.background&&(_=Qo(Qo({},_),f.hover.background)),h&&h.value&&_.fill!=="transparent"){var x,A=f.fontSize,D=f.overflowMode,z=f.lineHeight,U=f.wrapPadding,q=f.textWidth,ae=h.value,oe=h.x,fe=h.y,_e=String(ae).split(/[\r\n]/g),Me=_e.length;if(D==="autoWrap"&&q){var Se=Vy({rows:_e,style:{fontSize:"".concat(A,"px"),width:"".concat(q,"px"),lineHeight:z,padding:U},rowsLength:Me,className:"lf-get-text-height"});x=Qo(Qo({},_),{},{x:oe-1,y:fe-1,width:q,height:Se})}else{_e&&_e.forEach(function(ht){vg(ht)});var He=yl({rows:_e,fontSize:A,rowsLength:Me}),ke=He.width,$e=He.height;if(D==="ellipsis"&&(ke=q||y,$e=A+2),typeof _.wrapPadding=="string"){var Ie=_.wrapPadding.split(",").filter(function(ht){return ht.trim()}).map(function(ht){return parseFloat(ht.trim())});Ie.length>0&&Ie.length<=4&&(Ie.length===1?Ie=[Ie[0],Ie[0],Ie[0],Ie[0]]:Ie.length===2?Ie=[Ie[0],Ie[1],Ie[0],Ie[1]]:Ie.length===3&&(Ie=[Ie[0],Ie[1],Ie[2],Ie[1]]),ke+=Ie[1]+Ie[3],$e+=Ie[0]+Ie[2],oe+=(Ie[1]-Ie[3])/2,fe+=(Ie[2]-Ie[0])/2)}x=Qo(Qo({},_),{},{x:oe-1,y:fe-1,width:ke,height:$e})}return Object(re.g)(Po,x)}}},{key:"getShape",value:function(){var s=this.props.model,f=s.text,h=f.value,y=f.x,_=f.y;if(h){var x=Qo({x:y,y:_,className:"lf-element-text",value:h},s.getTextStyle());return Object(re.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(re.g)(Sb,Sp({},x,{model:s})))}}}])&&YS(t.prototype,n),c}(Pb);function Tp(e){return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tp(e)}function Ib(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function ro(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ib(Object(n),!0).forEach(function(i){Kn(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ib(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function ZS(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Lb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Lb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Lb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function JS(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Mp(e,t){return Mp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Mp(e,t)}function QS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Is(e);if(t){var c=Is(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return ej(this,n)}}function ej(e,t){if(t&&(Tp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vn(e)}function Vn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Is(e){return Is=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Is(e)}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(Lr||(Lr={}));var Bb=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Mp(s,f)})(c,e);var t,n,i=QS(c);function c(s){var f;(function(x,A){if(!(x instanceof A))throw new TypeError("Cannot call a class as a function")})(this,c),Kn(Vn(f=i.call(this)),"stepDragData",void 0),Kn(Vn(f),"stepDrag",void 0),Kn(Vn(f),"oldEdge",void 0),Kn(Vn(f),"preTargetNode",void 0),Kn(Vn(f),"targetRuleResults",void 0),Kn(Vn(f),"sourceRuleResults",void 0),Kn(Vn(f),"handleMouseDown",function(x){f.stepDrag&&f.stepDrag.handleMouseDown(x)}),Kn(Vn(f),"onDragStart",function(){var x=f.props,A=x.x,D=x.y,z=x.edgeModel,U=z.startPoint,q=z.endPoint,ae=z.pointsList;f.oldEdge={startPoint:U,endPoint:q,pointsList:ae},f.setState({endX:A,endY:D,dragging:!0})}),Kn(Vn(f),"onDragging",function(x){var A=x.deltaX,D=x.deltaY,z=f.state,U=z.endX,q=z.endY,ae=f.props,oe=ae.graphModel,fe=ae.type,_e=oe.transformModel,Me=oe.editConfigModel,Se=ZS(_e.moveCanvasPointByHtml([U,q],A,D),2),He=Se[0],ke=Se[1];f.setState({endX:He,endY:ke,dragging:!0});var $e=f.props.edgeModel,Ie=Hu({x:U,y:q},oe);if(Ie&&Ie.node&&f.isAllowAdjust(Ie).pass){var ht,Nt=$e.startPoint,Pt=$e.endPoint,Bt=$e.sourceNode,tn=$e.targetNode;fe===Lr.SOURCE?ht={startPoint:{x:Ie.anchor.x,y:Ie.anchor.y},endPoint:{x:Pt.x,y:Pt.y},sourceNode:Ie.node,targetNode:tn}:fe===Lr.TARGET&&(ht={startPoint:{x:Nt.x,y:Nt.y},endPoint:{x:Ie.anchor.x,y:Ie.anchor.y},sourceNode:Bt,targetNode:Ie.node}),$e.updateAfterAdjustStartAndEnd(ht)}else fe===Lr.SOURCE?$e.updateStartPoint({x:He,y:ke}):fe===Lr.TARGET&&$e.updateEndPoint({x:He,y:ke});$e.text.value&&Me.adjustEdge&&$e.setText(Object.assign({},$e.text,$e.textPosition))}),Kn(Vn(f),"onDragEnd",function(x){var A=x.event;try{var D;f.setState({dragging:!1});var z=f.props,U=z.graphModel,q=z.edgeModel,ae=z.type,oe=f.state,fe=oe.endX,_e=oe.endY,Me=oe.dragging,Se=Hu({x:fe,y:_e},U);if(!Me)return;var He,ke=!1;if(Se&&Se.node){var $e=f.isAllowAdjust(Se),Ie=$e.pass,ht=$e.msg,Nt=$e.newTargetNode;if(Ie){var Pt,Bt=q.getData();He=ro(ro({},Bt),{},{sourceAnchorId:"",targetAnchorId:"",text:(Bt==null||(Pt=Bt.text)===null||Pt===void 0?void 0:Pt.value)||""}),ae===Lr.SOURCE?(He=ro(ro({},U.edgeGenerator(U.getNodeModelById(Se.node.id).getData(),U.getNodeModelById(q.targetNodeId).getData(),He)),{},{sourceNodeId:Se.node.id,sourceAnchorId:Se.anchor.id,startPoint:{x:Se.anchor.x,y:Se.anchor.y},targetNodeId:q.targetNodeId,endPoint:ro({},q.endPoint)}),q.sourceNodeId===Se.node.id&&q.sourceAnchorId===Se.anchor.id&&(ke=!0)):ae===Lr.TARGET&&(He=ro(ro({},U.edgeGenerator(U.getNodeModelById(q.sourceNodeId).getData(),U.getNodeModelById(Se.node.id).getData(),He)),{},{sourceNodeId:q.sourceNodeId,startPoint:ro({},q.startPoint),targetNodeId:Se.node.id,targetAnchorId:Se.anchor.id,endPoint:{x:Se.anchor.x,y:Se.anchor.y}}),q.targetNodeId===Se.node.id&&q.targetAnchorId===Se.anchor.id&&(ke=!0))}else{ke=!0;var tn=Nt.getData();U.eventCenter.emit(ot.CONNECTION_NOT_ALLOWED,{data:tn,msg:ht})}}else ke=!0;if(ke)f.recoveryEdge();else{var cn=q.getData();U.deleteEdgeById(q.id);var Pn=U.addEdge(ro({},He));U.eventCenter.emit(ot.EDGE_EXCHANGE_NODE,{data:{newEdge:Pn.getData(),oldEdge:cn}})}(D=f.preTargetNode)===null||D===void 0||D.setElementState(Tt.DEFAULT)}finally{f.props.graphModel.eventCenter.emit(ot.ADJUST_POINT_DRAGEND,{e:A,data:f.stepDragData})}}),Kn(Vn(f),"recoveryEdge",function(){var x=f.props.edgeModel,A=f.oldEdge,D=A.startPoint,z=A.endPoint,U=A.pointsList;x.updateStartPoint(D),x.updateEndPoint(z),x.modelType!==_t.LINE_EDGE&&(x.pointsList=U,x.initPoints())}),Kn(Vn(f),"getAdjustPointStyle",function(){var x=f.props,A=x.graphModel.theme;return x.edgeModel,A.edgeAdjust}),f.state={dragging:!1,endX:0,endY:0},f.targetRuleResults=new Map,f.sourceRuleResults=new Map;var h=s.type,y=s.edgeModel,_=s.graphModel.eventCenter;return f.stepDragData={type:h,edgeData:y.getData()},f.stepDrag=new Zr({onDragStart:f.onDragStart,onDragging:f.onDragging,onDragEnd:f.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:_,data:f.stepDragData}),f}return t=c,(n=[{key:"isAllowAdjust",value:function(s){var f=this.props,h=f.edgeModel,y=h.id,_=h.sourceNode,x=h.targetNode,A=h.sourceAnchorId,D=h.targetAnchorId,z=f.type,U=null,q=null,ae=null,oe=null;if(z===Lr.SOURCE?(U=s.node,q=x,ae=s.anchor,oe=x.getAnchorInfo(D)):(U=_,q=s.node,oe=s.anchor,ae=_.getAnchorInfo(A)),this.preTargetNode&&this.preTargetNode!==s.node&&this.preTargetNode.setElementState(Tt.DEFAULT),this.preTargetNode=s.node,oe.id===ae.id)return{pass:!1,msg:"",newTargetNode:q};var fe="".concat(U.id,"_").concat(q.id,"_").concat(ae.id,"_").concat(oe.id);if(!this.targetRuleResults.has(fe)){var _e=U.isAllowConnectedAsSource(q,ae,oe,y),Me=q.isAllowConnectedAsTarget(U,ae,oe,y);this.sourceRuleResults.set(fe,_a(_e)),this.targetRuleResults.set(fe,_a(Me))}var Se=this.sourceRuleResults.get(fe),He=Se.isAllPass,ke=Se.msg,$e=this.targetRuleResults.get(fe),Ie=$e.isAllPass,ht=$e.msg,Nt=He&&Ie?Tt.ALLOW_CONNECT:Tt.NOT_ALLOW_CONNECT;return z===Lr.SOURCE?U.setElementState(Nt):q.setElementState(Nt),{pass:He&&Ie,msg:ht||ke,newTargetNode:q}}},{key:"render",value:function(){var s=this.props,f=s.x,h=s.y,y=s.getAdjustPointShape,_=s.edgeModel,x=this.state.dragging;return Object(re.g)("g",{pointerEvents:x?"none":"",onMouseDown:this.handleMouseDown},x?"":y(f,h,_))}}])&&JS(t.prototype,n),c}(re.a);function kp(e){return kp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kp(e)}function Ra(){return Ra=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ra.apply(this,arguments)}function tj(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return zb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return zb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function zb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function nj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rj(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Dp(e,t){return Dp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Dp(e,t)}function oj(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ls(e);if(t){var c=Ls(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return ij(this,n)}}function ij(e,t){if(t&&(kp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mr(e)}function mr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ls(e){return Ls=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ls(e)}function Br(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ca=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Dp(s,f)})(c,e);var t,n,i=oj(c);function c(){var s;nj(this,c);for(var f=arguments.length,h=new Array(f),y=0;y<f;y++)h[y]=arguments[y];return Br(mr(s=i.call.apply(i,[this].concat(h))),"startTime",void 0),Br(mr(s),"contextMenuTime",void 0),Br(mr(s),"clickTimer",void 0),Br(mr(s),"textRef",Object(re.f)()),Br(mr(s),"handleHover",function(_,x){var A=s.props,D=A.model,z=A.graphModel.eventCenter;D.setHovered(_);var U=_?ot.EDGE_MOUSEENTER:ot.EDGE_MOUSELEAVE,q=D.getData();z.emit(U,{data:q,e:x})}),Br(mr(s),"setHoverON",function(_){s.props.model.isHovered||(s.textRef&&s.textRef.current&&s.textRef.current.setHoverON(),s.handleHover(!0,_))}),Br(mr(s),"setHoverOFF",function(_){s.props.model.isHovered&&(s.textRef&&s.textRef.current&&s.textRef.current.setHoverOFF(),s.handleHover(!1,_))}),Br(mr(s),"handleContextMenu",function(_){_.preventDefault(),s.contextMenuTime=new Date().getTime(),s.clickTimer&&clearTimeout(s.clickTimer);var x=s.props,A=x.model,D=x.graphModel,z=D.getPointByClient({x:_.clientX,y:_.clientY});D.setElementStateById(A.id,Tt.SHOW_MENU,z.domOverlayPosition),s.toFront(),A.isSelected||D.selectEdgeById(A.id);var U=A==null?void 0:A.getData();D.eventCenter.emit(ot.EDGE_CONTEXTMENU,{data:U,e:_,position:z})}),Br(mr(s),"handleMouseDown",function(_){_.stopPropagation(),s.startTime=new Date().getTime()}),Br(mr(s),"handleMouseUp",function(_){if(s.startTime&&!(new Date().getTime()-s.startTime>200||_.button===2)){var x=_.detail===2,A=s.props,D=A.model,z=A.graphModel,U=D==null?void 0:D.getData(),q=z.getPointByClient({x:_.clientX,y:_.clientY});if(x){var ae=z.editConfigModel,oe=z.textEditElement;if(oe&&oe.id===D.id&&z.setElementStateById(D.id,Tt.DEFAULT),ae.edgeTextEdit&&D.text.editable&&z.setElementStateById(D.id,Tt.TEXT_EDIT),D.modelType===_t.POLYLINE_EDGE){var fe=D,_e=z.getPointByClient({x:_.x,y:_.y}).canvasOverlayPosition,Me=_e.x,Se=_e.y,He=_g({x:Me,y:Se},fe.points);fe.dbClickPosition=He}z.eventCenter.emit(ot.EDGE_DBCLICK,{data:U,e:_,position:q})}else z.eventCenter.emit(ot.ELEMENT_CLICK,{data:U,e:_,position:q}),z.eventCenter.emit(ot.EDGE_CLICK,{data:U,e:_,position:q});var ke=z.editConfigModel;z.selectEdgeById(D.id,_y(_,ke)),s.toFront()}}),s}return t=c,(n=[{key:"getShape",value:function(){return Object(re.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var s=this.props,f=s.model,h=s.graphModel;if(f.state===Tt.TEXT_EDIT)return null;var y=!1,_=h.editConfigModel;return(f.text.draggable||_.edgeTextDraggable)&&(y=!0),Object(re.g)(qS,{ref:this.textRef,editable:_.edgeTextEdit&&f.text.editable,model:f,graphModel:h,draggable:y})}},{key:"getArrowInfo",value:function(){var s=this.props.model,f=s.startPoint,h=s.endPoint,y=s.isSelected;return{start:f,end:h,hover:this.state.hover,isSelected:y}}},{key:"getLastTwoPoints",value:function(){var s=this.props.model;return[s.startPoint,s.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var s=this.props.model,f=s.id,h=s.getArrowStyle(),y=h.refY,_=y===void 0?0:y,x=h.refX,A=x===void 0?2:x,D=tj(this.getLastTwoPoints(),2),z=D[0],U=D[1],q="auto";return z!==null&&U!==null&&(q=Zw({x:U.x-z.x,y:U.y-z.y,z:0})*(180/Math.PI)),Object(re.g)("g",null,Object(re.g)("defs",null,Object(re.g)("marker",{id:"marker-start-".concat(f),refX:-A,refY:_,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(re.g)("marker",{id:"marker-end-".concat(f),refX:A,refY:_,overflow:"visible",orient:q,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var s=this.props.model.getArrowStyle();return s.stroke,s.strokeWidth,s.offset,s.verticalLength,Object(re.g)("path",null)}},{key:"getEndArrow",value:function(){var s=this.props.model.getArrowStyle(),f=s.stroke,h=s.strokeWidth,y=s.offset,_=s.verticalLength;return Object(re.g)("path",{stroke:f,fill:f,strokeWidth:h,transform:"rotate(180)",d:"M 0 0 L ".concat(y," -").concat(_," L ").concat(y," ").concat(_," Z")})}},{key:"getAdjustPointShape",value:function(s,f,h){var y=h.getAdjustPointStyle();return Object(re.g)(Pa,Ra({className:"lf-edge-adjust-point"},y,{x:s,y:f}))}},{key:"getAdjustPoints",value:function(){var s=this.props,f=s.model,h=s.graphModel,y=f.getAdjustStart(),_=f.getAdjustEnd();return Object(re.g)("g",null,Object(re.g)(Bb,Ra({type:"SOURCE"},y,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:f,graphModel:h})),Object(re.g)(Bb,Ra({type:"TARGET"},_,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:f,graphModel:h})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(re.g)("g",null)}},{key:"getAppend",value:function(){return Object(re.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var s=this.props,f=s.graphModel,h=s.model;f.overlapMode!==Xn.INCREASE&&f.toFront(h.id)}},{key:"render",value:function(){var s=this.props,f=s.model,h=f.isSelected,y=f.isHitable,_=f.isShowAdjustPoint;return s.graphModel.animation,Object(re.g)("g",null,Object(re.g)("g",{className:["lf-edge",!y&&"pointer-none",h&&"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()),_&&h?this.getAdjustPoints():"")}}])&&rj(t.prototype,n),c}(re.a);function Np(e){return Np=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Np(e)}function aj(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Fb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Fb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Ia=function(e){var t={d:""};return Object.entries(e).forEach(function(n){var i=aj(n,2),c=i[0],s=i[1],f=Np(s);c!=="style"&&f==="object"||(t[c]=s)}),Object(re.g)("path",t)};function Rp(e){return Rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rp(e)}function Cp(){return Cp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Cp.apply(this,arguments)}function uj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sj(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ip(e,t){return Ip=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ip(e,t)}function cj(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Bs(e);if(t){var c=Bs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return lj(this,n)}}function lj(e,t){if(t&&(Rp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Bs(e){return Bs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Bs(e)}var Lp=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Ip(s,f)})(c,e);var t,n,i=cj(c);function c(){return uj(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getEdge",value:function(){var s=this.props.model,f=s.startPoint,h=s.endPoint,y=s.isAnimation,_=s.arrowConfig,x=s.getEdgeStyle(),A=s.getEdgeAnimationStyle(),D=A.strokeDasharray,z=A.stroke,U=A.strokeDashoffset,q=A.animationName,ae=A.animationDuration,oe=A.animationIterationCount,fe=A.animationTimingFunction,_e=A.animationDirection;return Object(re.g)(Si,Cp({},x,{x1:f.x,y1:f.y,x2:h.x,y2:h.y},_,y?{strokeDasharray:D,stroke:z,style:{strokeDashoffset:U,animationName:q,animationDuration:ae,animationIterationCount:oe,animationTimingFunction:fe,animationDirection:_e}}:{}))}},{key:"getAppendWidth",value:function(){var s=this.props.model,f=function(D){var z,U=D.start,q=D.end;if(U.x===q.x&&U.y===q.y)z="";else{var ae={start:U,end:q,offset:10,verticalLength:5},oe=xa(Uu(Uu({},ae),{},{type:"start"})),fe=xa(Uu(Uu({},ae),{},{type:"end"}));z="M".concat(oe.leftX," ").concat(oe.leftY,`
|
||
L`).concat(oe.rightX," ").concat(oe.rightY,`
|
||
L`).concat(fe.rightX," ").concat(fe.rightY,`
|
||
L`).concat(fe.leftX," ").concat(fe.leftY," z")}return{d:z,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:s.startPoint,end:s.endPoint}),h=f.d,y=f.strokeWidth,_=f.fill,x=f.strokeDasharray,A=f.stroke;return Object(re.g)(Ia,{d:h,fill:_,strokeWidth:y,stroke:A,strokeDasharray:x})}}])&&sj(t.prototype,n),c}(Ca);function Bp(e){return Bp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bp(e)}function fj(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return $b(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return $b(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function $b(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var pj=function(e){var t={points:"",fill:"none"};return Object.entries(e).forEach(function(n){var i=fj(n,2),c=i[0],s=i[1];(c==="style"||Bp(s)!=="object")&&(t[c]=s)}),Object(re.g)("polyline",t)};function zp(e){return zp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(e)}function Wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function zs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wb(Object(n),!0).forEach(function(i){io(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Fp(){return Fp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Fp.apply(this,arguments)}function dj(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Gb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Gb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function hj(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function $p(e,t){return $p=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},$p(e,t)}function yj(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Fs(e);if(t){var c=Fs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return gj(this,n)}}function gj(e,t){if(t&&(zp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oo(e)}function oo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fs(e){return Fs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fs(e)}function io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wp=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&$p(s,f)})(c,e);var t,n,i=yj(c);function c(){var s;return function(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}(this,c),io(oo(s=i.call(this)),"drag",void 0),io(oo(s),"isDragging",void 0),io(oo(s),"isShowAdjustPointTemp",void 0),io(oo(s),"appendInfo",void 0),io(oo(s),"onDragStart",function(){var f=s.props.model;f.dragAppendStart(),s.isShowAdjustPointTemp=f.isShowAdjustPoint,f.isShowAdjustPoint=!1}),io(oo(s),"onDragging",function(f){var h=f.deltaX,y=f.deltaY,_=s.props,x=_.model,A=_.graphModel;s.isDragging=!0;var D=A.transformModel,z=A.editConfigModel,U=dj(D.fixDeltaXY(h,y),2),q=U[0],ae=U[1],oe=x,fe=z.adjustEdgeMiddle;s.appendInfo=fe?oe.dragAppendSimple(s.appendInfo,{x:q,y:ae}):oe.dragAppend(s.appendInfo,{x:q,y:ae})}),io(oo(s),"onDragEnd",function(){var f=s.props,h=f.model,y=f.graphModel.eventCenter,_=h;_.dragAppendEnd(),s.isDragging=!1,_.isShowAdjustPoint=s.isShowAdjustPointTemp,s.appendInfo=void 0,y.emit(ot.EDGE_ADJUST,{data:_.getData()})}),io(oo(s),"beforeDragStart",function(f,h){h.dragAble&&s.drag.handleMouseDown(f),s.appendInfo=h}),s.drag=new Zr({onDragStart:s.onDragStart,onDragging:s.onDragging,onDragEnd:s.onDragEnd,isStopPropagation:!1}),s}return t=c,(n=[{key:"getEdge",value:function(){var s=this.props.model,f=s.points,h=s.isAnimation,y=s.arrowConfig,_=s.getEdgeStyle(),x=s.getEdgeAnimationStyle(),A=x.strokeDasharray,D=x.stroke,z=x.strokeDashoffset,U=x.animationName,q=x.animationDuration,ae=x.animationIterationCount,oe=x.animationTimingFunction,fe=x.animationDirection;return Object(re.g)(pj,Fp({points:f},_,y,h?{strokeDasharray:A,stroke:D,style:{strokeDashoffset:z,animationName:U,animationDuration:q,animationIterationCount:ae,animationTimingFunction:oe,animationDirection:fe}}:{}))}},{key:"getArrowInfo",value:function(){var s=this.props.model,f=s.points,h=s.isSelected,y={start:null,end:null,hover:this.state.hover,isSelected:h},_=Zo(f);return _.length>=2&&(y.start=_[_.length-2],y.end=_[_.length-1]),y}},{key:"getLastTwoPoints",value:function(){var s=this.props.model.points,f=Zo(s);return f.length>=2?[f[f.length-2],f[f.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(s){var f,h=s.start,y=s.end;if(h.x===y.x&&h.y===y.y)f="";else{var _={start:h,end:y,offset:10,verticalLength:5},x=xa(zs(zs({},_),{},{type:"start"})),A=xa(zs(zs({},_),{},{type:"end"}));f="M".concat(x.leftX," ").concat(x.leftY,`
|
||
L`).concat(x.rightX," ").concat(x.rightY,`
|
||
L`).concat(A.rightX," ").concat(A.rightY,`
|
||
L`).concat(A.leftX," ").concat(A.leftY," z")}return{d:f,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(s){var f=this.getAppendAttributes(s),h=f.d,y=f.strokeWidth,_=f.fill,x=f.strokeDasharray,A=f.stroke;return Object(re.g)(Ia,{d:h,fill:_,strokeWidth:y,stroke:A,strokeDasharray:x})}},{key:"getAppendWidth",value:function(){for(var s=this,f=this.props,h=f.model,y=f.graphModel,_=h.pointsList,x=h.draggable,A=[],D=_.length,z=function(q){var ae="lf-polyline-append",oe={start:{x:_[q].x,y:_[q].y},end:{x:_[q+1].x,y:_[q+1].y},startIndex:q,endIndex:q+1,direction:"",dragAble:!0},fe=Object(re.g)("g",{className:ae},s.getAppendShape(oe)),_e=y.editConfigModel,Me=_e.adjustEdge,Se=_e.adjustEdgeMiddle;if(Me&&x){var He=oe.startIndex,ke=oe.endIndex,$e=Se&&(He===0||ke===D-1);oe.dragAble=!$e,oe.start.x===oe.end.x?(oe.dragAble&&(ae+="-ew-resize"),oe.direction=Gt.VERTICAL):oe.start.y===oe.end.y&&(oe.dragAble&&(ae+="-ns-resize"),oe.direction=Gt.HORIZONTAL),fe=Object(re.g)("g",{className:s.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(Ie){return s.beforeDragStart(Ie,oe)}},Object(re.g)("g",{className:ae},s.getAppendShape(oe)))}A.push(fe)},U=0;U<D-1;U++)z(U);return Object(re.g)("g",null,A)}}])&&hj(t.prototype,n),c}(Ca);function Gp(e){return Gp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gp(e)}function vj(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Hb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Hb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Hb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Hp(){return Hp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Hp.apply(this,arguments)}function bj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mj(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Up(e,t){return Up=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Up(e,t)}function _j(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=$s(e);if(t){var c=$s(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return Oj(this,n)}}function Oj(e,t){if(t&&(Gp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function $s(e){return $s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(e)}var Xp=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Up(s,f)})(c,e);var t,n,i=_j(c);function c(){return bj(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"getEdge",value:function(){var s=this.props.model,f=s.getEdgeStyle(),h=s.path,y=s.isAnimation,_=s.arrowConfig,x=s.getEdgeAnimationStyle(),A=x.strokeDasharray,D=x.stroke,z=x.strokeDashoffset,U=x.animationName,q=x.animationDuration,ae=x.animationIterationCount,oe=x.animationTimingFunction,fe=x.animationDirection;return Object(re.g)(Ia,Hp({d:h},f,_,y?{strokeDasharray:A,stroke:D,style:{strokeDashoffset:z,animationName:U,animationDuration:q,animationIterationCount:ae,animationTimingFunction:oe,animationDirection:fe}}:{}))}},{key:"getAppendWidth",value:function(){var s=this.props.model.path;return Object(re.g)(Ia,{d:s,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var s=this.props.model,f=this.state.hover,h=s.isSelected,y=s.getArrowStyle().offset,_=s.pointsList.map(function(A){return{x:A.x,y:A.y}}),x=vj(mg(_,y),2);return{start:x[0],end:x[1],hover:f,isSelected:h}}},{key:"getLastTwoPoints",value:function(){var s=this.props.model,f=s.getArrowStyle().offset,h=s.pointsList.map(function(y){return{x:y.x,y:y.y}});return mg(h,f)}}])&&mj(t.prototype,n),c}(Ca);function Yp(e){return Yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yp(e)}function Ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function wj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ej(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Vp(e,t){return Vp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vp(e,t)}function Sj(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Ws(e);if(t){var c=Ws(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return jj(this,n)}}function jj(e,t){if(t&&(Yp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ws(e){return Ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ws(e)}var Pj=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&Vp(s,f)})(c,e);var t,n,i=Sj(c);function c(){return xj(this,c),i.apply(this,arguments)}return t=c,n=[{key:"getArrowAttributes",value:function(){var s=this.props,f=s.arrowInfo,h=s.style,y=f.start,_=f.end,x={start:y,end:_,offset:h.offset,verticalLength:h.verticalLength,type:"end"},A=xa(x),D=A.leftX,z=A.leftY,U=A.rightX,q=A.rightY;return function(ae){for(var oe=1;oe<arguments.length;oe++){var fe=arguments[oe]!=null?arguments[oe]:{};oe%2?Ub(Object(fe),!0).forEach(function(_e){wj(ae,_e,fe[_e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ae,Object.getOwnPropertyDescriptors(fe)):Ub(Object(fe)).forEach(function(_e){Object.defineProperty(ae,_e,Object.getOwnPropertyDescriptor(fe,_e))})}return ae}({d:"M".concat(D," ").concat(z," L").concat(_.x," ").concat(_.y," L").concat(U," ").concat(q," z")},h)}},{key:"getShape",value:function(){var s=this.getArrowAttributes(),f=s.d,h=s.strokeWidth,y=s.stroke,_=s.fill;return Object(re.g)(Ia,{d:f,fill:_,strokeWidth:h,stroke:y})}},{key:"render",value:function(){return Object(re.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&Ej(t.prototype,n),c}(re.a),Xb=function(e,t){return he(e,t)},Aj=function(e){var t=e==null?0:e.length;return t?e[t-1]:void 0},Kp=function(){return Xe.a.Date.now()},Tj=/\s/,Mj=function(e){for(var t=e.length;t--&&Tj.test(e.charAt(t)););return t},kj=/^\s+/,Dj=function(e){return e&&e.slice(0,Mj(e)+1).replace(kj,"")},Nj=/^[-+]0x[0-9a-f]+$/i,Rj=/^0b[01]+$/i,Cj=/^0o[0-7]+$/i,Ij=parseInt,Yb=function(e){if(typeof e=="number")return e;if(dt(e))return NaN;if(Ht(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ht(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Dj(e);var n=Rj.test(e);return n||Cj.test(e)?Ij(e.slice(2),n?2:8):Nj.test(e)?NaN:+e},Lj=Math.max,Bj=Math.min,zj=function(e,t,n){var i,c,s,f,h,y,_=0,x=!1,A=!1,D=!0;if(typeof e!="function")throw new TypeError("Expected a function");function z(_e){var Me=i,Se=c;return i=c=void 0,_=_e,f=e.apply(Se,Me)}function U(_e){return _=_e,h=setTimeout(ae,t),x?z(_e):f}function q(_e){var Me=_e-y;return y===void 0||Me>=t||Me<0||A&&_e-_>=s}function ae(){var _e=Kp();if(q(_e))return oe(_e);h=setTimeout(ae,function(Me){var Se=t-(Me-y);return A?Bj(Se,s-(Me-_)):Se}(_e))}function oe(_e){return h=void 0,D&&i?z(_e):(i=c=void 0,f)}function fe(){var _e=Kp(),Me=q(_e);if(i=arguments,c=this,y=_e,Me){if(h===void 0)return U(y);if(A)return clearTimeout(h),h=setTimeout(ae,t),z(y)}return h===void 0&&(h=setTimeout(ae,t)),f}return t=Yb(t)||0,Ht(n)&&(x=!!n.leading,s=(A="maxWait"in n)?Lj(Yb(n.maxWait)||0,t):s,D="trailing"in n?!!n.trailing:D),fe.cancel=function(){h!==void 0&&clearTimeout(h),_=0,i=y=c=h=void 0},fe.flush=function(){return h===void 0?f:oe(Kp())},fe},Fj=o(167);function $j(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ko(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vb,Kb,qb,Wj=function(){function e(i){(function(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")})(this,e),ko(this,"undos",[]),ko(this,"redos",[]),ko(this,"callbacks",[]),ko(this,"stopWatch",null),ko(this,"curData",null),ko(this,"maxSize",50),ko(this,"waitTime",100),ko(this,"eventCenter",void 0),this.eventCenter=i}var t,n;return t=e,(n=[{key:"add",value:function(i){Xb(Aj(this.undos),i)||(this.undos.push(i),Xb(this.curData,i)||(this.redos=[]),this.eventCenter.emit(ot.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 i=this.undos.pop();this.redos.push(i);var c=this.undos.pop();return this.curData=Xt(c),c}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var i=this.redos.pop();return this.curData=Xt(i),i}}},{key:"watch",value:function(i){var c=this;this.stopWatch&&this.stopWatch(),this.undos.push(i.modelToGraphData()),this.stopWatch=Object(Fj.a)(i,zj(function(){var s=i.modelToHistoryData();s&&c.add(s)},this.waitTime))}}])&&$j(t.prototype,n),e}();function qp(e){return qp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qp(e)}function Gj(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||function(n,i){if(n){if(typeof n=="string")return Zb(n,i);var c=Object.prototype.toString.call(n).slice(8,-1);if(c==="Object"&&n.constructor&&(c=n.constructor.name),c==="Map"||c==="Set")return Array.from(n);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Zb(n,i)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Zb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Jb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function Ii(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jb(Object(n),!0).forEach(function(i){ei(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jb(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Qb(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Zp(e,t){return Zp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Zp(e,t)}function Hj(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Gs(e);if(t){var c=Gs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return Uj(this,n)}}function Uj(e,t){if(t&&(qp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Li(e)}function Li(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gs(e){return Gs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gs(e)}function ei(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var em,tm,nm,Jp=_r((qb=Kb=function(e){(function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(h&&h.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),h&&Zp(f,h)})(s,e);var t,n,i,c=Hj(s);function s(){var f;return function(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")}(this,s),ei(Li(f=c.call(this)),"ref",Object(re.f)()),ei(Li(f),"__prevText",{type:"",text:"",id:""}),ei(Li(f),"keyupHandler",function(h){var y=f.props.graphModel.textEditElement;h.key==="Enter"&&h.altKey&&y.setElementState(0)}),ei(Li(f),"inputHandler",function(h){var y=h.target.innerText,_=f.props.graphModel.textEditElement;f.__prevText={type:_.type,text:y.replace(/(\r\n)+$|(\n)+$/,""),id:_.id}}),ei(Li(f),"keydownHandler",function(h){h.stopPropagation()}),f.state={style:{left:0,top:0}},f}return t=s,i=[{key:"getDerivedStateFromProps",value:function(f){var h,y=f.graphModel,_=y.transformModel,x=y.theme,A=y.textEditElement;if(A){var D;if((D=A.text)===null||D===void 0||!D.value)if(A.BaseType===rn.EDGE){var z=(A=A).text,U=A.textPosition,q=U.x,ae=U.y;z.x=q,z.y=ae,A.setText(z)}else A=A;var oe={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(A.BaseType===rn.EDGE){var fe=x.edgeText,_e=fe.overflowMode,Me=fe.lineHeight,Se=fe.wrapPadding,He=fe.textWidth;He&&_e==="autoWrap"&&(h=Ii(Ii({},oe),{},{width:He,minWidth:He,lineHeight:Me,padding:Se}))}else if(A.BaseType===rn.NODE){var ke=x.nodeText,$e=ke.overflowMode,Ie=ke.lineHeight,ht=ke.wrapPadding,Nt=ke.textWidth,Pt=A,Bt=Pt.width,tn=Pt.modelType;(tn!==_t.TEXT_NODE&&$e==="autoWrap"||tn===_t.TEXT_NODE&&Nt)&&(h=Ii(Ii({},oe),{},{width:Nt||Bt,minWidth:Nt||Bt,lineHeight:Ie,padding:ht}))}var cn=A.text,Pn=cn.x,zr=cn.y,ir=Gj(_.CanvasPointToHtmlPoint([Pn,zr]),2);return{style:Ii({left:ir[0],top:ir[1]},h)}}}}],(n=[{key:"componentDidUpdate",value:function(){var f=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var h=this.__prevText,y=h.text,_=h.id;f.updateText(_,y),f.eventCenter.emit(ot.TEXT_UPDATE,Ii({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(f){if(window.getSelection!==void 0&&document.createRange!==void 0){var h=document.createRange();h.selectNodeContents(f),h.collapse(!1);var y=window.getSelection();y.removeAllRanges(),y.addRange(h)}}},{key:"render",value:function(){var f,h=this.props.graphModel.textEditElement,y=this.state.style;return h?Object(re.g)("div",{contentEditable:!0,className:"lf-text-input",style:y,ref:this.ref,key:h.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(f=h.text)===null||f===void 0?void 0:f.value):null}}])&&Qb(t.prototype,n),i&&Qb(t,i),s}(re.a),ei(Kb,"toolName","textEdit"),Vb=qb))||Vb,Xj=function(e){return e.modelType===_t.LINE_EDGE?function(t){var n=t.startPoint,i=t.endPoint,c=(n.x+i.x)/2,s=(n.y+i.y)/2,f=Math.abs(n.x-i.x)+10,h=Math.abs(n.y-i.y)+10;return{x:c-f/2,y:s-h/2,x1:c+f/2,y1:s+h/2}}(e):e.modelType===_t.POLYLINE_EDGE?function(t){var n=t.points,i=Zo(n),c=Ea(i,8),s=c.x,f=c.y,h=c.width,y=c.height;return{x:s-h/2,y:f-y/2,x1:s+h/2,y1:f+y/2}}(e):e.modelType===_t.BEZIER_EDGE?function(t){var n=t.path,i=kl(n),c=Ea(i,8),s=c.x,f=c.y,h=c.width,y=c.height;return{x:s-h/2,y:f-y/2,x1:s+h/2,y1:f+y/2}}(e):void 0};function Qp(e){return Qp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qp(e)}function rm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,i){var c=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(c!=null){var s,f,h=[],y=!0,_=!1;try{for(c=c.call(n);!(y=(s=c.next()).done)&&(h.push(s.value),!i||h.length!==i);y=!0);}catch(x){_=!0,f=x}finally{try{y||c.return==null||c.return()}finally{if(_)throw f}}return h}}(e,t)||om(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Yj(e){return function(t){if(Array.isArray(t))return ed(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||om(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function om(e,t){if(e){if(typeof e=="string")return ed(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ed(e,t):void 0}}function ed(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Vj(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function td(e,t){return td=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},td(e,t)}function Kj(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Hs(e);if(t){var c=Hs(this).constructor;n=Reflect.construct(i,arguments,c)}else n=i.apply(this,arguments);return qj(this,n)}}function qj(e,t){if(t&&(Qp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return La(e)}function La(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hs(e){return Hs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hs(e)}function Ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nd=_r((nm=tm=function(e){(function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(f&&f.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),f&&td(s,f)})(c,e);var t,n,i=Kj(c);function c(s){var f;(function(x,A){if(!(x instanceof A))throw new TypeError("Cannot call a class as a function")})(this,c),Ba(La(f=i.call(this)),"stepDrag",void 0),Ba(La(f),"handleMouseDown",function(x){f.stepDrag.handleMouseDown(x)}),Ba(La(f),"onDragging",function(x){var A=x.deltaX,D=x.deltaY,z=f.props.graphModel,U=z.getSelectElements(!0);z.moveNodes(U.nodes.map(function(q){return q.id}),A,D)}),Ba(La(f),"handleContextMenu",function(x){x.preventDefault();var A=f.props,D=A.graphModel,z=A.graphModel,U=z.eventCenter,q=z.selectElements,ae=D.getPointByClient({x:x.clientX,y:x.clientY}),oe={nodes:[],edges:[]};Yj(q.values()).forEach(function(fe){fe.BaseType===rn.NODE&&oe.nodes.push(fe.getData()),fe.BaseType===rn.EDGE&&oe.edges.push(fe.getData())}),U.emit(ot.SELECTION_CONTEXTMENU,{data:oe,e:x,position:ae})});var h=s.graphModel,y=h.gridSize,_=h.eventCenter;return f.stepDrag=new Zr({onDragging:f.onDragging,step:y,eventType:"SELECTION",eventCenter:_}),f}return t=c,(n=[{key:"render",value:function(){var s=this.props.graphModel,f=s.selectElements,h=s.transformModel;if(!(f.size<=1)){var y=Number.MAX_SAFE_INTEGER,_=Number.MAX_SAFE_INTEGER,x=Number.MIN_SAFE_INTEGER,A=Number.MIN_SAFE_INTEGER;f.forEach(function(q){var ae={x:0,y:0,x1:0,y1:0};q.BaseType===rn.NODE&&(ae=function(oe){var fe=oe.x,_e=oe.y,Me=oe.width,Se=oe.height;return{x:fe-Me/2,y:_e-Se/2,x1:fe+Me/2,y1:_e+Se/2}}(q)),q.BaseType===rn.EDGE&&(ae=Xj(q)),y=Math.min(y,ae.x),_=Math.min(_,ae.y),x=Math.max(x,ae.x1),A=Math.max(A,ae.y1)});var D=rm(h.CanvasPointToHtmlPoint([y,_]),2);y=D[0],_=D[1];var z=rm(h.CanvasPointToHtmlPoint([x,A]),2);x=z[0],A=z[1];var U={left:"".concat(y-10,"px"),top:"".concat(_-10,"px"),width:"".concat(x-y+20,"px"),height:"".concat(A-_+20,"px")};return Object(re.g)("div",{className:"lf-multiple-select",style:U,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&Vj(t.prototype,n),c}(re.a),Ba(tm,"toolName","multipleSelect"),em=nm))||em;function Zj(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Us(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jj=function(){function e(i){(function(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),Us(this,"tools",void 0),Us(this,"components",void 0),Us(this,"toolMap",new Map),Us(this,"instance",void 0),this.instance=i,this.isDisabledTool(Jp.toolName)||this.registerTool(Jp.toolName,Jp),this.isDisabledTool(nd.toolName)||this.registerTool(nd.toolName,nd);var c=i.graphModel;c.eventCenter.on("".concat(ot.GRAPH_TRANSFORM,",").concat(ot.NODE_CLICK,",").concat(ot.BLANK_CLICK," "),function(){var s=c.textEditElement,f=c.editConfigModel,h=f.edgeTextEdit,y=f.nodeTextEdit;(h||y)&&s&&c.textEditElement.setElementState(Tt.DEFAULT)})}var t,n;return t=e,(n=[{key:"isDisabledTool",value:function(i){return this.instance.options.disabledTools.indexOf(i)!==-1}},{key:"registerTool",value:function(i,c){this.toolMap.set(i,c)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&Zj(t.prototype,n),e}(),Qj=o(168),eP=o.n(Qj);function tP(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var im=function(){function e(i){(function(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),rd(this,"mousetrap",void 0),rd(this,"options",void 0),rd(this,"target",void 0),i.keyboard||(i.keyboard={enabled:!1}),this.options=i;var c=i.lf;this.target=c.container,this.mousetrap=new eP.a(this.target),i.keyboard.enabled&&this.enable(!0)}var t,n;return t=e,(n=[{key:"initShortcuts",value:function(){var i=this,c=this.options.keyboard.shortcuts;if(c)if(hn(c))c.forEach(function(y){var _=y.keys,x=y.callback,A=y.action;return i.on(_,x,A)});else{var s=c.keys,f=c.callback,h=c.action;this.on(s,f,h)}}},{key:"on",value:function(i,c,s){this.mousetrap.bind(this.getKeys(i),c,s)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(i,c){this.mousetrap.unbind(this.getKeys(i),c)}},{key:"enable",value:function(i){(this.disabled||i)&&(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(i){var c=this;return(Array.isArray(i)?i:[i]).map(function(s){return c.formatKey(s)})}},{key:"formatKey",value:function(i){return i.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&tP(t.prototype,n),e}(),nP=im,ao=null;function am(e,t){return e.x+=t,e.y+=t,e.text&&(e.text.x+=t,e.text.y+=t),e}function um(e,t){return e.startPoint&&(e.startPoint.x+=t,e.startPoint.y+=t),e.endPoint&&(e.endPoint.x+=t,e.endPoint.y+=t),e.pointsList&&e.pointsList.length>0&&e.pointsList.forEach(function(n){n.x+=t,n.y+=t}),e.text&&(e.text.x+=t,e.text.y+=t),e}function od(e){return od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},od(e)}function sm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,i)}return n}function za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sm(Object(n),!0).forEach(function(i){Ut(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sm(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function cm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var id=Symbol("plugin register by Logicflow.use"),ad=function(){function e(c){var s,f,h=this;(function(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")})(this,e),Ut(this,"container",void 0),Ut(this,"width",void 0),Ut(this,"height",void 0),Ut(this,"graphModel",void 0),Ut(this,"history",void 0),Ut(this,"viewMap",new Map),Ut(this,"tool",void 0),Ut(this,"keyboard",void 0),Ut(this,"dnd",void 0),Ut(this,"options",void 0),Ut(this,"snaplineModel",void 0),Ut(this,"components",[]),Ut(this,"plugins",void 0),Ut(this,"extension",{}),Ut(this,"adapterIn",void 0),Ut(this,"adapterOut",void 0),Ut(this,"getView",function(y){return h.viewMap.get(y)}),c=cv(c),this.options=c,this.container=this.initContainer(c.container),this.plugins=c.plugins,this.graphModel=new cx(za({},c)),this.tool=new Jj(this),this.history=new Wj(this.graphModel.eventCenter),this.dnd=new iE({lf:this}),this.keyboard=new nP({lf:this,keyboard:c.keyboard}),c.snapline!==!1&&(this.snaplineModel=new mb(this.graphModel),s=this.graphModel.eventCenter,f=this.snaplineModel,s.on("node:mousemove",function(y){var _=y.data;f.setNodeSnapLine(_)}),s.on("node:mouseup",function(){f.clearSnapline()})),function(y,_){var x=y.keyboard,A=x.options.keyboard;x.on(["cmd + c","ctrl + c"],function(){if(!A.enabled||_.textEditElement)return!0;var D=y.options.guards,z=_.getSelectElements(!1);return D&&D.beforeClone&&!D.beforeClone(z)||z.nodes.length===0&&z.edges.length===0?(ao=null,!0):((ao=z).nodes.forEach(function(U){return am(U,40)}),ao.edges.forEach(function(U){return um(U,40)}),!1)}),x.on(["cmd + v","ctrl + v"],function(){if(!A.enabled||_.textEditElement)return!0;if(ao&&(ao.nodes||ao.edges)){y.clearSelectElements();var D=y.addElements(ao);if(!D)return!0;D.nodes.forEach(function(z){return y.selectElementById(z.id,!0)}),D.edges.forEach(function(z){return y.selectElementById(z.id,!0)}),ao.nodes.forEach(function(z){return am(z,40)}),ao.edges.forEach(function(z){return um(z,40)})}return!1}),x.on(["cmd + z","ctrl + z"],function(){return!A.enabled||!!_.textEditElement||(y.undo(),!1)}),x.on(["cmd + y","ctrl + y"],function(){return!A.enabled||!!_.textEditElement||(y.redo(),!1)}),x.on(["backspace"],function(){if(!A.enabled||_.textEditElement)return!0;var D=_.getSelectElements(!0);return y.clearSelectElements(),D.edges.forEach(function(z){return y.deleteEdge(z.id)}),D.nodes.forEach(function(z){return y.deleteNode(z.id)}),!1})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(c.disabledPlugins)}var t,n,i;return t=e,n=[{key:"register",value:function(c,s){var f=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof c=="string"){var h={BaseEdge:Ca,BaseEdgeModel:vl,BaseNode:no,BaseNodeModel:to,RectNode:Jf,RectNodeModel:Df,CircleNode:np,CircleNodeModel:df,PolygonNode:up,PolygonNodeModel:Af,TextNode:mp,TextNodeModel:If,LineEdge:Lp,LineEdgeModel:wl,DiamondNode:fp,DiamondNodeModel:bf,PolylineEdge:Wp,PolylineEdgeModel:jl,BezierEdge:Xp,BezierEdgeModel:uf,EllipseNode:gp,EllipseNodeModel:wf,HtmlNode:xp,HtmlNodeModel:zf,h:re.g,type:c};this.viewMap.forEach(function(D){var z=D.extendKey;z&&(h[z]=D)}),this.graphModel.modelMap.forEach(function(D){var z=D.extendKey;z&&(h[z]=D)});var y=s(h),_=y.view,x=y.model,A=_;f&&!A.isObervered&&(A.isObervered=!0,A=Ge(A)),this.setView(c,A),this.graphModel.setModel(c,x)}else this.registerElement(c)}},{key:"registerElement",value:function(c){var s=c.view;c.isObserverView===!1||s.isObervered||(s.isObervered=!0,s=Ge(s)),this.setView(c.type,s),this.graphModel.setModel(c.type,c.model)}},{key:"batchRegister",value:function(){var c=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];s.forEach(function(f){c.registerElement(f)})}},{key:"defaultRegister",value:function(){this.registerElement({view:Jf,model:Df,type:"rect"}),this.registerElement({type:"circle",view:np,model:df}),this.registerElement({type:"polygon",view:up,model:Af}),this.registerElement({type:"line",view:Lp,model:wl}),this.registerElement({type:"polyline",view:Wp,model:jl}),this.registerElement({type:"bezier",view:Xp,model:uf}),this.registerElement({type:"text",view:mp,model:If}),this.registerElement({type:"ellipse",view:gp,model:wf}),this.registerElement({type:"diamond",view:fp,model:bf}),this.registerElement({type:"html",view:xp,model:zf})}},{key:"selectElementById",value:function(c){var s=arguments.length>1&&arguments[1]!==void 0&&arguments[1],f=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];this.graphModel.selectElementById(c,s),!s&&f&&this.graphModel.toFront(c)}},{key:"focusOn",value:function(c){var s=this.graphModel.transformModel,f=c.coordinate,h=c.id;if(!f){var y=this.getNodeModelById(h);y&&(f=y.getData());var _=this.getEdgeModelById(h);_&&(f=_.textPosition)}var x=f,A=x.x,D=x.y;s.focusOn(A,D,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(c){this.graphModel.setTheme(c)}},{key:"resize",value:function(c,s){this.graphModel.resize(c,s),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(c){this.graphModel.setDefaultEdgeType(c)}},{key:"updateText",value:function(c,s){this.graphModel.updateText(c,s)}},{key:"deleteElement",value:function(c){var s,f,h,y=this.getModelById(c);return!!y&&(f=(h=(Ut(s={},rn.NODE,this.deleteNode),Ut(s,rn.EDGE,this.deleteEdge),s)[y.BaseType])===null||h===void 0?void 0:h.call(this,c))!==null&&f!==void 0&&f}},{key:"getModelById",value:function(c){return this.graphModel.getElement(c)}},{key:"getDataById",value:function(c){var s;return(s=this.graphModel.getElement(c))===null||s===void 0?void 0:s.getData()}},{key:"changeNodeType",value:function(c,s){this.graphModel.changeNodeType(c,s)}},{key:"changeEdgeType",value:function(c,s){this.graphModel.changeEdgeType(c,s)}},{key:"getNodeEdges",value:function(c){return this.graphModel.getNodeEdges(c)}},{key:"addNode",value:function(c){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ot.NODE_ADD,f=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(c,s,f)}},{key:"deleteNode",value:function(c){var s=this.graphModel.getNodeModelById(c);if(!s)return!1;var f=s.getData(),h=this.options.guards,y=!h||!h.beforeDelete||h.beforeDelete(f);return y&&this.graphModel.deleteNode(c),y}},{key:"cloneNode",value:function(c){var s=this.graphModel.getNodeModelById(c).getData(),f=this.options.guards;if(!f||!f.beforeClone||f.beforeClone(s))return this.graphModel.cloneNode(c)}},{key:"changeNodeId",value:function(c,s){return this.graphModel.changeNodeId(c,s)}},{key:"getNodeModelById",value:function(c){return this.graphModel.getNodeModelById(c)}},{key:"getNodeDataById",value:function(c){var s;return(s=this.graphModel.getNodeModelById(c))===null||s===void 0?void 0:s.getData()}},{key:"addEdge",value:function(c){return this.graphModel.addEdge(c)}},{key:"deleteEdge",value:function(c){var s=this.options.guards,f=this.graphModel.edgesMap[c];if(!f)return!1;var h=f.model.getData(),y=!s||!s.beforeDelete||s.beforeDelete(h);return y&&this.graphModel.deleteEdgeById(c),y}},{key:"deleteEdgeByNodeId",value:function(c){var s=c.sourceNodeId,f=c.targetNodeId;s&&f?this.graphModel.deleteEdgeBySourceAndTarget(s,f):s?this.graphModel.deleteEdgeBySource(s):f&&this.graphModel.deleteEdgeByTarget(f)}},{key:"changeEdgeId",value:function(c,s){return this.graphModel.changeEdgeId(c,s)}},{key:"getEdgeModelById",value:function(c){var s;return(s=this.graphModel.edgesMap[c])===null||s===void 0?void 0:s.model}},{key:"getEdgeModels",value:function(c){var s=this.graphModel.edges,f=c.sourceNodeId,h=c.targetNodeId;if(f&&h){var y=[];return s.forEach(function(A){A.sourceNodeId===f&&A.targetNodeId===h&&y.push(A)}),y}if(f){var _=[];return s.forEach(function(A){A.sourceNodeId===f&&_.push(A)}),_}if(h){var x=[];return s.forEach(function(A){A.targetNodeId===h&&x.push(A)}),x}return[]}},{key:"getEdgeDataById",value:function(c){var s;return(s=this.getEdgeModelById(c))===null||s===void 0?void 0:s.getData()}},{key:"getNodeIncomingEdge",value:function(c){return this.graphModel.getNodeIncomingEdge(c)}},{key:"getNodeOutgoingEdge",value:function(c){return this.graphModel.getNodeOutgoingEdge(c)}},{key:"getNodeIncomingNode",value:function(c){return this.graphModel.getNodeIncomingNode(c)}},{key:"getNodeOutgoingNode",value:function(c){return this.graphModel.getNodeOutgoingNode(c)}},{key:"editText",value:function(c){this.graphModel.editText(c)}},{key:"setProperties",value:function(c,s){var f;(f=this.graphModel.getElement(c))===null||f===void 0||f.setProperties(vn(s))}},{key:"deleteProperty",value:function(c,s){var f;(f=this.graphModel.getElement(c))===null||f===void 0||f.deleteProperty(s)}},{key:"getProperties",value:function(c){var s;return(s=this.graphModel.getElement(c))===null||s===void 0?void 0:s.getProperties()}},{key:"toFront",value:function(c){this.graphModel.toFront(c)}},{key:"setElementZIndex",value:function(c,s){return this.graphModel.setElementZIndex(c,s)}},{key:"addElements",value:function(c){for(var s=this,f=c.nodes,h=c.edges,y={},_={nodes:[],edges:[]},x=0;x<f.length;x++){var A=f[x],D=A.id,z=this.addNode(A);if(!z)return;D&&(y[D]=z.id),_.nodes.push(z)}return h.forEach(function(U){var q=U.sourceNodeId,ae=U.targetNodeId;y[q]&&(q=y[q]),y[ae]&&(ae=y[ae]);var oe=s.graphModel.addEdge(za(za({},U),{},{sourceNodeId:q,targetNodeId:ae}));_.edges.push(oe)}),_}},{key:"getAreaElement",value:function(c,s){var f=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],h=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],y=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return this.graphModel.getAreaElement(c,s,f,h,y).map(function(_){return _.getData()})}},{key:"getSelectElements",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.graphModel.getSelectElements(c)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var c=this.graphModel.modelToGraphData();if(this.adapterOut){for(var s=arguments.length,f=new Array(s),h=0;h<s;h++)f[h]=arguments[h];return this.adapterOut.apply(this,[c].concat(f))}return c}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(c){this.graphModel.editConfigModel.updateEditConfig(c)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(c,s){return this.graphModel.getPointByClient({x:c,y:s})}},{key:"undo",value:function(){if(this.history.undoAble()){var c=vn(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(c)}}},{key:"redo",value:function(){if(this.history.redoAble()){var c=vn(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(c)}}},{key:"zoom",value:function(c,s){return this.graphModel.transformModel.zoom(c,s)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(c){this.graphModel.transformModel.setZoomMiniSize(c)}},{key:"setZoomMaxSize",value:function(c){this.graphModel.transformModel.setZoomMaxSize(c)}},{key:"getTransform",value:function(){var c=this.graphModel.transformModel;return{SCALE_X:c.SCALE_X,SCALE_Y:c.SCALE_Y,TRANSLATE_X:c.TRANSLATE_X,TRANSLATE_Y:c.TRANSLATE_Y}}},{key:"translate",value:function(c,s){this.graphModel.transformModel.translate(c,s)}},{key:"resetTranslate",value:function(){var c=this.graphModel.transformModel,s=c.TRANSLATE_X,f=c.TRANSLATE_Y;this.translate(-s,-f)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(c,s){s===void 0&&(s=c),this.graphModel.fitView(c,s)}},{key:"openEdgeAnimation",value:function(c){this.graphModel.openEdgeAnimation(c)}},{key:"closeEdgeAnimation",value:function(c){this.graphModel.closeEdgeAnimation(c)}},{key:"on",value:function(c,s){this.graphModel.eventCenter.on(c,s)}},{key:"off",value:function(c,s){this.graphModel.eventCenter.off(c,s)}},{key:"once",value:function(c,s){this.graphModel.eventCenter.once(c,s)}},{key:"emit",value:function(c,s){this.graphModel.eventCenter.emit(c,s)}},{key:"initContainer",value:function(c){var s=document.createElement("div");return s.style.position="relative",s.style.width="100%",s.style.height="100%",c.innerHTML="",c.appendChild(s),s}},{key:"installPlugins",value:function(){var c,s=this,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=(c=this.plugins)!==null&&c!==void 0?c:e.extensions;h.forEach(function(y){var _=null,x=null;y[id]?(_=y.extension,x=y.props):_=y;var A=_.pluginName||_.name;f.indexOf(A)===-1&&s.installPlugin(_,x)})}},{key:"installPlugin",value:function(c,s){if(od(c)==="object"){var f=c.install,h=c.render;return f&&f.call(c,this,e),h&&this.components.push(h.bind(c)),void(this.extension[c.pluginName]=c)}var y=c,_=new y({lf:this,LogicFlow:e,options:this.options.pluginsOptions,props:s});_.render&&this.components.push(_.render.bind(_)),this.extension[y.pluginName]=_}},{key:"updateAttributes",value:function(c,s){this.graphModel.updateAttributes(c,s)}},{key:"createFakerNode",value:function(c){var s=this.graphModel.modelMap.get(c.type);if(s){var f=new s(za(za({},c),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(f),f}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(c){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(c)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(c,s){this.viewMap.set(c,s)}},{key:"renderRawData",value:function(c){this.graphModel.graphDataToModel(vn(c)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(re.j)(Object(re.g)(rE,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(ot.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(c=this.adapterIn(c)),this.renderRawData(c)}}],i=[{key:"use",value:function(c,s){var f,h,y=c.pluginName;y||(y=c.name);var _=(f=this.extensions.get(y))===null||f===void 0?void 0:f.extension;_&&_.destroy&&_.destroy(),this.extensions.set(y,(Ut(h={},id,id),Ut(h,"extension",c),Ut(h,"props",s),h))}}],n&&cm(t.prototype,n),i&&cm(t,i),e}();function _r(e){return Ge(e)}Ut(ad,"extensions",new Map),l.default=ad}])})})(Ed,Ed.exports);var Le=Ed.exports;const Zs=qP(Le),TL=[{type:"bpmn:startEvent",text:"开始",class:"bpmn-start"},{type:"bpmn:endEvent",text:"结束",class:"bpmn-end"},{type:"bpmn:exclusiveGateway",text:"网关",class:"bpmn-exclusiveGateway"},{type:"bpmn:userTask",text:"用户",class:"bpmn-user"}];var ML=function(){function r(){globalThis._ids=this,this._ids=new Set}return r.prototype.generateId=function(){var u="xxxxxxx".replace(/[x]/g,function(a){var l=Math.random()*16|0,o=a==="x"?l:l&3|8;return o.toString(16)});return u},r.prototype.next=function(){for(var u=this.generateId();this._ids.has(u);)u=this.generateId();return this._ids.add(u),u},r}(),kL=(globalThis==null?void 0:globalThis._ids)||new ML;function ra(){return kL.next()}var H1=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),DL=function(r){H1(u,r);function u(a,l){var o=this;return a.id||(a.id="Event_"+ra()),a.text||(a.text=""),a.text&&typeof a.text=="string"&&(a.text={value:a.text,x:a.x,y:a.y+40}),o=r.call(this,a,l)||this,o}return u.prototype.setAttributes=function(){this.r=18},u.prototype.getConnectedTargetRules=function(){var a=r.prototype.getConnectedTargetRules.call(this),l={message:"起始节点不能作为边的终点",validate:function(){return!1}};return a.push(l),a},u.extendKey="StartEventModel",u}(Le.CircleNodeModel),NL=function(r){H1(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.extendKey="StartEventNode",u}(Le.CircleNode),RL={type:"bpmn:startEvent",view:NL,model:DL},U1=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),uc=globalThis&&globalThis.__assign||function(){return uc=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},uc.apply(this,arguments)},CL=function(r){U1(u,r);function u(a,l){var o=this;return a.id||(a.id="Event_"+ra()),a.text||(a.text=""),a.text&&typeof a.text=="string"&&(a.text={value:a.text,x:a.x,y:a.y+40}),o=r.call(this,a,l)||this,o}return u.prototype.setAttributes=function(){this.r=18},u.prototype.getConnectedSourceRules=function(){var a=r.prototype.getConnectedSourceRules.call(this),l={message:"结束节点不能作为边的起点",validate:function(){return!1}};return a.push(l),a},u.extendKey="EndEventModel",u}(Le.CircleNodeModel),IL=function(r){U1(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},u.prototype.getShape=function(){var a=this.props.model,l=a.getNodeStyle(),o=a.x,p=a.y,d=a.r,g=r.prototype.getShape.call(this);return Le.h("g",{},g,Le.h("circle",uc(uc({},l),{cx:o,cy:p,r:d-5})))},u.extendKey="EndEventView",u}(Le.CircleNode),LL={type:"bpmn:endEvent",view:IL,model:CL},X1=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),Ua=globalThis&&globalThis.__assign||function(){return Ua=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},Ua.apply(this,arguments)},BL=function(r){X1(u,r);function u(a,l){var o=this;return a.id||(a.id="Gateway_"+ra()),a.text||(a.text=""),a.text&&typeof a.text=="string"&&(a.text={value:a.text,x:a.x,y:a.y+40}),o=r.call(this,a,l)||this,o.points=[[25,0],[50,25],[25,50],[0,25]],o}return u.extendKey="ExclusiveGatewayModel",u}(Le.PolygonNodeModel),zL=function(r){X1(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getShape=function(){var a=this.props.model,l=a.x,o=a.y,p=a.width,d=a.height,g=a.points,v=a.getNodeStyle();return Le.h("g",{transform:"matrix(1 0 0 1 "+(l-p/2)+" "+(o-d/2)+")"},Le.h("polygon",Ua(Ua({},v),{x:l,y:o,points:g})),Le.h("path",Ua({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"},v)))},u.extendKey="ExclusiveGatewayNode",u}(Le.PolygonNode),FL={type:"bpmn:exclusiveGateway",view:zL,model:BL},Y1=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),sc=globalThis&&globalThis.__assign||function(){return sc=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},sc.apply(this,arguments)},$L=function(r){Y1(u,r);function u(a,l){var o=this;return a.id||(a.id="Activity_"+ra()),o=r.call(this,a,l)||this,o}return u.extendKey="UserTaskModel",u}(Le.RectNodeModel),WL=function(r){Y1(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getLabelShape=function(){var a=this.props.model,l=a.x,o=a.y,p=a.width,d=a.height,g=a.getNodeStyle();return Le.h("svg",{x:l-p/2+5,y:o-d/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Le.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"}))},u.prototype.getShape=function(){var a=this.props.model,l=a.x,o=a.y,p=a.width,d=a.height,g=a.radius,v=a.getNodeStyle();return Le.h("g",{},[Le.h("rect",sc(sc({},v),{x:l-p/2,y:o-d/2,rx:g,ry:g,width:p,height:d})),this.getLabelShape()])},u.extendKey="UserTaskNode",u}(Le.RectNode),GL={type:"bpmn:userTask",view:WL,model:$L},V1=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),Sd=globalThis&&globalThis.__assign||function(){return Sd=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},Sd.apply(this,arguments)},HL=function(r){V1(u,r);function u(a,l){var o=this;return a.id||(a.id="Activity_"+ra()),o=r.call(this,a,l)||this,o}return u.extendKey="ServiceTaskModel",u}(Le.RectNodeModel),UL=function(r){V1(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getLabelShape=function(){var a=this.props.model,l=a.x,o=a.y,p=a.width,d=a.height,g=a.getNodeStyle();return Le.h("svg",{x:l-p/2+5,y:o-d/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Le.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"}))},u.prototype.getShape=function(){var a=this.props.model,l=a.x,o=a.y,p=a.width,d=a.height,g=a.radius,v=a.getNodeStyle();return Le.h("g",{},[Le.h("rect",Sd({x:l-p/2,y:o-d/2,rx:g,ry:g,width:p,height:d},v)),this.getLabelShape()])},u.extendKey="ServiceTaskNode",u}(Le.RectNode),XL={type:"bpmn:serviceTask",view:UL,model:HL},K1=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),YL=function(r){K1(u,r);function u(a,l){var o=this;return a.id||(a.id="Flow_"+ra()),o=r.call(this,a,l)||this,o}return u.extendKey="SequenceFlowModel",u}(Le.PolylineEdgeModel),VL=function(r){K1(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.extendKey="SequenceFlowEdge",u}(Le.PolylineEdge),KL={type:"bpmn:sequenceFlow",view:VL,model:YL},Ym={width:40,height:40},Vm={width:40,height:40},Km={width:40,height:40},qm={width:100,height:80},Zm={width:100,height:80},qL={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}}},ZL=function(){function r(u){var a=u.lf;a.setTheme(qL),a.register(RL),a.register(LL),a.register(FL),a.register(GL),a.register(XL),a.options.customBpmnEdge||(a.register(KL),a.setDefaultEdgeType("bpmn:sequenceFlow"))}return r.pluginName="bpmnElement",r}(),JL=function(){function r(){globalThis._ids=this,this._ids=new Set}return r.prototype.generateId=function(){var u="xxxxxxx".replace(/[x]/g,function(a){var l=Math.random()*16|0,o=a==="x"?l:l&3|8;return o.toString(16)});return u},r.prototype.next=function(){for(var u=this.generateId();this._ids.has(u);)u=this.generateId();return this._ids.add(u),u},r}(),QL=(globalThis==null?void 0:globalThis._ids)||new JL;function Jm(){return QL.next()}function q1(r){return Object.prototype.toString.call(r)}function e4(r){return" ".repeat(r)}function cc(r){var u=r;return q1(r)==="[object Object]"?(u={},Object.keys(r).forEach(function(a){var l=a;a.charAt(0)==="-"&&(l=a.substring(1)),u[l]=cc(r[a])})):Array.isArray(r)&&(u=[],r.forEach(function(a,l){u[l]=cc(a)})),u}function t4(r){var u=r;try{typeof u!="string"&&(u=JSON.parse(r))}catch{u=JSON.stringify(cc(r)).replace(/"/g,"'")}return u}var zi=`
|
||
`;function Qs(r,u,a){var l=e4(a),o="";if(u==="#text")return zi+l+r;if(u==="#cdata-section")return zi+l+"<![CDATA["+r+"]]>";if(u==="#comment")return zi+l+"<!--"+r+"-->";if((""+u).charAt(0)==="-")return" "+u.substring(1)+'="'+t4(r)+'"';if(Array.isArray(r))r.forEach(function(v){o+=Qs(v,u,a+1)});else if(q1(r)==="[object Object]"){var p=Object.keys(r),d="",g="";o+=(a===0?"":zi+l)+"<"+u,p.forEach(function(v){v.charAt(0)==="-"?d+=Qs(r[v],v,a+1):g+=Qs(r[v],v,a+1)}),o+=d+(g!==""?">"+g+(zi+l)+"</"+u+">":" />")}else o+=zi+l+("<"+u+">"+r.toString()+"</"+u+">");return o}function n4(r){var u="";for(var a in r)u+=Qs(r[a],a,0);return u}var kn=function(){};kn.ObjTree=function(){return this};kn.ObjTree.VERSION="0.23";kn.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
||
`;kn.ObjTree.prototype.attr_prefix="-";kn.ObjTree.prototype.parseXML=function(r){var u;if(window.DOMParser){var a=new DOMParser,l=a.parseFromString(r,"application/xml");if(!l)return;u=l.documentElement}else window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLDOM"),a.async=!1,a.loadXML(r),u=a.documentElement);if(u)return this.parseDOM(u)};kn.ObjTree.prototype.parseHTTP=function(r,u,a){var l={};for(var o in u)l[o]=u[o];if(l.method||(typeof l.postBody>"u"&&typeof l.postbody>"u"&&typeof l.parameters>"u"?l.method="get":l.method="post"),a){l.asynchronous=!0;var p=this,d=a,g=l.onComplete;l.onComplete=function(E){var w;E&&E.responseXML&&E.responseXML.documentElement&&(w=p.parseDOM(E.responseXML.documentElement)),d(w,E),g&&g(E)}}else l.asynchronous=!1;var v;if(typeof HTTP<"u"&&HTTP.Request){l.uri=r;var O=new HTTP.Request(l);O&&(v=O.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var O=new Ajax.Request(r,l);O&&(v=O.transport)}if(a)return v;if(v&&v.responseXML&&v.responseXML.documentElement)return this.parseDOM(v.responseXML.documentElement)};kn.ObjTree.prototype.parseDOM=function(r){if(r){if(this.__force_array={},this.force_array)for(var u=0;u<this.force_array.length;u++)this.__force_array[this.force_array[u]]=1;var a=this.parseElement(r);if(this.__force_array[r.nodeName]&&(a=[a]),r.nodeType!=11){var l={};l[r.nodeName]=a,a=l}return a}};kn.ObjTree.prototype.parseElement=function(r){if(r.nodeType!=7){if(r.nodeType==3||r.nodeType==4||r.nodeType==8){var u=r.nodeValue.match(/[^\x00-\x20]/);return u==null?void 0:r.nodeValue}var a=null,l={};if(r.attributes&&r.attributes.length){a={};for(var o=0;o<r.attributes.length;o++){var p=r.attributes[o].nodeName;if(typeof p=="string"){var d=r.attributes[o].nodeValue;try{d=JSON.parse(r.attributes[o].nodeValue.replace(/'/g,'"'))}catch{d=r.attributes[o].nodeValue}d&&(p=this.attr_prefix+p,typeof l[p]>"u"&&(l[p]=0),l[p]++,this.addNode(a,p,l[p],d))}}}if(r.childNodes&&r.childNodes.length){var g=!0;a&&(g=!1);for(var o=0;o<r.childNodes.length&&g;o++){var v=r.childNodes[o].nodeType;v==3||v==4||v==8||(g=!1)}if(g){a||(a="");for(var o=0;o<r.childNodes.length;o++)a+=r.childNodes[o].nodeValue}else{a||(a={});for(var o=0;o<r.childNodes.length;o++){var p=r.childNodes[o].nodeName;if(typeof p=="string"){var d=this.parseElement(r.childNodes[o]);d&&(typeof l[p]>"u"&&(l[p]=0),l[p]++,this.addNode(a,p,l[p],d))}}}}else a===null&&(a={});return a}};kn.ObjTree.prototype.addNode=function(r,u,a,l){this.__force_array[u]?(a==1&&(r[u]=[]),r[u][r[u].length]=l):a==1?r[u]=l:a==2?r[u]=[r[u],l]:r[u][r[u].length]=l};kn.ObjTree.prototype.writeXML=function(r){var u=this.hash_to_xml(null,r);return this.xmlDecl+u};kn.ObjTree.prototype.hash_to_xml=function(r,u){var a=[],l=[];for(var o in u)if(u.hasOwnProperty(o)){var p=u[o];o.charAt(0)!=this.attr_prefix?typeof p>"u"||p==null?a[a.length]="<"+o+" />":typeof p=="object"&&p.constructor==Array?a[a.length]=this.array_to_xml(o,p):typeof p=="object"?a[a.length]=this.hash_to_xml(o,p):a[a.length]=this.scalar_to_xml(o,p):l[l.length]=" "+o.substring(1)+'="'+this.xml_escape(p)+'"'}var d=l.join(""),g=a.join("");return typeof r>"u"||r==null||(a.length>0?g.match(/\n/)?g="<"+r+d+`>
|
||
`+g+"</"+r+`>
|
||
`:g="<"+r+d+">"+g+"</"+r+`>
|
||
`:g="<"+r+d+` />
|
||
`),g};kn.ObjTree.prototype.array_to_xml=function(r,u){for(var a=[],l=0;l<u.length;l++){var o=u[l];typeof o>"u"||o==null?a[a.length]="<"+r+" />":typeof o=="object"&&o.constructor==Array?a[a.length]=this.array_to_xml(r,o):typeof o=="object"?a[a.length]=this.hash_to_xml(r,o):a[a.length]=this.scalar_to_xml(r,o)}return a.join("")};kn.ObjTree.prototype.scalar_to_xml=function(r,u){return r=="#text"?this.xml_escape(u):"<"+r+">"+this.xml_escape(u)+"</"+r+`>
|
||
`};kn.ObjTree.prototype.xml_escape=function(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var r4=function(r){return new kn.ObjTree().parseXML(r)},o4=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),jd=globalThis&&globalThis.__assign||function(){return jd=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},jd.apply(this,arguments)},Rc=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p},Wr;(function(r){r.START="bpmn:startEvent",r.END="bpmn:endEvent",r.GATEWAY="bpmn:exclusiveGateway",r.USER="bpmn:userTask",r.SYSTEM="bpmn:serviceTask",r.FLOW="bpmn:sequenceFlow"})(Wr||(Wr={}));var Z1=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],Qm=["properties","startPoint","endPoint","pointsList"];function e0(r){var u=r?Qm.concat(r):Qm;return function(a){function l(o){var p={};return typeof o=="string"?o:Array.isArray(o)?o.map(function(d){return l(d)}):(Object.entries(o).forEach(function(d){var g=Rc(d,2),v=g[0],O=g[1];typeof O!="object"?v.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(v)?p[v]=O:p["-"+v]=O:u.includes(v)?p["-"+v]=l(O):p[v]=l(O)}),p)}return l(a)}}function lc(r){var u={};return Object.entries(r).forEach(function(a){var l=Rc(a,2),o=l[0],p=l[1];o.indexOf("-")===0?u[o.substring(1)]=cc(p):typeof p=="string"?u[o]=p:Object.prototype.toString.call(p)==="[object Object]"?u[o]=lc(p):Array.isArray(p)?u[o]=p.map(function(d){return lc(d)}):u[o]=p}),u}function i4(r,u,a){var l=new Map;u.nodes.forEach(function(p){var d,g={"-id":p.id};if(!((d=p.text)===null||d===void 0)&&d.value&&(g["-name"]=p.text.value),p.properties){var v=e0(a)(p.properties);Object.assign(g,v)}l.set(p.id,g),r[p.type]?Array.isArray(r[p.type])?r[p.type].push(g):r[p.type]=[r[p.type],g]:r[p.type]=g});var o=u.edges.map(function(p){var d,g,v=l.get(p.targetNodeId);v["bpmn:incoming"]?Array.isArray(v["bpmn:incoming"])?v["bpmn:incoming"].push(p.id):v["bpmn:incoming"]=[v["bpmn:incoming"],p.id]:v["bpmn:incoming"]=p.id;var O={"-id":p.id,"-sourceRef":p.sourceNodeId,"-targetRef":p.targetNodeId};if(!((d=p.text)===null||d===void 0)&&d.value&&(O["-name"]=(g=p.text)===null||g===void 0?void 0:g.value),p.properties){var E=e0(a)(p.properties);Object.assign(O,E)}return O});u.edges.forEach(function(p){var d=l.get(p.sourceNodeId);d["bpmn:outgoing"]?Array.isArray(d["bpmn:outgoing"])?d["bpmn:outgoing"].push(p.id):d["bpmn:outgoing"]=[d["bpmn:outgoing"],p.id]:d["bpmn:outgoing"]=p.id}),r[Wr.FLOW]=o}function a4(r,u){r["bpmndi:BPMNEdge"]=u.edges.map(function(a){var l,o=a.id,p=a.pointsList.map(function(g){var v=g.x,O=g.y;return{"-x":v,"-y":O}}),d={"-id":o+"_di","-bpmnElement":o,"di:waypoint":p};return!((l=a.text)===null||l===void 0)&&l.value&&(d["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":a.text.x-a.text.value.length*10/2,"-y":a.text.y-7,"-width":a.text.value.length*10,"-height":14}}),d}),r["bpmndi:BPMNShape"]=u.nodes.map(function(a){var l,o=a.id,p=100,d=80,g=a.x,v=a.y,O=$o.shapeConfigMap.get(a.type);O&&(p=O.width,d=O.height),g-=p/2,v-=d/2;var E={"-id":o+"_di","-bpmnElement":o,"dc:Bounds":{"-x":g,"-y":v,"-width":p,"-height":d}};return!((l=a.text)===null||l===void 0)&&l.value&&(E["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":a.text.x-a.text.value.length*10/2,"-y":a.text.y-7,"-width":a.text.value.length*10,"-height":14}}),E})}function u4(r){var u=[],a=[],l=r["bpmn:definitions"];if(l){var o=l["bpmn:process"];Object.keys(o).forEach(function(p){if(p.indexOf("bpmn:")===0){var d=o[p];if(p===Wr.FLOW){var g=l["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];a=c4(d,g)}else{var v=l["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];u=u.concat(s4(d,v,p))}}})}return{nodes:u,edges:a}}function s4(r,u,a){var l=[];if(Array.isArray(r))r.forEach(function(d){var g;Array.isArray(u)?g=u.find(function(O){return O["-bpmnElement"]===d["-id"]}):g=u;var v=t0(g,a,d);l.push(v)});else{var o=void 0;Array.isArray(u)?o=u.find(function(d){return d["-bpmnElement"]===r["-id"]}):o=u;var p=t0(o,a,r);l.push(p)}return l}function t0(r,u,a){var l=Number(r["dc:Bounds"]["-x"]),o=Number(r["dc:Bounds"]["-y"]),p=a["-name"],d=$o.shapeConfigMap.get(u);d&&(l+=d.width/2,o+=d.height/2);var g;Object.entries(a).forEach(function(w){var j=Rc(w,2),P=j[0],M=j[1];Z1.indexOf(P)===-1&&(g||(g={}),g[P]=M)}),g&&(g=lc(g));var v;if(p&&(v={x:l,y:o,value:p},r["bpmndi:BPMNLabel"]&&r["bpmndi:BPMNLabel"]["dc:Bounds"])){var O=r["bpmndi:BPMNLabel"]["dc:Bounds"];v.x=Number(O["-x"])+Number(O["-width"])/2,v.y=Number(O["-y"])+Number(O["-height"])/2}var E={id:r["-bpmnElement"],type:u,x:l,y:o,properties:g};return v&&(E.text=v),E}function c4(r,u){var a=[];if(Array.isArray(r))r.forEach(function(o){var p;Array.isArray(u)?p=u.find(function(d){return d["-bpmnElement"]===o["-id"]}):p=u,a.push(n0(p,o))});else{var l=void 0;Array.isArray(u)?l=u.find(function(o){return o["-bpmnElement"]===r["-id"]}):l=u,a.push(n0(l,r))}return a}function n0(r,u){var a,l=u["-name"];if(l){var o=r["bpmndi:BPMNLabel"]["dc:Bounds"],p=0;l.split(`
|
||
`).forEach(function(v){p<v.length&&(p=v.length)}),a={value:l,x:Number(o["-x"])+p*10/2,y:Number(o["-y"])+7}}var d;Object.entries(u).forEach(function(v){var O=Rc(v,2),E=O[0],w=O[1];Z1.indexOf(E)===-1&&(d||(d={}),d[E]=w)}),d&&(d=lc(d));var g={id:u["-id"],type:Wr.FLOW,pointsList:r["di:waypoint"].map(function(v){return{x:Number(v["-x"]),y:Number(v["-y"])}}),sourceNodeId:u["-sourceRef"],targetNodeId:u["-targetRef"],properties:d};return a&&(g.text=a),g}var $o=function(){function r(u){var a=this,l=u.lf;this.adapterOut=function(o,p){var d=jd({},a.processAttributes);i4(d,o,p);var g={"-id":"BPMNPlane_1","-bpmnElement":d["-id"]};a4(g,o);var v=a.definitionAttributes;v["bpmn:process"]=d,v["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":g};var O={"bpmn:definitions":v};return O},this.adapterIn=function(o){if(o)return u4(o)},l.adapterIn=function(o){return a.adapterIn(o)},l.adapterOut=function(o,p){return a.adapterOut(o,p)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+Jm()},this.definitionAttributes={"-id":"Definitions_"+Jm(),"-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 r.prototype.setCustomShape=function(u,a){r.shapeConfigMap.set(u,a)},r.pluginName="bpmn-adapter",r.shapeConfigMap=new Map,r}();$o.shapeConfigMap.set(Wr.START,{width:Ym.width,height:Ym.height});$o.shapeConfigMap.set(Wr.END,{width:Vm.width,height:Vm.height});$o.shapeConfigMap.set(Wr.GATEWAY,{width:Km.width,height:Km.height});$o.shapeConfigMap.set(Wr.SYSTEM,{width:qm.width,height:qm.height});$o.shapeConfigMap.set(Wr.USER,{width:Zm.width,height:Zm.height});(function(r){o4(u,r);function u(a){var l=r.call(this,a)||this;l.adapterXmlIn=function(p){var d=r4(p);return l.adapterIn(d)},l.adapterXmlOut=function(p,d){var g=l.adapterOut(p,d);return n4(g)};var o=a.lf;return o.adapterIn=l.adapterXmlIn,o.adapterOut=l.adapterXmlOut,l}return u.pluginName="bpmnXmlAdapter",u})($o);var l4=function(){function r(){globalThis._ids=this,this._ids=new Set}return r.prototype.generateId=function(){var u="xxxxxxx".replace(/[x]/g,function(a){var l=Math.random()*16|0,o=a==="x"?l:l&3|8;return o.toString(16)});return u},r.prototype.next=function(){for(var u=this.generateId();this._ids.has(u);)u=this.generateId();return this._ids.add(u),u},r}(),f4=(globalThis==null?void 0:globalThis._ids)||new l4;function p4(){return f4.next()}globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var r0=globalThis&&globalThis.__assign||function(){return r0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},r0.apply(this,arguments)},d4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var o0=globalThis&&globalThis.__assign||function(){return o0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},o0.apply(this,arguments)},h4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var i0=globalThis&&globalThis.__assign||function(){return i0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},i0.apply(this,arguments)},y4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var a0=globalThis&&globalThis.__assign||function(){return a0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},a0.apply(this,arguments)},g4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var u0=globalThis&&globalThis.__assign||function(){return u0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},u0.apply(this,arguments)},v4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;Le.h("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),Le.h("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(180,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(210,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(240,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(270,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(300,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),Le.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(330,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"});Le.h("circle",{cx:18,cy:18,r:10,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 4px; fill: rgb(34, 36, 42);"});Le.h("circle",{cx:25,cy:25,r:13,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2.5px; fill: white;"});globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var s0=globalThis&&globalThis.__assign||function(){return s0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},s0.apply(this,arguments)};globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var c0=globalThis&&globalThis.__assign||function(){return c0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},c0.apply(this,arguments)},b4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;var yh,un,J1,ni,l0,Q1,Pd,ec={},eO=[],m4=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,gh=Array.isArray;function Ro(r,u){for(var a in u)r[a]=u[a];return r}function tO(r){var u=r.parentNode;u&&u.removeChild(r)}function Xa(r,u,a){var l,o,p,d={};for(p in u)p=="key"?l=u[p]:p=="ref"?o=u[p]:d[p]=u[p];if(arguments.length>2&&(d.children=arguments.length>3?yh.call(arguments,2):a),typeof r=="function"&&r.defaultProps!=null)for(p in r.defaultProps)d[p]===void 0&&(d[p]=r.defaultProps[p]);return tc(r,d,l,o,null)}function tc(r,u,a,l,o){var p={type:r,props:u,key:a,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++J1};return o==null&&un.vnode!=null&&un.vnode(p),p}function vh(r){return r.children}function Xi(r,u){this.props=r,this.context=u}function qa(r,u){if(u==null)return r.__?qa(r.__,r.__.__k.indexOf(r)+1):null;for(var a;u<r.__k.length;u++)if((a=r.__k[u])!=null&&a.__e!=null)return a.__e;return typeof r.type=="function"?qa(r):null}function nO(r){var u,a;if((r=r.__)!=null&&r.__c!=null){for(r.__e=r.__c.base=null,u=0;u<r.__k.length;u++)if((a=r.__k[u])!=null&&a.__e!=null){r.__e=r.__c.base=a.__e;break}return nO(r)}}function f0(r){(!r.__d&&(r.__d=!0)&&ni.push(r)&&!fc.__r++||l0!==un.debounceRendering)&&((l0=un.debounceRendering)||Q1)(fc)}function fc(){var r,u,a,l,o,p,d,g,v;for(ni.sort(Pd);r=ni.shift();)r.__d&&(u=ni.length,l=void 0,o=void 0,p=void 0,g=(d=(a=r).__v).__e,(v=a.__P)&&(l=[],o=[],(p=Ro({},d)).__v=d.__v+1,aO(v,d,p,a.__n,v.ownerSVGElement!==void 0,d.__h!=null?[g]:null,l,g??qa(d),d.__h,o),w4(l,d,o),d.__e!=g&&nO(d)),ni.length>u&&ni.sort(Pd));fc.__r=0}function rO(r,u,a,l,o,p,d,g,v,O,E){var w,j,P,M,T,k,I,L,Y,Q=0,X=l&&l.__k||eO,V=X.length,Z=V,F=u.length;for(a.__k=[],w=0;w<F;w++)(M=a.__k[w]=(M=u[w])==null||typeof M=="boolean"||typeof M=="function"?null:typeof M=="string"||typeof M=="number"||typeof M=="bigint"?tc(null,M,null,null,M):gh(M)?tc(vh,{children:M},null,null,null):M.__b>0?tc(M.type,M.props,M.key,M.ref?M.ref:null,M.__v):M)!=null?(M.__=a,M.__b=a.__b+1,(L=_4(M,X,I=w+Q,Z))===-1?P=ec:(P=X[L]||ec,X[L]=void 0,Z--),aO(r,M,P,o,p,d,g,v,O,E),T=M.__e,(j=M.ref)&&P.ref!=j&&(P.ref&&bh(P.ref,null,M),E.push(j,M.__c||T,M)),T!=null&&(k==null&&(k=T),(Y=P===ec||P.__v===null)?L==-1&&Q--:L!==I&&(L===I+1?Q++:L>I?Z>F-I?Q+=L-I:Q--:Q=L<I&&L==I-1?L-I:0),I=w+Q,typeof M.type!="function"||L===I&&P.__k!==M.__k?typeof M.type=="function"||L===I&&!Y?M.__d!==void 0?(v=M.__d,M.__d=void 0):v=T.nextSibling:v=iO(r,T,v):v=oO(M,v,r),typeof a.type=="function"&&(a.__d=v))):(P=X[w])&&P.key==null&&P.__e&&(P.__e==v&&(v=qa(P)),Ad(P,P,!1),X[w]=null);for(a.__e=k,w=V;w--;)X[w]!=null&&(typeof a.type=="function"&&X[w].__e!=null&&X[w].__e==a.__d&&(a.__d=X[w].__e.nextSibling),Ad(X[w],X[w]))}function oO(r,u,a){for(var l,o=r.__k,p=0;o&&p<o.length;p++)(l=o[p])&&(l.__=r,u=typeof l.type=="function"?oO(l,u,a):iO(a,l.__e,u));return u}function iO(r,u,a){return a==null||a.parentNode!==r?r.insertBefore(u,null):u==a&&u.parentNode!=null||r.insertBefore(u,a),u.nextSibling}function _4(r,u,a,l){var o=r.key,p=r.type,d=a-1,g=a+1,v=u[a];if(v===null||v&&o==v.key&&p===v.type)return a;if(l>(v!=null?1:0))for(;d>=0||g<u.length;){if(d>=0){if((v=u[d])&&o==v.key&&p===v.type)return d;d--}if(g<u.length){if((v=u[g])&&o==v.key&&p===v.type)return g;g++}}return-1}function O4(r,u,a,l,o){var p;for(p in a)p==="children"||p==="key"||p in u||pc(r,p,null,a[p],l);for(p in u)o&&typeof u[p]!="function"||p==="children"||p==="key"||p==="value"||p==="checked"||a[p]===u[p]||pc(r,p,u[p],a[p],l)}function p0(r,u,a){u[0]==="-"?r.setProperty(u,a??""):r[u]=a==null?"":typeof a!="number"||m4.test(u)?a:a+"px"}function pc(r,u,a,l,o){var p;e:if(u==="style")if(typeof a=="string")r.style.cssText=a;else{if(typeof l=="string"&&(r.style.cssText=l=""),l)for(u in l)a&&u in a||p0(r.style,u,"");if(a)for(u in a)l&&a[u]===l[u]||p0(r.style,u,a[u])}else if(u[0]==="o"&&u[1]==="n")p=u!==(u=u.replace(/(PointerCapture)$|Capture$/,"$1")),u=u.toLowerCase()in r?u.toLowerCase().slice(2):u.slice(2),r.l||(r.l={}),r.l[u+p]=a,a?l||r.addEventListener(u,p?h0:d0,p):r.removeEventListener(u,p?h0:d0,p);else if(u!=="dangerouslySetInnerHTML"){if(o)u=u.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(u!=="width"&&u!=="height"&&u!=="href"&&u!=="list"&&u!=="form"&&u!=="tabIndex"&&u!=="download"&&u!=="rowSpan"&&u!=="colSpan"&&u in r)try{r[u]=a??"";break e}catch{}typeof a=="function"||(a==null||a===!1&&u[4]!=="-"?r.removeAttribute(u):r.setAttribute(u,a))}}function d0(r){return this.l[r.type+!1](un.event?un.event(r):r)}function h0(r){return this.l[r.type+!0](un.event?un.event(r):r)}function aO(r,u,a,l,o,p,d,g,v,O){var E,w,j,P,M,T,k,I,L,Y,Q,X,V,Z,F,C=u.type;if(u.constructor!==void 0)return null;a.__h!=null&&(v=a.__h,g=u.__e=a.__e,u.__h=null,p=[g]),(E=un.__b)&&E(u);e:if(typeof C=="function")try{if(I=u.props,L=(E=C.contextType)&&l[E.__c],Y=E?L?L.props.value:E.__:l,a.__c?k=(w=u.__c=a.__c).__=w.__E:("prototype"in C&&C.prototype.render?u.__c=w=new C(I,Y):(u.__c=w=new Xi(I,Y),w.constructor=C,w.render=E4),L&&L.sub(w),w.props=I,w.state||(w.state={}),w.context=Y,w.__n=l,j=w.__d=!0,w.__h=[],w._sb=[]),w.__s==null&&(w.__s=w.state),C.getDerivedStateFromProps!=null&&(w.__s==w.state&&(w.__s=Ro({},w.__s)),Ro(w.__s,C.getDerivedStateFromProps(I,w.__s))),P=w.props,M=w.state,w.__v=u,j)C.getDerivedStateFromProps==null&&w.componentWillMount!=null&&w.componentWillMount(),w.componentDidMount!=null&&w.__h.push(w.componentDidMount);else{if(C.getDerivedStateFromProps==null&&I!==P&&w.componentWillReceiveProps!=null&&w.componentWillReceiveProps(I,Y),!w.__e&&(w.shouldComponentUpdate!=null&&w.shouldComponentUpdate(I,w.__s,Y)===!1||u.__v===a.__v)){for(u.__v!==a.__v&&(w.props=I,w.state=w.__s,w.__d=!1),u.__e=a.__e,u.__k=a.__k,u.__k.forEach(function(B){B&&(B.__=u)}),Q=0;Q<w._sb.length;Q++)w.__h.push(w._sb[Q]);w._sb=[],w.__h.length&&d.push(w);break e}w.componentWillUpdate!=null&&w.componentWillUpdate(I,w.__s,Y),w.componentDidUpdate!=null&&w.__h.push(function(){w.componentDidUpdate(P,M,T)})}if(w.context=Y,w.props=I,w.__P=r,w.__e=!1,X=un.__r,V=0,"prototype"in C&&C.prototype.render){for(w.state=w.__s,w.__d=!1,X&&X(u),E=w.render(w.props,w.state,w.context),Z=0;Z<w._sb.length;Z++)w.__h.push(w._sb[Z]);w._sb=[]}else do w.__d=!1,X&&X(u),E=w.render(w.props,w.state,w.context),w.state=w.__s;while(w.__d&&++V<25);w.state=w.__s,w.getChildContext!=null&&(l=Ro(Ro({},l),w.getChildContext())),j||w.getSnapshotBeforeUpdate==null||(T=w.getSnapshotBeforeUpdate(P,M)),rO(r,gh(F=E!=null&&E.type===vh&&E.key==null?E.props.children:E)?F:[F],u,a,l,o,p,d,g,v,O),w.base=u.__e,u.__h=null,w.__h.length&&d.push(w),k&&(w.__E=w.__=null)}catch(B){u.__v=null,(v||p!=null)&&(u.__e=g,u.__h=!!v,p[p.indexOf(g)]=null),un.__e(B,u,a)}else p==null&&u.__v===a.__v?(u.__k=a.__k,u.__e=a.__e):u.__e=x4(a.__e,u,a,l,o,p,d,v,O);(E=un.diffed)&&E(u)}function w4(r,u,a){for(var l=0;l<a.length;l++)bh(a[l],a[++l],a[++l]);un.__c&&un.__c(u,r),r.some(function(o){try{r=o.__h,o.__h=[],r.some(function(p){p.call(o)})}catch(p){un.__e(p,o.__v)}})}function x4(r,u,a,l,o,p,d,g,v){var O,E,w,j=a.props,P=u.props,M=u.type,T=0;if(M==="svg"&&(o=!0),p!=null){for(;T<p.length;T++)if((O=p[T])&&"setAttribute"in O==!!M&&(M?O.localName===M:O.nodeType===3)){r=O,p[T]=null;break}}if(r==null){if(M===null)return document.createTextNode(P);r=o?document.createElementNS("http://www.w3.org/2000/svg",M):document.createElement(M,P.is&&P),p=null,g=!1}if(M===null)j===P||g&&r.data===P||(r.data=P);else{if(p=p&&yh.call(r.childNodes),E=(j=a.props||ec).dangerouslySetInnerHTML,w=P.dangerouslySetInnerHTML,!g){if(p!=null)for(j={},T=0;T<r.attributes.length;T++)j[r.attributes[T].name]=r.attributes[T].value;(w||E)&&(w&&(E&&w.__html==E.__html||w.__html===r.innerHTML)||(r.innerHTML=w&&w.__html||""))}if(O4(r,P,j,o,g),w)u.__k=[];else if(rO(r,gh(T=u.props.children)?T:[T],u,a,l,o&&M!=="foreignObject",p,d,p?p[0]:a.__k&&qa(a,0),g,v),p!=null)for(T=p.length;T--;)p[T]!=null&&tO(p[T]);g||("value"in P&&(T=P.value)!==void 0&&(T!==r.value||M==="progress"&&!T||M==="option"&&T!==j.value)&&pc(r,"value",T,j.value,!1),"checked"in P&&(T=P.checked)!==void 0&&T!==r.checked&&pc(r,"checked",T,j.checked,!1))}return r}function bh(r,u,a){try{typeof r=="function"?r(u):r.current=u}catch(l){un.__e(l,a)}}function Ad(r,u,a){var l,o;if(un.unmount&&un.unmount(r),(l=r.ref)&&(l.current&&l.current!==r.__e||bh(l,null,u)),(l=r.__c)!=null){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(p){un.__e(p,u)}l.base=l.__P=null,r.__c=void 0}if(l=r.__k)for(o=0;o<l.length;o++)l[o]&&Ad(l[o],u,a||typeof r.type!="function");a||r.__e==null||tO(r.__e),r.__=r.__e=r.__d=void 0}function E4(r,u,a){return this.constructor(r,a)}yh=eO.slice,un={__e:function(r,u,a,l){for(var o,p,d;u=u.__;)if((o=u.__c)&&!o.__)try{if((p=o.constructor)&&p.getDerivedStateFromError!=null&&(o.setState(p.getDerivedStateFromError(r)),d=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(r,l||{}),d=o.__d),d)return o.__E=o}catch(g){r=g}throw r}},J1=0,Xi.prototype.setState=function(r,u){var a;a=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ro({},this.state),typeof r=="function"&&(r=r(Ro({},a),this.props)),r&&Ro(a,r),r!=null&&this.__v&&(u&&this._sb.push(u),f0(this))},Xi.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),f0(this))},Xi.prototype.render=vh,ni=[],Q1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pd=function(r,u){return r.__v.__b-u.__v.__b},fc.__r=0;var Ya=globalThis&&globalThis.__assign||function(){return Ya=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},Ya.apply(this,arguments)};function mh(r){var u=r.x,a=r.y,l=r.width,o=r.height,p=r.radius,d=r.className,g=u-l/2,v=a-o/2,O=Ya(Ya({width:10,height:10,cx:0,cy:0,rx:p||0,ry:p||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+d},r),{x:g,y:v});return Le.h("rect",Ya({},O))}mh.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Gi;(function(r){r.NODE="node",r.CIRCLE_NODE="circle-node",r.POLYGON_NODE="polygon-node",r.RECT_NODE="rect-node",r.HTML_NODE="html-node",r.TEXT_NODE="text-node",r.ELLIPSE_NODE="ellipse-node",r.DIAMOND_NODE="diamond-node",r.EDGE="edge",r.LINE_EDGE="line-edge",r.POLYLINE_EDGE="polyline-edge",r.BEZIER_EDGE="bezier-edge",r.GRAPH="graph"})(Gi||(Gi={}));var S4=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),ri=globalThis&&globalThis.__assign||function(){return ri=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},ri.apply(this,arguments)},j4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p},P4=Le.LogicFlowUtil.StepDrag,A4=function(r){S4(u,r);function u(a){var l=r.call(this)||this;return l.updatePosition=function(o){var p=o.deltaX,d=o.deltaY,g=l.nodeModel,v=g.x,O=g.y;l.nodeModel.x=v+p/2,l.nodeModel.y=O+d/2,l.nodeModel.moveText(p/2,d/2)},l.getResize=function(o){var p=o.index,d=o.deltaX,g=o.deltaY,v=o.width,O=o.height,E=o.PCTResizeInfo,w=o.pct,j=w===void 0?1:w,P={width:v,height:O,deltaX:d,deltaY:g};if(E){var M=4,T=0,k=0;switch(p){case 0:k=(d*-1-g)/M;break;case 1:k=(d-g)/M;break;case 2:k=(d+g)/M;break;case 3:k=(d*-1+g)/M;break}k!==0&&(T=Math.round(k/E.ResizeBasis.basisHeight*1e5)/1e3),E.ResizePCT.widthPCT=Math.max(Math.min(E.ResizePCT.widthPCT+T,E.ScaleLimit.maxScaleLimit),E.ScaleLimit.minScaleLimit),E.ResizePCT.hightPCT=Math.max(Math.min(E.ResizePCT.hightPCT+T,E.ScaleLimit.maxScaleLimit),E.ScaleLimit.minScaleLimit);var I=Math.round(E.ResizePCT.widthPCT*E.ResizeBasis.basisWidth/100),L=Math.round(E.ResizePCT.hightPCT*E.ResizeBasis.basisHeight/100);switch(p){case 0:d=v-I,g=O-L;break;case 1:d=I-v,g=O-L;break;case 2:d=I-v,g=L-O;break;case 3:d=v-I,g=L-O;break}return P.width=I,P.height=L,P.deltaX=d/j,P.deltaY=g/j,P}switch(p){case 0:P.width=v-d*j,P.height=O-g*j;break;case 1:P.width=v+d*j,P.height=O-g*j;break;case 2:P.width=v+d*j,P.height=O+g*j;break;case 3:P.width=v-d*j,P.height=O+g*j;break}return P},l.updateEdgePointByAnchors=function(){var o=l.nodeModel,p=o.id,d=o.anchors,g=l.getNodeEdges(p);g.sourceEdges.forEach(function(v){var O=d.find(function(E){return E.id===v.sourceAnchorId});v.updateStartPoint({x:O.x,y:O.y})}),g.targetEdges.forEach(function(v){var O=d.find(function(E){return E.id===v.targetAnchorId});v.updateEndPoint({x:O.x,y:O.y})})},l.updateRect=function(o){var p=o.deltaX,d=o.deltaY,g=l.nodeModel,v=g.id,O=g.x,E=g.y,w=g.width,j=g.height,P=g.radius,M=g.PCTResizeInfo,T=l.index,k=l.getResize({index:T,deltaX:p,deltaY:d,width:w,height:j,PCTResizeInfo:M,pct:1}),I=l.nodeModel,L=I.minWidth,Y=I.minHeight,Q=I.maxWidth,X=I.maxHeight;if(k.width<L||k.width>Q||k.height<Y||k.height>X){l.dragHandler.cancelDrag();return}l.updatePosition({deltaX:k.deltaX,deltaY:k.deltaY}),l.nodeModel.width=k.width,l.nodeModel.height=k.height,l.nodeModel.setProperties({nodeSize:{width:k.width,height:k.height}}),l.getNodeEdges(v);var V={x:O,y:E,width:w,height:j,radius:P},Z={x:l.nodeModel.x,y:l.nodeModel.y,width:l.nodeModel.width,height:l.nodeModel.height,radius:P};l.updateEdgePointByAnchors(),l.eventEmit({beforeNode:V,afterNode:Z})},l.updateEllipse=function(o){var p=o.deltaX,d=o.deltaY,g=l.nodeModel,v=g.id,O=g.rx,E=g.ry,w=g.x,j=g.y,P=g.PCTResizeInfo,M=l.index,T=O,k=E,I=l.getResize({index:M,deltaX:p,deltaY:d,width:T,height:k,PCTResizeInfo:P,pct:1/2}),L=l.nodeModel,Y=L.minWidth,Q=L.minHeight,X=L.maxWidth,V=L.maxHeight;if(I.width<Y/2||I.width>X/2||I.height<Q/2||I.height>V/2){l.dragHandler.cancelDrag();return}l.updatePosition({deltaX:I.deltaX,deltaY:I.deltaY}),l.nodeModel.rx=I.width,l.nodeModel.ry=I.height,l.nodeModel.setProperties({nodeSize:{rx:I.width,ry:I.height}}),l.getNodeEdges(v);var Z={x:w,y:j},F={rx:I.width,ry:I.height,x:l.nodeModel.x,y:l.nodeModel.y};l.updateEdgePointByAnchors(),l.eventEmit({beforeNode:ri(ri({},Z),{rx:O,ry:E}),afterNode:F})},l.updateDiamond=function(o){var p=o.deltaX,d=o.deltaY,g=l.nodeModel;g.id;var v=g.rx,O=g.ry,E=g.x,w=g.y,j=g.PCTResizeInfo,P=l.index,M=v,T=O,k=l.getResize({index:P,deltaX:p,deltaY:d,width:M,height:T,PCTResizeInfo:j,pct:1/2}),I=l.nodeModel,L=I.minWidth,Y=I.minHeight,Q=I.maxWidth,X=I.maxHeight;if(k.width<L/2||k.width>Q/2||k.height<Y/2||k.height>X/2){l.dragHandler.cancelDrag();return}l.updatePosition({deltaX:k.deltaX,deltaY:k.deltaY}),l.nodeModel.rx=k.width,l.nodeModel.ry=k.height,l.nodeModel.setProperties({nodeSize:{rx:k.width,ry:k.height}});var V={x:E,y:w,rx:v,ry:O},Z={rx:k.width,ry:k.height,x:l.nodeModel.x,y:l.nodeModel.y};l.updateEdgePointByAnchors(),l.eventEmit({beforeNode:V,afterNode:Z})},l.eventEmit=function(o){var p=o.beforeNode,d=o.afterNode,g=l.nodeModel,v=g.id,O=g.modelType,E=g.type,w=ri({id:v,modelType:O,type:E},p),j=ri({id:v,modelType:O,type:E},d);l.graphModel.eventCenter.emit("node:resize",{oldNodeSize:w,newNodeSize:j})},l.onDragging=function(o){var p,d=o.deltaX,g=o.deltaY,v=l.graphModel.transformModel,O=l.nodeModel.modelType;p=j4(v.fixDeltaXY(d,g),2),d=p[0],g=p[1],O===Gi.RECT_NODE||O===Gi.HTML_NODE?l.updateRect({deltaX:d,deltaY:g}):O===Gi.ELLIPSE_NODE?l.updateEllipse({deltaX:d,deltaY:g}):O===Gi.DIAMOND_NODE&&l.updateDiamond({deltaX:d,deltaY:g})},l.onDragEnd=function(){l.updateEdgePointByAnchors();var o=l.graphModel.gridSize,p=o===void 0?1:o,d=p*Math.round(l.nodeModel.x/p),g=p*Math.round(l.nodeModel.y/p);l.nodeModel.moveTo(d,g)},l.index=a.index,l.nodeModel=a.model,l.graphModel=a.graphModel,l.state={},l.dragHandler=new P4({onDragging:l.onDragging,onDragEnd:l.onDragEnd,step:1}),l}return u.prototype.getNodeEdges=function(a){for(var l=this.graphModel,o=l.edges,p=[],d=[],g=0;g<o.length;g++){var v=o[g];v.sourceNodeId===a?p.push(v):o[g].targetNodeId===a&&d.push(v)}return{sourceEdges:p,targetEdges:d}},u.prototype.render=function(){var a=this.props,l=a.x,o=a.y,p=a.index,d=a.model,g=d.getControlPointStyle();return Xa("g",{className:"lf-resize-control-"+p},Xa(mh,ri({className:"lf-node-control"},{x:l,y:o},g,{onMouseDown:this.dragHandler.handleMouseDown})))},u}(Xi),T4=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),dc=globalThis&&globalThis.__assign||function(){return dc=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},dc.apply(this,arguments)},Cc=function(r){T4(u,r);function u(){var a=r.call(this)||this;return a.state={},a}return u.prototype.getResizeControl=function(){var a=this.props,l=a.model,o=a.graphModel,p=l.x,d=l.y,g=l.width,v=l.height,O={minX:p-g/2,minY:d-v/2,maxX:p+g/2,maxY:d+v/2},E=O.minX,w=O.minY,j=O.maxX,P=O.maxY,M=[{x:E,y:w},{x:j,y:w},{x:j,y:P},{x:E,y:P}];return M.map(function(T,k){return Xa(A4,dc({index:k},T,{model:l,graphModel:o}))})},u.prototype.getGroupSolid=function(){var a=this.props.model,l=a.x,o=a.y,p=a.width,d=a.height,g=a.getResizeOutlineStyle();return Xa(mh,dc({fill:"none"},g,{x:l,y:o,width:p,height:d}))},u.prototype.render=function(){return Xa("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},u}(Xi),uO=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),M4=function(r){uO(u,r);function u(a,l){var o=r.call(this,a,l)||this,p=o.properties.nodeSize;return p&&(o.width=p.width,o.height=p.height),o}return u.prototype.initNodeData=function(a){r.prototype.initNodeData.call(this,a),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},u.prototype.getOutlineStyle=function(){var a=r.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(a.stroke="none",a.hover&&(a.hover.stroke="none")),a},u.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},u.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},u.prototype.resize=function(a,l){console.log(a,l)},u.prototype.enableProportionResize=function(a){if(a===void 0&&(a=!0),a){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},u}(Le.RectNodeModel),k4=function(r){uO(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getControlGroup=function(){var a=this.props,l=a.model,o=a.graphModel;return Le.h(Cc,{model:l,graphModel:o})},u.prototype.getResizeShape=function(){return r.prototype.getShape.call(this)},u.prototype.getShape=function(){var a=this.props,l=a.model.isSelected,o=a.graphModel.editConfigModel.isSilentMode;return Le.h("g",null,this.getResizeShape(),l&&!o?this.getControlGroup():"")},u}(Le.RectNode),sO={type:"rect",view:k4,model:M4},cO=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();(function(r){cO(u,r);function u(a,l){var o=r.call(this,a,l)||this,p=o.properties.nodeSize;return p&&(o.rx=p.rx,o.ry=p.ry),o}return u.prototype.initNodeData=function(a){r.prototype.initNodeData.call(this,a),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},u.prototype.getOutlineStyle=function(){var a=r.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(a.stroke="none",a.hover&&(a.hover.stroke="none")),a},u.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},u.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},u.prototype.enableProportionResize=function(a){if(a===void 0&&(a=!0),a){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},u})(Le.EllipseNodeModel);(function(r){cO(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getControlGroup=function(){var a=this.props,l=a.model,o=a.graphModel;return Le.h(Cc,{model:l,graphModel:o})},u.prototype.getResizeShape=function(){return r.prototype.getShape.call(this)},u.prototype.getShape=function(){var a=this.props,l=a.model,o=a.graphModel.editConfigModel.isSilentMode;return Le.h("g",null,this.getResizeShape(),l.isSelected&&!o?this.getControlGroup():"")},u})(Le.EllipseNode);var Td=globalThis&&globalThis.__assign||function(){return Td=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},Td.apply(this,arguments)};function D4(r){var u=r.fillOpacity,a=u===void 0?1:u,l=r.strokeWidth,o=l===void 0?1:l,p=r.strokeOpacity,d=p===void 0?1:p,g=r.fill,v=g===void 0?"transparent":g,O=r.stroke,E=O===void 0?"#000":O,w=r.points,j=r.className,P=j===void 0?"lf-basic-shape":j,M={fill:v,fillOpacity:a,strokeWidth:o,stroke:E,strokeOpacity:d,points:"",className:P};return M.points=w.map(function(T){return T.join(",")}).join(" "),Le.h("polygon",Td({},M))}var lO=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),Md=globalThis&&globalThis.__assign||function(){return Md=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},Md.apply(this,arguments)};(function(r){lO(u,r);function u(a,l){var o=r.call(this,a,l)||this,p=o.properties.nodeSize;return p&&(o.rx=p.rx,o.ry=p.ry),o}return u.prototype.initNodeData=function(a){r.prototype.initNodeData.call(this,a),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},u.prototype.getOutlineStyle=function(){var a=r.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(a.stroke="none",a.hover&&(a.hover.stroke="none")),a},u.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},u.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},u.prototype.enableProportionResize=function(a){if(a===void 0&&(a=!0),a){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},u})(Le.DiamondNodeModel);(function(r){lO(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getControlGroup=function(){var a=this.props,l=a.model,o=a.graphModel;return Le.h(Cc,{model:l,graphModel:o})},u.prototype.getResizeShape=function(){var a=this.props.model,l=a.points,o=a.getNodeStyle();return Le.h("g",null,Le.h(D4,Md({},o,{points:l})))},u.prototype.getShape=function(){var a=this.props,l=a.model.isSelected,o=a.graphModel.editConfigModel.isSilentMode;return Le.h("g",null,this.getResizeShape(),l&&!o?this.getControlGroup():"")},u})(Le.DiamondNode);var fO=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();(function(r){fO(u,r);function u(a,l){var o=r.call(this,a,l)||this,p=o.properties.nodeSize;return p&&(o.width=p.width,o.height=p.height),o}return u.prototype.initNodeData=function(a){r.prototype.initNodeData.call(this,a),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},u.prototype.getOutlineStyle=function(){var a=r.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(a.stroke="none",a.hover&&(a.hover.stroke="none")),a},u.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},u.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},u.prototype.enableProportionResize=function(a){if(a===void 0&&(a=!0),a){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},u})(Le.HtmlNodeModel);(function(r){fO(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getControlGroup=function(){var a=this.props,l=a.model,o=a.graphModel;return Le.h(Cc,{model:l,graphModel:o})},u.prototype.getResizeShape=function(){return r.prototype.getShape.call(this)},u.prototype.getShape=function(){var a=this.props,l=a.model.isSelected,o=a.graphModel.editConfigModel.isSilentMode;return Le.h("g",null,this.getResizeShape(),l&&!o?this.getControlGroup():"")},u})(Le.HtmlNode);var pO=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),hc=globalThis&&globalThis.__assign||function(){return hc=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},hc.apply(this,arguments)},N4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p},R4=globalThis&&globalThis.__spread||function(){for(var r=[],u=0;u<arguments.length;u++)r=r.concat(N4(arguments[u]));return r},y0=500,g0=300,C4=-1e4;(function(r){pO(u,r);function u(){var a=r!==null&&r.apply(this,arguments)||this;return a.isGroup=!0,a.unfoldedWidth=y0,a.unfoldedHight=g0,a.childrenLastFoldStatus={},a}return u.prototype.initNodeData=function(a){var l=this;r.prototype.initNodeData.call(this,a);var o=[];Array.isArray(a.children)&&(o=a.children),this.children=new Set(o),this.width=y0,this.height=g0,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=C4,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(){l.isFolded&&l.foldGroup(l.isFolded)})},u.prototype.getResizeOutlineStyle=function(){var a=r.prototype.getResizeOutlineStyle.call(this);return a.stroke="none",a},u.prototype.foldGroup=function(a){var l=this;if(a!==this.isFolded){this.setProperty("isFolded",a),this.isFolded=a,a?(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 o=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(p){var d=l.graphModel.getElement(p),g=d.isFolded;if(d.isGroup&&!d.isFolded&&d.foldGroup(a),d.isGroup&&!a){var v=l.childrenLastFoldStatus[p];v!==void 0&&v!==d.isFolded&&d.foldGroup(v)}l.childrenLastFoldStatus[p]=g,d.visible=!a,o=o.concat(d.incoming.edges.concat(d.outgoing.edges))}),this.foldEdge(a,o)}},u.prototype.getAnchorStyle=function(a){var l=r.prototype.getAnchorStyle.call(this,a);return l.stroke="transparent",l.fill="transparent",l.hover.fill="transparent",l.hover.stroke="transparent",l},u.prototype.foldEdge=function(a,l){var o=this;l.forEach(function(p,d){var g=p.id,v=p.sourceNodeId,O=p.targetNodeId,E=p.startPoint,w=p.endPoint,j=p.type,P=p.text,M=p.getProperties(),T={id:g+"__"+d,sourceNodeId:v,targetNodeId:O,startPoint:E,endPoint:w,type:j,properties:M,text:P==null?void 0:P.value};p.virtual&&o.graphModel.deleteEdgeById(p.id);var k=o.graphModel.group.getNodeGroup(O);k||(k=o.graphModel.getNodeModelById(O));var I=o.graphModel.group.getNodeGroup(v);I||(I=o.graphModel.getNodeModelById(v)),a&&p.visible!==!1&&(o.children.has(v)||o.id===v?(T.startPoint=void 0,T.sourceNodeId=o.id):(T.endPoint=void 0,T.targetNodeId=o.id),(k.id!==o.id||I.id!==o.id)&&o.createVirtualEdge(T),p.visible=!1),!a&&p.visible===!1&&(k&&k.isGroup&&k.isFolded?(T.targetNodeId=k.id,T.endPoint=void 0,o.createVirtualEdge(T)):I&&I.isGroup&&I.isFolded?(T.sourceNodeId=I.id,T.startPoint=void 0,o.createVirtualEdge(T)):p.visible=!0)})},u.prototype.createVirtualEdge=function(a){a.pointsList=void 0;var l=this.graphModel.addEdge(a);l.virtual=!0,l.text.editable=!1,l.isFoldedEdge=!0},u.prototype.isInRange=function(a){var l=a.x1,o=a.y1,p=a.x2,d=a.y2;return l>=this.x-this.width/2&&p<=this.x+this.width/2&&o>=this.y-this.height/2&&d<=this.y+this.height/2},u.prototype.isAllowMoveTo=function(a){var l=a.x1,o=a.y1,p=a.x2,d=a.y2;return{x:l>=this.x-this.width/2&&p<=this.x+this.width/2,y:o>=this.y-this.height/2&&d<=this.y+this.height/2}},u.prototype.setAllowAppendChild=function(a){this.setProperty("groupAddable",a)},u.prototype.addChild=function(a){this.children.add(a)},u.prototype.removeChild=function(a){this.children.delete(a)},u.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},u.prototype.getData=function(){var a=this,l=r.prototype.getData.call(this);l.children=[],this.children.forEach(function(p){var d=a.graphModel.getNodeModelById(p);d&&!d.virtual&&l.children.push(p)});var o=l.properties;return delete o.groupAddable,delete o.isFolded,l},u.prototype.getHistoryData=function(){var a=r.prototype.getData.call(this);a.children=R4(this.children),a.isGroup=!0;var l=a.properties;return delete l.groupAddable,l.isFolded&&(a.x=a.x+this.unfoldedWidth/2-this.foldedWidth/2,a.y=a.y+this.unfoldedHight/2-this.foldedHeight/2),a},u.prototype.isAllowAppendIn=function(a){return!0},u.prototype.toBack=function(){this.zIndex--},u})(sO.model);(function(r){pO(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.getControlGroup=function(){var a=this.props.model,l=a.resizable,o=a.properties;return l&&!o.isFolded?r.prototype.getControlGroup.call(this):null},u.prototype.getAddableShape=function(){var a=this.props.model,l=a.width,o=a.height,p=a.x,d=a.y,g=a.radius,v=a.properties;if(!v.groupAddable)return null;var O=this.props.model.getNodeStyle().strokeWidth,E=this.props.model.getAddableOutlineStyle(),w=l+O+8,j=o+O+8;return Le.h("rect",hc(hc({},E),{width:w,height:j,x:p-w/2,y:d-j/2,rx:g,ry:g}))},u.prototype.getFoldIcon=function(){var a=this.props.model,l=a.x-a.width/2+5,o=a.y-a.height/2+5;if(!a.foldable)return null;var p=Le.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:a.properties.isFolded?"M "+(l+3)+","+(o+6)+" "+(l+11)+","+(o+6)+" M"+(l+7)+","+(o+2)+" "+(l+7)+","+(o+10):"M "+(l+3)+","+(o+6)+" "+(l+11)+","+(o+6)+" "});return Le.h("g",{},[Le.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:a.x-a.width/2+5,y:a.y-a.height/2+5,onClick:function(){a.foldGroup(!a.properties.isFolded)}}),p])},u.prototype.getResizeShape=function(){return Le.h("g",{},[this.getAddableShape(),r.prototype.getResizeShape.call(this),this.getFoldIcon()])},u})(sO.view);globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();var v0=globalThis&&globalThis.__assign||function(){return v0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},v0.apply(this,arguments)};globalThis&&globalThis.__values;var b0=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),Va=globalThis&&globalThis.__assign||function(){return Va=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},Va.apply(this,arguments)};function I4(r){var u=function(l){b0(o,l);function o(p,d){var g=this;p.id||(p.id="Flow_"+p4());var v=Va(Va(Va({},r||{}),p.properties),{isDefaultFlow:!1});return p.properties=v,g=l.call(this,p,d)||this,g}return o.extendKey="SequenceFlowModel",o}(Le.PolylineEdgeModel),a=function(l){b0(o,l);function o(){return l!==null&&l.apply(this,arguments)||this}return o.prototype.getStartArrow=function(){var p=this.props.model,d=p.properties.isDefaultFlow;return d?Le.h("path",{refX:15,stroke:"#000000",strokeWidth:2,d:"M 20 5 10 -5 z"}):Le.h("path",{d:""})},o.extendKey="SequenceFlowEdge",o}(Le.PolylineEdge);return{type:"bpmn:sequenceFlow",view:a,model:u}}I4();globalThis&&globalThis.__read;var m0={width:40,height:40},_0={width:40,height:40},O0={width:100,height:80},yc={width:100,height:80},w0={width:100,height:80},x0={width:100,height:80},E0={width:100,height:80},S0={width:100,height:80},j0={width:100,height:80},P0={width:100,height:80},Dn=function(){};Dn.ObjTree=function(){return this};Dn.ObjTree.VERSION="0.23";Dn.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
||
`;Dn.ObjTree.prototype.attr_prefix="-";Dn.ObjTree.prototype.parseXML=function(r){var u;if(window.DOMParser){var a=new DOMParser,l=a.parseFromString(r,"application/xml");if(!l)return;u=l.documentElement}else window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLDOM"),a.async=!1,a.loadXML(r),u=a.documentElement);if(u){var o=this.parseDOM(u);return o}};Dn.ObjTree.prototype.parseHTTP=function(r,u,a){var l={};for(var o in u)l[o]=u[o];if(l.method||(typeof l.postBody>"u"&&typeof l.postbody>"u"&&typeof l.parameters>"u"?l.method="get":l.method="post"),a){l.asynchronous=!0;var p=this,d=a,g=l.onComplete;l.onComplete=function(E){var w;E&&E.responseXML&&E.responseXML.documentElement&&(w=p.parseDOM(E.responseXML.documentElement)),d(w,E),g&&g(E)}}else l.asynchronous=!1;var v;if(typeof HTTP<"u"&&HTTP.Request){l.uri=r;var O=new HTTP.Request(l);O&&(v=O.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var O=new Ajax.Request(r,l);O&&(v=O.transport)}if(a)return v;if(v&&v.responseXML&&v.responseXML.documentElement)return this.parseDOM(v.responseXML.documentElement)};Dn.ObjTree.prototype.parseDOM=function(r){if(r){if(this.__force_array={},this.force_array)for(var u=0;u<this.force_array.length;u++)this.__force_array[this.force_array[u]]=1;var a=this.parseElement(r);if(this.__force_array[r.nodeName]&&(a=[a]),r.nodeType!==11){var l={};l[r.nodeName]=a,a=l}return a}};Dn.ObjTree.prototype.parseElement=function(r){if(r.nodeType!==7){if(r.nodeType===3||r.nodeType===4||r.nodeType===8){var u=r.nodeValue.match(/[^\x00-\x20]/);return u==null?void 0:r.nodeValue}var a=null,l={};if(r.attributes&&r.attributes.length){a={};for(var o=0;o<r.attributes.length;o++){var p=r.attributes[o].nodeName;if(typeof p=="string"){var d=r.attributes[o].nodeValue;try{d=JSON.parse(r.attributes[o].nodeValue.replace(/'/g,'"'))}catch{d=r.attributes[o].nodeValue}d!=null&&(p=this.attr_prefix+p,typeof l[p]>"u"&&(l[p]=0),l[p]++,this.addNode(a,p,l[p],d))}}}if(r.childNodes&&r.childNodes.length){var g=!0;a&&(g=!1);for(var o=0;o<r.childNodes.length&&g;o++){var v=r.childNodes[o].nodeType;v===3||v===4||v===8||(g=!1)}if(g){a||(a="");for(var o=0;o<r.childNodes.length;o++)a+=r.childNodes[o].nodeValue}else{a||(a={});for(var o=0;o<r.childNodes.length;o++){var p=r.childNodes[o].nodeName;if(typeof p=="string"){var d=this.parseElement(r.childNodes[o]);d&&(typeof l[p]>"u"&&(l[p]=0),l[p]++,this.addNode(a,p,l[p],d))}}}}else a===null&&(a={});return a}};Dn.ObjTree.prototype.addNode=function(r,u,a,l){this.__force_array[u]?(a===1&&(r[u]=[]),r[u][r[u].length]=l):a===1?r[u]=l:a===2?r[u]=[r[u],l]:r[u][r[u].length]=l};Dn.ObjTree.prototype.writeXML=function(r){var u=this.hash_to_xml(null,r);return this.xmlDecl+u};Dn.ObjTree.prototype.hash_to_xml=function(r,u){var a=[],l=[];for(var o in u)if(u!=null&&u.hasOwnProperty(o)){var p=u[o];o.charAt(0)!==this.attr_prefix?typeof p>"u"||p==null?a[a.length]="<"+o+" />":typeof p=="object"&&p.constructor===Array?a[a.length]=this.array_to_xml(o,p):typeof p=="object"?a[a.length]=this.hash_to_xml(o,p):a[a.length]=this.scalar_to_xml(o,p):l[l.length]=" "+o.substring(1)+'="'+this.xml_escape(p)+'"'}var d=l.join(""),g=a.join("");return typeof r>"u"||r==null||(a.length>0?g.match(/\n/)?g="<"+r+d+`>
|
||
`+g+"</"+r+`>
|
||
`:g="<"+r+d+">"+g+"</"+r+`>
|
||
`:g="<"+r+d+` />
|
||
`),g};Dn.ObjTree.prototype.array_to_xml=function(r,u){for(var a=[],l=0;l<u.length;l++){var o=u[l];typeof o>"u"||o==null?a[a.length]="<"+r+" />":typeof o=="object"&&o.constructor===Array?a[a.length]=this.array_to_xml(r,o):typeof o=="object"?a[a.length]=this.hash_to_xml(r,o):a[a.length]=this.scalar_to_xml(r,o)}return a.join("")};Dn.ObjTree.prototype.scalar_to_xml=function(r,u){return r==="#text"?this.xml_escape(u):"<"+r+">"+this.xml_escape(u)+"</"+r+`>
|
||
`};Dn.ObjTree.prototype.xml_escape=function(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var L4=function(r){return new Dn.ObjTree().parseXML(r)};function dO(r){return Object.prototype.toString.call(r)}function A0(r){return" ".repeat(r)}function gc(r){return dO(r)==="[object Object]"?Object.keys(r).reduce(function(u,a){var l=a;return a.charAt(0)==="-"&&(l=a.substring(1)),u[l]=gc(r[a]),u},{}):Array.isArray(r)?r.map(function(u){return gc(u)}):r}function B4(r){var u=r;try{typeof u!="string"&&(u=JSON.parse(r))}catch{u=JSON.stringify(gc(r)).replace(/"/g,"'")}return u}var T0=`
|
||
`;function nc(r,u,a){var l=A0(a),o="",p=T0+l;if(u==="-json")return"";if(u==="#text")return p+r;if(u==="#cdata-section")return p+"<![CDATA["+r+"]]>";if(u==="#comment")return p+"<!--"+r+"-->";if((""+u).charAt(0)==="-")return" "+u.substring(1)+'="'+B4(r)+'"';if(Array.isArray(r))o+=r.map(function(O){return nc(O,u,a+1)}).join("");else if(dO(r)==="[object Object]"){var d=Object.keys(r),g="",v=r["-json"]?T0+A0(a+1)+r["-json"]:"";o+=(a===0?"":p)+"<"+u,d.forEach(function(O){O.charAt(0)==="-"?g+=nc(r[O],O,a+1):v+=nc(r[O],O,a+1)}),o+=g+(v!==""?">"+v+p+"</"+u+">":" />")}else o+=p+"<"+u+">"+r.toString()+"</"+u+">";return o}function z4(r){var u="";for(var a in r)u+=nc(r[a],a,0);return u}var F4=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),kd=globalThis&&globalThis.__assign||function(){return kd=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},kd.apply(this,arguments)},M0=globalThis&&globalThis.__rest||function(r,u){var a={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&u.indexOf(l)<0&&(a[l]=r[l]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(r);o<l.length;o++)u.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(r,l[o])&&(a[l[o]]=r[l[o]]);return a},_h=globalThis&&globalThis.__values||function(r){var u=typeof Symbol=="function"&&Symbol.iterator,a=u&&r[u],l=0;if(a)return a.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&l>=r.length&&(r=void 0),{value:r&&r[l++],done:!r}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},oa=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p},Yi=globalThis&&globalThis.__spread||function(){for(var r=[],u=0;u<arguments.length;u++)r=r.concat(oa(arguments[u]));return r},Tn;(function(r){r.START="bpmn:startEvent",r.END="bpmn:endEvent",r.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",r.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",r.BOUNDARY="bpmn:boundaryEvent",r.PARALLEL_GATEWAY="bpmn:parallelGateway",r.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",r.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",r.USER="bpmn:userTask",r.SYSTEM="bpmn:serviceTask",r.FLOW="bpmn:sequenceFlow",r.SUBPROCESS="bpmn:subProcess"})(Tn||(Tn={}));var hO=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],$4=["properties","startPoint","endPoint","pointsList"],vc={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},yO=function(r,u){var a=Object.keys(u||{});return a.forEach(function(l){if(r[l]){var o=u[l],p=o.in,d=o.out;p&&(r[l].in=p),d&&(r[l].out=d)}else r[l]=u[l]}),r},ar={"bpmn:startEvent":{out:function(r){var u,a,l=r.properties;return((a=(u=ar[l.definitionType])===null||u===void 0?void 0:u.out)===null||a===void 0?void 0:a.call(u,r))||{}}},"bpmn:intermediateCatchEvent":{out:function(r){var u,a,l=r.properties;return((a=(u=ar[l.definitionType])===null||u===void 0?void 0:u.out)===null||a===void 0?void 0:a.call(u,r))||{}}},"bpmn:intermediateThrowEvent":{out:function(r){var u,a,l=r.properties;return((a=(u=ar[l.definitionType])===null||u===void 0?void 0:u.out)===null||a===void 0?void 0:a.call(u,r))||{}}},"bpmn:boundaryEvent":{out:function(r){var u,a,l=r.properties;return((a=(u=ar[l.definitionType])===null||u===void 0?void 0:u.out)===null||a===void 0?void 0:a.call(u,r))||{}}},"bpmn:sequenceFlow":{out:function(r){var u=r.properties,a=u.expressionType,l=u.condition;return l?a==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${'+l+"}]]></bpmn:conditionExpression>"}:{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression">'+l+"</bpmn:conditionExpression>"}:{json:""}}},"bpmn:timerEventDefinition":{out:function(r){var u=r.properties,a=u.timerType,l=u.timerValue,o=u.definitionId,p=function(){return"<bpmn:"+a+' xsi:type="bpmn:tFormalExpression">'+l+"</bpmn:"+a+">"};return{json:'<bpmn:timerEventDefinition id="'+o+'"'+(a&&l?">"+p()+"</bpmn:timerEventDefinition>":"/>")}},in:function(r,u){var a,l,o,p,d=r,g=u["-id"],v="",O="";try{for(var E=_h(Object.keys(u)),w=E.next();!w.done;w=E.next()){var j=w.value;j.includes("bpmn:")&&(o=oa(j.split(":"),2),v=o[1],O=(p=u[j])===null||p===void 0?void 0:p["#text"])}}catch(P){a={error:P}}finally{try{w&&!w.done&&(l=E.return)&&l.call(E)}finally{if(a)throw a.error}}return{"-definitionId":g,"-definitionType":d,"-timerType":v,"-timerValue":O}}},"bpmn:conditionExpression":{in:function(r,u){var a,l="",o="";return u["#cdata-section"]?(o="cdata",l=((a=/^\$\{(.*)\}$/g.exec(u["#cdata-section"]))===null||a===void 0?void 0:a[1])||""):u["#text"]&&(o="normal",l=u["#text"]),{"-condition":l,"-expressionType":o}}}};function W4(r){var u=r??{},a=u.retainedAttrsFields,l=u.excludeFields,o=u.transformer,p=new Set(Yi($4,a||[])),d={in:new Set(Yi(vc.in,(l==null?void 0:l.in)||[])),out:new Set(Yi(vc.out,(l==null?void 0:l.out)||[]))};return ar=yO(ar,o),function(g){var v=g.nodes,O=g.edges;function E(w,j){var P,M,T;if((w==null?void 0:w.flag)!==1){var k;if((k=ar[w.type])&&k.out){var I=k.out(w),L=Object.keys(I);L.length>0&&L.forEach(function(B){w[B]=I[B]})}w!=null&&w.children&&(w.children=w.children.map(function(B){var $=v.find(function(G){return G.id===B})||O.find(function(G){return G.id===B});return $||{}}));var Y={};if(typeof w=="string")return w;if(Array.isArray(w))return w.map(function(B){return E(B,"")}).filter(function(B){return B!=null});try{for(var Q=_h(Object.entries(w)),X=Q.next();!X.done;X=Q.next()){var V=oa(X.value,2),Z=V[0],F=V[1];if(((T=F)===null||T===void 0?void 0:T.flag)===1)return;var C=[j,Z].filter(function(B){return B}).join(".");d.out.has(C)||(typeof F!="object"?Z.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(Z)?Y[Z]=F:Y["-"+Z]=F:p.has(C)?Y["-"+Z]=E(F,C):Y[Z]=E(F,C))}}catch(B){P={error:B}}finally{try{X&&!X.done&&(M=Q.return)&&M.call(Q)}finally{if(P)throw P.error}}return Y}}return E(g,"")}}function bc(r){var u,a,l={};try{for(var o=_h(Object.entries(r)),p=o.next();!p.done;p=o.next()){var d=oa(p.value,2),g=d[0],v=d[1];g.indexOf("-")===0?l[g.substring(1)]=gc(v):typeof v=="string"?l[g]=v:Object.prototype.toString.call(v)==="[object Object]"?l[g]=bc(v):Array.isArray(v)?l[g]=v.map(function(O){return bc(O)}):l[g]=v}}catch(O){u={error:O}}finally{try{p&&!p.done&&(a=o.return)&&a.call(o)}finally{if(u)throw u.error}}return l}function G4(r,u,a){var l,o=new Map,p=W4(a)(u);p.nodes.forEach(function(g){var v=g["-id"],O=g["-type"],E=g.text,w=g.children,j=M0(g,["-id","-type","text","children"]),P={"-id":v};E!=null&&E["-value"]&&(P["-name"]=E["-value"]),j["-json"]&&(P["-json"]=j["-json"]),j["-properties"]&&Object.assign(P,j["-properties"]),w&&(P.children=w),r[O]||(r[O]=[]),r[O].push(P),o.set(v,P)});var d=p.edges.map(function(g){var v=g["-id"];g["-type"];var O=g["-sourceNodeId"],E=g["-targetNodeId"],w=g.text,j=M0(g,["-id","-type","-sourceNodeId","-targetNodeId","text"]),P=o.get(E);P["bpmn:incoming"]||(P["bpmn:incoming"]=[]),P["bpmn:incoming"].push(v);var M={"-id":v,"-sourceRef":O,"-targetRef":E};return w!=null&&w["-value"]&&(M["-name"]=w["-value"]),j["-json"]&&(M["-json"]=j["-json"]),j["-properties"]&&Object.assign(M,j["-properties"]),M});return u.edges.forEach(function(g){var v=g.sourceNodeId,O=g.id,E=o.get(v);E["bpmn:outgoing"]||(E["bpmn:outgoing"]=[]),E["bpmn:outgoing"].push(O)}),(l=r["bpmn:subProcess"])===null||l===void 0||l.forEach(function(g){var v={"bpmn:incoming":new Set,"bpmn:outgoing":new Set},O=[];g.children.forEach(function(T){var k,I=o.get(T["-id"]);["bpmn:incoming","bpmn:outgoing"].forEach(function(Y){I[Y]&&I[Y].forEach(function(Q){v[Y].add(Q)})});var L=(k=r[T["-type"]])===null||k===void 0?void 0:k.findIndex(function(Y){return Y["-id"]===T["-id"]});L>=0&&r[T["-type"]].splice(L,1),o.delete(T["-id"]),g[T["-type"]]||(g[T["-type"]]=[]),g[T["-type"]].push(I)});var E=v["bpmn:incoming"],w=v["bpmn:outgoing"];w.forEach(function(T){E.has(T)&&O.push(T)});for(var j=function(T){var k=d.findIndex(function(I){return I["-id"]===O[T]});k>=0?(g["bpmn:sequenceFlow"]||(g["bpmn:sequenceFlow"]=[]),g["bpmn:sequenceFlow"].push(d[k]),d.splice(k,1)):T++,P=T},P,M=0;M<O.length;)j(M),M=P;delete g.children}),r[Tn.FLOW]=d,r}function H4(r,u){r["bpmndi:BPMNEdge"]=u.edges.map(function(a){var l,o=a.id,p=a.pointsList.map(function(g){var v=g.x,O=g.y;return{"-x":v,"-y":O}}),d={"-id":o+"_di","-bpmnElement":o,"di:waypoint":p};return!((l=a.text)===null||l===void 0)&&l.value&&(d["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":a.text.x-a.text.value.length*10/2,"-y":a.text.y-7,"-width":a.text.value.length*10,"-height":14}}),d}),r["bpmndi:BPMNShape"]=u.nodes.map(function(a){var l,o=a.id,p=100,d=80,g=a.x,v=a.y,O=zn.shapeConfigMap.get(a.type);O&&(p=O.width,d=O.height),g-=p/2,v-=d/2;var E={"-id":o+"_di","-bpmnElement":o,"dc:Bounds":{"-x":g,"-y":v,"-width":p,"-height":d}};return!((l=a.text)===null||l===void 0)&&l.value&&(E["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":a.text.x-a.text.value.length*10/2,"-y":a.text.y-7,"-width":a.text.value.length*10,"-height":14}}),E})}var U4=["bpmn:incoming","bpmn:outgoing"];function X4(r,u){var a=[],l=[],o=new Map,p=u??{},d=p.transformer,g=p.excludeFields,v={in:new Set(Yi(vc.in,(g==null?void 0:g.in)||[])),out:new Set(Yi(vc.out,(g==null?void 0:g.out)||[]))};ar=yO(ar,d);var O=r["bpmn:definitions"];if(O){var E=O["bpmn:process"];(function(j,P){P.forEach(function(M){try{Object.keys(j).forEach(function(T){try{M(T)}catch(k){console.error(k)}})}catch(T){console.error(T)}})})(E,[function(j){function P(T){T["-children"]||(T["-children"]=[]),Object.keys(T).forEach(function(k){var I;k.indexOf("bpmn:")===0&&!U4.includes(k)&&(E[k]||(E[k]=[]),!Array.isArray(E[k])&&(E[k]=[E[k]]),Array.isArray(T[k])?(I=E[k]).push.apply(I,Yi(T[k])):E[k].push(T[k]),Array.isArray(T[k])?T[k].forEach(function(L){!k.includes("Flow")&&T["-children"].push(L["-id"])}):!k.includes("Flow")&&T["-children"].push(T[k]["-id"]),delete T[k])})}if(j==="bpmn:subProcess"){var M=E[j];Array.isArray(M)?M.forEach(function(T){j==="bpmn:subProcess"&&P(T)}):P(M)}},function(j){var P=function(T){Object.keys(T).forEach(function(k){var I,L;if(k.includes("bpmn:")){var Y={};ar[k]&&ar[k].in?(Y=(L=(I=ar[k]).in)===null||L===void 0?void 0:L.call(I,k,R.cloneDeep(T[k])),delete T[k]):M(T[k]);var Q=void 0;(Q=Reflect.ownKeys(Y)).length>0&&Q.forEach(function(X){Reflect.set(T,X,Y[X])})}})};function M(T){o.set(T["-id"],T),Array.isArray(T)?T.forEach(function(k){M(k)}):typeof T=="object"&&P(T)}M(E[j])},function(j){if(j.indexOf("bpmn:")===0){var P=E[j];if(j==="bpmn:sequenceFlow"){var M=O["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];l=V4(P,M)}else{var T=O["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];if(j==="bpmn:boundaryEvent"){var k=E[j],I=function(L){var Y=L["-attachedToRef"],Q=o.get(Y);Q["-boundaryEvents"]||(Q["-boundaryEvents"]=[]),Q["-boundaryEvents"].push(L["-id"])};Array.isArray(k)?k.forEach(function(L){I(L)}):I(k)}a=a.concat(Y4(P,T,j))}}}])}var w=function(j,P,M){Object.keys(j).forEach(function(T){var k=M?M+"."+T:T;P.has(k)?delete j[T]:typeof j[T]=="object"&&w(j[T],P,k)})};return a.forEach(function(j){var P,M;if(!((P=u==null?void 0:u.mapping)===null||P===void 0)&&P.in){var T=(M=u==null?void 0:u.mapping)===null||M===void 0?void 0:M.in,k=j.type;T[k]&&(j.type=T[k])}w(j,v.in,"")}),l.forEach(function(j){var P,M;if(!((P=u==null?void 0:u.mapping)===null||P===void 0)&&P.in){var T=(M=u==null?void 0:u.mapping)===null||M===void 0?void 0:M.in,k=j.type;T[k]&&(j.type=T[k])}w(j,v.in,"")}),{nodes:a,edges:l}}function Y4(r,u,a){var l=[];if(Array.isArray(r))r.forEach(function(d){var g;Array.isArray(u)?g=u.find(function(O){return O["-bpmnElement"]===d["-id"]}):g=u;var v=k0(g,a,d);l.push(v)});else{var o=void 0;Array.isArray(u)?o=u.find(function(d){return d["-bpmnElement"]===r["-id"]}):o=u;var p=k0(o,a,r);l.push(p)}return l}function k0(r,u,a){var l=Number(r["dc:Bounds"]["-x"]),o=Number(r["dc:Bounds"]["-y"]),p=a["-children"],d=a["-name"],g=zn.shapeConfigMap.get(u);g&&(l+=g.width/2,o+=g.height/2);var v={};Object.entries(a).forEach(function(j){var P=oa(j,2),M=P[0],T=P[1];hO.includes(M)||(v[M]=T)}),v=bc(v);var O;if(d&&(O={x:l,y:o,value:d},r["bpmndi:BPMNLabel"]&&r["bpmndi:BPMNLabel"]["dc:Bounds"])){var E=r["bpmndi:BPMNLabel"]["dc:Bounds"];O.x=Number(E["-x"])+Number(E["-width"])/2,O.y=Number(E["-y"])+Number(E["-height"])/2}var w={id:r["-bpmnElement"],type:u,x:l,y:o,properties:v};return p&&(w.children=p),O&&(w.text=O),w}function V4(r,u){var a=[];if(Array.isArray(r))r.forEach(function(o){var p;Array.isArray(u)?p=u.find(function(d){return d["-bpmnElement"]===o["-id"]}):p=u,a.push(D0(p,o))});else{var l=void 0;Array.isArray(u)?l=u.find(function(o){return o["-bpmnElement"]===r["-id"]}):l=u,a.push(D0(l,r))}return a}function D0(r,u){var a,l=u["-name"];if(l){var o=r["bpmndi:BPMNLabel"]["dc:Bounds"],p=0;l.split(`
|
||
`).forEach(function(O){p<O.length&&(p=O.length)}),a={value:l,x:Number(o["-x"])+p*10/2,y:Number(o["-y"])+7}}var d={};Object.entries(u).forEach(function(O){var E=oa(O,2),w=E[0],j=E[1];hO.includes(w)||(d[w]=j)}),d=bc(d);var g=r["di:waypoint"].map(function(O){return{x:Number(O["-x"]),y:Number(O["-y"])}}),v={id:u["-id"],type:Tn.FLOW,pointsList:g,sourceNodeId:u["-sourceRef"],targetNodeId:u["-targetRef"],properties:d};return a&&(v.text=a),v}var zn=function(){function r(u){var a=this,l=u.lf;this.adapterOut=function(o,p){var d,g,v=kd({},a.processAttributes);G4(v,o,p);var O={"-id":"BPMNPlane_1","-bpmnElement":v["-id"]};H4(O,o);var E=a.definitionAttributes;E["bpmn:process"]=v,E["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":O};var w={"bpmn:definitions":E};if(!((d=p==null?void 0:p.mapping)===null||d===void 0)&&d.out){var j=(g=p==null?void 0:p.mapping)===null||g===void 0?void 0:g.out,P=function(M){Array.isArray(M)&&M.forEach(function(T){return P(T)}),typeof M=="object"&&Object.keys(M).forEach(function(T){var k;(k=j[T])?(M[k]=R.cloneDeep(M[T]),delete M[T],P(M[k])):P(M[T])})};P(w)}return w},this.adapterIn=function(o,p){if(o)return X4(o,p)},l.adapterIn=this.adapterIn,l.adapterOut=this.adapterOut,this.processAttributes={"-isExecutable":"true","-id":"Process"},this.definitionAttributes={"-id":"Definitions","-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.10"}}return r.prototype.setCustomShape=function(u,a){r.shapeConfigMap.set(u,a)},r.pluginName="bpmn-adapter",r.shapeConfigMap=new Map,r}();zn.shapeConfigMap.set(Tn.START,{width:m0.width,height:m0.height});zn.shapeConfigMap.set(Tn.END,{width:_0.width,height:_0.height});zn.shapeConfigMap.set(Tn.INTERMEDIATE_CATCH,{width:yc.width,height:yc.height});zn.shapeConfigMap.set(Tn.INTERMEDIATE_THROW,{width:yc.width,height:yc.height});zn.shapeConfigMap.set(Tn.BOUNDARY,{width:O0.width,height:O0.height});zn.shapeConfigMap.set(Tn.PARALLEL_GATEWAY,{width:w0.width,height:w0.height});zn.shapeConfigMap.set(Tn.INCLUSIVE_GATEWAY,{width:x0.width,height:x0.height});zn.shapeConfigMap.set(Tn.EXCLUSIVE_GATEWAY,{width:E0.width,height:E0.height});zn.shapeConfigMap.set(Tn.SYSTEM,{width:S0.width,height:S0.height});zn.shapeConfigMap.set(Tn.USER,{width:j0.width,height:j0.height});zn.shapeConfigMap.set(Tn.SUBPROCESS,{width:P0.width,height:P0.height});(function(r){F4(u,r);function u(a){var l=r.call(this,a)||this;l.adapterXmlIn=function(d){var g=L4(d);return l.adapterIn(g,l.props)},l.adapterXmlOut=function(d){var g=l.adapterOut(d,l.props);return z4(g)};var o=a.lf,p=a.props;return o.adapterIn=l.adapterXmlIn,o.adapterOut=l.adapterXmlOut,l.props=p,l}return u.pluginName="BPMNAdapter",u})(zn);var K4=function(){function r(u){var a=this,l=u.lf;this.lf=l,this.customCssRules="",this.useGlobalRules=!0,l.getSnapshot=function(o,p){a.getSnapshot(o,p)},l.getSnapshotBlob=function(o){return a.getSnapshotBlob(o)},l.getSnapshotBase64=function(o){return a.getSnapshotBase64(o)}}return r.prototype.getSvgRootElement=function(u){var a=u.container.querySelector(".lf-canvas-overlay");return a},r.prototype.triggerDownload=function(u){var a=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),l=document.createElement("a");l.setAttribute("download",this.fileName),l.setAttribute("href",u),l.setAttribute("target","_blank"),l.dispatchEvent(a)},r.prototype.removeAnchor=function(u){for(var a=u.childNodes,l=u.childNodes&&u.childNodes.length,o=0;o<l;o++){var p=a[o],d=p.classList&&Array.from(p.classList)||[];d.indexOf("lf-anchor")>-1&&(u.removeChild(u.childNodes[o]),l--,o--)}},r.prototype.getSnapshot=function(u,a){var l=this;this.fileName=u||"logic-flow."+Date.now()+".png";var o=this.getSvgRootElement(this.lf);this.getCanvasData(o,a).then(function(p){var d=p.toDataURL("image/png").replace("image/png","image/octet-stream");l.triggerDownload(d)})},r.prototype.getSnapshotBase64=function(u){var a=this,l=this.getSvgRootElement(this.lf);return new Promise(function(o){a.getCanvasData(l,u).then(function(p){var d=p.toDataURL("image/png");o({data:d,width:p.width,height:p.height})})})},r.prototype.getSnapshotBlob=function(u){var a=this,l=this.getSvgRootElement(this.lf);return new Promise(function(o){a.getCanvasData(l,u).then(function(p){p.toBlob(function(d){o({data:d,width:p.width,height:p.height})},"image/png")})})},r.prototype.getClassRules=function(){var u="";if(this.useGlobalRules)for(var a=document.styleSheets,l=0;l<a.length;l++)for(var o=a[l],p=0;p<o.cssRules.length;p++)u+=o.cssRules[p].cssText;return this.customCssRules&&(u+=this.customCssRules),u},r.prototype.getCanvasData=function(u,a){var l=this,o=u.cloneNode(!0),p=o.lastChild,d=p.childNodes&&p.childNodes.length;if(d)for(var g=0;g<d;g++){var v=p.childNodes[g],O=v.classList&&Array.from(v.classList);if(O&&O.indexOf("lf-base")<0)p.removeChild(p.childNodes[g]),d--,g--;else{var E=p.childNodes[g];E&&E.childNodes.forEach(function(pe){var le=pe;l.removeAnchor(le.firstChild)})}}var w=window.devicePixelRatio||1;w<1&&(w=1);var j=document.createElement("canvas"),P=this.lf.graphModel.rootEl.querySelector(".lf-base"),M=P.getBoundingClientRect(),T=document.querySelector(".lf-canvas-overlay").getBoundingClientRect(),k=M.x-T.x,I=M.y-T.y,L=this.lf.graphModel,Y=L.transformModel,Q=Y.SCALE_X,X=Y.SCALE_Y,V=Y.TRANSLATE_X,Z=Y.TRANSLATE_Y;o.lastChild.style.transform="matrix(1, 0, 0, 1, "+((-k+V)*(1/Q)+10)+", "+((-I+Z)*(1/X)+10)+")";var F=Math.ceil(M.width/Q),C=Math.ceil(M.height/X);j.style.width=F+"px",j.style.height=C+"px",j.width=F*w+80,j.height=C*w+80;var B=j.getContext("2d");B.clearRect(0,0,j.width,j.height),B.scale(w,w),a?(B.fillStyle=a,B.fillRect(0,0,F*w+80,C*w+80)):B.clearRect(0,0,F,C);var $=new Image,G=document.createElement("style");G.innerHTML=this.getClassRules();var te=document.createElement("foreignObject");return te.appendChild(G),o.appendChild(te),new Promise(function(pe){$.onload=function(){var Ee=navigator.userAgent.indexOf("Firefox")>-1;try{Ee?createImageBitmap($,{resizeWidth:j.width,resizeHeight:j.height}).then(function(ve){B.drawImage(ve,0,0),pe(j)}):(B.drawImage($,0,0),pe(j))}catch{B.drawImage($,0,0),pe(j)}};var le="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(o),ge=le.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");$.src=ge})},r.pluginName="snapshot",r}(),N0=globalThis&&globalThis.__assign||function(){return N0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},N0.apply(this,arguments)};globalThis&&globalThis.__read;var R0;(function(r){r.HORIZONTAL="horizontal",r.VERTICAL="vertical"})(R0||(R0={}));var q4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;var Z4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;var J4=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p},Q4=globalThis&&globalThis.__spread||function(){for(var r=[],u=0;u<arguments.length;u++)r=r.concat(J4(arguments[u]));return r},$a="lf:defaultNodeMenu",Wa="lf:defaultEdgeMenu",Ga="lf:defaultGraphMenu",C0="lf:defaultSelectionMenu",e5=function(){function r(u){var a=this,l=u.lf;this.__menuDOM=document.createElement("ul"),this.lf=l,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(o){a.setMenuConfig(o)},this.lf.addMenuConfig=function(o){a.addMenuConfig(o)},this.lf.setMenuByType=function(o){a.setMenuByType(o)}}return r.prototype.init=function(){var u=this,a=[{text:"删除",callback:function(p){u.lf.deleteNode(p.id)}},{text:"编辑文本",callback:function(p){u.lf.graphModel.editText(p.id)}},{text:"复制",callback:function(p){u.lf.cloneNode(p.id)}}];this.menuTypeMap.set($a,a);var l=[{text:"删除",callback:function(p){u.lf.deleteEdge(p.id)}},{text:"编辑文本",callback:function(p){u.lf.graphModel.editText(p.id)}}];this.menuTypeMap.set(Wa,l),this.menuTypeMap.set(Ga,[]);var o=[{text:"删除",callback:function(p){u.lf.clearSelectElements(),p.edges.forEach(function(d){return u.lf.deleteEdge(d.id)}),p.nodes.forEach(function(d){return u.lf.deleteNode(d.id)})}}];this.menuTypeMap.set(C0,o)},r.prototype.render=function(u,a){var l=this;this.__container=a,this.__currentData=null,this.__menuDOM.className="lf-menu",a.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(o){o.stopPropagation();for(var p=o.target;Array.from(p.classList).indexOf("lf-menu-item")===-1&&Array.from(p.classList).indexOf("lf-menu")===-1;)p=p.parentElement;Array.from(p.classList).indexOf("lf-menu-item")>-1?(p.onclickCallback(l.__currentData),l.__menuDOM.style.display="none",l.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!")},!0),this.lf.on("node:contextmenu",function(o){var p=o.data,d=o.position,g=o.e,v=d.domOverlayPosition,O=v.x,E=v.y,w=p.id,j=l.lf.graphModel.getNodeModelById(w),P=[],M=l.menuTypeMap.get(j.type);j&&j.menu&&Array.isArray(j.menu)?P=j.menu:M?P=M:P=l.menuTypeMap.get($a),l.__currentData=p,l.showMenu(O,E,P,{width:j.width,height:j.height,clientX:g.clientX,clientY:g.clientY})}),this.lf.on("edge:contextmenu",function(o){var p=o.data,d=o.position,g=o.e,v=d.domOverlayPosition,O=v.x,E=v.y,w=p.id,j=l.lf.graphModel.getEdgeModelById(w),P=[],M=l.menuTypeMap.get(j.type);j&&j.menu&&Array.isArray(j.menu)?P=j.menu:M?P=M:P=l.menuTypeMap.get(Wa),l.__currentData=p,l.showMenu(O,E,P,{width:j.width,height:j.height,clientX:g.clientX,clientY:g.clientY})}),this.lf.on("blank:contextmenu",function(o){var p=o.position,d=l.menuTypeMap.get(Ga),g=p.domOverlayPosition,v=g.x,O=g.y;l.showMenu(v,O,d)}),this.lf.on("selection:contextmenu",function(o){var p=o.data,d=o.position,g=l.menuTypeMap.get(C0),v=d.domOverlayPosition,O=v.x,E=v.y;l.__currentData=p,l.showMenu(O,E,g)}),this.lf.on("node:mousedown",function(){l.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){l.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){l.__menuDOM.style.display="none"})},r.prototype.destroy=function(){var u;(u=this===null||this===void 0?void 0:this.__container)===null||u===void 0||u.removeChild(this.__menuDOM),this.__menuDOM=null},r.prototype.showMenu=function(u,a,l,o){if(!(!l||!l.length)){var p=this.__menuDOM;if(p.innerHTML="",p.append.apply(p,Q4(this.__getMenuDom(l))),!!p.children.length){if(p.style.display="block",!o){p.style.top=a+"px",p.style.left=u+"px";return}var d=o.width,g=o.height,v=o.clientX,O=o.clientY,E=this.lf.graphModel,w=p.offsetWidth,j=!0,P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,M=P-v,T=E.rootEl.getBoundingClientRect(),k=T.left+T.width;k<P&&(M=k-v),M<w&&(j=!1),j?p.style.left=u+"px":p.style.left=u-d+"px";var I=p.offsetHeight,L=!0,Y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,Q=Y-O,X=T.top+T.height;X<Y&&(Q=X-O),Q<I&&(L=!1),L?p.style.top=a+"px":p.style.top=a-g+"px"}}},r.prototype.setMenuByType=function(u){!u.type||!u.menu||this.menuTypeMap.set(u.type,u.menu)},r.prototype.__getMenuDom=function(u){var a=[];return u&&u.length>0&&u.forEach(function(l){var o=document.createElement("li");if(l.className?o.className="lf-menu-item "+l.className:o.className="lf-menu-item",l.icon===!0){var p=document.createElement("span");p.className="lf-menu-item-icon",o.appendChild(p)}var d=document.createElement("span");d.className="lf-menu-item-text",l.text&&(d.innerText=l.text),o.appendChild(d),o.onclickCallback=l.callback,a.push(o)}),a},r.prototype.setMenuConfig=function(u){u&&(u.nodeMenu!==void 0&&this.menuTypeMap.set($a,u.nodeMenu?u.nodeMenu:[]),u.edgeMenu!==void 0&&this.menuTypeMap.set(Wa,u.edgeMenu?u.edgeMenu:[]),u.graphMenu!==void 0&&this.menuTypeMap.set(Ga,u.graphMenu?u.graphMenu:[]))},r.prototype.addMenuConfig=function(u){if(u){if(Array.isArray(u.nodeMenu)){var a=this.menuTypeMap.get($a);this.menuTypeMap.set($a,a.concat(u.nodeMenu))}if(Array.isArray(u.edgeMenu)){var a=this.menuTypeMap.get(Wa);this.menuTypeMap.set(Wa,a.concat(u.edgeMenu))}if(Array.isArray(u.graphMenu)){var a=this.menuTypeMap.get(Ga);this.menuTypeMap.set(Ga,a.concat(u.graphMenu))}}},r.prototype.changeMenuItem=function(u,a){if(u==="add")this.addMenuConfig(a);else if(u==="reset")this.setMenuConfig(a);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},r.pluginName="menu",r}();globalThis&&globalThis.__read;globalThis&&globalThis.__values;function t5(r){if(r.length<=1)return!1;for(var u=0,a=r.length-1;u!==a&&u+1!==a&&a-1!==u;)u++,a--;return u===a?[--u,a]:[u,a]}var gO=globalThis&&globalThis.__extends||function(){var r=function(u,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},r(u,a)};return function(u,a){r(u,a);function l(){this.constructor=u}u.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}(),Hi=globalThis&&globalThis.__assign||function(){return Hi=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},Hi.apply(this,arguments)},uo=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};(function(r){gO(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u.prototype.pointFilter=function(a){for(var l=a,o=1;o<l.length-1;){var p=uo(l[o-1],2),d=p[0],g=p[1],v=uo(l[o],2),O=v[0],E=v[1],w=uo(l[o+1],2),j=w[0],P=w[1];d===O&&O===j||g===E&&E===P?l.splice(o,1):o++}return l},u.prototype.getEdge=function(){var a=this.props.model,l=a.points,o=a.isAnimation,p=a.arrowConfig,d=a.radius,g=d===void 0?5:d,v=a.getEdgeStyle(),O=a.getEdgeAnimationStyle(),E=this.pointFilter(l.split(" ").map(function(Ae){return Ae.split(",").map(function(Ce){return Number(Ce)})})),w=t5(E);if(w){var j=uo(w,2),P=j[0],M=j[1],T=E[P],k=E[M],I=T.some(function(Ae,Ce){return Ae===k[Ce]});if(!I){var L=(k[1]-T[1])/2,Y=[k[0],k[1]-L],Q=[T[0],T[1]+L];E.splice(P+1,0,Q,Y)}}for(var X=uo(E[0],2),V=X[0],Z=X[1],F="M"+V+" "+Z,C=1;C<E.length-1;C++){var B=uo(E[C-1],2),$=B[0],G=B[1],te=uo(E[C],2),pe=te[0],le=te[1],ge=uo(E[C+1],2),Ee=ge[0],ve=ge[1];if(pe===$&&le!==G){var se=le>G?le-g:le+g;F=F+" L "+pe+" "+se}if(le===G&&pe!==$){var ye=pe>$?pe-g:pe+g;F=F+" L "+ye+" "+le}if(F=F+" Q "+pe+" "+le,pe===Ee&&le!==ve){var se=le>ve?le-g:le+g;F=F+" "+pe+" "+se}if(le===ve&&pe!==Ee){var ye=pe>Ee?pe-g:pe+g;F=F+" "+ye+" "+le}}var me=uo(E[E.length-1],2),je=me[0],Be=me[1];F=F+" L "+je+" "+Be;var Ze=Hi(Hi(Hi({d:F,style:o?O:{}},v),p),{fill:"none"});return Le.h("path",Hi({d:F},Ze))},u})(Le.PolylineEdge);(function(r){gO(u,r);function u(){return r!==null&&r.apply(this,arguments)||this}return u})(Le.PolylineEdgeModel);var n5=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;var I0=globalThis&&globalThis.__assign||function(){return I0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},I0.apply(this,arguments)},L0=globalThis&&globalThis.__assign||function(){return L0=Object.assign||function(r){for(var u,a=1,l=arguments.length;a<l;a++){u=arguments[a];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(r[o]=u[o])}return r},L0.apply(this,arguments)},r5=globalThis&&globalThis.__read||function(r,u){var a=typeof Symbol=="function"&&r[Symbol.iterator];if(!a)return r;var l=a.call(r),o,p=[],d;try{for(;(u===void 0||u-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(g){d={error:g}}finally{try{o&&!o.done&&(a=l.return)&&a.call(l)}finally{if(d)throw d.error}}return p};globalThis&&globalThis.__spread;const o5={class:"control-container"},i5=["title","onMouseenter"],a5=["disabled","onClick"],u5=wc({__name:"Control",props:{lf:{default:null},catTurboData:{type:Boolean}},emits:["catData"],setup(r,{emit:u}){const a=r,l=so(),o=so(),p=so(-1),d=so([{icon:"icon-zoom-out-hs",text:"缩小",size:"18",disabled:!1},{icon:"icon-enlarge-hs",text:"放大",size:"18",disabled:!1},{icon:"icon-full-screen-hs",text:"适应",size:"15",disabled:!1},{icon:"icon-previous-hs",text:"上一步",size:"15",disabled:!0},{icon:"icon-next-step-hs",text:"下一步",size:"17",disabled:!0},{icon:"icon-download-hs",text:"下载图片",size:"17",disabled:!1},{icon:"icon-watch-hs",text:"查看数据",size:"17",disabled:!1}]),g=(O,E)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((w,j)=>{const P=a.lf;E===1&&P.zoom(!0),E===6&&u("catData"),E===j&&P[w]()})},v=O=>{p.value=O};return o_(()=>{a.lf.on("history:change",({data:{undoAble:O,redoAble:E}})=>{An(d)[3].disabled=An(l).disabled=!O,An(d)[4].disabled=An(o).disabled=!E})}),(O,E)=>{const w=Ha("el-tooltip");return Fr(),oi("div",o5,[lo("ul",null,[(Fr(!0),oi(i_,null,a_(d.value,(j,P)=>(Fr(),oi("li",{key:P,title:j.text,class:"dark:text-bg_color",onMouseenter:dm(M=>v(P),["prevent"]),onMouseleave:E[0]||(E[0]=dm(M=>p.value=-1,["prevent"]))},[Fi(w,{content:j.text,visible:p.value===P,placement:"right"},{default:$i(()=>[lo("button",{ref_for:!0,ref:"controlButton"+P,disabled:j.disabled,style:hm({cursor:j.disabled===!1?"pointer":"not-allowed",color:j.disabled===!1?"":"#00000040",background:"transparent"}),onClick:M=>g(j,P)},[lo("span",{class:u_("iconfont "+j.icon),style:hm({fontSize:`${j.size}px`})},null,6)],12,a5)]),_:2},1032,["content","visible"])],40,i5))),128))])])}}});const s5=Ld(u5,[["__scopeId","data-v-44af808d"]]),c5={class:"node-panel"},l5=["onMousedown"],f5={key:0,class:"shape"},p5={class:"node-label"},d5=wc({__name:"NodePanel",props:{lf:{default:null},nodeList:{default:null}},setup(r){const u=r,a=so({a:"efrwe",b:"wewe"}),l=o=>{u.lf.dnd.startDrag({type:o.type,properties:An(a)})};return(o,p)=>(Fr(),oi("div",c5,[(Fr(!0),oi(i_,null,a_(u.nodeList,d=>(Fr(),oi("div",{class:"node-item dark:text-bg_color",key:d.text,onMousedown:g=>l(d)},[lo("div",{class:u_(["node-item-icon",d.class])},[d.type==="user"||d.type==="time"?(Fr(),oi("div",f5)):s_("",!0)],2),lo("span",p5,ZP(d.text),1)],40,l5))),128))]))}});const h5=Ld(d5,[["__scopeId","data-v-5c49346d"]]),y5=wc({__name:"DataDialog",props:{graphData:Object},setup(r){const u=r;return(a,l)=>(Fr(),yd(An(tA),{path:"res",deep:3,showLength:!0,data:u.graphData},null,8,["data"]))}}),g5=Bd(s5),v5=Bd(h5),b5=Bd(y5),m5={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function _5(r){const{incoming:u,outgoing:a,properties:l,key:o}=r,{text:p,startPoint:d,endPoint:g,pointsList:v,logicFlowType:O}=l,E={id:o,type:O,sourceNodeId:u[0],targetNodeId:a[0],text:p,startPoint:d,endPoint:g,pointsList:v,properties:{}},w=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(r.properties).forEach(j=>{w.indexOf(j)===-1&&(E.properties[j]=r.properties[j])}),E}function O5(r){const{properties:u,key:a}=r,{x:l,y:o,text:p,logicFlowType:d}=u,g={id:a,type:d,x:l,y:o,text:p,properties:{}},v=["x","y","text","logicFlowType"];return Object.keys(r.properties).forEach(O=>{v.indexOf(O)===-1&&(g.properties[O]=r.properties[O])}),g}function w5(r){const u={nodes:[],edges:[]},a=r.flowElementList;return a&&a.length>0&&a.forEach(l=>{if(l.type===m5.SEQUENCE_FLOW){const o=_5(l);u.edges.push(o)}else{const o=O5(l);u.nodes.push(o)}}),u}const x5=r=>(JP("data-v-75717ba2"),r=r(),QP(),r),E5={class:"card-header"},S5={class:"font-medium"},j5={class:"logic-flow-view"},P5=x5(()=>lo("div",{id:"turbo"},null,-1)),A5=wc({name:"FlowChart",__name:"index",setup(r){const u=so(null),a=so(null),l=so(!1),o=so({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),p=TL;function d(){Zs.use(K4),Zs.use(ZL),Zs.use(e5);const O=new Zs({...An(o),container:document.querySelector("#turbo")});u.value=O,An(u).setDefaultEdgeType("bpmn:sequenceFlow"),g()}function g(){const O=w5(AL);u.value.render(O)}function v(){a.value=An(u).getGraphData(),l.value=!0}return o_(()=>{d()}),(O,E)=>{const w=Ha("el-link"),j=Ha("el-scrollbar"),P=Ha("el-dialog"),M=Ha("el-card");return Fr(),yd(M,{shadow:"never"},{header:$i(()=>[lo("div",E5,[lo("span",S5,[ym(" 流程图组件,采用开源的 "),Fi(w,{href:"http://logic-flow.org/",target:"_blank",icon:An(eA)(An(nA)),style:{margin:"0 4px 5px","font-size":"16px"}},{default:$i(()=>[ym(" LogicFlow ")]),_:1},8,["icon"])])])]),default:$i(()=>[lo("div",j5,[u.value?(Fr(),yd(An(g5),{key:0,class:"demo-control",lf:u.value,catTurboData:!1,onCatData:v},null,8,["lf"])):s_("",!0),Fi(An(v5),{lf:u.value,nodeList:An(p)},null,8,["lf","nodeList"]),P5,Fi(P,{class:"flow-dialog",title:"数据",modelValue:l.value,"onUpdate:modelValue":E[0]||(E[0]=T=>l.value=T),width:"50%"},{default:$i(()=>[Fi(j,null,{default:$i(()=>[Fi(An(b5),{graphData:a.value},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});const R5=Ld(A5,[["__scopeId","data-v-75717ba2"]]);export{R5 as default};
|