@next-bricks/diagram 0.30.1 → 0.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bricks.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "id": "bricks/diagram",
3
3
  "bricks": [
4
- "diagram.experimental-node",
5
- "diagram.editable-label"
4
+ "diagram.editable-label",
5
+ "diagram.experimental-node"
6
6
  ],
7
7
  "elements": [
8
8
  "eo-diagram",
9
- "eo-draw-canvas",
10
- "eo-display-canvas"
9
+ "eo-display-canvas",
10
+ "eo-draw-canvas"
11
11
  ],
12
12
  "processors": [],
13
13
  "dependencies": {
@@ -15,5 +15,5 @@
15
15
  "basic.lock-body-scroll"
16
16
  ]
17
17
  },
18
- "filePath": "bricks/diagram/dist/index.183d18fe.js"
18
+ "filePath": "bricks/diagram/dist/index.3e8ff19f.js"
19
19
  }
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[1728],{1728:(e,t,n)=>{n.r(t);var a,r,i,o,s,l,c,u,d,h,f,p,g,v,m,w,y,b,k,A,E,x,C,M,W,N,z,S,R,T,L,D,B,O,P,j,H,I,Y,U,V,X,K,_,F,Z,q,J,$,G,Q,ee,te,ne,ae,re=n(4635),ie=n(918),oe=n(1369),se=n(8449),le=n(6902),ce=n(8769),ue=n.n(ce),de=n(9929),he=n(9938),fe=(n(330),n(7566)),pe=n(1517),ge=n(3373),ve=n.n(ge),me=n(1030),we=n(9126),ye=n(8892),be=n(5157),ke=n(8308),Ae=n(6457),Ee=n(9137),xe=n(2547),Ce=n(1803),Me=n(3739),We=n(9191),Ne=n(6671),ze=n(8060),Se=n(2448),Re=n(8657),Te=n(8069),Le=n(1324),De=n(821),Be=n(6753),Oe=n(2673),Pe=n(5987);function je(e,t,n){return n(Ye(e,t))}function He(e,t,n){return e.set(Ye(e,t),n),n}function Ie(e,t){return e.get(Ye(e,t))}function Ye(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ue,{defineElement:Ve,property:Xe,event:Ke,method:_e}=(0,de.createDecorators)(),Fe=(0,ce.forwardRef)(xt),Ze=new WeakMap,qe=new WeakMap,Je=new WeakMap,$e=new WeakMap,Ge=new WeakMap,Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,it=new WeakMap,ot=new WeakMap,st=new WeakMap,lt=new WeakMap,ct=new WeakSet,ut=new WeakMap,dt=new WeakMap,ht=new WeakMap,ft=new WeakMap,pt=new WeakMap,gt=new WeakMap,vt=new WeakMap,mt=new WeakMap,wt=new WeakMap,yt=new WeakMap,bt=new WeakMap,kt=new WeakMap,At=new WeakMap;class Et extends he.ReactNextElement{constructor(){super(...arguments),(0,re.A)(this,ct),(0,ie.A)(this,Ze,(a(this),i(this))),(0,ie.A)(this,qe,(o(this),s(this))),(0,ie.A)(this,Je,(l(this),c(this))),(0,ie.A)(this,$e,(u(this),d(this))),(0,ie.A)(this,Ge,(h(this),f(this))),(0,ie.A)(this,Qe,(p(this),g(this))),(0,ie.A)(this,et,(v(this),m(this))),(0,ie.A)(this,tt,(w(this),y(this))),(0,ie.A)(this,nt,(b(this),k(this))),(0,ie.A)(this,at,(A(this),E(this))),(0,ie.A)(this,rt,(x(this),C(this,!0))),(0,ie.A)(this,it,(M(this),W(this,!0))),(0,ie.A)(this,ot,(N(this),z(this,!0))),(0,ie.A)(this,st,(S(this),R(this))),(0,ie.A)(this,lt,(T(this),L(this))),(0,ie.A)(this,ut,(O(this),e=>{je(ct,this,D).emit(e)})),(0,ie.A)(this,dt,P(this)),(0,ie.A)(this,ht,(I(this),e=>{je(ct,this,j).emit(e)})),(0,ie.A)(this,ft,Y(this)),(0,ie.A)(this,pt,(X(this),e=>{je(ct,this,U).emit(e)})),(0,ie.A)(this,gt,K(this)),(0,ie.A)(this,vt,(Z(this),e=>{je(ct,this,_).emit(e)})),(0,ie.A)(this,mt,q(this)),(0,ie.A)(this,wt,(G(this),e=>{je(ct,this,J).emit(e)})),(0,ie.A)(this,yt,Q(this)),(0,ie.A)(this,bt,(ne(this),e=>{je(ct,this,ee).emit(e)})),(0,ie.A)(this,kt,(e=>{(0,Oe.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,ie.A)(this,At,(0,ce.createRef)())}get layout(){return Ie(Ze,this)}set layout(e){He(Ze,this,e)}get nodes(){return Ie(qe,this)}set nodes(e){He(qe,this,e)}get edges(){return Ie(Je,this)}set edges(e){He(Je,this,e)}get nodeBricks(){return Ie($e,this)}set nodeBricks(e){He($e,this,e)}get lines(){return Ie(Ge,this)}set lines(e){He(Ge,this,e)}get layoutOptions(){return Ie(Qe,this)}set layoutOptions(e){He(Qe,this,e)}get activeTarget(){return Ie(et,this)}set activeTarget(e){He(et,this,e)}get disableKeyboardAction(){return Ie(tt,this)}set disableKeyboardAction(e){He(tt,this,e)}get connectNodes(){return Ie(nt,this)}set connectNodes(e){He(nt,this,e)}get dragNodes(){return Ie(at,this)}set dragNodes(e){He(at,this,e)}get zoomable(){return Ie(rt,this)}set zoomable(e){He(rt,this,e)}get scrollable(){return Ie(it,this)}set scrollable(e){He(it,this,e)}get pannable(){return Ie(ot,this)}set pannable(e){He(ot,this,e)}get scaleRange(){return Ie(st,this)}set scaleRange(e){He(st,this,e)}callOnLineLabel(e,t){for(var n,a=arguments.length,r=new Array(a>2?a-2:0),i=2;i<a;i++)r[i-2]=arguments[i];null===(n=Ie(At,this).current)||void 0===n||n.callOnLineLabel(e,t,...r)}render(){return ue().createElement(Fe,{ref:Ie(At,this),layout:this.layout,nodes:this.nodes,edges:this.edges,nodeBricks:this.nodeBricks,lines:this.lines,layoutOptions:this.layoutOptions,connectNodes:this.connectNodes,dragNodes:this.dragNodes,activeTarget:this.activeTarget,disableKeyboardAction:this.disableKeyboardAction,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:Ie(ut,this),onSwitchActiveTarget:Ie(kt,this),onNodeDelete:Ie(ht,this),onEdgeDelete:Ie(pt,this),onLineClick:Ie(vt,this),onLineDoubleClick:Ie(wt,this),onNodesConnect:Ie(bt,this)})}}function xt(e,t){var{layout:n,nodes:a,edges:r,nodeBricks:i,lines:o,layoutOptions:s,connectNodes:l,dragNodes:c,activeTarget:u,disableKeyboardAction:d,zoomable:h,scrollable:f,pannable:p,scaleRange:g,onActiveTargetChange:v,onSwitchActiveTarget:m,onNodeDelete:w,onEdgeDelete:y,onLineClick:b,onLineDoubleClick:k,onNodesConnect:A}=e,[E,x]=(0,ce.useState)(!1),[C,M]=(0,ce.useState)(0),[W,N]=(0,ce.useState)(null),[z,S]=(0,ce.useState)(!1),[R,T]=(0,ce.useState)(0),[L,D]=(0,ce.useState)(null),[B,O]=(0,ce.useState)([]),[P,j]=(0,ce.useState)(!1),[H,I]=(0,ce.useState)({k:1,x:0,y:0}),Y=(0,ce.useRef)(new Map),U=(0,ce.useRef)(null),V=(0,ce.useRef)(null),[X,K]=(0,ce.useState)(!1),{userViewReady:_,userViewNodesMap:F,saveUserView:Z}=(0,Be._)(null==c?void 0:c.save),[q,J]=(0,ce.useState)([0,0]),[$,G]=(0,ce.useState)(null),[Q,ee]=(0,ce.useState)("initial"),[te,ne]=(0,ce.useState)(null);(0,ce.useImperativeHandle)(t,(()=>({callOnLineLabel(e,t){for(var n,a=arguments.length,r=new Array(a>2?a-2:0),i=2;i<a;i++)r[i-2]=arguments[i];null==L||null===(n=L.get(e))||void 0===n||null===(n=n.firstElementChild)||void 0===n||n[t](...r)}}))),(0,ce.useEffect)((()=>{var e=e=>{(0,Se.P)(e,{nodes:a,nodesRefRepository:W,connectNodes:l,dragNodes:c,scale:H.k,setConnectLineState:G,setConnectLineTo:J,setManualLayoutStatus:ee,setNodeMovement:ne,onSwitchActiveTarget:m,onNodesConnect:A})},t=V.current;return null==t||t.addEventListener("mousedown",e),()=>{null==t||t.removeEventListener("mousedown",e)}}),[a,l,c,H.k,W,A,m]);var{normalizedLines:ae,normalizedLinesMap:re,markers:ie}=(0,ce.useMemo)((()=>(0,Ee.t)(r,o)),[r,o]),oe=(0,ce.useMemo)((()=>ae.flatMap((e=>{var t,n,{line:{text:a,label:r,$id:i},edge:o}=e;return a||r?(r?(t="label",n=[].concat(r)):(t="text",n=[].concat(a)),n.map((e=>{var n;return{[t]:e,id:"".concat(i,"-").concat(null!==(n=e.placement)&&void 0!==n?n:"center"),edge:o}}))):[]}))),[ae]),{nodes:se,edges:le}=(0,Te.o)({layout:n,nodes:a,edges:r,manualLayoutStatus:Q,userViewReady:_,userViewNodesMap:F,nodeMovement:te,nodesRefRepository:W,lineLabelsRefRepository:L,normalizedLinesMap:re,layoutOptions:s,nodesRenderId:C,lineLabelsRenderId:R});(0,ce.useEffect)((()=>{"finished"===Q&&Z(se.map((e=>({id:e.id,x:e.x,y:e.y}))))}),[Q]);var de=(0,ce.useMemo)((()=>(0,Ae.R)(le,se,ae)),[ae,se,le]),he=null!=u?u:null,[ge,De]=(0,ce.useState)(he);(0,ce.useEffect)((()=>{De((e=>(0,Oe.c)(e,he)?e:he))}),[he]);var je=(0,ce.useRef)(!1);(0,ce.useEffect)((()=>{je.current?null==v||v(ge):je.current=!0}),[ge,v]),(0,ce.useEffect)((()=>{var e=U.current;if(e&&!d){var t=e=>{var t=(0,be.a)(e,{renderedNodes:se,activeTarget:ge});"delete-node"===(null==t?void 0:t.action)?null==w||w(t.node):"delete-edge"===(null==t?void 0:t.action)?null==y||y(t.edge):"switch-active-node"===(null==t?void 0:t.action)&&t.node&&(null==m||m({type:"node",nodeId:t.node.id}))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}}),[ge,se,d,m,w,y]);var He=(0,ce.useCallback)((e=>{e&&(M((e=>e+1)),N(e)),x((t=>t||!!e))}),[]),Ie=(0,ce.useCallback)((e=>{e&&(T((e=>e+1)),D(e)),S((t=>t||!!e))}),[]),Ye=(0,ce.useMemo)((()=>null!=g?g:[Re.sS,Re.Yt]),[g]),Ue=(0,ce.useMemo)((()=>(0,pe.s_)()),[]);(0,ce.useEffect)((()=>{var e=!1;Ue.scaleExtent(h?Ye:[1,1]).on("start",(()=>{e=!1,j(!0)})).on("zoom",(t=>{e=!0,I(t.transform)})).on("end",(()=>{j(!1),e||null==m||m(null)}))}),[m,Ye,h,Ue]),(0,ce.useEffect)((()=>{var e=U.current;if(e){var t=(0,fe.A)(e),n=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(h||f||p)return(h||f)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),f&&(e.preventDefault(),Ue.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(Ue).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),p||t.on("mousedown.zoom",null).on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),n;n()}}),[p,f,h,Ue]),(0,ce.useEffect)((()=>{var e=U.current;if(0!==se.length&&e&&!X){var{k:t,x:n,y:a}=(0,ke.r)(se,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:h?Ye:void 0});Ue.transform((0,fe.A)(e),new pe.uV(t,n,a)),K(!0)}}),[X,se,Ye,h,Ue]);var Ve=(0,ce.useMemo)((()=>"".concat((0,me.uniqueId)("diagram-"),"-")),[]),Xe="".concat(Ve,"line-arrow-"),Ke="".concat(Ve,"mask-"),_e="".concat(Ve,"active-line-");(0,ce.useEffect)((()=>{O((e=>(0,ze.z)(e,de,Y.current)))}),[de]);var[Fe,Ze]=ue().useState(new Map);return(0,ce.useEffect)((()=>{if(L){(0,Le.F)(B,L);var e=new we.A((()=>{Ze((0,Pe.G)(B,L))}));for(var t of L.values())e.observe(t);return()=>{e.disconnect()}}}),[R,L,B]),"dagre"!==n&&"force"!==n?ue().createElement("div",null,'Diagram layout not supported: "'.concat(n,'"')):ue().createElement("div",{className:ve()("diagram",{ready:E&&X,grabbing:P,pannable:p}),tabIndex:-1,ref:U},ue().createElement("svg",{width:"100%",height:"100%",className:"lines"},ue().createElement("defs",null,ie.map(((e,t)=>{var{type:n,strokeColor:a}=e;return ue().createElement(Me.c,{key:t,id:"".concat(Xe).concat(t),type:n,strokeColor:a})})),[...Fe].map((e=>{var[t,n]=e;return ue().createElement(We.y,{key:t,lineId:t,rects:n,maskPrefix:Ke,renderedLineLabels:B})})),ue().createElement("marker",{id:"".concat(_e,"start"),viewBox:"0 0 8 8",refX:4,refY:4,markerWidth:8,markerHeight:8,orient:"auto"},ue().createElement("path",{d:"M 0.5 0.5 H 7.5 V 7.5 H 0.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"})),ue().createElement("marker",{id:"".concat(_e,"end"),viewBox:"0 0 14 8",refX:3,refY:4,markerWidth:14,markerHeight:8,orient:"auto"},ue().createElement("path",{d:"M 0.5 1.5 L 5.5 4 L 0.5 6.5 z",stroke:"var(--palette-blue-3)",strokeWidth:1,fill:"var(--palette-blue-3)"}),ue().createElement("path",{d:"M 6.5 0.5 H 13.5 V 7.5 H 6.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"}))),ue().createElement("g",{transform:"translate(".concat(H.x," ").concat(H.y,") scale(").concat(H.k,")")},de.map((e=>ue().createElement(Ce.m,{key:e.line.$id,line:e,linePaths:Y.current,lineMaskRects:Fe,maskPrefix:Ke,markerPrefix:Xe,activeLineMarkerPrefix:_e,active:"edge"===(null==ge?void 0:ge.type)&&ge.edge.source===e.edge.source&&ge.edge.target===e.edge.target,activeRelated:"node"===(null==ge?void 0:ge.type)&&(e.edge.source===ge.nodeId||e.edge.target===ge.nodeId),onLineClick:b,onLineDoubleClick:k}))))),ue().createElement("div",{className:ve()("line-labels",{ready:z}),style:{left:H.x,top:H.y,transform:"scale(".concat(H.k,")")}},ue().createElement(xe.d2,{labels:oe,onRendered:Ie})),ue().createElement("div",{className:"nodes",ref:V,style:{left:H.x,top:H.y,transform:"scale(".concat(H.k,")")}},ue().createElement(ye.p,{nodes:a,nodeBricks:i,onRendered:He})),ue().createElement(Ne.w,{connectLineState:$,connectLineTo:q,markerPrefix:Xe}))}ae=Et,({e:[i,o,s,l,c,u,d,h,f,p,g,v,m,w,y,b,k,A,E,x,C,M,W,N,z,S,R,T,L,D,B,O,P,j,H,I,Y,U,V,X,K,_,F,Z,q,J,$,G,Q,ee,te,ne,a],c:[Ue,r]}=function(e,t,n,a,r,i){var o,s,l,c,u,d,h,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,g=Object.create,v=[g(null),g(null)],m=t.length;function w(t,n,a){return function(r,i){n&&(i=r,r=e);for(var o=0;o<t.length;o++)i=t[o].apply(r,a?[i]:[]);return a?i:r}}function y(e,t,n,a){if("function"!=typeof e&&(a||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(a?"":" or undefined"));return e}function b(e,t,n,a,r,i,l,c,u,d,h){function f(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),m=t[3],b=!l,k=1===r,A=3===r,E=4===r,x=2===r;function C(t,n,a){return function(r,i){return n&&(i=r,r=e),a&&a(r),M[t].call(r,i)}}if(!b){var M={},W=[],N=A?"get":E||k?"set":"value";if(u?(d||k?M={get:(0,se.A)((function(){return m(this)}),a,"get"),set:function(e){t[4](this,e)}}:M[N]=m,d||(0,se.A)(M[N],a,x?"":N)):d||(M=Object.getOwnPropertyDescriptor(e,a)),!d&&!u){if((s=v[+c][a])&&7!=(s^r))throw new Error("Decorating two elements with the same name ("+M[N].name+") is not supported yet");v[+c][a]=r<3?1:r}}for(var z=e,S=g.length-1;S>=0;S-=n?2:1){var R=g[S],T=n?g[S-1]:void 0,L={},D={kind:["field","accessor","method","getter","setter","class"][r],name:a,metadata:o,addInitializer:function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished");y(t,"An initializer","be",!0),i.push(t)}.bind(null,L)};if(b)s=R.call(T,z,D),L.v=1,y(s,"class decorators","return")&&(z=s);else if(D.static=c,D.private=u,s=D.access={has:u?h.bind():function(e){return a in e}},E||(s.get=u?x?function(e){return f(e),M.value}:C("get",0,f):function(e){return e[a]}),x||A||(s.set=u?C("set",0,f):function(e,t){e[a]=t}),z=R.call(T,k?{get:M.get,set:M.set}:M[N],D),L.v=1,k){if("object"==typeof z&&z)(s=y(z.get,"accessor.get"))&&(M.get=s),(s=y(z.set,"accessor.set"))&&(M.set=s),(s=y(z.init,"accessor.init"))&&W.unshift(s);else if(void 0!==z)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(z,(d?"field":"method")+" decorators","return")&&(d?W.unshift(z):M[N]=z)}return r<2&&l.push(w(W,c,1),w(i,c,0)),d||b||(u?k?l.splice(-1,0,C("get",c),C("set",c)):l.push(x?M[N]:y.call.bind(M[N])):p(e,a,M)),z}function k(e){return p(e,f,{configurable:!0,enumerable:!0,value:o})}return void 0!==i&&(o=i[f]),o=g(null==o?null:o),u=[],d=function(e){e&&u.push(w(e))},(h=function(t,a){for(var i=0;i<n.length;i++){var o=n[i],s=o[1],d=7&s;if((8&s)==t&&!d==a){var h=o[2],f=!!o[3],p=16&s;b(t?e:e.prototype,o,p,f?"#"+h:(0,oe.A)(h),d,d<2?[]:t?c=c||[]:l=l||[],u,!!t,f,a,t&&f?function(t){return(0,le.A)(t)===e}:r)}}})(8,0),h(0,0),h(8,1),h(0,1),d(l),d(c),s=u,m||k(e),{e:s,get c(){var n=[];return m&&[k(e=b(e,[t],0,e.name,5,n)),w(n,1)]}}}(ae,[Ve("eo-diagram",{styleTexts:[De.A]})],[[Xe({type:String}),1,"layout"],[Xe({attribute:!1}),1,"nodes"],[Xe({attribute:!1}),1,"edges"],[Xe({attribute:!1}),1,"nodeBricks"],[Xe({attribute:!1}),1,"lines"],[Xe({attribute:!1}),1,"layoutOptions"],[Xe({attribute:!1}),1,"activeTarget"],[Xe({type:Boolean}),1,"disableKeyboardAction"],[Xe({attribute:!1}),1,"connectNodes"],[Xe({attribute:!1}),1,"dragNodes"],[Xe({type:Boolean}),1,"zoomable"],[Xe({type:Boolean}),1,"scrollable"],[Xe({type:Boolean}),1,"pannable"],[Xe({attribute:!1}),1,"scaleRange"],[Ke({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>Ie(lt,e),(e,t)=>He(lt,e,t)],[Ke({type:"node.delete"}),1,"nodeDelete",e=>Ie(dt,e),(e,t)=>He(dt,e,t)],[Ke({type:"edge.delete"}),1,"edgeDelete",e=>Ie(ft,e),(e,t)=>He(ft,e,t)],[Ke({type:"line.click"}),1,"lineClick",e=>Ie(gt,e),(e,t)=>He(gt,e,t)],[Ke({type:"line.dblclick"}),1,"lineDoubleClick",e=>Ie(mt,e),(e,t)=>He(mt,e,t)],[Ke({type:"nodes.connect"}),1,"connectNodes",e=>Ie(yt,e),(e,t)=>He(yt,e,t)],[_e(),2,"callOnLineLabel"]],0,(e=>At.has((0,le.A)(e))),he.ReactNextElement)),r();var Ct,Mt,Wt,Nt,zt,St,Rt,Tt,Lt,Dt,Bt,Ot,Pt,jt,Ht,It=n(3971);function Yt(e,t,n){return n(Xt(e,t))}function Ut(e,t,n){return e.set(Xt(e,t),n),n}function Vt(e,t){return e.get(Xt(e,t))}function Xt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Kt,{defineElement:_t,property:Ft,event:Zt,method:qt}=(0,de.createDecorators)(),Jt=(0,ce.forwardRef)(sn),$t=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,en=new WeakSet,tn=new WeakMap,nn=new WeakMap,an=new WeakMap,rn=new WeakMap;class on extends he.ReactNextElement{constructor(){super(...arguments),(0,re.A)(this,en),(0,ie.A)(this,$t,(Ct(this),Wt(this))),(0,ie.A)(this,Gt,(Nt(this),zt(this))),(0,ie.A)(this,Qt,(St(this),Rt(this))),(0,ie.A)(this,tn,(Dt(this),e=>{Yt(en,this,Tt).emit(e)})),(0,ie.A)(this,nn,Bt(this)),(0,ie.A)(this,an,(jt(this),e=>{Yt(en,this,Ot).emit(e)})),(0,ie.A)(this,rn,(0,ce.createRef)())}get label(){return Vt($t,this)}set label(e){Ut($t,this,e)}get type(){return Vt(Gt,this)}set type(e){Ut(Gt,this,e)}enableEditing(){var e;null===(e=Vt(rn,this).current)||void 0===e||e.enableEditing()}render(){return ue().createElement(Jt,{ref:Vt(rn,this),label:this.label,onLabelEditingChange:Vt(tn,this),onLabelChange:Vt(an,this)})}}function sn(e,t){var{label:n,onLabelChange:a,onLabelEditingChange:r}=e,i=null!=n?n:"",[o,s]=(0,ce.useState)(i),[l,c]=(0,ce.useState)(!1),u=(0,ce.useRef)(!1),[d,h]=(0,ce.useState)(!1),f=(0,ce.useRef)(null);(0,ce.useImperativeHandle)(t,(()=>({enableEditing(){c(!0)}}))),(0,ce.useEffect)((()=>{s(i)}),[i]);var p=(0,ce.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c(!0)}),[]);(0,ce.useEffect)((()=>{var e,t;l&&(null===(e=f.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=f.current)||void 0===t||t.select())}),[l]),(0,ce.useEffect)((()=>{u.current?null==r||r(l):u.current=!0}),[l,r]);var g=(0,ce.useCallback)((e=>{s(e.target.value)}),[]),v=(0,ce.useCallback)((e=>{var t,n=e.key||e.keyCode||e.which;"Enter"!==n&&13!==n||null===(t=f.current)||void 0===t||t.blur()}),[]),m=(0,ce.useCallback)((()=>{c(!1),h(!0)}),[]);(0,ce.useEffect)((()=>{d&&(null==a||a(o),h(!1))}),[o,a,d]);var w=(0,ce.useCallback)((e=>{e.stopPropagation()}),[]);return ue().createElement("div",{className:ve()("label",{editing:l,empty:!o}),onDoubleClick:w,onMouseDown:w},ue().createElement("input",{className:"label-input",value:o,ref:f,onChange:g,onKeyDown:v,onBlur:m}),ue().createElement("div",{className:"label-text",onDoubleClick:p},o))}Ht=on,({e:[Wt,Nt,zt,St,Rt,Tt,Lt,Dt,Bt,Ot,Pt,jt,Ct],c:[Kt,Mt]}=function(e,t,n,a,r,i){var o,s,l,c,u,d,h,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,g=Object.create,v=[g(null),g(null)],m=t.length;function w(t,n,a){return function(r,i){n&&(i=r,r=e);for(var o=0;o<t.length;o++)i=t[o].apply(r,a?[i]:[]);return a?i:r}}function y(e,t,n,a){if("function"!=typeof e&&(a||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(a?"":" or undefined"));return e}function b(e,t,n,a,r,i,l,c,u,d,h){function f(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),m=t[3],b=!l,k=1===r,A=3===r,E=4===r,x=2===r;function C(t,n,a){return function(r,i){return n&&(i=r,r=e),a&&a(r),M[t].call(r,i)}}if(!b){var M={},W=[],N=A?"get":E||k?"set":"value";if(u?(d||k?M={get:(0,se.A)((function(){return m(this)}),a,"get"),set:function(e){t[4](this,e)}}:M[N]=m,d||(0,se.A)(M[N],a,x?"":N)):d||(M=Object.getOwnPropertyDescriptor(e,a)),!d&&!u){if((s=v[+c][a])&&7!=(s^r))throw new Error("Decorating two elements with the same name ("+M[N].name+") is not supported yet");v[+c][a]=r<3?1:r}}for(var z=e,S=g.length-1;S>=0;S-=n?2:1){var R=g[S],T=n?g[S-1]:void 0,L={},D={kind:["field","accessor","method","getter","setter","class"][r],name:a,metadata:o,addInitializer:function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished");y(t,"An initializer","be",!0),i.push(t)}.bind(null,L)};if(b)s=R.call(T,z,D),L.v=1,y(s,"class decorators","return")&&(z=s);else if(D.static=c,D.private=u,s=D.access={has:u?h.bind():function(e){return a in e}},E||(s.get=u?x?function(e){return f(e),M.value}:C("get",0,f):function(e){return e[a]}),x||A||(s.set=u?C("set",0,f):function(e,t){e[a]=t}),z=R.call(T,k?{get:M.get,set:M.set}:M[N],D),L.v=1,k){if("object"==typeof z&&z)(s=y(z.get,"accessor.get"))&&(M.get=s),(s=y(z.set,"accessor.set"))&&(M.set=s),(s=y(z.init,"accessor.init"))&&W.unshift(s);else if(void 0!==z)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(z,(d?"field":"method")+" decorators","return")&&(d?W.unshift(z):M[N]=z)}return r<2&&l.push(w(W,c,1),w(i,c,0)),d||b||(u?k?l.splice(-1,0,C("get",c),C("set",c)):l.push(x?M[N]:y.call.bind(M[N])):p(e,a,M)),z}function k(e){return p(e,f,{configurable:!0,enumerable:!0,value:o})}return void 0!==i&&(o=i[f]),o=g(null==o?null:o),u=[],d=function(e){e&&u.push(w(e))},(h=function(t,a){for(var i=0;i<n.length;i++){var o=n[i],s=o[1],d=7&s;if((8&s)==t&&!d==a){var h=o[2],f=!!o[3],p=16&s;b(t?e:e.prototype,o,p,f?"#"+h:(0,oe.A)(h),d,d<2?[]:t?c=c||[]:l=l||[],u,!!t,f,a,t&&f?function(t){return(0,le.A)(t)===e}:r)}}})(8,0),h(0,0),h(8,1),h(0,1),d(l),d(c),s=u,m||k(e),{e:s,get c(){var n=[];return m&&[k(e=b(e,[t],0,e.name,5,n)),w(n,1)]}}}(Ht,[_t("diagram.editable-label",{styleTexts:[It.A]})],[[Ft(),1,"label"],[Ft({render:!1}),1,"type"],[Zt({type:"label.editing.change"}),1,"labelEditingChange",e=>Vt(Qt,e),(e,t)=>Ut(Qt,e,t)],[Zt({type:"label.change"}),1,"labelChange",e=>Vt(nn,e),(e,t)=>Ut(nn,e,t)],[qt(),2,"enableEditing"]],0,(e=>rn.has((0,le.A)(e))),he.ReactNextElement)),Mt();var ln=n(4223),cn=n(9740),un=n(6330),dn=n(8438),hn=n(1083),fn=n(531),pn=n(8185),gn=n(2830);function vn(e){var{connectLineState:t,transform:n,markerEnd:a,onConnect:r}=e,[i,o]=(0,ce.useState)(null);return(0,ce.useEffect)((()=>{t&&o(t.from)}),[t]),(0,ce.useEffect)((()=>{if(t){var e=e=>{o([(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k])},a=e=>{e.stopPropagation()},i=e=>{e.stopPropagation(),s(),r(t,[(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k])},s=()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mousedown",a,{capture:!0}),document.removeEventListener("click",i,{capture:!0}),o(null)};return document.addEventListener("mousemove",e),document.addEventListener("mousedown",a,{capture:!0}),document.addEventListener("click",i,{capture:!0}),s}}),[t,r,n]),ue().createElement("path",{className:ve()("connect-line",{connecting:!!t&&i&&(i[0]-t.from[0])**2+(i[1]-t.from[1])**2>25}),d:t&&i?"M".concat(t.from.join(" "),"L").concat(i.join(" ")):"",fill:"none",stroke:"gray",strokeWidth:1,markerEnd:"url(#".concat(a,")")})}var mn=n(3783),wn=n(3033),yn=n(908),bn=n(6170),kn=n(9127);function An(e){var{cells:t,layout:n,previousCells:a,defaultNodeSize:r,canvasWidth:i,canvasHeight:o,scaleRange:s,transform:l,reason:c,parent:u}=e,d="force"!==n&&"dagre"!==n,h=(0,mn.C)(t,{defaultNodeSize:r}),f=[],p=!1,g=new Map,v=!1;for(var m of a)(0,fn.mH)(m)?v=!0:(0,fn.N)(m)&&(v=!0,m[wn.CV]&&g.set(m.id,m));var w=new Map;for(var y of h)if((0,fn.N)(y)){w.set(y.id,y);var b=g.get(y.id);b&&(y.view.width=b.view.width,y.view.height=b.view.height,y[wn.CV]=!0)}var k=!1;if("add-related-nodes"===c&&u){var A=new Set;for(var E of h)(0,fn.WW)(E)&&E.source===u&&E.target!==u&&A.add(E.target);var x=w.get(u);if(void 0!==(null==x?void 0:x.view.x)&&void 0!==x.view.y){k=!0;var C=[...A].map((e=>w.get(e))).filter(Boolean),M=void 0;for(var W of C)void 0!==W.view.x&&void 0!==W.view.y?(!M||W.view.x>M.view.x)&&W.view.y>x.view.y&&(M=W):f.push(W);if(f.length>0&&d){var N,z;if(M)N=M.view.x+M.view.width+wn.sz,z=M.view.y;else{var S=f.reduce(((e,t)=>e+t.view.width+wn.sz),-wn.sz);N=x.view.x-S/2+x.view.width/2,z=x.view.y+x.view.height+wn.sz}for(var R of f)R.view.x=N,R.view.y=z,N+=R.view.width+wn.sz}}}if(!k){var T,L=r[0],D=r[1],B=0,O=!1;for(var P of h)(0,fn.N)(P)?(P.view.width>L&&(L=P.view.width),P.view.height>D&&(D=P.view.height),void 0===P.view.x||void 0===P.view.y?f.push(P):B++):(0,fn.mH)(P)&&(O=!0);if(d)for(var j of(v||(l=(0,yn.r)((0,me.without)(h,...f),{canvasWidth:i,canvasHeight:o,scaleRange:s})),0===B||1===B&&!O?(({getNodeView:T}=(0,kn.C)({cells:h})),p=!0):({getNodeView:T}=(0,bn.k)({cells:h,fixedPosition:!0,center:[(i/2-l.x)/l.k,(o/2-l.y)/l.k]})),h))if((0,fn.N)(j)){var H=T(j.id);j.view.x=H.x,j.view.y=H.y}}return{cells:h,updated:f,shouldReCenter:p}}var En,xn,Cn,Mn,Wn,Nn,zn,Sn,Rn,Tn,Ln,Dn,Bn,On,Pn,jn,Hn,In,Yn,Un,Vn,Xn,Kn,_n,Fn,Zn,qn,Jn,$n,Gn,Qn,ea,ta,na,aa,ra,ia,oa,sa,la,ca,ua,da,ha,fa,pa,ga,va,ma,wa,ya,ba,ka,Aa,Ea,xa,Ca,Ma,Wa,Na,za,Sa,Ra,Ta=n(227),La=n(8091),Da=n(1819),Ba=n(7099),Oa=n(2361),Pa=n(8197),ja=n(7531),Ha=n(3012),Ia=n(8618),Ya=["shouldReCenter"];function Ua(e,t,n){return n(Ka(e,t))}function Va(e,t,n){return e.set(Ka(e,t),n),n}function Xa(e,t){return e.get(Ka(e,t))}function Ka(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var _a,Fa=(0,dn.unwrapProvider)("basic.lock-body-scroll"),{defineElement:Za,property:qa,method:Ja,event:$a}=(0,de.createDecorators)(),Ga=ue().forwardRef(Rr),Qa=new WeakMap,er=new WeakMap,tr=new WeakMap,nr=new WeakMap,ar=new WeakMap,rr=new WeakMap,ir=new WeakMap,or=new WeakMap,sr=new WeakMap,lr=new WeakMap,cr=new WeakMap,ur=new WeakMap,dr=new WeakMap,hr=new WeakSet,fr=new WeakMap,pr=new WeakMap,gr=new WeakMap,vr=new WeakMap,mr=new WeakMap,wr=new WeakMap,yr=new WeakMap,br=new WeakMap,kr=new WeakMap,Ar=new WeakMap,Er=new WeakMap,xr=new WeakMap,Cr=new WeakMap,Mr=new WeakMap,Wr=new WeakMap,Nr=new WeakMap,zr=new WeakMap;class Sr extends he.ReactNextElement{constructor(){super(...arguments),(0,re.A)(this,hr),(0,ie.A)(this,Qa,(En(this),Cn(this))),(0,ie.A)(this,er,(Mn(this),Wn(this))),(0,ie.A)(this,tr,(Nn(this),zn(this))),(0,ie.A)(this,nr,(Sn(this),Rn(this,[wn.HP,wn.HP]))),(0,ie.A)(this,ar,(Tn(this),Ln(this))),(0,ie.A)(this,rr,(Dn(this),Bn(this))),(0,ie.A)(this,ir,(On(this),Pn(this))),(0,ie.A)(this,or,(jn(this),Hn(this))),(0,ie.A)(this,sr,(In(this),Yn(this,!0))),(0,ie.A)(this,lr,(Un(this),Vn(this,!0))),(0,ie.A)(this,cr,(Xn(this),Kn(this,!0))),(0,ie.A)(this,ur,(_n(this),Fn(this))),(0,ie.A)(this,dr,(Zn(this),qn(this))),(0,ie.A)(this,fr,(Gn(this),e=>{Ua(hr,this,Jn).emit(e)})),(0,ie.A)(this,pr,(e=>{(0,pn.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,ie.A)(this,gr,Qn(this)),(0,ie.A)(this,vr,(na(this),aa(this))),(0,ie.A)(this,mr,(oa(this),e=>{Ua(hr,this,ra).emit(e),"node"===e.type&&Ua(hr,this,ea).emit(e)})),(0,ie.A)(this,wr,sa(this)),(0,ie.A)(this,yr,(ua(this),e=>{Ua(hr,this,la).emit(e)})),(0,ie.A)(this,br,da(this)),(0,ie.A)(this,kr,(pa(this),ga(this))),(0,ie.A)(this,Ar,(wa(this),e=>{Ua(hr,this,va).emit(e),"node"===e.type&&Ua(hr,this,ha).emit(e)})),(0,ie.A)(this,Er,ya(this)),(0,ie.A)(this,xr,(Aa(this),e=>{Ua(hr,this,ba).emit(e)})),(0,ie.A)(this,Cr,Ea(this)),(0,ie.A)(this,Mr,(Ma(this),e=>{Ua(hr,this,xa).emit(e)})),(0,ie.A)(this,Wr,Wa(this)),(0,ie.A)(this,Nr,(Sa(this),e=>{Ua(hr,this,Na).emit(e)})),(0,ie.A)(this,zr,(0,ce.createRef)())}get cells(){return Xa(Qa,this)}set cells(e){Va(Qa,this,e)}get layout(){return Xa(er,this)}set layout(e){Va(er,this,e)}get layoutOptions(){return Xa(tr,this)}set layoutOptions(e){Va(tr,this,e)}get defaultNodeSize(){return Xa(nr,this)}set defaultNodeSize(e){Va(nr,this,e)}get defaultNodeBricks(){return Xa(ar,this)}set defaultNodeBricks(e){Va(ar,this,e)}get defaultEdgeLines(){return Xa(rr,this)}set defaultEdgeLines(e){Va(rr,this,e)}get activeTarget(){return Xa(ir,this)}set activeTarget(e){Va(ir,this,e)}get fadeUnrelatedCells(){return Xa(or,this)}set fadeUnrelatedCells(e){Va(or,this,e)}get zoomable(){return Xa(sr,this)}set zoomable(e){Va(sr,this,e)}get scrollable(){return Xa(lr,this)}set scrollable(e){Va(lr,this,e)}get pannable(){return Xa(cr,this)}set pannable(e){Va(cr,this,e)}get scaleRange(){return Xa(ur,this)}set scaleRange(e){Va(ur,this,e)}dropNode(e){var t=this;return(0,un.A)((function*(){var n,a,{id:r,position:i,size:o,data:s,useBrick:l}=e;if(null===(n=(a=document).elementsFromPoint)||void 0===n||null===(n=n.call(a,i[0],i[1]))||void 0===n?void 0:n.includes(t)){var c,u,d,h=t.getBoundingClientRect(),f=Xa(zr,t).current.getTransform(),p={type:"node",id:r,view:(0,cn.A)((0,cn.A)({},"force"===t.layout||"dagre"===t.layout?null:{x:(i[0]-h.left-f.x)/f.k,y:(i[1]-h.top-f.y)/f.k}),{},{width:null!==(c=null==o?void 0:o[0])&&void 0!==c?c:t.defaultNodeSize[0],height:null!==(u=null==o?void 0:o[1])&&void 0!==u?u:t.defaultNodeSize[0]}),data:s,useBrick:l};return null===(d=Xa(zr,t).current)||void 0===d||d.dropNode(p),p}return null}))()}dropDecorator(e){var t=this;return(0,un.A)((function*(){var n,a,{position:r,decorator:i,text:o}=e;if(null===(n=(a=document).elementsFromPoint)||void 0===n||null===(n=n.call(a,r[0],r[1]))||void 0===n?void 0:n.includes(t)){var s,l=t.getBoundingClientRect(),c=Xa(zr,t).current.getTransform(),u={type:"decorator",decorator:i,id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),view:{x:(r[0]-l.left-c.x)/c.k,y:(r[1]-l.top-c.y)/c.k,width:wn.N8,height:wn.w1,text:o}};return null===(s=Xa(zr,t).current)||void 0===s||s.dropDecorator(u),u}return null}))()}addNodes(e){var t=this;return(0,un.A)((function*(){if(0===e.length)return[];var n=e.map((e=>{var n,a,{size:r,useBrick:i,id:o,data:s}=e;return{type:"node",id:o,data:s,view:{width:null!==(n=null==r?void 0:r[0])&&void 0!==n?n:t.defaultNodeSize[0],height:null!==(a=null==r?void 0:r[1])&&void 0!==a?a:t.defaultNodeSize[0]},useBrick:i}}));return Xa(zr,t).current.addNodes(n,{defaultNodeSize:t.defaultNodeSize,canvasWidth:t.clientWidth,canvasHeight:t.clientHeight})}))()}addEdge(e){var t=this;return(0,un.A)((function*(){var n,{source:a,target:r,data:i}=e,o={type:"edge",source:a,target:r,data:i};return null===(n=Xa(zr,t).current)||void 0===n||n.addEdge(o),o}))()}manuallyConnectNodes(e){return Xa(zr,this).current.manuallyConnectNodes(e)}updateCells(e,t){var n=this;return(0,un.A)((function*(){var{updated:a}=Xa(zr,n).current.updateCells(e,(0,cn.A)((0,cn.A)({},t),{},{defaultNodeSize:n.defaultNodeSize,canvasWidth:n.clientWidth,canvasHeight:n.clientHeight}));return{updated:a}}))()}disconnectedCallback(){super.disconnectedCallback(),Fa(this,!1)}render(){return ue().createElement(Ga,{host:this,ref:Xa(zr,this),layout:this.layout,layoutOptions:this.layoutOptions,cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:Xa(fr,this),onSwitchActiveTarget:Xa(pr,this),onCellMove:Xa(mr,this),onCellResize:Xa(yr,this),onCellDelete:Xa(Ar,this),onCellContextMenu:Xa(xr,this),onDecoratorTextChange:Xa(Mr,this),onScaleChange:Xa(Nr,this)})}}function Rr(e,t){var{host:n,layout:a,layoutOptions:r,cells:i,defaultNodeSize:o,defaultNodeBricks:s,defaultEdgeLines:l,activeTarget:c,fadeUnrelatedCells:u,zoomable:d,scrollable:h,pannable:f,scaleRange:p,onActiveTargetChange:g,onSwitchActiveTarget:v,onCellMove:m,onCellResize:w,onCellDelete:y,onCellContextMenu:b,onDecoratorTextChange:k,onScaleChange:A}=e,[{cells:E},x]=(0,ce.useReducer)(hn.d,i,(e=>({cells:(0,mn.C)(e,{defaultNodeSize:o})}))),C=(0,ce.useRef)(null),M=(0,ce.useRef)(null),W=(0,ce.useRef)(null),[N,z]=(0,ce.useState)([]),{grabbing:S,transform:R,zoomer:T,scaleRange:L}=(0,La.f)({rootRef:C,zoomable:d,scrollable:h,pannable:f,scaleRange:p,onSwitchActiveTarget:v});(0,ce.useEffect)((()=>{A(R.k)}),[A,R.k]);var[D,B]=(0,ce.useState)(null),{centered:O,setCentered:P}=(0,Oa.g)({layout:a,layoutOptions:r,rootRef:C,cells:E,zoomable:d,zoomer:T,scaleRange:L,dispatch:x});(0,ce.useImperativeHandle)(t,(()=>({dropNode(e){P(!0),x({type:"drop-node",payload:e})},dropDecorator(e){P(!0),x({type:"drop-decorator",payload:e})},addNodes(e,t){var{defaultNodeSize:n,canvasWidth:r,canvasHeight:i}=t,o=E.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,s=[...E.slice(0,o),...e,...E.slice(o)],{cells:l,updated:c,shouldReCenter:u}=An({cells:s,layout:a,previousCells:E,defaultNodeSize:n,canvasWidth:r,canvasHeight:i,scaleRange:L,transform:R});return u&&P(!1),x({type:"update-cells",payload:l}),c.filter((t=>e.includes(t)))},addEdge(e){x({type:"add-edge",payload:e})},updateCells(e,t){var n=An((0,cn.A)((0,cn.A)({},t),{},{layout:a,previousCells:E,cells:e,scaleRange:L,transform:R})),{shouldReCenter:r}=n,i=(0,ln.A)(n,Ya);return r&&P(!1),x({type:"update-cells",payload:i.cells}),i},getTransform:()=>R,manuallyConnectNodes(e){var t=E.find((t=>(0,fn.N)(t)&&t.id===e));if(t){var n=C.current.getBoundingClientRect();return B({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[n.left,n.top]}),new Promise(((e,t)=>{W.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[E,a,L,P,R]);var j=(0,ce.useCallback)(((e,t)=>{for(var n,a=0;a<E.length;a++){var r=E[a];if((0,fn.N)(r)&&r.id!==e.source.id&&r.view.x<t[0]&&r.view.x+r.view.width>t[0]&&r.view.y<t[1]&&r.view.y+r.view.height>t[1]){var i;null===(i=W.current)||void 0===i||i.resolve({source:e.source,target:r});break}}null===(n=W.current)||void 0===n||n.reject(null),B(null)}),[E]);(0,ce.useEffect)((()=>{Fa(n,!!D)}),[D,n]);var H=(0,Da.J)({cellsRef:M,activeTarget:c,onActiveTargetChange:g}),[I,Y]=(0,ce.useState)([]);(0,ce.useEffect)((()=>{var e=u?(0,Ta.Y)(E,D,H):[];Y((t=>0===t.length&&0===e.length?t:e))}),[H,E,D,u]),(0,ce.useEffect)((()=>{var e=C.current;if(e&&!(N.length>0)){var t=e=>{var t=function(e,t){var{cells:n,activeTarget:a}=t,r=n.find((e=>(0,pn.c)(e,a)));if(r)switch(e.key||e.keyCode||e.which){case"Backspace":case 8:case"Delete":case 46:return e.preventDefault(),e.stopPropagation(),{action:"delete-cell",cell:r}}}(e,{cells:E,activeTarget:H});"delete-cell"===(null==t?void 0:t.action)&&y(t.cell)};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}}),[H,E,N.length,y]);var U=(0,ce.useMemo)((()=>"".concat((0,me.uniqueId)("diagram-"),"-")),[]),V="".concat(U,"line-arrow-"),X=(0,ce.useCallback)((e=>{x({type:"move-cell",payload:e})}),[]),K=(0,ce.useCallback)((e=>{x({type:"move-cell",payload:e}),m(e)}),[m]),_=(0,ce.useCallback)((e=>{x({type:"resize-cell",payload:e})}),[]),F=(0,ce.useCallback)((e=>{x({type:"resize-cell",payload:e}),w(e)}),[w]),Z=(0,ce.useCallback)((e=>{var{id:t,editing:n}=e;z(n?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]),q=(0,ce.useCallback)(((e,t)=>{x({type:"update-node-size",payload:{id:e,size:t}})}),[]),J=(0,ce.useCallback)((e=>{T.scaleTo((0,fe.A)(C.current),e/100)}),[T]),$=(0,ce.useCallback)((()=>{P(!1)}),[P]),[G,Q]=(0,ja.d)({cells:E,defaultEdgeLines:l,markerPrefix:V}),ee=(0,Pa.H)({cells:E,layout:a,centered:O});return ue().createElement(ue().Fragment,null,ue().createElement("svg",{width:"100%",height:"100%",ref:C,className:ve()("root",{grabbing:S,pannable:f,ready:ee}),tabIndex:-1},ue().createElement("defs",null,Q.map(((e,t)=>ue().createElement(Me.c,{key:t,id:"".concat(V).concat(t),type:"arrow",strokeColor:e.strokeColor})))),ue().createElement("g",{transform:"translate(".concat(R.x," ").concat(R.y,") scale(").concat(R.k,")")},ue().createElement("g",{className:"cells",ref:M},E.map((e=>ue().createElement(gn.m,{key:"".concat(e.type,":").concat("edge"===e.type?"".concat(e.source,"~").concat(e.target):e.id),layout:a,cell:e,cells:E,defaultNodeBricks:s,transform:R,lineConfMap:G,active:(0,pn.c)(H,e),unrelatedCells:I,onCellMoving:X,onCellMoved:K,onCellResizing:_,onCellResized:F,onSwitchActiveTarget:v,onCellContextMenu:b,onDecoratorTextChange:k,onDecoratorTextEditing:Z,onNodeBrickResize:q})))),ue().createElement(vn,{connectLineState:D,transform:R,markerEnd:"".concat(V,"0"),onConnect:j}))),ue().createElement(Ba.Y,{shadowRoot:n.shadowRoot,scale:R.k,scaleRange:L,onZoomChange:J,onReCenter:$}))}Ra=Sr,({e:[Cn,Mn,Wn,Nn,zn,Sn,Rn,Tn,Ln,Dn,Bn,On,Pn,jn,Hn,In,Yn,Un,Vn,Xn,Kn,_n,Fn,Zn,qn,Jn,$n,Gn,Qn,ea,ta,na,aa,ra,ia,oa,sa,la,ca,ua,da,ha,fa,pa,ga,va,ma,wa,ya,ba,ka,Aa,Ea,xa,Ca,Ma,Wa,Na,za,Sa,En],c:[_a,xn]}=function(e,t,n,a,r,i){var o,s,l,c,u,d,h,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,g=Object.create,v=[g(null),g(null)],m=t.length;function w(t,n,a){return function(r,i){n&&(i=r,r=e);for(var o=0;o<t.length;o++)i=t[o].apply(r,a?[i]:[]);return a?i:r}}function y(e,t,n,a){if("function"!=typeof e&&(a||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(a?"":" or undefined"));return e}function b(e,t,n,a,r,i,l,c,u,d,h){function f(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),m=t[3],b=!l,k=1===r,A=3===r,E=4===r,x=2===r;function C(t,n,a){return function(r,i){return n&&(i=r,r=e),a&&a(r),M[t].call(r,i)}}if(!b){var M={},W=[],N=A?"get":E||k?"set":"value";if(u?(d||k?M={get:(0,se.A)((function(){return m(this)}),a,"get"),set:function(e){t[4](this,e)}}:M[N]=m,d||(0,se.A)(M[N],a,x?"":N)):d||(M=Object.getOwnPropertyDescriptor(e,a)),!d&&!u){if((s=v[+c][a])&&7!=(s^r))throw new Error("Decorating two elements with the same name ("+M[N].name+") is not supported yet");v[+c][a]=r<3?1:r}}for(var z=e,S=g.length-1;S>=0;S-=n?2:1){var R=g[S],T=n?g[S-1]:void 0,L={},D={kind:["field","accessor","method","getter","setter","class"][r],name:a,metadata:o,addInitializer:function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished");y(t,"An initializer","be",!0),i.push(t)}.bind(null,L)};if(b)s=R.call(T,z,D),L.v=1,y(s,"class decorators","return")&&(z=s);else if(D.static=c,D.private=u,s=D.access={has:u?h.bind():function(e){return a in e}},E||(s.get=u?x?function(e){return f(e),M.value}:C("get",0,f):function(e){return e[a]}),x||A||(s.set=u?C("set",0,f):function(e,t){e[a]=t}),z=R.call(T,k?{get:M.get,set:M.set}:M[N],D),L.v=1,k){if("object"==typeof z&&z)(s=y(z.get,"accessor.get"))&&(M.get=s),(s=y(z.set,"accessor.set"))&&(M.set=s),(s=y(z.init,"accessor.init"))&&W.unshift(s);else if(void 0!==z)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(z,(d?"field":"method")+" decorators","return")&&(d?W.unshift(z):M[N]=z)}return r<2&&l.push(w(W,c,1),w(i,c,0)),d||b||(u?k?l.splice(-1,0,C("get",c),C("set",c)):l.push(x?M[N]:y.call.bind(M[N])):p(e,a,M)),z}function k(e){return p(e,f,{configurable:!0,enumerable:!0,value:o})}return void 0!==i&&(o=i[f]),o=g(null==o?null:o),u=[],d=function(e){e&&u.push(w(e))},(h=function(t,a){for(var i=0;i<n.length;i++){var o=n[i],s=o[1],d=7&s;if((8&s)==t&&!d==a){var h=o[2],f=!!o[3],p=16&s;b(t?e:e.prototype,o,p,f?"#"+h:(0,oe.A)(h),d,d<2?[]:t?c=c||[]:l=l||[],u,!!t,f,a,t&&f?function(t){return(0,le.A)(t)===e}:r)}}})(8,0),h(0,0),h(8,1),h(0,1),d(l),d(c),s=u,m||k(e),{e:s,get c(){var n=[];return m&&[k(e=b(e,[t],0,e.name,5,n)),w(n,1)]}}}(Ra,[Za("eo-draw-canvas",{styleTexts:[Ha.A,Ia.A]})],[[qa({attribute:!1}),1,"cells"],[qa({type:String}),1,"layout"],[qa({attribute:!1}),1,"layoutOptions"],[qa({attribute:!1}),1,"defaultNodeSize"],[qa({attribute:!1}),1,"defaultNodeBricks"],[qa({attribute:!1}),1,"defaultEdgeLines"],[qa({attribute:!1}),1,"activeTarget"],[qa({type:Boolean}),1,"fadeUnrelatedCells"],[qa({type:Boolean}),1,"zoomable"],[qa({type:Boolean}),1,"scrollable"],[qa({type:Boolean}),1,"pannable"],[qa({attribute:!1}),1,"scaleRange"],[$a({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>Xa(dr,e),(e,t)=>Va(dr,e,t)],[$a({type:"node.move"}),1,"nodeMoveEvent",e=>Xa(gr,e),(e,t)=>Va(gr,e,t)],[$a({type:"cell.move"}),1,"cellMoveEvent",e=>Xa(vr,e),(e,t)=>Va(vr,e,t)],[$a({type:"cell.resize"}),1,"cellResizeEvent",e=>Xa(wr,e),(e,t)=>Va(wr,e,t)],[$a({type:"node.delete"}),1,"nodeDelete",e=>Xa(br,e),(e,t)=>Va(br,e,t)],[$a({type:"cell.delete"}),1,"cellDelete",e=>Xa(kr,e),(e,t)=>Va(kr,e,t)],[$a({type:"cell.contextmenu"}),1,"cellContextMenu",e=>Xa(Er,e),(e,t)=>Va(Er,e,t)],[$a({type:"decorator.text.change"}),1,"decoratorTextChange",e=>Xa(Cr,e),(e,t)=>Va(Cr,e,t)],[$a({type:"scale.change"}),1,"scaleChange",e=>Xa(Wr,e),(e,t)=>Va(Wr,e,t)],[Ja(),2,"dropNode"],[Ja(),2,"dropDecorator"],[Ja(),2,"addNodes"],[Ja(),2,"addEdge"],[Ja(),2,"manuallyConnectNodes"],[Ja(),2,"updateCells"]],0,(e=>zr.has((0,le.A)(e))),he.ReactNextElement)),xn();var Tr,Lr,Dr,Br,Or,Pr,jr,Hr,Ir,Yr,Ur,Vr,Xr,Kr,_r,Fr,Zr,qr,Jr,$r,Gr=n(497);function Qr(e,t,n){return n(ni(e,t))}function ei(e,t,n){return e.set(ni(e,t),n),n}function ti(e,t){return e.get(ni(e,t))}function ni(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ai,ri,ii,oi,si,li,ci,ui,di,hi,fi,pi,gi,vi,mi,wi,yi,bi,ki,Ai,Ei,xi,Ci,Mi,Wi,Ni,zi,Si,Ri,Ti,Li,Di,Bi,Oi,Pi,{defineElement:ji,property:Hi,event:Ii}=(0,de.createDecorators)(),Yi=new WeakMap,Ui=new WeakMap,Vi=new WeakMap,Xi=new WeakMap,Ki=new WeakSet,_i=new WeakMap,Fi=new WeakMap,Zi=new WeakMap,qi=new WeakMap,Ji=new WeakMap;class $i extends he.ReactNextElement{constructor(){super(...arguments),(0,re.A)(this,Ki),(0,ie.A)(this,Yi,Lr(this)),(0,ie.A)(this,Ui,(Dr(this),Br(this))),(0,ie.A)(this,Vi,(Or(this),Pr(this))),(0,ie.A)(this,Xi,(jr(this),Hr(this))),(0,ie.A)(this,_i,(Ur(this),e=>{Qr(Ki,this,Ir).emit(e)})),(0,ie.A)(this,Fi,Vr(this)),(0,ie.A)(this,Zi,(_r(this),e=>{Qr(Ki,this,Xr).emit(e)})),(0,ie.A)(this,qi,Fr(this)),(0,ie.A)(this,Ji,(Jr(this),e=>{Qr(Ki,this,Zr).emit(e)}))}get usage(){return ti(Yi,this)}set usage(e){ei(Yi,this,e)}get status(){return ti(Ui,this)}set status(e){ei(Ui,this,e)}get decorator(){return ti(Vi,this)}set decorator(e){ei(Vi,this,e)}render(){return ue().createElement(Gi,{usage:this.usage,onDragStart:ti(_i,this),onDragMove:ti(Zi,this),onDragEnd:ti(Ji,this)})}}function Gi(e){var{usage:t,onDragStart:n,onDragMove:a,onDragEnd:r}=e,i=(0,ce.useCallback)((e=>{if("library"===t){e.stopPropagation(),e.preventDefault();var i=[e.clientX,e.clientY],o=!1,s=e=>{o||(o=(e.clientX-i[0])**2+(e.clientY-i[1])**2>=9)&&(null==n||n([e.clientX,e.clientY])),o&&(null==a||a([e.clientX,e.clientY]))},l=e=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l),o&&(null==r||r([e.clientX,e.clientY]))};document.addEventListener("mousemove",s),document.addEventListener("mouseup",l)}}),[r,a,n,t]);return ue().createElement("div",{onMouseDown:i},ue().createElement("slot",null))}function Qi(e,t,n){return n(no(e,t))}function eo(e,t,n){return e.set(no(e,t),n),n}function to(e,t){return e.get(no(e,t))}function no(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}$r=$i,({e:[Lr,Dr,Br,Or,Pr,jr,Hr,Ir,Yr,Ur,Vr,Xr,Kr,_r,Fr,Zr,qr,Jr],c:[ai,Tr]}=function(e,t,n,a,r,i){var o,s,l,c,u,d,h,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,g=Object.create,v=[g(null),g(null)],m=t.length;function w(t,n,a){return function(r,i){n&&(i=r,r=e);for(var o=0;o<t.length;o++)i=t[o].apply(r,a?[i]:[]);return a?i:r}}function y(e,t,n,a){if("function"!=typeof e&&(a||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(a?"":" or undefined"));return e}function b(e,t,n,a,r,i,l,c,u,d,h){function f(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),m=t[3],b=!l,k=1===r,A=3===r,E=4===r,x=2===r;function C(t,n,a){return function(r,i){return n&&(i=r,r=e),a&&a(r),M[t].call(r,i)}}if(!b){var M={},W=[],N=A?"get":E||k?"set":"value";if(u?(d||k?M={get:(0,se.A)((function(){return m(this)}),a,"get"),set:function(e){t[4](this,e)}}:M[N]=m,d||(0,se.A)(M[N],a,x?"":N)):d||(M=Object.getOwnPropertyDescriptor(e,a)),!d&&!u){if((s=v[+c][a])&&7!=(s^r))throw new Error("Decorating two elements with the same name ("+M[N].name+") is not supported yet");v[+c][a]=r<3?1:r}}for(var z=e,S=g.length-1;S>=0;S-=n?2:1){var R=g[S],T=n?g[S-1]:void 0,L={},D={kind:["field","accessor","method","getter","setter","class"][r],name:a,metadata:o,addInitializer:function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished");y(t,"An initializer","be",!0),i.push(t)}.bind(null,L)};if(b)s=R.call(T,z,D),L.v=1,y(s,"class decorators","return")&&(z=s);else if(D.static=c,D.private=u,s=D.access={has:u?h.bind():function(e){return a in e}},E||(s.get=u?x?function(e){return f(e),M.value}:C("get",0,f):function(e){return e[a]}),x||A||(s.set=u?C("set",0,f):function(e,t){e[a]=t}),z=R.call(T,k?{get:M.get,set:M.set}:M[N],D),L.v=1,k){if("object"==typeof z&&z)(s=y(z.get,"accessor.get"))&&(M.get=s),(s=y(z.set,"accessor.set"))&&(M.set=s),(s=y(z.init,"accessor.init"))&&W.unshift(s);else if(void 0!==z)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(z,(d?"field":"method")+" decorators","return")&&(d?W.unshift(z):M[N]=z)}return r<2&&l.push(w(W,c,1),w(i,c,0)),d||b||(u?k?l.splice(-1,0,C("get",c),C("set",c)):l.push(x?M[N]:y.call.bind(M[N])):p(e,a,M)),z}function k(e){return p(e,f,{configurable:!0,enumerable:!0,value:o})}return void 0!==i&&(o=i[f]),o=g(null==o?null:o),u=[],d=function(e){e&&u.push(w(e))},(h=function(t,a){for(var i=0;i<n.length;i++){var o=n[i],s=o[1],d=7&s;if((8&s)==t&&!d==a){var h=o[2],f=!!o[3],p=16&s;b(t?e:e.prototype,o,p,f?"#"+h:(0,oe.A)(h),d,d<2?[]:t?c=c||[]:l=l||[],u,!!t,f,a,t&&f?function(t){return(0,le.A)(t)===e}:r)}}})(8,0),h(0,0),h(8,1),h(0,1),d(l),d(c),s=u,m||k(e),{e:s,get c(){var n=[];return m&&[k(e=b(e,[t],0,e.name,5,n)),w(n,1)]}}}($r,[ji("diagram.experimental-node",{styleTexts:[Gr.A]})],[[Hi(),1,"usage"],[Hi({type:String,render:!1}),1,"status"],[Hi({type:String}),1,"decorator"],[Ii({type:"drag.start"}),1,"dragStartEvent",e=>ti(Xi,e),(e,t)=>ei(Xi,e,t)],[Ii({type:"drag.move"}),1,"dragMoveEvent",e=>ti(Fi,e),(e,t)=>ei(Fi,e,t)],[Ii({type:"drag.end"}),1,"dragEndEvent",e=>ti(qi,e),(e,t)=>ei(qi,e,t)]],0,(e=>Ji.has((0,le.A)(e))),he.ReactNextElement)),Tr();var ao,{defineElement:ro,property:io,event:oo}=(0,de.createDecorators)(),so=new WeakMap,lo=new WeakMap,co=new WeakMap,uo=new WeakMap,ho=new WeakMap,fo=new WeakMap,po=new WeakMap,go=new WeakMap,vo=new WeakMap,mo=new WeakMap,wo=new WeakMap,yo=new WeakMap,bo=new WeakMap,ko=new WeakSet,Ao=new WeakMap,Eo=new WeakMap,xo=new WeakMap,Co=new WeakMap;class Mo extends he.ReactNextElement{constructor(){super(...arguments),(0,re.A)(this,ko),(0,ie.A)(this,so,ii(this)),(0,ie.A)(this,lo,(oi(this),si(this))),(0,ie.A)(this,co,(li(this),ci(this))),(0,ie.A)(this,uo,(ui(this),di(this,[wn.HP,wn.HP]))),(0,ie.A)(this,ho,(hi(this),fi(this))),(0,ie.A)(this,fo,(pi(this),gi(this))),(0,ie.A)(this,po,(vi(this),mi(this))),(0,ie.A)(this,go,(wi(this),yi(this))),(0,ie.A)(this,vo,(bi(this),ki(this,!0))),(0,ie.A)(this,mo,(Ai(this),Ei(this,!0))),(0,ie.A)(this,wo,(xi(this),Ci(this,!0))),(0,ie.A)(this,yo,(Mi(this),Wi(this))),(0,ie.A)(this,bo,(Ni(this),zi(this))),(0,ie.A)(this,Ao,(Ti(this),e=>{Qi(ko,this,Si).emit(e)})),(0,ie.A)(this,Eo,(e=>{(0,pn.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,ie.A)(this,xo,Li(this)),(0,ie.A)(this,Co,(Oi(this),e=>{Qi(ko,this,Di).emit(e)}))}get cells(){return to(so,this)}set cells(e){eo(so,this,e)}get layout(){return to(lo,this)}set layout(e){eo(lo,this,e)}get layoutOptions(){return to(co,this)}set layoutOptions(e){eo(co,this,e)}get defaultNodeSize(){return to(uo,this)}set defaultNodeSize(e){eo(uo,this,e)}get defaultNodeBricks(){return to(ho,this)}set defaultNodeBricks(e){eo(ho,this,e)}get defaultEdgeLines(){return to(fo,this)}set defaultEdgeLines(e){eo(fo,this,e)}get activeTarget(){return to(po,this)}set activeTarget(e){eo(po,this,e)}get fadeUnrelatedCells(){return to(go,this)}set fadeUnrelatedCells(e){eo(go,this,e)}get zoomable(){return to(vo,this)}set zoomable(e){eo(vo,this,e)}get scrollable(){return to(mo,this)}set scrollable(e){eo(mo,this,e)}get pannable(){return to(wo,this)}set pannable(e){eo(wo,this,e)}get scaleRange(){return to(yo,this)}set scaleRange(e){eo(yo,this,e)}render(){return ue().createElement(Wo,{shadowRoot:this.shadowRoot,cells:this.cells,layout:this.layout,layoutOptions:this.layoutOptions,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:to(Ao,this),onSwitchActiveTarget:to(Eo,this),onCellContextMenu:to(Co,this)})}}function Wo(e){var{shadowRoot:t,cells:n,layout:a,layoutOptions:r,defaultNodeSize:i,defaultNodeBricks:o,defaultEdgeLines:s,activeTarget:l,fadeUnrelatedCells:c,zoomable:u,scrollable:d,pannable:h,scaleRange:f,onActiveTargetChange:p,onSwitchActiveTarget:g,onCellContextMenu:v}=e,[{cells:m},w]=(0,ce.useReducer)(hn.d,n,(e=>({cells:(0,mn.C)(e,{defaultNodeSize:i})}))),y=(0,ce.useRef)(null),b=(0,ce.useRef)(null),{grabbing:k,transform:A,zoomer:E,scaleRange:x}=(0,La.f)({rootRef:y,zoomable:u,scrollable:d,pannable:h,scaleRange:f,onSwitchActiveTarget:g}),{centered:C,setCentered:M}=(0,Oa.g)({layout:a,layoutOptions:r,rootRef:y,cells:m,zoomable:u,zoomer:E,scaleRange:x,dispatch:w}),W=(0,Da.J)({cellsRef:b,activeTarget:l,onActiveTargetChange:p}),N=(0,ce.useMemo)((()=>"".concat((0,me.uniqueId)("diagram-"),"-")),[]),z="".concat(N,"line-arrow-"),S=(0,ce.useCallback)(((e,t)=>{w({type:"update-node-size",payload:{id:e,size:t}})}),[]),[R,T]=(0,ce.useState)(null),L=(0,ce.useCallback)((e=>{T(e)}),[]),D=(0,ce.useCallback)((e=>{T((t=>t===e?null:t))}),[]),[B,O]=(0,ce.useState)([]);(0,ce.useEffect)((()=>{var e=c?(0,Ta.Y)(m,null,R):[];O((t=>0===t.length&&0===e.length?t:e))}),[m,c,R]);var P=(0,ce.useCallback)((e=>{E.scaleTo((0,fe.A)(y.current),e/100)}),[E]),j=(0,ce.useCallback)((()=>{M(!1)}),[M]),[H,I]=(0,ja.d)({cells:m,defaultEdgeLines:s,markerPrefix:z}),Y=(0,Pa.H)({cells:m,layout:a,centered:C});return ue().createElement(ue().Fragment,null,ue().createElement("svg",{width:"100%",height:"100%",ref:y,className:ve()("root",{grabbing:k,pannable:h,ready:Y}),tabIndex:-1},ue().createElement("defs",null,I.map(((e,t)=>ue().createElement(Me.c,{key:t,id:"".concat(z).concat(t),type:"arrow",strokeColor:e.strokeColor})))),ue().createElement("g",{transform:"translate(".concat(A.x," ").concat(A.y,") scale(").concat(A.k,")")},ue().createElement("g",{className:"cells",ref:b},m.map((e=>ue().createElement(gn.m,{key:"".concat(e.type,":").concat((0,fn.WW)(e)?"".concat(e.source,"~").concat(e.target):e.id),layout:void 0,cell:e,cells:m,defaultNodeBricks:o,lineConfMap:H,transform:A,active:(0,pn.c)(W,e),readOnly:!0,unrelatedCells:B,onSwitchActiveTarget:g,onCellContextMenu:v,onNodeBrickResize:S,onCellMouseEnter:c&&(0,fn.N)(e)?L:void 0,onCellMouseLeave:c&&(0,fn.N)(e)?D:void 0})))))),ue().createElement(Ba.Y,{shadowRoot:t,scale:A.k,scaleRange:x,onZoomChange:P,onReCenter:j}))}Pi=Mo,({e:[ii,oi,si,li,ci,ui,di,hi,fi,pi,gi,vi,mi,wi,yi,bi,ki,Ai,Ei,xi,Ci,Mi,Wi,Ni,zi,Si,Ri,Ti,Li,Di,Bi,Oi],c:[ao,ri]}=function(e,t,n,a,r,i){var o,s,l,c,u,d,h,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,g=Object.create,v=[g(null),g(null)],m=t.length;function w(t,n,a){return function(r,i){n&&(i=r,r=e);for(var o=0;o<t.length;o++)i=t[o].apply(r,a?[i]:[]);return a?i:r}}function y(e,t,n,a){if("function"!=typeof e&&(a||void 0!==e))throw new TypeError(t+" must "+(n||"be")+" a function"+(a?"":" or undefined"));return e}function b(e,t,n,a,r,i,l,c,u,d,h){function f(e){if(!h(e))throw new TypeError("Attempted to access private element on non-instance")}var g=[].concat(t[0]),m=t[3],b=!l,k=1===r,A=3===r,E=4===r,x=2===r;function C(t,n,a){return function(r,i){return n&&(i=r,r=e),a&&a(r),M[t].call(r,i)}}if(!b){var M={},W=[],N=A?"get":E||k?"set":"value";if(u?(d||k?M={get:(0,se.A)((function(){return m(this)}),a,"get"),set:function(e){t[4](this,e)}}:M[N]=m,d||(0,se.A)(M[N],a,x?"":N)):d||(M=Object.getOwnPropertyDescriptor(e,a)),!d&&!u){if((s=v[+c][a])&&7!=(s^r))throw new Error("Decorating two elements with the same name ("+M[N].name+") is not supported yet");v[+c][a]=r<3?1:r}}for(var z=e,S=g.length-1;S>=0;S-=n?2:1){var R=g[S],T=n?g[S-1]:void 0,L={},D={kind:["field","accessor","method","getter","setter","class"][r],name:a,metadata:o,addInitializer:function(e,t){if(e.v)throw new Error("attempted to call addInitializer after decoration was finished");y(t,"An initializer","be",!0),i.push(t)}.bind(null,L)};if(b)s=R.call(T,z,D),L.v=1,y(s,"class decorators","return")&&(z=s);else if(D.static=c,D.private=u,s=D.access={has:u?h.bind():function(e){return a in e}},E||(s.get=u?x?function(e){return f(e),M.value}:C("get",0,f):function(e){return e[a]}),x||A||(s.set=u?C("set",0,f):function(e,t){e[a]=t}),z=R.call(T,k?{get:M.get,set:M.set}:M[N],D),L.v=1,k){if("object"==typeof z&&z)(s=y(z.get,"accessor.get"))&&(M.get=s),(s=y(z.set,"accessor.set"))&&(M.set=s),(s=y(z.init,"accessor.init"))&&W.unshift(s);else if(void 0!==z)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(z,(d?"field":"method")+" decorators","return")&&(d?W.unshift(z):M[N]=z)}return r<2&&l.push(w(W,c,1),w(i,c,0)),d||b||(u?k?l.splice(-1,0,C("get",c),C("set",c)):l.push(x?M[N]:y.call.bind(M[N])):p(e,a,M)),z}function k(e){return p(e,f,{configurable:!0,enumerable:!0,value:o})}return void 0!==i&&(o=i[f]),o=g(null==o?null:o),u=[],d=function(e){e&&u.push(w(e))},(h=function(t,a){for(var i=0;i<n.length;i++){var o=n[i],s=o[1],d=7&s;if((8&s)==t&&!d==a){var h=o[2],f=!!o[3],p=16&s;b(t?e:e.prototype,o,p,f?"#"+h:(0,oe.A)(h),d,d<2?[]:t?c=c||[]:l=l||[],u,!!t,f,a,t&&f?function(t){return(0,le.A)(t)===e}:r)}}})(8,0),h(0,0),h(8,1),h(0,1),d(l),d(c),s=u,m||k(e),{e:s,get c(){var n=[];return m&&[k(e=b(e,[t],0,e.name,5,n)),w(n,1)]}}}(Pi,[ro("eo-display-canvas",{styleTexts:[Ha.A,Ia.A]})],[[io({attribute:!1}),1,"cells"],[io({type:String}),1,"layout"],[io({attribute:!1}),1,"layoutOptions"],[io({attribute:!1}),1,"defaultNodeSize"],[io({attribute:!1}),1,"defaultNodeBricks"],[io({attribute:!1}),1,"defaultEdgeLines"],[io({attribute:!1}),1,"activeTarget"],[io({type:Boolean}),1,"fadeUnrelatedCells"],[io({type:Boolean}),1,"zoomable"],[io({type:Boolean}),1,"scrollable"],[io({type:Boolean}),1,"pannable"],[io({attribute:!1}),1,"scaleRange"],[oo({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>to(bo,e),(e,t)=>eo(bo,e,t)],[oo({type:"cell.contextmenu"}),1,"cellContextMenu",e=>to(xo,e),(e,t)=>eo(xo,e,t)]],0,(e=>Co.has((0,le.A)(e))),he.ReactNextElement)),ri()},3971:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),r=n.n(a),i=n(935),o=n.n(i)()(r());o.push([e.id,':host{display:block;--local-label-line-height:inherit;--local-label-font-size:inherit;--local-label-color:inherit;--local-label-font-weight:inherit}:host([hidden]){display:none}:host([type="line"]){--local-label-line-height:18px;--local-label-font-size:11px;--local-label-color:var(--color-secondary-text);--local-label-font-weight:400}*{box-sizing:border-box}.label{max-width:168px;margin:-3px}.label-text,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:var(--local-label-line-height);font-size:var(--local-label-font-size);color:var(--local-label-color);font-weight:var(--local-label-font-weight);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;-moz-user-select:text;user-select:text}.label-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label.editing .label-text,\n.label.empty:not(.editing) .label-text,\n.label:not(.editing) .label-input{display:none}',""]);const s=o.toString()},497:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),r=n.n(a),i=n(935),o=n.n(i)()(r());o.push([e.id,'*{box-sizing:border-box}:host{display:block;border:1px solid var(--palette-gray-5);cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([hidden]){display:none}:host([usage="dragging"]){opacity:0.75;position:fixed}:host(:not([usage="library"])){background:var(--palette-gray-3);width:60px;height:60px}:host([usage="library"]){width:180px;height:30px;margin-bottom:10px}div{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host(:not([usage="dragging"]):not([usage="library"]):hover),\n:host([status="highlighted"]){color:var(--palette-blue-5);background:var(--palette-blue-1);border-color:1px solid var(--palette-blue-4)}:host([status="faded"]){opacity:0.3}:host([decorator="area"]){width:100px;height:60px;background:rgba(119,141,195,0.1);border:none}:host([decorator="text"]){width:auto;height:auto;background:none;border:none}',""]);const s=o.toString()}}]);
2
+ //# sourceMappingURL=1728.266cc7e7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks/1728.266cc7e7.js","mappings":"44BA8DA,IAyBAA,IAzBM,cAAEC,GAAa,SAAEC,GAAUC,MAAK,UAAEC,KAAWC,EAAAA,GAAAA,oBAuBtCC,IAAqBC,EAAAA,GAAAA,YAAWC,IAE7CC,GAAA,IAAAC,QAAAC,GAAA,IAAAD,QAAAE,GAAA,IAAAF,QAAAG,GAAA,IAAAH,QAAAI,GAAA,IAAAJ,QAAAK,GAAA,IAAAL,QAAAM,GAAA,IAAAN,QAAAO,GAAA,IAAAP,QAAAQ,GAAA,IAAAR,QAAAS,GAAA,IAAAT,QAAAU,GAAA,IAAAV,QAAAW,GAAA,IAAAX,QAAAY,GAAA,IAAAZ,QAAAa,GAAA,IAAAb,QAAAc,GAAA,IAAAd,QAAAe,GAAA,IAAAC,QAAAC,GAAA,IAAAjB,QAAAkB,GAAA,IAAAlB,QAAAmB,GAAA,IAAAnB,QAAAoB,GAAA,IAAApB,QAAAqB,GAAA,IAAArB,QAAAsB,GAAA,IAAAtB,QAAAuB,GAAA,IAAAvB,QAAAwB,GAAA,IAAAxB,QAAAyB,GAAA,IAAAzB,QAAA0B,GAAA,IAAA1B,QAAA2B,GAAA,IAAA3B,QAAA4B,GAAA,IAAA5B,QAAA6B,GAAA,IAAA7B,QAIA,MAAA8B,WAGw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BpU,GAAS,CAAEoU,WAAW,IAAQ,sBAG9BpU,GAAS,CAAEoU,WAAW,IAAQ,wBAY9BpU,GAAS,CAAEoU,WAAW,IAAQ,uBAG9BpU,GAAS,CAAEoU,WAAW,IAAQ,mBAM9BpU,GAAS,CAAEkO,KAAMmG,UAAU,yBAG3BrU,GAAS,CAAEkO,KAAMmG,UAAU,eAG3BrU,GAAS,CAAEkO,KAAMmG,UAAU,iBAG3BrU,GAAS,CAAEkO,KAAMmG,UAAU,eAG3BrU,GAAS,CAAEoU,WAAW,IAAQ,iBAG9BnU,GAAM,CAAEiO,KAAM,wBAAwB,4BAAAoG,GAAA/N,GAAAnF,GAAAkT,GAAA,CAAAA,EAAA9N,IAAAC,GAAArF,GAAAkT,EAAA9N,IAAA,CAatCvG,GAAM,CAAEiO,KAAM,qBAAqB,oBAAAoG,GAAA/N,GAAAlF,GAAAiT,GAAA,CAAAA,EAAA9N,IAAAC,GAAApF,GAAAiT,EAAA9N,KAAA,GAAA+N,GAAA+H,GAAA9H,KAAAC,EAAAA,GAAAA,GAAAF,KAjERhS,GAAAA,mBAAgBwR,I,kEC/D1C6V,E,MAA0B,GAA4B,KAE1DA,EAAwBjP,KAAK,CAACkP,EAAOtiB,GAAI,i6BAGS,KAElD,QAAeqiB,EAAwB/I,U,iECPnC+I,E,MAA0B,GAA4B,KAE1DA,EAAwBjP,KAAK,CAACkP,EAAOtiB,GAAI,43BACkT,KAE3V,QAAeqiB,EAAwB/I,U","sources":["webpack:///./src/diagram/index.tsx","webpack:///./src/editable-label/index.tsx","webpack:///./src/draw-canvas/ConnectLineComponent.tsx","webpack:///./src/draw-canvas/processors/updateCells.ts","webpack:///./src/draw-canvas/index.tsx","webpack:///./src/draw-canvas/processors/handleKeyboard.ts","webpack:///./src/experimental-node/index.tsx","webpack:///./src/display-canvas/index.tsx","webpack:///./src/editable-label/styles.shadow.css","webpack:///./src/experimental-node/styles.shadow.css"],"sourcesContent":["import React, {\n createRef,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { EventEmitter, createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport { select } from \"d3-selection\";\nimport { ZoomTransform, zoom } from \"d3-zoom\";\nimport classNames from \"classnames\";\nimport { uniqueId } from \"lodash\";\nimport ResizeObserver from \"resize-observer-polyfill\";\nimport type {\n DiagramEdge,\n DiagramNode,\n LayoutOptions,\n LineConf,\n NodeBrickConf,\n PositionTuple,\n RefRepository,\n RenderedLineLabel,\n TransformLiteral,\n LineTarget,\n ConnectLineDetail,\n ConnectNodesOptions,\n ConnectLineState,\n ActiveTarget,\n RangeTuple,\n LineLabel,\n LineLabelConf,\n TextOptions,\n DragNodesOptions,\n NodeMovement,\n ManualLayoutStatus,\n LineMaskRects,\n} from \"./interfaces\";\nimport { NodeComponentGroup } from \"./NodeComponent\";\nimport { handleKeyboard } from \"./processors/handleKeyboard\";\nimport { transformToCenter } from \"./processors/transformToCenter\";\nimport { getRenderedLines } from \"./processors/getRenderedLines\";\nimport { normalizeLinesAndMarkers } from \"./processors/normalizeLinesAndMarkers\";\nimport { LineLabelComponentGroup } from \"./LineLabelComponent\";\nimport { LineComponent } from \"./LineComponent\";\nimport { MarkerComponent } from \"./MarkerComponent\";\nimport { LineMaskComponent } from \"./LineMaskComponent\";\nimport { ConnectLineComponent } from \"./ConnectLineComponent\";\nimport { getRenderedLineLabels } from \"./processors/getRenderedLineLabels\";\nimport { handleNodesMouseDown } from \"./processors/handleNodesMouseDown\";\nimport { DEFAULT_SCALE_RANGE_MAX, DEFAULT_SCALE_RANGE_MIN } from \"./constants\";\nimport { useRenderedDiagram } from \"./hooks/useRenderedDiagram\";\nimport { adjustLineLabels } from \"./processors/adjustLineLabels\";\nimport styleText from \"./styles.shadow.css\";\nimport { useUserView } from \"./hooks/useUserView\";\nimport { sameTarget } from \"./processors/sameTarget\";\nimport { getLineMaskRects } from \"./processors/getLineMaskRects\";\n\nconst { defineElement, property, event, method } = createDecorators();\n\nexport interface EoDiagramProps {\n layout?: \"dagre\" | \"force\";\n nodes?: DiagramNode[];\n edges?: DiagramEdge[];\n nodeBricks?: NodeBrickConf[];\n lines?: LineConf[];\n layoutOptions?: LayoutOptions;\n connectNodes?: ConnectNodesOptions;\n dragNodes?: DragNodesOptions;\n activeTarget?: ActiveTarget | null;\n disableKeyboardAction?: boolean;\n zoomable?: boolean;\n scrollable?: boolean;\n pannable?: boolean;\n scaleRange?: RangeTuple;\n}\n\nexport interface DiagramRef {\n callOnLineLabel(id: string, method: string, ...args: unknown[]): void;\n}\n\nexport const EoDiagramComponent = forwardRef(LegacyEoDiagramComponent);\n\n/**\n * 构件 `eo-diagram`\n */\nexport\n@defineElement(\"eo-diagram\", {\n styleTexts: [styleText],\n})\nclass EoDiagram extends ReactNextElement implements EoDiagramProps {\n /**\n * @required\n */\n @property({ type: String })\n accessor layout: \"dagre\" | \"force\" | undefined;\n\n @property({ attribute: false })\n accessor nodes: DiagramNode[] | undefined;\n\n @property({ attribute: false })\n accessor edges: DiagramEdge[] | undefined;\n\n @property({ attribute: false })\n accessor nodeBricks: NodeBrickConf[] | undefined;\n\n @property({ attribute: false })\n accessor lines: LineConf[] | undefined;\n\n @property({ attribute: false })\n accessor layoutOptions: LayoutOptions | undefined;\n\n @property({ attribute: false })\n accessor activeTarget: ActiveTarget | null | undefined;\n\n @property({ type: Boolean })\n accessor disableKeyboardAction: boolean | undefined;\n\n @property({ attribute: false })\n accessor connectNodes: ConnectNodesOptions | undefined;\n\n @property({ attribute: false })\n accessor dragNodes: DragNodesOptions | undefined;\n\n @property({ type: Boolean })\n accessor zoomable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor scrollable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor pannable: boolean | undefined = true;\n\n @property({ attribute: false })\n accessor scaleRange: RangeTuple | undefined;\n\n @event({ type: \"activeTarget.change\" })\n accessor #activeTargetChangeEvent!: EventEmitter<ActiveTarget | null>;\n\n #handleActiveTargetChange = (target: ActiveTarget | null) => {\n this.#activeTargetChangeEvent.emit(target);\n };\n\n @event({ type: \"node.delete\" })\n accessor #nodeDelete!: EventEmitter<DiagramNode>;\n\n #handleNodeDelete = (node: DiagramNode) => {\n this.#nodeDelete.emit(node);\n };\n\n @event({ type: \"edge.delete\" })\n accessor #edgeDelete!: EventEmitter<DiagramEdge>;\n\n #handleEdgeDelete = (edge: DiagramEdge) => {\n this.#edgeDelete.emit(edge);\n };\n\n @event({ type: \"line.click\" })\n accessor #lineClick!: EventEmitter<LineTarget>;\n\n #handleLineClick = (line: LineTarget) => {\n this.#lineClick.emit(line);\n };\n\n @event({ type: \"line.dblclick\" })\n accessor #lineDoubleClick!: EventEmitter<LineTarget>;\n\n #handleLineDoubleClick = (line: LineTarget) => {\n this.#lineDoubleClick.emit(line);\n };\n\n @event({ type: \"nodes.connect\" })\n accessor #connectNodes!: EventEmitter<ConnectLineDetail>;\n\n #handleNodesConnect = (detail: ConnectLineDetail) => {\n this.#connectNodes.emit(detail);\n };\n\n #handleSwitchActiveTarget = (target: ActiveTarget | null) => {\n if (!sameTarget(target, this.activeTarget)) {\n this.activeTarget = target;\n }\n };\n\n #diagramRef = createRef<DiagramRef>();\n\n @method()\n callOnLineLabel(id: string, method: string, ...args: unknown[]) {\n this.#diagramRef.current?.callOnLineLabel(id, method, ...args);\n }\n\n render() {\n return (\n <EoDiagramComponent\n ref={this.#diagramRef}\n layout={this.layout}\n nodes={this.nodes}\n edges={this.edges}\n nodeBricks={this.nodeBricks}\n lines={this.lines}\n layoutOptions={this.layoutOptions}\n connectNodes={this.connectNodes}\n dragNodes={this.dragNodes}\n activeTarget={this.activeTarget}\n disableKeyboardAction={this.disableKeyboardAction}\n zoomable={this.zoomable}\n scrollable={this.scrollable}\n pannable={this.pannable}\n scaleRange={this.scaleRange}\n onActiveTargetChange={this.#handleActiveTargetChange}\n onSwitchActiveTarget={this.#handleSwitchActiveTarget}\n onNodeDelete={this.#handleNodeDelete}\n onEdgeDelete={this.#handleEdgeDelete}\n onLineClick={this.#handleLineClick}\n onLineDoubleClick={this.#handleLineDoubleClick}\n onNodesConnect={this.#handleNodesConnect}\n />\n );\n }\n}\n\nexport interface EoDiagramComponentProps extends EoDiagramProps {\n onActiveTargetChange?(target: ActiveTarget | null): void;\n onSwitchActiveTarget?(target: ActiveTarget | null): void;\n onNodeDelete?(node: DiagramNode): void;\n onEdgeDelete?(edge: DiagramEdge): void;\n onLineClick?(line: LineTarget): void;\n onLineDoubleClick?(line: LineTarget): void;\n onNodesConnect?(detail: ConnectLineDetail): void;\n}\n\nexport function LegacyEoDiagramComponent(\n {\n layout,\n nodes,\n edges,\n nodeBricks,\n lines,\n layoutOptions,\n connectNodes,\n dragNodes,\n activeTarget: _activeTarget,\n disableKeyboardAction,\n zoomable,\n scrollable,\n pannable,\n scaleRange: _scaleRange,\n onActiveTargetChange,\n onSwitchActiveTarget,\n onNodeDelete,\n onEdgeDelete,\n onLineClick,\n onLineDoubleClick,\n onNodesConnect,\n }: EoDiagramComponentProps,\n ref: React.Ref<DiagramRef>\n) {\n const [nodesReady, setNodesReady] = useState(false);\n const [nodesRenderId, setNodesRenderId] = useState(0);\n const [nodesRefRepository, setNodesRefRepository] =\n useState<RefRepository | null>(null);\n const [lineLabelsReady, setLineLabelsReady] = useState(false);\n const [lineLabelsRenderId, setLineLabelsRenderId] = useState(0);\n const [lineLabelsRefRepository, setLineLabelsRefRepository] =\n useState<RefRepository | null>(null);\n const [renderedLineLabels, setRenderedLineLabels] = useState<\n RenderedLineLabel[]\n >([]);\n\n const [grabbing, setGrabbing] = useState(false);\n const [transform, setTransform] = useState<TransformLiteral>({\n k: 1,\n x: 0,\n y: 0,\n });\n\n const linePathsRef = useRef(new Map<string, SVGPathElement | null>());\n\n const rootRef = useRef<HTMLDivElement>(null);\n const nodesRef = useRef<HTMLDivElement>(null);\n const [centered, setCentered] = useState(false);\n\n const { userViewReady, userViewNodesMap, saveUserView } = useUserView(\n dragNodes?.save\n );\n\n const [connectLineTo, setConnectLineTo] = useState<PositionTuple>([0, 0]);\n const [connectLineState, setConnectLineState] =\n useState<ConnectLineState | null>(null);\n const [manualLayoutStatus, setManualLayoutStatus] =\n useState<ManualLayoutStatus>(\"initial\");\n const [nodeMovement, setNodeMovement] = useState<NodeMovement | null>(null);\n\n useImperativeHandle(ref, () => ({\n callOnLineLabel(id, method, ...args) {\n (\n lineLabelsRefRepository?.get(id)\n ?.firstElementChild as unknown as Record<string, Function>\n )?.[method](...args);\n },\n }));\n\n useEffect(() => {\n const onNodesMouseDown = (event: MouseEvent) => {\n handleNodesMouseDown(event, {\n nodes,\n nodesRefRepository,\n connectNodes,\n dragNodes,\n scale: transform.k,\n setConnectLineState,\n setConnectLineTo,\n setManualLayoutStatus,\n setNodeMovement,\n onSwitchActiveTarget,\n onNodesConnect,\n });\n };\n // Bind mousedown event manually, since the React event handler can't work with\n // d3-zoom inside shadow DOM.\n const nodesContainer = nodesRef.current;\n nodesContainer?.addEventListener(\"mousedown\", onNodesMouseDown);\n return () => {\n nodesContainer?.removeEventListener(\"mousedown\", onNodesMouseDown);\n };\n }, [\n nodes,\n connectNodes,\n dragNodes,\n transform.k,\n nodesRefRepository,\n onNodesConnect,\n onSwitchActiveTarget,\n ]);\n\n const { normalizedLines, normalizedLinesMap, markers } = useMemo(\n () => normalizeLinesAndMarkers(edges, lines),\n [edges, lines]\n );\n\n const lineLabels = useMemo(() => {\n return normalizedLines.flatMap(({ line: { text, label, $id }, edge }) => {\n if (!text && !label) {\n return [] as LineLabel[];\n }\n\n let key: \"label\" | \"text\";\n let list: LineLabelConf[] | TextOptions[];\n if (label) {\n key = \"label\";\n list = ([] as LineLabelConf[]).concat(label);\n } else {\n key = \"text\";\n list = ([] as TextOptions[]).concat(text!);\n }\n\n return list.map<LineLabel>((item) => ({\n [key as \"label\"]: item as LineLabelConf,\n id: `${$id}-${item.placement ?? \"center\"}`,\n edge,\n }));\n });\n }, [normalizedLines]);\n\n const { nodes: renderedNodes, edges: renderedEdges } = useRenderedDiagram({\n layout,\n nodes,\n edges,\n manualLayoutStatus,\n userViewReady,\n userViewNodesMap,\n nodeMovement,\n nodesRefRepository,\n lineLabelsRefRepository,\n normalizedLinesMap,\n layoutOptions,\n nodesRenderId,\n lineLabelsRenderId,\n });\n\n useEffect(\n () => {\n if (manualLayoutStatus === \"finished\") {\n saveUserView(\n renderedNodes.map((node) => ({\n id: node.id,\n x: node.x,\n y: node.y,\n }))\n );\n }\n },\n // Only save user view when manual layout is just finished.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [manualLayoutStatus]\n );\n\n const renderedLines = useMemo(\n () => getRenderedLines(renderedEdges, renderedNodes, normalizedLines),\n [normalizedLines, renderedNodes, renderedEdges]\n );\n\n const newActiveTarget = _activeTarget ?? null;\n const [activeTarget, setActiveTarget] = useState<ActiveTarget | null>(\n newActiveTarget\n );\n\n useEffect(() => {\n setActiveTarget((previous) =>\n sameTarget(previous, newActiveTarget) ? previous : newActiveTarget\n );\n }, [newActiveTarget]);\n\n const activeTargetChangeInitialized = useRef(false);\n useEffect(() => {\n if (!activeTargetChangeInitialized.current) {\n activeTargetChangeInitialized.current = true;\n return;\n }\n onActiveTargetChange?.(activeTarget);\n }, [activeTarget, onActiveTargetChange]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root || disableKeyboardAction) {\n return;\n }\n const onKeydown = (event: KeyboardEvent) => {\n const action = handleKeyboard(event, {\n renderedNodes,\n activeTarget,\n });\n\n if (action?.action === \"delete-node\") {\n onNodeDelete?.(action.node);\n } else if (action?.action === \"delete-edge\") {\n onEdgeDelete?.(action.edge);\n } else if (action?.action === \"switch-active-node\" && action.node) {\n onSwitchActiveTarget?.({ type: \"node\", nodeId: action.node.id });\n }\n };\n root.addEventListener(\"keydown\", onKeydown);\n return () => {\n root.removeEventListener(\"keydown\", onKeydown);\n };\n }, [\n activeTarget,\n renderedNodes,\n disableKeyboardAction,\n onSwitchActiveTarget,\n onNodeDelete,\n onEdgeDelete,\n ]);\n\n const handleNodesRendered = useCallback(\n (refRepository: RefRepository | null) => {\n if (refRepository) {\n setNodesRenderId((previous) => previous + 1);\n setNodesRefRepository(refRepository);\n }\n setNodesReady((previous) => previous || !!refRepository);\n },\n []\n );\n\n const handleLineLabelsRendered = useCallback(\n (refRepository: RefRepository | null) => {\n if (refRepository) {\n setLineLabelsRenderId((previous) => previous + 1);\n setLineLabelsRefRepository(refRepository);\n }\n setLineLabelsReady((previous) => previous || !!refRepository);\n },\n []\n );\n\n const scaleRange = useMemo(\n () =>\n _scaleRange ??\n ([DEFAULT_SCALE_RANGE_MIN, DEFAULT_SCALE_RANGE_MAX] as RangeTuple),\n [_scaleRange]\n );\n\n const zoomer = useMemo(() => zoom<HTMLDivElement, unknown>(), []);\n\n useEffect(() => {\n let moved = false;\n zoomer\n .scaleExtent(zoomable ? scaleRange : [1, 1])\n .on(\"start\", () => {\n moved = false;\n setGrabbing(true);\n })\n .on(\"zoom\", (e: { transform: TransformLiteral }) => {\n moved = true;\n setTransform(e.transform);\n })\n .on(\"end\", () => {\n setGrabbing(false);\n if (!moved) {\n onSwitchActiveTarget?.(null);\n }\n });\n }, [onSwitchActiveTarget, scaleRange, zoomable, zoomer]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) {\n return;\n }\n\n const rootSelection = select(root);\n\n const unsetZoom = () => {\n rootSelection\n .on(\".zoom\", null)\n .on(\".zoom.custom\", null)\n .on(\"wheel\", null);\n };\n\n if (!(zoomable || scrollable || pannable)) {\n unsetZoom();\n return;\n }\n\n if (zoomable || scrollable) {\n // Do not override default d3 zoom handler.\n // Only handles *panning*\n rootSelection.on(\n \"wheel.zoom.custom\",\n (e: WheelEvent & { wheelDeltaX: number; wheelDeltaY: number }) => {\n // Mac OS trackpad pinch event is emitted as a wheel.zoom and d3.event.ctrlKey set to true\n if (!e.ctrlKey) {\n // Stop immediate propagation for default d3 zoom handler\n e.stopImmediatePropagation();\n if (scrollable) {\n e.preventDefault();\n zoomer.translateBy(\n rootSelection,\n e.wheelDeltaX / 5,\n e.wheelDeltaY / 5\n );\n }\n }\n // zoomer.scaleBy(rootSelection, Math.pow(2, defaultWheelDelta(e)))\n }\n );\n }\n\n rootSelection\n .call(zoomer)\n .on(\"wheel\", (e: WheelEvent) => e.preventDefault())\n .on(\"dblclick.zoom\", null);\n\n if (!pannable) {\n rootSelection\n .on(\"mousedown.zoom\", null)\n .on(\"touchstart.zoom\", null)\n .on(\"touchmove.zoom\", null)\n .on(\"touchend.zoom\", null);\n }\n\n return unsetZoom;\n }, [pannable, scrollable, zoomable, zoomer]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (renderedNodes.length === 0 || !root || centered) {\n return;\n }\n const { k, x, y } = transformToCenter(renderedNodes, {\n canvasWidth: root.clientWidth,\n canvasHeight: root.clientHeight,\n scaleRange: zoomable ? scaleRange : undefined,\n });\n zoomer.transform(select(root), new ZoomTransform(k, x, y));\n setCentered(true);\n }, [centered, renderedNodes, scaleRange, zoomable, zoomer]);\n\n const defPrefix = useMemo(() => `${uniqueId(\"diagram-\")}-`, []);\n const markerPrefix = `${defPrefix}line-arrow-`;\n const maskPrefix = `${defPrefix}mask-`;\n const activeLineMarkerPrefix = `${defPrefix}active-line-`;\n\n useEffect(() => {\n setRenderedLineLabels((previous) =>\n getRenderedLineLabels(previous, renderedLines, linePathsRef.current)\n );\n }, [renderedLines]);\n\n const [lineMaskRects, setLineMaskRects] = React.useState<LineMaskRects>(\n new Map()\n );\n\n useEffect(() => {\n if (!lineLabelsRefRepository) {\n return;\n }\n const updateLineMaskRects = () => {\n setLineMaskRects(\n getLineMaskRects(renderedLineLabels, lineLabelsRefRepository)\n );\n };\n\n adjustLineLabels(renderedLineLabels, lineLabelsRefRepository);\n\n const observer = new ResizeObserver(updateLineMaskRects);\n for (const lineLabel of lineLabelsRefRepository.values()) {\n observer.observe(lineLabel);\n }\n return () => {\n observer.disconnect();\n };\n }, [lineLabelsRenderId, lineLabelsRefRepository, renderedLineLabels]);\n\n if (layout !== \"dagre\" && layout !== \"force\") {\n return <div>{`Diagram layout not supported: \"${layout}\"`}</div>;\n }\n\n return (\n <div\n className={classNames(\"diagram\", {\n ready: nodesReady && centered,\n grabbing,\n pannable,\n })}\n tabIndex={-1}\n ref={rootRef}\n >\n <svg width=\"100%\" height=\"100%\" className=\"lines\">\n <defs>\n {markers.map(({ type, strokeColor }, index) => (\n <MarkerComponent\n key={index}\n id={`${markerPrefix}${index}`}\n type={type}\n strokeColor={strokeColor}\n />\n ))}\n {[...lineMaskRects].map(([lineId, rects]) => (\n <LineMaskComponent\n key={lineId}\n lineId={lineId}\n rects={rects}\n maskPrefix={maskPrefix}\n renderedLineLabels={renderedLineLabels}\n />\n ))}\n <marker\n id={`${activeLineMarkerPrefix}start`}\n viewBox=\"0 0 8 8\"\n refX={4}\n refY={4}\n markerWidth={8}\n markerHeight={8}\n orient=\"auto\"\n >\n <path\n d=\"M 0.5 0.5 H 7.5 V 7.5 H 0.5 Z\"\n stroke=\"var(--palette-gray-7)\"\n strokeWidth={1}\n fill=\"var(--palette-gray-1)\"\n />\n </marker>\n <marker\n id={`${activeLineMarkerPrefix}end`}\n viewBox=\"0 0 14 8\"\n refX={3}\n refY={4}\n markerWidth={14}\n markerHeight={8}\n orient=\"auto\"\n >\n <path\n d=\"M 0.5 1.5 L 5.5 4 L 0.5 6.5 z\"\n stroke=\"var(--palette-blue-3)\"\n strokeWidth={1}\n fill=\"var(--palette-blue-3)\"\n />\n <path\n d=\"M 6.5 0.5 H 13.5 V 7.5 H 6.5 Z\"\n stroke=\"var(--palette-gray-7)\"\n strokeWidth={1}\n fill=\"var(--palette-gray-1)\"\n />\n </marker>\n </defs>\n <g\n transform={`translate(${transform.x} ${transform.y}) scale(${transform.k})`}\n >\n {renderedLines.map((line) => (\n <LineComponent\n key={line.line.$id}\n line={line}\n linePaths={linePathsRef.current}\n lineMaskRects={lineMaskRects}\n maskPrefix={maskPrefix}\n markerPrefix={markerPrefix}\n activeLineMarkerPrefix={activeLineMarkerPrefix}\n active={\n activeTarget?.type === \"edge\" &&\n activeTarget.edge.source === line.edge.source &&\n activeTarget.edge.target === line.edge.target\n }\n activeRelated={\n activeTarget?.type === \"node\" &&\n (line.edge.source === activeTarget.nodeId ||\n line.edge.target === activeTarget.nodeId)\n }\n onLineClick={onLineClick}\n onLineDoubleClick={onLineDoubleClick}\n />\n ))}\n </g>\n </svg>\n <div\n className={classNames(\"line-labels\", { ready: lineLabelsReady })}\n style={{\n left: transform.x,\n top: transform.y,\n transform: `scale(${transform.k})`,\n }}\n >\n <LineLabelComponentGroup\n labels={lineLabels}\n onRendered={handleLineLabelsRendered}\n />\n </div>\n <div\n className=\"nodes\"\n ref={nodesRef}\n style={{\n left: transform.x,\n top: transform.y,\n transform: `scale(${transform.k})`,\n }}\n >\n <NodeComponentGroup\n nodes={nodes}\n nodeBricks={nodeBricks}\n // nodePositions={nodePositions}\n onRendered={handleNodesRendered}\n />\n </div>\n <ConnectLineComponent\n connectLineState={connectLineState}\n connectLineTo={connectLineTo}\n markerPrefix={markerPrefix}\n />\n </div>\n );\n}\n","import React, {\n createRef,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\nimport { EventEmitter, createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport classNames from \"classnames\";\nimport styleText from \"./styles.shadow.css\";\n\nconst { defineElement, property, event, method } = createDecorators();\n\nexport interface EditableLabelProps {\n label?: string;\n type?: LabelType;\n}\n\nexport type LabelType = \"line\" | \"default\";\n\nexport interface EditableLabelRef {\n enableEditing(): void;\n}\n\nexport const EditableLabelComponent = forwardRef(LegacyEditableLabelComponent);\n\n/**\n * 构件 `diagram.editable-label`\n */\nexport\n@defineElement(\"diagram.editable-label\", {\n styleTexts: [styleText],\n})\nclass EditableLabel extends ReactNextElement implements EditableLabelProps {\n @property()\n accessor label: string | undefined;\n\n @property({ render: false })\n accessor type: LabelType | undefined;\n\n @event({ type: \"label.editing.change\" })\n accessor #labelEditingChange!: EventEmitter<boolean>;\n\n #handleLabelEditingChange = (value: boolean) => {\n this.#labelEditingChange.emit(value);\n };\n\n @event({ type: \"label.change\" })\n accessor #labelChange!: EventEmitter<string>;\n\n #handleLabelChange = (value: string) => {\n this.#labelChange.emit(value);\n };\n\n @method()\n enableEditing() {\n this.#editableLabelRef.current?.enableEditing();\n }\n\n #editableLabelRef = createRef<EditableLabelRef>();\n\n render() {\n return (\n <EditableLabelComponent\n ref={this.#editableLabelRef}\n label={this.label}\n onLabelEditingChange={this.#handleLabelEditingChange}\n onLabelChange={this.#handleLabelChange}\n />\n );\n }\n}\n\nexport interface EditableLabelComponentProps extends EditableLabelProps {\n onLabelEditingChange?(value: boolean): void;\n onLabelChange?(value: string): void;\n}\n\nexport function LegacyEditableLabelComponent(\n {\n label: _label,\n onLabelChange,\n onLabelEditingChange,\n }: EditableLabelComponentProps,\n ref: React.Ref<EditableLabelRef>\n) {\n const label = _label ?? \"\";\n const [currentLabel, setCurrentLabel] = useState<string>(label);\n const [editingLabel, setEditingLabel] = useState(false);\n const editingLabelInitialized = useRef(false);\n const [shouldEmitLabelChange, setShouldEmitLabelChange] = useState(false);\n const labelInputRef = useRef<HTMLInputElement>(null);\n\n useImperativeHandle(ref, () => ({\n enableEditing() {\n setEditingLabel(true);\n },\n }));\n\n useEffect(() => {\n setCurrentLabel(label);\n }, [label]);\n\n const handleEditLabel = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setEditingLabel(true);\n }, []);\n\n useEffect(() => {\n if (editingLabel) {\n // Prevent scroll when focusing.\n // Otherwise the diagram svg may be clipped in Chrome.\n labelInputRef.current?.focus({ preventScroll: true });\n labelInputRef.current?.select();\n }\n }, [editingLabel]);\n\n useEffect(() => {\n if (editingLabelInitialized.current) {\n onLabelEditingChange?.(editingLabel);\n } else {\n editingLabelInitialized.current = true;\n }\n }, [editingLabel, onLabelEditingChange]);\n\n const handleInputChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setCurrentLabel(event.target.value);\n },\n []\n );\n\n const handleInputKeydown = useCallback((event: React.KeyboardEvent) => {\n const key =\n event.key ||\n /* istanbul ignore next: compatibility */ event.keyCode ||\n /* istanbul ignore next: compatibility */ event.which;\n if (key === \"Enter\" || key === 13) {\n labelInputRef.current?.blur();\n }\n }, []);\n\n const handleInputBlur = useCallback(() => {\n setEditingLabel(false);\n setShouldEmitLabelChange(true);\n }, []);\n\n useEffect(() => {\n if (shouldEmitLabelChange) {\n onLabelChange?.(currentLabel);\n setShouldEmitLabelChange(false);\n }\n }, [currentLabel, onLabelChange, shouldEmitLabelChange]);\n\n const stopPropagation = useCallback((e: React.MouseEvent) => {\n e.stopPropagation();\n }, []);\n\n return (\n <div\n className={classNames(\"label\", {\n editing: editingLabel,\n empty: !currentLabel,\n })}\n onDoubleClick={stopPropagation}\n onMouseDown={stopPropagation}\n >\n <input\n className=\"label-input\"\n value={currentLabel}\n ref={labelInputRef}\n onChange={handleInputChange}\n onKeyDown={handleInputKeydown}\n onBlur={handleInputBlur}\n />\n <div className=\"label-text\" onDoubleClick={handleEditLabel}>\n {currentLabel}\n </div>\n </div>\n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport classNames from \"classnames\";\nimport type { ConnectLineState } from \"./interfaces\";\nimport type { PositionTuple, TransformLiteral } from \"../diagram/interfaces\";\n\nexport interface ConnectLineComponentProps {\n connectLineState: ConnectLineState | null;\n transform: TransformLiteral;\n markerEnd: string;\n onConnect(state: ConnectLineState, to: PositionTuple): void;\n}\n\nexport function ConnectLineComponent({\n connectLineState,\n transform,\n markerEnd,\n onConnect,\n}: ConnectLineComponentProps): JSX.Element {\n const [connectLineTo, setConnectLineTo] = useState<PositionTuple | null>(\n null\n );\n\n useEffect(() => {\n if (connectLineState) {\n setConnectLineTo(connectLineState.from);\n }\n }, [connectLineState]);\n\n useEffect(() => {\n if (connectLineState) {\n const onMouseMove = (e: MouseEvent) => {\n // Set connect line to based on the mouse position and the transform\n setConnectLineTo([\n (e.clientX - transform.x - connectLineState.offset[0]) / transform.k,\n (e.clientY - transform.y - connectLineState.offset[1]) / transform.k,\n ]);\n };\n const onMouseDown = (e: MouseEvent) => {\n e.stopPropagation();\n };\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n reset();\n onConnect(connectLineState, [\n (e.clientX - transform.x - connectLineState.offset[0]) / transform.k,\n (e.clientY - transform.y - connectLineState.offset[1]) / transform.k,\n ]);\n };\n const reset = () => {\n document.removeEventListener(\"mousemove\", onMouseMove);\n document.removeEventListener(\"mousedown\", onMouseDown, {\n capture: true,\n });\n document.removeEventListener(\"click\", onClick, { capture: true });\n setConnectLineTo(null);\n };\n document.addEventListener(\"mousemove\", onMouseMove);\n document.addEventListener(\"mousedown\", onMouseDown, { capture: true });\n document.addEventListener(\"click\", onClick, { capture: true });\n\n return reset;\n }\n }, [connectLineState, onConnect, transform]);\n\n return (\n <path\n className={classNames(\"connect-line\", {\n connecting:\n !!connectLineState &&\n connectLineTo &&\n // Do not show when the distance of mouse move is less than 5px\n (connectLineTo[0] - connectLineState.from[0]) ** 2 +\n (connectLineTo[1] - connectLineState.from[1]) ** 2 >\n 25,\n })}\n d={\n connectLineState && connectLineTo\n ? `M${connectLineState.from.join(\" \")}L${connectLineTo.join(\" \")}`\n : \"\"\n }\n fill=\"none\"\n stroke=\"gray\"\n strokeWidth={1}\n markerEnd={`url(#${markerEnd})`}\n />\n );\n}\n","import { without } from \"lodash\";\nimport type {\n RangeTuple,\n SizeTuple,\n TransformLiteral,\n} from \"../../diagram/interfaces\";\nimport { DEFAULT_NODE_GAP, SYMBOL_FOR_SIZE_INITIALIZED } from \"../constants\";\nimport type {\n Cell,\n InitialCell,\n LayoutType,\n NodeCell,\n NodeId,\n NodeView,\n} from \"../interfaces\";\nimport { isDecoratorCell, isEdgeCell, isNodeCell } from \"./asserts\";\nimport { initializeCells } from \"./initializeCells\";\nimport { transformToCenter } from \"./transformToCenter\";\nimport { forceLayout } from \"../../shared/canvas/forceLayout\";\nimport { dagreLayout } from \"../../shared/canvas/dagreLayout\";\n\nexport function updateCells({\n cells,\n layout,\n previousCells,\n defaultNodeSize,\n canvasWidth,\n canvasHeight,\n scaleRange,\n transform,\n reason,\n parent,\n}: {\n cells: InitialCell[];\n layout?: LayoutType;\n previousCells: Cell[];\n defaultNodeSize: SizeTuple;\n canvasWidth: number;\n canvasHeight: number;\n scaleRange: RangeTuple;\n transform: TransformLiteral;\n reason?: \"add-related-nodes\";\n parent?: NodeId;\n}): {\n cells: Cell[];\n updated: Cell[];\n shouldReCenter: boolean;\n} {\n const isManualLayout = layout !== \"force\" && layout !== \"dagre\";\n const newCells = initializeCells(cells, { defaultNodeSize });\n const updateCandidates: NodeCell[] = [];\n let shouldReCenter = false;\n\n const previousSizeInitializedNodes = new Map<string, NodeCell>();\n let previousShouldCentered = false;\n for (const cell of previousCells) {\n if (isDecoratorCell(cell)) {\n previousShouldCentered = true;\n } else if (isNodeCell(cell)) {\n previousShouldCentered = true;\n if (cell[SYMBOL_FOR_SIZE_INITIALIZED]) {\n previousSizeInitializedNodes.set(cell.id, cell);\n }\n }\n }\n\n const nodesMap = new Map<string, NodeCell>();\n for (const cell of newCells) {\n if (isNodeCell(cell)) {\n nodesMap.set(cell.id, cell);\n const previousNode = previousSizeInitializedNodes.get(cell.id);\n if (previousNode) {\n cell.view.width = previousNode.view.width;\n cell.view.height = previousNode.view.height;\n cell[SYMBOL_FOR_SIZE_INITIALIZED] = true;\n }\n }\n }\n\n let handled = false;\n\n if (reason === \"add-related-nodes\" && parent) {\n // Place these unpositioned downstream nodes below the parent node, and\n // on the right side of the positioned siblings.\n const downstreamNodeIds = new Set<string>();\n for (const cell of newCells) {\n if (\n isEdgeCell(cell) &&\n cell.source === parent &&\n cell.target !== parent\n ) {\n downstreamNodeIds.add(cell.target);\n }\n }\n const parentNode = nodesMap.get(parent);\n if (parentNode?.view.x !== undefined && parentNode.view.y !== undefined) {\n handled = true;\n const downstreamNodes = [...downstreamNodeIds]\n .map((id) => nodesMap.get(id))\n .filter(Boolean) as NodeCell[];\n let rightMostNode: NodeCell | undefined = undefined;\n for (const node of downstreamNodes) {\n if (node.view.x !== undefined && node.view.y !== undefined) {\n // Find the rightmost node that is below the parent node.\n if (\n (!rightMostNode || node.view.x > rightMostNode.view.x) &&\n node.view.y > parentNode.view.y\n ) {\n rightMostNode = node;\n }\n } else {\n // Unpositioned nodes\n updateCandidates.push(node);\n }\n }\n if (updateCandidates.length > 0 && isManualLayout) {\n let nextX: number;\n let nextY: number;\n if (rightMostNode) {\n // Place unpositioned nodes on the right side of the rightmost positioned siblings.\n nextX =\n rightMostNode.view.x + rightMostNode.view.width + DEFAULT_NODE_GAP;\n nextY = rightMostNode.view.y;\n } else {\n // If there are no positioned siblings, just place them below the parent.\n const totalWidth = updateCandidates.reduce(\n (acc, node) => acc + node.view.width + DEFAULT_NODE_GAP,\n -DEFAULT_NODE_GAP\n );\n nextX =\n parentNode.view.x - totalWidth / 2 + parentNode.view.width / 2;\n nextY = parentNode.view.y + parentNode.view.height + DEFAULT_NODE_GAP;\n }\n for (const node of updateCandidates) {\n node.view.x = nextX;\n node.view.y = nextY;\n nextX += node.view.width + DEFAULT_NODE_GAP;\n }\n }\n }\n }\n\n if (!handled) {\n // By default, place unpositioned nodes in a grid.\n let maxWidth = defaultNodeSize[0];\n let maxHeight = defaultNodeSize[1];\n let positionedNodesCount = 0;\n let hasDecorators = false;\n for (const cell of newCells) {\n if (isNodeCell(cell)) {\n if (cell.view.width > maxWidth) {\n maxWidth = cell.view.width;\n }\n if (cell.view.height > maxHeight) {\n maxHeight = cell.view.height;\n }\n if (cell.view.x === undefined || cell.view.y === undefined) {\n updateCandidates.push(cell);\n } else {\n positionedNodesCount++;\n }\n } else if (isDecoratorCell(cell)) {\n hasDecorators = true;\n }\n }\n\n if (isManualLayout) {\n if (!previousShouldCentered) {\n // If the previous cells are not centered, use the centered transform instead.\n transform = transformToCenter(without(newCells, ...updateCandidates), {\n canvasWidth,\n canvasHeight,\n scaleRange,\n });\n }\n\n let getNodeView: (id: NodeId) => NodeView;\n\n // If there is no positioned nodes, or only one while without decorators,\n // then there is no relative positions, we can place the nodes with dagre layout.\n // Otherwise, use the force layout.\n if (\n positionedNodesCount === 0 ||\n (positionedNodesCount === 1 && !hasDecorators)\n ) {\n ({ getNodeView } = dagreLayout({ cells: newCells }));\n shouldReCenter = true;\n } else {\n ({ getNodeView } = forceLayout({\n cells: newCells,\n fixedPosition: true,\n center: [\n (canvasWidth / 2 - transform.x) / transform.k,\n (canvasHeight / 2 - transform.y) / transform.k,\n ],\n }));\n }\n\n for (const cell of newCells) {\n if (isNodeCell(cell)) {\n const view = getNodeView(cell.id);\n cell.view.x = view.x;\n cell.view.y = view.y;\n }\n }\n }\n }\n\n return { cells: newCells, updated: updateCandidates, shouldReCenter };\n}\n","import React, {\n createRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport type { UseSingleBrickConf } from \"@next-core/react-runtime\";\nimport { unwrapProvider } from \"@next-core/utils/general\";\nimport \"@next-core/theme\";\nimport { uniqueId } from \"lodash\";\nimport classNames from \"classnames\";\nimport { select } from \"d3-selection\";\nimport type { lockBodyScroll as _lockBodyScroll } from \"@next-bricks/basic/data-providers/lock-body-scroll/lock-body-scroll\";\nimport type {\n PositionTuple,\n RangeTuple,\n SizeTuple,\n TransformLiteral,\n} from \"../diagram/interfaces\";\nimport type {\n ActiveTarget,\n Cell,\n EdgeCell,\n InitialCell,\n NodeBrickConf,\n NodeCell,\n NodeId,\n DecoratorCell,\n DecoratorType,\n CellContextMenuDetail,\n ConnectLineState,\n Deferred,\n ConnectNodesDetail,\n EdgeLineConf,\n DecoratorTextChangeDetail,\n NodeView,\n LayoutType,\n LayoutOptions,\n} from \"./interfaces\";\nimport { rootReducer } from \"./reducers\";\nimport { MarkerComponent } from \"../diagram/MarkerComponent\";\nimport { isNodeCell } from \"./processors/asserts\";\nimport type { MoveCellPayload, ResizeCellPayload } from \"./reducers/interfaces\";\nimport { sameTarget } from \"./processors/sameTarget\";\nimport { handleKeyboard } from \"./processors/handleKeyboard\";\nimport { CellComponent } from \"./CellComponent\";\nimport { ConnectLineComponent } from \"./ConnectLineComponent\";\nimport { initializeCells } from \"./processors/initializeCells\";\nimport { updateCells } from \"./processors/updateCells\";\nimport { getUnrelatedCells } from \"./processors/getUnrelatedCells\";\nimport {\n DEFAULT_NODE_SIZE,\n DEFAULT_AREA_WIDTH,\n DEFAULT_AREA_HEIGHT,\n} from \"./constants\";\nimport { useZoom } from \"../shared/canvas/useZoom\";\nimport { useActiveTarget } from \"../shared/canvas/useActiveTarget\";\nimport { ZoomBarComponent } from \"../shared/canvas/ZoomBarComponent\";\nimport { useLayout } from \"../shared/canvas/useLayout\";\nimport { useReady } from \"../shared/canvas/useReady\";\nimport { useLineMarkers } from \"../shared/canvas/useLineMarkers\";\nimport styleText from \"../shared/canvas/styles.shadow.css\";\nimport zoomBarStyleText from \"../shared/canvas/ZoomBarComponent.shadow.css\";\n\nconst lockBodyScroll = unwrapProvider<typeof _lockBodyScroll>(\n \"basic.lock-body-scroll\"\n);\n\nconst { defineElement, property, method, event } = createDecorators();\n\nexport interface EoDrawCanvasProps {\n cells: InitialCell[] | undefined;\n layout: LayoutType;\n layoutOptions?: LayoutOptions;\n defaultNodeSize: SizeTuple;\n defaultNodeBricks?: NodeBrickConf[];\n defaultEdgeLines?: EdgeLineConf[];\n activeTarget?: ActiveTarget | null;\n fadeUnrelatedCells?: boolean;\n zoomable?: boolean;\n scrollable?: boolean;\n pannable?: boolean;\n scaleRange?: RangeTuple;\n}\n\nexport interface DropNodeInfo extends AddNodeInfo {\n /** [PointerEvent::clientX, PointerEvent::clientY] */\n position: PositionTuple;\n}\n\nexport interface DropDecoratorInfo {\n decorator: DecoratorType;\n /** [PointerEvent::clientX, PointerEvent::clientY] */\n position: PositionTuple;\n text?: string;\n}\n\nexport interface AddNodeInfo {\n id: NodeId;\n useBrick?: UseSingleBrickConf;\n data?: unknown;\n size?: SizeTuple;\n}\n\nexport interface AddEdgeInfo {\n source: NodeId;\n target: NodeId;\n data?: unknown;\n}\n\nexport interface UpdateCellsContext {\n reason: \"add-related-nodes\";\n parent: NodeId;\n}\n\nexport interface AddNodesContext {\n defaultNodeSize: SizeTuple;\n canvasWidth: number;\n canvasHeight: number;\n}\n\nexport const EoDrawCanvasComponent = React.forwardRef(\n LegacyEoDrawCanvasComponent\n);\n\n/**\n * 用于手工绘图的画布。\n *\n * 注意:将配套另外一个用于展示的画布构件。\n */\nexport\n@defineElement(\"eo-draw-canvas\", {\n styleTexts: [styleText, zoomBarStyleText],\n})\nclass EoDrawCanvas extends ReactNextElement implements EoDrawCanvasProps {\n /**\n * 仅当初始化时使用,渲染后重新设置 `cells` 将无效。\n */\n @property({ attribute: false })\n accessor cells: InitialCell[] | undefined;\n\n @property({ type: String })\n accessor layout: LayoutType;\n\n @property({ attribute: false })\n accessor layoutOptions: LayoutOptions | undefined;\n\n @property({ attribute: false })\n accessor defaultNodeSize: SizeTuple = [DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE];\n\n @property({ attribute: false })\n accessor defaultNodeBricks: NodeBrickConf[] | undefined;\n\n /**\n * 使用条件判断设置默认的边对应的连线。在 `if` 表达式中 `DATA` 为 `{ edge }`,例如:\n *\n * ```yaml\n * defaultEdgeLines:\n * - if: <% DATA.edge.data?.virtual %>\n * dashed: true\n * ```\n */\n @property({ attribute: false })\n accessor defaultEdgeLines: EdgeLineConf[] | undefined;\n\n @property({ attribute: false })\n accessor activeTarget: ActiveTarget | null | undefined;\n\n /**\n * 当 `activeTarget` 不为 `null` 时,隐藏其他跟该 `activeTarget` 无关的元素。\n */\n @property({ type: Boolean })\n accessor fadeUnrelatedCells: boolean | undefined;\n\n @property({ type: Boolean })\n accessor zoomable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor scrollable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor pannable: boolean | undefined = true;\n\n @property({ attribute: false })\n accessor scaleRange: RangeTuple | undefined;\n\n @event({ type: \"activeTarget.change\" })\n accessor #activeTargetChangeEvent!: EventEmitter<ActiveTarget | null>;\n\n #handleActiveTargetChange = (target: ActiveTarget | null) => {\n this.#activeTargetChangeEvent.emit(target);\n };\n\n #handleSwitchActiveTarget = (target: ActiveTarget | null) => {\n if (!sameTarget(target, this.activeTarget)) {\n this.activeTarget = target;\n }\n };\n\n /**\n * @deprecated Use `cell.move` instead.\n */\n @event({ type: \"node.move\" })\n accessor #nodeMoveEvent!: EventEmitter<MoveCellPayload>;\n\n @event({ type: \"cell.move\" })\n accessor #cellMoveEvent!: EventEmitter<MoveCellPayload>;\n\n #handleCellMove = (info: MoveCellPayload) => {\n this.#cellMoveEvent.emit(info);\n if (info.type === \"node\") {\n this.#nodeMoveEvent.emit(info);\n }\n };\n\n @event({ type: \"cell.resize\" })\n accessor #cellResizeEvent!: EventEmitter<ResizeCellPayload>;\n\n #handleCellResize = (info: ResizeCellPayload) => {\n this.#cellResizeEvent.emit(info);\n };\n\n /**\n * @deprecated Use `cell.delete` instead.\n */\n @event({ type: \"node.delete\" })\n accessor #nodeDelete!: EventEmitter<Cell>;\n\n @event({ type: \"cell.delete\" })\n accessor #cellDelete!: EventEmitter<Cell>;\n\n #handleCellDelete = (cell: Cell) => {\n this.#cellDelete.emit(cell);\n if (cell.type === \"node\") {\n this.#nodeDelete.emit(cell);\n }\n };\n\n @event({ type: \"cell.contextmenu\" })\n accessor #cellContextMenu!: EventEmitter<CellContextMenuDetail>;\n\n #handleCellContextMenu = (detail: CellContextMenuDetail) => {\n this.#cellContextMenu.emit(detail);\n };\n\n @event({ type: \"decorator.text.change\" })\n accessor #decoratorTextChange!: EventEmitter<DecoratorTextChangeDetail>;\n\n #handleDecoratorTextChange = (detail: DecoratorTextChangeDetail) => {\n this.#decoratorTextChange.emit(detail);\n };\n\n /**\n * 缩放变化后,从素材库拖拽元素进画布时,拖拽图像应设置对应的缩放比例。\n */\n @event({ type: \"scale.change\" })\n accessor #scaleChange!: EventEmitter<number>;\n\n #handleScaleChange = (scale: number) => {\n this.#scaleChange.emit(scale);\n };\n\n @method()\n async dropNode({\n id,\n position,\n size,\n data,\n useBrick,\n }: DropNodeInfo): Promise<NodeCell | null> {\n // Drag and then drop a node\n const droppedInside = document\n .elementsFromPoint?.(position[0], position[1])\n ?.includes(this);\n if (droppedInside) {\n const boundingClientRect = this.getBoundingClientRect();\n const transform = this.#canvasRef.current!.getTransform();\n const newNode = {\n type: \"node\",\n id,\n view: {\n ...(this.layout === \"force\" || this.layout === \"dagre\"\n ? null\n : {\n x:\n (position[0] - boundingClientRect.left - transform.x) /\n transform.k,\n y:\n (position[1] - boundingClientRect.top - transform.y) /\n transform.k,\n }),\n width: size?.[0] ?? this.defaultNodeSize[0],\n height: size?.[1] ?? this.defaultNodeSize[0],\n },\n data,\n useBrick,\n } as NodeCell;\n this.#canvasRef.current?.dropNode(newNode);\n return newNode;\n }\n return null;\n }\n\n @method()\n async dropDecorator({\n position,\n decorator,\n text,\n }: DropDecoratorInfo): Promise<DecoratorCell | null> {\n // Drag and then drop a node\n const droppedInside = document\n .elementsFromPoint?.(position[0], position[1])\n ?.includes(this);\n if (droppedInside) {\n const boundingClientRect = this.getBoundingClientRect();\n const transform = this.#canvasRef.current!.getTransform();\n const newDecorator: DecoratorCell = {\n type: \"decorator\",\n decorator,\n id: uuidV4(),\n view: {\n x:\n (position[0] - boundingClientRect.left - transform.x) / transform.k,\n y: (position[1] - boundingClientRect.top - transform.y) / transform.k,\n width: DEFAULT_AREA_WIDTH,\n height: DEFAULT_AREA_HEIGHT,\n text,\n },\n };\n this.#canvasRef.current?.dropDecorator(newDecorator);\n return newDecorator;\n }\n return null;\n }\n\n @method()\n async addNodes(nodes: AddNodeInfo[]): Promise<NodeCell[]> {\n if (nodes.length === 0) {\n return [];\n }\n const newNodes = nodes.map<NodeCell>(({ size, useBrick, id, data }) => ({\n type: \"node\",\n id,\n data,\n view: {\n width: size?.[0] ?? this.defaultNodeSize[0],\n height: size?.[1] ?? this.defaultNodeSize[0],\n } as NodeView,\n useBrick,\n }));\n return this.#canvasRef.current!.addNodes(newNodes, {\n defaultNodeSize: this.defaultNodeSize,\n canvasWidth: this.clientWidth,\n canvasHeight: this.clientHeight,\n });\n }\n\n @method()\n async addEdge({ source, target, data }: AddEdgeInfo): Promise<EdgeCell> {\n const newEdge: EdgeCell = {\n type: \"edge\",\n source,\n target,\n data,\n };\n this.#canvasRef.current?.addEdge(newEdge);\n return newEdge;\n }\n\n @method()\n manuallyConnectNodes(source: NodeId): Promise<ConnectNodesDetail> {\n return this.#canvasRef.current!.manuallyConnectNodes(source);\n }\n\n @method()\n async updateCells(\n cells: InitialCell[],\n ctx?: UpdateCellsContext\n ): Promise<{ updated: Cell[] }> {\n const { updated } = this.#canvasRef.current!.updateCells(cells, {\n ...ctx,\n defaultNodeSize: this.defaultNodeSize,\n canvasWidth: this.clientWidth,\n canvasHeight: this.clientHeight,\n });\n return { updated };\n }\n\n #canvasRef = createRef<DrawCanvasRef>();\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n lockBodyScroll(this, false);\n }\n\n render() {\n return (\n <EoDrawCanvasComponent\n host={this}\n ref={this.#canvasRef}\n layout={this.layout}\n layoutOptions={this.layoutOptions}\n cells={this.cells}\n defaultNodeSize={this.defaultNodeSize}\n defaultNodeBricks={this.defaultNodeBricks}\n defaultEdgeLines={this.defaultEdgeLines}\n activeTarget={this.activeTarget}\n fadeUnrelatedCells={this.fadeUnrelatedCells}\n zoomable={this.zoomable}\n scrollable={this.scrollable}\n pannable={this.pannable}\n scaleRange={this.scaleRange}\n onActiveTargetChange={this.#handleActiveTargetChange}\n onSwitchActiveTarget={this.#handleSwitchActiveTarget}\n onCellMove={this.#handleCellMove}\n onCellResize={this.#handleCellResize}\n onCellDelete={this.#handleCellDelete}\n onCellContextMenu={this.#handleCellContextMenu}\n onDecoratorTextChange={this.#handleDecoratorTextChange}\n onScaleChange={this.#handleScaleChange}\n />\n );\n }\n}\n\nexport interface EoDrawCanvasComponentProps extends EoDrawCanvasProps {\n host: HTMLElement;\n onActiveTargetChange(target: ActiveTarget | null): void;\n onSwitchActiveTarget(target: ActiveTarget | null): void;\n onCellMove(info: MoveCellPayload): void;\n onCellResize(cell: ResizeCellPayload): void;\n onCellDelete(cell: Cell): void;\n onCellContextMenu(detail: CellContextMenuDetail): void;\n onDecoratorTextChange(detail: DecoratorTextChangeDetail): void;\n onScaleChange(scale: number): void;\n}\n\nexport interface DrawCanvasRef {\n dropNode(node: NodeCell): void;\n dropDecorator(decorator: DecoratorCell): void;\n addNodes(nodes: NodeCell[], ctx: AddNodesContext): NodeCell[];\n addEdge(edge: EdgeCell): void;\n manuallyConnectNodes(source: NodeId): Promise<ConnectNodesDetail>;\n updateCells(\n cells: InitialCell[],\n ctx: Partial<UpdateCellsContext> & {\n defaultNodeSize: SizeTuple;\n canvasWidth: number;\n canvasHeight: number;\n }\n ): {\n cells: Cell[];\n updated: Cell[];\n };\n getTransform(): TransformLiteral;\n}\n\nfunction LegacyEoDrawCanvasComponent(\n {\n host,\n layout,\n layoutOptions,\n cells: initialCells,\n defaultNodeSize,\n defaultNodeBricks,\n defaultEdgeLines,\n activeTarget: _activeTarget,\n fadeUnrelatedCells,\n zoomable,\n scrollable,\n pannable,\n scaleRange: _scaleRange,\n onActiveTargetChange,\n onSwitchActiveTarget,\n onCellMove,\n onCellResize,\n onCellDelete,\n onCellContextMenu,\n onDecoratorTextChange,\n onScaleChange,\n }: EoDrawCanvasComponentProps,\n ref: React.Ref<DrawCanvasRef>\n) {\n const [{ cells }, dispatch] = useReducer(\n rootReducer,\n initialCells,\n (initialCells) => ({\n cells: initializeCells(initialCells, { defaultNodeSize }),\n })\n );\n\n const rootRef = useRef<SVGSVGElement>(null);\n const cellsRef = useRef<SVGGElement>(null);\n const manualConnectDeferredRef = useRef<Deferred<ConnectNodesDetail> | null>(\n null\n );\n const [editingTexts, setEditingTexts] = useState<string[]>([]);\n const { grabbing, transform, zoomer, scaleRange } = useZoom({\n rootRef,\n zoomable,\n scrollable,\n pannable,\n scaleRange: _scaleRange,\n onSwitchActiveTarget,\n });\n\n useEffect(() => {\n onScaleChange(transform.k);\n }, [onScaleChange, transform.k]);\n\n const [connectLineState, setConnectLineState] =\n useState<ConnectLineState | null>(null);\n\n const { centered, setCentered } = useLayout({\n layout,\n layoutOptions,\n rootRef,\n cells,\n zoomable,\n zoomer,\n scaleRange,\n dispatch,\n });\n\n useImperativeHandle(\n ref,\n () => ({\n dropNode(node) {\n // Do not apply auto centering when dropping a node.\n setCentered(true);\n dispatch({ type: \"drop-node\", payload: node });\n },\n dropDecorator(decorator) {\n // Do not apply auto centering when dropping a decorator.\n setCentered(true);\n dispatch({ type: \"drop-decorator\", payload: decorator });\n },\n addNodes(\n nodes,\n { defaultNodeSize, canvasWidth, canvasHeight }: AddNodesContext\n ) {\n const index =\n cells.findLastIndex(\n (cell) => !(cell.type === \"decorator\" && cell.decorator === \"text\")\n ) + 1;\n const newCells = [\n ...cells.slice(0, index),\n ...nodes,\n ...cells.slice(index),\n ];\n const {\n cells: allCells,\n updated,\n shouldReCenter,\n } = updateCells({\n cells: newCells,\n layout,\n previousCells: cells,\n defaultNodeSize,\n canvasWidth,\n canvasHeight,\n scaleRange,\n transform,\n });\n if (shouldReCenter) {\n setCentered(false);\n }\n dispatch({ type: \"update-cells\", payload: allCells });\n return updated.filter((node) =>\n nodes.includes(node as NodeCell)\n ) as NodeCell[];\n },\n addEdge(edge) {\n dispatch({ type: \"add-edge\", payload: edge });\n },\n updateCells(newCells, ctx) {\n const { shouldReCenter, ...result } = updateCells({\n ...ctx,\n layout,\n previousCells: cells,\n cells: newCells,\n scaleRange,\n transform,\n });\n if (shouldReCenter) {\n setCentered(false);\n }\n dispatch({ type: \"update-cells\", payload: result.cells });\n return result;\n },\n getTransform() {\n return transform;\n },\n manuallyConnectNodes(sourceId) {\n const source = cells.find(\n (cell) => isNodeCell(cell) && cell.id === sourceId\n ) as NodeCell | undefined;\n if (source) {\n const rect = rootRef.current!.getBoundingClientRect();\n setConnectLineState({\n source,\n from: [\n source.view.x + source.view.width / 2,\n source.view.y + source.view.height / 2,\n ],\n offset: [rect.left, rect.top],\n });\n const promise = new Promise<ConnectNodesDetail>((resolve, reject) => {\n manualConnectDeferredRef.current = { resolve, reject };\n });\n return promise;\n }\n return Promise.reject(null);\n },\n }),\n [cells, layout, scaleRange, setCentered, transform]\n );\n\n const handleConnect = useCallback(\n (state: ConnectLineState, to: PositionTuple) => {\n // Find the target node from top bo bottom,\n // detect whether the pointer is inside the target node.\n for (let i = 0; i < cells.length; i++) {\n const cell = cells[i];\n // Currently ignore connecting to self\n if (isNodeCell(cell) && cell.id !== state.source.id) {\n if (\n cell.view.x < to[0] &&\n cell.view.x + cell.view.width > to[0] &&\n cell.view.y < to[1] &&\n cell.view.y + cell.view.height > to[1]\n ) {\n manualConnectDeferredRef.current?.resolve({\n source: state.source,\n target: cell,\n });\n break;\n }\n }\n }\n manualConnectDeferredRef.current?.reject(null);\n setConnectLineState(null);\n },\n [cells]\n );\n\n useEffect(() => {\n lockBodyScroll(host, !!connectLineState);\n }, [connectLineState, host]);\n\n const activeTarget = useActiveTarget({\n cellsRef,\n activeTarget: _activeTarget,\n onActiveTargetChange,\n });\n\n const [unrelatedCells, setUnrelatedCells] = useState<Cell[]>([]);\n useEffect(() => {\n const nextUnrelated = fadeUnrelatedCells\n ? getUnrelatedCells(cells, connectLineState, activeTarget)\n : [];\n // Do not update the state when prev and next are both empty.\n setUnrelatedCells((prev) =>\n prev.length === 0 && nextUnrelated.length === 0 ? prev : nextUnrelated\n );\n }, [activeTarget, cells, connectLineState, fadeUnrelatedCells]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root || editingTexts.length > 0) {\n return;\n }\n const onKeydown = (event: KeyboardEvent) => {\n const action = handleKeyboard(event, {\n cells,\n activeTarget,\n });\n\n if (action?.action === \"delete-cell\") {\n onCellDelete(action.cell);\n }\n };\n root.addEventListener(\"keydown\", onKeydown);\n return () => {\n root.removeEventListener(\"keydown\", onKeydown);\n };\n }, [activeTarget, cells, editingTexts.length, onCellDelete]);\n\n const defPrefix = useMemo(() => `${uniqueId(\"diagram-\")}-`, []);\n const markerPrefix = `${defPrefix}line-arrow-`;\n\n const handleCellMoving = useCallback((info: MoveCellPayload) => {\n dispatch({ type: \"move-cell\", payload: info });\n }, []);\n\n const handleCellMoved = useCallback(\n (info: MoveCellPayload) => {\n dispatch({ type: \"move-cell\", payload: info });\n onCellMove(info);\n },\n [onCellMove]\n );\n\n const handleCellResizing = useCallback((info: ResizeCellPayload) => {\n dispatch({ type: \"resize-cell\", payload: info });\n }, []);\n\n const handleCellResized = useCallback(\n (info: ResizeCellPayload) => {\n dispatch({ type: \"resize-cell\", payload: info });\n onCellResize(info);\n },\n [onCellResize]\n );\n\n const handleDecoratorTextEditing = useCallback(\n ({ id, editing }: { id: string; editing: boolean }) => {\n if (editing) {\n setEditingTexts((texts) =>\n texts.includes(id) ? texts : [...texts, id]\n );\n } else {\n setEditingTexts((texts) => texts.filter((text) => text !== id));\n }\n },\n []\n );\n\n const handleNodeBrickResize = useCallback(\n (id: string, size: SizeTuple | null) => {\n dispatch({ type: \"update-node-size\", payload: { id, size } });\n },\n []\n );\n\n const handleZoomSlide = useCallback(\n (value: number) => {\n // istanbul ignore next\n if (process.env.NODE_ENV !== \"test\") {\n zoomer.scaleTo(select(rootRef.current!), value / 100);\n }\n },\n [zoomer]\n );\n\n const reCenter = useCallback(() => {\n setCentered(false);\n }, [setCentered]);\n const [lineConfMap, markers] = useLineMarkers({\n cells,\n defaultEdgeLines,\n markerPrefix,\n });\n\n const ready = useReady({ cells, layout, centered });\n\n return (\n <>\n <svg\n width=\"100%\"\n height=\"100%\"\n ref={rootRef}\n className={classNames(\"root\", { grabbing, pannable, ready })}\n tabIndex={-1}\n >\n <defs>\n {markers.map((marker, index) => (\n <MarkerComponent\n key={index}\n id={`${markerPrefix}${index}`}\n type=\"arrow\"\n strokeColor={marker.strokeColor}\n />\n ))}\n </defs>\n <g\n transform={`translate(${transform.x} ${transform.y}) scale(${transform.k})`}\n >\n <g className=\"cells\" ref={cellsRef}>\n {cells.map((cell) => (\n <CellComponent\n key={`${cell.type}:${cell.type === \"edge\" ? `${cell.source}~${cell.target}` : cell.id}`}\n layout={layout}\n cell={cell}\n cells={cells}\n defaultNodeBricks={defaultNodeBricks}\n transform={transform}\n lineConfMap={lineConfMap}\n active={sameTarget(activeTarget, cell)}\n unrelatedCells={unrelatedCells}\n onCellMoving={handleCellMoving}\n onCellMoved={handleCellMoved}\n onCellResizing={handleCellResizing}\n onCellResized={handleCellResized}\n onSwitchActiveTarget={onSwitchActiveTarget}\n onCellContextMenu={onCellContextMenu}\n onDecoratorTextChange={onDecoratorTextChange}\n onDecoratorTextEditing={handleDecoratorTextEditing}\n onNodeBrickResize={handleNodeBrickResize}\n />\n ))}\n </g>\n <ConnectLineComponent\n connectLineState={connectLineState}\n transform={transform}\n markerEnd={`${markerPrefix}0`}\n onConnect={handleConnect}\n />\n </g>\n </svg>\n <ZoomBarComponent\n shadowRoot={host.shadowRoot!}\n scale={transform.k}\n scaleRange={scaleRange}\n onZoomChange={handleZoomSlide}\n onReCenter={reCenter}\n />\n </>\n );\n}\n\nfunction uuidV4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n","import type { ActiveTarget, Cell } from \"../interfaces\";\nimport { sameTarget } from \"./sameTarget\";\n\nexport type KeyboardAction = KeyboardActionDeleteCell;\n\nexport interface KeyboardActionDeleteCell {\n action: \"delete-cell\";\n cell: Cell;\n}\n\nexport function handleKeyboard(\n event: KeyboardEvent,\n {\n cells,\n activeTarget,\n }: {\n cells: Cell[];\n activeTarget: ActiveTarget | null | undefined;\n }\n): KeyboardAction | undefined {\n const activeCell = cells.find((cell) => sameTarget(cell, activeTarget));\n\n if (!activeCell) {\n return;\n }\n\n const key =\n event.key ||\n /* istanbul ignore next: compatibility */ event.keyCode ||\n /* istanbul ignore next: compatibility */ event.which;\n\n switch (key) {\n case \"Backspace\":\n case 8:\n case \"Delete\":\n case 46: {\n event.preventDefault();\n event.stopPropagation();\n return {\n action: \"delete-cell\",\n cell: activeCell,\n };\n }\n }\n}\n","// istanbul ignore file: experimental only\nimport React, { useCallback } from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport type { PositionTuple } from \"../diagram/interfaces\";\nimport styleText from \"./styles.shadow.css\";\nimport type { DecoratorType } from \"../draw-canvas/interfaces\";\n\nconst { defineElement, property, event } = createDecorators();\n\ntype ExperimentalUsage = \"library\" | \"dragging\" | \"default\";\ntype NodeStatus = \"highlighted\" | \"faded\" | \"default\";\n\nexport interface ExperimentalNodeProps {\n usage?: ExperimentalUsage;\n status?: NodeStatus;\n}\n\n/**\n * 构件 `diagram.experimental-node`\n */\nexport\n@defineElement(\"diagram.experimental-node\", {\n styleTexts: [styleText],\n})\nclass ExperimentalNode\n extends ReactNextElement\n implements ExperimentalNodeProps\n{\n @property()\n accessor usage: ExperimentalUsage | undefined;\n\n // 最终节点应该统一实现这个字段,保持类型一致\n @property({ type: String, render: false })\n accessor status: NodeStatus | undefined;\n\n // 最终节点应该统一实现这个字段,保持类型一致\n @property({ type: String })\n accessor decorator: DecoratorType | undefined;\n\n @event({ type: \"drag.start\" })\n accessor #dragStartEvent!: EventEmitter<PositionTuple>;\n\n #handleDragStart = (position: PositionTuple) => {\n this.#dragStartEvent.emit(position);\n };\n\n @event({ type: \"drag.move\" })\n accessor #dragMoveEvent!: EventEmitter<PositionTuple>;\n\n #handleDragMove = (position: PositionTuple) => {\n this.#dragMoveEvent.emit(position);\n };\n\n @event({ type: \"drag.end\" })\n accessor #dragEndEvent!: EventEmitter<PositionTuple>;\n\n #handleDragEnd = (position: PositionTuple) => {\n this.#dragEndEvent.emit(position);\n };\n\n render() {\n return (\n <ExperimentalNodeComponent\n usage={this.usage}\n onDragStart={this.#handleDragStart}\n onDragMove={this.#handleDragMove}\n onDragEnd={this.#handleDragEnd}\n />\n );\n }\n}\n\nexport interface ExperimentalNodeComponentProps extends ExperimentalNodeProps {\n onDragStart?(position: PositionTuple): void;\n onDragMove?(position: PositionTuple): void;\n onDragEnd?(position: PositionTuple): void;\n}\n\nexport function ExperimentalNodeComponent({\n usage,\n onDragStart,\n onDragMove,\n onDragEnd,\n}: ExperimentalNodeComponentProps) {\n const handleMouseDown = useCallback(\n (event: React.MouseEvent) => {\n if (usage !== \"library\") {\n return;\n }\n event.stopPropagation();\n event.preventDefault();\n const from: PositionTuple = [event.clientX, event.clientY];\n let moved = false;\n const onMouseMove = (e: MouseEvent) => {\n if (!moved) {\n moved = (e.clientX - from[0]) ** 2 + (e.clientY - from[1]) ** 2 >= 9;\n if (moved) {\n onDragStart?.([e.clientX, e.clientY]);\n }\n }\n if (moved) {\n onDragMove?.([e.clientX, e.clientY]);\n }\n };\n const onMouseUp = (e: MouseEvent) => {\n document.removeEventListener(\"mousemove\", onMouseMove);\n document.removeEventListener(\"mouseup\", onMouseUp);\n if (moved) {\n onDragEnd?.([e.clientX, e.clientY]);\n }\n };\n document.addEventListener(\"mousemove\", onMouseMove);\n document.addEventListener(\"mouseup\", onMouseUp);\n },\n [onDragEnd, onDragMove, onDragStart, usage]\n );\n\n return (\n <div onMouseDown={handleMouseDown}>\n <slot />\n </div>\n );\n}\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport { uniqueId } from \"lodash\";\nimport classNames from \"classnames\";\nimport { select } from \"d3-selection\";\nimport type { RangeTuple, SizeTuple } from \"../diagram/interfaces\";\nimport type {\n ActiveTarget,\n InitialCell,\n NodeBrickConf,\n CellContextMenuDetail,\n EdgeLineConf,\n Cell,\n LayoutType,\n LayoutOptions,\n} from \"../draw-canvas/interfaces\";\nimport { MarkerComponent } from \"../diagram/MarkerComponent\";\nimport { sameTarget } from \"../draw-canvas/processors/sameTarget\";\nimport { CellComponent } from \"../draw-canvas/CellComponent\";\nimport { initializeCells } from \"../draw-canvas/processors/initializeCells\";\nimport { DEFAULT_NODE_SIZE } from \"../draw-canvas/constants\";\nimport { useZoom } from \"../shared/canvas/useZoom\";\nimport { useActiveTarget } from \"../shared/canvas/useActiveTarget\";\nimport { rootReducer } from \"../draw-canvas/reducers\";\nimport { getUnrelatedCells } from \"../draw-canvas/processors/getUnrelatedCells\";\nimport { isEdgeCell, isNodeCell } from \"../draw-canvas/processors/asserts\";\nimport { ZoomBarComponent } from \"../shared/canvas/ZoomBarComponent\";\nimport { useLayout } from \"../shared/canvas/useLayout\";\nimport { useReady } from \"../shared/canvas/useReady\";\nimport { useLineMarkers } from \"../shared/canvas/useLineMarkers\";\nimport styleText from \"../shared/canvas/styles.shadow.css\";\nimport zoomBarStyleText from \"../shared/canvas/ZoomBarComponent.shadow.css\";\n\nconst { defineElement, property, event } = createDecorators();\n\nexport interface EoDisplayCanvasProps {\n cells: InitialCell[] | undefined;\n layout: LayoutType;\n layoutOptions?: LayoutOptions;\n defaultNodeSize: SizeTuple;\n defaultNodeBricks?: NodeBrickConf[];\n defaultEdgeLines?: EdgeLineConf[];\n activeTarget?: ActiveTarget | null;\n fadeUnrelatedCells?: boolean;\n zoomable?: boolean;\n scrollable?: boolean;\n pannable?: boolean;\n scaleRange?: RangeTuple;\n}\n\n/**\n * 用于展示查看的画布。\n */\nexport\n@defineElement(\"eo-display-canvas\", {\n styleTexts: [styleText, zoomBarStyleText],\n})\nclass EoDisplayCanvas extends ReactNextElement implements EoDisplayCanvasProps {\n /**\n * 仅当初始化时使用,渲染后重新设置 `cells` 将无效。\n */\n @property({ attribute: false })\n accessor cells: InitialCell[] | undefined;\n\n @property({ type: String })\n accessor layout: LayoutType;\n\n @property({ attribute: false })\n accessor layoutOptions: LayoutOptions | undefined;\n\n @property({ attribute: false })\n accessor defaultNodeSize: SizeTuple = [DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE];\n\n @property({ attribute: false })\n accessor defaultNodeBricks: NodeBrickConf[] | undefined;\n\n /**\n * 使用条件判断设置默认的边对应的连线。在 `if` 表达式中 `DATA` 为 `{ edge }`,例如:\n *\n * ```yaml\n * defaultEdgeLines:\n * - if: <% DATA.edge.data?.virtual %>\n * dashed: true\n * ```\n */\n @property({ attribute: false })\n accessor defaultEdgeLines: EdgeLineConf[] | undefined;\n\n @property({ attribute: false })\n accessor activeTarget: ActiveTarget | null | undefined;\n\n /**\n * 当鼠标悬浮到某节点上时,隐藏其他跟该节点无关的元素。\n */\n @property({ type: Boolean })\n accessor fadeUnrelatedCells: boolean | undefined;\n\n @property({ type: Boolean })\n accessor zoomable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor scrollable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor pannable: boolean | undefined = true;\n\n @property({ attribute: false })\n accessor scaleRange: RangeTuple | undefined;\n\n @event({ type: \"activeTarget.change\" })\n accessor #activeTargetChangeEvent!: EventEmitter<ActiveTarget | null>;\n\n #handleActiveTargetChange = (target: ActiveTarget | null) => {\n this.#activeTargetChangeEvent.emit(target);\n };\n\n #handleSwitchActiveTarget = (target: ActiveTarget | null) => {\n if (!sameTarget(target, this.activeTarget)) {\n this.activeTarget = target;\n }\n };\n\n @event({ type: \"cell.contextmenu\" })\n accessor #cellContextMenu!: EventEmitter<CellContextMenuDetail>;\n\n #handleCellContextMenu = (detail: CellContextMenuDetail) => {\n this.#cellContextMenu.emit(detail);\n };\n\n render() {\n return (\n <EoDisplayCanvasComponent\n shadowRoot={this.shadowRoot!}\n cells={this.cells}\n layout={this.layout}\n layoutOptions={this.layoutOptions}\n defaultNodeSize={this.defaultNodeSize}\n defaultNodeBricks={this.defaultNodeBricks}\n defaultEdgeLines={this.defaultEdgeLines}\n activeTarget={this.activeTarget}\n fadeUnrelatedCells={this.fadeUnrelatedCells}\n zoomable={this.zoomable}\n scrollable={this.scrollable}\n pannable={this.pannable}\n scaleRange={this.scaleRange}\n onActiveTargetChange={this.#handleActiveTargetChange}\n onSwitchActiveTarget={this.#handleSwitchActiveTarget}\n onCellContextMenu={this.#handleCellContextMenu}\n />\n );\n }\n}\n\nexport interface EoDisplayCanvasComponentProps extends EoDisplayCanvasProps {\n shadowRoot: ShadowRoot;\n onActiveTargetChange(target: ActiveTarget | null): void;\n onSwitchActiveTarget(target: ActiveTarget | null): void;\n onCellContextMenu(detail: CellContextMenuDetail): void;\n}\n\nfunction EoDisplayCanvasComponent({\n shadowRoot,\n cells: initialCells,\n layout,\n layoutOptions,\n defaultNodeSize,\n defaultNodeBricks,\n defaultEdgeLines,\n activeTarget: _activeTarget,\n fadeUnrelatedCells,\n zoomable,\n scrollable,\n pannable,\n scaleRange: _scaleRange,\n onActiveTargetChange,\n onSwitchActiveTarget,\n onCellContextMenu,\n}: EoDisplayCanvasComponentProps) {\n const [{ cells }, dispatch] = useReducer(\n rootReducer,\n initialCells,\n (initialCells) => ({\n cells: initializeCells(initialCells, { defaultNodeSize }),\n })\n );\n\n const rootRef = useRef<SVGSVGElement>(null);\n const cellsRef = useRef<SVGGElement>(null);\n\n const { grabbing, transform, zoomer, scaleRange } = useZoom({\n rootRef,\n zoomable,\n scrollable,\n pannable,\n scaleRange: _scaleRange,\n onSwitchActiveTarget,\n });\n\n const { centered, setCentered } = useLayout({\n layout,\n layoutOptions,\n rootRef,\n cells,\n zoomable,\n zoomer,\n scaleRange,\n dispatch,\n });\n\n const activeTarget = useActiveTarget({\n cellsRef,\n activeTarget: _activeTarget,\n onActiveTargetChange,\n });\n\n const defPrefix = useMemo(() => `${uniqueId(\"diagram-\")}-`, []);\n const markerPrefix = `${defPrefix}line-arrow-`;\n\n const handleNodeBrickResize = useCallback(\n (id: string, size: SizeTuple | null) => {\n dispatch({ type: \"update-node-size\", payload: { id, size } });\n },\n []\n );\n\n const [hoverCell, setHoverCell] = useState<Cell | null>(null);\n const handleCellMouseEnter = useCallback((cell: Cell) => {\n setHoverCell(cell);\n }, []);\n const handleCellMouseLeave = useCallback((cell: Cell) => {\n setHoverCell((prev) => (prev === cell ? null : prev));\n }, []);\n\n const [unrelatedCells, setUnrelatedCells] = useState<Cell[]>([]);\n useEffect(() => {\n const nextUnrelated = fadeUnrelatedCells\n ? getUnrelatedCells(cells, null, hoverCell)\n : [];\n // Do not update the state when prev and next are both empty.\n setUnrelatedCells((prev) =>\n prev.length === 0 && nextUnrelated.length === 0 ? prev : nextUnrelated\n );\n }, [cells, fadeUnrelatedCells, hoverCell]);\n\n const handleZoomSlide = useCallback(\n (value: number) => {\n // istanbul ignore next\n if (process.env.NODE_ENV !== \"test\") {\n zoomer.scaleTo(select(rootRef.current!), value / 100);\n }\n },\n [zoomer]\n );\n\n const reCenter = useCallback(() => {\n setCentered(false);\n }, [setCentered]);\n\n const [lineConfMap, markers] = useLineMarkers({\n cells,\n defaultEdgeLines,\n markerPrefix,\n });\n\n const ready = useReady({ cells, layout, centered });\n\n return (\n <>\n <svg\n width=\"100%\"\n height=\"100%\"\n ref={rootRef}\n className={classNames(\"root\", { grabbing, pannable, ready })}\n tabIndex={-1}\n >\n <defs>\n {markers.map((marker, index) => (\n <MarkerComponent\n key={index}\n id={`${markerPrefix}${index}`}\n type=\"arrow\"\n strokeColor={marker.strokeColor}\n />\n ))}\n </defs>\n <g\n transform={`translate(${transform.x} ${transform.y}) scale(${transform.k})`}\n >\n <g className=\"cells\" ref={cellsRef}>\n {cells.map((cell) => (\n <CellComponent\n key={`${cell.type}:${isEdgeCell(cell) ? `${cell.source}~${cell.target}` : cell.id}`}\n layout={undefined}\n cell={cell}\n cells={cells}\n defaultNodeBricks={defaultNodeBricks}\n lineConfMap={lineConfMap}\n transform={transform}\n active={sameTarget(activeTarget, cell)}\n readOnly\n unrelatedCells={unrelatedCells}\n onSwitchActiveTarget={onSwitchActiveTarget}\n onCellContextMenu={onCellContextMenu}\n onNodeBrickResize={handleNodeBrickResize}\n onCellMouseEnter={\n fadeUnrelatedCells && isNodeCell(cell)\n ? handleCellMouseEnter\n : undefined\n }\n onCellMouseLeave={\n fadeUnrelatedCells && isNodeCell(cell)\n ? handleCellMouseLeave\n : undefined\n }\n />\n ))}\n </g>\n </g>\n </svg>\n <ZoomBarComponent\n shadowRoot={shadowRoot}\n scale={transform.k}\n scaleRange={scaleRange}\n onZoomChange={handleZoomSlide}\n onReCenter={reCenter}\n />\n </>\n );\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block;--local-label-line-height:inherit;--local-label-font-size:inherit;--local-label-color:inherit;--local-label-font-weight:inherit}:host([hidden]){display:none}:host([type=\"line\"]){--local-label-line-height:18px;--local-label-font-size:11px;--local-label-color:var(--color-secondary-text);--local-label-font-weight:400}*{box-sizing:border-box}.label{max-width:168px;margin:-3px}.label-text,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:var(--local-label-line-height);font-size:var(--local-label-font-size);color:var(--local-label-color);font-weight:var(--local-label-font-weight);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;-moz-user-select:text;user-select:text}.label-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label.editing .label-text,\n.label.empty:not(.editing) .label-text,\n.label:not(.editing) .label-input{display:none}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `*{box-sizing:border-box}:host{display:block;border:1px solid var(--palette-gray-5);cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([hidden]){display:none}:host([usage=\"dragging\"]){opacity:0.75;position:fixed}:host(:not([usage=\"library\"])){background:var(--palette-gray-3);width:60px;height:60px}:host([usage=\"library\"]){width:180px;height:30px;margin-bottom:10px}div{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host(:not([usage=\"dragging\"]):not([usage=\"library\"]):hover),\n:host([status=\"highlighted\"]){color:var(--palette-blue-5);background:var(--palette-blue-1);border-color:1px solid var(--palette-blue-4)}:host([status=\"faded\"]){opacity:0.3}:host([decorator=\"area\"]){width:100px;height:60px;background:rgba(119,141,195,0.1);border:none}:host([decorator=\"text\"]){width:auto;height:auto;background:none;border:none}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["_EoDiagram","defineElement","property","event","method","createDecorators","EoDiagramComponent","forwardRef","LegacyEoDiagramComponent","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_EoDiagram_brand","WeakSet","_handleActiveTargetChange","_P","_handleNodeDelete","_Q","_handleEdgeDelete","_R","_handleLineClick","_S","_handleLineDoubleClick","_T","_handleNodesConnect","_handleSwitchActiveTarget","_diagramRef","EoDiagram","ReactNextElement","constructor","arguments","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_initProto","_init_layout","_init_extra_layout","_init_nodes","_init_extra_nodes","_init_edges","_init_extra_edges","_init_nodeBricks","_init_extra_nodeBricks","_init_lines","_init_extra_lines","_init_layoutOptions","_init_extra_layoutOptions","_init_activeTarget","_init_extra_activeTarget","_init_disableKeyboardAction","_init_extra_disableKeyboardAction","_init_connectNodes","_init_extra_connectNodes","_init_dragNodes","_init_extra_dragNodes","_init_zoomable","_init_extra_zoomable","_init_scrollable","_init_extra_scrollable","_init_pannable","_init_extra_pannable","_init_scaleRange","_init_extra_scaleRange","_init_activeTargetChangeEvent","_init_extra_activeTargetChangeEvent","target","_classPrivateGetter","this","_get_activeTargetChangeEvent","emit","_init_nodeDelete","_init_extra_nodeDelete","node","_get_nodeDelete","_init_edgeDelete","_init_extra_edgeDelete","edge","_get_edgeDelete","_init_lineClick","_init_extra_lineClick","line","_get_lineClick","_init_lineDoubleClick","_init_extra_lineDoubleClick","_get_lineDoubleClick","_init_connectNodes2","_init_extra_connectNodes2","detail","_get_connectNodes","sameTarget","activeTarget","createRef","layout","_classPrivateFieldGet","v","_classPrivateFieldSet","nodes","edges","nodeBricks","lines","layoutOptions","disableKeyboardAction","connectNodes","dragNodes","zoomable","scrollable","pannable","scaleRange","callOnLineLabel","id","_classPrivateFieldGet2","_len","length","args","Array","_key","current","render","React","ref","onActiveTargetChange","onSwitchActiveTarget","onNodeDelete","onEdgeDelete","onLineClick","onLineDoubleClick","onNodesConnect","_ref","_activeTarget","_scaleRange","nodesReady","setNodesReady","useState","nodesRenderId","setNodesRenderId","nodesRefRepository","setNodesRefRepository","lineLabelsReady","setLineLabelsReady","lineLabelsRenderId","setLineLabelsRenderId","lineLabelsRefRepository","setLineLabelsRefRepository","renderedLineLabels","setRenderedLineLabels","grabbing","setGrabbing","transform","setTransform","k","x","y","linePathsRef","useRef","Map","rootRef","nodesRef","centered","setCentered","userViewReady","userViewNodesMap","saveUserView","useUserView","save","connectLineTo","setConnectLineTo","connectLineState","setConnectLineState","manualLayoutStatus","setManualLayoutStatus","nodeMovement","setNodeMovement","useImperativeHandle","_lineLabelsRefReposit","_len2","_key2","get","firstElementChild","useEffect","onNodesMouseDown","handleNodesMouseDown","scale","nodesContainer","addEventListener","removeEventListener","normalizedLines","normalizedLinesMap","markers","useMemo","normalizeLinesAndMarkers","lineLabels","flatMap","_ref2","key","list","text","label","$id","concat","map","item","_item$placement","placement","renderedNodes","renderedEdges","useRenderedDiagram","renderedLines","getRenderedLines","newActiveTarget","setActiveTarget","previous","activeTargetChangeInitialized","root","onKeydown","action","handleKeyboard","type","nodeId","handleNodesRendered","useCallback","refRepository","handleLineLabelsRendered","DEFAULT_SCALE_RANGE_MIN","DEFAULT_SCALE_RANGE_MAX","zoomer","zoom","moved","scaleExtent","on","e","rootSelection","select","unsetZoom","ctrlKey","stopImmediatePropagation","preventDefault","translateBy","wheelDeltaX","wheelDeltaY","call","transformToCenter","canvasWidth","clientWidth","canvasHeight","clientHeight","undefined","ZoomTransform","defPrefix","uniqueId","markerPrefix","maskPrefix","activeLineMarkerPrefix","getRenderedLineLabels","lineMaskRects","setLineMaskRects","adjustLineLabels","observer","ResizeObserver","updateLineMaskRects","getLineMaskRects","lineLabel","values","observe","disconnect","className","classNames","ready","tabIndex","width","height","_ref3","index","strokeColor","MarkerComponent","_ref4","lineId","rects","LineMaskComponent","viewBox","refX","refY","markerWidth","markerHeight","orient","d","stroke","strokeWidth","fill","LineComponent","linePaths","active","source","activeRelated","style","left","top","LineLabelComponentGroup","labels","onRendered","NodeComponentGroup","ConnectLineComponent","_EoDiagram2","_set_activeTargetChangeEvent","_set_nodeDelete","_set_edgeDelete","_set_lineClick","_set_lineDoubleClick","_set_connectNodes","c","_initClass","_applyDecs","styleTexts","styleText","String","attribute","Boolean","o","_","has","_checkInRHS","_EditableLabel","EditableLabelComponent","LegacyEditableLabelComponent","_EditableLabel_brand","_handleLabelEditingChange","_handleLabelChange","_editableLabelRef","EditableLabel","_init_label","_init_extra_label","_init_type","_init_extra_type","_init_labelEditingChange","_init_extra_labelEditingChange","value","_get_labelEditingChange","_init_labelChange","_init_extra_labelChange","_get_labelChange","enableEditing","onLabelEditingChange","onLabelChange","_label","currentLabel","setCurrentLabel","editingLabel","setEditingLabel","editingLabelInitialized","shouldEmitLabelChange","setShouldEmitLabelChange","labelInputRef","handleEditLabel","stopPropagation","_labelInputRef$curren","_labelInputRef$curren2","focus","preventScroll","handleInputChange","handleInputKeydown","_labelInputRef$curren3","keyCode","which","blur","handleInputBlur","editing","empty","onDoubleClick","onMouseDown","onChange","onKeyDown","onBlur","_EditableLabel2","_set_labelEditingChange","_set_labelChange","markerEnd","onConnect","from","onMouseMove","clientX","offset","clientY","onClick","reset","document","capture","connecting","join","updateCells","cells","previousCells","defaultNodeSize","reason","parent","isManualLayout","newCells","initializeCells","updateCandidates","shouldReCenter","previousSizeInitializedNodes","previousShouldCentered","cell","isDecoratorCell","isNodeCell","SYMBOL_FOR_SIZE_INITIALIZED","set","nodesMap","previousNode","view","handled","downstreamNodeIds","Set","isEdgeCell","add","parentNode","downstreamNodes","filter","rightMostNode","push","nextX","nextY","DEFAULT_NODE_GAP","totalWidth","reduce","acc","getNodeView","maxWidth","maxHeight","positionedNodesCount","hasDecorators","without","dagreLayout","forceLayout","fixedPosition","center","updated","_EoDrawCanvas","lockBodyScroll","unwrapProvider","EoDrawCanvasComponent","LegacyEoDrawCanvasComponent","_EoDrawCanvas_brand","_handleCellMove","_handleCellResize","_handleCellDelete","_handleCellContextMenu","_handleDecoratorTextChange","_U","_handleScaleChange","_canvasRef","EoDrawCanvas","_init_cells","_init_extra_cells","_init_defaultNodeSize","DEFAULT_NODE_SIZE","_init_extra_defaultNodeSize","_init_defaultNodeBricks","_init_extra_defaultNodeBricks","_init_defaultEdgeLines","_init_extra_defaultEdgeLines","_init_fadeUnrelatedCells","_init_extra_fadeUnrelatedCells","_init_nodeMoveEvent","_init_extra_nodeMoveEvent","_init_cellMoveEvent","_init_extra_cellMoveEvent","info","_get_cellMoveEvent","_get_nodeMoveEvent","_init_cellResizeEvent","_init_extra_cellResizeEvent","_get_cellResizeEvent","_init_cellDelete","_init_extra_cellDelete","_get_cellDelete","_init_cellContextMenu","_init_extra_cellContextMenu","_get_cellContextMenu","_init_decoratorTextChange","_init_extra_decoratorTextChange","_get_decoratorTextChange","_init_scaleChange","_init_extra_scaleChange","_get_scaleChange","defaultNodeBricks","defaultEdgeLines","fadeUnrelatedCells","dropNode","_this","_asyncToGenerator","_document$elementsFro","_document","position","size","data","useBrick","elementsFromPoint","includes","_size$","_size$2","boundingClientRect","getBoundingClientRect","getTransform","newNode","_objectSpread","dropDecorator","_this2","_document$elementsFro2","_document2","decorator","_classPrivateFieldGet3","newDecorator","replace","r","Math","random","toString","DEFAULT_AREA_WIDTH","DEFAULT_AREA_HEIGHT","addNodes","_this3","newNodes","_size$3","_size$4","addEdge","_this4","_classPrivateFieldGet4","newEdge","manuallyConnectNodes","ctx","_this5","disconnectedCallback","super","host","onCellMove","onCellResize","onCellDelete","onCellContextMenu","onDecoratorTextChange","onScaleChange","_ref5","initialCells","dispatch","useReducer","rootReducer","cellsRef","manualConnectDeferredRef","editingTexts","setEditingTexts","useZoom","useLayout","payload","_ref6","findLastIndex","slice","allCells","_updateCells","result","_objectWithoutProperties","_excluded","sourceId","find","rect","Promise","resolve","reject","handleConnect","state","to","_manualConnectDeferre2","i","_manualConnectDeferre","useActiveTarget","unrelatedCells","setUnrelatedCells","nextUnrelated","getUnrelatedCells","prev","activeCell","handleCellMoving","handleCellMoved","handleCellResizing","handleCellResized","handleDecoratorTextEditing","_ref7","texts","handleNodeBrickResize","handleZoomSlide","scaleTo","reCenter","lineConfMap","useLineMarkers","useReady","marker","CellComponent","onCellMoving","onCellMoved","onCellResizing","onCellResized","onDecoratorTextEditing","onNodeBrickResize","ZoomBarComponent","shadowRoot","onZoomChange","onReCenter","_EoDrawCanvas2","_set_nodeMoveEvent","_set_cellMoveEvent","_set_cellResizeEvent","_set_cellDelete","_set_cellContextMenu","_set_decoratorTextChange","_set_scaleChange","zoomBarStyleText","_ExperimentalNode","_ExperimentalNode_brand","_handleDragStart","_handleDragMove","_handleDragEnd","ExperimentalNode","_init_usage","_init_extra_usage","_init_status","_init_extra_status","_init_decorator","_init_extra_decorator","_init_dragStartEvent","_init_extra_dragStartEvent","_get_dragStartEvent","_init_dragMoveEvent","_init_extra_dragMoveEvent","_get_dragMoveEvent","_init_dragEndEvent","_init_extra_dragEndEvent","_get_dragEndEvent","usage","status","ExperimentalNodeComponent","onDragStart","onDragMove","onDragEnd","handleMouseDown","onMouseUp","_ExperimentalNode2","_set_dragStartEvent","_set_dragMoveEvent","_set_dragEndEvent","_EoDisplayCanvas","_EoDisplayCanvas_brand","EoDisplayCanvas","EoDisplayCanvasComponent","hoverCell","setHoverCell","handleCellMouseEnter","handleCellMouseLeave","readOnly","onCellMouseEnter","onCellMouseLeave","_EoDisplayCanvas2","___CSS_LOADER_EXPORT___","module"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[709],{3739:(e,t,r)=>{r.d(t,{c:()=>o});var n=r(8769),a=r.n(n);function o(e){var t,{id:r,type:n,strokeColor:o}=e;switch(n){case"0..1":t=l;break;case"0..N":t=d;break;default:t=i}return a().createElement(t,{id:r,strokeColor:o})}function i(e){var{id:t,strokeColor:r}=e;return a().createElement("marker",{id:t,viewBox:"0 0 6 6",refX:5,refY:3,markerWidth:6,markerHeight:6,orient:"auto-start-reverse",strokeLinejoin:"round"},a().createElement("path",{d:"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z",stroke:r,strokeWidth:1,fill:r}))}function l(e){var{id:t,strokeColor:r}=e;return a().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},a().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5",stroke:r,strokeWidth:1,fill:"none"}))}function d(e){var{id:t,strokeColor:r}=e;return a().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},a().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5",stroke:r,strokeWidth:1,fill:"none"}))}},3188:(e,t,r)=>{r.d(t,{h:()=>a});var n=r(733);function a(e,t,r){if(e===t||(0,n.w)(e,t,0,0))return null;var a,i,l=0,d=0;if(r){var s=t.x-e.x,c=t.y-e.y,u=Math.atan2(c,s);l=r/2*Math.cos(u+Math.PI/2),d=r/2*Math.sin(u+Math.PI/2)}var h=[[e.x+l,e.y+d],[t.x+l,t.y+d]],v=o(e,h),f=o(t,h);return a=v.length>0?v[0]:[e.x,e.y],i=f.length>0?f[0]:[t.x,t.y],[{x:a[0],y:a[1]},{x:i[0],y:i[1]}]}function o(e,t){for(var r=[[e.x-e.width/2,e.y-e.height/2],[e.x+e.width/2,e.y-e.height/2],[e.x+e.width/2,e.y+e.height/2],[e.x-e.width/2,e.y+e.height/2]],n=[],a=0;a<4;a++)n.push([r[a],r[(a+1)%4]]);var o=[];for(var l of n){var d=i(t[0],t[1],l[0],l[1]);d&&o.push(d)}return o}function i(e,t,r,n){var[a,o]=e,[i,l]=t,[d,s]=r,[c,u]=n;if(a===i&&o===l||d===c&&s===u)return null;var h=(u-s)*(i-a)-(c-d)*(l-o);if(0===h)return null;var v=((c-d)*(o-s)-(u-s)*(a-d))/h,f=((i-a)*(o-s)-(l-o)*(a-d))/h;return v<0||v>1||f<0||f>1?null:[a+v*(i-a),o+v*(l-o)]}},733:(e,t,r)=>{function n(e,t,r,n){var o=r?a(e,r):e,i=n?a(t,n):t,l=Math.min(o.x-o.width/2,i.x-i.width/2),d=Math.max(o.x+o.width/2,i.x+i.width/2),s=Math.min(o.y-o.height/2,i.y-i.height/2),c=Math.max(o.y+o.height/2,i.y+i.height/2);return d-l<o.width+i.width&&c-s<o.height+i.height}function a(e,t){return{x:e.x-e.width/2-t,y:e.y-e.height/2-t,width:e.width+2*t,height:e.height+2*t}}r.d(t,{w:()=>n})},8802:(e,t,r)=>{function n(e){if(Array.isArray(e)){var t=e[0],r=e.length>1?e[1]:t;return[t,r,e.length>2?e[2]:t,e.length>3?e[3]:r]}return new Array(4).fill(e)}r.d(t,{D:()=>n})},2830:(e,t,r)=>{r.d(t,{m:()=>A});var n=r(8769),a=r.n(n),o=r(3373),i=r.n(o),l=r(531),d=r(3188);function s(e,t){return e.find((e=>(0,l.N)(e)&&e.id===t))}var c=r(3033);function u(e){var t,r,o,{edge:u,cells:v,lineConfMap:f}=e,m=(0,n.useRef)(null),g=(0,n.useMemo)((()=>s(v,u.source)),[v,u.source]),p=(0,n.useMemo)((()=>s(v,u.target)),[v,u.target]),w=(0,n.useMemo)((()=>f.get(u)),[u,f]),y=(0,n.useMemo)((()=>v.some((e=>(0,l.WW)(e)&&e.source===u.target&&e.target===u.source))?w.parallelGap:0),[v,u,w.parallelGap]),k=(0,n.useMemo)((()=>g&&p&&null!=g.view.x&&null!=p.view.x?(0,d.h)(h(g.view,5),h(p.view,5),y):null),[y,g,p]);if(!k)return null;var x="M".concat(k[0].x," ").concat(k[0].y,"L").concat(k[1].x," ").concat(k[1].y);return a().createElement(a().Fragment,null,a().createElement("path",{d:x,fill:"none",stroke:"transparent",strokeWidth:w.interactStrokeWidth}),a().createElement("path",{ref:m,className:i()("line",{dashed:w.dashed,["".concat(w.dashed?"dashed":"solid","-animation")]:w.animate.useAnimate}),style:{"--time":"".concat(null!==(t=w.animate.duration)&&void 0!==t?t:c.Be,"s"),"--solid-length":null===(r=m.current)||void 0===r||null===(o=r.getTotalLength)||void 0===o?void 0:o.call(r)},d:x,fill:"none",stroke:w.strokeColor,strokeWidth:w.strokeWidth,markerStart:w.showStartArrow?w.markerArrow:"",markerEnd:w.showEndArrow?w.markerArrow:""}),a().createElement("path",{className:"line-active-bg",d:x,fill:"none"}))}function h(e,t){return{x:e.x+e.width/2,y:e.y+e.height/2,width:e.width+t,height:e.height+t}}var v=r(4993),f=r(7410),m=r(1030),g=r(9126);function p(e){var{node:t,defaultNodeBricks:r,onResize:o}=e,i=function(e){var[t,r]=(0,n.useState)(e);return(0,n.useEffect)((()=>{r((t=>(0,m.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),l=t.useBrick,d=(0,n.useRef)(null),s=(0,n.useMemo)((()=>{var e;return null!=l?l:null==r||null===(e=r.find((e=>(0,f.checkIfByTransform)(e,i))))||void 0===e?void 0:e.useBrick}),[r,l,i]),c=(0,n.useCallback)((e=>{var r=d.current;r&&(r.disconnect(),d.current=null),e?setTimeout((()=>{var r=new g.A((()=>{o(t.id,[e.offsetWidth,e.offsetHeight])}));r.observe(e),d.current=r})):o(t.id,null)}),[t.id,o]);return s?a().createElement("foreignObject",{width:9999,height:9999,className:"node"},s&&a().createElement(v.ReactUseBrick,{useBrick:s,data:i,refCallback:c})):null}function w(e){return"edge"===e.type?(0,m.pick)(e,["type","source","target","data"]):(0,m.pick)(e,["type","id","data"])}function y(e,t){var{action:r,cell:n,scale:a,layout:o,onCellMoving:i,onCellMoved:d,onCellResizing:s,onCellResized:c,onSwitchActiveTarget:u}=t;if(e.stopPropagation(),null==u||u(w(n)),!(0,l.WW)(n)&&("force"!==o&&"dagre"!==o||!(0,l.N)(n))){var h=[e.clientX,e.clientY],v="move"===r?[n.view.x,n.view.y]:[n.view.width,n.view.height],f=!1,m=(e,t)=>{var o,l,u=function(e){return[(e.clientX-h[0])/a,(e.clientY-h[1])/a]}(e);f||(f=u[0]**2+u[1]**2>=9),f&&("move"===r?null===(o=t?d:i)||void 0===o||o({type:n.type,id:n.id,x:v[0]+u[0],y:v[1]+u[1]}):null===(l=t?c:s)||void 0===l||l({type:n.type,id:n.id,width:v[0]+u[0],height:v[1]+u[1]}))},g=e=>{m(e)},p=e=>{m(e,!0),f=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",p)};document.addEventListener("mousemove",g),document.addEventListener("mouseup",p)}}function k(e){var{cell:t,transform:r,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d}=e,s=a().useRef(null);return(0,n.useEffect)((()=>{var e=s.current;if(e&&!o){var n=e=>{y(e,{action:"resize",cell:t,scale:r.k,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d})};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}}}),[t,l,i,d,o,r.k]),a().createElement("g",{className:"decorator-area"},a().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),!o&&a().createElement("g",{ref:s,className:"resize-handle",transform:"translate(".concat(t.view.width-20," ").concat(t.view.height-20,")")},a().createElement("rect",{width:20,height:20}),a().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}var x=r(9740);function b(e){var t,{cell:r,readOnly:o,onDecoratorTextEditing:l,onDecoratorTextChange:d}=e,s=null!==(t=r.view.text)&&void 0!==t?t:"",[c,u]=(0,n.useState)(s),[h,v]=(0,n.useState)(!1),f=(0,n.useRef)(!1),[m,g]=(0,n.useState)(!1),p=(0,n.useRef)(null),w=(0,n.useCallback)((e=>{o||(e.preventDefault(),e.stopPropagation(),v(!0))}),[o]);(0,n.useEffect)((()=>{var e=p.current;e&&e.textContent!==c&&(e.textContent=c)}),[c]),(0,n.useEffect)((()=>{h&&p.current&&(p.current.focus(),function(e){var t=document.createRange();t.selectNodeContents(e);var r=window.getSelection();r.removeAllRanges(),r.addRange(t)}(p.current)),null==l||l({id:r.id,editing:h})}),[r.id,h,l]),(0,n.useEffect)((()=>{f.current?null==l||l({id:r.id,editing:h}):f.current=!0}),[r.id,h,l]);var y=(0,n.useCallback)((e=>{o||u(e.target.textContent)}),[o]),k=(0,n.useCallback)((()=>{o||(v(!1),g(!0))}),[o]);return(0,n.useEffect)((()=>{m&&(null==d||d({id:r.id,view:(0,x.A)((0,x.A)({},r.view),{},{text:c})}),g(!1))}),[r,c,d,m]),a().createElement("foreignObject",{className:"decorator-text"},a().createElement("div",{className:i()("text-container",{editing:h}),onDoubleClick:w},a().createElement("div",{className:"text",contentEditable:h,ref:p,onInput:y,onBlur:k})))}function E(e){var t,{cell:r,transform:n,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d,onDecoratorTextEditing:s,onDecoratorTextChange:c}=e;switch(r.decorator){case"area":t=k;break;case"text":t=b;break;default:return console.error("Unknown decorator: ".concat(r.decorator)),null}return a().createElement(t,{cell:r,transform:n,readOnly:o,onCellResizing:i,onCellResized:l,onSwitchActiveTarget:d,onDecoratorTextEditing:s,onDecoratorTextChange:c})}var C=r(8185);function A(e){var{layout:t,cell:r,cells:o,defaultNodeBricks:d,lineConfMap:s,active:c,readOnly:h,transform:v,unrelatedCells:f,onCellMoving:m,onCellMoved:g,onCellResizing:k,onCellResized:x,onSwitchActiveTarget:b,onCellContextMenu:A,onDecoratorTextEditing:z,onDecoratorTextChange:M,onNodeBrickResize:R,onCellMouseEnter:N,onCellMouseLeave:S}=e,W=(0,n.useRef)(null),T=(0,n.useMemo)((()=>f.some((e=>(0,C.c)(e,r)))),[r,f]);(0,n.useEffect)((()=>{var e=W.current;if(e&&!h){var n=e=>{y(e,{layout:t,action:"move",cell:r,scale:v.k,onCellMoving:m,onCellMoved:g,onSwitchActiveTarget:b})};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}}}),[t,r,g,m,b,h,v.k]);var L=(0,n.useCallback)((e=>{h&&"decorator"===r.type||(e.preventDefault(),b(w(r)),A({cell:r,clientX:e.clientX,clientY:e.clientY}))}),[r,A,b,h]),D=(0,n.useCallback)((()=>{null==N||N(r)}),[r,N]),B=(0,n.useCallback)((()=>{null==S||S(r)}),[r,S]);return a().createElement("g",{className:i()("cell",{active:c,faded:T,"read-only":h}),ref:W,transform:"edge"===r.type||null==r.view.x?void 0:"translate(".concat(r.view.x," ").concat(r.view.y,")"),onContextMenu:L,onMouseEnter:D,onMouseLeave:B},(0,l.N)(r)?a().createElement(p,{node:r,defaultNodeBricks:d,onResize:R}):(0,l.WW)(r)?a().createElement(u,{edge:r,cells:o,lineConfMap:s}):(0,l.mH)(r)?a().createElement(E,{cell:r,transform:v,readOnly:h,onCellResizing:k,onCellResized:x,onSwitchActiveTarget:b,onDecoratorTextEditing:z,onDecoratorTextChange:M}):null)}},3033:(e,t,r)=>{r.d(t,{Be:()=>g,CV:()=>n,HP:()=>o,Ie:()=>v,N8:()=>l,Ub:()=>m,VO:()=>h,XV:()=>f,Yt:()=>c,mF:()=>u,sS:()=>s,sz:()=>i,w1:()=>d,xc:()=>a});var n=Symbol.for("size-initialized"),a=Symbol.for("layout-initialized"),o=20,i=36,l=100,d=60,s=.5,c=2,u="gray",h=1,v=15,f=!1,m=!0,g=1},531:(e,t,r)=>{function n(e){return"node"===e.type}function a(e){return"decorator"===e.type}function o(e){return"node"===e.type}function i(e){return"edge"===e.type}function l(e){return"node"===e.type||"edge"===e.type}r.d(t,{N:()=>n,WW:()=>i,mH:()=>a,nv:()=>l,vC:()=>o})},227:(e,t,r)=>{r.d(t,{Y:()=>a});var n=r(8185);function a(e,t,r){var a=[];if(t){var o=new Set;for(var i of e)"edge"===i.type&&i.source===t.source.id&&o.add(i.target);for(var l of e)"node"===l.type?o.has(l.id)&&a.push(l):a.push(l)}else switch(null==r?void 0:r.type){case"node":var d=new Map,s=new Set([r.id]);for(var c of e)"node"===c.type?d.set(c.id,c):"edge"===c.type?c.source===r.id?s.add(c.target):c.target===r.id?s.add(c.source):a.push(c):a.push(c);for(var[u,h]of d)s.has(u)||a.push(h);break;case"edge":for(var v of e)("edge"===v.type?(0,n.c)(v,r):"node"===v.type&&(v.id===r.source||v.id===r.target))||a.push(v);break;case"decorator":for(var f of e)"decorator"===f.type&&f.id===r.id||a.push(f)}return a}},3783:(e,t,r)=>{r.d(t,{C:()=>o});var n=r(9740),a=r(531);function o(e,t){var{defaultNodeSize:r}=t;return(null!=e?e:[]).map((e=>{var t,o;return!(0,a.vC)(e)||void 0!==(null===(t=e.view)||void 0===t?void 0:t.width)&&void 0!==(null===(o=e.view)||void 0===o?void 0:o.height)?e:(0,n.A)((0,n.A)({},e),{},{view:(0,n.A)({width:r[0],height:r[1]},e.view)})}))}},8185:(e,t,r)=>{function n(e,t){return e?!!t&&e.type===t.type&&("node"===e.type||"decorator"===e.type?e.id===t.id:e.source===t.source&&e.target===t.target):!t}r.d(t,{c:()=>n})},908:(e,t,r)=>{r.d(t,{r:()=>a});var n=r(531);function a(e,t){var{canvasWidth:r,canvasHeight:a,scaleRange:o}=t,i=1/0,l=1/0,d=-1/0,s=-1/0,c=!0;for(var u of e)if(!(0,n.WW)(u)){c=!1;var{view:h}=u,v=h.x+h.width,f=h.y+h.height;h.x<i&&(i=h.x),v>d&&(d=v),h.y<l&&(l=h.y),f>s&&(s=f)}var m=d-i,g=s-l,p=o&&!c&&(m>r||g>a)?Math.max(Math.min(r/m,a/g,o[1]),o[0]):1;return{x:c?0:(r-m*p)/2-i*p,y:c?0:(a-g*p)/2-l*p,k:p}}},1083:(e,t,r)=>{r.d(t,{d:()=>d});var n=r(9740),a=r(531),o=r(3033);function i(e,t,r){var n=e.findLastIndex(r)+1;return[...e.slice(0,n),t,...e.slice(n)]}var l,d=(l={cells:(e,t)=>{switch(t.type){case"drop-node":return i(e,t.payload,(e=>!("decorator"===e.type&&"text"===e.decorator)));case"drop-decorator":return"text"===t.payload.decorator?[...e,t.payload]:i(e,t.payload,(e=>"decorator"===e.type&&"area"===e.decorator));case"add-nodes":var r=e.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1;return[...e.slice(0,r),...t.payload,...e.slice(r)];case"add-edge":return i(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator));case"move-cell":var{type:l,id:d,x:s,y:c}=t.payload,u=e.findIndex((e=>e.type===l&&e.id===d));if(-1!==u){var h=e[u];return[...e.slice(0,u),(0,n.A)((0,n.A)({},h),{},{view:(0,n.A)((0,n.A)({},h.view),{},{x:s,y:c})}),...e.slice(u+1)]}return e;case"resize-cell":var{type:v,id:f,width:m,height:g}=t.payload,p=e.findIndex((e=>e.type===v&&e.id===f));if(-1!==p){var w=e[p];return[...e.slice(0,p),(0,n.A)((0,n.A)({},w),{},{view:(0,n.A)((0,n.A)({},w.view),{},{width:m,height:g})}),...e.slice(p+1)]}return e;case"update-cells":return t.payload;case"update-node-size":return e.map((e=>(0,a.N)(e)&&e.id===t.payload.id?(0,n.A)((0,n.A)({},e),{},{[o.CV]:!0,view:t.payload.size?(0,n.A)((0,n.A)({},e.view),{},{width:t.payload.size[0],height:t.payload.size[1]}):e.view}):e))}return e}},(e,t)=>Object.fromEntries(Object.entries(l).map((r=>{var[n,a]=r;return[n,a(e[n],t)]}))))},7099:(e,t,r)=>{r.d(t,{Y:()=>f});var n=r(8769),a=r.n(n),o=r(2657),i=r(6768),l=r(198),d=r(8621),s=r(4993),c=r(9575);const u=e=>n.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),n.createElement("path",{d:"M12 0a.5.5 0 0 1 .5.5v2.013a9.5 9.5 0 0 1 8.987 8.988L23.5 11.5a.5.5 0 0 1 0 1h-2.013a9.5 9.5 0 0 1-8.987 8.987V23.5a.5.5 0 0 1-1 0v-2.013A9.5 9.5 0 0 1 2.514 12.5H.5a.5.5 0 0 1 0-1h2.013A9.5 9.5 0 0 1 11.5 2.514V.5A.5.5 0 0 1 12 0M3.514 11.5H7.5a.5.5 0 0 1 0 1H3.514a8.5 8.5 0 0 0 7.987 7.986L11.5 16.5a.5.5 0 0 1 1 0v3.986a8.5 8.5 0 0 0 7.986-7.986H16.5a.5.5 0 0 1 0-1h3.986A8.5 8.5 0 0 0 12.5 3.515V7.5a.5.5 0 0 1-1 0V3.514a8.5 8.5 0 0 0-7.986 7.987zm8.486-1a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3"})),h=e=>n.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),n.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),n.createElement("path",{d:"M744.448 486.4h-204.8V281.6a25.6 25.6 0 1 0-51.2 0v204.8h-204.8a25.6 25.6 0 0 0 0 51.2h204.8v204.8a25.6 25.6 0 0 0 51.2 0V537.6h204.8a25.6 25.6 0 0 0 0-51.2"})),v=e=>n.createElement("svg",(0,c.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),n.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),n.createElement("path",{d:"M744.448 486.4H280.064a25.6 25.6 0 1 0 0 51.2h464.384a25.6 25.6 0 0 0 0-51.2"}));function f(e){var{shadowRoot:t,scale:r,scaleRange:c,onZoomChange:f,onReCenter:m}=e,g=(0,s.useCurrentTheme)(),p=(0,n.useMemo)((()=>(0,d.VC)()),[]),w=(0,n.useRef)(null),y=100*c[0],k=100*c[1],x=100*r,b=(0,n.useMemo)((()=>({formatter:e=>"".concat(e,"%"),placement:"left",getPopupContainer:()=>w.current})),[]),E=(0,n.useCallback)((()=>{f(Math.min(x+5,k))}),[k,f,x]),C=(0,n.useCallback)((()=>{f(Math.max(x-5,y))}),[y,f,x]);return a().createElement(o.Ay,{theme:{algorithm:"dark-v2"===g?i.A.darkAlgorithm:i.A.defaultAlgorithm}},a().createElement(d.N7,{container:t,autoClear:!0,cache:p,hashPriority:"high"},a().createElement("div",{className:"zoom-bar",ref:w},a().createElement("div",{className:"center-button",onClick:m,role:"button"},a().createElement(u,null)),a().createElement("div",{className:"zoom-slider"},a().createElement("div",{className:"zoom-button",role:"button",onClick:E},a().createElement(h,null)),a().createElement(l.A,{min:y,max:k,value:x,step:5,vertical:!0,included:!1,tooltip:b,onChange:f}),a().createElement("div",{className:"zoom-button",role:"button",onClick:C},a().createElement(v,null))))))}},9127:(e,t,r)=>{r.d(t,{C:()=>u});var n=r(9740),a=r(4223),o=r(1030),i=r(7586),l=r.n(i),d=r(8802),s=r(531),c=["nodePadding"];function u(e){var{cells:t,layoutOptions:r}=e,i=(0,n.A)({nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50},(0,o.pick)(r,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])),{nodePadding:u}=i,h=(0,a.A)(i,c),v=(0,d.D)(u),f=new(l().graphlib.Graph);for(var m of(f.setGraph(h),f.setDefaultEdgeLabel((function(){return{}})),t))(0,s.N)(m)?f.setNode(m.id,{id:m.id,width:m.view.width+v[1]+v[3],height:m.view.height+v[0]+v[2]}):(0,s.WW)(m)&&f.setEdge(m.source,m.target);return l().layout(f),{getNodeView:e=>f.node(e),nodePaddings:v}}},6170:(e,t,r)=>{r.d(t,{k:()=>v});var n=r(9740),a=r(1030),o=r(6149),i=r(4842),l=r(1945),d=r(9418),s=r(3854),c=r(7931),u=r(531),h=r(8802);function v(e){var{cells:t,layoutOptions:r,center:v,fixedPosition:f}=e,{nodePadding:m,collide:g}=(0,n.A)((0,n.A)({nodePadding:0},(0,a.pick)(r,["nodePadding"])),{},{collide:!1!==(null==r?void 0:r.collide)&&(0,n.A)({radiusDiff:18,strength:1,iterations:1},!0===(null==r?void 0:r.collide)?null:null==r?void 0:r.collide)}),p=(0,h.D)(m),w=[],y=[],k=new Map;for(var x of t)if((0,u.N)(x)){var b=(0,n.A)({id:x.id,width:x.view.width+p[1]+p[3],height:x.view.height+p[0]+p[2]},f?{fx:x.view.x,fy:x.view.y}:null);w.push(b),k.set(b.id,b)}else(0,u.WW)(x)&&y.push({source:x.source,target:x.target});var E=(0,o.A)(y).id((e=>e.id)),C=(0,i.A)(w).force("link",E).force("x",(0,l.A)(null==v?void 0:v[0])).force("y",(0,d.A)(null==v?void 0:v[1])).force("charge",(0,s.A)());return g&&C.force("collide",(0,c.A)().radius((e=>Math.sqrt(e.width**2+e.height**2)/2+g.radiusDiff)).strength(g.strength).iterations(g.iterations)),C.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(C),{getNodeView:e=>k.get(e),nodePaddings:p}}},1819:(e,t,r)=>{r.d(t,{J:()=>o});var n=r(8769),a=r(8185);function o(e){var{cellsRef:t,activeTarget:r,onActiveTargetChange:o}=e,i=null!=r?r:null,[l,d]=(0,n.useState)(i);(0,n.useEffect)((()=>{d((e=>(0,a.c)(e,i)?e:i))}),[i]);var s=(0,n.useRef)(!1);return(0,n.useEffect)((()=>{s.current?o(l):s.current=!0}),[l,o]),(0,n.useEffect)((()=>{if(l){var e=e=>{e.composedPath().indexOf(t.current)<=0&&d(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[l,t]),l}},2361:(e,t,r)=>{r.d(t,{g:()=>h});var n=r(9740),a=r(8769),o=r(7566),i=r(1517),l=r(3033),d=r(531),s=r(908),c=r(6170),u=r(9127);function h(e){var{layout:t,layoutOptions:r,rootRef:h,cells:v,zoomable:f,zoomer:m,scaleRange:g,dispatch:p}=e,[w,y]=(0,a.useState)("force"!==t&&"dagre"!==t),[k,x]=function(e){var{rootRef:t,cells:r,layoutInitialized:n,zoomable:c,zoomer:u,scaleRange:h}=e,[v,f]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{var e=t.current;if(e&&n&&!v&&r.some((e=>(0,d.N)(e)||(0,d.mH)(e)))&&!r.some((e=>(0,d.N)(e)&&!e[l.CV]))){var{k:a,x:m,y:g}=(0,s.r)(r,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:c?h:void 0});u.transform((0,o.A)(e),new i.uV(a,m,g)),f(!0)}}),[r,v,n,t,h,c,u]),(0,a.useEffect)((()=>{r.some((e=>(0,d.N)(e)||(0,d.mH)(e)))||f(!1)}),[r]),[v,f]}({rootRef:h,layoutInitialized:w,cells:v,zoomable:f,zoomer:m,scaleRange:g}),b=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(!v.some((e=>(0,d.N)(e)&&!e[l.CV])))if("force"===t||"dagre"===t){if(e=b.current,a=v.filter(d.nv),(null==e?void 0:e.length)!==a.length||!e.every(((e,t)=>e===a[t]))){var e,a,o,i;({getNodeView:o,nodePaddings:i}="force"===t?(0,c.k)({cells:v,layoutOptions:r}):(0,u.C)({cells:v,layoutOptions:r}));var s=v.map((e=>{if((0,d.N)(e)){var t=o(e.id);return(0,n.A)((0,n.A)({},e),{},{view:(0,n.A)((0,n.A)({},e.view),{},{x:t.x-t.width/2+i[3],y:t.y-t.height/2+i[0]}),[l.xc]:!0})}return e}));b.current=s.filter(d.nv),p({type:"update-cells",payload:s}),x(!1),y(!0)}}else y(!0)}),[v,p,t,r,x]),{centered:k,setCentered:x}}},7531:(e,t,r)=>{r.d(t,{d:()=>s});var n=r(9740),a=r(8769),o=r(7410),i=r(1030),l=r(531),d=r(3033);function s(e){var{cells:t,defaultEdgeLines:r,markerPrefix:s}=e;return(0,a.useMemo)((()=>{var e=[{strokeColor:d.mF}],a=new WeakMap,c=function(t){if((0,l.WW)(t)){var c,u=null!==(c=o.__secret_internals.legacyDoTransform({edge:t},null==r?void 0:r.find((e=>(0,o.checkIfByTransform)(e,{edge:t})))))&&void 0!==c?c:{},h=(0,n.A)({dashed:!1,strokeColor:d.mF,strokeWidth:d.VO,interactStrokeWidth:d.Ie,showStartArrow:d.XV,showEndArrow:d.Ub,animate:{useAnimate:!1,duration:d.Be}},(0,i.omitBy)(u,i.isUndefined));void 0===h.parallelGap&&(h.parallelGap=h.interactStrokeWidth);var v=function(e,t){var r=(0,i.findIndex)(t,e);return-1===r&&(r=t.push(e)-1),r}({strokeColor:h.strokeColor},e);h.markerArrow="url(#".concat(s).concat(v,")"),a.set(t,h)}};for(var u of t)c(u);return[a,e]}),[t,r,s])}},8197:(e,t,r)=>{r.d(t,{H:()=>i});var n=r(8769),a=r(531),o=r(3033);function i(e){var{cells:t,layout:r,centered:i}=e;return(0,n.useMemo)((()=>i&&t.every((e=>!(0,a.N)(e)||e[o.CV]&&("force"!==r&&"dagre"!==r||e[o.xc])))),[t,i,r])}},8091:(e,t,r)=>{r.d(t,{f:()=>l});var n=r(8769),a=r(7566),o=r(1517),i=r(3033);function l(e){var{rootRef:t,zoomable:r,scrollable:l,pannable:d,scaleRange:s,onSwitchActiveTarget:c}=e,[u,h]=(0,n.useState)(!1),[v,f]=(0,n.useState)({k:1,x:0,y:0}),m=(0,n.useMemo)((()=>null!=s?s:[i.sS,i.Yt]),[s]),g=(0,n.useMemo)((()=>(0,o.s_)()),[]);return(0,n.useEffect)((()=>{var e=!1;g.scaleExtent(r?m:[1,1]).on("start",(()=>{e=!1,h(!0)})).on("zoom",(t=>{e=!0,f(t.transform)})).on("end",(()=>{h(!1),e||null==c||c(null)}))}),[c,m,r,g]),(0,n.useEffect)((()=>{var e=t.current;if(e){var n=(0,a.A)(e),o=()=>{n.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(r||l||d)return(r||l)&&n.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),l&&(e.preventDefault(),g.translateBy(n,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),n.call(g).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null).on("mousedown.zoom",null),d||n.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),o;o()}}),[d,t,l,r,g]),{grabbing:u,transform:v,zoomer:g,scaleRange:m}}},8618:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(6758),a=r.n(n),o=r(935),i=r.n(o)()(a());i.push([e.id,'.zoom-bar{position:absolute;bottom:20px;right:20px;width:40px}.zoom-slider,\n.center-button{width:100%;display:flex;align-items:center;border:1px solid var(--antd-background-color-base);border-radius:var(--larger-border-radius);box-shadow:var(--connected-overlay-shadow);background-color:var(--color-fill-bg-container-4)}.zoom-slider{height:140px;padding:8px 0;flex-direction:column}[role="button"]{cursor:pointer}.center-button{justify-content:center;margin-bottom:8px;height:40px}.center-button:hover{border-color:var(--antd-btn-default-hover-border-color)}.center-button path{fill:var(--antd-link-hover-color)}.center-button:hover path{fill:var(--palette-blue-7)}.zoom-button{font-size:16px;line-height:0}.zoom-button svg{width:1em;height:1em;fill:var(--antd-link-hover-color)}.zoom-slider .ant-slider-vertical{padding-inline:5px}.zoom-slider .ant-slider-vertical .ant-slider-rail{width:2px}.zoom-slider .ant-slider-vertical .ant-slider-handle{width:6px;height:6px;inset-inline-start:3px}.zoom-slider .ant-slider .ant-slider-handle:hover::before,\n.zoom-slider .ant-slider .ant-slider-handle:focus::before,\n.zoom-slider .ant-slider .ant-slider-handle::before{width:10px;height:10px;inset-inline-start:-2px}.zoom-slider .ant-slider .ant-slider-handle:hover::after,\n.zoom-slider .ant-slider .ant-slider-handle:focus::after,\n.zoom-slider .ant-slider .ant-slider-handle::after{width:6px;height:6px;inset-block-start:0;inset-inline-start:0}',""]);const l=i.toString()},3012:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(6758),a=r.n(n),o=r(935),i=r.n(o)()(a());i.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden;--animation-dasharray:48;--stroke-dashoffset:96;--dasharray:4}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root{opacity:0}.root.ready{opacity:1}.root:focus{outline:none}@keyframes dashedAnimation{0%{stroke-dashoffset:var(--stroke-dashoffset)}to{stroke-dashoffset:0}}@keyframes solidAnimation{to{stroke-dashoffset:0}}.solid-animation{stroke-dasharray:var(--solid-length);stroke-dashoffset:var(--solid-length);animation:solidAnimation var(--time) linear infinite}.dashed-animation{animation:dashedAnimation var(--time) linear infinite}.decorator-area .area{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:var(--dasharray);stroke-width:1}.cell:not(.read-only){-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle{opacity:1}.connect-line{pointer-events:none}.connect-line:not(.connecting){display:none}.line.dashed{stroke-dasharray:var(--dasharray)}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}.cell .node{pointer-events:none}.cell .node > *{pointer-events:auto}",""]);const l=i.toString()}}]);
2
+ //# sourceMappingURL=709.4e908cfa.js.map