@elyra/canvas 13.15.0 → 13.16.0

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.
Files changed (48) hide show
  1. package/dist/canvas-controller-98ea28eb.js +2 -0
  2. package/dist/canvas-controller-98ea28eb.js.map +1 -0
  3. package/dist/canvas-controller-c134dba5.js +2 -0
  4. package/dist/canvas-controller-c134dba5.js.map +1 -0
  5. package/dist/common-canvas-a12b2116.js +2 -0
  6. package/dist/common-canvas-a12b2116.js.map +1 -0
  7. package/dist/common-canvas-ee905f14.js +2 -0
  8. package/dist/common-canvas-ee905f14.js.map +1 -0
  9. package/dist/common-canvas.es.js +1 -1
  10. package/dist/common-canvas.js +1 -1
  11. package/dist/{common-properties-5a47972a.js → common-properties-629a8ee6.js} +2 -2
  12. package/dist/common-properties-629a8ee6.js.map +1 -0
  13. package/dist/{common-properties-5d7d30a3.js → common-properties-b829036e.js} +2 -2
  14. package/dist/common-properties-b829036e.js.map +1 -0
  15. package/dist/lib/canvas-controller.es.js +1 -1
  16. package/dist/lib/canvas-controller.js +1 -1
  17. package/dist/lib/canvas.es.js +1 -1
  18. package/dist/lib/canvas.js +1 -1
  19. package/dist/lib/properties.es.js +1 -1
  20. package/dist/lib/properties.js +1 -1
  21. package/package.json +2 -2
  22. package/src/common-canvas/cc-top-panel.jsx +3 -10
  23. package/src/common-properties/controls/abstract-table.jsx +2 -1
  24. package/src/object-model/config-utils.js +2 -1
  25. package/src/object-model/object-model.js +97 -41
  26. package/src/palette/palette-content-list-item.jsx +45 -13
  27. package/src/palette/palette-content-list.jsx +8 -0
  28. package/src/palette/palette-dialog-content-grid-node.jsx +17 -4
  29. package/src/palette/palette-dialog-content-grid.jsx +3 -0
  30. package/src/palette/palette-dialog-content.jsx +3 -0
  31. package/src/palette/palette-dialog-under.jsx +2 -0
  32. package/src/palette/palette-dialog.jsx +3 -0
  33. package/src/palette/palette-flyout-content-category.jsx +23 -9
  34. package/src/palette/palette-flyout-content-filtered-list.jsx +2 -0
  35. package/src/palette/palette-flyout-content.jsx +3 -0
  36. package/src/palette/palette-flyout.jsx +2 -0
  37. package/src/palette/palette.jsx +3 -0
  38. package/stats.html +1 -1
  39. package/dist/canvas-controller-3f4f6f8a.js +0 -2
  40. package/dist/canvas-controller-3f4f6f8a.js.map +0 -1
  41. package/dist/canvas-controller-f38976ec.js +0 -2
  42. package/dist/canvas-controller-f38976ec.js.map +0 -1
  43. package/dist/common-canvas-4796f111.js +0 -2
  44. package/dist/common-canvas-4796f111.js.map +0 -1
  45. package/dist/common-canvas-f34148dc.js +0 -2
  46. package/dist/common-canvas-f34148dc.js.map +0 -1
  47. package/dist/common-properties-5a47972a.js.map +0 -1
  48. package/dist/common-properties-5d7d30a3.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{_ as e,a as t,b as n}from"./createClass-a140e270.js";import{_ as i,a as o,b as r}from"./inherits-860188e5.js";import a from"react";import{connect as s,Provider as l}from"react-redux";import{injectIntl as c}from"react-intl";import{u,f as d,h,g as p,B as g}from"./get-0aeefae2.js";import{b as f,G as v,T as y,t as m,c as b,d as k,e as x}from"./toolbar-aa394d30.js";import{b as w}from"./datarecord-metadata-v3-schema-bb227243.js";import{AccordionItem as C,InlineLoading as L,Search as E,Accordion as P,Button as N}from"@carbon/react";import T from"react-inlinesvg";import{$ as D,a0 as S,b as O,a1 as A,a2 as z,a3 as I,a4 as M,a5 as H,a6 as _,a7 as V,a8 as j,a9 as F,aa as R,E as B,W as U,ab as G,Z,ac as W,ad as X,ae as Y,af as K,ag as q,ah as $,O as J,ai as Q,M as ee,aj as te,P as ne,K as ie,L as oe,J as re,N as ae,ak as se,al as le,am as ce,Q as ue,an as de,ao as he,ap as pe,_ as ge,aq as fe,ar as ve,as as ye,at as me,au as be,av as ke,aw as xe,ax as we,ay as Ce,az as Le,aA as Ee,aB as Pe,aC as Ne,aD as Te,aE as De,aF as Se,aG as Oe,aH as Ae,aI as ze,aJ as Ie,aK as Me,aL as He,aM as _e,V as Ve,Y as je,X as Fe,aN as Re,aO as Be,aP as Ue,aQ as Ge,U as Ze,aR as We,aS as Xe,aT as Ye,aU as Ke,e as qe,T as $e,aV as Je,aW as Qe,S as et,I as tt,aX as nt}from"./canvas-constants-3e720cc5.js";import{C as it}from"./common-canvas-utils-cc218b20.js";import{K as ot}from"./keyboard-utils-18c50c59.js";import{I as rt,L as at,h as st,i as lt,j as ct,k as ut,l as dt,F as ht}from"./icon-5f32b619.js";import{L as pt}from"./canvas-logger-037c0c68.js";import{g as gt,h as ft,f as vt,b as yt}from"./bucket-3-64d04e07.js";import{i as mt,s as bt}from"./isArrayLikeObject-058fae1a.js";import kt from"./lib/tooltip.es.js";import xt from"react-resize-detector";import{d as wt,_ as Ct,i as Lt,a as Et}from"./canvas-controller-c134dba5.js";import{C as Pt,a as Nt}from"./context-menu-wrapper-eb9cc697.js";import{_ as Tt,$ as Dt,a0 as St,a1 as Ot,z as At,a2 as zt}from"./bucket-9-7ad0e1b8.js";import{i as It,I as Mt}from"./iconPropTypes-4cbeb95d-f4b5dc39.js";import"prop-types";import{c as Ht}from"./en-872b9ff3.js";import _t from"react-dom";var Vt,jt,Ft,Rt,Bt,Ut,Gt,Zt,Wt,Xt,Yt,Kt,qt,$t,Jt,Qt,en,tn,nn,on,rn,an,sn,ln,cn,un,dn,hn,pn,gn,fn,vn,yn,mn,bn,kn,xn,wn,Cn,Ln,En,Pn,Nn,Tn,Dn,Sn,On,An,zn,In,Mn,Hn,_n,Vn,jn,Fn,Rn,Bn,Un,Gn,Zn,Wn,Xn,Yn,Kn,qn,$n,Jn,Qn,ei,ti,ni,ii,oi,ri,ai,si,li,ci,ui,di,hi,pi,gi,fi,vi,yi,mi,bi,ki,xi,wi,Ci,Li,Ei,Pi,Ni,Ti,Di,Si,Oi,Ai,zi,Ii,Mi,Hi,_i,Vi,ji,Fi,Ri,Bi,Ui,Gi,Zi,Wi,Xi,Yi,Ki,qi,$i,Ji,Qi,eo,to,no,io,oo,ro,ao,so,lo,co,uo,ho,po,go,fo,vo,yo,mo,bo,ko,xo,wo,Co,Lo,Eo,Po,No,To,Do,So,Oo,Ao,zo,Io,Mo,Ho,_o,Vo,jo,Fo,Ro,Bo,Uo,Go,Zo,Wo,Xo,Yo,Ko,qo,$o,Jo,Qo,er,tr,nr,ir,or,rr,ar,sr,lr,cr,ur,dr,hr,pr,gr,fr,vr,yr,mr,br,kr,xr,wr,Cr,Lr,Er,Pr,Nr,Tr,Dr,Sr,Or,Ar,zr,Ir,Mr,Hr,_r,Vr,jr,Fr,Rr,Br,Ur,Gr,Zr,Wr,Xr,Yr,Kr,qr,$r;const Jr=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Vt||(Vt=a.createElement("path",{d:"m9,20l1.4141,1.4141-2.5859,2.5859h18.1719s0-20,0-20h2v20c0,1.1025-.897,2-2,2H7.8281s2.5859,2.5859,2.5859,2.5859l-1.4141,1.4141-5-5,5-5Z"})),n)}));"production"!==process.env.NODE_ENV&&(Jr.propTypes=It);const Qr=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},jt||(jt=a.createElement("path",{d:"M16,30A14.0158,14.0158,0,0,1,2,16H4A12.0025,12.0025,0,0,0,22.4609,26.1143l1.0782,1.684A13.9511,13.9511,0,0,1,16,30Z"})),Ft||(Ft=a.createElement("path",{d:"M26,17l-1.4141,1.4141L26.1719,20H15.8157a2.9874,2.9874,0,0,0-.2742-.5762l4.481-5.601A2.9676,2.9676,0,0,0,21,14a3,3,0,1,0-2.8157-4H13.8157a2.982,2.982,0,0,0-5.6314,0H2v2H8.1843a2.982,2.982,0,0,0,5.6314,0h4.3686a2.9874,2.9874,0,0,0,.2742.5762l-4.481,5.601A2.9676,2.9676,0,0,0,13,18a3,3,0,1,0,2.8157,4H26.1719l-1.586,1.5859L26,25l4-4Zm-5-7a1,1,0,1,1-1,1A1.0009,1.0009,0,0,1,21,10ZM11,12a1,1,0,1,1,1-1A1.0009,1.0009,0,0,1,11,12Zm2,10a1,1,0,1,1,1-1A1.0009,1.0009,0,0,1,13,22Z"})),Rt||(Rt=a.createElement("path",{d:"M30,16H28A12.0025,12.0025,0,0,0,9.5391,5.8857L8.4609,4.2017A14.0019,14.0019,0,0,1,30,16Z"})),n)}));"production"!==process.env.NODE_ENV&&(Qr.propTypes=It);const ea=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Bt||(Bt=a.createElement("path",{d:"M15.3472 29.9851a13.9282 13.9282 0 01-4.2051-.8516l.6943-1.8754a11.929 11.929 0 003.6026.729zm4.2651-.4558l-.5146-1.9326a11.915 11.915 0 003.3632-1.4827l1.0782 1.6846A13.915 13.915 0 0119.6123 29.5293zM7.395 27.0439a14.0632 14.0632 0 01-2.94-3.1218l1.6484-1.1333a12.0521 12.0521 0 002.522 2.6785zM2.5967 20.0544A14.0512 14.0512 0 012.0005 16H4a12.0412 12.0412 0 00.5117 3.4763zM26 17l-1.4141 1.4141L26.1719 20H15.8157a2.9874 2.9874 0 00-.2742-.5762l4.481-5.601A2.9676 2.9676 0 0021 14a3 3 0 10-2.8157-4H13.8157a2.982 2.982 0 00-5.6314 0H2v2H8.1843a2.982 2.982 0 005.6314 0h4.3686a2.9874 2.9874 0 00.2742.5762l-4.481 5.601A2.9676 2.9676 0 0013 18a3 3 0 102.8157 4H26.1719l-1.586 1.5859L26 25l4-4zm-5-7a1 1 0 11-1 1A1.0009 1.0009 0 0121 10zM11 12a1 1 0 111-1A1.0009 1.0009 0 0111 12zm2 10a1 1 0 111-1A1.0009 1.0009 0 0113 22zM28 16a12.0412 12.0412 0 00-.5117-3.4763l1.915-.5781A14.0551 14.0551 0 0130 16zM25.8965 9.2112a12.0521 12.0521 0 00-2.522-2.6785l1.23-1.5766a14.0632 14.0632 0 012.94 3.1218zM9.5391 5.886L8.4609 4.2014a13.915 13.915 0 013.9268-1.7307l.5146 1.9326A11.915 11.915 0 009.5391 5.886zM20.1636 4.7419a11.929 11.929 0 00-3.6026-.729l.0918-1.998a13.9282 13.9282 0 014.2051.8516z"})),n)}));"production"!==process.env.NODE_ENV&&(ea.propTypes=It);const ta=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ut||(Ut=a.createElement("path",{strokeWidth:"0",d:"M22.7749 20.5022h-.0862c-.3101.8959-1.0334 1.7056-2.5151 1.7056-1.8433 0-2.877-1.2749-2.877-3.5144v-5.6849h2.2051v5.4609c0 1.2404.4651 1.9122 1.5161 1.9122.8784 0 1.7571-.4651 1.7571-1.4298v-5.9434h2.2051v8.9926h-2.2051v-1.4988zM6.6195 20.2094l1.5332-1.4816c.8269.9647 1.8433 1.4816 3.0837 1.4816 1.3953 0 2.1189-.6719 2.1189-1.6882 0-.8097-.3789-1.3093-1.6367-1.5332l-1.137-.1724c-2.429-.3789-3.6003-1.5332-3.6003-3.4971 0-2.1534 1.6709-3.5488 4.3584-3.5488 1.8088 0 3.1526.6202 4.1172 1.7744l-1.5503 1.4644c-.5857-.7408-1.4126-1.2404-2.6875-1.2404-1.292 0-1.9639.5168-1.9639 1.4126 0 .9131.5168 1.292 1.6711 1.4988l1.1196.2067c2.429.4308 3.5662 1.516 3.5662 3.4972 0 2.2739-1.6367 3.8245-4.5137 3.8245-2.05 0-3.4626-.8097-4.479-1.9984z"})),Gt||(Gt=a.createElement("path",{strokeWidth:"0",d:"m28,30H4c-1.1046,0-2-.8954-2-2V4c0-1.1046.8954-2,2-2h24c1.1046,0,2,.8954,2,2v24c0,1.1046-.8954,2-2,2Zm-24-2h24V4H4v24Z"})),n)}));"production"!==process.env.NODE_ENV&&(ta.propTypes=It);const na=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Zt||(Zt=a.createElement("path",{strokeWidth:"0",d:"M22.7749 20.5022h-.0862c-.3101.8959-1.0334 1.7056-2.5151 1.7056-1.8433 0-2.877-1.2749-2.877-3.5144v-5.6849h2.2051v5.4609c0 1.2404.4651 1.9122 1.5161 1.9122.8784 0 1.7571-.4651 1.7571-1.4298v-5.9434h2.2051v8.9926h-2.2051v-1.4988zM6.6195 20.2094l1.5332-1.4816c.8269.9647 1.8433 1.4816 3.0837 1.4816 1.3953 0 2.1189-.6719 2.1189-1.6882 0-.8097-.3789-1.3093-1.6367-1.5332l-1.137-.1724c-2.429-.3789-3.6003-1.5332-3.6003-3.4971 0-2.1534 1.6709-3.5488 4.3584-3.5488 1.8088 0 3.1526.6202 4.1172 1.7744l-1.5503 1.4644c-.5857-.7408-1.4126-1.2404-2.6875-1.2404-1.292 0-1.9639.5168-1.9639 1.4126 0 .9131.5168 1.292 1.6711 1.4988l1.1196.2067c2.429.4308 3.5662 1.516 3.5662 3.4972 0 2.2739-1.6367 3.8245-4.5137 3.8245-2.05 0-3.4626-.8097-4.479-1.9984z"})),Wt||(Wt=a.createElement("path",{strokeWidth:"0",d:"m21,30h-10c-4.9626,0-9-4.0374-9-9v-10C2,6.0374,6.0374,2,11,2h10c4.9626,0,9,4.0374,9,9v10c0,4.9626-4.0374,9-9,9ZM11,4c-3.8599,0-7,3.1401-7,7v10c0,3.8599,3.1401,7,7,7h10c3.8599,0,7-3.1401,7-7v-10c0-3.8599-3.1401-7-7-7h-10Z"})),n)}));"production"!==process.env.NODE_ENV&&(na.propTypes=It);const ia=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Xt||(Xt=a.createElement("path",{d:"M18 14H30V16H18zM18 19H26V21H18zM18 9H30V11H18z"})),Yt||(Yt=a.createElement("path",{d:"M22,24v4H6V16h8V14H10V8a4.0008,4.0008,0,0,1,7.6675-1.6L19.5005,5.6A6.001,6.001,0,0,0,8,8v6H6a2.0023,2.0023,0,0,0-2,2V28a2.0023,2.0023,0,0,0,2,2H22a2.0023,2.0023,0,0,0,2-2V24Z"})),n)}));"production"!==process.env.NODE_ENV&&(ia.propTypes=It);const oa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Kt||(Kt=a.createElement("path",{d:"M8 15H24V17H8z"})),n)}));"production"!==process.env.NODE_ENV&&(oa.propTypes=It);const ra=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},qt||(qt=a.createElement("path",{d:"M16,4c6.6,0,12,5.4,12,12s-5.4,12-12,12S4,22.6,4,16S9.4,4,16,4 M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14 S23.7,2,16,2z"})),$t||($t=a.createElement("path",{d:"M8 15H24V17H8z"})),n)}));"production"!==process.env.NODE_ENV&&(ra.propTypes=It);const aa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Jt||(Jt=a.createElement("path",{d:"m16,2c-7.6,0-14,6.4-14,14s6.4,14,14,14,14-6.4,14-14S23.6,2,16,2Zm8,15H8v-2h16v2Z"})),Qt||(Qt=a.createElement("path",{fill:"none",d:"M24 17L8 17 8 15 24 15 24 17z"})),n)}));"production"!==process.env.NODE_ENV&&(aa.propTypes=It);const sa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},en||(en=a.createElement("path",{d:"M5 15L5 17 27 17 27 15 5 15z"})),n)}));"production"!==process.env.NODE_ENV&&(sa.propTypes=It);const la=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},tn||(tn=a.createElement("path",{strokeWidth:"0",d:"M19 27H21V31H19z",transform:"rotate(90 20 29)"})),nn||(nn=a.createElement("path",{strokeWidth:"0",d:"M25 27H27V31H25z",transform:"rotate(90 26 29)"})),on||(on=a.createElement("path",{strokeWidth:"0",d:"M13 28v-3h-2v3c0 1.1046.8954 2 2 2h3v-2h-3zM11 19H13V23H11zM11 13H13V17H11z"})),rn||(rn=a.createElement("path",{strokeWidth:"0",d:"M22 12L12 2 2 12 3.4141 13.4141 11 5.8281 11 11 13 11 13 5.8281 20.5859 13.4141 22 12z"})),n)}));"production"!==process.env.NODE_ENV&&(la.propTypes=It);const ca=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},an||(an=a.createElement("path",{d:"M7.6667 27.5027L2 22.4484l1.3311-1.4927 5.6411 5.0316 7.6906-7.4449a1.9282 1.9282 0 012.6736-.0084L22.96 21.9983l5.5791-5.9735L30 17.3905l-5.5812 5.9758a1.996 1.996 0 01-2.8379.08l-3.5765-3.4191-7.666 7.4206A1.9629 1.9629 0 017.6667 27.5027zM30 11L26 11 28 8 30 11zM22 4H18V6h4V8H19v2h3v2H18v2h4a2.0027 2.0027 0 002-2V6A2.0023 2.0023 0 0022 4zM16 14H10V10a2.002 2.002 0 012-2h2V6H10V4h4a2.0023 2.0023 0 012 2V8a2.0023 2.0023 0 01-2 2H12v2h4zM6 12L6 4 4 4 4 5 2 5 2 7 4 7 4 12 2 12 2 14 8 14 8 12 6 12z"})),n)}));"production"!==process.env.NODE_ENV&&(ca.propTypes=It);const ua=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},sn||(sn=a.createElement("path",{d:"M24.3 27.5l5.7-5.1L28.7 21 23 26l-7.7-7.4c-.7-.7-1.9-.7-2.7 0L9 22l-5.6-6L2 17.4l5.6 6c.8.8 2 .8 2.8.1L14 20l7.7 7.4C22.4 28.2 23.6 28.2 24.3 27.5zM28 12L28 4 26 4 26 5 24 5 24 7 26 7 26 12 24 12 24 14 30 14 30 12zM22 14h-6v-4c0-1.1.9-2 2-2h2V6h-4V4h4c1.1 0 2 .9 2 2v2c0 1.1-.9 2-2 2h-2v2h4V14zM12 4H8v2h4v2H9v2h3v2H8v2h4c1.1 0 2-.9 2-2V6C14 4.9 13.1 4 12 4zM6 11L2 11 4 8z"})),n)}));"production"!==process.env.NODE_ENV&&(ua.propTypes=It);const da=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ln||(ln=a.createElement("path",{d:"M16,12a4,4,0,1,1-4,4,4.0045,4.0045,0,0,1,4-4m0-2a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z",transform:"translate(0 .005)"})),cn||(cn=a.createElement("path",{d:"M6.854 5.375H8.854V10.333H6.854z",transform:"rotate(-45 7.86 7.856)"})),un||(un=a.createElement("path",{d:"M2 15.005H7V17.005000000000003H2z"})),dn||(dn=a.createElement("path",{d:"M5.375 23.147H10.333V25.147H5.375z",transform:"rotate(-45 7.86 24.149)"})),hn||(hn=a.createElement("path",{d:"M15 25.005H17V30.005H15z"})),pn||(pn=a.createElement("path",{d:"M23.147 21.668H25.147V26.625999999999998H23.147z",transform:"rotate(-45 24.152 24.149)"})),gn||(gn=a.createElement("path",{d:"M25 15.005H30V17.005000000000003H25z"})),fn||(fn=a.createElement("path",{d:"M21.668 6.854H26.625999999999998V8.854H21.668z",transform:"rotate(-45 24.152 7.856)"})),vn||(vn=a.createElement("path",{d:"M15 2.005H17V7.005H15z"})),n)}));"production"!==process.env.NODE_ENV&&(da.propTypes=It);const ha=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},yn||(yn=a.createElement("path",{d:"M2 27H29.998V29H2zM16 20a4.0045 4.0045 0 014 4h2a6 6 0 00-12 0h2A4.0045 4.0045 0 0116 20zM25 22H30V24H25z"})),mn||(mn=a.createElement("path",{d:"M21.668 14.854H26.625999999999998V16.854H21.668z",transform:"rotate(-45 24.146 15.854)"})),bn||(bn=a.createElement("path",{d:"M16 4L11 9 12.41 10.41 15 7.83 15 8 15 15 17 15 17 8 17 7.83 19.59 10.41 21 9 16 4z"})),kn||(kn=a.createElement("path",{d:"M6.854 13.374H8.854V18.332H6.854z",transform:"rotate(-45 7.854 15.854)"})),xn||(xn=a.createElement("path",{d:"M2 22H7V24H2z"})),n)}));"production"!==process.env.NODE_ENV&&(ha.propTypes=It);const pa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},wn||(wn=a.createElement("path",{d:"M2 27.005H29.998V29.005H2z"})),Cn||(Cn=a.createElement("path",{d:"M16,20a4.0045,4.0045,0,0,1,4,4h2a6,6,0,0,0-12,0h2A4.0045,4.0045,0,0,1,16,20Z",transform:"translate(0 .005)"})),Ln||(Ln=a.createElement("path",{d:"M25 22.005H30V24.005H25z"})),En||(En=a.createElement("path",{d:"M21.668 14.854H26.625999999999998V16.854H21.668z",transform:"rotate(-45 24.152 15.856)"})),Pn||(Pn=a.createElement("path",{d:"M19.59 9.595L17 12.175 17 4.005 15 4.005 15 12.175 12.41 9.595 11 11.005 16 16.005 21 11.005 19.59 9.595z"})),Nn||(Nn=a.createElement("path",{d:"M6.854 13.374H8.854V18.332H6.854z",transform:"rotate(-45 7.86 15.856)"})),Tn||(Tn=a.createElement("path",{d:"M2 22.005H7V24.005H2z"})),n)}));"production"!==process.env.NODE_ENV&&(pa.propTypes=It);const ga=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Dn||(Dn=a.createElement("circle",{cx:"26",cy:"18",r:"4"})),Sn||(Sn=a.createElement("circle",{cx:"18",cy:"26",r:"4"})),On||(On=a.createElement("path",{d:"M-2.799 15H34.799V17H-2.799z",transform:"rotate(-45 16 16)"})),An||(An=a.createElement("path",{d:"M14 10c-2.2056 0-4-1.7944-4-4s1.7944-4 4-4 4 1.7944 4 4-1.7944 4-4 4zm0-6c-1.1028 0-2 .8972-2 2s.8972 2 2 2 2-.8972 2-2-.8972-2-2-2zM6 18c-2.2056 0-4-1.7944-4-4s1.7944-4 4-4 4 1.7944 4 4-1.7944 4-4 4zm0-6c-1.1028 0-2 .8972-2 2s.8972 2 2 2 2-.8972 2-2-.8972-2-2-2z"})),n)}));"production"!==process.env.NODE_ENV&&(ga.propTypes=It);const fa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},zn||(zn=a.createElement("path",{d:"m21.5708,27.7495c-1.7468.8296-3.6211,1.2505-5.5708,1.2505-7.1682,0-13-5.832-13-13,0-3.0752,1.0571-5.979,3-8.3076v2.3076h2v-6H2v2h2.8416c-2.4753,2.7539-3.8416,6.2622-3.8416,10,0,8.271,6.729,15,15,15,2.249,0,4.4119-.4858,6.4292-1.4438l-.8584-1.8066Z"})),In||(In=a.createElement("path",{d:"m21,9c-3.1602,0-5.7515,2.457-5.9778,5.5605-1.0654-.9658-2.4739-1.5605-4.0222-1.5605h-4v4c0,3.3086,2.6917,6,6,6h2v4h2v-8.0005l2,.0005c3.3083,0,6-2.6914,6-6v-4h-4Zm-8,12c-2.2056,0-4-1.7944-4-4v-2h2c2.2056,0,4,1.7944,4,4v.5859l-2.293-2.293-1.4141,1.4141,2.293,2.293h-.5859Zm10-8c0,2.2056-1.7944,4-4,4h-.5859l2.293-2.293-1.4141-1.4141-2.293,2.293v-.5859c0-2.2056,1.7944-4,4-4h2v2Z"})),Mn||(Mn=a.createElement("path",{d:"m31,16c0-8.271-6.729-15-15-15-2.249,0-4.4119.4858-6.4292,1.4438l.8584,1.8066c1.7468-.8296,3.6211-1.2505,5.5708-1.2505,7.1682,0,13,5.832,13,13,0,3.0752-1.0571,5.979-3,8.3076v-2.3076h-2v6h6v-2h-2.8416c2.4753-2.7539,3.8416-6.2622,3.8416-10Z"})),n)}));"production"!==process.env.NODE_ENV&&(fa.propTypes=It);const va=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Hn||(Hn=a.createElement("path",{d:"M30 23H24a2 2 0 01-2-2V11a2 2 0 012-2h6v2H24V21h4V17H26V15h4zM18 9L16 22 14 9 12 9 14.52 23 17.48 23 20 9 18 9zM8 23H2V21H8V17H4a2 2 0 01-2-2V11A2 2 0 014 9h6v2H4v4H8a2 2 0 012 2v4A2 2 0 018 23z"})),n)}));"production"!==process.env.NODE_ENV&&(va.propTypes=It);const ya=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},_n||(_n=a.createElement("path",{d:"M30 26H28a4.9316 4.9316 0 01-4-1.9873 5.0192 5.0192 0 01-8 0 5.0192 5.0192 0 01-8 0A4.9316 4.9316 0 014 26H2V24H4a3.44 3.44 0 003.0532-2.3215A.9712.9712 0 018 21a1.0069 1.0069 0 01.9487.6838A3.4381 3.4381 0 0012 24a3.44 3.44 0 003.0532-2.3215A.99.99 0 0116 21a1.0069 1.0069 0 01.9487.6838A3.4381 3.4381 0 0020 24a3.44 3.44 0 003.0532-2.3215 1 1 0 011.8955.0053A3.4381 3.4381 0 0028 24h2zM23 17.5859l-8.707-8.707A2.9791 2.9791 0 0012.1714 8H4v2h8.1714a.9933.9933 0 01.7075.293L15.5859 13 10 18.5859 11.4141 20 17 14.4141 21.5859 19zM20 10a4 4 0 114 4A4.0042 4.0042 0 0120 10zm2 0a2 2 0 102-2A2.0023 2.0023 0 0022 10z"})),n)}));"production"!==process.env.NODE_ENV&&(ya.propTypes=It);const ma=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Vn||(Vn=a.createElement("path",{d:"M16 26L16 24 5.83 24 8.41 21.41 7 20 2 25 7 30 8.41 28.59 5.83 26 16 26zM16 14L16 12 5.83 12 8.41 9.41 7 8 2 13 7 18 8.41 16.59 5.83 14 16 14zM16 6L16 8 26.17 8 23.59 10.59 25 12 30 7 25 2 23.59 3.41 26.17 6 16 6zM16 18L16 20 26.17 20 23.59 22.59 25 24 30 19 25 14 23.59 15.41 26.17 18 16 18z"})),n)}));"production"!==process.env.NODE_ENV&&(ma.propTypes=It);const ba=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},jn||(jn=a.createElement("path",{d:"M22 4L22 6 24.586 6 19.586 11 21 12.414 26 7.414 26 10 28 10 28 4 22 4zM10 4L10 6 7.414 6 12.414 11 11 12.414 6 7.414 6 10 4 10 4 4 10 4zM20 5L16 1 12 5 13.414 6.414 15 4.829 15 11 17 11 17 4.829 18.586 6.414 20 5zM22 28L22 26 24.586 26 19.586 21 21 19.586 26 24.586 26 22 28 22 28 28 22 28zM10 28L10 26 7.414 26 12.414 21 11 19.586 6 24.586 6 22 4 22 4 28 10 28zM20 27L16 31 12 27 13.414 25.586 15 27.171 15 21 17 21 17 27.171 18.586 25.586 20 27zM5 12L1 16 5 20 6.414 18.586 4.829 17 11 17 11 15 4.829 15 6.414 13.414 5 12zM27 12L31 16 27 20 25.586 18.586 27.171 17 21 17 21 15 27.171 15 25.586 13.414 27 12z"})),n)}));"production"!==process.env.NODE_ENV&&(ba.propTypes=It);const ka=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Fn||(Fn=a.createElement("path",{d:"M14 4H18V8H14zM4 4H8V8H4zM24 4H28V8H24zM14 14H18V18H14zM4 14H8V18H4zM24 14H28V18H24zM14 24H18V28H14zM4 24H8V28H4zM24 24H28V28H24z"})),n)}));"production"!==process.env.NODE_ENV&&(ka.propTypes=It);const xa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Rn||(Rn=a.createElement("path",{strokeWidth:"0",d:"M15 24L15 22 11.4 22 22 11.4 22 15 24 15 24 8 17 8 17 10 20.6 10 10 20.6 10 17 8 17 8 24 15 24zM25 20v2h3c1.1 0 2-.9 2-2v-3h-2v3h-3zM28 10H30V14H28zM25 2v2h3v3h2v-3c0-1.1-.9-2-2-2h-3zM18 2H22V4H18z"})),Bn||(Bn=a.createElement("path",{strokeWidth:"0",d:"M10 4v3h2v-3h3V2h-3c-1.1 0-2 .9-2 2zM12 10H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-8h-2v8H4V12h8v-2z"})),n)}));"production"!==process.env.NODE_ENV&&(xa.propTypes=It);const wa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Un||(Un=a.createElement("path",{d:"M21 20L21 30 30 25 21 20z"})),Gn||(Gn=a.createElement("circle",{cx:"14",cy:"14",r:"2"})),Zn||(Zn=a.createElement("path",{d:"M14,20a6,6,0,1,1,6-6A6.0066,6.0066,0,0,1,14,20Zm0-10a4,4,0,1,0,4,4A4.0045,4.0045,0,0,0,14,10Z"})),Wn||(Wn=a.createElement("path",{d:"M25.9512,12.91l-.0064,0A12.05,12.05,0,1,0,17,25.605V23.5386a9.9813,9.9813,0,1,1,6.6235-6.81l1.9248.544A12.0341,12.0341,0,0,0,26,14Q26,13.4492,25.9512,12.91Z"})),n)}));"production"!==process.env.NODE_ENV&&(wa.propTypes=It);const Ca=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Xn||(Xn=a.createElement("path",{strokeWidth:"0",d:"M4 26H8V30H4zM14 26H18V30H14zM24 26H28V30H24zM25 18h-8v-2h-2v2H7c-1.1028 0-2 .8975-2 2v4h2v-4h8v4h2v-4h8v4h2v-4c0-1.1025-.8972-2-2-2zM20 2h-8c-1.1028 0-2 .8975-2 2v8c0 1.1025.8972 2 2 2h8c1.1028 0 2-.8975 2-2V4c0-1.1025-.8972-2-2-2zm-1.4141 2l-6.5859 6.5859v-6.5859h6.5859zm-5.1719 8l6.5862-6.5859.001 6.5859h-6.5872z"})),n)}));"production"!==process.env.NODE_ENV&&(Ca.propTypes=It);const La=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Yn||(Yn=a.createElement("path",{d:"M12 11L15 11 15 23 17 23 17 11 20 11 20 9 12 9 12 11z"})),n)}));"production"!==process.env.NODE_ENV&&(La.propTypes=It);const Ea=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Kn||(Kn=a.createElement("path",{d:"M8 11L11 11 11 23 13 23 13 11 16 11 16 9 8 9 8 11zM24 9L22 9 22 7 20 7 20 9 18 9 18 11 20 11 20 17 21 18 22 17 22 11 24 11 24 9z"})),n)}));"production"!==process.env.NODE_ENV&&(Ea.propTypes=It);const Pa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},qn||(qn=a.createElement("path",{d:"M29,5a2,2,0,0,0-2-2H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2ZM27,5V9H5V5Zm0,22H5V23H27Zm0-6H5V17H27Zm0-6H5V11H27Z"})),n)}));"production"!==process.env.NODE_ENV&&(Pa.propTypes=It);const Na=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},$n||($n=a.createElement("path",{d:"M12,29H5a2.0021,2.0021,0,0,1-2-2V20a2.0021,2.0021,0,0,1,2-2h7a2.0021,2.0021,0,0,1,2,2v7A2.0021,2.0021,0,0,1,12,29ZM5,20v7h7V20Z"})),Jn||(Jn=a.createElement("path",{d:"M27,3H5A2,2,0,0,0,3,5V15H5V11H15v4h2V11H27v7H17v2H27v7H17v2H27a2,2,0,0,0,2-2V5A2,2,0,0,0,27,3Zm0,6H5V5H27Z"})),n)}));"production"!==process.env.NODE_ENV&&(Na.propTypes=It);const Ta=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Qn||(Qn=a.createElement("path",{d:"M28,8H24V4a2.0025,2.0025,0,0,0-2-2H4A2.0025,2.0025,0,0,0,2,4V22a2.0025,2.0025,0,0,0,2,2H8v4a2.0025,2.0025,0,0,0,2,2H28a2.0025,2.0025,0,0,0,2-2V10A2.0025,2.0025,0,0,0,28,8ZM22,22H14V17h8Zm0-7H14V10h8ZM12,15H4V10h8ZM22,4V8H4V4ZM4,22V17h8v5Zm24,6H10V24H22a2.0025,2.0025,0,0,0,2-2V10h4Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ta.propTypes=It);const Da=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ei||(ei=a.createElement("path",{d:"M5 18L5 20 10.586 20 3 27.586 4.414 29 12 21.414 12 27 14 27 14 18 5 18z"})),ti||(ti=a.createElement("path",{d:"M27,3H5A2,2,0,0,0,3,5V15H5V11H15v4h2V11H27v7H17v2H27v7H17v2H27a2,2,0,0,0,2-2V5A2,2,0,0,0,27,3Zm0,6H5V5H27Z"})),n)}));"production"!==process.env.NODE_ENV&&(Da.propTypes=It);const Sa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ni||(ni=a.createElement("path",{d:"M27,3H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2V5A2,2,0,0,0,27,3Zm0,2V9H5V5ZM17,11H27v7H17Zm-2,7H5V11H15ZM5,20H15v7H5Zm12,7V20H27v7Z"})),n)}));"production"!==process.env.NODE_ENV&&(Sa.propTypes=It);const Oa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ii||(ii=a.createElement("path",{d:"M4 6H22V8H4zM4 12H22V14H4zM4 18H22V20H4zM4 24H22V26H4zM26 6H28V8H26zM26 12H28V14H26zM26 18H28V20H26zM26 24H28V26H26z"})),n)}));"production"!==process.env.NODE_ENV&&(Oa.propTypes=It);const Aa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},oi||(oi=a.createElement("path",{d:"M15 22H17V28H15z",transform:"rotate(90 16 25)"})),ri||(ri=a.createElement("path",{d:"M25,30H7a2.0023,2.0023,0,0,1-2-2V4A2.002,2.002,0,0,1,7,2H25a2.0023,2.0023,0,0,1,2,2V28A2.0027,2.0027,0,0,1,25,30ZM7,4V28H25V4Z"})),n)}));"production"!==process.env.NODE_ENV&&(Aa.propTypes=It);const za=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ai||(ai=a.createElement("path",{d:"M24 13H26V19H24z"})),si||(si=a.createElement("path",{d:"M30,7V25a2.0023,2.0023,0,0,1-2,2H4a2.002,2.002,0,0,1-2-2V7A2.0023,2.0023,0,0,1,4,5H28A2.0027,2.0027,0,0,1,30,7ZM4,25H28V7H4Z"})),n)}));"production"!==process.env.NODE_ENV&&(za.propTypes=It);const Ia=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},li||(li=a.createElement("path",{d:"M10,14a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,10,14Zm0-6a2,2,0,1,0,1.998,2.0044A2.002,2.002,0,0,0,10,8Z"})),ci||(ci=a.createElement("path",{d:"M16.6436,29.4145,2.5858,15.3555A2,2,0,0,1,2,13.9414V4A2,2,0,0,1,4,2h9.9413a2,2,0,0,1,1.4142.5858L29.4144,16.6436a2.0005,2.0005,0,0,1,0,2.8285l-9.9424,9.9425a2.0008,2.0008,0,0,1-2.8285,0ZM4,4v9.9417L18.0578,28,28,18.0579,13.9416,4Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ia.propTypes=It);const Ma=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ui||(ui=a.createElement("path",{d:"M29.707 7.293l-3-3a.9994.9994 0 00-1.414 0L16 13.5859V18h4.4141L29.707 8.707A.9994.9994 0 0029.707 7.293zM19.5859 16H18V14.4141l5-5L24.5859 11zM26 9.5859L24.4141 8 26 6.4141 27.5859 8zM10 14a4 4 0 114-4A4.0045 4.0045 0 0110 14zm0-6a2 2 0 101.998 2.0044A2.002 2.002 0 0010 8z"})),di||(di=a.createElement("path",{d:"M27.0059,14.2354l-1.4141,1.414L28,18.0576,18.0579,28,4,13.9414V4h9.9417l4.4067,4.4067,1.4141-1.4145-4.407-4.4063A2,2,0,0,0,13.9414,2H4A2,2,0,0,0,2,4v9.9414a2,2,0,0,0,.5857,1.4141L16.6436,29.4146a2.001,2.001,0,0,0,2.8286,0l9.9424-9.9424a2.001,2.001,0,0,0,0-2.8286Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ma.propTypes=It);const Ha=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},hi||(hi=a.createElement("path",{d:"M31 18L25 12 23.586 13.414 27.172 17 17 17 17 19 27.172 19 23.586 22.586 25 24 31 18zM10 14a4 4 0 114-4A4.0045 4.0045 0 0110 14zm0-6a2 2 0 101.998 2.0044A2.002 2.002 0 0010 8z"})),pi||(pi=a.createElement("path",{d:"M21.0593,25l-3.0014,3L4,13.9414V4h9.9417l7,7,1.4143-1.414-7.001-7A2,2,0,0,0,13.9414,2H4A2,2,0,0,0,2,4v9.9414a2,2,0,0,0,.5857,1.4141L16.6436,29.4146a2.001,2.001,0,0,0,2.8286,0l3.0014-3Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ha.propTypes=It);const _a=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},gi||(gi=a.createElement("circle",{cx:"10",cy:"14",r:"2"})),fi||(fi=a.createElement("path",{d:"M16,30a1,1,0,0,1-.71-.29L4.59,19A2,2,0,0,1,4,17.59V10A2,2,0,0,1,6,8h7.59A2,2,0,0,1,15,8.59l10.71,10.7a1,1,0,0,1,0,1.42l-9,9A1,1,0,0,1,16,30ZM6,10v7.59l10,10L23.59,20l-10-10Z"})),vi||(vi=a.createElement("path",{d:"M27.71,13.29,17,2.59A2,2,0,0,0,15.59,2H8A2,2,0,0,0,6,4V6H8V4h7.59l10,10-1.3,1.29,1.42,1.42,2-2A1,1,0,0,0,27.71,13.29Z"})),n)}));"production"!==process.env.NODE_ENV&&(_a.propTypes=It);const Va=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},yi||(yi=a.createElement("path",{d:"M16 18L22 12 23.414 13.414 19.828 17 30 17 30 19 19.828 19 23.414 22.586 22 24 16 18zM10 14a4 4 0 114-4A4.0045 4.0045 0 0110 14zm0-6a2 2 0 101.998 2.0044A2.002 2.002 0 0010 8z"})),mi||(mi=a.createElement("path",{d:"M20.0586,26l-2.0007,2L4,13.9414V4h9.9417l6,6,1.4143-1.414-6.001-6A2,2,0,0,0,13.9414,2H4A2,2,0,0,0,2,4v9.9414a2,2,0,0,0,.5857,1.4141L16.6436,29.4146a2.001,2.001,0,0,0,2.8286,0l2.0006-2.0007Z"})),n)}));"production"!==process.env.NODE_ENV&&(Va.propTypes=It);const ja=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},bi||(bi=a.createElement("path",{d:"M23.092 10.3218L30 3.4141 28.5859 2 2 28.5859 3.4141 30l6.9077-6.9077 6.3218 6.3223a2.001 2.001 0 002.8286 0l9.9424-9.9424a2.001 2.001 0 000-2.8286zM18.0579 28l-6.3218-6.3223 9.9419-9.9419L28 18.0576zM10 14a4 4 0 114-4A4.0045 4.0045 0 0110 14zm0-6a2 2 0 101.998 2.0044A2.002 2.002 0 0010 8z"})),ki||(ki=a.createElement("path",{d:"M7.4927,20.2627l1.414-1.4141L4,13.9414V4h9.9417l4.9069,4.9067,1.4141-1.414L15.3555,2.5859A2,2,0,0,0,13.9414,2H4A2,2,0,0,0,2,4v9.9414a2,2,0,0,0,.5857,1.4141Z"})),n)}));"production"!==process.env.NODE_ENV&&(ja.propTypes=It);const Fa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},xi||(xi=a.createElement("path",{d:"M30,13V11H18.6182l-.7237-1.4473A1,1,0,0,0,17,9H9a1,1,0,0,0-1,1v5H4v2H22.6379l3.6,3H3a1,1,0,0,0-1,1v2a5.0057,5.0057,0,0,0,5,5H25a5.0057,5.0057,0,0,0,5-5V21a1.0011,1.0011,0,0,0-.36-.7686l-6-5A1.0015,1.0015,0,0,0,23,15H20.6182l-1-2ZM28,23a3.0033,3.0033,0,0,1-3,3H7a3.0033,3.0033,0,0,1-3-3V22H28ZM10,15V11h6.3821l2,4Z"})),n)}));"production"!==process.env.NODE_ENV&&(Fa.propTypes=It);const Ra=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},wi||(wi=a.createElement("path",{d:"M14 20.18L10.41 16.59 9 18 14 23 23 14 21.59 12.58 14 20.18z"})),Ci||(Ci=a.createElement("path",{d:"M25,5H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2H25a2,2,0,0,0,2-2V7A2,2,0,0,0,25,5ZM12,4h8V8H12ZM25,28H7V7h3v3H22V7h3Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ra.propTypes=It);const Ba=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Li||(Li=a.createElement("path",{d:"M31 24L27 24 27 20 25 20 25 24 21 24 21 26 25 26 25 30 27 30 27 26 31 26 31 24z"})),Ei||(Ei=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2H17V28H7V7h3v3H22V7h3v9h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ba.propTypes=It);const Ua=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Pi||(Pi=a.createElement("path",{d:"M30,20A6,6,0,1,0,20,24.46V32l4-1.8936L28,32V24.46A5.98,5.98,0,0,0,30,20Zm-4,8.84-2-.9467L22,28.84V25.65a5.8877,5.8877,0,0,0,4,0ZM24,24a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,24,24Z"})),Ni||(Ni=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h9V28H7V7h3v3H22V7h3v5h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ua.propTypes=It);const Ga=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ti||(Ti=a.createElement("path",{d:"M22.5,26A3.5,3.5,0,1,1,26,22.5,3.5041,3.5041,0,0,1,22.5,26Zm0-5A1.5,1.5,0,1,0,24,22.5,1.5017,1.5017,0,0,0,22.5,21Z"})),Di||(Di=a.createElement("path",{d:"M22.5,31A8.5,8.5,0,1,1,31,22.5,8.51,8.51,0,0,1,22.5,31Zm0-15A6.5,6.5,0,1,0,29,22.5,6.5074,6.5074,0,0,0,22.5,16Z"})),Si||(Si=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h5V28H7V7h3v3H22V7h3v5h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ga.propTypes=It);const Za=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Oi||(Oi=a.createElement("path",{d:"M22 27.18L19.41 24.59 18 26 22 30 30 22 28.59 20.59 22 27.18z"})),Ai||(Ai=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h9V28H7V7h3v3H22V7h3V18h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Za.propTypes=It);const Wa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},zi||(zi=a.createElement("circle",{cx:"24",cy:"21",r:"2"})),Ii||(Ii=a.createElement("path",{d:"M24,31l-4.7788-6.4019A5.9354,5.9354,0,0,1,18,21a6,6,0,0,1,12,0,5.9407,5.9407,0,0,1-1.2246,3.6028Zm0-14a4.0045,4.0045,0,0,0-4,4,3.9572,3.9572,0,0,0,.82,2.3972L24,27.6567l3.1763-4.2548A3.9627,3.9627,0,0,0,28,21,4.0045,4.0045,0,0,0,24,17Z"})),Mi||(Mi=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h9V28H7V7h3v3H22V7h3v5h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Wa.propTypes=It);const Xa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Hi||(Hi=a.createElement("path",{d:"M26.41 25L30 21.41 28.59 20 25 23.59 21.41 20 20 21.41 23.59 25 20 28.59 21.41 30 25 26.41 28.59 30 30 28.59 26.41 25z"})),_i||(_i=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h9V28H7V7h3v3H22V7h3V17h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Xa.propTypes=It);const Ya=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Vi||(Vi=a.createElement("path",{d:"M30,24V22H27.8989a4.9678,4.9678,0,0,0-.7319-1.7529l1.49-1.49-1.414-1.414-1.49,1.49A4.9678,4.9678,0,0,0,24,18.1011V16H22v2.1011a4.9678,4.9678,0,0,0-1.7529.7319l-1.49-1.49-1.414,1.414,1.49,1.49A4.9678,4.9678,0,0,0,18.1011,22H16v2h2.1011a4.9678,4.9678,0,0,0,.7319,1.7529l-1.49,1.49,1.414,1.414,1.49-1.49A4.9678,4.9678,0,0,0,22,27.8989V30h2V27.8989a4.9678,4.9678,0,0,0,1.7529-.7319l1.49,1.49,1.414-1.414-1.49-1.49A4.9678,4.9678,0,0,0,27.8989,24Zm-7,2a3,3,0,1,1,3-3A3.0033,3.0033,0,0,1,23,26Z"})),ji||(ji=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h7V28H7V7h3v3H22V7h3v6h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ya.propTypes=It);const Ka=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Fi||(Fi=a.createElement("path",{d:"M23 17L25.23 21.32 30 22 26.5 25.167 28 30 23 27.208 18 30 19.5 25.167 16 22 20.9 21.32 23 17z"})),Ri||(Ri=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h7V28H7V7h3v3H22V7h3v7h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ka.propTypes=It);const qa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Bi||(Bi=a.createElement("path",{d:"M28.5,32a3.4762,3.4762,0,0,1-2.4751-1.0254L21.897,26.8469a6.496,6.496,0,0,1-7.3482-8.9563l.5879-1.34L19.293,20.707a1.0234,1.0234,0,0,0,1.4135,0,.999.999,0,0,0,.0005-1.4141l-4.1562-4.1565,1.34-.5881a6.4965,6.4965,0,0,1,8.9566,7.3486l4.1274,4.1282A3.5,3.5,0,0,1,28.5,32Zm-6.03-7.4087,4.9693,4.9692a1.5352,1.5352,0,0,0,2.1211,0,1.4985,1.4985,0,0,0,0-2.1208v0l-4.9692-4.97.188-.5823A4.496,4.496,0,0,0,20.5,16q-.126,0-.25.0068l1.8716,1.8721a2.9992,2.9992,0,0,1,0,4.2424,3.0722,3.0722,0,0,1-4.2427-.0005l-1.8716-1.8715Q16,20.3741,16,20.5A4.4968,4.4968,0,0,0,21.8877,24.78Z"})),Ui||(Ui=a.createElement("path",{d:"M25,5H22V4a2.0058,2.0058,0,0,0-2-2H12a2.0058,2.0058,0,0,0-2,2V5H7A2.0058,2.0058,0,0,0,5,7V28a2.0058,2.0058,0,0,0,2,2h7V28H7V7h3v3H22V7h3v5h2V7A2.0058,2.0058,0,0,0,25,5ZM20,8H12V4h8Z"})),n)}));"production"!==process.env.NODE_ENV&&(qa.propTypes=It);const $a=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Gi||(Gi=a.createElement("circle",{cx:"22",cy:"24",r:"2"})),Zi||(Zi=a.createElement("path",{fill:"none",d:"M22,28a4,4,0,1,1,4-4A4.0039,4.0039,0,0,1,22,28Zm0-6a2,2,0,1,0,2,2A2.0027,2.0027,0,0,0,22,22Z"})),Wi||(Wi=a.createElement("path",{d:"M29.7769,23.4785A8.64,8.64,0,0,0,22,18a8.64,8.64,0,0,0-7.7769,5.4785L14,24l.2231.5215A8.64,8.64,0,0,0,22,30a8.64,8.64,0,0,0,7.7769-5.4785L30,24ZM22,28a4,4,0,1,1,4-4A4.0045,4.0045,0,0,1,22,28Z"})),Xi||(Xi=a.createElement("path",{d:"M12,28H7V7h3v3H22V7h3v9h2V7a2,2,0,0,0-2-2H22V4a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V5H7A2,2,0,0,0,5,7V28a2,2,0,0,0,2,2h5ZM12,4h8V8H12Z"})),n)}));"production"!==process.env.NODE_ENV&&($a.propTypes=It);const Ja=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Yi||(Yi=a.createElement("path",{d:"M4 4V6H8v8a8 8 0 0016 0V6h4V4zM22 14a6 6 0 01-12 0V6h5v8h2V6h5zM11 26H13V28H11zM7 24H9V26H7zM15 24H17V26H15zM19 26H21V28H19zM23 24H25V26H23z"})),n)}));"production"!==process.env.NODE_ENV&&(Ja.propTypes=It);const Qa=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ki||(Ki=a.createElement("path",{d:"M29.39,16.08,22.7,13.21,20.16,8.87l-.08-.12A2,2,0,0,0,18.52,8h-8a2,2,0,0,0-1.67.89L5.46,14H3a1,1,0,0,0-1,1v9a1,1,0,0,0,1,1H5.14a4,4,0,0,0,7.72,0h6.28a4,4,0,0,0,7.72,0H29a1,1,0,0,0,1-1V17A1,1,0,0,0,29.39,16.08ZM9,26a2,2,0,1,1,2-2A2,2,0,0,1,9,26Zm14,0a2,2,0,1,1,2-2A2,2,0,0,1,23,26Zm5-3H26.86a4,4,0,0,0-7.72,0H12.86a4,4,0,0,0-7.72,0H4V16H6a1,1,0,0,0,.83-.45L10.54,10h8l2.63,4.5a1,1,0,0,0,.47.42L28,17.66Z"})),n)}));"production"!==process.env.NODE_ENV&&(Qa.propTypes=It);const es=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},qi||(qi=a.createElement("path",{d:"M16 28H30V30H16zM27 26h-8c-1.1028 0-2-.8972-2-2v-5c0-1.1028.8972-2 2-2h8c1.1028 0 2 .8972 2 2v5c0 1.1028-.8972 2-2 2zm-8-7v5h8v-5h-8zM15 23h-5c-1.1028 0-2-.8972-2-2v-4h2v4h5v2zM2 13H16V15H2zM13 11H5c-1.1028 0-2-.8972-2-2V4c0-1.1028.8972-2 2-2H13c1.1028 0 2 .8972 2 2v5c0 1.1028-.8972 2-2 2zM5 4v5H13V4H5z"})),n)}));"production"!==process.env.NODE_ENV&&(es.propTypes=It);const ts=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},$i||($i=a.createElement("path",{d:"M13 17.26V6A4 4 0 005 6V17.26a7 7 0 108 0zM9 4a2 2 0 012 2v7H7V6A2 2 0 019 4zM9 28a5 5 0 01-2.5-9.33l.5-.28V15h4v3.39l.5.28A5 5 0 019 28zM20 4H30V6H20zM20 10H27V12H20zM20 16H30V18H20zM20 22H27V24H20z"})),n)}));"production"!==process.env.NODE_ENV&&(ts.propTypes=It);const ns=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ji||(Ji=a.createElement("path",{d:"M30,18H24a2.0023,2.0023,0,0,1-2-2V6a2.002,2.002,0,0,1,2-2h6V6H24V16h6Z"})),Qi||(Qi=a.createElement("circle",{cx:"18",cy:"4",r:"2"})),eo||(eo=a.createElement("path",{d:"M10,20.1841V12H8v8.1841a3,3,0,1,0,2,0Z"})),to||(to=a.createElement("path",{d:"M9,30A6.9931,6.9931,0,0,1,4,18.1108V7A5,5,0,0,1,14,7V18.1108A6.9931,6.9931,0,0,1,9,30ZM9,4A3.0033,3.0033,0,0,0,6,7V18.9834l-.332.2983a5,5,0,1,0,6.664,0L12,18.9834V7A3.0033,3.0033,0,0,0,9,4Z"})),n)}));"production"!==process.env.NODE_ENV&&(ns.propTypes=It);const is=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},no||(no=a.createElement("path",{d:"M26 27H17a2.0023 2.0023 0 01-2-2V11a2.002 2.002 0 012-2h9v2H17V25h9zM8 13a4 4 0 114-4h0A4.0118 4.0118 0 018 13zM8 7a2 2 0 102 2h0A2.0059 2.0059 0 008 7z"})),n)}));"production"!==process.env.NODE_ENV&&(is.propTypes=It);const os=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},io||(io=a.createElement("path",{d:"M30 6L30 4 22 4 22 18 24 18 24 12 29 12 29 10 24 10 24 6 30 6z"})),oo||(oo=a.createElement("circle",{cx:"18",cy:"4",r:"2"})),ro||(ro=a.createElement("path",{d:"M10,20.1841V12H8v8.1841a3,3,0,1,0,2,0Z"})),ao||(ao=a.createElement("path",{d:"M9,30A6.9931,6.9931,0,0,1,4,18.1108V7A5,5,0,0,1,14,7V18.1108A6.9931,6.9931,0,0,1,9,30ZM9,4A3.0033,3.0033,0,0,0,6,7V18.9834l-.332.2983a5,5,0,1,0,6.664,0L12,18.9834V7A3.0033,3.0033,0,0,0,9,4Z"})),n)}));"production"!==process.env.NODE_ENV&&(os.propTypes=It);const rs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},so||(so=a.createElement("path",{d:"M26 11L26 9 15 9 15 27 17 27 17 19 25 19 25 17 17 17 17 11 26 11zM8 13a4 4 0 114-4h0A4.0118 4.0118 0 018 13zM8 7a2 2 0 102 2h0A2.0059 2.0059 0 008 7z"})),n)}));"production"!==process.env.NODE_ENV&&(rs.propTypes=It);const as=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},lo||(lo=a.createElement("path",{d:"M26 30H22a2.0059 2.0059 0 01-2-2V21a2.0059 2.0059 0 01-2-2V13a2.9465 2.9465 0 013-3h6a2.9465 2.9465 0 013 3v6a2.0059 2.0059 0 01-2 2v7A2.0059 2.0059 0 0126 30zM21 12a.9448.9448 0 00-1 1v6h2v9h4V19h2V13a.9448.9448 0 00-1-1zM24 9a4 4 0 114-4h0A4.0118 4.0118 0 0124 9zm0-6a2 2 0 102 2h0a2.0059 2.0059 0 00-2-2zM10 20.1839V12H8v8.1839a3 3 0 102 0z"})),co||(co=a.createElement("path",{d:"M9,30A6.9931,6.9931,0,0,1,4,18.1108V7A5,5,0,0,1,14,7V18.1108A6.9931,6.9931,0,0,1,9,30ZM9,4A3.0033,3.0033,0,0,0,6,7V18.9834l-.332.2983a5,5,0,1,0,6.664,0L12,18.9834V7A3.0033,3.0033,0,0,0,9,4Z"})),n)}));"production"!==process.env.NODE_ENV&&(as.propTypes=It);const ss=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},uo||(uo=a.createElement("path",{d:"M27.167 16.89L21.72 13 27.167 9.109 29.684 9.948 30.316 8.051 28 7.279 28 5 26 5 26 7.485 21 11.057 21 5.367 23.555 3.664 22.445 2 20 3.63 17.555 2 16.445 3.664 19 5.367 19 11.057 16 8.914 16 11.372 18.28 13 16 14.628 16 17.086 19 14.943 19 21.703 22.445 24 23.555 22.336 21 20.633 21 14.943 26 18.515 26 21 28 21 28 18.721 30.316 17.948 29.684 16.051 27.167 16.89zM12 23a3 3 0 01-6 0z"})),ho||(ho=a.createElement("path",{d:"M9,30A6.9931,6.9931,0,0,1,4,18.1108V7A5,5,0,0,1,14,7V18.1108A6.9931,6.9931,0,0,1,9,30ZM9,4A3.0033,3.0033,0,0,0,6,7V18.9834l-.332.2983a5,5,0,1,0,6.664,0L12,18.9834V7A3.0033,3.0033,0,0,0,9,4Z"})),n)}));"production"!==process.env.NODE_ENV&&(ss.propTypes=It);const ls=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},po||(po=a.createElement("path",{d:"M26 13H30V15H26z"})),go||(go=a.createElement("path",{d:"M23.121 5.879H27.121V7.879H23.121z",transform:"rotate(-45 25.121 6.879)"})),fo||(fo=a.createElement("path",{d:"M24.121 19.121H26.121V23.121H24.121z",transform:"rotate(-45 25.121 21.121)"})),vo||(vo=a.createElement("path",{d:"M17 2H19V6H17zM18 8a6.0365 6.0365 0 00-1 .09v2.0518A3.9567 3.9567 0 0118 10a4 4 0 010 8v2A6 6 0 0018 8zM10 20.1839V7H8V20.1839a3 3 0 102 0z"})),yo||(yo=a.createElement("path",{d:"M9,30A6.9931,6.9931,0,0,1,4,18.1108V7A5,5,0,0,1,14,7V18.1108A6.9931,6.9931,0,0,1,9,30ZM9,4A3.0033,3.0033,0,0,0,6,7V18.9834l-.332.2983a5,5,0,1,0,6.664,0L12,18.9834V7A3.0033,3.0033,0,0,0,9,4Z"})),n)}));"production"!==process.env.NODE_ENV&&(ls.propTypes=It);const cs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},mo||(mo=a.createElement("path",{d:"M30 8H24v6h2V11.541A5.939 5.939 0 0128 16a6.0039 6.0039 0 01-5.0945 5.9243A7.0273 7.0273 0 0020 17.2617V6a4 4 0 00-8 0V17.2617a6.996 6.996 0 1010.9292 6.68A7.9794 7.9794 0 0027.2651 10H30zM14 6a2 2 0 014 0v7H14zm2 22a4.9965 4.9965 0 01-2.499-9.3252L14 18.3857V15h4v3.3857l.499.2891A4.9965 4.9965 0 0116 28zM2 10a8.04 8.04 0 002.7349 6H2v2H8V12H6v2.4592A5.94 5.94 0 014 10a6.0066 6.0066 0 016-6V2A8.0092 8.0092 0 002 10z"})),n)}));"production"!==process.env.NODE_ENV&&(cs.propTypes=It);const us=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},bo||(bo=a.createElement("path",{d:"M20 10H27V12H20zM20 16H30V18H20zM20 22H27V24H20zM10 20.1839V7H8V20.1839a3 3 0 102 0z"})),ko||(ko=a.createElement("path",{d:"M30,4H12.9744A4.9829,4.9829,0,0,0,4,7V18.1108a7,7,0,1,0,10,0V7a5.0019,5.0019,0,0,0-.1011-1H30ZM9,28a4.9933,4.9933,0,0,1-3.332-8.7183L6,18.9834V7a3,3,0,0,1,6,0V18.9834l.332.2983A4.9933,4.9933,0,0,1,9,28Z"})),n)}));"production"!==process.env.NODE_ENV&&(us.propTypes=It);const ds=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},xo||(xo=a.createElement("path",{d:"M20 4H27V6H20zM20 10H30V12H20zM20 16H27V18H20zM12 23a3 3 0 01-6 0z"})),wo||(wo=a.createElement("path",{d:"M30,22H15.9192A7.0107,7.0107,0,0,0,14,18.1108V7A5,5,0,0,0,4,7V18.1108A6.9946,6.9946,0,1,0,15.92,24H30ZM9,28a4.9933,4.9933,0,0,1-3.332-8.7183L6,18.9834V7a3,3,0,0,1,6,0V18.9834l.332.2983A4.9933,4.9933,0,0,1,9,28Z"})),n)}));"production"!==process.env.NODE_ENV&&(ds.propTypes=It);const hs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Co||(Co=a.createElement("path",{d:"M14,9a4.9316,4.9316,0,0,0,4-1.9873,5.0192,5.0192,0,0,0,8,0A4.9316,4.9316,0,0,0,30,9V7a3.4376,3.4376,0,0,1-3.0513-2.3164A1.007,1.007,0,0,0,26,4a.9894.9894,0,0,0-.9468.6787A3.44,3.44,0,0,1,22,7a3.4376,3.4376,0,0,1-3.0513-2.3164A1.007,1.007,0,0,0,18,4a.971.971,0,0,0-.9468.6787A3.44,3.44,0,0,1,14,7H13V6A4,4,0,0,0,5,6V17.2617A7.0126,7.0126,0,1,0,13.8735,18H14a4.9316,4.9316,0,0,0,4-1.9873,5.0192,5.0192,0,0,0,8,0A4.9316,4.9316,0,0,0,30,18V16a3.4376,3.4376,0,0,1-3.0513-2.3164A1.007,1.007,0,0,0,26,13a.9894.9894,0,0,0-.9468.6787A3.44,3.44,0,0,1,22,16a3.4376,3.4376,0,0,1-3.0513-2.3164A1.007,1.007,0,0,0,18,13a.971.971,0,0,0-.9468.6787A3.44,3.44,0,0,1,14,16H13V9ZM7,6a2,2,0,0,1,4,0v6H7ZM9,28a4.9965,4.9965,0,0,1-2.499-9.3252L7,18.3857V14h4v4.3857l.499.2891A4.9965,4.9965,0,0,1,9,28Z"})),n)}));"production"!==process.env.NODE_ENV&&(hs.propTypes=It);const ps=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Lo||(Lo=a.createElement("path",{d:"M26 6v4H6V6H26m0-2H6A2 2 0 004 6v4a2 2 0 002 2H26a2 2 0 002-2V6a2 2 0 00-2-2zM10 16V26H6V16h4m0-2H6a2 2 0 00-2 2V26a2 2 0 002 2h4a2 2 0 002-2V16a2 2 0 00-2-2zM26 16V26H16V16H26m0-2H16a2 2 0 00-2 2V26a2 2 0 002 2H26a2 2 0 002-2V16a2 2 0 00-2-2z"})),n)}));"production"!==process.env.NODE_ENV&&(ps.propTypes=It);const gs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Eo||(Eo=a.createElement("rect",{width:"4",height:"4",x:"20",y:"2",rx:"2"})),Po||(Po=a.createElement("path",{d:"M11,16a1,1,0,0,1-.707-1.707l7-7a1,1,0,1,1,1.414,1.414l-7,7A.9962.9962,0,0,1,11,16Z"})),No||(No=a.createElement("path",{d:"M23.707,24.293a8.3948,8.3948,0,0,0-4.72-2.209c.1992-.1641.3931-.3364.5777-.521a9.2447,9.2447,0,0,0,1.7334-9.9141l-1.8768.6973c1.11,2.9805.6346,5.8975-1.2722,7.8022a6.6964,6.6964,0,0,1-5.561,1.8047,9.7746,9.7746,0,0,1-5.771-2.7856c-2.9727-2.97-4.0759-8.2276-.9805-11.32,1.9068-1.9053,4.8267-2.38,7.8094-1.271l.6987-1.875C10.6616,3.333,6.8591,3.9961,4.4207,6.4331c-3.9427,3.9385-2.6761,10.4956.98,14.1489a11.8136,11.8136,0,0,0,6.9766,3.36c.21.022.4153.0234.6223.0332V24h4.9968a6.8463,6.8463,0,0,1,4.2962,1.707L26.5859,30,28,28.5859Z"})),n)}));"production"!==process.env.NODE_ENV&&(gs.propTypes=It);const fs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},To||(To=a.createElement("path",{d:"M19,4a8.9812,8.9812,0,0,0-8.1687,12.7549L2,25.5859,3.4141,27l8.4873-8.4873a9.0408,9.0408,0,0,0,1.5859,1.5859L10,23.5859,11.4141,25l3.8313-3.8311A8.9959,8.9959,0,1,0,19,4Zm6.9058,7.9058a7.005,7.005,0,0,1-5.8116-5.8116A7.005,7.005,0,0,1,25.9058,11.9058ZM12.0942,14.0942a7.005,7.005,0,0,1,5.8116,5.8116A7.005,7.005,0,0,1,12.0942,14.0942ZM19.93,19.9307a9.01,9.01,0,0,0-7.8611-7.8614,7.004,7.004,0,0,1,6-6,9.01,9.01,0,0,0,7.8611,7.8614A7.004,7.004,0,0,1,19.93,19.9307Z"})),n)}));"production"!==process.env.NODE_ENV&&(fs.propTypes=It);const vs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Do||(Do=a.createElement("path",{d:"M28,26H25V24h3V8H25V6h3a2.0023,2.0023,0,0,1,2,2V24A2.0027,2.0027,0,0,1,28,26Z"})),So||(So=a.createElement("circle",{cx:"23",cy:"16",r:"2"})),Oo||(Oo=a.createElement("circle",{cx:"16",cy:"16",r:"2"})),Ao||(Ao=a.createElement("circle",{cx:"9",cy:"16",r:"2"})),zo||(zo=a.createElement("path",{d:"M7,26H4a2.0023,2.0023,0,0,1-2-2V8A2.002,2.002,0,0,1,4,6H7V8H4V24H7Z"})),n)}));"production"!==process.env.NODE_ENV&&(vs.propTypes=It);const ys=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Io||(Io=a.createElement("path",{strokeWidth:"0",d:"M4 20L4 22 8.586 22 2 28.586 3.414 30 10 23.414 10 28 12 28 12 20 4 20zM28 25h-3v-2h3V7h-3v-2h3c1.1025 0 2 .897 2 2v16c0 1.1025-.8975 2-2 2z"})),Mo||(Mo=a.createElement("circle",{cx:"23",cy:"15",r:"2",strokeWidth:"0"})),Ho||(Ho=a.createElement("circle",{cx:"16",cy:"15",r:"2",strokeWidth:"0"})),_o||(_o=a.createElement("circle",{cx:"9",cy:"15",r:"2",strokeWidth:"0"})),Vo||(Vo=a.createElement("path",{strokeWidth:"0",d:"m4,17V7h3v-2h-3c-1.103,0-2,.897-2,2v10h2Z"})),n)}));"production"!==process.env.NODE_ENV&&(ys.propTypes=It);const ms=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},jo||(jo=a.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,2v4H6V6ZM6,26V12H26V26Z",transform:"translate(0 .01)"})),Fo||(Fo=a.createElement("path",{d:"M10.76 16.18L13.58 19.01 10.76 21.84 12.17 23.25 16.41 19.01 12.17 14.77 10.76 16.18z"})),n)}));"production"!==process.env.NODE_ENV&&(ms.propTypes=It);const bs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ro||(Ro=a.createElement("path",{d:"M10 21H16V23H10z"})),Bo||(Bo=a.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,2v4H6V6ZM6,26V12H26V26Z"})),n)}));"production"!==process.env.NODE_ENV&&(bs.propTypes=It);const ks=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Uo||(Uo=a.createElement("path",{d:"M23 9.2L20.4 6.6 19 8 23 12 30 5 28.6 3.6zM12 5.4L10.6 4 8 6.6 5.4 4 4 5.4 6.6 8 4 10.6 5.4 12 8 9.4 10.6 12 12 10.6 9.4 8zM12 21.4L10.6 20 8 22.6 5.4 20 4 21.4 6.6 24 4 26.6 5.4 28 8 25.4 10.6 28 12 26.6 9.4 24z"})),Go||(Go=a.createElement("path",{d:"M17 15L17 2 15 2 15 15 2 15 2 17 15 17 15 30 17 30 17 17 30 17 30 15z"})),n)}));"production"!==process.env.NODE_ENV&&(ks.propTypes=It);const xs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Zo||(Zo=a.createElement("path",{d:"M6 6H26V8H6zM10 12H22V14H10zM6 18H26V20H6zM10 24H22V26H10z"})),n)}));"production"!==process.env.NODE_ENV&&(xs.propTypes=It);const ws=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Wo||(Wo=a.createElement("path",{d:"M6 6H26V8H6zM6 12H26V14H6zM6 18H26V20H6zM6 24H26V26H6z"})),n)}));"production"!==process.env.NODE_ENV&&(ws.propTypes=It);const Cs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Xo||(Xo=a.createElement("path",{d:"M12 6H26V8H12zM12 12H22V14H12zM12 18H26V20H12zM12 24H22V26H12zM6 4H8V28H6z"})),n)}));"production"!==process.env.NODE_ENV&&(Cs.propTypes=It);const Ls=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Yo||(Yo=a.createElement("path",{d:"M14 4H9V6h5V8H10a2 2 0 00-2 2v2a2 2 0 002 2h6V6A2.0023 2.0023 0 0014 4zm0 8H10V10h4zM22 26L22 18 20 18 20 19 18 19 18 21 20 21 20 26 18 26 18 28 24 28 24 26 22 26zM2 2H4V16H2zM28 16H30V30H28z"})),n)}));"production"!==process.env.NODE_ENV&&(Ls.propTypes=It);const Es=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ko||(Ko=a.createElement("path",{d:"M6 6H20V8H6zM10 12H20V14H10zM6 18H20V20H6zM10 24H20V26H10zM24 4H26V28H24z"})),n)}));"production"!==process.env.NODE_ENV&&(Es.propTypes=It);const Ps=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},qo||(qo=a.createElement("path",{d:"M1 8L1 10 7 10 7 24 9 24 9 10 15 10 15 8 1 8zM17 8L17 10 23 10 23 24 25 24 25 10 31 10 31 8 17 8z"})),n)}));"production"!==process.env.NODE_ENV&&(Ps.propTypes=It);const Ns=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},$o||($o=a.createElement("path",{d:"M18.25,25H9V7h8.5a5.25,5.25,0,0,1,4,8.65A5.25,5.25,0,0,1,18.25,25ZM12,22h6.23a2.25,2.25,0,1,0,0-4.5H12Zm0-7.5h5.5a2.25,2.25,0,1,0,0-4.5H12Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ns.propTypes=It);const Ts=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Jo||(Jo=a.createElement("path",{d:"M29.4384,16.5715l-7.985-7.9856a2.0014,2.0014,0,0,0-2.8291,0l-5.3584,5.3584L9,2H7L2,16H4l.999-3h6l.8035,2.4077L4.5858,22.6244a2,2,0,0,0,0,2.8282L9.1316,30h9.5908l10.716-10.717A1.9173,1.9173,0,0,0,29.4384,16.5715ZM5.6653,11l2.331-7,2.3355,7Zm12.229,17H9.96L6,24.0381l6.3123-6.3115L20.24,25.6538Zm3.76-3.76-7.9275-7.9272L20.0393,10l7.9268,7.9272Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ts.propTypes=It);const Ds=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Qo||(Qo=a.createElement("path",{d:"M22 21h2L17 4H15L8 21h2l1.61-4h8.74zm-9.57-6l3.44-8.37h.26L19.54 15zM6 24H26V28H6z"})),n)}));"production"!==process.env.NODE_ENV&&(Ds.propTypes=It);const Ss=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},er||(er=a.createElement("path",{d:"M27,22.14V9.86A4,4,0,1,0,22.14,5H9.86A4,4,0,1,0,5,9.86V22.14A4,4,0,1,0,9.86,27H22.14A4,4,0,1,0,27,22.14ZM26,4a2,2,0,1,1-2,2A2,2,0,0,1,26,4ZM4,6A2,2,0,1,1,6,8,2,2,0,0,1,4,6ZM6,28a2,2,0,1,1,2-2A2,2,0,0,1,6,28Zm16.14-3H9.86A4,4,0,0,0,7,22.14V9.86A4,4,0,0,0,9.86,7H22.14A4,4,0,0,0,25,9.86V22.14A4,4,0,0,0,22.14,25ZM26,28a2,2,0,1,1,2-2A2,2,0,0,1,26,28Z"})),tr||(tr=a.createElement("path",{d:"M21 11L11 11 11 13 15 13 15 22 17 22 17 13 21 13 21 11z"})),n)}));"production"!==process.env.NODE_ENV&&(Ss.propTypes=It);const Os=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},nr||(nr=a.createElement("path",{d:"M4 26H28V30H4z"})),ir||(ir=a.createElement("path",{d:"M26,14.54a1,1,0,0,0-.25-.69L17.17,4.33A1.09,1.09,0,0,0,17,4.2V2H15V5L4.32,14.74a1,1,0,0,0-.06,1.41l8.57,9.52a1,1,0,0,0,.69.33h.05a1,1,0,0,0,.68-.26L24,16.8V21a1,1,0,0,0,2,0V14.57S26,14.55,26,14.54Zm-12.35,9-7.23-8L15,7.67V12h2V7.13l6.59,7.33Z"})),n)}));"production"!==process.env.NODE_ENV&&(Os.propTypes=It);const As=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},or||(or=a.createElement("path",{d:"M25 12H20v2h5a1.0008 1.0008 0 011 1v2H22a3.0033 3.0033 0 00-3 3v1a3.0033 3.0033 0 003 3h6V15A3.0033 3.0033 0 0025 12zM22 22a1.0008 1.0008 0 01-1-1V20a1.0008 1.0008 0 011-1h4v3zM16 24h2L12 7H10L4 24H6l1.6936-5h6.6135zM8.3711 17l2.4966-7.3711.2668.0005L13.63 17z"})),n)}));"production"!==process.env.NODE_ENV&&(As.propTypes=It);const zs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},rr||(rr=a.createElement("path",{d:"M2 7L2 9 9 9 9 25 11 25 11 9 18 9 18 7 2 7zM30 11.076L29.256 9.219 26 10.522 26 7 24 7 24 10.523 20.744 9.22 20 11.077 23.417 12.444 20.9 15.8 22.5 17 25 13.667 27.5 17 29.1 15.8 26.583 12.443 30 11.076z"})),n)}));"production"!==process.env.NODE_ENV&&(zs.propTypes=It);const Is=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ar||(ar=a.createElement("path",{d:"M12 15H5a3 3 0 01-3-3V10A3 3 0 015 7h5V5A1 1 0 009 4H3V2H9a3 3 0 013 3zM5 9a1 1 0 00-1 1v2a1 1 0 001 1h5V9zM20 23v2a1 1 0 001 1h5V22H21A1 1 0 0020 23z"})),sr||(sr=a.createElement("path",{d:"M2,30H30V2Zm26-2H21a3,3,0,0,1-3-3V23a3,3,0,0,1,3-3h5V18a1,1,0,0,0-1-1H19V15h6a3,3,0,0,1,3,3Z"})),n)}));"production"!==process.env.NODE_ENV&&(Is.propTypes=It);const Ms=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},lr||(lr=a.createElement("path",{d:"M14 6H28V8H14zM14 12H28V14H14zM7 18H28V20H7zM7 24H28V26H7zM4 13.59L7.29 10 4 6.41 5.42 5 10.04 10 5.42 15 4 13.59z"})),n)}));"production"!==process.env.NODE_ENV&&(Ms.propTypes=It);const Hs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},cr||(cr=a.createElement("path",{d:"M2 6H12V8H2zM5 12H12V14H5zM2 18H12V20H2zM5 24H12V26H5zM16 4H18V28H16zM28.15 23.5L29.56 22.12 23.27 16 29.56 9.88 28.15 8.5 20.44 16 28.15 23.5z"})),n)}));"production"!==process.env.NODE_ENV&&(Hs.propTypes=It);const _s=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},ur||(ur=a.createElement("path",{d:"M20 6H30V8H20zM20 12H27V14H20zM20 18H30V20H20zM20 24H27V26H20zM14 4H16V28H14zM3.85 22.5L2.44 21.12 8.73 15 2.44 8.88 3.85 7.5 11.56 15 3.85 22.5z"})),n)}));"production"!==process.env.NODE_ENV&&(_s.propTypes=It);const Vs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},dr||(dr=a.createElement("path",{d:"M25 9L25 7 12 7 12 9 17.14 9 12.77 23 7 23 7 25 20 25 20 23 14.86 23 19.23 9 25 9z"})),n)}));"production"!==process.env.NODE_ENV&&(Vs.propTypes=It);const js=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},hr||(hr=a.createElement("path",{d:"M30 24L18.83 24 21.12 21.71 19.71 20.29 15 25 19.71 29.71 21.12 28.29 18.83 26 30 26 30 24zM14 21L20 4 18 4 12 21 14 21zM13 4L9 16 5 4 3 4 8 18 10 18 15 4 13 4zM28 18h2L25 4H23L18 18h2l1-3h6zm-6.33-5L24 6l2.33 7z"})),n)}));"production"!==process.env.NODE_ENV&&(js.propTypes=It);const Fs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},pr||(pr=a.createElement("path",{d:"M14 13H30V15H14zM15 28H30V30H15zM25.85 27H28L23.64 17H21.36L17 27h2.15l.8-2h5.1zm-5.1-4l1.75-4.37L24.25 23zM25.85 12H28L23.64 2H21.36L17 12h2.15l.8-2h5.1zm-5.1-4L22.5 3.63 24.25 8zM6 15.83L8.58 18.41 10 17 6 13 2 17 3.41 18.42 6 15.83zM6 27.17L3.42 24.59 2 26 6 30 10 26 8.59 24.58 6 27.17z"})),n)}));"production"!==process.env.NODE_ENV&&(Fs.propTypes=It);const Rs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},gr||(gr=a.createElement("path",{d:"M17 6H30V8H17zM17 12H27V14H17zM17 18H30V20H17zM17 24H27V26H17zM11.59 13.41L8 9.83 8 9.83 4.41 13.42 3 12 8 7 13 12 11.59 13.41zM11.59 18.59L8 22.17 8 22.17 4.41 18.58 3 20 8 25 13 20 11.59 18.59z"})),n)}));"production"!==process.env.NODE_ENV&&(Rs.propTypes=It);const Bs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},fr||(fr=a.createElement("path",{d:"M6 24H20V26H6zM6 18H26V20H6zM6 12H26V14H6zM6 6H26V8H6z"})),n)}));"production"!==process.env.NODE_ENV&&(Bs.propTypes=It);const Us=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},vr||(vr=a.createElement("path",{d:"M20.5859,14.4141,24.1719,18H6V8H4V18a2.0024,2.0024,0,0,0,2,2H24.1719L20.586,23.5859,22,25l6-6-6-6Z"})),n)}));"production"!==process.env.NODE_ENV&&(Us.propTypes=It);const Gs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},yr||(yr=a.createElement("path",{d:"M30 5L30 8 22 8 22 26 19 26 19 8 11 8 11 5 30 5z"})),mr||(mr=a.createElement("path",{d:"M7 26L7 14 2 14 2 12 14 12 14 14 9 14 9 26 7 26z"})),n)}));"production"!==process.env.NODE_ENV&&(Gs.propTypes=It);const Zs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},br||(br=a.createElement("path",{d:"M28 27H21a3 3 0 01-3-3V22a3 3 0 013-3h5V17a1 1 0 00-1-1H19V14h6a3 3 0 013 3zm-7-6a1 1 0 00-1 1v2a1 1 0 001 1h5V21zM13 7h3V5H13a4 4 0 00-3 1.38A4 4 0 007 5H4V7H7A2 2 0 019 9v5H5v2H9v7a2 2 0 01-2 2H4v2H7a4 4 0 003-1.38A4 4 0 0013 27h3V25H13a2 2 0 01-2-2V16h4V14H11V9A2 2 0 0113 7z"})),n)}));"production"!==process.env.NODE_ENV&&(Zs.propTypes=It);const Ws=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},kr||(kr=a.createElement("path",{d:"M6 18H20V20H6zM6 12H26V14H6z"})),n)}));"production"!==process.env.NODE_ENV&&(Ws.propTypes=It);const Xs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},xr||(xr=a.createElement("path",{d:"M23 27L23 15 18 15 18 13 30 13 30 15 25 15 25 27 23 27z"})),wr||(wr=a.createElement("path",{d:"M11 27L11 8 2 8 2 6 22 6 22 8 13 8 13 27 11 27z"})),n)}));"production"!==process.env.NODE_ENV&&(Xs.propTypes=It);const Ys=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Cr||(Cr=a.createElement("path",{d:"M28,15H17.9563c-.4522-.1237-.9037-.2324-1.3381-.3352-2.8077-.6641-4.396-1.1506-4.396-3.4231a2.8684,2.8684,0,0,1,.7866-2.145,4.7888,4.7888,0,0,1,3.0137-1.09c2.8291-.07,4.1347.8894,5.2011,2.35l1.6153-1.1792a7.4727,7.4727,0,0,0-6.83-3.1706,6.7726,6.7726,0,0,0-4.4,1.6611,4.8274,4.8274,0,0,0-1.3862,3.5735A4.3723,4.3723,0,0,0,11.9573,15H4v2H17.6519c1.9668.57,3.1432,1.3123,3.1733,3.3579a3.119,3.119,0,0,1-.8623,2.3931A5.8241,5.8241,0,0,1,16.2432,24a6.6344,6.6344,0,0,1-5.1451-2.6912L9.5649,22.593A8.5262,8.5262,0,0,0,16.2119,26c.0088-.0012.042,0,.1,0A7.67,7.67,0,0,0,21.36,24.1812a5.0779,5.0779,0,0,0,1.4648-3.8531A4.952,4.952,0,0,0,21.6753,17H28Z"})),n)}));"production"!==process.env.NODE_ENV&&(Ys.propTypes=It);const Ks=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Lr||(Lr=a.createElement("path",{d:"M26 25L20 25 20 19 24 19 24 17 20 17 20 15 26 15 26 21 22 21 22 23 26 23 26 25zM5 7L5 9 12 9 12 25 14 25 14 9 21 9 21 7 5 7z"})),n)}));"production"!==process.env.NODE_ENV&&(Ks.propTypes=It);const qs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Er||(Er=a.createElement("path",{d:"M29 17L23 17 23 11 27 11 27 9 23 9 23 7 29 7 29 13 25 13 25 15 29 15 29 17zM4 7L4 9 11 9 11 25 13 25 13 9 20 9 20 7 4 7z"})),n)}));"production"!==process.env.NODE_ENV&&(qs.propTypes=It);const $s=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Pr||(Pr=a.createElement("path",{d:"M25.29 19.29L23.88 20.71 26.17 23 5.83 23 8.12 20.71 6.71 19.29 2 24 6.71 28.71 8.12 27.29 5.83 25 26.17 25 23.88 27.29 25.29 28.71 30 24 25.29 19.29zM26 17h2L23 3H21L16 17h2l1-3h6zm-6.33-5L22 5l2.33 7zM14 3L10 15 6 3 4 3 9 17 11 17 16 3 14 3z"})),n)}));"production"!==process.env.NODE_ENV&&($s.propTypes=It);const Js=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Nr||(Nr=a.createElement("path",{d:"M4 26H28V28H4zM16 23a7 7 0 01-7-7V5h2V16a5 5 0 0010 0V5h2V16A7 7 0 0116 23z"})),n)}));"production"!==process.env.NODE_ENV&&(Js.propTypes=It);const Qs=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Tr||(Tr=a.createElement("path",{d:"M16 28H30V30H16zM16 23H30V25H16zM10.8458 30H13L8.64 20H6.36L2 30H4.1542l.8-2h5.0916zM5.7541 26L7.5 21.6347 9.2459 26zM2 15H30V17H2zM16 7H30V9H16zM16 2H30V4H16zM10.8458 12H13L8.64 2H6.36L2 12H4.1542l.8-2h5.0916zM5.7541 8L7.5 3.6347 9.2459 8z"})),n)}));"production"!==process.env.NODE_ENV&&(Qs.propTypes=It);const el=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Dr||(Dr=a.createElement("path",{d:"M4 23H12V25H4zM24.5232 14H4v2H24.5a3.5 3.5 0 010 7H18.8281l2.586-2.5859L20 19l-5 5 5 5 1.4141-1.4141L18.8281 25H24.533a5.5 5.5 0 00-.01-11zM4 5H28V7H4z"})),n)}));"production"!==process.env.NODE_ENV&&(el.propTypes=It);const tl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Sr||(Sr=a.createElement("path",{d:"M29.537 13.76L26.24 10.463a1.5862 1.5862 0 00-2.24 0L10 24.4674V30h5.5326L29.537 16a1.5862 1.5862 0 000-2.24zM14.7042 28H12V25.2958l9.4409-9.4409 2.7042 2.7042zM25.5591 17.145L22.855 14.4409l2.2672-2.2672 2.7042 2.7042zM11 17L13 17 13 10 16 10 16 8 8 8 8 10 11 10 11 17z"})),Or||(Or=a.createElement("path",{d:"M8,20H4V4H20V8h2V4a2,2,0,0,0-2-2H4A2,2,0,0,0,2,4V20a2,2,0,0,0,2,2H8Z"})),n)}));"production"!==process.env.NODE_ENV&&(tl.propTypes=It);const nl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ar||(Ar=a.createElement("path",{d:"M18.7061,27.585a5.2615,5.2615,0,0,1-3.7227-8.9834l1.415,1.414a3.2638,3.2638,0,1,0,4.6153,4.6162l6.03-6.03a3.264,3.264,0,0,0-4.6162-4.6158l-1.414-1.414a5.2637,5.2637,0,0,1,7.4443,7.4438l-6.03,6.03A5.2461,5.2461,0,0,1,18.7061,27.585Z"})),zr||(zr=a.createElement("path",{d:"M10.2642 29.9971A5.2619 5.2619 0 016.542 21.0137l6.03-6.03a5.2636 5.2636 0 117.4438 7.4438l-1.414-1.414a3.2639 3.2639 0 10-4.6158-4.6158l-6.03 6.03a3.264 3.264 0 004.6157 4.6162l1.414 1.4141A5.2452 5.2452 0 0110.2642 29.9971zM2 10H10V12H2zM2 6H14V8H2zM2 2H14V4H2z"})),n)}));"production"!==process.env.NODE_ENV&&(nl.propTypes=It);const il=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ir||(Ir=a.createElement("path",{d:"M8 10H16V12H8zM8 6H20V8H8zM8 2H20V4H8z"})),Mr||(Mr=a.createElement("path",{d:"M4.7111,28l5.6312-9.9961,7.4341,6.49A2,2,0,0,0,20.86,23.96l6.9707-10.4034-1.6622-1.1132-7,10.4472-.07.1035-7.4345-6.4907a2.0032,2.0032,0,0,0-3.0806.5308L4,25.1826V2H2V28a2.0023,2.0023,0,0,0,2,2H30V28Z"})),n)}));"production"!==process.env.NODE_ENV&&(il.propTypes=It);const ol=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Hr||(Hr=a.createElement("path",{d:"M18 28H26V30H18zM18 24H30V26H18zM18 20H30V22H18z"})),_r||(_r=a.createElement("path",{d:"M16.001 26.473L16 26.473 4.284 12.955 9.5 6 22.5 6 27.716 12.955 24.476 16.692 25.989 18.002 30.284 13.045 23.5 4 8.5 4 1.716 13.045 14.488 27.782 16.001 26.473z"})),n)}));"production"!==process.env.NODE_ENV&&(ol.propTypes=It);const rl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Vr||(Vr=a.createElement("path",{d:"M16.001 26.473L16 26.473 4.284 12.955 9.5 6 22.5 6 27.716 12.955 24.476 16.692 25.989 18.002 30.284 13.045 23.5 4 8.5 4 1.716 13.045 14.488 27.782 16.001 26.473z"})),jr||(jr=a.createElement("path",{d:"M20 19L27 24 20 29 20 19z"})),n)}));"production"!==process.env.NODE_ENV&&(rl.propTypes=It);const al=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Fr||(Fr=a.createElement("path",{d:"M20 25a6.9908 6.9908 0 01-5.833-3.1287l1.666-1.1074a5.0007 5.0007 0 008.334 0l1.666 1.1074A6.9908 6.9908 0 0120 25zM24 14a2 2 0 102 2A1.9806 1.9806 0 0024 14zM16 14a2 2 0 102 2A1.9806 1.9806 0 0016 14z"})),Rr||(Rr=a.createElement("path",{d:"M28,8H22V4a2.0023,2.0023,0,0,0-2-2H4A2.0023,2.0023,0,0,0,2,4V14a10.01,10.01,0,0,0,8.8027,9.9214A9.9989,9.9989,0,0,0,30,20V10A2.0023,2.0023,0,0,0,28,8ZM4,14V4H20V8H12a2.0023,2.0023,0,0,0-2,2V20a9.9628,9.9628,0,0,0,.168,1.78A8.0081,8.0081,0,0,1,4,14Zm24,6a8,8,0,0,1-16,0V10H28Z"})),n)}));"production"!==process.env.NODE_ENV&&(al.propTypes=It);const sl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Br||(Br=a.createElement("path",{d:"M2 28H30V30H2zM7 5.828L7 24 9 24 9 5.828 12.586 9.414 14 8 8 2 2 8 3.414 9.414 7 5.828zM23 5.828L23 24 25 24 25 5.828 28.586 9.414 30 8 24 2 18 8 19.414 9.414 23 5.828z"})),n)}));"production"!==process.env.NODE_ENV&&(sl.propTypes=It);const ll=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Ur||(Ur=a.createElement("path",{d:"M26,4H6A2.0025,2.0025,0,0,0,4,6V26a2.0025,2.0025,0,0,0,2,2H26a2.0023,2.0023,0,0,0,2-2V6A2.0023,2.0023,0,0,0,26,4ZM6,6H26V16H24v2h2v2H24v2h2v2H24v2H22V24H20v2H18V24H16v2H14V24H12v2H10V24H8v2H6Z"})),Gr||(Gr=a.createElement("path",{d:"M8 20H10V22H8zM12 20H14V22H12zM16 20H18V22H16zM20 20H22V22H20zM8 16H10V18H8zM16 16H18V18H16zM20 16H22V18H20zM20 12H22V14H20zM20 8H22V10H20z"})),n)}));"production"!==process.env.NODE_ENV&&(ll.propTypes=It);const cl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Zr||(Zr=a.createElement("path",{d:"M8 30H4a2 2 0 01-2-2V24a2 2 0 012-2H8a2 2 0 012 2v4A2 2 0 018 30zM4 24v4H8V24zM18 30H14a2 2 0 01-2-2V24a2 2 0 012-2h4a2 2 0 012 2v4A2 2 0 0118 30zm-4-6v4h4V24zM28 30H24a2 2 0 01-2-2V24a2 2 0 012-2h4a2 2 0 012 2v4A2 2 0 0128 30zm-4-6v4h4V24zM28 20H4a2 2 0 01-2-2V4A2 2 0 014 2H28a2 2 0 012 2V18A2 2 0 0128 20zM4 4V18H28V4z"})),n)}));"production"!==process.env.NODE_ENV&&(cl.propTypes=It);const ul=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Wr||(Wr=a.createElement("path",{d:"M8 30H4a2 2 0 01-2-2V24a2 2 0 012-2H8a2 2 0 012 2v4A2 2 0 018 30zM4 24v4H8V24zM18 30H14a2 2 0 01-2-2V24a2 2 0 012-2h4a2 2 0 012 2v4A2 2 0 0118 30zm-4-6v4h4V24zM28 30H24a2 2 0 01-2-2V24a2 2 0 012-2h4a2 2 0 012 2v4A2 2 0 0128 30zm-4-6v4h4V24zM8 20H4a2 2 0 01-2-2V14a2 2 0 012-2H8a2 2 0 012 2v4A2 2 0 018 20zM4 14v4H8V14zM18 20H14a2 2 0 01-2-2V14a2 2 0 012-2h4a2 2 0 012 2v4A2 2 0 0118 20zm-4-6v4h4V14zM28 20H24a2 2 0 01-2-2V14a2 2 0 012-2h4a2 2 0 012 2v4A2 2 0 0128 20zm-4-6v4h4V14zM8 10H4A2 2 0 012 8V4A2 2 0 014 2H8a2 2 0 012 2V8A2 2 0 018 10zM4 4V8H8V4zM18 10H14a2 2 0 01-2-2V4a2 2 0 012-2h4a2 2 0 012 2V8A2 2 0 0118 10zM14 4V8h4V4zM28 10H24a2 2 0 01-2-2V4a2 2 0 012-2h4a2 2 0 012 2V8A2 2 0 0128 10zM24 4V8h4V4z"})),n)}));"production"!==process.env.NODE_ENV&&(ul.propTypes=It);const dl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Xr||(Xr=a.createElement("path",{d:"M28,12H4a2.0023,2.0023,0,0,0-2,2V28a2.002,2.002,0,0,0,2,2H28a2.0023,2.0023,0,0,0,2-2V14A2.0027,2.0027,0,0,0,28,12ZM20,28H12V27a1.0009,1.0009,0,0,1,1-1h6a1.0009,1.0009,0,0,1,1,1Zm8,0H22V27a3.0033,3.0033,0,0,0-3-3H13a3.0033,3.0033,0,0,0-3,3v1H4V14H28.002Z"})),Yr||(Yr=a.createElement("path",{d:"M16 23a4 4 0 114-4A4.0042 4.0042 0 0116 23zm0-6a2 2 0 102 2A2.0023 2.0023 0 0016 17zM30 4V8a2.0027 2.0027 0 01-2 2H24a2.0027 2.0027 0 01-2-2V4a2.0027 2.0027 0 012-2h4A2.0027 2.0027 0 0130 4zM28 8l.002-4H24V8zM20 4V8a2.0027 2.0027 0 01-2 2H14a2.0023 2.0023 0 01-2-2V4a2.0023 2.0023 0 012-2h4A2.0027 2.0027 0 0120 4zM18 8l.002-4H14V8zM10 4V8a2.0023 2.0023 0 01-2 2H4A2.0023 2.0023 0 012 8V4A2.0023 2.0023 0 014 2H8A2.0023 2.0023 0 0110 4zM8 8l.0015-4H4V8z"})),n)}));"production"!==process.env.NODE_ENV&&(dl.propTypes=It);const hl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},Kr||(Kr=a.createElement("path",{d:"M30,16V9a7.0078,7.0078,0,0,0-7-7H2V16H8.4648l3.5774,5.3662.8453,5.9165A2.0094,2.0094,0,0,0,14.8672,29H17a3.0033,3.0033,0,0,0,3-3V20h6A4.0045,4.0045,0,0,0,30,16ZM8,14H4V4H8Zm20,2a2.0025,2.0025,0,0,1-2,2H18v8a1.0008,1.0008,0,0,1-1,1H14.8672l-.9094-6.3662L10,14.6973V4H23a5.0057,5.0057,0,0,1,5,5Z"})),n)}));"production"!==process.env.NODE_ENV&&(hl.propTypes=It);const pl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},qr||(qr=a.createElement("path",{d:"M2 2H7V16H2zM23 2H9V16.8027l3.0422 4.5635.8453 5.9165A2.0094 2.0094 0 0014.8672 29H15a3.0033 3.0033 0 003-3V20h8a4.0045 4.0045 0 004-4V9A7.0078 7.0078 0 0023 2z"})),n)}));"production"!==process.env.NODE_ENV&&(pl.propTypes=It);const gl=a.forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a.createElement(Mt,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},$r||($r=a.createElement("path",{d:"M26,12H20V6a3.0033,3.0033,0,0,0-3-3H14.8672a2.0094,2.0094,0,0,0-1.98,1.7173l-.8453,5.9165L8.4648,16H2V30H23a7.0078,7.0078,0,0,0,7-7V16A4.0045,4.0045,0,0,0,26,12ZM8,28H4V18H8Zm20-5a5.0057,5.0057,0,0,1-5,5H10V17.3027l3.9578-5.9365L14.8672,5H17a1.0008,1.0008,0,0,1,1,1v8h8a2.0025,2.0025,0,0,1,2,2Z"})),n)}));"production"!==process.env.NODE_ENV&&(gl.propTypes=It);var fl={"palette.flyout.search.placeholder":"Find palette nodes","palette.flyout.search.noresults":"No results found.","palette.flyout.search.adjustsearch":"Try adjusting your search to find what you're looking for.","palette.flyout.search.resultsrestricted":"Results restricted to 10 nodes. Try refining your search.","palette.flyout.search.more":"Show more","palette.flyout.search.less":"Show less","palette.flyout.label":"Flyout Palette","palette.dialog.label":"Dialog Palette"},vl=u,yl=d,ml=function(){return vl.Date.now()},bl=f,kl=Math.max,xl=Math.min;var wl=function(e,t,n){var i,o,r,a,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,r=o;return i=o=void 0,c=t,a=e.apply(r,n)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=r}function f(){var e=ml();if(g(e))return v(e);s=setTimeout(f,function(e){var n=t-(e-l);return d?xl(n,r-(e-c)):n}(e))}function v(e){return s=void 0,h&&i?p(e):(i=o=void 0,a)}function y(){var e=ml(),n=g(e);if(i=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(f,t),u?p(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(f,t),p(l)}return void 0===s&&(s=setTimeout(f,t)),a}return t=bl(t)||0,yl(n)&&(u=!!n.leading,r=(d="maxWait"in n)?kl(bl(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=o=s=void 0},y.flush=function(){return void 0===s?a:v(ml())},y};function Cl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ll(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ll(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Ll(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function El(e,t){var n=[];if(e.node_types){var i,o=Cl(e.node_types);try{for(o.s();!(i=o.n()).done;){var r=i.value,a=Pl(r,e,t);a&&n.push({nodeType:r,category:e,occurrenceInfo:a})}}catch(e){o.e(e)}finally{o.f()}}return n}function Pl(e,t,n){if(n.length>0){var i=function(e,t){var n=h(e,"label")&&e.label?e.label.toLowerCase():"",i=Nl(n,t),o=i.occurrences,r=i.hitCounts;return{catLabelOccurrences:o,catLabelHitCounts:r}}(t,n),o=i.catLabelOccurrences,r=i.catLabelHitCounts,a=function(e,t){var n=h(e,"app_data.ui_data.label")&&e.app_data.ui_data.label?e.app_data.ui_data.label.toLowerCase():"",i=Nl(n,t),o=i.occurrences,r=i.hitCounts;return{nodeLabelOccurrences:o,nodeLabelHitCounts:r}}(e,n),s=a.nodeLabelOccurrences,l=a.nodeLabelHitCounts,c=function(e,t){var n=h(e,"app_data.ui_data.description")&&e.app_data.ui_data.description?e.app_data.ui_data.description.toLowerCase():"",i=Nl(n,t),o=i.occurrences,r=i.hitCounts;return{nodeDescOccurrences:o,nodeDescHitCounts:r}}(e,n),u=c.nodeDescOccurrences,d=c.nodeDescHitCounts;if(o.length>0||s.length>0||u.length>0){var p=function(e,t,n,i){for(var o=0,r=0,a=0;a<i;a++)o+=e[a]+10*t[a]+n[a],e[a]+t[a]+n[a]>0&&r++;return o+50*r}(r,l,d,n.length);return{catLabelOccurrences:o,nodeLabelOccurrences:s,nodeDescOccurrences:u,ranking:p}}}return null}function Nl(e,t){var n=[],i=[];return t.forEach((function(t){if(t){var o=function(e,t){var n=[],i=0,o=0,r=0;for(;o>-1&&r<20;)(o=e.indexOf(t,i))>-1&&(n.push({start:o,end:o+t.length}),i=o+t.length,r++);return n}(e,t);n=function(e,t){if(0===e.length)return t;if(0===t.length)return e;var n=[];t.forEach((function(t){var i=!1;e.forEach((function(e){t.start<=e.start&&t.end>=e.end?(e.start=t.start,e.end=t.end,i=!0):t.start>=e.start&&t.start<e.end?(t.end>=e.end&&(e.end=t.end),i=!0):t.end>e.start&&t.end<=e.end&&(t.start<e.start&&(e.start=t.start),i=!0)})),i||n.push(t)}));var i=e.concat(n);return i=i.sort((function(e,t){return e.start<t.start?-1:1}))}(n,o),i.push(o.length>0?1:0)}})),{occurrences:n,hitCounts:i}}function Tl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Tl=function(){return!!e})()}var Dl=c(function(n){function s(){return t(this,s),e=this,i=arguments,n=o(n=s),r(e,Tl()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return i(s,n),e(s,[{key:"render",value:function(){var e=this.props.intl.formatMessage({id:this.props.id,defaultMessage:fl[this.props.id]});return a.createElement("div",{key:"l_btn",className:"palette-list-item-desc-button",onClick:this.props.onClick},e)}}])}(a.Component)),Sl="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2060%22%3E%20%3Cpath%20d%3D%22M32%2C42a1.61%2C1.61%2C0%2C0%2C1-.8-.2L9.28%2C30.15l1.6-2.94L32%2C38.47%2C53.12%2C27.21l1.6%2C2.94L32.8%2C41.84A1.71%2C1.71%2C0%2C0%2C1%2C32%2C42Z%22%2F%3E%20%3Cpath%20d%3D%22M32%2C52.05a1.72%2C1.72%2C0%2C0%2C1-.8-.2L9.28%2C40.17l1.6-2.94L32%2C48.48%2C53.12%2C37.23l1.6%2C2.94L32.8%2C51.85A1.72%2C1.72%2C0%2C0%2C1%2C32%2C52.05Z%22%2F%3E%20%3Cpath%20d%3D%22M32%2C32a1.72%2C1.72%2C0%2C0%2C1-.8-.2L9.28%2C20.14a1.66%2C1.66%2C0%2C0%2C1%2C0-2.94L31.2%2C5.52a1.68%2C1.68%2C0%2C0%2C1%2C1.6%2C0L54.72%2C17.2a1.66%2C1.66%2C0%2C0%2C1%2C.69%2C2.26%2C1.74%2C1.74%2C0%2C0%2C1-.69.68L32.8%2C31.82A1.72%2C1.72%2C0%2C0%2C1%2C32%2C32ZM13.64%2C18.67%2C32%2C28.46l18.36-9.79L32%2C8.88Z%22%2F%3E%20%3Crect%20x%3D%225.02%22%20y%3D%221.98%22%20width%3D%2253.96%22%20height%3D%2253.41%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E",Ol="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2060%22%3E%20%3Cpolygon%20points%3D%2217.28%204.63%2026.88%2014.07%2024.74%2015.87%2018.94%2010.35%2018.94%2026.29%2015.78%2026.29%2015.78%2010.35%209.97%2016.12%207.91%2014.04%2017.28%204.63%22%2F%3E%20%3Cpath%20d%3D%22M32.39%2C6.36l.2.1%2C20.35%2C11a2.7%2C2.7%2C0%2C0%2C1%2C1.11%2C1.11%2C2.74%2C2.74%2C0%2C0%2C1-.89%2C3.59l-.22.13L33%2C33a2.66%2C2.66%2C0%2C0%2C1-2.51%2C0l-6-3.13a1.83%2C1.83%2C0%2C1%2C1%2C1.69-3.25l5.57%2C2.89%2C18-9.69L30.85%2C9.68A1.83%2C1.83%2C0%2C0%2C1%2C30%2C7.39l.09-.19A1.83%2C1.83%2C0%2C0%2C1%2C32.39%2C6.36Z%22%2F%3E%20%3Cpath%20d%3D%22M53%2C28.53l1.62%2C3L32.52%2C43.43a1.59%2C1.59%2C0%2C0%2C1-.8.21%2C1.66%2C1.66%2C0%2C0%2C1-.81-.21L8.8%2C31.53l1.61-3L31.72%2C40Z%22%2F%3E%20%3Cpath%20d%3D%22M53%2C38.74l1.62%2C3L32.52%2C53.64a1.69%2C1.69%2C0%2C0%2C1-.8.2%2C1.76%2C1.76%2C0%2C0%2C1-.81-.2L8.8%2C41.73l1.61-3L31.72%2C50.21Z%22%2F%3E%3C%2Fsvg%3E";function Al(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Al=function(){return!!e})()}var zl=function(s){function l(e){var n,i,a,s;return t(this,l),i=this,s=[e],a=o(a=l),(n=r(i,Al()?Reflect.construct(a,s||[],o(i).constructor):a.apply(i,s))).state={showFullDescription:!1},n.ghostData=null,n.showFullDescription=n.showFullDescription.bind(n),n.showShortDescription=n.showShortDescription.bind(n),n.onDragStart=n.onDragStart.bind(n),n.onDragEnd=n.onDragEnd.bind(n),n.onClick=n.onClick.bind(n),n.onDoubleClick=n.onDoubleClick.bind(n),n.onMouseOver=n.onMouseOver.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.onMouseDown=n.onMouseDown.bind(n),n.onKeyDown=n.onKeyDown.bind(n),n}return i(l,s),e(l,[{key:"onMouseDown",value:function(){this.props.canvasController.closeTip(),this.props.setFocusIndex&&this.props.setFocusIndex(),this.ghostData=this.props.canvasController.getGhostNode(this.props.nodeTypeInfo.nodeType)}},{key:"onDragStart",value:function(e){this.props.canvasController.closeTip(),this.props.canvasController.nodeTemplateDragStart(this.ghostData.nodeTemplate),e.dataTransfer.setData(D,""),this.ghostData&&e.dataTransfer.setDragImage(this.ghostData.element,this.ghostData.centerX,this.ghostData.centerY)}},{key:"onKeyDown",value:function(e){ot.createAutoNode(e)?this.createAutoNode(!0):ot.createAutoNodeNoLink(e)?this.createAutoNode(!1):ot.nextNodeInCategory(e)&&this.props.nextNodeInCategory?this.props.nextNodeInCategory(e):ot.previousNodeInCategory(e)&&this.props.previousNodeInCategory&&this.props.previousNodeInCategory(e)}},{key:"onDragEnd",value:function(){this.props.canvasController.nodeTemplateDragEnd()}},{key:"onDoubleClick",value:function(){this.createAutoNode(!0)}},{key:"onClick",value:function(){this.props.allowClickToAdd&&this.createAutoNode(!0)}},{key:"onMouseOver",value:function(e){this.props.isDisplaySearchResult||0!==e.buttons||this.displayTip()}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"getHighlightedCategoryLabel",value:function(){return this.getHighlightedText(this.props.nodeTypeInfo.category.label,this.props.nodeTypeInfo.occurrenceInfo.catLabelOccurrences)}},{key:"getHighlightedLabel",value:function(e){return this.getHighlightedText(e,this.props.nodeTypeInfo.occurrenceInfo.nodeLabelOccurrences)}},{key:"getHighlightedDesc",value:function(){var e=this.props.nodeTypeInfo.nodeType.app_data.ui_data.description,t=this.props.nodeTypeInfo.occurrenceInfo.nodeDescOccurrences,n=!1;if(e.length>150&&(n=!0,!this.state.showFullDescription)){var i=this.getAbbreviatedDescription(e,t,150);e=i.abbrDesc,t=i.occurrences}var o=this.getHighlightedText(e,t);return n&&(this.state.showFullDescription?o.push(a.createElement(Dl,{id:"palette.flyout.search.less",onClick:this.showShortDescription})):o.push(a.createElement(Dl,{id:"palette.flyout.search.more",onClick:this.showFullDescription}))),o}},{key:"getAbbreviatedDescription",value:function(e,t,n){if(0===t.length)return{abbrDesc:e.substring(0,n)+" ...",occurrences:t};var i=t[0].start,o=e.length-i,r="",a=0;return i<n?(a=0,r=e.substring(a,n)+" ..."):o>n?(a=i,r="... "+e.substring(a,i+n)+" ...",a-=4):(a=e.length-n,r="... "+e.substring(a,e.length),a-=4),{abbrDesc:r,occurrences:t.map((function(e){return{start:e.start-a,end:e.end-a}}))}}},{key:"getHighlightedText",value:function(e,t){if(!t||0===t.length)return[a.createElement("span",{key:"o"},e)];var n=[],i=0,o="";return t.forEach((function(r,s){o=e.substring(i,r.start),n.push(a.createElement("span",{key:"s"+s},o)),o=e.substring(r.start,r.end),n.push(a.createElement("mark",{key:"m"+s},o)),i=r.end,s===t.length-1&&r.end<e.length&&(o=e.substring(r.end),n.push(a.createElement("span",{key:"f"+s},o)))})),n}},{key:"getMainDivClass",value:function(){var e,t=null===(e=this.props.nodeTypeInfo)||void 0===e||null===(e=e.nodeType)||void 0===e||null===(e=e.app_data)||void 0===e||null===(e=e.ui_data)||void 0===e?void 0:e.palette_class_name,n=this.props.isDisplaySearchResult?"palette-list-item search-result":"palette-list-item";return n+=t?" "+t:""}},{key:"showFullDescription",value:function(){this.setState({showFullDescription:!0})}},{key:"showShortDescription",value:function(){this.setState({showFullDescription:!1})}},{key:"focus",value:function(){this.itemRef.current.focus(),this.displayTip()}},{key:"displayTip",value:function(){this.props.canvasController.closeTip();var e=this.props.nodeTypeInfo.category.empty_text?{app_data:{ui_data:{label:this.props.nodeTypeInfo.category.empty_text}}}:this.props.nodeTypeInfo.nodeType;this.props.canvasController.openTip({id:"paletteTip_"+this.props.nodeTypeInfo.nodeType.op,type:S,targetObj:this.itemRef.current,nodeTemplate:e,category:this.props.nodeTypeInfo.category})}},{key:"isItemDisabled",value:function(){var e,t=null===(e=this.props.nodeTypeInfo.nodeType)||void 0===e||null===(e=e.app_data)||void 0===e||null===(e=e.ui_data)||void 0===e?void 0:e.palette_disabled;return!this.props.isEditingEnabled||t}},{key:"createAutoNode",value:function(e){if(this.props.canvasController.createAutoNode&&!this.isItemDisabled()){var t=this.props.canvasController.convertNodeTemplate(this.props.nodeTypeInfo.nodeType);this.props.canvasController.createAutoNode(t,e)}}},{key:"render",value:function(){var e=null,t=p(this.props,"nodeTypeInfo.nodeType.app_data.ui_data.label",""),i=this.isItemDisabled()?"false":"true",o=null,r=this.isItemDisabled();if(h(this.props.nodeTypeInfo.nodeType,"app_data.ui_data.image")){var s=this.props.nodeTypeInfo.nodeType.app_data.ui_data.palette_image?this.props.nodeTypeInfo.nodeType.app_data.ui_data.palette_image:this.props.nodeTypeInfo.nodeType.app_data.ui_data.image;s===A?s=Sl:s===z&&(s=Ol),"object"===n(s)&&a.isValidElement(s)?o=s:"string"==typeof s&&(o=s.endsWith(".svg")?a.createElement(T,{src:s,className:"palette-list-item-icon",draggable:"false","aria-hidden":"true"}):a.createElement("img",{src:s,className:"palette-list-item-icon",draggable:"false",alt:""}))}!t||!this.props.isPaletteWide&&o||(e=this.props.isDisplaySearchResult?this.getHighlightedLabel(t):a.createElement("span",null,t));var l=this.props.isShowRanking&&this.props.isDisplaySearchResult&&h(this.props.nodeTypeInfo,"occurrenceInfo.ranking")?a.createElement("span",null,this.props.nodeTypeInfo.occurrenceInfo.ranking):null;0===this.props.nodeTypeInfo.category.node_types.length&&this.props.nodeTypeInfo.category.empty_text&&(t=this.props.nodeTypeInfo.category.empty_text,this.props.isPaletteWide&&(e=a.createElement("span",null,t)),i="false",o=a.createElement(rt,{type:O.WARNING_UNFILLED,className:"palette-list-item-icon-warning",draggable:"false"}));var c=this.getMainDivClass(),u=this.props.isDisplaySearchResult?a.createElement("div",{className:"palette-list-item-category-label"},this.getHighlightedCategoryLabel()):null,d=this.props.isDisplaySearchResult&&h(this.props.nodeTypeInfo.nodeType,"app_data.ui_data.description")&&this.props.nodeTypeInfo.nodeType.app_data.ui_data.description?a.createElement("div",{className:"palette-list-item-description"},this.getHighlightedDesc()):null,g=e?a.createElement("div",{className:"palette-list-item-text-div"},e):null;return this.itemRef=a.createRef(),a.createElement("div",{ref:this.itemRef,"data-id":this.props.nodeTypeInfo.nodeType.op,tabIndex:this.props.tabIndex,role:"button","aria-label":t,"aria-disabled":r,draggable:i,className:c,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onKeyDown:this.props.isEditingEnabled?this.onKeyDown:null,onMouseDown:this.props.isEditingEnabled?this.onMouseDown:null,onDragStart:this.props.isEditingEnabled?this.onDragStart:null,onDragEnd:this.props.isEditingEnabled?this.onDragEnd:null,onClick:this.props.isEditingEnabled?this.onClick:null,onDoubleClick:this.props.isEditingEnabled?this.onDoubleClick:null},u,a.createElement("div",{className:"palette-list-item-icon-and-text"},o,g,l),d)}}])}(a.Component),Il=zl;function Ml(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ml=function(){return!!e})()}var Hl=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Ml()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).currentFocusIndex=0,n.contentItemRefs=[],n.nextNodeInCategory=n.nextNodeInCategory.bind(n),n.previousNodeInCategory=n.previousNodeInCategory.bind(n),n}return i(s,n),e(s,[{key:"setFirstNode",value:function(){this.currentFocusIndex=0,this.contentItemRefs[this.currentFocusIndex].current.focus()}},{key:"setFocusIndex",value:function(e){this.currentFocusIndex=e}},{key:"nextNodeInCategory",value:function(e){this.currentFocusIndex++,this.currentFocusIndex>this.contentItemRefs.length-1&&(this.currentFocusIndex=0),this.contentItemRefs[this.currentFocusIndex].current.focus(),it.stopPropagationAndPreventDefault(e)}},{key:"previousNodeInCategory",value:function(e){this.currentFocusIndex--,this.currentFocusIndex<0&&(this.currentFocusIndex=this.contentItemRefs.length-1),this.contentItemRefs[this.currentFocusIndex].current.focus(),it.stopPropagationAndPreventDefault(e)}},{key:"render",value:function(){var e=[];if(this.contentItemRefs=[],this.props.category&&this.props.category.node_types&&0===this.props.category.node_types.length&&this.props.category.empty_text)e.push(a.createElement("div",{key:"item_empty"},a.createElement(Il,{tabIndex:0,nodeTypeInfo:{nodeType:{},category:this.props.category},isDisplaySearchResult:!1,canvasController:this.props.canvasController,allowClickToAdd:this.props.allowClickToAdd,isPaletteWide:this.props.isPaletteWide,isEditingEnabled:this.props.isEditingEnabled})));else for(var t=0;t<this.props.nodeTypeInfos.length;t++){var n="item_"+t,i=a.createRef();this.contentItemRefs.push(i),e.push(a.createElement(Il,{ref:i,key:n,tabIndex:-1,nodeTypeInfo:this.props.nodeTypeInfos[t],isDisplaySearchResult:!1,canvasController:this.props.canvasController,isPaletteWide:this.props.isPaletteWide,isEditingEnabled:this.props.isEditingEnabled,nextNodeInCategory:this.nextNodeInCategory,previousNodeInCategory:this.previousNodeInCategory,setFocusIndex:this.setFocusIndex.bind(this,t),allowClickToAdd:this.props.allowClickToAdd}))}return a.createElement("div",{width:"100%",draggable:"false",className:"palette-content-list palette-scroll"},e)}}])}(a.Component);function _l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_l=function(){return!!e})()}var Vl=function(s){function l(e){var n,i,a,s;return t(this,l),i=this,s=[e],a=o(a=l),(n=r(i,_l()?Reflect.construct(a,s||[],o(i).constructor):a.apply(i,s))).onMouseOver=n.onMouseOver.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.onFocus=n.onFocus.bind(n),n.categoryClicked=n.categoryClicked.bind(n),n.categoryKeyPressed=n.categoryKeyPressed.bind(n),n.setPaletteCategory=n.setPaletteCategory.bind(n),n}return i(l,s),e(l,[{key:"onMouseOver",value:function(e){this.displayTip(e)}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"onFocus",value:function(e){this.displayTip(e)}},{key:"getDisplayLabel",value:function(){return!0===this.props.isPaletteWide?this.props.category.label:!this.props.category.image&&this.props.category.label&&this.props.category.label.length>0?this.props.category.label.substr(0,3):null}},{key:"getInlineLoadingRenderCategory",value:function(){var e="";this.props.isPaletteWide&&(e=this.props.category.loading_text);var t=a.createElement("div",{className:"palette-flyout-category"},a.createElement("div",{className:"palette-flyout-category-item-loading"},a.createElement(L,{description:e,onSuccess:function(){return null},status:"active",successDelay:1500})));return a.createElement(C,{className:"palette-loading-category",title:t})}},{key:"setPaletteCategory",value:function(e){e?this.props.canvasController.closePaletteCategory(this.props.category.id):this.props.canvasController.openPaletteCategory(this.props.category.id)}},{key:"getRenderCategory",value:function(){var e=this.getTitleObj(),t=this.getContent();return a.createElement(C,{title:e,open:this.props.category.is_open,onKeyDown:this.categoryKeyPressed,onFocus:this.onFocus},t)}},{key:"getTitleObj",value:function(){var e=this.getItemImage(),t=this.getItemText();return this.catRef=a.createRef(),a.createElement("div",{className:"palette-flyout-category",ref:this.catRef,"data-id":p(this.props.category,"id",""),onClick:this.categoryClicked,value:this.props.category.label,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},a.createElement("div",{className:"palette-flyout-category-item",tabIndex:-1},e,t))}},{key:"getItemText",value:function(){var e=null,t=this.getDisplayLabel();if(this.props.isPaletteWide){var n=this.props.category.image?"palette-flyout-category-text":"palette-flyout-category-text-no-image";e=a.createElement("span",{className:n},t)}else!this.props.category.image&&this.props.category.label&&this.props.category.label.length>0&&(e=a.createElement("span",{className:"palette-flyout-category-text-abbr"},t));return e}},{key:"getItemImage",value:function(){var e=null;return this.props.category.image&&""!==this.props.category.image&&(e="object"===n(this.props.category.image)&&a.isValidElement(this.props.category.image)?this.props.category.image:this.props.category.image.endsWith(".svg")?a.createElement("div",null,a.createElement(T,{src:this.props.category.image,className:"palette-flyout-category-item-icon",draggable:"false","aria-hidden":"true"})):a.createElement("div",null,a.createElement("img",{src:this.props.category.image,className:"palette-flyout-category-item-icon",draggable:"false",alt:this.props.category.label}))),e}},{key:"getContent",value:function(){var e=this;if(this.props.category.is_open){var t=this.props.category.node_types.map((function(t){return{nodeType:t,category:e.props.category}}));return this.pclRef=a.createRef(),a.createElement(Hl,{ref:this.pclRef,key:this.props.category.id+"-nodes",category:this.props.category,nodeTypeInfos:t,canvasController:this.props.canvasController,allowClickToAdd:this.props.allowClickToAdd,isPaletteWide:this.props.isPaletteWide,isEditingEnabled:this.props.isEditingEnabled})}return null}},{key:"displayTip",value:function(){this.props.canvasController.closeTip(),this.props.canvasController.openTip({id:"paletteTip_"+this.props.category.id,type:I,targetObj:this.catRef.current,category:this.props.category})}},{key:"categoryClicked",value:function(e){e.stopPropagation(),this.setPaletteCategory(this.props.category.is_open)}},{key:"categoryKeyPressed",value:function(e){"cds--accordion__heading"===e.target.className&&(ot.openCategory(e)?(this.setPaletteCategory(this.props.category.is_open),it.stopPropagationAndPreventDefault(e)):this.props.category.is_open&&ot.fromCategoryToFirstNode(e)&&(this.pclRef.current.setFirstNode(),it.stopPropagationAndPreventDefault(e)))}},{key:"render",value:function(){return this.props.category.loading_text?this.getInlineLoadingRenderCategory():this.getRenderCategory()}}])}(a.Component);function jl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jl=function(){return!!e})()}var Fl=c(function(n){function s(){var e,n,i,a;return t(this,s),n=this,i=o(i=s),(e=r(n,jl()?Reflect.construct(i,a||[],o(n).constructor):i.apply(n,a))).state={searchString:""},e.searchOnClick=e.searchOnClick.bind(e),e.handleSearchStringChange=e.handleSearchStringChange.bind(e),e}return i(s,n),e(s,[{key:"handleSearchStringChange",value:function(e){var t=this,n=e.target.value||"";this.setState({searchString:n},(function(){return t.props.handleSearchStringChange(n)}))}},{key:"searchOnClick",value:function(){this.props.isPaletteWide||this.props.canvasController.openPalette()}},{key:"render",value:function(){var e=this.props.intl.formatMessage({id:"palette.flyout.search.placeholder",defaultMessage:fl["palette.flyout.search.placeholder"]});return a.createElement("div",{className:"palette-flyout-search-container",id:"palette-flyout-search"},a.createElement(E,{className:"palette-flyout-search",placeholder:e,onChange:this.handleSearchStringChange,size:"sm",value:this.state.searchString,labelText:e,onClick:this.searchOnClick}))}}])}(a.Component));function Rl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Rl=function(){return!!e})()}var Bl=c(function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Rl()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={},n}return i(s,n),e(s,[{key:"getNoResultsDiv",value:function(){var e=this.props.intl.formatMessage({id:"palette.flyout.search.noresults",defaultMessage:fl["palette.flyout.search.noresults"]}),t=this.props.intl.formatMessage({id:"palette.flyout.search.adjustsearch",defaultMessage:fl["palette.flyout.search.adjustsearch"]});return a.createElement("div",null,a.createElement("div",{className:"palette-no-results-title"},e),a.createElement("br",null),a.createElement("div",{className:"palette-no-results-desc"},t))}},{key:"getContentListDiv",value:function(){for(var e=[],t=0;t<this.props.nodeTypeInfos.length;t++){var n="item_"+t;e.push(a.createElement("div",{key:n},a.createElement(Il,{tabIndex:0,nodeTypeInfo:this.props.nodeTypeInfos[t],isDisplaySearchResult:!0,isShowRanking:this.props.isShowRanking,canvasController:this.props.canvasController,isPaletteWide:this.props.isPaletteWide,isEditingEnabled:this.props.isEditingEnabled,allowClickToAdd:this.props.allowClickToAdd})))}if(this.props.isNodeTypeInfosArrayTruncated){var i=this.props.intl.formatMessage({id:"palette.flyout.search.resultsrestricted",defaultMessage:fl["palette.flyout.search.resultsrestricted"]});e.push(a.createElement("div",{key:"restrict-item",className:"palette-flyout-restrict-item"},i))}return a.createElement("div",{width:"100%",draggable:"false",className:"palette-scroll"},e)}},{key:"render",value:function(){return 0===this.props.nodeTypeInfos.length?this.getNoResultsDiv():this.getContentListDiv()}}])}(a.Component));function Ul(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gl(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Gl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Zl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zl=function(){return!!e})()}var Wl=new pt("PaletteFlyoutContent"),Xl=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Zl()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={searchString:""},n.categories=[],n.getUniqueCategories=n.getUniqueCategories.bind(n),n.setSearchString=n.setSearchString.bind(n),n.handleSearchStringChange=n.handleSearchStringChange.bind(n),n.setSearchStringThrottled=wl(n.setSearchString,200),n}return i(s,n),e(s,[{key:"getUniqueCategories",value:function(e){var t=[];if(e){var n,i=Ul(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;-1===t.indexOf(o.label)&&t.push(o)}}catch(e){i.e(e)}finally{i.f()}}return t}},{key:"getContentDivs",value:function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(a.createElement("div",{key:i.label+"-container"},a.createElement(Vl,{key:i.id,category:i,canvasController:this.props.canvasController,allowClickToAdd:this.props.allowClickToAdd,isPaletteWide:this.props.isPaletteWide,isEditingEnabled:this.props.isEditingEnabled})))}return a.createElement(P,null,t)}},{key:"getFilteredContentDivs",value:function(e){Wl.logStartTimer("getFilteredNodeTypeInfos");var t=function(e,t){for(var n=[],i=t.toLowerCase().split(" ").filter((function(e){return""!==e})),o=0;o<e.length;o++)n.push.apply(n,w(El(e[o],i)));return n.sort((function(e,t){return e.occurrenceInfo.ranking<=t.occurrenceInfo.ranking?1:-1}))}(this.categories,this.state.searchString);Wl.logEndTimer("getFilteredNodeTypeInfos");var n=!1;return t.length>10&&(t=t.slice(0,10),n=!0),[a.createElement(Bl,{key:"filtered-nodes",nodeTypeInfos:t,canvasController:this.props.canvasController,allowClickToAdd:this.props.allowClickToAdd,isPaletteWide:this.props.isPaletteWide,isEditingEnabled:this.props.isEditingEnabled,isNodeTypeInfosArrayTruncated:n})]}},{key:"setSearchString",value:function(){this.setState({searchString:this.ss})}},{key:"handleSearchStringChange",value:function(e){this.ss=e,this.setSearchStringThrottled()}},{key:"render",value:function(){this.categories=this.getUniqueCategories(this.props.paletteJSON.categories);var e=this.props.isPaletteWide&&this.state.searchString?this.getFilteredContentDivs(this.categories):this.getContentDivs(this.categories),t=a.createElement("div",{className:"palette-flyout-categories"},e),n=a.createElement(Fl,{canvasController:this.props.canvasController,handleSearchStringChange:this.handleSearchStringChange,isPaletteWide:this.props.isPaletteWide}),i=this.props.paletteHeader&&!this.state.searchString&&this.props.isPaletteWide?this.props.paletteHeader:null,o="palette-flyout-content";return o+=i?" with-palette-header":"",a.createElement("div",{className:o},n,i,t)}}])}(a.Component);function Yl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Yl=function(){return!!e})()}var Kl=c(function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Yl()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).paletteNodes=[],n}return i(s,n),e(s,[{key:"render",value:function(){var e="palette-flyout-div";return this.props.isPaletteWide?e+=" palette-flyout-div-open":e+=" palette-flyout-div-narrow",a.createElement("nav",{className:"palette-nav","aria-label":this.props.intl.formatMessage({id:"palette.flyout.label",defaultMessage:fl["palette.flyout.label"]}),role:"navigation"},a.createElement("div",{className:e},a.createElement(Xl,{canvasController:this.props.canvasController,paletteJSON:this.props.paletteJSON,paletteHeader:this.props.paletteHeader,allowClickToAdd:this.props.allowClickToAdd,isEditingEnabled:this.props.isEditingEnabled,isPaletteWide:this.props.isPaletteWide})))}}])}(a.Component));function ql(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ql=function(){return!!e})()}var $l=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,ql()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("Palette"),n}return i(s,n),e(s,[{key:"render",value:function(){return this.logger.log("render"),a.createElement(Kl,{canvasController:this.props.canvasController,paletteJSON:this.props.paletteJSON,paletteHeader:this.props.paletteHeader,allowClickToAdd:this.props.allowClickToAdd,isEditingEnabled:this.props.isEditingEnabled,isPaletteWide:this.props.isPaletteWide})}}])}(a.Component),Jl=s((function(e,t){return{paletteJSON:e.palette.content,isEditingEnabled:e.canvasconfig.enableEditingActions,paletteHeader:e.canvasconfig.enablePaletteHeader,allowClickToAdd:e.canvasconfig.enableSingleClickAddFromPalette,isPaletteWide:e.canvasconfig.enablePaletteLayout===M||e.canvasconfig.enablePaletteLayout===H&&e.palette.isOpen}}))($l);function Ql(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ql=function(){return!!e})()}var ec=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Ql()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={},n.mouseDown=n.mouseDown.bind(n),n.doubleClick=n.doubleClick.bind(n),n.toolbarActionHandler=n.toolbarActionHandler.bind(n),n}return i(s,n),e(s,[{key:"mouseDown",value:function(e){this.props.mouseDownMethod(e)}},{key:"doubleClick",value:function(e){this.props.windowMaximizeMethod(e)}},{key:"toolbarActionHandler",value:function(e){"close"===e?this.props.canvasController.closePalette():"grid"===e?this.props.showGridMethod(!0):"list"===e&&this.props.showGridMethod(!1)}},{key:"render",value:function(){var e={leftBar:[{action:"grid",iconEnabled:a.createElement(v,null),enable:!0,isSelected:this.props.showGrid},{action:"list",iconEnabled:a.createElement(at,null),enable:!0,isSelected:!this.props.showGrid},{divider:!0}],rightBar:[{divider:!0},{action:"close",iconEnabled:a.createElement(gt,null),enable:!0}]};return a.createElement("div",{className:"palette-dialog-topbar",onMouseDown:this.mouseDown,onDoubleClick:this.doubleClick},a.createElement(y,{instanceId:0,config:e,toolbarActionHandler:this.toolbarActionHandler}))}}])}(a.Component);function tc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tc=function(){return!!e})()}var nc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,tc()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={},n.categorySelected=n.categorySelected.bind(n),n}return i(s,n),e(s,[{key:"categorySelected",value:function(e){this.props.categorySelectedMethod(e)}},{key:"render",value:function(){var e="palette-dialog-category";return this.props.selectedCategory===this.props.category.label&&(e="palette-dialog-category-selected"),a.createElement("div",{"data-id":this.props.category.id,className:e,onClick:this.categorySelected},this.props.category.label)}}])}(a.Component);function ic(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ic=function(){return!!e})()}var oc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,ic()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={},n}return i(s,n),e(s,[{key:"render",value:function(){for(var e=[],t=0;t<this.props.categories.length;t++)e.push(a.createElement(nc,{key:this.props.categories[t].label,category:this.props.categories[t],selectedCategory:this.props.selectedCategory,categorySelectedMethod:this.props.categorySelectedMethod}));return a.createElement("div",{className:"palette-dialog-categories palette-scroll"},e)}}])}(a.Component);function rc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rc=function(){return!!e})()}var ac=function(s){function l(e){var n,i,a,s;return t(this,l),i=this,s=[e],a=o(a=l),(n=r(i,rc()?Reflect.construct(a,s||[],o(i).constructor):a.apply(i,s))).state={},n.ghostData=null,n.onDragStart=n.onDragStart.bind(n),n.onDragEnd=n.onDragEnd.bind(n),n.onClick=n.onClick.bind(n),n.onDoubleClick=n.onDoubleClick.bind(n),n.onMouseOver=n.onMouseOver.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.onMouseDown=n.onMouseDown.bind(n),n}return i(l,s),e(l,[{key:"onMouseDown",value:function(){this.props.canvasController.closeTip(),this.ghostData=this.props.canvasController.getGhostNode(this.props.nodeTemplate)}},{key:"onDragStart",value:function(e){this.props.canvasController.nodeTemplateDragStart(this.ghostData.nodeTemplate),e.dataTransfer.setData(D,""),this.ghostData&&e.dataTransfer.setDragImage(this.ghostData.element,this.ghostData.centerX,this.ghostData.centerY)}},{key:"onDragEnd",value:function(){this.props.canvasController.nodeTemplateDragEnd()}},{key:"onClick",value:function(){this.props.allowClickToAdd&&this.createAutoNode()}},{key:"onDoubleClick",value:function(){this.createAutoNode()}},{key:"onMouseOver",value:function(e){if(0===e.buttons){var t=this.props.category.empty_text?{app_data:{ui_data:{label:this.props.category.empty_text}}}:this.props.nodeTemplate;this.props.canvasController.openTip({id:"paletteTip_"+this.props.nodeTemplate.op,type:S,targetObj:e.currentTarget,nodeTemplate:t,category:this.props.category})}}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"createAutoNode",value:function(){if(this.props.canvasController.createAutoNode){var e=this.props.canvasController.convertNodeTemplate(this.props.nodeTemplate);this.props.canvasController.createAutoNode(e)}}},{key:"render",value:function(){var e="";h(this.props.nodeTemplate,"app_data.ui_data.label")&&(e=this.props.nodeTemplate.app_data.ui_data.label);var t=a.createElement("div",{className:"node-icon"});if(h(this.props.nodeTemplate,"app_data.ui_data.image")){var i=this.props.nodeTemplate.app_data.ui_data.image;i===A?i=Sl:i===z&&(i=Ol),"object"===n(i)&&a.isValidElement(i)?t=i:"string"==typeof i&&(t=i.endsWith(".svg")?a.createElement(T,{src:i,className:"node-icon",alt:e}):a.createElement("img",{src:i,className:"node-icon",alt:e}))}var o=this.props.isEditingEnabled?"true":"false",r="palette-dialog-grid-node-text";return this.props.category&&0===this.props.category.node_types.length&&this.props.category.empty_text&&(e=this.props.category.empty_text,o="false",r="palette-dialog-grid-node-text-warning",t=a.createElement(rt,{type:O.WARNING_UNFILLED,className:"palette-dialog-grid-node-icon-warning",draggable:"false"})),a.createElement("div",{id:this.props.nodeTemplate.id,"data-id":this.props.nodeTemplate.op,draggable:o,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:this.props.isEditingEnabled?this.onMouseDown:null,onDragStart:this.props.isEditingEnabled?this.onDragStart:null,onDragEnd:this.props.isEditingEnabled?this.onDragEnd:null,onClick:this.props.isEditingEnabled?this.onClick:null,onDoubleClick:this.props.isEditingEnabled?this.onDoubleClick:null,className:"palette-dialog-grid-node-outer"},a.createElement("div",{className:"palette-dialog-grid-node-inner"},a.createElement("div",{className:"palette-dialog-grid-node-icon"},t),a.createElement("div",{className:r},e)))}}])}(a.Component),sc=ac;function lc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lc=function(){return!!e})()}var cc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,lc()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={},n}return i(s,n),e(s,[{key:"render",value:function(){var e=[];if(this.props.category&&this.props.category.node_types&&0===this.props.category.node_types.length&&this.props.category.empty_text)e.push(a.createElement(sc,{key:"pal_grid_node_empty",category:this.props.category,nodeTemplate:{},canvasController:this.props.canvasController,isEditingEnabled:this.props.isEditingEnabled,allowClickToAdd:this.props.allowClickToAdd}));else for(var t=0;t<this.props.nodeTypes.length;t++)e.push(a.createElement(sc,{key:"pal_grid_node_"+t,category:this.props.category,nodeTemplate:this.props.nodeTypes[t],canvasController:this.props.canvasController,isEditingEnabled:this.props.isEditingEnabled,allowClickToAdd:this.props.allowClickToAdd}));return a.createElement("div",{width:"100%",className:"palette-scroll"},e)}}])}(a.Component);function uc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(uc=function(){return!!e})()}var dc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,uc()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={selectedCategory:""},n.categorySelected=n.categorySelected.bind(n),n.getUniqueCategories=n.getUniqueCategories.bind(n),n.getSelectedCategory=n.getSelectedCategory.bind(n),n}return i(s,n),e(s,[{key:"getUniqueCategories",value:function(e){var t=[];if(e)for(var n=0;n<e.length;n++)-1===t.indexOf(e[n].label)&&t.push(e[n]);return t}},{key:"getSelectedCategory",value:function(e){var t={};if(e)for(var n=0;n<e.length;n++)e[n].label===this.state.selectedCategory&&(t=e[n]);return t}},{key:"categorySelected",value:function(e){this.setState({selectedCategory:e.target.firstChild.data})}},{key:"render",value:function(){var e=this.getUniqueCategories(this.props.paletteJSON.categories),t=this.getSelectedCategory(this.props.paletteJSON.categories),n=t&&t.node_types?t.node_types:[],i=n.map((function(e){return{nodeType:e,category:t}})),o=this.props.showGrid?a.createElement(cc,{category:t,nodeTypes:n,canvasController:this.props.canvasController,isEditingEnabled:this.props.isEditingEnabled,allowClickToAdd:this.props.allowClickToAdd}):a.createElement(Hl,{category:t,nodeTypeInfos:i,canvasController:this.props.canvasController,isPaletteWide:!0,isEditingEnabled:this.props.isEditingEnabled,allowClickToAdd:this.props.allowClickToAdd});return a.createElement("div",{className:"palette-dialog-content",ref:"palettecontent"},a.createElement(oc,{categories:e,selectedCategory:this.state.selectedCategory,categorySelectedMethod:this.categorySelected}),o)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.paletteJSON&&e.paletteJSON.categories&&e.paletteJSON.categories.length>0&&""===t.selectedCategory?{selectedCategory:e.paletteJSON.categories[0].label}:{}}}])}(a.Component);function hc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(hc=function(){return!!e})()}var pc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,hc()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={xPos:100,yPos:100,showGrid:!0},n.showGrid=n.showGrid.bind(n),n.mouseDownOnTopBar=n.mouseDownOnTopBar.bind(n),n.mouseDownOnPalette=n.mouseDownOnPalette.bind(n),n.mouseMove=n.mouseMove.bind(n),n.mouseUp=n.mouseUp.bind(n),n.windowResize=n.windowResize.bind(n),n.windowMaximize=n.windowMaximize.bind(n),n.getPaletteDiv=n.getPaletteDiv.bind(n),n.resizePalette=n.resizePalette.bind(n),n.movePalette=n.movePalette.bind(n),n.setResizingCursors=n.setResizingCursors.bind(n),n.setSizingHoverEdge=n.setSizingHoverEdge.bind(n),n.snapToWidth=n.snapToWidth.bind(n),n.snapToHeight=n.snapToHeight.bind(n),n.removePx=n.removePx.bind(n),n.dragging=!1,n.dragOffsetY=0,n.dragOffsetX=0,n.verticalSizingAction="",n.verticalSizingHover="",n.horizontalSizingAction="",n.hoizontalSizingHover="",n.savedWidth=0,n.savedLeft=0,n.savedHeight=0,n.savedTop=0,n.hoverZoneSize=3,n.totalHoverZoneSize=2*n.hoverZoneSize,n.adjustedWidth=137,n.adjustedHeight=51,n.adjustedScrollBarWidth=15,n.isMaximized=!1,n.paletteNodes=[],n.hackPaletteOffset=46,n.hackPaletteTopOffset=n.hackPaletteOffset+4,window.addEventListener("mousemove",n.mouseMove,!1),window.addEventListener("mouseup",n.mouseUp,!1),window.addEventListener("resize",n.windowResize,!1),n}return i(s,n),e(s,[{key:"componentDidUpdate",value:function(){this.windowResize()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.mouseMove),window.removeEventListener("mouseup",this.mouseUp),window.removeEventListener("resize",this.windowResize)}},{key:"getAdjustedMousePositionBottom",value:function(e,t){var n=e.clientY;return n>t.offsetTop+t.offsetHeight-this.hoverZoneSize&&(n=t.offsetTop+t.offsetHeight-this.hoverZoneSize),n}},{key:"getAdjustedMousePositionLeft",value:function(e,t){var n=e.clientX;return n<t.offsetLeft+this.hoverZoneSize&&(n=t.offsetLeft+this.hoverZoneSize),n}},{key:"getAdjustedMousePositionRight",value:function(e,t){var n=e.clientX;return n>t.offsetLeft+t.offsetWidth-this.hoverZoneSize&&(n=t.offsetLeft+t.offsetWidth-this.hoverZoneSize),n}},{key:"getAdjustedMousePositionTop",value:function(e,t){var n=e.clientY;return n<t.offsetTop+this.hoverZoneSize&&(n=t.offsetTop+this.hoverZoneSize),n}},{key:"getPaletteDiv",value:function(){return this.refs.palette}},{key:"getStyleProperty",value:function(e,t){var n=e.charAt(0),i=e.substring(1),o="#"===n?document.getElementById(i):document.getElementsByClassName(i)[0];return window.getComputedStyle(o,null).getPropertyValue(t)}},{key:"setResizingCursors",value:function(e){var t=this.getPaletteDiv();this.setSizingHoverEdge(e,t),"top"===this.verticalSizingHover?"left"===this.horizontalSizingHover?t.style.cursor="nwse-resize":"right"===this.horizontalSizingHover?t.style.cursor="nesw-resize":t.style.cursor="ns-resize":"bottom"===this.verticalSizingHover?"left"===this.horizontalSizingHover?t.style.cursor="nesw-resize":"right"===this.horizontalSizingHover?t.style.cursor="nwse-resize":t.style.cursor="ns-resize":"left"===this.horizontalSizingHover||"right"===this.horizontalSizingHover?t.style.cursor="ew-resize":t.style.cursor="default"}},{key:"setContentDivHeight",value:function(e,t){var n=t-this.removePx(this.getStyleProperty(".palette-dialog-topbar","height"))-this.totalHoverZoneSize+"px",i=e.childNodes[1];i.style.height=n,i.childNodes[0].style.height=n,i.childNodes[1].style.height=n}},{key:"setSizingHoverEdge",value:function(e,t){e.clientX>t.offsetLeft&&e.clientX<t.offsetLeft+this.totalHoverZoneSize?this.horizontalSizingHover="left":e.clientX<t.offsetLeft+t.offsetWidth&&e.clientX>t.offsetLeft+t.offsetWidth-this.totalHoverZoneSize?this.horizontalSizingHover="right":(this.horizontalSizingHover="",this.horizontalSizingAction=""),e.clientY>t.offsetTop+this.hackPaletteTopOffset&&e.clientY<t.offsetTop+this.hackPaletteTopOffset+this.totalHoverZoneSize?this.verticalSizingHover="top":e.clientY<t.offsetTop+t.offsetHeight+this.hackPaletteOffset&&e.clientY>t.offsetTop+t.offsetHeight+this.hackPaletteOffset-this.totalHoverZoneSize?this.verticalSizingHover="bottom":(this.verticalSizingHover="",this.verticalSizingAction="")}},{key:"mouseDownOnTopBar",value:function(e){this.dragging=!0;var t=this.getPaletteDiv();this.dragOffsetX=e.clientX-t.offsetLeft,this.dragOffsetY=e.clientY-t.offsetTop}},{key:"mouseDownOnPalette",value:function(e){var t=this.getPaletteDiv();""===this.verticalSizingHover&&""===this.horizontalSizingHover||(this.verticalSizingAction=this.verticalSizingHover,this.horizontalSizingAction=this.horizontalSizingHover,this.savedWidth=t.offsetWidth,this.savedLeft=t.offsetLeft,this.savedHeight=t.offsetHeight,this.savedTop=t.offsetTop)}},{key:"mouseMove",value:function(e){""!==this.verticalSizingAction||""!==this.horizontalSizingAction?this.resizePalette(e):!0===this.dragging?this.movePalette(e):this.setResizingCursors(e)}},{key:"mouseUp",value:function(){var e=this.getPaletteDiv();if(this.state.showGrid&&""!==this.horizontalSizingAction){var t=this.removePx(e.style.width);""!==t&&(t=this.snapToWidth(t)),e.style.width=t+"px";var n=e.childNodes[1].childNodes[1];n.clientHeight<n.scrollHeight&&(e.style.width=t+this.adjustedScrollBarWidth+"px")}if(""!==this.verticalSizingAction){var i=this.removePx(e.style.height);if(""!==i){var o=this.snapToHeight(i);e.style.height=o+"px",this.setContentDivHeight(e,o)}}this.dragging=!1,this.verticalSizingAction="",this.horizontalSizingAction="",this.verticalSizingHover="",this.horizontalSizingHover=""}},{key:"movePalette",value:function(e){var t=this.getPaletteDiv(),n=document.getElementById(this.props.containingDivId),i=e.clientX-this.dragOffsetX,o=e.clientY-this.dragOffsetY;i<n.offsetLeft+this.hoverZoneSize&&(i=n.offsetLeft+this.hoverZoneSize),o<n.offsetTop+this.hoverZoneSize&&(o=n.offsetTop+this.hoverZoneSize),i+t.offsetWidth>n.offsetLeft+n.offsetWidth&&(i=n.offsetLeft+n.offsetWidth-t.offsetWidth-this.hoverZoneSize),o+t.offsetHeight>n.offsetTop+n.offsetHeight&&(o=n.offsetTop+n.offsetHeight-t.offsetHeight-this.hoverZoneSize),t.style.left=i+"px",t.style.top=o+"px"}},{key:"removePx",value:function(e){return parseInt(e.substring(0,e.indexOf("px")),10)}},{key:"resizePalette",value:function(e){var t=this.getPaletteDiv(),n=document.getElementById(this.props.containingDivId);this.isMaximized=!1;var i=this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","width"))+this.removePx(this.getStyleProperty(".palette-dialog-categories","min-width"))+2*this.hoverZoneSize,o=this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","height"))+this.removePx(this.getStyleProperty(".palette-dialog-topbar","height"))+2*this.hoverZoneSize;if("left"===this.horizontalSizingAction){var r=this.getAdjustedMousePositionLeft(e,n),a=this.savedWidth-(r-this.savedLeft);a<=i?t.style.width=i+"px":(t.style.width=a+"px",t.style.left=r+"px")}if("right"===this.horizontalSizingAction){var s=this.getAdjustedMousePositionRight(e,n)-this.savedLeft;s<=i&&(s=i),t.style.width=s+"px"}if("top"===this.verticalSizingAction){var l=this.getAdjustedMousePositionTop(e,n),c=this.savedHeight-(l-this.savedTop);c<=o?(t.style.height=o+"px",this.setContentDivHeight(t,this.minHeight)):(t.style.height=c+"px",t.style.top=l-this.dragOffsetY+"px",this.setContentDivHeight(t,c))}if("bottom"===this.verticalSizingAction){var u=this.getAdjustedMousePositionBottom(e,n)-this.savedTop-this.hackPaletteOffset;u<=o&&(u=o),t.style.height=u+"px",this.setContentDivHeight(t,u)}}},{key:"snapToWidth",value:function(e){var t=this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","width"));return Math.round((e-this.adjustedWidth)/t)*t+this.adjustedWidth}},{key:"snapToHeight",value:function(e){var t=this.state.showGrid?this.removePx(this.getStyleProperty(".palette-dialog-grid-node-outer","height")):this.removePx(this.getStyleProperty(".palette-list-item","height"));return Math.round((e-this.adjustedHeight)/t)*t+this.adjustedHeight}},{key:"windowResize",value:function(){var e=this.getPaletteDiv(),t=document.getElementById(this.props.containingDivId);if(t)if(this.isMaximized){var n=t.offsetLeft+this.hoverZoneSize;e.style.left=n+"px";var i=t.offsetWidth-this.totalHoverZoneSize;e.style.width=i+"px";var o=t.offsetTop+this.hoverZoneSize;e.style.top=o+"px";var r=t.offsetHeight-this.totalHoverZoneSize;e.style.height=r+"px",this.setContentDivHeight(e,r)}else{if(e.offsetLeft+e.offsetWidth+this.hoverZoneSize>t.offsetLeft+t.offsetWidth){var a=t.offsetLeft+t.offsetWidth-e.offsetWidth-this.hoverZoneSize;e.style.left=a+"px"}var s=t.offsetWidth-this.totalHoverZoneSize;if(s<e.offsetWidth&&(e.style.width=s+"px",e.style.left=t.offsetLeft+t.offsetWidth-e.offsetWidth-this.hoverZoneSize+"px"),e.offsetTop+e.offsetHeight+this.hoverZoneSize>t.offsetTop+t.offsetHeight){var l=t.offsetTop+t.offsetHeight-e.offsetHeight-this.hoverZoneSize;e.style.top=l+"px"}var c=t.offsetHeight-this.totalHoverZoneSize;c<e.offsetHeight&&(e.style.height=c+"px",e.style.top=t.offsetTop+t.offsetHeight-e.offsetHeight-this.hoverZoneSize+"px",this.setContentDivHeight(e,c))}}},{key:"windowMaximize",value:function(){var e=this.getPaletteDiv(),t=document.getElementById(this.props.containingDivId);if(t)if(this.isMaximized)e.style.width=this.savedWidth+"px",e.style.left=this.savedLeft+"px",e.style.height=this.savedHeight+"px",e.style.top=this.savedTop+"px",this.setContentDivHeight(e,this.savedHeight),this.isMaximized=!1,this.windowResize();else{this.savedWidth=e.offsetWidth,this.savedLeft=e.offsetLeft,this.savedHeight=e.offsetHeight,this.savedTop=e.offsetTop;var n=t.offsetWidth-this.totalHoverZoneSize+1;e.style.width=n+"px",e.style.left=t.offsetLeft+this.hoverZoneSize+"px";var i=t.offsetHeight-this.totalHoverZoneSize+1;e.style.height=i+"px",e.style.top=t.offsetTop+this.hoverZoneSize+"px",this.setContentDivHeight(e,i),this.isMaximized=!0}}},{key:"showGrid",value:function(e){this.setState({showGrid:e})}},{key:"render",value:function(){return a.createElement("nav",{"aria-label":this.props.intl.formatMessage({id:"palette.dialog.label",defaultMessage:fl["palette.dialog.label"]}),role:"navigation"},a.createElement("div",{className:"palette-dialog-div",ref:"palette",onMouseDown:this.mouseDownOnPalette},a.createElement(ec,{mouseDownMethod:this.mouseDownOnTopBar,showGridMethod:this.showGrid,windowMaximizeMethod:this.windowMaximize,showGrid:this.state.showGrid,canvasController:this.props.canvasController}),a.createElement(dc,{paletteJSON:this.props.paletteJSON,showGrid:this.state.showGrid,canvasController:this.props.canvasController,isEditingEnabled:this.props.isEditingEnabled,allowClickToAdd:this.props.allowClickToAdd})))}}])}(a.Component),gc=c(pc);function fc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fc=function(){return!!e})()}var vc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,fc()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("PaletteDialog"),n}return i(s,n),e(s,[{key:"render",value:function(){return this.logger.log("render"),a.createElement(gc,{canvasController:this.props.canvasController,paletteJSON:this.props.paletteJSON,containingDivId:this.props.containingDivId,allowClickToAdd:this.props.allowClickToAdd,isEditingEnabled:this.props.isEditingEnabled})}}])}(a.Component),yc=s((function(e,t){return{paletteJSON:e.palette.content,allowClickToAdd:e.canvasconfig.enableSingleClickAddFromPalette,isEditingEnabled:e.canvasconfig.enableEditingActions}}))(c(vc));function mc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mc=function(){return!!e})()}var bc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,mc()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={},n.handleClick=n.handleClick.bind(n),n}return i(s,n),e(s,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.handleClick,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.handleClick,!0)}},{key:"handleClick",value:function(e){this.props.canvasController.closeTip()}},{key:"render",value:function(){var e=null,t=null;switch(this.props.type){case S:case I:t="right";break;default:t="bottom"}if(this.props.customContent)e=this.props.customContent;else switch(this.props.type){case S:e=a.createElement("div",{className:"tip-palette-item"},a.createElement("div",{className:"tip-palette-category"},this.props.category.label),a.createElement("div",{className:"tip-palette-label"},this.props.nodeTemplate.app_data.ui_data.label),this.props.nodeTemplate.app_data.ui_data.description?a.createElement("div",{className:"tip-palette-desc"},this.props.nodeTemplate.app_data.ui_data.description):"");break;case I:e=a.createElement("div",{className:"tip-palette-item"},a.createElement("div",{className:"tip-palette-label"},this.props.category.label),this.props.category.description?a.createElement("div",{className:"tip-palette-desc"},this.props.category.description):"");break;case R:var n=null;this.props.canvasController.getObjectModel().hasErrorMessage(this.props.node)?n=a.createElement(rt,{type:B,className:"tip-node-status error"}):this.props.canvasController.getObjectModel().hasWarningMessage(this.props.node)&&(n=a.createElement(rt,{type:U,className:"tip-node-status warning"}));var i=this.props.canvasController.getObjectModel().getPaletteNode(this.props.node.op),o=this.props.node.label,r=i&&i.app_data&&i.app_data.ui_data?i.app_data.ui_data.label:o;if(o!==r&&(o+=" (".concat(r,")")),!(n||o||r||this.props.node.description))return null;e=a.createElement("div",{className:"tip-node"},n,a.createElement("div",{className:"tip-node-label"},o),this.props.node.description?a.createElement("div",{className:"tip-node-desc"},this.props.node.description):"");break;case F:e=mt(this.props.port.label)?null:a.createElement("div",{className:"tip-port"},this.props.port.label);break;case j:e=mt(this.props.decoration.tooltip)?null:a.createElement("div",{className:"tip-decoration"},this.props.decoration.tooltip);break;case V:break;case _:e=mt(this.props.stateTagText)?null:a.createElement("div",{className:"tip-state-tag"},this.props.stateTagText);break;default:e=null}return null!==e?a.createElement(kt,{tip:e,direction:t,id:this.props.id,targetObj:this.props.targetObj,mousePos:this.props.mousePos,className:[R,F,j,V].includes(this.props.type)?"definition-tooltip":null}):null}}])}(a.Component),kc=s((function(e,t){return{id:e.tooltip.id,type:e.tooltip.type,targetObj:e.tooltip.targetObj,mousePos:e.tooltip.mousePos,customContent:e.tooltip.customContent,node:e.tooltip.node,port:e.tooltip.port,decoration:e.tooltip.decoration,nodeTemplate:e.tooltip.nodeTemplate,category:e.tooltip.category,stateTagText:e.tooltip.stateTagText}}))(bc);function xc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xc=function(){return!!e})()}var wc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,xc()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("CC-Context-Menu"),n}return i(s,n),e(s,[{key:"render",value:function(){this.logger.log("render");var e=null;return this.props.showContextMenu&&(e=a.createElement(Pt,{containingDivId:this.props.containingDivId,contextMenuDef:this.props.contextMenuDef,contextMenuActionHandler:this.props.canvasController.contextMenuActionHandler,contextMenuPos:this.props.contextMenuPos,closeContextMenu:this.props.canvasController.closeContextMenu,stopPropagation:!0})),e}}])}(a.Component),Cc=s((function(e,t){return{contextMenuDef:e.contextmenu.menuDef,contextMenuPos:e.contextmenu.source.cmPos||{x:0,y:0},showContextMenu:e.contextmenu.isOpen}}))(wc),Lc=bt,Ec=Tt,Pc=m,Nc=Math.max,Tc=Math.min;var Dc=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return void 0!==n&&(o=Pc(n),o=n<0?Nc(i+o,0):Tc(o,i-1)),Lc(e,Ec(t),o,!0)};function Sc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Sc=function(){return!!e})()}var Oc=function(s){function l(e){var n,i,a,s;return t(this,l),i=this,s=[e],a=o(a=l),(n=r(i,Sc()?Reflect.construct(a,s||[],o(i).constructor):a.apply(i,s))).logger=new pt("CC-Context-Toolbar"),n.onMouseEnter=n.onMouseEnter.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.toolbarActionHandler=n.toolbarActionHandler.bind(n),n.colorClicked=n.colorClicked.bind(n),n.closeContextToolbar=n.closeContextToolbar.bind(n),n}return i(l,s),e(l,[{key:"onMouseLeave",value:function(e){var t=this;this.props.canvasController.setMouseInContextToolbar(!1),setTimeout((function(){return t.props.canvasController.closeContextToolbar()}),200)}},{key:"onMouseEnter",value:function(e){this.props.canvasController.setMouseInContextToolbar(!0)}},{key:"getToolbarConfig",value:function(e){var t=this,n=e.toolbarItems,i=e.overflowMenuItems,o=[];return n.forEach((function(e){return o.push(t.getMenuItem(e))})),i.forEach((function(e){return o.push(t.getMenuItem(e))})),{leftBar:o,rightBar:[]}}},{key:"getMenuItem",value:function(e){if(e.divider)return{divider:!0};var t=this.getSubPanelInfo(e),n=!t.subPanel&&e.menu?this.getSubMenu(e):null;return{action:e.action,label:e.label,subMenu:n,subPanel:t.subPanel,subPanelData:t.subPanelData,enable:this.getEnable(e),iconEnabled:e.icon}}},{key:"getSubPanelInfo",value:function(e){var t=this;return"colorBackground"===e.action?{subPanel:Nt,subPanelData:{clickActionHandler:function(e){return t.colorClicked(e)}}}:{}}},{key:"getSubMenu",value:function(e){var t=this;return"object"===n(e.menu)?e.menu.map((function(e){return e.divider?{divider:!0}:{action:e.action,label:e.label,enable:t.getEnable(e),iconEnabled:e.icon}})):null}},{key:"getEnable",value:function(e){return void 0===e.enable||e.enable}},{key:"getContextToolbarWidth",value:function(e,t){var n=e.filter((function(e){return e.divider})),i=n.length,o=1*i,r=t.length>0?1:0;return 34*(e.length+r-i)+o-(t.length>0?5:0)}},{key:"removeUnnecessaryDividers",value:function(e){var t=e.findIndex((function(e){return!e.divider})),n=Dc(e,(function(e){return!e.divider})),i=e.slice(t,n+1),o=[],r=!1;return i.forEach((function(e){e.divider?(r||o.push(e),r=!0):(o.push(e),r=!1)})),o}},{key:"toolbarActionHandler",value:function(e,t){this.closeContextToolbar(),this.props.canvasController.contextMenuActionHandler(e,t)}},{key:"closeContextToolbar",value:function(){this.props.canvasController.setMouseInContextToolbar(!1),this.props.canvasController.setMouseInObject(null),this.props.canvasController.closeContextToolbar(G)}},{key:"colorClicked",value:function(e){this.toolbarActionHandler("colorSelectedObjects",{color:e})}},{key:"shouldCenterJustifyToolbar",value:function(){var e=this.props.contextSource.type;return"link"===e||"canvas"===e||"node"===e&&"topCenter"===this.props.contextSource.targetObject.layout.contextToolbarPosition&&!this.props.contextSource.targetObject.is_expanded}},{key:"adjustPosToFit",value:function(e,t,n,i){var o=document.getElementById(this.props.containingDivId),r=o?o.getBoundingClientRect():{top:-1e3,bottom:1e3,left:-1e3,right:1e3},a=0,s=0,l=e,c=t,u=e+n-(r.right-r.left),d=a-e,h=t+i-(r.bottom-r.top),p=s-t;return u>0?l-=u+2:d>0&&(l+=d+2),h>0?c-=h+2:p>0&&(c+=p+2),{x:l,y:c}}},{key:"render",value:function(){this.logger.log("render");var e=null;if(this.props.showContextMenu){var t=this.props.contextMenuDef.filter((function(e){return e.toolbarItem})),n=this.props.contextMenuDef.filter((function(e){return!e.toolbarItem}));n=this.removeUnnecessaryDividers(n);var i=this.getToolbarConfig({toolbarItems:t,overflowMenuItems:n}),o=this.getContextToolbarWidth(t,n),r=this.props.contextSource.cmPos||{x:0,y:0},s=this.shouldCenterJustifyToolbar()?r.x-o/2:r.x-o,l=r.y-34,c=this.adjustPosToFit(s,l,o,34);s=c.x,l=c.y,e=a.createElement("div",{className:"context-toolbar floating-toolbar",style:{left:s,top:l,width:o},onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},a.createElement(y,{config:i,instanceId:this.props.canvasController.getInstanceId(),containingDivId:this.props.containingDivId,toolbarActionHandler:this.toolbarActionHandler,tooltipDirection:"top",setInititalFocus:!0,closeToolbarOnEsc:!0,closeToolbar:this.closeContextToolbar,size:"sm"}))}return e}}])}(a.Component),Ac=s((function(e,t){return{contextMenuDef:e.contextmenu.menuDef,contextSource:e.contextmenu.source,showContextMenu:e.contextmenu.isOpen}}))(Oc),zc={"toolbar.palette":"Palette","toolbar.zoomIn":"Zoom in","toolbar.zoomOut":"Zoom out","toolbar.zoomToFit":"Zoom to fit","toolbar.overflowMenu":"Overflow menu","toolbar.label":"Canvas toolbar"};function Ic(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ic=function(){return!!e})()}var Mc=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Ic()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).getLabel=n.getLabel.bind(n),n.onKeyDown=n.onKeyDown.bind(n),n.logger=new pt("CC-Text-Toolbar"),n}return i(s,n),e(s,[{key:"onKeyDown",value:function(e){ot.returnToTextEditing(e)&&(this.props.canvasController.focusOnTextEntryElement(e),e.stopPropagation(),e.preventDefault())}},{key:"getLabel",value:function(e,t){var n=wt[e]?wt[e]:zc[e];return this.props.intl.formatMessage({id:e,defaultMessage:n},t)}},{key:"getJsxLabel",value:function(e,t,n){var i=it.isMacintosh()?"⌘":"Ctrl",o=t?i+" + "+t:null,r=n?i+" + "+n:null;return a.createElement("div",null,this.getLabel(e),a.createElement("br",null),o,a.createElement("br",null),r)}},{key:"getMarkdownToolbar",value:function(){var e=this.getJsxLabel("texttoolbar.boldAction","b"),t=this.getJsxLabel("texttoolbar.italicsAction","i"),n=this.getJsxLabel("texttoolbar.strikethroughAction","shift + x"),i=this.getJsxLabel("texttoolbar.headerAction",">","<"),o=this.getJsxLabel("texttoolbar.codeAction","e"),r=this.getJsxLabel("texttoolbar.linkAction","k"),s=this.getJsxLabel("texttoolbar.quoteAction","shift + >"),l=this.getJsxLabel("texttoolbar.numberedListAction","shift + 7"),c=this.getJsxLabel("texttoolbar.bulletedListAction","shift + 8");return{leftBar:[{action:"headerStyle",tooltip:i,enable:!0,subMenu:[{action:"title",label:this.getLabel("texttoolbar.titleAction"),enable:!0},{action:"header",label:this.getLabel("texttoolbar.headerAction"),enable:!0},{action:"subheader",label:this.getLabel("texttoolbar.subheaderAction"),enable:!0},{action:"body",label:this.getLabel("texttoolbar.bodyAction"),enable:!0}],closeSubAreaOnClick:!0,iconEnabled:a.createElement(Gs,{size:32})},{divider:!0},{action:"bold",label:e,enable:!0,iconEnabled:a.createElement(Ns,{size:32})},{action:"italics",label:t,enable:!0,iconEnabled:a.createElement(Vs,{size:32})},{action:"strikethrough",label:n,enable:!0,iconEnabled:a.createElement(Ys,{size:32})},{divider:!0},{action:"code",label:o,enable:!0,iconEnabled:a.createElement(ft,{size:32})},{divider:!0},{action:"link",label:r,enable:!0,iconEnabled:a.createElement(st,{size:32})},{divider:!0},{action:"quote",label:s,enable:!0,iconEnabled:a.createElement(_s,{size:32})},{divider:!0},{action:"numberedList",label:l,enable:!0,iconEnabled:a.createElement(lt,{size:32})},{action:"bulletedList",label:c,enable:!0,iconEnabled:a.createElement(ct,{size:32})}]}}},{key:"getWysiwygToolbar",value:function(){var e=this,t=this.getLabel("texttoolbar.boldAction"),n=this.getLabel("texttoolbar.italicsAction"),i=this.getLabel("texttoolbar.underline"),o=this.getLabel("texttoolbar.strikethroughAction"),r=[{action:"font-ibm-plex-sans",label:this.getLabel("texttoolbar.fontIBMPlexSans"),enable:!0,isSelected:!0},{action:"font-ibm-plex-serif",label:this.getLabel("texttoolbar.fontIBMPlexSerif"),enable:!0},{action:"font-ibm-plex-sans-condensed",label:this.getLabel("texttoolbar.fontIBMPlexSansCon"),enable:!0},{action:"font-ibm-plex-mono",label:this.getLabel("texttoolbar.fontIBMPlexMono"),enable:!0},{action:"font-arial",label:this.getLabel("texttoolbar.fontArial"),enable:!0},{action:"font-comic-sans-ms",label:this.getLabel("texttoolbar.fontComicSansMS"),enable:!0},{action:"font-gill-sans",label:this.getLabel("texttoolbar.fontGillSans"),enable:!0},{action:"font-helvetica-neue",label:this.getLabel("texttoolbar.fontHelveticaNeue"),enable:!0},{action:"font-times-new-roman",label:this.getLabel("texttoolbar.fontTimesNewRoman"),enable:!0},{action:"font-verdana",label:this.getLabel("texttoolbar.fontVerdana"),enable:!0}],s=[{action:"text-size-10",label:"10",enable:!0},{action:"text-size-11",label:"11",enable:!0},{action:"text-size-12",label:"12",enable:!0,isSelected:!0},{action:"text-size-14",label:"14",enable:!0},{action:"text-size-18",label:"18",enable:!0},{action:"text-size-24",label:"24",enable:!0},{action:"text-size-30",label:"30",enable:!0},{action:"text-size-36",label:"36",enable:!0},{action:"text-size-48",label:"48",enable:!0},{action:"text-size-60",label:"60",enable:!0},{action:"text-size-72",label:"72",enable:!0},{action:"text-size-96",label:"96",enable:!0}],l=[{action:"align-left",label:this.getLabel("texttoolbar.alignHorizLeft"),enable:!0,iconEnabled:a.createElement(Cs,{size:32}),isSelected:!0},{action:"align-center",label:this.getLabel("texttoolbar.alignHorizCenter"),enable:!0,iconEnabled:a.createElement(xs,{size:32})},{action:"align-right",label:this.getLabel("texttoolbar.alignHorizRight"),enable:!0,iconEnabled:a.createElement(Es,{size:32})}],c=[{action:"align-top",label:this.getLabel("texttoolbar.alignVertTop"),enable:!0,iconEnabled:a.createElement(Dt,{size:32}),isSelected:!0},{action:"align-middle",label:this.getLabel("texttoolbar.alignVertMiddle"),enable:!0,iconEnabled:a.createElement(St,{size:32})},{action:"align-bottom",label:this.getLabel("texttoolbar.alignVertBottom"),enable:!0,iconEnabled:a.createElement(Ot,{size:32})}],u=[{action:"outline-none",label:this.getLabel("texttoolbar.outlineNone"),enable:!0},{action:"outline-solid",label:this.getLabel("texttoolbar.outlineSolid"),enable:!0,isSelected:!0}];this.setSelectedMenuElement("fontType",this.props.formats,r),this.setSelectedMenuElement("textSize",this.props.formats,s),this.setSelectedMenuElement("alignHorizontally",this.props.formats,l),this.setSelectedMenuElement("alignVertically",this.props.formats,c),this.setSelectedMenuElement("outlineStyle",this.props.formats,u);var d=this.getFormatValue("textColor",this.props.formats)||"#000000",h=this.getFormatValue("backgroundColor",this.props.formats)||"#FFFFFF",p=Boolean(this.getFormatType("bold",this.props.formats)),g=Boolean(this.getFormatType("italics",this.props.formats)),f=this.getFormatValue("textDecoration",this.props.formats),v=null==f?void 0:f.includes("underline"),y=null==f?void 0:f.includes("strikethrough");return{leftBar:[{action:"submenu-font",label:this.getLabel("texttoolbar.fontAction"),iconEnabled:a.createElement(As,{size:32}),enable:!0,subMenu:r,closeSubAreaOnClick:!0},{action:"submenu-text-size",label:this.getLabel("texttoolbar.textSize"),iconEnabled:a.createElement(Gs,{size:32}),enable:!0,subMenu:s,closeSubAreaOnClick:!0},{action:"bold",label:t,enable:!0,iconEnabled:a.createElement(Ns,{size:32}),isSelected:p},{action:"italics",label:n,enable:!0,iconEnabled:a.createElement(Vs,{size:32}),isSelected:g},{action:"underline",label:i,enable:!0,iconEnabled:a.createElement(Js,{size:32}),isSelected:v},{action:"strikethrough",label:o,enable:!0,iconEnabled:a.createElement(Ys,{size:32}),isSelected:y},{divider:!0},{action:"submenu-text-color",label:this.getLabel("texttoolbar.colorText"),iconEnabled:a.createElement(Ds,{size:32}),enable:!0,subPanel:Nt,subPanelData:{type:Z,selectedColor:d,clickActionHandler:function(t,n){return e.props.actionHandler("text-color",n,t)}},closeSubAreaOnClick:!0},{action:"submenu-align-horiz",label:this.getLabel("texttoolbar.alignHoriz"),iconEnabled:a.createElement(xs,{size:32}),enable:!0,subMenu:l,closeSubAreaOnClick:!0},{action:"submenu-align-vert",label:this.getLabel("texttoolbar.alignVert"),iconEnabled:a.createElement(St,{size:32}),enable:!0,subMenu:c,closeSubAreaOnClick:!0},{action:"submenu-background-color",label:this.getLabel("texttoolbar.colorBackground"),iconEnabled:a.createElement(vt,{size:32}),enable:!0,subPanel:Nt,subPanelData:{type:Z,selectedColor:h,clickActionHandler:function(t,n){return e.props.actionHandler("background-color",n,t)}},closeSubAreaOnClick:!0},{action:"sub-menu-outline",label:this.getLabel("texttoolbar.outline"),iconEnabled:a.createElement(b,{size:32}),enable:!0,subMenu:u,closeSubAreaOnClick:!0}]}}},{key:"setSelectedMenuElement",value:function(e,t,n){var i=this.getFormatValue(e,t);i&&n.forEach((function(e){return e.isSelected=e.action===i}))}},{key:"getFormatValue",value:function(e,t){var n=this.getFormatType(e,t);return null==n?void 0:n.value}},{key:"getFormatType",value:function(e,t){return t?t.find((function(t){return t.type===e})):null}},{key:"getTextToolbarConfig",value:function(){return this.props.contentType===W?this.getMarkdownToolbar():this.props.contentType===Z?this.getWysiwygToolbar():{leftBar:[]}}},{key:"render",value:function(){this.logger.log("render");var e=null;return this.props.isOpen&&(e=a.createElement("div",{className:"text-toolbar floating-toolbar",style:{left:this.props.pos_x,top:this.props.pos_y},onBlur:this.props.blurHandler,onKeyDown:this.onKeyDown},a.createElement(y,{config:this.getTextToolbarConfig(),instanceId:this.props.canvasController.getInstanceId(),containingDivId:this.props.containingDivId,toolbarActionHandler:this.props.actionHandler,tooltipDirection:"top",size:"sm"}))),e}}])}(a.Component),Hc=s((function(e,t){return{isOpen:e.texttoolbar.isOpen,pos_x:e.texttoolbar.pos_x,pos_y:e.texttoolbar.pos_y,formats:e.texttoolbar.formats,contentType:e.texttoolbar.contentType,actionHandler:e.texttoolbar.actionHandler,blurHandler:e.texttoolbar.blurHandler}}))(c(Mc));function _c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_c=function(){return!!e})()}var Vc=c(function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,_c()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("CC-StateTag"),n.onMouseOver=n.onMouseOver.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n}return i(s,n),e(s,[{key:"onMouseOver",value:function(e){var t;this.props.stateTagType===X?t=this.getLabel("canvas.stateTagTipLocked"):this.props.stateTagType===Y&&(t=this.getLabel("canvas.stateTagTipReadOnly")),this.props.canvasController.openTip({id:"stateTagTip",type:_,stateTagType:this.props.stateTagType,stateTagText:t,targetObj:e.currentTarget})}},{key:"onMouseLeave",value:function(){this.props.canvasController.closeTip()}},{key:"getLabel",value:function(e){return this.props.intl.formatMessage({id:e,defaultMessage:wt[e]})}},{key:"getStateTag",value:function(e,t){return a.createElement("div",{className:"state-tag",onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave},t,a.createElement("span",null,e))}},{key:"render",value:function(){this.logger.log("render");var e=null;if(this.props.stateTagType===X){var t=this.getLabel("canvas.stateTagLocked");e=this.getStateTag(t,a.createElement(ut,null))}else if(this.props.stateTagType===Y){var n=this.getLabel("canvas.stateTagReadOnly");e=this.getStateTag(n,a.createElement(dt,null))}return e}}])}(a.Component)),jc="http://www.w3.org/1999/xhtml",Fc={svg:"http://www.w3.org/2000/svg",xhtml:jc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Rc(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Fc.hasOwnProperty(t)?{space:Fc[t],local:e}:e}function Bc(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===jc&&t.documentElement.namespaceURI===jc?t.createElement(e):t.createElementNS(n,e)}}function Uc(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Gc(e){var t=Rc(e);return(t.local?Uc:Bc)(t)}function Zc(){}function Wc(e){return null==e?Zc:function(){return this.querySelector(e)}}function Xc(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function Yc(){return[]}function Kc(e){return null==e?Yc:function(){return this.querySelectorAll(e)}}function qc(e){return function(){return this.matches(e)}}function $c(e){return function(t){return t.matches(e)}}var Jc=Array.prototype.find;function Qc(){return this.firstElementChild}var eu=Array.prototype.filter;function tu(){return Array.from(this.children)}function nu(e){return new Array(e.length)}function iu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function ou(e,t,n,i,o,r){for(var a,s=0,l=t.length,c=r.length;s<c;++s)(a=t[s])?(a.__data__=r[s],i[s]=a):n[s]=new iu(e,r[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function ru(e,t,n,i,o,r,a){var s,l,c,u=new Map,d=t.length,h=r.length,p=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(p[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?o[s]=l:u.set(c,l));for(s=0;s<h;++s)c=a.call(e,r[s],s,r)+"",(l=u.get(c))?(i[s]=l,l.__data__=r[s],u.delete(c)):n[s]=new iu(e,r[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(p[s])===l&&(o[s]=l)}function au(e){return e.__data__}function su(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function lu(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cu(e){return function(){this.removeAttribute(e)}}function uu(e){return function(){this.removeAttributeNS(e.space,e.local)}}function du(e,t){return function(){this.setAttribute(e,t)}}function hu(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function pu(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function gu(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function fu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function vu(e){return function(){this.style.removeProperty(e)}}function yu(e,t,n){return function(){this.style.setProperty(e,t,n)}}function mu(e,t,n){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function bu(e,t){return e.style.getPropertyValue(t)||fu(e).getComputedStyle(e,null).getPropertyValue(t)}function ku(e){return function(){delete this[e]}}function xu(e,t){return function(){this[e]=t}}function wu(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Cu(e){return e.trim().split(/^|\s+/)}function Lu(e){return e.classList||new Eu(e)}function Eu(e){this._node=e,this._names=Cu(e.getAttribute("class")||"")}function Pu(e,t){for(var n=Lu(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function Nu(e,t){for(var n=Lu(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function Tu(e){return function(){Pu(this,e)}}function Du(e){return function(){Nu(this,e)}}function Su(e,t){return function(){(t.apply(this,arguments)?Pu:Nu)(this,e)}}function Ou(){this.textContent=""}function Au(e){return function(){this.textContent=e}}function zu(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Iu(){this.innerHTML=""}function Mu(e){return function(){this.innerHTML=e}}function Hu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function _u(){this.nextSibling&&this.parentNode.appendChild(this)}function Vu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ju(){return null}function Fu(){var e=this.parentNode;e&&e.removeChild(this)}function Ru(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Uu(e){return function(){var t=this.__on;if(t){for(var n,i=0,o=-1,r=t.length;i<r;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Gu(e,t,n){return function(){var i,o=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var a=0,s=o.length;a<s;++a)if((i=o[a]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),void(i.value=t);this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function Zu(e,t,n){var i=fu(e),o=i.CustomEvent;"function"==typeof o?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Wu(e,t){return function(){return Zu(this,e,t)}}function Xu(e,t){return function(){return Zu(this,e,t.apply(this,arguments))}}iu.prototype={constructor:iu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Eu.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Yu=[null];function Ku(e,t){this._groups=e,this._parents=t}function qu(){return new Ku([[document.documentElement]],Yu)}function $u(e){return"string"==typeof e?new Ku([[document.querySelector(e)]],[document.documentElement]):new Ku([[e]],Yu)}Ku.prototype=qu.prototype={constructor:Ku,select:function(e){"function"!=typeof e&&(e=Wc(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,a,s=t[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(r=s[u])&&(a=e.call(r,r.__data__,u,s))&&("__data__"in r&&(a.__data__=r.__data__),c[u]=a);return new Ku(i,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return Xc(e.apply(this,arguments))}}(e):Kc(e);for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var a,s=t[r],l=s.length,c=0;c<l;++c)(a=s[c])&&(i.push(e.call(a,a.__data__,c,s)),o.push(a));return new Ku(i,o)},selectChild:function(e){return this.select(null==e?Qc:function(e){return function(){return Jc.call(this.children,e)}}("function"==typeof e?e:$c(e)))},selectChildren:function(e){return this.selectAll(null==e?tu:function(e){return function(){return eu.call(this.children,e)}}("function"==typeof e?e:$c(e)))},filter:function(e){"function"!=typeof e&&(e=qc(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,a=t[o],s=a.length,l=i[o]=[],c=0;c<s;++c)(r=a[c])&&e.call(r,r.__data__,c,a)&&l.push(r);return new Ku(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,au);var n,i=t?ru:ou,o=this._parents,r=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var a=r.length,s=new Array(a),l=new Array(a),c=new Array(a),u=0;u<a;++u){var d=o[u],h=r[u],p=h.length,g=su(e.call(d,d&&d.__data__,u,o)),f=g.length,v=l[u]=new Array(f),y=s[u]=new Array(f);i(d,h,v,y,c[u]=new Array(p),g,t);for(var m,b,k=0,x=0;k<f;++k)if(m=v[k]){for(k>=x&&(x=k+1);!(b=y[x])&&++x<f;);m._next=b||null}}return(s=new Ku(s,o))._enter=l,s._exit=c,s},enter:function(){return new Ku(this._enter||this._groups.map(nu),this._parents)},exit:function(){return new Ku(this._exit||this._groups.map(nu),this._parents)},join:function(e,t,n){var i=this.enter(),o=this,r=this.exit();return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,a=Math.min(o,r),s=new Array(o),l=0;l<a;++l)for(var c,u=n[l],d=i[l],h=u.length,p=s[l]=new Array(h),g=0;g<h;++g)(c=u[g]||d[g])&&(p[g]=c);for(;l<o;++l)s[l]=n[l];return new Ku(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,o=e[t],r=o.length-1,a=o[r];--r>=0;)(i=o[r])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=lu);for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a,s=n[r],l=s.length,c=o[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new Ku(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o,r=t[n],a=0,s=r.length;a<s;++a)(o=r[a])&&e.call(o,o.__data__,a,r);return this},attr:function(e,t){var n=Rc(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?uu:cu:"function"==typeof t?n.local?gu:pu:n.local?hu:du)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?vu:"function"==typeof t?mu:yu)(e,t,null==n?"":n)):bu(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?ku:"function"==typeof t?wu:xu)(e,t)):this.node()[e]},classed:function(e,t){var n=Cu(e+"");if(arguments.length<2){for(var i=Lu(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?Su:t?Tu:Du)(n,t))},text:function(e){return arguments.length?this.each(null==e?Ou:("function"==typeof e?zu:Au)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Iu:("function"==typeof e?Hu:Mu)(e)):this.node().innerHTML},raise:function(){return this.each(_u)},lower:function(){return this.each(Vu)},append:function(e){var t="function"==typeof e?e:Gc(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:Gc(e),i=null==t?ju:"function"==typeof t?t:Wc(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(Fu)},clone:function(e){return this.select(e?Bu:Ru)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,o,r=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=r.length;if(!(arguments.length<2)){for(s=t?Gu:Uu,i=0;i<a;++i)this.each(s(r[i],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(i=0,l=s[c];i<a;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Xu:Wu)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,o=e[t],r=0,a=o.length;r<a;++r)(i=o[r])&&(yield i)}};var Ju=0;function Qu(){return new ed}function ed(){this._="@"+(++Ju).toString(36)}function td(e){let t;for(;t=e.sourceEvent;)e=t;return e}function nd(e,t){if(e=td(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}ed.prototype=Qu.prototype={constructor:ed,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var id=Object.freeze({__proto__:null,create:function(e){return $u(Gc(e).call(document.documentElement))},creator:Gc,local:Qu,matcher:qc,namespace:Rc,namespaces:Fc,pointer:nd,pointers:function(e,t){return e.target&&(e=td(e),void 0===t&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,(e=>nd(e,t)))},select:$u,selectAll:function(e){return"string"==typeof e?new Ku([document.querySelectorAll(e)],[document.documentElement]):new Ku([Xc(e)],Yu)},selection:qu,selector:Wc,selectorAll:Kc,style:bu,window:fu}),od=At,rd=Ct;var ad=function(e,t){return e&&od(e,rd(t))};var sd=function(e){return function(t){return null==e?void 0:e[t]}},ld=sd({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),cd=g,ud=/[&<>"']/g,dd=RegExp(ud.source);var hd=function(e){return(e=cd(e))&&dd.test(e)?e.replace(ud,ld):e};function pd(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function gd(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}var fd={},vd={};function yd(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function md(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var i in e)i in t||n.push(t[i]=i)})),n}function bd(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function kd(e){var t,n=e.getUTCHours(),i=e.getUTCMinutes(),o=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":((t=e.getUTCFullYear())<0?"-"+bd(-t,6):t>9999?"+"+bd(t,6):bd(t,4))+"-"+bd(e.getUTCMonth()+1,2)+"-"+bd(e.getUTCDate(),2)+(r?"T"+bd(n,2)+":"+bd(i,2)+":"+bd(o,2)+"."+bd(r,3)+"Z":o?"T"+bd(n,2)+":"+bd(i,2)+":"+bd(o,2)+"Z":i||n?"T"+bd(n,2)+":"+bd(i,2)+"Z":"")}function xd(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function i(e,t){var i,o=[],r=e.length,a=0,s=0,l=r<=0,c=!1;function u(){if(l)return vd;if(c)return c=!1,fd;var t,i,o=a;if(34===e.charCodeAt(o)){for(;a++<r&&34!==e.charCodeAt(a)||34===e.charCodeAt(++a););return(t=a)>=r?l=!0:10===(i=e.charCodeAt(a++))?c=!0:13===i&&(c=!0,10===e.charCodeAt(a)&&++a),e.slice(o+1,t-1).replace(/""/g,'"')}for(;a<r;){if(10===(i=e.charCodeAt(t=a++)))c=!0;else if(13===i)c=!0,10===e.charCodeAt(a)&&++a;else if(i!==n)continue;return e.slice(o,t)}return l=!0,e.slice(o,r)}for(10===e.charCodeAt(r-1)&&--r,13===e.charCodeAt(r-1)&&--r;(i=u())!==vd;){for(var d=[];i!==fd&&i!==vd;)d.push(i),i=u();t&&null==(d=t(d,s++))||o.push(d)}return o}function o(t,n){return t.map((function(t){return n.map((function(e){return a(t[e])})).join(e)}))}function r(t){return t.map(a).join(e)}function a(e){return null==e?"":e instanceof Date?kd(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,o,r=i(e,(function(e,i){if(n)return n(e,i-1);o=e,n=t?function(e,t){var n=yd(e);return function(i,o){return t(n(i),o,e)}}(e,t):yd(e)}));return r.columns=o||[],r},parseRows:i,format:function(t,n){return null==n&&(n=md(t)),[n.map(a).join(e)].concat(o(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=md(e)),o(e,t).join("\n")},formatRows:function(e){return e.map(r).join("\n")},formatRow:r,formatValue:a}}var wd=xd(",").parse,Cd=xd("\t").parse;function Ld(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Ed(e,t){return fetch(e,t).then(Ld)}function Pd(e){return function(t,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=void 0),Ed(t,n).then((function(t){return e(t,i)}))}}var Nd=Pd(wd),Td=Pd(Cd);function Dd(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(204!==e.status&&205!==e.status)return e.json()}function Sd(e){return(t,n)=>Ed(t,n).then((t=>(new DOMParser).parseFromString(t,e)))}var Od=Sd("application/xml"),Ad=Sd("text/html"),zd=Sd("image/svg+xml"),Id=Object.freeze({__proto__:null,blob:function(e,t){return fetch(e,t).then(pd)},buffer:function(e,t){return fetch(e,t).then(gd)},dsv:function(e,t,n,i){3===arguments.length&&"function"==typeof n&&(i=n,n=void 0);var o=xd(e);return Ed(t,n).then((function(e){return o.parse(e,i)}))},csv:Nd,tsv:Td,image:function(e,t){return new Promise((function(n,i){var o=new Image;for(var r in t)o[r]=t[r];o.onerror=i,o.onload=function(){n(o)},o.src=e}))},json:function(e,t){return fetch(e,t).then(Dd)},text:Ed,xml:Od,html:Ad,svg:zd}),Md=function(){return e((function e(n,i,o,r){t(this,e),this.canvasController=n,this.isSubflow=i,this.pipelineId=o,this.breadcrumbs=r}),[{key:"isDisplayingCurrentPipeline",value:function(){return this.breadcrumbs[this.breadcrumbs.length-1].pipelineId===this.pipelineId}},{key:"setDisplayState",value:function(){this.breadcrumbs.length>1&&this.isDisplayingCurrentPipeline()?this.displayState="sub-flow-full-page":this.isSubflow?this.displayState="sub-flow-in-place":this.displayState="primary-flow-full-page"}},{key:"getDisplayStateMsg",value:function(){return"Display state set to "+this.displayState}},{key:"isDisplayingPrimaryFlowFullPage",value:function(){return"primary-flow-full-page"===this.displayState}},{key:"isDisplayingSubFlow",value:function(){return"sub-flow-in-place"===this.displayState||"sub-flow-full-page"===this.displayState}},{key:"isDisplayingSubFlowInPlace",value:function(){return"sub-flow-in-place"===this.displayState}},{key:"isDisplayingSubFlowFullPage",value:function(){return"sub-flow-full-page"===this.displayState}},{key:"isDisplayingFullPage",value:function(){return"primary-flow-full-page"===this.displayState||"sub-flow-full-page"===this.displayState}}])}();function Hd(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function _d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var Vd=function(){return e((function e(n){t(this,e),this.canvasLayout=n}),[{key:"isPointInNodeBoundary",value:function(e,t){return e.x>=t.x_pos&&e.x<=t.x_pos+t.width&&e.y>=t.y_pos&&e.y<=t.y_pos+t.height}},{key:"getNodeLabelClass",value:function(e){if(it.isExpandedSupernode(e))return"d3-node-label d3-label-single-line "+this.getMessageLabelClass(e.messages);var t=e.layout.labelSingleLine?" d3-label-single-line":" d3-label-multi-line",n="center"===e.layout.labelAlign?" d3-label-center":"";return"d3-node-label "+this.getMessageLabelClass(e.messages)+t+n}},{key:"getNodeLabelTextAreaClass",value:function(e){return it.isExpandedSupernode(e)?"d3-node-label-entry d3-label-single-line":"d3-node-label-entry"+(e.layout.labelSingleLine?" d3-label-single-line":" d3-label-multi-line")+("center"===e.layout.labelAlign?" d3-label-center":"")}},{key:"getErrorMarkerIcon",value:function(e){var t="";switch(this.getMessageLevel(e.messages)){case B:t=$;break;case U:t=q}return t}},{key:"getMessageLevel",value:function(e){var t="";if(e&&e.length>0){var n,i=Hd(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.type===B)return o.type;o.type===U&&(t=o.type)}}catch(e){i.e(e)}finally{i.f()}}return t}},{key:"getMessageLabelClass",value:function(e){var t="";switch(this.getMessageLevel(e)){case B:t="d3-node-error-label";break;case U:t="d3-node-warning-label"}return t}},{key:"getErrorMarkerClass",value:function(e){var t="d3-error-circle-off";switch(this.getMessageLevel(e)){case B:t="d3-error-circle";break;case U:t="d3-warning-circle"}return t}},{key:"getNodeCenterPosX",value:function(e){return e.x_pos+e.width/2}},{key:"getNodeCenterPosY",value:function(e){return e.y_pos+e.height/2}},{key:"getNodeImageCenterPosX",value:function(e){return it.isExpandedSupernode(e)?e.x_pos+this.canvasLayout.supernodeImagePosX+this.canvasLayout.supernodeImageWidth/2:e.x_pos+this.getElementPosX(e.width,e.layout.imagePosX,e.layout.imagePosition)+e.layout.imageWidth/2}},{key:"getNodeImageCenterPosY",value:function(e){return it.isExpandedSupernode(e)?e.y_pos+this.canvasLayout.supernodeImagePosY+this.canvasLayout.supernodeImageHeight/2:e.y_pos+this.getElementPosY(e.height,e.layout.imagePosY,e.layout.imagePosition)+e.layout.imageHeight/2}},{key:"getNodeImagePosX",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeImagePosX:this.getElementPosX(e.width,e.layout.imagePosX,e.layout.imagePosition)}},{key:"getNodeImagePosY",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeImagePosY:this.getElementPosY(e.height,e.layout.imagePosY,e.layout.imagePosition)}},{key:"getNodeImageWidth",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeImageWidth:e.layout.imageWidth}},{key:"getNodeImageHeight",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeImageHeight:e.layout.imageHeight}},{key:"getNodeLabelPosX",value:function(e){if(it.isExpandedSupernode(e))return this.canvasLayout.supernodeLabelPosX;var t=this.getElementPosX(e.width,e.layout.labelPosX,e.layout.labelPosition);return"center"===e.layout.labelAlign?t-e.layout.labelWidth/2:t}},{key:"getNodeLabelPosY",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeLabelPosY:this.getElementPosY(e.height,e.layout.labelPosY,e.layout.labelPosition)}},{key:"getNodeLabelWidth",value:function(e){return it.isExpandedSupernode(e)?e.width-this.canvasLayout.supernodeLabelPosX+this.canvasLayout.supernodeErrorPosX:e.layout.labelWidth}},{key:"getNodeLabelHeight",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeLabelHeight:e.layout.labelHeight}},{key:"getNodeLabelEditIconTranslate",value:function(e,t,n,i){return"translate(".concat(this.getNodeLabelEditIconPosX(e,t,n,i),", ").concat(this.getNodeLabelEditIconPosY(e),")")}},{key:"getNodeLabelEditIconPosX",value:function(e,t,n,i){var o=i?this.getNodeLabelHoverWidth(e):this.getNodeLabelWidth(e),r=i?this.getNodeLabelHoverPosX(e):this.getNodeLabelPosX(e),a=t.getBoundingClientRect().width;if("center"===e.layout.labelAlign&&!it.isExpandedSupernode(e)){var s=o/2;return r+s+Math.min(s,a/n/2)}var l=Math.min(o,a/n);return this.getNodeLabelPosX(e)+l}},{key:"getNodeLabelEditIconPosY",value:function(e){return this.getNodeLabelPosY(e)}},{key:"getNodeLabelHoverPosX",value:function(e){return e.layout.labelSingleLine&&"center"===e.layout.labelAlign?this.getNodeLabelPosX(e)-250:this.getNodeLabelPosX(e)}},{key:"getNodeLabelHoverWidth",value:function(e){return e.layout.labelSingleLine?"center"===e.layout.labelAlign?e.layout.labelWidth+500:e.layout.labelWidth+40:e.layout.labelWidth}},{key:"getNodeLabelHoverHeight",value:function(e,t,n){if(e.layout.labelSingleLine)return e.layout.labelHeight;var i=t.getBoundingClientRect().height/n;return Math.max(i,e.layout.labelHeight)}},{key:"getNodeLabelTextAreaWidth",value:function(e){return this.getNodeLabelWidth(e)+2*K}},{key:"getNodeLabelTextAreaHeight",value:function(e){return this.getNodeLabelHeight(e)+2*K}},{key:"getNodeLabelTextAreaPosX",value:function(e){return this.getNodeLabelPosX(e)-K}},{key:"getNodeLabelTextAreaPosY",value:function(e){return this.getNodeLabelPosY(e)-K}},{key:"getNodeEllipsisTranslate",value:function(e){return"translate(".concat(this.getNodeEllipsisPosX(e),", ").concat(this.getNodeEllipsisPosY(e),")")}},{key:"getNodeEllipsisWidth",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeEllipsisWidth:e.layout.ellipsisWidth}},{key:"getNodeEllipsisHeight",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeEllipsisHeight:e.layout.ellipsisHeight}},{key:"getNodeEllipsisIconWidth",value:function(e){return this.getNodeEllipsisWidth(e)-2*e.layout.ellipsisHoverAreaPadding}},{key:"getNodeEllipsisIconHeight",value:function(e){return this.getNodeEllipsisHeight(e)-2*e.layout.ellipsisHoverAreaPadding}},{key:"getNodeEllipsisPosX",value:function(e){return it.isExpandedSupernode(e)?e.width+this.canvasLayout.supernodeEllipsisPosX:this.getElementPosX(e.width,e.layout.ellipsisPosX,e.layout.ellipsisPosition)}},{key:"getNodeEllipsisPosY",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeEllipsisPosY:this.getElementPosY(e.height,e.layout.ellipsisPosY,e.layout.ellipsisPosition)}},{key:"getNodeExpansionIconTranslate",value:function(e){var t=e.width+this.canvasLayout.supernodeExpansionIconPosX;return"translate(".concat(t,", ").concat(this.canvasLayout.supernodeExpansionIconPosY,")")}},{key:"getNodeErrorPosX",value:function(e){return it.isExpandedSupernode(e)?e.width+this.canvasLayout.supernodeErrorPosX:this.getElementPosX(e.width,e.layout.errorXPos,e.layout.errorPosition)}},{key:"getNodeErrorPosY",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeErrorPosY:this.getElementPosY(e.height,e.layout.errorYPos,e.layout.errorPosition)}},{key:"getNodeErrorWidth",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeErrorWidth:e.layout.errorWidth}},{key:"getNodeErrorHeight",value:function(e){return it.isExpandedSupernode(e)?this.canvasLayout.supernodeErrorHeight:e.layout.errorHeight}},{key:"getNodePortPosX",value:function(e,t){return this.getElementPosX(t.width,e.x_pos,e.pos)}},{key:"getNodePortPosY",value:function(e,t){return this.getElementPosY(t.height,e.y_pos,e.pos)}},{key:"getElementPosX",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"topLeft",i=0;return n.endsWith("Center")?i+=e/2:n.endsWith("Right")&&(i+=e),i+Number(t)}},{key:"getElementPosY",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"topLeft",i=0;return n.startsWith("middle")?i+=e/2:n.startsWith("bottom")&&(i+=e),i+Number(t)}},{key:"getSupernodePortXOffset",value:function(e,t){return t?t.find((function(t){return t.subflow_node_ref===e})).cx-this.canvasLayout.supernodeSVGAreaPadding:0}},{key:"getSupernodePortYOffset",value:function(e,t){return t?t.find((function(t){return t.subflow_node_ref===e})).cy:0}}])}(),jd=function(){return e((function e(){t(this,e)}),[{key:"getCommentCenterPosX",value:function(e){return e.x_pos+e.width/2}},{key:"getCommentCenterPosY",value:function(e){return e.y_pos+e.height/2}}])}();function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Rd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bd,Ud=!1,Gd=!0,Zd=Math.PI,Wd=function(){return e((function e(n,i,o,r){t(this,e),this.canvasLayout=i,this.config=n,this.nodeUtils=o,this.commentUtils=r}),[{key:"getNewStraightCommentLinkStartPos",value:function(e,t){return it.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,this.commentUtils.getCommentCenterPosX(e),this.commentUtils.getCommentCenterPosY(e),t.x,t.y)}},{key:"getNewFreeformNodeLinkStartPos",value:function(e,t,n){var i,o;if("image_center"!==e.layout.drawNodeLinkLineFromTo||it.isExpanded(e))if(n){var r=this.getCenterOffset(e,n,!1);i=r.x,o=r.y}else i=this.nodeUtils.getNodeCenterPosX(e),o=this.nodeUtils.getNodeCenterPosY(e);else i=this.nodeUtils.getNodeImageCenterPosX(e),o=this.nodeUtils.getNodeImageCenterPosY(e);return it.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,i,o,t.x,t.y)}},{key:"getLinkCoords",value:function(e,t,n,i,o,r){return e.type===J?this.canvasLayout.linkMethod===Q?this.getNodeLinkCoordsForFreeform(t,i,e):this.getNodeLinkCoordsForPortsConnection(t,n,i,o):e.type===ee?this.config.enableAssocLinkType===te?this.getAssociationCurveLinkCoords(t,i,r):this.getAssociationLinkCoords(t,i):this.getCommentLinkCoords(t,i)}},{key:"getNodeLinkCoordsForFreeform",value:function(e,t,n){var i,o,r,a,s,l,c,u,d=e.id===t.id;if("image_center"!==e.layout.drawNodeLinkLineFromTo||this.canvasLayout.linkType!==ne||it.isExpanded(e))if(n&&n.srcFreeformInfo){var h=this.getCenterOffset(e,n.srcFreeformInfo,d);i=h.x,o=h.y}else i=this.nodeUtils.getNodeCenterPosX(e),o=this.nodeUtils.getNodeCenterPosY(e);else i=this.nodeUtils.getNodeImageCenterPosX(e),o=this.nodeUtils.getNodeImageCenterPosY(e);if("image_center"!==t.layout.drawNodeLinkLineFromTo||this.canvasLayout.linkType!==ne||it.isExpanded(t))if(n&&n.trgFreeformInfo){var p=this.getCenterOffset(t,n.trgFreeformInfo,d);r=p.x,a=p.y}else r=this.nodeUtils.getNodeCenterPosX(t),a=this.nodeUtils.getNodeCenterPosY(t);else r=this.nodeUtils.getNodeImageCenterPosX(t),a=this.nodeUtils.getNodeImageCenterPosY(t);if(this.canvasLayout.linkType!==ne||d)return n.srcFreeformInfo.dir===ie?(s=i+this.canvasLayout.linkGap,l=o):n.srcFreeformInfo.dir===oe?(s=i-this.canvasLayout.linkGap,l=o):n.srcFreeformInfo.dir===re?(s=i,l=o+this.canvasLayout.linkGap):n.srcFreeformInfo.dir===ae&&(s=i,l=o-this.canvasLayout.linkGap),n.trgFreeformInfo.dir===ie?(c=r+this.canvasLayout.linkGap,u=a):n.trgFreeformInfo.dir===oe?(c=r-this.canvasLayout.linkGap,u=a):n.trgFreeformInfo.dir===re?(c=r,u=a+this.canvasLayout.linkGap):n.trgFreeformInfo.dir===ae&&(c=r,u=a-this.canvasLayout.linkGap),{originX:0,originY:0,x1:s,y1:l,x2:c,y2:u,srcDir:n.srcFreeformInfo.dir,trgDir:n.trgFreeformInfo.dir};var g=it.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,i,o,r,a),f=it.getOuterCoord(t.x_pos,t.y_pos,t.width,t.height,this.canvasLayout.linkGap,r,a,i,o);return{originX:g.originX,originY:g.originY,x1:g.x,y1:g.y,x2:f.x,y2:f.y,srcDir:g.dir,trgDir:f.dir}}},{key:"getCenterOffset",value:function(e,t,n){var i=t.len+1,o=t.idx+1,r=0,a=0;return t.dir===ae||t.dir===re?(r=e.x_pos+e.width/i*o,a=this.getYPosForCenterOffset(e,t.dir,n)):t.dir!==ie&&t.dir!==oe||(r=this.getXPosForCenterOffset(e,t.dir,n),a=e.y_pos+e.height/i*o),{x:r,y:a}}},{key:"getYPosForCenterOffset",value:function(e,t,n){return this.canvasLayout.linkType!==ne||n?t===re?e.y_pos+e.height:e.y_pos:this.nodeUtils.getNodeCenterPosY(e)}},{key:"getXPosForCenterOffset",value:function(e,t,n){return this.canvasLayout.linkType!==ne||n?t===ie?e.x_pos+e.width:e.x_pos:this.nodeUtils.getNodeCenterPosX(e)}},{key:"getNodeLinkCoordsForPortsConnection",value:function(e,t,n,i){var o,r,a,s,l,c;if(e.outputs&&e.outputs.length>0){var u=e.outputs.find((function(e){return e.id===t}));o=u.cx,r=u.cy,l=u.dir}else o=this.nodeUtils.getNodePortPosX(e.layout.outputPortPositions[0],e),r=this.nodeUtils.getNodePortPosY(e.layout.outputPortPositions[0],e),l=it.getPortDir(o,r,e);if(n.inputs&&n.inputs.length>0){var d=n.inputs.find((function(e){return e.id===i}));a=d.cx,s=d.cy,c=d.dir}else a=this.nodeUtils.getNodePortPosX(n.layout.inputPortPositions[0],n),s=this.nodeUtils.getNodePortPosY(n.layout.inputPortPositions[0],n),c=it.getPortDir(o,r,e);return{x1:e.x_pos+o,y1:e.y_pos+r,x2:n.x_pos+a,y2:n.y_pos+s,srcDir:l,trgDir:c}}},{key:"getAssociationCurveLinkCoords",value:function(e,t,n){var i=0,o=0;return n===se?(i=e.width,o=0):n===le?(i=0,o=t.width):n===ce?(i=0,o=0):(i=e.width,o=t.width),{x1:e.x_pos+i,y1:e.y_pos+this.nodeUtils.getNodePortPosY(e.layout.outputPortPositions[0],e),x2:t.x_pos+o,y2:t.y_pos+this.nodeUtils.getNodePortPosY(t.layout.inputPortPositions[0],t)}}},{key:"getCommentLinkCoords",value:function(e,t){var n,i,o=this.commentUtils.getCommentCenterPosX(e),r=this.commentUtils.getCommentCenterPosY(e);"image_center"===t.layout.drawCommentLinkLineTo?(n=this.nodeUtils.getNodeImageCenterPosX(t),i=this.nodeUtils.getNodeImageCenterPosY(t)):(n=this.nodeUtils.getNodeCenterPosX(t),i=this.nodeUtils.getNodeCenterPosY(t));var a=it.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,o,r,n,i),s=it.getOuterCoord(t.x_pos,t.y_pos,t.width,t.height,this.canvasLayout.linkGap,n,i,o,r);return{x1:a.x,y1:a.y,x2:s.x,y2:s.y}}},{key:"getAssociationLinkCoords",value:function(e,t){var n=this.nodeUtils.getNodeCenterPosX(e),i=this.nodeUtils.getNodeCenterPosY(e),o=this.nodeUtils.getNodeCenterPosX(t),r=this.nodeUtils.getNodeCenterPosY(t),a=it.getOuterCoord(e.x_pos,e.y_pos,e.width,e.height,this.canvasLayout.linkGap,n,i,o,r),s=it.getOuterCoord(t.x_pos,t.y_pos,t.width,t.height,this.canvasLayout.linkGap,o,r,n,i);return{originX:a.originX,originY:a.originY,x1:a.x,y1:a.y,x2:s.x,y2:s.y,srcDir:a.dir,trgDir:s.dir}}},{key:"addConnectionPaths",value:function(e){var t=this;return e.forEach((function(e){e.coordsUpdated&&(e.pathInfo=t.getConnectorPathInfo(e))})),e}},{key:"getConnectorPathInfo",value:function(e,t){var n=this.getMinInitialLine(e,t);return e.type===J?this.canvasLayout.linkMethod===Q&&this.canvasLayout.linkType===ne?this.getStraightPath(e,n):this.getNodeLinkPathInfo(e,n):e.type===ee&&this.config.enableAssocLinkType===te?this.getAssociationCurvePath(e,n):this.getStraightPath(e,n)}},{key:"getMinInitialLine",value:function(e,t){return e.type===ue?0:e.minInitialLineForElbow?e.minInitialLineForElbow:e.srcObj&&e.srcObj.layout?e.srcObj.layout.minInitialLine:t||30}},{key:"getNodeLinkPathInfo",value:function(e,t){var n,i,o,r,a=e;a.srcObj&&a.trgNode?a.srcDir===re?(n=-(a.srcObj.x_pos+a.srcObj.width),o=-a.srcObj.x_pos,i=-(a.trgNode.x_pos+a.trgNode.width),r=-a.trgNode.x_pos):a.srcDir===ae?(n=a.srcObj.x_pos,o=a.srcObj.x_pos+a.srcObj.width,i=a.trgNode.x_pos,r=a.trgNode.x_pos+a.trgNode.width):a.srcDir===oe?(n=-(a.srcObj.y_pos+a.srcObj.height),o=-a.srcObj.y_pos,i=-(a.trgNode.y_pos+a.trgNode.height),r=-a.trgNode.y_pos):(n=a.srcObj.y_pos,o=a.srcObj.y_pos+a.srcObj.height,i=a.trgNode.y_pos,r=a.trgNode.y_pos+a.trgNode.height):a.srcDir===re?(n=-a.x1,i=-a.x2,o=-a.x1,r=-a.x2):a.srcDir===ae?(n=a.x1,i=a.x2,o=a.x1,r=a.x2):a.srcDir===oe?(n=-a.y1,i=-a.y2,o=-a.y1,r=-a.y2):(n=a.y1,i=a.y2,o=a.y1,r=a.y2),a.srcDir===re?a=this.rotateData90Degrees(a,Gd):a.srcDir===ae?a=this.rotateData90Degrees(a,Ud):a.srcDir===oe&&(a=this.rotateData90Degrees(a,Ud),a=this.rotateData90Degrees(a,Ud)),a.trgDir=this.getRotatedTrgDir(a);var s=a.srcDir;a.srcDir=ie;var l=this.getPathInfo({link:a,minInitialLine:t,topSrc:n,topTrg:i,bottomSrc:o,bottomTrg:r});return a.srcDir=s,a.srcDir===re?(l.elements=this.rotateElements90Degrees(l.elements,Ud),l.centerPoint=this.rotatePoint90Degrees(l.centerPoint.x,l.centerPoint.y,Ud)):a.srcDir===ae?(l.elements=this.rotateElements90Degrees(l.elements,Gd),l.centerPoint=this.rotatePoint90Degrees(l.centerPoint.x,l.centerPoint.y,Gd)):a.srcDir===oe&&(l.elements=this.rotateElements90Degrees(l.elements,Gd),l.elements=this.rotateElements90Degrees(l.elements,Gd),l.centerPoint=this.rotatePoint90Degrees(l.centerPoint.x,l.centerPoint.y,Gd),l.centerPoint=this.rotatePoint90Degrees(l.centerPoint.x,l.centerPoint.y,Gd)),l.path=this.createPath(l.elements),l}},{key:"rotateData90Degrees",value:function(e,t){var n=this.rotatePoint90Degrees(e.x1,e.y1,t),i=this.rotatePoint90Degrees(e.x2,e.y2,t);return Rd(Rd({},e),{},{x1:n.x,y1:n.y,x2:i.x,y2:i.y})}},{key:"rotateElements90Degrees",value:function(e,t){var n,i=this;return e.forEach((function(e){n=i.rotatePoint90Degrees(e.x,e.y,t),e.x=n.x,e.y=n.y,"Q"!==e.p&&"C"!==e.p||(n=i.rotatePoint90Degrees(e.x2,e.y2,t),e.x2=n.x,e.y2=n.y,"C"===e.p&&(n=i.rotatePoint90Degrees(e.x3,e.y3,t),e.x3=n.x,e.y3=n.y))})),e}},{key:"rotatePoint90Degrees",value:function(e,t,n){return n?{x:t,y:-e}:{x:-t,y:e}}},{key:"getRotatedTrgDir",value:function(e){if(e.srcDir===re)switch(e.trgDir){case re:return ie;case ae:return oe;case oe:return re;default:return ae}else if(e.srcDir===ae)switch(e.trgDir){case re:return oe;case ae:return ie;case oe:return ae;default:return re}else if(e.srcDir===oe)switch(e.trgDir){case re:return ae;case ae:return re;case oe:return ie;default:return oe}return e.trgDir}},{key:"getStraightPath",value:function(e,t){if(e.srcNodeId&&e.trgNodeId&&e.srcNodeId===e.trgNodeId)return this.selfRefLinkPath(e,t);var n="M "+e.x1+" "+e.y1+" L "+e.x2+" "+e.y2,i=e.x2-e.x1,o=e.y2-e.y1,r={x:e.x1+i/2,y:e.y1+o/2},a=Math.atan(o/i);return i<0&&(a=Zd+a),{path:n,centerPoint:r,angle:a}}},{key:"selfRefLinkPath",value:function(e,t){var n=e.y2-t,i=e.x1+t;return{path:"M "+e.x1+" "+e.y1+" L "+i+" "+e.y1+" "+i+" "+n+" "+e.x2+" "+n+" "+e.x2+" "+e.y2,centerPoint:{x:e.x2+(i-e.x2)/2,y:n},angle:180}}},{key:"getAssociationCurvePath",value:function(e,t){return e.assocLinkVariation===le?this.getCurveLeftPath(e,t):e.assocLinkVariation===ce?this.getDoubleBackLeft(e,t):e.assocLinkVariation===de?this.getDoubleBackRight(e,t):this.getCurveRightPath(e,t)}},{key:"getCurveLeftPath",value:function(e,t){var n=e.x1-(e.x1-e.x2)/2;return this.getCurveOutPath(e,t,n)}},{key:"getCurveRightPath",value:function(e,t){var n=e.x1+(e.x2-e.x1)/2;return this.getCurveOutPath(e,t,n)}},{key:"getCurveOutPath",value:function(e,t,n){var i=e.y1,o=n,r=e.y2;return{path:"M "+e.x1+" "+e.y1+" C "+n+" "+i+" "+o+" "+r+" "+e.x2+" "+e.y2,centerPoint:{x:n,y:i+(r-i)/2}}}},{key:"getDoubleBackLeft",value:function(e,t){var n=Math.min(e.x1,e.x2)-t-100;return this.getDoubleBack(e,t,n)}},{key:"getDoubleBackRight",value:function(e,t){var n=Math.max(e.x1,e.x2)+t+100;return this.getDoubleBack(e,t,n)}},{key:"getDoubleBack",value:function(e,t,n){var i=e.y1,o=n,r=e.y2;return{path:"M "+e.x1+" "+e.y1+" C "+n+" "+i+" "+o+" "+r+" "+e.x2+" "+e.y2,centerPoint:{x:it.getCenterPointCubicBezier(e.x1,n,o,e.x2),y:it.getCenterPointCubicBezier(e.y1,i,r,e.y2)}}}},{key:"getPathInfo",value:function(e){switch(e.minFinalLine=e.link.trgNode?e.link.trgNode.layout.minFinalLine:30,e.link.trgDir){case ae:return this.getPathInfoEN(e);case re:return this.getPathInfoES(e);case ie:return this.getPathInfoEE(e);default:return this.getPathInfoEW(e)}}},{key:"getPathInfoEW",value:function(e){var t=this.canvasLayout.wrapAroundNodePadding,n=e.link.x2-e.link.x1;if(n>e.minInitialLine+e.minFinalLine||n>0&&e.topSrc-t<e.bottomTrg&&e.bottomSrc+t>e.topTrg){var i={},o={};if(i.x=e.link.x1+e.minInitialLine,i.y=e.link.y1,o.x=i.x,o.y=e.link.y2,n>0){var r=2*e.minInitialLine-n;r>0&&(i.x=e.link.x1+e.minInitialLine-r/2,o.x=i.x)}return this.get3PartLink(e,i,o)}var a={},s={},l={},c={},u=this.calculateMidY(e.link,e.topSrc,e.bottomSrc,e.topTrg,e.bottomTrg);return a.x=e.link.x1+e.minInitialLine,a.y=e.link.y1,s.x=a.x,s.y=u,l.x=e.link.x2-e.minFinalLine,l.y=s.y,c.x=l.x,c.y=e.link.y2,this.get5PartLink(e,a,s,l,c)}},{key:"getPathInfoEE",value:function(e){var t=this.canvasLayout.wrapAroundNodePadding;if(e.topTrg-t<e.link.y1&&e.bottomTrg+t>e.link.y1){var n={},i={},o={},r={};return n.x=e.link.x1+e.minInitialLine,n.y=e.link.y1,i.x=n.x,i.y=e.link.x1>=e.link.x2?e.link.y1+(e.link.y2-e.link.y1)/2:e.topTrg-t,o.x=e.link.x2+e.minFinalLine,o.y=i.y,r.x=o.x,r.y=e.link.y2,e.link.x2<e.link.x1&&(i.y=e.topSrc-t,o.y=i.y),this.get5PartLink(e,n,i,o,r)}var a={},s={};return a.x=Math.max(e.link.x1+e.minInitialLine,e.link.x2+e.minFinalLine),a.y=e.link.y1,s.x=a.x,s.y=e.link.y2,this.get3PartLink(e,a,s)}},{key:"getPathInfoEN",value:function(e){if(e.link.y2>e.link.y1+e.minFinalLine&&e.link.x2>e.link.x1+e.minInitialLine){var t={};return t.x=e.link.x2,t.y=e.link.y1,this.get2PartLink(e,t)}var n={},i={},o={},r=e.link.y2-e.minFinalLine;return e.link.x2<e.link.x1&&(e.topTrg>e.bottomSrc+e.minFinalLine+this.canvasLayout.wrapAroundNodePadding?r=e.topTrg-e.minFinalLine:e.topTrg>e.topSrc&&(r=e.topSrc-this.canvasLayout.wrapAroundNodePadding)),n.x=e.link.x1+e.minInitialLine,n.y=e.link.y1,i.x=n.x,i.y=r,o.x=e.link.x2,o.y=i.y,this.get4PartLink(e,n,i,o)}},{key:"getPathInfoES",value:function(e){if(e.link.y1>e.link.y2+e.minFinalLine&&e.link.x2>e.link.x1){var t={};return t.x=e.link.x2,t.y=e.link.y1,this.get2PartLink(e,t)}var n={},i={},o={},r=e.link.y2+e.minFinalLine;return e.link.x2<e.link.x1&&(e.bottomTrg<e.topSrc-e.minFinalLine-this.canvasLayout.wrapAroundNodePadding?r=e.bottomTrg+e.minFinalLine:e.bottomTrg<e.bottomSrc&&(r=e.bottomSrc+this.canvasLayout.wrapAroundNodePadding)),n.x=e.link.x1+e.minInitialLine,n.y=e.link.y1,i.x=n.x,i.y=r,o.x=e.link.x2,o.y=i.y,this.get4PartLink(e,n,i,o)}},{key:"calculateMidY",value:function(e,t,n,i,o){var r;if(i>=n+this.canvasLayout.wrapAroundNodePadding)r=n+(i-n)/2;else if(o<=t-this.canvasLayout.wrapAroundNodePadding)r=o+(t-o)/2;else{var a=Math.max(n,o),s=a-e.y1,l=a-e.y2,c=Math.min(t,i);r=s+l>e.y1-c+(e.y2-c)?c-this.canvasLayout.wrapAroundSpacing:a+this.canvasLayout.wrapAroundSpacing}return r}},{key:"get2PartLink",value:function(e,t){switch(this.canvasLayout.linkType){case pe:return this.get2PartElbow(e,t);case ne:return this.get2PartStraight(e,t);case he:return this.get2PartParallax(e,t);default:return this.get2PartCurve(e,t)}}},{key:"get3PartLink",value:function(e,t,n){switch(this.canvasLayout.linkType){case pe:return this.get3PartElbow(e,t,n);case ne:return this.get3PartStraight(e,t,n);case he:return this.get3PartParallax(e,t,n);default:return this.get3PartCurve(e,t,n)}}},{key:"get4PartLink",value:function(e,t,n,i){switch(this.canvasLayout.linkType){case pe:return this.get4PartElbow(e,t,n,i);case ne:return this.get4PartStraight(e,t,n,i);case he:return this.get4PartParallax(e,t,n,i);default:return this.get4PartCurve(e,t,n,i)}}},{key:"get5PartLink",value:function(e,t,n,i,o){switch(this.canvasLayout.linkType){case pe:return this.get5PartElbow(e,t,n,i,o);case ne:return this.get5PartStraight(e,t,n,i,o);case he:return this.get5PartParallax(e,t,n,i,o);default:return this.get5PartCurve(e,t,n,i,o)}}},{key:"get2PartElbow",value:function(e,t){var n=e.link.y2<t.y?-this.canvasLayout.elbowSize:this.canvasLayout.elbowSize;return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x-this.canvasLayout.elbowSize,y:t.y},{p:"Q",x:t.x,y:t.y,x2:t.x,y2:t.y+n},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:e.link.x1+(e.link.x2-e.link.x1)/2,y:e.link.y1}}}},{key:"get3PartElbow",value:function(e,t,n){var i=this.canvasLayout.elbowSize,o=this.adjustElbowSize(n.y,t.y),r=e.link.x2>n.x?this.canvasLayout.elbowSize:-this.canvasLayout.elbowSize;return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x-i,y:t.y},{p:"Q",x:t.x,y:t.y,x2:t.x,y2:t.y+o},{p:"L",x:n.x,y:n.y-o},{p:"Q",x:n.x,y:n.y,x2:n.x+r,y2:n.y},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:t.x,y:e.link.y1+(e.link.y2-e.link.y1)/2}}}},{key:"get4PartElbow",value:function(e,t,n,i){var o=this.canvasLayout.elbowSize,r=this.adjustElbowSize(n.y,t.y),a=this.adjustElbowSize(t.x,i.x),s=i.y>e.link.y2?this.canvasLayout.elbowSize:-this.canvasLayout.elbowSize;return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x-o,y:t.y},{p:"Q",x:t.x,y:t.y,x2:t.x,y2:t.y+r},{p:"L",x:n.x,y:n.y-r},{p:"Q",x:n.x,y:n.y,x2:n.x-a,y2:n.y},{p:"L",x:i.x+a,y:i.y},{p:"Q",x:i.x,y:i.y,x2:i.x,y2:i.y-s},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:n.x+(i.x-n.x)/2,y:n.y}}}},{key:"get5PartElbow",value:function(e,t,n,i,o){var r=this.canvasLayout.elbowSize,a=this.adjustElbowSize(n.y,t.y),s=this.adjustElbowSize(t.x,i.x),l=this.adjustElbowSize(i.y,o.y),c=e.link.x2<o.x?-this.canvasLayout.elbowSize:this.canvasLayout.elbowSize;return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x-r,y:t.y},{p:"Q",x:t.x,y:t.y,x2:t.x,y2:t.y+a},{p:"L",x:n.x,y:n.y-a},{p:"Q",x:n.x,y:n.y,x2:n.x-s,y2:n.y},{p:"L",x:i.x+s,y:i.y},{p:"Q",x:i.x,y:i.y,x2:i.x,y2:i.y-l},{p:"L",x:o.x,y:o.y+l},{p:"Q",x:o.x,y:o.y,x2:o.x+c,y2:o.y},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:n.x+(i.x-n.x)/2,y:n.y}}}},{key:"adjustElbowSize",value:function(e,t){var n=this.canvasLayout.elbowSize,i=t-e;return i<2*this.canvasLayout.elbowSize&&i>-2*this.canvasLayout.elbowSize&&(n=Math.abs(i)/2),n=i>0?-n:n}},{key:"get2PartParallax",value:function(e,t){var n=e.link.y2>e.link.y1?-e.minFinalLine:e.minFinalLine,i={},o={};return i.x=e.link.x1+e.minInitialLine,i.y=t.y,o.x=t.x,o.y=e.link.y2+n,{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:i.x,y:t.y},{p:"L",x:o.x,y:o.y},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:i.x+(t.x-i.x)/2,y:i.y+(o.y-i.y)/2}}}},{key:"get3PartParallax",value:function(e,t,n){var i,o={x:0,y:0};if(e.link.x2>n.x){var r={};r.x=e.link.x2-Math.min(e.minFinalLine,e.link.x2-t.x),r.y=e.link.y2,i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x,y:t.y},{p:"L",x:r.x,y:r.y},{p:"L",x:e.link.x2,y:e.link.y2}],o={x:t.x+(r.x-t.x)/2,y:t.y+(r.y-t.y)/2}}else e.link.x2<e.link.x1+e.minInitialLine?(i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x,y:t.y},{p:"L",x:Math.max(n.x,e.link.x2),y:e.link.y2},{p:"L",x:e.link.x2,y:e.link.y2}],o={x:e.link.x2+(n.x-e.link.x2)/2,y:n.y}):(i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x,y:t.y},{p:"L",x:e.link.x2+e.minFinalLine,y:e.link.y2},{p:"L",x:e.link.x2,y:e.link.y2}],o={x:t.x,y:t.y+(e.link.y2-t.y)/2});return{elements:i,centerPoint:o}}},{key:"get4PartParallax",value:function(e,t,n,i){return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x,y:t.y},{p:"L",x:n.x,y:n.y},{p:"L",x:i.x,y:i.y},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:i.x+(n.x-i.x)/2,y:n.y}}}},{key:"get5PartParallax",value:function(e,t,n,i,o){return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x,y:t.y},{p:"L",x:n.x,y:n.y},{p:"L",x:i.x,y:i.y},{p:"L",x:o.x,y:o.y},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:i.x+(n.x-i.x)/2,y:n.y}}}},{key:"get2PartStraight",value:function(e,t){return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:e.link.x1+(e.link.x2-e.link.x1)/2,y:e.link.y1+(e.link.y2-e.link.y1)/2}}}},{key:"get3PartStraight",value:function(e,t,n){var i,o={x:0,y:0};return n.x<e.link.x2?(i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:e.link.x2,y:e.link.y2}],o={x:e.link.x1+(e.link.x2-e.link.x1)/2,y:e.link.y1+(e.link.y2-e.link.y1)/2}):e.link.x2<e.link.x1?(i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x,y:n.y},{p:"L",x:e.link.x2,y:e.link.y2}],o={x:e.link.x2+(n.x-e.link.x2)/2,y:n.y}):(i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x+e.minFinalLine,y:t.y},{p:"L",x:e.link.x2,y:e.link.y2}],o={x:e.link.x1+(t.x-e.link.x1)/2,y:e.link.y1}),{elements:i,centerPoint:o}}},{key:"get4PartStraight",value:function(e,t,n,i){return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:e.link.x1+e.minInitialLine,y:n.y},{p:"L",x:e.link.x2,y:n.y},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:i.x+(n.x-i.x)/2,y:n.y}}}},{key:"get5PartStraight",value:function(e,t,n,i,o){var r=o.x>e.link.x2?e.minFinalLine:-e.minFinalLine;return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"L",x:t.x,y:n.y},{p:"L",x:e.link.x2+r,y:n.y},{p:"L",x:e.link.x2+r,y:e.link.y2},{p:"L",x:e.link.x2,y:e.link.y2}],centerPoint:{x:i.x+(n.x-i.x)/2,y:n.y}}}},{key:"get2PartCurve",value:function(e,t){return{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"Q",x:t.x,y:t.y,x2:e.link.x2,y2:e.link.y2}],centerPoint:{x:it.getCenterPointQuadBezier(e.link.x1,t.x,e.link.x2),y:it.getCenterPointQuadBezier(e.link.y1,t.y,e.link.y2)}}}},{key:"get3PartCurve",value:function(e,t,n){var i,o;if(t.x>e.link.x2)i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"C",x:t.x+80,y:t.y,x2:n.x+20,y2:n.y,x3:e.link.x2,y3:e.link.y2}],o={x:it.getCenterPointCubicBezier(e.link.x1,t.x+80,n.x,e.link.x2),y:it.getCenterPointCubicBezier(e.link.y1,t.y,n.y,e.link.y2)};else{var r={};r.x=e.link.x1+(e.link.x2-e.link.x1)/2,i=[{p:"M",x:e.link.x1,y:e.link.y1},{p:"C",x:r.x,y:t.y,x2:r.x,y2:n.y,x3:e.link.x2,y3:e.link.y2}],o={x:r.x,y:t.y+(n.y-t.y)/2}}return{elements:i,centerPoint:o}}},{key:"get4PartCurve",value:function(e,t,n,i){var o=e.link.x2-t.x,r=Math.min(200,Math.abs(o)),a=o>0?-r/2:r/2,s={},l={},c={};return s.x=t.x,s.y=t.y+(n.y-t.y)/2,l.x=n.x-a,l.y=n.y,c.x=i.x+a,c.y=n.y,{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"Q",x:t.x,y:t.y,x2:s.x,y2:s.y},{p:"Q",x:n.x,y:n.y,x2:l.x,y2:l.y},{p:"L",x:c.x,y:c.y},{p:"Q",x:i.x,y:i.y,x2:e.link.x2,y2:e.link.y2}],centerPoint:l}}},{key:"get5PartCurve",value:function(e,t,n,i,o){var r=o.x-t.x,a=Math.min(200,Math.abs(r)),s=r>0?-a/2:a/2,l={},c={},u={},d={};return l.x=t.x,l.y=t.y+(n.y-t.y)/2,c.x=n.x-s,c.y=n.y,u.x=i.x+s,u.y=n.y,d.x=i.x,d.y=e.link.y2-(e.link.y2-i.y)/2,{elements:[{p:"M",x:e.link.x1,y:e.link.y1},{p:"Q",x:t.x,y:t.y,x2:l.x,y2:l.y},{p:"Q",x:n.x,y:n.y,x2:c.x,y2:c.y},{p:"L",x:u.x,y:u.y},{p:"Q",x:i.x,y:i.y,x2:d.x,y2:d.y},{p:"Q",x:o.x,y:o.y,x2:e.link.x2,y2:e.link.y2}],centerPoint:c}}},{key:"createPath",value:function(e){var t=e.length-1,n="";return e.forEach((function(e,i){"M"===e.p?n+="M "+e.x+" "+e.y:"L"===e.p?n+="L "+e.x+" "+e.y:"T"===e.p?n+="T "+e.x+" "+e.y:"Q"===e.p?n+="Q "+e.x+" "+e.y+" "+e.x2+" "+e.y2:"C"===e.p&&(n+="C "+e.x+" "+e.y+" "+e.x2+" "+e.y2+" "+e.x3+" "+e.y3),i<t&&(n+=" ")})),n}}])}(),Xd=function(){return e((function e(n){t(this,e),this.canvasLayout=n}),[{key:"getDec",value:function(e,t){return t?t.find((function(t){return t.id===e})):null}},{key:"getDecLabelClass",value:function(e,t){var n=e.label_single_line?" d3-label-single-line":" d3-label-multi-line",i="center"===e.label_align?" d3-label-center":"";return this.getDecClass(e,"d3-".concat(t,"-dec-label"))+n+i}},{key:"getDecLabelTextAreaClass",value:function(e){return"d3-dec-label-entry"+(e.label_single_line?" d3-label-single-line":" d3-label-multi-line-entry")+("center"===e.label_align?" d3-label-center":"")}},{key:"getDecTransform",value:function(e,t,n){return"translate(".concat(this.getDecPosX(e,t,n),", ").concat(this.getDecPosY(e,t,n),")")}},{key:"getDecPosX",value:function(e,t,n){return n===fe?this.getLinkDecPosX(e,t,n):this.getNodeDecPosX(e,t)}},{key:"getNodeDecPosX",value:function(e,t){var n=e.position||"topLeft",i=0;return"topLeft"===n||"middleLeft"===n||"bottomLeft"===n?i=void 0!==e.x_pos?Number(e.x_pos):t.layout.decoratorLeftX:"topCenter"===n||"middleCenter"===n||"bottomCenter"===n?i=t.width/2+(void 0!==e.x_pos?Number(e.x_pos):t.layout.decoratorCenterX):"topRight"!==n&&"middleRight"!==n&&"bottomRight"!==n||(i=t.width+(void 0!==e.x_pos?Number(e.x_pos):t.layout.decoratorRightX)),i}},{key:"getLinkDecPosX",value:function(e,t,n){var i=e.position||"middle",o=0;return"middle"===i?o=t.pathInfo.centerPoint?t.pathInfo.centerPoint.x:t.x1+(t.x2-t.x1)/2:"source"===i?o=t.pathInfo.sourcePoint?t.pathInfo.sourcePoint.x:t.x1:"target"===i&&(o=t.pathInfo.targetPoint?t.pathInfo.targetPoint.x:t.x2),o=void 0!==e.x_pos?o+Number(e.x_pos):o,e.distance&&h(t,"pathInfo.angle")&&(o+=Math.cos(t.pathInfo.angle)*e.distance),"center"===e.label_align&&(o-=this.getDecWidth(e,t,n)/2),o}},{key:"getDecPosY",value:function(e,t,n){return n===fe?this.getLinkDecPosY(e,t):this.getNodeDecPosY(e,t)}},{key:"getNodeDecPosY",value:function(e,t){var n=e.position||"topLeft",i=0;return"topLeft"===n||"topCenter"===n||"topRight"===n?i=void 0!==e.y_pos?Number(e.y_pos):t.layout.decoratorTopY:"middleLeft"===n||"middleCenter"===n||"middleRight"===n?i=t.height/2+(void 0!==e.y_pos?Number(e.y_pos):t.layout.decoratorMiddleY):"bottomLeft"!==n&&"bottomCenter"!==n&&"bottomRight"!==n||(i=t.height+(void 0!==e.y_pos?Number(e.y_pos):t.layout.decoratorBottomY)),i}},{key:"getLinkDecPosY",value:function(e,t){var n=e.position||"middle",i=0;return"middle"===n?i=t.pathInfo.centerPoint?t.pathInfo.centerPoint.y:t.y1+(t.y2-t.y1)/2:"source"===n?i=t.pathInfo.sourcePoint?t.pathInfo.sourcePoint.y:t.y1:"target"===n&&(i=t.pathInfo.targetPoint?t.pathInfo.targetPoint.y:t.y2),i=void 0!==e.y_pos?i+Number(e.y_pos):i,e.distance&&h(t,"pathInfo.angle")&&(i+=Math.sin(t.pathInfo.angle)*e.distance),i}},{key:"getDecPadding",value:function(e,t,n){return!1===e.outline?0:n===fe?this.canvasLayout.linkDecoratorPadding:t.layout.decoratorPadding}},{key:"getDecWidth",value:function(e,t,n){return void 0!==e.width?Number(e.width):n===fe?this.canvasLayout.linkDecoratorWidth:t.layout.decoratorWidth}},{key:"getDecHeight",value:function(e,t,n){return void 0!==e.height?Number(e.height):n===fe?this.canvasLayout.linkDecoratorHeight:t.layout.decoratorHeight}},{key:"getDecClass",value:function(e,t){var n=t;return e&&e.class_name&&(n+=" "+e.class_name),n}},{key:"getDecImage",value:function(e){return e?e.image:""}},{key:"getDecLabelEditIconTranslate",value:function(e,t,n,i,o){return"translate(".concat(this.getDecLabelEditIconPosX(e,t,n,i,o),", ").concat(this.getDecLabelEditIconPosY(e),")")}},{key:"getDecLabelEditIconPosX",value:function(e,t,n,i,o){var r=Math.min(i.getBoundingClientRect().width,this.getDecLabelWidth(e,t,n));return"center"===e.label_align?this.getDecLabelWidth(e,t,n)/2+r/2/o:r/o}},{key:"getDecLabelEditIconPosY",value:function(e){return 0}},{key:"getDecLabelWidth",value:function(e,t,n){return void 0!==e.width?Number(e.width):n===fe?this.canvasLayout.linkDecoratorLabelWidth:t.layout.decoratorLabelWidth}},{key:"getDecLabelHeight",value:function(e,t,n){return void 0!==e.height?Number(e.height):n===fe?this.canvasLayout.linkDecoratorLabelHeight:t.layout.decoratorLabelHeight}},{key:"getDecLabelTextAreaWidth",value:function(e,t,n){return this.getDecLabelWidth(e,t,n)+2*K}},{key:"getDecLabelTextAreaHeight",value:function(e,t,n){return this.getDecLabelHeight(e,t,n)+2*K}},{key:"getDecLabelTextAreaPosX",value:function(){return-K}},{key:"getDecLabelTextAreaPosY",value:function(){return-(K-1)}}])}(),Yd=_t;if("production"===process.env.NODE_ENV)Bd=Yd.createRoot,Yd.hydrateRoot;else{var Kd=Yd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Bd=function(e,t){Kd.usingClientEntryPoint=!0;try{return Yd.createRoot(e,t)}finally{Kd.usingClientEntryPoint=!1}}}var qd=function(){return e((function e(n){t(this,e),this.logger=new pt("SVGCanvasExternal"),this.ren=n}),[{key:"isValidJsxElement",value:function(e){return a.isValidElement(e)}},{key:"isReact18OrHigher",value:function(){return Number(a.version.split(".")[0])>=18}},{key:"addNodeExternalObject",value:function(e,t,n){var i=a.createElement(e.layout.nodeExternalObject,{nodeData:e,canvasController:this.ren.canvasController,externalUtils:this});this.renderExternalObject(i,n[t])}},{key:"addNodeImageExternalObject",value:function(e,t,n){this.renderExternalObject(e,n[t])}},{key:"addDecExternalObject",value:function(e,t,n){this.renderExternalObject(e.jsx,n[t])}},{key:"addJsxExternalObject",value:function(e,t,n){this.renderExternalObject(e,n[t])}},{key:"renderExternalObject",value:function(e,t){this.isReact18OrHigher()?(t.ccExtRoot||(t.ccExtRoot=Bd(t)),t.ccExtRoot.render(e)):_t.render(e,t)}},{key:"removeExternalObject",value:function(e,t,n){if(this.isReact18OrHigher()){var i=n[t];i.ccExtRoot||(i.ccExtRoot=Bd(i)),setTimeout((function(){i.ccExtRoot.unmount(),i.ccExtRoot=null}))}else _t.unmountComponentAtNode(n[t])}},{key:"getActiveNodes",value:function(){return this.ren.activePipeline.getNodes()}},{key:"getActiveNode",value:function(e){return this.ren.activePipeline.getNode(e)}},{key:"setPortPositions",value:function(e){var t=this.ren.activePipeline.getNode(e.nodeId),n=this.ren.zoomUtils.getZoomScale();e.inputPositions&&e.inputPositions.forEach((function(e){var i=t.inputs.find((function(t){return t.id===e.id}));i.cx=e.cx/n,i.cy=e.cy/n,i.dir=it.getPortDir(i.cx,i.cy,t)})),e.outputPositions&&e.outputPositions.forEach((function(e){var i=t.outputs.find((function(t){return t.id===e.id}));i.cx=e.cx/n,i.cy=e.cy/n,i.dir=it.getPortDir(i.cx,i.cy,t)})),this.ren.displayMovedLinks()}},{key:"setNodesProperties",value:function(e){var t=this;e&&(e.forEach((function(e){var n=t.ren.activePipeline.getNode(e.id);e.height&&(n.height=e.height),e.width&&(n.width=e.width),e.x_pos&&(n.x_pos=e.x_pos),e.y_pos&&(n.y_pos=e.y_pos)})),this.ren.displayNodes())}},{key:"raiseNodeToTopById",value:function(e){this.ren.raiseNodeToTopById(e)}}])}(),$d=sd({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Jd=g,Qd=$d,eh=/&(?:amp|lt|gt|quot|#39);/g,th=RegExp(eh.source);var nh=function(e){return(e=Jd(e))&&th.test(e)?e.replace(eh,Qd):e},ih=function(){return e((function e(){t(this,e)}),null,[{key:"processMarkdownAction",value:function(e,t,n,i){var o=n,r=i,a=null;switch(o===r?(o=this.findFirstSpace(t,o),r=this.findLastSpace(t,r)):this.allWhiteSpace(t,o,r)?o=r:(o=this.findFirstNonSpace(t,o,r),r=this.findLastNonSpace(t,o,r)),e){case"title":case"header":case"subheader":case"body":case"increaseHashes":case"decreaseHashes":a=this.processHeaderCommand(t,o,r,e);break;case"bold":a=this.processWrapCommand(t,o,r,"**");break;case"italics":a=this.processWrapCommand(t,o,r,"_");break;case"strikethrough":a=this.processWrapCommand(t,o,r,"~~");break;case"code":a=this.processCodeCommand(t,o,r);break;case"link":a=this.processLinkCommand(t,o,r);break;case"quote":case"numberedList":case"bulletedList":a=this.processMultiLineCommand(t,o,r,e);break;case"return":a=this.processReturnCommand(t,o,r,n,i)}return a}},{key:"findFirstSpace",value:function(e,t){var n=e.lastIndexOf(" ",t-1)+1,i=e.lastIndexOf("\n",t-1)+1;return Math.max(n,i,0)}},{key:"findLastSpace",value:function(e,t){var n=e.indexOf(" ",t),i=e.indexOf("\n",t);return n=-1===n?e.length:n,i=-1===i?e.length:i,Math.min(n,i,e.length)}},{key:"allWhiteSpace",value:function(e,t,n){return 0===e.slice(t,n).trim().length}},{key:"findFirstNonSpace",value:function(e,t,n){for(var i=t;(" "===e[i]||"\n"===e[i])&&i<=n;)i++;return i}},{key:"findLastNonSpace",value:function(e,t,n){for(var i=n;(" "===e[i-1]||"\n"===e[i-1])&&i>=t;)i--;return i}},{key:"processHeaderCommand",value:function(e,t,n,i){var o=this.findPrecedingNewLine(e,t),r=this.findSuceedingNewLine(e,n),a=e.slice(0,o),s=e.slice(o,r),l=e.slice(r),c=o,u=r,d="",h=s,p=this.getHashCount(s);if(p>0){var g=s.indexOf(" ");d=a+(h=s.slice(g+1))+l,u-=g+1}var f=this.getHeaderSyntax(i,p);return f&&(d=a+f+h+l,c+=f.length,u+=f.length),{newText:d,newStart:c,newEnd:u}}},{key:"getHeaderSyntax",value:function(e,t){switch(e){case"title":return"# ";case"header":return"## ";case"subheader":return"### ";case"body":return!1;case"increaseHashes":return 0===t?"# ":1===t?"## ":2===t&&"### ";case"decreaseHashes":return 0===t?"### ":1!==t&&(2===t?"# ":3===t?"## ":"### ")}return!1}},{key:"getHashCount",value:function(e){return e.startsWith("# ")?1:e.startsWith("## ")?2:e.startsWith("### ")?3:e.startsWith("#### ")?4:e.startsWith("##### ")?5:e.startsWith("###### ")?6:0}},{key:"processWrapCommand",value:function(e,t,n,i){var o="",r=t,a=n,s=e.slice(0,t),l=e.slice(t,n),c=e.slice(n),u=i.length;return s.endsWith(i)&&c.startsWith(i)?(o=s.slice(0,s.length-u)+l+c.slice(u),r=t-u,a=n-u):l.startsWith(i)&&l.endsWith(i)?(o=s+l.slice(0,l.length-u).slice(u)+c,r=t,a=n-2*u):(o=s+i+l+i+c,r=t+u,a=n+u),{newText:o,newStart:r,newEnd:a}}},{key:"processCodeCommand",value:function(e,t,n){return e.slice(t,n).indexOf("\n")>-1?this.processTripleBackTicks(e,t,n):this.processWrapCommand(e,t,n,"`")}},{key:"processTripleBackTicks",value:function(e,t,n){var i=this.findPrecedingNewLine(e,t),o=this.findSuceedingNewLine(e,n),r=e.slice(0,i),a=e.slice(i,o),s=e.slice(o),l=i,c=o,u="";return r.endsWith("```\n")&&s.startsWith("\n```")?(u=r.slice(0,i-4)+a+s.slice(4),l-=4,c-=4):(u=r+"```\n"+a+"\n```"+s,l+=4,c+=4),{newText:u,newStart:l,newEnd:c}}},{key:"processLinkCommand",value:function(e,t,n){var i="",o=t,r=n,a=e.slice(0,t),s=e.slice(t,n),l=e.slice(n);return a.endsWith("[")&&l.startsWith("](url)")?(i=a.slice(0,a.length-1)+s+l.slice(6),o=t-1,r=n-1):"[](url)"===s?(i=a+l,r=o=t):t===n?(i=a+"[](url)"+l,o=t+1,r=t+1):(i=a+"["+s+"](url)"+l,o=t+1,r=n+1),{newText:i,newStart:o,newEnd:r}}},{key:"processMultiLineCommand",value:function(e,t,n,i){return this.isMultiLineMarkdown(e,t,n,i)?this.removeMultiLineMarkdown(e,t,n,i):this.addMultiLineMarkdown(e,t,n,i)}},{key:"isMultiLineMarkdown",value:function(e,t,n,i){var o=this,r=this.findPrecedingNewLine(e,t),a=this.findSuceedingNewLine(e,n);return e.slice(r,a).split("\n").every((function(e){return o.isMultiLineItem(e,i)}))}},{key:"isMultiLineItem",value:function(e,t){switch(t){case"quote":return e.startsWith("> ");case"bulletedList":return e.startsWith("* ");case"numberedList":var n=this.getPrefixNumber(e);return!isNaN(n)&&n>0}return!1}},{key:"getPrefixNumber",value:function(e){var t=e.indexOf(". "),n=e.slice(0,t);return Number(n)}},{key:"removeMultiLineMarkdown",value:function(e,t,n,i){var o=this,r=this.findPrecedingNewLine(e,t),a=this.findSuceedingNewLine(e,n),s=e.slice(0,r),l=e.slice(r,a),c=e.slice(a),u=r,d=a,h=s,p=l.split("\n");return p.forEach((function(e,t){var n=o.removeListPrefix(e,i);d-=e.length-n.length,h+=n,t<p.length-1&&(h+="\n")})),{newText:h+=c,newStart:u,newEnd:d}}},{key:"removeListPrefix",value:function(e,t){switch(t){case"quote":case"bulletedList":return e.slice(2);case"numberedList":var n=e.indexOf(". ");return e.slice(n+2)}return""}},{key:"addMultiLineMarkdown",value:function(e,t,n,i){var o=this,r=this.findPrecedingNewLine(e,t),a=this.findSuceedingNewLine(e,n),s=e.slice(0,r),l=e.slice(r,a),c=e.slice(a),u=r,d=a,h=s;if(""===l){var p=this.getListPrefix(i,1);h=s+p+c,u=r+p.length,d=u}else{var g=l.split("\n");g.forEach((function(t,n){var r=o.getListPrefix(i,n+1,t);d+=r.length-t.length,h+=r,n===g.length-1&&"\n"===e[a]&&"\n"===e[a+1]||(h+="\n")})),h+=c}return{newText:h,newStart:u,newEnd:d}}},{key:"getListPrefix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";switch(e){case"quote":return"> "+n;case"bulletedList":return"* "+n;case"numberedList":return t+". "+n}return null}},{key:"findPrecedingNewLine",value:function(e,t){for(var n=t;n>0&&"\n"!==e[n-1];)n--;return n}},{key:"findSuceedingNewLine",value:function(e,t){for(var n=t;n<e.length&&"\n"!==e[n];)n++;return n}},{key:"processReturnCommand",value:function(e,t,n,i,o){var r=this.findPrecedingNewLine(e,t),a=this.findSuceedingNewLine(e,n),s=e.slice(0,r),l=e.slice(r,a),c=e.slice(a);if(!this.isCursorAtBeginningOfLine(r,i,o)){if(this.isMultiLineItem(l,"quote"))return this.insertMultiLineItem(">",s,l,c,a);if(this.isMultiLineItem(l,"bulletedList"))return this.insertMultiLineItem("*",s,l,c,a);if(this.isMultiLineItem(l,"numberedList")){var u=this.getPrefixNumber(l)+1,d=this.renumberEndText(c,u);return this.insertMultiLineItem(u+".",s,l,d,a)}}return null}},{key:"isCursorAtBeginningOfLine",value:function(e,t,n){return t===n&&t===e}},{key:"insertMultiLineItem",value:function(e,t,n,i,o){var r=t+n+"\n"+e+" "+i,a=o+2+e.length;return{newText:r,newStart:a,newEnd:a}}},{key:"renumberEndText",value:function(e,t){var n=this,i=e.split("\n"),o="",r=!1;return i.forEach((function(e,i){n.isMultiLineItem(e,"numberedList")&&!1===r?o+=n.renumberLine(e,t+i):(o+=e,i>0&&(r=!0))})),o}},{key:"renumberLine",value:function(e,t){var n=e.indexOf(". ");return t+". "+e.slice(n+2)}}])}(),oh=Object.assign({},id),rh="#FFFFFF",ah="#000000",sh=function(){return e((function e(n,i,o,r,a,s,l,c,u,d,h,p,g){t(this,e),this.config=n,this.dispUtils=i,this.nodeUtils=o,this.decUtils=r,this.canvasController=a,this.canvasDiv=s,this.activePipeline=l,this.removeTempCursorOverlay=c,this.displayCommentsCallback=u,this.displayLinksCallback=d,this.getCommentToolbarPosCallback=h,this.addCanvasZoomBehavior=p,this.removeCanvasZoomBehavior=g,this.logger=new pt("SvgCanvasTextArea"),this.editingText=!1,this.editingTextId="",this.addingTextToTextArea=!1,this.textAreaHeight=null}),[{key:"isEditingText",value:function(){return this.editingText}},{key:"getEditingTextId",value:function(){return this.editingTextId}},{key:"displayCommentTextArea",value:function(e,t){if(this.editingTextData={id:e.id,text:e.content,singleLine:!1,maxCharacters:null,allowReturnKey:!0,textCanBeEmpty:!0,xPos:0,yPos:0,width:e.width,height:e.height,autoSize:e.autoSize,contentType:e.contentType,formats:e.formats,newFormats:Ht(e.formats),parentDomObj:t,keyboardInputCallback:e.contentType!==Z&&this.config.enableMarkdownInComments?this.commentKeyboardHandler.bind(this):null,autoSizeCallback:this.autoSizeComment.bind(this),saveTextChangesCallback:this.saveCommentChanges.bind(this),closeTextAreaCallback:this.closeCommentTextArea.bind(this)},this.displayEditableComment(this.editingTextData),this.dispUtils.isDisplayingFullPage()){var n=this.getCommentToolbarPosCallback(e);e.contentType===Z?this.canvasController.openTextToolbar(n.x,n.y,this.editingTextData.newFormats,Z,this.wysiwygActionHandler.bind(this),this.blurInTextToolbar.bind(this)):this.config.enableMarkdownInComments&&this.canvasController.openTextToolbar(n.x,n.y,null,W,this.markdownActionHandler.bind(this),this.blurInTextToolbar.bind(this))}}},{key:"commentKeyboardHandler",value:function(e){var t=this.getMarkdownAction(e);t&&("return"!==t&&it.stopPropagationAndPreventDefault(e),this.markdownActionHandler(t,e))}},{key:"blurInTextToolbar",value:function(e){this.addingTextToTextArea||e.relatedTarget&&(it.getParentElementWithClass(e.relatedTarget,"d3-comment-text-entry")||it.getParentElementWithClass(e.relatedTarget,"text-toolbar")||it.getParentElementWithClass(e.relatedTarget,"cds--overflow-menu-options__btn"))||this.completeEditing(e)}},{key:"getMarkdownAction",value:function(e){return ot.boldCommand(e)?"bold":ot.italicsCommand(e)?"italics":ot.strikethroughCommand(e)?"strikethrough":ot.numberedListCommand(e)?"numberedList":ot.bulletedListCommand(e)?"bulletedList":ot.codeCommand(e)?"code":ot.linkCommand(e)?"link":ot.quoteCommand(e)?"quote":ot.incHashesCommand(e)?"increaseHashes":ot.decHashesCommand(e)?"decreaseHashes":ot.returnCommand(e)?"return":null}},{key:"markdownActionHandler",value:function(e,t){this.logger.log("markdownActionHandler - action = "+e);var n=this.canvasDiv.selectAll(".d3-comment-text-entry").node(),i=it.getSelectionPositions(n),o=n.innerText;if(o){var r=ih.processMarkdownAction(e,o,i.start,i.end);r&&(t.preventDefault(),this.addTextToTextArea(r,n))}}},{key:"wysiwygActionHandler",value:function(e,t,n){this.logger.log("wysiwygActionHandler - action = "+e+" extra = "+n),this.editingTextData.newFormats||(this.editingTextData.newFormats=[]),"align-left"===e||"align-center"===e||"align-right"===e?this.addReplaceFormat("alignHorizontally",e):"align-top"===e||"align-middle"===e||"align-bottom"===e?this.addReplaceFormat("alignVertically",e):"underline"===e||"strikethrough"===e?this.addAdditionalFormat("textDecoration",e):"text-color"===e?this.addReplaceFormat("textColor",n):"background-color"===e?(this.addReplaceFormat("backgroundColor",n),this.setTextColorAppropriately(n)):e.startsWith("text-size")?this.addReplaceFormat("textSize",e):e.startsWith("font")?this.addReplaceFormat("fontType",e):e.startsWith("outline")?this.addReplaceFormat("outlineStyle",e):"bold"!==e&&"italics"!==e||this.toggleFormat(e),this.canvasController.updateTextToolbarFormats(this.editingTextData.newFormats)}},{key:"setTextColorAppropriately",value:function(e){var t=this.hasFormat("textColor");if(!t||t.value===rh||t.value===ah){var n=it.isDarkColor(e);this.addReplaceFormat("textColor",n?rh:ah)}}},{key:"toggleFormat",value:function(e){this.hasFormat(e)?this.removeFormat(e):this.addFormat(e)}},{key:"hasFormat",value:function(e){var t;return null===(t=this.editingTextData.newFormats)||void 0===t?void 0:t.find((function(t){return t.type===e}))}},{key:"addReplaceFormat",value:function(e,t){var n=this.hasFormat(e);n?n.value=t:(n={type:e,value:t},this.editingTextData.newFormats.push(n));var i=it.convertFormat(n),o=i.field,r=i.value;o&&r&&this.setWysiwygStyle(o,r)}},{key:"addAdditionalFormat",value:function(e,t){var n=this.hasFormat(e);if(n)if(n.value.includes(t)){if(n.value=n.value.replace(t,"").trim(),!n.value)return void this.removeFormat(e)}else n.value+=" "+t;else n={type:e,value:t},this.editingTextData.newFormats.push(n);var i=it.convertFormat(n),o=i.field,r=i.value;o&&r&&this.setWysiwygStyle(o,r)}},{key:"addFormat",value:function(e){var t={type:e};this.editingTextData.newFormats.push(t);var n=it.convertFormat(t),i=n.field,o=n.value;i&&o&&this.setWysiwygStyle(i,o)}},{key:"removeFormat",value:function(e){var t;this.editingTextData.newFormats=null===(t=this.editingTextData.newFormats)||void 0===t?void 0:t.filter((function(t){return t.type!==e}));var n=it.convertFormat({type:e}).field;n&&this.setWysiwygStyle(n,null)}},{key:"setWysiwygStyle",value:function(e,t){"background-color"===e&&"transparent"===t&&oh.select(this.editingTextData.parentDomObj).selectAll(".d3-comment-text").style("background-color","transparent");var n=this.foreignObjectComment.selectAll(".d3-comment-text-entry");n.style(e,t),n.node().focus()}},{key:"focusOnTextEntryElement",value:function(e){this.foreignObjectComment.selectAll(".d3-comment-text-entry").node().focus()}},{key:"addTextToTextArea",value:function(e,t){this.addingTextToTextArea=!0;var n=nh(e.newText);t.focus(),it.selectNodeContents(t),document.execCommand("insertText",!1,n),it.selectNodeRange(t,e.newStart,e.newEnd),this.addingTextToTextArea=!1}},{key:"autoSizeComment",value:function(e,t){if(this.logger.log("autoSizeComment - textAreaHt = "+this.textAreaHeight+" scroll ht = "+e.scrollHeight),t.autoSize){var n=this.foreignObjectLabel?12:2,i=e.scrollHeight+n;this.textAreaHeight<i&&(this.textAreaHeight=i,this.foreignObjectLabel?this.foreignObjectLabel.style("height",this.textAreaHeight+"px"):this.foreignObjectComment&&this.foreignObjectComment.style("height",this.textAreaHeight+"px"),this.activePipeline.getComment(t.id).height=this.textAreaHeight,this.displayCommentsCallback(),this.displayLinksCallback())}else this.commentHasScrollableText(t.parentDomObj)?this.removeCanvasZoomBehavior():this.addCanvasZoomBehavior()}},{key:"commentHasScrollableText",value:function(e){var t=e.getElementsByClassName("d3-comment-text-entry-scroll");return t[0].clientHeight<t[0].scrollHeight}},{key:"saveCommentChanges",value:function(e,t,n){var i=this.activePipeline.getComment(e.id),o={editType:"editComment",editSource:"canvas",id:i.id,content:t,width:i.width,height:n,x_pos:i.x_pos,y_pos:i.y_pos,contentType:e.contentType,formats:e.newFormats,pipelineId:this.activePipeline.id};this.canvasController.editActionHandler(o)}},{key:"closeCommentTextArea",value:function(){this.canvasController.closeTextToolbar()}},{key:"displayNodeLabelTextArea",value:function(e,t){this.displayDiv=oh.select(t).selectAll(".d3-foreign-object-node-label div"),this.displayDivStyle=this.displayDiv.attr("style"),this.displayDiv.attr("style","display:none;"),this.editingTextData={id:e.id,text:e.label,singleLine:e.layout.labelSingleLine,maxCharacters:e.layout.labelMaxCharacters,allowReturnKey:e.layout.labelAllowReturnKey,textCanBeEmpty:!1,xPos:this.nodeUtils.getNodeLabelTextAreaPosX(e),yPos:this.nodeUtils.getNodeLabelTextAreaPosY(e),width:this.nodeUtils.getNodeLabelTextAreaWidth(e),height:this.nodeUtils.getNodeLabelTextAreaHeight(e),autoSize:!0,className:this.nodeUtils.getNodeLabelTextAreaClass(e),parentDomObj:t,autoSizeCallback:this.autoSizeMultiLineLabel.bind(this),saveTextChangesCallback:this.saveNodeLabelChanges.bind(this),closeTextAreaCallback:this.closeEntryTextArea.bind(this)},this.displayEditableLabel(this.editingTextData)}},{key:"autoSizeMultiLineLabel",value:function(e,t){if(this.logger.log("autoSizeNodeLabel - textAreaHt = "+this.textAreaHeight+" scroll ht = "+e.scrollHeight),t.maxCharacters&&e.value.length>t.maxCharacters&&(e.value=e.value.substring(0,t.maxCharacters)),this.foreignObjectLabel){this.foreignObjectLabel.style("height",0);var n=e.scrollHeight+12;this.textAreaHeight=n,this.foreignObjectLabel.style("height",this.textAreaHeight+"px")}}},{key:"saveNodeLabelChanges",value:function(e,t){var n={editType:"setNodeLabel",editSource:"canvas",nodeId:e.id,label:t,pipelineId:this.activePipeline.id};this.canvasController.editActionHandler(n)}},{key:"closeEntryTextArea",value:function(){this.displayDiv.attr("style",this.displayDivStyle)}},{key:"displayDecLabelTextArea",value:function(e,t,n,i){this.displayDiv=oh.select(i).selectAll(".d3-foreign-object-dec-label div"),this.displayDivStyle=this.displayDiv.attr("style"),this.displayDiv.attr("style","display:none;"),this.editingTextData={id:e.id,text:e.label,singleLine:e.label_single_line||!1,maxCharacters:e.label_max_characters||null,allowReturnKey:e.label_allow_return_key||!1,textCanBeEmpty:!1,xPos:this.decUtils.getDecLabelTextAreaPosX(),yPos:this.decUtils.getDecLabelTextAreaPosY(),width:this.decUtils.getDecLabelTextAreaWidth(e,t,n),height:this.decUtils.getDecLabelTextAreaHeight(e,t,n),autoSize:!0,className:this.decUtils.getDecLabelTextAreaClass(e),parentDomObj:i,objId:t.id,objType:n,autoSizeCallback:this.autoSizeMultiLineLabel.bind(this),saveTextChangesCallback:this.saveDecLabelChanges.bind(this),closeTextAreaCallback:this.closeEntryTextArea.bind(this)},this.displayEditableLabel(this.editingTextData)}},{key:"saveDecLabelChanges",value:function(e,t){var n={editType:"editDecorationLabel",editSource:"canvas",decId:e.id,objId:e.objId,objType:e.objType,label:t,pipelineId:this.activePipeline.id};this.canvasController.editActionHandler(n)}},{key:"displayEditableLabel",value:function(e){this.textAreaHeight=e.height,this.editingText=!0,this.editingTextId=e.id,this.foreignObjectLabel=oh.select(e.parentDomObj).append("foreignObject").attr("class","d3-foreign-object-text-entry").attr("width",e.width).attr("height",e.height).attr("x",e.xPos).attr("y",e.yPos);var t=this.foreignObjectLabel.append("xhtml:textarea").attr("class",e.className).text(nh(e.text)).call(this.attachTextEntryListeners.bind(this));t.node().focus(),t.node().setSelectionRange(e.text.length,e.text.length)}},{key:"completeEditing",value:function(e){if(this.removeTempCursorOverlay(),this.foreignObjectLabel){var t=this.foreignObjectLabel.selectAll("textarea").node();this.textContentSaved=!0,this.saveAndCloseTextArea(this.editingTextData,t,e)}else if(this.foreignObjectComment){var n=this.foreignObjectComment.selectAll(".d3-comment-text-entry").node();this.textContentSaved=!0,this.saveAndCloseTextArea(this.editingTextData,n,e)}}},{key:"saveAndCloseTextArea",value:function(e,t,n){var i=this.foreignObjectComment?t.innerText:t.value;if(!i&&!e.textCanBeEmpty)return this.closeTextArea(e),void it.stopPropagationAndPreventDefault(n);var o=i;this.closeTextArea(e),e.text===o&&this.textAreaHeight===e.height&&this.areFormatsTheSame(e.formats,e.newFormats)?(oh.select(e.parentDomObj).selectAll(".d3-comment-text").style("display","table-cell"),this.canvasController.restoreFocus()):e.saveTextChangesCallback(e,o,this.textAreaHeight)}},{key:"areFormatsTheSame",value:function(e,t){var n=this;return!e&&!t||!(e&&!t||!e&&t)&&(e.length===t.length&&e.filter((function(e){return n.formatArrayIncludes(e,t)})).length===e.length)}},{key:"formatArrayIncludes",value:function(e,t){return t.find((function(t){return Lt(e,t)&&Lt(e,e)}))}},{key:"closeTextArea",value:function(e){e.closeTextAreaCallback&&e.closeTextAreaCallback(e.id),this.foreignObjectLabel?(this.foreignObjectLabel.remove(),this.foreignObjectLabel=null):this.foreignObjectComment&&(oh.select(this.editingTextData.parentDomObj).selectAll(".d3-foreign-object-comment-text").style("display",null),this.foreignObjectComment.remove(),this.foreignObjectComment=null),this.editingText=!1,this.editingTextId=""}},{key:"textAreaAllowedKeys",value:function(e){return 46===e.keyCode||8===e.keyCode||37===e.keyCode||39===e.keyCode||38===e.keyCode||40===e.keyCode||65===e.keyCode&&ot.isMetaKey(e)}},{key:"displayEditableComment",value:function(e){this.textAreaHeight=e.height,this.editingText=!0,this.editingTextId=e.id,oh.select(e.parentDomObj).selectAll(".d3-foreign-object-comment-text").style("display","none"),this.foreignObjectComment=oh.select(e.parentDomObj).append("foreignObject").attr("class","d3-foreign-object-comment-text-entry").attr("width",e.width).attr("height",e.height).attr("x",e.xPos).attr("y",e.yPos),this.foreignObjectComment.append("xhtml:div").attr("class","d3-comment-text-entry-scroll").on("mousedown",(function(e){it.stopPropagationAndPreventDefault(e)})).each((function(e,t,n){var i=oh.select(n[t]);it.applyOutlineStyle(i,e.formats)})).append("xhtml:div").attr("class","d3-comment-text-entry-outer").append("xhtml:div").attr("class","d3-comment-text-entry").attr("contentEditable",this.getContentEditableValue()).each((function(e,t,n){var i=oh.select(n[t]);it.applyNonOutlineStyle(i,e.formats)})).text(nh(e.text)).call(this.attachTextEntryListeners.bind(this));var t,n=this.canvasDiv.selectAll(".d3-comment-text-entry").node();(n.focus(),n.childNodes.length>0)&&this.setCursor(n.childNodes[0],(null===(t=e.text)||void 0===t?void 0:t.length)||0);n.scrollIntoView({behavior:"instant",block:"end"})}},{key:"getContentEditableValue",value:function(){return!!navigator.userAgent.includes("Firefox")||"plaintext-only"}},{key:"setCursor",value:function(e,t,n){var i=document.createRange(),o=window.getSelection();i.setStart(e,t),n?i.setEnd(e,n):i.collapse(!0),o.removeAllRanges(),o.addRange(i)}},{key:"attachTextEntryListeners",value:function(e){var t=this,n=this.editingTextData;e.on("keydown",(function(e){if(ot.returnCommand(e)){if("save"===n.allowReturnKey||ot.completeTextEntry(e))return t.textContentSaved=!0,void t.saveAndCloseTextArea(n,e.target,e);!n.singleLine&&n.allowReturnKey||it.stopPropagationAndPreventDefault(e)}ot.cancelTextEntry(e)&&(it.stopPropagationAndPreventDefault(e),t.textAreaEscKeyPressed=!0,t.closeTextArea(n),t.canvasController.restoreFocus()),n.maxCharacters&&e.target.value.length>=n.maxCharacters&&!t.textAreaAllowedKeys(e)&&it.stopPropagationAndPreventDefault(e),n.keyboardInputCallback&&n.keyboardInputCallback(e),e.stopPropagation()})).on("keyup",(function(e){n.autoSizeCallback(e.target,n)})).on("paste",(function(e){t.logger.log("Text area - Paste - Scroll Ht = "+e.target.scrollHeight),setTimeout(n.autoSizeCallback,500,e.target,n)})).on("blur",(function(e,i){t.logger.log("Text area - blur"),t.textAreaEscKeyPressed?t.textAreaEscKeyPressed=!1:t.textContentSaved?t.textContentSaved=!1:e.relatedTarget&&it.getParentElementWithClass(e.relatedTarget,"text-toolbar")||t.saveAndCloseTextArea(n,e.target,e)})).on("focus",(function(e,i){t.logger.log("Text area - focus"),n.autoSizeCallback(e.target,n)})).on("mousedown mouseenter mouseleave click dblclick contextmenu",(function(e,t){e.stopPropagation()}))}}])}(),lh={value:()=>{}};function ch(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new uh(i)}function uh(e){this._=e}function dh(e,t){for(var n,i=0,o=e.length;i<o;++i)if((n=e[i]).name===t)return n.value}function hh(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=lh,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}uh.prototype=ch.prototype={constructor:uh,on:function(e,t){var n,i,o=this._,r=(i=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,s=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=r[a]).type)o[n]=hh(o[n],e.name,t);else if(null==t)for(n in o)o[n]=hh(o[n],e.name,null);return this}for(;++a<s;)if((n=(e=r[a]).type)&&(n=dh(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new uh(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,o=new Array(n),r=0;r<n;++r)o[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=0,n=(i=this._[e]).length;r<n;++r)i[r].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}};const ph={passive:!1},gh={capture:!0,passive:!1};function fh(e){e.stopImmediatePropagation()}function vh(e){e.preventDefault(),e.stopImmediatePropagation()}function yh(e){var t=e.document.documentElement,n=$u(e).on("dragstart.drag",vh,gh);"onselectstart"in t?n.on("selectstart.drag",vh,gh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function mh(e,t){var n=e.document.documentElement,i=$u(e).on("dragstart.drag",null);t&&(i.on("click.drag",vh,gh),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var bh=e=>()=>e;function kh(e,{sourceEvent:t,subject:n,target:i,identifier:o,active:r,x:a,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function xh(e){return!e.ctrlKey&&!e.button}function wh(){return this.parentNode}function Ch(e,t){return null==t?{x:e.x,y:e.y}:t}function Lh(){return navigator.maxTouchPoints||"ontouchstart"in this}kh.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Eh=Object.freeze({__proto__:null,drag:function(){var e,t,n,i,o=xh,r=wh,a=Ch,s=Lh,l={},c=ch("start","drag","end"),u=0,d=0;function h(e){e.on("mousedown.drag",p).filter(s).on("touchstart.drag",v).on("touchmove.drag",y,ph).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(a,s){if(!i&&o.call(this,a,s)){var l=b(this,r.call(this,a,s),a,s,"mouse");l&&($u(a.view).on("mousemove.drag",g,gh).on("mouseup.drag",f,gh),yh(a.view),fh(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function g(i){if(vh(i),!n){var o=i.clientX-e,r=i.clientY-t;n=o*o+r*r>d}l.mouse("drag",i)}function f(e){$u(e.view).on("mousemove.drag mouseup.drag",null),mh(e.view,n),vh(e),l.mouse("end",e)}function v(e,t){if(o.call(this,e,t)){var n,i,a=e.changedTouches,s=r.call(this,e,t),l=a.length;for(n=0;n<l;++n)(i=b(this,s,e,t,a[n].identifier,a[n]))&&(fh(e),i("start",e,a[n]))}}function y(e){var t,n,i=e.changedTouches,o=i.length;for(t=0;t<o;++t)(n=l[i[t].identifier])&&(vh(e),n("drag",e,i[t]))}function m(e){var t,n,o=e.changedTouches,r=o.length;for(i&&clearTimeout(i),i=setTimeout((function(){i=null}),500),t=0;t<r;++t)(n=l[o[t].identifier])&&(fh(e),n("end",e,o[t]))}function b(e,t,n,i,o,r){var s,d,p,g=c.copy(),f=nd(r||n,t);if(null!=(p=a.call(e,new kh("beforestart",{sourceEvent:n,target:h,identifier:o,active:u,x:f[0],y:f[1],dx:0,dy:0,dispatch:g}),i)))return s=p.x-f[0]||0,d=p.y-f[1]||0,function n(r,a,c){var v,y=f;switch(r){case"start":l[o]=n,v=u++;break;case"end":delete l[o],--u;case"drag":f=nd(c||a,t),v=u}g.call(r,e,new kh(r,{sourceEvent:a,subject:p,target:h,identifier:o,active:v,x:f[0]+s,y:f[1]+d,dx:f[0]-y[0],dy:f[1]-y[1],dispatch:g}),i)}}return h.filter=function(e){return arguments.length?(o="function"==typeof e?e:bh(!!e),h):o},h.container=function(e){return arguments.length?(r="function"==typeof e?e:bh(e),h):r},h.subject=function(e){return arguments.length?(a="function"==typeof e?e:bh(e),h):a},h.touchable=function(e){return arguments.length?(s="function"==typeof e?e:bh(!!e),h):s},h.on=function(){var e=c.on.apply(c,arguments);return e===c?h:e},h.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,h):Math.sqrt(d)},h},dragDisable:yh,dragEnable:mh}),Ph=Object.assign({},Eh,id),Nh=function(){return e((function e(n){t(this,e),this.ren=n,this.logger=new pt("SVGCanvasUtilsDragObjects"),this.resizeObjInitialInfo=null,this.commentSizing=!1,this.commentSizingDirection=null,this.commentSizingCursor="",this.nodeSizing=!1,this.nodeSizingDirection=null,this.nodeSizingCursor="",this.nodeSizingObjectsInfo={},this.nodeSizingDetLinksInfo={},this.notSnappedXPos=0,this.notSnappedYPos=0,this.notSnappedWidth=0,this.notSnappedHeight=0,this.draggingObjectData=null,this.existingNodeInsertableIntoLink=!1,this.existingNodeAttachableToDetachedLinks=!1,this.dragObjectHandler=Ph.drag().on("start",this.dragStartObject.bind(this)).on("drag",this.dragObject.bind(this)).on("end",this.dragEndObject.bind(this))}),[{key:"getDragObjectHandler",value:function(){return this.dragObjectHandler}},{key:"isSizing",value:function(){return this.nodeSizing||this.commentSizing}},{key:"isMoving",value:function(){return this.draggingObjectData}},{key:"mouseEnterNodeSizingArea",value:function(e,t){if(it.isNodeResizable(t,this.ren.config)&&!this.ren.isRegionSelectOrSizingInProgress()){var n="default";this.isPointerCloseToBodyEdge(e,t)||(this.nodeSizingDirection=this.getSizingDirection(e,t,t.layout.nodeCornerResizeArea),this.nodeSizingCursor=this.getCursorBasedOnDirection(this.nodeSizingDirection),n=this.nodeSizingCursor),Ph.select(e.currentTarget).style("cursor",n)}}},{key:"mouseDownNodeSizingArea",value:function(e){it.isNodeResizable(e,this.ren.config)&&(this.nodeSizing=!0,this.ren.addTempCursorOverlay(this.nodeSizingCursor))}},{key:"mouseLeaveNodeSizingArea",value:function(e){Ph.select(e.currentTarget).style("cursor","default")}},{key:"mouseEnterCommentSizingArea",value:function(e,t){if(this.ren.config.enableEditingActions&&!this.ren.isRegionSelectOrSizingInProgress()){var n="default";this.isPointerCloseToBodyEdge(e,t)||(this.commentSizingDirection=this.getSizingDirection(e,t,this.ren.canvasLayout.commentCornerResizeArea),this.commentSizingCursor=this.getCursorBasedOnDirection(this.commentSizingDirection),n=this.commentSizingCursor),Ph.select(e.currentTarget).style("cursor",n)}}},{key:"mouseDownCommentSizingArea",value:function(){this.commentSizing=!0,this.ren.addTempCursorOverlay(this.commentSizingCursor)}},{key:"mouseLeaveCommentSizingArea",value:function(e){Ph.select(e.currentTarget).style("cursor","default")}},{key:"moveObject",value:function(e,t){var n,i,o=this,r=this.getMoveIncrements(t);n=r.xInc,i=r.yInc,this.endMove&&(clearTimeout(this.endMove),this.endMove=null),this.isMoving()||this.startObjectsMoving(e);var a=e.x_pos+e.width/2,s=e.y_pos+e.height/2,l=this.ren.convertCanvasCoordsToPageCoords(a,s);this.moveObjects(n,i,l.x,l.y),this.endMove=setTimeout((function(){o.endObjectsMoving(e,"click",!1,!1)}),500)}},{key:"sizeObject",value:function(e,t){var n,i,o=this,r=t,a=this.getMoveIncrements(r);(n=a.xInc,i=a.yInc,r===ae?r=re:r===oe&&(r=ie),this.endSize&&(clearTimeout(this.endSize),this.endSize=null),this.isSizing())||("node"===it.getObjectTypeName(e)?this.nodeSizing=!0:this.commentSizing=!0,this.initializeResizeVariables(e));this.nodeSizing?this.resizeNode(n,i,e,r):this.commentSizing&&this.resizeComment(n,i,e,r),this.endSize=setTimeout((function(){o.nodeSizing?(o.endNodeSizing(e),o.nodeSizing=!1):o.commentSizing&&(o.endCommentSizing(e),o.commentSizing=!1)}),500)}},{key:"dragStartObject",value:function(e,t){this.logger.logStartTimer("dragStartObject"),this.ren.closeContextMenuIfOpen(),this.commentSizing||this.nodeSizing?this.initializeResizeVariables(t):this.startObjectsMoving(t),this.logger.logEndTimer("dragStartObject",!0)}},{key:"dragObject",value:function(e,t){this.logger.logStartTimer("dragObject"),this.commentSizing?this.resizeComment(e.dx,e.dy,t,this.commentSizingDirection):this.nodeSizing?this.resizeNode(e.dx,e.dy,t,this.nodeSizingDirection):this.moveObjects(e.dx,e.dy,e.sourceEvent.clientX,e.sourceEvent.clientY),this.logger.logEndTimer("dragObject",!0)}},{key:"dragEndObject",value:function(e,t){this.logger.logStartTimer("dragEndObject"),this.ren.removeTempCursorOverlay(),this.commentSizing?(this.endCommentSizing(t),this.commentSizing=!1):this.nodeSizing?(this.endNodeSizing(t),this.nodeSizing=!1):this.endObjectsMoving(t,e.type,e.sourceEvent.shiftKey,ot.isMetaKey(e.sourceEvent)),this.logger.logEndTimer("dragEndObject",!0)}},{key:"initializeResizeVariables",value:function(e){this.resizeObjInitialInfo={x_pos:e.x_pos,y_pos:e.y_pos,width:e.width,height:e.height},this.notSnappedXPos=e.x_pos,this.notSnappedYPos=e.y_pos,this.notSnappedWidth=e.width,this.notSnappedHeight=e.height}},{key:"isPointerCloseToBodyEdge",value:function(e,t){var n=this.ren.getTransformedMousePos(e),i=t.x_pos+t.width,o=t.y_pos+t.height,r=n.x>=i&&n.x<=i+1&&n.y>=0&&n.y<=o,a=n.y>=o&&n.y<=o+1&&n.x>=0&&n.x<=i;return r||a}},{key:"getSizingDirection",value:function(e,t,n){var i="",o="",r=this.ren.getTransformedMousePos(e);return r.x<t.x_pos+n?i="w":r.x>t.x_pos+t.width-n&&(i="e"),r.y<t.y_pos+n?o="n":r.y>t.y_pos+t.height-n&&(o="s"),o+i}},{key:"getCursorBasedOnDirection",value:function(e){var t;switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize";break;case"nw":case"se":t="nwse-resize";break;case"ne":case"sw":t="nesw-resize";break;default:t=""}return t}},{key:"resizeNode",value:function(e,t,n,i){var o=Object.assign({},n),r=this.getMinHeight(n),a=this.getMinWidth(n),s=this.resizeObject(e,t,n,i,a,r);if(s&&(0!==s.x_pos||0!==s.y_pos||0!==s.width||0!==s.height)){if(it.isExpandedSupernode(n)&&this.ren.config.enableMoveNodesOnSupernodeResize){var l=it.moveSurroundingObjects(o,this.ren.activePipeline.getNodesAndComments(),i,n.width,n.height,!0),c=it.moveSurroundingDetachedLinks(o,this.ren.activePipeline.links,i,n.width,n.height,!0);this.nodeSizingObjectsInfo=Object.assign(this.nodeSizingObjectsInfo,l),this.nodeSizingDetLinksInfo=Object.assign(this.nodeSizingDetLinksInfo,c)}this.logger.logStartTimer("displayObjects"),this.ren.displayMovedComments(),this.ren.displayMovedNodes(),this.ren.displaySingleNode(n),this.ren.displayMovedLinks(),this.ren.displayCanvasAccoutrements(),it.isExpandedSupernode(n)&&(this.ren.dispUtils.isDisplayingSubFlow()&&this.ren.displayBindingNodesToFitSVG(),this.ren.superRenderers.forEach((function(e){return e.displaySVGToFitSupernode()}))),this.logger.logEndTimer("displayObjects")}}},{key:"resizeComment",value:function(e,t,n,i){this.resizeObject(e,t,n,i,20,20),this.ren.displaySingleComment(n),this.ren.displayMovedLinks(),this.ren.displayCanvasAccoutrements()}},{key:"resizeObject",value:function(e,t,n,i,o,r){var a=0,s=0,l=0,c=0;i.indexOf("e")>-1&&(l+=e),i.indexOf("s")>-1&&(c+=t),i.indexOf("n")>-1&&(s+=t,c-=t),i.indexOf("w")>-1&&(a+=e,l-=e);var u=0,d=0,h=0,p=0;if(this.ren.config.enableSnapToGridType===ve?(this.notSnappedXPos+=a,this.notSnappedYPos+=s,this.notSnappedWidth+=l,this.notSnappedHeight+=c,u=it.snapToGrid(this.notSnappedXPos,this.ren.canvasLayout.snapToGridXPx),d=it.snapToGrid(this.notSnappedYPos,this.ren.canvasLayout.snapToGridYPx),h=it.snapToGrid(this.notSnappedWidth,this.ren.canvasLayout.snapToGridXPx),p=it.snapToGrid(this.notSnappedHeight,this.ren.canvasLayout.snapToGridYPx),h=Math.max(h,o),p=Math.max(p,r)):(u=n.x_pos+a,d=n.y_pos+s,h=n.width+l,p=n.height+c),h<o||p<r)return null;var g={width:h-n.width,height:p-n.height,x_pos:u-n.x_pos,y_pos:d-n.y_pos};return n.x_pos=u,n.y_pos=d,n.width=h,n.height=p,g}},{key:"endNodeSizing",value:function(e){var t=e;this.ren.config.enableSnapToGridType===ye&&(t=this.snapToGridObject(t),t=this.restrictNodeSizingToMinimums(t)),this.resizeObjInitialInfo.x_pos===t.x_pos&&this.resizeObjInitialInfo.y_pos===t.y_pos&&this.resizeObjInitialInfo.width===t.width&&this.resizeObjInitialInfo.height===t.height||(this.nodeSizingObjectsInfo[t.id]={width:t.width,height:t.height,x_pos:t.x_pos,y_pos:t.y_pos},(t.height>t.layout.defaultNodeHeight+2||t.width>t.layout.defaultNodeWidth+2)&&(this.nodeSizingObjectsInfo[t.id].isResized=!0,this.nodeSizingObjectsInfo[t.id].resizeWidth=t.width,this.nodeSizingObjectsInfo[t.id].resizeHeight=t.height),this.ren.canvasController.editActionHandler({editType:"resizeObjects",editSource:"canvas",objectsInfo:this.nodeSizingObjectsInfo,detachedLinksInfo:this.nodeSizingDetLinksInfo,pipelineId:this.ren.activePipeline.id}),this.nodeSizingObjectsInfo={})}},{key:"endCommentSizing",value:function(e){var t=e;if(this.ren.config.enableSnapToGridType===ye&&(t=this.snapToGridObject(t)),this.resizeObjInitialInfo.x_pos!==t.x_pos||this.resizeObjInitialInfo.y_pos!==t.y_pos||this.resizeObjInitialInfo.width!==t.width||this.resizeObjInitialInfo.height!==t.height){var n=[];n[t.id]={width:t.width,height:t.height,x_pos:t.x_pos,y_pos:t.y_pos};var i={editType:"resizeObjects",editSource:"canvas",objectsInfo:n,detachedLinksInfo:{},pipelineId:this.ren.activePipeline.id};this.ren.canvasController.editActionHandler(i)}}},{key:"restrictNodeSizingToMinimums",value:function(e){var t=this.getMinHeight(e),n=this.getMinWidth(e);return e.width=Math.max(e.width,n),e.height=Math.max(e.height,t),e}},{key:"getMinHeight",value:function(e){if(it.isExpandedSupernode(e)){var t=Math.max(e.inputPortsHeight,e.outputPortsHeight)+this.ren.canvasLayout.supernodeTopAreaHeight+this.ren.canvasLayout.supernodeSVGAreaPadding;return Math.max(this.ren.canvasLayout.supernodeMinHeight,t)}return e.layout.defaultNodeHeight}},{key:"getMinWidth",value:function(e){return it.isExpandedSupernode(e)?this.ren.canvasLayout.supernodeMinWidth:e.layout.defaultNodeWidth}},{key:"startObjectsMoving",value:function(e){var t,n=this;this.existingNodeInsertableIntoLink=!1,this.existingNodeAttachableToDetachedLinks=!1,this.draggingObjectData={dragOffsetX:0,dragOffsetY:0,dragRunningX:0,dragRunningY:0,dragObjects:this.getDragObjects(e)},(null===(t=this.draggingObjectData.dragObjects)||void 0===t?void 0:t.length)>0&&(this.draggingObjectData.dragStartX=this.draggingObjectData.dragObjects[0].x_pos,this.draggingObjectData.dragStartY=this.draggingObjectData.dragObjects[0].y_pos,this.switchIsMovingClass(this.draggingObjectData.dragObjects,!0)),this.isExistingNodeInsertableIntoLink()&&(this.startNodeInsertingInLink=setTimeout((function(){n.existingNodeInsertableIntoLink=!0,n.setNodeTranslucentState(n.draggingObjectData.dragObjects[0].id,!0),n.ren.setDataLinkSelectionAreaWider(!0)}),200)),this.isExistingNodeAttachableToDetachedLinks()&&(this.startNodeAttachingToDetachedLinks=setTimeout((function(){n.existingNodeAttachableToDetachedLinks=!0,n.setNodeTranslucentState(n.draggingObjectData.dragObjects[0].id,!0)}),200))}},{key:"moveObjects",value:function(e,t,n,i){if(this.draggingObjectData.dragOffsetX+=e,this.draggingObjectData.dragOffsetY+=t,this.ren.dispUtils.isDisplayingSubFlowInPlace()&&(this.draggingObjectData.dragOffsetX>1e3||this.draggingObjectData.dragOffsetX<-1e3||this.draggingObjectData.dragOffsetY>1e3||this.draggingObjectData.dragOffsetY<-1e3))this.draggingObjectData.dragOffsetX-=e,this.draggingObjectData.dragOffsetY-=t;else{var o={x:0,y:0};if(this.ren.config.enableSnapToGridType===ve){var r=this.snapToGridDraggedNode(this.draggingObjectData);o={x:r.x-this.draggingObjectData.dragObjects[0].x_pos,y:r.y-this.draggingObjectData.dragObjects[0].y_pos}}else o={x:e,y:t};this.draggingObjectData.dragRunningX+=o.x,this.draggingObjectData.dragRunningY+=o.y,this.draggingObjectData.dragObjects.forEach((function(e){e.x_pos+=o.x,e.y_pos+=o.y})),this.ren.config.enableLinkSelection===me&&this.ren.activePipeline.getSelectedLinks().forEach((function(e){e.srcPos&&(e.srcPos.x_pos+=o.x,e.srcPos.y_pos+=o.y),e.trgPos&&(e.trgPos.x_pos+=o.x,e.trgPos.y_pos+=o.y)}))}if(!this.ren.config.enableDragWithoutSelect||!it.isTinyMovement({x:0,y:0},{x:this.draggingObjectData.dragOffsetX,y:this.draggingObjectData.dragOffsetY})){if(this.ren.displayMovedComments(),this.ren.displayMovedNodes(),this.ren.displayMovedLinks(),this.ren.displayCanvasAccoutrements(),this.ren.dispUtils.isDisplayingSubFlowInPlace()&&this.ren.displaySVGToFitSupernode(),this.existingNodeInsertableIntoLink){var a=this.ren.getLinkAtMousePos(n,i);(!a||this.ren.isLinkFullyAttached(a)&&this.draggingObjectData.dragObjects[0].id!==a.srcNodeId&&this.draggingObjectData.dragObjects[0].id!==a.trgNodeId)&&this.ren.setInsertNodeIntoLinkHighlighting(a)}if(this.existingNodeAttachableToDetachedLinks){var s=this.draggingObjectData.dragObjects[0],l={x1:s.x_pos,y1:s.y_pos,x2:s.x_pos+s.width,y2:s.y_pos+s.height},c=this.ren.getAttachableLinksForNodeAtPos(s,l);this.ren.setDetachedLinkHighlighting(c)}}}},{key:"endObjectsMoving",value:function(e,t,n,i){var o=this.draggingObjectData;if(this.draggingObjectData=null,clearTimeout(this.startNodeInsertingInLink),clearTimeout(this.startNodeAttachingToDetachedLinks),this.switchIsMovingClass(o.dragObjects,!1),this.ren.config.enableDragWithoutSelect&&it.isTinyMovement({x:0,y:0},{x:o.dragOffsetX,y:o.dragOffsetY})){var r=this.ren.activePipeline.getObjectTypeName(e);this.ren.selectObject(t,e,r,n,i)}else if(0!==o.dragRunningX||0!==o.dragRunningY){var a=null;if(this.ren.config.enableSnapToGridType===ye){var s=this.snapToGridDraggedNode(o);a={x:s.x-o.dragStartX,y:s.y-o.dragStartY}}else a={x:o.dragRunningX,y:o.dragRunningY};this.existingNodeInsertableIntoLink&&this.ren.dragOverLink?this.ren.canvasController.editActionHandler({editType:"insertNodeIntoLink",editSource:"canvas",node:o.dragObjects[0],link:this.ren.dragOverLink,offsetX:a.x,offsetY:a.y,pipelineId:this.ren.activePipeline.id}):this.existingNodeAttachableToDetachedLinks&&this.ren.dragOverDetachedLinks.length>0?this.ren.canvasController.editActionHandler({editType:"attachNodeToLinks",editSource:"canvas",node:o.dragObjects[0],detachedLinks:this.ren.dragOverDetachedLinks,offsetX:a.x,offsetY:a.y,pipelineId:this.ren.activePipeline.id}):this.ren.canvasController.editActionHandler({editType:"moveObjects",editSource:"canvas",nodes:o.dragObjects.map((function(e){return e.id})),links:this.ren.activePipeline.getSelectedDetachedLinks(),offsetX:a.x,offsetY:a.y,pipelineId:this.ren.activePipeline.id})}this.ren.setDataLinkSelectionAreaWider(!1),this.unsetNodeTranslucentState(o.dragObjects),this.ren.unsetInsertNodeIntoLinkHighlighting(),this.ren.unsetDetachedLinkHighlighting()}},{key:"getDragObjects",value:function(e){var t=this.ren.activePipeline.getSelectedNodesAndComments();return this.ren.config.enableDragWithoutSelect&&-1===t.findIndex((function(t){return t.id===e.id}))?[e]:t}},{key:"switchIsMovingClass",value:function(e,t){var n=this;e.forEach((function(e){it.isNode(e)?n.ren.getNodeGroupSelectionById(e.id).classed("d3-is-moving",t):n.ren.getCommentGroupSelectionById(e.id).classed("d3-is-monving",t)}))}},{key:"isExistingNodeInsertableIntoLink",value:function(){return this.ren.config.enableInsertNodeDroppedOnLink&&1===this.draggingObjectData.dragObjects.length&&it.isNode(this.draggingObjectData.dragObjects[0])&&it.hasInputAndOutputPorts(this.draggingObjectData.dragObjects[0])&&!it.isNodeDefaultPortsCardinalityAtMax(this.draggingObjectData.dragObjects[0],this.ren.activePipeline.links)}},{key:"isExistingNodeAttachableToDetachedLinks",value:function(){return this.ren.config.enableLinkSelection===me&&1===this.draggingObjectData.dragObjects.length&&it.isNode(this.draggingObjectData.dragObjects[0])}},{key:"setNodeTranslucentState",value:function(e,t){this.ren.getNodeGroupSelectionById(e).classed("d3-node-group-translucent",t)}},{key:"unsetNodeTranslucentState",value:function(e){(null==e?void 0:e.length)>0&&this.setNodeTranslucentState(e[0].id,!1)}},{key:"snapToGridDraggedNode",value:function(e){var t=e.dragStartX+e.dragOffsetX,n=e.dragStartY+e.dragOffsetY;return this.ren.snapToGridPosition({x:t,y:n})}},{key:"snapToGridObject",value:function(e){var t=e;return t.x_pos=it.snapToGrid(t.x_pos,this.ren.canvasLayout.snapToGridXPx),t.y_pos=it.snapToGrid(t.y_pos,this.ren.canvasLayout.snapToGridYPx),t.width=it.snapToGrid(t.width,this.ren.canvasLayout.snapToGridXPx),t.height=it.snapToGrid(t.height,this.ren.canvasLayout.snapToGridYPx),t}},{key:"getMoveIncrements",value:function(e){var t=10,n=10;this.ren.config.enableSnapToGridType!==ve&&this.ren.config.enableSnapToGridType!==ye||(t=this.ren.canvasLayout.snapToGridXPx,n=this.ren.canvasLayout.snapToGridYPx);var i=0,o=0;switch(e){case ae:i=0,o=-n;break;case re:i=0,o=n;break;case ie:i=t,o=0;break;default:i=-t,o=0}return{xInc:i,yInc:o}}}])}();function Th(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function Dh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Sh=function e(t){function n(e){return Math.pow(e,t)}return t=+t,n.exponent=e,n}(3),Oh=function e(t){function n(e){return 1-Math.pow(1-e,t)}return t=+t,n.exponent=e,n}(3),Ah=function e(t){function n(e){return((e*=2)<=1?Math.pow(e,t):2-Math.pow(2-e,t))/2}return t=+t,n.exponent=e,n}(3),zh=Math.PI,Ih=zh/2;function Mh(e){return(1-Math.cos(zh*e))/2}function Hh(e){return 1.0009775171065494*(Math.pow(2,-10*e)-.0009765625)}function _h(e){return((e*=2)<=1?Hh(1-e):2-Hh(e-1))/2}function Vh(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var jh=4/11,Fh=6/11,Rh=8/11,Bh=9/11,Uh=10/11,Gh=21/22,Zh=7.5625;function Wh(e){return(e=+e)<jh?Zh*e*e:e<Rh?Zh*(e-=Fh)*e+.75:e<Uh?Zh*(e-=Bh)*e+.9375:Zh*(e-=Gh)*e+.984375}var Xh=1.70158,Yh=function e(t){function n(e){return(e=+e)*e*(t*(e-1)+e)}return t=+t,n.overshoot=e,n}(Xh),Kh=function e(t){function n(e){return--e*e*((e+1)*t+e)+1}return t=+t,n.overshoot=e,n}(Xh),qh=function e(t){function n(e){return((e*=2)<1?e*e*((t+1)*e-t):(e-=2)*e*((t+1)*e+t)+2)/2}return t=+t,n.overshoot=e,n}(Xh),$h=2*Math.PI,Jh=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=$h);function o(e){return t*Hh(- --e)*Math.sin((i-e)/n)}return o.amplitude=function(t){return e(t,n*$h)},o.period=function(n){return e(t,n)},o}(1,.3),Qh=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=$h);function o(e){return 1-t*Hh(e=+e)*Math.sin((e+i)/n)}return o.amplitude=function(t){return e(t,n*$h)},o.period=function(n){return e(t,n)},o}(1,.3),ep=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=$h);function o(e){return((e=2*e-1)<0?t*Hh(-e)*Math.sin((i-e)/n):2-t*Hh(e)*Math.sin((i+e)/n))/2}return o.amplitude=function(t){return e(t,n*$h)},o.period=function(n){return e(t,n)},o}(1,.3),tp=Object.freeze({__proto__:null,easeLinear:e=>+e,easeQuad:Th,easeQuadIn:function(e){return e*e},easeQuadOut:function(e){return e*(2-e)},easeQuadInOut:Th,easeCubic:Dh,easeCubicIn:function(e){return e*e*e},easeCubicOut:function(e){return--e*e*e+1},easeCubicInOut:Dh,easePoly:Ah,easePolyIn:Sh,easePolyOut:Oh,easePolyInOut:Ah,easeSin:Mh,easeSinIn:function(e){return 1==+e?1:1-Math.cos(e*Ih)},easeSinOut:function(e){return Math.sin(e*Ih)},easeSinInOut:Mh,easeExp:_h,easeExpIn:function(e){return Hh(1-+e)},easeExpOut:function(e){return 1-Hh(e)},easeExpInOut:_h,easeCircle:Vh,easeCircleIn:function(e){return 1-Math.sqrt(1-e*e)},easeCircleOut:function(e){return Math.sqrt(1- --e*e)},easeCircleInOut:Vh,easeBounce:Wh,easeBounceIn:function(e){return 1-Wh(1-e)},easeBounceOut:Wh,easeBounceInOut:function(e){return((e*=2)<=1?1-Wh(1-e):Wh(e-1)+1)/2},easeBack:qh,easeBackIn:Yh,easeBackOut:Kh,easeBackInOut:qh,easeElastic:Qh,easeElasticIn:Jh,easeElasticOut:Qh,easeElasticInOut:ep}),np=Object.assign({},Eh,tp,id),ip=function(){return e((function e(n){t(this,e),this.ren=n,this.logger=new pt("SVGCanvasUtilsDragNewLink"),this.drawingNewLinkData=null,this.dragNewLinkHandler=np.drag().on("start",this.dragStartNewLink.bind(this)).on("drag",this.dragMoveNewLink.bind(this)).on("end",this.dragEndNewLink.bind(this))}),[{key:"getDragNewLinkHandler",value:function(){return this.dragNewLinkHandler}},{key:"isDragging",value:function(){return this.drawingNewLinkData}},{key:"dragStartNewLink",value:function(e,t){if(this.isEventForOutputPort(e)){var n=this.getNodeForPort(e);this.startOutputPortNewLink(e,t,n)}else if(this.isEventForInputPort(e)){var i=this.getNodeForPort(e);this.startInputPortNewLink(e,t,i)}else"comment"===this.ren.activePipeline.getObjectTypeName(t)&&this.startCommentNewLink(e,t)}},{key:"dragMoveNewLink",value:function(e){this.drawNewLink(e)}},{key:"dragEndNewLink",value:function(e){this.completeNewLink(e)}},{key:"isEventForInputPort",value:function(e){return this.targetContainsClass(e,"d3-node-port-input")||this.targetContainsClass(e,"d3-node-port-input-assoc")}},{key:"isEventForOutputPort",value:function(e){return this.targetContainsClass(e,"d3-node-port-output")||this.targetContainsClass(e,"d3-node-port-output-assoc")}},{key:"targetContainsClass",value:function(e,t){var n;return null===(n=e.sourceEvent)||void 0===n||null===(n=n.currentTarget)||void 0===n||null===(n=n.classList)||void 0===n?void 0:n.contains(t)}},{key:"getNodeForPort",value:function(e){var t;return np.select(null===(t=e.sourceEvent)||void 0===t||null===(t=t.currentTarget)||void 0===t?void 0:t.parentNode).datum()}},{key:"startCommentNewLink",value:function(e,t){var n=this.ren.activePipeline.getComment(t.id);this.drawingNewLinkData={srcObj:n,action:ue,startPos:{x:t.x_pos-this.ren.canvasLayout.commentHighlightGap,y:t.y_pos-this.ren.canvasLayout.commentHighlightGap},mousePos:{x:e.x,y:e.y},linkArray:[]}}},{key:"startInputPortNewLink",value:function(e,t,n){if(this.ren.config.enableAssocLinkCreation){var i=this.ren.activePipeline.getNode(n.id),o=it.getPortIndex(n.inputs,t.id);this.drawingNewLinkData={srcObj:i,srcPort:t,action:this.ren.config.enableAssocLinkCreation?ee:J,mousePos:{x:e.x,y:e.y},startPos:{x:i.x_pos+t.cx,y:i.y_pos+t.cy},portFlow:be,portDisplayInfo:this.ren.getPortDisplayInfo(i.layout.inputPortDisplayObjects,o),portGuideInfo:this.ren.getPortDisplayInfo(i.layout.inputPortGuideObjects,o),portRadius:this.ren.getPortRadius(i),minInitialLine:i.layout.minInitialLine,linkArray:[]}}}},{key:"startOutputPortNewLink",value:function(e,t,n){var i=this.ren.activePipeline.getNode(n.id);if(!it.isSrcCardinalityAtMax(t.id,i,this.ren.activePipeline.links)){var o=it.getPortIndex(n.outputs,t.id);this.drawingNewLinkData={srcObj:i,srcPort:t,action:this.ren.config.enableAssocLinkCreation?ee:J,mousePos:{x:e.x,y:e.y},startPos:{x:i.x_pos+t.cx,y:i.y_pos+t.cy},portFlow:ke,portDisplayInfo:this.ren.getPortDisplayInfo(i.layout.outputPortDisplayObjects,o),portGuideInfo:this.ren.getPortDisplayInfo(i.layout.outputPortGuideObjects,o),portRadius:this.ren.getPortRadius(i),minInitialLine:i.layout.minInitialLine,linkArray:[]},this.ren.config.enableHighlightUnavailableNodes&&this.ren.setUnavailableTargetNodesHighlighting(i,t.id,this.ren.activePipeline.links)}}},{key:"drawNewLink",value:function(e){if(!1!==this.ren.config.enableEditingActions&&this.drawingNewLinkData){this.ren.closeContextMenuIfOpen();var t=this.ren.getTransformedMousePos(e);this.drawingNewLinkData.action===ue?this.drawNewCommentLink(t):this.drawNewNodeLink(t),this.ren.config.enableHighlightNodeOnNewLinkDrag&&this.setNewLinkOverNode(e)}}},{key:"drawNewCommentLink",value:function(e){var t=this,n=this.ren.activePipeline.getComment(this.drawingNewLinkData.srcObj.id),i=this.ren.linkUtils.getNewStraightCommentLinkStartPos(n,e),o=ue;this.drawingNewLinkData.linkArray=[{x1:i.x,y1:i.y,x2:e.x,y2:e.y,type:o}];var r=this.ren.nodesLinksGrp.selectAll(".d3-new-connection-line"),a=this.ren.nodesLinksGrp.selectAll(".d3-new-connection-guide");if(r.data(this.drawingNewLinkData.linkArray).enter().append("path").attr("class","d3-new-connection-line").attr("linkType",o).merge(r).attr("d",(function(e){return t.ren.linkUtils.getConnectorPathInfo(e).path})),a.data(this.drawingNewLinkData.linkArray).enter().append("circle").attr("class","d3-new-connection-guide").attr("linkType",o).merge(a).attr("cx",(function(e){return e.x2})).attr("cy",(function(e){return e.y2})).attr("r",this.ren.canvasLayout.commentPortRadius),this.ren.canvasLayout.commentLinkArrowHead){var s=this.ren.nodesLinksGrp.selectAll(".d3-new-connection-arrow");s.data(this.drawingNewLinkData.linkArray).enter().append("path").attr("class","d3-new-connection-arrow").attr("linkType",o).merge(s).attr("d",(function(e){return t.ren.getArrowHead(e)})).attr("transform",(function(e){return t.ren.getArrowHeadTransform(e)}))}}},{key:"drawNewNodeLink",value:function(e){var t=this,n=this.ren.config.enableAssocLinkCreation?ee:J,i={type:n,srcObj:this.drawingNewLinkData.srcObj,srcNodeId:this.drawingNewLinkData.srcObj.id,srcNodePortId:this.drawingNewLinkData.srcPort.id,trgPos:{x_pos:e.x,y_pos:e.y}},o=this.ren.getDetachedLinkObj(i);this.drawingNewLinkData.linkArray=this.ren.linkUtils.addConnectionPaths([o]),this.ren.config.enableAssocLinkCreation&&(this.drawingNewLinkData.linkArray[0].assocLinkVariation=this.ren.getNewLinkAssocVariation(this.drawingNewLinkData.linkArray[0].x1,this.drawingNewLinkData.linkArray[0].x2,this.drawingNewLinkData.portFlow));var r=this.ren.linkUtils.getConnectorPathInfo(this.drawingNewLinkData.linkArray[0],this.drawingNewLinkData.minInitialLine),a=this.ren.nodesLinksGrp.selectAll(".d3-new-connection-line"),s=this.ren.nodesLinksGrp.selectAll(".d3-new-connection-start"),l=this.ren.nodesLinksGrp.selectAll(".d3-new-connection-guide");n===J&&this.ren.canvasLayout.linkType===ne&&this.ren.nodeUtils.isPointInNodeBoundary(e,this.drawingNewLinkData.srcObj)?this.removeNewLinkLine():a.data(this.drawingNewLinkData.linkArray).enter().append("path").attr("class","d3-new-connection-line").attr("linkType",n).merge(a).attr("d",r.path).attr("transform",r.transform),this.ren.canvasLayout.linkMethod===xe&&this.drawingNewLinkData.portDisplayInfo.tag===we&&s.data(this.drawingNewLinkData.linkArray).enter().append("circle").attr("class","d3-new-connection-start").attr("linkType",n).merge(s).each((function(e,n,i){np.select(i[n]).attr("cx",e.x1).attr("cy",e.y1).attr("r",t.drawingNewLinkData.portRadius)})),l.data(this.drawingNewLinkData.linkArray).enter().append(this.drawingNewLinkData.portGuideInfo.tag).attr("class","d3-new-connection-guide").attr("linkType",n).merge(l).each((function(e,n,i){var o=np.select(i[n]),r=t.ren.getLinkImageTransform(e);t.ren.updatePort(o,t.drawingNewLinkData.portGuideInfo,t.drawingNewLinkData.srcObj,e.x2,e.y2,r)}))}},{key:"removeNewLinkLine",value:function(){this.ren.nodesLinksGrp.selectAll(".d3-new-connection-line").remove()}},{key:"completeNewLink",value:function(e){if(!1!==this.ren.config.enableEditingActions&&this.drawingNewLinkData){var t=this.drawingNewLinkData;if(this.drawingNewLinkData=null,it.isTinyMovement(t.mousePos,{x:e.x,y:e.y}))return this.removeNewLink(),void this.ren.canvasController.clickActionHandler({clickType:Ce,objectType:"port",id:t.srcPort.id,nodeId:t.srcObj.id,selectedObjectIds:this.ren.activePipeline.getSelectedObjectIds(),pipelineId:this.ren.activePipeline.id});this.ren.config.enableHighlightUnavailableNodes&&this.ren.unsetUnavailableNodesHighlighting();var n=this.ren.getNodeAtMousePos(e);null!==n?this.createNewLinkFromDragData(e,n,t):this.ren.config.enableLinkSelection!==me||t.action!==J||this.ren.config.enableAssocLinkCreation?this.stopDrawingNewLink(t):this.completeNewDetachedLink(e,t)}}},{key:"createNewLinkFromDragData",value:function(e,t,n){this.removeNewLink(),this.ren.config.enableHighlightNodeOnNewLinkDrag&&this.ren.setLinkOverNodeCancel();var i=n.action;if(null!==t)if(i===J){var o=n.srcObj,r=n.srcPort.id,a=this.ren.getInputNodePortId(e,t);this.createNewNodeLink(o,r,t,a)}else if(i===ee){var s=n.srcObj;this.createNewAssocLink(s,t)}else if(i===ue){var l=n.srcObj;this.createNewCommentLink(l,t)}}},{key:"createNewLinkFromSelections",value:function(){var e=this.ren.activePipeline.getSelectedNodes(),t=this.ren.activePipeline.getSelectedComments();if(e.length+t.length===2)if(1===e.length&&1===t.length)this.createNewCommentLink(t[0],e[0]);else if(2===e.length)if(this.ren.config.enableAssocLinkCreation)this.createNewAssocLink(e[0],e[1]);else{var n=it.getDefaultOutputPortId(e[0]),i=it.getDefaultInputPortId(e[1]);this.createNewNodeLink(e[0],n,e[1],i),this.ren.canvasController.setSelections([e[1].id])}}},{key:"createNewNodeLink",value:function(e,t,n,i){if(it.isDataConnectionAllowed(t,i,e,n,this.ren.activePipeline.links,this.ren.config.enableSelfRefLinks))this.ren.canvasController.editActionHandler({editType:"linkNodes",editSource:"canvas",nodes:[{id:e.id,portId:t}],targetNodes:[{id:n.id,portId:i}],type:J,linkType:"data",pipelineId:this.ren.activePipeline.id});else if(this.ren.config.enableLinkReplaceOnNewConnection&&it.isDataLinkReplacementAllowed(t,i,e,n,this.ren.activePipeline.links,this.ren.config.enableSelfRefLinks)){var o=it.getDataLinksConnectedTo(i,n,this.ren.activePipeline.links);1===o.length&&this.ren.canvasController.editActionHandler({editType:"linkNodesAndReplace",editSource:"canvas",nodes:[{id:e.id,portId:t}],targetNodes:[{id:n.id,portId:i}],type:J,pipelineId:this.pipelineId,replaceLink:o[0]})}}},{key:"createNewAssocLink",value:function(e,t){it.isAssocConnectionAllowed(e,t,this.ren.activePipeline.links)&&this.ren.canvasController.editActionHandler({editType:"linkNodes",editSource:"canvas",nodes:[{id:e.id}],targetNodes:[{id:t.id}],type:ee,pipelineId:this.ren.activePipeline.id})}},{key:"createNewCommentLink",value:function(e,t){it.isCommentLinkConnectionAllowed(e.id,t.id,this.ren.activePipeline.links)&&this.ren.canvasController.editActionHandler({editType:"linkComment",editSource:"canvas",nodes:[e.id],targetNodes:[t.id],type:ue,linkType:"comment",pipelineId:this.ren.activePipeline.id})}},{key:"completeNewDetachedLink",value:function(e,t){this.removeNewLink(),this.ren.config.enableHighlightNodeOnNewLinkDrag&&this.ren.setLinkOverNodeCancel();var n=this.ren.getTransformedMousePos(e);this.ren.canvasController.editActionHandler({editType:"createDetachedLink",editSource:"canvas",srcNodeId:t.srcObj.id,srcNodePortId:t.srcPort.id,trgPos:n,type:J,pipelineId:this.ren.activePipeline.id})}},{key:"stopDrawingNewLink",value:function(e){this.ren.config.enableHighlightNodeOnNewLinkDrag&&this.ren.setLinkOverNodeCancel(),this.stopDrawingNewLinkForPorts(e)}},{key:"stopDrawingNewLinkForPorts",value:function(e){var t,n=this;if(0!==(null===(t=e.linkArray)||void 0===t?void 0:t.length)){var i=e.linkArray[0].x1,o=e.linkArray[0].y1,r=e.linkArray[0].x2,a=e.linkArray[0].y2,s=Object.assign({},e),l="",c=350;this.ren.canvasLayout.linkType===Le?l="M "+i+" "+o+"C "+r+" "+a+" "+r+" "+a+" "+r+" "+a:this.ren.canvasLayout.linkType===ne?(i<r&&(c=0),l="M "+i+" "+o+"L "+r+" "+a+" "+r+" "+a+" "+r+" "+a):l="M "+i+" "+o+"L "+r+" "+a+"Q "+r+" "+a+" "+r+" "+a+"L "+r+" "+a+"Q "+r+" "+a+" "+r+" "+a+"L "+r+" "+a+"Q "+r+" "+a+" "+r+" "+a+"L "+r+" "+a+"Q "+r+" "+a+" "+r+" "+a+"L "+r+" "+a,this.ren.nodesLinksGrp.selectAll(".d3-new-connection-line").transition().duration(c).attr("d",l).on("end",(function(){var e,t;n.ren.nodesLinksGrp.selectAll(".d3-new-connection-arrow").remove(),n.ren.nodesLinksGrp.selectAll(".d3-new-connection-guide").transition().duration(1e3).ease(np.easeElastic).attr("x",i-(null===(e=s.portGuideInfo)||void 0===e?void 0:e.width)/2).attr("y",o-(null===(t=s.portGuideInfo)||void 0===t?void 0:t.height)/2).attr("cx",i).attr("cy",o).attr("transform",null),n.ren.nodesLinksGrp.selectAll(".d3-new-connection-line").transition().duration(1e3).ease(np.easeElastic).attr("d","M "+i+" "+o+"L "+i+" "+o).on("end",n.removeNewLink.bind(n))}))}}},{key:"removeNewLink",value:function(){var e=this;this.ren.nodesLinksGrp.selectAll("foreignObject.d3-new-connection-guide").each((function(t,n,i){return e.ren.externalUtils.removeExternalObject(t,n,i)})),this.ren.nodesLinksGrp.selectAll(".d3-new-connection-line").remove(),this.ren.nodesLinksGrp.selectAll(".d3-new-connection-start").remove(),this.ren.nodesLinksGrp.selectAll(".d3-new-connection-guide").remove(),this.ren.nodesLinksGrp.selectAll(".d3-new-connection-arrow").remove()}},{key:"setNewLinkOverNode",value:function(e){var t=this.ren.getNodeNearMousePos(e,this.ren.canvasLayout.nodeProximity),n=t&&this.isNewLinkAllowedToNode(e,t);this.ren.setHighlightingOverNode(n,t)}},{key:"isNewLinkAllowedToNode",value:function(e,t){if(this.drawingNewLinkData){if(this.drawingNewLinkData.action===J){var n=this.drawingNewLinkData.srcObj,i=t,o=this.drawingNewLinkData.srcPort.id,r=this.ren.getInputNodePortId(e,i);return it.isDataConnectionAllowed(o,r,n,i,this.ren.activePipeline.links,this.ren.config.enableSelfRefLinks)}if(this.drawingNewLinkData.action===ee){var a=this.drawingNewLinkData.srcObj,s=t;return it.isAssocConnectionAllowed(a,s,this.ren.activePipeline.links)}if(this.drawingNewLinkData.action===ue){var l=this.drawingNewLinkData.srcObj.id,c=t.id;return it.isCommentLinkConnectionAllowed(l,c,this.ren.activePipeline.links)}}return!1}}])}(),op=Object.assign({},Eh,id),rp=function(){return e((function e(n){t(this,e),this.ren=n,this.logger=new pt("SVGCanvasUtilsDragDetLink"),this.draggingLinkData=null,this.dragDetLinkHandler=op.drag().on("start",this.dragStartDetLinkHandle.bind(this)).on("drag",this.dragMoveDetLinkHandle.bind(this)).on("end",this.dragEndDetLinkHandle.bind(this))}),[{key:"getDragDetachedLinkHandler",value:function(){return this.dragDetLinkHandler}},{key:"isDragging",value:function(){return this.draggingLinkData}},{key:"isLinkBeingDragged",value:function(e){return this.draggingLinkData&&this.draggingLinkData.link.id===e.id}},{key:"dragStartDetLinkHandle",value:function(e,t){this.logger.logStartTimer("dragStartDetLinkHandle"),this.ren.closeContextMenuIfOpen();var n=op.select(e.sourceEvent.currentTarget),i=this.ren.activePipeline.getLink(t.id),o=Ht(i),r=this.ren.getLinkGroupSelectionById(t.id);if(this.draggingLinkData={lineInfo:t,link:i,oldLink:o,linkGrpSelection:op.select(r)},n.attr("class").includes("d3-link-handle-end")?this.draggingLinkData.endBeingDragged="end":n.attr("class").includes("d3-link-handle-start")&&(this.draggingLinkData.endBeingDragged="start"),this.ren.config.enableHighlightUnavailableNodes)if("end"===this.draggingLinkData.endBeingDragged){var a=this.ren.activePipeline.links.filter((function(e){return e.id!==i.id}));this.ren.setUnavailableTargetNodesHighlighting(this.ren.activePipeline.getNode(this.draggingLinkData.link.srcNodeId),this.draggingLinkData.link.srcNodePortId,a)}else if("start"===this.draggingLinkData.endBeingDragged){var s=this.ren.activePipeline.links.filter((function(e){return e.id!==i.id}));this.ren.setUnavailableSourceNodesHighlighting(this.ren.activePipeline.getNode(this.draggingLinkData.oldLink.trgNodeId),this.draggingLinkData.link.trgNodePortId,s)}this.dragLinkHandle(e),this.logger.logEndTimer("dragStartDetLinkHandle",!0)}},{key:"dragMoveDetLinkHandle",value:function(e){this.logger.logStartTimer("dragMoveDetLinkHandle"),this.dragLinkHandle(e),this.logger.logEndTimer("dragMoveDetLinkHandle",!0)}},{key:"dragEndDetLinkHandle",value:function(e){this.logger.logStartTimer("dragEndLinkHandle"),this.completeDraggedDetLink(e),this.logger.logEndTimer("dragEndLinkHandle",!0)}},{key:"dragLinkHandle",value:function(e){var t=this.ren.getTransformedMousePos(e),n=this.draggingLinkData.link;"start"===this.draggingLinkData.endBeingDragged?(n.srcPos={x_pos:t.x,y_pos:t.y},delete n.srcNodeId,delete n.srcNodePortId,delete n.srcObj):(n.trgPos={x_pos:t.x,y_pos:t.y},delete n.trgNodeId,delete n.trgNodePortId,delete n.trgNode),this.ren.displayLinks(),this.ren.config.enableHighlightNodeOnNewLinkDrag&&this.setDetachedLinkOverNode(e)}},{key:"completeDraggedDetLink",value:function(e){var t=this.getNewLinkOnDrag(e),n=this.draggingLinkData;if(this.draggingLinkData=null,t){var i=this.getLinkEditSubType(n.oldLink,t);if(i)this.ren.canvasController.editActionHandler({editType:"updateLink",editSubType:i,editSource:"canvas",newLink:t,pipelineId:this.ren.activePipeline.id})||this.snapBackOldLink(n.oldLink);else this.snapBackOldLink(n.oldLink)}else this.snapBackOldLink(n.oldLink);this.ren.config.enableHighlightNodeOnNewLinkDrag&&this.ren.setLinkOverNodeCancel(),this.ren.unsetUnavailableNodesHighlighting()}},{key:"getLinkEditSubType",value:function(e,t){return e.srcNodeId&&!t.srcNodeId?"detachFromSrcNode":e.trgNodeId&&!t.trgNodeId?"detachFromTrgNode":!e.srcNodeId&&t.srcNodeId?"attachToSrcNode":!e.trgNodeId&&t.trgNodeId?"attachToTrgNode":e.srcNodeId||t.srcNodeId||e.srcPos.x_pos===t.srcPos.x_pos&&e.srcPos.y_pos===t.srcPos.y_pos?e.trgNodeId||t.trgNodeId||e.trgPos.x_pos===t.trgPos.x_pos&&e.trgPos.y_pos===t.trgPos.y_pos?e.srcNodeId&&t.srcNodeId&&e.srcNodeId!==t.srcNodeId?"switchSrcNode":e.trgNodeId&&t.trgNodeId&&e.trgNodeId!==t.trgNodeId?"switchTrgNode":e.srcNodeId&&t.srcNodeId&&e.srcNodeId===t.srcNodeId&&e.srcNodePortId!==t.srcNodePortId?"switchSrcNodePort":e.trgNodeId&&t.trgNodeId&&e.trgNodeId===t.trgNodeId&&e.trgNodePortId!==t.trgNodePortId?"switchTrgNodePort":null:"moveTrgPosition":"moveSrcPosition"}},{key:"snapBackOldLink",value:function(e){this.ren.activePipeline.replaceLink(e),this.ren.displayLinks()}},{key:"setDetachedLinkOverNode",value:function(e){var t=this.ren.getNodeNearMousePos(e,this.ren.canvasLayout.nodeProximity),n=t&&this.isDetLinkConnectionAllowedToNearbyNode(e);this.ren.setHighlightingOverNode(n,t)}},{key:"isDetLinkConnectionAllowedToNearbyNode",value:function(e){if(this.draggingLinkData&&this.getNewLinkOnDrag(e,this.ren.canvasLayout.nodeProximity))return!0;return!1}},{key:"getNewLinkOnDrag",value:function(e,t){var n=this.draggingLinkData.oldLink,i=Ht(n);if("start"===this.draggingLinkData.endBeingDragged){delete i.srcObj,delete i.srcNodeId,delete i.srcNodePortId,delete i.srcPos;var o=t?this.ren.getNodeNearMousePos(e,t):this.ren.getNodeAtMousePos(e);o?(i.srcNodeId=o.id,i.srcObj=this.ren.activePipeline.getNode(o.id),i.srcNodePortId=this.ren.getOutputNodePortId(e,o)):i.srcPos=this.draggingLinkData.link.srcPos}else{delete i.trgNode,delete i.trgNodeId,delete i.trgNodePortId,delete i.trgPos;var r=t?this.ren.getNodeNearMousePos(e,t):this.ren.getNodeAtMousePos(e);r?(i.trgNodeId=r.id,i.trgNode=this.ren.activePipeline.getNode(r.id),i.trgNodePortId=this.ren.getInputNodePortId(e,r)):i.trgPos=this.draggingLinkData.link.trgPos}return this.ren.config.enableLinkSelection!==me&&(i.srcPos||i.trgPos)?null:this.canUpdateLink(i,n)?i:null}},{key:"canUpdateLink",value:function(e,t){var n=this.ren.activePipeline.getNode(e.srcNodeId),i=this.ren.activePipeline.getNode(e.trgNodeId),o=this.hasLinkSrcChanged(e,t),r=this.hasLinkTrgChanged(e,t),a=this.ren.activePipeline.links,s=!0;return o&&n&&!it.isSrcConnectionAllowedWithDetachedLinks(e.srcNodePortId,n,a)&&(s=!1),r&&i&&!it.isTrgConnectionAllowedWithDetachedLinks(e.trgNodePortId,i,a)&&(s=!1),n&&i&&!it.isConnectionAllowedWithDetachedLinks(e.srcNodePortId,e.trgNodePortId,n,i,a,this.ren.config.enableSelfRefLinks)&&(s=!1),s}},{key:"hasLinkSrcChanged",value:function(e,t){var n=!1;return e.srcNodeId?(e.srcNodeId!==t.srcNodeId&&(n=!0),e.srcNodePortId!==t.srcNodePortId&&(n=!0)):t.srcPos&&e.srcPos.x_pos===t.srcPos.x_pos&&e.srcPos.y_pos===t.srcPos.y_pos||(n=!0),n}},{key:"hasLinkTrgChanged",value:function(e,t){var n=!1;return e.trgNodeId?(e.trgNodeId!==t.trgNodeId&&(n=!0),e.trgNodePortId!==t.trgNodePortId&&(n=!0)):t.trgPos&&e.trgPos.x_pos===t.trgPos.x_pos&&e.trgPos.y_pos===t.trgPos.y_pos||(n=!0),n}}])}();function ap(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function sp(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function lp(){}var cp=.7,up=1/cp,dp="\\s*([+-]?\\d+)\\s*",hp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gp=/^#([0-9a-f]{3,8})$/,fp=new RegExp(`^rgb\\(${dp},${dp},${dp}\\)$`),vp=new RegExp(`^rgb\\(${pp},${pp},${pp}\\)$`),yp=new RegExp(`^rgba\\(${dp},${dp},${dp},${hp}\\)$`),mp=new RegExp(`^rgba\\(${pp},${pp},${pp},${hp}\\)$`),bp=new RegExp(`^hsl\\(${hp},${pp},${pp}\\)$`),kp=new RegExp(`^hsla\\(${hp},${pp},${pp},${hp}\\)$`),xp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function wp(){return this.rgb().formatHex()}function Cp(){return this.rgb().formatRgb()}function Lp(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=gp.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ep(t):3===n?new Tp(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Pp(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Pp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=fp.exec(e))?new Tp(t[1],t[2],t[3],1):(t=vp.exec(e))?new Tp(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=yp.exec(e))?Pp(t[1],t[2],t[3],t[4]):(t=mp.exec(e))?Pp(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=bp.exec(e))?Ip(t[1],t[2]/100,t[3]/100,1):(t=kp.exec(e))?Ip(t[1],t[2]/100,t[3]/100,t[4]):xp.hasOwnProperty(e)?Ep(xp[e]):"transparent"===e?new Tp(NaN,NaN,NaN,0):null}function Ep(e){return new Tp(e>>16&255,e>>8&255,255&e,1)}function Pp(e,t,n,i){return i<=0&&(e=t=n=NaN),new Tp(e,t,n,i)}function Np(e,t,n,i){return 1===arguments.length?((o=e)instanceof lp||(o=Lp(o)),o?new Tp((o=o.rgb()).r,o.g,o.b,o.opacity):new Tp):new Tp(e,t,n,null==i?1:i);var o}function Tp(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Dp(){return`#${zp(this.r)}${zp(this.g)}${zp(this.b)}`}function Sp(){const e=Op(this.opacity);return`${1===e?"rgb(":"rgba("}${Ap(this.r)}, ${Ap(this.g)}, ${Ap(this.b)}${1===e?")":`, ${e})`}`}function Op(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ap(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zp(e){return((e=Ap(e))<16?"0":"")+e.toString(16)}function Ip(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hp(e,t,n,i)}function Mp(e){if(e instanceof Hp)return new Hp(e.h,e.s,e.l,e.opacity);if(e instanceof lp||(e=Lp(e)),!e)return new Hp;if(e instanceof Hp)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,l=(r+o)/2;return s?(a=t===r?(n-i)/s+6*(n<i):n===r?(i-t)/s+2:(t-n)/s+4,s/=l<.5?r+o:2-r-o,a*=60):s=l>0&&l<1?0:a,new Hp(a,s,l,e.opacity)}function Hp(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function _p(e){return(e=(e||0)%360)<0?e+360:e}function Vp(e){return Math.max(0,Math.min(1,e||0))}function jp(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ap(lp,Lp,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wp,formatHex:wp,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Mp(this).formatHsl()},formatRgb:Cp,toString:Cp}),ap(Tp,Np,sp(lp,{brighter(e){return e=null==e?up:Math.pow(up,e),new Tp(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?cp:Math.pow(cp,e),new Tp(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tp(Ap(this.r),Ap(this.g),Ap(this.b),Op(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dp,formatHex:Dp,formatHex8:function(){return`#${zp(this.r)}${zp(this.g)}${zp(this.b)}${zp(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Sp,toString:Sp})),ap(Hp,(function(e,t,n,i){return 1===arguments.length?Mp(e):new Hp(e,t,n,null==i?1:i)}),sp(lp,{brighter(e){return e=null==e?up:Math.pow(up,e),new Hp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?cp:Math.pow(cp,e),new Hp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new Tp(jp(e>=240?e-240:e+120,o,i),jp(e,o,i),jp(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new Hp(_p(this.h),Vp(this.s),Vp(this.l),Op(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Op(this.opacity);return`${1===e?"hsl(":"hsla("}${_p(this.h)}, ${100*Vp(this.s)}%, ${100*Vp(this.l)}%${1===e?")":`, ${e})`}`}}));var Fp=e=>()=>e;function Rp(e){return 1==(e=+e)?Bp:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):Fp(isNaN(t)?n:t)}}function Bp(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Fp(isNaN(e)?t:e)}var Up=function e(t){var n=Rp(t);function i(e,t){var i=n((e=Np(e)).r,(t=Np(t)).r),o=n(e.g,t.g),r=n(e.b,t.b),a=Bp(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=o(t),e.b=r(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function Gp(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Zp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wp=new RegExp(Zp.source,"g");function Xp(e,t){var n,i,o,r=Zp.lastIndex=Wp.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Zp.exec(e))&&(i=Wp.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Gp(n,i)})),r=Wp.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}var Yp,Kp=180/Math.PI,qp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $p(e,t,n,i,o,r){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),e*i<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*Kp,skewX:Math.atan(l)*Kp,scaleX:a,scaleY:s}}function Jp(e,t,n,i){function o(e){return e.length?e.pop()+" ":""}return function(r,a){var s=[],l=[];return r=e(r),a=e(a),function(e,i,o,r,a,s){if(e!==o||i!==r){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Gp(e,o)},{i:l-2,x:Gp(i,r)})}else(o||r)&&a.push("translate("+o+t+r+n)}(r.translateX,r.translateY,a.translateX,a.translateY,s,l),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(o(n)+"rotate(",null,i)-2,x:Gp(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}(r.rotate,a.rotate,s,l),function(e,t,n,r){e!==t?r.push({i:n.push(o(n)+"skewX(",null,i)-2,x:Gp(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}(r.skewX,a.skewX,s,l),function(e,t,n,i,r,a){if(e!==n||t!==i){var s=r.push(o(r)+"scale(",null,",",null,")");a.push({i:s-4,x:Gp(e,n)},{i:s-2,x:Gp(t,i)})}else 1===n&&1===i||r.push(o(r)+"scale("+n+","+i+")")}(r.scaleX,r.scaleY,a.scaleX,a.scaleY,s,l),r=a=null,function(e){for(var t,n=-1,i=l.length;++n<i;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var Qp=Jp((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qp:$p(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),eg=Jp((function(e){return null==e?qp:(Yp||(Yp=document.createElementNS("http://www.w3.org/2000/svg","g")),Yp.setAttribute("transform",e),(e=Yp.transform.baseVal.consolidate())?$p((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):qp)}),", ",")",")");function tg(e){return((e=Math.exp(e))+1/e)/2}var ng,ig,og=function e(t,n,i){function o(e,o){var r,a,s=e[0],l=e[1],c=e[2],u=o[0],d=o[1],h=o[2],p=u-s,g=d-l,f=p*p+g*g;if(f<1e-12)a=Math.log(h/c)/t,r=function(e){return[s+e*p,l+e*g,c*Math.exp(t*e*a)]};else{var v=Math.sqrt(f),y=(h*h-c*c+i*f)/(2*c*n*v),m=(h*h-c*c-i*f)/(2*h*n*v),b=Math.log(Math.sqrt(y*y+1)-y),k=Math.log(Math.sqrt(m*m+1)-m);a=(k-b)/t,r=function(e){var i,o=e*a,r=tg(b),u=c/(n*v)*(r*(i=t*o+b,((i=Math.exp(2*i))-1)/(i+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+u*p,l+u*g,c*r/tg(t*o+b)]}}return r.duration=1e3*a*t/Math.SQRT2,r}return o.rho=function(t){var n=Math.max(.001,+t),i=n*n;return e(n,i,i*i)},o}(Math.SQRT2,2,4),rg=0,ag=0,sg=0,lg=0,cg=0,ug=0,dg="object"==typeof performance&&performance.now?performance:Date,hg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function pg(){return cg||(hg(gg),cg=dg.now()+ug)}function gg(){cg=0}function fg(){this._call=this._time=this._next=null}function vg(e,t,n){var i=new fg;return i.restart(e,t,n),i}function yg(){cg=(lg=dg.now())+ug,rg=ag=0;try{!function(){pg(),++rg;for(var e,t=ng;t;)(e=cg-t._time)>=0&&t._call.call(void 0,e),t=t._next;--rg}()}finally{rg=0,function(){var e,t,n=ng,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:ng=t);ig=e,bg(i)}(),cg=0}}function mg(){var e=dg.now(),t=e-lg;t>1e3&&(ug-=t,lg=e)}function bg(e){rg||(ag&&(ag=clearTimeout(ag)),e-cg>24?(e<1/0&&(ag=setTimeout(yg,e-dg.now()-ug)),sg&&(sg=clearInterval(sg))):(sg||(lg=dg.now(),sg=setInterval(mg,1e3)),rg=1,hg(yg)))}function kg(e,t,n){var i=new fg;return t=null==t?0:+t,i.restart((n=>{i.stop(),e(n+t)}),t,n),i}fg.prototype=vg.prototype={constructor:fg,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?pg():+n)+(null==t?0:+t),this._next||ig===this||(ig?ig._next=this:ng=this,ig=this),this._call=e,this._time=n,bg()},stop:function(){this._call&&(this._call=null,this._time=1/0,bg())}};var xg=ch("start","end","cancel","interrupt"),wg=[];function Cg(e,t,n,i,o,r){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var i,o=e.__transition;function r(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(r){var c,u,d,h;if(1!==n.state)return l();for(c in o)if((h=o[c]).name===n.name){if(3===h.state)return kg(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(kg((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(r))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=h);i.length=u+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),r=-1,a=i.length;++r<a;)i[r].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=vg(r,0,n.time)}(e,n,{name:t,index:i,group:o,on:xg,tween:wg,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:0})}function Lg(e,t){var n=Pg(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Eg(e,t){var n=Pg(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Pg(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ng(e,t){var n,i,o,r=e.__transition,a=!0;if(r){for(o in t=null==t?null:t+"",r)(n=r[o]).name===t?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[o]):a=!1;a&&delete e.__transition}}function Tg(e,t){var n,i;return function(){var o=Eg(this,e),r=o.tween;if(r!==n)for(var a=0,s=(i=n=r).length;a<s;++a)if(i[a].name===t){(i=i.slice()).splice(a,1);break}o.tween=i}}function Dg(e,t,n){var i,o;if("function"!=typeof n)throw new Error;return function(){var r=Eg(this,e),a=r.tween;if(a!==i){o=(i=a).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}r.tween=o}}function Sg(e,t,n){var i=e._id;return e.each((function(){var e=Eg(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Pg(e,i).value[t]}}function Og(e,t){var n;return("number"==typeof t?Gp:t instanceof Lp?Up:(n=Lp(t))?(t=n,Up):Xp)(e,t)}function Ag(e){return function(){this.removeAttribute(e)}}function zg(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ig(e,t,n){var i,o,r=n+"";return function(){var a=this.getAttribute(e);return a===r?null:a===i?o:o=t(i=a,n)}}function Mg(e,t,n){var i,o,r=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===i?o:o=t(i=a,n)}}function Hg(e,t,n){var i,o,r;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===i&&s===o?r:(o=s,r=t(i=a,l));this.removeAttribute(e)}}function _g(e,t,n){var i,o,r;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===i&&s===o?r:(o=s,r=t(i=a,l));this.removeAttributeNS(e.space,e.local)}}function Vg(e,t){var n,i;function o(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function jg(e,t){var n,i;function o(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function Fg(e,t){return function(){Lg(this,e).delay=+t.apply(this,arguments)}}function Rg(e,t){return t=+t,function(){Lg(this,e).delay=t}}function Bg(e,t){return function(){Eg(this,e).duration=+t.apply(this,arguments)}}function Ug(e,t){return t=+t,function(){Eg(this,e).duration=t}}var Gg=qu.prototype.constructor;function Zg(e){return function(){this.style.removeProperty(e)}}var Wg=0;function Xg(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Yg(){return++Wg}var Kg=qu.prototype;Xg.prototype={constructor:Xg,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Wc(e));for(var i=this._groups,o=i.length,r=new Array(o),a=0;a<o;++a)for(var s,l,c=i[a],u=c.length,d=r[a]=new Array(u),h=0;h<u;++h)(s=c[h])&&(l=e.call(s,s.__data__,h,c))&&("__data__"in s&&(l.__data__=s.__data__),d[h]=l,Cg(d[h],t,n,h,d,Pg(s,n)));return new Xg(r,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Kc(e));for(var i=this._groups,o=i.length,r=[],a=[],s=0;s<o;++s)for(var l,c=i[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var h,p=e.call(l,l.__data__,d,c),g=Pg(l,n),f=0,v=p.length;f<v;++f)(h=p[f])&&Cg(h,t,n,f,p,g);r.push(p),a.push(l)}return new Xg(r,a,t,n)},selectChild:Kg.selectChild,selectChildren:Kg.selectChildren,filter:function(e){"function"!=typeof e&&(e=qc(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r,a=t[o],s=a.length,l=i[o]=[],c=0;c<s;++c)(r=a[c])&&e.call(r,r.__data__,c,a)&&l.push(r);return new Xg(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var l,c=t[s],u=n[s],d=c.length,h=a[s]=new Array(d),p=0;p<d;++p)(l=c[p]||u[p])&&(h[p]=l);for(;s<i;++s)a[s]=t[s];return new Xg(a,this._parents,this._name,this._id)},selection:function(){return new Gg(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Yg(),i=this._groups,o=i.length,r=0;r<o;++r)for(var a,s=i[r],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=Pg(a,t);Cg(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Xg(i,this._parents,e,n)},call:Kg.call,nodes:Kg.nodes,node:Kg.node,size:Kg.size,empty:Kg.empty,each:Kg.each,on:function(e,t){var n=this._id;return arguments.length<2?Pg(this.node(),n).on.on(e):this.each(function(e,t,n){var i,o,r=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?Lg:Eg;return function(){var a=r(this,e),s=a.on;s!==i&&(o=(i=s).copy()).on(t,n),a.on=o}}(n,e,t))},attr:function(e,t){var n=Rc(e),i="transform"===n?eg:Og;return this.attrTween(e,"function"==typeof t?(n.local?_g:Hg)(n,i,Sg(this,"attr."+e,t)):null==t?(n.local?zg:Ag)(n):(n.local?Mg:Ig)(n,i,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var i=Rc(e);return this.tween(n,(i.local?Vg:jg)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?Qp:Og;return null==t?this.styleTween(e,function(e,t){var n,i,o;return function(){var r=bu(this,e),a=(this.style.removeProperty(e),bu(this,e));return r===a?null:r===n&&a===i?o:o=t(n=r,i=a)}}(e,i)).on("end.style."+e,Zg(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,o,r;return function(){var a=bu(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=bu(this,e)),a===l?null:a===i&&l===o?r:(o=l,r=t(i=a,s))}}(e,i,Sg(this,"style."+e,t))).each(function(e,t){var n,i,o,r,a="style."+t,s="end."+a;return function(){var l=Eg(this,e),c=l.on,u=null==l.value[a]?r||(r=Zg(t)):void 0;c===n&&o===u||(i=(n=c).copy()).on(s,o=u),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,n){var i,o,r=n+"";return function(){var a=bu(this,e);return a===r?null:a===i?o:o=t(i=a,n)}}(e,i,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,function(e,t,n){var i,o;function r(){var r=t.apply(this,arguments);return r!==o&&(i=(o=r)&&function(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}(e,r,n)),i}return r._value=t,r}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Sg(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function i(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&function(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return i._value=e,i}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i,o=Pg(this.node(),n).tween,r=0,a=o.length;r<a;++r)if((i=o[r]).name===e)return i.value;return null}return this.each((null==t?Tg:Dg)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Fg:Rg)(t,e)):Pg(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Bg:Ug)(t,e)):Pg(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){Eg(this,e).ease=t}}(t,e)):Pg(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;Eg(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,o=n.size();return new Promise((function(r,a){var s={value:a},l={value:function(){0==--o&&r()}};n.each((function(){var n=Eg(this,i),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===o&&r()}))},[Symbol.iterator]:Kg[Symbol.iterator]};var qg={time:null,delay:0,duration:250,ease:Dh};function $g(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}qu.prototype.interrupt=function(e){return this.each((function(){Ng(this,e)}))},qu.prototype.transition=function(e){var t,n;e instanceof Xg?(t=e._id,e=e._name):(t=Yg(),(n=qg).time=pg(),e=null==e?null:e+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var a,s=i[r],l=s.length,c=0;c<l;++c)(a=s[c])&&Cg(a,e,t,c,s,n||$g(a,t));return new Xg(i,this._parents,e,t)};var Jg=function(e){return function(){return e}};function Qg(e,t){var n=t.sourceEvent,i=t.target,o=t.transform,r=t.dispatch;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function ef(e,t,n){this.k=e,this.x=t,this.y=n}ef.prototype={constructor:ef,scale:function(e){return 1===e?this:new ef(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new ef(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var tf=new ef(1,0,0);function nf(e){for(;!e.__zoom;)if(!(e=e.parentNode))return tf;return e.__zoom}function of(e){e.stopImmediatePropagation()}function rf(e){e.preventDefault(),e.stopImmediatePropagation()}function af(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function sf(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function lf(){return this.__zoom||tf}function cf(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function uf(){return navigator.maxTouchPoints||"ontouchstart"in this}function df(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}nf.prototype=ef.prototype;var hf=Object.freeze({__proto__:null,zoom:function(){var e,t,n,i=af,o=sf,r=df,a=cf,s=uf,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=og,h=ch("start","zoom","end"),p=0,g=10,f=!1,v=!1;function y(e){e.property("__zoom",lf).on("wheel.zoom",L).on("mousedown.zoom",T).on("dblclick.zoom",D).on("gesturestart",E).on("gesturechange",P).on("gestureend",N).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",A).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new ef(t,e.x,e.y)}function b(e,t,n){var i=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return i===e.x&&o===e.y?e:new ef(e.k,i,o)}function k(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,n,i){e.on("start.zoom",(function(){w(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(i).end()})).tween("zoom",(function(){var e=this,r=arguments,a=w(e,r).event(i),s=o.apply(e,r),l=null==n?k(s):"function"==typeof n?n.apply(e,r):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,h="function"==typeof t?t.apply(e,r):t,p=d(u.invert(l).concat(c/u.k),h.invert(l).concat(c/h.k));return function(e){if(1===e)e=h;else{var t=p(e),n=c/t[2];e=new ef(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(v&&rf(e),i.apply(this,arguments)){var s=w(this,n).event(e),u=this.__zoom,d=Math.max(l[0],Math.min(l[1],u.k*Math.pow(2,a.apply(this,arguments)))),h=nd(e);if(s.wheel)s.mouse[0][0]===h[0]&&s.mouse[0][1]===h[1]||(s.mouse[1]=u.invert(s.mouse[0]=h)),clearTimeout(s.wheel);else{if(u.k===d)return;!f||e.ctrlKey||e.safariPinchZoom||(s.wheelTransX=-u.x,s.wheelTransY=-u.y),s.mouse=[h,u.invert(h)],Ng(this),s.start()}if(rf(e),s.wheel=setTimeout((function(){s.wheel=null,s.end()}),150),!f||e.ctrlKey||e.safariPinchZoom)s.zoom("mouse",r(b(m(u,d),s.mouse[0],s.mouse[1]),s.extent,c));else{s.wheelTransX+=e.deltaX,s.wheelTransY+=e.deltaY;var p=[u.x,u.y],g=[u.x+s.wheelTransX,u.y+s.wheelTransY];s.zoom("mouse",r(b(u,p,g),s.extent,c))}}}function E(e){rf(e),this.scale=e.scale}function P(e){rf(e),this.__zoom&&(e.deltaY=100*(this.scale-e.scale),this.scale=e.scale),e.safariPinchZoom=!0,L.apply(this,[e].concat(Array.prototype.slice.call(arguments)))}function N(e){rf(e)}function T(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];if(!n&&i.apply(this,arguments)){var s=w(this,o,!0).event(e),l=$u(e.view).on("mousemove.zoom",(function(e){if(rf(e),!s.moved){var t=e.clientX-h,n=e.clientY-g;s.moved=t*t+n*n>p}s.event(e).zoom("mouse",r(b(s.that.__zoom,s.mouse[0]=nd(e,d),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(e){l.on("mousemove.zoom mouseup.zoom",null),mh(e.view,s.moved),rf(e),s.event(e).end()}),!0),u=nd(e,d),d=e.currentTarget,h=e.clientX,g=e.clientY;yh(e.view),of(e),s.mouse=[u,this.__zoom.invert(u)],Ng(this),s.start()}}function D(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(i.apply(this,arguments)){var s=this.__zoom,l=nd(e.changedTouches?e.changedTouches[0]:e,this),d=s.invert(l),h=s.k*(e.shiftKey?.5:2),p=r(b(m(s,h),l,d),o.apply(this,n),c);rf(e),u>0?$u(this).transition().duration(u).call(x,p,l,e):$u(this).call(y.transform,p,l,e)}}function S(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];if(i.apply(this,arguments)){var s,l,c,u,d=n.touches,h=d.length,p=w(this,r,n.changedTouches.length===h).event(n);for(of(n),l=0;l<h;++l)u=[u=nd(c=d[l],this),this.__zoom.invert(u),c.identifier],p.touch0?p.touch1||p.touch0[2]===u[2]||(p.touch1=u,p.taps=0):(p.touch0=u,s=!0,p.taps=1+!!e);e&&(e=clearTimeout(e)),s&&(p.taps<2&&(t=u[0],e=setTimeout((function(){e=null}),500)),Ng(this),p.start())}}function O(e){if(this.__zooming){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o,a,s,l,u=w(this,n).event(e),d=e.changedTouches,h=d.length;for(rf(e),o=0;o<h;++o)s=nd(a=d[o],this),u.touch0&&u.touch0[2]===a.identifier?u.touch0[0]=s:u.touch1&&u.touch1[2]===a.identifier&&(u.touch1[0]=s);if(a=u.that.__zoom,u.touch1){var p=u.touch0[0],g=u.touch0[1],f=u.touch1[0],v=u.touch1[1],y=(y=f[0]-p[0])*y+(y=f[1]-p[1])*y,k=(k=v[0]-g[0])*k+(k=v[1]-g[1])*k;a=m(a,Math.sqrt(y/k)),s=[(p[0]+f[0])/2,(p[1]+f[1])/2],l=[(g[0]+v[0])/2,(g[1]+v[1])/2]}else{if(!u.touch0)return;s=u.touch0[0],l=u.touch0[1]}u.zoom("touch",r(b(a,s,l),u.extent,c))}}function A(e){for(var i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];if(this.__zooming){var a,s,l=w(this,o).event(e),c=e.changedTouches,u=c.length;for(of(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),a=0;a<u;++a)s=c[a],l.touch0&&l.touch0[2]===s.identifier?delete l.touch0:l.touch1&&l.touch1[2]===s.identifier&&delete l.touch1;if(l.touch1&&!l.touch0&&(l.touch0=l.touch1,delete l.touch1),l.touch0)l.touch0[1]=this.__zoom.invert(l.touch0[0]);else if(l.end(),2===l.taps&&(s=nd(s,this),Math.hypot(t[0]-s[0],t[1]-s[1])<g)){var d=$u(this).on("dblclick.zoom");d&&d.apply(this,arguments)}}}return y.transform=function(e,t,n,i){var o=e.selection?e.selection():e;o.property("__zoom",lf),e!==o?x(e,t,n,i):o.interrupt().each((function(){w(this,arguments).event(i).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},y.scaleBy=function(e,t,n,i){y.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,i)},y.scaleTo=function(e,t,n,i){y.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,a=null==n?k(e):"function"==typeof n?n.apply(this,arguments):n,s=i.invert(a),l="function"==typeof t?t.apply(this,arguments):t;return r(b(m(i,l),a,s),e,c)}),n,i)},y.translateBy=function(e,t,n,i){y.transform(e,(function(){return r(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,i)},y.translateTo=function(e,t,n,i,a){y.transform(e,(function(){var e=o.apply(this,arguments),a=this.__zoom,s=null==i?k(e):"function"==typeof i?i.apply(this,arguments):i;return r(tf.translate(s[0],s[1]).scale(a.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),i,a)},C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=$u(this.that).datum();h.call(e,this.that,new Qg(e,{sourceEvent:this.sourceEvent,target:y,type:e,transform:this.that.__zoom,dispatch:h}),t)}},y.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:Jg(+e),y):a},y.filter=function(e){return arguments.length?(i="function"==typeof e?e:Jg(!!e),y):i},y.touchable=function(e){return arguments.length?(s="function"==typeof e?e:Jg(!!e),y):s},y.extent=function(e){return arguments.length?(o="function"==typeof e?e:Jg([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),y):o},y.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],y):[l[0],l[1]]},y.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],y):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},y.constrain=function(e){return arguments.length?(r=e,y):r},y.trackpad=function(e){return arguments.length?(f=e,y):f},y.preventBackGesture=function(e){return arguments.length?(v=e,y):v},y.duration=function(e){return arguments.length?(u=+e,y):u},y.interpolate=function(e){return arguments.length?(d=e,y):d},y.on=function(){var e=h.on.apply(h,arguments);return e===h?y:e},y.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,y):Math.sqrt(p)},y.tapDistance=function(e){return arguments.length?(g=+e,y):g},y},zoomTransform:nf,zoomIdentity:tf});function pf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function gf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pf(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ff=Object.assign({},id,hf),vf=function(){return e((function e(n){var i=this;t(this,e),this.ren=n,this.logger=new pt("SVGCanvasUtilsZoom"),this.minScaleExtent=.2,this.maxScaleExtent=1.8,this.contextMenuClosedOnZoom=!1,this.textEditingClosedOnZoom=!1,this.regionSelect=!1,this.zoomStartPoint={x:0,y:0,k:0,startX:0,startY:0},this.previousD3Event={},this.zoomCanvasDimensions={},this.regionStartTransformX=0,this.regionStartTransformY=0,this.zoomTransform=ff.zoomIdentity.translate(0,0).scale(1),this.zooming=!1,this.zoomingAction=!1,this.spaceKeyPressed=!1,this.zoomHandler=ff.zoom().trackpad(this.ren.config.enableInteractionType===Ne).preventBackGesture(!0).wheelDelta((function(e){return-e.deltaY*(i.ren.config.enableInteractionType===Ne?.02:.002)})).scaleExtent([this.minScaleExtent,this.maxScaleExtent]).on("start",this.zoomStart.bind(this)).on("zoom",this.zoomAction.bind(this)).on("end",this.zoomEnd.bind(this))}),[{key:"setSpaceKeyPressed",value:function(e){this.spaceKeyPressed=e}},{key:"isSpaceKeyPressed",value:function(){return this.spaceKeyPressed}},{key:"getZoomHandler",value:function(){return this.zoomHandler}},{key:"getZoomTransform",value:function(){return this.zoomTransform}},{key:"getZoom",value:function(){return gf({},this.zoomTransform)}},{key:"getZoomScale",value:function(){return this.zoomTransform.k}},{key:"resetZoomTransform",value:function(){this.zoomTransform=ff.zoomIdentity.translate(0,0).scale(1)}},{key:"zoomTo",value:function(e,t){var n=void 0===t?500:t;this.zoomCanvasInvokeZoomBehavior(e,n)}},{key:"translateBy",value:function(e,t,n){var i=this.getZoomTransform(),o=ff.zoomIdentity.translate(i.x+e,i.y+t).scale(i.k);this.zoomCanvasInvokeZoomBehavior(o,n)}},{key:"zoomIn",value:function(){if(this.zoomTransform.k<this.maxScaleExtent){var e=Math.min(1.1*this.zoomTransform.k,this.maxScaleExtent);this.ren.canvasSVG.call(this.zoomHandler.scaleTo,e)}}},{key:"zoomOut",value:function(){if(this.zoomTransform.k>this.minScaleExtent){var e=Math.max(this.zoomTransform.k/1.1,this.minScaleExtent);this.ren.canvasSVG.call(this.zoomHandler.scaleTo,e)}}},{key:"isZoomedToMax",value:function(){return!!this.zoomTransform&&this.zoomTransform.k===this.maxScaleExtent}},{key:"isZoomedToMin",value:function(){return!!this.zoomTransform&&this.zoomTransform.k===this.minScaleExtent}},{key:"setMaxZoomExtent",value:function(e){if(!this.zooming){var t=this.maxScaleExtent*e;this.zoomHandler=this.zoomHandler.scaleExtent([this.minScaleExtent,t]),this.ren.resetCanvasSVGBehaviors()}}},{key:"transformPos",value:function(e){return{x:(e.x-this.zoomTransform.x)/this.zoomTransform.k,y:(e.y-this.zoomTransform.y)/this.zoomTransform.k}}},{key:"unTransformPos",value:function(e){return{x:e.x*this.zoomTransform.k+this.zoomTransform.x,y:e.y*this.zoomTransform.k+this.zoomTransform.y}}},{key:"getTransformedRect",value:function(e,t){var n=t/this.zoomTransform.k;return{x:-this.zoomTransform.x/this.zoomTransform.k+n,y:-this.zoomTransform.y/this.zoomTransform.k+n,height:e.height/this.zoomTransform.k-2*n,width:e.width/this.zoomTransform.k-2*n}}},{key:"zoomStart",value:function(e){var t=this;this.logger.log("zoomStart - "+JSON.stringify(e.transform)),this.ren.canvasController.closeTip(),this.zooming=!0,this.ren.canvasController.isContextMenuDisplayed()&&!this.ren.dispUtils.isDisplayingSubFlowInPlace()&&(this.ren.canvasController.closeContextMenu(),this.contextMenuClosedOnZoom=!0),this.ren.svgCanvasTextArea.isEditingText()&&(this.textEditingClosedOnZoom=!0),this.regionSelect=this.isRegionSelectActivated(e),this.regionSelect?(this.addingCursorOverlay=setTimeout((function(){return t.ren.addTempCursorOverlay("crosshair")}),200),this.regionStartTransformX=e.transform.x,this.regionStartTransformY=e.transform.y):this.isDragActivated(e)?this.addingCursorOverlay=setTimeout((function(){return t.ren.addTempCursorOverlay("grabbing")}),200):this.addingCursorOverlay=setTimeout((function(){return t.ren.addTempCursorOverlay("default")}),200);var n=this.ren.getTransformedMousePos(e);this.zoomStartPoint={x:e.transform.x,y:e.transform.y,k:e.transform.k,startX:n.x,startY:n.y},this.previousD3Event=gf({},e.transform),this.zoomCanvasDimensions=this.getCanvasDimensions()}},{key:"zoomAction",value:function(e){this.logger.log("zoomAction - "+JSON.stringify(e.transform)),e.transform.k===this.zoomStartPoint.k?this.regionSelect?this.drawRegionSelector(e):this.zoomCanvasBackground(e):(this.ren.addTempCursorOverlay("default"),this.zoomCanvasBackground(e),this.ren.repositionCommentToolbar())}},{key:"zoomEnd",value:function(e){this.logger.log("zoomEnd - "+JSON.stringify(e.transform)),clearTimeout(this.addingCursorOverlay);var t=this.ren.getTransformedMousePos(e);t.x!==this.zoomStartPoint.startX||t.y!==this.zoomStartPoint.startY||this.zoomChanged()?this.regionSelect?this.zoomEndRegionSelect(e):this.ren.dispUtils.isDisplayingFullPage()&&this.zoomChanged()&&this.zoomSave():this.zoomClick(e),this.ren.resetCanvasCursor(e),this.ren.removeTempCursorOverlay(),this.contextMenuClosedOnZoom=!1,this.textEditingClosedOnZoom=!1,this.regionSelect=!1,this.zooming=!1}},{key:"zoomChanged",value:function(){return this.zoomTransform.k!==this.zoomStartPoint.k||this.zoomTransform.x!==this.zoomStartPoint.x||this.zoomTransform.y!==this.zoomStartPoint.y}},{key:"isDragActivated",value:function(e){return this.ren.config.enableInteractionType===Ee?this.isSpaceKeyPressed():e&&e.sourceEvent&&!e.sourceEvent.shiftKey}},{key:"isRegionSelectActivated",value:function(e){return!this.zoomingAction&&(!!(this.ren.config.enableInteractionType===Pe&&e&&e.sourceEvent&&e.sourceEvent.shiftKey)||(this.ren.config.enableInteractionType===Ee&&!this.isSpaceKeyPressed()||!(this.ren.config.enableInteractionType!==Ne||!e.sourceEvent||1!==e.sourceEvent.buttons||this.isSpaceKeyPressed())))}},{key:"drawRegionSelector",value:function(e){this.removeRegionSelector();var t=this.getRegionDimensions(e),n=t.x,i=t.y,o=t.width,r=t.height;this.ren.canvasGrp.append("rect").attr("width",o).attr("height",r).attr("x",n).attr("y",i).attr("class","d3-region-selector")}},{key:"zoomEndRegionSelect",value:function(e){this.removeRegionSelector(),e.transform.x=this.regionStartTransformX,e.transform.y=this.regionStartTransformY,this.ren.selectObjsInRegion(this.getRegionDimensions(e))}},{key:"removeRegionSelector",value:function(){this.ren.canvasGrp.selectAll(".d3-region-selector").remove()}},{key:"getRegionDimensions",value:function(e){var t=this.ren.getTransformedMousePos(e),n=this.zoomStartPoint.startX,i=this.zoomStartPoint.startY,o=t.x-n,r=t.y-i;return o<0&&(n-=o=Math.abs(o)),r<0&&(i-=r=Math.abs(r)),{x:n,y:i,width:o,height:r}}},{key:"zoomCanvasBackground",value:function(e){if(this.regionSelect=!1,this.ren.dispUtils.isDisplayingPrimaryFlowFullPage()){var t=this.getTransformIncrement(e);this.zoomTransform=this.zoomConstrainRegular(t,this.getViewportDimensions(),this.zoomCanvasDimensions)}else this.zoomTransform=ff.zoomIdentity.translate(e.transform.x,e.transform.y).scale(e.transform.k);this.ren.canvasGrp.attr("transform",this.zoomTransform),this.ren.displayCanvasAccoutrements()}},{key:"zoomClick",value:function(e){var t;this.ren.dispUtils.isDisplayingCurrentPipeline()&&!this.contextMenuClosedOnZoom&&!this.textEditingClosedOnZoom&&(this.ren.config.enableEditingActions||null!==(t=e.sourceEvent)&&void 0!==t&&null!==(t=t.target)&&void 0!==t&&null!==(t=t.classList)&&void 0!==t&&t.contains("d3-svg-background"))&&this.ren.canvasController.clearSelections()}},{key:"zoomSave",value:function(){this.ren.canvasSVG.property("__zoom",this.zoomTransform);var e={editType:"setZoom",editSource:"canvas",zoom:this.zoomTransform,pipelineId:this.ren.activePipeline.id};this.ren.canvasController.editActionHandler(e)}},{key:"getTransformIncrement",value:function(e){var t=e.transform.x-this.previousD3Event.x,n=e.transform.y-this.previousD3Event.y,i={x:this.zoomTransform.x+t,y:this.zoomTransform.y+n,k:e.transform.k};return this.previousD3Event=gf({},e.transform),i}},{key:"zoomConstrainRegular",value:function(e,t,n){if(!n)return this.zoomTransform;var i=e.k,o=e.x,r=e.y,a=this.convertRectAdjustedForScaleWithPadding(n,i,this.getZoomToFitPadding()),s=t.width-Math.min(.25*t.width,.25*a.width),l=-Math.max(a.width-.25*t.width,.75*a.width),c=t.height-Math.min(.25*t.height,.25*a.height),u=-Math.max(a.height-.25*t.height,.75*a.height);return o>-a.left+s?o=-a.left+s:o<-a.left+l&&(o=-a.left+l),r>-a.top+c?r=-a.top+c:r<-a.top+u&&(r=-a.top+u),ff.zoomIdentity.translate(o,r).scale(i)}},{key:"restoreZoom",value:function(){var e=this.ren.canvasController.getSavedZoom(this.ren.activePipeline.id);if(!e&&this.ren.config.enablePanIntoViewOnOpen){var t=this.getCanvasDimensionsWithPadding();t&&(e={x:-t.left,y:-t.top,k:1})}!e&&this.ren.canvasLayout.initialPanX&&this.ren.canvasLayout.initialPanY&&(e={x:this.ren.canvasLayout.initialPanX,y:this.ren.canvasLayout.initialPanY,k:1}),!e||e.k===this.zoomTransform.k&&e.x===this.zoomTransform.x&&e.y===this.zoomTransform.y||this.zoomCanvasInvokeZoomBehavior(e)}},{key:"zoomCanvasInvokeZoomBehavior",value:function(e,t){if(e&&isFinite(e.x)&&isFinite(e.y)&&isFinite(e.k)&&this.zoomHasChanged(e)){this.zoomingAction=!0;var n=ff.zoomIdentity.translate(e.x,e.y).scale(e.k);t?this.ren.canvasSVG.call(this.zoomHandler).transition().duration(t).call(this.zoomHandler.transform,n):this.ren.canvasSVG.call(this.zoomHandler.transform,n),this.zoomingAction=!1}}},{key:"zoomHasChanged",value:function(e){return e.k!==this.zoomTransform.k||e.x!==this.zoomTransform.x||e.y!==this.zoomTransform.y}},{key:"zoomToFit",value:function(){var e=this.getCanvasDimensionsWithPadding(),t=this.getViewportDimensions();if(e){var n=t.width/e.width,i=t.height/e.height,o=Math.min(n,i,1),r=(t.width-e.width*o)/2,a=(t.height-e.height*o)/2;r-=o*e.left,a-=o*e.top,this.zoomCanvasInvokeZoomBehavior({x:r,y:a,k:o})}}},{key:"getZoomToReveal",value:function(e,t,n){var i=this.getTransformedViewportDimensions(),o=this.ren.activePipeline.getNodes(e),r=this.ren.activePipeline.getComments(e),a=this.ren.activePipeline.getLinks(e);if(o.length>0||r.length>0||a.length>0){var s,l,c=it.getCanvasDimensions(o,r,a,0,0,!0),u=this.convertRectAdjustedForScaleWithPadding(c,1,30),d=parseInt(t,10),h=void 0===n?d:parseInt(n,10);if(u)if(Number.isNaN(d)||Number.isNaN(h)?(u.right>i.x+i.width&&(s=i.x+i.width-u.right),u.left<i.x&&(s=i.x-u.left),u.bottom>i.y+i.height&&(l=i.y+i.height-u.bottom),u.top<i.y&&(l=i.y-u.top)):(s=i.x+i.width*(d/100)-(u.left+u.width/2),l=i.y+i.height*(h/100)-(u.top+u.height/2)),void 0!==s||void 0!==l)return{x:this.zoomTransform.x+(s||0)*this.zoomTransform.k||0,y:this.zoomTransform.y+(l||0)*this.zoomTransform.k||0,k:this.zoomTransform.k}}return null}},{key:"getMaxZoomToFitPaddingForConnections",value:function(){var e=this.getMaxPaddingForConnectionsFromInputBindingNodes(),t=this.getMaxPaddingForConnectionsToOutputBindingNodes();return Math.max(e,t)}},{key:"getMaxPaddingForConnectionsFromInputBindingNodes",value:function(){var e=this,t=0;return this.ren.activePipeline.nodes.filter((function(e){return e.isSupernodeInputBinding})).forEach((function(n){var i=it.getNodePaddingToTargetNodes(n,e.ren.activePipeline.nodes,e.ren.activePipeline.links,e.ren.canvasLayout.linkType);t=Math.max(t,i)})),t}},{key:"getMaxPaddingForConnectionsToOutputBindingNodes",value:function(){var e=this,t=0,n=this.ren.activePipeline.nodes.filter((function(e){return e.isSupernodeOutputBinding}));return this.ren.activePipeline.nodes.forEach((function(i){var o=it.getNodePaddingToTargetNodes(i,n,e.ren.activePipeline.links,e.ren.canvasLayout.linkType);t=Math.max(t,o)})),t}},{key:"getTransformedViewportDimensions",value:function(){var e=this.getViewportDimensions();return this.getTransformedRect(e,0)}},{key:"getViewportDimensions",value:function(){var e={};if(this.ren.dispUtils.isDisplayingSubFlowInPlace()){var t=this.ren.getParentSupernodeSVGDimensions();e.width=t.width,e.height=t.height}else e=this.ren.canvasSVG&&this.ren.canvasSVG.node()?this.ren.canvasSVG.node().getBoundingClientRect():{x:0,y:0,width:1100,height:640};return e}},{key:"getCanvasDimensionsWithPadding",value:function(){return this.getCanvasDimensions(this.getZoomToFitPadding())}},{key:"getCanvasDimensions",value:function(e){var t=this.ren.canvasLayout.commentHighlightGap,n=this.ren.activePipeline.getCanvasDimensions(t);return this.convertRectAdjustedForScaleWithPadding(n,1,e)}},{key:"convertRectAdjustedForScaleWithPadding",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e?{left:e.left*t-n,top:e.top*t-n,right:e.right*t+n,bottom:e.bottom*t+n,width:e.width*t+2*n,height:e.height*t+2*n}:null}},{key:"getZoomToFitPadding",value:function(){var e=this.ren.canvasLayout.zoomToFitPadding;if(this.ren.dispUtils.isDisplayingSubFlow()){var t=this.getMaxZoomToFitPaddingForConnections()+2*this.ren.canvasLayout.supernodeBindingPortRadius;e=Math.max(e,t)}return e}}])}(),yf=function(){return e((function e(n){t(this,e),this.logger=new pt("SVGCanvasUtilsAccessibility"),this.logger.log("constructor - start"),this.ap=n,this.initialize(),this.logger.log("constructor - end")}),[{key:"initialize",value:function(){this.logger.logStartTimer("initialize"),this.tabObjects=this.createTabObjectsArray(),this.currentTabObjectIndex=-1,this.resetTabGroupIndexBasedOnSelection(),this.logger.logEndTimer("initialize")}},{key:"resetTabObjectIndex",value:function(){this.currentTabObjectIndex=-1}},{key:"createTabObjectsArray",value:function(){var e=this.getObjectGroups(),t=this.getEntryComments(),n=this.getEntryLinks(),i=this.getEntryNodes(),o=this.getEntryNodesForLoops(e),r=[].concat(w(t),w(i),w(n),w(o));return r=r.sort(this.sortTabGroups.bind(this))}},{key:"getEntryComments",value:function(){var e=this;if(this.ap.canvasInfo.hideComments)return[];var t=this.ap.pipeline.comments.filter((function(t){return!e.commentHasLinks(t)}));return t=t.map((function(e){return{type:"comment",obj:e}}))}},{key:"getEntryLinks",value:function(){var e=this.ap.pipeline.links.filter((function(e){return e.srcPos}));return e=e.map((function(e){return{type:"link",obj:e}}))}},{key:"getEntryNodes",value:function(){var e=this,t=this.ap.pipeline.nodes.filter((function(t){return!e.nodeHasInputLinks(t)}));return t=t.map((function(e){return{type:"node",obj:e}}))}},{key:"getEntryNodesForLoops",value:function(e){var t=this,n=[];return e.forEach((function(e){if(0===e.filter((function(e){return!t.nodeHasInputLinks(e)})).length){var i=t.getLoopEntryNode(e);n.push(i)}})),n}},{key:"getLoopEntryNode",value:function(e){var t=null,n=1/0;return e.forEach((function(e){e.x_pos<n&&(t=e,n=e.x_pos)})),{type:"node",obj:t}}},{key:"getObjectGroups",value:function(){var e=this,t=[],n=-1;return this.ap.pipeline.nodes.forEach((function(i){if(void 0===i.grp){var o=[];n++,e.getNodesInGroup(i,o,n),t.push(o)}})),this.ap.pipeline.comments.forEach((function(e){void 0===e.grp&&(n++,e.grp=n)})),this.ap.pipeline.links.forEach((function(e){void 0===e.grp&&(n++,e.grp=n)})),t}},{key:"getNodesInGroup",value:function(e,t,n){var i=this;if(void 0===e.grp){e.grp=n,t.push(e);var o=this.getInputDataLinks(e);o=o.map((function(e){return e.grp=n,e}));var r=this.getOutputDataLinks(e);r=r.map((function(e){return e.grp=n,e}));var a=this.getAssociationLinks(e);a=a.map((function(e){return e.grp=n,e}));var s=this.getCommentLinks(e);s=s.map((function(e){return e.grp=n,e}));var l=this.getSrcNodes(o),c=this.getTrgNodes(r),u=this.getAssocNodes(a,e),d=this.getConnectedComments(s);l.forEach((function(e){void 0===e.grp&&i.getNodesInGroup(e,t,n)})),c.forEach((function(e){void 0===e.grp&&i.getNodesInGroup(e,t,n)})),u.forEach((function(e){void 0===e.grp&&i.getNodesInGroup(e,t,n)})),d.forEach((function(e){void 0===e.grp&&(e.grp=n)}))}}},{key:"getSrcNodes",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.ap.getNode(e.srcNodeId);i&&n.push(i)})),n}},{key:"getTrgNodes",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.ap.getNode(e.trgNodeId);i&&n.push(i)})),n}},{key:"getAssocNodes",value:function(e,t){var n=this,i=[];return e.forEach((function(e){var o=e.srcNodeId===t.id?e.trgNodeId:e.srcNodeId,r=n.ap.getNode(o);r&&i.push(r)})),i}},{key:"getConnectedComments",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.ap.getComment(e.srcNodeId);i&&n.push(i)})),n}},{key:"sortTabGroups",value:function(e,t){var n=this.getTagGroupYCoord(e),i=this.getTagGroupYCoord(t);return n>i||n===i&&this.getTagGroupXCoord(e)>this.getTagGroupXCoord(t)?1:-1}},{key:"getTagGroupYCoord",value:function(e){return"link"===e.type?e.obj.srcPos.y_pos:e.obj.y_pos}},{key:"getTagGroupXCoord",value:function(e){return"link"===e.type?e.obj.srcPos.x_pos:e.obj.x_pos}},{key:"getInputDataLinks",value:function(e){return this.ap.pipeline.links.filter((function(t){return t.type===J&&t.trgNodeId===e.id}))}},{key:"getOutputDataLinks",value:function(e){return this.ap.pipeline.links.filter((function(t){return t.type===J&&t.srcNodeId===e.id}))}},{key:"getAssociationLinks",value:function(e){return this.ap.pipeline.links.filter((function(t){return t.type===ee&&(t.srcNodeId===e.id||t.trgNodeId===e.id)}))}},{key:"getCommentLinks",value:function(e){return this.ap.pipeline.links.filter((function(t){return t.type===ue&&t.trgNodeId===e.id}))}},{key:"resetTabGroupIndexBasedOnSelection",value:function(){if(this.ap.selections.length>0){var e=this.ap.selections[this.ap.selections.length-1],t=this.ap.getNode(e);if(t)return void this.setTabGroupIndexForObj(t);var n=this.ap.getComment(e);if(n)return void this.setTabGroupIndexForObj(n);var i=this.ap.getLink(e);if(i)return void this.setTabGroupIndexForObj(i)}}},{key:"setTabGroupIndexForObj",value:function(e){this.currentTabObjectIndex=this.tabObjects.findIndex((function(t){return t.obj.grp===e.grp}))}},{key:"nodeHasInputLinks",value:function(e){return!!(e.inputs&&e.inputs.length>0)&&this.getLinksToNode(e,J).length>0}},{key:"commentHasLinks",value:function(e){return this.getLinksFromComment(e).length>0}},{key:"getNextTabGroupStartObject",value:function(){return this.currentTabObjectIndex===this.tabObjects.length&&(this.currentTabObjectIndex=-1),this.currentTabObjectIndex<this.tabObjects.length&&(this.currentTabObjectIndex++,this.currentTabObjectIndex<this.tabObjects.length)?this.tabObjects[this.currentTabObjectIndex].obj:null}},{key:"getPreviousTabGroupStartObject",value:function(){return-1===this.currentTabObjectIndex&&(this.currentTabObjectIndex=this.tabObjects.length),this.currentTabObjectIndex>-1&&(this.currentTabObjectIndex--,this.currentTabObjectIndex>-1)?this.tabObjects[this.currentTabObjectIndex].obj:null}},{key:"getAllLinksForNode",value:function(e){var t=this,n=[];return this.getLinksFromNode(e,J).forEach((function(e){n.push({link:e,type:"node",obj:e.srcObj})})),this.getLinksToNode(e,J).forEach((function(e){n.push({link:e,type:"node",obj:e.trgNode})})),this.getLinksFromNode(e,ee).forEach((function(e){n.push({link:e,type:"node",obj:e.srcObj})})),this.getLinksToNode(e,ee).forEach((function(e){n.push({link:e,type:"node",obj:e.trgNode})})),this.getLinksToNode(e,ue).forEach((function(e){n.push({link:e,type:"comment",obj:t.ap.getComment(e.srcNodeId)})})),n}},{key:"getNextLinksFromNode",value:function(e){var t=this,n=[];return this.getLinksFromNode(e,J).forEach((function(e){n.push({link:e,type:"node",obj:t.ap.getNode(e.trgNodeId)})})),this.getLinksFromNode(e,ee).forEach((function(i){n.push({link:i,type:"node",obj:t.ap.getNode(e.id===i.srcNodeId?i.trgNodeId:i.srcNodeId)})})),this.getLinksToNode(e,ee).forEach((function(e){n.push({link:e,type:"node",obj:e.trgNode})})),this.getLinksToNode(e,ue).forEach((function(e){n.push({link:e,type:"comment",obj:t.ap.getComment(e.srcNodeId)})})),n}},{key:"getNextLinksFromComment",value:function(e){var t=this,n=[];return this.getLinksFromComment(e).forEach((function(e){n.push({link:e,type:"node",obj:t.ap.getNode(e.trgNodeId)})})),n}},{key:"getNextSiblingLink",value:function(e){var t=e.navObject?e.navObject:e.srcObj,n=it.isNode(t)?this.getAllLinksForNode(t):this.getNextLinksFromComment(t),i=n.findIndex((function(t){return t.link.id===e.id}));return i>-1?i===n.length-1?n[0].link:n[i+1].link:null}},{key:"getPreviousSiblingLink",value:function(e){var t=e.navObject?e.navObject:e.srcObj,n=it.isNode(t)?this.getAllLinksForNode(t):this.getNextLinksFromComment(t),i=n.findIndex((function(t){return t.link.id===e.id}));return i>-1?0===i?n[n.length-1].link:n[i-1].link:null}},{key:"getNextNodeFromDataLink",value:function(e){return this.ap.getNode(e.trgNodeId)}},{key:"getNextNodeFromAssocLink",value:function(e){return e.srcNodeId===e.navObject.id?e.trgNode:e.srcObj}},{key:"getNextObjectFromCommentLink",value:function(e){return e.srcNodeId===e.navObject.id?e.trgNode:e.srcObj}},{key:"getPreviousLinksToNode",value:function(e){var t=this,n=[];return this.getLinksToNode(e,J).forEach((function(e){n.push({link:e,type:"node",obj:t.ap.getNode(e.trgNodeId)})})),n}},{key:"getPreviousNodeFromDataLink",value:function(e){return e.srcObj}},{key:"getPreviousNodeFromAssocLink",value:function(e){return e.srcObjId===e.navObject.id?e.srcObj:e.trgNode}},{key:"getPreviousObjectFromCommentLink",value:function(e){return e.srcObjId===e.navObject.id?e.srcObj:e.trgNode}},{key:"getLinksToNode",value:function(e,t){return this.ap.pipeline.links.filter((function(n){return n.type===t&&n.trgNodeId===e.id}))}},{key:"getLinksFromNode",value:function(e,t){return this.ap.pipeline.links.filter((function(n){return n.type===t&&n.srcNodeId===e.id}))}},{key:"getLinksFromComment",value:function(e){return this.ap.pipeline.links.filter((function(t){return t.srcNodeId===e.id}))}}])}(),mf=function(){return e((function e(n,i,o){t(this,e),this.logger=new pt("SVGCanvasActivePipeline"),this.logger.log("constructor - start"),this.initialize(n,i,o),this.logger.log("constructor - end")}),[{key:"initialize",value:function(e,t,n){this.logger.logStartTimer("initialize"),this.canvasInfo=t,this.selections=n.pipelineId===e?n.selections:[],this.pipeline=this.getPipeline(e,t),this.id=this.pipeline.id,this.zoom=this.pipeline.zoom,this.nodes=this.pipeline.nodes,this.comments=this.pipeline.comments,this.links=this.pipeline.links,this.mappedNodes=this.getMappedArray(this.pipeline.nodes),this.mappedComments=this.getMappedArray(this.pipeline.comments),this.mappedLinks=this.getMappedArray(this.pipeline.links),this.pipeline=this.preProcessPipeline(this.pipeline),this.accessibility=null,this.logger.logEndTimer("initialize")}},{key:"getAccessibility",value:function(){return this.accessibility||(this.accessibility=new yf(this)),this.accessibility}},{key:"getAllLinksForNode",value:function(e){return this.getAccessibility().getAllLinksForNode(e)}},{key:"getNextLinksFromNode",value:function(e){return this.getAccessibility().getNextLinksFromNode(e)}},{key:"getPreviousLinksToNode",value:function(e){return this.getAccessibility().getPreviousLinksToNode(e)}},{key:"getPreviousNodeFromDataLink",value:function(e){return this.getAccessibility().getPreviousNodeFromDataLink(e)}},{key:"getPreviousNodeFromAssocLink",value:function(e){return this.getAccessibility().getPreviousNodeFromAssocLink(e)}},{key:"getPreviousObjectFromCommentLink",value:function(e){return this.getAccessibility().getPreviousObjectFromCommentLink(e)}},{key:"getNextLinksFromComment",value:function(e){return this.getAccessibility().getNextLinksFromComment(e)}},{key:"getNextNodeFromDataLink",value:function(e){return this.getAccessibility().getNextNodeFromDataLink(e)}},{key:"getNextNodeFromAssocLink",value:function(e){return this.getAccessibility().getNextNodeFromAssocLink(e)}},{key:"getNextObjectFromCommentLink",value:function(e){return this.getAccessibility().getNextObjectFromCommentLink(e)}},{key:"getNextSiblingLink",value:function(e){return this.getAccessibility().getNextSiblingLink(e)}},{key:"getPreviousSiblingLink",value:function(e){return this.getAccessibility().getPreviousSiblingLink(e)}},{key:"getNextTabGroupStartObject",value:function(){return this.getAccessibility().getNextTabGroupStartObject()}},{key:"getPreviousTabGroupStartObject",value:function(){return this.getAccessibility().getPreviousTabGroupStartObject()}},{key:"resetTabObjectIndex",value:function(){this.getAccessibility().resetTabObjectIndex()}},{key:"setTabGroupIndexForObj",value:function(e){this.getAccessibility().setTabGroupIndexForObj(e)}},{key:"getCanvasDimensions",value:function(e){return it.getCanvasDimensions(this.pipeline.nodes,this.pipeline.comments,this.pipeline.links,e)}},{key:"getObjectTypeName",value:function(e){return this.getComment(e.id)?"comment":this.getNode(e.id)?"node":"link"}},{key:"getNode",value:function(e){var t=this.mappedNodes[e];return void 0===t?null:t}},{key:"getNodes",value:function(e){var t=this;if(!e)return this.pipeline.nodes;var n=[];return e.forEach((function(e){var i=t.getNode(e);i&&n.push(i)})),n}},{key:"getSupernodes",value:function(){return this.pipeline.nodes.filter((function(e){return it.isSupernode(e)}))}},{key:"isEmptyOrBindingsOnly",value:function(){return(mt(this.pipeline.nodes)||this.containsOnlyBindingNodes())&&mt(this.pipeline.comments)&&mt(this.pipeline.links)}},{key:"containsOnlyBindingNodes",value:function(){return!this.pipeline.nodes.find((function(e){return!it.isSuperBindingNode(e)}))}},{key:"getComment",value:function(e){var t=this.mappedComments[e];return void 0===t?null:t}},{key:"getComments",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.getComment(e);i&&n.push(i)})),n}},{key:"getNodesAndComments",value:function(){return this.pipeline.nodes.concat(this.pipeline.comments)}},{key:"getNodeOrComment",value:function(e){var t=this.getNode(e);return null===t&&(t=this.getComment(e)),t}},{key:"getLink",value:function(e){var t=this.mappedLinks[e];return void 0===t?null:t}},{key:"getLinks",value:function(e){var t=this,n=[];return e.forEach((function(e){var i=t.getLink(e);i&&n.push(i)})),n}},{key:"replaceLink",value:function(e){var t=this.pipeline.links.findIndex((function(t){return t.id===e.id}));this.pipeline.links.splice(t,1,e),this.mappedLinks=this.getMappedArray(this.pipeline.links)}},{key:"getPipeline",value:function(e,t){var n=t.pipelines.find((function(t){return t.id===e}));return n||{id:e,nodes:[],comments:[],links:[]}}},{key:"preProcessPipeline",value:function(e){var t=this;return this.setAllPortsDisconnected(e),e.links.forEach((function(e){e.type===ue?(e.srcObj=t.getComment(e.srcNodeId),e.trgNode=t.getNode(e.trgNodeId)):(e.srcObj=t.getNode(e.srcNodeId),e.trgNode=t.getNode(e.trgNodeId),e.type===J&&(e.srcObj&&t.setOutputPortConnected(e.srcObj,e.srcNodePortId),e.trgNode&&t.setInputPortConnected(e.trgNode,e.trgNodePortId)))})),e}},{key:"setAllPortsDisconnected",value:function(e){e.nodes.forEach((function(e){e.inputs&&e.inputs.forEach((function(e){return e.isConnected=!1})),e.outputs&&e.outputs.forEach((function(e){return e.isConnected=!1}))}))}},{key:"setInputPortConnected",value:function(e,t){var n=t||it.getDefaultInputPortId(e);e.inputs&&e.inputs.forEach((function(e){e.id===n&&(e.isConnected=!0)}))}},{key:"setOutputPortConnected",value:function(e,t){var n=t||it.getDefaultOutputPortId(e);e.outputs&&e.outputs.forEach((function(e){e.id===n&&(e.isConnected=!0)}))}},{key:"getMappedArray",value:function(e){return e.reduce((function(e,t){return e[t.id]=t,e}),{})}},{key:"getSelectedObjectIds",value:function(){return this.selections}},{key:"getSelectedNodesAndComments",value:function(){var e=this,t=this.getSelectedNodes();return this.comments.forEach((function(n){e.getSelectedObjectIds().includes(n.id)&&t.push(n)})),t}},{key:"getSelectedNodes",value:function(){var e=this,t=[];return this.getSelectedObjectIds().forEach((function(n){var i=e.getNode(n);i&&t.push(i)})),t}},{key:"getSelectedComments",value:function(){var e=this,t=[];return this.getSelectedObjectIds().forEach((function(n){var i=e.getComment(n);i&&t.push(i)})),t}},{key:"getSelectedNodeIds",value:function(){return this.getSelectedNodes().map((function(e){return e.id}))}},{key:"getSelectedLinks",value:function(){var e=this,t=[];return this.links.forEach((function(n){e.getSelectedObjectIds().includes(n.id)&&t.push(n)})),t}},{key:"getSelectedDetachedLinks",value:function(){return this.getSelectedLinks().filter((function(e){return e.srcPos||e.trgPos}))}},{key:"getSelectedLinksCount",value:function(){return this.getSelectedLinks().length}},{key:"isSelected",value:function(e){return this.getSelectedObjectIds().indexOf(e)>=0}}])}();function bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function kf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bf(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xf=Object.assign({},id,Id),wf=require("markdown-it")({html:!0,linkify:!1,typographer:!0}),Cf=function(){function i(e,n,o,r,a,s,l,c,u){var d=arguments.length>9&&void 0!==arguments[9]?arguments[9]:{};t(this,i),this.logger=new pt(["SVGCanvasRenderer","PipeId",e]),this.logger.logStartTimer("constructor"+e.substring(0,5)),this.pipelineId=e,this.supernodeInfo=d,this.canvasDiv=n,this.canvasInfo=r,this.selectionInfo=a,this.breadcrumbs=s,this.nodeLayout=l,this.canvasLayout=c,this.config=u,this.canvasController=o,this.activePipeline=new mf(e,r,a),this.superRenderers=[],this.instanceId=this.canvasController.getInstanceId(),this.dispUtils=new Md(this.canvasController,this.supernodeInfo.d3Selection,this.pipelineId,s),this.nodeUtils=new Vd(this.canvasLayout),this.commentUtils=new jd,this.linkUtils=new Wd(this.config,this.canvasLayout,this.nodeUtils,this.commentUtils),this.decUtils=new Xd(this.canvasLayout),this.dragObjectUtils=new Nh(this),this.dragNewLinkUtils=new ip(this),this.dragDetLinkUtils=new rp(this),this.zoomUtils=new vf(this),this.externalUtils=new qd(this),this.svgCanvasTextArea=new sh(this.config,this.dispUtils,this.nodeUtils,this.decUtils,this.canvasController,this.canvasDiv,this.activePipeline,this.removeTempCursorOverlay.bind(this),this.displayComments.bind(this),this.displayLinks.bind(this),this.getCommentToolbarPos.bind(this),this.addCanvasZoomBehavior.bind(this),this.removeCanvasZoomBehavior.bind(this)),this.dispUtils.setDisplayState(),this.logger.log(this.dispUtils.getDisplayStateMsg()),this.dragOverLink=null,this.dragOverDetachedLinks=[],this.dragNewLinkOverNode=null,this.initializeGhostDiv(),this.canvasSVG=this.createCanvasSVG(),this.canvasDefs=this.canvasSVG.selectChildren("defs"),this.canvasGrp=this.createCanvasGroup(this.canvasSVG,"d3-canvas-group"),this.canvasUnderlay=this.createCanvasUnderlay(this.canvasGrp,"d3-canvas-underlay"),this.commentsGrp=this.createCanvasGroup(this.canvasGrp,"d3-comments-group"),this.nodesLinksGrp=this.createCanvasGroup(this.canvasGrp,"d3-nodes-links-group"),this.boundingRectsGrp=this.createBoundingRectanglesGrp(this.canvasGrp,"d3-bounding-rect-group"),this.resetCanvasSVGBehaviors(),this.displayCanvas(),this.dispUtils.isDisplayingFullPage()&&this.zoomUtils.restoreZoom(),this.dispUtils.isDisplayingSubFlowFullPage()&&!this.canvasController.getSavedZoom(this.pipelineId)&&this.zoomToFit(),this.dispUtils.isDisplayingSubFlowInPlace()&&(this.supernodeInfo.d3Selection.selectAll(".d3-node-port-input").raise(),this.supernodeInfo.d3Selection.selectAll(".d3-node-port-output").raise()),this.logger.logEndTimer("constructor"+e.substring(0,5))}return e(i,[{key:"setSpaceKeyPressed",value:function(e){this.zoomUtils.setSpaceKeyPressed(e),this.resetCanvasCursor()}},{key:"isSpaceKeyPressed",value:function(){return this.zoomUtils.isSpaceKeyPressed()}},{key:"zoomTo",value:function(e,t){this.zoomUtils.zoomTo(e,t)}},{key:"translateBy",value:function(e,t,n){this.zoomUtils.translateBy(e,t,n)}},{key:"zoomIn",value:function(){this.zoomUtils.zoomIn()}},{key:"zoomOut",value:function(){this.zoomUtils.zoomOut()}},{key:"zoomToFit",value:function(){this.zoomUtils.zoomToFit()}},{key:"isZoomedToMax",value:function(){return this.zoomUtils.isZoomedToMax()}},{key:"isZoomedToMin",value:function(){return this.zoomUtils.isZoomedToMin()}},{key:"getZoomToReveal",value:function(e,t,n){return this.zoomUtils.getZoomToReveal(e,t,n)}},{key:"getZoom",value:function(){return this.zoomUtils.getZoom()}},{key:"getTransformedViewportDimensions",value:function(){return this.zoomUtils.getTransformedViewportDimensions()}},{key:"getCanvasDimensionsWithPadding",value:function(){return this.zoomUtils.getCanvasDimensionsWithPadding()}},{key:"getParentSupernodeDatum",value:function(){var e=this,t=null;return this.canvasInfo.pipelines.forEach((function(n){n.id===e.supernodeInfo.pipelineId&&(t||(t=n.nodes.find((function(t){return it.isSupernode(t)&&t.id===e.supernodeInfo.id}))))})),t}},{key:"setCanvasInfoRenderer",value:function(e,t,n,i,o,r){this.logger.logStartTimer("setCanvasInfoRenderer"+this.pipelineId.substring(0,5)),this.config=r,this.canvasInfo=e,this.selectionInfo=t,this.breadcrumbs=n,this.nodeLayout=i,this.canvasLayout=o,this.activePipeline.initialize(this.pipelineId,e,t),this.linkUtils=new Wd(this.config,this.canvasLayout,this.nodeUtils,this.commentUtils),this.svgCanvasTextArea=new sh(this.config,this.dispUtils,this.nodeUtils,this.decUtils,this.canvasController,this.canvasDiv,this.activePipeline,this.removeTempCursorOverlay.bind(this),this.displayComments.bind(this),this.displayLinks.bind(this),this.getCommentToolbarPos.bind(this),this.addCanvasZoomBehavior.bind(this),this.removeCanvasZoomBehavior.bind(this)),this.dispUtils.setDisplayState(),this.logger.log(this.dispUtils.getDisplayStateMsg()),this.resetCanvasSVGBehaviors(),this.superRenderers=this.cleanUpSuperRenderers(),this.displayCanvas(),this.config.enableKeyboardNavigation&&this.restoreFocus(),this.logger.logEndTimer("setCanvasInfoRenderer"+this.pipelineId.substring(0,5))}},{key:"setSelectionInfo",value:function(e){this.selectionInfo=e,this.activePipeline.initialize(this.pipelineId,this.canvasInfo,e),this.displayCommentsSelectionStatus(),this.displayNodesSelectionStatus(),this.displayLinksSelectionStatus(),this.superRenderers.forEach((function(t){t.setSelectionInfo(e)}))}},{key:"cleanUpSuperRenderers",value:function(){var e=this,t=[];return this.activePipeline.getSupernodes().forEach((function(n){var i=e.getRendererForSupernode(n);i&&t.push(i),e.getDiscardedRenderersForSupernode(n).forEach((function(e){return e.canvasSVG.remove()}))})),t}},{key:"clearCanvas",value:function(){this.zoomUtils.resetZoomTransform(),this.canvasSVG.remove()}},{key:"refreshOnSizeChange",value:function(){if(this.logger.log("refreshOnSizeChange"),this.dispUtils.isDisplayingSubFlowFullPage()&&this.displayBindingNodesToFitSVG(),this.config.enableBoundingRectangles&&this.displayBoundingRectangles(),this.config.enablePositionNodeOnRightFlyoutOpen&&this.canvasController.isRightFlyoutOpen()){var e="boolean"==typeof this.config.enablePositionNodeOnRightFlyoutOpen?{x:50,y:50}:this.config.enablePositionNodeOnRightFlyoutOpen,t=e.x?e.x:50,n=e.y?e.y:50,i=this.activePipeline.getSelectedNodeIds(),o=this.getZoomToReveal(i,t,n);this.zoomTo(o)}}},{key:"hideCanvas",value:function(){this.canvasSVG.style("display","none")}},{key:"displayCanvas",value:function(){this.logger.logStartTimer("displayCanvas"),this.canvasSVG.style("display","inherit"),this.displayComments(),this.displayNodes(),this.displayLinks(),this.dispUtils.isDisplayingSubFlowInPlace()&&this.displaySVGToFitSupernode(),this.displayCanvasAccoutrements(),this.logger.logEndTimer("displayCanvas")}},{key:"displayCanvasAccoutrements",value:function(){this.config.enableBoundingRectangles&&this.displayBoundingRectangles(),"None"!==this.config.enableCanvasUnderlay&&this.dispUtils.isDisplayingPrimaryFlowFullPage()&&this.setCanvasUnderlaySize(),this.dispUtils.isDisplayingSubFlowFullPage()&&this.displayPortsForSubFlowFullPage()}},{key:"displayPortsForSubFlowFullPage",value:function(){this.setPortPositionsForNode(this.getParentSupernodeDatum()),this.displayBindingNodesToFitSVG()}},{key:"displaySVGToFitSupernode",value:function(){this.logger.log("displaySVGToFitSupernode - start");var e=this.getParentSupernodeSVGDimensions();this.canvasSVG.attr("width",e.width),this.canvasSVG.attr("height",e.height),this.canvasSVG.attr("x",e.x),this.canvasSVG.attr("y",e.y);var t=this.canvasSVG.selectChildren(".d3-svg-background");t.attr("width",e.width),t.attr("height",e.height),this.zoomToFit(),this.displayBindingNodesToFitSVG(),this.logger.log("displaySVGToFitSupernode - end")}},{key:"displayBindingNodesToFitSVG",value:function(){this.logger.log("displayBindingNodesToFitSVG - start"),this.setPortPositionsAllNodes(),this.moveSuperBindingNodes(),this.displayMovedNodes(),this.displayMovedLinks(),this.logger.log("displayBindingNodesToFitSVG - end")}},{key:"getParentSupernodeSVGDimensions",value:function(){var e=this.getParentSupernodeDatum();return{width:e.width-2*this.canvasLayout.supernodeSVGAreaPadding,height:e.height-this.canvasLayout.supernodeTopAreaHeight-this.canvasLayout.supernodeSVGAreaPadding,x:this.canvasLayout.supernodeSVGAreaPadding,y:this.canvasLayout.supernodeTopAreaHeight,x_pos:e.x_pos+this.canvasLayout.supernodeSVGAreaPadding,y_pos:e.y_pos+this.canvasLayout.supernodeTopAreaHeight}}},{key:"moveSuperBindingNodes",value:function(){var e=this,t=this.zoomUtils.getTransformedViewportDimensions(),n=this.getParentSupernodeDatum();if(this.canvasLayout.linkDirection===Te||this.canvasLayout.linkDirection===De){var i=n.width-2*this.canvasLayout.supernodeSVGAreaPadding;this.activePipeline.nodes.forEach((function(o){if(o.isSupernodeInputBinding){var r=e.nodeUtils.getSupernodePortXOffset(o.id,n.inputs);o.x_pos=t.width*(r/i)+t.x-o.outputs[0].cx,o.y_pos=e.canvasLayout.linkDirection===Te?t.y-o.height:t.y+t.height}if(o.isSupernodeOutputBinding){var a=e.nodeUtils.getSupernodePortXOffset(o.id,n.outputs);o.x_pos=t.width*(a/i)+t.x-o.inputs[0].cx,o.y_pos=e.canvasLayout.linkDirection===Te?o.y_pos=t.y+t.height:o.y_pos=t.y-o.height}}))}else{var o,r;it.isExpanded(n)?(o=this.canvasLayout.supernodeTopAreaHeight,r=n.height-(this.canvasLayout.supernodeTopAreaHeight+this.canvasLayout.supernodeSVGAreaPadding)):(o=0,r=n.height),this.activePipeline.nodes.forEach((function(i){if(i.isSupernodeInputBinding){i.x_pos=e.canvasLayout.linkDirection===Se?t.x-i.width:t.x+t.width;var a=e.nodeUtils.getSupernodePortYOffset(i.id,n.inputs)-o;i.y_pos=t.height*(a/r)+t.y-i.outputs[0].cy}if(i.isSupernodeOutputBinding){i.x_pos=e.canvasLayout.linkDirection===Se?t.x+t.width:t.x-i.width;var s=e.nodeUtils.getSupernodePortYOffset(i.id,n.outputs)-o;i.y_pos=t.height*(s/r)+t.y-i.inputs[0].cy}}))}}},{key:"displayBoundingRectangles",value:function(){if(this.activePipeline){var e=this.zoomUtils.getViewportDimensions(),t=this.zoomUtils.getTransformedRect(e,1),n=this.zoomUtils.getCanvasDimensions(),i=this.zoomUtils.getCanvasDimensionsWithPadding();this.boundingRectsGrp.selectChildren(".d3-bounding").remove();var o=this.boundingRectsGrp.append("g").attr("class","d3-bounding");o.append("rect").attr("height",e.height).attr("width",e.width).attr("x",0).attr("y",0).style("fill","none").style("stroke","darkorange"),o.append("rect").attr("height",t.height).attr("width",t.width-2).attr("x",t.x).attr("y",t.y).style("fill","none").style("stroke","red"),n&&o.append("rect").attr("height",n.height).attr("width",n.width).attr("x",n.left).attr("y",n.top).style("fill","none").style("stroke","blue"),i&&o.append("rect").attr("height",i.height).attr("width",i.width).attr("x",i.left).attr("y",i.top).style("fill","none").style("stroke","green"),this.config.enableBoundingRectangles&&this.superRenderers.length>0&&this.superRenderers.forEach((function(e){return e.displayBoundingRectangles()}))}}},{key:"selectObjsInRegion",value:function(e){var t=it.selectInRegion(e,this.activePipeline,this.config.enableLinkSelection!==Oe,this.config.enableLinkType,this.config.enableAssocLinkType);this.canvasController.setSelections(t,this.activePipeline.id)}},{key:"isEditingText",value:function(){if(this.svgCanvasTextArea.isEditingText())return!0;var e=!1;return this.superRenderers.forEach((function(t){e||(e=t.isEditingText())})),e}},{key:"isDragging",value:function(){return this.dragObjectUtils.isMoving()||this.dragNewLinkUtils.isDragging()||this.dragDetLinkUtils.isDragging()}},{key:"isSizing",value:function(){this.dragObjectUtils.isSizing()}},{key:"isMoving",value:function(){this.dragObjectUtils.isMoving()}},{key:"getAllNodeGroupsSelection",value:function(){return this.nodesLinksGrp.selectChildren(".d3-node-group")}},{key:"getAllLinkGroupsSelection",value:function(){return this.nodesLinksGrp.selectChildren(".d3-link-group")}},{key:"getAllCommentGroupsSelection",value:function(){return this.commentsGrp.selectChildren(".d3-comment-group")}},{key:"getNodeGroupSelectionById",value:function(e){var t=this.getSelectorForId("node_grp",e);return this.nodesLinksGrp.selectChildren(t)}},{key:"getLinkGroupSelectionById",value:function(e){var t=this.getSelectorForId("link_grp",e);return this.nodesLinksGrp.selectChildren(t)}},{key:"getCommentGroupSelectionById",value:function(e){var t=this.getSelectorForId("comment_grp",e);return this.commentsGrp.selectChildren(t)}},{key:"getNodeDecSelectionById",value:function(e,t){var n=this.getNodeGroupSelectionById(t),i=this.getSelectorForId("node_dec_group",e);return n.selectAll(i)}},{key:"getLinkDecSelectionById",value:function(e,t){var n=this.getLinkGroupSelectionById(t),i=this.getSelectorForId("link_dec_group",e);return n.selectAll(i)}},{key:"getSelectorForId",value:function(e,t,n){return"[data-id='".concat(this.getId(e,t,n),"']")}},{key:"getId",value:function(e,t,n){var i="".concat(e,"_").concat(this.instanceId);return t&&(i+="_".concat(t)),n&&(i+="_".concat(n)),i}},{key:"getMousePosSnapToGrid",value:function(e){var t=e;return this.config.enableSnapToGridType!==ve&&this.config.enableSnapToGridType!==ye||(t=this.snapToGridPosition(t)),t}},{key:"getTransformedMousePos",value:function(e){return this.zoomUtils.transformPos(this.getMousePos(e,this.canvasSVG))}},{key:"getMousePos",value:function(e,t){if(e.sourceEvent||e.pageX){var n=xf.pointer(e,t.node());return{x:n[0],y:n[1]}}return{x:0,y:0}}},{key:"convertPageCoordsToSnappedCanvasCoords",value:function(e){var t=this.convertPageCoordsToCanvasCoords(e.x,e.y);return t=this.getMousePosSnapToGrid(t)}},{key:"convertPageCoordsToCanvasCoords",value:function(e,t){var n=this.canvasSVG.node().getBoundingClientRect();return this.zoomUtils.transformPos({x:e-Math.round(n.left),y:t-Math.round(n.top)})}},{key:"convertCanvasCoordsToPageCoords",value:function(e,t){var n=this.canvasSVG.node().getBoundingClientRect(),i=this.zoomUtils.unTransformPos({x:e,y:t});return{x:i.x+Math.round(n.left),y:i.y+Math.round(n.top)}}},{key:"initializeGhostDiv",value:function(){this.dispUtils.isDisplayingFullPage()&&this.getGhostDivSel().empty()&&this.canvasDiv.append("div").attr("class","d3-ghost-div")}},{key:"getGhostDivSel",value:function(){return this.canvasDiv.selectAll(".d3-ghost-div")}},{key:"getGhostNode",value:function(e){var t=this,n=this.getGhostDivSel(),i=this.zoomUtils.getZoomScale(),o=Math.max(this.nodeLayout.labelWidth,e.width),r=0;n.selectAll(".d3-ghost-svg").remove();var a=n.append("svg").attr("width",o*i).attr("height",(50+e.height)*i).attr("x",0).attr("y",0).attr("class","d3-ghost-svg").append("g").attr("class","d3-node-group");if(a.append("rect").attr("class","d3-ghost-node").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height),!this.nodeLayout.nodeExternalObject){a.append((function(){return t.getImageElement(e)})).each((function(n,i,o){return t.setNodeImageContent(e,i,o)})).attr("x",this.nodeUtils.getNodeImagePosX(e)).attr("y",this.nodeUtils.getNodeImagePosY(e)).attr("width",this.nodeUtils.getNodeImageWidth(e)).attr("height",this.nodeUtils.getNodeImageHeight(e));var s=a.append("foreignObject").attr("x",this.nodeUtils.getNodeLabelPosX(e)).attr("y",this.nodeUtils.getNodeLabelPosY(e)).attr("width",this.nodeUtils.getNodeLabelWidth(e)).attr("height",this.nodeUtils.getNodeLabelHeight(e)).attr("class","d3-foreign-object-ghost-label"),l=s.append("xhtml:div").attr("class",this.nodeUtils.getNodeLabelClass(e)),c=l.append("xhtml:span").html(e.label).node().getBoundingClientRect().width+4,u=this.nodeUtils.getNodeLabelWidth(e),d=Math.min(u,c);if(r=Math.max(0,(d-e.width)/2)*i,"center"===e.layout.labelAlign){var h=Math.max(0,(u-d)/2);s.attr("width",d).attr("x",this.nodeUtils.getNodeLabelPosX(e)+h),l.attr("width",d)}}a.attr("transform","translate(".concat(r,", 0) scale(").concat(i,")"));var p=this.getBrowserZoom(),g=(r+e.width/2*i)*p,f=e.height/2*i*p;return{element:n.node(),centerX:g,centerY:f,nodeTemplate:e}}},{key:"getBrowserZoom",value:function(){var e=window.devicePixelRatio;return navigator.userAgent.includes("Chrome")?e=1:navigator.userAgent.includes("Safari")?e=(window.outerWidth-8)/window.innerWidth:navigator.userAgent.includes("Firefox")&&(e=1),e}},{key:"nodeTemplateDragStart",value:function(e){this.isNodeTemplateInsertableIntoLink(e)&&this.setDataLinkSelectionAreaWider(!0)}},{key:"nodeTemplateDragEnd",value:function(e){this.isNodeTemplateInsertableIntoLink(e)&&this.setDataLinkSelectionAreaWider(!1)}},{key:"nodeTemplateDragOver",value:function(e,t,n){if(this.isNodeTemplateInsertableIntoLink(e)){var i=this.getLinkAtMousePos(t,n);i&&!this.isLinkFullyAttached(i)||this.setInsertNodeIntoLinkHighlighting(i)}if(this.isNodeTemplateAttachableToDetachedLinks(e)){var o=this.convertPageCoordsToCanvasCoords(t,n),r={x1:o.x-e.width/2,y1:o.y-e.height/2,x2:o.x+e.width/2,y2:o.y+e.height/2},a=this.canvasController.convertNodeTemplate(e),s=this.getAttachableLinksForNodeAtPos(a,r);this.setDetachedLinkHighlighting(s)}"None"!==this.config.enableCanvasUnderlay&&this.dispUtils.isDisplayingPrimaryFlowFullPage()&&this.setCanvasUnderlaySize(t,n)}},{key:"setInsertNodeIntoLinkHighlighting",value:function(e){e?this.dragOverLink?e.id!==this.dragOverLink.id&&(this.unsetInsertNodeIntoLinkHighlighting(),this.dragOverLink=e,this.setNodeDragOverLinkHighlighting(this.dragOverLink,!0)):(this.dragOverLink=e,this.setNodeDragOverLinkHighlighting(this.dragOverLink,!0)):this.unsetInsertNodeIntoLinkHighlighting()}},{key:"unsetInsertNodeIntoLinkHighlighting",value:function(e){this.dragOverLink&&(this.setNodeDragOverLinkHighlighting(this.dragOverLink,!1),this.dragOverLink=null)}},{key:"setDetachedLinkHighlighting",value:function(e){var t=this;e&&e.length>0?(this.unsetDetachedLinkHighlighting(),this.dragOverDetachedLinks=e,this.dragOverDetachedLinks.forEach((function(e){return t.setNodeDragOverLinkHighlighting(e,!0)}))):this.dragOverDetachedLinks.length>0&&this.unsetDetachedLinkHighlighting()}},{key:"unsetDetachedLinkHighlighting",value:function(){var e=this;this.dragOverDetachedLinks.forEach((function(t){return e.setNodeDragOverLinkHighlighting(t,!1)})),this.dragOverDetachedLinks=[]}},{key:"setNodeDragOverLinkHighlighting",value:function(e,t){this.getLinkGroupSelectionById(e.id).attr("data-drag-node-over",!!t||null)}},{key:"setHighlightingOverNode",value:function(e,t){e?this.dragNewLinkOverNode?t.id!==this.dragNewLinkOverNode.id&&(this.setLinkOverNode(this.dragNewLinkOverNode,!1),this.dragNewLinkOverNode=t,this.setLinkOverNode(this.dragNewLinkOverNode,!0)):(this.dragNewLinkOverNode=t,this.setLinkOverNode(this.dragNewLinkOverNode,!0)):this.dragNewLinkOverNode&&(this.setLinkOverNode(this.dragNewLinkOverNode,!1),this.dragNewLinkOverNode=null)}},{key:"setLinkOverNode",value:function(e,t){e&&this.getNodeGroupSelectionById(e.id).attr("data-new-link-over",t?"yes":"no")}},{key:"setLinkOverNodeCancel",value:function(){this.setLinkOverNode(this.dragNewLinkOverNode,!1),this.dragNewLinkOverNode=null}},{key:"nodeTemplateDropped",value:function(e,t,n){if(null!==e){var i=this.transformMousePosForNode(t,n,e);this.dragOverLink?(this.canvasController.createNodeFromTemplateOnLinkAt(e,this.dragOverLink,i,this.pipelineId),this.unsetInsertNodeIntoLinkHighlighting()):this.dragOverDetachedLinks.length>0?(this.canvasController.createNodeFromTemplateAttachLinks(e,this.dragOverDetachedLinks,i,this.pipelineId),this.unsetDetachedLinkHighlighting()):this.canvasController.createNodeFromTemplateAt(e,i,this.pipelineId)}}},{key:"externalObjectDropped",value:function(e,t,n){if(null!==e){var i=this.transformMousePosForNode(t,n);this.canvasController.createDroppedExternalObject(e,i,this.pipelineId)}}},{key:"transformMousePosForNode",value:function(e,t,n){var i=this.convertPageCoordsToCanvasCoords(e,t);return n&&n.width&&n.height?(i.x-=n.width/2,i.y-=n.height/2):(i.x-=this.nodeLayout.defaultNodeWidth/2,i.y-=this.nodeLayout.defaultNodeHeight/2),this.getMousePosSnapToGrid(i)}},{key:"isNodeTemplateInsertableIntoLink",value:function(e){return this.config.enableInsertNodeDroppedOnLink&&it.hasInputAndOutputPorts(e)&&!this.isPortMaxCardinalityZero(e.inputs[0])&&!this.isPortMaxCardinalityZero(e.outputs[0])}},{key:"isNodeTemplateAttachableToDetachedLinks",value:function(e){return this.config.enableLinkSelection===me}},{key:"getAttachableLinksForNodeAtPos",value:function(e,t){var n=this,i=e.inputs&&e.inputs.length>0,o=e.outputs&&e.outputs.length>0,r=this.activePipeline.links.filter((function(e){return e.srcPos&&o&&it.isPosInArea(e.srcPos,t,n.canvasLayout.ghostAreaPadding)?(e.nodeOverSrcPos=!0,!0):e.trgPos&&i&&it.isPosInArea(e.trgPos,t,n.canvasLayout.ghostAreaPadding)?(e.nodeOverTrgPos=!0,!0):(e.nodeOverSrcPos=!1,e.nodeOverTrgPos=!1,!1)}));r.length>0&&(r=it.getDetachedLinksToUpdate(e,r,this.activePipeline.links).oldLinks);return r}},{key:"isLinkFullyAttached",value:function(e){return!!e&&(void 0!==e.srcNodeId&&void 0!==e.trgNodeId)}},{key:"setMaxZoomExtent",value:function(e){if(this.dispUtils.isDisplayingFullPage())this.zoomUtils.setMaxZoomExtent(e);else{var t=1*Number(e)/this.zoomUtils.getZoomScale();this.supernodeInfo.renderer.setMaxZoomExtent(t)}}},{key:"createCanvasSVG",value:function(){var e=this;this.logger.log("Create Canvas SVG.");var t=this.canvasDiv,n={width:"100%",height:"100%",x:0,y:0};this.dispUtils.isDisplayingSubFlowInPlace()&&(t=this.supernodeInfo.d3Selection,n=this.getParentSupernodeSVGDimensions());var i=t.append("svg").attr("class","svg-area").attr("data-pipeline-id",this.activePipeline.id).attr("width",n.width).attr("height",n.height).attr("x",n.x).attr("y",n.y).on("mouseenter",(function(t,n){e.supernodeInfo.renderer&&e.config.enableZoomIntoSubFlows&&e.supernodeInfo.renderer.setMaxZoomExtent(1/e.zoomUtils.getZoomScale())})).on("mouseleave",(function(t,n){e.supernodeInfo.renderer&&e.config.enableZoomIntoSubFlows&&e.supernodeInfo.renderer.setMaxZoomExtent(1)}));if(i.append("rect").attr("x",0).attr("y",0).attr("width",n.width).attr("height",n.height).attr("data-pipeline-id",this.activePipeline.id).attr("class","d3-svg-background").attr("pointer-events","all").style("cursor","default").on("mousedown",(function(){e.svgCanvasTextArea.isEditingText()||e.canvasController.setFocusOnCanvas()})),this.dispUtils.isDisplayingFullPage()){var o=i.append("defs");this.createDropShadow(o)}return i}},{key:"resetCanvasSVGBehaviors",value:function(){var e=this;this.removeCanvasZoomBehavior(),!this.activePipeline.isEmptyOrBindingsOnly()&&this.dispUtils.isDisplayingFullPage()&&this.canvasSVG.call(this.zoomUtils.getZoomHandler()),this.canvasSVG.on("mousedown",(function(t){e.logger.log("Canvas - mousedown"),e.dispUtils.isDisplayingSubFlowInPlace()&&t.button===Ae&&t.stopPropagation()})).on("click.zoom",(function(t){e.logger.log("Canvas - click-zoom"),e.canvasController.clickActionHandler({clickType:"contextmenu"===t.type?ze:Ce,objectType:"canvas",selectedObjectIds:e.activePipeline.getSelectedObjectIds()})})).on("dblclick.zoom",(function(){e.logger.log("Zoom - double click"),e.canvasController.clickActionHandler({clickType:Ie,objectType:"canvas",selectedObjectIds:e.activePipeline.getSelectedObjectIds()})})).on("contextmenu.zoom",(function(t,n){e.logger.log("Zoom - context menu"),e.openContextMenu(t,"canvas")}))}},{key:"addCanvasZoomBehavior",value:function(){this.resetCanvasSVGBehaviors()}},{key:"removeCanvasZoomBehavior",value:function(){this.canvasSVG.on(".zoom",null)}},{key:"resetCanvasCursor",value:function(){var e=".d3-svg-background[data-pipeline-id='"+this.activePipeline.id+"']";this.canvasSVG.select(e).style("cursor",this.zoomUtils.isDragActivated()&&this.dispUtils.isDisplayingFullPage()?"grab":"default")}},{key:"createCanvasGroup",value:function(e,t){return e.append("g").attr("class",t)}},{key:"createCanvasUnderlay",value:function(e,t){return"None"!==this.config.enableCanvasUnderlay&&this.dispUtils.isDisplayingPrimaryFlowFullPage()?e.append("rect").attr("class",t):null}},{key:"createBoundingRectanglesGrp",value:function(e,t){return this.config.enableBoundingRectangles?e.append("g").attr("class",t):null}},{key:"setCanvasUnderlaySize",value:function(){var e=this.zoomUtils.getCanvasDimensionsWithPadding();e&&this.canvasUnderlay.attr("x",e.left-50).attr("y",e.top-50).attr("width",e.width+100).attr("height",e.height+100)}},{key:"createDropShadow",value:function(e){var t=e.append("filter").attr("id",this.getId("node_drop_shadow")).attr("x","-20%").attr("y","-20%").attr("width","200%").attr("height","200%");t.append("feOffset").attr("in","SourceAlpha").attr("dx",1).attr("dy",1).attr("result","offOut"),t.append("feGaussianBlur").attr("in","offOut").attr("stdDeviation","3").attr("result","blurOut"),t.append("feBlend").attr("in","SourceGraphic").attr("in2","blurOut").attr("mode","normal"),t.append("feComponentTransfer").append("feFuncA").attr("type","linear").attr("slope","0.2");var n=t.append("feMerge");n.append("feMergeNode"),n.append("feMergeNode").attr("in","SourceGraphic")}},{key:"setCommentEditingMode",value:function(e,t){if(this.pipelineId===t){var n=this.activePipeline.getComment(e);if(n&&this.config.enableEditingActions){var i=this.getCommentGroupSelectionById(e).node();this.displayCommentTextArea(n,i)}}else this.superRenderers.forEach((function(n){n.setCommentEditingMode(e,t)}))}},{key:"setNodeLabelEditingMode",value:function(e,t){if(this.pipelineId===t){var n=this.activePipeline.getNode(e);if(n&&n.layout.labelEditable&&this.config.enableEditingActions){var i=this.getNodeGroupSelectionById(e).node();this.displayNodeLabelTextArea(n,i)}}else this.superRenderers.forEach((function(n){n.setNodeLabelEditingMode(e,t)}))}},{key:"setNodeDecorationLabelEditingMode",value:function(e,t,n){if(this.pipelineId===n){var i=this.activePipeline.getNode(t);if(i&&i.decorations){var o=i.decorations.find((function(t){return t.id===e}));if(o&&void 0!==o.label&&o.label_editable&&this.config.enableEditingActions){var r=this.getNodeDecSelectionById(e,t).node();this.displayDecLabelTextArea(o,i,"node",r)}}}else this.superRenderers.forEach((function(i){i.setLinkDecorationLabelEditingMode(e,t,n)}))}},{key:"setLinkDecorationLabelEditingMode",value:function(e,t,n){if(this.pipelineId===n){var i=this.activePipeline.getLink(t);if(i&&i.decorations){var o=i.decorations.find((function(t){return t.id===e}));if(o&&void 0!==o.label&&o.label_editable&&this.config.enableEditingActions){var r=this.getLinkDecSelectionById(e,t).node();this.displayDecLabelTextArea(o,i,"link",r)}}}else this.superRenderers.forEach((function(i){i.setLinkDecorationLabelEditingMode(e,t,n)}))}},{key:"repositionCommentToolbar",value:function(){if(this.dispUtils.isDisplayingFullPage()&&this.svgCanvasTextArea.isEditingText()){var e=this.activePipeline.getComment(this.svgCanvasTextArea.getEditingTextId());if(e&&(e.contentType===Z||this.config.enableMarkdownInComments)){var t=this.getCommentToolbarPos(e);this.canvasController.moveTextToolbar(t.x,t.y)}}}},{key:"getCommentToolbarPos",value:function(e){var t=this.zoomUtils.unTransformPos({x:e.x_pos,y:e.y_pos});return{x:t.x+this.canvasLayout.commentToolbarPosX,y:t.y+this.canvasLayout.commentToolbarPosY}}},{key:"snapToGridPosition",value:function(e){return{x:it.snapToGrid(e.x,this.canvasLayout.snapToGridXPx),y:it.snapToGrid(e.y,this.canvasLayout.snapToGridYPx)}}},{key:"displayNodes",value:function(){this.logger.logStartTimer("displayNodes "+this.getFlags()),this.setPortPositionsAllNodes();var e=this.getAllNodeGroupsSelection();this.displayNodesSubset(e,this.activePipeline.nodes),this.logger.logEndTimer("displayNodes "+this.getFlags())}},{key:"displayMovedNodes",value:function(){var e=this;this.logger.logStartTimer("displayMovedNodes");var t=this.getAllNodeGroupsSelection();t.datum((function(t){return e.activePipeline.getNode(t.id)})).attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})),this.dispUtils.isDisplayingSubFlow()&&t.each((function(t,n,i){t.isSupernodeInputBinding&&(e.updatePortRadiusAndPos(i[n],t,"d3-node-port-output-main"),e.updateOutputPortArrowPath(i[n],"d3-node-port-output-arrow")),t.isSupernodeOutputBinding&&(e.updatePortRadiusAndPos(i[n],t,"d3-node-port-input-main"),e.updateInputPortArrowPath(i[n],"d3-node-port-input-arrow"))})),this.logger.logEndTimer("displayMovedNodes")}},{key:"displayNodesSelectionStatus",value:function(e){var t=this;this.logger.logStartTimer("displayNodesSelectionStatus"),this.getAllNodeGroupsSelection().selectChildren(".d3-node-selection-highlight").attr("data-selected",(function(e){return t.activePipeline.isSelected(e.id)?"yes":"no"})),this.logger.logEndTimer("displayNodesSelectionStatus")}},{key:"displaySingleNode",value:function(e){this.logger.logStartTimer("displaySingleNode "+this.getFlags()),this.setPortPositionsForNode(e);var t=this.getNodeGroupSelectionById(e.id);this.displayNodesSubset(t,[e]),this.logger.logEndTimer("displaySingleNode "+this.getFlags())}},{key:"displayNodesSubset",value:function(e,t){var n=this;e.data(t,(function(e){return e.id})).join((function(e){return n.createNodes(e)}),null,(function(e){return n.removeNodes(e)})).attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})).attr("class",(function(e){return n.getNodeGroupClass(e)})).attr("style",(function(e){return n.getNodeGrpStyle(e)})).attr("tabindex",(function(e){return n.config.enableKeyboardNavigation?-1:null})).call((function(e){return n.updateNodes(e,t)}))}},{key:"createNodes",value:function(e){var t=this;this.logger.logStartTimer("createNodes");var n=e.append("g").attr("data-id",(function(e){return t.getId("node_grp",e.id)})).call(this.attachNodeGroupListeners.bind(this));return this.logger.logEndTimer("createNodes"),n}},{key:"updateNodes",value:function(e,t){var n=this;this.logger.logStartTimer("updateNodes");var i=e.filter((function(e){return!it.isSuperBindingNode(e)}));if(i.selectChildren(".d3-focus-path").data((function(e){return[e]}),(function(e){return e.id})).join((function(e){return null})).attr("d",(function(e){return n.getNodeShapePathSizing(e)})),i.selectChildren(".d3-node-sizing").data((function(e){return it.isNodeResizable(e,n.config)?[e]:[]}),(function(e){return e.id})).join((function(e){return e.append("path").attr("class","d3-node-sizing").call(n.attachNodeSizingListeners.bind(n))})).datum((function(e){return n.activePipeline.getNode(e.id)})).attr("d",(function(e){return n.getNodeShapePathSizing(e)})),i.selectChildren(".d3-node-selection-highlight").data((function(e){return[e]}),(function(e){return e.id})).join((function(e){return e.append("path").attr("class","d3-node-selection-highlight")})).datum((function(e){return n.activePipeline.getNode(e.id)})).attr("d",(function(e){return n.getNodeSelectionOutline(e)})).attr("data-selected",(function(e){return n.activePipeline.isSelected(e.id)?"yes":"no"})).attr("style",(function(e){return n.getNodeSelectionOutlineStyle(e,"default")})),i.selectChildren(".d3-node-body-outline").data((function(e){return e.layout.nodeShapeDisplay?[e]:[]}),(function(e){return e.id})).join((function(e){return e.append("path").attr("class","d3-node-body-outline")})).datum((function(e){return n.activePipeline.getNode(e.id)})).attr("d",(function(e){return n.getNodeShapePath(e)})).attr("style",(function(e){return n.getNodeBodyStyle(e,"default")})),i.selectChildren(".d3-foreign-object-external-node").data((function(e){return e.layout.nodeExternalObject?[e]:[]}),(function(e){return e.id})).join((function(e){return e.append("foreignObject").attr("class","d3-foreign-object-external-node")}),null,(function(e){e.each((function(e,t,i){return n.externalUtils.removeExternalObject(e,t,i)})),e.remove()})).datum((function(e){return n.activePipeline.getNode(e.id)})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("x",0).attr("y",0).each((function(e,t,i){return n.externalUtils.addNodeExternalObject(e,t,i)})),i.selectChildren(".d3-node-image").data((function(e){return e.layout.imageDisplay?[e]:[]}),(function(e){return e.id})).join((function(e){return e.append((function(e){return n.getImageElement(e)}))})).datum((function(e){return n.activePipeline.getNode(e.id)})).each((function(e,t,i){return n.setNodeImageContent(e,t,i)})).attr("x",(function(e){return n.nodeUtils.getNodeImagePosX(e)})).attr("y",(function(e){return n.nodeUtils.getNodeImagePosY(e)})).attr("width",(function(e){return n.nodeUtils.getNodeImageWidth(e)})).attr("height",(function(e){return n.nodeUtils.getNodeImageHeight(e)})).attr("style",(function(e){return n.getNodeImageStyle(e,"default")})),i.selectChildren(".d3-foreign-object-node-label").data((function(e){return e.layout.labelDisplay?[e]:[]}),(function(e){return e.id})).join((function(e){var t=e.append("foreignObject").attr("class","d3-foreign-object-node-label").call(n.attachNodeLabelListeners.bind(n));return t.append("xhtml:div").append("xhtml:span").call(n.attachNodeLabelSpanListeners.bind(n)),t})).datum((function(e){return n.activePipeline.getNode(e.id)})).attr("x",(function(e){return n.nodeUtils.getNodeLabelPosX(e)})).attr("y",(function(e){return n.nodeUtils.getNodeLabelPosY(e)})).attr("width",(function(e){return n.nodeUtils.getNodeLabelWidth(e)})).attr("height",(function(e){return n.nodeUtils.getNodeLabelHeight(e)})).select("div").attr("class",(function(e){return n.nodeUtils.getNodeLabelClass(e)})).attr("style",(function(e){return n.getNodeLabelStyle(e,"default")})).select("span").html((function(e){return hd(e.label)})),i.selectChildren(".d3-node-ellipsis-group").attr("transform",(function(e){return n.nodeUtils.getNodeEllipsisTranslate(e)})),i.selectChildren(".d3-node-super-expand-icon-group").attr("transform",(function(e){return n.nodeUtils.getNodeExpansionIconTranslate(e)})),e.each((function(e,t,i){var o=xf.select(i[t]);if(n.displayPorts(o,e),it.isSupernode(e)&&n.displaySupernodeContents(e,xf.select(i[t])),!it.isSuperBindingNode(e)){n.addErrorMarker(e,o);var r=it.getCombinedDecorations(e.layout.decorations,e.decorations);n.displayDecorations(e,Me,o,r)}})),this.config.enableEditingActions){var o=this.dragObjectUtils.getDragObjectHandler();i.call(o)}else i.on(".drag",null);this.logger.logEndTimer("updateNodes")}},{key:"removeNodes",value:function(e){var t=this;e.selectAll(".d3-foreign-object-node-image").each((function(e,n,i){return t.externalUtils.removeExternalObject(e,n,i)})),e.selectAll(".d3-foreign-object-dec-jsx").each((function(e,n,i){return t.externalUtils.removeExternalObject(e,n,i)})),e.selectChildren(".d3-foreign-object-port-jsx").each((function(e,n,i){return t.externalUtils.removeExternalObject(e,n,i)})),e.selectChildren(".d3-foreign-object-external-node").each((function(e,n,i){return t.externalUtils.removeExternalObject(e,n,i)})),e.remove()}},{key:"displaySupernodeContents",value:function(e,t){var n=this.getRendererForSupernode(e);it.isExpanded(e)?n?n.setCanvasInfoRenderer(this.canvasInfo,this.selectionInfo,this.breadcrumbs,this.nodeLayout,this.canvasLayout,this.config):(n=this.createSupernodeRenderer(e,t),this.superRenderers.push(n)):n&&n.hideCanvas(e)}},{key:"displayPorts",value:function(e,t){this.displayInputPorts(e,t),this.displayOutputPorts(e,t)}},{key:"displayInputPorts",value:function(e,t){var n=this,i="."+this.getNodeInputPortClassName(),o=t.inputs||[];o=t.layout.inputPortDisplay?o:[],e.selectChildren(i).data(o,(function(e){return e.id})).join((function(e){return n.createInputPorts(e,t)}),null,(function(e){return n.removePorts(e)})).attr("connected",(function(e){return e.isConnected?"yes":"no"})).attr("class",(function(e){return n.getNodeInputPortClassName()+(e.class_name?" "+e.class_name:"")})).call((function(e){return n.updateInputPorts(e,t)}))}},{key:"createInputPorts",value:function(e,t){var n=this,i=e.append("g").attr("data-port-id",(function(e){return e.id})).attr("isSupernodeBinding",it.isSuperBindingNode(t)?"yes":"no").each((function(e,i,o){var r=it.getPortIndex(t.inputs,e.id),a=n.getPortDisplayInfo(t.layout.inputPortDisplayObjects,r),s=xf.select(o[i]);s.append(a.tag).attr("class","d3-node-port-input-main"+("foreignObject"===a.tag?" d3-foreign-object-port-jsx":"")),s.filter((function(){return!n.config.enableAssocLinkCreation&&a.type===He&&!it.isSuperBindingNode(t)})).append("path").attr("class","d3-node-port-input-arrow")})).call(this.attachInputPortListeners.bind(this),t);return i}},{key:"updateInputPorts",value:function(e,t){var n=this;if(e.selectChildren(".d3-node-port-input-main").datum((function(e){return t.inputs.find((function(t){return e.id===t.id}))})).each((function(e,i,o){var r=xf.select(o[i]),a=it.getPortIndex(t.inputs,e.id),s=n.getPortDisplayInfo(t.layout.inputPortDisplayObjects,a),l=n.getPortImageTransform(e,be);n.updatePort(r,s,t,e.cx,e.cy,l)})),e.selectChildren(".d3-node-port-input-arrow").datum((function(e){return t.inputs.find((function(t){return e.id===t.id}))})).each((function(e,i,o){var r=xf.select(o[i]),a=it.getPortIndex(t.inputs,e.id);n.getPortDisplayInfo(t.layout.inputPortDisplayObjects,a).type===He&&r.attr("d",n.getPortArrowPath()).attr("transform",n.getInputPortArrowPathTransform(e))})),this.config.enableEditingActions){var i=this.dragNewLinkUtils.getDragNewLinkHandler();e.call(i)}else e.on(".drag",null)}},{key:"removePorts",value:function(e){var t=this;e.selectChildren(".d3-foreign-object-port-jsx").each((function(e,n,i){return t.externalUtils.removeExternalObject(e,n,i)})),e.remove()}},{key:"displayOutputPorts",value:function(e,t){var n=this,i="."+this.getNodeOutputPortClassName(),o=t.outputs||[];o=t.layout.outputPortDisplay?o:[],o=this.config.enableSingleOutputPortDisplay&&o.length>1?[o[o.length-1]]:o,e.selectChildren(i).data(o,(function(e){return e.id})).join((function(e){return n.createOutputPorts(e,t)}),null,(function(e){return n.removePorts(e)})).attr("connected",(function(e){return e.isConnected?"yes":"no"})).attr("class",(function(e){return n.getNodeOutputPortClassName()+(e.class_name?" "+e.class_name:"")})).call((function(e){return n.updateOutputPorts(e,t)}))}},{key:"createOutputPorts",value:function(e,t){var n=this,i=e.append("g").attr("data-port-id",(function(e){return e.id})).attr("isSupernodeBinding",it.isSuperBindingNode(t)?"yes":"no").each((function(e,i,o){var r=it.getPortIndex(t.outputs,e.id),a=n.getPortDisplayInfo(t.layout.outputPortDisplayObjects,r),s=xf.select(o[i]);s.append(a.tag).attr("class","d3-node-port-output-main"+("foreignObject"===a.tag?" d3-foreign-object-port-jsx":"")),s.filter((function(){return!n.config.enableAssocLinkCreation&&a.type===He&&!it.isSuperBindingNode(t)})).append("path").attr("class","d3-node-port-output-arrow")})).call(this.attachOutputPortListeners.bind(this),t);return i}},{key:"updateOutputPorts",value:function(e,t){var n=this;if(e.selectChildren(".d3-node-port-output-main").datum((function(e){return t.outputs.find((function(t){return e.id===t.id}))})).each((function(e,i,o){var r=xf.select(o[i]),a=it.getPortIndex(t.outputs,e.id),s=n.getPortDisplayInfo(t.layout.outputPortDisplayObjects,a),l=n.getPortImageTransform(e,ke);n.updatePort(r,s,t,e.cx,e.cy,l)})),e.selectChildren(".d3-node-port-output-arrow").datum((function(e){return t.outputs.find((function(t){return e.id===t.id}))})).each((function(e,i,o){var r=xf.select(o[i]),a=it.getPortIndex(t.outputs,e.id);n.getPortDisplayInfo(t.layout.outputPortDisplayObjects,a).type===He&&r.attr("d",n.getPortArrowPath()).attr("transform",n.getOutputPortArrowPathTransform(e))})),this.config.enableEditingActions){var i=this.dragNewLinkUtils.getDragNewLinkHandler();e.call(i)}else e.on(".drag",null)}},{key:"updatePort",value:function(e,t,n,i,o,r){var a=this;t.type===_e||t.type===Ve?(t.type===_e?e.each((function(e,n,i){return a.externalUtils.addJsxExternalObject(t.src,n,i)})):e.attr("xlink:href",t.src),e.attr("x",i-t.width/2).attr("y",o-t.height/2).attr("width",t.width).attr("height",t.height).attr("transform",r)):e.attr("r",this.getPortRadius(n)).attr("cx",i).attr("cy",o)}},{key:"getPortDisplayInfo",value:function(e,t){var n=kf({},e[t<e.length?t:e.length-1]);return n.tag="jsx"===n.type?"foreignObject":n.type,n.tag="circleWithArrow"===n.type?"circle":n.tag,n.width=n.width||je,n.width=n.height||Fe,n}},{key:"attachNodeGroupListeners",value:function(e){var t=this;e.on("keydown",(function(e,n){if(t.config.enableKeyboardNavigation)if(ot.nextObjectInGroup(e)){var i=t.activePipeline.getNextLinksFromNode(n);if(i.length>0)t.activePipeline.getAllLinksForNode(n).forEach((function(e){return e.link.navObject=n})),t.setFocusObject(i[0].link,e);it.stopPropagationAndPreventDefault(e)}else if(ot.previousObjectInGroup(e)){var o=t.activePipeline.getPreviousLinksToNode(n);if(o.length>0)t.activePipeline.getAllLinksForNode(n).forEach((function(e){return e.link.navObject=n})),t.setFocusObject(o[0].link,e)}else if(ot.moveObjectUp(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,ae)})),it.stopPropagationAndPreventDefault(e);else if(ot.moveObjectDown(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,re)})),it.stopPropagationAndPreventDefault(e);else if(ot.moveObjectRight(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,ie)})),it.stopPropagationAndPreventDefault(e);else if(ot.moveObjectLeft(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,oe)})),it.stopPropagationAndPreventDefault(e);else if(ot.selectObject(e))it.stopPropagationAndPreventDefault(e),t.selectObject(e,n,"node",!1,!1);else if(ot.selectObjectAugment(e))it.stopPropagationAndPreventDefault(e),t.selectObject(e,n,"node",!1,!0);else if(ot.selectObjectRange(e))it.stopPropagationAndPreventDefault(e),t.selectObject(e,n,"node",!0,!1);else if(ot.sizeObjectUp(e))it.isNodeResizable(n,t.config)&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,ae)})),it.stopPropagationAndPreventDefault(e);else if(ot.sizeObjectDown(e))it.isNodeResizable(n,t.config)&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,re)})),it.stopPropagationAndPreventDefault(e);else if(ot.sizeObjectRight(e))it.isNodeResizable(n,t.config)&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,ie)})),it.stopPropagationAndPreventDefault(e);else if(ot.sizeObjectLeft(e))it.isNodeResizable(n,t.config)&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,oe)})),it.stopPropagationAndPreventDefault(e);else if(ot.createLink(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragNewLinkUtils.createNewLinkFromSelections()}),!0),it.stopPropagationAndPreventDefault(e);else if(ot.displayContextOptions(e)&&(e.stopPropagation(),!it.isSuperBindingNode(n)))if(t.selectObject(e,n,"node"),t.config.enableContextToolbar)t.addContextToolbar(e,n,"node",G);else{var r=t.getObjectCenterPosition(e.currentTarget);t.openContextMenu(e,"node",n,null,r)}})).on("mouseenter",(function(e,n){if(!t.isDragging()&&!t.svgCanvasTextArea.isEditingText()){var i=xf.select(e.currentTarget);t.raiseNodeToTop(i,e),t.restoreFocus(),t.setNodeStyles(n,"hover",i),t.config.enableContextToolbar?t.addContextToolbar(e,n,"node",Re):t.addDynamicNodeIcons(e,n,i)}})).on("mouseover",(function(e,n){if(e.stopPropagation(),t.canOpenTip(R)){var i=t.canvasController.getTipId(),o=t.getId("node_tip",n.id);null!==i&&i===o||(t.canvasController.closeTip(),t.canvasController.openTip({id:o,type:R,targetObj:e.currentTarget,pipelineId:t.activePipeline.id,node:n}))}})).on("mouseleave",(function(e,n){var i=xf.select(e.currentTarget);t.setNodeStyles(n,"default",i),t.config.enableContextToolbar?t.removeContextToolbar():t.removeDynamicNodeIcons(e,n,i),t.canvasController.closeTip()})).on("mousedown",(function(e,n){t.logger.logStartTimer("Node Group - mouse down"),e.stopPropagation(),t.svgCanvasTextArea.isEditingText()&&t.svgCanvasTextArea.completeEditing(e),t.config.enableDragWithoutSelect||(t.config.enableKeyboardNavigation&&(t.activePipeline.setTabGroupIndexForObj(n),t.setFocusObject(n,e)),t.selectObjectD3Event(e,n,"node")),t.logger.logEndTimer("Node Group - mouse down")})).on("click",(function(e,n){t.logger.log("Node Group - click"),e.stopPropagation()})).on("dblclick",(function(e,n){t.logger.log("Node Group - double click"),it.stopPropagationAndPreventDefault(e),t.canvasController.clickActionHandler({clickType:Ie,objectType:"node",id:n.id,selectedObjectIds:t.activePipeline.getSelectedObjectIds(),pipelineId:t.activePipeline.id})})).on("contextmenu",(function(e,n){t.logger.log("Node Group - context menu"),it.stopPropagationAndPreventDefault(e),it.isSuperBindingNode(n)||(t.config.enableDragWithoutSelect&&t.selectObjectD3Event(e,n,"node"),t.setFocusObject(n,e),t.config.enableContextToolbar||t.openContextMenu(e,"node",n))}))}},{key:"getObjectCenterPosition",value:function(e){var t=e.getBoundingClientRect(),n=this.canvasSVG.node().getBoundingClientRect();return{x:t.left-n.left+t.width/2,y:t.top-n.top+t.height/2}}},{key:"attachNodeSizingListeners",value:function(e){var t=this;e.on("mousedown",(function(e,n){t.dragObjectUtils.mouseDownNodeSizingArea(n)})).on("mousemove mouseenter",(function(e,n){t.dragObjectUtils.mouseEnterNodeSizingArea(e,n)})).on("mouseleave",(function(e,n){t.dragObjectUtils.mouseLeaveNodeSizingArea(e,n)}))}},{key:"attachNodeLabelListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){var i=xf.select(e.currentTarget);if(t.config.enableDisplayFullLabelOnHover&&!it.isExpandedSupernode(n)){var o=i.selectAll("span");i.attr("x",t.nodeUtils.getNodeLabelHoverPosX(n)).attr("width",t.nodeUtils.getNodeLabelHoverWidth(n)).attr("height",t.nodeUtils.getNodeLabelHoverHeight(n,o.node(),t.zoomUtils.getZoomScale())),o.classed("d3-label-full",!0)}})).on("mouseleave",(function(e,n){var i=xf.select(e.currentTarget);t.config.enableDisplayFullLabelOnHover&&!it.isExpandedSupernode(n)&&(i.attr("x",t.nodeUtils.getNodeLabelPosX(n)).attr("width",t.nodeUtils.getNodeLabelWidth(n)).attr("height",t.nodeUtils.getNodeLabelHeight(n)),i.selectAll("span").classed("d3-label-full",!1))})).on("dblclick",(function(e,n){t.logger.log("Node Label - double click"),n.layout.labelEditable&&t.config.enableEditingActions&&(it.stopPropagationAndPreventDefault(e),t.displayNodeLabelTextArea(n,e.currentTarget.parentNode))}))}},{key:"attachNodeLabelSpanListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){n.layout.labelEditable&&t.config.enableEditingActions&&t.displayNodeLabelEditIcon(e.currentTarget,n)})).on("mouseleave",(function(e,n){n.layout.labelEditable&&t.config.enableEditingActions&&(t.hideEditIconPending=setTimeout(t.hideEditIcon.bind(t),500,e.currentTarget,n))}))}},{key:"attachInputPortListeners",value:function(e,t){var n=this;e.on("mouseenter",(function(e,i){it.stopPropagationAndPreventDefault(e),n.canOpenTip(F)&&(n.canvasController.closeTip(),n.canvasController.openTip({id:n.getId("node_port_tip",i.id),type:F,targetObj:e.currentTarget,pipelineId:n.activePipeline.id,node:t,port:i}))})).on("mouseleave",(function(){n.canvasController.closeTip()})).on("contextmenu",(function(e,i){n.logger.log("Input Port Circle - context menu"),it.stopPropagationAndPreventDefault(e),n.config.enableDragWithoutSelect&&n.selectObjectD3Event(e,t,"node"),n.openContextMenu(e,"input_port",t,i)}))}},{key:"attachOutputPortListeners",value:function(e,t){var n=this;e.on("mouseenter",(function(e,i){it.stopPropagationAndPreventDefault(e),n.canOpenTip(F)&&(n.canvasController.closeTip(),n.canvasController.openTip({id:n.getId("node_port_tip",i.id),type:F,targetObj:e.currentTarget,pipelineId:n.activePipeline.id,node:t,port:i}))})).on("mouseleave",(function(){n.canvasController.closeTip()})).on("contextmenu",(function(e,i){n.logger.log("Output Port Circle - context menu"),it.stopPropagationAndPreventDefault(e),n.config.enableDragWithoutSelect&&n.selectObjectD3Event(e,t,"node"),n.openContextMenu(e,"output_port",t,i)}))}},{key:"setUnavailableTargetNodesHighlighting",value:function(e,t,n){this.getAllNodeGroupsSelection().filter((function(i){return!it.isTrgNodeAvailable(i,e,t,n)})).classed("d3-node-unavailable",!0)}},{key:"setUnavailableSourceNodesHighlighting",value:function(e,t,n){this.getAllNodeGroupsSelection().filter((function(i){return!it.isSrcNodeAvailable(i,e,t,n)})).classed("d3-node-unavailable",!0)}},{key:"unsetUnavailableNodesHighlighting",value:function(){this.getAllNodeGroupsSelection().classed("d3-node-unavailable",!1)}},{key:"displayNodeLabelEditIcon",value:function(e,t){var n=this,i=e.parentElement.parentElement.parentElement,o=xf.select(i),r=this.nodeUtils.getNodeLabelEditIconTranslate(t,e,this.zoomUtils.getZoomScale(),this.config.enableDisplayFullLabelOnHover);this.displayEditIcon(e,o,r,(function(e,t){return n.displayNodeLabelTextArea(t,e.currentTarget.parentNode)}))}},{key:"displayDecLabelEditIcon",value:function(e,t,n,i){var o=this,r=e.parentElement.parentElement.parentElement,a=xf.select(r),s=this.decUtils.getDecLabelEditIconTranslate(t,n,i,e,this.zoomUtils.getZoomScale());this.displayEditIcon(e,a,s,(function(e,r){return o.displayDecLabelTextArea(t,n,i,e.currentTarget.parentNode)}))}},{key:"displayEditIcon",value:function(e,t,n,i){var o=this,r=t.append("g").attr("class","d3-label-edit-icon-group").attr("transform",n).on("mouseenter",(function(e,t){o.mouseOverLabelEditIcon=!0})).on("mouseleave",(function(e,t){o.mouseOverLabelEditIcon=!1,o.hideEditIcon(this)})).on("mousedown mouseup",(function(e){it.stopPropagationAndPreventDefault(e)})).on("click",(function(e,t){it.stopPropagationAndPreventDefault(e),i(e,t),o.mouseOverLabelEditIcon=!1,o.hideEditIcon(this)}));r.append("rect").attr("class","d3-label-edit-icon-background1").attr("width",29).attr("height",24).attr("x",0).attr("y",-4),r.append("rect").attr("class","d3-label-edit-icon-background2").attr("width",24).attr("height",24).attr("x",5).attr("y",-4),r.append("svg").attr("class","d3-node-edit-label-icon").html(Be).attr("width",16).attr("height",16).attr("x",9).attr("y",0)}},{key:"hideEditIcon",value:function(e){if(!this.mouseOverLabelEditIcon){var t=e.parentElement;if(t){var n=t.parentElement.parentElement;xf.select(n).selectAll(".d3-label-edit-icon-group").remove()}}}},{key:"selectObjectD3Event",value:function(e,t,n){this.selectObject(e.type,t,n,e.shiftKey,ot.isMetaKey(e))}},{key:"selectObject",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.canvasController.selectObject(t.id,i,o,this.activePipeline.id),"node"!==n&&"link"!==n||(this.canvasController.clickActionHandler({clickType:"contextmenu"===e||this.ellipsisClicked?ze:Ce,objectType:n,id:t.id,selectedObjectIds:this.activePipeline.getSelectedObjectIds(),pipelineId:this.activePipeline.id}),this.ellipsisClicked=!1)}},{key:"displayDecorations",value:function(e,t,n,i){var o=this,r=this,a=i||[],s="d3-".concat(t,"-dec-group"),l="."+s;n.selectChildren(l).data(a,(function(e){return e.id})).join((function(e){return o.createDecorations(e,t,s)})).attr("transform",(function(n){return o.decUtils.getDecTransform(n,e,t)})).on("mousedown",(function(t,n){return n.hotspot&&0===t.button?r.callDecoratorCallback(t,e,n):null})).each((function(n,i,r){return o.updateDecoration(n,xf.select(r[i]),t,e)}))}},{key:"createDecorations",value:function(e,t,n){var i=this;return e.append("g").attr("data-id",(function(e){return i.getId("".concat(t,"_dec_group"),e.id)})).attr("class",n).call(this.attachDecGroupListeners.bind(this))}},{key:"updateDecoration",value:function(e,t,n,i){this.updateDecOutlines(e,t,n,i),this.updateDecPaths(e,t,n),this.updateDecImages(e,t,n,i),this.updateDecLabels(e,t,n,i),this.updateDecJsxObjs(e,t,n,i)}},{key:"updateDecOutlines",value:function(e,t,n,i){var o=t.selectChild("rect");e.label||e.path||e.jsx||!1===e.outline?o.remove():(o=o.empty()?t.append("rect"):o).attr("class",this.decUtils.getDecClass(e,"d3-".concat(n,"-dec-outline"))).attr("x",0).attr("y",0).attr("width",this.decUtils.getDecWidth(e,i,n)).attr("height",this.decUtils.getDecHeight(e,i,n)).lower()}},{key:"updateDecPaths",value:function(e,t,n){var i=t.selectChild("path");e.path?(i=i.empty()?t.append("path"):i).attr("class",this.decUtils.getDecClass(e,"d3-".concat(n,"-dec-path"))).attr("x",0).attr("y",0).attr("d",e.path):i.remove()}},{key:"updateDecImages",value:function(e,t,n,i){var o=this,r=t.selectChild("g");if(e.image){var a=this.getImageType(e.image);(r=r.empty()?t.append("g").append(a):r.select(a)).attr("class",this.decUtils.getDecClass(e,"d3-".concat(n,"-dec-image"))).attr("x",this.decUtils.getDecPadding(e,i,n)).attr("y",this.decUtils.getDecPadding(e,i,n)).attr("width",this.decUtils.getDecWidth(e,i,n)-2*this.decUtils.getDecPadding(e,i,n)).attr("height",this.decUtils.getDecHeight(e,i,n)-2*this.decUtils.getDecPadding(e,i,n)).each((function(){return o.setDecImageContent(r,e.image)}))}else r.remove()}},{key:"updateDecLabels",value:function(e,t,n,i){var o=t.selectChild(".d3-foreign-object-dec-label");e.label?(o.empty()&&(o=t.append("foreignObject").attr("class","d3-foreign-object-dec-label").attr("x",0).attr("y",0).call(this.attachDecLabelListeners.bind(this,i,n))).append("xhtml:div").append("xhtml:span").call(this.attachDecLabelSpanListeners.bind(this,i,n)),o.attr("width",this.decUtils.getDecLabelWidth(e,i,n)).attr("height",this.decUtils.getDecLabelHeight(e,i,n)).select("div").attr("class",this.decUtils.getDecLabelClass(e,n)).select("span").html(hd(e.label))):o.remove()}},{key:"updateDecJsxObjs",value:function(e,t,n,i){var o=this,r=t.selectChild(".d3-foreign-object-dec-jsx");e.jsx?(r.empty()&&(r=t.append("foreignObject").attr("class","d3-foreign-object-dec-jsx").attr("tabindex",-1).attr("x",0).attr("y",0).call(this.attachDecLabelListeners.bind(this,i,n))),r.attr("width",this.decUtils.getDecWidth(e,i,n)).attr("height",this.decUtils.getDecHeight(e,i,n)).each((function(e,t,n){return o.externalUtils.addDecExternalObject(e,t,n)}))):(r.each((function(e,t,n){return o.externalUtils.removeExternalObject(e,t,n)})),r.remove())}},{key:"attachDecLabelListeners",value:function(e,t,n){var i=this;n.on("dblclick",(function(n,o){i.logger.log("Decoration Label - double click"),o.label_editable&&i.config.enableEditingActions&&(it.stopPropagationAndPreventDefault(n),i.displayDecLabelTextArea(o,e,t,n.currentTarget.parentNode))}))}},{key:"attachDecLabelSpanListeners",value:function(e,t,n){var i=this;n.on("mouseenter",(function(n,o){o.label_editable&&i.config.enableEditingActions&&i.displayDecLabelEditIcon(n.currentTarget,o,e,t)})).on("mouseleave",(function(e,t){t.label_editable&&i.config.enableEditingActions&&(i.hideEditIconPending=setTimeout(i.hideEditIcon.bind(i),500,e.currentTarget,t))}))}},{key:"attachDecGroupListeners",value:function(e){var t=this;e.on("mouseenter",(function(e,n){t.canOpenTip(j)&&n.tooltip&&(t.canvasController.closeTip(),t.canvasController.openTip({id:t.getId("dec_tip",n.id),type:j,targetObj:e.currentTarget,pipelineId:t.activePipeline.id,decoration:n}))})).on("mouseleave",(function(e,n){t.canOpenTip(j)&&n.tooltip&&t.canvasController.closeTip()}))}},{key:"addErrorMarker",value:function(e,t){var n=this,i=t.selectChildren(".node-error-marker");e.messages&&e.messages.length>0?(i.empty()&&t.append("svg").attr("class","node-error-marker"),t.selectChildren(".node-error-marker").attr("class",(function(){return"node-error-marker "+n.nodeUtils.getErrorMarkerClass(e.messages)})).html(this.nodeUtils.getErrorMarkerIcon(e)).attr("width",this.nodeUtils.getNodeErrorWidth(e)).attr("height",this.nodeUtils.getNodeErrorHeight(e)).attr("x",this.nodeUtils.getNodeErrorPosX(e)).attr("y",this.nodeUtils.getNodeErrorPosY(e))):i.empty()||i.remove()}},{key:"getNodeInputPortClassName",value:function(){return this.config.enableAssocLinkCreation?"d3-node-port-input-assoc":"d3-node-port-input"}},{key:"getNodeOutputPortClassName",value:function(){return this.config.enableAssocLinkCreation?"d3-node-port-output-assoc":"d3-node-port-output"}},{key:"setNodeImageContent",value:function(e,t,n){var i=this.getNodeImage(e),o=this.getImageType(i);if("jsx"===o)this.externalUtils.addNodeImageExternalObject(i,t,n);else{var r=xf.select(n[t]);this.setImageContent(r,i,o)}}},{key:"setDecImageContent",value:function(e,t){var n=this.getImageType(t);this.setImageContent(e,t,n)}},{key:"setImageContent",value:function(e,t,n){t!==e.attr("data-image")&&(e.attr("data-image",t),"svg"===n?"LoadSVGToDefs"===this.config.enableImageDisplay?this.loadSVGToDefs(e,t):(e.selectChild("svg").remove(),xf.svg(t,{cache:"force-cache"}).then((function(t){e.node().append(t.documentElement)}))):e.attr("xlink:href",t))}},{key:"loadSVGToDefs",value:function(e,t){var n=this,i="img"+t.replaceAll(/[/.]/g,"-"),o="#"+i;this.canvasDefs.selectChildren(o).empty()&&(this.canvasDefs.append("symbol").attr("id",i),xf.svg(t,{cache:"force-cache"}).then((function(e){n.canvasDefs.selectChildren(o).node().append(e.documentElement)}))),e.selectChild("use").remove(),e.append("use").attr("href",o)}},{key:"getNodeImage",value:function(e){if(!e.image)return null;if(e.image===A){if(it.isSupernode(e))return Sl}else if(e.image===z&&it.isSupernode(e))return Ol;return e.image}},{key:"getImageType",value:function(e){if(e)if("object"===n(e)){if(this.externalUtils.isValidJsxElement(e))return"jsx"}else if("string"==typeof e)return e.endsWith(".svg")&&"SVGAsImage"!==this.config.enableImageDisplay?"svg":"image";return null}},{key:"getImageElement",value:function(e){var t=this.getNodeImage(e),n=this.getImageType(t);return"jsx"===n?xf.create("svg:foreignObject").attr("tabindex",-1).attr("class","d3-foreign-object-node-image d3-node-image").node():"svg"===n?xf.create("svg").attr("class","d3-node-image").node():xf.create("svg:image").attr("class","d3-node-image").node()}},{key:"setNodeStyles",value:function(e,t,n){this.setNodeBodyStyles(e,t,n),this.setNodeSelectionOutlineStyles(e,t,n),this.setNodeImageStyles(e,t,n),this.setNodeLabelStyles(e,t,n)}},{key:"setNodeBodyStyles",value:function(e,t,n){var i=this.getNodeBodyStyle(e,t);n.selectChildren(".d3-node-body-outline").attr("style",i)}},{key:"setNodeSelectionOutlineStyles",value:function(e,t,n){var i=this.getNodeSelectionOutlineStyle(e,t);n.selectChildren(".d3-node-selection-highlight").attr("style",i)}},{key:"setNodeImageStyles",value:function(e,t,n){var i=this.getNodeImageStyle(e,t);n.selectChildren(".d3-node-image").attr("style",i)}},{key:"setNodeLabelStyles",value:function(e,t,n){var i=this.getNodeLabelStyle(e,t);n.selectChildren(".d3-node-label").attr("style",i)}},{key:"getNodeBodyStyle",value:function(e,t){var n=it.getObjectStyle(e,"body",t);return null===n&&e.layout.dropShadow&&(n="filter:url(".concat(this.getId("#node_drop_shadow"),")")),n}},{key:"getNodeSelectionOutlineStyle",value:function(e,t){return it.getObjectStyle(e,"selection_outline",t)}},{key:"getNodeImageStyle",value:function(e,t){return it.getObjectStyle(e,"image",t)}},{key:"getNodeLabelStyle",value:function(e,t){return it.getObjectStyle(e,"label",t)}},{key:"getNodeGrpStyle",value:function(e){return e.style_temp||e.style||!this.canvasInfo.subdueStyle||this.doesExpandedSupernodeHaveStyledNodes(e)?null:this.canvasInfo.subdueStyle}},{key:"getLinkGrpStyle",value:function(e){return e.style_temp||e.style||!this.canvasInfo.subdueStyle?null:this.canvasInfo.subdueStyle}},{key:"doesExpandedSupernodeHaveStyledNodes",value:function(e){var t=this,n=!1;it.isExpandedSupernode(e)&&e.subflow_ref&&e.subflow_ref.pipeline_id_ref&&new mf(e.subflow_ref.pipeline_id_ref,this.canvasInfo).nodes.forEach((function(e){e.style||e.style_temp?n=!0:!n&&it.isExpandedSupernode(e)&&(n=t.doesExpandedSupernodeHaveStyledNodes(e))}));return n}},{key:"getPortRadius",value:function(e){return it.isSuperBindingNode(e)?this.getBindingPortRadius():e.layout.portRadius}},{key:"getBindingPortRadius",value:function(){return this.canvasLayout.supernodeBindingPortRadius/this.zoomUtils.getZoomScale()}},{key:"addDynamicNodeIcons",value:function(e,t,n){this.isSizing()||it.isSuperBindingNode(t)||(t.layout.ellipsisDisplay&&this.addEllipsisIcon(t,n),it.isExpandedSupernode(t)&&this.addSuperNodeFullPageIcon(n))}},{key:"getDefaultContextToolbarPos",value:function(e,t){return"link"===e?kf({},t.pathInfo.centerPoint):"node"!==e||"topCenter"!==t.layout.contextToolbarPosition||t.is_expanded?{x:t.x_pos+t.width,y:t.y_pos}:{x:t.x_pos+t.width/2,y:t.y_pos}}},{key:"addContextToolbar",value:function(e,t,n,i,o,r){if(!(this.isSizing()||this.isDragging()||this.svgCanvasTextArea.isEditingText()||it.isSuperBindingNode(t))){i===Re&&this.canvasController.setMouseInObject(t.id);var a=this.getDefaultContextToolbarPos(n,t);a.x=o?a.x+o:a.x,a.y=r?a.y+r:a.y,a=this.zoomUtils.unTransformPos(a),this.openContextMenu(e,n,t,null,a)}}},{key:"removeContextToolbar",value:function(){var e=this;this.canvasController.setMouseInObject(null),this.canvasController.isContextMenuDisplayed()&&setTimeout((function(){return e.canvasController.closeContextToolbar()}),200)}},{key:"addEllipsisIcon",value:function(e,t){var n=this,i=t.append("g").attr("class","d3-node-ellipsis-group").attr("transform",(function(e){return n.nodeUtils.getNodeEllipsisTranslate(e)})).on("mousedown",(function(t){if(it.stopPropagationAndPreventDefault(t),n.ellipsisClicked=!0,n.selectObjectD3Event(t,e,"node"),n.canvasController.isContextMenuDisplayed())n.canvasController.closeContextMenu();else{var o=i.node().getBoundingClientRect(),r=n.canvasSVG.node().getBoundingClientRect(),a={x:o.left-r.left,y:o.bottom-r.top};n.setFocusObject(e,t),n.openContextMenu(t,"node",e,null,a)}}));i.append("rect").attr("class","d3-node-ellipsis-background").attr("width",(function(e){return n.nodeUtils.getNodeEllipsisWidth(e)})).attr("height",(function(e){return n.nodeUtils.getNodeEllipsisHeight(e)})).attr("x",0).attr("y",0),i.append("svg").attr("class","d3-node-ellipsis").html(Ue).attr("width",(function(e){return n.nodeUtils.getNodeEllipsisIconWidth(e)})).attr("height",(function(e){return n.nodeUtils.getNodeEllipsisIconHeight(e)})).attr("x",(function(e){return e.layout.ellipsisHoverAreaPadding})).attr("y",(function(e){return e.layout.ellipsisHoverAreaPadding}))}},{key:"addSuperNodeFullPageIcon",value:function(e){var t=this,n=e.append("g").attr("transform",(function(e){return t.nodeUtils.getNodeExpansionIconTranslate(e)})).attr("class","d3-node-super-expand-icon-group").on("mousedown",(function(e){it.stopPropagationAndPreventDefault(e);var n=t.getSupernodeBreadcrumbs(e.currentTarget);t.canvasController.displaySubPipelineForBreadcrumbs(n)})).on("mouseenter",(function(){xf.select(this).attr("data-pointer-hover","yes")})).on("mouseleave",(function(){xf.select(this).attr("data-pointer-hover","no")}));n.append("rect").attr("class","d3-node-super-expand-icon-background").attr("width",this.canvasLayout.supernodeExpansionIconWidth).attr("height",this.canvasLayout.supernodeExpansionIconHeight).attr("x",0).attr("y",0),n.append("svg").attr("class","d3-node-super-expand-icon").html(Ge).attr("width",this.canvasLayout.supernodeExpansionIconWidth-2*this.canvasLayout.supernodeExpansionIconHoverAreaPadding).attr("height",this.canvasLayout.supernodeExpansionIconHeight-2*this.canvasLayout.supernodeExpansionIconHoverAreaPadding).attr("x",this.canvasLayout.supernodeExpansionIconHoverAreaPadding).attr("y",this.canvasLayout.supernodeExpansionIconHoverAreaPadding)}},{key:"getSupernodeBreadcrumbs",value:function(e){for(var t=[],n=e.closest(".d3-node-group");n;){var i=n.closest(".svg-area"),o=this.getD3DatumFromDomEl(n),r=i.getAttribute("data-pipeline-id");t.push(this.canvasController.createBreadcrumb(o,r)),n=i.closest(".d3-node-group")}return t.reverse()}},{key:"getD3DatumFromDomEl",value:function(e){var t=xf.select(e);return t?t.datum():null}},{key:"updatePortRadiusAndPos",value:function(e,t,n){var i=this;xf.select(e).selectAll("."+n).attr("r",(function(){return i.getPortRadius(t)})).attr("cx",(function(e){return e.cx})).attr("cy",(function(e){return e.cy}))}},{key:"updateInputPortArrowPath",value:function(e,t){var n=this;xf.select(e).selectAll("."+t).attr("d",this.getPortArrowPath()).attr("transform",(function(e){return n.getInputPortArrowPathTransform(e)}))}},{key:"updateOutputPortArrowPath",value:function(e,t){var n=this;xf.select(e).selectAll("."+t).attr("d",this.getPortArrowPath()).attr("transform",(function(e){return n.getOutputPortArrowPathTransform(e)}))}},{key:"isPortMaxCardinalityZero",value:function(e){return 0===p(e,"app_data.ui_data.cardinality.max",1)}},{key:"isMouseOverContextToolbar",value:function(e){return this.getElementWithClassAtMousePos(e,"context-toolbar")}},{key:"removeDynamicNodeIcons",value:function(e,t,n){t.layout.ellipsisDisplay&&n.selectChildren(".d3-node-ellipsis-group").remove(),n.selectChildren(".d3-node-super-expand-icon-group").remove()}},{key:"createSupernodeRenderer",value:function(e,t){return e.subflow_ref&&e.subflow_ref.pipeline_id_ref?new i(e.subflow_ref.pipeline_id_ref,this.canvasDiv,this.canvasController,this.canvasInfo,this.selectionInfo,this.breadcrumbs,this.nodeLayout,this.canvasLayout,this.config,{id:e.id,pipelineId:this.activePipeline.id,renderer:this,d3Selection:t}):null}},{key:"getRendererForSupernode",value:function(e){return this.superRenderers.find((function(t){return t.supernodeInfo.id===e.id&&t.activePipeline.id===e.subflow_ref.pipeline_id_ref}))}},{key:"getDiscardedRenderersForSupernode",value:function(e){return this.superRenderers.filter((function(t){return t.supernodeInfo.id===e.id&&t.activePipeline.id!==e.subflow_ref.pipeline_id_ref}))}},{key:"openCanvasContextOptions",value:function(e){this.openContextMenu(e,"canvas",null,null,{x:50,y:50})}},{key:"openContextMenu",value:function(e,t,n,i,o){it.stopPropagationAndPreventDefault(e),this.canvasController.contextMenuHandler({type:t,targetObject:"canvas"===t?null:n,id:"canvas"===t?null:n.id,pipelineId:this.activePipeline.id,cmPos:o||this.getMousePos(e,this.canvasDiv.selectAll("svg")),mousePos:o||this.getMousePosSnapToGrid(this.getTransformedMousePos(e)),selectedObjectIds:this.canvasController.getSelectedObjectIds(),addBreadcrumbs:n&&n.type===Ze?this.getSupernodeBreadcrumbs(e.currentTarget):null,port:i,zoom:this.zoomUtils.getZoomScale()})}},{key:"closeContextMenuIfOpen",value:function(){this.canvasController.isContextMenuDisplayed()&&this.canvasController.closeContextMenu(),this.config.enableContextToolbar&&this.removeContextToolbar()}},{key:"callDecoratorCallback",value:function(e,t,n){e.stopPropagation(),this.canvasController.decorationActionHandler&&this.canvasController.decorationActionHandler(t,n.id,this.activePipeline.id)}},{key:"getLinkAtMousePos",value:function(e,t){var n=this.getElementWithClassAtPosition(e,t,"d3-data-link");return this.getNodeLinkForElement(n)}},{key:"getNodeLinkForElement",value:function(e){if(e){var t=xf.select(e).datum();if(t){var n=this.activePipeline.getLink(t.id);if(n&&n.type===J)return n}}return null}},{key:"setDataLinkSelectionAreaWider",value:function(e){this.nodesLinksGrp.selectAll(".d3-data-link-selection-area").classed("d3-extra-width",e)}},{key:"getNodeAtMousePos",value:function(e){var t=this.getElementWithClassAtMousePos(e,"d3-node-group");return this.getNodeForElement(t)}},{key:"getInputNodePortId",value:function(e,t){var n=this.getInputNodePortIdAtMousePos(e);return n||(n=it.getDefaultInputPortId(t)),n}},{key:"getInputNodePortIdAtMousePos",value:function(e){var t=this.getElementWithClassAtMousePos(e,this.getNodeInputPortClassName());return this.getNodePortIdForElement(t)}},{key:"getOutputNodePortId",value:function(e,t){var n=this.getOutputNodePortIdAtMousePos(e);return n||(n=it.getDefaultOutputPortId(t)),n}},{key:"getOutputNodePortIdAtMousePos",value:function(e){var t=this.getElementWithClassAtMousePos(e,this.getNodeOutputPortClassName());return this.getNodePortIdForElement(t)}},{key:"getElementWithClassAtMousePos",value:function(e,t){var n=e.clientX?e.clientX:e.sourceEvent.clientX,i=e.clientY?e.clientY:e.sourceEvent.clientY;return this.getElementWithClassAtPosition(n,i,t)}},{key:"getElementWithClassAtPosition",value:function(e,t,n){for(var i=document.elementsFromPoint(e,t),o=null,r=0;!o&&r<i.length;)o=it.getParentElementWithClass(i[r],n),r++;return o}},{key:"getNodeForElement",value:function(e){if(e&&"g"===e.nodeName){var t=xf.select(e).datum();if(t)return this.activePipeline.getNode(t.id)}return null}},{key:"getNodePortIdForElement",value:function(e){return e?xf.select(e).attr("data-port-id"):null}},{key:"getNodeNearMousePos",value:function(e,t){var n=this.getTransformedMousePos(e),i=null,o=t||0;return this.getAllNodeGroupsSelection().each((function(e){n.x>=e.x_pos-o&&n.x<=e.x_pos+e.width+o&&n.y>=e.y_pos-o&&n.y<=e.y_pos+e.height+o&&(i=e)})),i}},{key:"getNodeShapePathSizing",value:function(e){return this.getRectangleNodeShapePath(e,e.layout.nodeSizingArea)}},{key:"getNodeSelectionOutline",value:function(e){return e.layout.selectionPath&&!it.isExpanded(e)?"function"==typeof e.layout.selectionPath?e.layout.selectionPath(e):e.layout.selectionPath:"port-arcs"===e.layout.nodeShape?this.getPortArcsNodeShapePath(e):this.getRectangleNodeShapePath(e,e.layout.nodeHighlightGap)}},{key:"getNodeShapePath",value:function(e){return e.layout.bodyPath&&!it.isExpanded(e)?"function"==typeof e.layout.bodyPath?e.layout.bodyPath(e):e.layout.bodyPath:"port-arcs"===e.layout.nodeShape?this.getPortArcsNodeShapePath(e):this.getRectangleNodeShapePath(e)}},{key:"getRectangleNodeShapePath",value:function(e,t){var n=t||0,i=0-n,o=0-n,r=e.width+n,a=e.height+n,s="M "+i+" "+o+" L "+r+" "+o;return s+=" L "+r+" "+a,s+=" L "+i+" "+a,s+=" Z"}},{key:"getPortArcsNodeShapePath",value:function(e){return this.canvasLayout.linkDirection===Te?this.getPortArcsNodeShapePathVertical(e,e.inputs,e.inputPortsWidth,e.outputs,e.outputPortsWidth):this.canvasLayout.linkDirection===De?this.getPortArcsNodeShapePathVertical(e,e.outputs,e.outputPortsWidth,e.inputs,e.inputPortsWidth):this.canvasLayout.linkDirection===We?this.getPortArcsNodeShapePathHoriz(e,e.outputs,e.outputPortsHeight,e.inputs,e.inputPortsHeight):this.getPortArcsNodeShapePathHoriz(e,e.inputs,e.inputPortsHeight,e.outputs,e.outputPortsHeight)}},{key:"getPortArcsNodeShapePathHoriz",value:function(e,t,n,i,o){var r="M 0 0 L "+e.width+" 0 ";if(i&&i.length>0){var a=e.layout.portArcOffset;o<e.height&&(a=i[0].cy-e.layout.portArcRadius),r+=" L "+e.width+" "+a,i.forEach((function(t,n){a+=2*e.layout.portArcRadius,r+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 1 "+e.width+" "+a,n<i.length-1&&(a+=e.layout.portArcSpacing,r+=" L "+e.width+" "+a)})),r+=" L "+e.width+" "+e.height}else r+=" L "+e.width+" "+e.height;if(r+=" L 0 "+e.height,t&&t.length>0){var s=e.height-e.layout.portArcOffset;n<e.height&&(s=t[t.length-1].cy+e.layout.portArcRadius),r+=" L 0 "+s,t.forEach((function(n,i){s-=2*e.layout.portArcRadius,r+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 1 0 "+s,i<t.length-1&&(s-=e.layout.portArcSpacing,r+=" L 0 "+s)})),r+=" Z"}else r+=" Z";return r}},{key:"getPortArcsNodeShapePathVertical",value:function(e,t,n,i,o){var r="M 0 0 L 0 "+e.height;if(i&&i.length>0){var a=e.layout.portArcOffset;o<e.width&&(a=i[0].cx-e.layout.portArcRadius),r+=" L "+a+" "+e.height,i.forEach((function(t,n){a+=2*e.layout.portArcRadius,r+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 0 "+a+" "+e.height,n<i.length-1&&(a+=e.layout.portArcSpacing,r+=" L "+a+" "+e.height)})),r+=" L "+e.width+" "+e.height}else r+=" L "+e.width+" "+e.height;if(r+=" L "+e.width+" 0 ",t&&t.length>0){var s=e.width-e.layout.portArcOffset;n<e.width&&(s=t[t.length-1].cx+e.layout.portArcRadius),r+=" L "+s+" 0 ",t.forEach((function(n,i){s-=2*e.layout.portArcRadius,r+=" A "+e.layout.portArcRadius+" "+e.layout.portArcRadius+" 180 0 0 "+s+" 0 ",i<t.length-1&&(s-=e.layout.portArcSpacing,r+=" L "+s+" 0 ")})),r+=" Z"}else r+=" Z";return r}},{key:"setPortPositionsAllNodes",value:function(){var e=this;this.activePipeline.nodes.forEach((function(t){e.setPortPositionsForNode(t)}))}},{key:"setPortPositionsForNode",value:function(e){this.canvasLayout.linkDirection===Te||this.canvasLayout.linkDirection===De?(this.setPortPositionsVertical(e,e.inputs,e.inputPortsWidth,e.layout.inputPortPositions,e.layout.inputPortAutoPosition),this.setPortPositionsVertical(e,e.outputs,e.outputPortsWidth,e.layout.outputPortPositions,e.layout.outputPortAutoPosition,this.config.enableSingleOutputPortDisplay)):(this.setPortPositionsHoriz(e,e.inputs,e.inputPortsHeight,e.layout.inputPortPositions,e.layout.inputPortAutoPosition),this.setPortPositionsHoriz(e,e.outputs,e.outputPortsHeight,e.layout.outputPortPositions,e.layout.outputPortAutoPosition,this.config.enableSingleOutputPortDisplay))}},{key:"setPortPositionsVertical",value:function(e,t,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&t.length>0){var a=this.nodeUtils.getNodePortPosX(i[0],e),s=this.nodeUtils.getNodePortPosY(i[0],e);e.width<=e.layout.defaultNodeWidth&&1===t.length?(t[0].cx=a,t[0].cy=s,t[0].dir=it.getPortDir(t[0].cx,t[0].cy,e)):r?this.setPortPositionsVerticalDisplaySingle(e,t,a,s):o||it.isExpandedSupernode(e)?this.setPortPositionsVerticalAuto(e,t,n,s):this.setPortPositionsCustom(t,i,e,a,s)}}},{key:"setPortPositionsVerticalDisplaySingle",value:function(e,t,n,i){var o=0;if(it.isExpandedSupernode(e)){var r=e.width-2*this.canvasLayout.supernodeSVGAreaPadding;o=r/2}else o=n;t.forEach((function(t){t.cx=o,t.cy=i,t.dir=it.getPortDir(t.cx,t.cy,e)}))}},{key:"setPortPositionsVerticalAuto",value:function(e,t,n,i){var o=0;if(it.isExpandedSupernode(e)){var r=e.width-2*this.canvasLayout.supernodeSVGAreaPadding-n;o=this.canvasLayout.supernodeSVGAreaPadding+r/2}else n<e.width&&(o=(e.width-n)/2);o+=e.layout.portArcOffset;var a=1;it.isSuperBindingNode(e)&&(a=1/this.zoomUtils.getZoomScale()),t.forEach((function(t){o+=e.layout.portArcRadius*a,t.cx=o,t.cy=i,t.dir=it.getPortDir(t.cx,t.cy,e),o+=(e.layout.portArcRadius+e.layout.portArcSpacing)*a}))}},{key:"setPortPositionsHoriz",value:function(e,t,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&t.length>0){var a=this.nodeUtils.getNodePortPosX(i[0],e),s=this.nodeUtils.getNodePortPosY(i[0],e);e.height<=e.layout.defaultNodeHeight&&1===t.length?(t[0].cx=a,t[0].cy=s,t[0].dir=it.getPortDir(t[0].cx,t[0].cy,e)):r?this.setPortPositionsHorizDisplaySingle(e,t,a,s):o||it.isExpandedSupernode(e)?this.setPortPositionsHorizAuto(e,t,n,a):this.setPortPositionsCustom(t,i,e,a,s)}}},{key:"setPortPositionsHorizDisplaySingle",value:function(e,t,n,i){var o=0;if(it.isExpandedSupernode(e)){var r=e.height-this.canvasLayout.supernodeTopAreaHeight-this.canvasLayout.supernodeSVGAreaPadding;o=this.canvasLayout.supernodeTopAreaHeight+r/2}else o=i;t.forEach((function(t){t.cx=n,t.cy=o,t.dir=it.getPortDir(t.cx,t.cy,e)}))}},{key:"setPortPositionsHorizAuto",value:function(e,t,n,i){var o=0;if(it.isExpandedSupernode(e)){var r=e.height-this.canvasLayout.supernodeTopAreaHeight-this.canvasLayout.supernodeSVGAreaPadding-n;o=this.canvasLayout.supernodeTopAreaHeight+r/2}else n<e.height&&(o=(e.height-n)/2);o+=e.layout.portArcOffset;var a=1;it.isSuperBindingNode(e)&&(a=1/this.zoomUtils.getZoomScale()),t.forEach((function(t){o+=e.layout.portArcRadius*a,t.cx=i,t.cy=o,t.dir=it.getPortDir(t.cx,t.cy,e),o+=(e.layout.portArcRadius+e.layout.portArcSpacing)*a}))}},{key:"setPortPositionsCustom",value:function(e,t,n,i,o){var r=this,a=i,s=o;e.forEach((function(e,i){i>0&&i<t.length&&(a=r.nodeUtils.getNodePortPosX(t[i],n),s=r.nodeUtils.getNodePortPosY(t[i],n)),e.cx=a,e.cy=s,e.dir=it.getPortDir(e.cx,e.cy,n)}))}},{key:"displayComments",value:function(){this.logger.logStartTimer("displayComments "+this.getFlags());var e=this.getAllCommentGroupsSelection();this.displayCommentsSubset(e,this.activePipeline.comments),this.logger.logEndTimer("displayComments "+this.getFlags())}},{key:"displayMovedComments",value:function(){var e=this;this.logger.logStartTimer("displayMovedComments"),this.getAllCommentGroupsSelection().attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})).datum((function(t){return e.activePipeline.getComment(t.id)})),this.logger.logEndTimer("displayMovedComments")}},{key:"displayCommentsSelectionStatus",value:function(){var e=this;this.logger.logStartTimer("displayCommentsSelectionStatus"),this.getAllCommentGroupsSelection().selectChildren(".d3-comment-selection-highlight").attr("data-selected",(function(t){return e.activePipeline.isSelected(t.id)?"yes":"no"})),this.logger.logEndTimer("displayCommentsSelectionStatus")}},{key:"displaySingleComment",value:function(e){var t=this.getCommentGroupSelectionById(e.id);this.displayCommentsSubset(t,[e])}},{key:"displayCommentsSubset",value:function(e,t){var n=this,i=this.canvasInfo.hideComments?[]:t;e.data(i,(function(e){return e.id})).join((function(e){return n.createComments(e)})).attr("transform",(function(e){return"translate(".concat(e.x_pos,", ").concat(e.y_pos,")")})).attr("tabindex",(function(e){return n.config.enableKeyboardNavigation?-1:null})).attr("class",(function(e){return n.getCommentGroupClass(e)})).call((function(e){return n.updateComments(e)}))}},{key:"createComments",value:function(e){var t=this;this.logger.logStartTimer("createComments");var n=e.append("g").attr("data-id",(function(e){return t.getId("comment_grp",e.id)})).call(this.attachCommentGroupListeners.bind(this));return this.logger.logEndTimer("createComments"),n}},{key:"updateComments",value:function(e){var t=this;if(this.logger.logStartTimer("updateComments"),e.selectChildren(".d3-focus-path").data((function(e){return[e]}),(function(e){return e.id})).join((function(e){return null})).attr("x",-this.canvasLayout.commentSizingArea).attr("y",-this.canvasLayout.commentSizingArea).attr("height",(function(e){return e.height+2*t.canvasLayout.commentSizingArea})).attr("width",(function(e){return e.width+2*t.canvasLayout.commentSizingArea})),e.selectChildren(".d3-comment-sizing").data((function(e){return[e]}),(function(e){return e.id})).join((function(e){return e.append("rect").attr("class","d3-comment-sizing").call(t.attachCommentSizingListeners.bind(t))})).datum((function(e){return t.activePipeline.getComment(e.id)})).attr("x",-this.canvasLayout.commentSizingArea).attr("y",-this.canvasLayout.commentSizingArea).attr("height",(function(e){return e.height+2*t.canvasLayout.commentSizingArea})).attr("width",(function(e){return e.width+2*t.canvasLayout.commentSizingArea})).attr("class","d3-comment-sizing"),e.selectChildren(".d3-comment-selection-highlight").data((function(e){return[e]}),(function(e){return e.id})).join((function(e){return e.append("rect").attr("class","d3-comment-selection-highlight")})).datum((function(e){return t.activePipeline.getComment(e.id)})).attr("x",-this.canvasLayout.commentHighlightGap).attr("y",-this.canvasLayout.commentHighlightGap).attr("height",(function(e){return e.height+2*t.canvasLayout.commentHighlightGap})).attr("width",(function(e){return e.width+2*t.canvasLayout.commentHighlightGap})).attr("data-selected",(function(e){return t.activePipeline.isSelected(e.id)?"yes":"no"})).attr("style",(function(e){return t.getNodeSelectionOutlineStyle(e,"default")})),e.selectChildren(".d3-foreign-object-comment-text").data((function(e){return[e]}),(function(e){return e.id})).join((function(e){var t=e.append("foreignObject").attr("class",(function(e){return"d3-foreign-object-comment-text"})).attr("x",0).attr("y",0);return t.append("xhtml:div").attr("class","d3-comment-text-scroll").append("xhtml:div").attr("class","d3-comment-text-outer").append("xhtml:div").attr("class",(function(e){return"d3-comment-text"+(e.contentType!==Z?" markdown":"")})),t})).datum((function(e){return t.activePipeline.getComment(e.id)})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).select(".d3-comment-text-scroll").attr("tabindex","-1").each((function(e,t,n){var i=xf.select(n[t]);it.applyOutlineStyle(i,e.formats)})).select(".d3-comment-text-outer").select(".d3-comment-text").attr("style",null).each((function(e,t,n){var i=xf.select(n[t]);it.applyNonOutlineStyle(i,e.formats)})).html((function(e){return e.contentType!==Z&&t.config.enableMarkdownInComments?wf.render(e.content):hd(e.content)})),this.config.enableEditingActions){var n=this.dragObjectUtils.getDragObjectHandler();e.call(n)}else e.on(".drag",null)}},{key:"attachCommentGroupListeners",value:function(e){var t=this;e.on("keydown",(function(e,n){if(t.config.enableKeyboardNavigation){if(t.svgCanvasTextArea.isEditingText())return;if(ot.nextObjectInGroup(e)){var i=t.activePipeline.getNextLinksFromComment(n);i.length>0&&(i.forEach((function(e){return e.link.navObject=n})),t.setFocusObject(i[0].link,e))}else if(ot.moveObjectUp(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,ae)})),it.stopPropagationAndPreventDefault(e);else if(ot.moveObjectDown(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,re)})),it.stopPropagationAndPreventDefault(e);else if(ot.moveObjectRight(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,ie)})),it.stopPropagationAndPreventDefault(e);else if(ot.moveObjectLeft(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.moveObject(n,oe)})),it.stopPropagationAndPreventDefault(e);else if(ot.sizeObjectUp(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,ae)})),it.stopPropagationAndPreventDefault(e);else if(ot.sizeObjectDown(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,re)})),it.stopPropagationAndPreventDefault(e);else if(ot.sizeObjectRight(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,ie)})),it.stopPropagationAndPreventDefault(e);else if(ot.sizeObjectLeft(e))t.config.enableEditingActions&&t.canvasController.autoSelectFocusObj((function(){return t.dragObjectUtils.sizeObject(n,oe)})),it.stopPropagationAndPreventDefault(e);else if(ot.scrollTextUp(e))t.scrollComment(e,10),it.stopPropagationAndPreventDefault(e);else if(ot.scrollTextDown(e))t.scrollComment(e,-10),it.stopPropagationAndPreventDefault(e);else if(ot.selectObject(e))it.stopPropagationAndPreventDefault(e),t.selectObject(e,n,"comment",!1,!1);else if(ot.selectObjectAugment(e))it.stopPropagationAndPreventDefault(e),t.selectObject(e,n,"comment",!1,!0);else if(ot.displayContextOptions(e))if(e.stopPropagation(),t.selectObject(e,n,"comment"),t.config.enableContextToolbar)t.addContextToolbar(e,n,"comment",G);else{var o=t.getObjectCenterPosition(e.currentTarget);t.openContextMenu(e,"comment",n,null,o)}}})).on("mouseenter",(function(e,n){t.isDragging()||(t.config.enableEditingActions&&n.id!==t.svgCanvasTextArea.getEditingTextId()&&t.createCommentPort(e.currentTarget,n),t.config.enableContextToolbar&&t.addContextToolbar(e,n,"comment",Re),t.commentHasScrollableText(e.currentTarget)&&t.removeCanvasZoomBehavior())})).on("mouseleave",(function(e,n){t.config.enableContextToolbar&&t.removeContextToolbar(),t.config.enableEditingActions&&t.deleteCommentPort(e.currentTarget),t.addCanvasZoomBehavior()})).on("mousedown",(function(e,n){t.logger.logStartTimer("Comment Group - mouse down"),e.stopPropagation(),t.svgCanvasTextArea.isEditingText()&&t.svgCanvasTextArea.completeEditing(e),t.config.enableDragWithoutSelect||(t.config.enableKeyboardNavigation&&(t.activePipeline.setTabGroupIndexForObj(n),t.setFocusObject(n,e)),t.selectObjectD3Event(e,n,"comment")),t.logger.logEndTimer("Comment Group - mouse down")})).on("click",(function(e,n){t.logger.log("Comment Group - click"),e.stopPropagation()})).on("dblclick",(function(e,n){t.logger.log("Comment Group - double click"),t.config.enableEditingActions&&(it.stopPropagationAndPreventDefault(e),t.deleteCommentPort(e.currentTarget),t.displayCommentTextArea(n,e.currentTarget),t.canvasController.clickActionHandler({clickType:Ie,objectType:"comment",id:n.id,selectedObjectIds:t.activePipeline.getSelectedObjectIds(),pipelineId:t.activePipeline.id}))})).on("contextmenu",(function(e,n){t.logger.log("Comment Group - context menu"),it.stopPropagationAndPreventDefault(e),t.config.enableDragWithoutSelect&&t.selectObjectD3Event(e,n,"comment"),t.setFocusObject(n,e),t.config.enableContextToolbar||t.openContextMenu(e,"comment",n)}))}},{key:"commentHasScrollableText",value:function(e){var t=e.getElementsByClassName("d3-comment-text-entry-scroll");return t[0]||(t=e.getElementsByClassName("d3-comment-text-scroll")),t[0].clientHeight<t[0].scrollHeight}},{key:"scrollComment",value:function(e,t){this.commentHasScrollableText(e.currentTarget)&&e.currentTarget.getElementsByClassName("d3-comment-text-scroll")[0].scrollBy(0,t)}},{key:"attachCommentSizingListeners",value:function(e){var t=this;e.on("mousedown",(function(e,n){t.dragObjectUtils.mouseDownCommentSizingArea()})).on("mousemove mouseenter",(function(e,n){t.dragObjectUtils.mouseEnterCommentSizingArea(e,n)})).on("mouseleave",(function(e,n){t.dragObjectUtils.mouseLeaveCommentSizingArea(e,n)}))}},{key:"createCommentPort",value:function(e,t){var n=this,i=xf.select(e).append(we).attr("cx",(function(e){return e.width/2})).attr("cy",(function(e){return e.height+n.canvasLayout.commentHighlightGap})).attr("r",this.canvasLayout.commentPortRadius).attr("class","d3-comment-port-circle");if(this.config.enableEditingActions){var o=this.dragNewLinkUtils.getDragNewLinkHandler();i.call(o)}else i.on(".drag",null)}},{key:"deleteCommentPort",value:function(e){xf.select(e).selectChildren(".d3-comment-port-circle").remove()}},{key:"setCommentStyles",value:function(e,t,n){this.setCommentSelectionOutlineStyles(e,t,n),this.setCommentBodyStyles(e,t,n),this.setCommentTextStyles(e,t,n)}},{key:"setCommentSelectionOutlineStyles",value:function(e,t,n){var i=this.getCommentSelectionOutlineStyle(e,t);n.selectChildren(".d3-comment-selection-highlight").attr("style",i)}},{key:"setCommentBodyStyles",value:function(e,t,n){var i=this.getCommentBodyStyle(e,t);n.selectChildren(".d3-comment-text").attr("style",i)}},{key:"setCommentTextStyles",value:function(e,t,n){var i=this.getCommentTextStyle(e,t);n.selectChildren(".d3-foreign-object-comment-text").select("div").attr("style",i)}},{key:"getCommentSelectionOutlineStyle",value:function(e,t){return it.getObjectStyle(e,"selection_outline",t)}},{key:"getCommentBodyStyle",value:function(e,t){return it.getObjectStyle(e,"body",t)}},{key:"getCommentTextStyle",value:function(e,t){return it.getObjectStyle(e,"text",t)}},{key:"displayCommentTextArea",value:function(e,t){e.autoSize=this.canvasLayout.commentAutoSize,this.svgCanvasTextArea.displayCommentTextArea(e,t)}},{key:"displayNodeLabelTextArea",value:function(e,t){this.svgCanvasTextArea.displayNodeLabelTextArea(e,t)}},{key:"displayDecLabelTextArea",value:function(e,t,n,i){this.svgCanvasTextArea.displayDecLabelTextArea(e,t,n,i)}},{key:"addTempCursorOverlay",value:function(e){this.dispUtils.isDisplayingFullPage()&&(this.canvasDiv.selectAll(".d3-temp-cursor-overlay").size()>0&&this.removeTempCursorOverlay(),this.canvasSVG.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height","100%").attr("data-pipeline-id",this.activePipeline.id).attr("class","d3-temp-cursor-overlay").attr("pointer-events","all").style("cursor",e))}},{key:"removeTempCursorOverlay",value:function(){this.dispUtils.isDisplayingFullPage()&&this.canvasDiv.selectAll(".d3-temp-cursor-overlay").remove()}},{key:"isRegionSelectOrSizingInProgress",value:function(){return!(!this.regionSelect&&!this.isSizing())||!(!this.supernodeInfo.renderer||!this.supernodeInfo.renderer.isRegionSelectOrSizingInProgress())}},{key:"displayLinks",value:function(){this.logger.logStartTimer("displayLinks");var e=this.buildLinksArray(),t=this.getAllLinkGroupsSelection();this.displayLinksSubset(t,e),this.logger.logEndTimer("displayLinks")}},{key:"displayLinksSelectionStatus",value:function(){var e=this;this.logger.logStartTimer("displayLinksSelectionStatus"),this.config.enableLinkSelection!==Oe&&this.getAllLinkGroupsSelection().attr("data-selected",(function(t){return!!e.activePipeline.isSelected(t.id)||null})),this.logger.logEndTimer("displayLinksSelectionStatus")}},{key:"displayMovedLinks",value:function(){var e=this;this.logger.logStartTimer("displayMovedLinks"),this.buildLinksArray().filter((function(e){return e.coordsUpdated})).forEach((function(t){e.displaySingleLink(t)})),this.logger.logEndTimer("displayMovedLinks")}},{key:"displaySingleLink",value:function(e){var t=this.getLinkGroupSelectionById(e.id);this.displayLinksSubset(t,[e])}},{key:"displayLinksSubset",value:function(e,t){var n=this;e.data(t,(function(e){return e.id})).join((function(e){return n.createLinks(e)})).attr("class",(function(e){return n.getLinkGroupClass(e)})).attr("tabindex",(function(e){return n.config.enableKeyboardNavigation?-1:null})).attr("style",(function(e){return n.getLinkGrpStyle(e)})).attr("data-selected",(function(e){return!!n.activePipeline.isSelected(e.id)||null})).call((function(e){n.updateLinks(e,t)}))}},{key:"createLinks",value:function(e){var t=this;this.logger.logStartTimer("createLinks");var n=e.append("g").attr("data-id",(function(e){return t.getId("link_grp",e.id)})).call(this.attachLinkGroupListeners.bind(this));return n.append("path").attr("class",(function(e){return t.getLinkSelectionAreaClass(e)})),n.append("path").attr("class","d3-link-line"),n.filter((function(e){return e.type===J&&t.canvasLayout.dataLinkArrowHead||e.type===ue&&t.canvasLayout.commentLinkArrowHead})).append("path").attr("class","d3-link-line-arrow-head"),n.append("g").attr("class","d3-link-decorations-group"),this.config.enableLinkSelection!==Xe&&this.config.enableLinkSelection!==me||n.append("g").attr("class","d3-link-handles-group").each((function(e,n,i){e.type===J&&t.createNewHandles(xf.select(i[n]))})),this.logger.logEndTimer("createLinks"),n}},{key:"updateLinks",value:function(e,t){var n=this;this.logger.logStartTimer("updateLinks"),e.selectAll(".d3-link-selection-area").datum((function(e){return n.activePipeline.getLink(e.id)})).attr("d",(function(e){return e.pathInfo.path})),e.selectAll(".d3-link-line").datum((function(e){return n.activePipeline.getLink(e.id)})).attr("d",(function(e){return e.pathInfo.path})).attr("class","d3-link-line").attr("style",(function(e){return it.getObjectStyle(e,"line","default")})),e.filter((function(e){return e.type===J&&n.canvasLayout.dataLinkArrowHead||e.type===ue&&n.canvasLayout.commentLinkArrowHead})).selectAll(".d3-link-line-arrow-head").datum((function(e){return n.activePipeline.getLink(e.id)})).attr("d",(function(e){return n.getArrowHead(e)})).attr("transform",(function(e){return n.getArrowHeadTransform(e)})).attr("class","d3-link-line-arrow-head").attr("style",(function(e){return it.getObjectStyle(e,"line","default")})),e.each((function(e,t,i){if(e.type===J||e.type===ee){var o=xf.select(i[t]).selectAll(".d3-link-decorations-group"),r=n.shouldDisplayAltDecorations(e)?n.canvasLayout.linkAltDecorations:e.decorations;n.displayDecorations(e,fe,o,r)}})),this.config.enableLinkSelection!==Xe&&this.config.enableLinkSelection!==me||e.each((function(e,i,o){e.type===J&&n.updateHandles(xf.select(o[i]).selectAll(".d3-link-handles-group"),t)})),this.isMoving()||this.isSizing()||this.config.enableLinksOverNodes||this.setDisplayOrder(e),this.logger.logEndTimer("updateLinks")}},{key:"attachLinkGroupListeners",value:function(e){var t=this;e.on("keydown",(function(e,n){if(t.config.enableKeyboardNavigation)if(ot.nextObjectInGroup(e)){if(n.type===J){var i=t.activePipeline.getNextNodeFromDataLink(n);t.setFocusObject(i,e),it.stopPropagationAndPreventDefault(e)}else if(n.type===ee){var o=t.activePipeline.getNextNodeFromAssocLink(n);t.setFocusObject(o,e),it.stopPropagationAndPreventDefault(e)}else if(n.type===ue){var r=t.activePipeline.getNextObjectFromCommentLink(n);t.setFocusObject(r,e),it.stopPropagationAndPreventDefault(e)}}else if(ot.previousObjectInGroup(e)){if(n.type===J){var a=t.activePipeline.getPreviousNodeFromDataLink(n);t.setFocusObject(a,e)}else if(n.type===ee){var s=t.activePipeline.getPreviousNodeFromAssocLink(n);t.setFocusObject(s,e)}else if(n.type===ue){var l=t.activePipeline.getPreviousObjectFromCommentLink(n);t.setFocusObject(l,e)}}else if(ot.nextSiblingLink(e)){var c=t.activePipeline.getNextSiblingLink(n);t.setFocusObject(c,e)}else if(ot.previousSiblingLink(e)){var u=t.activePipeline.getPreviousSiblingLink(n);t.setFocusObject(u,e)}else if(ot.moveObjectLeft(e))it.stopPropagationAndPreventDefault(e);else if(ot.selectObject(e))it.stopPropagationAndPreventDefault(e),t.selectObject(e,n,"link",!1,!1);else if(ot.selectObjectAugment(e))it.stopPropagationAndPreventDefault(e),t.selectObject(e,n,"link",!1,!0);else if(ot.displayContextOptions(e))if(e.stopPropagation(),"None"!==t.config.enableLinkSelection&&t.selectObject(e,n,"link"),t.config.enableContextToolbar)t.addContextToolbar(e,n,"link",G,t.canvasLayout.linkContextToolbarPosX,t.canvasLayout.linkContextToolbarPosY);else{var d=t.getObjectCenterPosition(e.currentTarget);t.openContextMenu(e,"link",n,null,d)}})).on("mouseenter",(function(e,n){if(!t.isDragging()){var i=e.currentTarget;t.config.enableLinkSelection!==Xe&&t.config.enableLinkSelection!==me||(t.raiseLinkToTop(i),it.stopPropagationAndPreventDefault(e)),t.setLinkLineStyles(i,n,"hover"),t.config.enableContextToolbar&&t.addContextToolbar(e,n,"link",Re,t.canvasLayout.linkContextToolbarPosX,t.canvasLayout.linkContextToolbarPosY)}})).on("mouseover",(function(e,n){if(e.stopPropagation(),t.canOpenTip(V)){var i=t.canvasController.getTipId(),o=t.getId("link_tip",n.id);null!==i&&i===o||(t.canvasController.closeTip(),t.canvasController.openTip({id:o,type:V,targetObj:e.currentTarget,mousePos:{x:e.clientX,y:e.clientY},pipelineId:t.activePipeline.id,link:n}))}})).on("mouseleave",(function(e,n){var i=e.currentTarget;i.getAttribute("data-selected")||t.config.enableLinksOverNodes||t.isEditingText()||(t.lowerLinkToBottom(i),it.stopPropagationAndPreventDefault(e)),t.setLinkLineStyles(i,n,"default"),t.canvasController.closeTip(),t.config.enableContextToolbar&&t.removeContextToolbar()})).on("mousedown",(function(e,n,i,o){t.logger.log("Link Group - mouse down"),t.svgCanvasTextArea.isEditingText()&&t.svgCanvasTextArea.completeEditing(e),t.config.enableKeyboardNavigation&&(t.activePipeline.setTabGroupIndexForObj(n),t.setFocusObject(n,e)),t.config.enableLinkSelection!==Oe&&t.selectObjectD3Event(e,n,"link"),e.stopPropagation()})).on("click",(function(e,n){t.logger.log("Link Group - click"),e.stopPropagation()})).on("contextmenu",(function(e,n){t.logger.log("Link Group - context menu"),it.stopPropagationAndPreventDefault(e),t.config.enableLinkSelection!==Oe&&t.selectObjectD3Event(e,n,"link"),t.setFocusObject(n,e),t.config.enableContextToolbar||t.openContextMenu(e,"link",n)}))}},{key:"shouldDisplayAltDecorations",value:function(e){return this.canvasLayout.linkAltDecorations&&it.getLinkDistance(e)<this.canvasLayout.linkDistanceForAltDecorations}},{key:"createNewHandles",value:function(e){e.append(this.canvasLayout.linkStartHandleObject).attr("class",(function(e){return"d3-link-handle-start"})).call(this.attachStartHandleListeners.bind(this)),e.append(this.canvasLayout.linkEndHandleObject).attr("class",(function(e){return"d3-link-handle-end"})).call(this.attachEndHandleListeners.bind(this))}},{key:"updateHandles",value:function(e,t){var n=this,i=e.selectAll(".d3-link-handle-start").datum((function(e){return n.activePipeline.getLink(e.id)})).each((function(e,t,i){var o=xf.select(i[t]);n.canvasLayout.linkStartHandleObject===Ve?o.attr("xlink:href",n.canvasLayout.linkStartHandleImage).attr("x",(function(e){return e.x1-n.canvasLayout.linkStartHandleWidth/2})).attr("y",(function(e){return e.y1-n.canvasLayout.linkStartHandleHeight/2})).attr("width",n.canvasLayout.linkStartHandleWidth).attr("height",n.canvasLayout.linkStartHandleHeight):n.canvasLayout.linkStartHandleObject===we&&o.attr("r",n.canvasLayout.linkStartHandleRadius).attr("cx",(function(e){return e.x1})).attr("cy",(function(e){return e.y1}))}));if(this.config.enableEditingActions){var o=this.dragDetLinkUtils.getDragDetachedLinkHandler();i.call(o)}else i.on(".drag",null);var r=e.selectAll(".d3-link-handle-end").datum((function(e){return n.activePipeline.getLink(e.id)})).each((function(e,t,i){var o=xf.select(i[t]);n.canvasLayout.linkEndHandleObject===Ve?o.attr("xlink:href",n.canvasLayout.linkEndHandleImage).attr("x",(function(e){return e.x2-n.canvasLayout.linkEndHandleWidth/2})).attr("y",(function(e){return e.y2-n.canvasLayout.linkEndHandleHeight/2})).attr("width",n.canvasLayout.linkEndHandleWidth).attr("height",n.canvasLayout.linkEndHandleHeight).attr("transform",(function(e){return n.getLinkImageTransform(e)})):n.canvasLayout.linkEndHandleObject===we&&o.attr("r",n.canvasLayout.linkEndHandleRadius).attr("cx",(function(e){return e.x2})).attr("cy",(function(e){return e.y2}))}));if(this.config.enableEditingActions){var a=this.dragDetLinkUtils.getDragDetachedLinkHandler();r.call(a)}else r.on(".drag",null)}},{key:"attachStartHandleListeners",value:function(e){var t=this;e.on("mousedown",(function(e,n){t.logger.log("Link start handle - mouse down"),t.config.enableDragWithoutSelect||t.selectObjectD3Event(e,n,"link"),t.logger.log("Link end handle - finished mouse down")}))}},{key:"attachEndHandleListeners",value:function(e){var t=this;e.on("mousedown",(function(e,n){t.logger.log("Link end handle - mouse down"),t.config.enableDragWithoutSelect||t.selectObjectD3Event(e,n,"link"),t.logger.log("Link end handle - finished mouse down")}))}},{key:"setLinkLineStyles",value:function(e,t,n){var i=it.getObjectStyle(t,"line",n),o=xf.select(e);o.select(".d3-link-line").attr("style",i),o.select(".d3-link-line-arrow-head").attr("style",i)}},{key:"getLinkSelectionAreaClass",value:function(e){return"d3-link-selection-area "+(e.type===ee?"d3-association-link-selection-area":e.type===ue?"d3-comment-link-selection-area":"d3-data-link-selection-area")}},{key:"getLinkGroupClass",value:function(e){return"d3-link-group "+this.getLinkTypeClass(e)+" "+this.getLinkBranchHighlightCLass(e)+" "+this.getLinkCustomClass(e)}},{key:"getLinkBranchHighlightCLass",value:function(e){return e.branchHighlight?"d3-branch-highlight":""}},{key:"getLinkCustomClass",value:function(e){return e.class_name&&"canvas-data-link"!==e.class_name&&"canvas-object-link"!==e.class_name&&"canvas-comment-link"!==e.class_name&&"d3-data-link"!==e.class_name&&"d3-association-link"!==e.class_name&&"d3-object-link"!==e.class_name&&"d3-comment-link"!==e.class_name?e.class_name:""}},{key:"getLinkTypeClass",value:function(e){return e.type===ee?this.config.enableAssocLinkType===te?"d3-association-link":"d3-object-link":e.type===ue?"d3-comment-link":"d3-data-link"}},{key:"getCommentGroupClass",value:function(e){var t="";return e.class_name&&"canvas-comment"!==e.class_name&&"d3-comment-rect"!==e.class_name&&(t=" "+e.class_name),"d3-comment-group"+(this.config.enableEditingActions?" d3-draggable":" d3-non-draggable")+t}},{key:"getNodeGroupClass",value:function(e){var t=" "+e.layout.className||"";e.class_name&&"canvas-node"!==e.class_name&&"d3-node-body"!==e.class_name&&"d3-node-body-outline"!==e.class_name&&(t=" "+e.class_name);var n=it.isExpandedSupernode(e)?" d3-node-supernode-expanded":"",i=this.config.enableEditingActions?" d3-draggable":" d3-non-draggable",o=e.isResized?" d3-resized":"",r="port-arcs"===e.layout.nodeShape?" d3-node-shape-port-arcs":"";return"d3-node-group"+n+o+i+(e.branchHighlight?" d3-branch-highlight":"")+r+t}},{key:"setDisplayOrder",value:function(e){var t=this;e.filter((function(e){return t.hasOneDecorationOrMore(e)})).lower(),e.filter((function(e){return!t.hasOneDecorationOrMore(e)})).lower(),this.config.enableLinkSelection!==Xe&&this.config.enableLinkSelection!==me||this.raiseSelectedLinksToTop()}},{key:"raiseNodeToTopById",value:function(e){this.getNodeGroupSelectionById(e).raise()}},{key:"raiseNodeToTop",value:function(e,t){!this.config.enableRaiseNodesToTopOnHover||this.isDragging()||0!==this.activePipeline.getSelectedLinksCount()||this.isEditingText()||this.config.enableLinksOverNodes||e.raise()}},{key:"raiseSelectedLinksToTop",value:function(){this.nodesLinksGrp.selectAll(".d3-link-group[data-selected]").raise()}},{key:"raiseLinkToTop",value:function(e){xf.select(e).raise().classed("handles-detachable-hover",!0)}},{key:"lowerLinkToBottom",value:function(e){xf.select(e).lower().classed("handles-detachable-hover",!1)}},{key:"hasOneDecorationOrMore",value:function(e){return e.decorations&&e.decorations.length>0}},{key:"buildLinksArray",value:function(){var e=this;this.logger.logStartTimer("buildLinksArray");var t=[];return this.canvasLayout.linkMethod===Q&&this.updateFreeformLinksForNodes(),this.activePipeline.links.forEach((function(n){var i=null;(i=!(e.config.enableLinkSelection===Xe&&e.dragDetLinkUtils.isLinkBeingDragged(n)||e.config.enableLinkSelection===me)||n.srcObj&&n.trgNode?e.getAttachedLinkObj(n):e.getDetachedLinkObj(n))&&t.push(i)})),this.canvasLayout.linkType===pe&&(t=this.addMinInitialLineForElbow(t)),t=this.linkUtils.addConnectionPaths(t),this.logger.logEndTimer("buildLinksArray"),t}},{key:"getAttachedLinkObj",value:function(e){var t=e.srcObj,n=e.trgNode;if(t||this.logger.error("Common Canvas error trying to draw a link. A link was specified for source ID '"+e.srcNodeId+"' in the Canvas data that does not have a valid source node/comment."),n||this.logger.error("Common Canvas error trying to draw a link. A link was specified for target ID '"+e.trgNodeId+"' in the Canvas data that does not have a valid target node."),t&&n&&this.shouldDisplayLink(t,n,e.type)){var i=it.getSourcePortId(e,t),o=it.getTargetPortId(e,n),r=e.type===ee&&this.config.enableAssocLinkType===te?this.getAssocLinkVariation(t,n):null,a=this.linkUtils.getLinkCoords(e,t,i,n,o,r);return e.coordsUpdated=e.x1!==a.x1||e.y1!==a.y1||e.x2!==a.x2||e.y2!==a.y2,e.assocLinkVariation=r,e.x1=a.x1,e.y1=a.y1,e.x2=a.x2,e.y2=a.y2,e.originX=a.originX,e.originY=a.originY,e.srcDir=a.srcDir,e.trgDir=a.trgDir,e}return null}},{key:"getDetachedLinkObj",value:function(e){var t=e.srcObj,n=e.trgNode,i=e.x1,o=e.y1,r=e.x2,a=e.y2;if(t||n)if(n){var s=this.getTargetEndInfo(e,n);e.x1=e.srcPos.x_pos,e.y1=e.srcPos.y_pos,e.x2=s.x2,e.y2=s.y2,e.trgDir=s.trgDir,e.originX=0,e.originY=0,e.srcDir=this.getSrcDirForDetachedLink(e,e.x1,e.y1)}else{var l=this.getSourceEndInfo(e,t);e.x1=l.x1,e.y1=l.y1,e.x2=e.trgPos.x_pos,e.y2=e.trgPos.y_pos,e.srcDir=l.srcDir,e.originX=l.originX,e.originY=l.originY,e.trgDir=this.getTrgDirForDetachedLink(e,e.x2,e.y2)}else e.x1=e.srcPos.x_pos,e.y1=e.srcPos.y_pos,e.x2=e.trgPos.x_pos,e.y2=e.trgPos.y_pos,e.originX=0,e.originY=0,this.canvasLayout.linkMethod===Q?(e.srcDir=it.getPortDir(e.x2-e.x1,e.y2-e.y1,{width:10,height:10}),e.trgDir=this.reverseDir(e.srcDir)):(e.srcDir=this.getDefaultSrcDirForPorts(),e.trgDir=this.reverseDir(e.srcDir));return e.coordsUpdated=e.x1!==i||e.y1!==o||e.x2!==r||e.y2!==a,e}},{key:"getSourceEndInfo",value:function(e,t){var n={};if(this.canvasLayout.linkMethod===Q){var i={x:e.trgPos.x_pos,y:e.trgPos.y_pos},o=this.linkUtils.getNewFreeformNodeLinkStartPos(t,i,e.srcFreeformInfo);n.x1=o.x,n.y1=o.y,n.originX=o.originX,n.originY=o.originY,n.srcDir=o.dir}else{var r=it.getSourcePortId(e,t),a=it.getOutputPort(r,t);a||(a=it.getInputPort(r,t)),a&&(n.x1=t.x_pos+a.cx,n.y1=t.y_pos+a.cy,n.srcDir=a.dir)}return n}},{key:"getTargetEndInfo",value:function(e,t){var n={};if(this.canvasLayout.linkMethod===Q){var i={x:e.srcPos.x_pos,y:e.srcPos.y_pos},o=this.linkUtils.getNewFreeformNodeLinkStartPos(t,i,e.trgFreeformInfo);n.x2=o.x,n.y2=o.y,n.trgDir=o.dir}else{var r=it.getTargetPortId(e,t),a=it.getInputPort(r,t);a&&(n.x2=t.x_pos+a.cx,n.y2=t.y_pos+a.cy,n.trgDir=a.dir)}return n}},{key:"getDefaultSrcDirForPorts",value:function(){return this.canvasLayout.linkDirection===Se?ie:this.canvasLayout.linkDirection===We?oe:this.canvasLayout.linkDirection===De?ae:this.canvasLayout.linkDirection===Te?re:ie}},{key:"getSrcDirForDetachedLink",value:function(e,t,n){if(e.trgNode){if(this.canvasLayout.linkMethod===xe){if(e.trgDir===oe&&this.canvasLayout.linkDirection===Se)return ie;if(e.trgDir===ie&&this.canvasLayout.linkDirection===We)return oe;if(e.trgDir===re&&this.canvasLayout.linkDirection===De)return ae;if(e.trgDir===ae&&this.canvasLayout.linkDirection===Te)return re}var i=it.getPortDir(t-e.trgNode.x_pos,n-e.trgNode.y_pos,e.trgNode);return this.reverseDir(i)}var o=it.getPortDir(t-e.trgPos.x_pos,n-e.trgPos.y_pos,{width:10,height:10});return this.reverseDir(o)}},{key:"getTrgDirForDetachedLink",value:function(e,t,n){if(e.srcObj){if(this.canvasLayout.linkMethod===xe){if(e.srcDir===ie&&this.canvasLayout.linkDirection===Se)return oe;if(e.srcDir===oe&&this.canvasLayout.linkDirection===We)return ie;if(e.srcDir===ae&&this.canvasLayout.linkDirection===De)return re;if(e.srcDir===re&&this.canvasLayout.linkDirection===Te)return ae}var i=it.getPortDir(t-e.srcObj.x_pos,n-e.srcObj.y_pos,e.srcObj);return this.reverseDir(i)}var o=it.getPortDir(t-e.srcPos.x_pos,n-e.srcPos.y_pos,{width:10,height:10});return this.reverseDir(o)}},{key:"reverseDir",value:function(e){switch(e){case ae:return re;case re:return ae;case ie:return oe;default:return ie}}},{key:"shouldDisplayLink",value:function(e,t,n){return(n!==ue||!this.canvasInfo.hideComments)&&(!1!==this.canvasLayout.displayLinkOnOverlap||!this.areLinkedObjectsOverlapping(e,t,n))}},{key:"areLinkedObjectsOverlapping",value:function(e,t,n){var i=n===ue?this.canvasLayout.commentHighlightGap:e.layout.nodeHighlightGap,o=t.layout.nodeHighlightGap,r=e.x_pos-i,a=e.x_pos+e.width+i,s=t.x_pos-o,l=t.x_pos+t.width+o,c=e.y_pos-i,u=e.y_pos+e.height+i,d=t.y_pos-o,h=t.y_pos+t.height+o;return a>=s&&l>=r&&u>=d&&h>=c}},{key:"addMinInitialLineForElbow",value:function(e){var t=this;return this.activePipeline.nodes.forEach((function(n){if(n.outputs&&n.outputs.length>1){var i=t.getNodeOutputLinks(n,e),o=t.sortNodeOutputLinks(i);t.applyMinInitialLine(n,o)}})),e}},{key:"getNodeOutputLinks",value:function(e,t){var n=[];return t.forEach((function(t){t.srcObj&&t.srcObj.id===e.id&&n.push(t)})),n}},{key:"sortNodeOutputLinks",value:function(e){var t=this;return e.sort((function(e,n){var i,o;return t.canvasLayout.linkDirection===Se?(i=Math.abs(e.y1-e.y2),o=Math.abs(n.y1-n.y2)):(i=Math.abs(e.x1-e.x2),o=Math.abs(n.x1-n.x2)),i===o?t.canvasLayout.linkDirection===Se?e.y1<e.y2?1:-1:e.x1<e.x2?1:-1:i<o?1:-1}))}},{key:"applyMinInitialLine",value:function(e,t){var n=e.layout.minInitialLine;t.forEach((function(e){e.minInitialLineForElbow=n,n+=e.srcObj.layout.minInitialLineIncrement}))}},{key:"updateFreeformLinksForNodes",value:function(){var e=this;this.activePipeline.nodes.forEach((function(t){return e.updateFreeformLinksForNode(t)}))}},{key:"updateFreeformLinksForNode",value:function(e){var t=this,n={n:[],s:[],e:[],w:[]};this.activePipeline.links.forEach((function(i){var o,r,a;if(i.type===J)if(e.id===(null===(o=i.srcObj)||void 0===o?void 0:o.id)&&(null===(r=i.srcObj)||void 0===r?void 0:r.id)===(null===(a=i.trgNode)||void 0===a?void 0:a.id))n[ae].push({flow:be,startNode:i.srcObj,endNode:i.trgNode,link:i}),n[ie].push({flow:ke,startNode:i.srcObj,endNode:i.trgNode,link:i});else if(i.trgNode&&i.trgNode.id===e.id){if(i.srcObj){var s=t.getDirToNode(i.trgNode,i.srcObj);n[s].push({flow:be,startNode:i.trgNode,endNode:i.srcObj,link:i})}else if(i.srcPos){var l=t.getDirToEndPos(i.trgNode,i.srcPos.x_pos,i.srcPos.y_pos);n[l].push({flow:be,x:i.srcPos.x_pos,y:i.srcPos.y_pos,link:i})}}else if(i.srcObj&&i.srcObj.id===e.id)if(i.trgNode){var c=t.getDirToNode(i.srcObj,i.trgNode);n[c].push({flow:ke,startNode:i.srcObj,endNode:i.trgNode,link:i})}else if(i.trgPos){var u=t.getDirToEndPos(i.srcObj,i.trgPos.x_pos,i.trgPos.y_pos);n[u].push({flow:ke,x:i.trgPos.x_pos,y:i.trgPos.y_pos,link:i})}}));var i={x:e.x_pos+e.width/2,y:e.y_pos+e.height/2};n.n=this.sortLinksInfo(n.n,ae,i),n.s=this.sortLinksInfo(n.s,re,i),n.e=this.sortLinksInfo(n.e,ie,i),n.w=this.sortLinksInfo(n.w,oe,i),this.updateLinksInfo(n.n,ae),this.updateLinksInfo(n.s,re),this.updateLinksInfo(n.e,ie),this.updateLinksInfo(n.w,oe)}},{key:"getDirToNode",value:function(e,t){var n=this.nodeUtils.getNodeCenterPosX(t),i=this.nodeUtils.getNodeCenterPosY(t);return this.getDirToEndPos(e,n,i)}},{key:"getDirToEndPos",value:function(e,t,n){var i=this.nodeUtils.getNodeCenterPosX(e),o=this.nodeUtils.getNodeCenterPosY(e),r=e.x_pos,a=e.y_pos,s=e.width,l=e.height;return it.getDir(r,a,s,l,i,o,t,n)}},{key:"sortLinksInfo",value:function(e,t,n){var i=this,o=e;if(o.length>1){var r=this.getLinkInfoGroups(o);ad(r,(function(e){e.forEach((function(n,o){var r=n.endNode,a=e.length+1;(t===ae||t===re?(n.x=r.x_pos+r.width/a*(o+1),n.y=i.nodeUtils.getNodeCenterPosY(r)):(n.x=i.nodeUtils.getNodeCenterPosX(r),n.y=r.y_pos+r.height/a*(o+1)),t===re)&&(i.getDirToNode(n.endNode,n.startNode)===oe&&(n.x=r.x_pos+r.width/a*(e.length-o)));t===ae&&(i.getDirToNode(n.endNode,n.startNode)===ie&&(n.x=r.x_pos+r.width/a*(e.length-o)))}))})),o.forEach((function(e){e.angle=it.calculateAngle(n.x,n.y,e.x,e.y),t===ie&&e.angle>=270&&(e.angle-=360),e.startNode&&e.endNode&&e.startNode===e.endNode&&(t===ie?e.angle=-90:t===ae&&(e.angle=360))})),o=t===ae||t===ie?o.sort((function(e,t){return e.angle>t.angle?1:-1})):o.sort((function(e,t){return e.angle<t.angle?1:-1}))}return o}},{key:"getLinkInfoGroups",value:function(e){var t={};return e.forEach((function(e){e.endNode&&(t[e.endNode.id]||(t[e.endNode.id]=[]),t[e.endNode.id].push(e))})),t}},{key:"updateLinksInfo",value:function(e,t){e.forEach((function(n,i){n.flow===ke?n.link.srcFreeformInfo={dir:t,idx:i,len:e.length}:n.link.trgFreeformInfo={dir:t,idx:i,len:e.length}}))}},{key:"getNewLinkAssocVariation",value:function(e,t,n){return n===be&&e>t?le:n===ke&&e<t?se:de}},{key:"getAssocLinkVariation",value:function(e,t){var n=e.layout.minInitialLine;return t.x_pos>=e.x_pos+e.width+n?se:e.x_pos>=t.x_pos+t.width+n?le:de}},{key:"getPortArrowPath",value:function(){return"M -2 3 L 2 0 -2 -3"}},{key:"getInputPortArrowPathTransform",value:function(e){var t=this.getAngleBasedForInputPorts(e.dir);return"translate(".concat(e.cx,", ").concat(e.cy,") rotate(").concat(t,")")}},{key:"getOutputPortArrowPathTransform",value:function(e){var t=this.getAngleBasedForOutputPorts(e.dir);return"translate(".concat(e.cx,", ").concat(e.cy,") rotate(").concat(t,")")}},{key:"getArrowHead",value:function(e){return e.type===ue?"string"==typeof this.canvasLayout.commentLinkArrowHead?this.canvasLayout.commentLinkArrowHead:"M -8 3 L 0 0 -8 -3":"string"==typeof this.canvasLayout.dataLinkArrowHead?this.canvasLayout.dataLinkArrowHead:"M -6 6 L 0 0 -6 -6"}},{key:"getArrowHeadTransform",value:function(e){var t=0;return t=this.canvasLayout.linkMethod===Q?this.getAngleBasedForFreeformLink(e):this.getAngleBasedForInputPorts(e.trgDir),"translate(".concat(e.x2,", ").concat(e.y2,") rotate(").concat(t,")")}},{key:"getPortImageTransform",value:function(e,t){var n=t===ke?this.getAngleBasedForOutputPorts(e.dir):this.getAngleBasedForInputPorts(e.dir);return"rotate(".concat(n,",").concat(e.cx,",").concat(e.cy,")")}},{key:"getAngleBasedForFreeformLink",value:function(e){var t=e.srcNodeId&&e.trgNodeId&&e.srcNodeId===e.trgNodeId;return this.canvasLayout.linkType!==ne||t?this.getAngleBasedForInputPorts(e.trgDir):Math.atan2(e.y2-e.y1,e.x2-e.x1)*(180/Math.PI)}},{key:"getLinkImageTransform",value:function(e){var t=0;return t=this.canvasLayout.linkMethod!==Q||this.canvasLayout.linkType!==ne&&this.canvasLayout.linkType!==Le?this.getAngleBasedForInputPorts(e.trgDir):it.calculateAngle(e.originX||e.x1,e.originY||e.y1,e.x2,e.y2),"rotate(".concat(t,",").concat(e.x2,",").concat(e.y2,")")}},{key:"getAngleBasedForOutputPorts",value:function(e){switch(e){case ae:return-90;case re:return 90;case oe:return 180;default:return 0}}},{key:"getAngleBasedForInputPorts",value:function(e){switch(e){case ae:return 90;case re:return-90;case oe:return 0;default:return 180}}},{key:"canOpenTip",value:function(e){return this.canvasController.isTipEnabled(e)&&!this.regionSelect&&!this.isDragging()&&!this.isSizing()}},{key:"getDefaultCommentOffset",value:function(){var e=this.canvasLayout.addCommentOffsetX,t=this.canvasLayout.addCommentOffsetY,n=this.zoomUtils.getZoomTransform();if(n){var i=n.x/n.k,o=n.y/n.k;e=-i+this.canvasLayout.addCommentOffsetX,t=-o+this.canvasLayout.addCommentOffsetY}return this.config.enableSnapToGridType===ve||this.config.enableSnapToGridType===ye?this.snapToGridPosition({x:e,y:t}):{x:e,y:t}}},{key:"getFlags",value:function(){var e="Flags:";return this.isDragging()&&(e+=" dragging = true"),this.isSizing()&&(e+=" sizing = true"),this.regionSelect&&(e+=" regionSelect = true"),"Flags:"===e&&(e+=" None"),e}},{key:"focusNextTabGroup",value:function(e){var t=this.activePipeline.getNextTabGroupStartObject();return!!t&&(this.setFocusObject(t,e),!0)}},{key:"focusPreviousTabGroup",value:function(e){var t=this.activePipeline.getPreviousTabGroupStartObject();return!!t&&(this.setFocusObject(t,e),!0)}},{key:"setFocusObject",value:function(e,t){this.config.enableKeyboardNavigation&&(it.stopPropagationAndPreventDefault(t),this.canvasController.setFocusObject(e))}},{key:"restoreFocus",value:function(){this.canvasController.isContextMenuDisplayed()||this.canvasController.restoreFocus()}},{key:"focusOnTextEntryElement",value:function(e){this.svgCanvasTextArea.focusOnTextEntryElement(e)}},{key:"resetTabObjectIndex",value:function(){this.activePipeline.resetTabObjectIndex()}},{key:"moveFocusTo",value:function(e){var t=this;if(e&&e!==Ye){var n,i=it.getObjectTypeName(e);if(this.canvasGrp.selectAll(".d3-focus-path").remove(),"node"===i?(n=this.getNodeGroupSelectionById(e.id)).insert("path",":first-child").attr("class","d3-focus-path").attr("d",(function(e){return t.getNodeShapePathSizing(e)})):"comment"===i?(n=this.getCommentGroupSelectionById(e.id)).insert("rect",":first-child").attr("class","d3-focus-path").attr("x",-this.canvasLayout.commentSizingArea).attr("y",-this.canvasLayout.commentSizingArea).attr("height",(function(e){return e.height+2*t.canvasLayout.commentSizingArea})).attr("width",(function(e){return e.width+2*t.canvasLayout.commentSizingArea})):"link"===i&&(n=this.getLinkGroupSelectionById(e.id)),e){var o=this.canvasController.getZoomToReveal([e.id]);o&&this.zoomTo(o)}if(n){var r=n.node();r&&r.focus()}else{var a=e?e.id:"Unknown";this.logger.error("Error applying focus to ".concat(i," object with ID: ").concat(a))}}}}])}(),Lf=function(){return e((function e(n,i,o){t(this,e),this.logger=new pt(["SVGCanvasD3","FlowId",n]),this.logger.logStartTimer("constructor"),this.canvasController=o,this.canvasDiv=$u(i),this.logger.logEndTimer("constructor",!0)}),[{key:"setCanvasInfo",value:function(e,t,n,i,o,r){if(this.logger=new pt(["SVGCanvasD3","FlowId",e.id]),this.config&&this.renderer&&this.canvasInfo&&e.id===this.canvasInfo.id&&(!this.renderer||this.renderer.pipelineId===this.canvasController.getCurrentBreadcrumb().pipelineId)&&Et.compareCanvasConfigsOmitFields(this.config,r))this.logger.logStartTimer("set canvas info"),this.canvasInfo=this.cloneCanvasInfo(e),this.config=this.cloneConfig(r),this.renderer.setCanvasInfoRenderer(this.canvasInfo,t,n,i,o,this.config),this.logger.logEndTimer("set canvas info",!0);else{this.logger.logStartTimer("initializing"),this.canvasInfo=this.cloneCanvasInfo(e),this.config=this.cloneConfig(r),this.renderer&&(this.renderer.clearCanvas(),this.renderer=null);var a=this.canvasController.getCurrentBreadcrumb();this.renderer=new Cf(a.pipelineId,this.canvasDiv,this.canvasController,this.canvasInfo,t,n,i,o,r,{id:a.supernodeId,pipelineId:a.supernodeParentPipelineId}),this.logger.logEndTimer("initializing",!0)}}},{key:"setSelectionInfo",value:function(e){this.renderer&&this.renderer.setSelectionInfo(e)}},{key:"cloneConfig",value:function(e){return Object.assign({},e)}},{key:"cloneCanvasInfo",value:function(e){return Ht(e)}},{key:"isEditingText",value:function(){return this.renderer.isEditingText()}},{key:"isDragging",value:function(){return this.renderer.isDragging()}},{key:"convertPageCoordsToSnappedCanvasCoords",value:function(e){return this.renderer.convertPageCoordsToSnappedCanvasCoords(e)}},{key:"nodeTemplateDragStart",value:function(e){this.renderer.nodeTemplateDragStart(e)}},{key:"nodeTemplateDragOver",value:function(e,t,n){this.renderer.nodeTemplateDragOver(e,t,n)}},{key:"nodeTemplateDragEnd",value:function(e){this.renderer.nodeTemplateDragEnd(e)}},{key:"nodeTemplateDropped",value:function(e,t,n){this.renderer.nodeTemplateDropped(e,t,n)}},{key:"externalObjectDropped",value:function(e,t,n){this.renderer.externalObjectDropped(e,t,n)}},{key:"zoomTo",value:function(e,t){this.renderer.zoomTo(e,t)}},{key:"translateBy",value:function(e,t,n){this.renderer.translateBy(e,t,n)}},{key:"zoomIn",value:function(){this.renderer.zoomIn()}},{key:"zoomOut",value:function(){this.renderer.zoomOut()}},{key:"zoomToFit",value:function(){this.renderer.zoomToFit()}},{key:"isZoomedToMax",value:function(){return!!this.renderer&&this.renderer.isZoomedToMax()}},{key:"isZoomedToMin",value:function(){return!!this.renderer&&this.renderer.isZoomedToMin()}},{key:"getZoomToReveal",value:function(e,t,n){return this.renderer?this.renderer.getZoomToReveal(e,t,n):null}},{key:"getZoom",value:function(){return this.renderer?this.renderer.getZoom():null}},{key:"setCommentEditingMode",value:function(e,t){this.renderer.setCommentEditingMode(e,t)}},{key:"setNodeLabelEditingMode",value:function(e,t){this.renderer.setNodeLabelEditingMode(e,t)}},{key:"setNodeDecorationLabelEditingMode",value:function(e,t,n){this.renderer.setNodeDecorationLabelEditingMode(e,t,n)}},{key:"setLinkDecorationLabelEditingMode",value:function(e,t,n){this.renderer.setLinkDecorationLabelEditingMode(e,t,n)}},{key:"refreshOnSizeChange",value:function(){this.renderer&&this.renderer.refreshOnSizeChange()}},{key:"getDefaultCommentOffset",value:function(){return this.renderer.getDefaultCommentOffset()}},{key:"getTransformedViewportDimensions",value:function(){return this.renderer.getTransformedViewportDimensions()}},{key:"getCanvasDimensionsWithPadding",value:function(){return this.renderer.getCanvasDimensionsWithPadding()}},{key:"getGhostNode",value:function(e){return this.renderer.getGhostNode(e)}},{key:"setSpaceKeyPressed",value:function(e){this.renderer.setSpaceKeyPressed(e)}},{key:"isSpaceKeyPressed",value:function(){return this.renderer.isSpaceKeyPressed()}},{key:"focusNextTabGroup",value:function(e){return this.renderer.focusNextTabGroup(e)}},{key:"focusPreviousTabGroup",value:function(e){return this.renderer.focusPreviousTabGroup(e)}},{key:"resetTabObjectIndex",value:function(){this.renderer.resetTabObjectIndex()}},{key:"moveFocusTo",value:function(e){this.renderer.moveFocusTo(e)}},{key:"focusOnTextEntryElement",value:function(e){this.renderer.focusOnTextEntryElement(e)}},{key:"openCanvasContextOptions",value:function(e){this.renderer.openCanvasContextOptions(e)}}])}();function Ef(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ef=function(){return!!e})()}var Pf=function(n){function s(e){var n,i,l,c;return t(this,s),i=this,c=[e],l=o(l=s),(n=r(i,Ef()?Reflect.construct(l,c||[],o(i).constructor):l.apply(i,c))).state={isDropZoneDisplayed:!1},n.logger=new pt("CC-Contents"),n.mainCanvasDivId="canvas-div-"+n.props.canvasController.getInstanceId(),n.svgCanvasDivId="d3-svg-canvas-div-"+n.props.canvasController.getInstanceId(),n.svgCanvasDivSelector="#"+n.svgCanvasDivId,n.dragX=null,n.dragY=null,n.contentsRef=a.createRef(),n.eventListenersAdded=!1,n.mousePos={x:0,y:0},n.drop=n.drop.bind(n),n.focusOnCanvas=n.focusOnCanvas.bind(n),n.setIsDropZoneDisplayed=n.setIsDropZoneDisplayed.bind(n),n.dragOver=n.dragOver.bind(n),n.dragEnter=n.dragEnter.bind(n),n.dragLeave=n.dragLeave.bind(n),n.refreshOnSizeChange=n.refreshOnSizeChange.bind(n),n.getLabel=n.getLabel.bind(n),n.onCut=n.onCut.bind(n),n.onCopy=n.onCopy.bind(n),n.onPaste=n.onPaste.bind(n),n.onKeyDown=n.onKeyDown.bind(n),n.onKeyUp=n.onKeyUp.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onClickReturnToPrevious=n.onClickReturnToPrevious.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.onMouseDown=n.onMouseDown.bind(n),n.onBlur=n.onBlur.bind(n),n.first=!1,n.second=!1,n.afterUpdateCallbacks=[],e.canvasController.setCanvasContents(n),n}return i(s,n),e(s,[{key:"componentDidMount",value:function(){this.logger.log("componentDidMount"),this.svgCanvasD3=new Lf(this.props.canvasInfo.id,this.svgCanvasDivSelector,this.props.canvasController),this.setCanvasInfo(),this.props.canvasConfig.enableBrowserEditMenu&&this.addEventListeners(),this.props.canvasConfig.enableFocusOnMount&&this.props.canvasController.setFocusOnCanvas()}},{key:"componentDidUpdate",value:function(e){this.logger.log("componentDidUpdate"),this.svgCanvasD3&&!this.isDropZoneDisplayed()&&(e.canvasInfo!==this.props.canvasInfo||e.canvasConfig!==this.props.canvasConfig||e.breadcrumbs!==this.props.breadcrumbs?(this.setCanvasInfo(),this.afterUpdate()):e.selectionInfo!==this.props.selectionInfo&&(this.svgCanvasD3.setSelectionInfo(this.props.selectionInfo),this.afterUpdate())),this.props.canvasConfig.enableBrowserEditMenu?this.addEventListeners():this.removeEventListeners()}},{key:"componentWillUnmount",value:function(){this.removeEventListeners()}},{key:"onCut",value:function(e){this.isFocusOnCanvasOrContents(e)&&this.props.canvasConfig.enableEditingActions&&!this.svgCanvasD3.isEditingText()&&(e.preventDefault(),this.props.canvasController.cutToClipboard())}},{key:"onCopy",value:function(e){this.isFocusOnCanvasOrContents(e)&&this.props.canvasConfig.enableEditingActions&&!this.svgCanvasD3.isEditingText()&&(e.preventDefault(),this.props.canvasController.copyToClipboard())}},{key:"onPaste",value:function(e){this.isFocusOnCanvasOrContents(e)&&this.props.canvasConfig.enableEditingActions&&!this.svgCanvasD3.isEditingText()&&(e.preventDefault(),this.props.canvasController.pasteFromClipboard())}},{key:"onKeyDown",value:function(e){var t=this;this.props.canvasController.closeTip();var n=this.props.canvasController.getKeyboardConfig().actions;if(!this.svgCanvasD3.isEditingText()&&!this.svgCanvasD3.isDragging()){if(this.props.canvasConfig.enableEditingActions)if(ot.delete(e)&&n.delete)it.stopPropagationAndPreventDefault(e),this.props.canvasController.autoSelectFocusObj((function(){return t.props.canvasController.keyboardActionHandler("deleteSelectedObjects")}));else if(ot.undo(e)&&n.undo)it.stopPropagationAndPreventDefault(e),this.props.canvasController.canUndo()&&this.props.canvasController.keyboardActionHandler("undo");else if(ot.redo(e)&&n.redo)it.stopPropagationAndPreventDefault(e),this.props.canvasController.canRedo()&&this.props.canvasController.keyboardActionHandler("redo");else if(ot.copyToClipboard(e)&&n.copyToClipboard)it.stopPropagationAndPreventDefault(e),this.props.canvasController.autoSelectFocusObj((function(){return t.props.canvasController.keyboardActionHandler("copy")}));else if(ot.cutToClipboard(e)&&n.cutToClipboard)it.stopPropagationAndPreventDefault(e),this.props.canvasController.autoSelectFocusObj((function(){return t.props.canvasController.keyboardActionHandler("cut")}));else if(ot.pasteFromClipboard(e)&&n.pasteFromClipboard)if(it.stopPropagationAndPreventDefault(e),this.mousePos){var i=this.svgCanvasD3.convertPageCoordsToSnappedCanvasCoords(this.mousePos);this.props.canvasController.keyboardActionHandler("paste",i)}else this.props.canvasController.keyboardActionHandler("paste");ot.selectAll(e)&&n.selectAll?(it.stopPropagationAndPreventDefault(e),this.props.canvasController.keyboardActionHandler("selectAll")):ot.deselectAll(e)&&n.deselectAll?(it.stopPropagationAndPreventDefault(e),this.props.canvasController.keyboardActionHandler("deselectAll")):ot.spaceKey(e)?this.svgCanvasD3.isSpaceKeyPressed()||(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.setSpaceKeyPressed(!0)):ot.toggleLogging(e)?(it.stopPropagationAndPreventDefault(e),pt.switchLoggingState()):ot.zoomToFit(e)&&this.props.canvasConfig.enableKeyboardNavigation?(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.zoomToFit()):ot.zoomIn(e)&&this.props.canvasConfig.enableKeyboardNavigation?(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.zoomIn()):ot.zoomOut(e)&&this.props.canvasConfig.enableKeyboardNavigation?(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.zoomOut()):ot.panLeft(e)&&this.props.canvasConfig.enableKeyboardNavigation?(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.translateBy(-10,0)):ot.panRight(e)&&this.props.canvasConfig.enableKeyboardNavigation?(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.translateBy(10,0)):ot.panUp(e)&&this.props.canvasConfig.enableKeyboardNavigation?(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.translateBy(0,-10)):ot.panDown(e)&&this.props.canvasConfig.enableKeyboardNavigation?(it.stopPropagationAndPreventDefault(e),this.svgCanvasD3.translateBy(0,10)):ot.nextGroup(e)&&this.props.canvasConfig.enableKeyboardNavigation?this.moveFocusToNextGroup(e):ot.previousGroup(e)&&this.props.canvasConfig.enableKeyboardNavigation?this.moveFocusToPreviousGroup(e):ot.displayContextOptions(e)&&this.props.canvasConfig.enableKeyboardNavigation&&this.svgCanvasD3.openCanvasContextOptions(e),e.stopPropagation()}}},{key:"onKeyUp",value:function(){this.svgCanvasD3.setSpaceKeyPressed(!1)}},{key:"onBlur",value:function(e){this.isTargetInsideCanvas(e.relatedTarget)||this.svgCanvasD3.resetTabObjectIndex()}},{key:"onMouseMove",value:function(e){e.target&&e.target.className&&("svg-area"===e.target.className.baseVal||"d3-svg-background"===e.target.className.baseVal)?this.mousePos={x:e.clientX,y:e.clientY}:this.mousePos=null}},{key:"onMouseLeave",value:function(e){this.mousePos=null}},{key:"onMouseDown",value:function(e){this.props.canvasController.setFocusOnCanvas()}},{key:"onClickReturnToPrevious",value:function(e){e.stopPropagation(),e.preventDefault(),this.props.canvasController.displayPreviousPipeline()}},{key:"setCanvasInfo",value:function(){var e=this.props.canvasController.objectModel.getNodeLayout(),t=this.props.canvasController.objectModel.getCanvasLayout();this.svgCanvasD3.setCanvasInfo(this.props.canvasInfo,this.props.selectionInfo,this.props.breadcrumbs,e,t,this.props.canvasConfig)}},{key:"getLabel",value:function(e){return this.props.intl.formatMessage({id:e,defaultMessage:wt[e]})}},{key:"getDNDJson",value:function(e){try{return JSON.parse(e.dataTransfer.getData(D))}catch(e){return this.logger.warn("The dragged object's data does not conform to the expected internal format: "+e),null}}},{key:"getSVGCanvasD3",value:function(){return this.svgCanvasD3}},{key:"getStateTag",value:function(){var e=null;return this.props.canvasConfig.enableStateTag!==Y&&this.props.canvasConfig.enableStateTag!==X||(e=a.createElement(Vc,{stateTagType:this.props.canvasConfig.enableStateTag,canvasController:this.props.canvasController})),e}},{key:"getEmptyCanvas",value:function(){var e=null;return this.props.canvasController.isPrimaryPipelineEmpty()&&(e=this.props.canvasConfig.emptyCanvasContent?a.createElement("div",{className:"empty-canvas"},this.props.canvasConfig.emptyCanvasContent):a.createElement("div",{className:"empty-canvas"},a.createElement("div",{className:"empty-canvas-image"},a.createElement(ht,null)),a.createElement("span",{className:"empty-canvas-text1"},this.getLabel("canvas.flowIsEmpty")),a.createElement("span",{className:"empty-canvas-text2"},this.getLabel("canvas.addNodeToStart")))),e}},{key:"getReturnToPreviousBtn",value:function(){var e,t=null;if(!this.props.canvasController.isPrimaryPipelineEmpty()&&(this.props.canvasController.isDisplayingFullPageSubFlow()||null!==(e=this.props.canvasConfig)&&void 0!==e&&null!==(e=e.enableCanvasLayout)&&void 0!==e&&e.alwaysDisplayBackToParentFlow)){var n=this.getLabel("canvas.returnToPrevious");t=a.createElement("div",{className:"return-to-previous"},a.createElement(N,{kind:"tertiary",onClick:this.onClickReturnToPrevious,"aria-label":n,size:"md"},a.createElement("div",{className:"return-to-previous-content"},a.createElement(zt,null),a.createElement("span",null,n))))}return t}},{key:"getContextMenu",value:function(){return this.props.canvasConfig.enableContextToolbar?a.createElement(Ac,{canvasController:this.props.canvasController,containingDivId:this.mainCanvasDivId}):a.createElement(Cc,{canvasController:this.props.canvasController,containingDivId:this.mainCanvasDivId})}},{key:"getTextToolbar",value:function(){return a.createElement(Hc,{canvasController:this.props.canvasController,containingDivId:this.mainCanvasDivId})}},{key:"getDropZone",value:function(){var e=null;return this.isDropZoneDisplayed()&&(e=this.props.canvasConfig.dropZoneCanvasContent?this.props.canvasConfig.dropZoneCanvasContent:a.createElement("div",null,a.createElement("div",{className:"dropzone-canvas"}),a.createElement("div",{className:"dropzone-canvas-rect"}))),e}},{key:"getSvgCanvasDivId",value:function(){return this.svgCanvasDivId}},{key:"getSVGCanvasDiv",value:function(){return this.props.canvasConfig.enableKeyboardNavigation?a.createElement("div",{tabIndex:"0",className:"d3-svg-canvas-div keyboard-navigation",id:this.svgCanvasDivId,onMouseDown:this.onMouseDown,onMouseLeave:this.onMouseLeave,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,role:"application","aria-label":"canvas-keyboard-navigation"}):a.createElement("div",{tabIndex:"-1",className:"d3-svg-canvas-div",id:this.svgCanvasDivId,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp})}},{key:"setIsDropZoneDisplayed",value:function(e){e!==this.state.isDropZoneDisplayed&&this.setState({isDropZoneDisplayed:e})}},{key:"isTargetInsideCanvas",value:function(e){return e&&e.closest(".common-canvas-drop-div")}},{key:"isDropZoneDisplayed",value:function(){return this.props.canvasConfig.enableDropZoneOnExternalDrag&&this.state.isDropZoneDisplayed}},{key:"isDataTypeBeingDraggedFile",value:function(e){return!(!e.dataTransfer||!Array.isArray(e.dataTransfer.types))&&e.dataTransfer.types.includes("Files")}},{key:"isFocusOnCanvasOrContents",value:function(e){var t;return!(null===(t=e.currentTarget)||void 0===t||!t.activeElement)&&(e.currentTarget.activeElement.closest(this.svgCanvasDivSelector)||e.currentTarget.activeElement.id===this.svgCanvasDivId)}},{key:"isFocusOnCanvas",value:function(){var e;return(null===(e=document.activeElement)||void 0===e?void 0:e.id)===this.getSvgCanvasDivId()}},{key:"afterUpdate",value:function(){this.afterUpdateCallbacks.forEach((function(e){return e()}))}},{key:"addAfterUpdateCallback",value:function(e){-1===this.afterUpdateCallbacks.findIndex((function(t){return t===e}))&&this.afterUpdateCallbacks.push(e)}},{key:"removeAfterUpdateCallback",value:function(e){var t=this.afterUpdateCallbacks.findIndex((function(t){return t===e}));t>-1&&this.afterUpdateCallbacks.splice(t,1)}},{key:"addEventListeners",value:function(){this.eventListenersAdded||(document.addEventListener("cut",this.onCut,!0),document.addEventListener("copy",this.onCopy,!0),document.addEventListener("paste",this.onPaste,!0),document.addEventListener("mousemove",this.onMouseMove,!0),this.eventListenersAdded=!0)}},{key:"removeEventListeners",value:function(){this.eventListenersAdded&&(document.removeEventListener("cut",this.onCut,!0),document.removeEventListener("copy",this.onCopy,!0),document.removeEventListener("paste",this.onPaste,!0),document.removeEventListener("mousemove",this.onMouseMove,!0),this.eventListenersAdded=!1)}},{key:"drop",value:function(e){if(e.preventDefault(),this.setIsDropZoneDisplayed(!1),this.first=!1,this.second=!1,this.props.canvasConfig.enableEditingActions){var t=this.props.canvasController.getDragNodeTemplate();if(t)this.svgCanvasD3.nodeTemplateDropped(t,e.clientX,e.clientY),this.props.canvasController.nodeTemplateDragEnd();else{var n=this.getDNDJson(e);n||(n={operation:"addToCanvas",data:{dataTransfer:e.dataTransfer,editType:"createFromExternalObject"}}),this.svgCanvasD3.externalObjectDropped(n,e.clientX,e.clientY)}}}},{key:"dragOver",value:function(e){if(Math.abs(this.dragX-e.clientX)>5||Math.abs(this.dragY-e.clientY)>5){this.dragX=e.clientX,this.dragY=e.clientY;var t=this.props.canvasController.getDragNodeTemplate();t&&this.svgCanvasD3.nodeTemplateDragOver(t,e.clientX,e.clientY)}}},{key:"dragEnter",value:function(e){this.dragX=null,this.dragY=null,this.isDataTypeBeingDraggedFile(e)&&(this.first?this.second=!0:(this.first=!0,this.setIsDropZoneDisplayed(!0))),e.preventDefault()}},{key:"dragLeave",value:function(e){this.isDataTypeBeingDraggedFile(e)&&(this.second?this.second=!1:this.first&&(this.first=!1),this.first||this.second||this.setIsDropZoneDisplayed(!1)),e.preventDefault()}},{key:"moveFocusToNextGroup",value:function(e){this.svgCanvasD3.focusNextTabGroup(e)?it.stopPropagationAndPreventDefault(e):this.props.canvasController.setFocusOnCanvas()}},{key:"moveFocusToPreviousGroup",value:function(e){this.svgCanvasD3.focusPreviousTabGroup(e)?it.stopPropagationAndPreventDefault(e):this.props.canvasController.setFocusOnCanvas()}},{key:"focusOnCanvas",value:function(){document.getElementById(this.svgCanvasDivId)&&document.getElementById(this.svgCanvasDivId).focus()}},{key:"refreshOnSizeChange",value:function(){this.svgCanvasD3&&this.svgCanvasD3.refreshOnSizeChange()}},{key:"render",value:function(){this.logger.log("render");var e=this.getStateTag(),t=this.getEmptyCanvas(),n=this.getReturnToPreviousBtn(),i=this.getContextMenu(),o=this.getTextToolbar(),r=this.getDropZone(),s=this.getSVGCanvasDiv();return a.createElement("main",{"aria-label":this.getLabel("canvas.label"),role:"main"},a.createElement(xt,{handleWidth:!0,handleHeight:!0,onResize:this.refreshOnSizeChange,targetRef:this.contentsRef},a.createElement("div",{id:this.mainCanvasDivId,ref:this.contentsRef,className:"common-canvas-drop-div",onDrop:this.drop,onDragOver:this.dragOver,onDragEnter:this.dragEnter,onDragLeave:this.dragLeave},s,t,n,e,i,o,r)))}}])}(a.Component),Nf=s((function(e,t){return{canvasInfo:e.canvasinfo,canvasConfig:e.canvasconfig,selectionInfo:e.selectioninfo,breadcrumbs:e.breadcrumbs}}))(c(Pf)),Tf="Close";function Df(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Df=function(){return!!e})()}var Sf=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Df()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).state={},n.logger=new pt("NotificationPanel"),n.keyDownOnPanel=n.keyDownOnPanel.bind(n),n}return i(s,n),e(s,[{key:"componentDidMount",value:function(){this.setFocusOnFirstItem()}},{key:"setFocusOnFirstItem",value:function(){this.allRefs.length>0&&this.allRefs[0].focus()}},{key:"getNotifications",value:function(){var e=this,t=[];if(!this.props.messages)return t;for(var n=0;n<this.props.messages.length;n++){var i=this.props.messages[n],o=i.callback?" clickable ":"",r=i.type,s=a.createElement("div",{className:"notification-message-type"},a.createElement(rt,{type:r,className:"notification-message-icon-".concat(r)})),l=i.title?a.createElement("div",{className:"notification-message-title"},i.title):null,c=i.subtitle?a.createElement("div",{className:"notification-message-subtitle"},i.subtitle,a.createElement("hr",null)):null,u=i.closeMessage?a.createElement("div",{tabIndex:0,ref:function(t){return!t||e.allRefs.push(t)},className:"notification-message-close",onClick:this.clickOnCloseButton.bind(this,i),onKeyDown:this.keyDownOnCloseButton.bind(this,i)},i.closeMessage):null,d=i.timestamp?a.createElement("div",{className:"notification-message-timestamp"},a.createElement("div",{className:"notification-message-timestamp-icon"},a.createElement(rt,{type:"time"})),a.createElement("div",{className:"notification-message-string"},i.timestamp)):null;t.push(a.createElement("div",{className:"notifications-button-container",key:n+"-"+i.id},a.createElement("div",{className:"notifications "+o+i.type,onClick:this.notificationCallback.bind(this,i.id,i.callback),tabIndex:0,ref:function(t){return!t||e.allRefs.push(t)}},s,a.createElement("div",{className:"notification-message-details"},l,c,a.createElement("div",{className:"notification-message-content"},i.content),d,u))))}return t}},{key:"notificationCallback",value:function(e,t){t&&t(e)}},{key:"clickOnCloseButton",value:function(e){this.deleteNotification(e.id)}},{key:"keyDownOnCloseButton",value:function(e,t){ot.activateButton(t)&&this.deleteNotification(e.id)}},{key:"deleteNotification",value:function(e){this.props.subPanelData.canvasController.deleteNotificationMessages(e)}},{key:"clearNotificationMessages",value:function(){this.props.subPanelData.canvasController.clearNotificationMessages(),this.setFocusOnFirstItem(),"function"==typeof this.props.notificationConfig.clearAllCallback&&this.props.notificationConfig.clearAllCallback()}},{key:"keyDownOnPanel",value:function(e){if(ot.nextSection(e)){var t=this.allRefs[this.allRefs.length-1];e.target===t&&(e.stopPropagation(),e.preventDefault(),this.allRefs[0].focus())}else if(ot.previousSection(e)){var n=this.allRefs[this.allRefs.length-1];e.target===this.allRefs[0]&&(e.stopPropagation(),e.preventDefault(),n.focus())}}},{key:"render",value:function(){var e=this;if(this.logger.log("render"),this.allRefs=[],!this.props.notificationConfig)return null;var t=this.props.notificationConfig&&this.props.notificationConfig.notificationHeader?this.props.notificationConfig.notificationHeader:Ke,n=a.createElement("div",{className:"notification-panel-header"},t),i=this.props.notificationConfig&&this.props.notificationConfig.notificationSubtitle?a.createElement("div",{className:"notification-panel-subtitle"},this.props.notificationConfig.notificationSubtitle):null,o=a.createElement("div",{className:"notification-panel-close-button"},a.createElement(N,{ref:function(t){return!t||e.allRefs.push(t)},size:"sm",kind:"ghost",renderIcon:yt,hasIconOnly:!0,iconDescription:this.props.intl.formatMessage({id:"notification.panel.close.button.description",defaultMessage:Tf}),onClick:this.props.closeSubPanel,tooltipAlignment:"end",tooltipPosition:"bottom"})),r=this.props.messages.length>0?this.getNotifications():a.createElement("div",{tabIndex:0,ref:function(t){return!t||e.allRefs.push(t)},className:"notification-panel-empty-message-container"},a.createElement("div",{className:"notification-panel-empty-message"},this.props.notificationConfig&&this.props.notificationConfig.emptyMessage?this.props.notificationConfig.emptyMessage:null)),s=this.props.notificationConfig&&this.props.notificationConfig.clearAllMessage?a.createElement("div",{className:"notification-panel-clear-all-container"},a.createElement(N,{ref:function(t){return!t||0===e.props.messages.length||e.allRefs.push(t)},className:"notification-panel-clear-all",onClick:this.clearNotificationMessages.bind(this),kind:"ghost",size:"sm",disabled:0===this.props.messages.length},this.props.notificationConfig.clearAllMessage)):null,l=this.props.notificationConfig&&this.props.notificationConfig.secondaryButtonLabel&&this.props.notificationConfig.secondaryButtonCallback?a.createElement("div",{className:"notification-panel-secondary-button-container"},a.createElement(N,{ref:function(t){return!t||e.props.secondaryButtonDisabled||e.allRefs.push(t)},className:"notification-panel-secondary-button",onClick:this.props.notificationConfig.secondaryButtonCallback.bind(this),kind:"ghost",size:"sm",disabled:this.props.secondaryButtonDisabled},this.props.notificationConfig.secondaryButtonLabel)):null;return a.createElement("div",{className:"notification-panel",onKeyDown:this.keyDownOnPanel},a.createElement("div",{className:"notification-panel-header-container",tabIndex:0,ref:function(t){return!t||e.allRefs.push(t)}},n,i),o,a.createElement("div",{className:"notification-panel-messages"},r),a.createElement("div",{className:"notification-panel-button-container"},s,l))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.messages!==t.messages?{messages:e.messages}:{}}}])}(a.Component),Of=s((function(e,t){return{notificationConfig:e.notificationpanel.config,secondaryButtonDisabled:!!e.notificationpanel.config&&e.notificationpanel.config.secondaryButtonDisabled,messages:e.notifications}}))(c(Sf));function Af(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function zf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Af(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Af(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function If(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(If=function(){return!!e})()}var Mf=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,If()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("CC-Toolbar"),n.getLabel=n.getLabel.bind(n),n.toolbarActionHandler=n.toolbarActionHandler.bind(n),n}return i(s,n),e(s,[{key:"getLabel",value:function(e,t){var n=wt[e]?wt[e]:zc[e];return this.props.intl.formatMessage({id:e,defaultMessage:n},t)}},{key:"getDefaultToolbar",value:function(){return{leftBar:[{action:"undo",label:this.getLabel("canvas.undo"),enable:!0},{action:"redo",label:this.getLabel("canvas.redo"),enable:!0},{action:"cut",label:this.getLabel("edit.cutSelection"),enable:!0},{action:"copy",label:this.getLabel("edit.copySelection"),enable:!0},{action:"paste",label:this.getLabel("edit.pasteSelection"),enable:!0},{action:"createAutoComment",label:this.getLabel("canvas.addComment"),enable:!0},{action:"deleteSelectedObjects",label:this.getLabel("canvas.deleteObject"),enable:!0}],rightBar:[{action:"zoomIn",label:this.getLabel("toolbar.zoomIn"),enable:!0},{action:"zoomOut",label:this.getLabel("toolbar.zoomOut"),enable:!0},{action:"zoomToFit",label:this.getLabel("toolbar.zoomToFit"),enable:!0}]}}},{key:"getConvertedLegacyToolbar",value:function(e){return{leftBar:e,rightBar:this.getDefaultRightBar()}}},{key:"getDefaultRightBar",value:function(){return[{action:"zoomIn",label:this.getLabel("toolbar.zoomIn"),enable:!0},{action:"zoomOut",label:this.getLabel("toolbar.zoomOut"),enable:!0},{action:"zoomToFit",label:this.getLabel("toolbar.zoomToFit"),enable:!0}]}},{key:"getNotificationClassName",value:function(){var e=this.props.canvasController.getNotificationMessagesMaxType(),t=Qe;return e===B?t+=" error":e===U?t+=" warning":e===et?t+=" success":e===tt&&(t+=" info"),t}},{key:"getToolIndexByAction",value:function(e,t){return null==t?void 0:t.findIndex((function(t){return t.action===e}))}},{key:"generateToolbarConfig",value:function(){var e=this.copyConfig();return e?Array.isArray(e)?e=this.getConvertedLegacyToolbar(e):void 0===e.rightBar&&(e.rightBar=this.getDefaultRightBar()):e=this.getDefaultToolbar(),e=this.optionallyAddPaletteTool(e),e=this.optionallyAddNotificationTool(e)}},{key:"copyConfig",value:function(){if(!this.props.config)return null;if(Array.isArray(this.props.config))return w(this.props.config);var e={};return this.props.config.overrideAutoEnableDisable&&(e.overrideAutoEnableDisable=!0),this.props.config&&this.props.config.leftBar&&(e.leftBar=w(this.props.config.leftBar)),this.props.config&&this.props.config.rightBar&&(e.rightBar=w(this.props.config.rightBar)),e}},{key:"toolbarActionHandler",value:function(e){this.props.canvasController.toolbarActionHandler(e)}},{key:"optionallyAddPaletteTool",value:function(e){var t=e.leftBar||[],n=e.rightBar||[],i=this.getLabel("toolbar.palette"),o=t;if(t&&t.length>0&&"palette"===t[0].action&&(i=t[0].label?t[0].label:i,o=t.slice(1),t.length>1&&t[1].divider&&(o=t.slice(2))),this.props.isPaletteEnabled){var r=this.props.isPaletteOpen?"closePalette-action paletteClose-action":"openPalette-action paletteOpen-action",s=this.props.isPaletteOpen?a.createElement(k,null):a.createElement(x,null),l={action:qe,label:i,enable:!0,iconEnabled:s,isSelected:this.props.isPaletteOpen,className:r},c=this.getToolIndexByAction(qe,t),u=this.getToolIndexByAction(qe,n);if(c>-1){var d=t[c];e.leftBar[c]=zf(zf({},l),{},{label:d.label?d.label:i,iconEnabled:d.iconEnabled?d.iconEnabled:null,incLabelWithIcon:d.incLabelWithIcon?d.incLabelWithIcon:null,tooltip:d.tooltip?d.tooltip:null})}else if(u>-1){var h=n[u];e.rightBar[u]=zf(zf({},l),{},{label:h.label?h.label:i,iconEnabled:h.iconEnabled?h.iconEnabled:null,incLabelWithIcon:h.incLabelWithIcon?h.incLabelWithIcon:null,tooltip:h.tooltip?h.tooltip:null})}else{var p=[l,{divider:!0}];e.leftBar=p.concat(o)}}return e}},{key:"optionallyAddNotificationTool",value:function(e){var t=e.leftBar||[],n=e.rightBar||[];if(this.props.notificationConfigExists){var i=this.props.notificationMessages.length,o={action:$e,label:this.props.notificationConfigLabel,enable:this.props.notificationConfigEnable,extIsSubAreaDisplayed:this.props.isNotificationOpen,setExtIsSubAreaDisplayed:this.callExtIsSubAreaDisplayed.bind(this),className:this.getNotificationClassName(),textContent:i>9?"9+":i.toString(),subPanel:Of,subPanelData:{canvasController:this.props.canvasController},leaveSubAreaOpenOnClickOutside:this.props.notificationConfigKeepOpen},r=this.getToolIndexByAction($e,t),a=this.getToolIndexByAction($e,n);if(r>-1){var s=t[r];e.leftBar[r]=zf(zf({},o),{},{iconEnabled:s.iconEnabled?s.iconEnabled:null,incLabelWithIcon:s.incLabelWithIcon?s.incLabelWithIcon:null,tooltip:s.tooltip?s.tooltip:null,textContent:null})}else if(a>-1){var l=n[a];e.rightBar[a]=zf(zf({},o),{},{iconEnabled:l.iconEnabled?l.iconEnabled:null,incLabelWithIcon:l.incLabelWithIcon?l.incLabelWithIcon:null,tooltip:l.tooltip?l.tooltip:null,textContent:null})}else{var c=[{divider:!0},o];e.rightBar=e.rightBar.concat(c)}}return e}},{key:"callExtIsSubAreaDisplayed",value:function(e){e?this.props.canvasController.openNotificationPanel():this.props.canvasController.closeNotificationPanel()}},{key:"configureToolbarButtonsState",value:function(e){if(!this.props.enableInternalObjectModel||e.overrideAutoEnableDisable)return e;if(void 0!==e){var t=this.props.enableEditingActions;this.applyToolState("undo",e,t&&this.props.canUndo),this.applyToolState("redo",e,t&&this.props.canRedo),this.applyToolState("cut",e,t&&this.props.canCutCopy),this.applyToolState("copy",e,t&&this.props.canCutCopy),this.applyToolState("paste",e,t&&this.props.canPaste),this.applyToolState("deleteSelectedObjects",e,t&&this.props.canDelete),this.applyToolState("createAutoComment",e,t),this.applyToolState("arrangeHorizontally",e,t),this.applyToolState("arrangeVertically",e,t),this.applyToolState("zoomIn",e,this.props.canZoomIn),this.applyToolState("zoomOut",e,this.props.canZoomOut),this.applyToolState("zoomToFit",e,this.props.canZoomToFit)}return e}},{key:"addUndoRedoCommandLabels",value:function(e){var t=this.props.undoLabel,n=this.props.redoLabel;if(t){var i=this.findTool("undo",e);i&&(i.label=this.getLabel("canvas.undoCommand",{undo_command:t}))}if(n){var o=this.findTool("redo",e);o&&(o.label=this.getLabel("canvas.redoCommand",{redo_command:n}))}return e}},{key:"applyToolState",value:function(e,t,n){var i=this.findTool(e,t);i?i.enable=n:this.logger.log("Toolbar tool "+e+" could not be found to set state to "+n)}},{key:"findTool",value:function(e,t){var n={};return t.leftBar&&(n=t.leftBar.find((function(t){return t.action===e}))),!n&&t.rightBar&&(n=t.rightBar.find((function(t){return t.action===e}))),n}},{key:"render",value:function(){this.logger.log("render");var e=this.generateToolbarConfig();e=this.configureToolbarButtonsState(e),e=this.addUndoRedoCommandLabels(e);var t=null;return this.props.enableToolbarLayout===Je&&(t=a.createElement("div",{"aria-label":this.getLabel("toolbar.label"),role:"navigation",className:"common-canvas-toolbar"},a.createElement(y,{config:e,containingDivId:this.props.containingDivId,instanceId:this.props.canvasController.getInstanceId(),toolbarActionHandler:this.toolbarActionHandler,additionalText:{overflowMenuLabel:this.getLabel("toolbar.overflowMenu")}}))),t}}])}(a.Component),Hf=s((function(e,t){var n,i,o,r;return{enableToolbarLayout:e.canvasconfig.enableToolbarLayout,config:e.canvastoolbar.config,isPaletteEnabled:e.canvasconfig.enablePaletteLayout!==M,isPaletteOpen:e.palette.isOpen,isNotificationOpen:e.notificationpanel.isOpen,notificationConfigExists:null===(n=e.notificationpanel)||void 0===n?void 0:n.config,notificationConfigEnable:null===(i=e.notificationpanel)||void 0===i||null===(i=i.config)||void 0===i?void 0:i.enable,notificationConfigLabel:null===(o=e.notificationpanel)||void 0===o||null===(o=o.config)||void 0===o?void 0:o.label,notificationConfigKeepOpen:null===(r=e.notificationpanel)||void 0===r||null===(r=r.config)||void 0===r?void 0:r.keepOpen,notificationMessages:e.notifications,enableInternalObjectModel:e.canvasconfig.enableInternalObjectModel,enableEditingActions:e.canvasconfig.enableEditingActions,canUndo:t.canvasController.canUndo(),canRedo:t.canvasController.canRedo(),canCutCopy:t.canvasController.canCutCopy(),canPaste:t.canvasController.canPaste(),canDelete:t.canvasController.canDelete(),canZoomIn:t.canvasController.canZoomIn(),canZoomOut:t.canvasController.canZoomOut(),canZoomToFit:t.canvasController.canZoomToFit(),undoLabel:t.canvasController.getUndoLabel(),redoLabel:t.canvasController.getRedoLabel()}}))(c(Mf));function _f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_f=function(){return!!e})()}var Vf=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,_f()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("CC-LeftFlyout"),n}return i(s,n),e(s,[{key:"render",value:function(){this.logger.log("render");var e=a.createElement("div",null);if(this.props.content&&this.props.isOpen){var t=this.props.enableLeftFlyoutUnderToolbar?"left-flyout-panel under-toolbar":"left-flyout-panel";e=a.createElement("div",{className:t},this.props.content)}return e}}])}(a.Component),jf=s((function(e,t){return{isOpen:e.leftflyout.isOpen,content:e.leftflyout.content,enableLeftFlyoutUnderToolbar:e.canvasconfig.enableLeftFlyoutUnderToolbar}}))(Vf);function Ff(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ff=function(){return!!e})()}var Rf=function(n){function s(e){var n,i,l,c;return t(this,s),i=this,c=[e],l=o(l=s),(n=r(i,Ff()?Reflect.construct(l,c||[],o(i).constructor):l.apply(i,c))).initialWidth=0,n.logger=new pt("CC-RightFlyout"),n.rightFlyoutRef=a.createRef(),n.onMouseUp=n.onMouseUp.bind(n),n.onMouseDown=n.onMouseDown.bind(n),n.onMouseMoveX=n.onMouseMoveX.bind(n),n.getCurrentWidth=n.getCurrentWidth.bind(n),n.getRightFlyoutResizeContent=n.getRightFlyoutResizeContent.bind(n),n}return i(s,n),e(s,[{key:"componentDidMount",value:function(){var e=this.getCurrentWidth();this.initialWidth=e}},{key:"componentWillUnmount",value:function(){this.props.canvasController.setRightFlyoutWidth(0)}},{key:"onMouseDown",value:function(e){var t=this.getCurrentWidth();this.props.canvasController.setRightFlyoutWidth(this.limitWidth(t)),0===e.button&&(document.addEventListener("mousemove",this.onMouseMoveX,!0),document.addEventListener("mouseup",this.onMouseUp,!0),this.posX=e.clientX,e.preventDefault())}},{key:"onMouseUp",value:function(){document.removeEventListener("mousemove",this.onMouseMoveX,!0),document.removeEventListener("mouseup",this.onMouseUp,!0)}},{key:"onMouseMoveX",value:function(e){if(e.clientX){var t=e.clientX-this.posX,n=this.props.panelWidth-t;this.props.canvasController.setRightFlyoutWidth(this.limitWidth(n)),this.posX=e.clientX}}},{key:"getRightFlyoutResizeContent",value:function(){var e=null;return this.props.enableRightFlyoutDragToResize&&(e=a.createElement("div",{className:"right-flyout-drag",onMouseDown:this.onMouseDown})),e}},{key:"getCurrentWidth",value:function(){var e,t=0,n=null===(e=this.rightFlyoutRef)||void 0===e?void 0:e.current;return n&&(t=null==n?void 0:n.offsetWidth),t}},{key:"limitWidth",value:function(e){var t=document.getElementById(this.props.containingDivId),n=e;if(t){var i=.7*(t.getBoundingClientRect().width+this.props.panelWidth);n=Math.min(Math.max(n,this.initialWidth),i)}return n}},{key:"render",value:function(){this.logger.log("render");var e=a.createElement("div",null),t=this.getRightFlyoutResizeContent();if(this.props.content&&this.props.isOpen){var n=this.limitWidth(this.props.panelWidth)+"px";0===this.props.panelWidth&&(n="100%");var i=this.props.enableRightFlyoutUnderToolbar?"right-flyout-panel under-toolbar":"right-flyout-panel";e=a.createElement("div",{className:"right-flyout-container",style:{width:n}},t,a.createElement("div",{className:i,ref:this.rightFlyoutRef},this.props.content))}return e}}])}(a.Component),Bf=s((function(e,t){return{isOpen:e.rightflyout.isOpen,content:e.rightflyout.content,enableRightFlyoutUnderToolbar:e.canvasconfig.enableRightFlyoutUnderToolbar,enableRightFlyoutDragToResize:e.canvasconfig.enableRightFlyoutDragToResize,panelWidth:e.rightflyout.panelWidth}}))(Rf);function Uf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Uf=function(){return!!e})()}var Gf=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Uf()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("CC-Bottom-Panel"),n.onMouseUp=n.onMouseUp.bind(n),n.onMouseDown=n.onMouseDown.bind(n),n.onMouseMoveY=n.onMouseMoveY.bind(n),n}return i(s,n),e(s,[{key:"onMouseDown",value:function(e){0===e.button&&(document.addEventListener("mousemove",this.onMouseMoveY,!0),document.addEventListener("mouseup",this.onMouseUp,!0),this.posY=e.clientY,e.preventDefault())}},{key:"onMouseUp",value:function(e){document.removeEventListener("mousemove",this.onMouseMoveY,!0),document.removeEventListener("mouseup",this.onMouseUp,!0)}},{key:"onMouseMoveY",value:function(e){if(e.clientY){var t=e.clientY-this.posY,n=this.props.panelHeight-t;this.props.canvasController.setBottomPanelHeight(this.limitHeight(n)),this.posY=e.clientY}}},{key:"limitHeight",value:function(e){var t=document.getElementById(this.props.containingDivId),n=document.getElementsByClassName("top-panel"),i=e,o=0;if(n.length>0&&(o=n[0].getBoundingClientRect().height),t){var r=t.getBoundingClientRect().height-200-o;i=Math.min(Math.max(i,75),r)}return i}},{key:"render",value:function(){this.logger.log("render");var e=null;if(this.props.bottomPanelIsOpen){var t=this.limitHeight(this.props.panelHeight)+"px";e=a.createElement("div",{className:"bottom-panel",style:{height:t}},a.createElement("div",{className:"bottom-panel-drag",onMouseDown:this.onMouseDown}),a.createElement("div",{className:"bottom-panel-contents"},this.props.bottomPanelContent))}return e}}])}(a.Component),Zf=s((function(e,t){return{bottomPanelIsOpen:e.bottompanel.isOpen,bottomPanelContent:e.bottompanel.content,panelHeight:e.bottompanel.panelHeight}}))(Gf);function Wf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wf=function(){return!!e})()}var Xf=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Wf()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("CC-Top-Panel"),n}return i(s,n),e(s,[{key:"render",value:function(){this.logger.log("render");var e=null;return this.props.topPanelIsOpen&&(e=a.createElement("div",{className:"top-panel"},this.props.topPanelContent)),e}}])}(a.Component),Yf=s((function(e,t){return{topPanelIsOpen:e.toppanel.isOpen,topPanelContent:e.toppanel.content}}))(Xf);function Kf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Kf=function(){return!!e})()}var qf=function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Kf()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt("CC-Panels"),n}return i(s,n),e(s,[{key:"onDragOver",value:function(e){e.preventDefault()}},{key:"onDrop",value:function(e){e.preventDefault()}},{key:"generateClass",value:function(){var e="common-canvas";return e+=this.props.enableEditingActions?"":" config-editing-actions-false",e+=this.props.enableParentClass?" "+this.props.enableParentClass:""}},{key:"generateTopCenterBottom",value:function(){var e=a.createElement(Nf,{canvasController:this.props.canvasController}),t=a.createElement(Zf,{canvasController:this.props.canvasController,containingDivId:this.props.containingDivId}),n=a.createElement(Yf,{canvasController:this.props.canvasController,containingDivId:this.props.containingDivId}),i=this.props.topPanelIsOpen?"auto 1fr":"1fr";return i+=this.props.bottomPanelIsOpen?" auto":"",a.createElement("div",{className:"common-canvas-grid-vertical",style:{gridTemplateRows:i}},n,e,t)}},{key:"isLeftFlyoutOpen",value:function(){return this.props.enablePaletteLayout!==nt&&(!(this.props.enablePaletteLayout!==M||!this.props.leftFlyoutIsOpen)||!(this.props.enablePaletteLayout!==H||!this.props.paletteIsOpen&&!this.props.enableNarrowPalette))}},{key:"isRightFlyoutOpen",value:function(){return this.props.rightFlyoutIsOpen}},{key:"generateLeftFlyout",value:function(){return this.props.enablePaletteLayout===M&&this.props.leftFlyoutIsOpen?a.createElement(jf,null):this.props.enablePaletteLayout===H?a.createElement(Jl,{canvasController:this.props.canvasController}):null}},{key:"generateRightFlyout",value:function(){return a.createElement(Bf,{containingDivId:this.props.containingDivId,canvasController:this.props.canvasController})}},{key:"render",value:function(){this.logger.log("render");var e=a.createElement(kc,{canvasController:this.props.canvasController}),t=a.createElement(Hf,{canvasController:this.props.canvasController,containingDivId:this.props.containingDivId}),n=this.isRightFlyoutOpen()?this.generateRightFlyout():null,i=this.isLeftFlyoutOpen(),o=i?this.generateLeftFlyout():null,r=this.generateTopCenterBottom(),s=null;if(this.props.enableLeftFlyoutUnderToolbar)if(this.props.enableRightFlyoutUnderToolbar){var l=i&&o?"auto ":"";l+="1fr",l+=this.props.rightFlyoutIsOpen?" auto":"";var c=this.props.toolbarIsOpen?"auto 1fr":"1fr",u=a.createElement("div",{id:this.props.containingDivId,className:"common-canvas-grid-horizontal",style:{gridTemplateColumns:l}},o,r,n);s=a.createElement("div",{className:"common-canvas-grid-vertical",style:{gridTemplateRows:c}},t,u)}else{var d=this.props.toolbarIsOpen?"auto 1fr":"1fr",h=i?"auto 1fr":"1fr",p=a.createElement("div",{className:"common-canvas-grid-vertical",style:{gridTemplateRows:d}},t,a.createElement("div",{id:this.props.containingDivId,className:"common-canvas-grid-horizontal",style:{gridTemplateColumns:h}},o,r));s=a.createElement(a.Fragment,null,p,n)}else if(this.props.enableRightFlyoutUnderToolbar){var g=this.props.toolbarIsOpen?"auto 1fr":"1fr",f=this.props.rightFlyoutIsOpen?"1fr auto":"1fr",v=a.createElement("div",{className:"common-canvas-grid-vertical",style:{gridTemplateRows:g}},t,a.createElement("div",{id:this.props.containingDivId,className:"common-canvas-grid-horizontal",style:{gridTemplateColumns:f}},r,n));s=a.createElement(a.Fragment,null,o,v)}else{var y="";y+=this.props.toolbarIsOpen?"auto":"",y+=" 1fr";var m=i&&o?"auto ":"";m+="1fr",m+=this.props.rightFlyoutIsOpen?" auto":"";var b=a.createElement("div",{id:this.props.containingDivId,className:"common-canvas-grid-vertical",style:{gridTemplateRows:y}},t,r);s=a.createElement("div",{className:"common-canvas-grid-horizontal",style:{gridTemplateColumns:m}},o,b,n)}var k=this.props.enablePaletteLayout===nt&&this.props.paletteIsOpen?a.createElement(yc,{canvasController:this.props.canvasController,containingDivId:this.props.containingDivId}):null,x=this.generateClass();return a.createElement("div",{className:x,onDragOver:this.onDragOver,onDrop:this.onDrop},s,k,e)}}])}(a.Component),$f=s((function(e,t){return{enableParentClass:e.canvasconfig.enableParentClass,enableEditingActions:e.canvasconfig.enableEditingActions,enablePaletteLayout:e.canvasconfig.enablePaletteLayout,enableNarrowPalette:e.canvasconfig.enableNarrowPalette,enableLeftFlyoutUnderToolbar:e.canvasconfig.enableLeftFlyoutUnderToolbar,enableRightFlyoutUnderToolbar:e.canvasconfig.enableRightFlyoutUnderToolbar,enableRightFlyoutDragToResize:e.canvasconfig.enableRightFlyoutDragToResize,toolbarIsOpen:e.canvasconfig.enableToolbarLayout!==M,paletteIsOpen:e.palette.isOpen,topPanelIsOpen:e.toppanel.isOpen,bottomPanelIsOpen:e.bottompanel.isOpen,leftFlyoutIsOpen:e.leftflyout.isOpen,rightFlyoutIsOpen:e.rightflyout.isOpen}}))(qf);function Jf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Jf=function(){return!!e})()}var Qf=c(function(n){function s(e){var n,i,a,l;return t(this,s),i=this,l=[e],a=o(a=s),(n=r(i,Jf()?Reflect.construct(a,l||[],o(i).constructor):a.apply(i,l))).logger=new pt(["CommonCanvas"]),n.logger.log("constructor"),n.initializeController=n.initializeController.bind(n),n.containingDivId="common-canvas-items-container-"+e.canvasController.getInstanceId(),e.canvasController.setIntl(e.intl),n.initializeController(e),n}return i(s,n),e(s,[{key:"componentDidUpdate",value:function(){this.logger.log("componentDidUpdate"),this.initializeController(this.props)}},{key:"initializeController",value:function(e){this.logger.logStartTimer("initializeController"),e.canvasController.setCanvasConfig(e.config),e.canvasController.setContextMenuConfig(e.contextMenuConfig),e.canvasController.setKeyboardConfig(e.keyboardConfig),e.canvasController.setToolbarConfig(e.toolbarConfig),e.canvasController.setNotificationPanelConfig(e.notificationConfig),e.canvasController.setLeftFlyoutConfig({content:e.leftFlyoutContent,isOpen:e.showLeftFlyout}),e.canvasController.setRightFlyoutConfig({content:e.rightFlyoutContent,isOpen:e.showRightFlyout}),e.canvasController.setBottomPanelConfig({content:e.bottomPanelContent,isOpen:e.showBottomPanel}),e.canvasController.setTopPanelConfig({content:e.topPanelContent,isOpen:e.showTopPanel}),e.canvasController.setHandlers({contextMenuHandler:e.contextMenuHandler,beforeEditActionHandler:e.beforeEditActionHandler,editActionHandler:e.editActionHandler,clickActionHandler:e.clickActionHandler,decorationActionHandler:e.decorationActionHandler,tipHandler:e.tipHandler,layoutHandler:e.layoutHandler,idGeneratorHandler:e.idGeneratorHandler,selectionChangeHandler:e.selectionChangeHandler,actionLabelHandler:e.actionLabelHandler}),this.logger.logEndTimer("initializeController")}},{key:"render",value:function(){return this.logger.log("render"),a.createElement(l,{store:this.props.canvasController.getStore()},a.createElement($f,{canvasController:this.props.canvasController,containingDivId:this.containingDivId}))}}])}(a.Component));export{Jl as P,Qf as c};
2
+ //# sourceMappingURL=common-canvas-ee905f14.js.map