Files
qhmes/web-dist/js/NodeStyle-Bo2gmgjj-CM4kHPNz.js

43 lines
343 KiB
Java
Raw Normal View History

2026-06-16 18:19:57 +08:00
import{e as Ls,i as Xn,b as au,F as su,af as ks,a0 as lu,a3 as uu}from"./vue-vendor-DNhG1Cve.js";import{n as Is}from"./_commonjsHelpers-B52_cu2H-BG14nIm9.js";import{n as cu}from"./index-Crt100Db-CDbHzweT.js";import{P as pu}from"./propStore-Cl0CojEU-BjnqDV4W.js";import{U as No}from"./NodeContainer-D9PNfjwh-CawrgSrv.js";import{i4 as du,i5 as fu,i6 as Rs,i7 as hu,i8 as Xs,i9 as yu,ia as gu,ib as vu,ic as wi,cD as lr,cL as Bs,id as mu,ie as _u,aa as Si,ig as bu,ih as xu,ii as Eu,ij as Ou,ik as wu,il as Su,im as Mu,aQ as X,bZ as ur,bW as Tu,io as Hs,ip as je,dz as Io,i as Fi,iq as Au,a4 as zs,at as Ve,a3 as Pu,ir as Ir,is as _r,aL as Du}from"./index-X7Y8jykP.js";import{t as Nu}from"./throttle-De_jAmBh.js";var Cu=Object.prototype,ju=Cu.hasOwnProperty,Z=du(function(n,t){if(fu(t)||Rs(t)){hu(t,Xs(t),n);return}for(var e in t)ju.call(t,e)&&yu(n,e,t[e])});function Lu(n,t,e,o){var r=-1,i=n==null?0:n.length;for(o&&i&&(e=n[++r]);++r<i;)e=t(e,n[r],r,n);return e}function ku(n){return typeof n=="function"?n:gu}function it(n,t){var e=lr(n)?vu:wi;return e(n,ku(t))}function Iu(n,t){return Bs(t,function(e){return[e,n[e]]})}function Ru(n){var t=-1,e=Array(n.size);return n.forEach(function(o){e[++t]=[o,o]}),e}var Xu="[object Map]",Bu="[object Set]";function Hu(n){return function(t){var e=mu(t);return e==Xu?_u(t):e==Bu?Ru(t):Iu(t,n(t))}}var be=Hu(Xs);function zu(n,t){var e=-1,o=Rs(n)?Array(n.length):[];return wi(n,function(r,i,a){o[++e]=t(r,i,a)}),o}function re(n,t){var e=lr(n)?Bs:zu;return e(n,Si(t))}var Yu=Object.prototype,Gu=Yu.hasOwnProperty;function Uu(n,t){return n!=null&&Gu.call(n,t)}function Wi(n,t){return n!=null&&bu(n,t,Uu)}var Vu=Math.max;function Fu(n,t,e){var o=n==null?0:n.length;if(!o)return-1;var r=e==null?0:xu(e);return r<0&&(r=Vu(o+r,0)),Eu(n,t,r)}var Wu="[object Boolean]";function Rr(n){return n===!0||n===!1||Ou(n)&&wu(n)==Wu}function vt(n){return n==null}function qe(n){return n===void 0}function Ku(n,t){var e={};return t=Si(t),Su(n,function(o,r,i){Mu(e,t(o,r,i),o)}),e}function Zu(n,t,e,o,r){return r(n,function(i,a,s){e=o?(o=!1,i):t(e,i,a,s)}),e}function qu(n,t,e){var o=lr(n)?Lu:Zu,r=arguments.length<3;return o(n,Si(t),e,r,wi)}var cr,H,Ys,we,Ki,Gs,Us,Vs,Mi,Xr,Br,Bn={},Fs=[],$u=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qn=Array.isArray;function ue(n,t){for(var e in t)n[e]=t[e];return n}function Ti(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function $e(n,t,e){var o,r,i,a={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?cr.call(arguments,2):e),typeof n=="function"&&n.defaultProps!=null)for(i in n.defaultProps)a[i]===void 0&&(a[i]=n.defaultProps[i]);return Co(n,a,o,r,null)}function Co(n,t,e,o,r){var i={type:n,props:t,key:e,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r==null?++Ys:r,__i:-1,__u:0};return r==null&&H.vnode!=null&&H.vnode(i),i}function Ai(){return{current:null}}function Je(n){return n.children}function G(n,t){this.props=n,this.context=t}function Qe(n,t){if(t==null)return n.__?Qe(n.__,n.__i+1):null;for(var e;t<n.__k.length;t++)if((e=n.__k[t])!=null&&e.__e!=null)return e.__e;return typeof n.type=="function"?Qe(n):null}function Ws(n){var t,e;if((n=n.__)!=null&&n.__c!=null){for(n.__e=n.__c.base=null,t=0;t<n.__k.length;t++)if((e=n.__k[t])!=null&&e.__e!=null){n.__e=n.__c.base=e.__e;break}return Ws(n)}}function Zi(n){(!n.__d&&(n.__d=!0)&&we.push(n)&&!Ro.__r++||Ki!=H.debounceRendering)&&((Ki=H.debounceRendering)||Gs)(Ro)}function Ro(){for(var n,t,e,o,r,i,a,s=1;we.length;)we.length>s&&we.sort(Us),n=we.shift(),s=we.length,n.__d&&(e=void 0,o=void 0,r=(o=(t=n).__v).__e,i=[],a=[],t.__P&&((e=ue({},o)).__v=o.__v+1,H.vnode&&H.vnode(e),Pi(t.__P,e,o,t.__n,t.__P.namespaceURI,32&o.__u?[r]:null,i,r==null?Qe(o):r,!!(32&o.__u),a),e.__v=o.__v,e.__.__k[e.__i]=e,qs(i,e,a),o.__e=o.__=null,e.__e!=r&&Ws(e)));Ro.__r=0}function Ks(n,t,e,o,r,i,a,s,l,u,p){var c,d,f,h,y,v,g,m=o&&o.__k||Fs,M=t.length;for(l=Ju(e,t,m,l,M),c=0;c<M;c++)(f=e.__k[c])!=null&&(d=f.__i==-1?Bn:m[f.__i]||Bn,f.__i=c,v=Pi(n,f,d,r,i,a,s,l,u,p),h=f.__e,f.ref&&d.ref!=f.r
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 zr=function(n,t){return zr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var r in o)o.hasOwnProperty(r)&&(e[r]=o[r])},zr(n,t)};function pc(n,t){zr(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Ho=function(){return Ho=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Ho.apply(this,arguments)};function Qt(n){var t=typeof Symbol=="function"&&n[Symbol.iterator],e=0;return t?t.call(n):{next:function(){return n&&e>=n.length&&(n=void 0),{value:n&&n[e++],done:!n}}}}function Fe(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var o=e.call(n),r,i=[],a;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(a)throw a.error}}return i}function ki(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(Fe(arguments[t]));return n}var zo=Symbol("mobx did run lazy initializers"),En=Symbol("mobx pending decorators"),dc={},fc={};function hc(n,t){var e=t?dc:fc;return e[n]||(e[n]={configurable:!0,enumerable:t,get:function(){return Le(this),this[n]},set:function(o){Le(this),this[n]=o}})}function Le(n){var t,e;if(n[zo]!==!0){var o=n[En];if(o){fn(n,zo,!0);var r=ki(Object.getOwnPropertySymbols(o),Object.keys(o));try{for(var i=Qt(r),a=i.next();!a.done;a=i.next()){var s=a.value,l=o[s];l.propertyCreator(n,l.prop,l.descriptor,l.decoratorTarget,l.decoratorArguments)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}}}}function nl(n,t){return function(){var e,o=function(r,i,a,s){if(s===!0)return t(r,i,a,r,e),null;if(!Object.prototype.hasOwnProperty.call(r,En)){var l=r[En];fn(r,En,Ho({},l))}return r[En][i]={prop:i,propertyCreator:t,descriptor:a,decoratorTarget:r,decoratorArguments:e},hc(i,n)};return yc(arguments)?(e=Bo,o.apply(null,arguments)):(e=Array.prototype.slice.call(arguments),o)}}function yc(n){return(n.length===2||n.length===3)&&(typeof n[1]=="string"||typeof n[1]=="symbol")||n.length===4&&n[3]===!0}function eo(n,t,e){return rn(n)?n:Array.isArray(n)?E.array(n,{name:e}):dn(n)?E.object(n,void 0,{name:e}):hn(n)?E.map(n,{name:e}):to(n)?E.set(n,{name:e}):n}function gc(n,t,e){return n==null||Wt(n)||ie(n)||St(n)||Lt(n)?n:Array.isArray(n)?E.array(n,{name:e,deep:!1}):dn(n)?E.object(n,void 0,{name:e,deep:!1}):hn(n)?E.map(n,{name:e,deep:!1}):to(n)?E.set(n,{name:e,deep:!1}):K(!1)}function pr(n){return n}function vc(n,t,e){return Al(n,t)?t:n}function dr(n){Pe(n);var t=nl(!0,function(o,r,i,a,s){var l=i?i.initializer?i.initializer.call(o):i.value:void 0;zi(o).addObservableProp(r,l,n)}),e=t;return e.enhancer=n,e}var ol={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(ol);function Ue(n){return n==null?ol:typeof n=="string"?{name:n,deep:!0,proxy:!0}:n}var Ii=dr(eo),mc=dr(gc),rl=dr(pr),_c=dr(vc);function uo(n){return n.defaultDecorator?n.defaultDecorator.enhancer:n.deep===!1?pr:eo}function bc(n,t,e){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return Ii.apply(null,arguments);if(rn(n))return n;var o=dn(n)?E.object(n,t,e):Array.isArray(n)?E.array(n,t):hn(n)?E.map(n,t):to(n)?E.set(n,t):n;if(o!==n)return o;K(!1)}var Ji={box:function(n,t){arguments.length>2&&mn("box");var e=Ue(t);return new Ne(n,uo(e),e.name,!0,e.equals)},array:function(n,t){arguments.length>2&&mn("array");var e=Ue(t);return ip(n,uo(e),e.name)},map:function(n,t){arguments.length>2&&mn("map");var e=Ue(t);return new Hi(n,uo(e),e.name)},set:function(n,t){arguments.length>2&&mn("set");var e=Ue(t);return new Ml(n,uo(e),e.name)},object:function(n,t,e){typeof arguments[1]=="string"&&mn("object");var o=Ue(e);if(o.proxy===!1)return Wr({},n,t,o);var r=bl(o),i=Wr({},void 0,void 0,o),a=np(i);return xl(a,n,t,r),a},ref:rl,shallow:mc,deep:Ii,struct:_c},E=bc;Object.keys(Ji).forEach(function(n){return E[n]=J
/*
Tracing '`+n.name+`'
You are entering this break point because derivation '`+n.name+"' is being traced and '"+t.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.
`+(n instanceof nn?n.derivation.toString().replace(/[*]\//g,"/"):"")+`
The dependencies for this derivation are:
`+e.join(`
`)+`
*/
`)()}}function hl(n,t,e){if(t.length>=1e3){t.push("(and many more)");return}t.push(""+new Array(e).join(" ")+n.name),n.dependencies&&n.dependencies.forEach(function(o){return hl(o,t,e+1)})}var Hn=(function(){function n(t,e,o,r){t===void 0&&(t="Reaction@"+wt()),r===void 0&&(r=!1),this.name=t,this.onInvalidate=e,this.errorHandler=o,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=q.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+wt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ee.NONE}return n.prototype.onBecomeStale=function(){this.schedule()},n.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,C.pendingReactions.push(this),yl())},n.prototype.isScheduled=function(){return this._isScheduled},n.prototype.runReaction=function(){if(!this.isDisposed){if(Gt(),this._isScheduled=!1,Yr(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ct()}catch(t){this.reportExceptionInDerivation(t)}}Ut()}},n.prototype.track=function(t){if(!this.isDisposed){Gt(),this._isRunning=!0;var e=il(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Gr(this),On(e)&&this.reportExceptionInDerivation(e.cause),Ut()}},n.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler){this.errorHandler(t,this);return}if(C.disableErrorBoundaries)throw t;C.suppressReactionErrors,C.globalReactionErrorHandlers.forEach(function(o){return o(t,e)})},n.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Gt(),Gr(this),Ut()))},n.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[k]=this,t},n.prototype.toString=function(){return"Reaction["+this.name+"]"},n.prototype.trace=function(t){t===void 0&&(t=!1),Qc(this,t)},n})(),jc=100,Fr=function(n){return n()};function yl(){C.inBatch>0||C.isRunningReactions||Fr(Lc)}function Lc(){C.isRunningReactions=!0;for(var n=C.pendingReactions,t=0;n.length>0;){++t===jc&&n.splice(0);for(var e=n.splice(0),o=0,r=e.length;o<r;o++)e[o].runReaction()}C.isRunningReactions=!1}var Uo=xe("Reaction",Hn);function kc(n){var t=Fr;Fr=function(e){return n(function(){return t(e)})}}function Ct(){return!1}function Ic(n){return function(){}}function Rc(){K(!1)}function ta(n){return function(t,e,o){if(o){if(o.value)return{value:De(n,o.value),enumerable:!1,configurable:!0,writable:!0};var r=o.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return De(n,r.call(this))}}}return Xc(n).apply(this,arguments)}}function Xc(n){return function(t,e,o){Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get:function(){},set:function(r){fn(this,e,b(n,r))}})}}function Bc(n,t,e,o){return o===!0?(br(n,t,e.value),null):e?{configurable:!0,enumerable:!1,get:function(){return br(this,t,e.value||e.initializer.call(this)),this[t]},set:Rc}:{enumerable:!1,configurable:!0,set:function(r){br(this,t,r)},get:function(){}}}var b=function(n,t,e,o){if(arguments.length===1&&typeof n=="function")return De(n.name||"<unnamed action>",n);if(arguments.length===2&&typeof t=="function")return De(n,t);if(arguments.length===1&&typeof n=="string")return ta(n);if(o===!0)fn(n,t,De(n.name||t,e.value,this));else return ta(t).apply(null,arguments)};b.bound=Bc;function Hc(n,t){var e=typeof n=="string"?n:n.name||"<unnamed action>",o=typeof n=="function"?n:t;return ll(e,o,this,void 0)}function br(n,t,e){fn(n,t,De(t,e.bind(n)))}function zc(n,t){t===void 0&&(t=Ni);var e=t&&t.name||n.name||"Autorun@"+wt(),o=!t.scheduler&&!t.delay,r;if(o)r=new Hn(e,function(){this.track(s)},t.onError,t.requiresObservable);else{var i=gl(t),a=!1;r=new Hn(e,function(){a||(a=!0,i(function(){a=!1,r.isDisposed||r.track(s)}))},t.onError,t.requiresObservable)}function s(){n(r)}return r.schedule(),r.getDisposer()}var Yc=function(n){return n()};function gl(n){return n.scheduler?n.scheduler:n.delay?function(t){return setTimeout(t,n.delay)}:Yc}function vl(n,t,e){e===void 0&&(e=Ni);var o=e.name||"Reaction@"+wt(),r=b(o,e.onError?Gc(e.o
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"}},Ga=function(n){var t=n.start,e=n.end,o=n.sourceNode,r=n.targetNode,i=n.offset,a=Tt(o),s=Tt(r),l=Fo(a,i),u=Fo(s,i),p=Wo(l,a,t),c=Wo(u,s,e);return{sNext:p,ePre:c}},Gi=function(n){var t=n.replace(/M/g,"").replace(/C/g,",").split(","),e=go(t[0]),o=go(t[1]),r=go(t[2]),i=go(t[3]);return[e,o,r,i]},go=function(n){var t=Nt(n.replace(/(^\s*)/g,"").split(" "),2),e=t[0],o=t[1];return{x:+e,y:+o}},Ua=function(n,t){var e=Nt(n,4),o=e[0],r=e[1],i=e[2],a=e[3],s=Qd(o,r,i,a,t);return[s,n[3]]},Yl=function(n,t){for(var e=n.x,o=n.y,r=ke(t),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(d){var f=d.start,h=d.end;if(f.x===h.x){var y={x:f.x,y:o},v=Yn(y,f,h);if(v){var g=Math.abs(f.x-e);g<i&&(i=g,a=y)}}else if(f.y===h.y){var y={x:e,y:f.y},v=Yn(y,f,h);if(v){var g=Math.abs(f.y-o);g<i&&(i=g,a=y)}}}),!a){var u=s[0],p=u.start,c=u.end;a={x:p.x+(c.x-p.x)/2,y:p.y+(c.y-p.y)/2}}return a},ud=function(n){return Ve(n,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Va=function(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))};function cd(n,t){return typeof t!="function"?function(e,o,r){return Object.assign({type:n.edgeType},r)}:function(e,o,r){var i=t(e,o,r);return i?typeof i=="string"?Object.assign({},r,{type:i}):Object.assign({type:i},r):{type:n.edgeType}}}var pd=function(n){var t=n.rows,e=n.rowsLength,o=n.fontSize,r=0;return it(t,function(i){var a=zl(i);r=a>r?a:r}),{width:Math.ceil(r/2)*o+o/4,height:e*(o+2)+o/4}},Be=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var o=e.call(n),r,i=[],a;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(a)throw a.error}}return i},vo=function(n,t,e){if(arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return n.concat(i||Array.prototype.slice.call(t))};function sn(n,t,e){return e&&t*Math.round(n/t)||n}function dd(n,t,e){if(!n)return[];var o=Math.min.apply(Math,vo([],Be(n.map(function(y){return y[0]})),!1)),r=Math.max.apply(Math,vo([],Be(n.map(function(y){return y[0]})),!1)),i=Math.min.apply(Math,vo([],Be(n.map(function(y){return y[1]})),!1)),a=Math.max.apply(Math,vo([],Be(n.map(function(y){return y[1]})),!1)),s=-o,l=-i,u=n.map(function(y){var v=Be(y,2),g=v[0],m=v[1];return[g+s,m+l]}),p=r-o,c=a-i,d=t?t/p:1,f=e?e/c:1,h=Math.min(d,f);return u.map(function(y){var v=Be(y,2),g=v[0],m=v[1];return[g*h,m*h]})}var Or=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var o=e.call(n),r,i=[],a;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(a)throw a.error}}return i},wr=function(n,t,e){var o=Or(n,2),r=o[0],i=o[1],a=Or(t,2),s=a[0],l=a[1],u=Or(e,2),p=u[0],c=u[1];return r>s&&r<p&&i>l&&i<c},Gl=function(n,t){var e=t.multipleSelectKey,o=!1;switch(e){case"meta":o=n.metaKey;break;case"alt":o=n.altKey;break;case"shift":o=n.shiftKey;break;case"ctrl":o=n.ctrlKey;break;default:o=!1;break}return o},Ui=(function(){var n=function(t,e){return n=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])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}})();function Fa(n,t){return n instanceof mt&&t instanceof mt}var Ul=(function(n){Ui(t,n);function t(e,o,r){var i=n.call(this,3)||this;return i[0]=e,i[1]=o,i[2]=r,i.x=e,i.y=o,i.z=r,Object.setPrototypeOf(i,t.prototype),i}return t.prototype.add=function(e){if(Fa(this,e))re
C `).concat(i.x," ").concat(i.y,`,
`).concat(a.x," ").concat(a.y,`,
`).concat(s.x," ").concat(s.y)},t.prototype.initPoints=function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()},t.prototype.updatePoints=function(){var e=this.getControls(),o=e.sNext,r=e.ePre;this.updatePath(o,r)},t.prototype.updatePath=function(e,o){e=X(e),o=X(o);var r={x:this.startPoint.x,y:this.startPoint.y},i={x:this.endPoint.x,y:this.endPoint.y};if(!e||!o){var a=this.getControls();e=a.sNext,o=a.ePre}this.pointsList=[r,e,o,i],this.path=this.getPath(this.pointsList)},t.prototype.updateStartPoint=function(e){this.startPoint=Object.assign({},e),this.updatePoints()},t.prototype.updateEndPoint=function(e){this.endPoint=Object.assign({},e),this.updatePoints()},t.prototype.moveStartPoint=function(e,o){this.startPoint.x+=e,this.startPoint.y+=o;var r=Mr(this.pointsList,3),i=r[1],a=r[2];i.x+=e,i.y+=o,this.updatePath(i,a)},t.prototype.moveEndPoint=function(e,o){this.endPoint.x+=e,this.endPoint.y+=o;var r=Mr(this.pointsList,3),i=r[1],a=r[2];a.x+=e,a.y+=o,this.updatePath(i,a)},t.prototype.updateAdjustAnchor=function(e,o){var r;o==="sNext"?this.pointsList[1]=e:o==="ePre"&&(this.pointsList[2]=e),this.path=this.getPath(this.pointsList),!((r=this.text)===null||r===void 0)&&r.value&&this.setText(Z({},this.text,this.textPosition))},t.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},t.prototype.getAdjustEnd=function(){var e=this.pointsList;return e[e.length-1]||this.endPoint},t.prototype.updateAfterAdjustStartAndEnd=function(e){var o=e.startPoint,r=e.endPoint,i=e.sourceNode,a=e.targetNode,s=Ga({start:o,end:r,sourceNode:i,targetNode:a,offset:this.offset}),l=s.sNext,u=s.ePre;this.pointsList=[o,l,u,r],this.initPoints()},Dt([E],t.prototype,"offset",void 0),Dt([E],t.prototype,"path",void 0),Dt([b],t.prototype,"initPoints",null),Dt([b],t.prototype,"updatePoints",null),Dt([b],t.prototype,"updateStartPoint",null),Dt([b],t.prototype,"updateEndPoint",null),Dt([b],t.prototype,"moveStartPoint",null),Dt([b],t.prototype,"moveEndPoint",null),Dt([b],t.prototype,"updateAdjustAnchor",null),Dt([b],t.prototype,"getAdjustStart",null),Dt([b],t.prototype,"getAdjustEnd",null),Dt([b],t.prototype,"updateAfterAdjustStartAndEnd",null),t})(vr),xf=(function(){var n=function(t,e){return n=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])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}})(),An=function(){return An=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},An.apply(this,arguments)},es=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var o=e.call(n),r,i=[],a;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(a)throw a.error}}return i},Ef=function(n,t,e){if(arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return n.concat(i||Array.prototype.slice.call(t))},ns=(function(n){xf(t,n);function t(){var e=n.apply(this,Ef([],es(arguments),!1))||this;return e.modelType=z.LINE_EDGE,e}return t.prototype.getEdgeStyle=function(){var e=this.graphModel.theme.line,o=n.prototype.getEdgeStyle.call(this),r=this.properties.style,i=r===void 0?{}:r;return An(An(An({},o),X(e)),X(i))},t.prototype.initEdgeData=function(e){n.prototype.initEdgeData.call(this,e),this.points=this.getPath([this.startPoint,this.endPoint])},t.prototype.getPath=function(e){var o=es(e,2),r=o[0],i=o[1];return"".concat(r.x,",").concat(r.y," ").concat(i.x,",").concat(i.y)},t.prototype.getTextPosition=function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}},t})(vr),Of
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/var ys;function Mh(){return ys||(ys=1,(function(n){(function(){var t={}.hasOwnProperty;function e(){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 e.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)t.call(i,s)&&i[s]&&(a=r(a,s));return a}function r(i,a){return a?i?i+" "+a:i+a:i}n.exports?(e.default=e,n.exports=e):window.classNames=e})()})(hs)),hs.exports}var Th=Mh();const Ah=Is(Th);var Ph=(function(){var n=function(t,e){return n=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])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}})(),di=function(){return di=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},di.apply(this,arguments)},Dh=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var o=e.call(n),r,i=[],a;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(a)throw a.error}}return i},Ql=(function(n){Ph(t,n);function t(e){var o=n.call(this)||this;o.mouseDownHandler=function(i){var a=o.props,s=a.draggable,l=a.model,u=a.graphModel,p=u.editConfigModel.nodeTextDraggable;(s!=null?s:p)&&(i.stopPropagation(),o.stepperDrag.model=l,o.stepperDrag.handleMouseDown(i))},o.onDragging=function(i){var a=i.deltaX,s=i.deltaY,l=o.props,u=l.model,p=l.graphModel.transformModel;if(a||s){var c=Dh(p.fixDeltaXY(a,s),2),d=c[0],f=c[1];u.moveText(d,f)}},o.dbClickHandler=function(){var i=o.props,a=i.editable,s=i.graphModel.eventCenter,l=i.model;a&&l.setElementState(W.TEXT_EDIT),s.emit(N.TEXT_DBCLICK,{data:l.text,model:l})};var r=e.draggable;return o.stepperDrag=new ae({onDragging:o.onDragging,step:1,eventType:"TEXT",isStopPropagation:r}),o}return t.prototype.getShape=function(){var e=this.props,o=e.model,r=e.graphModel,i=r.editConfigModel,a=o.text,s=a.value,l=a.x,u=a.y,p=a.editable,c=a.draggable,d={x:l,y:u,className:"",value:s},f=o.getTextStyle(),h=i.nodeTextDraggable||c;return O(Wl,di({},d,f,{className:Ah({"lf-element-text":p,"lf-text-draggable":!p&&h,"lf-text-disabled":!p&&!h}),model:o}))},t.prototype.render=function(){var e=this.props.model.text;if(e)return O("g",{onMouseDown:this.mouseDownHandler,onDblClick:this.dbClickHandler,children:this.getShape()})},t})(G),Nh=(function(){var n=function(t,e){return n=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])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}})(),Bt=function(){return Bt=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Bt.apply(this,arguments)},So=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var o=e.call(n),r,i=[],a;try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(a)throw a.error}}return i},Ch=(function(n){Nh(t,n);function t(e){var o=n.call(this,e)||this;return o.setHoverOn=function(){o.setState({isHovered:!0})},o.setHoverOff=function(){o.setState({isHovered:!1})},o.state={isHovered:!1},o}return t.protot
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"}},t.prototype.getAppendShape=function(e){var o=this.getAppendAttributes(e),r=o.d,i=o.strokeWidth,a=o.fill,s=o.strokeDasharray,l=o.stroke;return O(Fn,{d:r,fill:a,strokeWidth:i,stroke:l,strokeDasharray:s})},t.prototype.getAppendWidth=function(){for(var e=this,o=this.props,r=o.model,i=o.graphModel,a=r.pointsList,s=r.draggable,l=[],u=a.length,p=function(f){var h="lf-polyline-append",y={start:{x:a[f].x,y:a[f].y},end:{x:a[f+1].x,y:a[f+1].y},startIndex:f,endIndex:f+1,direction:et.HORIZONTAL,draggable:!0},v=O("g",{className:h,children:c.getAppendShape(y)}),g=i.editConfigModel,m=g.adjustEdge,M=g.adjustEdgeMiddle;if(m&&s){var T=y.startIndex,w=y.endIndex,S=M&&(T===0||w===u-1);y.draggable=!S,y.start.x===y.end.x?(y.draggable&&(h+="-ew-resize"),y.direction=et.VERTICAL):y.start.y===y.end.y&&(y.draggable&&(h+="-ns-resize"),y.direction=et.HORIZONTAL),v=O("g",{className:c.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(_){return e.beforeDragStart(_,y)},children:O("g",{className:h,children:c.getAppendShape(y)})})}l.push(v)},c=this,d=0;d<u-1;d++)p(d);return O("g",{children:l})},t})(mr),Ke=function(){return Ke=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Ke.apply(this,arguments)},ey=(function(){function n(t){var e=this;this.nodeConfig=null,this.fakeNode=null,this.stopDrag=function(){e.nodeConfig=null,window.document.removeEventListener("mouseup",e.stopDrag)},this.dragEnter=function(r){!e.nodeConfig||e.fakeNode||(e.fakeNode=e.lf.createFakeNode(Ke(Ke({},e.nodeConfig),e.clientToLocalPoint({x:r.clientX,y:r.clientY}))))},this.onDragOver=function(r){if(e.lf.graphModel.eventCenter.emit(N.BLANK_CANVAS_MOUSEMOVE,{e:r}),r.preventDefault(),e.fakeNode){var i=e.clientToLocalPoint({x:r.clientX,y:r.clientY}),a=i.x,s=i.y;e.fakeNode.moveTo(a,s);var l=e.fakeNode.getData();e.lf.setNodeSnapLine(l),e.lf.graphModel.eventCenter.emit(N.NODE_DND_DRAG,{data:l,e:r})}return!1},this.onDragLeave=function(){e.fakeNode&&(e.lf.removeNodeSnapLine(),e.lf.graphModel.removeFakeNode(),e.fakeNode=null)},this.onDrop=function(r){!e.lf.graphModel||!r||!e.nodeConfig||(e.lf.addNode(Ke(Ke({},e.nodeConfig),e.clientToLocalPoint({x:r.clientX,y:r.clientY})),N.NODE_DND_ADD,r),r.preventDefault(),r.stopPropagation(),e.nodeConfig=null,e.lf.removeNodeSnapLine(),e.lf.graphModel.removeFakeNode(),e.fakeNode=null)};var o=t.lf;this.lf=o}return n.prototype.clientToLocalPoint=function(t){var e=t.x,o=t.y,r=ur(this.lf.options,["grid","size"]),i=this.lf.graphModel.getPointByClient({x:e,y:o}),a=i.canvasOverlayPosition,s=a.x,l=a.y,u=this.lf.graphModel.editConfigModel.snapGrid;return{x:sn(s,r,u),y:sn(l,r,u)}},n.prototype.startDrag=function(t){var e=this.lf.graphModel.editConfigModel;e!=null&&e.isSilentMode||(this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag))},n.prototype.eventMap=function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}},n})();function ny(n,t){n.on("node:mousemove",function(e){var o=e.data;t.setNodeSnapLine(o)}),n.on("node:mouseup",function(){t.clearSnapline()})}var oy=(function(){var n=function(t,e){return n=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])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}})(),se=function(){return se=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},se.apply(this,arguments)},ry=function(n,t,e,o){var r=arguments.length,i=r<3?t:o===null?