251 lines
1.9 MiB
JavaScript
251 lines
1.9 MiB
JavaScript
|
|
var h$=Object.defineProperty;var v$=(t,e,n)=>e in t?h$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var hl=(t,e,n)=>v$(t,typeof e!="symbol"?e+"":e,n);import{dr as km,eP as ed,dn as zo,eQ as BN,db as tg,eR as z_,eS as lp,eT as ng,eU as Qy,eV as Ku,ef as qd,dc as qa,eW as g$,dd as Kd,ea as gj,eX as m$,eY as H_,eZ as Qu,e6 as S1,e8 as k2,dk as rg,au as Zd,e_ as og,e$ as ig,eg as Km,f0 as P2,di as Yo,f1 as A1,dM as M1,ee as sp,dS as Ri,f2 as Pm,dj as kh,f3 as Zm,f4 as X_,dR as Jd,dh as Es,df as _i,f5 as y$,f6 as mj,eE as ec,ed as Ll,f7 as _$,f8 as b$,f9 as Jm,fa as T1,fb as yj,dL as ag,fc as _j,bL as tc,dg as Y_,at as Ph,dQ as w_,dO as Hv,e9 as w$,ec as $N,eb as E$,as as bj,fd as wj,fe as x$,dm as C1,de as O$,ei as uw,ff as S$,fg as Ej,fh as xj,fi as A$,fj as Oj,fk as M$,dp as T$,fl as C$,fm as N$,fn as k$,fo as cw,fp as P$,el as R$,fq as Sj,dN as Aj,eh as R2,fr as Mj,fs as D2,ft as D$,dl as q_,fu as Tj,fv as j$,fw as Cj,fx as Nj,fy as L$,fz as I$,fA as F$,em as E_,eC as B$,fB as $$,fC as U$,aw as V$,fD as W$,fE as G$,fF as j2,fG as z$,fH as kj,fI as H$,fJ as X$,ai as Y$,eF as to,fK as q$,ax as dw,fL as uA,fM as K$,fN as Z$,fO as ws,fP as J$,fQ as Q$,av as Xv,fR as e9,eG as Yv,fS as t9,eD as Vv,fT as Pj,fU as n9,fV as r9,fW as o9,ay as gr,aB as Ge,aV as K_,aD as te,aE as Te,aW as cn,aX as Ir,aH as k,aI as ee,aY as No,aF as bt,aG as j,b2 as Wn,c$ as cA,bX as yh,dw as UN,aJ as _e,bY as L2,aK as ft,b1 as In,aS as mn,cf as fp,fX as gl,aQ as ja,aA as Rj,aO as fr,aP as Dj,b6 as yo,b8 as Ql,bc as jj,ch as Oh,cq as fw,fY as pw,bW as u0,aT as oi,aN as nc,aZ as Me,b7 as Rm,ce as Gs,cF as Lj,cj as x_,c1 as Xi,aC as Pt,c0 as I2,aM as kr,fZ as O_,ci as bs,d5 as Z_,bB as Dm,aU as Rh,f_ as i9,f$ as a9,g0 as Ij,g1 as Fj,g2 as l9,g3 as s9,g4 as u9,g5 as c9,g6 as d9,g7 as Go,du as F2,dv as f9,cu as dA,bD as up,dJ as p9,b3 as Sh,g8 as yu,cJ as h9,g9 as VN,ga as Lv,gb as v9,gc as B2,gd as $2,ge as g9,gf as m9,b4 as U2,bZ as fA,az as y9,er as WN,cY as _9,bG as Qf,bH as Vs,bI as Bc,bK as Yl,bJ as ch}from"./admin-Bt7XKYkd.js";import{t as GN,a as zN,g as b9,i as Qd,n as w9,c as V2,l as c0,d as E9}from"./data-Gh_yWxYC.js";import{_ as pp}from"./AIModeParamSettingDialog.vue_vue_type_script_setup_true_lang-DBg0al-H.js";import{G as W2,d as x9,e as O9,f as S9,_ as Bj,c as $j,b as A9,a as M9}from"./ToolDialog.vue_vue_type_style_index_0_lang-Bz-q5VO6.js";import{d as Uj,c as lg,v as J_,e as T9,g as Vj,f as C9,a as ri,r as Wj}from"./reduce-BDzbQi8C.js";import{c as N9,a as k9,b as P9,e as Gj,f as Ah,m as R9,d as D9,h as hw}from"./min-DHG3ECLG.js";import{c as G2,b as N1,i as z2,p as zj,n as H2,a as j9,d as X2,e as L9,f as I9,g as F9,h as B9,u as $9,j as U9,k as V9,l as Hj,m as W9,r as G9,o as z9,q as H9,s as X9,t as Xo}from"./uniqBy-BGukZP_i.js";import{d as Xj,e as Y9,g as q9,h as K9,i as Z9,z as J9,s as Q9,m as e7,a as t7,b as n7,f as r7,c as o7,r as i7,u as a7}from"./zipObject-CL6jmQn8.js";import{l as Yj,_ as qj}from"./vue-draggable-plus-CPHJ-lGv.js";import{_ as l7}from"./FieldFormDialog.vue_vue_type_script_setup_true_lang-B1P5HULT.js";import{_ as Bn}from"./defineProperty-DbXIQDXj.js";import"./typeof-QjJsDpFa.js";const Kj=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Kge}},Symbol.toStringTag,{value:"Module"}));var s7=NaN;function HN(t){return typeof t=="number"?t:km(t)?s7:+t}function k1(t,e){return function(n,o){var r;if(n===void 0&&o===void 0)return e;if(n!==void 0&&(r=n),o!==void 0){if(r===void 0)return o;typeof n=="string"||typeof o=="string"?(n=ed(n),o=ed(o)):(n=HN(n),o=HN(o)),r=t(n,o)}return r}}var u7=k1(function(t,e){return t+e},0),c7="Expected a function";function d7(t,e){if(typeof e!="function")throw new TypeError(c7);return t=zo(t),function(){if(--t<1)return e.apply(this,arguments)}}var vw=BN&&new BN,Zj=vw?function(t,e){return vw.set(t,e),t}:tg;function S_(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4
|
|||
|
|
/* [wrapped with `+e+`] */
|
|||
|
|
`)}var M7=1,T7=2,C7=8,N7=16,k7=32,P7=64,R7=128,D7=256,j7=512,L7=[["ary",R7],["bind",M7],["bindKey",T7],["curry",C7],["curryRight",N7],["flip",j7],["partial",k7],["partialRight",P7],["rearg",D7]];function I7(t,e){return Kd(L7,function(n){var o="_."+n[0];e&n[1]&&!gj(t,o)&&t.push(o)}),t.sort()}function nL(t,e,n){var o=e+"";return m$(t,A7(o,I7(O7(o),n)))}var F7=4,B7=8,XN=32,YN=64;function rL(t,e,n,o,r,i,a,s,l,f){var h=e&B7,v=h?a:void 0,_=h?void 0:a,E=h?i:void 0,O=h?void 0:i;e|=h?XN:YN,e&=~(h?YN:XN),e&F7||(e&=-4);var w=[t,e,r,E,v,O,_,s,l,f],S=n.apply(void 0,w);return pA(t)&&tL(S,w),S.placeholder=o,nL(S,t,e)}function Qm(t){var e=t;return e.placeholder}var $7=Math.min;function U7(t,e){for(var n=t.length,o=$7(e.length,n),r=Ku(t);o--;){var i=e[o];t[o]=H_(i,n)?r[i]:void 0}return t}var qN="__lodash_placeholder__";function Mh(t,e){for(var n=-1,o=t.length,r=0,i=[];++n<o;){var a=t[n];(a===e||a===qN)&&(t[n]=qN,i[r++]=n)}return i}var V7=1,W7=2,G7=8,z7=16,H7=128,X7=512;function R1(t,e,n,o,r,i,a,s,l,f){var h=e&H7,v=e&V7,_=e&W7,E=e&(G7|z7),O=e&X7,w=_?void 0:S_(t);function S(){for(var M=arguments.length,T=Array(M),B=M;B--;)T[B]=arguments[B];if(E)var R=Qm(S),P=g7(T,R);if(o&&(T=Jj(T,o,r,E)),i&&(T=Qj(T,i,a,E)),M-=P,E&&M<f){var $=Mh(T,R);return rL(t,e,R1,S.placeholder,n,T,$,s,l,f-M)}var I=v?n:this,F=_?I[t]:t;return M=T.length,s?T=U7(T,s):O&&M>1&&T.reverse(),h&&l<M&&(T.length=l),this&&this!==ng&&this instanceof S&&(F=w||S_(F)),F.apply(I,T)}return S}function Y7(t,e,n){var o=S_(t);function r(){for(var i=arguments.length,a=Array(i),s=i,l=Qm(r);s--;)a[s]=arguments[s];var f=i<3&&a[0]!==l&&a[i-1]!==l?[]:Mh(a,l);if(i-=f.length,i<n)return rL(t,e,R1,r.placeholder,void 0,a,f,void 0,void 0,n-i);var h=this&&this!==ng&&this instanceof r?o:t;return Qu(h,this,a)}return r}var q7=1;function K7(t,e,n,o){var r=e&q7,i=S_(t);function a(){for(var s=-1,l=arguments.length,f=-1,h=o.length,v=Array(h+l),_=this&&this!==ng&&this instanceof a?i:t;++f<h;)v[f]=o[f];for(;l--;)v[f++]=arguments[++s];return Qu(_,r?n:this,v)}return a}var KN="__lodash_placeholder__",YO=1,Z7=2,J7=4,ZN=8,jy=128,JN=256,Q7=Math.min;function eU(t,e){var n=t[1],o=e[1],r=n|o,i=r<(YO|Z7|jy),a=o==jy&&n==ZN||o==jy&&n==JN&&t[7].length<=e[8]||o==(jy|JN)&&e[7].length<=e[8]&&n==ZN;if(!(i||a))return t;o&YO&&(t[2]=e[2],r|=n&YO?0:J7);var s=e[3];if(s){var l=t[3];t[3]=l?Jj(l,s,e[4]):s,t[4]=l?Mh(t[3],KN):e[4]}return s=e[5],s&&(l=t[5],t[5]=l?Qj(l,s,e[6]):s,t[6]=l?Mh(t[5],KN):e[6]),s=e[7],s&&(t[7]=s),o&jy&&(t[8]=t[8]==null?e[8]:Q7(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=r,t}var tU="Expected a function",QN=1,nU=2,ek=8,tk=16,nk=32,rU=64,rk=Math.max;function hp(t,e,n,o,r,i,a,s){var l=e&nU;if(!l&&typeof t!="function")throw new TypeError(tU);var f=o?o.length:0;if(f||(e&=-97,o=r=void 0),a=a===void 0?a:rk(zo(a),0),s=s===void 0?s:zo(s),f-=r?r.length:0,e&rU){var h=o,v=r;o=r=void 0}var _=l?void 0:Y2(t),E=[t,e,n,o,r,h,v,i,a,s];if(_&&eU(E,_),t=E[0],e=E[1],n=E[2],o=E[3],r=E[4],s=E[9]=E[9]===void 0?l?0:t.length:rk(E[9]-f,0),!s&&e&(ek|tk)&&(e&=-25),!e||e==QN)var O=p7(t,e,n);else e==ek||e==tk?O=Y7(t,e,s):(e==nk||e==(QN|nk))&&!r.length?O=K7(t,e,n,o):O=R1.apply(void 0,E);var w=_?Zj:tL;return nL(w(O,E),t,e)}var oU=128;function oL(t,e,n){return e=n?void 0:e,e=t&&e==null?t.length:e,hp(t,oU,void 0,void 0,void 0,void 0,e)}var iU=S1(function(t,e){k2(e,rg(e),t)}),hA=S1(function(t,e,n,o){k2(e,rg(e),t,o)}),aU=S1(function(t,e,n,o){k2(e,Zd(e),t,o)});function q2(t,e){for(var n=-1,o=e.length,r=Array(o),i=t==null;++n<o;)r[n]=i?void 0:og(t,e[n]);return r}var lU=ig(q2),sU="[object DOMException]",uU="[object Error]";function K2(t){if(!qd(t))return!1;var e=Km(t);return e==uU||e==sU||typeof t.message=="string"&&typeof t.name=="string"&&!P2(t)}var iL=Yo(function(t,e){try{return Qu(t,void 0,e)}catch(n){return K2(n)?n:new Error(n)}}),cU="Expected a function";function aL(t,e){var n;if(typeof e!="function")throw new TypeError(cU);return t=zo(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var dU=1,fU=32,D1=Yo(function(t,e,n){var o=dU;if(n.length){var r=Mh(n,Qm(D1));o|=fU}return hp(t,o,e,n,r)});D1.placeholder={};var pU=ig(fu
|
|||
|
|
`:"";t.replace(_,function(S,M,T,B,R,P){return T||(T=B),v+=t.slice(f,P).replace(AX,mX),M&&(s=!0,v+=`' +
|
|||
|
|
__e(`+M+`) +
|
|||
|
|
'`),R&&(l=!0,v+=`';
|
|||
|
|
`+R+`;
|
|||
|
|
__p += '`),T&&(v+=`' +
|
|||
|
|
((__t = (`+T+`)) == null ? '' : __t) +
|
|||
|
|
'`),f=P+S.length,S}),v+=`';
|
|||
|
|
`;var O=hk.call(e,"variable")&&e.variable;if(!O)v=`with (obj) {
|
|||
|
|
`+v+`
|
|||
|
|
}
|
|||
|
|
`;else if(OX.test(O))throw new Error(bX);v=(l?v.replace(wX,""):v).replace(EX,"$1").replace(xX,"$1;"),v="function("+(O||"obj")+`) {
|
|||
|
|
`+(O?"":`obj || (obj = {});
|
|||
|
|
`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(l?`, __j = Array.prototype.join;
|
|||
|
|
function print() { __p += __j.call(arguments, '') }
|
|||
|
|
`:`;
|
|||
|
|
`)+v+`return __p
|
|||
|
|
}`;var w=iL(function(){return Function(i,E+"return "+v).apply(void 0,a)});if(w.source=v,K2(w))throw w;return w}function U1(t,e){return e(t)}var CX=9007199254740991,KO=4294967295,NX=Math.min;function kX(t,e){if(t=zo(t),t<1||t>CX)return[];var n=KO,o=NX(t,KO);e=lg(e),t-=KO;for(var r=Tj(o,e);++n<t;)e(n);return r}function PX(){return this}function c3(t,e){var n=t;return n instanceof $o&&(n=n.value()),Uj(e,function(o,r){return r.func.apply(r.thisArg,X_([o],r.args))},n)}function RX(){return c3(this.__wrapped__,this.__actions__)}function DX(t){return Ri(t).toLowerCase()}function jX(t){return qa(t)?Es(t,A1):km(t)?[t]:Ku(j$(Ri(t)))}var vk=9007199254740991;function LX(t){return t?Jm(zo(t),-vk,vk):t===0?t:0}function IX(t){return Ri(t).toUpperCase()}function FX(t,e,n){var o=qa(t),r=o||Cj(t)||Nj(t);if(e=_i(e),n==null){var i=t&&t.constructor;r?n=o?new i:[]:lp(t)?n=Ph(i)?z_(L$(t)):{}:n={}}return(r?Kd:ag)(t,function(a,s,l){return e(n,a,s,l)}),n}function d3(t,e){for(var n=t.length;n--&&R2(e,t[n],0)>-1;);return n}function f3(t,e){for(var n=-1,o=t.length;++n<o&&R2(e,t[n],0)>-1;);return n}function BX(t,e,n){if(t=Ri(t),t&&(n||e===void 0))return I$(t);if(!t||!(e=ed(e)))return t;var o=td(t),r=td(e),i=f3(o,r),a=d3(o,r)+1;return Dh(o,i,a).join("")}function $X(t,e,n){if(t=Ri(t),t&&(n||e===void 0))return t.slice(0,F$(t)+1);if(!t||!(e=ed(e)))return t;var o=td(t),r=d3(o,td(e))+1;return Dh(o,0,r).join("")}var UX=/^\s+/;function VX(t,e,n){if(t=Ri(t),t&&(n||e===void 0))return t.replace(UX,"");if(!t||!(e=ed(e)))return t;var o=td(t),r=f3(o,td(e));return Dh(o,r).join("")}var WX=30,GX="...",zX=/\w*$/;function HX(t,e){var n=WX,o=GX;if(lp(e)){var r="separator"in e?e.separator:r;n="length"in e?zo(e.length):n,o="omission"in e?ed(e.omission):o}t=Ri(t);var i=t.length;if(ey(t)){var a=td(t);i=a.length}if(n>=i)return t;var s=n-ny(o);if(s<1)return o;var l=a?Dh(a,0,s).join(""):t.slice(0,s);if(r===void 0)return l+o;if(a&&(s+=l.length-s),X2(r)){if(t.slice(s).search(r)){var f,h=l;for(r.global||(r=RegExp(r.source,Ri(zX.exec(r))+"g")),r.lastIndex=0;f=r.exec(h);)var v=f.index;l=l.slice(0,v===void 0?s:v)}}else if(t.indexOf(ed(r),s)!=s){var _=l.lastIndexOf(r);_>-1&&(l=l.slice(0,_))}return l+o}function XX(t){return oL(t,1)}var YX={"&":"&","<":"<",">":">",""":'"',"'":"'"},qX=Q2(YX),p3=/&(?:amp|lt|gt|quot|#39);/g,KX=RegExp(p3.source);function ZX(t){return t=Ri(t),t&&KX.test(t)?t.replace(p3,qX):t}var JX=Yo(function(t){var e=ec(t);return Ll(e)&&(e=void 0),E_(Jd(t,1,Ll,!0),_i(e))}),QX=Yo(function(t){var e=ec(t);return e=typeof e=="function"?e:void 0,E_(Jd(t,1,Ll,!0),void 0,e)});function eY(t,e){return e=typeof e=="function"?e:void 0,t&&t.length?E_(t,void 0,e):[]}function tY(t,e){return t==null?!0:Mj(t,e)}var nY=Math.max;function fM(t){if(!(t&&t.length))return[];var e=0;return t=Y_(t,function(n){if(Ll(n))return e=nY(n.length,e),!0}),Tj(e,function(n){return Es(t,Sj(n))})}function h3(t,e){if(!(t&&t.length))return[];var n=fM(t);return e==null?n:Es(n,function(o){return Qu(e,void 0,o)})}function v3(t,e,n,o){return D2(t,e,n(Aj(t,e)),o)}function rY(t,e,n){return t==null?t:v3(t,e,lg(n))}function oY(t,e,n,o){return o=typeof o=="function"?o:void 0,t==null?t:v3(t,e,lg(n),o)}var iY=ty(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()});function aY(t){return t==null?[]:Vj(t,rg(t))}var lY=Yo(function(t,e){return Ll(t)?N1(t,e):[]});function sY(t,e){return F1(lg(e),t)}var uY=ig(function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,r=function(i){return q2(i,t)};return e>1||this.__actions__.length||!(o instanceof $o)||!H_(n)?this.thru(r):(o=o.slice(n,+n+(e?1:0)),o.__actions__.push({func:U1,args:[r],thisArg:void 0}),new rc(o,this.__chain__).thru(function(i){return e&&!i.length&&i.push(void 0),i}))});function cY(){return NL(this)}function dY(){var t=this.__wrapped__;if(t instanceof $o){var e=t;return this.__actions__.length&&(e=new $o(this)),e=e.reverse(),e.__actions__.push({func:U1,args:[bA],thisArg:void 0}),new rc(e,this.__chain__)}return this.thru(bA)}function pM(t,e,n){var o=t.length;if(o<2)return o?E_(t[0]):[];for(var r=-1,i=Array(o);++r<o;)for(var a=t[r],s=-1;++s<o;)s!=r&
|
|||
|
|
* @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 TY="4.17.23",CY=2,NY=1,kY=3,g3=4294967295,PY=Array.prototype,RY=Object.prototype,m3=RY.hasOwnProperty,gk=cw?cw.iterator:void 0,DY=Math.max,mk=Math.min,vM=(function(t){return function(e,n,o){if(o==null){var r=lp(n),i=r&&Zd(n),a=i&&i.length&&L1(n,i);(a?a.length:r)||(o=n,n=e,e=this)}return t(e,n,o)}})(nz);me.after=Ta.after;me.ary=Ta.ary;me.assign=io.assign;me.assignIn=io.assignIn;me.assignInWith=io.assignInWith;me.assignWith=io.assignWith;me.at=io.at;me.before=Ta.before;me.bind=Ta.bind;me.bindAll=bi.bindAll;me.bindKey=Ta.bindKey;me.castArray=Vr.castArray;me.chain=ef.chain;me.chunk=mr.chunk;me.compact=mr.compact;me.concat=mr.concat;me.cond=bi.cond;me.conforms=bi.conforms;me.constant=bi.constant;me.countBy=Di.countBy;me.create=io.create;me.curry=Ta.curry;me.curryRight=Ta.curryRight;me.debounce=Ta.debounce;me.defaults=io.defaults;me.defaultsDeep=io.defaultsDeep;me.defer=Ta.defer;me.delay=Ta.delay;me.difference=mr.difference;me.differenceBy=mr.differenceBy;me.differenceWith=mr.differenceWith;me.drop=mr.drop;me.dropRight=mr.dropRight;me.dropRightWhile=mr.dropRightWhile;me.dropWhile=mr.dropWhile;me.fill=mr.fill;me.filter=Di.filter;me.flatMap=Di.flatMap;me.flatMapDeep=Di.flatMapDeep;me.flatMapDepth=Di.flatMapDepth;me.flatten=mr.flatten;me.flattenDeep=mr.flattenDeep;me.flattenDepth=mr.flattenDepth;me.flip=Ta.flip;me.flow=bi.flow;me.flowRight=bi.flowRight;me.fromPairs=mr.fromPairs;me.functions=io.functions;me.functionsIn=io.functionsIn;me.groupBy=Di.groupBy;me.initial=mr.initial;me.intersection=mr.intersection;me.intersectionBy=mr.intersectionBy;me.intersectionWith=mr.intersectionWith;me.invert=io.invert;me.invertBy=io.invertBy;me.invokeMap=Di.invokeMap;me.iteratee=bi.iteratee;me.keyBy=Di.keyBy;me.keys=Zd;me.keysIn=io.keysIn;me.map=Di.map;me.mapKeys=io.mapKeys;me.mapValues=io.mapValues;me.matches=bi.matches;me.matchesProperty=bi.matchesProperty;me.memoize=Ta.memoize;me.merge=io.merge;me.mergeWith=io.mergeWith;me.method=bi.method;me.methodOf=bi.methodOf;me.mixin=vM;me.negate=H2;me.nthArg=bi.nthArg;me.omit=io.omit;me.omitBy=io.omitBy;me.once=Ta.once;me.orderBy=Di.orderBy;me.over=bi.over;me.overArgs=Ta.overArgs;me.overEvery=bi.overEvery;me.overSome=bi.overSome;me.partial=Ta.partial;me.partialRight=Ta.partialRight;me.partition=Di.partition;me.pick=io.pick;me.pickBy=io.pickBy;me.property=bi.property;me.propertyOf=bi.propertyOf;me.pull=mr.pull;me.pullAll=mr.pullAll;me.pullAllBy=mr.pullAllBy;me.pullAllWith=mr.pullAllWith;me.pullAt=mr.pullAt;me.range=bi.range;me.rangeRight=bi.rangeRight;me.rearg=Ta.rearg;me.reject=Di.reject;me.remove=mr.remove;me.rest=Ta.rest;me.reverse=mr.reverse;me.sampleSize=Di.sampleSize;me.set=io.set;me.setWith=io.setWith;me.shuffle=Di.shuffle;me.slice=mr.slice;me.sortBy=Di.sortBy;me.sortedUniq=mr.sortedUniq;me.sortedUniqBy=mr.sortedUniqBy;me.split=pi.split;me.spread=Ta.spread;me.tail=mr.tail;me.take=mr.take;me.takeRight=mr.takeRight;me.takeRightWhile=mr.takeRightWhile;me.takeWhile=mr.takeWhile;me.tap=ef.tap;me.throttle=Ta.throttle;me.thru=U1;me.toArray=Vr.toArray;me.toPairs=io.toPairs;me.toPairsIn=io.toPairsIn;me.toPath=bi.toPath;me.toPlainObject=Vr.toPlainObject;me.transform=io.transform;me.unary=Ta.unary;me.union=mr.union;me.unionBy=mr.unionBy;me.unionWith=mr.unionWith;me.uniq=mr.uniq;me.uniqBy=mr.uniqBy;me.uniqWith=mr.uniqWith;me.unset=io.unset;me.unzip=mr.unzip;me.unzipWith=mr.unzipWith;me.update=io.update;me.updateWith=io.updateWith;me.values=io.values;me.valuesIn=io.valuesIn;me.without=mr.without;me.words=pi.words;me.wrap=Ta.wrap;me.xor=mr.xor;me.xorBy=mr.xorBy;me.xorWith=mr.xorWith;me.zip=mr.zip;me.zipObject=mr.zipObject;me.zipObjectDeep=mr.zipObjectDeep;me.zipWith=mr.zipWith;me.entries=io.toPairs;me.entriesIn=io.toPairsIn;me.extend=io.assignIn;me.extendWith=io.assignInWith;vM(me,me);me.add=Ss.add;me.attempt=bi.attempt;me.camelCase=pi.camelCase;me.capitalize=pi.capitalize;me.ceil=Ss.ceil;me.clamp=hM.clamp;me.clone=Vr.clone;me.cloneDeep=Vr.cloneDeep;me.cloneDeepWith=Vr.cloneDeepWith;me.cloneWith=Vr.cloneWith;me.conformsTo=Vr.conformsTo;me.deburr=pi.deburr;me.defaultTo=bi.defaultTo;me.divide=Ss.divide;me.
|
|||
|
|
{{${Pt("views.applicationWorkflow.nodes.searchKnowledgeNode.label")}.data}}
|
|||
|
|
${Pt("views.problem.title")}:
|
|||
|
|
{{${Pt("views.applicationWorkflow.nodes.startNode.label")}.question}}`,dialogue_number:1,is_result:!0,temperature:null,max_tokens:null,dialogue_type:"WORKFLOW",model_setting:{reasoning_content_start:"<think>",reasoning_content_end:"</think>",reasoning_content_enable:!1}},v=fr({get:()=>_.nodeModel.properties.node_data?(_.nodeModel.properties.node_data.model_setting||Me.set(_.nodeModel.properties.node_data,"model_setting",{reasoning_content_start:"<think>",reasoning_content_end:"</think>",reasoning_content_enable:!1}),_.nodeModel.properties.node_data):(Me.set(_.nodeModel.properties,"node_data",h),_.nodeModel.properties.node_data),set:Be=>{Me.set(_.nodeModel.properties,"node_data",Be)}}),_=t,E=Ge(),O=Ge(null),w=Ge(),S=Ge(),M=()=>{var Be;return(Be=E.value)==null?void 0:Be.validate().catch(Je=>Promise.reject({node:_.nodeModel,errMessage:Je}))},T=e();function B(){var Je;const Be=r.value==="systemManage"?{model_type:"LLM",workspace_id:(Je=T.value)==null?void 0:Je.workspace_id}:{model_type:"LLM"};oi({type:"model",systemType:r.value}).getSelectModelList(Be).then(mt=>{O.value=Me.groupBy(mt==null?void 0:mt.data,"provider")})}const R=Be=>{var Je;Be&&((Je=w.value)==null||Je.open(Be,o,v.value.model_params_setting))},P=Ge(),$=Be=>{var Je;Be&&((Je=P.value)==null||Je.open(Be,o))},I=Be=>{Me.set(_.nodeModel.properties.node_data,"system",Be)},F=()=>{var Be;(Be=S.value)==null||Be.open(v.value.model_setting)};function U(Be){Me.set(_.nodeModel.properties.node_data,"model_params_setting",Be)}function z(Be){let Je=Me.cloneDeep(_.nodeModel.properties.node_data.model_setting);Je={...Je,...Be},Me.set(_.nodeModel.properties.node_data,"model_setting",Je)}const X=Ge();function Y(){const Be={mcp_servers:v.value.mcp_servers,mcp_tool_ids:v.value.mcp_tool_ids,mcp_source:v.value.mcp_source};X.value.open(Be,He.value)}function W(Be){Me.set(_.nodeModel.properties.node_data,"mcp_servers",Be.mcp_servers),Me.set(_.nodeModel.properties.node_data,"mcp_tool_ids",Be.mcp_tool_ids),Me.set(_.nodeModel.properties.node_data,"mcp_source",Be.mcp_source)}const Q=Ge();function J(){Q.value.open(v.value.tool_ids)}function ie(Be){Me.set(_.nodeModel.properties.node_data,"tool_ids",Be.tool_ids)}function Se(Be){const Je=_.nodeModel.properties.node_data.tool_ids.filter(mt=>mt!==Be);Me.set(_.nodeModel.properties.node_data,"tool_ids",Je)}function Ae(Be){const Je=_.nodeModel.properties.node_data.mcp_tool_ids.filter(mt=>mt!==Be);Me.set(_.nodeModel.properties.node_data,"mcp_tool_ids",Je)}const Pe=Ge([]);function De(){var Je;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"CUSTOM",workspace_id:(Je=T.value)==null?void 0:Je.workspace_id}:{scope:"WORKSPACE",tool_type:"CUSTOM"};oi({type:"tool",systemType:r.value}).getAllToolList(Be).then(mt=>{Pe.value=[...mt.data.shared_tools,...mt.data.tools].filter(le=>le.is_active)})}const He=Ge([]);function Ye(){var Je;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"MCP",workspace_id:(Je=T.value)==null?void 0:Je.workspace_id}:{scope:"WORKSPACE",tool_type:"MCP"};oi({type:"tool",systemType:r.value}).getAllToolList(Be).then(mt=>{He.value=[...mt.data.shared_tools,...mt.data.tools].filter(le=>le.is_active)})}return yo(()=>{var Be,Je,mt,le;B(),typeof((Be=_.nodeModel.properties.node_data)==null?void 0:Be.is_result)>"u"&&Qd(_.nodeModel)&&Me.set(_.nodeModel.properties.node_data,"is_result",!0),Me.set(_.nodeModel,"validate",M),v.value.dialogue_type||(v.value.dialogue_type="WORKFLOW"),(Je=_.nodeModel.properties.node_data)!=null&&Je.mcp_tool_id&&(Me.set(_.nodeModel.properties.node_data,"mcp_tool_ids",[(mt=_.nodeModel.properties.node_data)==null?void 0:mt.mcp_tool_id]),Me.set(_.nodeModel.properties.node_data,"mcp_tool_id",void 0)),((le=_.nodeModel.properties.node_data)==null?void 0:le.mcp_output_enable)===void 0&&Me.set(_.nodeModel.properties.node_data,"mcp_output_enable",!0),De(),Ye()}),(Be,Je)=>{const mt=te("AppIcon"),le=te("el-button"),Ze=te("ModelSelect"),pe=te("el-form-item"),se=te("el-tooltip"),we=te("MdEditorMagnify"),$e=te("el-option"),rt=te("el-select"),pt=te("el-input-number"),Lt=te("el-switch"),Jt=te("el-avatar"),en=te("Tool
|
|||
|
|
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 SA=function(t,e){return SA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)o.hasOwnProperty(r)&&(n[r]=o[r])},SA(t,e)};function rK(t,e){SA(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var xw=function(){return xw=Object.assign||function(e){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},xw.apply(this,arguments)};function Vd(t){var e=typeof Symbol=="function"&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function _m(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function OM(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(_m(arguments[e]));return t}var Ow=Symbol("mobx did run lazy initializers"),Gy=Symbol("mobx pending decorators"),oK={},iK={};function aK(t,e){var n=e?oK:iK;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return qv(this),this[t]},set:function(o){qv(this),this[t]=o}})}function qv(t){var e,n;if(t[Ow]!==!0){var o=t[Gy];if(o){oy(t,Ow,!0);var r=OM(Object.getOwnPropertySymbols(o),Object.keys(o));try{for(var i=Vd(r),a=i.next();!a.done;a=i.next()){var s=a.value,l=o[s];l.propertyCreator(t,l.prop,l.descriptor,l.decoratorTarget,l.decoratorArguments)}}catch(f){e={error:f}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}}}function P3(t,e){return function(){var o,r=function(a,s,l,f){if(f===!0)return e(a,s,l,a,o),null;if(!Object.prototype.hasOwnProperty.call(a,Gy)){var h=a[Gy];oy(a,Gy,xw({},h))}return a[Gy][s]={prop:s,propertyCreator:e,descriptor:l,decoratorTarget:a,decoratorArguments:o},aK(s,t)};return lK(arguments)?(o=Ew,r.apply(null,arguments)):(o=Array.prototype.slice.call(arguments),r)}}function lK(t){return(t.length===2||t.length===3)&&(typeof t[1]=="string"||typeof t[1]=="symbol")||t.length===4&&t[3]===!0}function nb(t,e,n){return Um(t)?t:Array.isArray(t)?Ut.array(t,{name:n}):ry(t)?Ut.object(t,void 0,{name:n}):iy(t)?Ut.map(t,{name:n}):tb(t)?Ut.set(t,{name:n}):t}function sK(t,e,n){return t==null||rd(t)||tf(t)||Ys(t)||oc(t)?t:Array.isArray(t)?Ut.array(t,{name:n,deep:!1}):ry(t)?Ut.object(t,void 0,{name:n,deep:!1}):iy(t)?Ut.map(t,{name:n,deep:!1}):tb(t)?Ut.set(t,{name:n,deep:!1}):Qo(!1)}function G1(t){return t}function uK(t,e,n){return oI(t,e)?e:t}function z1(t){Wv(t);var e=P3(!0,function(o,r,i,a,s){var l=i?i.initializer?i.initializer.call(o):i.value:void 0;CM(o).addObservableProp(r,l,t)}),n=e;return n.enhancer=t,n}var R3={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(R3);function pm(t){return t==null?R3:typeof t=="string"?{name:t,deep:!0,proxy:!0}:t}var SM=z1(nb),cK=z1(sK),D3=z1(G1),dK=z1(uK);function h0(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?G1:nb}function fK(t,e,n){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return SM.apply(null,arguments);if(Um(t))return t;var o=ry(t)?Ut.object(t,e,n):Array.isArray(t)?Ut.array(t,e):iy(t)?Ut.map(t,e):tb(t)?Ut.set(t,e):t;if(o!==t)return o;Qo(!1)}var Tk={box:function(t,e){arguments.length>2&&Ly("box");var n=pm(e);return new zv(t,h0(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&Ly("array");var n=pm(e);return KK(t,h0(n),n.name)},map:function(t,e){arguments.length>2&&Ly("map");var n=pm(e);return new TM(t,h0(n),n.name)},set:function(t,e){arguments.length>2&&Ly("set");var n=pm(e);return new nI(t,h0(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&Ly("object");var o=pm(n);if(o.proxy===!1)return kA({},t,e,o);var r=K3(o),i=kA({},void 0,void 0,o),a=XK(i);return Z3(a,t,e,r),a},ref:D3,shallow:cK,deep:SM,struct:dK},Ut=fK;Object.keys(Tk).forEach(function(t
|
|||
|
|
/*
|
|||
|
|
Tracing '`+t.name+`'
|
|||
|
|
|
|||
|
|
You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.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.
|
|||
|
|
|
|||
|
|
`+(t instanceof Bm?t.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|||
|
|
|
|||
|
|
The dependencies for this derivation are:
|
|||
|
|
|
|||
|
|
`+n.join(`
|
|||
|
|
`)+`
|
|||
|
|
*/
|
|||
|
|
`)()}}function G3(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(o){return G3(o,e,n+1)})}var A_=(function(){function t(e,n,o,r){e===void 0&&(e="Reaction@"+Hs()),r===void 0&&(r=!1),this.name=e,this.onInvalidate=n,this.errorHandler=o,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=ii.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Hs(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Wd.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,_r.pendingReactions.push(this),z3())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Kc(),this._isScheduled=!1,AA(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Zu()}catch(e){this.reportExceptionInDerivation(e)}}Zc()}},t.prototype.track=function(e){if(!this.isDisposed){Kc(),this._isRunning=!0;var n=j3(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&MA(this),zy(n)&&this.reportExceptionInDerivation(n.cause),Zc()}},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(_r.disableErrorBoundaries)throw e;var o="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";_r.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(o,e),_r.globalReactionErrorHandlers.forEach(function(r){return r(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Kc(),MA(this),Zc()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[eo]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),GK(this,e)},t})(),Nk=100,NA=function(t){return t()};function z3(){_r.inBatch>0||_r.isRunningReactions||NA(SK)}function SK(){_r.isRunningReactions=!0;for(var t=_r.pendingReactions,e=0;t.length>0;){++e===Nk&&(console.error("Reaction doesn't converge to a stable state after "+Nk+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),o=0,r=n.length;o<r;o++)n[o].runReaction()}_r.isRunningReactions=!1}var Tw=jh("Reaction",A_);function AK(t){var e=NA;NA=function(n){return t(function(){return e(n)})}}function Zu(){return!1}function MK(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function TK(){Qo(!1)}function kk(t){return function(e,n,o){if(o){if(o.value)return{value:Gv(t,o.value),enumerable:!1,configurable:!0,writable:!0};var r=o.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Gv(t,r.call(this))}}}return CK(t).apply(this,arguments)}}function CK(t){return function(e,n,o){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(r){oy(this,n,Bt(t,r))}})}}function NK(t,e,n,o){return o===!0?(ZO(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return ZO(this,e,n.value||n.initializer.call(this)),this[e]},set:TK}:{enumerable:!1,configurable:!0,set:function(r){ZO(this,e,r)},get:function(){}}}var Bt=function(e,n,o,r){if(arguments.length===1&&typeof e=="function")return Gv(e.name||"<unnamed action>",e);if(arguments.length===2&&typeof n=="function")return Gv(e,n);if(arguments.length===1&&typeof e=="string")return kk(e);if(r===!0)oy(e,n,Gv(e.name||n,o.value,this));else return kk(n).apply(null,arguments)};Bt.bound=NK;function kK(t,e){var n=typeof t=="string"?t:t.name||"<unnamed action>",o=typeof t=="function"?t:e;return F3(n,o,this,void 0)}function ZO(t,e,n){oy(t,e,Gv(e,n.bind(t)))}function PK(t,e){e===void 0&&(e=bM);var n=e&&e.name||t.name||"Autorun@"+Hs(),o=!e.scheduler&&!e.delay,r;if(o)r=new A_(n
|
|||
|
|
L`).concat(i.rightX," ").concat(i.rightY,`
|
|||
|
|
L`).concat(a.rightX," ").concat(a.rightY,`
|
|||
|
|
L`).concat(a.leftX," ").concat(a.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},bP=function(t){var e=t.start,n=t.end,o=t.sourceNode,r=t.targetNode,i=t.offset,a=mu(o),s=mu(r),l=Nw(a,i),f=Nw(s,i),h=kw(l,a,e),v=kw(f,s,n);return{sNext:h,ePre:v}},kM=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(","),n=b0(e[0]),o=b0(e[1]),r=b0(e[2]),i=b0(e[3]);return[n,o,r,i]},b0=function(t){var e=Yu(t.replace(/(^\s*)/g,"").split(" "),2),n=e[0],o=e[1];return{x:+n,y:+o}},wP=function(t,e){var n=Yu(t,4),o=n[0],r=n[1],i=n[2],a=n[3],s=WJ(o,r,i,a,e);return[s,t[3]]},yI=function(t,e){for(var n=t.x,o=t.y,r=Kv(e),i=Number.MAX_SAFE_INTEGER,a,s=[],l=0;l<r.length;l++)s.push({start:r[l],end:r[(l+1)%r.length]});if(s.forEach(function(_){var E=_.start,O=_.end;if(E.x===O.x){var w={x:E.x,y:o},S=T_(w,E,O);if(S){var M=Math.abs(E.x-n);M<i&&(i=M,a=w)}}else if(E.y===O.y){var w={x:n,y:E.y},S=T_(w,E,O);if(S){var M=Math.abs(E.y-o);M<i&&(i=M,a=w)}}}),!a){var f=s[0],h=f.start,v=f.end;a={x:h.x+(v.x-h.x)/2,y:h.y+(v.y-h.y)/2}}return a},eJ=function(t){return Vv(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},EP=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function tJ(t,e){return typeof e!="function"?function(n,o,r){return Object.assign({type:t.edgeType},r)}:function(n,o,r){var i=e(n,o,r);return i?typeof i=="string"?Object.assign({},r,{type:i}):Object.assign({type:i},r):{type:t.edgeType}}}var nJ=function(t){var e=t.rows,n=t.rowsLength,o=t.fontSize,r=0;return ri(e,function(i){var a=mI(i);r=a>r?a:r}),{width:Math.ceil(r/2)*o+o/4,height:n*(o+2)+o/4}},nm=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},w0=function(t,e,n){if(n||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))};function Wm(t,e,n){return n&&e*Math.round(t/e)||t}function rJ(t,e,n){if(!t)return[];var o=Math.min.apply(Math,w0([],nm(t.map(function(w){return w[0]})),!1)),r=Math.max.apply(Math,w0([],nm(t.map(function(w){return w[0]})),!1)),i=Math.min.apply(Math,w0([],nm(t.map(function(w){return w[1]})),!1)),a=Math.max.apply(Math,w0([],nm(t.map(function(w){return w[1]})),!1)),s=-o,l=-i,f=t.map(function(w){var S=nm(w,2),M=S[0],T=S[1];return[M+s,T+l]}),h=r-o,v=a-i,_=e?e/h:1,E=n?n/v:1,O=Math.min(_,E);return f.map(function(w){var S=nm(w,2),M=S[0],T=S[1];return[M*O,T*O]})}var eS=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},tS=function(t,e,n){var o=eS(t,2),r=o[0],i=o[1],a=eS(e,2),s=a[0],l=a[1],f=eS(n,2),h=f[0],v=f[1];return r>s&&r<h&&i>l&&i<v},_I=function(t,e){var n=e.multipleSelectKey,o=!1;switch(n){case"meta":o=t.metaKey;break;case"alt":o=t.altKey;break;case"shift":o=t.shiftKey;break;case"ctrl":o=t.ctrlKey;break;default:o=!1;break}return o},PM=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})();function xP(t,e){return t instanceof Il&&e instanceof Il}var bI=(function(t){PM(e,t);function e(n,o,r){var i=t.call(this,3)||this;return i[0]=n,i[1]=o,i[2]=r,i.x=n,i.y=o,i.z=r,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.add=function(n){if(xP(this,n)
|
|||
|
|
C `).concat(i.x," ").concat(i.y,`,
|
|||
|
|
`).concat(a.x," ").concat(a.y,`,
|
|||
|
|
`).concat(s.x," ").concat(s.y)},e.prototype.initPoints=function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=this.getControls(),o=n.sNext,r=n.ePre;this.updatePath(o,r)},e.prototype.updatePath=function(n,o){n=to(n),o=to(o);var r={x:this.startPoint.x,y:this.startPoint.y},i={x:this.endPoint.x,y:this.endPoint.y};if(!n||!o){var a=this.getControls();n=a.sNext,o=a.ePre}this.pointsList=[r,n,o,i],this.path=this.getPath(this.pointsList)},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,o){this.startPoint.x+=n,this.startPoint.y+=o;var r=rS(this.pointsList,3),i=r[1],a=r[2];i.x+=n,i.y+=o,this.updatePath(i,a)},e.prototype.moveEndPoint=function(n,o){this.endPoint.x+=n,this.endPoint.y+=o;var r=rS(this.pointsList,3),i=r[1],a=r[2];a.x+=n,a.y+=o,this.updatePath(i,a)},e.prototype.updateAdjustAnchor=function(n,o){var r;o==="sNext"?this.pointsList[1]=n:o==="ePre"&&(this.pointsList[2]=n),this.path=this.getPath(this.pointsList),!((r=this.text)===null||r===void 0)&&r.value&&this.setText(Xo({},this.text,this.textPosition))},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var o=n.startPoint,r=n.endPoint,i=n.sourceNode,a=n.targetNode,s=bP({start:o,end:r,sourceNode:i,targetNode:a,offset:this.offset}),l=s.sNext,f=s.ePre;this.pointsList=[o,l,f,r],this.initPoints()},Uu([Ut],e.prototype,"offset",void 0),Uu([Ut],e.prototype,"path",void 0),Uu([Bt],e.prototype,"initPoints",null),Uu([Bt],e.prototype,"updatePoints",null),Uu([Bt],e.prototype,"updateStartPoint",null),Uu([Bt],e.prototype,"updateEndPoint",null),Uu([Bt],e.prototype,"moveStartPoint",null),Uu([Bt],e.prototype,"moveEndPoint",null),Uu([Bt],e.prototype,"updateAdjustAnchor",null),Uu([Bt],e.prototype,"getAdjustStart",null),Uu([Bt],e.prototype,"getAdjustEnd",null),Uu([Bt],e.prototype,"updateAfterAdjustStartAndEnd",null),e})(K1),cQ=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),n_=function(){return n_=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},n_.apply(this,arguments)},PP=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},dQ=function(t,e,n){if(n||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))},RP=(function(t){cQ(e,t);function e(){var n=t.apply(this,dQ([],PP(arguments),!1))||this;return n.modelType=bo.LINE_EDGE,n}return e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.line,o=t.prototype.getEdgeStyle.call(this),r=this.properties.style,i=r===void 0?{}:r;return n_(n_(n_({},o),to(n)),to(i))},e.prototype.initEdgeData=function(n){t.prototype.initEdgeData.call(this,n),this.points=this.getPath([this.startPoint,this.endPoint])},e.prototype.getPath=function(n){var o=PP(n,2),r=o[0],i=o[1];return"".concat(r.x,",").concat(r.y," ").concat(i.x,",").concat(i.y)},e.prototype.getTextPosition=function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPo
|
|||
|
|
Copyright (c) 2018 Jed Watson.
|
|||
|
|
Licensed under the MIT License (MIT), see
|
|||
|
|
http://jedwatson.github.io/classnames
|
|||
|
|
*/var BP;function vee(){return BP||(BP=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=r(i,o(s)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)e.call(i,s)&&i[s]&&(a=r(a,s));return a}function r(i,a){return a?i?i+" "+a:i+a:i}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(aS)),aS.exports}var gee=vee();const JA=Z_(gee);var mee=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),QA=function(){return QA=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},QA.apply(this,arguments)},yee=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},CI=(function(t){mee(e,t);function e(n){var o=t.call(this)||this;o.mouseDownHandler=function(i){var a=o.props,s=a.draggable,l=a.model,f=a.graphModel,h=f.editConfigModel.nodeTextDraggable;(s??h)&&(i.stopPropagation(),o.stepperDrag.model=l,o.stepperDrag.handleMouseDown(i))},o.onDragging=function(i){var a=i.deltaX,s=i.deltaY,l=o.props,f=l.model,h=l.graphModel.transformModel;if(a||s){var v=yee(h.fixDeltaXY(a,s),2),_=v[0],E=v[1];f.moveText(_,E)}},o.dbClickHandler=function(){var i=o.props,a=i.editable,s=i.graphModel.eventCenter,l=i.model;a&&l.setElementState(Wo.TEXT_EDIT),s.emit(hr.TEXT_DBCLICK,{data:l.text,model:l})};var r=n.draggable;return o.stepperDrag=new ac({onDragging:o.onDragging,step:1,eventType:"TEXT",isStopPropagation:r}),o}return e.prototype.getShape=function(){var n=this.props,o=n.model,r=n.graphModel,i=r.editConfigModel,a=o.text,s=a.value,l=a.x,f=a.y,h=a.editable,v=a.draggable,_={x:l,y:f,className:"",value:s},E=o.getTextStyle(),O=i.nodeTextDraggable||v;return $t(xI,QA({},_,E,{className:JA({"lf-element-text":h,"lf-text-draggable":!h&&O,"lf-text-disabled":!h&&!O}),model:o}))},e.prototype.render=function(){var n=this.props.model.text;if(n)return $t("g",{onMouseDown:this.mouseDownHandler,onDblClick:this.dbClickHandler,children:this.getShape()})},e})(ko),_ee=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),Wc=function(){return Wc=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},Wc.apply(this,arguments)},C0=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},bee=(function(t){_ee(e,t);function e(n){var o=t.call(this,n)||this;return o.setHoverOn=function(){o.setState({isHovered:!0})},o.setHoverOff=function(){o.setState({isHovered:!1})},o.state={isHovered:!1},o}return
|
|||
|
|
L`).concat(s.rightX," ").concat(s.rightY,`
|
|||
|
|
L`).concat(l.rightX," ").concat(l.rightY,`
|
|||
|
|
L`).concat(l.leftX," ").concat(l.leftY," z")}return{d:i,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},e.prototype.getAppendShape=function(n){var o=this.getAppendAttributes(n),r=o.d,i=o.strokeWidth,a=o.fill,s=o.strokeDasharray,l=o.stroke;return $t(P_,{d:r,fill:a,strokeWidth:i,stroke:l,strokeDasharray:s})},e.prototype.getAppendWidth=function(){for(var n=this,o=this.props,r=o.model,i=o.graphModel,a=r.pointsList,s=r.draggable,l=[],f=a.length,h=function(E){var O="lf-polyline-append",w={start:{x:a[E].x,y:a[E].y},end:{x:a[E+1].x,y:a[E+1].y},startIndex:E,endIndex:E+1,direction:ni.HORIZONTAL,draggable:!0},S=$t("g",{className:O,children:v.getAppendShape(w)}),M=i.editConfigModel,T=M.adjustEdge,B=M.adjustEdgeMiddle;if(T&&s){var R=w.startIndex,P=w.endIndex,$=B&&(R===0||P===f-1);w.draggable=!$,w.start.x===w.end.x?(w.draggable&&(O+="-ew-resize"),w.direction=ni.VERTICAL):w.start.y===w.end.y&&(w.draggable&&(O+="-ns-resize"),w.direction=ni.HORIZONTAL),S=$t("g",{className:v.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(I){return n.beforeDragStart(I,w)},children:$t("g",{className:O,children:v.getAppendShape(w)})})}l.push(S)},v=this,_=0;_<f-1;_++)h(_);return $t("g",{children:l})},e})(Z1),wm=function(){return wm=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},wm.apply(this,arguments)},Wee=(function(){function t(e){var n=this;this.nodeConfig=null,this.fakeNode=null,this.stopDrag=function(){n.nodeConfig=null,window.document.removeEventListener("mouseup",n.stopDrag)},this.dragEnter=function(r){!n.nodeConfig||n.fakeNode||(n.fakeNode=n.lf.createFakeNode(wm(wm({},n.nodeConfig),n.clientToLocalPoint({x:r.clientX,y:r.clientY}))))},this.onDragOver=function(r){if(n.lf.graphModel.eventCenter.emit(hr.BLANK_CANVAS_MOUSEMOVE,{e:r}),r.preventDefault(),n.fakeNode){var i=n.clientToLocalPoint({x:r.clientX,y:r.clientY}),a=i.x,s=i.y;n.fakeNode.moveTo(a,s);var l=n.fakeNode.getData();n.lf.setNodeSnapLine(l),n.lf.graphModel.eventCenter.emit(hr.NODE_DND_DRAG,{data:l,e:r})}return!1},this.onDragLeave=function(){n.fakeNode&&(n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)},this.onDrop=function(r){!n.lf.graphModel||!r||!n.nodeConfig||(n.lf.addNode(wm(wm({},n.nodeConfig),n.clientToLocalPoint({x:r.clientX,y:r.clientY})),hr.NODE_DND_ADD,r),r.preventDefault(),r.stopPropagation(),n.nodeConfig=null,n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)};var o=e.lf;this.lf=o}return t.prototype.clientToLocalPoint=function(e){var n=e.x,o=e.y,r=og(this.lf.options,["grid","size"]),i=this.lf.graphModel.getPointByClient({x:n,y:o}),a=i.canvasOverlayPosition,s=a.x,l=a.y,f=this.lf.graphModel.editConfigModel.snapGrid;return{x:Wm(s,r,f),y:Wm(l,r,f)}},t.prototype.startDrag=function(e){var n=this.lf.graphModel.editConfigModel;n!=null&&n.isSilentMode||(this.nodeConfig=e,window.document.addEventListener("mouseup",this.stopDrag))},t.prototype.eventMap=function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}},t})();function Gee(t,e){t.on("node:mousemove",function(n){var o=n.data;e.setNodeSnapLine(o)}),t.on("node:mouseup",function(){e.clearSnapline()})}var zee=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),np=function(){return np=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},np.apply(this,arguments)},Hee=function(t,e,n,o){var r=arguments.length,i=r<3
|
|||
|
|
`;function Z0(t,e,n){var o=yte(n);if(t!==0&&t!==!1&&!t)return Tv+o+"<".concat(e," />");var r="";if(e==="#text")return Tv+o+Jw(String(t));if(e==="#cdata-section")return Tv+o+"<![CDATA["+t+"]]>";if(e==="#comment")return Tv+o+"<!--"+t+"-->";if("".concat(e).charAt(0)==="-")return" "+e.substring(1)+'="'+_te(t)+'"';if(Array.isArray(t))t.forEach(function(l){r+=Z0(l,e,n+1)});else if(FI(t)==="[object Object]"){var i=Object.keys(t),a="",s="";r+=(n===0?"":Tv+o)+"<"+e,i.forEach(function(l){l.charAt(0)==="-"?a+=Z0(t[l],l,n+1):s+=Z0(t[l],l,n+1)}),r+=a+(s!==""?">".concat(s).concat(Tv+o,"</").concat(e,">"):" />")}else r+=Tv+o+"<".concat(e,">").concat(Jw(String(t)),"</").concat(e,">");return r}function bte(t){var e="";for(var n in t)e+=Z0(t[n],n,0);return e}var As=function(){};As.ObjTree=function(){return this};As.ObjTree.VERSION="0.23";As.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
|||
|
|
`;As.ObjTree.prototype.attr_prefix="-";As.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,o=n.parseFromString(t,"application/xml");if(!o)return;e=o.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(e)return this.parseDOM(e)};As.ObjTree.prototype.parseHTTP=function(t,e,n){var o={};for(var r in e)o[r]=e[r];if(o.method||(typeof o.postBody>"u"&&typeof o.postbody>"u"&&typeof o.parameters>"u"?o.method="get":o.method="post"),n){o.asynchronous=!0;var i=this,a=n,s=o.onComplete;o.onComplete=function(h){var v;h&&h.responseXML&&h.responseXML.documentElement&&(v=i.parseDOM(h.responseXML.documentElement)),a(v,h),s&&s(h)}}else o.asynchronous=!1;var l;if(typeof HTTP<"u"&&HTTP.Request){o.uri=t;var f=new HTTP.Request(o);f&&(l=f.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var f=new Ajax.Request(t,o);f&&(l=f.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};As.ObjTree.prototype.parseDOM=function(t){if(t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!=11){var o={};o[t.nodeName]=n,n=o}return n}};As.ObjTree.prototype.parseElement=function(t){if(t.nodeType!=7){if(t.nodeType==3||t.nodeType==4||t.nodeType==8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,o={};if(t.attributes&&t.attributes.length){n={};for(var r=0;r<t.attributes.length;r++){var i=t.attributes[r].nodeName;if(typeof i=="string"){var a=t.attributes[r].nodeValue;try{a=JSON.parse(t.attributes[r].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[r].nodeValue}a&&(i=this.attr_prefix+i,typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}if(t.childNodes&&t.childNodes.length){var s=!0;n&&(s=!1);for(var r=0;r<t.childNodes.length&&s;r++){var l=t.childNodes[r].nodeType;l==3||l==4||l==8||(s=!1)}if(s){n||(n="");for(var r=0;r<t.childNodes.length;r++)n+=t.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<t.childNodes.length;r++){var i=t.childNodes[r].nodeName;if(typeof i=="string"){var a=this.parseElement(t.childNodes[r]);a&&(typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}}else n===null&&(n={});return n}};As.ObjTree.prototype.addNode=function(t,e,n,o){this.__force_array[e]?(n==1&&(t[e]=[]),t[e][t[e].length]=o):n==1?t[e]=o:n==2?t[e]=[t[e],o]:t[e][t[e].length]=o};As.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};As.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],o=[];for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];r.charAt(0)!=this.attr_prefix?typeof i>"u"||i==null?n[n.length]="<"+r+" />":typeof i=="object"&&i.constructor==Array?n[n.length]=this.array_to_xml(r,i):typeof i=="object"?n[n.length]=this.hash_to_xml(r,i):n[n.length]=this.scalar_to_xml(r,i):o[o.length]=" "+r.substring(1)+'="'+this.xml_escape(i)+'"'}var a=o.join(""),s=n.join("");return typeof t>"u"||t==null||(n.length>0?s.match(/\n/)?s="<"+t+a+`>
|
|||
|
|
`+s+"</"+t+`>
|
|||
|
|
`:s="<"+t+a+">"+s+"</"+t+`>
|
|||
|
|
`:s="<"+t+a+` />
|
|||
|
|
`),s};As.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],o=0;o<e.length;o++){var r=e[o];typeof r>"u"||r==null?n[n.length]="<"+t+" />":typeof r=="object"&&r.constructor==Array?n[n.length]=this.array_to_xml(t,r):typeof r=="object"?n[n.length]=this.hash_to_xml(t,r):n[n.length]=this.scalar_to_xml(t,r)}return n.join("")};As.ObjTree.prototype.scalar_to_xml=function(t,e){return t=="#text"?this.xml_escape(e):"<"+t+">"+this.xml_escape(e)+"</"+t+`>
|
|||
|
|
`};As.ObjTree.prototype.xml_escape=Jw;var wte=function(t){return new As.ObjTree().parseXML(t)},Ete=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),p2=function(){return p2=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},p2.apply(this,arguments)},J1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Xd;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow"})(Xd||(Xd={}));var BI=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],KP=["properties","startPoint","endPoint","pointsList"],$I=function(t){return String(t||"").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")};function ZP(t){var e=t?KP.concat(t):KP;return function(n){function o(r){var i={};return typeof r=="string"?r:Array.isArray(r)?r.map(function(a){return o(a)}):(Object.entries(r).forEach(function(a){var s=J1(a,2),l=s[0],f=s[1];typeof f!="object"?l.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(l)?i[l]=f:i["-".concat(l)]=f:e.includes(l)?i["-".concat(l)]=o(f):i[l]=o(f)}),i)}return o(n)}}function Qw(t){var e={};return Object.entries(t).forEach(function(n){var o=J1(n,2),r=o[0],i=o[1];r.indexOf("-")===0?e[r.substring(1)]=Zw(i):typeof i=="string"?e[r]=i:Object.prototype.toString.call(i)==="[object Object]"?e[r]=Qw(i):Array.isArray(i)?e[r]=i.map(function(a){return Qw(a)}):e[r]=i}),e}function xte(t,e,n){var o=new Map;e.nodes.forEach(function(i){var a,s={"-id":i.id};if(!((a=i.text)===null||a===void 0)&&a.value&&(s["-name"]=i.text.value),i.properties){var l=ZP(n)(i.properties);Object.assign(s,l)}o.set(i.id,s),t[i.type]?Array.isArray(t[i.type])?t[i.type].push(s):t[i.type]=[t[i.type],s]:t[i.type]=s});var r=e.edges.map(function(i){var a,s,l=o.get(i.targetNodeId);l["bpmn:incoming"]?Array.isArray(l["bpmn:incoming"])?l["bpmn:incoming"].push(i.id):l["bpmn:incoming"]=[l["bpmn:incoming"],i.id]:l["bpmn:incoming"]=i.id;var f={"-id":i.id,"-sourceRef":i.sourceNodeId,"-targetRef":i.targetNodeId};if(!((a=i.text)===null||a===void 0)&&a.value&&(f["-name"]=(s=i.text)===null||s===void 0?void 0:s.value),i.properties){var h=ZP(n)(i.properties);Object.assign(f,h)}return f});e.edges.forEach(function(i){var a=o.get(i.sourceNodeId);a["bpmn:outgoing"]?Array.isArray(a["bpmn:outgoing"])?a["bpmn:outgoing"].push(i.id):a["bpmn:outgoing"]=[a["bpmn:outgoing"],i.id]:a["bpmn:outgoing"]=i.id}),t[Xd.FLOW]=r}function Ote(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var o,r=n.id,i=n.pointsList.map(function(s){var l=s.x,f=s.y;return{"-x":l,"-y":f}}),a={"-id":"".concat(r,"_di"),"-bpmnElement":r,"di:waypoint":i};return!((o=n.text)===null||o===void 0)&&o.value&&(a["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var o,r=n.id,i=100,a=80,s=n.x,l=n.y,f=Fh.shapeConfigMap.get(n.type);f&&(i=f.width,a=f.height),s-=i/2,l-=a/2;var h={"-id":"".concat(r,"_di"),"-bpmnElement":r,"dc:Bounds":{"-x":s,"-y":l,"-width":i,"-height":a}};return!((o=n.text)===null||o===void 0)&&o.value&&(h["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}})
|
|||
|
|
`).forEach(function(E){i<E.length&&(i=E.length)}),r)n={value:o,x:Number(r["-x"])+i*10/2,y:Number(r["-y"])+7};else{var a=t["di:waypoint"]||[],s=a[0],l=a[a.length-1]||s,f=(Number((s==null?void 0:s["-x"])||0)+Number((l==null?void 0:l["-x"])||0))/2,h=(Number((s==null?void 0:s["-y"])||0)+Number((l==null?void 0:l["-y"])||0))/2;n={value:o,x:f,y:h}}}var v;Object.entries(e).forEach(function(E){var O=J1(E,2),w=O[0],S=O[1];BI.indexOf(w)===-1&&(v||(v={}),v[w]=S)}),v&&(v=Qw(v));var _={id:e["-id"],type:Xd.FLOW,pointsList:t["di:waypoint"].map(function(E){return{x:Number(E["-x"]),y:Number(E["-y"])}}),sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:v};return n&&(_.text=n),_}var Fh=(function(){function t(e){var n=e.lf,o=this;this.adapterOut=function(r,i){var a=p2({},o.processAttributes);xte(a,r,i);var s={"-id":"BPMNPlane_1","-bpmnElement":a["-id"]};Ote(s,r);var l=o.definitionAttributes;l["bpmn:process"]=a,l["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":s};var f={"bpmn:definitions":l};return f},this.adapterIn=function(r){if(r)return Ste(r)},n.adapterIn=function(r){return o.adapterIn(r)},n.adapterOut=function(r,i){return o.adapterOut(r,i)},this.processAttributes={"-isExecutable":"true","-id":"Process_".concat(qP())},this.definitionAttributes={"-id":"Definitions_".concat(qP()),"-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 t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t})();Fh.shapeConfigMap.set(Xd.START,{width:_k.width,height:_k.height});Fh.shapeConfigMap.set(Xd.END,{width:bk.width,height:bk.height});Fh.shapeConfigMap.set(Xd.GATEWAY,{width:wk.width,height:wk.height});Fh.shapeConfigMap.set(Xd.SYSTEM,{width:Ek.width,height:Ek.height});Fh.shapeConfigMap.set(Xd.USER,{width:xk.width,height:xk.height});(function(t){Ete(e,t);function e(n){var o=t.call(this,n)||this;o.adapterXmlIn=function(i){var a=typeof i=="string"?o.sanitizeNameAttributes(i):i,s=wte(a);return o.adapterIn(s)},o.adapterXmlOut=function(i,a){var s=o.adapterOut(i,a);return bte(s)};var r=n.lf;return r.adapterIn=o.adapterXmlIn,r.adapterOut=o.adapterXmlOut,o}return e.prototype.sanitizeNameAttributes=function(n){return n.replace(/name="([^"]*)"/g,function(o,r){var i=r.replace(/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">");return'name="'.concat(i,'"')})},e.pluginName="bpmnXmlAdapter",e})(Fh);var Tte=(function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){var e="xxxxxxx".replace(/[x]/g,function(n){var o=Math.random()*16|0,r=n==="x"?o:o&3|8;return r.toString(16)});return e},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t})(),Cte=(globalThis==null?void 0:globalThis._ids)||new Tte;function Nte(){return Cte.next()}Lr("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),Lr("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;"}),Lr("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;"}),Lr("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;"}),Lr("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;"}),Lr("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rot
|
|||
|
|
`;function J0(t,e,n){var o=fR(n),r="",i=pR+o;if(e==="-json")return"";if(e==="#text")return i+o1(String(t));if(e==="#cdata-section")return"".concat(i,"<![CDATA[").concat(t,"]]>");if(e==="#comment")return"".concat(i,"<!--").concat(t,"-->");if(t!==0&&t!==!1&&!t)return"".concat(i,"<").concat(e," />");if("".concat(e).charAt(0)==="-")return" ".concat(e.substring(1),'="').concat(Vte(t),'"');if(Array.isArray(t))r+=t.map(function(f){return J0(f,e,n+1)}).join("");else if(XI(t)==="[object Object]"){var a=Object.keys(t),s="",l=t["-json"]?pR+fR(n+1)+t["-json"]:"";r+="".concat(n===0?"":i,"<").concat(e),a.forEach(function(f){f.charAt(0)==="-"?s+=J0(t[f],f,n+1):l+=J0(t[f],f,n+1)}),r+=s+(l!==""?">".concat(l).concat(i,"</").concat(e,">"):" />")}else r+="".concat(i,"<").concat(e,">").concat(o1(String(t)),"</").concat(e,">");return r}function Wte(t){var e="";for(var n in t)e+=J0(t[n],n,0);return e}var Ms=function(){};Ms.ObjTree=function(){return this};Ms.ObjTree.VERSION="0.23";Ms.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
|||
|
|
`;Ms.ObjTree.prototype.attr_prefix="-";Ms.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,o=n.parseFromString(t,"application/xml");if(!o)return;e=o.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(e){var r=this.parseDOM(e);return r}};Ms.ObjTree.prototype.parseHTTP=function(t,e,n){var o={};for(var r in e)o[r]=e[r];if(o.method||(typeof o.postBody>"u"&&typeof o.postbody>"u"&&typeof o.parameters>"u"?o.method="get":o.method="post"),n){o.asynchronous=!0;var i=this,a=n,s=o.onComplete;o.onComplete=function(h){var v;h&&h.responseXML&&h.responseXML.documentElement&&(v=i.parseDOM(h.responseXML.documentElement)),a(v,h),s&&s(h)}}else o.asynchronous=!1;var l;if(typeof HTTP<"u"&&HTTP.Request){o.uri=t;var f=new HTTP.Request(o);f&&(l=f.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var f=new Ajax.Request(t,o);f&&(l=f.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};Ms.ObjTree.prototype.parseDOM=function(t){if(t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!==11){var o={};o[t.nodeName]=n,n=o}return n}};Ms.ObjTree.prototype.parseElement=function(t){if(t.nodeType!==7){if(t.nodeType===3||t.nodeType===4||t.nodeType===8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,o={};if(t.attributes&&t.attributes.length){n={};for(var r=0;r<t.attributes.length;r++){var i=t.attributes[r].nodeName;if(typeof i=="string"){var a=t.attributes[r].nodeValue;try{a=JSON.parse(t.attributes[r].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[r].nodeValue}a!=null&&(i=this.attr_prefix+i,typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}if(t.childNodes&&t.childNodes.length){var s=!0;n&&(s=!1);for(var r=0;r<t.childNodes.length&&s;r++){var l=t.childNodes[r].nodeType;l===3||l===4||l===8||(s=!1)}if(s){n||(n="");for(var r=0;r<t.childNodes.length;r++)n+=t.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<t.childNodes.length;r++){var i=t.childNodes[r].nodeName;if(typeof i=="string"){var a=this.parseElement(t.childNodes[r]);a&&(typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}}else n===null&&(n={});return n}};Ms.ObjTree.prototype.addNode=function(t,e,n,o){this.__force_array[e]?(n===1&&(t[e]=[]),t[e][t[e].length]=o):n===1?t[e]=o:n===2?t[e]=[t[e],o]:t[e][t[e].length]=o};Ms.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};Ms.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],o=[];for(var r in e)if(hw(e,r)){var i=e[r];r.charAt(0)!==this.attr_prefix?typeof i>"u"||i==null?n[n.length]="<".concat(r," />"):typeof i=="object"&&i.constructor===Array?n[n.length]=this.array_to_xml(r,i):typeof i=="object"?n[n.length]=this.hash_to_xml(r,i):n[n.length]=this.scalar_to_xml(r,i):o[o.length]=" ".concat(r.substring(1),'="').concat(this.xml_escape(i),'"')}var a=o.join(""),s=n.join("");return typeof t>"u"||t==null||(n.length>0?s.match(/\n/)?s="<".concat(t).concat(a,`>
|
|||
|
|
`).concat(s,"</").concat(t,`>
|
|||
|
|
`):s="<".concat(t).concat(a,">").concat(s,"</").concat(t,`>
|
|||
|
|
`):s="<".concat(t).concat(a,` />
|
|||
|
|
`)),s};Ms.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],o=0;o<e.length;o++){var r=e[o];typeof r>"u"||r==null?n[n.length]="<".concat(t," />"):typeof r=="object"&&r.constructor===Array?n[n.length]=this.array_to_xml(t,r):typeof r=="object"?n[n.length]=this.hash_to_xml(t,r):n[n.length]=this.scalar_to_xml(t,r)}return n.join("")};Ms.ObjTree.prototype.scalar_to_xml=function(t,e){return t==="#text"?this.xml_escape(e):"<".concat(t,">").concat(this.xml_escape(e),"</").concat(t,`>
|
|||
|
|
`)};Ms.ObjTree.prototype.xml_escape=o1;var Gte=function(t){return new Ms.ObjTree().parseXML(t)},zte=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),v2=function(){return v2=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},v2.apply(this,arguments)},hR=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},jM=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Zl=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Xc=function(t,e,n){if(n||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))},Os;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",t.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",t.BOUNDARY="bpmn:boundaryEvent",t.PARALLEL_GATEWAY="bpmn:parallelGateway",t.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",t.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow",t.SUBPROCESS="bpmn:subProcess"})(Os||(Os={}));var YI=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],Hte=["properties","startPoint","endPoint","pointsList"],i1={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},qI=function(t,e){var n=Object.keys(e||{});return n.forEach(function(o){if(t[o]){var r=e[o],i=r.in,a=r.out;i&&(t[o].in=i),a&&(t[o].out=a)}else t[o]=e[o]}),t},Xu={"bpmn:startEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Xu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateCatchEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Xu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateThrowEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Xu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:boundaryEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Xu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:sequenceFlow":{out:function(t){var e=t.properties,n=e.expressionType,o=e.condition;return o?n==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${'.concat(o,"}]]></bpmn:conditionExpression>")}:{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression">'.concat(o,"</bpmn:conditionExpression>")}:{json:""}}},"bpmn:timerEventDefinition":{out:function(t){var e=t.properties,n=e.timerType,o=e.timerValue,r=e.definitionId,i=function(){return"<bpmn:".c
|
|||
|
|
`).forEach(function(f){i<f.length&&(i=f.length)}),n={value:o,x:Number(r["-x"])+i*10/2,y:Number(r["-y"])+7}}var a={};Object.entries(e).forEach(function(f){var h=Zl(f,2),v=h[0],_=h[1];YI.includes(v)||(a[v]=_)}),a=a1(a);var s=t["di:waypoint"].map(function(f){return{x:Number(f["-x"]),y:Number(f["-y"])}}),l={id:e["-id"],type:Os.FLOW,pointsList:s,sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:a};return n&&(l.text=n),l}var qs=(function(){function t(e){var n=e.lf,o=this;this.adapterOut=function(r,i){var a,s,l=v2({},o.processAttributes);Yte(l,r,i);var f={"-id":"BPMNPlane_1","-bpmnElement":l["-id"]};qte(f,r);var h=o.definitionAttributes;h["bpmn:process"]=l,h["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":f};var v={"bpmn:definitions":h};if(!((a=i==null?void 0:i.mapping)===null||a===void 0)&&a.out){var _=(s=i==null?void 0:i.mapping)===null||s===void 0?void 0:s.out,E=function(O){Array.isArray(O)&&O.forEach(function(w){return E(w)}),typeof O=="object"&&Object.keys(O).forEach(function(w){var S;(S=_[w])?(O[S]=me.cloneDeep(O[w]),delete O[w],E(O[S])):E(O[w])})};E(v)}return v},this.adapterIn=function(r,i){if(r)return Zte(r,i)},n.adapterIn=this.adapterIn,n.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 t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t})();qs.shapeConfigMap.set(Os.START,{width:rR.width,height:rR.height});qs.shapeConfigMap.set(Os.END,{width:oR.width,height:oR.height});qs.shapeConfigMap.set(Os.INTERMEDIATE_CATCH,{width:n1.width,height:n1.height});qs.shapeConfigMap.set(Os.INTERMEDIATE_THROW,{width:n1.width,height:n1.height});qs.shapeConfigMap.set(Os.BOUNDARY,{width:iR.width,height:iR.height});qs.shapeConfigMap.set(Os.PARALLEL_GATEWAY,{width:aR.width,height:aR.height});qs.shapeConfigMap.set(Os.INCLUSIVE_GATEWAY,{width:lR.width,height:lR.height});qs.shapeConfigMap.set(Os.EXCLUSIVE_GATEWAY,{width:sR.width,height:sR.height});qs.shapeConfigMap.set(Os.SYSTEM,{width:uR.width,height:uR.height});qs.shapeConfigMap.set(Os.USER,{width:cR.width,height:cR.height});qs.shapeConfigMap.set(Os.SUBPROCESS,{width:dR.width,height:dR.height});(function(t){zte(e,t);function e(n){var o=t.call(this,n)||this;o.adapterXmlIn=function(a){var s=Gte(a);return o.adapterIn(s,o.props)},o.adapterXmlOut=function(a){var s=o.adapterOut(a,o.props);return Wte(s)};var r=n.lf,i=n.props;return r.adapterIn=o.adapterXmlIn,r.adapterOut=o.adapterXmlOut,o.props=i,o}return e.pluginName="BPMNAdapter",e})(qs);function ene(t,e,n){var o=e.x,r=e.y,i=t.x,a=t.y,s=i-o,l=a-r,f=s*Math.cos(n)-l*Math.sin(n),h=s*Math.sin(n)+l*Math.cos(n),v=f+o,_=h+r;return{x:v,y:_}}var tne=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),l1=function(){return l1=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},l1.apply(this,arguments)},nne=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.er
|
|||
|
|
`,"\r"," "," "," "," "," ","\u2028","\u2029"],o="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",r="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+o+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+o+"))",i=new RegExp("^("+o+")$","i"),a=new RegExp(r,"gi");function s(f){return!e.util.getClosestTag(f,"a")}var l=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var f=0,h=0;h<this.window._mediumEditors.length;h++){var v=this.window._mediumEditors[h];v!==null&&v.getExtensionByName("autoLink")!==void 0&&f++}return f===1},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(f,h){this.performLinking(h)},onKeypress:function(f){this.disableEventHandling||e.util.isKey(f,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout((function(){try{var h=this.base.exportSelection();this.performLinking(f.target)&&this.base.importSelection(h,!0)}catch(v){window.console&&window.console.error("Failed to perform linking",v),this.disableEventHandling=!0}}).bind(this),0))},performLinking:function(f){var h=e.util.splitByBlockElements(f),v=!1;h.length===0&&(h=[f]);for(var _=0;_<h.length;_++)v=this.removeObsoleteAutoLinkSpans(h[_])||v,v=this.performLinkingWithinElement(h[_])||v;return this.base.events.updateInput(f,{target:f,currentTarget:f}),v},removeObsoleteAutoLinkSpans:function(f){if(!f||f.nodeType===3)return!1;for(var h=f.querySelectorAll('span[data-auto-link="true"]'),v=!1,_=0;_<h.length;_++){var E=h[_].textContent;if(E.indexOf("://")===-1&&(E=e.util.ensureUrlHasProtocol(E)),h[_].getAttribute("data-href")!==E&&s(h[_])){v=!0;var O=E.replace(/\s+$/,"");if(h[_].getAttribute("data-href")===O){var w=E.length-O.length,S=e.util.splitOffDOMTree(h[_],this.splitTextBeforeEnd(h[_],w));h[_].parentNode.insertBefore(S,h[_].nextSibling)}else e.util.unwrap(h[_],this.document)}}return v},splitTextBeforeEnd:function(f,h){for(var v=this.document.createTreeWalker(f,NodeFilter.SHOW_TEXT,null,!1),_=!0;_;)_=v.lastChild()!==null;for(var E,O,w;h>0&&w!==null;)E=v.currentNode,O=E.nodeValue,O.length>h?(w=E.splitText(O.length-h),h=0):(w=v.previousNode(),h-=O.length);return w},performLinkingWithinElement:function(f){for(var h=this.findLinkableText(f),v=!1,_=0;_<h.length;_++){var E=e.util.findOrCreateMatchingTextNodes(this.document,f,h[_]);this.shouldNotLink(E)||this.createAutoLink(E,h[_].href)}return v},shouldNotLink:function(f){for(var h=!1,v=0;v<f.length&&h===!1;v++)h=!!e.util.traverseUp(f[v],function(_){return _.nodeName.toLowerCase()==="a"||_.getAttribute&&_.getAttribute("data-auto-link")==="true"});return h},findLinkableText:function(f){for(var h=f.textContent,v=null,_=[];(v=a.exec(h))!==null;){var E=!0,O=v.index+v[0].length;E=(v.index===0||n.indexOf(h[v.index-1])!==-1)&&(O===h.length||n.indexOf(h[O])!==-1),E=E&&(v[0].indexOf("/")!==-1||i.test(v[0].split(".").po
|
|||
|
|
* vanilla-picker v2.12.3
|
|||
|
|
* https://vanilla-picker.js.org
|
|||
|
|
*
|
|||
|
|
* Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
|
|||
|
|
* Released under the ISC license.
|
|||
|
|
*/var LM=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},IM=(function(){function t(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}})(),j0=(function(){function t(e,n){var o=[],r=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(o.push(l.value),!(n&&o.length===n));r=!0);}catch(f){i=!0,a=f}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return o}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})();String.prototype.startsWith=String.prototype.startsWith||function(t){return this.indexOf(t)===0};String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var yne={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function _R(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var _ne=(function(){function t(e,n,o,r){LM(this,t);var i=this;function a(l){if(l.startsWith("hsl")){var f=l.match(/([\-\d\.e]+)/g).map(Number),h=j0(f,4),v=h[0],_=h[1],E=h[2],O=h[3];O===void 0&&(O=1),v/=360,_/=100,E/=100,i.hsla=[v,_,E,O]}else if(l.startsWith("rgb")){var w=l.match(/([\-\d\.e]+)/g).map(Number),S=j0(w,4),M=S[0],T=S[1],B=S[2],R=S[3];R===void 0&&(R=1),i.rgba=[M,T,B,R]}else l.startsWith("#")?i.rgba=t.hexToRgb(l):i.rgba=t.nameToRgb(l)||t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(o===void 0){var s=e&&""+e;s&&a(s.toLowerCase())}else this.rgba=[e,n,o,r===void 0?1:r]}return IM(t,[{key:"printRGB",value:function(n){var o=n?this.rgba:this.rgba.slice(0,3),r=o.map(function(i,a){return _R(i,a===3?3:0)});return n?"rgba("+r+")":"rgb("+r+")"}},{key:"printHSL",value:function(n){var o=[360,100,100,1],r=["","%","%",""],i=n?this.hsla:this.hsla.slice(0,3),a=i.map(function(s,l){return _R(s*o[l],l===3?3:1)+r[l]});return n?"hsla("+a+")":"hsl("+a+")"}},{key:"printHex",value:function(n){var o=this.hex;return n?o:o.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){n.length
|
|||
|
|
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,xne=360,KI="keydown",L0="mousedown",mS="focusin";function Dd(t,e){return(e||document).querySelector(t)}function One(t){t.preventDefault(),t.stopPropagation()}function yS(t,e,n,o,r){t.add(e,KI,function(i){n.indexOf(i.key)>=0&&o(i)})}var ZI=(function(){function t(e){LM(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new bne,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return IM(t,[{key:"setOptions",value:function(n){var o=this;if(!n)return;var r=this.settings;function i(f,h,v){for(var _ in f)h[_]=f[_]}if(n instanceof HTMLElement)r.parent=n;else{r.parent&&n.parent&&r.parent!==n.parent&&(this._events.remove(r.parent),this._popupInited=!1),i(n,r),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var s=r.parent;if(s&&r.popup&&!this._popupInited){var l=function(h){return o.openHandler(h)};this._events.add(s,"click",l),yS(this._events,s,[" ","Spacebar","Enter"],l),this._popupInited=!0}else n.parent&&!r.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var o=n&&n.type===KI?this._domEdit:this.domElement;setTimeout(function(){return o.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var o=n&&n.type,r=!1;if(!n)r=!0;else if(o===L0||o===mS){var i=(this.__containedEvent||0)+100;n.timeStamp>i&&(r=!0)}else One(n),r=!0;r&&this.hide()&&(this.settings.parent.style.pointerEvents="",o!==L0&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,o){this.closeHandler(),this.setOptions(n),o&&this.openHandler()}},{key:"setColor",value:function(n,o){this._setColor(n,{silent:o})}},{key:"_setColor",value:function(n,o){if(typeof n=="string"&&(n=n.trim()),!!n){o=o||{};var r=void 0;try{r=new _ne(n)}catch(a){if(o.failSilently)return;throw a}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,o)}}},{key:"setColour",value:function(n,o){this.setColor(n,o)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var o=this._toggleDOM(!0);return this._setPosition(),o}var r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',i=wne(r);return this.domElement=i,this._domH=Dd(".picker_hue",i),this._domSL=Dd(".picker_sl",i),this._domA=Dd(".picker_alpha",i),this._domEdit=Dd(".picker_editor input",i),this._domSample=Dd(".picker_sample",i),this._domOkay=Dd(".picker_done button",i),this._domCancel=Dd(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup(function(){return i.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,o=this,r=this.domElement,i=this._events;function a(f,h,v){i.add(f,h,v)}a(r,"cl
|
|||
|
|
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 Q=function(){return Q=Object.assign||function(D){for(var L,Z=1,fe=arguments.length;Z<fe;Z++)for(var Re in L=arguments[Z])Object.prototype.hasOwnProperty.call(L,Re)&&(D[Re]=L[Re]);return D},Q.apply(this,arguments)};function J(D){var L=typeof Symbol=="function"&&D[Symbol.iterator],Z=0;return L?L.call(D):{next:function(){return D&&Z>=D.length&&(D=void 0),{value:D&&D[Z++],done:!D}}}}function ie(D,L){var Z=typeof Symbol=="function"&&D[Symbol.iterator];if(!Z)return D;var fe,Re,lt=Z.call(D),It=[];try{for(;(L===void 0||L-- >0)&&!(fe=lt.next()).done;)It.push(fe.value)}catch(bn){Re={error:bn}}finally{try{fe&&!fe.done&&(Z=lt.return)&&Z.call(lt)}finally{if(Re)throw Re.error}}return It}function Se(){for(var D=[],L=0;L<arguments.length;L++)D=D.concat(ie(arguments[L]));return D}var Ae=Symbol("mobx did run lazy initializers"),Pe=Symbol("mobx pending decorators"),De={},He={};function Ye(D,L){var Z=L?De:He;return Z[D]||(Z[D]={configurable:!0,enumerable:L,get:function(){return Be(this),this[D]},set:function(fe){Be(this),this[D]=fe}})}function Be(D){var L,Z;if(D[Ae]!==!0){var fe=D[Pe];if(fe){S(D,Ae,!0);var Re=Se(Object.getOwnPropertySymbols(fe),Object.keys(fe));try{for(var lt=J(Re),It=lt.next();!It.done;It=lt.next()){var bn=fe[It.value];bn.propertyCreator(D,bn.prop,bn.descriptor,bn.decoratorTarget,bn.decoratorArguments)}}catch(Jn){L={error:Jn}}finally{try{It&&!It.done&&(Z=lt.return)&&Z.call(lt)}finally{if(L)throw L.error}}}}}function Je(D,L){return function(){var Z,fe=function(Re,lt,It,bn){if(bn===!0)return L(Re,lt,It,Re,Z),null;if(!Object.prototype.hasOwnProperty.call(Re,Pe)){var Jn=Re[Pe];S(Re,Pe,Q({},Jn))}return Re[Pe][lt]={prop:lt,propertyCreator:L,descriptor:It,decoratorTarget:Re,decoratorArguments:Z},Ye(lt,D)};return mt(arguments)?(Z=s,fe.apply(null,arguments)):(Z=Array.prototype.slice.call(arguments),fe)}}function mt(D){return(D.length===2||D.length===3)&&(typeof D[1]=="string"||typeof D[1]=="symbol")||D.length===4&&D[3]===!0}function le(D,L,Z){return ra(D)?D:Array.isArray(D)?zt.array(D,{name:Z}):w(D)?zt.object(D,void 0,{name:Z}):T(D)?zt.map(D,{name:Z}):B(D)?zt.set(D,{name:Z}):D}function Ze(D){return D}function pe(D){v(D);var L=Je(!0,(function(fe,Re,lt,It,bn){var Jn=lt?lt.initializer?lt.initializer.call(fe):lt.value:void 0;ll(fe).addObservableProp(Re,Jn,D)})),Z=(i!==void 0&&i.env,L);return Z.enhancer=D,Z}var se={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function we(D){return D==null?se:typeof D=="string"?{name:D,deep:!0,proxy:!0}:D}Object.freeze(se);var $e=pe(le),rt=pe((function(D,L,Z){return D==null||ia(D)||xl(D)||Wi(D)||Ki(D)?D:Array.isArray(D)?zt.array(D,{name:Z,deep:!1}):w(D)?zt.object(D,void 0,{name:Z,deep:!1}):T(D)?zt.map(D,{name:Z,deep:!1}):B(D)?zt.set(D,{name:Z,deep:!1}):h(!1)})),pt=pe(Ze),Lt=pe((function(D,L,Z){return un(D,L)?L:D}));function Jt(D){return D.defaultDecorator?D.defaultDecorator.enhancer:D.deep===!1?Ze:le}var en={box:function(D,L){arguments.length>2&&it("box");var Z=we(L);return new Fn(D,Jt(Z),Z.name,!0,Z.equals)},array:function(D,L){arguments.length>2&&it("array");var Z=we(L);return Ks(D,Jt(Z),Z.name)},map:function(D,L){arguments.length>2&&it("map");var Z=we(L);return new lf(D,Jt(Z),Z.name)},set:function(D,L){arguments.length>2&&it("set");var Z=we(L);return new os(D,Jt(Z),Z.name)},object:function(D,L,Z){typeof arguments[1]=="string"&&it("object");var fe=we(Z);if(fe.proxy===!1)return lr({},D,L,fe);var Re=qr(fe),lt=lr({},void 0,void 0,fe),It=bu(lt);return na(It,D,L,Re),It},ref:pt,shallow:rt,deep:$e,struct:Lt},zt=function(D,L,Z){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return $e.apply(null,arguments);if(ra(D))return D;var fe=w(D)?zt.object(D,L,Z):Array.isArray(D)?zt.array(D,L):T(D)?zt.map(D,L):B(D)?zt.set(D,L):D;if(fe!==D)return fe;h(!1)};function it(D){h("Expected one or two arguments to observable."+D+". Did you accidentally try to use observable."+D+" as decorator?")}Object.keys(en).forEach((function(D){return zt[D]=en[D]}));var ae,re,je=Je(!1,(function(D,L,Z,fe,Re){var lt=Z.get,It=Z.set,bn=
|
|||
|
|
/*
|
|||
|
|
Tracing '`+D.name+`'
|
|||
|
|
|
|||
|
|
You are entering this break point because derivation '`+D.name+"' is being traced and '"+L.name+`' is now forcing it to update.
|
|||
|
|
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|||
|
|
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|||
|
|
|
|||
|
|
`+(D instanceof wo?D.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|||
|
|
|
|||
|
|
The dependencies for this derivation are:
|
|||
|
|
|
|||
|
|
`+Z.join(`
|
|||
|
|
`)+`
|
|||
|
|
*/
|
|||
|
|
`)()}}function qi(D,L,Z){L.length>=1e3?L.push("(and many more)"):(L.push(""+new Array(Z).join(" ")+D.name),D.dependencies&&D.dependencies.forEach((function(fe){return qi(fe,L,Z+1)})))}var Na=(function(){function D(L,Z,fe,Re){L===void 0&&(L="Reaction@"+f()),Re===void 0&&(Re=!1),this.name=L,this.onInvalidate=Z,this.errorHandler=fe,this.requiresObservable=Re,this.observing=[],this.newObserving=[],this.dependenciesState=ae.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+f(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=re.NONE}return D.prototype.onBecomeStale=function(){this.schedule()},D.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Sn.pendingReactions.push(this),yl())},D.prototype.isScheduled=function(){return this._isScheduled},D.prototype.runReaction=function(){if(!this.isDisposed){if(Ui(),this._isScheduled=!1,Gt(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(L){this.reportExceptionInDerivation(L)}}yr()}},D.prototype.track=function(L){if(!this.isDisposed){Ui(),this._isRunning=!0;var Z=On(this,L,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ke(this),Rt(Z)&&this.reportExceptionInDerivation(Z.cause),yr()}},D.prototype.reportExceptionInDerivation=function(L){var Z=this;if(this.errorHandler)this.errorHandler(L,this);else{if(Sn.disableErrorBoundaries)throw L;Sn.suppressReactionErrors,Sn.globalReactionErrorHandlers.forEach((function(fe){return fe(L,Z)}))}},D.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ui(),ke(this),yr()))},D.prototype.getDisposer=function(){var L=this.dispose.bind(this);return L[F]=this,L},D.prototype.toString=function(){return"Reaction["+this.name+"]"},D.prototype.trace=function(L){L===void 0&&(L=!1),(function(){for(var Z=[],fe=0;fe<arguments.length;fe++)Z[fe]=arguments[fe];var Re=!1;typeof Z[Z.length-1]=="boolean"&&(Re=Z.pop());var lt=Mo(Z);if(!lt)return h(!1);lt.isTracing,re.NONE,lt.isTracing=Re?re.BREAK:re.LOG})(this,L)},D})(),al=function(D){return D()};function yl(){Sn.inBatch>0||Sn.isRunningReactions||al(Cs)}function Cs(){Sn.isRunningReactions=!0;for(var D=Sn.pendingReactions,L=0;D.length>0;){++L==100&&D.splice(0);for(var Z=D.splice(0),fe=0,Re=Z.length;fe<Re;fe++)Z[fe].runReaction()}Sn.isRunningReactions=!1}var _l=M("Reaction",Na);function ts(D){var L=al;al=function(Z){return D((function(){return L(Z)}))}}function ve(D){return function(){}}function gt(){h(!1)}function dn(D){return function(L,Z,fe){if(fe){if(fe.value)return{value:_o(D,fe.value),enumerable:!1,configurable:!0,writable:!0};var Re=fe.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return _o(D,Re.call(this))}}}return Kn(D).apply(this,arguments)}}function Kn(D){return function(L,Z,fe){Object.defineProperty(L,Z,{configurable:!0,enumerable:!1,get:function(){},set:function(Re){S(this,Z,br(D,Re))}})}}var br=function(D,L,Z,fe){return arguments.length===1&&typeof D=="function"?_o(D.name||"<unnamed action>",D):arguments.length===2&&typeof L=="function"?_o(D,L):arguments.length===1&&typeof D=="string"?dn(D):fe!==!0?dn(L).apply(null,arguments):void S(D,L,_o(D.name||L,Z.value,this))};function so(D,L){return ho(typeof D=="string"?D:D.name||"<unnamed action>",typeof D=="function"?D:L,this,void 0)}function si(D){return typeof D=="function"&&D.isMobxAction===!0}function ye(D,L,Z){S(D,L,_o(L,Z.bind(D)))}function ht(D,L){L===void 0&&(L=l);var Z,fe=L&&L.name||D.name||"Autorun@"+f();if(!L.scheduler&&!L.delay)Z=new Na(fe,(function(){this.track(It)}),L.onError,L.requiresObservable);else{var Re=Rn(L),lt=!1;Z=new Na(fe,(function(){lt||(lt=!0,Re((function(){lt=!1,Z.isDisposed||Z.track(It)})))}),L.onError,L.requiresObservable)}function It(){D(Z)}return Z.schedule(),Z.getDisposer()}br.bound=function(D,L,Z,fe){return fe===!0?(ye(D,L,Z.value),null):Z?{configurable:!0,enumerable:!1,get:function(){return ye(this,L,Z.value||Z.initializer.call(this)),this[L]},set:gt}:{enumerable:!1,configurable:!0,set:function(Re){ye(this,L,Re)},
|
|||
|
|
`)&&(le="(?: "+le+")",pe=" "+pe,Ze++),W=new RegExp("^(?:"+le+")",mt)),z&&(W=new RegExp("^"+le+"$(?!\\s)",mt)),F&&(Q=Pe.lastIndex),J=s(T,Je?W:Pe,pe),Je?J?(J.input=I(J.input,Ze),J[0]=I(J[0],Ze),J.index=Pe.lastIndex,Pe.lastIndex+=J[0].length):Pe.lastIndex=0:F&&J&&(Pe.lastIndex=Pe.global?J.index+J[0].length:Q),z&&J&&J.length>1&&s(M,J[0],W,(function(){for(ie=1;ie<arguments.length-2;ie++)arguments[ie]===void 0&&(J[ie]=void 0)})),J&&Be)for(J.groups=Se=E(null),ie=0;ie<Be.length;ie++)Se[(Ae=Be[ie])[0]]=J[Ae[1]];return J}),n.exports=B},function(n,o,r){var i=r(16),a=r(7),s=r(75),l=r(59),f=r(45),h=r(40),v=r(115),_=r(63),E=r(81)("splice"),O=a.TypeError,w=Math.max,S=Math.min,M=9007199254740991,T="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!E},{splice:function(B,R){var P,$,I,F,U,z,X=h(this),Y=f(X),W=s(B,Y),Q=arguments.length;if(Q===0?P=$=0:Q===1?(P=0,$=Y-W):(P=Q-2,$=S(w(l(R),0),Y-W)),Y+P-$>M)throw O(T);for(I=v(X,$),F=0;F<$;F++)(U=W+F)in X&&_(I,F,X[U]);if(I.length=$,P<$){for(F=W;F<Y-$;F++)z=F+P,(U=F+$)in X?X[z]=X[U]:delete X[z];for(F=Y;F>Y-$+P;F--)delete X[F-1]}else if(P>$)for(F=Y-$;F>W;F--)z=F+P-1,(U=F+$-1)in X?X[z]=X[U]:delete X[z];for(F=0;F<P;F++)X[F+W]=arguments[F+2];return X.length=Y-$+P,I}})},function(n,o,r){var i=r(16),a=r(205);i({target:"String",proto:!0,forced:r(206)("anchor")},{anchor:function(s){return a(this,"a","name",s)}})},function(n,o,r){(function(i){var a=typeof i=="object"&&i&&i.Object===Object&&i;o.a=a}).call(this,r(68))},function(n,o,r){(function(i){var a=r(31),s=e&&!e.nodeType&&e,l=s&&typeof i=="object"&&i&&!i.nodeType&&i,f=l&&l.exports===s?a.a.Buffer:void 0,h=f?f.allocUnsafe:void 0;o.a=function(v,_){if(_)return v.slice();var E=v.length,O=h?h(E):new v.constructor(E);return v.copy(O),O}}).call(this,r(122)(n))},function(n,o,r){var i=r(70),a=r(18);n.exports=!!Object.getOwnPropertySymbols&&!a((function(){var s=Symbol();return!String(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},function(n,o,r){var i=r(7),a=r(110),s="__core-js_shared__",l=i[s]||a(s,{});n.exports=l},function(n,o,r){var i=r(7),a=Object.defineProperty;n.exports=function(s,l){try{a(i,s,{value:l,configurable:!0,writable:!0})}catch{i[s]=l}return l}},function(n,o){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(n,o){o.f=Object.getOwnPropertySymbols},function(n,o,r){var i={};i[r(28)("toStringTag")]="z",n.exports=String(i)==="[object z]"},function(n,o,r){var i=r(7),a=r(75),s=r(45),l=r(63),f=i.Array,h=Math.max;n.exports=function(v,_,E){for(var O=s(v),w=a(_,O),S=a(E===void 0?O:E,O),M=f(h(S-w,0)),T=0;w<S;w++,T++)l(M,T,v[w]);return M.length=T,M}},function(n,o,r){var i=r(178);n.exports=function(a,s){return new(i(a))(s===0?0:s)}},function(n,o,r){var i=r(16),a=r(34),s=r(71),l=r(73),f=r(30),h=r(180),v=r(101),_=r(102),E=r(78),O=r(57),w=r(42),S=r(28),M=r(80),T=r(142),B=l.PROPER,R=l.CONFIGURABLE,P=T.IteratorPrototype,$=T.BUGGY_SAFARI_ITERATORS,I=S("iterator"),F="keys",U="values",z="entries",X=function(){return this};n.exports=function(Y,W,Q,J,ie,Se,Ae){h(Q,W,J);var Pe,De,He,Ye=function(se){if(se===ie&&Ze)return Ze;if(!$&&se in mt)return mt[se];switch(se){case F:case U:case z:return function(){return new Q(this,se)}}return function(){return new Q(this)}},Be=W+" Iterator",Je=!1,mt=Y.prototype,le=mt[I]||mt["@@iterator"]||ie&&mt[ie],Ze=!$&&le||Ye(ie),pe=W=="Array"&&mt.entries||le;if(pe&&(Pe=v(pe.call(new Y)))!==Object.prototype&&Pe.next&&(s||v(Pe)===P||(_?_(Pe,P):f(Pe[I])||w(Pe,I,X)),E(Pe,Be,!0,!0),s&&(M[Be]=X)),B&&ie==U&&le&&le.name!==U&&(!s&&R?O(mt,"name",U):(Je=!0,Ze=function(){return a(le,this)})),ie)if(De={values:Ye(U),keys:Se?Ze:Ye(F),entries:Ye(z)},Ae)for(He in De)($||Je||!(He in mt))&&w(mt,He,De[He]);else i({target:W,proto:!0,forced:$||Je},De);return s&&!Ae||mt[I]===Ze||w(mt,I,Ze,{name:ie}),M[W]=Ze,De}},function(n,o,r){var i=r(7),a=r(64),s=r(34),l=r(32),f=r(88),h=r(145),v=r(45),_=r(54),E=r(146),O=r(118),w=r(147),S=i.TypeError,M=function(B,R){this.stopped=B,this.result=R},T=M.prototype;n.exports=function(B,R,P){var $,I,F,U,z,X,Y,W=P&&P.that,Q=!(!P||!P
|
|||
|
|
* @license
|
|||
|
|
* Lodash <https://lodash.com/>
|
|||
|
|
* 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
|
|||
|
|
*/(function(){var l,f="Expected a function",h="__lodash_hash_undefined__",v="__lodash_placeholder__",_=16,E=32,O=64,w=128,S=256,M=1/0,T=9007199254740991,B=NaN,R=4294967295,P=[["ary",w],["bind",1],["bindKey",2],["curry",8],["curryRight",_],["flip",512],["partial",E],["partialRight",O],["rearg",S]],$="[object Arguments]",I="[object Array]",F="[object Boolean]",U="[object Date]",z="[object Error]",X="[object Function]",Y="[object GeneratorFunction]",W="[object Map]",Q="[object Number]",J="[object Object]",ie="[object Promise]",Se="[object RegExp]",Ae="[object Set]",Pe="[object String]",De="[object Symbol]",He="[object WeakMap]",Ye="[object ArrayBuffer]",Be="[object DataView]",Je="[object Float32Array]",mt="[object Float64Array]",le="[object Int8Array]",Ze="[object Int16Array]",pe="[object Int32Array]",se="[object Uint8Array]",we="[object Uint8ClampedArray]",$e="[object Uint16Array]",rt="[object Uint32Array]",pt=/\b__p \+= '';/g,Lt=/\b(__p \+=) '' \+/g,Jt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,en=/&(?:amp|lt|gt|quot|#39);/g,zt=/[&<>"']/g,it=RegExp(en.source),ae=RegExp(zt.source),re=/<%-([\s\S]+?)%>/g,je=/<%([\s\S]+?)%>/g,vt=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kt=/^\w*$/,Rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gt=/[\\^$.*+?()[\]{}|]/g,Pn=RegExp(Gt.source),qt=/^\s+/,On=/\s/,ke=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ke=/\{\n\/\* \[wrapped with (.+)\] \*/,Le=/,? & /,dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,At=/[()=,{}\[\]\/\s]/,Tt=/\\(\\)?/g,En=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zn=/\w*$/,ao=/^[-+]0x[0-9a-f]+$/i,Lo=/^0b[01]+$/i,_o=/^\[object .+?Constructor\]$/,ho=/^0o[0-7]+$/i,Nn=/^(?:0|[1-9]\d*)$/,qn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rr=/($^)/,ut=/['\n\r\u2028\u2029\\]/g,gn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Fn="\\u2700-\\u27bf",sr="a-z\\xdf-\\xf6\\xf8-\\xff",wo="A-Z\\xc0-\\xd6\\xd8-\\xde",oo="\\ufe0e\\ufe0f",ta="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ca="['’]",Yi="[\\ud800-\\udfff]",fa="["+ta+"]",Ka="["+gn+"]",Sn="\\d+",Ts="[\\u2700-\\u27bf]",Oo="["+sr+"]",es="[^\\ud800-\\udfff"+ta+Sn+Fn+sr+wo+"]",Ui="\\ud83c[\\udffb-\\udfff]",yr="[^\\ud800-\\udfff]",ml="(?:\\ud83c[\\udde6-\\uddff]){2}",pa="[\\ud800-\\udbff][\\udc00-\\udfff]",qi="["+wo+"]",Na="(?:"+Oo+"|"+es+")",al="(?:"+qi+"|"+es+")",yl="(?:['’](?:d|ll|m|re|s|t|ve))?",Cs="(?:['’](?:D|LL|M|RE|S|T|VE))?",_l="(?:"+Ka+"|"+Ui+")?",ts="[\\ufe0e\\ufe0f]?",ve=ts+_l+("(?:\\u200d(?:"+[yr,ml,pa].join("|")+")"+ts+_l+")*"),gt="(?:"+[Ts,ml,pa].join("|")+")"+ve,dn="(?:"+[yr+Ka+"?",Ka,ml,pa,Yi].join("|")+")",Kn=RegExp(Ca,"g"),br=RegExp(Ka,"g"),so=RegExp(Ui+"(?="+Ui+")|"+dn+ve,"g"),si=RegExp([qi+"?"+Oo+"+"+yl+"(?="+[fa,qi,"$"].join("|")+")",al+"+"+Cs+"(?="+[fa,qi+Na,"$"].join("|")+")",qi+"?"+Na+"+"+yl,qi+"+"+Cs,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sn,gt].join("|"),"g"),ye=RegExp("[\\u200d\\ud800-\\udfff"+gn+oo+"]"),ht=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Rn=-1,Cn={};Cn[Je]=Cn[mt]=Cn[le]=Cn[Ze]=Cn[pe]=Cn[se]=Cn[we]=Cn[$e]=Cn[rt]=!0,Cn[$]=Cn[I]=Cn[Ye]=Cn[F]=Cn[Be]=Cn[U]=Cn[z]=Cn[X]=Cn[W]=Cn[Q]=Cn[J]=Cn[Se]=Cn[Ae]=Cn[Pe]=Cn[He]=!1;var nr={};nr[$]=nr[I]=nr[Ye]=nr[Be]=nr[F]=nr[U]=nr[Je]=nr[mt]=nr[le]=nr[Ze]=nr[pe]=nr[W]=nr[Q]=nr[J]=nr[Se]=nr[Ae]=nr[Pe]=nr[De]=nr[se]=nr[we]=nr[$e]=nr[rt]=!0,nr[z]=nr[X]=nr[He]=!1;var Mn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},or=parseFloat,lr=parseInt,qr=typeof i=="object"&&i&&i.Object===Obj
|
|||
|
|
/* [wrapped with `+ce+`] */
|
|||
|
|
`)})(G,(function(ne,ce){return Fa(P,(function(Oe){var Fe="_."+Oe[0];ce&Oe[1]&&!Za(ne,Fe)&&ne.push(Fe)})),ne.sort()})((function(ne){var ce=ne.match(Ke);return ce?ce[1].split(Le):[]})(G),C)))}function cv(m){var x=0,C=0;return function(){var G=Op(),ne=16-(G-C);if(C=G,ne>0){if(++x>=800)return arguments[0]}else x=0;return m.apply(l,arguments)}}function Bs(m,x){var C=-1,G=m.length,ne=G-1;for(x=x===l?G:x;++C<x;){var ce=ev(C,ne),Oe=m[ce];m[ce]=m[C],m[C]=Oe}return m.length=x,m}var dv=(function(m){var x=su(m,(function(G){return C.size===500&&C.clear(),G})),C=x.cache;return x})((function(m){var x=[];return m.charCodeAt(0)===46&&x.push(""),m.replace(Rt,(function(C,G,ne,ce){x.push(ne?ce.replace(Tt,"$1"):G||C)})),x}));function vs(m){if(typeof m=="string"||Dt(m))return m;var x=m+"";return x=="0"&&1/m==-1/0?"-0":x}function Ru(m){if(m!=null){try{return no.call(m)}catch{}try{return m+""}catch{}}return""}function qp(m){if(m instanceof mo)return m.clone();var x=new Ul(m.__wrapped__,m.__chain__);return x.__actions__=va(m.__actions__),x.__index__=m.__index__,x.__values__=m.__values__,x}var Cg=uo((function(m,x){return Oi(m)?cs(m,Ji(x,1,Oi,!0)):[]})),Ng=uo((function(m,x){var C=mi(x);return Oi(C)&&(C=l),Oi(m)?cs(m,Ji(x,1,Oi,!0),Rr(C,2)):[]})),kg=uo((function(m,x){var C=mi(x);return Oi(C)&&(C=l),Oi(m)?cs(m,Ji(x,1,Oi,!0),l,C):[]}));function fv(m,x,C){var G=m==null?0:m.length;if(!G)return-1;var ne=C==null?0:Mt(C);return ne<0&&(ne=ji(G+ne,0)),$a(m,Rr(x,3),ne)}function Kp(m,x,C){var G=m==null?0:m.length;if(!G)return-1;var ne=G-1;return C!==l&&(ne=Mt(C),ne=C<0?ji(G+ne,0):Wa(ne,G-1)),$a(m,Rr(x,3),ne,!0)}function Cf(m){return m!=null&&m.length?Ji(m,1):[]}function Pg(m){return m&&m.length?m[0]:l}var gs=uo((function(m){var x=Mo(m,Ip);return x.length&&x[0]===m[0]?gf(x):[]})),Du=uo((function(m){var x=mi(m),C=Mo(m,Ip);return x===mi(C)?x=l:C.pop(),C.length&&C[0]===m[0]?gf(C,Rr(x,2)):[]})),_y=uo((function(m){var x=mi(m),C=Mo(m,Ip);return(x=typeof x=="function"?x:l)&&C.pop(),C.length&&C[0]===m[0]?gf(C,l,x):[]}));function mi(m){var x=m==null?0:m.length;return x?m[x-1]:l}var Nf=uo(Ac);function Ac(m,x){return m&&m.length&&x&&x.length?Pp(m,x):m}var kf=Ls((function(m,x){var C=m==null?0:m.length,G=hf(m,x);return Qh(m,Mo(x,(function(ne){return Ra(ne,C)?+ne:ne})).sort(vd)),G}));function Ed(m){return m==null?m:dy.call(m)}var Pf=uo((function(m){return Tu(Ji(m,1,Oi,!0))})),Rf=uo((function(m){var x=mi(m);return Oi(x)&&(x=l),Tu(Ji(m,1,Oi,!0),Rr(x,2))})),Df=uo((function(m){var x=mi(m);return x=typeof x=="function"?x:l,Tu(Ji(m,1,Oi,!0),l,x)}));function Mc(m){if(!m||!m.length)return[];var x=0;return m=Ba(m,(function(C){if(Oi(C))return x=ji(C.length,x),!0})),Ks(x,(function(C){return Mo(m,Ua(C))}))}function au(m,x){if(!m||!m.length)return[];var C=Mc(m);return x==null?C:Mo(C,(function(G){return qo(x,l,G)}))}var ga=uo((function(m,x){return Oi(m)?cs(m,x):[]})),Zp=uo((function(m){return Lp(Ba(m,Oi))})),jf=uo((function(m){var x=mi(m);return Oi(x)&&(x=l),Lp(Ba(m,Oi),Rr(x,2))})),Tc=uo((function(m){var x=mi(m);return x=typeof x=="function"?x:l,Lp(Ba(m,Oi),l,x)})),xd=uo(Mc),wa=uo((function(m){var x=m.length,C=x>1?m[x-1]:l;return C=typeof C=="function"?(m.pop(),C):l,au(m,C)}));function xi(m){var x=he(m);return x.__chain__=!0,x}function Lf(m,x){return x(m)}var za=Ls((function(m){var x=m.length,C=x?m[0]:0,G=this.__wrapped__,ne=function(ce){return hf(ce,m)};return!(x>1||this.__actions__.length)&&G instanceof mo&&Ra(C)?((G=G.slice(C,+C+(x?1:0))).__actions__.push({func:Lf,args:[ne],thisArg:l}),new Ul(G,this.__chain__).thru((function(ce){return x&&!ce.length&&ce.push(l),ce}))):this.thru(ne)})),wr=ou((function(m,x,C){$n.call(m,C)?++m[C]:us(m,C,1)})),Jp=Up(fv),If=Up(Kp);function Qp(m,x){return(Jr(m)?Fa:gi)(m,Rr(x,3))}function pv(m,x){return(Jr(m)?_p:yg)(m,Rr(x,3))}var Rg=ou((function(m,x,C){$n.call(m,C)?m[C].push(x):us(m,C,[x])})),ju=uo((function(m,x,C){var G=-1,ne=typeof x=="function",ce=fl(m)?Gn(m.length):[];return gi(m,(function(Oe){ce[++G]=ne?qo(x,Oe,C):Ga(Oe,x,C)})),ce})),Dg=ou((function(m,x,C){us(m,C,x)}));function Cc(m,x){return(Jr(m)?Mo:Ml)(m,Rr(x,3))}var jg=ou((function(m,x,C){m[C?0:1].
|
|||
|
|
`;m.replace(Yn,(function(Tn,Br,ir,at,Yr,Ao){return ir||(ir=at),yn+=m.slice(jt,Ao).replace(ut,sc),Br&&(ne=!0,yn+=`' +
|
|||
|
|
__e(`+Br+`) +
|
|||
|
|
'`),Yr&&(ce=!0,yn+=`';
|
|||
|
|
`+Yr+`;
|
|||
|
|
__p += '`),ir&&(yn+=`' +
|
|||
|
|
((__t = (`+ir+`)) == null ? '' : __t) +
|
|||
|
|
'`),jt=Ao+Tn.length,Tn})),yn+=`';
|
|||
|
|
`;var Sr=$n.call(x,"variable")&&x.variable;if(Sr){if(At.test(Sr))throw new go("Invalid `variable` option passed into `_.template`")}else yn=`with (obj) {
|
|||
|
|
`+yn+`
|
|||
|
|
}
|
|||
|
|
`;yn=(ce?yn.replace(pt,""):yn).replace(Lt,"$1").replace(Jt,"$1;"),yn="function("+(Sr||"obj")+`) {
|
|||
|
|
`+(Sr?"":`obj || (obj = {});
|
|||
|
|
`)+"var __t, __p = ''"+(ne?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
|
|||
|
|
function print() { __p += __j.call(arguments, '') }
|
|||
|
|
`:`;
|
|||
|
|
`)+yn+`return __p
|
|||
|
|
}`;var an=Cr((function(){return ci(Fe,Qn+"return "+yn).apply(l,et)}));if(an.source=yn,Ea(an))throw an;return an},he.times=function(m,x){if((m=Mt(m))<1||m>T)return[];var C=R,G=Wa(m,R);x=Rr(x),m-=R;for(var ne=Ks(G,x);++C<m;)x(C);return ne},he.toFinite=nn,he.toInteger=Mt,he.toLength=wn,he.toLower=function(m){return Wt(m).toLowerCase()},he.toNumber=hn,he.toSafeInteger=function(m){return m?Au(Mt(m),-9007199254740991,T):m===0?m:0},he.toString=Wt,he.toUpper=function(m){return Wt(m).toUpperCase()},he.trim=function(m,x,C){if((m=Wt(m))&&(C||x===l))return $l(m);if(!m||!(x=cl(x)))return m;var G=Qa(m),ne=Qa(x);return Uo(G,xl(G,ne),af(G,ne)+1).join("")},he.trimEnd=function(m,x,C){if((m=Wt(m))&&(C||x===l))return m.slice(0,ia(m)+1);if(!m||!(x=cl(x)))return m;var G=Qa(m);return Uo(G,0,af(G,Qa(x))+1).join("")},he.trimStart=function(m,x,C){if((m=Wt(m))&&(C||x===l))return m.replace(qt,"");if(!m||!(x=cl(x)))return m;var G=Qa(m);return Uo(G,xl(G,Qa(x))).join("")},he.truncate=function(m,x){var C=30,G="...";if(Ni(x)){var ne="separator"in x?x.separator:ne;C="length"in x?Mt(x.length):C,G="omission"in x?cl(x.omission):G}var ce=(m=Wt(m)).length;if(os(m)){var Oe=Qa(m);ce=Oe.length}if(C>=ce)return m;var Fe=C-Va(G);if(Fe<1)return G;var et=Oe?Uo(Oe,0,Fe).join(""):m.slice(0,Fe);if(ne===l)return et+G;if(Oe&&(Fe+=et.length-Fe),ge(ne)){if(m.slice(Fe).search(ne)){var jt,Vt=et;for(ne.global||(ne=Z(ne.source,Wt(Zn.exec(ne))+"g")),ne.lastIndex=0;jt=ne.exec(Vt);)var yn=jt.index;et=et.slice(0,yn===l?Fe:yn)}}else if(m.indexOf(cl(ne),Fe)!=Fe){var Yn=et.lastIndexOf(ne);Yn>-1&&(et=et.slice(0,Yn))}return et+G},he.unescape=function(m){return(m=Wt(m))&&it.test(m)?m.replace(en,sl):m},he.uniqueId=function(m){var x=++Do;return Wt(m)+x},he.upperCase=la,he.upperFirst=zi,he.each=Qp,he.eachRight=pv,he.first=Pg,Ce(he,(Ue={},ur(he,(function(m,x){$n.call(he.prototype,x)||(Ue[x]=m)})),Ue),{chain:!1}),he.VERSION="4.17.21",Fa(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(m){he[m].placeholder=he})),Fa(["drop","take"],(function(m,x){mo.prototype[m]=function(C){C=C===l?1:ji(Mt(C),0);var G=this.__filtered__&&!x?new mo(this):this.clone();return G.__filtered__?G.__takeCount__=Wa(C,G.__takeCount__):G.__views__.push({size:Wa(C,R),type:m+(G.__dir__<0?"Right":"")}),G},mo.prototype[m+"Right"]=function(C){return this.reverse()[m](C).reverse()}})),Fa(["filter","map","takeWhile"],(function(m,x){var C=x+1,G=C==1||C==3;mo.prototype[m]=function(ne){var ce=this.clone();return ce.__iteratees__.push({iteratee:Rr(ne,3),type:C}),ce.__filtered__=ce.__filtered__||G,ce}})),Fa(["head","last"],(function(m,x){var C="take"+(x?"Right":"");mo.prototype[m]=function(){return this[C](1).value()[0]}})),Fa(["initial","tail"],(function(m,x){var C="drop"+(x?"":"Right");mo.prototype[m]=function(){return this.__filtered__?new mo(this):this[C](1)}})),mo.prototype.compact=function(){return this.filter(Nr)},mo.prototype.find=function(m){return this.filter(m).head()},mo.prototype.findLast=function(m){return this.reverse().find(m)},mo.prototype.invokeMap=uo((function(m,x){return typeof m=="function"?new mo(this):this.map((function(C){return Ga(C,m,x)}))})),mo.prototype.reject=function(m){return this.filter(Bf(Rr(m)))},mo.prototype.slice=function(m,x){m=Mt(m);var C=this;return C.__filtered__&&(m>0||x<0)?new mo(C):(m<0?C=C.takeRight(-m):m&&(C=C.drop(m)),x!==l&&(C=(x=Mt(x))<0?C.dropRight(-x):C.take(x-m)),C)},mo.prototype.takeRightWhile=function(m){return this.reverse().takeWhile(m).reverse()},mo.prototype.toArray=function(){return this.take(R)},ur(mo.prototype,(function(m,x){var C=/^(?:filter|find|map|reject)|While$/.test(x),G=/^(?:head|last)$/.test(x),ne=he[G?"take"+(x=="last"?"Right":""):x],ce=G||/^find/.test(x);ne&&(he.prototype[x]=function(){var Oe=this.__wrapped__,Fe=G?[1]:arguments,et=Oe instanceof mo,jt=Fe[0],Vt=et||Jr(Oe),yn=function(Br){var ir=ne.apply(he,oa([Br],Fe));return G&&Yn?ir[0]:ir};Vt&&C&&typeof jt=="function"&&jt.length!=1&&(et=Vt=!1);var Yn=this.__chain__,Qn=!!this.__actions__.length,Sr=ce&&!Yn,an=et&&!Qn;if(!ce&&Vt){Oe=an?Oe:new mo(this);var Tn=m.apply(Oe,Fe);return Tn.__actions
|
|||
|
|
\v\f\r \u2028\u2029\uFEFF`},function(n,o){var r,i,a=n.exports={};function s(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function f(T){if(r===setTimeout)return setTimeout(T,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(T,0);try{return r(T,0)}catch{try{return r.call(null,T,0)}catch{return r.call(this,T,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:s}catch{r=s}try{i=typeof clearTimeout=="function"?clearTimeout:l}catch{i=l}})();var h,v=[],_=!1,E=-1;function O(){_&&h&&(_=!1,h.length?v=h.concat(v):E=-1,v.length&&w())}function w(){if(!_){var T=f(O);_=!0;for(var B=v.length;B;){for(h=v,v=[];++E<B;)h&&h[E].run();E=-1,B=v.length}h=null,_=!1,(function(R){if(i===clearTimeout)return clearTimeout(R);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(R);try{i(R)}catch{try{return i.call(null,R)}catch{return i.call(this,R)}}})(T)}}function S(T,B){this.fun=T,this.array=B}function M(){}a.nextTick=function(T){var B=new Array(arguments.length-1);if(arguments.length>1)for(var R=1;R<arguments.length;R++)B[R-1]=arguments[R];v.push(new S(T,B)),v.length!==1||_||f(w)},S.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=M,a.addListener=M,a.once=M,a.off=M,a.removeListener=M,a.removeAllListeners=M,a.emit=M,a.prependListener=M,a.prependOnceListener=M,a.listeners=function(T){return[]},a.binding=function(T){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(T){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(n,o,r){var i=r(32),a=r(165),s=r(28)("species");n.exports=function(l,f){var h,v=i(l).constructor;return v===void 0||(h=i(v)[s])==null?f:a(h)}},function(n,o,r){var i=r(7),a=r(99),s=r(88),l=i.TypeError;n.exports=function(f){if(a(f))return f;throw l(s(f)+" is not a constructor")}},function(n,o,r){var i=r(16),a=r(161).trim;i({target:"String",proto:!0,forced:r(200)("trim")},{trim:function(){return a(this)}})},function(n,o,r){var i=r(34),a=r(123),s=r(32),l=r(94),f=r(39),h=r(44),v=r(62),_=r(124),E=r(125);a("match",(function(O,w,S){return[function(M){var T=h(this),B=M==null?void 0:v(M,O);return B?i(B,M,T):new RegExp(M)[O](f(T))},function(M){var T=s(this),B=f(M),R=S(w,T,B);if(R.done)return R.value;if(!T.global)return E(T,B);var P=T.unicode;T.lastIndex=0;for(var $,I=[],F=0;($=E(T,B))!==null;){var U=f($[0]);I[F]=U,U===""&&(T.lastIndex=_(B,l(T.lastIndex),P)),F++}return F===0?null:I}]}))},function(n,o,r){var i,a,s,l,f=r(7),h=r(76),v=r(64),_=r(30),E=r(35),O=r(18),w=r(138),S=r(98),M=r(91),T=r(169),B=r(128),R=f.setImmediate,P=f.clearImmediate,$=f.process,I=f.Dispatch,F=f.Function,U=f.MessageChannel,z=f.String,X=0,Y={},W="onreadystatechange";try{i=f.location}catch{}var Q=function(Ae){if(E(Y,Ae)){var Pe=Y[Ae];delete Y[Ae],Pe()}},J=function(Ae){return function(){Q(Ae)}},ie=function(Ae){Q(Ae.data)},Se=function(Ae){f.postMessage(z(Ae),i.protocol+"//"+i.host)};R&&P||(R=function(Ae){var Pe=S(arguments,1);return Y[++X]=function(){h(_(Ae)?Ae:F(Ae),void 0,Pe)},a(X),X},P=function(Ae){delete Y[Ae]},B?a=function(Ae){$.nextTick(J(Ae))}:I&&I.now?a=function(Ae){I.now(J(Ae))}:U&&!T?(l=(s=new U).port2,s.port1.onmessage=ie,a=v(l.postMessage,l)):f.addEventListener&&_(f.postMessage)&&!f.importScripts&&i&&i.protocol!=="file:"&&!O(Se)?(a=Se,f.addEventListener("message",ie,!1)):a=W in M("script")?function(Ae){w.appendChild(M("script")).onreadystatechange=function(){w.removeChild(this),Q(Ae)}}:function(Ae){setTimeout(J(Ae),0)}),n.exports={set:R,clear:P}},function(n,o,r){var i=r(55);n.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},function(n,o,r){var i=r(56),a=function(s){var l,f;this.promise=new s((function(h,v){if(l!==void 0||f!==void 0)throw TypeError("Bad Promise constructor");l=h,f=v})),this.resolve=i(l),this.reject=i(f)};n.exports.f=function(s){return new a(s)}},function(n,o,r){o.a=function(){return!1}},function(n,o,r){(function(i){r.d(o,"
|
|||
|
|
`)&&s.flags==="s")}))},function(n,o,r){var i=r(18),a=r(7).RegExp;n.exports=i((function(){var s=a("(?<a>b)","g");return s.exec("b").groups.a!=="b"||"b".replace(s,"$<a>c")!=="bc"}))},function(n,o,r){var i=r(16),a=r(15),s=r(56),l=r(40),f=r(45),h=r(39),v=r(18),_=r(193),E=r(121),O=r(194),w=r(195),S=r(70),M=r(196),T=[],B=a(T.sort),R=a(T.push),P=v((function(){T.sort(void 0)})),$=v((function(){T.sort(null)})),I=E("sort"),F=!v((function(){if(S)return S<70;if(!(O&&O>3)){if(w)return!0;if(M)return M<603;var U,z,X,Y,W="";for(U=65;U<76;U++){switch(z=String.fromCharCode(U),U){case 66:case 69:case 70:case 72:X=3;break;case 68:case 71:X=4;break;default:X=2}for(Y=0;Y<47;Y++)T.push({k:z+Y,v:X})}for(T.sort((function(Q,J){return J.v-Q.v})),Y=0;Y<T.length;Y++)z=T[Y].k.charAt(0),W.charAt(W.length-1)!==z&&(W+=z);return W!=="DGBEFHACIJK"}}));i({target:"Array",proto:!0,forced:P||!$||!I||!F},{sort:function(U){U!==void 0&&s(U);var z=l(this);if(F)return U===void 0?B(z):B(z,U);var X,Y,W=[],Q=f(z);for(Y=0;Y<Q;Y++)Y in z&&R(W,z[Y]);for(_(W,(function(J){return function(ie,Se){return Se===void 0?-1:ie===void 0?1:J!==void 0?+J(ie,Se)||0:h(ie)>h(Se)?1:-1}})(U)),X=W.length,Y=0;Y<X;)z[Y]=W[Y++];for(;Y<Q;)delete z[Y++];return z}})},function(n,o,r){var i=r(114),a=Math.floor,s=function(h,v){var _=h.length,E=a(_/2);return _<8?l(h,v):f(h,s(i(h,0,E),v),s(i(h,E),v),v)},l=function(h,v){for(var _,E,O=h.length,w=1;w<O;){for(E=w,_=h[w];E&&v(h[E-1],_)>0;)h[E]=h[--E];E!==w++&&(h[E]=_)}return h},f=function(h,v,_,E){for(var O=v.length,w=_.length,S=0,M=0;S<O||M<w;)h[S+M]=S<O&&M<w?E(v[S],_[M])<=0?v[S++]:_[M++]:S<O?v[S++]:_[M++];return h};n.exports=s},function(n,o,r){var i=r(55).match(/firefox\/(\d+)/i);n.exports=!!i&&+i[1]},function(n,o,r){var i=r(55);n.exports=/MSIE|Trident/.test(i)},function(n,o,r){var i=r(55).match(/AppleWebKit\/(\d+)\./);n.exports=!!i&&+i[1]},function(n,o,r){var i=r(7),a=r(159),s=i.TypeError;n.exports=function(l){if(a(l))throw s("The method doesn't accept regular expressions");return l}},function(n,o,r){var i=r(28)("match");n.exports=function(a){var s=/./;try{"/./"[a](s)}catch{try{return s[i]=!1,"/./"[a](s)}catch{}}return!1}},function(n,o,r){r(16)({target:"Number",stat:!0},{isNaN:function(i){return i!=i}})},function(n,o,r){var i=r(73).PROPER,a=r(18),s=r(162);n.exports=function(l){return a((function(){return!!s[l]()||"
"[l]()!=="
"||i&&s[l].name!==l}))}},function(n,o,r){var i=r(15),a=r(40),s=Math.floor,l=i("".charAt),f=i("".replace),h=i("".slice),v=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,_=/\$([$&'`]|\d{1,2})/g;n.exports=function(E,O,w,S,M,T){var B=w+E.length,R=S.length,P=_;return M!==void 0&&(M=a(M),P=v),f(T,P,(function($,I){var F;switch(l(I,0)){case"$":return"$";case"&":return E;case"`":return h(O,0,w);case"'":return h(O,B);case"<":F=M[h(I,1,-1)];break;default:var U=+I;if(U===0)return $;if(U>R){var z=s(U/10);return z===0?$:z<=R?S[z-1]===void 0?l(I,1):S[z-1]+l(I,1):$}F=S[U-1]}return F===void 0?"":F}))}},function(n,o,r){var i=r(36),a=r(15),s=r(34),l=r(18),f=r(77),h=r(112),v=r(84),_=r(40),E=r(85),O=Object.assign,w=Object.defineProperty,S=a([].concat);n.exports=!O||l((function(){if(i&&O({b:1},O(w({},"a",{enumerable:!0,get:function(){w(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},T={},B=Symbol(),R="abcdefghijklmnopqrst";return M[B]=7,R.split("").forEach((function(P){T[P]=P})),O({},M)[B]!=7||f(O({},T)).join("")!=R}))?function(M,T){for(var B=_(M),R=arguments.length,P=1,$=h.f,I=v.f;R>P;)for(var F,U=E(arguments[P++]),z=$?S(f(U),$(U)):f(U),X=z.length,Y=0;X>Y;)F=z[Y++],i&&!s(I,U,F)||(B[F]=U[F]);return B}:O},function(n,o,r){var i=r(7),a=r(15),s=r(56),l=r(33),f=r(35),h=r(98),v=i.Function,_=a([].concat),E=a([].join),O={},w=function(S,M,T){if(!f(O,M)){for(var B=[],R=0;R<M;R++)B[R]="a["+R+"]";O[M]=v("C,a","return new C("+E(B,",")+")")}return O[M](S,T)};n.exports=v.bind||function(S){var M=s(this),T=M.prototype,B=h(arguments,1),R=function(){var P=_(B,h(arguments));return this instanceof R?w(M,P.length,P):M.apply(S,P)};return l(T)&&(R.prototype=T),R}},function(n,o,r){var i=r(35);n.exports=function(a){return a!==void 0&&(i(a,"value")||i(a,"writ
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ru(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function Wl(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function _g(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function js(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Ml(c,u,d,p,y){var g={};return Object.keys(p).forEach((function(b){g[b]=p[b]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=d.slice().reverse().reduce((function(b,A){return A(c,u,b)||b}),g),y&&g.initializer!==void 0&&(g.value=g.initializer?g.initializer.call(y):void 0,g.initializer=void 0),g.initializer===void 0&&(Object.defineProperty(c,u,g),g=null),g}(function(c){c[c.DEFAULT=0]="DEFAULT",c[c.INCREASE=1]="INCREASE"})(Ei||(Ei={}));var Zh={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},Jh=(Mi=(function(){function c(p,y){(function(A,N){if(!(A instanceof N))throw new TypeError("Cannot call a class as a function")})(this,c),js(this,"MINI_SCALE_SIZE",.2),js(this,"MAX_SCALE_SIZE",16),Wl(this,"SCALE_X",qh,this),Wl(this,"SKEW_Y",Kh,this),Wl(this,"SKEW_X",gf,this),Wl(this,"SCALE_Y",Ga,this),Wl(this,"TRANSLATE_X",Np,this),Wl(this,"TRANSLATE_Y",hd,this),Wl(this,"ZOOM_SIZE",Vl,this),js(this,"eventCenter",void 0),js(this,"translateLimitMinX",void 0),js(this,"translateLimitMinY",void 0),js(this,"translateLimitMaxX",void 0),js(this,"translateLimitMaxY",void 0),this.eventCenter=p;var g=y.stopMoveGraph,b=g!==void 0&&g;this.updateTranslateLimits(b)}var u,d;return u=c,d=[{key:"setZoomMiniSize",value:function(p){this.MINI_SCALE_SIZE=p}},{key:"setZoomMaxSize",value:function(p){this.MAX_SCALE_SIZE=p}},{key:"HtmlPointToCanvasPoint",value:function(p){var y=Mu(p,2),g=y[0],b=y[1];return[(g-this.TRANSLATE_X)/this.SCALE_X,(b-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(p){var y=Mu(p,2),g=y[0],b=y[1];return[g*this.SCALE_X+this.TRANSLATE_X,b*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(p,y,g){var b=Mu(p,2),A=b[0],N=b[1];return[A+y/this.SCALE_X,N+g/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(p,y){return[p/this.SCALE_X,y/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var p=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(p,")")}}},{key:"zoom",value:function(){var p=arguments.length>0&&arguments[0]!==void 0&&arguments[0],y=arguments.length>1?arguments[1]:void 0,g=this.SCALE_X,b=this.SCALE_Y;return p===!0?(g+=this.ZOOM_SIZE,b+=this.ZOOM_SIZE):p===!1?(g-=this.ZOOM_SIZE,b-=this.ZOOM_SIZE):typeof p=="number"&&(g=p,b=p),g<this.MINI_SCALE_SIZE||g>this.MAX_SCALE_SIZE||(y&&(this.TRANSLATE_X-=(g-this.SCALE_X)*y[0],this.TRANSLATE_Y-=(b-this.SCALE_Y)*y[1]),this.SCALE_X=g,this.SCALE_Y=b,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(p){this.eventCenter.emit(ur.GRAPH_TRANSFORM,{type:p,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(p,y){this.TRANSLATE_X+p<=this.translateLimitMaxX&&this.TRANSLATE_X+p>=this.translateLimitMinX&&(this.TRANSLATE_X+=p),this.TRANSLATE_Y+y<=this.translateLimitMaxY&&this.TRANSLATE_Y+y>=this.translateLimitMinY&&(this.TRANSLATE_Y+=y),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(p,y,g,b){var A=Mu(this.CanvasPointToHtmlPoint([p,y]),2),N=g/2-A[0],V=b/2-A[1];this.TRANSLATE_X+=N,this.TRANSLATE_Y+=V,this.emit
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function gd(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var md=function(c,u,d){var p=Ef(c,2),y=p[0],g=p[1],b=Ef(u,2),A=b[0],N=b[1],V=Ef(d,2),H=V[0],oe=V[1];return y>A&&y<H&&g>N&&g<oe},yd=function(c,u){var d=!1;switch(u.multipleSelectKey){case"meta":d=c.metaKey;break;case"alt":d=c.altKey;break;case"shift":d=c.shiftKey;break;case"ctrl":d=c.ctrlKey;break;default:d=!1}return d};r(167),r(126),r(83),r(29),r(12),r(13),r(14),r(47);var Vp=function(c){return function(u,d,p){var y=Object(u);if(!Wi(u)){var g=cf(d);u=sc(u),d=function(A){return g(y[A],A,y)}}var b=c(u,d,p);return b>-1?y[g?u[b]:b]:void 0}},_d=function(c,u,d,p){for(var y=c.length,g=d+-1;++g<y;)if(u(c[g],g,c))return g;return-1},ov=/\s/,Wp=function(c){for(var u=c.length;u--&&ov.test(c.charAt(u)););return u},Tg=/^\s+/,iv=function(c){return c&&c.slice(0,Wp(c)+1).replace(Tg,"")},ps=/^[-+]0x[0-9a-f]+$/i,av=/^0b[01]+$/i,lv=/^0o[0-7]+$/i,sv=parseInt,bd=function(c){if(typeof c=="number")return c;if(Kr(c))return NaN;if(Fn(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=Fn(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=iv(c);var d=av.test(c);return d||lv.test(c)?sv(c.slice(2),d?2:8):ps.test(c)?NaN:+c},Ls=1/0,xf=function(c){return c?(c=bd(c))===Ls||c===-1/0?17976931348623157e292*(c<0?-1:1):c==c?c:0:c===0?c:0},Gp=function(c){var u=xf(c),d=u%1;return u==u?d?u-d:u:0},zp=Math.max,Cu,Nu=Vp((function(c,u,d){var p=c==null?0:c.length;if(!p)return-1;var y=d==null?0:Gp(d);return y<0&&(y=zp(p+y,0)),_d(c,cf(u),y)})),Rr=new Uint8Array(16);function wd(){if(!Cu&&!(Cu=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 Cu(Rr)}for(var Of=/^(?:[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,hs=function(c){return typeof c=="string"&&Of.test(c)},aa=[],Ec=0;Ec<256;++Ec)aa.push((Ec+256).toString(16).substr(1));var Ti=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=(aa[c[u+0]]+aa[c[u+1]]+aa[c[u+2]]+aa[c[u+3]]+"-"+aa[c[u+4]]+aa[c[u+5]]+"-"+aa[c[u+6]]+aa[c[u+7]]+"-"+aa[c[u+8]]+aa[c[u+9]]+"-"+aa[c[u+10]]+aa[c[u+11]]+aa[c[u+12]]+aa[c[u+13]]+aa[c[u+14]]+aa[c[u+15]]).toLowerCase();if(!hs(d))throw TypeError("Stringified UUID is invalid");return d},ku=function(c,u,d){var p=(c=c||{}).random||(c.rng||wd)();return p[6]=15&p[6]|64,p[8]=63&p[8]|128,Ti(p)},tl=function(){return ku()},Sf=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",d=c.nodes.reduce((function(p,y){return p[y.id]=u+ku(),y.id=p[y.id],p}),{});return c.edges.forEach((function(p){p.id=u+ku(),p.sourceNodeId=d[p.sourceNodeId],p.targetNodeId=d[p.targetNodeId]})),c},Ra=(r(105),r(127),r(207),function(c,u,d){var p=c.x,y=c.y,g=u.x,b=u.y,A=d.x,N=d.y,V=(N-b)/(A-g),H=b-V*g;return p>=g&&p<=A&&y>=b&&y<=N&&Math.abs(y-V*p+H)<Number.EPSILON});function Fi(c){return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Fi(c)}function Is(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Fs(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?Is(Object(d),!0).forEach((function(p){Hp(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):Is(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function Hp(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writa
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Ha(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function ms(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Ci(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?ms(Object(d),!0).forEach((function(p){gv(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):ms(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function dl(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function zl(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function by(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function $f(){return $f=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=Nc(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},$f.apply(this,arguments)}function Nc(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=nl(c))!==null;);return c}function Jr(c,u){return Jr=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Jr(c,u)}function Ig(c){var u=(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 d,p=nl(c);if(u){var y=nl(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return fl(this,d)}}function fl(c,u){if(u&&(su(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oi(c)}function Oi(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function nl(c){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},nl(c)}function gv(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Ea(c,u,d,p,y){var g={};return Object.keys(p).forEach((function(b){g[b]=p[b]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=d.slice().reverse().reduce((function(b,A){return A(c,u,b)||b}),g),y&&g.initializer!==void 0&&(g.value=g.initializer?g.initializer.call(y):void 0,g.initializer=void 0),g.initializer===void 0&&(Object.defineProperty(c,u,g),g=null),g}var Cl=(Er=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&Jr(g,b)})(y,c);var u,d,p=Ig(y);function y(){var g;zl(this,y);for(var b=arguments.length,A=new Array(b),N=0;N<b;N++)A[N]=arguments[N];return gv(Oi(g=p.call.apply(p,[this].concat(A))),"modelType",lo.POLYLINE_EDGE),gv(Oi(g),"draggingPointList",void 0),dl(Oi(g),"dbClickPosition",vv,Oi(g)),g}return u=y,(d=[{key:"initEdgeData",value:function(g){this.offset=30,$f(nl(y.prototype),"initEdgeData",this).call(this,g)}},{key:"getEdgeStyle",value:function(){var g=this.graphModel.theme.polyline;return Ci(Ci({},$f(nl(y.prototype),"getEdgeStyle",this).call(this)),Uo(g))}},{key:"getTextPosition",value:function(){var g,b=(g=this.text)===null||g===void 0?void 0:g.value;if(this.dbClickPosition&&!b){var A=this.dbClickPosition;return{x:A.x,y:A.y}}var N=jr(this.points),V=Bf(Or(N),2),H=V[0],oe=V[1];return{x:(H.x+oe.x)/2,y:(H.y+oe.y)/2}}},{ke
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Dt(c){return Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Dt(c)}function yt(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||Nt(c,u)||(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 Nt(c,u){if(c){if(typeof c=="string")return tn(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?tn(c,u):void 0}}function tn(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var sn=function(c,u){var d;switch(c.type){case"line":default:d=new Od(c,u);break;case"polyline":d=new Cl(c,u)}return d},nn=function(c,u){return 2*Math.abs(c.centerX-u.centerX)<c.width+u.width&&2*Math.abs(c.centerY-u.centerY)<c.height+u.height},Mt=function(c){var u=[],d={};return c.forEach((function(p){var y="".concat(p.x,"-").concat(p.y);p.id=y,d[y]=p})),Object.keys(d).forEach((function(p){u.push(d[p])})),u},wn=function(c,u){var d=[c,{x:c.x,y:u.y},u];return Mt(d)},hn=function(c,u){return c.width===0&&c.height===0?c:{centerX:c.centerX,centerY:c.centerY,minX:c.minX-u,minY:c.minY-u,maxX:c.maxX+u,maxY:c.maxY+u,height:c.height+2*u,width:c.width+2*u}},rn=function(c,u){var d=Math.abs(c.x-u.centerX),p=Math.abs(c.y-u.centerY);return d/u.width>p/u.height?ti.HORIZONTAL:ti.VERTICAL},Wt=function(c,u,d){return rn(d,u)===ti.HORIZONTAL?{x:d.x>c.centerX?c.maxX:c.minX,y:d.y}:{x:d.x,y:d.y>c.centerY?c.maxY:c.minY}},st=function(c,u){var d=Math.min(c.minX,u.minX),p=Math.min(c.minY,u.minY),y=Math.max(c.maxX,u.maxX),g=Math.max(c.maxY,u.maxY);return{centerX:(d+y)/2,centerY:(p+g)/2,minX:d,minY:p,maxX:y,maxY:g,height:g-p,width:y-d}},St=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=arguments.length>1?arguments[1]:void 0,d=[],p=[];c.forEach((function(H){d.push(H.x),p.push(H.y)}));var y=Math.min.apply(Math,d),g=Math.max.apply(Math,d),b=Math.min.apply(Math,p),A=Math.max.apply(Math,p),N=g-y,V=A-b;return u&&(N+=u,V+=u),{centerX:(y+g)/2,centerY:(b+A)/2,maxX:g,maxY:A,minX:y,minY:b,x:(y+g)/2,y:(b+A)/2,height:V,width:N}},ln=function(c){var u=c.minX,d=c.minY,p=c.maxX,y=c.maxY;return[{x:u,y:d},{x:p,y:d},{x:p,y},{x:u,y}]},An=function(c,u){var d=c.x,p=c.y;return d<u.minX||d>u.maxX||p<u.minY||p>u.maxY},Xt=function(c,u){return u<c.minX||u>c.maxX?[]:[{x:u,y:c.minY},{x:u,y:c.maxY}]},kn=function(c,u){return u<c.minY||u>c.maxY?[]:[{x:c.minX,y:u},{x:c.maxX,y:u}]},Kt=function(c,u){return Xt(c,u.x).concat(kn(c,u.y))},_n=function(c,u){return Math.abs(c.x-u.x)+Math.abs(c.y-u.y)},Yt=function(c,u){var d=0;return u.forEach((function(p){p&&(c.x===p.x&&(d+=-2),c.y===p.y&&(d+=-2))})),d},xn=function(c,u,d,p,y){return _n(c,u)+_n(c,d)+Yt(c,[u,d,p,y])},ar=function c(u,d,p,y,g){g||(g=0),u.unshift(d[y]),p[y]&&p[y]!==y&&g<=100&&c(u,d,p,p[y],g+1)},xr=function(c,u){var d=c.indexOf(u);d>-1&&c.splice(d,1)},on=function(c,u,d,p){var y=u.x-c.x,g=u.y-c.y,b=p.x-d.x,A=p.y-d.y,N=(-g*(c.x-d.x)+y*(c.y-d.y))/(-b*g+y*A),V=(b*(c.y-d.y)-A*(c.x-d.x))/(-b*g+y*A);return N>=0&&N<=1&&V>=0&&V<=1},Zt=function(c,u,d){if(d.width===0&&d.height===0)return!1;var p=yt(ln(d),4),y=p[0],g=p[1],b=p[2],A=p[3];return on(c,u,y,g)||on(c,u,y,A)||on(c,u,g,b)||on(c,u,b,A)},Ht=function(c,u,d,p){var y=[];return c.forEach((function(g){g!==u&&(g.x!==u.x&&g.y!==u.y||Zt(g,u,d)||Zt(g,u,p)||y.push(g))})),Mt(y)},pr=function(c,u,d,p,y,g,b){var A=[],N=[u],V={},H={},oe={};H[u.id]=0,oe[u.id]=xn(u,d,u);var ue={};c.forEach((function(qe){ue[qe.id]=qe}));for(var Ne=function(){var qe=void 0,Ot=1/0;if(N.forEach((function(Ft){oe[Ft.id]<Ot&&(Ot=oe[Ft.id],qe=Ft)})),qe===d){var xt=[];return ar(xt,ue,V,d.id),{v:xt}}xr(N,qe),A.push(qe),Ht(c,qe,p,y).forEach((function(Ft){if(A.indexOf(Ft)===-1){N.indexOf(Ft)===-1&&N.push(Ft);var vn=oe[qe.id]+_n(qe,Ft);H[Ft.id]&&vn>=H[Ft.id]||(V[Ft.id]=qe.id,H[Ft.id]=vn,oe[Ft.id]=H[Ft.id]+xn(Ft,d,u,g,b))}}))};N.length;){var Ve=Ne();if(Dt(Ve)==="object")return Ve.v}return[u,d]},Dr=function(c){return mi(c)},Un=function(c){for(var u=1;u<c.length-1;){var d=c[u-1],p=c[u],y=c[u+1];d.x===p.x&&p.x===y.x||d.y===p.y&&p.y===y.y?c.splice(u,1):u++}return c},$r=function(c,u,d,p,y){var g=Dr(d),b=Dr(p),A=hn(g,y),N=hn(b,y),V=Wt
|
|||
|
|
L`).concat(g.rightX," ").concat(g.rightY,`
|
|||
|
|
L`).concat(b.rightX," ").concat(b.rightY,`
|
|||
|
|
L`).concat(b.leftX," ").concat(b.leftY," z")}return{d:u,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},zi=function(c){var u=c.start,d=c.end,p=c.sourceNode,y=c.targetNode,g=c.offset,b=mi(p),A=mi(y),N=hn(b,g),V=hn(A,g);return{sNext:Wt(N,b,u),ePre:Wt(V,A,d)}},di=function(c){var u=c.replace(/M/g,"").replace(/C/g,",").split(",");return[Cr(u[0]),Cr(u[1]),Cr(u[2]),Cr(u[3])]},Cr=function(c){var u=yt(c.replace(/(^\s*)/g,"").split(" "),2);return{x:+u[0],y:+u[1]}},sa=function(c,u){var d=yt(c,4);return[Ni(d[0],d[1],d[2],d[3],u),c[3]]},co=function(c,u){for(var d,p=c.x,y=c.y,g=jr(u),b=Number.MAX_SAFE_INTEGER,A=[],N=0;N<g.length;N++)A.push({start:g[N],end:g[(N+1)%g.length]});if(A.forEach((function(ue){var Ne=ue.start,Ve=ue.end;if(Ne.x===Ve.x){var qe={x:Ne.x,y};if(Ra(qe,Ne,Ve)){var Ot=Math.abs(Ne.x-p);Ot<b&&(b=Ot,d=qe)}}else if(Ne.y===Ve.y){var xt={x:p,y:Ne.y};if(Ra(xt,Ne,Ve)){var Ft=Math.abs(Ne.y-y);Ft<b&&(b=Ft,d=xt)}}})),!d){var V=A[0],H=V.start,oe=V.end;d={x:H.x+(oe.x-H.x)/2,y:H.y+(oe.y-H.y)/2}}return d},cr=function(c){return cs(c,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Xr=function(c,u){return Math.sqrt(Math.pow(c.x-u.x,2)+Math.pow(c.y-u.y,2))};function Nr(c,u){return typeof u!="function"?function(d,p,y){return Object.assign({type:c.edgeType},y)}:function(d,p,y){var g=u(d,p,y);return g?typeof g=="string"?Object.assign({},y,{type:g}):Object.assign({type:g},y):{type:c.edgeType}}}r(208);var fi=function(){};function $s(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function yi(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var Ce=(function(){function c(p){var y=this,g=p.onDragStart,b=g===void 0?fi:g,A=p.onDragging,N=A===void 0?fi:A,V=p.onDragEnd,H=V===void 0?fi:V,oe=p.eventType,ue=oe===void 0?"":oe,Ne=p.eventCenter,Ve=Ne===void 0?null:Ne,qe=p.step,Ot=qe===void 0?1:qe,xt=p.isStopPropagation,Ft=xt===void 0||xt,vn=p.model,Hn=vn===void 0?null:vn,zn=p.data,Ar=zn===void 0?null:zn;(function(Vn,vr){if(!(Vn instanceof vr))throw new TypeError("Cannot call a class as a function")})(this,c),yi(this,"onDragStart",void 0),yi(this,"onDragging",void 0),yi(this,"onDragEnd",void 0),yi(this,"step",void 0),yi(this,"isStopPropagation",void 0),yi(this,"isDragging",!1),yi(this,"isStartDragging",!1),yi(this,"startX",0),yi(this,"startY",0),yi(this,"sumDeltaX",0),yi(this,"sumDeltaY",0),yi(this,"eventType",void 0),yi(this,"eventCenter",void 0),yi(this,"model",void 0),yi(this,"data",void 0),yi(this,"startTime",void 0),yi(this,"handleMouseDown",(function(Vn){var vr,er,Eo,Co=(vr=window)===null||vr===void 0?void 0:vr.document;if(Vn.button===0){y.isStopPropagation&&Vn.stopPropagation(),y.isStartDragging=!0,y.startX=Vn.clientX,y.startY=Vn.clientY,Co.addEventListener("mousemove",y.handleMouseMove,!1),Co.addEventListener("mouseup",y.handleMouseUp,!1);var zr=(er=y.model)===null||er===void 0?void 0:er.getData();(Eo=y.eventCenter)===null||Eo===void 0||Eo.emit(ur["".concat(y.eventType,"_MOUSEDOWN")],{e:Vn,data:y.data||zr}),y.startTime=new Date().getTime()}})),yi(this,"handleMouseMove",(function(Vn){if(y.isStopPropagation&&Vn.stopPropagation(),y.isStartDragging&&(y.sumDeltaX+=Vn.clientX-y.startX,y.sumDeltaY+=Vn.clientY-y.startY,y.startX=Vn.clientX,y.startY=Vn.clientY,y.step<=1||Math.abs(y.sumDeltaX)>y.step||Math.abs(y.sumDeltaY)>y.step)){var vr,er=y.sumDeltaX%y.step,Eo=y.sumDeltaY%y.step,Co=y.sumDeltaX-er,zr=y.sumDeltaY-Eo;y.sumDeltaX=er,y.sumDeltaY=Eo;var Fo,ma=(vr=y.model)===null||vr===void 0?void 0:vr.getData();y.isDragging||((Fo=y.eventCenter)===null||Fo===void 0||Fo.emit(ur["".concat(y.eventType,"_DRAGSTART")],{e:Vn,data:y.data||ma}),y.onDragStart({event:Vn})),y.isDragging=!0,Promise.resolve().then((function(){var ya,Nl;y.onDragging({deltaX:Co,deltaY:zr,event:Vn}),(ya=y.eventCenter)===null||ya===void 0||ya.emit(ur["".concat(y.eventType,"_MOUSEMOVE")],{e:Vn,data:y.data||ma}),(Nl=y.
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function G(c){return(function(u){if(Array.isArray(u))return ce(u)})(c)||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(c)||ne(c)||(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 ne(c,u){if(c){if(typeof c=="string")return ce(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?ce(c,u):void 0}}function ce(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function Oe(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function Fe(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function et(c,u,d){return u&&Fe(c.prototype,u),c}function jt(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),u&&Tn(c,u)}function Vt(c){var u=an();return function(){var d,p=Br(c);if(u){var y=Br(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return yn(this,d)}}function yn(c,u){if(u&&(x(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yn(c)}function Yn(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Qn(c){var u=typeof Map=="function"?new Map:void 0;return Qn=function(d){if(d===null||(p=d,Function.toString.call(p).indexOf("[native code]")===-1))return d;var p;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(u!==void 0){if(u.has(d))return u.get(d);u.set(d,y)}function y(){return Sr(d,arguments,Br(this).constructor)}return y.prototype=Object.create(d.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),Tn(y,d)},Qn(c)}function Sr(c,u,d){return Sr=an()?Reflect.construct:function(p,y,g){var b=[null];b.push.apply(b,y);var A=new(Function.bind.apply(p,b));return g&&Tn(A,g.prototype),A},Sr.apply(null,arguments)}function an(){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}}function Tn(c,u){return Tn=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Tn(c,u)}function Br(c){return Br=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Br(c)}function ir(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var at,Yr,Ao,Mr,Ur,xa,Hl,uu,Oa,Iu,Pc,th,yv,Fu=(function(c){jt(d,c);var u=Vt(d);function d(){var p;Oe(this,d);for(var y=arguments.length,g=new Array(y),b=0;b<y;b++)g[b]=arguments[b];return ir(Yn(p=u.call(this,g.length)),"rows",void 0),ir(Yn(p),"columns",void 0),p.fill(new Array(3)),g.forEach((function(A,N){p[N]=A})),p.columns=g[0].length,p.rows=g.length,Object.setPrototypeOf(Yn(p),d.prototype),p}return et(d,[{key:"getRow",value:function(p){return this[p]}},{key:"getColumn",value:function(p){return G(this.map((function(y){return y[p]})))}},{key:"transpose",value:function(){for(var p=[],y=0;y<this.columns;y++)p.push(this.getColumn(y));return Sr(d,p)}},{key:"cross",value:function(p){var y=new Array(this.rows).fill("").map((function(){return[]}));if(this.columns===p.rows)for(var g=0;g<this.rows;g++)for(var b=this.getRow(g),A=function(V){var H=p.getColumn(V);y[g][V]=b.reduce((function(oe,ue,Ne){return oe+ue*H[Ne]}),0)},N=0;N<p.columns;N++)A(N);return Sr(d,G(y))}},{key:"to2D",value:function(){return this.map((function(p){return[p[0],p[1]]}))}},{key:"toPoints",value:function(){return this.map((function(p){return new m(p[0],p[1])}))}},{key:"toString",value:function(){var p=C(this[0],2),y=p[0],g=p[1],b=C(this[1],2),A=b[0],N=b[1],V=C(this[2],2),H=V[0],oe=V[1];return"matrix(".concat(y," ").concat(g,
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Rc(c){return(function(u){if(Array.isArray(u))return gE(u)})(c)||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(c)||wv(c)||(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 wv(c,u){if(c){if(typeof c=="string")return gE(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?gE(c,u):void 0}}function gE(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function pb(c){return pb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},pb(c)}function Bu(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function v5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Dc(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Tr(c,u,d,p,y){var g={};return Object.keys(p).forEach((function(b){g[b]=p[b]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=d.slice().reverse().reduce((function(b,A){return A(c,u,b)||b}),g),y&&g.initializer!==void 0&&(g.value=g.initializer?g.initializer.call(y):void 0,g.initializer=void 0),g.initializer===void 0&&(Object.defineProperty(c,u,g),g=null),g}var lT,sT=200,uT=(at=(function(){function c(p){(function(Ne,Ve){if(!(Ne instanceof Ve))throw new TypeError("Cannot call a class as a function")})(this,c),Dc(this,"rootEl",void 0),Bu(this,"width",Yr,this),Bu(this,"height",Ao,this),Dc(this,"theme",void 0),Dc(this,"eventCenter",void 0),Dc(this,"modelMap",new Map),Dc(this,"topElement",void 0),Dc(this,"animation",void 0),Dc(this,"idGenerator",void 0),Dc(this,"edgeGenerator",void 0),Dc(this,"nodeMoveRules",[]),Dc(this,"customTrajectory",void 0),Bu(this,"edgeType",Mr,this),Bu(this,"nodes",Ur,this),Bu(this,"edges",xa,this),Bu(this,"overlapMode",Hl,this),Bu(this,"background",uu,this),Bu(this,"transformModel",Oa,this),Bu(this,"editConfigModel",Iu,this),Bu(this,"gridSize",Pc,this),Bu(this,"partial",th,this),Bu(this,"fakerNode",yv,this);var y,g=p.container,b=p.background,A=b===void 0?{}:b,N=p.grid,V=p.idGenerator,H=p.edgeGenerator,oe=p.animation,ue=p.customTrajectory;this.background=A,pb(N)==="object"&&(this.gridSize=N.size),this.rootEl=g,this.editConfigModel=new Cp(p),this.eventCenter=new Up,this.transformModel=new Jh(this.eventCenter,p),this.theme=iu(p.style),this.edgeType=p.edgeType||"polyline",this.width=p.width,this.height=p.height,this.animation=(y=oe)&&typeof y!="boolean"?bc(Uo(_v),y):Uo(y===!0?Ey:_v),this.partial=p.partial,this.overlapMode=p.overlapMode||0,this.idGenerator=V,this.customTrajectory=ue,this.edgeGenerator=Nr(this,H),this.width=p.width||this.rootEl.getBoundingClientRect().width,this.height=p.height||this.rootEl.getBoundingClientRect().height,this.flowId=tl()}var u,d;return u=c,d=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(p,y,g){return p[y.id]={index:g,model:y},p}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(p,y,g){return p[y.id]={index:g,model:y},p}),{})}},{key:"modelsMap",get:function(){return[].concat(Rc(this.nodes),Rc(this.edges)).reduce((function(p,y){return p[y.id]=y,p}),{})}},{key:"sortElements",get:function(){var p=[];this.nodes.forEach((function(V){return p.push(V)})),this.edges.forEach((function(V){return p.push(V)})),p=p.sort((function(V,H){return V.zIndex-H.zIndex}));for(var y=[],g=[-200,-200],b=[this.width+sT,this.height+sT],A=0;A<p.length;A++){var N=p[A];N.visible&&(!this.partial||N.isSelected||this.isElementInArea(N,g,b,!1,!1))&&y.push(N)}return y}},{key:"textEditElement",get:function(){var p=this.nodes.find((function(g){return g.state===Io.TEXT_EDIT})),y=this.edges.find((function(g){return g.state===Io.TEXT_EDIT}));retu
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function hT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var vT,Fg=function(c){var u={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(c).forEach((function(d){var p=L5(d,2),y=p[0],g=p[1];(y==="style"||AE(g)!=="object")&&(u[y]=g)})),Object(re.g)("line",u)};function ME(c){return ME=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},ME(c)}function gT(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function yb(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?gT(Object(d),!0).forEach((function(p){I5(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):gT(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function I5(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function F5(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function B5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function TE(c,u){return TE=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},TE(c,u)}function $5(c){var u=(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 d,p=_b(c);if(u){var y=_b(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return U5(this,d)}}function U5(c,u){if(u&&(ME(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function _b(c){return _b=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},_b(c)}var mT,V5=Fc(vT=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&TE(g,b)})(y,c);var u,d,p=$5(y);function y(){return F5(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"render",value:function(){var g=this.props.snaplineModel,b=g.position,A=g.isShowHorizontal,N=g.isShowVertical,V=g.getStyle(),H=b.x,oe=H===void 0?0:H,ue=b.y,Ne=ue===void 0?0:ue,Ve=yb(yb({x1:-1e5,y1:Ne,x2:1e5,y2:Ne},V),{},{stroke:A?V.stroke:"none"}),qe=yb(yb({x1:oe,y1:-1e5,x2:oe,y2:1e5},V),{},{stroke:N?V.stroke:"none"});return Object(re.g)("g",{className:"lf-snapline"},Object(re.g)(Fg,Ve),Object(re.g)(Fg,qe))}}])&&B5(u.prototype,d),y})(re.a))||vT;function CE(c){return CE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},CE(c)}function W5(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return yT(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.construct
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function yT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function rh(c){var u=c.x,d=c.y,p=c.width,y=c.height,g=c.className,b=c.radius,A=u-p/2,N=d-y/2,V={};return Object.entries(c).forEach((function(H){var oe=W5(H,2),ue=oe[0],Ne=oe[1];CE(Ne)!=="object"&&(V[ue]=Ne)})),V.className=g?"lf-basic-shape ".concat(g):"lf-basic-shape",b&&(V.rx=b,V.ry=b),V.x=A,V.y=N,Object(re.g)("rect",V)}function NE(c){return NE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},NE(c)}function Bg(){return Bg=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},Bg.apply(this,arguments)}function _T(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function bT(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?_T(Object(d),!0).forEach((function(p){G5(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):_T(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function G5(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function z5(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function H5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function kE(c,u){return kE=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},kE(c,u)}function X5(c){var u=(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 d,p=bb(c);if(u){var y=bb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return Y5(this,d)}}function Y5(c,u){if(u&&(NE(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function bb(c){return bb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},bb(c)}rh.defaultProps={className:"",radius:""};var wT,q5=Fc(mT=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&kE(g,b)})(y,c);var u,d,p=X5(y);function y(){return z5(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getNodesOutline",value:function(){var g=this.props.graphModel,b=g.nodes,A=g.editConfigModel,N=A.hoverOutline,V=A.nodeSelectedOutline,H=[];return b.forEach((function(oe){if(oe.isHovered||oe.isSelected){var ue=oe.isHovered,Ne=oe.isSelected,Ve=oe.x,qe=oe.y,Ot=oe.width,xt=oe.height;if(V&&Ne||N&&ue){var Ft=oe.getOutlineStyle(),vn={};if(Object.keys(Ft).forEach((function(zn){zn!=="hover"&&(vn[zn]=Ft[zn])})),ue){var Hn=Ft.hover;vn=bT(bT({},vn),Hn)}H.push(Object(re.g)(rh,Bg({transform:oe.transform,className:"lf-outline-node",x:Ve,y:qe,width:Ot+10,height:xt+10},vn)))}}})),H}},{key:"getEdgeOutline",value:function(){for(var g=this.props.graphModel,b=g.edges,A=g.editConfigModel,N=A.edgeSelectedOutline,V=A.hoverOutline,H=[],oe=0;oe<b.length;oe++){var ue=b[oe];(N&&ue.isSelected||V&&ue.isHovered)&&(ue.modelType===lo.LINE_EDGE?H.push(this.get
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ET(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function $g(c){var u=c.x,d=u===void 0?0:u,p=c.y,y=p===void 0?0:p,g=c.r,b=g===void 0?4:g,A=c.className,N={cx:d,cy:y,r:b,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(c).forEach((function(V){var H=K5(V,2),oe=H[0],ue=H[1];PE(ue)!=="object"&&(N[oe]=ue)})),N.className=A?"lf-basic-shape ".concat(A):"lf-basic-shape",Object(re.g)("circle",N)}function RE(c){return RE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},RE(c)}function Z5(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return xT(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return xT(d,p)}})(c,u)||(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 xT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function xy(){return xy=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},xy.apply(this,arguments)}function OT(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function J5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function ST(c,u,d){return u&&J5(c.prototype,u),c}function AT(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),u&&DE(c,u)}function DE(c,u){return DE=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},DE(c,u)}function MT(c){var u=(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 d,p=Eb(c);if(u){var y=Eb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return Q5(this,d)}}function Q5(c,u){if(u&&(RE(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wb(c)}function wb(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Eb(c){return Eb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Eb(c)}function jE(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var TT,CT=(function(c){AT(d,c);var u=MT(d);function d(){var p;return OT(this,d),jE(wb(p=u.call(this)),"dragHandler",void 0),jE(wb(p),"onDragging",(function(y){var g=y.event,b=p.props,A=b.graphModel,N=b.bezierModel,V=b.type,H=A.getPointByClient({x:g.clientX,y:g.clientY}).canvasOverlayPosition,oe=H.x,ue=H.y;N.updateAdjustAnchor({x:oe,y:ue},V),A.eventCenter.emit(ur.EDGE_ADJUST,{data:N.getData()})})),jE(wb(p),"onDragEnd",(function(){p.props.bezierModel.isDragging=!1})),p.dragHandler=new Ce({onDragging:p.onDragging,onDragEnd:p.onDragEnd}),p}return ST(d,[{key:"render",value:function(){var p=this,y=this.props.position,g=y.x,b=y.y,A=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(re.g)($g,xy({className:"lf-bezier-adjust-anchor",x:g,y:b},A,{onMouseDown:function(N){p.dragHandler.handleMouseDown(N)}}))}}]),d})(re.a),e6=Fc(wT=(function(c){AT(d,c);var u=MT(d);function d(){return OT(this,d),u.apply(this,arguments)}return ST(d,[{key:"getBezierAdjust",value:function(p,y){var g=p.path,b=p.id,A=Z5(di(g),4),N=A[0],V=A[1],H=A[2],oe=A[3],ue=p.getEdgeStyle().adjustLine,Ne=[];return Ne.push(Object(re.g)(Fg,xy({x1:N.x,y1:N.y,x2:V.x,y2:V.y},ue))),Ne.push(Object(re.g)(CT,{position:V,bezierModel:p,graphModel:y,key:"".concat(b,"_ePre"),type:"sNext"})),Ne.push(Object(re.g)(Fg,xy({x1:oe.x,y1:oe.y,x2:H.x,y2:H.y},ue))),Ne.push(Object(re.g)(CT,{position:H,bezierModel:p,graphModel:y,key:"".concat(b,"_sNext"),type:"ePre"})),Ne}},{key:"selectedBezierEdge",value:function(){for(var p=this.props.graphModel,y=p.edges,g=[],b=0;b<y.length;b++){var A=y[b];A.isSelected&&A.modelType===lo.BEZIER_EDGE&&A.draggable&&g.push(this.getBezierAdjust(A,p))}return g}},{key:"render",value:function(){return Object(re.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),d})(re.a))||wT;function LE(c){return LE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},LE(c)}function t6(c,u){if(!(c instanceof u))throw new TypeError("Canno
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function jT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function LT(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Ab(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?LT(Object(d),!0).forEach((function(p){IT(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):LT(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function h6(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function v6(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function g6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Oy(){return Oy=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=m6(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},Oy.apply(this,arguments)}function m6(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=oh(c))!==null;);return c}function WE(c,u){return WE=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},WE(c,u)}function y6(c){var u=(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 d,p=oh(c);if(u){var y=oh(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return _6(this,d)}}function _6(c,u){if(u&&(UE(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mb(c)}function Mb(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function oh(c){return oh=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},oh(c)}function IT(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function jc(c,u,d,p,y){var g={};return Object.keys(p).forEach((function(b){g[b]=p[b]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=d.slice().reverse().reduce((function(b,A){return A(c,u,b)||b}),g),y&&g.initializer!==void 0&&(g.value=g.initializer?g.initializer.call(y):void 0,g.initializer=void 0),g.initializer===void 0&&(Object.defineProperty(c,u,g),g=null),g}var GE=(Zo=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&WE(g,b)})(y,c);var u,d,p=y6(y);function y(){var g;v6(this,y);for(var b=arguments.length,A=new Array(b),N=0;N<b;N++)A[N]=arguments[N];return IT(Mb(g=p.call.apply(p,[this].concat(A))),"modelType",lo.BEZIER_EDGE),h6(Mb(g),"path",RT,Mb(g)),g}return u=y,(d=[{key:"initEdgeData",value:function(g){this.offset=100,Oy(oh(y.prototype),"initEdgeData",this).call(this,g)}},{key:"getEdgeStyle",value:function(){var g=this.graphModel.theme.bezier;return Ab(Ab({},Oy(oh(y.prototype),"getEdgeStyle",this).call(this)),Uo(g))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var g=0,b=0;return this.pointsList.forEach((function(A){var N=A.x,V=A.y;g+=N,b+=V})),{x:g/this.pointsList.length,y:b/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},
|
|||
|
|
C `).concat(N.x," ").concat(N.y,`,
|
|||
|
|
`).concat(V.x," ").concat(V.y,`,
|
|||
|
|
`).concat(H.x," ").concat(H.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var g=this.getControls(),b=g.sNext,A=g.ePre;this.updatePath(b,A)}},{key:"updatePath",value:function(g,b){g=Uo(g),b=Uo(b);var A={x:this.startPoint.x,y:this.startPoint.y},N={x:this.endPoint.x,y:this.endPoint.y};if(!g||!b){var V=this.getControls();g=V.sNext,b=V.ePre}this.pointsList=[A,g,b,N],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(g){this.startPoint=Object.assign({},g),this.updatePoints()}},{key:"updateEndPoint",value:function(g){this.endPoint=Object.assign({},g),this.updatePoints()}},{key:"moveStartPoint",value:function(g,b){this.startPoint.x+=g,this.startPoint.y+=b;var A=VE(this.pointsList,3),N=A[1],V=A[2];N.x+=g,N.y+=b,this.updatePath(N,V)}},{key:"moveEndPoint",value:function(g,b){this.endPoint.x+=g,this.endPoint.y+=b;var A=VE(this.pointsList,3),N=A[1],V=A[2];V.x+=g,V.y+=b,this.updatePath(N,V)}},{key:"updateAdjustAnchor",value:function(g,b){b==="sNext"?this.pointsList[1]=g:b==="ePre"&&(this.pointsList[2]=g),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 g=this.pointsList;return g[g.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(g){var b=g.startPoint,A=g.endPoint,N=g.sourceNode,V=g.targetNode,H=zi({start:b,end:A,sourceNode:N,targetNode:V,offset:this.offset}),oe=H.sNext,ue=H.ePre;this.pointsList=[b,oe,ue,A],this.initPoints()}}])&&g6(u.prototype,d),y})(If),RT=jc(Zo.prototype,"path",[a.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),jc(Zo.prototype,"initPoints",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"initPoints"),Zo.prototype),jc(Zo.prototype,"updatePoints",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updatePoints"),Zo.prototype),jc(Zo.prototype,"updateStartPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateStartPoint"),Zo.prototype),jc(Zo.prototype,"updateEndPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateEndPoint"),Zo.prototype),jc(Zo.prototype,"moveStartPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"moveStartPoint"),Zo.prototype),jc(Zo.prototype,"moveEndPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"moveEndPoint"),Zo.prototype),jc(Zo.prototype,"updateAdjustAnchor",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateAdjustAnchor"),Zo.prototype),jc(Zo.prototype,"getAdjustStart",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"getAdjustStart"),Zo.prototype),jc(Zo.prototype,"getAdjustEnd",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"getAdjustEnd"),Zo.prototype),jc(Zo.prototype,"updateAfterAdjustStartAndEnd",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateAfterAdjustStartAndEnd"),Zo.prototype),Zo),Dn,FT,BT,$T,UT,VT,WT,GT,zT,HT,XT,YT,qT,KT,ZT,JT,QT,eC,tC,nC,rC,oC,iC,b6=function(c){return c==null};function w6(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||aC(c,u)||(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 zE(c){return zE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},zE(c)}function aC(c,u){if(c){if(typeof c=="string")return lC(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?lC(c,u):void 0}}function lC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function sC(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function ys(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?sC(Object(d),!0).forEach((function(p){Us(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):sC(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function Sa(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function E6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Us(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function fo(c,u,d,p,y){var g={};return Object.keys(p).forEach((function(b){g[b]=p[b]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=d.slice().reverse().reduce((function(b,A){return A(c,u,b)||b}),g),y&&g.initializer!==void 0&&(g.value=g.initializer?g.initializer.call(y):void 0,g.initializer=void 0),g.initializer===void 0&&(Object.defineProperty(c,u,g),g=null),g}var Hf,uC,Xf=(Dn=(function(){function c(p,y){(function(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")})(this,c),Us(this,"id",""),Sa(this,"type",FT,this),Sa(this,"x",BT,this),Sa(this,"y",$T,this),Sa(this,"text",UT,this),Sa(this,"properties",VT,this),Sa(this,"_width",WT,this),Sa(this,"_height",GT,this),Sa(this,"anchorsOffset",zT,this),Sa(this,"isSelected",HT,this),Sa(this,"isHovered",XT,this),Sa(this,"isShowAnchor",YT,this),Sa(this,"isDragging",qT,this),Sa(this,"isHitable",KT,this),Sa(this,"draggable",ZT,this),Sa(this,"visible",JT,this),Sa(this,"enableRotate",QT,this),Us(this,"virtual",!1),Us(this,"graphModel",void 0),Sa(this,"zIndex",eC,this),Sa(this,"state",tC,this),Sa(this,"autoToFront",nC,this),Sa(this,"style",rC,this),Sa(this,"transform",oC,this),Sa(this,"_rotate",iC,this),Us(this,"BaseType",ei.NODE),Us(this,"modelType",lo.NODE),Us(this,"additionStateData",void 0),Us(this,"targetRules",[]),Us(this,"sourceRules",[]),Us(this,"moveRules",[]),Us(this,"hasSetTargetRules",!1),Us(this,"hasSetSourceRules",!1),this.graphModel=y,this.initNodeData(p),this.setAttributes()}var u,d;return u=c,d=[{key:"width",get:function(){return this._width},set:function(p){this._width=p}},{key:"height",get:function(){return this._height},set:function(p){this._height=p}},{key:"rotate",get:function(){return this._rotate},set:function(p){this._rotate=p;var y=this.x,g=y===void 0?0:y,b=this.y,A=b===void 0?0:b;this.transform=new nh(-g,-A).rotate(p).translate(g,A).toString()}},{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(p){if(p.properties||(p.properties={}),!p.id){var y=this.graphModel.idGenerator,g=
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ot,xt=!0,Ft=!1;return{s:function(){Ne=Ne.call(oe)},n:function(){var vn=Ne.next();return xt=vn.done,vn},e:function(vn){Ft=!0,Ot=vn},f:function(){try{xt||Ne.return==null||Ne.return()}finally{if(Ft)throw Ot}}}})(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(N.s();!(g=N.n()).done;){var V=(0,g.value)(this,p,y);if(!V)return!1;if(zE(V)==="object"){var H=V;if(H.x===!1&&H.y===!1)return!1;b=b&&H.x,A=A&&H.y}}}catch(oe){N.e(oe)}finally{N.f()}return{x:b,y:A}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var p=this.anchorsOffset,y=this.id,g=this.x,b=this.y;return p&&p.length>0?p.map((function(A,N){return A.length?(A=A,{id:"".concat(y,"_").concat(N),x:g+A[0],y:b+A[1]}):ys(ys({},A=A),{},{x:g+A.x,y:b+A.y,id:A.id||"".concat(y,"_").concat(N)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(p){return(function(y,g){for(var b,A=Kp(g),N=Number.MAX_SAFE_INTEGER,V=0;V<A.length;V++){var H=gs(y.x,y.y,A[V].x,A[V].y);H<N&&(N=H,b={index:V,anchor:Fs(Fs({},A[V]),{},{x:A[V].x,y:A[V].y,id:A[V].id})})}return b})(p,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(){var p=this.getAnchorsByOffset(),y=this.x,g=this.y,b=this.rotate;return p.forEach((function(A){var N=A.x,V=A.y,H=w6(new Fu([N,V,1]).translate(-y,-g).rotate(b).translate(y,g)[0],2),oe=H[0],ue=H[1];A.x=oe,A.y=ue})),p}},{key:"getAnchorInfo",value:function(p){if(!b6(p))for(var y=0;y<this.anchors.length;y++){var g=this.anchors[y];if(g.id===p)return g}}},{key:"addNodeMoveRules",value:function(p){this.moveRules.includes(p)||this.moveRules.push(p)}},{key:"move",value:function(p,y){var g=arguments.length>2&&arguments[2]!==void 0&&arguments[2],b=!1,A=!1;if(g)b=!0,A=!0;else{var N=this.isAllowMoveNode(p,y);typeof N=="boolean"?(b=N,A=N):(b=N.x,A=N.y)}if(b){var V=this.x+p;this.x=V,this.text&&this.moveText(p,0)}if(A){var H=this.y+y;this.y=H,this.text&&this.moveText(0,y)}return b||A}},{key:"getMoveDistance",value:function(p,y){var g=arguments.length>2&&arguments[2]!==void 0&&arguments[2],b=!1,A=!1,N=0,V=0;if(g)b=!0,A=!0;else{var H=this.isAllowMoveNode(p,y);typeof H=="boolean"?(b=H,A=H):(b=H.x,A=H.y)}if(b&&p){var oe=this.x+p;this.x=oe,this.text&&this.moveText(p,0),N=p}if(A&&y){var ue=this.y+y;this.y=ue,this.text&&this.moveText(0,y),V=y}return[N,V]}},{key:"moveTo",value:function(p,y){var g=arguments.length>2&&arguments[2]!==void 0&&arguments[2],b=p-this.x,A=y-this.y;return!(!g&&!this.isAllowMoveNode(b,A)||(this.text&&this.text&&this.moveText(b,A),this.x=p,this.y=y,0))}},{key:"moveText",value:function(p,y){var g=this.text,b=g.x,A=g.y,N=g.value,V=g.draggable,H=g.editable;this.text={value:N,editable:H,draggable:V,x:b+p,y:A+y}}},{key:"updateText",value:function(p){this.text=ys(ys({},Object(a.I)(this.text)),{},{value:p})}},{key:"setSelected",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=p}},{key:"setHovered",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=p,this.setIsShowAnchor(p)}},{key:"setIsShowAnchor",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=p}},{key:"setEnableRotate",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.enableRotate=p}},{key:"setHitable",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=p}},{key:"setElementState",value:function(p,y){this.state=p,this.additionStateData=y}},{key:"setProperty",value:function(p,y){this.properties=ys(ys({},Object(a.I)(this.properties)),{},Us({},p,ga(y))),this.setAttributes()}},{key:"setProperties",value:function(p){this.properties=ys(ys({},Object(a.I)(this.properties)),ga(p)),this.setAttributes()}},{key:"deleteProperty",value:function(p){delete this.properties[p],t
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function vC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function gC(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function mC(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?gC(Object(d),!0).forEach((function(p){_C(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):gC(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function yC(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function C6(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function N6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function QE(){return QE=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=k6(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},QE.apply(this,arguments)}function k6(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=Wg(c))!==null;);return c}function ex(c,u){return ex=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},ex(c,u)}function P6(c){var u=(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 d,p=Wg(c);if(u){var y=Wg(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return R6(this,d)}}function R6(c,u){if(u&&(ZE(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vg(c)}function Vg(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Wg(c){return Wg=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Wg(c)}function _C(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Gg(c,u,d,p,y){var g={};return Object.keys(p).forEach((function(b){g[b]=p[b]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=d.slice().reverse().reduce((function(b,A){return A(c,u,b)||b}),g),y&&g.initializer!==void 0&&(g.value=g.initializer?g.initializer.call(y):void 0,g.initializer=void 0),g.initializer===void 0&&(Object.defineProperty(c,u,g),g=null),g}var Md,bC,wC,tx=(Xl=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&ex(g,b)})(y,c);var u,d,p=P6(y);function y(){var g;C6(this,y);for(var b=arguments.length,A=new Array(b),N=0;N<b;N++)A[N]=arguments[N];return _C(Vg(g=p.call.apply(p,[this].concat(A))),"modelType",lo.DIAMOND_NODE),yC(Vg(g),"rx",pC,Vg(g)),yC(Vg(g),"ry",hC,Vg(g)),g}return u=y,(d=[{key:"getNodeStyle",value:function(){var g=QE(Wg(y.prototype),"getNodeStyle",this).call(this),b=this.graphModel.theme.diamond;return mC(mC({},g),Uo(b))}},{key:"points",get:function(){var g=this.x,b=this.y,A=this.rx,N=this.ry;return[[g,b-N],[g+A,b],[g,b+N],[g-A,b]]}},{key:"pointsPosition",get:function(){return this.points.map((function(g){return{x:g[0],y:g[1]}}))}},{key:"width",get:function(){var g=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(A){var N=JE(A,1)[0];N<g&&(g=N),N>b&&(b=N)})),b-g}},{key
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function MC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function TC(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function CC(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?TC(Object(d),!0).forEach((function(p){NC(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):TC(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function B6(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function $6(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function U6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function sx(){return sx=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=V6(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},sx.apply(this,arguments)}function V6(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=Xg(c))!==null;);return c}function ux(c,u){return ux=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},ux(c,u)}function W6(c){var u=(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 d,p=Xg(c);if(u){var y=Xg(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return G6(this,d)}}function G6(c,u){if(u&&(ax(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nb(c)}function Nb(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Xg(c){return Xg=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Xg(c)}function NC(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function kb(c,u,d,p,y){var g={};return Object.keys(p).forEach((function(b){g[b]=p[b]})),g.enumerable=!!g.enumerable,g.configurable=!!g.configurable,("value"in g||g.initializer)&&(g.writable=!0),g=d.slice().reverse().reduce((function(b,A){return A(c,u,b)||b}),g),y&&g.initializer!==void 0&&(g.value=g.initializer?g.initializer.call(y):void 0,g.initializer=void 0),g.initializer===void 0&&(Object.defineProperty(c,u,g),g=null),g}var cx,kC,dx=($u=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&ux(g,b)})(y,c);var u,d,p=W6(y);function y(){var g;$6(this,y);for(var b=arguments.length,A=new Array(b),N=0;N<b;N++)A[N]=arguments[N];return NC(Nb(g=p.call.apply(p,[this].concat(A))),"modelType",lo.POLYGON_NODE),B6(Nb(g),"points",AC,Nb(g)),g}return u=y,(d=[{key:"getNodeStyle",value:function(){var g=sx(Xg(y.prototype),"getNodeStyle",this).call(this),b=this.graphModel.theme.polygon;return CC(CC({},g),Uo(b))}},{key:"pointsPosition",get:function(){var g=this.x,b=this.y,A=this.width,N=this.height;return this.points.map((function(V){return{x:V[0]+g-A/2,y:V[1]+b-N/2}}))}},{key:"width",get:function(){var g=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(A){var N=lx(A,1)[0];N<g&&(g=N),N>b&&(b=N)})),b-g}},{key:"height",get:function(){var g=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_IN
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function qC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function uF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Sx(c,u){return Sx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Sx(c,u)}function cF(c){var u=(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 d,p=jb(c);if(u){var y=jb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return dF(this,d)}}function dF(c,u){if(u&&(Ox(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Td(c)}function Td(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function jb(c){return jb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},jb(c)}function Cd(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var fF=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&Sx(g,b)})(y,c);var u,d,p=cF(y);function y(){var g;return(function(b,A){if(!(b instanceof A))throw new TypeError("Cannot call a class as a function")})(this,y),Cd(Td(g=p.call(this)),"preTargetNode",void 0),Cd(Td(g),"sourceRuleResults",void 0),Cd(Td(g),"targetRuleResults",void 0),Cd(Td(g),"dragHandler",void 0),Cd(Td(g),"t",void 0),Cd(Td(g),"onDragStart",(function(b){var A=b.event,N=g.props,V=N.anchorData,H=N.nodeModel,oe=N.graphModel;oe.overlapMode,oe.selectNodeById(H.id),H.autoToFront&&oe.toFront(H.id),oe.eventCenter.emit(ur.ANCHOR_DRAGSTART,{data:V,e:A,nodeModel:H}),g.setState({startX:V.x,startY:V.y,endX:V.x,endY:V.y})})),Cd(Td(g),"onDragging",(function(b){var A=b.event,N=g.props,V=N.graphModel,H=N.nodeModel,oe=N.anchorData,ue=V.transformModel,Ne=V.eventCenter,Ve=V.width,qe=V.height,Ot=V.editConfigModel,xt=Ot.autoExpand,Ft=Ot.stopMoveGraph,vn=A.clientX,Hn=A.clientY,zn=V.getPointByClient({x:vn,y:Hn}),Ar=zn.domOverlayPosition,Vn=Ar.x,vr=Ar.y,er=zn.canvasOverlayPosition,Eo=er.x,Co=er.y;g.t&&Db(g.t);var zr=[];Vn<10?zr=[10,0]:Vn+10>Ve?zr=[-10,0]:vr<10?zr=[0,10]:vr+10>qe&&(zr=[0,-10]),g.setState({endX:Eo,endY:Co,dragging:!0}),g.moveAnchorEnd(Eo,Co),zr.length>0&&!Ft&&xt&&(g.t=XC((function(){var Fo=sF(zr,2),ma=Fo[0],ya=Fo[1];ue.translate(ma,ya);var Nl=g.state,fu=Nl.endX,pu=Nl.endY;g.setState({endX:fu-ma,endY:pu-ya}),g.moveAnchorEnd(fu-ma,pu-ya)}))),Ne.emit(ur.ANCHOR_DRAG,{data:oe,e:A,nodeModel:H})})),Cd(Td(g),"onDragEnd",(function(b){var A=b.event;g.t&&Db(g.t);var N=g.checkEnd(A);g.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),g.sourceRuleResults.clear(),g.targetRuleResults.clear();var V=g.props,H=V.graphModel,oe=V.nodeModel,ue=V.anchorData;H.eventCenter.emit(ur.ANCHOR_DRAGEND,{data:ue,e:A,nodeModel:oe,edgeModel:N})})),Cd(Td(g),"checkEnd",(function(b){var A=g.props,N=A.graphModel,V=A.nodeModel,H=A.anchorData,oe=H.x,ue=H.y,Ne=H.id,Ve=(N.edgeType,g.state),qe=Ve.endX,Ot=Ve.endY,xt=Ve.dragging,Ft=Cf({x:qe,y:Ot},N);if(g.preTargetNode&&g.preTargetNode.state!==Io.DEFAULT&&g.preTargetNode.setElementState(Io.DEFAULT),xt&&Ft&&Ft.node){var vn=Ft.node,Hn=Ft.anchor.id,zn="".concat(V.id,"_").concat(vn.id,"_").concat(Hn,"_").concat(Ne),Ar=g.sourceRuleResults.get(zn)||{},Vn=Ar.isAllPass,vr=Ar.msg,er=g.targetRuleResults.get(zn)||{},Eo=er.isAllPass,Co=er.msg;if(Vn&&Eo){vn.setElementState(Io.DEFAULT);var zr=N.edgeGenerator(V.getData(),N.getNodeModelById(Ft.node.id).getData()),Fo=N.addEdge(Ty(Ty({},zr),{},{
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ZC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function JC(c){var u=c.x,d=u===void 0?0:u,p=c.y,y=p===void 0?0:p,g=c.value,b=c.fontSize,A=c.fill,N=A===void 0?"currentColor":A,V=c.overflowMode,H=V===void 0?"default":V,oe=c.textWidth,ue=oe===void 0?"":oe,Ne=c.model,Ve={textAnchor:"middle","dominant-baseline":"middle",x:d,y,fill:N};if(Object.entries(c).forEach((function(Hn){var zn=vF(Hn,2),Ar=zn[0],Vn=zn[1];Ax(Vn)!=="object"&&(Ve[Ar]=Vn)})),g){var qe=String(g).split(/[\r\n]/g),Ot=qe.length;if(H!=="default"){var xt=Ne.BaseType,Ft=Ne.modelType;if(xt===ei.NODE&&Ft!==lo.TEXT_NODE||xt===ei.EDGE&&ue)return(function(Hn){var zn=Hn.value,Ar=Hn.fontSize,Vn=Hn.model,vr=Hn.fontFamily,er=vr===void 0?"":vr,Eo=Hn.lineHeight,Co=Hn.wrapPadding,zr=Co===void 0?"0, 0":Co,Fo=Hn.overflowMode,ma=Hn.x,ya=Hn.y,Nl=Vn.width,fu=Vn.textHeight,pu=Hn.textWidth||Nl,Pd=String(zn).split(/[\r\n]/g),Av=Pd.length,a0=Df({rows:Pd,style:{fontSize:"".concat(Ar,"px"),width:"".concat(pu,"px"),fontFamily:er,lineHeight:Eo,padding:zr},rowsLength:Av,className:"lf-get-text-height"}),Mv=Vn.height>a0?Vn.height:a0;fu&&(Mv=fu);var sh=Fo==="ellipsis";return sh&&(Mv=Ar+2),Object(re.g)("g",null,Object(re.g)("foreignObject",{width:pu,height:Mv,x:ma-pu/2,y:ya-Mv/2},Object(re.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:Mv,width:pu,padding:zr}},Object(re.g)("div",{className:sh?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:sh?Pd.join(""):"",style:pF({},Hn)},Pd.map((function(uh){return Object(re.g)("div",{className:"lf-node-text--auto-wrap-inner"},uh)}))))))})(c)}if(Ot>1){var vn=qe.map((function(Hn,zn){var Ar=(zn-(Ot-1)/2)*(b+2);return Object(re.g)("tspan",{className:"lf-text-tspan",x:d,y:y+Ar},Hn)}));return Object(re.g)("text",Ve,vn)}return Object(re.g)("text",Ve,g)}}function Mx(c){return Mx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Mx(c)}function Tx(){return Tx=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},Tx.apply(this,arguments)}function gF(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return QC(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return QC(d,p)}})(c,u)||(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 QC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function mF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Cx(c,u){return Cx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Cx(c,u)}function yF(c){var u=(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 d,p=Lb(c);if(u){var y=Lb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return _F(this,d)}}function _F(c,u){if(u&&(Mx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ah(c)}function ah(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Lb(c){return Lb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Lb(c)}function Ev(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var eN=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&Cx(g,b)})(y,c);var u,d,p=yF(y);function y(g){var b;(function(N,V){if(!(N instanceof V))throw new TypeError("Cannot call a class as a function")})(this,y),Ev(ah(b=p.call(this)),"dragHandler",void 0),Ev(ah(b),"sumDeltaX",0),Ev(ah(b),"sumDeltaY",0),Ev(ah(b),"stepDrag",void 0),Ev(ah(b),"onDragging",(function(N){var V=N.deltaX,H=N.deltaY,oe=b.props,ue=oe.model,Ne=gF(oe.graphModel.transformModel.fixDeltaXY(V,H),2),Ve=Ne[0],qe=Ne[1];ue.moveText(Ve,qe)})),Ev(ah(b),"dblClickHandler",(function(){b.props.editable&&b.props.model.setElementState(Io.TEXT_EDIT)})),Ev(ah(b),"mouseDownHandle",(function(N){var V=b.props,H=V.draggable,oe=V.model,ue=V.graphModel.editConfigModel.nodeTextDraggable;(H||ue)&&(b.stepDrag.model=oe,b.stepDrag.handleMouseDown(N))})),g.model;var A=g.draggable;return b.stepDrag=new Ce({onDragging:b.onDragging,step:1,isStopPropagation:A}),b}return u=y,(d=[{key:"getShape",value:function(){var g=this.props,b=g.model,A=g.graphModel,N=b.text,V=A.editConfigModel,H=N.value,oe=N.x,ue=N.y,Ne=N.editable,Ve=N.draggable,qe={x:oe,y:ue,className:"",value:H};Ne?qe.className="lf-element-text":Ve||V.nodeTextDraggable?qe.className="lf-text-draggable":qe.className="lf-text-disabled";var Ot=b.getTextStyle();return Object(re.g)(JC,Tx({},qe,Ot,{model:b}))}},{key:"render",value:function(){if(this.props.model.text)return Object(re.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&mF(u.prototype,d),y})(re.a),bF=uc(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null,tN=r(130);function Nx(c){return Nx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Nx(c)}function kx(){return kx=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},kx.apply(this,arguments)}function wF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Px(c,u){return Px=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Px(c,u)}function EF(c){var u=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Ref
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function nN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function rN(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Dx(c,u){return Dx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Dx(c,u)}function MF(c){var u=(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 d,p=$b(c);if(u){var y=$b(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return TF(this,d)}}function TF(c,u){if(u&&(Rx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rl(c)}function rl(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function $b(c){return $b=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},$b(c)}function pl(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var Yf=(function(c){(function(b,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(A&&A.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),A&&Dx(b,A)})(g,c);var u,d,p,y=MF(g);function g(b){var A;(function(ue,Ne){if(!(ue instanceof Ne))throw new TypeError("Cannot call a class as a function")})(this,g),pl(rl(A=y.call(this)),"t",void 0),pl(rl(A),"moveOffset",void 0),pl(rl(A),"stepDrag",void 0),pl(rl(A),"contextMenuTime",void 0),pl(rl(A),"mouseUpDrag",void 0),pl(rl(A),"startTime",void 0),pl(rl(A),"clickTimer",void 0),pl(rl(A),"modelDisposer",void 0),pl(rl(A),"onDragStart",(function(ue){var Ne=ue.event,Ve=Ne.clientX,qe=Ne.clientY,Ot=A.props,xt=Ot.model,Ft=Ot.graphModel.getPointByClient({x:Ve,y:qe}).canvasOverlayPosition,vn=Ft.x,Hn=Ft.y;A.moveOffset={x:xt.x-vn,y:xt.y-Hn}})),pl(rl(A),"onDragging",(function(ue){var Ne=ue.event,Ve=A.props,qe=Ve.model,Ot=Ve.graphModel,xt=Ot.editConfigModel,Ft=xt.stopMoveGraph,vn=xt.autoExpand,Hn=Ot.transformModel,zn=Ot.selectNodes,Ar=Ot.width,Vn=Ot.height,vr=Ot.gridSize;qe.isDragging=!0;var er=Ne.clientX,Eo=Ne.clientY,Co=Ot.getPointByClient({x:er,y:Eo}).canvasOverlayPosition,zr=Co.x,Fo=Co.y,ma=Bb(Hn.CanvasPointToHtmlPoint([zr,Fo]),2),ya=ma[0],Nl=ma[1];if(zr+=A.moveOffset.x,Fo+=A.moveOffset.y,zr=fs(zr,vr),Fo=fs(Fo,vr),Ar&&Vn){if(!vn||Ft||!(ya<0||Nl<0||ya>Ar||Nl>Vn)){var fu=Bb(Hn.CanvasPointToHtmlPoint([zr-qe.width/2,Fo-qe.height/2]),2),pu=fu[0],Pd=fu[1],Av=Bb(Hn.CanvasPointToHtmlPoint([zr+qe.width/2,Fo+qe.height/2]),2),a0=Av[0],Mv=Av[1],sh=Math.max(vr,20),uh=[];pu<0?uh=[sh,0]:a0>Ot.width?uh=[-sh,0]:Pd<0?uh=[0,sh]:Mv>Ot.height&&(uh=[0,-sh]),A.t&&Db(A.t);var d$=new nh(-zr,-Fo).rotate(qe.rotate).translate(zr,Fo).toString();qe.transform=d$;var l0=zn.map((function(s0){return s0.id}));l0.indexOf(qe.id)===-1&&(l0=[qe.id]),uh.length>0&&!Ft&&vn?A.t=XC((function(){var s0=Bb(uh,2),IN=s0[0],FN=s0[1];Hn.translate(IN,FN);var f$=-IN/Hn.SCALE_X,p$=-FN/Hn.SCALE_X;Ot.moveNodes(l0,f$,p$)})):Ot.moveNodes(l0,zr-qe.x,Fo-qe.y)}}else Ot.moveNode2Coordinate(qe.id,zr,Fo)})),pl(rl(A),"onDragEnd",(function(){A.t&&Db(A.t),A.props.model.isDragging=!1})),pl(rl(A),"handleMouseUp",(function(){var ue=A.props.model;A.mouseUpDrag=ue.isDragging})),pl(rl(A),"handleClick",(function(ue){var Ne=A.mouseUpDrag===!1;if(A.startTime){var Ve=A.props,qe=Ve.model,Ot=Ve.graphModel;if(Ne){var xt={data:qe.getData(),e:ue,position:Ot.getPointByClient({x:ue.clientX,y:ue.clientY}),isSelected:!1,isMultiple:!1},Ft=ue.button===2,vn=ue.detail===2;if(!Ft){var Hn=Ot.editConfigModel,zn=yd(ue,Hn);xt.isMultiple=zn,qe.isSelected&&!vn&&zn?(xt.isSelected=!1,qe.setSelected(
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function oN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function iN(c){var u=c.points,d=c.className,p={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(c).forEach((function(y){var g=IF(y,2),b=g[0],A=g[1];Wx(A)!=="object"&&(p[b]=A)})),p.className=d?"lf-basic-shape ".concat(d):"lf-basic-shape",p.points=u.map((function(y){return y.join(",")})).join(" "),Object(re.g)("polygon",p)}function Gx(c){return Gx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Gx(c)}function zx(){return zx=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},zx.apply(this,arguments)}function FF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function BF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Hx(c,u){return Hx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Hx(c,u)}function $F(c){var u=(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 d,p=Wb(c);if(u){var y=Wb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return UF(this,d)}}function UF(c,u){if(u&&(Gx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function Wb(c){return Wb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Wb(c)}var Xx=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&Hx(g,b)})(y,c);var u,d,p=$F(y);function y(){return FF(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getShape",value:function(){var g=this.props.model,b=g.x,A=g.y,N=g.width,V=g.height,H=g.points,oe=g.getNodeStyle(),ue={transform:"matrix(1 0 0 1 ".concat(b-N/2," ").concat(A-V/2,")")};return Object(re.g)("g",ue,Object(re.g)(iN,zx({},oe,{points:H,x:b,y:A})))}}])&&BF(u.prototype,d),y})(Yf);function Yx(c){return Yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Yx(c)}function qx(){return qx=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},qx.apply(this,arguments)}function VF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function WF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Kx(c,u){return Kx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Kx(c,u)}function GF(c){var u=(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 d,p=Gb(c);if(u){var y=Gb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return zF(this,d)}}function zF(c,u){if(u&&(Yx(u)==
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function aN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function XF(c){var u=c.x,d=u===void 0?0:u,p=c.y,y=p===void 0?0:p,g=c.rx,b=g===void 0?4:g,A=c.ry,N=A===void 0?4:A,V=c.className,H={cx:d,cy:y,rx:b,ry:N,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(c).forEach((function(oe){var ue=HF(oe,2),Ne=ue[0],Ve=ue[1];Jx(Ve)!=="object"&&(H[Ne]=Ve)})),H.className=V?"lf-basic-shape ".concat(V):"lf-basic-shape",Object(re.g)("ellipse",H)}function Qx(c){return Qx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Qx(c)}function eO(){return eO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},eO.apply(this,arguments)}function YF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function qF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function tO(c,u){return tO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},tO(c,u)}function KF(c){var u=(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 d,p=zb(c);if(u){var y=zb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return ZF(this,d)}}function ZF(c,u){if(u&&(Qx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function zb(c){return zb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},zb(c)}var nO=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&tO(g,b)})(y,c);var u,d,p=KF(y);function y(){return YF(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getShape",value:function(){var g=this.props.model,b=g.getNodeStyle();return Object(re.g)(XF,eO({},b,{x:g.x,y:g.y,rx:g.rx,ry:g.ry}))}}])&&qF(u.prototype,d),y})(Yf);function rO(c){return rO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},rO(c)}function lN(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function sN(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?lN(Object(d),!0).forEach((function(p){JF(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):lN(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function JF(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function QF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function eB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function oO(c,u){return oO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},oO(c,u)}function tB(c){var u=(funct
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function dN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function hB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function gO(c,u){return gO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},gO(c,u)}function vB(c){var u=(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 d,p=Kb(c);if(u){var y=Kb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return gB(this,d)}}function gB(c,u){if(u&&(vO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cu(c)}function cu(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Kb(c){return Kb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Kb(c)}function du(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}(function(c){c.SOURCE="SOURCE",c.TARGET="TARGET"})(Nd||(Nd={}));var fN=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&gO(g,b)})(y,c);var u,d,p=vB(y);function y(g){var b;(function(H,oe){if(!(H instanceof oe))throw new TypeError("Cannot call a class as a function")})(this,y),du(cu(b=p.call(this)),"stepDragData",void 0),du(cu(b),"stepDrag",void 0),du(cu(b),"oldEdge",void 0),du(cu(b),"preTargetNode",void 0),du(cu(b),"targetRuleResults",void 0),du(cu(b),"sourceRuleResults",void 0),du(cu(b),"handleMouseDown",(function(H){b.stepDrag&&b.stepDrag.handleMouseDown(H)})),du(cu(b),"onDragStart",(function(){var H=b.props,oe=H.x,ue=H.y,Ne=H.edgeModel,Ve=Ne.startPoint,qe=Ne.endPoint,Ot=Ne.pointsList;b.oldEdge={startPoint:Ve,endPoint:qe,pointsList:Ot},b.setState({endX:oe,endY:ue,dragging:!0})})),du(cu(b),"onDragging",(function(H){var oe=H.deltaX,ue=H.deltaY,Ne=b.state,Ve=Ne.endX,qe=Ne.endY,Ot=b.props,xt=Ot.graphModel,Ft=Ot.type,vn=xt.transformModel,Hn=xt.editConfigModel,zn=pB(vn.moveCanvasPointByHtml([Ve,qe],oe,ue),2),Ar=zn[0],Vn=zn[1];b.setState({endX:Ar,endY:Vn,dragging:!0});var vr=b.props.edgeModel,er=Cf({x:Ve,y:qe},xt);if(er&&er.node&&b.isAllowAdjust(er).pass){var Eo,Co=vr.startPoint,zr=vr.endPoint,Fo=vr.sourceNode,ma=vr.targetNode;Ft===Nd.SOURCE?Eo={startPoint:{x:er.anchor.x,y:er.anchor.y},endPoint:{x:zr.x,y:zr.y},sourceNode:er.node,targetNode:ma}:Ft===Nd.TARGET&&(Eo={startPoint:{x:Co.x,y:Co.y},endPoint:{x:er.anchor.x,y:er.anchor.y},sourceNode:Fo,targetNode:er.node}),vr.updateAfterAdjustStartAndEnd(Eo)}else Ft===Nd.SOURCE?vr.updateStartPoint({x:Ar,y:Vn}):Ft===Nd.TARGET&&vr.updateEndPoint({x:Ar,y:Vn});vr.text.value&&Hn.adjustEdge&&vr.setText(Object.assign({},vr.text,vr.textPosition))})),du(cu(b),"onDragEnd",(function(H){var oe=H.event;try{var ue;b.setState({dragging:!1});var Ne=b.props,Ve=Ne.graphModel,qe=Ne.edgeModel,Ot=Ne.type,xt=b.state,Ft=xt.endX,vn=xt.endY,Hn=xt.dragging,zn=Cf({x:Ft,y:vn},Ve);if(!Hn)return;var Ar,Vn=!1;if(zn&&zn.node){var vr=b.isAllowAdjust(zn),er=vr.pass,Eo=vr.msg,Co=vr.newTargetNode;if(er){var zr=qe.getData(),Fo=zr.text,ma=zr.sourceAnchorId,ya=ma===void 0?"":ma,Nl=zr.targetAnchorId;Ar=qf(qf({sourceAnchorId:ya,targetAnchorId:Nl===void 0?"":Nl},fB(zr,dB)),{},{text:(Fo==null?void 0:Fo.value)||""}),Ot===Nd.SOURCE?(Ar=qf(qf({},Ve.edgeGenerator(Ve.getNodeModelById(zn.node.id).getData(),Ve.getNodeModelById(qe.targetNodeId).getData(),Ar)),{},{sourceNodeId:zn.node.id,sourceAnchorId:zn.anchor.id,startPoint:{x:zn.anchor.x,y:zn.anchor.y},targe
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function pN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function yB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function _B(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function yO(c,u){return yO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},yO(c,u)}function bB(c){var u=(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 d,p=Zb(c);if(u){var y=Zb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return wB(this,d)}}function wB(c,u){if(u&&(mO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ic(c)}function Ic(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Zb(c){return Zb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Zb(c)}function kd(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var Py=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&yO(g,b)})(y,c);var u,d,p=bB(y);function y(){var g;yB(this,y);for(var b=arguments.length,A=new Array(b),N=0;N<b;N++)A[N]=arguments[N];return kd(Ic(g=p.call.apply(p,[this].concat(A))),"startTime",void 0),kd(Ic(g),"contextMenuTime",void 0),kd(Ic(g),"clickTimer",void 0),kd(Ic(g),"textRef",Object(re.f)()),kd(Ic(g),"handleHover",(function(V,H){var oe=g.props,ue=oe.model,Ne=oe.graphModel.eventCenter;ue.setHovered(V);var Ve=V?ur.EDGE_MOUSEENTER:ur.EDGE_MOUSELEAVE,qe=ue.getData();Ne.emit(Ve,{data:qe,e:H})})),kd(Ic(g),"setHoverON",(function(V){g.props.model.isHovered||(g.textRef&&g.textRef.current&&g.textRef.current.setHoverON(),g.handleHover(!0,V))})),kd(Ic(g),"setHoverOFF",(function(V){g.props.model.isHovered&&(g.textRef&&g.textRef.current&&g.textRef.current.setHoverOFF(),g.handleHover(!1,V))})),kd(Ic(g),"handleContextMenu",(function(V){V.preventDefault(),g.contextMenuTime=new Date().getTime(),g.clickTimer&&clearTimeout(g.clickTimer);var H=g.props,oe=H.model,ue=H.graphModel,Ne=ue.getPointByClient({x:V.clientX,y:V.clientY});ue.setElementStateById(oe.id,Io.SHOW_MENU,Ne.domOverlayPosition),g.toFront(),oe.isSelected||ue.selectEdgeById(oe.id);var Ve=oe==null?void 0:oe.getData();ue.eventCenter.emit(ur.EDGE_CONTEXTMENU,{data:Ve,e:V,position:Ne})})),kd(Ic(g),"handleMouseDown",(function(V){V.stopPropagation(),g.startTime=new Date().getTime()})),kd(Ic(g),"handleMouseUp",(function(V){if(g.startTime&&!(new Date().getTime()-g.startTime>200||V.button===2)){var H=V.detail===2,oe=g.props,ue=oe.model,Ne=oe.graphModel,Ve=ue==null?void 0:ue.getData(),qe=Ne.getPointByClient({x:V.clientX,y:V.clientY});if(H){var Ot=Ne.editConfigModel,xt=Ne.textEditElement;if(xt&&xt.id===ue.id&&Ne.setElementStateById(ue.id,Io.DEFAULT),Ot.edgeTextEdit&&ue.text.editable&&Ne.setElementStateById(ue.id,Io.TEXT_EDIT),ue.modelType===lo.POLYLINE_EDGE){var Ft=ue,vn=Ne.getPointByClient({x:V.x,y:V.y}).canvasOverlayPosition,Hn=vn.x,zn=vn.y,Ar=co({x:Hn,y:zn},Ft.points);Ft.dbClickPosition=Ar}Ne.eventCenter.emit(ur.EDGE_DBCLICK,{data:Ve,e:V,position:qe})}else Ne.eventCenter.emit(ur.ELEMENT_CLICK,{data:Ve,e:V,position:qe}),Ne.eventCenter.emit(ur.EDGE_CLICK,{data:Ve,e:V,position:qe});var Vn=Ne.editConfigModel;Ne.selectEdgeById(ue.id,yd(V,Vn)),g.toFront()}})),g}return u=y,(d=[{key:"getShape",value:function(){return Object(re.g)("g",null,this.getEdge())}},{key:"
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function hN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var Ry=function(c){var u={d:""};return Object.entries(c).forEach((function(d){var p=EB(d,2),y=p[0],g=p[1],b=_O(g);y!=="style"&&b==="object"||(u[y]=g)})),Object(re.g)("path",u)};function bO(c){return bO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},bO(c)}function wO(){return wO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},wO.apply(this,arguments)}function xB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function OB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function EO(c,u){return EO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},EO(c,u)}function SB(c){var u=(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 d,p=Jb(c);if(u){var y=Jb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return AB(this,d)}}function AB(c,u){if(u&&(bO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function Jb(c){return Jb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Jb(c)}var xO=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&EO(g,b)})(y,c);var u,d,p=SB(y);function y(){return xB(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getEdge",value:function(){var g=this.props.model,b=g.startPoint,A=g.endPoint,N=g.isAnimation,V=g.arrowConfig,H=g.getEdgeStyle(),oe=g.getEdgeAnimationStyle(),ue=oe.strokeDasharray,Ne=oe.stroke,Ve=oe.strokeDashoffset,qe=oe.animationName,Ot=oe.animationDuration,xt=oe.animationIterationCount,Ft=oe.animationTimingFunction,vn=oe.animationDirection;return Object(re.g)(Fg,wO({},H,{x1:b.x,y1:b.y,x2:A.x,y2:A.y},V,N?{strokeDasharray:ue,stroke:Ne,style:{strokeDashoffset:Ve,animationName:qe,animationDuration:Ot,animationIterationCount:xt,animationTimingFunction:Ft,animationDirection:vn}}:{}))}},{key:"getAppendWidth",value:function(){var g=this.props.model,b=g.startPoint,A=g.endPoint,N=la({start:b,end:A}),V=N.d,H=N.strokeWidth,oe=N.fill,ue=N.strokeDasharray,Ne=N.stroke;return Object(re.g)(Ry,{d:V,fill:oe,strokeWidth:H,stroke:Ne,strokeDasharray:ue})}}])&&OB(u.prototype,d),y})(Py);function OO(c){return OO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},OO(c)}function MB(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return vN(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function vN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var TB=function(c){var u={points:"",fill:"none"};return Object.entries(c).forEach((function(d){var p=MB(d,2),y=p[0],g=p[1];(y==="style"||OO(g)!=="object")&&(u[y]=g)})),Object(re.g)("polyline",u)};function SO(c){return SO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},SO(c)}function gN(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Qb(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?gN(Object(d),!0).forEach((function(p){Zf(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):gN(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function AO(){return AO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},AO.apply(this,arguments)}function CB(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return mN(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return mN(d,p)}})(c,u)||(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 mN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function NB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function MO(c,u){return MO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},MO(c,u)}function kB(c){var u=(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 d,p=e0(c);if(u){var y=e0(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return PB(this,d)}}function PB(c,u){if(u&&(SO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kf(c)}function Kf(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function e0(c){return e0=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},e0(c)}function Zf(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var TO=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&MO(g,b)})(y,c);var u,d,p=kB(y);function y(){var g;return(function(b,A){if(!(b instanceof A))throw new TypeError("Cannot call a class as a function")})(this,y),Zf(Kf(g=p.call(this)),"drag",void 0),Zf(Kf(g),"isDragging",void 0),Zf(Kf(g),"isShowAdjustPointTemp",void 0),Zf(Kf(g),"appendInfo",void 0),Zf(Kf(g),"onDragStart",(function(){var b=g.props.model;b.dragAppendStart(),g.isShowAdjustPointTemp=b.isShowAdjustPoint,b.isShowAdjustPoint=!1})),Zf(Kf(g),"onDragging",(function(b){var A=b.deltaX,N=b.deltaY,V=g.props,H=V.model,oe=V.graphModel;g.isDragging=!0;var ue=oe.transformModel,Ne=oe.editConfigModel,Ve=CB(ue.fixDeltaXY(A,N),2),qe=Ve[0],Ot=Ve[1],xt=H,Ft=Ne.adjustEdgeMiddle;g.appendInfo=Ft?xt.dragAppendSimple(g.appendInfo,{x:qe,y:Ot}):xt.dragAppend(g.appendInfo,{x:qe,y:Ot})})),Zf(Kf(g),"onDragEnd",(function(){var b=g.props,A=b.model,N=b.graphModel.eventCenter,V=A;V.dragAppendEnd(),g.isDragging=!1,V.isShowAdjustPoint=g.isShowAdjustPointTemp,g.appendInfo=void 0,N.emit(ur.EDGE_ADJUST,{data:V.getData()})})),Zf(Kf(g),"beforeDragStart",(function(b,A){A.dragAble&&g.drag.handleMouseDown(b),g.appendInfo=A})),g.drag=new Ce({onDragStart:g.onDragStart,onDragging:g.onDragging,onDragEnd:g.onDragEnd,isStopPropagation:!1}),g}return u=y,(d=[{key:"getEdge",value:function(){var g=this.props.model,b=g.points,A=g.isAnimation,N=g.arrowConfig,V=g.getEdgeStyle(),H=g.getEdgeAnimationStyle(),oe=H.strokeDasharray,ue=H.stroke,Ne=H.strokeDashoffset,Ve=H.animationName,qe=H.animationDuration,Ot=H.animationIterationCount,xt=H.animationTimingFunction,Ft=H.animationDirection;return Object(re.g)(TB,AO({points:b},V,N,A?{strokeDasharray:oe,stroke:ue,style:{strokeDashoffset:Ne,animationName:Ve,animationDuration:qe,animationIterationCount:Ot,animationTimingFunction:xt,animationDirection:Ft}}:{}))}},{key:"getArrowInfo",value:function(){var g=this.props.model,b=g.points,A=g.isSelected,N={start:null,end:null,hover:this.state.hover,isSelected:A},V=jr(b);return V.length>=2&&(N.start=V[V.length-2],N.end=V[V.length-1]),N}},{key:"getLastTwoPoints",value:function(){var g=this.props.model.points,b=jr(g);return b.length>=2?[b[b.length-2],b[b.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(g){var b,A=g.start,N=g.end;if(A.x===N.x&&A.y===N.y)b="";else{var V={start:A,end:N,offset:10,verticalLength:5},H=kc(Qb(Qb({},V),{},{type:"start"})),oe=kc(Qb(Qb({},V),{},{type:"end"}));b="M".concat(H.leftX," ").concat(H.leftY,`
|
|||
|
|
L`).concat(H.rightX," ").concat(H.rightY,`
|
|||
|
|
L`).concat(oe.rightX," ").concat(oe.rightY,`
|
|||
|
|
L`).concat(oe.leftX," ").concat(oe.leftY," z")}return{d:b,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(g){var b=this.getAppendAttributes(g),A=b.d,N=b.strokeWidth,V=b.fill,H=b.strokeDasharray,oe=b.stroke;return Object(re.g)(Ry,{d:A,fill:V,strokeWidth:N,stroke:oe,strokeDasharray:H})}},{key:"getAppendWidth",value:function(){for(var g=this,b=this.props,A=b.model,N=b.graphModel,V=A.pointsList,H=A.draggable,oe=[],ue=V.length,Ne=function(qe){var Ot="lf-polyline-append",xt={start:{x:V[qe].x,y:V[qe].y},end:{x:V[qe+1].x,y:V[qe+1].y},startIndex:qe,endIndex:qe+1,direction:"",dragAble:!0},Ft=Object(re.g)("g",{className:Ot},g.getAppendShape(xt)),vn=N.editConfigModel,Hn=vn.adjustEdge,zn=vn.adjustEdgeMiddle;if(Hn&&H){var Ar=xt.startIndex,Vn=xt.endIndex,vr=zn&&(Ar===0||Vn===ue-1);xt.dragAble=!vr,xt.start.x===xt.end.x?(xt.dragAble&&(Ot+="-ew-resize"),xt.direction=ti.VERTICAL):xt.start.y===xt.end.y&&(xt.dragAble&&(Ot+="-ns-resize"),xt.direction=ti.HORIZONTAL),Ft=Object(re.g)("g",{className:g.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(er){return g.beforeDragStart(er,xt)}},Object(re.g)("g",{className:Ot},g.getAppendShape(xt)))}oe.push(Ft)},Ve=0;Ve<ue-1;Ve++)Ne(Ve);return Object(re.g)("g",null,oe)}}])&&NB(u.prototype,d),y})(Py);function CO(c){return CO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},CO(c)}function RB(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var g,b,A=[],N=!0,V=!1;try{for(y=y.call(d);!(N=(g=y.next()).done)&&(A.push(g.value),!p||A.length!==p);N=!0);}catch(H){V=!0,b=H}finally{try{N||y.return==null||y.return()}finally{if(V)throw b}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return yN(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return yN(d,p)}})(c,u)||(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 yN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function NO(){return NO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},NO.apply(this,arguments)}function DB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function jB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function kO(c,u){return kO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},kO(c,u)}function LB(c){var u=(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 d,p=t0(c);if(u){var y=t0(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return IB(this,d)}}function IB(c,u){if(u&&(CO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function t0(c){return t0=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},t0(c)}var PO=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&kO(g,b)})(y,c);var u,d,p=LB(y);function y(){return DB(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getEdge",value:function(){var g=this.props.model,b=g.getEdgeStyle(),A=g.path,N=g.isAnimation,V=g.arrowConfig,H=g.getEdgeAnimationStyle(),oe=H.strokeDasharray,ue=H.stroke,Ne=H.strokeDashoffset,Ve=H.animationName,qe=H.animationDuration,Ot=H.animationIterationCount,xt=H.animationTimingFunction,Ft=H.animationDirection;return Object(re.g)(Ry,NO({d:A},b,V,N?{strokeDasharray:oe,stroke:ue,style:{strokeDashoffset:Ne,animationName:Ve,animationDuration:qe,animationIterationCount:Ot,animationTimingFunction:xt,animationDirection:Ft}}:{}))}},{key:"getAppendWidth",value:function(){var g=this.props.model.path;return Object(re.g)(Ry,{d:g,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var g=this.props.model,b=this.state.hover,A=g.isSelected,N=g.getArrowStyle().offset,V=g.pointsList.map((function(oe){return{x:oe.x,y:oe.y}})),H=RB(sa(V,N),2);return{start:H[0],end:H[1],hover:b,isSelected:A}}},{key:"getLastTwoPoints",value:function(){var g=this.props.model,b=g.getArrowStyle().offset,A=g.pointsList.map((function(N){return{x:N.x,y:N.y}}));return sa(A,b)}}])&&jB(u.prototype,d),y})(Py);function RO(c){return RO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},RO(c)}function _N(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function FB(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function BB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function $B(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function DO(c,u){return DO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},DO(c,u)}function UB(c){var u=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.constr
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ON(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function SN(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Ov(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?SN(Object(d),!0).forEach((function(p){Sv(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):SN(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function AN(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function IO(c,u){return IO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},IO(c,u)}function JB(c){var u=(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 d,p=r0(c);if(u){var y=r0(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return QB(this,d)}}function QB(c,u){if(u&&(LO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zg(c)}function Zg(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function r0(c){return r0=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},r0(c)}function Sv(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var MN,TN,CN,FO=Fc((xN=EN=(function(c){(function(b,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(A&&A.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),A&&IO(b,A)})(g,c);var u,d,p,y=JB(g);function g(){var b;return(function(A,N){if(!(A instanceof N))throw new TypeError("Cannot call a class as a function")})(this,g),Sv(Zg(b=y.call(this)),"ref",Object(re.f)()),Sv(Zg(b),"__prevText",{type:"",text:"",id:""}),Sv(Zg(b),"keyupHandler",(function(A){var N=b.props.graphModel.textEditElement;A.key==="Enter"&&A.altKey&&N.setElementState(0)})),Sv(Zg(b),"inputHandler",(function(A){var N=A.target.innerText,V=b.props.graphModel.textEditElement;b.__prevText={type:V.type,text:N.replace(/(\r\n)+$|(\n)+$/,""),id:V.id}})),Sv(Zg(b),"keydownHandler",(function(A){A.stopPropagation()})),b.state={style:{left:0,top:0}},b}return u=g,p=[{key:"getDerivedStateFromProps",value:function(b){var A,N=b.graphModel,V=N.transformModel,H=N.theme,oe=H.inputText,ue=N.textEditElement;if(ue){var Ne;if((Ne=ue.text)===null||Ne===void 0||!Ne.value)if(ue.BaseType===ei.EDGE){var Ve=(ue=ue).text,qe=ue.textPosition,Ot=qe.x,xt=qe.y;Ve.x=Ot,Ve.y=xt,ue.setText(Ve)}else ue=ue;var Ft={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(ue.BaseType===ei.EDGE){var vn=H.edgeText,Hn=vn.overflowMode,zn=vn.lineHeight,Ar=vn.wrapPadding,Vn=vn.textWidth;Vn&&Hn==="autoWrap"&&(A=Ov(Ov({},Ft),{},{width:Vn,minWidth:Vn,lineHeight:zn,padding:Ar}))}else if(ue.BaseType===ei.NODE){var vr=H.nodeText,er=vr.overflowMode,Eo=vr.lineHeight,Co=vr.wrapPadding,zr=vr.textWidth,Fo=ue,ma=Fo.width,ya=Fo.modelType,Nl=Fo.textWidth||zr||ma;(ya!==lo.TEXT_NODE&&er==="autoWrap"||ya===lo.TEXT_NODE&&zr)&&(A=Ov(Ov({},Ft),{},{width:Nl,minWidth:Nl,lineHeight:Eo,padding:Co}))}var fu=ue.text,pu=fu.x,Pd=fu.y,Av=ZB(V.CanvasPointToHtmlPoint([pu,Pd]),2);return{style:Ov(Ov({left:Av[0],top:Av[1]},A),oe)}}}}],(d=[{key:"componentDidUpdate",value:function(){var b=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(th
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function t$(c){return(function(u){if(Array.isArray(u))return $O(u)})(c)||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(c)||kN(c)||(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 kN(c,u){if(c){if(typeof c=="string")return $O(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?$O(c,u):void 0}}function $O(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function n$(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function UO(c,u){return UO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},UO(c,u)}function r$(c){var u=(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 d,p=o0(c);if(u){var y=o0(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return o$(this,d)}}function o$(c,u){if(u&&(BO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jg(c)}function Jg(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function o0(c){return o0=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},o0(c)}function Qg(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var VO=Fc((CN=TN=(function(c){(function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),b&&UO(g,b)})(y,c);var u,d,p=r$(y);function y(g){var b;(function(H,oe){if(!(H instanceof oe))throw new TypeError("Cannot call a class as a function")})(this,y),Qg(Jg(b=p.call(this)),"stepDrag",void 0),Qg(Jg(b),"handleMouseDown",(function(H){b.stepDrag.handleMouseDown(H)})),Qg(Jg(b),"handleWheelEvent",(function(H){var oe,ue;H.preventDefault();var Ne=H.deltaX,Ve=H.deltaY,qe=H.clientX,Ot=H.clientY,xt=H.ctrlKey,Ft=new WheelEvent("wheel",{deltaX:Ne,deltaY:Ve,clientX:qe,clientY:Ot,ctrlKey:xt});(oe=b.props.logicFlow.container)===null||oe===void 0||(ue=oe.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||ue===void 0||ue.dispatchEvent(Ft)})),Qg(Jg(b),"onDragging",(function(H){var oe=H.deltaX,ue=H.deltaY,Ne=b.props.graphModel,Ve=Ne.getSelectElements(!0);Ne.moveNodes(Ve.nodes.map((function(qe){return qe.id})),oe,ue)})),Qg(Jg(b),"handleContextMenu",(function(H){H.preventDefault();var oe=b.props,ue=oe.graphModel,Ne=oe.graphModel,Ve=Ne.eventCenter,qe=Ne.selectElements,Ot=ue.getPointByClient({x:H.clientX,y:H.clientY}),xt={nodes:[],edges:[]};t$(qe.values()).forEach((function(Ft){Ft.BaseType===ei.NODE&&xt.nodes.push(Ft.getData()),Ft.BaseType===ei.EDGE&&xt.edges.push(Ft.getData())})),Ve.emit(ur.SELECTION_CONTEXTMENU,{data:xt,e:H,position:Ot})}));var A=g.graphModel,N=A.gridSize,V=A.eventCenter;return b.stepDrag=new Ce({onDragging:b.onDragging,step:N,eventType:"SELECTION",eventCenter:V}),b}return u=y,(d=[{key:"render",value:function(){var g=this.props.graphModel,b=g.selectElements,A=g.transformModel;if(!(b.size<=1)){var N=Number.MAX_SAFE_INTEGER,V=Number.MAX_SAFE_INTEGER,H=Number.MIN_SAFE_INTEGER,oe=Number.MIN_SAFE_INTEGER;b.forEach((function(qe){var Ot={x:0,y:0,x1:0,y1:0};qe.BaseType===ei.NODE&&(Ot=(function(xt){var Ft=xt.x,vn=xt.y,Hn=xt.width,zn=xt.height;return{x:Ft-Hn/2,y:vn-zn/2,x1:Ft+Hn/2,y1:vn+zn/2}})(qe)),qe.BaseType===ei.EDGE&&(Ot=e$(qe)),N=Math.min(N,Ot.x),V=Math.min(V,Ot.y),H=Math.max(H,Ot.x1),oe=Math.max(oe,Ot.y1)}));var ue=NN(A.CanvasPointToHtmlPoint([N,V]),2);N=ue[0],V=ue[1];var Ne=NN(A.CanvasPointToHtmlPoint([H,oe]),2);H=Ne[0],oe=Ne[1];var Ve={left:"".concat(N-10,"px"),top:"".concat(V-1
|
|||
|
|
<g filter="url(#filter0_d_5119_232585)">
|
|||
|
|
<path d="M20.9998 29.8333C28.0875 29.8333 33.8332 24.0876 33.8332 17C33.8332 9.91231 28.0875 4.16663 20.9998 4.16663C13.9122 4.16663 8.1665 9.91231 8.1665 17C8.1665 24.0876 13.9122 29.8333 20.9998 29.8333Z" fill="white"/>
|
|||
|
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.9998 27.5C26.7988 27.5 31.4998 22.799 31.4998 17C31.4998 11.201 26.7988 6.49996 20.9998 6.49996C15.2008 6.49996 10.4998 11.201 10.4998 17C10.4998 22.799 15.2008 27.5 20.9998 27.5ZM33.8332 17C33.8332 24.0876 28.0875 29.8333 20.9998 29.8333C13.9122 29.8333 8.1665 24.0876 8.1665 17C8.1665 9.91231 13.9122 4.16663 20.9998 4.16663C28.0875 4.16663 33.8332 9.91231 33.8332 17Z" fill="#3370FF"/>
|
|||
|
|
</g>
|
|||
|
|
<defs>
|
|||
|
|
<filter id="filter0_d_5119_232585" x="-1" y="-1" width="44" height="44" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|||
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|||
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|||
|
|
<feOffset dy="4"/>
|
|||
|
|
<feGaussianBlur stdDeviation="4"/>
|
|||
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|||
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0.2 0 0 0 0 0.439216 0 0 0 0 1 0 0 0 0.1 0"/>
|
|||
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5119_232585"/>
|
|||
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5119_232585" result="shape"/>
|
|||
|
|
</filter>
|
|||
|
|
</defs>
|
|||
|
|
</svg>
|
|||
|
|
`:`<svg width="100%" height="100%" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|||
|
|
<g filter="url(#filter0_d_5199_166905)">
|
|||
|
|
<path d="M20.9998 29.8333C28.0875 29.8333 33.8332 24.0876 33.8332 17C33.8332 9.91231 28.0875 4.16663 20.9998 4.16663C13.9122 4.16663 8.1665 9.91231 8.1665 17C8.1665 24.0876 13.9122 29.8333 20.9998 29.8333Z" fill="#3370FF"/>
|
|||
|
|
<path d="M19.8332 11.75C19.8332 11.4278 20.0943 11.1666 20.4165 11.1666H21.5832C21.9053 11.1666 22.1665 11.4278 22.1665 11.75V15.8333H26.2498C26.572 15.8333 26.8332 16.0945 26.8332 16.4166V17.5833C26.8332 17.9055 26.572 18.1666 26.2498 18.1666H22.1665V22.25C22.1665 22.5721 21.9053 22.8333 21.5832 22.8333H20.4165C20.0943 22.8333 19.8332 22.5721 19.8332 22.25V18.1666H15.7498C15.4277 18.1666 15.1665 17.9055 15.1665 17.5833V16.4166C15.1665 16.0945 15.4277 15.8333 15.7498 15.8333H19.8332V11.75Z" fill="white"/>
|
|||
|
|
</g>
|
|||
|
|
<defs>
|
|||
|
|
<filter id="filter0_d_5199_166905" x="-1" y="-1" width="44" height="44" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|||
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|||
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|||
|
|
<feOffset dy="4"/>
|
|||
|
|
<feGaussianBlur stdDeviation="4"/>
|
|||
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|||
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0.2 0 0 0 0 0.439216 0 0 0 0 1 0 0 0 0.1 0"/>
|
|||
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5199_166905"/>
|
|||
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5199_166905" result="shape"/>
|
|||
|
|
</filter>
|
|||
|
|
</defs>
|
|||
|
|
</svg>`}})])}setHtml(n){if(this.isMounted)this.r&&this.r.component&&(this.r.component.props.properties=this.props.model.getProperties());else{this.isMounted=!0;const o=document.createElement("div");n.appendChild(o),this.renderVueComponent(o)}}componentWillUnmount(){super.componentWillUnmount(),this.unmount()}getComponentContainer(){return this.root}targetId(){return`${this.props.graphModel.flowId}:${this.props.model.id}`}renderVueComponent(n){var i;this.unmountVueComponent(),this.root=n;const{model:o,graphModel:r}=this.props;if(n)if(d1())n8(this.targetId(),this.component,n,o,r,void 0,this.props.graphModel.get_provide);else{this.r=Dm(this.component,{properties:this.props.model.properties,nodeModel:this.props.model}),this.app=Fj({render(){return this.r},provide(){return{getNode:()=>o,getGraph:()=>r,workflowMode:nc.Application}}}),this.app.use(l9,{locale:s9}),this.app.use(u9),this.app.use(c9),this.app.use(Ij);for(const[a,s]of Object.entries(d9))this.app.component(a,s);(i=this.app)==null||i.mount(n)}}unmountVueComponent(){return this.app&&(this.app.unmount(),this.app=null),this.root&&(this.root.innerHTML=""),this.root}unmount(){d1()&&r8(this.targetId()),this.unmountVueComponent()}}class li extends GI.model{refreshDeges(){this.incoming.edges.forEach(e=>{e.updatePathByAnchor()}),this.outgoing.edges.forEach(e=>{e.updatePathByAnchor()})}set_position(e){const{x:n,y:o}=e;n&&(this.x=n),o&&(this.y=o),this.refreshDeges()}getResizeOutlineStyle(){const e=super.getResizeOutlineStyle();return e.stroke="none",e}getControlPointStyle(){const e=super.getControlPointStyle();return e.stroke="none",e.fill="none",e}getNodeStyle(){return{overflow:"visible"}}getOutlineStyle(){const e=super.getOutlineStyle();return e.stroke="#e0e0e0",e.strokeWidth=1,e.hover&&(e.hover.stroke="#3370FF",e.hover.strokeWidth=2),e}getAnchorStyle(e){return super.getAnchorStyle(e)}setHeight(e){const n=this.height,o=e+100;this.height=o,this.properties.height=o,this.move(0,(o-n)/2),this.outgoing.edges.forEach(r=>{r.updatePathByAnchor()}),this.incoming.edges.forEach(r=>{r.updatePathByAnchor()})}get_width(){var e;return((e=this.properties)==null?void 0:e.width)||340}setAttributes(){const{t:e}=Ij.global;this.width=this.get_width();const n=(r,i)=>{const a=this.graphModel.getNodeIncomingNode(r);for(const s in a){const l=a[s];if(l.id===i)return!0;if(n(l.id,i))return!0}return!1},o={message:e("views.applicationWorkflow.tip.onlyRight"),validate:(r,i,a)=>a.type==="right"};this.sourceRules.push({message:e("views.applicationWorkflow.tip.notRecyclable"),validate:(r,i,a,s)=>i.id==r.id?!1:!this.graphModel.getNodeIncomingEdge(i.id).find(h=>h.targetAnchorId==s.id&&h.sourceAnchorId==a.id)&&!n(r.id,i.id)}),this.sourceRules.push(o),this.targetRules.push({message:e("views.applicationWorkflow.tip.onlyLeft"),validate:(r,i,a,s)=>s.type==="left"})}getDefaultAnchor(){const{id:e,x:n,y:o,width:r}=this,i=this.properties.showNode===void 0?!0:this.properties.showNode,a=[];return this.type&&this.type!==kr.Base.toString()&&([kr.Start.toString(),kr.LoopStartNode.toString()].includes(this.type)||a.push({x:n-r/2+10,y:i?o:o-15,id:`${e}_left`,edgeAddable:!1,type:"left"}),a.push({x:n+r/2-10,y:i?o:o-15,id:`${e}_right`,type:"right"})),a}}let Vne=class extends ai{constructor(e){super(e,Uq)}};const Wne={type:"ai-chat-node",model:li,view:Vne},o8=Object.freeze(Object.defineProperty({__proto__:null,default:Wne},Symbol.toStringTag,{value:"Module"})),Gne={class:"title-decoration-1 mb-8"},zne={class:"flex align-center"},Hne={class:"mr-4"},Xne=gr({__name:"index",props:{nodeModel:{}},setup(t){const e=ja(),n=fr(()=>e.path.includes("resource-management")?"systemManage":"workspace"),o={question_reference_address:["start-node","question"],api_input_field_list:[],user_input_field_list:[],document_list:["start-node","document"],image_list:["start-node","image"],audio_list:["start-node","audio"],video_list:["start-node","video"]},r=Ge(),i=fr({get:()=>(l.nodeModel.properties.node_data||Me.set(l.nodeModel.properties,"node_data",o),l.nodeModel.properties.node_data),set:h=>{Me.set(l.nodeModel.properties,"node_data",h)}});funct
|
|||
|
|
* Sortable 1.15.6
|
|||
|
|
* @author RubaXa <trash@rubaxa.org>
|
|||
|
|
* @author owenm <owen23355@gmail.com>
|
|||
|
|
* @license MIT
|
|||
|
|
*/function PR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function Yd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?PR(Object(n),!0).forEach(function(o){Kne(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):PR(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function tw(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tw=function(e){return typeof e}:tw=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tw(t)}function Kne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cp(){return cp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},cp.apply(this,arguments)}function Zne(t,e){if(t==null)return{};var n={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Jne(t,e){if(t==null)return{};var n=Zne(t,e),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(n[o]=t[o])}return n}var Qne="1.15.6";function ap(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var gp=ap(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ab=ap(/Edge/i),RR=ap(/firefox/i),g_=ap(/safari/i)&&!ap(/chrome/i)&&!ap(/android/i),FM=ap(/iP(ad|od|hone)/i),a8=ap(/chrome/i)&&ap(/android/i),l8={capture:!1,passive:!1};function Vo(t,e,n){t.addEventListener(e,n,!gp&&l8)}function Bo(t,e,n){t.removeEventListener(e,n,!gp&&l8)}function f1(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function s8(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function zc(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&f1(t,e):f1(t,e))||o&&t===n)return t;if(t===n)break}while(t=s8(t))}return null}var DR=/\s+/g;function vu(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(DR," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(DR," ")}}function ro(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function Am(t,e){var n="";if(typeof t=="string")n=t;else do{var o=ro(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function u8(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function Hd(){var t=document.scrollingElement;return t||document.documentElement}function Ya(t,e,n,o,r){if(!(!t.getBoundingClientRect&&t!==window)){var i,a,s,l,f,h,v;if(t!==window&&t.parentNode&&t!==Hd()?(i=t.getBoundingClientRect(),a=i.top,s=i.left,l=i.bottom,f=i.right,h=i.height,v=i.width):(a=0,s=0,l=window.innerHeight,f=window.innerWidth,h=window.innerHeight,v=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!gp))do if(r&&r.getBoundingClientRect&&(ro(r,"transform")!=="none"||n&&ro(r,"position")!=="static")){var _=r.getBoundingClientRect();a-=_.top+parseInt(ro(r,"border-top-width")),s-=_.left+parseInt(ro(r,"border-left-width")),l=a+i.height,f=s+i.width;break}while(r=r.parentNode);if(o&&t!==window){var E=Am(
|
|||
|
|
{{form}}
|
|||
|
|
${Pt("views.applicationWorkflow.nodes.formNode.form_content_format2")}`,form_field_list:[]}),E=fr({get:()=>(e.nodeModel.properties.node_data||Me.set(e.nodeModel.properties,"node_data",_.value),e.nodeModel.properties.node_data),set:T=>{Me.set(e.nodeModel.properties,"node_data",T)}}),O=T=>{var B;if(T.default_value){const R=(B=T.option_list)==null?void 0:B.filter(P=>T.default_value.indexOf(P.value)>-1).map(P=>P.label).join(",");return R||T.default_value}if(T.default_value!==void 0)return T.default_value},w=()=>{var T;return(T=n.value)==null?void 0:T.validate()};function S(T){Me.set(e.nodeModel.properties.node_data,"form_content_format",T)}function M(){if(!o.value)return;const B=o.value.$el.querySelector(".el-table__body-wrapper tbody");B&&Zr.create(B,{animation:150,ghostClass:"ghost-row",onEnd:R=>{if(R.oldIndex===void 0||R.newIndex===void 0)return;const P=Me.cloneDeep([...E.value.form_field_list]),[$]=P.splice(R.oldIndex,1);P.splice(R.newIndex,0,$),E.value.form_field_list=P,a()}})}return yo(()=>{Me.set(e.nodeModel,"validate",w),a(),e.nodeModel.graphModel.eventCenter.emit("refresh_incoming_node_field")}),(T,B)=>{const R=te("AppIcon"),P=te("el-tooltip"),$=te("MdEditorMagnify"),I=te("el-form-item"),F=te("el-button"),U=te("el-table-column"),z=te("el-tag"),X=te("el-switch"),Y=te("el-table"),W=te("el-form"),Q=te("el-card");return Te(),bt(hi,{nodeModel:t.nodeModel},{default:j(()=>[ee("h5",nie,_e(T.$t("views.applicationWorkflow.nodeSetting")),1),k(Q,{shadow:"never",class:"card-never",style:{"--el-card-padding":"12px"}},{default:j(()=>[k(W,{onSubmit:B[4]||(B[4]=mn(()=>{},["prevent"])),model:E.value,"label-position":"top","require-asterisk-position":"right","label-width":"auto",ref_key:"formNodeFormRef",ref:n,"hide-required-asterisk":""},{default:j(()=>[k(I,{label:T.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),prop:"form_content_format",rules:{required:!0,message:T.$t("views.applicationWorkflow.nodes.formNode.formContent.requiredMessage"),trigger:"blur"}},{label:j(()=>[ee("div",rie,[ee("div",oie,[ee("span",null,[ft(_e(T.$t("views.applicationWorkflow.nodes.formNode.formContent.label")),1),B[5]||(B[5]=ee("span",{class:"color-danger"},"*",-1))])]),k(P,{effect:"dark",placement:"right","popper-class":"max-w-200"},{content:j(()=>[ft(_e(T.$t("views.applicationWorkflow.nodes.formNode.formContent.tooltip",{form:"{ form }"})),1)]),default:j(()=>[k(R,{iconName:"app-warning",class:"app-warning-icon"})]),_:1})])]),default:j(()=>[k($,{title:T.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),modelValue:E.value.form_content_format,"onUpdate:modelValue":B[0]||(B[0]=J=>E.value.form_content_format=J),style:{height:"150px"},onSubmitDialog:S},null,8,["title","modelValue"])]),_:1},8,["label","rules"]),k(I,{label:T.$t("views.applicationWorkflow.nodes.formNode.formSetting"),onClick:B[3]||(B[3]=mn(()=>{},["prevent"]))},{label:j(()=>[ee("div",iie,[ee("h5",aie,_e(T.$t("views.applicationWorkflow.nodes.formNode.formSetting")),1),k(F,{link:"",type:"primary",onClick:B[1]||(B[1]=J=>f())},{default:j(()=>[k(R,{iconName:"app-add-outlined",class:"mr-4"}),ft(" "+_e(T.$t("common.add")),1)]),_:1})])]),default:j(()=>[E.value.form_field_list.length>0?(Te(),bt(Y,{key:0,class:"border",data:E.value.form_field_list,ref_key:"tableRef",ref:o,"row-key":"field"},{default:j(()=>[k(U,{prop:"field",label:T.$t("dynamicsForm.paramForm.field.label"),width:"95"},{default:j(({row:J})=>[ee("span",{title:J.field,class:"ellipsis-1"},_e(J.field),9,lie)]),_:1},8,["label"]),k(U,{prop:"label",label:T.$t("dynamicsForm.paramForm.name.label")},{default:j(({row:J})=>[J.label&&J.label.input_type==="TooltipLabel"?(Te(),cn("span",sie,[ee("span",{title:J.label.label,class:"ellipsis-1"},_e(J.label.label),9,uie)])):(Te(),cn("span",cie,[ee("span",{title:J.label,class:"ellipsis-1"},_e(J.label),9,die)]))]),_:1},8,["label"]),k(U,{label:T.$t("dynamicsForm.paramForm.input_type.label"),width:"110px"},{default:j(({row:J})=>[k(z,{type:"info",class:"info-tag"},{default:j(()=>{var ie;return[ft(_e((ie=Wn(h9).find(Se=>Se.value===J.input_type))==null?void 0:ie.label),1)]}),_:2},1024)
|
|||
|
|
"math": {
|
|||
|
|
"url": "your_server",
|
|||
|
|
"transport": "sse"
|
|||
|
|
}
|
|||
|
|
}`,tle=gr({__name:"index",props:{nodeModel:{}},setup(t){const e=t,n=ja(),{params:{id:o}}=n,i=gl("getApplicationDetail")(),a=fr(()=>n.path.includes("resource-management")?"systemManage":"workspace"),s=Ge(),l=Ge(!1),f=F=>F.ctrlKey===!0?(F.preventDefault(),!0):(F.stopPropagation(),!0),h={mcp_tool:"",mcp_tools:[],mcp_servers:"",mcp_server:"",mcp_source:"referencing",mcp_tool_id:"",tool_params:{},tool_form_field:[],params_nested:""},v=Ge([]);function _(F){Me.set(e.nodeModel.properties.node_data,"mcp_servers",F)}async function E(){const F=await oi({type:"tool",systemType:a.value}).getToolById(R.value.mcp_tool_id,l);R.value.mcp_servers=F.data.code}function O(){if(R.value.mcp_source==="referencing"&&!R.value.mcp_tool_id){Xi(Pt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(R.value.mcp_source==="referencing"&&R.value.mcp_tool_id&&!v.value.find(F=>F.id===R.value.mcp_tool_id)){Xi(Pt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(R.value.mcp_source==="custom"&&!R.value.mcp_servers){Xi(Pt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}try{JSON.parse(R.value.mcp_servers);const F=M(R.value.mcp_servers);if(F.length>0){S.value.open(F);return}}catch{Xi(Pt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}w(R.value.mcp_servers)}function w(F){oi({type:"application",systemType:a.value}).getMcpTools(o,F,l).then(U=>{var z;R.value.mcp_tools=U.data,Sh(Pt("views.applicationWorkflow.nodes.mcpNode.getToolsSuccess")),R.value.mcp_server=(z=R.value.mcp_tools.find(X=>X.name===R.value.mcp_tool))==null?void 0:z.server})}const S=Ge();function M(F){const U=/\{\{\s*([a-zA-Z_][\w.]*)\s*\}\}/g,z=new Set,X=Y=>{if(typeof Y=="string"){let W;for(;(W=U.exec(Y))!==null;)z.add(W[1])}else Array.isArray(Y)?Y.forEach(X):Y&&typeof Y=="object"&&Object.values(Y).forEach(X)};if(typeof F=="string")try{X(JSON.parse(F))}catch{X(F)}else X(F);return[...z]}function T(F){let U=R.value.mcp_servers;for(const z in F)U=U.replace(`{{${z}}}`,F[z]);w(U)}function B(){var U,z,X,Y,W,Q;R.value.mcp_server=(U=R.value.mcp_tools.find(J=>J.name===R.value.mcp_tool))==null?void 0:U.server;const F=(z=R.value.mcp_tools.find(J=>J.name===R.value.mcp_tool))==null?void 0:z.args_schema;R.value.tool_form_field=[];for(const J in F==null?void 0:F.properties){const ie=F==null?void 0:F.properties[J].properties;if(ie){R.value.params_nested=J;for(const Se in ie){let Ae="TextInput";ie[Se].type==="string"?Ae="TextInput":ie[Se].type==="number"?Ae="NumberInput":ie[Se].type==="boolean"?Ae="SwitchInput":(ie[Se].type==="array"||ie[Se].type==="object")&&(Ae="JsonInput"),R.value.tool_form_field.push({field:Se,label:{input_type:"TooltipLabel",label:Se,attrs:{tooltip:ie[Se].description},props_info:{}},input_type:Ae,source:"referencing",required:((X=F.properties[J].required)==null?void 0:X.indexOf(Se))!==-1,props_info:{rules:[{required:((Y=F.properties[J].required)==null?void 0:Y.indexOf(Se))!==-1,message:Pt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}else{R.value.params_nested="";let Se="TextInput";F.properties[J].type==="string"?Se="TextInput":F.properties[J].type==="number"?Se="NumberInput":F.properties[J].type==="boolean"?Se="SwitchInput":(F.properties[J].type==="array"||F.properties[J].type==="object")&&(Se="JsonInput"),R.value.tool_form_field.push({field:J,label:{input_type:"TooltipLabel",label:J,attrs:{tooltip:F.properties[J].description},props_info:{}},input_type:Se,source:"referencing",required:((W=F.required)==null?void 0:W.indexOf(J))!==-1,props_info:{rules:[{required:((Q=F.required)==null?void 0:Q.indexOf(J))!==-1,message:Pt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}R.value.params_nested?R.value.tool_params={[R.value.params_nested]:{}}:R.value.tool_params={}}const R=fr({get:()=>(e.nodeModel.properties.node_data||Me.set(e.nodeModel.properties,"node_data",h),e.nodeModel.properties.node_data),set:F=>{Me.set(e.nodeModel.properties,"node_data",F)}}),P=Ge(),$=async()=>{if(s.value){const F=R.value.tool_form_field.filter(U=>U.required).map(U=>U.label.label);if(F.length>0){for(const U of F)if(R.value.params_nested){if(!R.valu
|
|||
|
|
`,r);return}throw r}n(" updateInputGraph",()=>{Efe(t,o)})})},bfe=(t,e,n)=>{e(" removeSelfEdges",()=>{Bfe(t)}),e(" acyclic",()=>{ZR.run(t)}),e(" nestingGraph.run",()=>{rD.run(t)}),e(" rank",()=>{Mde(J8(t))}),e(" injectEdgeLabelProxies",()=>{kfe(t)}),e(" removeEmptyRanks",()=>{lde(t)}),e(" nestingGraph.cleanup",()=>{rD.cleanup(t)}),e(" normalizeRanks",()=>{ade(t)}),e(" assignRankMinMax",()=>{Pfe(t)}),e(" removeEdgeLabelProxies",()=>{Rfe(t)}),e(" normalize.run",()=>{eD.run(t)}),e(" parentDummyChains",()=>{Pde(t)}),e(" addBorderSegments",()=>{Ide(t)}),n&&n.keepNodeOrder&&e(" initDataOrder",()=>{yfe(t,n.nodeOrder)}),e(" order",()=>{tfe(t,n==null?void 0:n.keepNodeOrder)}),e(" insertSelfEdges",()=>{$fe(t)}),e(" adjustCoordinateSystem",()=>{aD.adjust(t)}),e(" position",()=>{mfe(t)}),e(" positionSelfEdges",()=>{Ufe(t)}),e(" removeBorderNodes",()=>{Ffe(t)}),e(" normalize.undo",()=>{eD.undo(t)}),e(" fixupEdgeLabelCoords",()=>{Lfe(t)}),e(" undoCoordinateSystem",()=>{aD.undo(t)}),e(" translateGraph",()=>{Dfe(t)}),e(" assignNodeIntersects",()=>{jfe(t)}),e(" reversePoints",()=>{Ife(t)}),e(" acyclic.undo",()=>{ZR.undo(t)})},wfe=(t,e)=>{t.nodes().forEach(n=>{const o=t.node(n),r=e.node(n);r!==void 0?(o.fixorder=r._order,delete r._order):delete o.fixorder})},Efe=(t,e)=>{t.nodes().forEach(n=>{var o;const r=t.node(n);if(r){const i=e.node(n);r.x=i.x,r.y=i.y,r._order=i.order,r._rank=i.rank,!((o=e.children(n))===null||o===void 0)&&o.length&&(r.width=i.width,r.height=i.height)}}),t.edges().forEach(n=>{const o=t.edge(n),r=e.edge(n);o.points=r?r.points:[],r&&r.hasOwnProperty("x")&&(o.x=r.x,o.y=r.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height},xfe=["nodesep","edgesep","ranksep","marginx","marginy"],Ofe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},LS=["acyclicer","ranker","rankdir","align"],Sfe=["width","height","layer","fixorder"],Afe={width:0,height:0},Mfe=["minlen","weight","width","height","labeloffset"],Tfe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},IS=["labelpos"],Cfe=t=>{const e=new dp({multigraph:!0,compound:!0}),n=BS(t.graph()),o={};return LS==null||LS.forEach(r=>{n[r]!==void 0&&(o[r]=n[r])}),e.setGraph(Object.assign({},Ofe,FS(n,xfe),o)),t.nodes().forEach(r=>{const i=BS(t.node(r)),a=Object.assign(Object.assign({},Afe),i),s=FS(a,Sfe);e.setNode(r,s),e.setParent(r,t.parent(r))}),t.edges().forEach(r=>{const i=BS(t.edge(r)),a={};IS==null||IS.forEach(s=>{i[s]!==void 0&&(a[s]=i[s])}),e.setEdgeObj(r,Object.assign({},Tfe,FS(i,Mfe),a))}),e},Nfe=t=>{const e=t.graph();e.ranksep||(e.ranksep=0),e.ranksep/=2,t.nodes().forEach(n=>{const o=t.node(n);isNaN(o.layer)||o.layer||(o.layer=0)}),t.edges().forEach(n=>{var o;const r=t.edge(n);r.minlen*=2,((o=r.labelpos)===null||o===void 0?void 0:o.toLowerCase())!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})},kfe=t=>{t.edges().forEach(e=>{const n=t.edge(e);if(n.width&&n.height){const o=t.node(e.v),r=t.node(e.w),i={e,rank:(r.rank-o.rank)/2+o.rank};uy(t,"edge-proxy",i,"_ep")}})},Pfe=t=>{let e=0;t.nodes().forEach(n=>{var o,r;const i=t.node(n);i.borderTop&&(i.minRank=(o=t.node(i.borderTop))===null||o===void 0?void 0:o.rank,i.maxRank=(r=t.node(i.borderBottom))===null||r===void 0?void 0:r.rank,e=Math.max(e,i.maxRank||-1/0))}),t.graph().maxRank=e},Rfe=t=>{t.nodes().forEach(e=>{const n=t.node(e);n.dummy==="edge-proxy"&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})},Dfe=t=>{let e,n=0,o,r=0;const i=t.graph(),a=i.marginx||0,s=i.marginy||0,l=f=>{if(!f)return;const h=f.x,v=f.y,_=f.width,E=f.height;!isNaN(h)&&!isNaN(_)&&(e===void 0&&(e=h-_/2),e=Math.min(e,h-_/2),n=Math.max(n,h+_/2)),!isNaN(v)&&!isNaN(E)&&(o===void 0&&(o=v-E/2),o=Math.min(o,v-E/2),r=Math.max(r,v+E/2))};t.nodes().forEach(f=>{l(t.node(f))}),t.edges().forEach(f=>{const h=t.edge(f);h!=null&&h.hasOwnProperty("x")&&l(h)}),e-=a,o-=s,t.nodes().forEach(f=>{const h=t.node(f);h&&(h.x-=e,h.y-=o)}),t.edges().forEach(f=>{var h;const v=t.edge(f);(h=v.points)===null||h===void 0||h.forEach(_=>{_.x-=e,_.y
|
|||
|
|
`;function i(K){return typeof atob<"u"?atob(K):"base64:"+K}function a(K){var ge=new Error("(regl) "+K);throw console.error(ge),ge}function s(K,ge){K||a(ge)}function l(K){return K?": "+K:""}function f(K,ge,Ie){K in ge||a("unknown parameter ("+K+")"+l(Ie)+". possible values: "+Object.keys(ge).join())}function h(K,ge){n(K)||a("invalid parameter type"+l(ge)+". must be a typed array")}function v(K,ge){switch(ge){case"number":return typeof K=="number";case"object":return typeof K=="object";case"string":return typeof K=="string";case"boolean":return typeof K=="boolean";case"function":return typeof K=="function";case"undefined":return typeof K>"u";case"symbol":return typeof K=="symbol"}}function _(K,ge,Ie){v(K,ge)||a("invalid parameter type"+l(Ie)+". expected "+ge+", got "+typeof K)}function E(K,ge){K>=0&&(K|0)===K||a("invalid parameter type, ("+K+")"+l(ge)+". must be a nonnegative integer")}function O(K,ge,Ie){ge.indexOf(K)<0&&a("invalid value"+l(Ie)+". must be one of: "+ge)}var w=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function S(K){Object.keys(K).forEach(function(ge){w.indexOf(ge)<0&&a('invalid regl constructor argument "'+ge+'". must be one of '+w)})}function M(K,ge){for(K=K+"";K.length<ge;)K=" "+K;return K}function T(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function B(K,ge){this.number=K,this.line=ge,this.errors=[]}function R(K,ge,Ie){this.file=K,this.line=ge,this.message=Ie}function P(){var K=new Error,ge=(K.stack||K).toString(),Ie=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(ge);if(Ie)return Ie[1];var wt=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(ge);return wt?wt[1]:"unknown"}function $(){var K=new Error,ge=(K.stack||K).toString(),Ie=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(ge);if(Ie)return Ie[1];var wt=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(ge);return wt?wt[1]:"unknown"}function I(K,ge){var Ie=K.split(`
|
|||
|
|
`),wt=1,Dt=0,yt={unknown:new T,0:new T};yt.unknown.name=yt[0].name=ge||P(),yt.unknown.lines.push(new B(0,""));for(var Nt=0;Nt<Ie.length;++Nt){var tn=Ie[Nt],sn=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(tn);if(sn)switch(sn[1]){case"line":var nn=/(\d+)(\s+\d+)?/.exec(sn[2]);nn&&(wt=nn[1]|0,nn[2]&&(Dt=nn[2]|0,Dt in yt||(yt[Dt]=new T)));break;case"define":var Mt=/SHADER_NAME(_B64)?\s+(.*)$/.exec(sn[2]);Mt&&(yt[Dt].name=Mt[1]?i(Mt[2]):Mt[2]);break}yt[Dt].lines.push(new B(wt++,tn))}return Object.keys(yt).forEach(function(wn){var hn=yt[wn];hn.lines.forEach(function(rn){hn.index[rn.number]=rn})}),yt}function F(K){var ge=[];return K.split(`
|
|||
|
|
`).forEach(function(Ie){if(!(Ie.length<5)){var wt=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(Ie);wt?ge.push(new R(wt[1]|0,wt[2]|0,wt[3].trim())):Ie.length>0&&ge.push(new R("unknown",0,Ie))}}),ge}function U(K,ge){ge.forEach(function(Ie){var wt=K[Ie.file];if(wt){var Dt=wt.index[Ie.line];if(Dt){Dt.errors.push(Ie),wt.hasErrors=!0;return}}K.unknown.hasErrors=!0,K.unknown.lines[0].errors.push(Ie)})}function z(K,ge,Ie,wt,Dt){if(!K.getShaderParameter(ge,K.COMPILE_STATUS)){var yt=K.getShaderInfoLog(ge),Nt=wt===K.FRAGMENT_SHADER?"fragment":"vertex";Se(Ie,"string",Nt+" shader source must be a string",Dt);var tn=I(Ie,Dt),sn=F(yt);U(tn,sn),Object.keys(tn).forEach(function(nn){var Mt=tn[nn];if(!Mt.hasErrors)return;var wn=[""],hn=[""];function rn(Wt,st){wn.push(Wt),hn.push(st||"")}rn("file number "+nn+": "+Mt.name+`
|
|||
|
|
`,"color:red;text-decoration:underline;font-weight:bold"),Mt.lines.forEach(function(Wt){if(Wt.errors.length>0){rn(M(Wt.number,4)+"| ","background-color:yellow; font-weight:bold"),rn(Wt.line+r,"color:red; background-color:yellow; font-weight:bold");var st=0;Wt.errors.forEach(function(St){var ln=St.message,An=/^\s*'(.*)'\s*:\s*(.*)$/.exec(ln);if(An){var Xt=An[1];switch(ln=An[2],Xt){case"assign":Xt="=";break}st=Math.max(Wt.line.indexOf(Xt,st),0)}else st=0;rn(M("| ",6)),rn(M("^^^",st+3)+r,"font-weight:bold"),rn(M("| ",6)),rn(ln+r,"font-weight:bold")}),rn(M("| ",6)+r)}else rn(M(Wt.number,4)+"| "),rn(Wt.line+r,"color:red")}),typeof document<"u"&&!window.chrome?(hn[0]=wn.join("%c"),console.log.apply(console,hn)):console.log(wn.join(""))}),s.raise("Error compiling "+Nt+" shader, "+tn[0].name)}}function X(K,ge,Ie,wt,Dt){if(!K.getProgramParameter(ge,K.LINK_STATUS)){var yt=K.getProgramInfoLog(ge),Nt=I(Ie,Dt),tn=I(wt,Dt),sn='Error linking program with vertex shader, "'+tn[0].name+'", and fragment shader "'+Nt[0].name+'"';typeof document<"u"?console.log("%c"+sn+r+"%c"+yt,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(sn+r+yt),s.raise(sn)}}function Y(K){K._commandRef=P()}function W(K,ge,Ie,wt){Y(K);function Dt(sn){return sn?wt.id(sn):0}K._fragId=Dt(K.static.frag),K._vertId=Dt(K.static.vert);function yt(sn,nn){Object.keys(nn).forEach(function(Mt){sn[wt.id(Mt)]=!0})}var Nt=K._uniformSet={};yt(Nt,ge.static),yt(Nt,ge.dynamic);var tn=K._attributeSet={};yt(tn,Ie.static),yt(tn,Ie.dynamic),K._hasCount="count"in K.static||"count"in K.dynamic||"elements"in K.static||"elements"in K.dynamic}function Q(K,ge){var Ie=$();a(K+" in command "+(ge||P())+(Ie==="unknown"?"":" called from "+Ie))}function J(K,ge,Ie){K||Q(ge,Ie||P())}function ie(K,ge,Ie,wt){K in ge||Q("unknown parameter ("+K+")"+l(Ie)+". possible values: "+Object.keys(ge).join(),wt||P())}function Se(K,ge,Ie,wt){v(K,ge)||Q("invalid parameter type"+l(Ie)+". expected "+ge+", got "+typeof K,wt||P())}function Ae(K){K()}function Pe(K,ge,Ie){K.texture?O(K.texture._texture.internalformat,ge,"unsupported texture format for attachment"):O(K.renderbuffer._renderbuffer.format,Ie,"unsupported renderbuffer format for attachment")}var De=33071,He=9728,Ye=9984,Be=9985,Je=9986,mt=9987,le=5120,Ze=5121,pe=5122,se=5123,we=5124,$e=5125,rt=5126,pt=32819,Lt=32820,Jt=33635,en=34042,zt=36193,it={};it[le]=it[Ze]=1,it[pe]=it[se]=it[zt]=it[Jt]=it[pt]=it[Lt]=2,it[we]=it[$e]=it[rt]=it[en]=4;function ae(K,ge){return K===Lt||K===pt||K===Jt?2:K===en?4:it[K]*ge}function re(K){return!(K&K-1)&&!!K}function je(K,ge,Ie){var wt,Dt=ge.width,yt=ge.height,Nt=ge.channels;s(Dt>0&&Dt<=Ie.maxTextureSize&&yt>0&&yt<=Ie.maxTextureSize,"invalid texture shape"),(K.wrapS!==De||K.wrapT!==De)&&s(re(Dt)&&re(yt),"incompatible wrap mode for texture, both width and height must be power of 2"),ge.mipmask===1?Dt!==1&&yt!==1&&s(K.minFilter!==Ye&&K.minFilter!==Je&&K.minFilter!==Be&&K.minFilter!==mt,"min filter requires mipmap"):(s(re(Dt)&&re(yt),"texture must be a square power of 2 to support mipmapping"),s(ge.mipmask===(Dt<<1)-1,"missing or incomplete mipmap data")),ge.type===rt&&(Ie.extensions.indexOf("oes_texture_float_linear")<0&&s(K.minFilter===He&&K.magFilter===He,"filter not supported, must enable oes_texture_float_linear"),s(!K.genMipmaps,"mipmap generation not supported with float textures"));var tn=ge.images;for(wt=0;wt<16;++wt)if(tn[wt]){var sn=Dt>>wt,nn=yt>>wt;s(ge.mipmask&1<<wt,"missing mipmap data");var Mt=tn[wt];if(s(Mt.width===sn&&Mt.height===nn,"invalid shape for mip images"),s(Mt.format===ge.format&&Mt.internalformat===ge.internalformat&&Mt.type===ge.type,"incompatible type for mip image"),!Mt.compressed)if(Mt.data){var wn=Math.ceil(ae(Mt.type,Nt)*sn/Mt.unpackAlignment)*Mt.unpackAlignment;s(Mt.data.byteLength===wn*nn,"invalid data for image, buffer size is inconsistent with image format")}else Mt.element||Mt.copy}else K.genMipmaps||s((ge.mipmask&1<<wt)===0,"extra mipmap data");ge.compressed&&s(!K.genMipmaps,"mipmap generation for compressed images not supported")}function vt(K,ge,Ie,wt){var Dt=K.wid
|
|||
|
|
`).replace(/}/g,`}
|
|||
|
|
`).replace(/{/g,`{
|
|||
|
|
`),rn=Function.apply(null,ge.concat(hn));return rn.apply(null,Ie)}return{global:tn,link:wt,block:Dt,proc:nn,scope:yt,cond:Nt,compile:Mt}}var ou="xyzw".split(""),yc=5121,_c=1,bc=2,$p=0,iu=1,wc=2,Up=3,fs=4,wf=5,Ef=6,gd="dither",md="blend.enable",yd="blend.color",Vp="blend.equation",_d="blend.func",ov="depth.enable",Wp="depth.func",Tg="depth.range",iv="depth.mask",ps="colorMask",av="cull.enable",lv="cull.face",sv="frontFace",bd="lineWidth",Ls="polygonOffset.enable",xf="polygonOffset.offset",Gp="sample.alpha",zp="sample.enable",Cu="sample.coverage",Nu="stencil.enable",Rr="stencil.mask",wd="stencil.func",Of="stencil.opFront",hs="stencil.opBack",aa="scissor.enable",Ec="scissor.box",Ti="viewport",ku="profile",tl="framebuffer",Sf="vert",Ra="frag",Fi="elements",Is="primitive",Fs="count",Hp="offset",Qt="instances",xc="vao",Af="Width",Mf="Height",Pu=tl+Af,Oc=tl+Mf,Xp=Ti+Af,uv=Ti+Mf,Sc="drawingBuffer",Tf=Sc+Af,Yp=Sc+Mf,cv=[_d,Vp,wd,Of,hs,Cu,Ti,Ec,xf],Bs=34962,dv=34963,vs=35632,Ru=35633,qp=3553,Cg=34067,Ng=2884,kg=3042,fv=3024,Kp=2960,Cf=2929,Pg=3089,gs=32823,Du=32926,_y=32928,mi=5126,Nf=35664,Ac=35665,kf=35666,Ed=5124,Pf=35667,Rf=35668,Df=35669,Mc=35670,au=35671,ga=35672,Zp=35673,jf=35674,Tc=35675,xd=35676,wa=35678,xi=35680,Lf=4,za=1028,wr=1029,Jp=2304,If=2305,Qp=32775,pv=32776,Rg=519,ju=7680,Dg=0,Cc=1,jg=32774,hv=513,Ff=36160,Lg=36064,Gl={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},lu=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Lu={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Er={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},vv={frag:vs,vert:Ru},Od={cw:Jp,ccw:If};function su(K){return Array.isArray(K)||n(K)||Ia(K)}function Bf(K){return K.sort(function(ge,Ie){return ge===Ti?-1:Ie===Ti?1:ge<Ie?-1:1})}function Ha(K,ge,Ie,wt){this.thisDep=K,this.contextDep=ge,this.propDep=Ie,this.append=wt}function ms(K){return K&&!(K.thisDep||K.contextDep||K.propDep)}function Ci(K){return new Ha(!1,!1,!1,K)}function dl(K,ge){var Ie=K.type;if(Ie===$p){var wt=K.data.length;return new Ha(!0,wt>=1,wt>=2,ge)}else if(Ie===fs){var Dt=K.data;return new Ha(Dt.thisDep,Dt.contextDep,Dt.propDep,ge)}else{if(Ie===wf)return new Ha(!1,!1,!1,ge);if(Ie===Ef){for(var yt=!1,Nt=!1,tn=!1,sn=0;sn<K.data.length;++sn){var nn=K.data[sn];if(nn.type===iu)tn=!0;else if(nn.type===wc)Nt=!0;else if(nn.type===Up)yt=!0;else if(nn.type===$p){yt=!0;var Mt=nn.data;Mt>=1&&(Nt=!0),Mt>=2&&(tn=!0)}else nn.type===fs&&(yt=yt||nn.data.thisDep,Nt=Nt||nn.data.contextDep,tn=tn||nn.data.propDep)}return new Ha(yt,Nt,tn,ge)}else return new Ha(Ie===Up,Ie===wc,Ie===iu,ge)}}var zl=new Ha(!1,!1,!1,function(){});function by(K,ge,Ie,wt,Dt,yt,Nt,tn,sn,nn,Mt,wn,hn,rn,Wt){var st=nn.Record,St={add:32774,subtract:32778,"reverse subtract":32779};Ie.ext_blend_minmax&&(St.min=Qp,St.max=pv);var ln=Ie.angle_instanced_arrays,An=Ie.webgl_draw_buffers,Xt={dirty:!0,profile:Wt.profile},kn={},Kt=[],_n={},Yt={};function xn(xe){return xe.replace(".","_")}function ar(xe,de,We){var tt=xn(xe);Kt.push(xe),kn[tt]=Xt[tt]=!!We,_n[tt]=de}function xr(xe,de,We){var tt=xn(xe);Kt.push(xe),Array.isArray(We)?(Xt[tt]=We.slice(),kn[tt]=We.slice()):Xt[tt]=kn[tt]=We,Yt[tt]=de}ar(gd,fv),ar(md,kg),xr(yd,"blendColor",[0,0,0,0]),xr(Vp,"blendEquationSeparate",[jg,jg]),xr(_d,"blendFuncSeparate",[Cc,Dg,Cc,Dg]),ar(ov,Cf,!0),xr(Wp,"depthFunc",hv),xr(Tg,"depthRange",[0,1]),xr(iv,"
|