All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.chunks.mermaid.esm.min.chunk-A7EQIZZO.mjs.map Maven / Gradle / Ivy

Go to download

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

The newest version!
{
  "version": 3,
  "sources": ["../../../src/rendering-util/rendering-elements/shapes/util.ts", "../../../../../node_modules/.pnpm/[email protected]_patch_hash=vxb6t6fqvzyhwhtjiliqr25jyq/node_modules/roughjs/bundled/rough.esm.js", "../../../src/rendering-util/rendering-elements/intersect/intersect-rect.js", "../../../src/rendering-util/rendering-elements/createLabel.js", "../../../src/rendering-util/rendering-elements/shapes/roundedRectPath.ts", "../../../src/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.ts", "../../../src/rendering-util/rendering-elements/clusters.js", "../../../src/rendering-util/rendering-elements/intersect/intersect-node.js", "../../../src/rendering-util/rendering-elements/intersect/intersect-ellipse.js", "../../../src/rendering-util/rendering-elements/intersect/intersect-circle.js", "../../../src/rendering-util/rendering-elements/intersect/intersect-line.js", "../../../src/rendering-util/rendering-elements/intersect/intersect-polygon.js", "../../../src/rendering-util/rendering-elements/intersect/index.js", "../../../src/rendering-util/rendering-elements/shapes/anchor.ts", "../../../src/rendering-util/rendering-elements/shapes/bowTieRect.ts", "../../../src/rendering-util/rendering-elements/shapes/insertPolygonShape.ts", "../../../src/rendering-util/rendering-elements/shapes/card.ts", "../../../src/rendering-util/rendering-elements/shapes/choice.ts", "../../../src/rendering-util/rendering-elements/shapes/circle.ts", "../../../src/rendering-util/rendering-elements/shapes/crossedCircle.ts", "../../../src/rendering-util/rendering-elements/shapes/curlyBraceLeft.ts", "../../../src/rendering-util/rendering-elements/shapes/curlyBraceRight.ts", "../../../src/rendering-util/rendering-elements/shapes/curlyBraces.ts", "../../../src/rendering-util/rendering-elements/shapes/curvedTrapezoid.ts", "../../../src/rendering-util/rendering-elements/shapes/cylinder.ts", "../../../src/rendering-util/rendering-elements/shapes/dividedRect.ts", "../../../src/rendering-util/rendering-elements/shapes/doubleCircle.ts", "../../../src/rendering-util/rendering-elements/shapes/filledCircle.ts", "../../../src/rendering-util/rendering-elements/shapes/flippedTriangle.ts", "../../../src/rendering-util/rendering-elements/shapes/forkJoin.ts", "../../../src/rendering-util/rendering-elements/shapes/halfRoundedRectangle.ts", "../../../src/rendering-util/rendering-elements/shapes/hexagon.ts", "../../../src/rendering-util/rendering-elements/shapes/hourglass.ts", "../../../src/rendering-util/rendering-elements/shapes/icon.ts", "../../../src/rendering-util/rendering-elements/shapes/iconCircle.ts", "../../../src/rendering-util/rendering-elements/shapes/iconRounded.ts", "../../../src/rendering-util/rendering-elements/shapes/iconSquare.ts", "../../../src/rendering-util/rendering-elements/shapes/imageSquare.ts", "../../../src/rendering-util/rendering-elements/shapes/invertedTrapezoid.ts", "../../../src/rendering-util/rendering-elements/shapes/drawRect.ts", "../../../src/rendering-util/rendering-elements/shapes/labelRect.ts", "../../../src/rendering-util/rendering-elements/shapes/leanLeft.ts", "../../../src/rendering-util/rendering-elements/shapes/leanRight.ts", "../../../src/rendering-util/rendering-elements/shapes/lightningBolt.ts", "../../../src/rendering-util/rendering-elements/shapes/linedCylinder.ts", "../../../src/rendering-util/rendering-elements/shapes/linedWaveEdgedRect.ts", "../../../src/rendering-util/rendering-elements/shapes/multiRect.ts", "../../../src/rendering-util/rendering-elements/shapes/multiWaveEdgedRectangle.ts", "../../../src/rendering-util/rendering-elements/shapes/note.ts", "../../../src/rendering-util/rendering-elements/shapes/question.ts", "../../../src/rendering-util/rendering-elements/shapes/rectLeftInvArrow.ts", "../../../src/rendering-util/rendering-elements/shapes/rectWithTitle.ts", "../../../src/rendering-util/rendering-elements/shapes/roundedRect.ts", "../../../src/rendering-util/rendering-elements/shapes/shadedProcess.ts", "../../../src/rendering-util/rendering-elements/shapes/slopedRect.ts", "../../../src/rendering-util/rendering-elements/shapes/squareRect.ts", "../../../src/rendering-util/rendering-elements/shapes/stadium.ts", "../../../src/rendering-util/rendering-elements/shapes/state.ts", "../../../src/rendering-util/rendering-elements/shapes/stateEnd.ts", "../../../src/rendering-util/rendering-elements/shapes/stateStart.ts", "../../../src/rendering-util/rendering-elements/shapes/subroutine.ts", "../../../src/rendering-util/rendering-elements/shapes/taggedRect.ts", "../../../src/rendering-util/rendering-elements/shapes/taggedWaveEdgedRectangle.ts", "../../../src/rendering-util/rendering-elements/shapes/text.ts", "../../../src/rendering-util/rendering-elements/shapes/tiltedCylinder.ts", "../../../src/rendering-util/rendering-elements/shapes/trapezoid.ts", "../../../src/rendering-util/rendering-elements/shapes/trapezoidalPentagon.ts", "../../../src/rendering-util/rendering-elements/shapes/triangle.ts", "../../../src/rendering-util/rendering-elements/shapes/waveEdgedRectangle.ts", "../../../src/rendering-util/rendering-elements/shapes/waveRectangle.ts", "../../../src/rendering-util/rendering-elements/shapes/windowPane.ts", "../../../src/diagrams/class/shapeUtil.ts", "../../../src/rendering-util/rendering-elements/shapes/classBox.ts", "../../../src/rendering-util/rendering-elements/shapes/kanbanItem.ts", "../../../src/rendering-util/rendering-elements/shapes.ts", "../../../src/rendering-util/rendering-elements/nodes.ts"],
  "sourcesContent": ["import { createText } from '../../createText.js';\nimport type { Node } from '../../types.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport defaultConfig from '../../../defaultConfig.js';\nimport { evaluate, sanitizeText } from '../../../diagrams/common/common.js';\nimport { decodeEntities, handleUndefinedAttr, parseFontSize } from '../../../utils.js';\nimport type { D3Selection, Point } from '../../../types.js';\n\nexport const labelHelper = async (\n  parent: D3Selection,\n  node: Node,\n  _classes?: string\n) => {\n  let cssClasses;\n  const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig()?.htmlLabels);\n  if (!_classes) {\n    cssClasses = 'node default';\n  } else {\n    cssClasses = _classes;\n  }\n\n  // Add outer g element\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', cssClasses)\n    .attr('id', node.domId || node.id);\n\n  // Create the label and insert it after the rect\n  const labelEl = shapeSvg\n    .insert('g')\n    .attr('class', 'label')\n    .attr('style', handleUndefinedAttr(node.labelStyle));\n\n  // Replace label with default value if undefined\n  let label;\n  if (node.label === undefined) {\n    label = '';\n  } else {\n    label = typeof node.label === 'string' ? node.label : node.label[0];\n  }\n\n  const text = await createText(labelEl, sanitizeText(decodeEntities(label), getConfig()), {\n    useHtmlLabels,\n    width: node.width || getConfig().flowchart?.wrappingWidth,\n    // @ts-expect-error -- This is currently not used. Should this be `classes` instead?\n    cssClasses: 'markdown-node-label',\n    style: node.labelStyle,\n    addSvgBackground: !!node.icon || !!node.img,\n  });\n  // Get the size of the label\n  let bbox = text.getBBox();\n  const halfPadding = (node?.padding ?? 0) / 2;\n\n  if (useHtmlLabels) {\n    const div = text.children[0];\n    const dv = select(text);\n\n    // if there are images, need to wait for them to load before getting the bounding box\n    const images = div.getElementsByTagName('img');\n    if (images) {\n      const noImgText = label.replace(/]*>/g, '').trim() === '';\n\n      await Promise.all(\n        [...images].map(\n          (img) =>\n            new Promise((res) => {\n              /**\n               *\n               */\n              function setupImage() {\n                img.style.display = 'flex';\n                img.style.flexDirection = 'column';\n\n                if (noImgText) {\n                  // default size if no text\n                  const bodyFontSize = getConfig().fontSize\n                    ? getConfig().fontSize\n                    : window.getComputedStyle(document.body).fontSize;\n                  const enlargingFactor = 5;\n                  const [parsedBodyFontSize = defaultConfig.fontSize] = parseFontSize(bodyFontSize);\n                  const width = parsedBodyFontSize * enlargingFactor + 'px';\n                  img.style.minWidth = width;\n                  img.style.maxWidth = width;\n                } else {\n                  img.style.width = '100%';\n                }\n                res(img);\n              }\n              setTimeout(() => {\n                if (img.complete) {\n                  setupImage();\n                }\n              });\n              img.addEventListener('error', setupImage);\n              img.addEventListener('load', setupImage);\n            })\n        )\n      );\n    }\n\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  // Center the label\n  if (useHtmlLabels) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  } else {\n    labelEl.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n  }\n  if (node.centerLabel) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  }\n  labelEl.insert('rect', ':first-child');\n  return { shapeSvg, bbox, halfPadding, label: labelEl };\n};\nexport const insertLabel = async (\n  parent: D3Selection,\n  label: string,\n  options: {\n    labelStyle?: string | undefined;\n    icon?: boolean | undefined;\n    img?: string | undefined;\n    useHtmlLabels?: boolean | undefined;\n    padding: number;\n    width?: number | undefined;\n    centerLabel?: boolean | undefined;\n    addSvgBackground?: boolean | undefined;\n  }\n) => {\n  const useHtmlLabels = options.useHtmlLabels || evaluate(getConfig()?.flowchart?.htmlLabels);\n\n  // Create the label and insert it after the rect\n  const labelEl = parent\n    .insert('g')\n    .attr('class', 'label')\n    .attr('style', options.labelStyle || '');\n\n  const text = await createText(labelEl, sanitizeText(decodeEntities(label), getConfig()), {\n    useHtmlLabels,\n    width: options.width || getConfig()?.flowchart?.wrappingWidth,\n    style: options.labelStyle,\n    addSvgBackground: !!options.icon || !!options.img,\n  });\n  // Get the size of the label\n  let bbox = text.getBBox();\n  const halfPadding = options.padding / 2;\n\n  if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n    const div = text.children[0];\n    const dv = select(text);\n\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  // Center the label\n  if (useHtmlLabels) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  } else {\n    labelEl.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n  }\n  if (options.centerLabel) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  }\n  labelEl.insert('rect', ':first-child');\n  return { shapeSvg: parent, bbox, halfPadding, label: labelEl };\n};\nexport const updateNodeBounds = (\n  node: Node,\n  // D3Selection is for the roughjs case, D3Selection is for the non-roughjs case\n  element: D3Selection | D3Selection\n) => {\n  const bbox = element.node()!.getBBox();\n  node.width = bbox.width;\n  node.height = bbox.height;\n};\n\n/**\n * @param parent - Parent element to append the polygon to\n * @param w - Width of the polygon\n * @param h - Height of the polygon\n * @param points - Array of points to create the polygon\n */\nexport function insertPolygonShape(\n  parent: D3Selection,\n  w: number,\n  h: number,\n  points: Point[]\n) {\n  return parent\n    .insert('polygon', ':first-child')\n    .attr(\n      'points',\n      points\n        .map(function (d) {\n          return d.x + ',' + d.y;\n        })\n        .join(' ')\n    )\n    .attr('class', 'label-container')\n    .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n\nexport const getNodeClasses = (node: Node, extra?: string) =>\n  (node.look === 'handDrawn' ? 'rough-node' : 'node') + ' ' + node.cssClasses + ' ' + (extra || '');\n\nexport function createPathFromPoints(points: Point[]) {\n  const pointStrings = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`);\n  pointStrings.push('Z');\n  return pointStrings.join(' ');\n}\n\nexport function generateFullSineWavePoints(\n  x1: number,\n  y1: number,\n  x2: number,\n  y2: number,\n  amplitude: number,\n  numCycles: number\n) {\n  const points = [];\n  const steps = 50; // Number of segments to create a smooth curve\n  const deltaX = x2 - x1;\n  const deltaY = y2 - y1;\n  const cycleLength = deltaX / numCycles;\n\n  // Calculate frequency and phase shift\n  const frequency = (2 * Math.PI) / cycleLength;\n  const midY = y1 + deltaY / 2;\n\n  for (let i = 0; i <= steps; i++) {\n    const t = i / steps;\n    const x = x1 + t * deltaX;\n    const y = midY + amplitude * Math.sin(frequency * (x - x1));\n\n    points.push({ x, y });\n  }\n\n  return points;\n}\n\n/**\n * @param centerX - x-coordinate of center of circle\n * @param centerY - y-coordinate of center of circle\n * @param radius - radius of circle\n * @param numPoints - total points required\n * @param startAngle - angle where arc will start\n * @param endAngle - angle where arc will end\n */\nexport function generateCirclePoints(\n  centerX: number,\n  centerY: number,\n  radius: number,\n  numPoints: number,\n  startAngle: number,\n  endAngle: number\n) {\n  const points = [];\n\n  // Convert angles to radians\n  const startAngleRad = (startAngle * Math.PI) / 180;\n  const endAngleRad = (endAngle * Math.PI) / 180;\n\n  // Calculate the angle range in radians\n  const angleRange = endAngleRad - startAngleRad;\n\n  // Calculate the angle step\n  const angleStep = angleRange / (numPoints - 1);\n\n  for (let i = 0; i < numPoints; i++) {\n    const angle = startAngleRad + i * angleStep;\n    const x = centerX + radius * Math.cos(angle);\n    const y = centerY + radius * Math.sin(angle);\n    points.push({ x: -x, y: -y });\n  }\n\n  return points;\n}\n", "function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&\"number\"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;ei);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:\"fillSketch\",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:\"fillSketch\",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;tn%2?t+s:t+e));a.push({key:\"C\",data:t}),e=t[4],s=t[5];break}case\"Q\":a.push({key:\"Q\",data:[...r]}),e=r[2],s=r[3];break;case\"q\":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:\"Q\",data:t}),e=t[2],s=t[3];break}case\"A\":a.push({key:\"A\",data:[...r]}),e=r[5],s=r[6];break;case\"a\":e+=r[5],s+=r[6],a.push({key:\"A\",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case\"H\":a.push({key:\"H\",data:[...r]}),e=r[0];break;case\"h\":e+=r[0],a.push({key:\"H\",data:[e]});break;case\"V\":a.push({key:\"V\",data:[...r]}),s=r[0];break;case\"v\":s+=r[0],a.push({key:\"V\",data:[s]});break;case\"S\":a.push({key:\"S\",data:[...r]}),e=r[2],s=r[3];break;case\"s\":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:\"S\",data:t}),e=t[2],s=t[3];break}case\"T\":a.push({key:\"T\",data:[...r]}),e=r[0],s=r[1];break;case\"t\":e+=r[0],s+=r[1],a.push({key:\"T\",data:[e,s]});break;case\"Z\":case\"z\":a.push({key:\"Z\",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s=\"\",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case\"M\":e.push({key:\"M\",data:[...l]}),[n,o]=l,[a,h]=l;break;case\"C\":e.push({key:\"C\",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case\"L\":e.push({key:\"L\",data:[...l]}),[n,o]=l;break;case\"H\":n=l[0],e.push({key:\"L\",data:[n,o]});break;case\"V\":o=l[0],e.push({key:\"L\",data:[n,o]});break;case\"S\":{let t=0,a=0;\"C\"===s||\"S\"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:\"C\",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case\"T\":{const[t,a]=l;let h=0,c=0;\"Q\"===s||\"T\"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:\"C\",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case\"Q\":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:\"C\",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case\"A\":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:\"C\",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:\"C\",data:t})})),n=i,o=c}break}case\"Z\":e.push({key:\"Z\",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),td&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e2){const o=[];for(let e=0;e2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:\"lineTo\",data:[c,l]},{op:\"lineTo\",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:\"path\",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case\"M\":a=[h[0],h[1]],o=[h[0],h[1]];break;case\"L\":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case\"C\":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case\"Z\":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:\"path\",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:\"move\",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:\"move\",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:\"move\",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:\"bcurveTo\",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:\"bcurveTo\",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o3){const a=[],h=1-s.curveTightness;o.push({op:\"move\",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;ni&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s0?X(n,0,n.length,s):n}const tt=\"none\";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:\"#000\",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:\"hachure\",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d(\"line\",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];\"solid\"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d(\"rectangle\",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if(\"solid\"===a.fillStyle){const s=D(t,e,a,r).opset;s.type=\"fillPath\",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d(\"ellipse\",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape=\"circle\",o}linearPath(t,e){const s=this._o(e);return this._d(\"linearPath\",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if(\"solid\"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type=\"fillPath\",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d(\"arc\",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if(\"solid\"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:\"fillPath\",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t=\"number\"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d(\"curve\",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&(\"solid\"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d(\"polygon\",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d(\"path\",n,s);t=(t||\"\").replace(/\\n/g,\" \").replace(/(-\\s)/g,\"-\").replace(\"/(ss)/g\",\" \");const o=s.fill&&\"transparent\"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case\"M\":c(),h=[e[0],e[1]],a.push(h);break;case\"L\":i(),a.push([e[0],e[1]]);break;case\"C\":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case\"Z\":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if(\"solid\"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:\"fillPath\",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d(\"path\",n,s)}opsToPath(t,e){let s=\"\";for(const n of t.ops){const t=\"number\"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case\"move\":s+=`M${t[0]} ${t[1]} `;break;case\"bcurveTo\":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case\"lineTo\":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case\"path\":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case\"fillPath\":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case\"fillSketch\":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||\"move\"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext(\"2d\"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case\"path\":n.save(),n.strokeStyle=\"none\"===s.stroke?\"transparent\":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case\"fillPath\":{n.save(),n.fillStyle=s.fill||\"\";const e=\"curve\"===t.shape||\"polygon\"===t.shape||\"path\"===t.shape?\"evenodd\":\"nonzero\";this._drawToContext(n,a,o,e),n.restore();break}case\"fillSketch\":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||\"\",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n=\"nonzero\"){t.beginPath();for(const n of e.ops){const e=\"number\"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case\"move\":t.moveTo(e[0],e[1]);break;case\"bcurveTo\":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case\"lineTo\":t.lineTo(e[0],e[1])}}\"fillPath\"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt=\"http://www.w3.org/2000/svg\";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,\"g\"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case\"path\":e=n.createElementNS(nt,\"path\"),e.setAttribute(\"d\",this.opsToPath(h,a)),e.setAttribute(\"stroke\",s.stroke),e.setAttribute(\"stroke-width\",s.strokeWidth+\"\"),e.setAttribute(\"fill\",\"none\"),s.strokeLineDash&&e.setAttribute(\"stroke-dasharray\",s.strokeLineDash.join(\" \").trim()),s.strokeLineDashOffset&&e.setAttribute(\"stroke-dashoffset\",`${s.strokeLineDashOffset}`);break;case\"fillPath\":e=n.createElementNS(nt,\"path\"),e.setAttribute(\"d\",this.opsToPath(h,a)),e.setAttribute(\"stroke\",\"none\"),e.setAttribute(\"stroke-width\",\"0\"),e.setAttribute(\"fill\",s.fill||\"\"),\"curve\"!==t.shape&&\"polygon\"!==t.shape||e.setAttribute(\"fill-rule\",\"evenodd\");break;case\"fillSketch\":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,\"path\");return o.setAttribute(\"d\",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute(\"stroke\",s.fill||\"\"),o.setAttribute(\"stroke-width\",n+\"\"),o.setAttribute(\"fill\",\"none\"),s.fillLineDash&&o.setAttribute(\"stroke-dasharray\",s.fillLineDash.join(\" \").trim()),s.fillLineDashOffset&&o.setAttribute(\"stroke-dashoffset\",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}var at={canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()};export{at as default};\n", "const intersectRect = (node, point) => {\n  var x = node.x;\n  var y = node.y;\n\n  // Rectangle intersection algorithm from:\n  // https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n  var dx = point.x - x;\n  var dy = point.y - y;\n  var w = node.width / 2;\n  var h = node.height / 2;\n\n  var sx, sy;\n  if (Math.abs(dy) * w > Math.abs(dx) * h) {\n    // Intersection is top or bottom of rect.\n    if (dy < 0) {\n      h = -h;\n    }\n    sx = dy === 0 ? 0 : (h * dx) / dy;\n    sy = h;\n  } else {\n    // Intersection is left or right of rect.\n    if (dx < 0) {\n      w = -w;\n    }\n    sx = w;\n    sy = dx === 0 ? 0 : (w * dy) / dx;\n  }\n\n  return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n", "import { select } from 'd3';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport common, { evaluate, renderKatex, hasKatex } from '../../diagrams/common/common.js';\nimport { decodeEntities } from '../../utils.js';\n\n/**\n * @param dom\n * @param styleFn\n */\nfunction applyStyle(dom, styleFn) {\n  if (styleFn) {\n    dom.attr('style', styleFn);\n  }\n}\n\n/**\n * @param {any} node\n * @returns {Promise} Node\n */\nasync function addHtmlLabel(node) {\n  const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n  const div = fo.append('xhtml:div');\n\n  let label = node.label;\n  if (node.label && hasKatex(node.label)) {\n    label = await renderKatex(node.label.replace(common.lineBreakRegex, '\\n'), getConfig());\n  }\n  const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n  div.html(\n    '' +\n      label +\n      ''\n  );\n\n  applyStyle(div, node.labelStyle);\n  div.style('display', 'inline-block');\n  div.style('padding-right', '1px');\n  // Fix for firefox\n  div.style('white-space', 'nowrap');\n  div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n  return fo.node();\n}\n/**\n * @param _vertexText\n * @param style\n * @param isTitle\n * @param isNode\n * @deprecated svg-util/createText instead\n */\nconst createLabel = async (_vertexText, style, isTitle, isNode) => {\n  let vertexText = _vertexText || '';\n  if (typeof vertexText === 'object') {\n    vertexText = vertexText[0];\n  }\n\n  if (evaluate(getConfig().flowchart.htmlLabels)) {\n    // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n    vertexText = vertexText.replace(/\\\\n|\\n/g, '
');\n log.info('vertexText' + vertexText);\n const node = {\n isNode,\n label: decodeEntities(vertexText).replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n labelStyle: style ? style.replace('fill:', 'color:') : style,\n };\n let vertexNode = await addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (const row of rows) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n", "export const createRoundedRectPathD = (\n x: number,\n y: number,\n totalWidth: number,\n totalHeight: number,\n radius: number\n) =>\n [\n 'M',\n x + radius,\n y, // Move to the first point\n 'H',\n x + totalWidth - radius, // Draw horizontal line to the beginning of the right corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth,\n y + radius, // Draw arc to the right top corner\n 'V',\n y + totalHeight - radius, // Draw vertical line down to the beginning of the right bottom corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth - radius,\n y + totalHeight, // Draw arc to the right bottom corner\n 'H',\n x + radius, // Draw horizontal line to the beginning of the left bottom corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x,\n y + totalHeight - radius, // Draw arc to the left bottom corner\n 'V',\n y + radius, // Draw vertical line up to the beginning of the left top corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + radius,\n y, // Draw arc to the left top corner\n 'Z', // Close the path\n ].join(' ');\n", "import { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport type { Node } from '../../types.js';\n\n// Striped fill like start or fork nodes in state diagrams\nexport const solidStateFill = (color: string) => {\n const { handDrawnSeed } = getConfig();\n return {\n fill: color,\n hachureAngle: 120, // angle of hachure,\n hachureGap: 4,\n fillWeight: 2,\n roughness: 0.7,\n stroke: color,\n seed: handDrawnSeed,\n };\n};\n\nexport const compileStyles = (node: Node) => {\n // node.cssCompiledStyles is an array of strings in the form of 'key: value' where jey is the css property and value is the value\n // the array is the styles of node node from the classes it is using\n // node.cssStyles is an array of styles directly set on the node\n // concat the arrays and remove duplicates such that the values from node.cssStyles are used if there are duplicates\n const stylesMap = styles2Map([...(node.cssCompiledStyles || []), ...(node.cssStyles || [])]);\n return { stylesMap, stylesArray: [...stylesMap] };\n};\n\nexport const styles2Map = (styles: string[]) => {\n const styleMap = new Map();\n styles.forEach((style) => {\n const [key, value] = style.split(':');\n styleMap.set(key.trim(), value?.trim());\n });\n return styleMap;\n};\n\nexport const styles2String = (node: Node) => {\n const { stylesArray } = compileStyles(node);\n const labelStyles: string[] = [];\n const nodeStyles: string[] = [];\n const borderStyles: string[] = [];\n const backgroundStyles: string[] = [];\n\n stylesArray.forEach((style) => {\n const key = style[0];\n if (\n key === 'color' ||\n key === 'font-size' ||\n key === 'font-family' ||\n key === 'font-weight' ||\n key === 'font-style' ||\n key === 'text-decoration' ||\n key === 'text-align' ||\n key === 'text-transform' ||\n key === 'line-height' ||\n key === 'letter-spacing' ||\n key === 'word-spacing' ||\n key === 'text-shadow' ||\n key === 'text-overflow' ||\n key === 'white-space' ||\n key === 'word-wrap' ||\n key === 'word-break' ||\n key === 'overflow-wrap' ||\n key === 'hyphens'\n ) {\n labelStyles.push(style.join(':') + ' !important');\n } else {\n nodeStyles.push(style.join(':') + ' !important');\n if (key.includes('stroke')) {\n borderStyles.push(style.join(':') + ' !important');\n }\n if (key === 'fill') {\n backgroundStyles.push(style.join(':') + ' !important');\n }\n }\n });\n\n return {\n labelStyles: labelStyles.join(';'),\n nodeStyles: nodeStyles.join(';'),\n stylesArray,\n borderStyles,\n backgroundStyles,\n };\n};\n\n// Striped fill like start or fork nodes in state diagrams\n// TODO remove any\nexport const userNodeOverrides = (node: Node, options: any) => {\n const { themeVariables, handDrawnSeed } = getConfig();\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n // index the style array to a map object\n const result = Object.assign(\n {\n roughness: 0.7,\n fill: stylesMap.get('fill') || mainBkg,\n fillStyle: 'hachure', // solid fill\n fillWeight: 4,\n hachureGap: 5.2,\n stroke: stylesMap.get('stroke') || nodeBorder,\n seed: handDrawnSeed,\n strokeWidth: stylesMap.get('stroke-width')?.replace('px', '') || 1.3,\n fillLineDash: [0, 0],\n },\n options\n );\n return result;\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { evaluate } from '../../diagrams/common/common.js';\nimport { log } from '../../logger.js';\nimport { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';\nimport { select } from 'd3';\nimport rough from 'roughjs';\nimport { createText } from '../createText.ts';\nimport intersectRect from '../rendering-elements/intersect/intersect-rect.js';\nimport createLabel from './createLabel.js';\nimport { createRoundedRectPathD } from './shapes/roundedRectPath.ts';\nimport { styles2String, userNodeOverrides } from './shapes/handDrawnShapeStyles.js';\n\nconst rect = async (parent, node) => {\n log.info('Creating subgraph rect for ', node.id, node);\n const siteConfig = getConfig();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { clusterBkg, clusterBorder } = themeVariables;\n\n const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster ' + node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n\n // Create the label and insert it after the rect\n const labelEl = shapeSvg.insert('g').attr('class', 'cluster-label ');\n\n const text = await createText(labelEl, node.label, {\n style: node.labelStyle,\n useHtmlLabels,\n isNode: true,\n });\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n\n log.trace('Data ', node, JSON.stringify(node));\n let rect;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n roughness: 0.7,\n fill: clusterBkg,\n // fill: 'red',\n stroke: clusterBorder,\n fillWeight: 3,\n seed: handDrawnSeed,\n });\n const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, 0), options);\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n // Should we affect the options instead of doing this?\n rect.select('path:nth-child(2)').attr('style', borderStyles.join(';'));\n rect.select('path').attr('style', backgroundStyles.join(';').replace('fill', 'stroke'));\n } else {\n // add the rect\n rect = shapeSvg.insert('rect', ':first-child');\n // center the rect around its coordinate\n rect\n .attr('style', nodeStyles)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n }\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n labelEl.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n\n if (labelStyles) {\n const span = labelEl.select('span');\n if (span) {\n span.attr('style', labelStyles);\n }\n }\n // Center the label\n\n const rectBox = rect.node().getBBox();\n node.offsetX = 0;\n node.width = rectBox.width;\n node.height = rectBox.height;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\n\n/**\n * Non visible cluster where the note is group with its\n *\n * @param {any} parent\n * @param {any} node\n * @returns {any} ShapeSvg\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: { width: 0, height: 0 } };\n};\n\nconst roundedWithTitle = async (parent, node) => {\n const siteConfig = getConfig();\n\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { altBackground, compositeBackground, compositeTitleBackground, nodeBorder } =\n themeVariables;\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.cssClasses)\n .attr('id', node.id)\n .attr('data-id', node.id)\n .attr('data-look', node.look);\n\n // add the rect\n const outerRectG = shapeSvg.insert('g', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n let innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(await createLabel(node.label, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Rounded With Title\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width =\n (node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width) + padding;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height + padding;\n // const height = node.height + padding;\n const innerHeight = node.height + padding - bbox.height - 6;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n const innerY = node.y - node.height / 2 - halfPadding + bbox.height + 2;\n\n // add the rect\n let rect;\n if (node.look === 'handDrawn') {\n const isAlt = node.cssClasses.includes('statediagram-cluster-alt');\n const rc = rough.svg(shapeSvg);\n const roughOuterNode =\n node.rx || node.ry\n ? rc.path(createRoundedRectPathD(x, y, width, height, 10), {\n roughness: 0.7,\n fill: compositeTitleBackground,\n fillStyle: 'solid',\n stroke: nodeBorder,\n seed: handDrawnSeed,\n })\n : rc.rectangle(x, y, width, height, { seed: handDrawnSeed });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n const roughInnerNode = rc.rectangle(x, innerY, width, innerHeight, {\n fill: isAlt ? altBackground : compositeBackground,\n fillStyle: isAlt ? 'hachure' : 'solid',\n stroke: nodeBorder,\n seed: handDrawnSeed,\n });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n innerRect = shapeSvg.insert(() => roughInnerNode);\n } else {\n rect = outerRectG.insert('rect', ':first-child');\n const outerRectClass = 'outer';\n\n // center the rect around its coordinate\n rect\n .attr('class', outerRectClass)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('data-look', node.look);\n innerRect\n .attr('class', 'inner')\n .attr('x', x)\n .attr('y', innerY)\n .attr('width', width)\n .attr('height', innerHeight);\n }\n\n label.attr(\n 'transform',\n `translate(${node.x - bbox.width / 2}, ${y + 1 - (evaluate(siteConfig.flowchart.htmlLabels) ? 0 : 3)})`\n );\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n node.labelBBox = bbox;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\nconst kanbanSection = async (parent, node) => {\n log.info('Creating subgraph rect for ', node.id, node);\n const siteConfig = getConfig();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { clusterBkg, clusterBorder } = themeVariables;\n\n const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster ' + node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n\n // Create the label and insert it after the rect\n const labelEl = shapeSvg.insert('g').attr('class', 'cluster-label ');\n\n const text = await createText(labelEl, node.label, {\n style: node.labelStyle,\n useHtmlLabels,\n isNode: true,\n width: node.width,\n });\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n\n log.trace('Data ', node, JSON.stringify(node));\n let rect;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n roughness: 0.7,\n fill: clusterBkg,\n // fill: 'red',\n stroke: clusterBorder,\n fillWeight: 4,\n seed: handDrawnSeed,\n });\n const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, node.rx), options);\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n // Should we affect the options instead of doing this?\n rect.select('path:nth-child(2)').attr('style', borderStyles.join(';'));\n rect.select('path').attr('style', backgroundStyles.join(';').replace('fill', 'stroke'));\n } else {\n // add the rect\n rect = shapeSvg.insert('rect', ':first-child');\n // center the rect around its coordinate\n rect\n .attr('style', nodeStyles)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n }\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n labelEl.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n\n if (labelStyles) {\n const span = labelEl.select('span');\n if (span) {\n span.attr('style', labelStyles);\n }\n }\n // Center the label\n\n const rectBox = rect.node().getBBox();\n node.offsetX = 0;\n node.width = rectBox.width;\n node.height = rectBox.height;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\nconst divider = (parent, node) => {\n const siteConfig = getConfig();\n\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { nodeBorder } = themeVariables;\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n // add the rect\n const outerRectG = shapeSvg.insert('g', ':first-child');\n\n const padding = 0 * node.padding;\n\n const width = node.width + padding;\n\n node.diff = -node.padding;\n\n const height = node.height + padding;\n // const height = node.height + padding;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n\n // add the rect\n let rect;\n if (node.look === 'handDrawn') {\n const rc = rough.svg(shapeSvg);\n const roughOuterNode = rc.rectangle(x, y, width, height, {\n fill: 'lightgrey',\n roughness: 0.5,\n strokeLineDash: [5],\n stroke: nodeBorder,\n seed: handDrawnSeed,\n });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n } else {\n rect = outerRectG.insert('rect', ':first-child');\n const outerRectClass = 'divider';\n\n // center the rect around its coordinate\n rect\n .attr('class', outerRectClass)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('data-look', node.look);\n }\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n // Used by layout engine to position subgraph in parent\n node.offsetY = 0;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: {} };\n};\n\nconst squareRect = rect;\nconst shapes = {\n rect,\n squareRect,\n roundedWithTitle,\n noteGroup,\n divider,\n kanbanSection,\n};\n\nlet clusterElems = new Map();\n\n/**\n * @typedef {keyof typeof shapes} ClusterShapeID\n */\n\n/**\n * @param {import('../types.js').ClusterNode} node - Shape defaults to 'rect'\n */\nexport const insertCluster = async (elem, node) => {\n const shape = node.shape || 'rect';\n const cluster = await shapes[shape](elem, node);\n clusterElems.set(node.id, cluster);\n return cluster;\n};\n\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.label, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = new Map();\n};\n\nexport const positionCluster = (node) => {\n log.info(\n 'Position cluster (' +\n node.id +\n ', ' +\n node.x +\n ', ' +\n node.y +\n ') (' +\n node?.width +\n ', ' +\n node?.height +\n ')',\n clusterElems.get(node.id)\n );\n const el = clusterElems.get(node.id);\n el.cluster.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n", "function intersectNode(node, point) {\n return node.intersect(point);\n}\n\nexport default intersectNode;\n", "function intersectEllipse(node, rx, ry, point) {\n // Formulae from: https://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n", "import intersectEllipse from './intersect-ellipse.js';\n\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n", "/**\n * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n", "import intersectLine from './intersect-line.js';\n\n/**\n * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming\n * that it has the shape specified by polygon.\n */\nfunction intersectPolygon(node, polyPoints, point) {\n let x1 = node.x;\n let y1 = node.y;\n\n let intersections = [];\n\n let minX = Number.POSITIVE_INFINITY;\n let minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n let left = x1 - node.width / 2 - minX;\n let top = y1 - node.height / 2 - minY;\n\n for (let i = 0; i < polyPoints.length; i++) {\n let p1 = polyPoints[i];\n let p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n let intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n let pdx = p.x - point.x;\n let pdy = p.y - point.y;\n let distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n let qdx = q.x - point.x;\n let qdy = q.y - point.y;\n let distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n\nexport default intersectPolygon;\n", "/*\n * Borrowed with love from from dagre-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n", "import { log } from '../../../logger.js';\nimport { updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { handleUndefinedAttr } from '../../../utils.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function anchor(parent: D3Selection, node: Node) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const classes = getNodeClasses(node);\n let cssClasses = classes;\n if (!classes) {\n cssClasses = 'anchor';\n }\n const shapeSvg = parent\n .insert('g')\n .attr('class', cssClasses)\n .attr('id', node.domId || node.id);\n\n const radius = 1;\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'black', stroke: 'none', fillStyle: 'solid' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n }\n const roughNode = rc.circle(0, 0, radius * 2, options);\n const circleElem = shapeSvg.insert(() => roughNode, ':first-child');\n circleElem.attr('class', 'anchor').attr('style', handleUndefinedAttr(cssStyles));\n\n updateNodeBounds(node, circleElem);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, radius, point);\n return intersect.circle(node, radius, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateArcPoints(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n rx: number,\n ry: number,\n clockwise: boolean\n) {\n const numPoints = 20;\n // Calculate midpoint\n const midX = (x1 + x2) / 2;\n const midY = (y1 + y2) / 2;\n\n // Calculate the angle of the line connecting the points\n const angle = Math.atan2(y2 - y1, x2 - x1);\n\n // Calculate transformed coordinates for the ellipse\n const dx = (x2 - x1) / 2;\n const dy = (y2 - y1) / 2;\n\n // Scale to unit circle\n const transformedX = dx / rx;\n const transformedY = dy / ry;\n\n // Calculate the distance between points on the unit circle\n const distance = Math.sqrt(transformedX ** 2 + transformedY ** 2);\n\n // Check if the ellipse can be drawn with the given radii\n if (distance > 1) {\n throw new Error('The given radii are too small to create an arc between the points.');\n }\n\n // Calculate the distance from the midpoint to the center of the ellipse\n const scaledCenterDistance = Math.sqrt(1 - distance ** 2);\n\n // Calculate the center of the ellipse\n const centerX = midX + scaledCenterDistance * ry * Math.sin(angle) * (clockwise ? -1 : 1);\n const centerY = midY - scaledCenterDistance * rx * Math.cos(angle) * (clockwise ? -1 : 1);\n\n // Calculate the start and end angles on the ellipse\n const startAngle = Math.atan2((y1 - centerY) / ry, (x1 - centerX) / rx);\n const endAngle = Math.atan2((y2 - centerY) / ry, (x2 - centerX) / rx);\n\n // Adjust angles for clockwise/counterclockwise\n let angleRange = endAngle - startAngle;\n if (clockwise && angleRange < 0) {\n angleRange += 2 * Math.PI;\n }\n if (!clockwise && angleRange > 0) {\n angleRange -= 2 * Math.PI;\n }\n\n // Generate points\n const points = [];\n for (let i = 0; i < numPoints; i++) {\n const t = i / (numPoints - 1);\n const angle = startAngle + t * angleRange;\n const x = centerX + rx * Math.cos(angle);\n const y = centerY + ry * Math.sin(angle);\n points.push({ x, y });\n }\n\n return points;\n}\n\nexport async function bowTieRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + node.padding + 20;\n const h = bbox.height + node.padding;\n\n const ry = h / 2;\n const rx = ry / (2.5 + h / 50);\n\n // let shape: d3.Selection;\n const { cssStyles } = node;\n\n const points = [\n { x: w / 2, y: -h / 2 },\n { x: -w / 2, y: -h / 2 },\n ...generateArcPoints(-w / 2, -h / 2, -w / 2, h / 2, rx, ry, false),\n { x: w / 2, y: h / 2 },\n ...generateArcPoints(w / 2, h / 2, w / 2, -h / 2, rx, ry, true),\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const bowTieRectPath = createPathFromPoints(points);\n const bowTieRectShapePath = rc.path(bowTieRectPath, options);\n const bowTieRectShape = shapeSvg.insert(() => bowTieRectShapePath, ':first-child');\n\n bowTieRectShape.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n bowTieRectShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n bowTieRectShape.selectAll('path').attr('style', nodeStyles);\n }\n\n bowTieRectShape.attr('transform', `translate(${rx / 2}, 0)`);\n\n updateNodeBounds(node, bowTieRectShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import type { D3Selection } from '../../../types.js';\n\nexport function insertPolygonShape(\n parent: D3Selection,\n w: number,\n h: number,\n points: { x: number; y: number }[]\n) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\n// const createPathFromPoints = (points: { x: number; y: number }[]): string => {\n// const pointStrings = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`);\n// pointStrings.push('Z');\n// return pointStrings.join(' ');\n// };\n\nexport async function card(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const h = bbox.height + node.padding;\n const padding = 12;\n const w = bbox.width + node.padding + padding;\n const left = 0;\n const right = w;\n const top = -h;\n const bottom = 0;\n const points = [\n { x: left + padding, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom },\n { x: left, y: top + padding },\n { x: left + padding, y: top },\n ];\n\n let polygon: D3Selection | Awaited>;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { createPathFromPoints, getNodeClasses } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function choice(parent: D3Selection, node: Node) {\n const { nodeStyles } = styles2String(node);\n node.label = '';\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const { cssStyles } = node;\n\n const s = Math.max(28, node.width ?? 0);\n\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const choicePath = createPathFromPoints(points);\n const roughNode = rc.path(choicePath, options);\n const choiceShape = shapeSvg.insert(() => roughNode, ':first-child');\n\n if (cssStyles && node.look !== 'handDrawn') {\n choiceShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n choiceShape.selectAll('path').attr('style', nodeStyles);\n }\n\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function circle(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n\n const radius = bbox.width / 2 + halfPadding;\n let circleElem;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.circle(0, 0, radius * 2, options);\n\n circleElem = shapeSvg.insert(() => roughNode, ':first-child');\n circleElem.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n } else {\n circleElem = shapeSvg\n .insert('circle', ':first-child')\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('r', radius)\n .attr('cx', 0)\n .attr('cy', 0);\n }\n\n updateNodeBounds(node, circleElem);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, radius, point);\n return intersect.circle(node, radius, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nfunction createLine(r: number) {\n const xAxis45 = Math.cos(Math.PI / 4); // cosine of 45 degrees\n const yAxis45 = Math.sin(Math.PI / 4); // sine of 45 degrees\n const lineLength = r * 2;\n\n const pointQ1 = { x: (lineLength / 2) * xAxis45, y: (lineLength / 2) * yAxis45 }; // Quadrant I\n const pointQ2 = { x: -(lineLength / 2) * xAxis45, y: (lineLength / 2) * yAxis45 }; // Quadrant II\n const pointQ3 = { x: -(lineLength / 2) * xAxis45, y: -(lineLength / 2) * yAxis45 }; // Quadrant III\n const pointQ4 = { x: (lineLength / 2) * xAxis45, y: -(lineLength / 2) * yAxis45 }; // Quadrant IV\n\n return `M ${pointQ2.x},${pointQ2.y} L ${pointQ4.x},${pointQ4.y}\n M ${pointQ1.x},${pointQ1.y} L ${pointQ3.x},${pointQ3.y}`;\n}\n\nexport function crossedCircle(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n node.label = '';\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const radius = Math.max(30, node?.width ?? 0);\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const circleNode = rc.circle(0, 0, radius * 2, options);\n const linePath = createLine(radius);\n const lineNode = rc.path(linePath, options);\n\n const crossedCircle = shapeSvg.insert(() => circleNode, ':first-child');\n crossedCircle.insert(() => lineNode);\n\n if (cssStyles && node.look !== 'handDrawn') {\n crossedCircle.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n crossedCircle.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, crossedCircle);\n\n node.intersect = function (point) {\n log.info('crossedCircle intersect', node, { radius, point });\n const pos = intersect.circle(node, radius, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n centerX: number,\n centerY: number,\n radius: number,\n numPoints = 100,\n startAngle = 0,\n endAngle = 180\n) {\n const points = [];\n\n // Convert angles to radians\n const startAngleRad = (startAngle * Math.PI) / 180;\n const endAngleRad = (endAngle * Math.PI) / 180;\n\n // Calculate the angle range in radians\n const angleRange = endAngleRad - startAngleRad;\n\n // Calculate the angle step\n const angleStep = angleRange / (numPoints - 1);\n\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n\n return points;\n}\n\nexport async function curlyBraceLeft(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + (node.padding ?? 0);\n const h = bbox.height + (node.padding ?? 0);\n const radius = Math.max(5, h * 0.1);\n\n const { cssStyles } = node;\n\n const points = [\n ...generateCirclePoints(w / 2, -h / 2, radius, 30, -90, 0),\n { x: -w / 2 - radius, y: radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n ];\n\n const rectPoints = [\n { x: w / 2, y: -h / 2 - radius },\n { x: -w / 2, y: -h / 2 - radius },\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: -w / 2 - radius, y: -radius },\n ...generateCirclePoints(w / 2 + w * 0.1, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + w * 0.1, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n { x: -w / 2, y: h / 2 + radius },\n { x: w / 2, y: h / 2 + radius },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const curlyBraceLeftPath = createPathFromPoints(points);\n const newCurlyBracePath = curlyBraceLeftPath.replace('Z', '');\n const curlyBraceLeftNode = rc.path(newCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBraceLeftShape = shapeSvg.insert('g', ':first-child');\n curlyBraceLeftShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n curlyBraceLeftShape.insert(() => curlyBraceLeftNode, ':first-child');\n curlyBraceLeftShape.attr('class', 'text');\n\n if (cssStyles && node.look !== 'handDrawn') {\n curlyBraceLeftShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n curlyBraceLeftShape.selectAll('path').attr('style', nodeStyles);\n }\n\n curlyBraceLeftShape.attr('transform', `translate(${radius}, 0)`);\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + radius - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, curlyBraceLeftShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n centerX: number,\n centerY: number,\n radius: number,\n numPoints = 100,\n startAngle = 0,\n endAngle = 180\n) {\n const points = [];\n\n // Convert angles to radians\n const startAngleRad = (startAngle * Math.PI) / 180;\n const endAngleRad = (endAngle * Math.PI) / 180;\n\n // Calculate the angle range in radians\n const angleRange = endAngleRad - startAngleRad;\n\n // Calculate the angle step\n const angleStep = angleRange / (numPoints - 1);\n\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x, y });\n }\n\n return points;\n}\n\nexport async function curlyBraceRight(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + (node.padding ?? 0);\n const h = bbox.height + (node.padding ?? 0);\n const radius = Math.max(5, h * 0.1);\n\n const { cssStyles } = node;\n\n const points = [\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: w / 2 + radius, y: -radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: w / 2 + radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n ];\n\n const rectPoints = [\n { x: -w / 2, y: -h / 2 - radius },\n { x: w / 2, y: -h / 2 - radius },\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: w / 2 + radius, y: -radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: w / 2 + radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n { x: w / 2, y: h / 2 + radius },\n { x: -w / 2, y: h / 2 + radius },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const curlyBraceRightPath = createPathFromPoints(points);\n const newCurlyBracePath = curlyBraceRightPath.replace('Z', '');\n const curlyBraceRightNode = rc.path(newCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBraceRightShape = shapeSvg.insert('g', ':first-child');\n curlyBraceRightShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n curlyBraceRightShape.insert(() => curlyBraceRightNode, ':first-child');\n curlyBraceRightShape.attr('class', 'text');\n\n if (cssStyles && node.look !== 'handDrawn') {\n curlyBraceRightShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n curlyBraceRightShape.selectAll('path').attr('style', nodeStyles);\n }\n\n curlyBraceRightShape.attr('transform', `translate(${-radius}, 0)`);\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, curlyBraceRightShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n centerX: number,\n centerY: number,\n radius: number,\n numPoints = 100,\n startAngle = 0,\n endAngle = 180\n) {\n const points = [];\n\n // Convert angles to radians\n const startAngleRad = (startAngle * Math.PI) / 180;\n const endAngleRad = (endAngle * Math.PI) / 180;\n\n // Calculate the angle range in radians\n const angleRange = endAngleRad - startAngleRad;\n\n // Calculate the angle step\n const angleStep = angleRange / (numPoints - 1);\n\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n\n return points;\n}\n\nexport async function curlyBraces(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + (node.padding ?? 0);\n const h = bbox.height + (node.padding ?? 0);\n const radius = Math.max(5, h * 0.1);\n\n const { cssStyles } = node;\n\n const leftCurlyBracePoints = [\n ...generateCirclePoints(w / 2, -h / 2, radius, 30, -90, 0),\n { x: -w / 2 - radius, y: radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n ];\n\n const rightCurlyBracePoints = [\n ...generateCirclePoints(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n { x: w / 2 - radius / 2, y: radius },\n ...generateCirclePoints(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n ...generateCirclePoints(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n { x: w / 2 - radius / 2, y: -radius },\n ...generateCirclePoints(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270),\n ];\n\n const rectPoints = [\n { x: w / 2, y: -h / 2 - radius },\n { x: -w / 2, y: -h / 2 - radius },\n ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n { x: -w / 2 - radius, y: -radius },\n ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: h / 2 },\n ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n { x: -w / 2, y: h / 2 + radius },\n { x: w / 2 - radius - radius / 2, y: h / 2 + radius },\n ...generateCirclePoints(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n { x: w / 2 - radius / 2, y: radius },\n ...generateCirclePoints(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n ...generateCirclePoints(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n { x: w / 2 - radius / 2, y: -radius },\n ...generateCirclePoints(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270),\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const leftCurlyBracePath = createPathFromPoints(leftCurlyBracePoints);\n const newLeftCurlyBracePath = leftCurlyBracePath.replace('Z', '');\n const leftCurlyBraceNode = rc.path(newLeftCurlyBracePath, options);\n const rightCurlyBracePath = createPathFromPoints(rightCurlyBracePoints);\n const newRightCurlyBracePath = rightCurlyBracePath.replace('Z', '');\n const rightCurlyBraceNode = rc.path(newRightCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBracesShape = shapeSvg.insert('g', ':first-child');\n curlyBracesShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n curlyBracesShape.insert(() => leftCurlyBraceNode, ':first-child');\n curlyBracesShape.insert(() => rightCurlyBraceNode, ':first-child');\n curlyBracesShape.attr('class', 'text');\n\n if (cssStyles && node.look !== 'handDrawn') {\n curlyBracesShape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n curlyBracesShape.selectAll('path').attr('style', nodeStyles);\n }\n\n curlyBracesShape.attr('transform', `translate(${radius - radius / 4}, 0)`);\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, curlyBracesShape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateCirclePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function curvedTrapezoid(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const minWidth = 80,\n minHeight = 20;\n const w = Math.max(minWidth, (bbox.width + (node.padding ?? 0) * 2) * 1.25, node?.width ?? 0);\n const h = Math.max(minHeight, bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const radius = h / 2;\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const totalWidth = w,\n totalHeight = h;\n const rw = totalWidth - radius;\n const tw = totalHeight / 4;\n\n const points = [\n { x: rw, y: 0 },\n { x: tw, y: 0 },\n { x: 0, y: totalHeight / 2 },\n { x: tw, y: totalHeight },\n { x: rw, y: totalHeight },\n ...generateCirclePoints(-rw, -totalHeight / 2, radius, 50, 270, 90),\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(${-w / 2}, ${-h / 2})`);\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n ].join(' ');\n};\nexport const createOuterCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `M${x + width},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(' ');\n};\nexport async function cylinder(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + node.padding, node.width ?? 0);\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = Math.max(bbox.height + ry + node.padding, node.height ?? 0);\n\n let cylinder: D3Selection | D3Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n const outerNode = rc.path(outerPathData, userNodeOverrides(node, {}));\n const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: 'none' }));\n\n cylinder = shapeSvg.insert(() => innerLine, ':first-child');\n cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n cylinder.attr('class', 'basic label-container');\n if (cssStyles) {\n cylinder.attr('style', cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n cylinder = shapeSvg\n .insert('path', ':first-child')\n .attr('d', pathData)\n .attr('class', 'basic label-container')\n .attr('style', handleUndefinedAttr(cssStyles))\n .attr('style', nodeStyles);\n }\n\n cylinder.attr('label-offset-y', ry);\n cylinder.attr('transform', `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n\n updateNodeBounds(node, cylinder);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + (node.padding ?? 0) / 1.5 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - (node.x ?? 0);\n\n if (\n rx != 0 &&\n (Math.abs(x) < (node.width ?? 0) / 2 ||\n (Math.abs(x) == (node.width ?? 0) / 2 &&\n Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))\n ) {\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y > 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - (node.y ?? 0) > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function dividedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const rectOffset = h * 0.2;\n\n const x = -w / 2;\n const y = -h / 2 - rectOffset / 2;\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const pts = [\n { x, y: y + rectOffset },\n { x: -x, y: y + rectOffset },\n { x: -x, y: -y },\n { x, y: -y },\n { x, y },\n { x: -x, y },\n { x: -x, y: y + rectOffset },\n ];\n\n const poly = rc.polygon(\n pts.map((p) => [p.x, p.y]),\n options\n );\n\n const polygon = shapeSvg.insert(() => poly, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${x + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))}, ${y + rectOffset + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function doublecircle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n const gap = 5;\n const outerRadius = bbox.width / 2 + halfPadding + gap;\n const innerRadius = bbox.width / 2 + halfPadding;\n\n let circleGroup;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 2.5 });\n\n const innerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 1.5 });\n const outerRoughNode = rc.circle(0, 0, outerRadius * 2, outerOptions);\n const innerRoughNode = rc.circle(0, 0, innerRadius * 2, innerOptions);\n\n circleGroup = shapeSvg.insert('g', ':first-child');\n // circleGroup = circleGroup.insert(() => outerRoughNode, ':first-child');\n circleGroup\n .attr('class', handleUndefinedAttr(node.cssClasses))\n .attr('style', handleUndefinedAttr(cssStyles));\n\n circleGroup.node()?.appendChild(outerRoughNode);\n circleGroup.node()?.appendChild(innerRoughNode);\n } else {\n circleGroup = shapeSvg.insert('g', ':first-child');\n\n const outerCircle = circleGroup.insert('circle', ':first-child');\n const innerCircle = circleGroup.insert('circle');\n circleGroup.attr('class', 'basic label-container').attr('style', nodeStyles);\n\n outerCircle\n .attr('class', 'outer-circle')\n .attr('style', nodeStyles)\n .attr('r', outerRadius)\n .attr('cx', 0)\n .attr('cy', 0);\n\n innerCircle\n .attr('class', 'inner-circle')\n .attr('style', nodeStyles)\n .attr('r', innerRadius)\n .attr('cx', 0)\n .attr('cy', 0);\n }\n\n updateNodeBounds(node, circleGroup);\n\n node.intersect = function (point) {\n log.info('DoubleCircle intersect', node, outerRadius, point);\n return intersect.circle(node, outerRadius, point);\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function filledCircle(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = '';\n node.labelStyle = labelStyles;\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const radius = 7;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const { nodeBorder } = themeVariables;\n const options = userNodeOverrides(node, { fillStyle: 'solid' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n }\n\n const circleNode = rc.circle(0, 0, radius * 2, options);\n\n const filledCircle = shapeSvg.insert(() => circleNode, ':first-child');\n\n filledCircle.selectAll('path').attr('style', `fill: ${nodeBorder} !important;`);\n\n if (cssStyles && cssStyles.length > 0 && node.look !== 'handDrawn') {\n filledCircle.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n filledCircle.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, filledCircle);\n\n node.intersect = function (point) {\n log.info('filledCircle intersect', node, { radius, point });\n const pos = intersect.circle(node, radius, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function flippedTriangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + (node.padding ?? 0);\n const h = w + bbox.height;\n\n const tw = w + bbox.height;\n const points = [\n { x: 0, y: -h },\n { x: tw, y: -h },\n { x: tw / 2, y: 0 },\n ];\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n const flippedTriangle = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-h / 2}, ${h / 2})`);\n\n if (cssStyles && node.look !== 'handDrawn') {\n flippedTriangle.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n flippedTriangle.selectChildren('path').attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, flippedTriangle);\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) / 2 + (bbox.y - (bbox.top ?? 0))})`\n );\n\n node.intersect = function (point) {\n log.info('Triangle intersect', node, points, point);\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function forkJoin(\n parent: D3Selection,\n node: Node,\n { dir, config: { state, themeVariables } }: ShapeRenderOptions\n) {\n const { nodeStyles } = styles2String(node);\n node.label = '';\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n\n const { cssStyles } = node;\n let width = Math.max(70, node?.width ?? 0);\n let height = Math.max(10, node?.height ?? 0);\n\n if (dir === 'LR') {\n width = Math.max(10, node?.width ?? 0);\n height = Math.max(70, node?.height ?? 0);\n }\n\n const x = (-1 * width) / 2;\n const y = (-1 * height) / 2;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n stroke: themeVariables.lineColor,\n fill: themeVariables.lineColor,\n });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const roughNode = rc.rectangle(x, y, width, height, options);\n\n const shape = shapeSvg.insert(() => roughNode, ':first-child');\n\n if (cssStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, shape);\n const padding = state?.padding ?? 0;\n if (node.width && node.height) {\n node.width += padding / 2 || 0;\n node.height += padding / 2 || 0;\n }\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateCirclePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function halfRoundedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const minWidth = 80,\n minHeight = 50;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(minWidth, bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(minHeight, bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const radius = h / 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2, y: -h / 2 },\n { x: w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(-w / 2 + radius, 0, radius, 50, 90, 270),\n { x: w / 2 - radius, y: h / 2 },\n { x: -w / 2, y: h / 2 },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n // label.attr(\n // 'transform',\n // `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n // );\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n log.info('Pill intersect', node, { radius, point });\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport const createHexagonPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n m: number\n): string => {\n return [\n `M${x + m},${y}`,\n `L${x + width - m},${y}`,\n `L${x + width},${y - height / 2}`,\n `L${x + width - m},${y - height}`,\n `L${x + m},${y - height}`,\n `L${x},${y - height / 2}`,\n 'Z',\n ].join(' ');\n};\n\nexport async function hexagon(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n let polygon: D3Selection | Awaited>;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createHexagonPathD(0, 0, w, h, m);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function hourglass(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = '';\n node.labelStyle = labelStyles;\n const { shapeSvg } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = Math.max(30, node?.width ?? 0);\n const h = Math.max(30, node?.height ?? 0);\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: 0, y: h },\n { x: w, y: h },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(${-w / 2}, ${-h / 2})`);\n\n updateNodeBounds(node, polygon);\n\n // label.attr('transform', `translate(${-bbox.width / 2}, ${(h/2)})`); // To transform text below hourglass shape\n\n node.intersect = function (point) {\n log.info('Pill intersect', node, { points });\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function icon(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'icon-shape default');\n\n const topLabel = node.pos === 't';\n\n const height = iconSize;\n const width = iconSize;\n const { nodeBorder } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n const x = -width / 2;\n const y = -height / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, { stroke: 'none', fill: 'none' });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const iconNode = rc.rectangle(x, y, width, height, options);\n\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.icon) {\n const iconElem = shapeSvg.append('g');\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconCircle(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'icon-shape default');\n\n const padding = 20;\n const labelPadding = node.label ? 8 : 0;\n\n const topLabel = node.pos === 't';\n\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const fill = stylesMap.get('fill');\n options.stroke = fill ?? mainBkg;\n\n const iconElem = shapeSvg.append('g');\n if (node.icon) {\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n }\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n\n const diameter = Math.max(iconWidth, iconHeight) * Math.SQRT2 + padding * 2;\n const iconNode = rc.circle(0, 0, diameter, options);\n\n const outerWidth = Math.max(diameter, bbox.width);\n const outerHeight = diameter + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n const pos = intersect.rect(node, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconRounded(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n 'icon-shape default'\n );\n\n const topLabel = node.pos === 't';\n\n const height = iconSize + halfPadding * 2;\n const width = iconSize + halfPadding * 2;\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n const x = -width / 2;\n const y = -height / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const fill = stylesMap.get('fill');\n options.stroke = fill ?? mainBkg;\n\n const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 5), options);\n\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child').attr('class', 'icon-shape2');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.icon) {\n const iconElem = shapeSvg.append('g');\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconSquare(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n 'icon-shape default'\n );\n\n const topLabel = node.pos === 't';\n\n const height = iconSize + halfPadding * 2;\n const width = iconSize + halfPadding * 2;\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n const x = -width / 2;\n const y = -height / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const fill = stylesMap.get('fill');\n options.stroke = fill ?? mainBkg;\n\n const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 0.1), options);\n\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'transparent',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.icon) {\n const iconElem = shapeSvg.append('g');\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: '',\n })}`\n );\n const iconBBox = iconElem.node()!.getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n 'transform',\n `translate(${-iconWidth / 2 - iconX},${\n topLabel\n ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n })`\n );\n iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function imageSquare(\n parent: D3Selection,\n node: Node,\n { config: { flowchart } }: ShapeRenderOptions\n) {\n const img = new Image();\n img.src = node?.img ?? '';\n await img.decode();\n\n const imageNaturalWidth = Number(img.naturalWidth.toString().replace('px', ''));\n const imageNaturalHeight = Number(img.naturalHeight.toString().replace('px', ''));\n node.imageAspectRatio = imageNaturalWidth / imageNaturalHeight;\n\n const { labelStyles } = styles2String(node);\n\n node.labelStyle = labelStyles;\n\n const defaultWidth = flowchart?.wrappingWidth;\n node.defaultWidth = flowchart?.wrappingWidth;\n\n const imageRawWidth = Math.max(\n node.label ? (defaultWidth ?? 0) : 0,\n node?.assetWidth ?? imageNaturalWidth\n );\n\n const imageWidth =\n node.constraint === 'on'\n ? node?.assetHeight\n ? node.assetHeight * node.imageAspectRatio\n : imageRawWidth\n : imageRawWidth;\n\n const imageHeight =\n node.constraint === 'on'\n ? imageWidth / node.imageAspectRatio\n : (node?.assetHeight ?? imageNaturalHeight);\n node.width = Math.max(imageWidth, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'image-shape default');\n\n const topLabel = node.pos === 't';\n\n const x = -imageWidth / 2;\n const y = -imageHeight / 2;\n\n const labelPadding = node.label ? 8 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const imageNode = rc.rectangle(x, y, imageWidth, imageHeight, options);\n\n const outerWidth = Math.max(imageWidth, bbox.width);\n const outerHeight = imageHeight + bbox.height + labelPadding;\n\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: 'none',\n stroke: 'none',\n });\n\n const iconShape = shapeSvg.insert(() => imageNode, ':first-child');\n const outerShape = shapeSvg.insert(() => outerNode);\n\n if (node.img) {\n const image = shapeSvg.append('image');\n\n // Set the image attributes\n image.attr('href', node.img);\n image.attr('width', imageWidth);\n image.attr('height', imageHeight);\n image.attr('preserveAspectRatio', 'none');\n\n image.attr(\n 'transform',\n `translate(${-imageWidth / 2},${topLabel ? outerHeight / 2 - imageHeight : -outerHeight / 2})`\n );\n }\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n topLabel\n ? -imageHeight / 2 - bbox.height / 2 - labelPadding / 2\n : imageHeight / 2 - bbox.height / 2 + labelPadding / 2\n })`\n );\n\n iconShape.attr(\n 'transform',\n `translate(${0},${\n topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n })`\n );\n\n updateNodeBounds(node, outerShape);\n\n node.intersect = function (point) {\n log.info('iconSquare intersect', node, point);\n if (!node.label) {\n return intersect.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + imageWidth / 2, y: dy + nodeHeight / 2 },\n { x: dx - imageWidth / 2, y: dy + nodeHeight / 2 },\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n ];\n } else {\n points = [\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight },\n ];\n }\n\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\n// export const createInvertedTrapezoidPathD = (\n// x: number,\n// y: number,\n// width: number,\n// height: number\n// ): string => {\n// return [\n// `M${x + height / 6},${y}`,\n// `L${x + width - height / 6},${y}`,\n// `L${x + width + (2 * height) / 6},${y - height}`,\n// `L${x - (2 * height) / 6},${y - height}`,\n// 'Z',\n// ].join(' ');\n// };\n\nexport async function inv_trapezoid(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w + (3 * h) / 6, y: -h },\n { x: (-3 * h) / 6, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n // const pathData = createInvertedTrapezoidPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node, RectOptions } from '../../types.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { userNodeOverrides, styles2String } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function drawRect(\n parent: D3Selection,\n node: Node,\n options: RectOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n // console.log('IPI labelStyles:', labelStyles);\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const totalWidth = Math.max(bbox.width + options.labelPaddingX * 2, node?.width || 0);\n const totalHeight = Math.max(bbox.height + options.labelPaddingY * 2, node?.height || 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n\n // log.info('IPI node = ', node);\n\n let rect;\n let { rx, ry } = node;\n const { cssStyles } = node;\n\n //use options rx, ry overrides if present\n if (options?.rx && options.ry) {\n rx = options.rx;\n ry = options.ry;\n }\n\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const roughNode =\n rx || ry\n ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options)\n : rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('rx', handleUndefinedAttr(rx))\n .attr('ry', handleUndefinedAttr(ry))\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport { drawRect } from './drawRect.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function roundedRect(\n parent: D3Selection,\n node: Node\n) {\n const options = {\n rx: 5,\n ry: 5,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 1,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n\n return drawRect(parent, node, options);\n}\n\nexport async function labelRect(parent: D3Selection, node: Node) {\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'label');\n\n // log.trace('Classes = ', node.class);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Hide the rect we are only after the label\n const totalWidth = 0.1;\n const totalHeight = 0.1;\n rect.attr('width', totalWidth).attr('height', totalHeight);\n shapeSvg.attr('class', 'label edgeLabel');\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n // if (node.props) {\n // const propKeys = new Set(Object.keys(node.props));\n // if (node.props.borders) {\n // applyNodePropertyBorders(rect, node.borders, totalWidth, totalHeight);\n // propKeys.delete('borders');\n // }\n // propKeys.forEach((propKey) => {\n // log.warn(`Unknown node property ${propKey}`);\n // });\n // }\n\n updateNodeBounds(node, rect);\n // node.width = 1;\n // node.height = 1;\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function lean_left(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0), node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0), node?.height ?? 0);\n const points = [\n { x: 0, y: 0 },\n { x: w + (3 * h) / 6, y: 0 },\n { x: w, y: -h },\n { x: -(3 * h) / 6, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n // const pathData = createLeanLeftPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function lean_right(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0), node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0), node?.height ?? 0);\n const points = [\n { x: (-3 * h) / 6, y: 0 },\n { x: w, y: 0 },\n { x: w + (3 * h) / 6, y: -h },\n { x: 0, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function lightningBolt(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = '';\n node.labelStyle = labelStyles;\n const shapeSvg = parent\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId ?? node.id);\n const { cssStyles } = node;\n const width = Math.max(35, node?.width ?? 0);\n const height = Math.max(35, node?.height ?? 0);\n const gap = 7;\n\n const points = [\n { x: width, y: 0 },\n { x: 0, y: height + gap / 2 },\n { x: width - 2 * gap, y: height + gap / 2 },\n { x: 0, y: 2 * height },\n { x: width, y: height - gap / 2 },\n { x: 2 * gap, y: height - gap / 2 },\n ];\n\n // @ts-expect-error shapeSvg d3 class is incorrect?\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const linePath = createPathFromPoints(points);\n const lineNode = rc.path(linePath, options);\n\n const lightningBolt = shapeSvg.insert(() => lineNode, ':first-child');\n\n if (cssStyles && node.look !== 'handDrawn') {\n lightningBolt.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n lightningBolt.selectAll('path').attr('style', nodeStyles);\n }\n\n lightningBolt.attr('transform', `translate(-${width / 2},${-height})`);\n\n updateNodeBounds(node, lightningBolt);\n\n node.intersect = function (point) {\n log.info('lightningBolt intersect', node, point);\n const pos = intersect.polygon(node, points, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number,\n outerOffset: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n `M${x},${y + ry + outerOffset}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n ].join(' ');\n};\nexport const createOuterCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number,\n outerOffset: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `M${x + width},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n `M${x},${y + ry + outerOffset}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(' ');\n};\nexport async function linedCylinder(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0), node.width ?? 0);\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = Math.max(bbox.height + ry + (node.padding ?? 0), node.height ?? 0);\n const outerOffset = h * 0.1; // 10% of height\n\n let cylinder: typeof shapeSvg | D3Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry, outerOffset);\n const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n const options = userNodeOverrides(node, {});\n\n const outerNode = rc.path(outerPathData, options);\n const innerLine = rc.path(innerPathData, options);\n\n const innerLineEl = shapeSvg.insert(() => innerLine, ':first-child');\n innerLineEl.attr('class', 'line');\n cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n cylinder.attr('class', 'basic label-container');\n if (cssStyles) {\n cylinder.attr('style', cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry, outerOffset);\n cylinder = shapeSvg\n .insert('path', ':first-child')\n .attr('d', pathData)\n .attr('class', 'basic label-container')\n .attr('style', handleUndefinedAttr(cssStyles))\n .attr('style', nodeStyles);\n }\n\n // find label and move it down\n cylinder.attr('label-offset-y', ry);\n cylinder.attr('transform', `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n\n updateNodeBounds(node, cylinder);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + ry - (bbox.y - (bbox.top ?? 0))})`\n );\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - (node.x ?? 0);\n\n if (\n rx != 0 &&\n (Math.abs(x) < (node.width ?? 0) / 2 ||\n (Math.abs(x) == (node.width ?? 0) / 2 &&\n Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))\n ) {\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y > 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - (node.y ?? 0) > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function linedWaveEdgedRect(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 4;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2 - (w / 2) * 0.1, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - (w / 2) * 0.1,\n finalH / 2,\n w / 2 + (w / 2) * 0.1,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n { x: w / 2 + (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2, y: -finalH / 2 },\n { x: -w / 2, y: (finalH / 2) * 1.1 },\n { x: -w / 2, y: -finalH / 2 },\n ];\n\n const poly = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n\n const waveEdgeRect = shapeSvg.insert(() => poly, ':first-child');\n\n waveEdgeRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n }\n\n waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) + ((w / 2) * 0.1) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function multiRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const rectOffset = 5;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const outerPathPoints = [\n { x: x - rectOffset, y: y + rectOffset },\n { x: x - rectOffset, y: y + h + rectOffset },\n { x: x + w - rectOffset, y: y + h + rectOffset },\n { x: x + w - rectOffset, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y + h - rectOffset },\n { x: x + w + rectOffset, y: y + h - rectOffset },\n { x: x + w + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y },\n { x, y },\n { x, y: y + rectOffset },\n ];\n\n const innerPathPoints = [\n { x, y: y + rectOffset },\n { x: x + w - rectOffset, y: y + rectOffset },\n { x: x + w - rectOffset, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y },\n { x, y },\n ];\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const outerPath = createPathFromPoints(outerPathPoints);\n const outerNode = rc.path(outerPath, options);\n const innerPath = createPathFromPoints(innerPathPoints);\n const innerNode = rc.path(innerPath, { ...options, fill: 'none' });\n\n const multiRect = shapeSvg.insert(() => innerNode, ':first-child');\n multiRect.insert(() => outerNode, ':first-child');\n\n multiRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n multiRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n multiRect.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - rectOffset - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, multiRect);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, outerPathPoints, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function multiWaveEdgedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 4;\n const finalH = h + waveAmplitude;\n const x = -w / 2;\n const y = -finalH / 2;\n const rectOffset = 5;\n\n const { cssStyles } = node;\n\n const wavePoints = generateFullSineWavePoints(\n x - rectOffset,\n y + finalH + rectOffset,\n x + w - rectOffset,\n y + finalH + rectOffset,\n waveAmplitude,\n 0.8\n );\n\n const lastWavePoint = wavePoints?.[wavePoints.length - 1];\n\n const outerPathPoints = [\n { x: x - rectOffset, y: y + rectOffset },\n { x: x - rectOffset, y: y + finalH + rectOffset },\n ...wavePoints,\n { x: x + w - rectOffset, y: lastWavePoint.y - rectOffset },\n { x: x + w, y: lastWavePoint.y - rectOffset },\n { x: x + w, y: lastWavePoint.y - 2 * rectOffset },\n { x: x + w + rectOffset, y: lastWavePoint.y - 2 * rectOffset },\n { x: x + w + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y - rectOffset },\n { x: x + rectOffset, y: y },\n { x, y },\n { x, y: y + rectOffset },\n ];\n\n const innerPathPoints = [\n { x, y: y + rectOffset },\n { x: x + w - rectOffset, y: y + rectOffset },\n { x: x + w - rectOffset, y: lastWavePoint.y - rectOffset },\n { x: x + w, y: lastWavePoint.y - rectOffset },\n { x: x + w, y },\n { x, y },\n ];\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const outerPath = createPathFromPoints(outerPathPoints);\n const outerNode = rc.path(outerPath, options);\n const innerPath = createPathFromPoints(innerPathPoints);\n const innerNode = rc.path(innerPath, options);\n\n const shape = shapeSvg.insert(() => outerNode, ':first-child');\n shape.insert(() => innerNode);\n\n shape.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n shape.selectAll('path').attr('style', nodeStyles);\n }\n\n shape.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - rectOffset - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, shape);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, outerPathPoints, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\nimport { getConfig } from '../../../config.js';\n\nexport async function note(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart?.htmlLabels !== false;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const totalHeight = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n const { cssStyles } = node;\n\n // add the rect\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n fill: themeVariables.noteBkgColor,\n stroke: themeVariables.noteBorderColor,\n });\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const noteShapeNode = rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n const rect = shapeSvg.insert(() => noteShapeNode, ':first-child');\n rect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport const createDecisionBoxPathD = (x: number, y: number, size: number): string => {\n return [\n `M${x + size / 2},${y}`,\n `L${x + size},${y - size / 2}`,\n `L${x + size / 2},${y - size}`,\n `L${x},${y - size / 2}`,\n 'Z',\n ].join(' ');\n};\n\nexport async function question(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createDecisionBoxPathD(0, 0, s);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-s / 2}, ${s / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, s, s, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n log.debug(\n 'APA12 Intersect called SPLIT\\npoint:',\n point,\n '\\nnode:\\n',\n node,\n '\\nres:',\n intersect.polygon(node, points, point)\n );\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function rect_left_inv_arrow(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = Math.max(bbox.width + (node.padding ?? 0), node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0), node?.height ?? 0);\n\n const x = -w / 2;\n const y = -h / 2;\n const notch = y / 2;\n\n const points = [\n { x: x + notch, y },\n { x: x, y: 0 },\n { x: x + notch, y: -y },\n { x: -x, y: -y },\n { x: -x, y },\n ];\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => roughNode, ':first-child');\n\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', cssStyles);\n }\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectAll('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(${-notch / 2},0)`);\n\n label.attr(\n 'transform',\n `translate(${-notch / 2 - bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import type { Node } from '../../types.js';\nimport { select } from 'd3';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport { updateNodeBounds } from './util.js';\nimport createLabel from '../createLabel.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { log } from '../../../logger.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function rectWithTitle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n let classes;\n if (!node.cssClasses) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.cssClasses;\n }\n\n // Add outer g element\n const shapeSvg = parent\n // @ts-ignore - d3 typings are not correct\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const g = shapeSvg.insert('g');\n\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', nodeStyles);\n\n const description = node.description;\n\n const title = node.label;\n\n const text = label.node()!.appendChild(await createLabel(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', description);\n const textRows = description || [];\n const titleBox = text.getBBox();\n const descr = label\n .node()!\n .appendChild(\n await createLabel(\n textRows.join ? textRows.join('
') : textRows,\n node.labelStyle,\n true,\n true\n )\n );\n\n //if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n // }\n\n const halfPadding = (node.padding || 0) / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node()!.getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n const totalWidth = bbox.width + (node.padding || 0);\n const totalHeight = bbox.height + (node.padding || 0);\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n let rect;\n let innerLine;\n if (node.look === 'handDrawn') {\n // @ts-ignore No typings for rough\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.path(\n createRoundedRectPathD(x, y, totalWidth, totalHeight, node.rx || 0),\n options\n );\n\n const roughLine = rc.line(\n -bbox.width / 2 - halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n bbox.width / 2 + halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n options\n );\n\n innerLine = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughLine;\n }, ':first-child');\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n } else {\n rect = g.insert('rect', ':first-child');\n innerLine = g.insert('line');\n rect\n .attr('class', 'outer title-state')\n .attr('style', nodeStyles)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + (node.padding || 0))\n .attr('height', bbox.height + (node.padding || 0));\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n }\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function roundedRect(\n parent: D3Selection,\n node: Node\n) {\n const options = {\n rx: 5,\n ry: 5,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 1,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n\n return drawRect(parent, node, options);\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function shadedProcess(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const halfPadding = node?.padding ?? 0;\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x, y },\n { x: x + w + 8, y },\n { x: x + w + 8, y: y + h },\n { x: x - 8, y: y + h },\n { x: x - 8, y: y },\n { x, y },\n { x, y: y + h },\n ];\n\n const roughNode = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n\n const rect = shapeSvg.insert(() => roughNode, ':first-child');\n\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n\n if (nodeStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', nodeStyles);\n }\n\n if (cssStyles && node.look !== 'handDrawn') {\n rect.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${-w / 2 + 4 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function slopedRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -w / 2;\n const y = -h / 2;\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x, y },\n { x, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y - h / 2 },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n polygon.attr('transform', `translate(0, ${h / 4})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))}, ${-h / 4 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function squareRect(parent: D3Selection, node: Node) {\n const options = {\n rx: 0,\n ry: 0,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 2,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n return drawRect(parent, node, options);\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createStadiumPathD = (\n x: number,\n y: number,\n totalWidth: number,\n totalHeight: number\n) => {\n const radius = totalHeight / 2;\n return [\n 'M',\n x + radius,\n y, // Move to the start of the top-left arc\n 'H',\n x + totalWidth - radius, // Draw horizontal line to the start of the top-right arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth,\n y + radius, // Draw top-right arc\n 'H',\n x, // Draw horizontal line to the start of the bottom-right arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth - radius,\n y + totalHeight, // Draw bottom-right arc\n 'H',\n x + radius, // Draw horizontal line to the start of the bottom-left arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x,\n y + radius, // Draw bottom-left arc\n 'Z', // Close the path\n ].join(' ');\n};\n\nexport async function stadium(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n let rect;\n const { cssStyles } = node;\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const pathData = createRoundedRectPathD(-w / 2, -h / 2, w, h, h / 2);\n const roughNode = rc.path(pathData, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function state(parent: D3Selection, node: Node) {\n const options = {\n rx: 5,\n ry: 5,\n classes: 'flowchart-node',\n } as RectOptions;\n return drawRect(parent, node, options);\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function stateEnd(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { cssStyles } = node;\n const { lineColor, stateBorder, nodeBorder } = themeVariables;\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const roughNode = rc.circle(0, 0, 14, {\n ...options,\n stroke: lineColor,\n strokeWidth: 2,\n });\n const innerFill = stateBorder ?? nodeBorder;\n const roughInnerNode = rc.circle(0, 0, 5, {\n ...options,\n fill: innerFill,\n stroke: innerFill,\n strokeWidth: 2,\n fillStyle: 'solid',\n });\n const circle = shapeSvg.insert(() => roughNode, ':first-child');\n circle.insert(() => roughInnerNode);\n\n if (cssStyles) {\n circle.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles) {\n circle.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n}\n", "import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { solidStateFill } from './handDrawnShapeStyles.js';\nimport { updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function stateStart(\n parent: D3Selection,\n node: Node,\n { config: { themeVariables } }: ShapeRenderOptions\n) {\n const { lineColor } = themeVariables;\n\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let circle: D3Selection | D3Selection;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const roughNode = rc.circle(0, 0, 14, solidStateFill(lineColor));\n circle = shapeSvg.insert(() => roughNode);\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n } else {\n circle = shapeSvg.insert('circle', ':first-child');\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n }\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createSubroutinePathD = (\n x: number,\n y: number,\n width: number,\n height: number\n): string => {\n const offset = 8;\n return [\n `M${x - offset},${y}`,\n `H${x + width + offset}`,\n `V${y + height}`,\n `H${x - offset}`,\n `V${y}`,\n 'M',\n x,\n y,\n 'H',\n x + width,\n 'V',\n y + height,\n 'H',\n x,\n 'Z',\n ].join(' ');\n};\n\nexport async function subroutine(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const halfPadding = (node?.padding || 0) / 2;\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const roughNode = rc.rectangle(x - 8, y, w + 16, h, options);\n const l1 = rc.line(x, y, x, y + h, options);\n const l2 = rc.line(x + w, y, x + w, y + h, options);\n\n shapeSvg.insert(() => l1, ':first-child');\n shapeSvg.insert(() => l2, ':first-child');\n const rect = shapeSvg.insert(() => roughNode, ':first-child');\n const { cssStyles } = node;\n rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n updateNodeBounds(node, rect);\n } else {\n const el = insertPolygonShape(shapeSvg, w, h, points);\n if (nodeStyles) {\n el.attr('style', nodeStyles);\n }\n updateNodeBounds(node, el);\n }\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function taggedRect(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -w / 2;\n const y = -h / 2;\n const tagWidth = 0.2 * h;\n const tagHeight = 0.2 * h;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const rectPoints = [\n { x: x - tagWidth / 2, y },\n { x: x + w + tagWidth / 2, y },\n { x: x + w + tagWidth / 2, y: y + h },\n { x: x - tagWidth / 2, y: y + h },\n ];\n\n const tagPoints = [\n { x: x + w - tagWidth / 2, y: y + h },\n { x: x + w + tagWidth / 2, y: y + h },\n { x: x + w + tagWidth / 2, y: y + h - tagHeight },\n ];\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const rectPath = createPathFromPoints(rectPoints);\n const rectNode = rc.path(rectPath, options);\n\n const tagPath = createPathFromPoints(tagPoints);\n const tagNode = rc.path(tagPath, { ...options, fillStyle: 'solid' });\n\n const taggedRect = shapeSvg.insert(() => tagNode, ':first-child');\n taggedRect.insert(() => rectNode, ':first-child');\n\n taggedRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n taggedRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n taggedRect.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, taggedRect);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, rectPoints, point);\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n generateFullSineWavePoints,\n createPathFromPoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function taggedWaveEdgedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 4;\n const tagWidth = 0.2 * w;\n const tagHeight = 0.2 * h;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2 - (w / 2) * 0.1, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - (w / 2) * 0.1,\n finalH / 2,\n w / 2 + (w / 2) * 0.1,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n\n { x: w / 2 + (w / 2) * 0.1, y: -finalH / 2 },\n { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n ];\n\n const x = -w / 2 + (w / 2) * 0.1;\n const y = -finalH / 2 - tagHeight * 0.4;\n\n const tagPoints = [\n { x: x + w - tagWidth, y: (y + h) * 1.4 },\n { x: x + w, y: y + h - tagHeight },\n { x: x + w, y: (y + h) * 0.9 },\n ...generateFullSineWavePoints(\n x + w,\n (y + h) * 1.3,\n x + w - tagWidth,\n (y + h) * 1.5,\n -h * 0.03,\n 0.5\n ),\n ];\n\n const waveEdgeRectPath = createPathFromPoints(points);\n const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n\n const taggedWaveEdgeRectPath = createPathFromPoints(tagPoints);\n const taggedWaveEdgeRectNode = rc.path(taggedWaveEdgeRectPath, {\n ...options,\n fillStyle: 'solid',\n });\n\n const waveEdgeRect = shapeSvg.insert(() => taggedWaveEdgeRectNode, ':first-child');\n waveEdgeRect.insert(() => waveEdgeRectNode, ':first-child');\n\n waveEdgeRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n }\n\n waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function text(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const totalWidth = Math.max(bbox.width + node.padding, node?.width || 0);\n const totalHeight = Math.max(bbox.height + node.padding, node?.height || 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'text')\n .attr('style', nodeStyles)\n .attr('rx', 0)\n .attr('ry', 0)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return `M${x},${y}\n a${rx},${ry} 0,0,1 ${0},${-height}\n l${width},${0}\n a${rx},${ry} 0,0,1 ${0},${height}\n M${width},${-height}\n a${rx},${ry} 0,0,0 ${0},${height}\n l${-width},${0}`;\n};\n\nexport const createOuterCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y}`,\n `M${x + width},${y}`,\n `a${rx},${ry} 0,0,0 ${0},${-height}`,\n `l${-width},0`,\n `a${rx},${ry} 0,0,0 ${0},${height}`,\n `l${width},0`,\n ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [`M${x + width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 0,${height}`].join(' ');\n};\n\nexport async function tiltedCylinder(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label, halfPadding } = await labelHelper(\n parent,\n node,\n getNodeClasses(node)\n );\n const labelPadding = node.look === 'neo' ? halfPadding * 2 : halfPadding;\n const h = bbox.height + labelPadding;\n const ry = h / 2;\n const rx = ry / (2.5 + h / 50);\n const w = bbox.width + rx + labelPadding;\n const { cssStyles } = node;\n\n let cylinder: D3Selection | D3Selection;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n const innerPathData = createInnerCylinderPathD(0, 0, w, h, rx, ry);\n const outerNode = rc.path(outerPathData, userNodeOverrides(node, {}));\n const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: 'none' }));\n cylinder = shapeSvg.insert(() => innerLine, ':first-child');\n cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n cylinder.attr('class', 'basic label-container');\n if (cssStyles) {\n cylinder.attr('style', cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n cylinder = shapeSvg\n .insert('path', ':first-child')\n .attr('d', pathData)\n .attr('class', 'basic label-container')\n .attr('style', handleUndefinedAttr(cssStyles))\n .attr('style', nodeStyles);\n cylinder.attr('class', 'basic label-container');\n\n if (cssStyles) {\n cylinder.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles) {\n cylinder.selectAll('path').attr('style', nodeStyles);\n }\n }\n\n cylinder.attr('label-offset-x', rx);\n cylinder.attr('transform', `translate(${-w / 2}, ${h / 2} )`);\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) - rx - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, cylinder);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const y = pos.y - (node.y ?? 0);\n\n if (\n ry != 0 &&\n (Math.abs(y) < (node.height ?? 0) / 2 ||\n (Math.abs(y) == (node.height ?? 0) / 2 &&\n Math.abs(pos.x - (node.x ?? 0)) > (node.width ?? 0) / 2 - rx))\n ) {\n let x = rx * rx * (1 - (y * y) / (ry * ry));\n if (x != 0) {\n x = Math.sqrt(x);\n }\n x = rx - x;\n if (point.x - (node.x ?? 0) > 0) {\n x = -x;\n }\n\n pos.x += x;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\n// export const createTrapezoidPathD = (\n// x: number,\n// y: number,\n// width: number,\n// height: number\n// ): string => {\n// return [\n// `M${x - (2 * height) / 6},${y}`,\n// `L${x + width + (2 * height) / 6},${y}`,\n// `L${x + width - height / 6},${y - height}`,\n// `L${x + height / 6},${y - height}`,\n// 'Z',\n// ].join(' ');\n// };\n\nexport async function trapezoid(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-3 * h) / 6, y: 0 },\n { x: w + (3 * h) / 6, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n ];\n\n let polygon: typeof shapeSvg | ReturnType;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function trapezoidalPentagon(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const minWidth = 60,\n minHeight = 20;\n const w = Math.max(minWidth, bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(minHeight, bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n\n const { cssStyles } = node;\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: (-w / 2) * 0.8, y: -h / 2 },\n { x: (w / 2) * 0.8, y: -h / 2 },\n { x: w / 2, y: (-h / 2) * 0.6 },\n { x: w / 2, y: h / 2 },\n { x: -w / 2, y: h / 2 },\n { x: -w / 2, y: (-h / 2) * 0.6 },\n ];\n\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n\n const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n polygon.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createPathFromPoints } from './util.js';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function triangle(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const useHtmlLabels = evaluate(getConfig().flowchart?.htmlLabels);\n\n const w = bbox.width + (node.padding ?? 0);\n const h = w + bbox.height;\n\n const tw = w + bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: tw, y: 0 },\n { x: tw / 2, y: -h },\n ];\n\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n\n const polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-h / 2}, ${h / 2})`);\n\n if (cssStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n polygon.selectChildren('path').attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n label.attr(\n 'transform',\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${h / 2 - (bbox.height + (node.padding ?? 0) / (useHtmlLabels ? 2 : 1) - (bbox.y - (bbox.top ?? 0)))})`\n );\n\n node.intersect = function (point) {\n log.info('Triangle intersect', node, points, point);\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n generateFullSineWavePoints,\n createPathFromPoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function waveEdgedRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 8;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n\n // To maintain minimum width\n const minWidth = 70;\n const widthDif = minWidth - w;\n const extraW = widthDif > 0 ? widthDif / 2 : 0;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2 - extraW, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - extraW,\n finalH / 2,\n w / 2 + extraW,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n { x: w / 2 + extraW, y: -finalH / 2 },\n { x: -w / 2 - extraW, y: -finalH / 2 },\n ];\n\n const waveEdgeRectPath = createPathFromPoints(points);\n const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n\n const waveEdgeRect = shapeSvg.insert(() => waveEdgeRectNode, ':first-child');\n\n waveEdgeRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n }\n\n waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n 'transform',\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import {\n labelHelper,\n updateNodeBounds,\n getNodeClasses,\n createPathFromPoints,\n generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function waveRectangle(\n parent: D3Selection,\n node: Node\n) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const minWidth = 100; // Minimum width\n const minHeight = 50; // Minimum height\n\n const baseWidth = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const baseHeight = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n\n const aspectRatio = baseWidth / baseHeight;\n\n let w = baseWidth;\n let h = baseHeight;\n\n if (w > h * aspectRatio) {\n h = w / aspectRatio;\n } else {\n w = h * aspectRatio;\n }\n\n w = Math.max(w, minWidth);\n h = Math.max(h, minHeight);\n\n const waveAmplitude = Math.min(h * 0.2, h / 4);\n const finalH = h + waveAmplitude * 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const points = [\n { x: -w / 2, y: finalH / 2 },\n ...generateFullSineWavePoints(-w / 2, finalH / 2, w / 2, finalH / 2, waveAmplitude, 1),\n { x: w / 2, y: -finalH / 2 },\n ...generateFullSineWavePoints(w / 2, -finalH / 2, -w / 2, -finalH / 2, waveAmplitude, -1),\n ];\n\n const waveRectPath = createPathFromPoints(points);\n const waveRectNode = rc.path(waveRectPath, options);\n\n const waveRect = shapeSvg.insert(() => waveRectNode, ':first-child');\n\n waveRect.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n waveRect.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n waveRect.selectAll('path').attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, waveRect);\n node.intersect = function (point) {\n const pos = intersect.polygon(node, points, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function windowPane(parent: D3Selection, node: Node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const rectOffset = 5;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n\n // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const outerPathPoints = [\n { x: x - rectOffset, y: y - rectOffset },\n { x: x - rectOffset, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y - rectOffset },\n ];\n\n const path = `M${x - rectOffset},${y - rectOffset} L${x + w},${y - rectOffset} L${x + w},${y + h} L${x - rectOffset},${y + h} L${x - rectOffset},${y - rectOffset}\n M${x - rectOffset},${y} L${x + w},${y}\n M${x},${y - rectOffset} L${x},${y + h}`;\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const no = rc.path(path, options);\n\n const windowPane = shapeSvg.insert(() => no, ':first-child');\n windowPane.attr('transform', `translate(${rectOffset / 2}, ${rectOffset / 2})`);\n\n windowPane.attr('class', 'basic label-container');\n\n if (cssStyles && node.look !== 'handDrawn') {\n windowPane.selectAll('path').attr('style', cssStyles);\n }\n\n if (nodeStyles && node.look !== 'handDrawn') {\n windowPane.selectAll('path').attr('style', nodeStyles);\n }\n\n label.attr(\n 'transform',\n `translate(${-(bbox.width / 2) + rectOffset / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n\n updateNodeBounds(node, windowPane);\n\n node.intersect = function (point) {\n const pos = intersect.polygon(node, outerPathPoints, point);\n return pos;\n };\n\n return shapeSvg;\n}\n", "import { select } from 'd3';\nimport { getConfig } from '../../config.js';\nimport { getNodeClasses } from '../../rendering-util/rendering-elements/shapes/util.js';\nimport { calculateTextWidth, decodeEntities } from '../../utils.js';\nimport type { ClassMember, ClassNode } from './classTypes.js';\nimport { sanitizeText } from '../../diagram-api/diagramAPI.js';\nimport { createText } from '../../rendering-util/createText.js';\nimport { evaluate, hasKatex } from '../common/common.js';\nimport type { Node } from '../../rendering-util/types.js';\nimport type { MermaidConfig } from '../../config.type.js';\nimport type { D3Selection } from '../../types.js';\n\n// Creates the shapeSvg and inserts text\nexport async function textHelper(\n parent: D3Selection,\n node: any,\n config: MermaidConfig,\n useHtmlLabels: boolean,\n GAP = config.class!.padding ?? 12\n) {\n const TEXT_PADDING = !useHtmlLabels ? 3 : 0;\n const shapeSvg = parent\n // @ts-ignore: Ignore error for using .insert on SVGAElement\n .insert('g')\n .attr('class', getNodeClasses(node))\n .attr('id', node.domId || node.id);\n\n let annotationGroup = null;\n let labelGroup = null;\n let membersGroup = null;\n let methodsGroup = null;\n\n let annotationGroupHeight = 0;\n let labelGroupHeight = 0;\n let membersGroupHeight = 0;\n\n annotationGroup = shapeSvg.insert('g').attr('class', 'annotation-group text');\n if (node.annotations.length > 0) {\n const annotation = node.annotations[0];\n await addText(annotationGroup, { text: `\u00AB${annotation}\u00BB` } as unknown as ClassMember, 0);\n\n const annotationGroupBBox = annotationGroup.node()!.getBBox();\n annotationGroupHeight = annotationGroupBBox.height;\n }\n\n labelGroup = shapeSvg.insert('g').attr('class', 'label-group text');\n await addText(labelGroup, node, 0, ['font-weight: bolder']);\n const labelGroupBBox = labelGroup.node()!.getBBox();\n labelGroupHeight = labelGroupBBox.height;\n\n membersGroup = shapeSvg.insert('g').attr('class', 'members-group text');\n let yOffset = 0;\n for (const member of node.members) {\n const height = await addText(membersGroup, member, yOffset, [member.parseClassifier()]);\n yOffset += height + TEXT_PADDING;\n }\n membersGroupHeight = membersGroup.node()!.getBBox().height;\n if (membersGroupHeight <= 0) {\n membersGroupHeight = GAP / 2;\n }\n\n methodsGroup = shapeSvg.insert('g').attr('class', 'methods-group text');\n let methodsYOffset = 0;\n for (const method of node.methods) {\n const height = await addText(methodsGroup, method, methodsYOffset, [method.parseClassifier()]);\n methodsYOffset += height + TEXT_PADDING;\n }\n\n let bbox = shapeSvg.node()!.getBBox();\n\n // Center annotation\n if (annotationGroup !== null) {\n const annotationGroupBBox = annotationGroup.node()!.getBBox();\n annotationGroup.attr('transform', `translate(${-annotationGroupBBox.width / 2})`);\n }\n\n // Adjust label\n labelGroup.attr('transform', `translate(${-labelGroupBBox.width / 2}, ${annotationGroupHeight})`);\n\n bbox = shapeSvg.node()!.getBBox();\n\n membersGroup.attr(\n 'transform',\n `translate(${0}, ${annotationGroupHeight + labelGroupHeight + GAP * 2})`\n );\n bbox = shapeSvg.node()!.getBBox();\n methodsGroup.attr(\n 'transform',\n `translate(${0}, ${annotationGroupHeight + labelGroupHeight + (membersGroupHeight ? membersGroupHeight + GAP * 4 : GAP * 2)})`\n );\n\n bbox = shapeSvg.node()!.getBBox();\n\n return { shapeSvg, bbox };\n}\n\n// Modified version of labelHelper() to help create and place text for classes\nasync function addText(\n parentGroup: D3Selection,\n node: Node | ClassNode | ClassMember,\n yOffset: number,\n styles: string[] = []\n) {\n const textEl = parentGroup.insert('g').attr('class', 'label').attr('style', styles.join('; '));\n const config = getConfig();\n let useHtmlLabels =\n 'useHtmlLabels' in node ? node.useHtmlLabels : (evaluate(config.htmlLabels) ?? true);\n\n let textContent = '';\n // Support regular node type (.label) and classNodes (.text)\n if ('text' in node) {\n textContent = node.text;\n } else {\n textContent = node.label!;\n }\n\n // createText() will cause unwanted behavior because of classDiagram syntax so workarounds are needed\n\n if (!useHtmlLabels && textContent.startsWith('\\\\')) {\n textContent = textContent.substring(1);\n }\n\n if (hasKatex(textContent)) {\n useHtmlLabels = true;\n }\n\n const text = await createText(\n textEl,\n sanitizeText(decodeEntities(textContent)),\n {\n width: calculateTextWidth(textContent, config) + 50, // Add room for error when splitting text into multiple lines\n classes: 'markdown-node-label',\n useHtmlLabels,\n },\n config\n );\n let bbox;\n let numberOfLines = 1;\n\n if (!useHtmlLabels) {\n // Undo font-weight normal\n if (styles.includes('font-weight: bolder')) {\n select(text).selectAll('tspan').attr('font-weight', '');\n }\n\n numberOfLines = text.children.length;\n\n const textChild = text.children[0];\n if (text.textContent === '' || text.textContent.includes('>')) {\n textChild.textContent =\n textContent[0] +\n textContent.substring(1).replaceAll('>', '>').replaceAll('<', '<').trim();\n\n // Text was improperly removed due to spaces (preserve one space if present)\n const preserveSpace = textContent[1] === ' ';\n if (preserveSpace) {\n textChild.textContent = textChild.textContent[0] + ' ' + textChild.textContent.substring(1);\n }\n }\n\n // To support empty boxes\n if (textChild.textContent === 'undefined') {\n textChild.textContent = '';\n }\n\n // Get the bounding box after the text update\n bbox = text.getBBox();\n } else {\n const div = text.children[0];\n const dv = select(text);\n\n numberOfLines = div.innerHTML.split('
').length;\n // Katex math support\n if (div.innerHTML.includes('')) {\n numberOfLines += div.innerHTML.split('').length - 1;\n }\n\n // Support images\n const images = div.getElementsByTagName('img');\n if (images) {\n const noImgText = textContent.replace(/]*>/g, '').trim() === '';\n await Promise.all(\n [...images].map(\n (img) =>\n new Promise((res) => {\n function setupImage() {\n img.style.display = 'flex';\n img.style.flexDirection = 'column';\n\n if (noImgText) {\n // default size if no text\n const bodyFontSize =\n config.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = '100%';\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener('error', setupImage);\n img.addEventListener('load', setupImage);\n })\n )\n );\n }\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center text and offset by yOffset\n textEl.attr('transform', 'translate(0,' + (-bbox.height / (2 * numberOfLines) + yOffset) + ')');\n return bbox.height;\n}\n", "import { updateNodeBounds } from './util.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport type { Node } from '../../types.js';\nimport type { ClassNode } from '../../../diagrams/class/classTypes.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport intersect from '../intersect/index.js';\nimport { textHelper } from '../../../diagrams/class/shapeUtil.js';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function classBox(parent: D3Selection, node: Node) {\n const config = getConfig();\n const PADDING = config.class!.padding ?? 12;\n const GAP = PADDING;\n const useHtmlLabels = node.useHtmlLabels ?? evaluate(config.htmlLabels) ?? true;\n // Treat node as classNode\n const classNode = node as unknown as ClassNode;\n classNode.annotations = classNode.annotations ?? [];\n classNode.members = classNode.members ?? [];\n classNode.methods = classNode.methods ?? [];\n\n const { shapeSvg, bbox } = await textHelper(parent, node, config, useHtmlLabels, GAP);\n\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n\n node.cssStyles = classNode.styles || '';\n\n const styles = classNode.styles?.join(';') || nodeStyles || '';\n\n if (!node.cssStyles) {\n node.cssStyles = styles.replaceAll('!important', '').split(';');\n }\n\n const renderExtraBox =\n classNode.members.length === 0 &&\n classNode.methods.length === 0 &&\n !config.class?.hideEmptyMembersBox;\n\n // Setup roughjs\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n if (node.look !== 'handDrawn') {\n options.roughness = 0;\n options.fillStyle = 'solid';\n }\n\n const w = bbox.width;\n let h = bbox.height;\n if (classNode.members.length === 0 && classNode.methods.length === 0) {\n h += GAP;\n } else if (classNode.members.length > 0 && classNode.methods.length === 0) {\n h += GAP * 2;\n }\n const x = -w / 2;\n const y = -h / 2;\n\n // Create and center rectangle\n const roughRect = rc.rectangle(\n x - PADDING,\n y -\n PADDING -\n (renderExtraBox\n ? PADDING\n : classNode.members.length === 0 && classNode.methods.length === 0\n ? -PADDING / 2\n : 0),\n w + 2 * PADDING,\n h +\n 2 * PADDING +\n (renderExtraBox\n ? PADDING * 2\n : classNode.members.length === 0 && classNode.methods.length === 0\n ? -PADDING\n : 0),\n options\n );\n\n const rect = shapeSvg.insert(() => roughRect, ':first-child');\n rect.attr('class', 'basic label-container');\n const rectBBox = rect.node()!.getBBox();\n\n // Rect is centered so now adjust labels.\n // TODO: Fix types\n shapeSvg.selectAll('.text').each((_: any, i: number, nodes: any) => {\n const text = select(nodes[i]);\n // Get the current transform attribute\n const transform = text.attr('transform');\n // Initialize variables for the translation values\n let translateY = 0;\n // Check if the transform attribute exists\n if (transform) {\n const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n const translate = regex.exec(transform);\n if (translate) {\n translateY = parseFloat(translate[2]);\n }\n }\n // Add to the y value\n let newTranslateY =\n translateY +\n y +\n PADDING -\n (renderExtraBox\n ? PADDING\n : classNode.members.length === 0 && classNode.methods.length === 0\n ? -PADDING / 2\n : 0);\n if (!useHtmlLabels) {\n // Fix so non html labels are better centered.\n // BBox of text seems to be slightly different when calculated so we offset\n newTranslateY -= 4;\n }\n let newTranslateX = x;\n if (\n text.attr('class').includes('label-group') ||\n text.attr('class').includes('annotation-group')\n ) {\n newTranslateX = -text.node()?.getBBox().width / 2 || 0;\n shapeSvg.selectAll('text').each(function (_: any, i: number, nodes: any) {\n if (window.getComputedStyle(nodes[i]).textAnchor === 'middle') {\n newTranslateX = 0;\n }\n });\n }\n // Set the updated transform attribute\n text.attr('transform', `translate(${newTranslateX}, ${newTranslateY})`);\n });\n\n // Render divider lines.\n const annotationGroupHeight =\n (shapeSvg.select('.annotation-group').node() as SVGGraphicsElement).getBBox().height -\n (renderExtraBox ? PADDING / 2 : 0) || 0;\n const labelGroupHeight =\n (shapeSvg.select('.label-group').node() as SVGGraphicsElement).getBBox().height -\n (renderExtraBox ? PADDING / 2 : 0) || 0;\n const membersGroupHeight =\n (shapeSvg.select('.members-group').node() as SVGGraphicsElement).getBBox().height -\n (renderExtraBox ? PADDING / 2 : 0) || 0;\n // First line (under label)\n if (classNode.members.length > 0 || classNode.methods.length > 0 || renderExtraBox) {\n const roughLine = rc.line(\n rectBBox.x,\n annotationGroupHeight + labelGroupHeight + y + PADDING,\n rectBBox.x + rectBBox.width,\n annotationGroupHeight + labelGroupHeight + y + PADDING,\n options\n );\n const line = shapeSvg.insert(() => roughLine);\n line.attr('class', 'divider').attr('style', styles);\n }\n\n // Second line (under members)\n if (renderExtraBox || classNode.members.length > 0 || classNode.methods.length > 0) {\n const roughLine = rc.line(\n rectBBox.x,\n annotationGroupHeight + labelGroupHeight + membersGroupHeight + y + GAP * 2 + PADDING,\n rectBBox.x + rectBBox.width,\n annotationGroupHeight + labelGroupHeight + membersGroupHeight + y + PADDING + GAP * 2,\n options\n );\n const line = shapeSvg.insert(() => roughLine);\n line.attr('class', 'divider').attr('style', styles);\n }\n\n /// Apply styles ///\n if (classNode.look !== 'handDrawn') {\n shapeSvg.selectAll('path').attr('style', styles);\n }\n // Apply other styles like stroke-width and stroke-dasharray to border (not background of shape)\n rect.select(':nth-child(2)').attr('style', styles);\n // Divider lines\n shapeSvg.selectAll('.divider').select('path').attr('style', styles);\n // Text elements\n if (node.labelStyle) {\n shapeSvg.selectAll('span').attr('style', node.labelStyle);\n } else {\n shapeSvg.selectAll('span').attr('style', styles);\n }\n // SVG text uses fill not color\n if (!useHtmlLabels) {\n // We just want to apply color to the text\n const colorRegex = RegExp(/color\\s*:\\s*([^;]*)/);\n const match = colorRegex.exec(styles);\n if (match) {\n const colorStyle = match[0].replace('color', 'fill');\n shapeSvg.selectAll('tspan').attr('style', colorStyle);\n } else if (labelStyles) {\n const match = colorRegex.exec(labelStyles);\n if (match) {\n const colorStyle = match[0].replace('color', 'fill');\n shapeSvg.selectAll('tspan').attr('style', colorStyle);\n }\n }\n }\n\n updateNodeBounds(node, rect);\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n}\n", "import { labelHelper, insertLabel, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node, KanbanNode, ShapeRenderOptions } from '../../types.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { userNodeOverrides, styles2String } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nconst colorFromPriority = (priority: NonNullable) => {\n switch (priority) {\n case 'Very High':\n return 'red';\n case 'High':\n return 'orange';\n case 'Medium':\n return null; // no stroke\n case 'Low':\n return 'blue';\n case 'Very Low':\n return 'lightblue';\n }\n};\nexport async function kanbanItem(\n parent: D3Selection,\n // Omit the 'shape' prop since otherwise, it causes a TypeScript circular dependency error\n kanbanNode: Omit | Omit,\n { config }: ShapeRenderOptions\n) {\n const { labelStyles, nodeStyles } = styles2String(kanbanNode);\n kanbanNode.labelStyle = labelStyles || '';\n\n const labelPaddingX = 10;\n const orgWidth = kanbanNode.width;\n kanbanNode.width = (kanbanNode.width ?? 200) - 10;\n\n const {\n shapeSvg,\n bbox,\n label: labelElTitle,\n } = await labelHelper(parent, kanbanNode, getNodeClasses(kanbanNode));\n const padding = kanbanNode.padding || 10;\n\n let ticketUrl = '';\n let link;\n\n if ('ticket' in kanbanNode && kanbanNode.ticket && config?.kanban?.ticketBaseUrl) {\n ticketUrl = config?.kanban?.ticketBaseUrl.replace('#TICKET#', kanbanNode.ticket);\n link = shapeSvg\n .insert('svg:a', ':first-child')\n .attr('class', 'kanban-ticket-link')\n .attr('xlink:href', ticketUrl)\n .attr('target', '_blank');\n }\n\n const options = {\n useHtmlLabels: kanbanNode.useHtmlLabels,\n labelStyle: kanbanNode.labelStyle || '',\n width: kanbanNode.width,\n img: kanbanNode.img,\n padding: kanbanNode.padding || 8,\n centerLabel: false,\n };\n let labelEl, bbox2;\n if (link) {\n ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n link,\n ('ticket' in kanbanNode && kanbanNode.ticket) || '',\n options\n ));\n } else {\n ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n shapeSvg,\n ('ticket' in kanbanNode && kanbanNode.ticket) || '',\n options\n ));\n }\n const { label: labelElAssigned, bbox: bboxAssigned } = await insertLabel(\n shapeSvg,\n ('assigned' in kanbanNode && kanbanNode.assigned) || '',\n options\n );\n kanbanNode.width = orgWidth;\n const labelPaddingY = 10;\n const totalWidth = kanbanNode?.width || 0;\n const heightAdj = Math.max(bbox2.height, bboxAssigned.height) / 2;\n const totalHeight =\n Math.max(bbox.height + labelPaddingY * 2, kanbanNode?.height || 0) + heightAdj;\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n labelElTitle.attr(\n 'transform',\n 'translate(' + (padding - totalWidth / 2) + ', ' + (-heightAdj - bbox.height / 2) + ')'\n );\n labelEl.attr(\n 'transform',\n 'translate(' + (padding - totalWidth / 2) + ', ' + (-heightAdj + bbox.height / 2) + ')'\n );\n labelElAssigned.attr(\n 'transform',\n 'translate(' +\n (padding + totalWidth / 2 - bboxAssigned.width - 2 * labelPaddingX) +\n ', ' +\n (-heightAdj + bbox.height / 2) +\n ')'\n );\n\n let rect;\n\n const { rx, ry } = kanbanNode;\n const { cssStyles } = kanbanNode;\n\n if (kanbanNode.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(kanbanNode, {});\n\n const roughNode =\n rx || ry\n ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options)\n : rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', cssStyles ? cssStyles : null);\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container __APA__')\n .attr('style', nodeStyles)\n .attr('rx', rx ?? 5)\n .attr('ry', ry ?? 5)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n const priority = 'priority' in kanbanNode && kanbanNode.priority;\n if (priority) {\n const line = shapeSvg.append('line');\n const lineX = x + 2;\n\n const y1 = y + Math.floor((rx ?? 0) / 2);\n const y2 = y + totalHeight - Math.floor((rx ?? 0) / 2);\n line\n .attr('x1', lineX)\n .attr('y1', y1)\n .attr('x2', lineX)\n .attr('y2', y2)\n\n .attr('stroke-width', '4')\n .attr('stroke', colorFromPriority(priority));\n }\n }\n\n updateNodeBounds(kanbanNode, rect);\n kanbanNode.height = totalHeight;\n\n kanbanNode.intersect = function (point) {\n return intersect.rect(kanbanNode, point);\n };\n\n return shapeSvg;\n}\n", "import type { Entries } from 'type-fest';\nimport type { D3Selection, MaybePromise } from '../../types.js';\nimport type { Node, ShapeRenderOptions } from '../types.js';\nimport { anchor } from './shapes/anchor.js';\nimport { bowTieRect } from './shapes/bowTieRect.js';\nimport { card } from './shapes/card.js';\nimport { choice } from './shapes/choice.js';\nimport { circle } from './shapes/circle.js';\nimport { crossedCircle } from './shapes/crossedCircle.js';\nimport { curlyBraceLeft } from './shapes/curlyBraceLeft.js';\nimport { curlyBraceRight } from './shapes/curlyBraceRight.js';\nimport { curlyBraces } from './shapes/curlyBraces.js';\nimport { curvedTrapezoid } from './shapes/curvedTrapezoid.js';\nimport { cylinder } from './shapes/cylinder.js';\nimport { dividedRectangle } from './shapes/dividedRect.js';\nimport { doublecircle } from './shapes/doubleCircle.js';\nimport { filledCircle } from './shapes/filledCircle.js';\nimport { flippedTriangle } from './shapes/flippedTriangle.js';\nimport { forkJoin } from './shapes/forkJoin.js';\nimport { halfRoundedRectangle } from './shapes/halfRoundedRectangle.js';\nimport { hexagon } from './shapes/hexagon.js';\nimport { hourglass } from './shapes/hourglass.js';\nimport { icon } from './shapes/icon.js';\nimport { iconCircle } from './shapes/iconCircle.js';\nimport { iconRounded } from './shapes/iconRounded.js';\nimport { iconSquare } from './shapes/iconSquare.js';\nimport { imageSquare } from './shapes/imageSquare.js';\nimport { inv_trapezoid } from './shapes/invertedTrapezoid.js';\nimport { labelRect } from './shapes/labelRect.js';\nimport { lean_left } from './shapes/leanLeft.js';\nimport { lean_right } from './shapes/leanRight.js';\nimport { lightningBolt } from './shapes/lightningBolt.js';\nimport { linedCylinder } from './shapes/linedCylinder.js';\nimport { linedWaveEdgedRect } from './shapes/linedWaveEdgedRect.js';\nimport { multiRect } from './shapes/multiRect.js';\nimport { multiWaveEdgedRectangle } from './shapes/multiWaveEdgedRectangle.js';\nimport { note } from './shapes/note.js';\nimport { question } from './shapes/question.js';\nimport { rect_left_inv_arrow } from './shapes/rectLeftInvArrow.js';\nimport { rectWithTitle } from './shapes/rectWithTitle.js';\nimport { roundedRect } from './shapes/roundedRect.js';\nimport { shadedProcess } from './shapes/shadedProcess.js';\nimport { slopedRect } from './shapes/slopedRect.js';\nimport { squareRect } from './shapes/squareRect.js';\nimport { stadium } from './shapes/stadium.js';\nimport { state } from './shapes/state.js';\nimport { stateEnd } from './shapes/stateEnd.js';\nimport { stateStart } from './shapes/stateStart.js';\nimport { subroutine } from './shapes/subroutine.js';\nimport { taggedRect } from './shapes/taggedRect.js';\nimport { taggedWaveEdgedRectangle } from './shapes/taggedWaveEdgedRectangle.js';\nimport { text } from './shapes/text.js';\nimport { tiltedCylinder } from './shapes/tiltedCylinder.js';\nimport { trapezoid } from './shapes/trapezoid.js';\nimport { trapezoidalPentagon } from './shapes/trapezoidalPentagon.js';\nimport { triangle } from './shapes/triangle.js';\nimport { waveEdgedRectangle } from './shapes/waveEdgedRectangle.js';\nimport { waveRectangle } from './shapes/waveRectangle.js';\nimport { windowPane } from './shapes/windowPane.js';\nimport { classBox } from './shapes/classBox.js';\nimport { kanbanItem } from './shapes/kanbanItem.js';\n\ntype ShapeHandler = (\n parent: D3Selection,\n node: Node,\n options: ShapeRenderOptions\n) => MaybePromise>;\n\nexport interface ShapeDefinition {\n semanticName: string;\n name: string;\n shortName: string;\n description: string;\n /**\n * Aliases can include descriptive names, other short names, etc.\n */\n aliases?: string[];\n /**\n * These are names used by mermaid before the introduction of new shapes. These will not be in standard formats, and shouldn't be used by the users\n */\n internalAliases?: string[];\n handler: ShapeHandler;\n}\n\nexport const shapesDefs = [\n {\n semanticName: 'Process',\n name: 'Rectangle',\n shortName: 'rect',\n description: 'Standard process shape',\n aliases: ['proc', 'process', 'rectangle'],\n internalAliases: ['squareRect'],\n handler: squareRect,\n },\n {\n semanticName: 'Event',\n name: 'Rounded Rectangle',\n shortName: 'rounded',\n description: 'Represents an event',\n aliases: ['event'],\n internalAliases: ['roundedRect'],\n handler: roundedRect,\n },\n {\n semanticName: 'Terminal Point',\n name: 'Stadium',\n shortName: 'stadium',\n description: 'Terminal point',\n aliases: ['terminal', 'pill'],\n handler: stadium,\n },\n {\n semanticName: 'Subprocess',\n name: 'Framed Rectangle',\n shortName: 'fr-rect',\n description: 'Subprocess',\n aliases: ['subprocess', 'subproc', 'framed-rectangle', 'subroutine'],\n handler: subroutine,\n },\n {\n semanticName: 'Database',\n name: 'Cylinder',\n shortName: 'cyl',\n description: 'Database storage',\n aliases: ['db', 'database', 'cylinder'],\n handler: cylinder,\n },\n {\n semanticName: 'Start',\n name: 'Circle',\n shortName: 'circle',\n description: 'Starting point',\n aliases: ['circ'],\n handler: circle,\n },\n {\n semanticName: 'Decision',\n name: 'Diamond',\n shortName: 'diam',\n description: 'Decision-making step',\n aliases: ['decision', 'diamond', 'question'],\n handler: question,\n },\n {\n semanticName: 'Prepare Conditional',\n name: 'Hexagon',\n shortName: 'hex',\n description: 'Preparation or condition step',\n aliases: ['hexagon', 'prepare'],\n handler: hexagon,\n },\n {\n semanticName: 'Data Input/Output',\n name: 'Lean Right',\n shortName: 'lean-r',\n description: 'Represents input or output',\n aliases: ['lean-right', 'in-out'],\n internalAliases: ['lean_right'],\n handler: lean_right,\n },\n {\n semanticName: 'Data Input/Output',\n name: 'Lean Left',\n shortName: 'lean-l',\n description: 'Represents output or input',\n aliases: ['lean-left', 'out-in'],\n internalAliases: ['lean_left'],\n handler: lean_left,\n },\n {\n semanticName: 'Priority Action',\n name: 'Trapezoid Base Bottom',\n shortName: 'trap-b',\n description: 'Priority action',\n aliases: ['priority', 'trapezoid-bottom', 'trapezoid'],\n handler: trapezoid,\n },\n {\n semanticName: 'Manual Operation',\n name: 'Trapezoid Base Top',\n shortName: 'trap-t',\n description: 'Represents a manual task',\n aliases: ['manual', 'trapezoid-top', 'inv-trapezoid'],\n internalAliases: ['inv_trapezoid'],\n handler: inv_trapezoid,\n },\n {\n semanticName: 'Stop',\n name: 'Double Circle',\n shortName: 'dbl-circ',\n description: 'Represents a stop point',\n aliases: ['double-circle'],\n internalAliases: ['doublecircle'],\n handler: doublecircle,\n },\n {\n semanticName: 'Text Block',\n name: 'Text Block',\n shortName: 'text',\n description: 'Text block',\n handler: text,\n },\n {\n semanticName: 'Card',\n name: 'Notched Rectangle',\n shortName: 'notch-rect',\n description: 'Represents a card',\n aliases: ['card', 'notched-rectangle'],\n handler: card,\n },\n {\n semanticName: 'Lined/Shaded Process',\n name: 'Lined Rectangle',\n shortName: 'lin-rect',\n description: 'Lined process shape',\n aliases: ['lined-rectangle', 'lined-process', 'lin-proc', 'shaded-process'],\n handler: shadedProcess,\n },\n {\n semanticName: 'Start',\n name: 'Small Circle',\n shortName: 'sm-circ',\n description: 'Small starting point',\n aliases: ['start', 'small-circle'],\n internalAliases: ['stateStart'],\n handler: stateStart,\n },\n {\n semanticName: 'Stop',\n name: 'Framed Circle',\n shortName: 'fr-circ',\n description: 'Stop point',\n aliases: ['stop', 'framed-circle'],\n internalAliases: ['stateEnd'],\n handler: stateEnd,\n },\n {\n semanticName: 'Fork/Join',\n name: 'Filled Rectangle',\n shortName: 'fork',\n description: 'Fork or join in process flow',\n aliases: ['join'],\n internalAliases: ['forkJoin'],\n handler: forkJoin,\n },\n {\n semanticName: 'Collate',\n name: 'Hourglass',\n shortName: 'hourglass',\n description: 'Represents a collate operation',\n aliases: ['hourglass', 'collate'],\n handler: hourglass,\n },\n {\n semanticName: 'Comment',\n name: 'Curly Brace',\n shortName: 'brace',\n description: 'Adds a comment',\n aliases: ['comment', 'brace-l'],\n handler: curlyBraceLeft,\n },\n {\n semanticName: 'Comment Right',\n name: 'Curly Brace',\n shortName: 'brace-r',\n description: 'Adds a comment',\n handler: curlyBraceRight,\n },\n {\n semanticName: 'Comment with braces on both sides',\n name: 'Curly Braces',\n shortName: 'braces',\n description: 'Adds a comment',\n handler: curlyBraces,\n },\n {\n semanticName: 'Com Link',\n name: 'Lightning Bolt',\n shortName: 'bolt',\n description: 'Communication link',\n aliases: ['com-link', 'lightning-bolt'],\n handler: lightningBolt,\n },\n {\n semanticName: 'Document',\n name: 'Document',\n shortName: 'doc',\n description: 'Represents a document',\n aliases: ['doc', 'document'],\n handler: waveEdgedRectangle,\n },\n {\n semanticName: 'Delay',\n name: 'Half-Rounded Rectangle',\n shortName: 'delay',\n description: 'Represents a delay',\n aliases: ['half-rounded-rectangle'],\n handler: halfRoundedRectangle,\n },\n {\n semanticName: 'Direct Access Storage',\n name: 'Horizontal Cylinder',\n shortName: 'h-cyl',\n description: 'Direct access storage',\n aliases: ['das', 'horizontal-cylinder'],\n handler: tiltedCylinder,\n },\n {\n semanticName: 'Disk Storage',\n name: 'Lined Cylinder',\n shortName: 'lin-cyl',\n description: 'Disk storage',\n aliases: ['disk', 'lined-cylinder'],\n handler: linedCylinder,\n },\n {\n semanticName: 'Display',\n name: 'Curved Trapezoid',\n shortName: 'curv-trap',\n description: 'Represents a display',\n aliases: ['curved-trapezoid', 'display'],\n handler: curvedTrapezoid,\n },\n {\n semanticName: 'Divided Process',\n name: 'Divided Rectangle',\n shortName: 'div-rect',\n description: 'Divided process shape',\n aliases: ['div-proc', 'divided-rectangle', 'divided-process'],\n handler: dividedRectangle,\n },\n {\n semanticName: 'Extract',\n name: 'Triangle',\n shortName: 'tri',\n description: 'Extraction process',\n aliases: ['extract', 'triangle'],\n handler: triangle,\n },\n {\n semanticName: 'Internal Storage',\n name: 'Window Pane',\n shortName: 'win-pane',\n description: 'Internal storage',\n aliases: ['internal-storage', 'window-pane'],\n handler: windowPane,\n },\n {\n semanticName: 'Junction',\n name: 'Filled Circle',\n shortName: 'f-circ',\n description: 'Junction point',\n aliases: ['junction', 'filled-circle'],\n handler: filledCircle,\n },\n {\n semanticName: 'Loop Limit',\n name: 'Trapezoidal Pentagon',\n shortName: 'notch-pent',\n description: 'Loop limit step',\n aliases: ['loop-limit', 'notched-pentagon'],\n handler: trapezoidalPentagon,\n },\n {\n semanticName: 'Manual File',\n name: 'Flipped Triangle',\n shortName: 'flip-tri',\n description: 'Manual file operation',\n aliases: ['manual-file', 'flipped-triangle'],\n handler: flippedTriangle,\n },\n {\n semanticName: 'Manual Input',\n name: 'Sloped Rectangle',\n shortName: 'sl-rect',\n description: 'Manual input step',\n aliases: ['manual-input', 'sloped-rectangle'],\n handler: slopedRect,\n },\n {\n semanticName: 'Multi-Document',\n name: 'Stacked Document',\n shortName: 'docs',\n description: 'Multiple documents',\n aliases: ['documents', 'st-doc', 'stacked-document'],\n handler: multiWaveEdgedRectangle,\n },\n {\n semanticName: 'Multi-Process',\n name: 'Stacked Rectangle',\n shortName: 'st-rect',\n description: 'Multiple processes',\n aliases: ['procs', 'processes', 'stacked-rectangle'],\n handler: multiRect,\n },\n {\n semanticName: 'Stored Data',\n name: 'Bow Tie Rectangle',\n shortName: 'bow-rect',\n description: 'Stored data',\n aliases: ['stored-data', 'bow-tie-rectangle'],\n handler: bowTieRect,\n },\n {\n semanticName: 'Summary',\n name: 'Crossed Circle',\n shortName: 'cross-circ',\n description: 'Summary',\n aliases: ['summary', 'crossed-circle'],\n handler: crossedCircle,\n },\n {\n semanticName: 'Tagged Document',\n name: 'Tagged Document',\n shortName: 'tag-doc',\n description: 'Tagged document',\n aliases: ['tag-doc', 'tagged-document'],\n handler: taggedWaveEdgedRectangle,\n },\n {\n semanticName: 'Tagged Process',\n name: 'Tagged Rectangle',\n shortName: 'tag-rect',\n description: 'Tagged process',\n aliases: ['tagged-rectangle', 'tag-proc', 'tagged-process'],\n handler: taggedRect,\n },\n {\n semanticName: 'Paper Tape',\n name: 'Flag',\n shortName: 'flag',\n description: 'Paper tape',\n aliases: ['paper-tape'],\n handler: waveRectangle,\n },\n {\n semanticName: 'Odd',\n name: 'Odd',\n shortName: 'odd',\n description: 'Odd shape',\n internalAliases: ['rect_left_inv_arrow'],\n handler: rect_left_inv_arrow,\n },\n {\n semanticName: 'Lined Document',\n name: 'Lined Document',\n shortName: 'lin-doc',\n description: 'Lined document',\n aliases: ['lined-document'],\n handler: linedWaveEdgedRect,\n },\n] as const satisfies ShapeDefinition[];\n\nconst generateShapeMap = () => {\n // These are the shapes that didn't have documentation present\n const undocumentedShapes = {\n // States\n state,\n choice,\n note,\n\n // Rectangles\n rectWithTitle,\n labelRect,\n\n // Icons\n iconSquare,\n iconCircle,\n icon,\n iconRounded,\n imageSquare,\n anchor,\n\n // Kanban diagram\n kanbanItem,\n\n // class diagram\n classBox,\n } as const;\n\n const entries = [\n ...(Object.entries(undocumentedShapes) as Entries),\n ...shapesDefs.flatMap((shape) => {\n const aliases = [\n shape.shortName,\n ...('aliases' in shape ? shape.aliases : []),\n ...('internalAliases' in shape ? shape.internalAliases : []),\n ];\n return aliases.map((alias) => [alias, shape.handler] as const);\n }),\n ];\n return Object.fromEntries(entries) as Record<\n (typeof entries)[number][0],\n (typeof entries)[number][1]\n > satisfies Record;\n};\n\nexport const shapes = generateShapeMap();\n\nexport function isValidShape(shape: string): shape is ShapeID {\n return shape in shapes;\n}\n\nexport type ShapeID = keyof typeof shapes;\n", "import { log } from '../../logger.js';\nimport { shapes } from './shapes.js';\nimport type { Node, NonClusterNode, ShapeRenderOptions } from '../types.js';\nimport type { SVGGroup } from '../../mermaid.js';\nimport type { D3Selection } from '../../types.js';\nimport type { graphlib } from 'dagre-d3-es';\n\ntype ShapeHandler = (typeof shapes)[keyof typeof shapes];\ntype NodeElement = D3Selection | Awaited>;\n\nconst nodeElems = new Map();\n\nexport async function insertNode(\n elem: SVGGroup,\n node: NonClusterNode,\n renderOptions: ShapeRenderOptions\n) {\n let newEl: NodeElement | undefined;\n let el;\n\n //special check for rect shape (with or without rounded corners)\n if (node.shape === 'rect') {\n if (node.rx && node.ry) {\n node.shape = 'roundedRect';\n } else {\n node.shape = 'squareRect';\n }\n }\n\n const shapeHandler = node.shape ? shapes[node.shape] : undefined;\n\n if (!shapeHandler) {\n throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);\n }\n\n if (node.link) {\n // Add link when appropriate\n let target;\n if (renderOptions.config.securityLevel === 'sandbox') {\n target = '_top';\n } else if (node.linkTarget) {\n target = node.linkTarget || '_blank';\n }\n newEl = elem\n .insert('svg:a')\n .attr('xlink:href', node.link)\n .attr('target', target ?? null);\n el = await shapeHandler(newEl, node, renderOptions);\n } else {\n el = await shapeHandler(elem, node, renderOptions);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n\n nodeElems.set(node.id, newEl);\n\n if (node.haveCallback) {\n newEl.attr('class', newEl.attr('class') + ' clickable');\n }\n return newEl;\n}\n\nexport const setNodeElem = (elem: NodeElement, node: Pick) => {\n nodeElems.set(node.id, elem);\n};\n\nexport const clear = () => {\n nodeElems.clear();\n};\n\nexport const positionNode = (node: ReturnType) => {\n const el = nodeElems.get(node.id)!;\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n"], "mappings": "+VASO,IAAMA,EAAcC,EAAA,MACzBC,EACAC,EACAC,IACG,CACH,IAAIC,EACEC,EAAgBH,EAAK,eAAiBI,EAASC,EAAU,GAAG,UAAU,EACvEJ,EAGHC,EAAaD,EAFbC,EAAa,eAMf,IAAMI,EAAWP,EACd,OAAO,GAAG,EACV,KAAK,QAASG,CAAU,EACxB,KAAK,KAAMF,EAAK,OAASA,EAAK,EAAE,EAG7BO,EAAUD,EACb,OAAO,GAAG,EACV,KAAK,QAAS,OAAO,EACrB,KAAK,QAASE,EAAoBR,EAAK,UAAU,CAAC,EAGjDS,EACAT,EAAK,QAAU,OACjBS,EAAQ,GAERA,EAAQ,OAAOT,EAAK,OAAU,SAAWA,EAAK,MAAQA,EAAK,MAAM,CAAC,EAGpE,IAAMU,EAAO,MAAMC,GAAWJ,EAASK,GAAaC,GAAeJ,CAAK,EAAGJ,EAAU,CAAC,EAAG,CACvF,cAAAF,EACA,MAAOH,EAAK,OAASK,EAAU,EAAE,WAAW,cAE5C,WAAY,sBACZ,MAAOL,EAAK,WACZ,iBAAkB,CAAC,CAACA,EAAK,MAAQ,CAAC,CAACA,EAAK,GAC1C,CAAC,EAEGc,EAAOJ,EAAK,QAAQ,EAClBK,GAAef,GAAM,SAAW,GAAK,EAE3C,GAAIG,EAAe,CACjB,IAAMa,EAAMN,EAAK,SAAS,CAAC,EACrBO,EAAKC,EAAOR,CAAI,EAGhBS,EAASH,EAAI,qBAAqB,KAAK,EAC7C,GAAIG,EAAQ,CACV,IAAMC,EAAYX,EAAM,QAAQ,cAAe,EAAE,EAAE,KAAK,IAAM,GAE9D,MAAM,QAAQ,IACZ,CAAC,GAAGU,CAAM,EAAE,IACTE,GACC,IAAI,QAASC,GAAQ,CAInB,SAASC,GAAa,CAIpB,GAHAF,EAAI,MAAM,QAAU,OACpBA,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A,CACE,aAAc,UACd,KAAM,YACN,UAAW,YACX,YAAa,iCACb,QAAS,CAAC,YAAa,SAAS,EAChC,QAASC,EACX,EACA,CACE,aAAc,UACd,KAAM,cACN,UAAW,QACX,YAAa,iBACb,QAAS,CAAC,UAAW,SAAS,EAC9B,QAASC,EACX,EACA,CACE,aAAc,gBACd,KAAM,cACN,UAAW,UACX,YAAa,iBACb,QAASC,EACX,EACA,CACE,aAAc,oCACd,KAAM,eACN,UAAW,SACX,YAAa,iBACb,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,iBACN,UAAW,OACX,YAAa,qBACb,QAAS,CAAC,WAAY,gBAAgB,EACtC,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,WACN,UAAW,MACX,YAAa,wBACb,QAAS,CAAC,MAAO,UAAU,EAC3B,QAASC,EACX,EACA,CACE,aAAc,QACd,KAAM,yBACN,UAAW,QACX,YAAa,qBACb,QAAS,CAAC,wBAAwB,EAClC,QAASC,EACX,EACA,CACE,aAAc,wBACd,KAAM,sBACN,UAAW,QACX,YAAa,wBACb,QAAS,CAAC,MAAO,qBAAqB,EACtC,QAASC,EACX,EACA,CACE,aAAc,eACd,KAAM,iBACN,UAAW,UACX,YAAa,eACb,QAAS,CAAC,OAAQ,gBAAgB,EAClC,QAASC,EACX,EACA,CACE,aAAc,UACd,KAAM,mBACN,UAAW,YACX,YAAa,uBACb,QAAS,CAAC,mBAAoB,SAAS,EACvC,QAASC,EACX,EACA,CACE,aAAc,kBACd,KAAM,oBACN,UAAW,WACX,YAAa,wBACb,QAAS,CAAC,WAAY,oBAAqB,iBAAiB,EAC5D,QAASC,EACX,EACA,CACE,aAAc,UACd,KAAM,WACN,UAAW,MACX,YAAa,qBACb,QAAS,CAAC,UAAW,UAAU,EAC/B,QAASC,EACX,EACA,CACE,aAAc,mBACd,KAAM,cACN,UAAW,WACX,YAAa,mBACb,QAAS,CAAC,mBAAoB,aAAa,EAC3C,QAASC,EACX,EACA,CACE,aAAc,WACd,KAAM,gBACN,UAAW,SACX,YAAa,iBACb,QAAS,CAAC,WAAY,eAAe,EACrC,QAASC,EACX,EACA,CACE,aAAc,aACd,KAAM,uBACN,UAAW,aACX,YAAa,kBACb,QAAS,CAAC,aAAc,kBAAkB,EAC1C,QAASC,EACX,EACA,CACE,aAAc,cACd,KAAM,mBACN,UAAW,WACX,YAAa,wBACb,QAAS,CAAC,cAAe,kBAAkB,EAC3C,QAASC,EACX,EACA,CACE,aAAc,eACd,KAAM,mBACN,UAAW,UACX,YAAa,oBACb,QAAS,CAAC,eAAgB,kBAAkB,EAC5C,QAASC,EACX,EACA,CACE,aAAc,iBACd,KAAM,mBACN,UAAW,OACX,YAAa,qBACb,QAAS,CAAC,YAAa,SAAU,kBAAkB,EACnD,QAASC,EACX,EACA,CACE,aAAc,gBACd,KAAM,oBACN,UAAW,UACX,YAAa,qBACb,QAAS,CAAC,QAAS,YAAa,mBAAmB,EACnD,QAASC,EACX,EACA,CACE,aAAc,cACd,KAAM,oBACN,UAAW,WACX,YAAa,cACb,QAAS,CAAC,cAAe,mBAAmB,EAC5C,QAASC,EACX,EACA,CACE,aAAc,UACd,KAAM,iBACN,UAAW,aACX,YAAa,UACb,QAAS,CAAC,UAAW,gBAAgB,EACrC,QAASC,EACX,EACA,CACE,aAAc,kBACd,KAAM,kBACN,UAAW,UACX,YAAa,kBACb,QAAS,CAAC,UAAW,iBAAiB,EACtC,QAASC,EACX,EACA,CACE,aAAc,iBACd,KAAM,mBACN,UAAW,WACX,YAAa,iBACb,QAAS,CAAC,mBAAoB,WAAY,gBAAgB,EAC1D,QAASC,EACX,EACA,CACE,aAAc,aACd,KAAM,OACN,UAAW,OACX,YAAa,aACb,QAAS,CAAC,YAAY,EACtB,QAASC,EACX,EACA,CACE,aAAc,MACd,KAAM,MACN,UAAW,MACX,YAAa,YACb,gBAAiB,CAAC,qBAAqB,EACvC,QAASC,EACX,EACA,CACE,aAAc,iBACd,KAAM,iBACN,UAAW,UACX,YAAa,iBACb,Q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AK,MAAMC,EAAaL,EAAMC,EAAMC,CAAa,EACjDC,EAAQC,EAEV,OAAIH,EAAK,SACPG,EAAG,KAAK,QAASH,EAAK,OAAO,EAG/BH,GAAU,IAAIG,EAAK,GAAIE,CAAK,EAExBF,EAAK,cACPE,EAAM,KAAK,QAASA,EAAM,KAAK,OAAO,EAAI,YAAY,EAEjDA,CACT,CAlDsBK,EAAAT,GAAA,cAoDf,IAAMU,GAAcD,EAAA,CAACR,EAAmBC,IAA2B,CACxEH,GAAU,IAAIG,EAAK,GAAID,CAAI,CAC7B,EAF2B,eAIdU,GAAQF,EAAA,IAAM,CACzBV,GAAU,MAAM,CAClB,EAFqB,SAIRa,GAAeH,EAACP,GAA6C,CACxE,IAAMG,EAAKN,GAAU,IAAIG,EAAK,EAAE,EAChCW,EAAI,MACF,oBACAX,EAAK,KACLA,EACA,cAAgBA,EAAK,EAAIA,EAAK,MAAQ,EAAI,GAAK,KAAOA,EAAK,MAAQ,EAAI,GACzE,EACA,IAAMY,EAAU,EACVC,EAAOb,EAAK,MAAQ,EAC1B,OAAIA,EAAK,YACPG,EAAG,KACD,YACA,cACGH,EAAK,EAAIa,EAAOb,EAAK,MAAQ,GAC9B,MACCA,EAAK,EAAIA,EAAK,OAAS,EAAIY,GAC5B,GACJ,EAEAT,EAAG,KAAK,YAAa,aAAeH,EAAK,EAAI,KAAOA,EAAK,EAAI,GAAG,EAE3Da,CACT,EAvB4B", "names": ["labelHelper", "__name", "parent", "node", "_classes", "cssClasses", "useHtmlLabels", "evaluate", "getConfig", "shapeSvg", "labelEl", "handleUndefinedAttr", "label", "text", "createText", "sanitizeText", "decodeEntities", "bbox", "halfPadding", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "enlargingFactor", "parsedBodyFontSize", "defaultConfig_default", "parseFontSize", "width", "insertLabel", "options", "updateNodeBounds", "element", "getNodeClasses", "__name", "node", "extra", "createPathFromPoints", "points", "pointStrings", "p", "i", "generateFullSineWavePoints", "x1", "y1", "x2", "y2", "amplitude", "numCycles", "deltaX", "deltaY", "cycleLength", "frequency", "midY", "t", "x", "y", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "startAngleRad", "angleStep", "angle", "t", "e", "s", "n", "o", "h", "r", "__name", "a", "i", "c", "l", "u", "p", "f", "d", "g", "M", "k", "b", "y", "m", "x", "w", "P", "v", "S", "O", "L", "T", "D", "A", "G", "E", "$", "j", "z", "F", "q", "V", "_", "Z", "I", "C", "W", "R", "Q", "H", "N", "B", "J", "K", "U", "X", "Y", "tt", "et", "st", "nt", "ot", "at", "intersectRect", "__name", "node", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "intersect_rect_default", "applyStyle", "dom", "styleFn", "__name", "addHtmlLabel", "node", "fo", "select_default", "div", "label", "hasKatex", "renderKatex", "common_default", "getConfig", "labelClass", "createLabel", "_vertexText", "style", "isTitle", "isNode", "vertexText", "evaluate", "log", "decodeEntities", "s", "svgLabel", "rows", "row", "tspan", "createLabel_default", "createRoundedRectPathD", "__name", "x", "y", "totalWidth", "totalHeight", "radius", "solidStateFill", "__name", "color", "handDrawnSeed", "getConfig", "compileStyles", "node", "stylesMap", "styles2Map", "styles", "styleMap", "style", "key", "value", "styles2String", "stylesArray", "labelStyles", "nodeStyles", "borderStyles", "backgroundStyles", "userNodeOverrides", "options", "themeVariables", "nodeBorder", "mainBkg", "rect", "__name", "parent", "node", "log", "siteConfig", "getConfig", "themeVariables", "handDrawnSeed", "clusterBkg", "clusterBorder", "labelStyles", "nodeStyles", "borderStyles", "backgroundStyles", "styles2String", "shapeSvg", "useHtmlLabels", "evaluate", "labelEl", "text", "createText", "bbox", "div", "dv", "select_default", "width", "height", "x", "y", "rc", "at", "options", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "subGraphTitleTopMargin", "getSubGraphTitleMargins", "span", "rectBox", "point", "intersect_rect_default", "noteGroup", "padding", "halfPadding", "roundedWithTitle", "altBackground", "compositeBackground", "compositeTitleBackground", "nodeBorder", "outerRectG", "label", "innerRect", "createLabel_default", "innerHeight", "innerY", "isAlt", "roughOuterNode", "roughInnerNode", "kanbanSection", "divider", "squareRect", "shapes", "clusterElems", "insertCluster", "elem", "shape", "cluster", "clear", "__name", "clusterElems", "intersectNode", "node", "point", "__name", "intersect_node_default", "intersectEllipse", "node", "rx", "ry", "point", "cx", "cy", "px", "py", "det", "dx", "dy", "__name", "intersect_ellipse_default", "intersectCircle", "node", "rx", "point", "intersect_ellipse_default", "__name", "intersect_circle_default", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "offset", "num", "x", "y", "sameSign", "__name", "intersect_line_default", "intersectPolygon", "node", "polyPoints", "point", "x1", "y1", "intersections", "minX", "minY", "entry", "left", "top", "i", "p1", "p2", "intersect", "intersect_line_default", "p", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "__name", "intersect_polygon_default", "intersect_default", "intersect_node_default", "intersect_circle_default", "intersect_ellipse_default", "intersect_polygon_default", "intersect_rect_default", "anchor", "parent", "node", "labelStyles", "styles2String", "classes", "getNodeClasses", "cssClasses", "shapeSvg", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "roughNode", "circleElem", "handleUndefinedAttr", "updateNodeBounds", "point", "log", "intersect_default", "__name", "generateArcPoints", "x1", "y1", "x2", "y2", "rx", "ry", "clockwise", "midX", "midY", "angle", "dx", "dy", "transformedX", "transformedY", "distance", "scaledCenterDistance", "centerX", "centerY", "startAngle", "angleRange", "points", "i", "t", "x", "y", "__name", "bowTieRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "rc", "at", "options", "userNodeOverrides", "bowTieRectPath", "createPathFromPoints", "bowTieRectShapePath", "bowTieRectShape", "updateNodeBounds", "point", "intersect_default", "insertPolygonShape", "parent", "w", "h", "points", "d", "__name", "card", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "h", "padding", "w", "left", "right", "top", "bottom", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "__name", "choice", "parent", "node", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "cssStyles", "s", "points", "rc", "at", "options", "userNodeOverrides", "choicePath", "createPathFromPoints", "roughNode", "choiceShape", "point", "intersect_default", "__name", "circle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "halfPadding", "labelHelper", "getNodeClasses", "radius", "circleElem", "cssStyles", "rc", "at", "options", "userNodeOverrides", "roughNode", "handleUndefinedAttr", "updateNodeBounds", "point", "log", "intersect_default", "__name", "createLine", "r", "xAxis45", "yAxis45", "lineLength", "pointQ1", "pointQ2", "pointQ3", "pointQ4", "__name", "crossedCircle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "circleNode", "linePath", "lineNode", "updateNodeBounds", "point", "log", "intersect_default", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "points", "startAngleRad", "angleStep", "i", "angle", "x", "y", "__name", "curlyBraceLeft", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "cssStyles", "rectPoints", "rc", "at", "options", "userNodeOverrides", "newCurlyBracePath", "createPathFromPoints", "curlyBraceLeftNode", "rectPath", "rectShape", "curlyBraceLeftShape", "updateNodeBounds", "point", "intersect_default", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "points", "startAngleRad", "angleStep", "i", "angle", "x", "y", "__name", "curlyBraceRight", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "cssStyles", "rectPoints", "rc", "at", "options", "userNodeOverrides", "newCurlyBracePath", "createPathFromPoints", "curlyBraceRightNode", "rectPath", "rectShape", "curlyBraceRightShape", "updateNodeBounds", "point", "intersect_default", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "points", "startAngleRad", "angleStep", "i", "angle", "x", "y", "__name", "curlyBraces", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "cssStyles", "leftCurlyBracePoints", "rightCurlyBracePoints", "rectPoints", "rc", "at", "options", "userNodeOverrides", "newLeftCurlyBracePath", "createPathFromPoints", "leftCurlyBraceNode", "newRightCurlyBracePath", "rightCurlyBraceNode", "rectPath", "rectShape", "curlyBracesShape", "updateNodeBounds", "point", "intersect_default", "curvedTrapezoid", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "minWidth", "minHeight", "w", "h", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "totalWidth", "totalHeight", "rw", "tw", "points", "generateCirclePoints", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "intersect_default", "__name", "createCylinderPathD", "__name", "x", "y", "width", "height", "rx", "ry", "createOuterCylinderPathD", "createInnerCylinderPathD", "cylinder", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "rc", "at", "outerPathData", "innerPathData", "outerNode", "userNodeOverrides", "innerLine", "pathData", "handleUndefinedAttr", "updateNodeBounds", "point", "pos", "intersect_default", "dividedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "rectOffset", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pts", "poly", "p", "polygon", "updateNodeBounds", "point", "intersect_default", "__name", "doublecircle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "halfPadding", "labelHelper", "getNodeClasses", "outerRadius", "innerRadius", "circleGroup", "cssStyles", "rc", "at", "outerOptions", "userNodeOverrides", "innerOptions", "outerRoughNode", "innerRoughNode", "handleUndefinedAttr", "outerCircle", "innerCircle", "updateNodeBounds", "point", "log", "intersect_default", "__name", "filledCircle", "parent", "node", "themeVariables", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "radius", "cssStyles", "rc", "at", "nodeBorder", "options", "userNodeOverrides", "circleNode", "updateNodeBounds", "point", "log", "intersect_default", "__name", "flippedTriangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "tw", "points", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "updateNodeBounds", "point", "log", "intersect_default", "__name", "forkJoin", "parent", "node", "dir", "state", "themeVariables", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "cssStyles", "width", "height", "x", "y", "rc", "at", "options", "userNodeOverrides", "roughNode", "shape", "updateNodeBounds", "padding", "point", "intersect_default", "__name", "halfRoundedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "minWidth", "minHeight", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "radius", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateCirclePoints", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "log", "intersect_default", "__name", "createHexagonPathD", "__name", "x", "y", "width", "height", "m", "hexagon", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "f", "h", "w", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "hourglass", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "labelHelper", "getNodeClasses", "w", "h", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "log", "intersect_default", "__name", "icon", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "label", "labelHelper", "topLabel", "height", "width", "nodeBorder", "stylesMap", "compileStyles", "x", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "iconNode", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "__name", "iconCircle", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "label", "labelHelper", "padding", "labelPadding", "topLabel", "nodeBorder", "mainBkg", "stylesMap", "compileStyles", "rc", "at", "options", "userNodeOverrides", "fill", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "diameter", "iconNode", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "updateNodeBounds", "point", "log", "intersect_default", "__name", "iconRounded", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "halfPadding", "label", "labelHelper", "topLabel", "height", "width", "nodeBorder", "mainBkg", "stylesMap", "compileStyles", "x", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "fill", "iconNode", "createRoundedRectPathD", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "__name", "iconSquare", "parent", "node", "themeVariables", "flowchart", "labelStyles", "styles2String", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "shapeSvg", "bbox", "halfPadding", "label", "labelHelper", "topLabel", "height", "width", "nodeBorder", "mainBkg", "stylesMap", "compileStyles", "x", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "fill", "iconNode", "createRoundedRectPathD", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "__name", "imageSquare", "parent", "node", "flowchart", "img", "imageNaturalWidth", "imageNaturalHeight", "labelStyles", "styles2String", "defaultWidth", "imageRawWidth", "imageWidth", "imageHeight", "shapeSvg", "bbox", "label", "labelHelper", "topLabel", "x", "y", "labelPadding", "rc", "at", "options", "userNodeOverrides", "imageNode", "outerWidth", "outerHeight", "outerNode", "iconShape", "outerShape", "image", "updateNodeBounds", "point", "log", "intersect_default", "dx", "dy", "nodeHeight", "points", "__name", "inv_trapezoid", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "__name", "drawRect", "parent", "node", "options", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "totalWidth", "totalHeight", "x", "y", "rect", "rx", "ry", "cssStyles", "rc", "at", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "handleUndefinedAttr", "updateNodeBounds", "point", "intersect_default", "__name", "labelRect", "parent", "node", "shapeSvg", "bbox", "label", "labelHelper", "rect", "updateNodeBounds", "point", "intersect_default", "__name", "lean_left", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "__name", "lean_right", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "__name", "lightningBolt", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "getNodeClasses", "cssStyles", "width", "height", "gap", "points", "rc", "at", "options", "userNodeOverrides", "linePath", "createPathFromPoints", "lineNode", "updateNodeBounds", "point", "log", "intersect_default", "__name", "createCylinderPathD", "__name", "x", "y", "width", "height", "rx", "ry", "outerOffset", "createOuterCylinderPathD", "createInnerCylinderPathD", "linedCylinder", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "h", "cylinder", "cssStyles", "rc", "at", "outerPathData", "innerPathData", "options", "userNodeOverrides", "outerNode", "innerLine", "pathData", "handleUndefinedAttr", "updateNodeBounds", "point", "pos", "intersect_default", "linedWaveEdgedRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "waveAmplitude", "finalH", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "poly", "p", "waveEdgeRect", "updateNodeBounds", "point", "intersect_default", "__name", "multiRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "rectOffset", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "outerPathPoints", "innerPathPoints", "outerPath", "createPathFromPoints", "outerNode", "innerPath", "innerNode", "updateNodeBounds", "point", "intersect_default", "__name", "multiWaveEdgedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "waveAmplitude", "finalH", "x", "y", "rectOffset", "cssStyles", "wavePoints", "generateFullSineWavePoints", "lastWavePoint", "outerPathPoints", "innerPathPoints", "rc", "at", "options", "userNodeOverrides", "outerPath", "createPathFromPoints", "outerNode", "innerPath", "innerNode", "shape", "updateNodeBounds", "point", "intersect_default", "__name", "note", "parent", "node", "themeVariables", "labelStyles", "nodeStyles", "styles2String", "getConfig", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "totalWidth", "totalHeight", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "noteShapeNode", "rect", "updateNodeBounds", "point", "intersect_default", "__name", "createDecisionBoxPathD", "__name", "x", "y", "size", "question", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "s", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "log", "intersect_default", "rect_left_inv_arrow", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "x", "y", "notch", "points", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "polygon", "updateNodeBounds", "point", "intersect_default", "__name", "rectWithTitle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "classes", "shapeSvg", "g", "label", "description", "title", "text", "createLabel_default", "bbox", "evaluate", "getConfig", "div", "dv", "select_default", "log", "textRows", "titleBox", "descr", "halfPadding", "totalWidth", "totalHeight", "x", "y", "rect", "innerLine", "rc", "at", "options", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "roughLine", "updateNodeBounds", "point", "intersect_default", "__name", "roundedRect", "parent", "node", "options", "drawRect", "__name", "shadedProcess", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "halfPadding", "w", "h", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "roughNode", "p", "rect", "handleUndefinedAttr", "updateNodeBounds", "point", "intersect_default", "__name", "slopedRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "intersect_default", "__name", "squareRect", "parent", "node", "options", "drawRect", "__name", "stadium", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "h", "w", "rect", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createRoundedRectPathD", "roughNode", "handleUndefinedAttr", "updateNodeBounds", "point", "intersect_default", "__name", "state", "parent", "node", "drawRect", "__name", "stateEnd", "parent", "node", "themeVariables", "labelStyles", "nodeStyles", "styles2String", "cssStyles", "lineColor", "stateBorder", "nodeBorder", "shapeSvg", "rc", "at", "options", "userNodeOverrides", "roughNode", "innerFill", "roughInnerNode", "circle", "updateNodeBounds", "point", "intersect_default", "__name", "stateStart", "parent", "node", "themeVariables", "lineColor", "shapeSvg", "circle", "roughNode", "at", "solidStateFill", "updateNodeBounds", "point", "intersect_default", "__name", "subroutine", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "halfPadding", "w", "x", "y", "points", "rc", "at", "options", "userNodeOverrides", "roughNode", "l1", "l2", "rect", "cssStyles", "handleUndefinedAttr", "updateNodeBounds", "el", "insertPolygonShape", "point", "intersect_default", "__name", "taggedRect", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "x", "y", "tagWidth", "tagHeight", "cssStyles", "rc", "at", "options", "userNodeOverrides", "rectPoints", "tagPoints", "rectPath", "createPathFromPoints", "rectNode", "tagPath", "tagNode", "updateNodeBounds", "point", "intersect_default", "__name", "taggedWaveEdgedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "waveAmplitude", "tagWidth", "tagHeight", "finalH", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "x", "y", "tagPoints", "waveEdgeRectPath", "createPathFromPoints", "waveEdgeRectNode", "taggedWaveEdgeRectPath", "taggedWaveEdgeRectNode", "waveEdgeRect", "updateNodeBounds", "point", "intersect_default", "__name", "text", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "totalWidth", "totalHeight", "x", "y", "rect", "updateNodeBounds", "point", "intersect_default", "__name", "createCylinderPathD", "__name", "x", "y", "width", "height", "rx", "ry", "createOuterCylinderPathD", "createInnerCylinderPathD", "tiltedCylinder", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "halfPadding", "labelHelper", "getNodeClasses", "labelPadding", "h", "w", "cssStyles", "cylinder", "rc", "at", "outerPathData", "innerPathData", "outerNode", "userNodeOverrides", "innerLine", "pathData", "handleUndefinedAttr", "updateNodeBounds", "point", "pos", "intersect_default", "trapezoid", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "__name", "trapezoidalPentagon", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "minWidth", "minHeight", "w", "h", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "pathData", "createPathFromPoints", "shapeNode", "polygon", "updateNodeBounds", "point", "intersect_default", "__name", "triangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "useHtmlLabels", "evaluate", "getConfig", "w", "h", "tw", "points", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createPathFromPoints", "roughNode", "polygon", "updateNodeBounds", "point", "log", "intersect_default", "__name", "waveEdgedRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "waveAmplitude", "finalH", "cssStyles", "widthDif", "extraW", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "waveEdgeRectPath", "createPathFromPoints", "waveEdgeRectNode", "waveEdgeRect", "updateNodeBounds", "point", "intersect_default", "__name", "waveRectangle", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "minWidth", "minHeight", "baseWidth", "baseHeight", "aspectRatio", "w", "h", "waveAmplitude", "finalH", "cssStyles", "rc", "at", "options", "userNodeOverrides", "points", "generateFullSineWavePoints", "waveRectPath", "createPathFromPoints", "waveRectNode", "waveRect", "updateNodeBounds", "point", "intersect_default", "__name", "windowPane", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "label", "labelHelper", "getNodeClasses", "w", "rectOffset", "x", "y", "cssStyles", "rc", "at", "options", "userNodeOverrides", "outerPathPoints", "path", "no", "updateNodeBounds", "point", "intersect_default", "__name", "textHelper", "parent", "node", "config", "useHtmlLabels", "GAP", "TEXT_PADDING", "shapeSvg", "getNodeClasses", "annotationGroup", "labelGroup", "membersGroup", "methodsGroup", "annotationGroupHeight", "labelGroupHeight", "membersGroupHeight", "annotation", "addText", "labelGroupBBox", "yOffset", "member", "height", "methodsYOffset", "method", "bbox", "annotationGroupBBox", "__name", "parentGroup", "styles", "textEl", "getConfig", "evaluate", "textContent", "hasKatex", "text", "createText", "sanitizeText", "decodeEntities", "calculateTextWidth", "numberOfLines", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "width", "textChild", "classBox", "parent", "node", "config", "getConfig", "PADDING", "GAP", "useHtmlLabels", "evaluate", "classNode", "shapeSvg", "bbox", "textHelper", "labelStyles", "nodeStyles", "styles2String", "styles", "renderExtraBox", "rc", "at", "options", "userNodeOverrides", "w", "h", "x", "y", "roughRect", "rect", "rectBBox", "_", "i", "nodes", "text", "select_default", "transform", "translateY", "translate", "newTranslateY", "newTranslateX", "annotationGroupHeight", "labelGroupHeight", "membersGroupHeight", "roughLine", "colorRegex", "match", "colorStyle", "updateNodeBounds", "point", "intersect_default", "__name", "colorFromPriority", "__name", "priority", "kanbanItem", "parent", "kanbanNode", "config", "labelStyles", "nodeStyles", "styles2String", "labelPaddingX", "orgWidth", "shapeSvg", "bbox", "labelElTitle", "labelHelper", "getNodeClasses", "padding", "ticketUrl", "link", "options", "labelEl", "bbox2", "insertLabel", "labelElAssigned", "bboxAssigned", "labelPaddingY", "totalWidth", "heightAdj", "totalHeight", "x", "y", "rect", "rx", "ry", "cssStyles", "rc", "at", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "line", "lineX", "y1", "y2", "updateNodeBounds", "point", "intersect_default", "shapesDefs", "squareRect", "roundedRect", "stadium", "subroutine", "cylinder", "circle", "question", "hexagon", "lean_right", "lean_left", "trapezoid", "inv_trapezoid", "doublecircle", "text", "card", "shadedProcess", "stateStart", "stateEnd", "forkJoin", "hourglass", "curlyBraceLeft", "curlyBraceRight", "curlyBraces", "lightningBolt", "waveEdgedRectangle", "halfRoundedRectangle", "tiltedCylinder", "linedCylinder", "curvedTrapezoid", "dividedRectangle", "triangle", "windowPane", "filledCircle", "trapezoidalPentagon", "flippedTriangle", "slopedRect", "multiWaveEdgedRectangle", "multiRect", "bowTieRect", "crossedCircle", "taggedWaveEdgedRectangle", "taggedRect", "waveRectangle", "rect_left_inv_arrow", "linedWaveEdgedRect", "generateShapeMap", "__name", "entries", "state", "choice", "note", "rectWithTitle", "labelRect", "iconSquare", "iconCircle", "icon", "iconRounded", "imageSquare", "anchor", "kanbanItem", "classBox", "shape", "alias", "shapes", "isValidShape", "nodeElems", "insertNode", "elem", "node", "renderOptions", "newEl", "el", "shapeHandler", "shapes", "target", "__name", "setNodeElem", "clear", "positionNode", "log", "padding", "diff"] }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy