@next-bricks/diagram 0.24.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +3 -3
- package/dist/chunks/{5676.194219e1.js → 5676.d993ecb2.js} +2 -2
- package/dist/chunks/5676.d993ecb2.js.map +1 -0
- package/dist/chunks/{9560.c7502aca.js → 9560.db223429.js} +2 -2
- package/dist/chunks/9560.db223429.js.map +1 -0
- package/dist/chunks/{eo-draw-canvas.212c402d.js → eo-draw-canvas.bfc19b1c.js} +2 -2
- package/dist/chunks/eo-draw-canvas.bfc19b1c.js.map +1 -0
- package/dist/chunks/{main.69fedaaa.js → main.954acef8.js} +2 -2
- package/dist/chunks/{main.69fedaaa.js.map → main.954acef8.js.map} +1 -1
- package/dist/{index.bc7dadbe.js → index.41dc9392.js} +2 -2
- package/dist/{index.bc7dadbe.js.map → index.41dc9392.js.map} +1 -1
- package/dist/manifest.json +36 -36
- package/dist/types.json +67 -67
- package/package.json +2 -2
- package/dist/chunks/5676.194219e1.js.map +0 -1
- package/dist/chunks/9560.c7502aca.js.map +0 -1
- package/dist/chunks/eo-draw-canvas.212c402d.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/9560.db223429.js","mappings":"oNAGO,SAASA,EAASC,EAAeC,GACtC,OAAOD,EAAME,MAAMC,IAASC,EAAAA,EAAAA,IAAWD,IAASA,EAAKF,KAAOA,GAG9D,CCQO,SAASI,EAAaC,GAKc,IALb,KAC5BC,EAAI,MACJP,EAAK,UACLQ,EAAS,iBACTC,GACmBH,EACbI,GAAaC,EAAAA,EAAAA,UACjB,IAAMZ,EAASC,EAAOO,EAAKK,SAC3B,CAACZ,EAAOO,EAAKK,SAETC,GAAaF,EAAAA,EAAAA,UACjB,IAAMZ,EAASC,EAAOO,EAAKO,SAC3B,CAACd,EAAOO,EAAKO,SAETC,GAAWJ,EAAAA,EAAAA,UACf,IAAMF,aAA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,GAE3B,CACA,OAAOK,EAET,IAAK,eACH,OAAO1L,EAAO2L,QAElB,OAAOD,CAAK,GCjEJ,CAACA,EAAO1L,IACd6L,OAAOC,YACLD,OAAOE,QAAyBP,GAAUhE,KAAI5K,IAAA,IAAEsK,EAAKpI,GAAMlC,EAAA,MAAK,CAC9DsK,EACApI,EAAM4M,EAAMxE,GAAiBlH,GAC9B,K,mECbHgM,E,MAA0B,GAA4B,KAE1DA,EAAwBlF,KAAK,CAACmF,EAAO1P,GAAI,kkCAI6V,KAEtY,QAAeyP,EAAwBE,U","sources":["webpack:///./src/draw-canvas/processors/findNode.ts","webpack:///./src/draw-canvas/EdgeComponent.tsx","webpack:///./src/draw-canvas/NodeComponent.tsx","webpack:///./src/draw-canvas/processors/cellToTarget.ts","webpack:///./src/draw-canvas/processors/handleMouseDown.ts","webpack:///./src/draw-canvas/decorators/DecoratorArea.tsx","webpack:///./src/draw-canvas/decorators/DecoratorText.tsx","webpack:///./src/draw-canvas/decorators/index.tsx","webpack:///./src/draw-canvas/CellComponent.tsx","webpack:///./src/draw-canvas/ConnectLineComponent.tsx","webpack:///./src/draw-canvas/processors/asserts.ts","webpack:///./src/draw-canvas/processors/getUnrelatedCells.ts","webpack:///./src/draw-canvas/processors/handleKeyboard.ts","webpack:///./src/draw-canvas/processors/initializeCells.ts","webpack:///./src/draw-canvas/processors/sameTarget.ts","webpack:///./src/draw-canvas/processors/transformToCenter.ts","webpack:///./src/draw-canvas/processors/updateCells.ts","webpack:///./src/draw-canvas/reducers/cells.ts","webpack:///./src/draw-canvas/reducers/index.ts","webpack:///./src/draw-canvas/styles.shadow.css"],"sourcesContent":["import type { Cell, NodeCell, NodeId } from \"../interfaces\";\nimport { isNodeCell } from \"./asserts\";\n\nexport function findNode(cells: Cell[], id: NodeId): NodeCell | undefined {\n return cells.find((cell) => isNodeCell(cell) && cell.id === id) as\n | NodeCell\n | undefined;\n}\n","import React, { useMemo } from \"react\";\nimport { checkIfByTransform } from \"@next-core/runtime\";\nimport classNames from \"classnames\";\nimport type { Cell, EdgeCell, EdgeLineConf, NodeView } from \"./interfaces\";\nimport { getDirectLinePoints } from \"../diagram/lines/getDirectLinePoints\";\nimport type { NodeRect } from \"../diagram/interfaces\";\nimport { findNode } from \"./processors/findNode\";\n\nexport interface EdgeComponentProps {\n edge: EdgeCell;\n cells: Cell[];\n markerEnd: string;\n defaultEdgeLines?: EdgeLineConf[];\n}\n\nexport function EdgeComponent({\n edge,\n cells,\n markerEnd,\n defaultEdgeLines,\n}: EdgeComponentProps): JSX.Element | null {\n const sourceNode = useMemo(\n () => findNode(cells, edge.source),\n [cells, edge.source]\n );\n const targetNode = useMemo(\n () => findNode(cells, edge.target),\n [cells, edge.target]\n );\n const lineConf = useMemo(\n () => defaultEdgeLines?.find((item) => checkIfByTransform(item, { edge })),\n [defaultEdgeLines, edge]\n );\n\n const padding = 5;\n\n const line = useMemo(\n () =>\n sourceNode && targetNode\n ? getDirectLinePoints(\n nodeViewToNodeRect(sourceNode.view, padding),\n nodeViewToNodeRect(targetNode.view, padding)\n )\n : null,\n [sourceNode, targetNode]\n );\n\n if (!line) {\n // This happens when source or target is not found\n return null;\n }\n\n const d = `M${line[0].x} ${line[0].y}L${line[1].x} ${line[1].y}`;\n\n return (\n <>\n <path\n // This `path` is made for expanding interaction area of graph lines.\n d={d}\n fill=\"none\"\n stroke=\"transparent\"\n strokeWidth={16}\n />\n <path\n className={classNames(\"line\", { dashed: lineConf?.dashed })}\n d={d}\n fill=\"none\"\n stroke=\"gray\"\n markerEnd={`url(#${markerEnd})`}\n />\n <path className=\"line-active-bg\" d={d} fill=\"none\" />\n </>\n );\n}\n\nfunction nodeViewToNodeRect(view: NodeView, padding: number): NodeRect {\n return {\n x: view.x + view.width / 2,\n y: view.y + view.height / 2,\n width: view.width + padding,\n height: view.height + padding,\n };\n}\n","import React, { useEffect, useMemo, useState } from \"react\";\nimport { ReactUseBrick } from \"@next-core/react-runtime\";\nimport { checkIfByTransform } from \"@next-core/runtime\";\nimport { isEqual } from \"lodash\";\nimport type { NodeBrickCell, NodeBrickConf, NodeCell } from \"./interfaces\";\n\nexport interface NodeComponentProps {\n node: NodeCell;\n defaultNodeBricks?: NodeBrickConf[];\n}\n\nexport function NodeComponent({\n node,\n defaultNodeBricks,\n}: NodeComponentProps): JSX.Element | null {\n const memoizedData = useDeepMemo({ node: { id: node.id, data: node.data } });\n const specifiedUseBrick = (node as NodeBrickCell).useBrick;\n\n const useBrick = useMemo(() => {\n return (\n specifiedUseBrick ??\n defaultNodeBricks?.find((item) => checkIfByTransform(item, memoizedData))\n ?.useBrick\n );\n }, [defaultNodeBricks, specifiedUseBrick, memoizedData]);\n\n return useBrick ? (\n <foreignObject\n width={node.view.width}\n height={node.view.height}\n className=\"node\"\n >\n {useBrick && <ReactUseBrick useBrick={useBrick} data={memoizedData} />}\n </foreignObject>\n ) : null;\n}\n\nfunction useDeepMemo<T>(value: T): T {\n const [memoizedValue, setMemoizedValue] = useState(value);\n\n useEffect(() => {\n setMemoizedValue((prev) => (isEqual(prev, value) ? prev : value));\n }, [value]);\n\n return memoizedValue;\n}\n","import { pick } from \"lodash\";\nimport type { ActiveTarget, Cell } from \"../interfaces\";\n\nexport function cellToTarget(cell: Cell): ActiveTarget {\n return cell.type === \"edge\"\n ? pick(cell, [\"type\", \"source\", \"target\", \"data\"])\n : pick(cell, [\"type\", \"id\", \"data\"]);\n}\n","import type { PositionTuple } from \"../../diagram/interfaces\";\nimport type { ActiveTarget, Cell } from \"../interfaces\";\nimport type {\n MoveCellPayload,\n ResizeCellPayload,\n} from \"../reducers/interfaces\";\nimport { cellToTarget } from \"./cellToTarget\";\n\nexport function handleMouseDown(\n event: MouseEvent,\n {\n action,\n cell,\n scale,\n onCellMoving,\n onCellMoved,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n }: {\n action: \"move\" | \"resize\";\n cell: Cell;\n scale: number;\n onCellMoving?(info: MoveCellPayload): void;\n onCellMoved?(info: MoveCellPayload): void;\n onCellResizing?(info: ResizeCellPayload): void;\n onCellResized?(info: ResizeCellPayload): void;\n onSwitchActiveTarget(activeTarget: ActiveTarget | null): void;\n }\n) {\n event.stopPropagation();\n // Drag node\n onSwitchActiveTarget(cellToTarget(cell));\n\n if (cell.type === \"edge\") {\n return;\n }\n\n const from: PositionTuple = [event.clientX, event.clientY];\n const original =\n action === \"move\"\n ? [cell.view.x, cell.view.y]\n : [cell.view.width, cell.view.height];\n\n function getMovement(e: MouseEvent): PositionTuple {\n return [(e.clientX - from[0]) / scale, (e.clientY - from[1]) / scale];\n }\n\n let moved = false;\n\n const handleMove = (e: MouseEvent, finished?: boolean) => {\n // Respect the scale\n const movement = getMovement(e);\n if (!moved) {\n moved = movement[0] ** 2 + movement[1] ** 2 >= 9;\n }\n // const [x, y] = getNewPosition(movement);\n // adjustCellPosition(x, y);\n if (moved) {\n if (action === \"move\") {\n (finished ? onCellMoved : onCellMoving)?.({\n type: cell.type,\n id: cell.id,\n x: original[0] + movement[0],\n y: original[1] + movement[1],\n });\n } else {\n (finished ? onCellResized : onCellResizing)?.({\n type: cell.type,\n id: cell.id,\n width: original[0] + movement[0],\n height: original[1] + movement[1],\n });\n }\n }\n };\n\n const onMouseMove = (e: MouseEvent) => {\n handleMove(e);\n };\n const onMouseUp = (e: MouseEvent) => {\n handleMove(e, true);\n moved = false;\n document.removeEventListener(\"mousemove\", onMouseMove);\n document.removeEventListener(\"mouseup\", onMouseUp);\n };\n document.addEventListener(\"mousemove\", onMouseMove);\n document.addEventListener(\"mouseup\", onMouseUp);\n}\n","import React, { useEffect } from \"react\";\nimport type { BasicDecoratorProps } from \"../interfaces\";\nimport { handleMouseDown } from \"../processors/handleMouseDown\";\n\nexport function DecoratorArea({\n cell,\n transform,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n}: BasicDecoratorProps): JSX.Element {\n const resizeHandleRef = React.useRef<SVGGElement>(null);\n\n useEffect(() => {\n const resizeHandle = resizeHandleRef.current;\n const onMouseDown = (event: MouseEvent) => {\n handleMouseDown(event, {\n action: \"resize\",\n cell,\n scale: transform.k,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n });\n };\n resizeHandle?.addEventListener(\"mousedown\", onMouseDown);\n return () => {\n resizeHandle?.removeEventListener(\"mousedown\", onMouseDown);\n };\n }, [cell, onCellResized, onCellResizing, onSwitchActiveTarget, transform.k]);\n\n return (\n <g className=\"decorator-area\">\n <rect\n // x={cell.view.x}\n // y={cell.view.y}\n width={cell.view.width}\n height={cell.view.height}\n className=\"area\"\n />\n <g\n ref={resizeHandleRef}\n className=\"resize-handle\"\n transform={`translate(${cell.view.width - 20} ${cell.view.height - 20})`}\n >\n <rect width={20} height={20} />\n <path d=\"M10 18L18 10 M15 18L18 15\" />\n </g>\n </g>\n );\n}\n","import React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { BasicDecoratorProps } from \"../interfaces\";\nimport classNames from \"classnames\";\n\nexport type DecoratorTextProps = Pick<\n BasicDecoratorProps,\n \"cell\" | \"onDecoratorTextEditing\" | \"onDecoratorTextChange\"\n>;\n\nexport function DecoratorText({\n cell,\n onDecoratorTextEditing,\n onDecoratorTextChange,\n}: DecoratorTextProps): JSX.Element {\n const label = cell.view.text ?? \"\";\n const [currentLabel, setCurrentLabel] = useState<string>(label);\n const [editingLabel, setEditingLabel] = useState(false);\n const editingLabelInitialized = useRef(false);\n const [shouldEmitLabelChange, setShouldEmitLabelChange] = useState(false);\n const ref = useRef<HTMLDivElement>(null);\n\n const handleEnableEdit = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setEditingLabel(true);\n }, []);\n\n useEffect(() => {\n const element = ref.current;\n if (element && element.textContent !== currentLabel) {\n element.textContent = currentLabel;\n }\n }, [currentLabel]);\n\n useEffect(() => {\n if (editingLabel && ref.current) {\n ref.current.focus();\n selectAllText(ref.current);\n }\n onDecoratorTextEditing({ id: cell.id, editing: editingLabel });\n }, [cell.id, editingLabel, onDecoratorTextEditing]);\n\n useEffect(() => {\n if (editingLabelInitialized.current) {\n onDecoratorTextEditing?.({ id: cell.id, editing: editingLabel });\n } else {\n editingLabelInitialized.current = true;\n }\n }, [cell.id, editingLabel, onDecoratorTextEditing]);\n\n const handleInput = useCallback((event: React.FormEvent<HTMLDivElement>) => {\n setCurrentLabel((event.target as HTMLDivElement).textContent!);\n }, []);\n\n const handleBlur = useCallback(() => {\n setEditingLabel(false);\n setShouldEmitLabelChange(true);\n }, []);\n\n useEffect(() => {\n if (shouldEmitLabelChange) {\n onDecoratorTextChange?.({\n id: cell.id,\n view: { ...cell.view, text: currentLabel },\n });\n setShouldEmitLabelChange(false);\n }\n }, [cell, currentLabel, onDecoratorTextChange, shouldEmitLabelChange]);\n\n return (\n <foreignObject className=\"decorator-text\">\n <div\n className={classNames(\"text-container\", { editing: editingLabel })}\n onDoubleClick={handleEnableEdit}\n >\n <div\n className=\"text\"\n contentEditable={editingLabel}\n ref={ref}\n onInput={handleInput}\n onBlur={handleBlur}\n />\n </div>\n </foreignObject>\n );\n}\n\nfunction selectAllText(element: HTMLElement) {\n const range = document.createRange();\n range.selectNodeContents(element);\n const selection = window.getSelection()!;\n selection.removeAllRanges();\n selection.addRange(range);\n}\n","import React from \"react\";\nimport type { BasicDecoratorProps } from \"../interfaces\";\nimport { DecoratorArea } from \"./DecoratorArea\";\nimport { DecoratorText } from \"./DecoratorText\";\n\nexport function DecoratorComponent({\n cell,\n transform,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n onDecoratorTextEditing,\n onDecoratorTextChange,\n}: BasicDecoratorProps): JSX.Element | null {\n let SpecifiedComponent: (props: BasicDecoratorProps) => JSX.Element | null;\n\n switch (cell.decorator) {\n case \"area\":\n SpecifiedComponent = DecoratorArea;\n break;\n case \"text\":\n SpecifiedComponent = DecoratorText;\n break;\n // istanbul ignore next\n default:\n // eslint-disable-next-line no-console\n console.error(`Unknown decorator: ${cell.decorator}`);\n return null;\n }\n\n return (\n <SpecifiedComponent\n cell={cell}\n transform={transform}\n onCellResizing={onCellResizing}\n onCellResized={onCellResized}\n onSwitchActiveTarget={onSwitchActiveTarget}\n onDecoratorTextEditing={onDecoratorTextEditing}\n onDecoratorTextChange={onDecoratorTextChange}\n />\n );\n}\n","import React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport classNames from \"classnames\";\nimport type {\n ActiveTarget,\n Cell,\n CellContextMenuDetail,\n DecoratorTextChangeDetail,\n EdgeLineConf,\n NodeBrickConf,\n} from \"./interfaces\";\nimport { isDecoratorCell, isEdgeCell, isNodeCell } from \"./processors/asserts\";\nimport { EdgeComponent } from \"./EdgeComponent\";\nimport { NodeComponent } from \"./NodeComponent\";\nimport { handleMouseDown } from \"./processors/handleMouseDown\";\nimport type { MoveCellPayload, ResizeCellPayload } from \"./reducers/interfaces\";\nimport { DecoratorComponent } from \"./decorators\";\nimport { cellToTarget } from \"./processors/cellToTarget\";\nimport type { TransformLiteral } from \"../diagram/interfaces\";\nimport { sameTarget } from \"./processors/sameTarget\";\n\nexport interface CellComponentProps {\n cell: Cell;\n cells: Cell[];\n defaultNodeBricks?: NodeBrickConf[];\n defaultEdgeLines?: EdgeLineConf[];\n transform: TransformLiteral;\n markerEnd: string;\n active: boolean;\n unrelatedCells: Cell[];\n onCellMoving(info: MoveCellPayload): void;\n onCellMoved(info: MoveCellPayload): void;\n onCellResizing(info: ResizeCellPayload): void;\n onCellResized(info: ResizeCellPayload): void;\n onSwitchActiveTarget(target: ActiveTarget | null): void;\n onCellContextMenu(detail: CellContextMenuDetail): void;\n onDecoratorTextEditing(detail: { id: string; editing: boolean }): void;\n onDecoratorTextChange(detail: DecoratorTextChangeDetail): void;\n}\n\nexport function CellComponent({\n cell,\n cells,\n defaultNodeBricks,\n defaultEdgeLines,\n markerEnd,\n active,\n transform,\n unrelatedCells,\n onCellMoving,\n onCellMoved,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n onCellContextMenu,\n onDecoratorTextEditing,\n onDecoratorTextChange,\n}: CellComponentProps): JSX.Element | null {\n const gRef = useRef<SVGGElement>(null);\n\n const unrelated = useMemo(\n () => unrelatedCells.some((item) => sameTarget(item, cell)),\n [cell, unrelatedCells]\n );\n\n useEffect(() => {\n const g = gRef.current;\n const onMouseDown = (event: MouseEvent) => {\n handleMouseDown(event, {\n action: \"move\",\n cell,\n scale: transform.k,\n onCellMoving,\n onCellMoved,\n onSwitchActiveTarget,\n });\n };\n g?.addEventListener(\"mousedown\", onMouseDown);\n return () => {\n g?.removeEventListener(\"mousedown\", onMouseDown);\n };\n }, [cell, onCellMoved, onCellMoving, onSwitchActiveTarget, transform.k]);\n\n const handleContextMenu = useCallback(\n (event: React.MouseEvent<SVGGElement>) => {\n event.preventDefault();\n onSwitchActiveTarget(cellToTarget(cell));\n onCellContextMenu({\n cell,\n clientX: event.clientX,\n clientY: event.clientY,\n });\n },\n [cell, onCellContextMenu, onSwitchActiveTarget]\n );\n\n return (\n <g\n className={classNames(\"cell\", { active, faded: unrelated })}\n ref={gRef}\n transform={\n cell.type === \"edge\"\n ? undefined\n : `translate(${cell.view.x} ${cell.view.y})`\n }\n onContextMenu={handleContextMenu}\n >\n {isNodeCell(cell) ? (\n <NodeComponent node={cell} defaultNodeBricks={defaultNodeBricks} />\n ) : isEdgeCell(cell) ? (\n <EdgeComponent\n edge={cell}\n defaultEdgeLines={defaultEdgeLines}\n cells={cells}\n markerEnd={markerEnd}\n />\n ) : isDecoratorCell(cell) ? (\n <DecoratorComponent\n cell={cell}\n transform={transform}\n onCellResizing={onCellResizing}\n onCellResized={onCellResized}\n onSwitchActiveTarget={onSwitchActiveTarget}\n onDecoratorTextEditing={onDecoratorTextEditing}\n onDecoratorTextChange={onDecoratorTextChange}\n />\n ) : null}\n </g>\n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport classNames from \"classnames\";\nimport type { ConnectLineState } from \"./interfaces\";\nimport type { PositionTuple, TransformLiteral } from \"../diagram/interfaces\";\n\nexport interface ConnectLineComponentProps {\n connectLineState: ConnectLineState | null;\n transform: TransformLiteral;\n markerEnd: string;\n onConnect(state: ConnectLineState, to: PositionTuple): void;\n}\n\nexport function ConnectLineComponent({\n connectLineState,\n transform,\n markerEnd,\n onConnect,\n}: ConnectLineComponentProps): JSX.Element {\n const [connectLineTo, setConnectLineTo] = useState<PositionTuple | null>(\n null\n );\n\n useEffect(() => {\n if (connectLineState) {\n setConnectLineTo(connectLineState.from);\n }\n }, [connectLineState]);\n\n useEffect(() => {\n if (connectLineState) {\n const onMouseMove = (e: MouseEvent) => {\n // Set connect line to based on the mouse position and the transform\n setConnectLineTo([\n (e.clientX - transform.x - connectLineState.offset[0]) / transform.k,\n (e.clientY - transform.y - connectLineState.offset[1]) / transform.k,\n ]);\n };\n const onMouseDown = (e: MouseEvent) => {\n e.stopPropagation();\n };\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n reset();\n onConnect(connectLineState, [\n (e.clientX - transform.x - connectLineState.offset[0]) / transform.k,\n (e.clientY - transform.y - connectLineState.offset[1]) / transform.k,\n ]);\n };\n const reset = () => {\n document.removeEventListener(\"mousemove\", onMouseMove);\n document.removeEventListener(\"mousedown\", onMouseDown, {\n capture: true,\n });\n document.removeEventListener(\"click\", onClick, { capture: true });\n setConnectLineTo(null);\n };\n document.addEventListener(\"mousemove\", onMouseMove);\n document.addEventListener(\"mousedown\", onMouseDown, { capture: true });\n document.addEventListener(\"click\", onClick, { capture: true });\n\n return reset;\n }\n }, [connectLineState, onConnect, transform]);\n\n return (\n <path\n className={classNames(\"connect-line\", {\n connecting:\n !!connectLineState &&\n connectLineTo &&\n // Do not show when the distance of mouse move is less than 5px\n (connectLineTo[0] - connectLineState.from[0]) ** 2 +\n (connectLineTo[1] - connectLineState.from[1]) ** 2 >\n 25,\n })}\n d={\n connectLineState && connectLineTo\n ? `M${connectLineState.from.join(\" \")}L${connectLineTo.join(\" \")}`\n : \"\"\n }\n fill=\"none\"\n stroke=\"gray\"\n strokeWidth={1}\n markerEnd={`url(#${markerEnd})`}\n />\n );\n}\n","import type {\n Cell,\n DecoratorCell,\n EdgeCell,\n InitialCell,\n InitialNodeCell,\n NodeCell,\n} from \"../interfaces\";\n\nexport function isNodeCell(cell: Cell): cell is NodeCell {\n return cell.type === \"node\";\n}\n\nexport function isDecoratorCell(cell: Cell): cell is DecoratorCell {\n return cell.type === \"decorator\";\n}\n\nexport function isInitialNodeCell(cell: InitialCell): cell is InitialNodeCell {\n return cell.type === \"node\";\n}\n\nexport function isEdgeCell(cell: Cell): cell is EdgeCell {\n return cell.type === \"edge\";\n}\n","import type { ActiveTarget, Cell } from \"../interfaces\";\nimport { sameTarget } from \"./sameTarget\";\n\nexport function getUnrelatedCells(\n cells: Cell[],\n activeTarget: ActiveTarget | null\n): Cell[] {\n const unrelated: Cell[] = [];\n\n switch (activeTarget?.type) {\n case \"node\": {\n const nodesMap = new Map<string, Cell>();\n const relatedNodeIds = new Set<string>([activeTarget.id]);\n for (const cell of cells) {\n if (cell.type === \"node\") {\n nodesMap.set(cell.id, cell);\n } else if (cell.type === \"edge\") {\n if (cell.source === activeTarget.id) {\n relatedNodeIds.add(cell.target);\n } else if (cell.target === activeTarget.id) {\n relatedNodeIds.add(cell.source);\n } else {\n unrelated.push(cell);\n }\n } else {\n unrelated.push(cell);\n }\n }\n for (const [id, cell] of nodesMap) {\n if (!relatedNodeIds.has(id)) {\n unrelated.push(cell);\n }\n }\n break;\n }\n\n case \"edge\":\n for (const cell of cells) {\n if (\n !(cell.type === \"edge\"\n ? sameTarget(cell, activeTarget)\n : cell.type === \"node\" &&\n (cell.id === activeTarget.source ||\n cell.id === activeTarget.target))\n ) {\n unrelated.push(cell);\n }\n }\n break;\n\n case \"decorator\":\n for (const cell of cells) {\n if (cell.type !== \"decorator\" || cell.id !== activeTarget.id) {\n unrelated.push(cell);\n }\n }\n break;\n }\n\n return unrelated;\n}\n","import type { ActiveTarget, Cell } from \"../interfaces\";\nimport { sameTarget } from \"./sameTarget\";\n\nexport type KeyboardAction = KeyboardActionDeleteCell;\n\nexport interface KeyboardActionDeleteCell {\n action: \"delete-cell\";\n cell: Cell;\n}\n\nexport function handleKeyboard(\n event: KeyboardEvent,\n {\n cells,\n activeTarget,\n }: {\n cells: Cell[];\n activeTarget: ActiveTarget | null | undefined;\n }\n): KeyboardAction | undefined {\n const activeCell = cells.find((cell) => sameTarget(cell, activeTarget));\n\n if (!activeCell) {\n return;\n }\n\n const key =\n event.key ||\n /* istanbul ignore next: compatibility */ event.keyCode ||\n /* istanbul ignore next: compatibility */ event.which;\n\n switch (key) {\n case \"Backspace\":\n case 8:\n case \"Delete\":\n case 46: {\n event.preventDefault();\n event.stopPropagation();\n return {\n action: \"delete-cell\",\n cell: activeCell,\n };\n }\n }\n}\n","import type { SizeTuple } from \"../../diagram/interfaces\";\nimport type { Cell, InitialCell, NodeCell } from \"../interfaces\";\nimport { isInitialNodeCell } from \"./asserts\";\n\nexport function initializeCells(\n initialCells: InitialCell[] | undefined,\n {\n defaultNodeSize,\n }: {\n defaultNodeSize: SizeTuple;\n }\n): Cell[] {\n const originalCells = initialCells ?? [];\n const finalCells: Cell[] = originalCells.map<Cell>((cell) => {\n if (\n !isInitialNodeCell(cell) ||\n (cell.view?.width !== undefined && cell.view?.height !== undefined)\n ) {\n return cell as NodeCell;\n }\n return {\n ...cell,\n view: {\n width: defaultNodeSize[0],\n height: defaultNodeSize[1],\n ...cell.view,\n },\n } as NodeCell;\n });\n return finalCells;\n}\n","import type {\n ActiveTarget,\n ActiveTargetOfEdge,\n ActiveTargetOfNode,\n} from \"../interfaces\";\n\nexport function sameTarget(\n a: ActiveTarget | null | undefined,\n b: ActiveTarget | null | undefined\n): boolean {\n return a\n ? !!b &&\n a.type === b.type &&\n (a.type === \"node\" || a.type === \"decorator\"\n ? a.id === (b as ActiveTargetOfNode).id\n : a.source === (b as ActiveTargetOfEdge).source &&\n a.target === (b as ActiveTargetOfEdge).target)\n : !b;\n}\n","import type { TransformLiteral } from \"../../diagram/interfaces\";\nimport type { Cell } from \"../interfaces\";\nimport { isEdgeCell } from \"./asserts\";\n\nexport interface TransformToCenterOptions {\n canvasWidth: number;\n canvasHeight: number;\n scaleRange?: [min: number, max: number];\n}\n\nexport function transformToCenter(\n cells: Cell[],\n { canvasWidth, canvasHeight, scaleRange }: TransformToCenterOptions\n): TransformLiteral {\n let left = Infinity;\n let top = Infinity;\n let right = -Infinity;\n let bottom = -Infinity;\n let empty = true;\n for (const cell of cells) {\n if (!isEdgeCell(cell)) {\n empty = false;\n const { view } = cell;\n const r = view.x + view.width;\n const b = view.y + view.height;\n if (view.x < left) {\n left = view.x;\n }\n if (r > right) {\n right = r;\n }\n if (view.y < top) {\n top = view.y;\n }\n if (b > bottom) {\n bottom = b;\n }\n }\n }\n\n const width = right - left;\n const height = bottom - top;\n\n const scale =\n scaleRange && !empty && (width > canvasWidth || height > canvasHeight)\n ? Math.max(\n Math.min(canvasWidth / width, canvasHeight / height, scaleRange[1]),\n scaleRange[0]\n )\n : 1;\n\n const x = empty ? 0 : (canvasWidth - width * scale) / 2 - left * scale;\n const y = empty ? 0 : (canvasHeight - height * scale) / 2 - top * scale;\n\n return { x, y, k: scale };\n}\n","import type { SizeTuple, TransformLiteral } from \"../../diagram/interfaces\";\nimport type {\n Cell,\n InitialCell,\n NodeCell,\n NodeId,\n NodeView,\n} from \"../interfaces\";\nimport { isEdgeCell, isNodeCell } from \"./asserts\";\nimport { initializeCells } from \"./initializeCells\";\n\nconst GAP = 36;\n\nexport function updateCells({\n cells,\n defaultNodeSize,\n canvasHeight,\n transform,\n reason,\n parent,\n}: {\n cells: InitialCell[];\n defaultNodeSize: SizeTuple;\n canvasHeight: number;\n transform: TransformLiteral;\n reason?: \"add-related-nodes\";\n parent?: NodeId;\n}): {\n cells: Cell[];\n updated: Cell[];\n} {\n const newCells = initializeCells(cells, { defaultNodeSize });\n const updateCandidates: NodeCell[] = [];\n\n const nodesMap = new Map<string, NodeCell>();\n for (const cell of newCells) {\n if (isNodeCell(cell)) {\n nodesMap.set(cell.id, cell);\n }\n }\n\n let handled = false;\n\n if (reason === \"add-related-nodes\" && parent) {\n // Place these unpositioned downstream nodes below the parent node, and\n // on the right side of the positioned siblings.\n const downstreamNodeIds = new Set<string>();\n for (const cell of newCells) {\n if (\n isEdgeCell(cell) &&\n cell.source === parent &&\n cell.target !== parent\n ) {\n downstreamNodeIds.add(cell.target);\n }\n }\n const parentNode = nodesMap.get(parent);\n if (parentNode?.view.x !== undefined && parentNode.view.y !== undefined) {\n handled = true;\n const downstreamNodes = [...downstreamNodeIds]\n .map((id) => nodesMap.get(id))\n .filter(Boolean) as NodeCell[];\n let rightMostNode: NodeCell | undefined = undefined;\n for (const node of downstreamNodes) {\n if (node.view.x !== undefined && node.view.y !== undefined) {\n // Find the rightmost node that is below the parent node.\n if (\n (!rightMostNode || node.view.x > rightMostNode.view.x) &&\n node.view.y > parentNode.view.y\n ) {\n rightMostNode = node;\n }\n } else {\n // Unpositioned nodes\n updateCandidates.push(node);\n }\n }\n if (updateCandidates.length > 0) {\n let nextX: number;\n let nextY: number;\n if (rightMostNode) {\n // Place unpositioned nodes on the right side of the rightmost positioned siblings.\n nextX = rightMostNode.view.x + rightMostNode.view.width + GAP;\n nextY = rightMostNode.view.y;\n } else {\n // If there are no positioned siblings, just place them below the parent.\n const totalWidth = updateCandidates.reduce(\n (acc, node) => acc + node.view.width + GAP,\n -GAP\n );\n nextX =\n parentNode.view.x - totalWidth / 2 + parentNode.view.width / 2;\n nextY = parentNode.view.y + parentNode.view.height + GAP;\n }\n for (const node of updateCandidates) {\n node.view.x = nextX;\n node.view.y = nextY;\n nextX += node.view.width + GAP;\n }\n }\n }\n }\n\n if (!handled) {\n // By default, place unpositioned nodes in a grid.\n let maxWidth = defaultNodeSize[0];\n let maxHeight = defaultNodeSize[1];\n const occupiedViews: NodeView[] = [];\n for (const cell of newCells) {\n if (isNodeCell(cell)) {\n if (cell.view.width > maxWidth) {\n maxWidth = cell.view.width;\n }\n if (cell.view.height > maxHeight) {\n maxHeight = cell.view.height;\n }\n if (cell.view.x === undefined || cell.view.y === undefined) {\n updateCandidates.push(cell);\n } else {\n occupiedViews.push(cell.view);\n }\n }\n }\n\n const deltaX = maxWidth + GAP;\n const deltaY = maxHeight + GAP;\n\n const occupiedIndexes = new Set<string>();\n for (const view of occupiedViews) {\n const x0 = Math.floor((view.x + transform.x / transform.k) / deltaX);\n const y0 = Math.floor((view.y + transform.y / transform.k) / deltaY);\n const x1 = Math.floor(\n (view.x + transform.x / transform.k + view.width) / deltaX\n );\n const y1 = Math.floor(\n (view.y + transform.y / transform.k + view.height) / deltaY\n );\n\n for (let i = x0; i <= x1; i++) {\n for (let j = y0; j <= y1; j++) {\n occupiedIndexes.add(`${i},${j}`);\n }\n }\n }\n\n const scaledDeltaX = deltaX * transform.k;\n const scaledDeltaY = deltaY * transform.k;\n const rows = Math.max(1, Math.floor(canvasHeight / scaledDeltaY));\n let i = 0;\n for (const node of updateCandidates) {\n let xIndex: number;\n let yIndex: number;\n do {\n xIndex = Math.floor(i / rows);\n yIndex = i % rows;\n i++;\n } while (occupiedIndexes.has(`${xIndex},${yIndex}`));\n\n node.view.x =\n (xIndex * scaledDeltaX - transform.x) / transform.k + GAP / 2;\n node.view.y =\n (yIndex * scaledDeltaY - transform.y) / transform.k + GAP / 2;\n }\n }\n\n return { cells: newCells, updated: updateCandidates };\n}\n","import type { Reducer } from \"react\";\nimport type { DrawCanvasAction } from \"./interfaces\";\nimport type { Cell, NodeCell } from \"../interfaces\";\n\nexport const cells: Reducer<Cell[], DrawCanvasAction> = (state, action) => {\n switch (action.type) {\n case \"drop-node\":\n return insertCellAfter(\n state,\n action.payload,\n (cell) => !(cell.type === \"decorator\" && cell.decorator === \"text\")\n );\n case \"drop-decorator\": {\n if (action.payload.decorator === \"text\") {\n return [...state, action.payload];\n }\n return insertCellAfter(\n state,\n action.payload,\n (cell) => cell.type === \"decorator\" && cell.decorator === \"area\"\n );\n }\n case \"add-nodes\": {\n const index =\n state.findLastIndex(\n (cell) => !(cell.type === \"decorator\" && cell.decorator === \"text\")\n ) + 1;\n return [\n ...state.slice(0, index),\n ...action.payload,\n ...state.slice(index),\n ];\n }\n case \"add-edge\":\n // Add the edge to just next to the previous last edge or area decorator.\n // If not found, append to the start.\n return insertCellAfter(\n state,\n action.payload,\n (cell) =>\n cell.type === \"edge\" ||\n (cell.type === \"decorator\" && cell.decorator === \"area\")\n );\n case \"move-cell\": {\n const { type, id, x, y } = action.payload;\n const index = state.findIndex(\n (cell) => cell.type === type && cell.id === id\n );\n if (index !== -1) {\n const node = state[index] as NodeCell;\n return [\n ...state.slice(0, index),\n { ...node, view: { ...node.view, x, y } },\n ...state.slice(index + 1),\n ];\n }\n return state;\n }\n case \"resize-cell\": {\n const { type, id, width, height } = action.payload;\n const index = state.findIndex(\n (cell) => cell.type === type && cell.id === id\n );\n if (index !== -1) {\n const node = state[index] as NodeCell;\n return [\n ...state.slice(0, index),\n { ...node, view: { ...node.view, width, height } },\n ...state.slice(index + 1),\n ];\n }\n return state;\n }\n case \"update-cells\":\n return action.payload;\n }\n return state;\n};\n\nfunction insertCellAfter(\n cells: Cell[],\n newCell: Cell,\n after: (cell: Cell) => boolean\n) {\n const index = cells.findLastIndex(after) + 1;\n return [...cells.slice(0, index), newCell, ...cells.slice(index)];\n}\n","import { Reducer } from \"react\";\nimport type { DrawCanvasAction, DrawCanvasState } from \"./interfaces\";\nimport { cells } from \"./cells\";\n\ntype ReducersMapObject<S, A> = {\n [K in keyof S]: Reducer<S[K], A>;\n};\n\nfunction combineReducers<S, A>(\n reducers: ReducersMapObject<S, A>\n): Reducer<S, A> {\n return ((state, action) =>\n Object.fromEntries(\n Object.entries<Reducer<any, A>>(reducers).map(([key, value]) => [\n key,\n value(state[key as keyof S], action),\n ])\n )) as Reducer<S, A>;\n}\n\nexport const rootReducer = combineReducers<DrawCanvasState, DrawCanvasAction>({\n cells,\n});\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root:focus{outline:none}.decorator-area .area{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:4;stroke-width:1}.cell{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle{opacity:1}.connect-line:not(.connecting){display:none}.line.dashed{stroke-dasharray:4}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["findNode","cells","id","find","cell","isNodeCell","EdgeComponent","_ref","edge","markerEnd","defaultEdgeLines","sourceNode","useMemo","source","targetNode","target","lineConf","item","checkIfByTransform","line","getDirectLinePoints","nodeViewToNodeRect","view","d","concat","x","y","React","fill","stroke","strokeWidth","className","classNames","dashed","padding","width","height","NodeComponent","node","defaultNodeBricks","memoizedData","value","memoizedValue","setMemoizedValue","useState","useEffect","prev","isEqual","useDeepMemo","data","specifiedUseBrick","useBrick","_defaultNodeBricks$fi","ReactUseBrick","cellToTarget","type","pick","handleMouseDown","event","action","scale","onCellMoving","onCellMoved","onCellResizing","onCellResized","onSwitchActiveTarget","stopPropagation","from","clientX","clientY","original","moved","handleMove","e","finished","_ref2","_ref3","movement","getMovement","onMouseMove","onMouseUp","document","removeEventListener","addEventListener","DecoratorArea","transform","resizeHandleRef","resizeHandle","current","onMouseDown","k","ref","DecoratorText","_cell$view$text","onDecoratorTextEditing","onDecoratorTextChange","label","text","currentLabel","setCurrentLabel","editingLabel","setEditingLabel","editingLabelInitialized","useRef","shouldEmitLabelChange","setShouldEmitLabelChange","handleEnableEdit","useCallback","preventDefault","element","textContent","focus","range","createRange","selectNodeContents","selection","window","getSelection","removeAllRanges","addRange","selectAllText","editing","handleInput","handleBlur","_objectSpread","onDoubleClick","contentEditable","onInput","onBlur","DecoratorComponent","SpecifiedComponent","decorator","console","error","CellComponent","active","unrelatedCells","onCellContextMenu","gRef","unrelated","some","sameTarget","g","handleContextMenu","faded","undefined","onContextMenu","isEdgeCell","isDecoratorCell","ConnectLineComponent","connectLineState","onConnect","connectLineTo","setConnectLineTo","offset","onClick","reset","capture","connecting","join","isInitialNodeCell","getUnrelatedCells","activeTarget","nodesMap","Map","relatedNodeIds","Set","set","add","push","has","handleKeyboard","activeCell","key","keyCode","which","initializeCells","initialCells","defaultNodeSize","map","_cell$view","_cell$view2","a","b","transformToCenter","canvasWidth","canvasHeight","scaleRange","left","Infinity","top","right","bottom","empty","r","Math","max","min","GAP","updateCells","reason","parent","newCells","updateCandidates","handled","downstreamNodeIds","parentNode","get","downstreamNodes","filter","Boolean","rightMostNode","length","nextX","nextY","totalWidth","reduce","acc","maxWidth","maxHeight","occupiedViews","deltaX","deltaY","occupiedIndexes","x0","floor","y0","x1","y1","i","j","scaledDeltaX","scaledDeltaY","rows","xIndex","yIndex","updated","insertCellAfter","newCell","after","index","findLastIndex","slice","reducers","rootReducer","state","payload","findIndex","Object","fromEntries","entries","___CSS_LOADER_EXPORT___","module","toString"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[7364],{8752:(e,t,a)=>{a.d(t,{y:()=>i});var n=a(5600),r=a.n(n);function i(e){var t,{id:a,type:n,strokeColor:i}=e;switch(n){case"0..1":t=c;break;case"0..N":t=o;break;default:t=l}return r().createElement(t,{id:a,strokeColor:i})}function l(e){var{id:t,strokeColor:a}=e;return r().createElement("marker",{id:t,viewBox:"0 0 6 6",refX:5,refY:3,markerWidth:6,markerHeight:6,orient:"auto-start-reverse",strokeLinejoin:"round"},r().createElement("path",{d:"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z",stroke:a,strokeWidth:1,fill:a}))}function c(e){var{id:t,strokeColor:a}=e;return r().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},r().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5",stroke:a,strokeWidth:1,fill:"none"}))}function o(e){var{id:t,strokeColor:a}=e;return r().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},r().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5",stroke:a,strokeWidth:1,fill:"none"}))}},960:(e,t,a)=>{a.d(t,{g:()=>r});var n=a(3208);function r(e,t){if(e===t||(0,n.e)(e,t,0,0))return null;var a,r,i,l,c=t.x-e.x,o=t.y-e.y,s=c>0?1:-1;if(0!==o){var u=Math.abs(c/o),d=o>0?1:-1;u<e.width/e.height?(a=e.x+u*e.height/2*s,r=e.y+e.height/2*d):(a=e.x+e.width/2*s,r=e.y+e.width/2/u*d),u<t.width/t.height?(i=t.x-u*t.height/2*s,l=t.y-t.height/2*d):(i=t.x-t.width/2*s,l=t.y-t.width/2/u*d)}else a=e.x+e.width/2*s,i=t.x-t.width/2*s,r=l=e.y;return[{x:a,y:r},{x:i,y:l}]}},3208:(e,t,a)=>{function n(e,t,a,n){var i=a?r(e,a):e,l=n?r(t,n):t,c=Math.min(i.x-i.width/2,l.x-l.width/2),o=Math.max(i.x+i.width/2,l.x+l.width/2),s=Math.min(i.y-i.height/2,l.y-l.height/2),u=Math.max(i.y+i.height/2,l.y+l.height/2);return o-c<i.width+l.width&&u-s<i.height+l.height}function r(e,t){return{x:e.x-e.width/2-t,y:e.y-e.height/2-t,width:e.width+2*t,height:e.height+2*t}}a.d(t,{e:()=>n})},3156:(e,t,a)=>{a.r(t),a.d(t,{EoDrawCanvas:()=>ge,EoDrawCanvasComponent:()=>Je});var n,r,i,l,c,o,s,u,d,h,v,f,g,p,w,m,k,x,y,b,M,C,E,W,z,N,S,T,R,B,D,L,H,P,A,U,Y,_,I,j,X,F,G,O,q,K,V,J,Q,Z,$,ee,te,ae,ne,re,ie,le,ce,oe,se,ue,de,he,ve,fe,ge,pe=a(4412),we=a(8944),me=a(123),ke=a(592),xe=a(5866),ye=a(1412),be=a(8644),Me=a(5600),Ce=a.n(Me),Ee=a(7672),We=a(8160),ze=a(4516),Ne=(a(48),a(7568)),Se=a(5248),Te=a(1920),Re=a(1252),Be=a.n(Re),De=a(3876),Le=a(8752),He=a(7181),Pe=a(4552),Ae=a(6876),Ue=a(5776),Ye=a(7584),_e=a(8044),Ie=a(7876),je=a(3788),Xe=a(2872),Fe=a(587),Ge=(0,ze.unwrapProvider)("basic.lock-body-scroll"),{defineElement:Oe,property:qe,method:Ke,event:Ve}=(0,Ee.createDecorators)(),Je=Ce().forwardRef($t);i=[Oe("eo-draw-canvas",{styleTexts:[Ye.c]})],l=qe({attribute:!1}),o=qe({attribute:!1}),u=qe({attribute:!1}),h=qe({attribute:!1}),f=qe({attribute:!1}),p=qe({type:Boolean}),m=qe({type:Boolean}),x=qe({type:Boolean}),b=qe({type:Boolean}),C=qe({attribute:!1}),W=Ve({type:"activeTarget.change"}),T=Ve({type:"node.move"}),L=Ve({type:"cell.move"}),U=Ve({type:"cell.resize"}),j=Ve({type:"node.delete"}),O=Ve({type:"cell.delete"}),J=Ve({type:"cell.contextmenu"}),ee=Ve({type:"decorator.text.change"}),re=Ve({type:"scale.change"}),oe=Ke(),se=Ke(),ue=Ke(),de=Ke(),he=Ke(),ve=Ke();var Qe=new WeakMap,Ze=new WeakMap,$e=new WeakMap,et=new WeakMap,tt=new WeakMap,at=new WeakMap,nt=new WeakMap,rt=new WeakMap,it=new WeakMap,lt=new WeakMap,ct=new WeakMap,ot=new WeakMap,st=new WeakMap,ut=new WeakMap,dt=new WeakMap,ht=new WeakMap,vt=new WeakMap,ft=new WeakMap,gt=new WeakMap,pt=new WeakMap,wt=new WeakMap,mt=new WeakMap,kt=new WeakMap,xt=new WeakMap,yt=new WeakMap,bt=new WeakMap,Mt=new WeakMap,Ct=new WeakMap,Et=new WeakMap,Wt=new WeakMap,zt=new WeakMap,Nt=new WeakMap,St=new WeakMap,Tt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap,Dt=new WeakMap;class Lt extends We.ReactNextElement{constructor(){super(...arguments),(0,me.c)(this,Rt,{get:Zt,set:Qt}),(0,me.c)(this,Nt,{get:Jt,set:Vt}),(0,me.c)(this,Et,{get:Kt,set:qt}),(0,me.c)(this,bt,{get:Ot,set:Gt}),(0,me.c)(this,xt,{get:Ft,set:Xt}),(0,me.c)(this,wt,{get:jt,set:It}),(0,me.c)(this,ft,{get:_t,set:Yt}),(0,me.c)(this,ht,{get:Ut,set:At}),(0,me.c)(this,ot,{get:Pt,set:Ht}),(0,me.c)(this,Qe,{writable:!0,value:(n(this),c(this))}),(0,me.c)(this,Ze,{writable:!0,value:s(this,[20,20])}),(0,me.c)(this,$e,{writable:!0,value:d(this)}),(0,me.c)(this,et,{writable:!0,value:v(this)}),(0,me.c)(this,tt,{writable:!0,value:g(this)}),(0,me.c)(this,at,{writable:!0,value:w(this)}),(0,me.c)(this,nt,{writable:!0,value:k(this,!0)}),(0,me.c)(this,rt,{writable:!0,value:y(this,!0)}),(0,me.c)(this,it,{writable:!0,value:M(this,!0)}),(0,me.c)(this,lt,{writable:!0,value:E(this)}),(0,me.c)(this,ct,{writable:!0,value:z(this)}),(0,me.c)(this,st,{writable:!0,value:e=>{(0,ye.c)(this,ot).emit(e)}}),(0,me.c)(this,ut,{writable:!0,value:e=>{(0,Pe.M)(e,this.activeTarget)||(this.activeTarget=e)}}),(0,me.c)(this,dt,{writable:!0,value:R(this)}),(0,me.c)(this,vt,{writable:!0,value:H(this)}),(0,me.c)(this,gt,{writable:!0,value:e=>{(0,ye.c)(this,ft).emit(e),"node"===e.type&&(0,ye.c)(this,ht).emit(e)}}),(0,me.c)(this,pt,{writable:!0,value:Y(this)}),(0,me.c)(this,mt,{writable:!0,value:e=>{(0,ye.c)(this,wt).emit(e)}}),(0,me.c)(this,kt,{writable:!0,value:X(this)}),(0,me.c)(this,yt,{writable:!0,value:q(this)}),(0,me.c)(this,Mt,{writable:!0,value:e=>{(0,ye.c)(this,bt).emit(e),"node"===e.type&&(0,ye.c)(this,xt).emit(e)}}),(0,me.c)(this,Ct,{writable:!0,value:Q(this)}),(0,me.c)(this,Wt,{writable:!0,value:e=>{(0,ye.c)(this,Et).emit(e)}}),(0,me.c)(this,zt,{writable:!0,value:te(this)}),(0,me.c)(this,St,{writable:!0,value:e=>{(0,ye.c)(this,Nt).emit(e)}}),(0,me.c)(this,Tt,{writable:!0,value:ie(this)}),(0,me.c)(this,Bt,{writable:!0,value:e=>{(0,ye.c)(this,Rt).emit(e)}}),(0,me.c)(this,Dt,{writable:!0,value:(0,Me.createRef)()})}get cells(){return(0,ye.c)(this,Qe)}set cells(e){(0,xe.c)(this,Qe,e)}get defaultNodeSize(){return(0,ye.c)(this,Ze)}set defaultNodeSize(e){(0,xe.c)(this,Ze,e)}get defaultNodeBricks(){return(0,ye.c)(this,$e)}set defaultNodeBricks(e){(0,xe.c)(this,$e,e)}get defaultEdgeLines(){return(0,ye.c)(this,et)}set defaultEdgeLines(e){(0,xe.c)(this,et,e)}get activeTarget(){return(0,ye.c)(this,tt)}set activeTarget(e){(0,xe.c)(this,tt,e)}get fadeUnrelatedCells(){return(0,ye.c)(this,at)}set fadeUnrelatedCells(e){(0,xe.c)(this,at,e)}get zoomable(){return(0,ye.c)(this,nt)}set zoomable(e){(0,xe.c)(this,nt,e)}get scrollable(){return(0,ye.c)(this,rt)}set scrollable(e){(0,xe.c)(this,rt,e)}get pannable(){return(0,ye.c)(this,it)}set pannable(e){(0,xe.c)(this,it,e)}get scaleRange(){return(0,ye.c)(this,lt)}set scaleRange(e){(0,xe.c)(this,lt,e)}dropNode(e){var t=this;return(0,we.c)((function*(){var a,n,{id:r,position:i,size:l,data:c,useBrick:o}=e;if(null===(a=(n=document).elementsFromPoint)||void 0===a||null===(a=a.call(n,i[0],i[1]))||void 0===a?void 0:a.includes(t)){var s,u,d,h=t.getBoundingClientRect(),v=(0,ye.c)(t,Dt).current.getTransform(),f={type:"node",id:r,view:{x:(i[0]-h.left-v.x)/v.k,y:(i[1]-h.top-v.y)/v.k,width:null!==(s=null==l?void 0:l[0])&&void 0!==s?s:t.defaultNodeSize[0],height:null!==(u=null==l?void 0:l[1])&&void 0!==u?u:t.defaultNodeSize[0]},data:c,useBrick:o};return null===(d=(0,ye.c)(t,Dt).current)||void 0===d||d.dropNode(f),f}return null}))()}dropDecorator(e){var t=this;return(0,we.c)((function*(){var a,n,{position:r,decorator:i,text:l}=e;if(null===(a=(n=document).elementsFromPoint)||void 0===a||null===(a=a.call(n,r[0],r[1]))||void 0===a?void 0:a.includes(t)){var c,o=t.getBoundingClientRect(),s=(0,ye.c)(t,Dt).current.getTransform(),u={type:"decorator",decorator:i,id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),view:{x:(r[0]-o.left-s.x)/s.k,y:(r[1]-o.top-s.y)/s.k,width:100,height:60,text:l}};return null===(c=(0,ye.c)(t,Dt).current)||void 0===c||c.dropDecorator(u),u}return null}))()}addNodes(e){var t=this;return(0,we.c)((function*(){if(0===e.length)return[];var a=e.map((e=>{var a,n,{size:r,useBrick:i,id:l,data:c}=e;return{type:"node",id:l,data:c,view:{width:null!==(a=null==r?void 0:r[0])&&void 0!==a?a:t.defaultNodeSize[0],height:null!==(n=null==r?void 0:r[1])&&void 0!==n?n:t.defaultNodeSize[0]},useBrick:i}}));return(0,ye.c)(t,Dt).current.addNodes(a,{defaultNodeSize:t.defaultNodeSize,canvasHeight:t.clientHeight})}))()}addEdge(e){var t=this;return(0,we.c)((function*(){var a,{source:n,target:r,data:i}=e,l={type:"edge",source:n,target:r,data:i};return null===(a=(0,ye.c)(t,Dt).current)||void 0===a||a.addEdge(l),l}))()}manuallyConnectNodes(e){return(0,ye.c)(this,Dt).current.manuallyConnectNodes(e)}updateCells(e,t){var a=this;return(0,we.c)((function*(){var n=(0,ye.c)(a,Dt).current.getTransform(),{cells:r,updated:i}=(0,Xe.s)((0,pe.c)((0,pe.c)({},t),{},{cells:e,defaultNodeSize:a.defaultNodeSize,canvasHeight:a.clientHeight,transform:n}));return(0,ye.c)(a,Dt).current.updateCells(r),{updated:i}}))()}disconnectedCallback(){super.disconnectedCallback(),Ge(this,!1)}render(){return Ce().createElement(Je,{host:this,ref:(0,ye.c)(this,Dt),cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,ye.c)(this,st),onSwitchActiveTarget:(0,ye.c)(this,ut),onCellMove:(0,ye.c)(this,gt),onCellResize:(0,ye.c)(this,mt),onCellDelete:(0,ye.c)(this,Mt),onCellContextMenu:(0,ye.c)(this,Wt),onDecoratorTextChange:(0,ye.c)(this,St),onScaleChange:(0,ye.c)(this,Bt)})}}function Ht(e){S(this,e)}function Pt(){return N(this)}function At(e){D(this,e)}function Ut(){return B(this)}function Yt(e){A(this,e)}function _t(){return P(this)}function It(e){I(this,e)}function jt(){return _(this)}function Xt(e){G(this,e)}function Ft(){return F(this)}function Gt(e){V(this,e)}function Ot(){return K(this)}function qt(e){$(this,e)}function Kt(){return Z(this)}function Vt(e){ne(this,e)}function Jt(){return ae(this)}function Qt(e){ce(this,e)}function Zt(){return le(this)}function $t(e,t){var{host:a,cells:n,defaultNodeSize:r,defaultNodeBricks:i,defaultEdgeLines:l,activeTarget:c,fadeUnrelatedCells:o,zoomable:s,scrollable:u,pannable:d,scaleRange:h,onActiveTargetChange:v,onSwitchActiveTarget:f,onCellMove:g,onCellResize:p,onCellDelete:w,onCellContextMenu:m,onDecoratorTextChange:k,onScaleChange:x}=e,[{cells:y},b]=(0,Me.useReducer)(De.M,n,(e=>({cells:(0,Ie.S)(e,{defaultNodeSize:r})}))),M=(0,Me.useRef)(null),C=(0,Me.useRef)(null),E=(0,Me.useRef)(null),[W,z]=(0,Me.useState)([]),[N,S]=(0,Me.useState)(!1),[T,R]=(0,Me.useState)({k:1,x:0,y:0}),[B,D]=(0,Me.useState)(!1);(0,Me.useEffect)((()=>{x(T.k)}),[x,T.k]);var[L,H]=(0,Me.useState)(null),P=(0,Me.useMemo)((()=>null!=h?h:[.5,2]),[h]),A=(0,Me.useMemo)((()=>(0,Te.AT)()),[]);(0,Me.useEffect)((()=>{var e=!1;A.scaleExtent(s?P:[1,1]).on("start",(()=>{e=!1,S(!0)})).on("zoom",(t=>{e=!0,R(t.transform)})).on("end",(()=>{S(!1),e||null==f||f(null)}))}),[f,P,s,A]),(0,Me.useEffect)((()=>{var e=M.current;if(e){var t=(0,Se.c)(e),a=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(s||u||d)return(s||u)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),u&&(e.preventDefault(),A.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(A).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null).on("mousedown.zoom",null),d||t.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),a;a()}}),[d,u,s,A]),(0,Me.useEffect)((()=>{var e=M.current;if(e&&!B){var{k:t,x:a,y:n}=(0,je.c)(y,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:s?P:void 0});A.transform((0,Se.c)(e),new Te.O(t,a,n)),D(!0)}}),[y,B,P,s,A]),(0,Me.useImperativeHandle)(t,(()=>({dropNode(e){b({type:"drop-node",payload:e})},dropDecorator(e){b({type:"drop-decorator",payload:e})},addNodes(e,t){var{defaultNodeSize:a,canvasHeight:n}=t,r=y.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,i=[...y.slice(0,r),...e,...y.slice(r)],{cells:l,updated:c}=(0,Xe.s)({cells:i,defaultNodeSize:a,canvasHeight:n,transform:T});return b({type:"update-cells",payload:l}),c.filter((t=>e.includes(t)))},addEdge(e){b({type:"add-edge",payload:e})},updateCells(e){b({type:"update-cells",payload:e})},getTransform:()=>T,manuallyConnectNodes(e){var t=y.find((t=>(0,He.G4)(t)&&t.id===e));if(t){var a=M.current.getBoundingClientRect();return H({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[a.left,a.top]}),new Promise(((e,t)=>{E.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[y,T]);var U=(0,Me.useCallback)(((e,t)=>{for(var a,n=0;n<y.length;n++){var r=y[n];if((0,He.G4)(r)&&r.id!==e.source.id&&r.view.x<t[0]&&r.view.x+r.view.width>t[0]&&r.view.y<t[1]&&r.view.y+r.view.height>t[1]){var i;null===(i=E.current)||void 0===i||i.resolve({source:e.source,target:r});break}}null===(a=E.current)||void 0===a||a.reject(null),H(null)}),[y]);(0,Me.useEffect)((()=>{Ge(a,!!L)}),[L,a]);var Y=null!=c?c:null,[_,I]=(0,Me.useState)(Y);(0,Me.useEffect)((()=>{I((e=>(0,Pe.M)(e,Y)?e:Y))}),[Y]);var j=(0,Me.useRef)(!1);(0,Me.useEffect)((()=>{j.current?v(_):j.current=!0}),[_,v]);var[X,F]=(0,Me.useState)([]);(0,Me.useEffect)((()=>{var e=o?(0,Fe.Y)(y,_):[];F((t=>0===t.length&&0===e.length?t:e))}),[_,y,o]),(0,Me.useEffect)((()=>{if(_){var e=e=>{e.composedPath().indexOf(C.current)<=0&&I(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[_]),(0,Me.useEffect)((()=>{var e=M.current;if(e&&!(W.length>0)){var t=e=>{var t=(0,Ae.Y)(e,{cells:y,activeTarget:_});"delete-cell"===(null==t?void 0:t.action)&&w(t.cell)};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}}),[_,y,W.length,w]);var G=(0,Me.useMemo)((()=>"".concat((0,Ne.uniqueId)("diagram-"),"-")),[]),O="".concat(G,"line-arrow-"),q="".concat(O,"1"),K=(0,Me.useCallback)((e=>{b({type:"move-cell",payload:e})}),[]),V=(0,Me.useCallback)((e=>{b({type:"move-cell",payload:e}),g(e)}),[g]),J=(0,Me.useCallback)((e=>{b({type:"resize-cell",payload:e})}),[]),Q=(0,Me.useCallback)((e=>{b({type:"resize-cell",payload:e}),p(e)}),[p]),Z=(0,Me.useCallback)((e=>{var{id:t,editing:a}=e;z(a?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]);return Ce().createElement("svg",{width:"100%",height:"100%",ref:M,className:Be()("root",{grabbing:N,pannable:d}),tabIndex:-1},Ce().createElement("defs",null,Ce().createElement(Le.y,{id:q,type:"arrow",strokeColor:"gray"})),Ce().createElement("g",{transform:"translate(".concat(T.x," ").concat(T.y,") scale(").concat(T.k,")")},Ce().createElement("g",{className:"cells",ref:C},y.map((e=>Ce().createElement(Ue.s,{key:"".concat(e.type,":").concat("edge"===e.type?"".concat(e.source,"~").concat(e.target):e.id),cell:e,cells:y,defaultNodeBricks:i,defaultEdgeLines:l,transform:T,markerEnd:q,active:(0,Pe.M)(_,e),unrelatedCells:X,onCellMoving:K,onCellMoved:V,onCellResizing:J,onCellResized:Q,onSwitchActiveTarget:f,onCellContextMenu:m,onDecoratorTextChange:k,onDecoratorTextEditing:Z})))),Ce().createElement(_e.E,{connectLineState:L,transform:T,markerEnd:q,onConnect:U})))}fe=Lt,({e:[c,s,d,v,g,w,k,y,M,E,z,N,S,R,B,D,H,P,A,Y,_,I,X,F,G,q,K,V,Q,Z,$,te,ae,ne,ie,le,ce,n],c:[ge,r]}=(0,be.c)(fe,[[l,1,"cells"],[o,1,"defaultNodeSize"],[u,1,"defaultNodeBricks"],[h,1,"defaultEdgeLines"],[f,1,"activeTarget"],[p,1,"fadeUnrelatedCells"],[m,1,"zoomable"],[x,1,"scrollable"],[b,1,"pannable"],[C,1,"scaleRange"],[W,1,"activeTargetChangeEvent",e=>(0,ye.c)(e,ct),(e,t)=>(0,xe.c)(e,ct,t)],[T,1,"nodeMoveEvent",e=>(0,ye.c)(e,dt),(e,t)=>(0,xe.c)(e,dt,t)],[L,1,"cellMoveEvent",e=>(0,ye.c)(e,vt),(e,t)=>(0,xe.c)(e,vt,t)],[U,1,"cellResizeEvent",e=>(0,ye.c)(e,pt),(e,t)=>(0,xe.c)(e,pt,t)],[j,1,"nodeDelete",e=>(0,ye.c)(e,kt),(e,t)=>(0,xe.c)(e,kt,t)],[O,1,"cellDelete",e=>(0,ye.c)(e,yt),(e,t)=>(0,xe.c)(e,yt,t)],[J,1,"cellContextMenu",e=>(0,ye.c)(e,Ct),(e,t)=>(0,xe.c)(e,Ct,t)],[ee,1,"decoratorTextChange",e=>(0,ye.c)(e,zt),(e,t)=>(0,xe.c)(e,zt,t)],[re,1,"scaleChange",e=>(0,ye.c)(e,Tt),(e,t)=>(0,xe.c)(e,Tt,t)],[oe,2,"dropNode"],[se,2,"dropDecorator"],[ue,2,"addNodes"],[de,2,"addEdge"],[he,2,"manuallyConnectNodes"],[ve,2,"updateCells"]],i,0,(e=>Dt.has((0,ke.c)(e))),We.ReactNextElement)),r()}}]);
|
|
2
|
-
//# sourceMappingURL=eo-draw-canvas.
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[7364],{8752:(e,t,a)=>{a.d(t,{y:()=>i});var n=a(5600),r=a.n(n);function i(e){var t,{id:a,type:n,strokeColor:i}=e;switch(n){case"0..1":t=c;break;case"0..N":t=o;break;default:t=l}return r().createElement(t,{id:a,strokeColor:i})}function l(e){var{id:t,strokeColor:a}=e;return r().createElement("marker",{id:t,viewBox:"0 0 6 6",refX:5,refY:3,markerWidth:6,markerHeight:6,orient:"auto-start-reverse",strokeLinejoin:"round"},r().createElement("path",{d:"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z",stroke:a,strokeWidth:1,fill:a}))}function c(e){var{id:t,strokeColor:a}=e;return r().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},r().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5",stroke:a,strokeWidth:1,fill:"none"}))}function o(e){var{id:t,strokeColor:a}=e;return r().createElement("marker",{id:t,viewBox:"0 0 21 11",refX:.5,refY:5.5,markerWidth:21,markerHeight:11,orient:"auto-start-reverse"},r().createElement("path",{d:"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5",stroke:a,strokeWidth:1,fill:"none"}))}},960:(e,t,a)=>{a.d(t,{g:()=>r});var n=a(3208);function r(e,t){if(e===t||(0,n.e)(e,t,0,0))return null;var a,r,i,l,c=t.x-e.x,o=t.y-e.y,s=c>0?1:-1;if(0!==o){var u=Math.abs(c/o),d=o>0?1:-1;u<e.width/e.height?(a=e.x+u*e.height/2*s,r=e.y+e.height/2*d):(a=e.x+e.width/2*s,r=e.y+e.width/2/u*d),u<t.width/t.height?(i=t.x-u*t.height/2*s,l=t.y-t.height/2*d):(i=t.x-t.width/2*s,l=t.y-t.width/2/u*d)}else a=e.x+e.width/2*s,i=t.x-t.width/2*s,r=l=e.y;return[{x:a,y:r},{x:i,y:l}]}},3208:(e,t,a)=>{function n(e,t,a,n){var i=a?r(e,a):e,l=n?r(t,n):t,c=Math.min(i.x-i.width/2,l.x-l.width/2),o=Math.max(i.x+i.width/2,l.x+l.width/2),s=Math.min(i.y-i.height/2,l.y-l.height/2),u=Math.max(i.y+i.height/2,l.y+l.height/2);return o-c<i.width+l.width&&u-s<i.height+l.height}function r(e,t){return{x:e.x-e.width/2-t,y:e.y-e.height/2-t,width:e.width+2*t,height:e.height+2*t}}a.d(t,{e:()=>n})},3156:(e,t,a)=>{a.r(t),a.d(t,{EoDrawCanvas:()=>ge,EoDrawCanvasComponent:()=>Je});var n,r,i,l,c,o,s,u,d,h,v,f,g,p,w,m,k,x,y,b,M,C,E,W,z,N,S,T,R,B,D,L,H,P,A,U,Y,_,I,j,X,F,G,O,q,K,V,J,Q,Z,$,ee,te,ae,ne,re,ie,le,ce,oe,se,ue,de,he,ve,fe,ge,pe=a(4412),we=a(8944),me=a(123),ke=a(592),xe=a(5866),ye=a(1412),be=a(8644),Me=a(5600),Ce=a.n(Me),Ee=a(7672),We=a(8160),ze=a(4516),Ne=(a(48),a(7568)),Se=a(5248),Te=a(1920),Re=a(1252),Be=a.n(Re),De=a(3876),Le=a(8752),He=a(7181),Pe=a(4552),Ae=a(6876),Ue=a(5776),Ye=a(7584),_e=a(8044),Ie=a(7876),je=a(3788),Xe=a(2872),Fe=a(587),Ge=(0,ze.unwrapProvider)("basic.lock-body-scroll"),{defineElement:Oe,property:qe,method:Ke,event:Ve}=(0,Ee.createDecorators)(),Je=Ce().forwardRef($t);i=[Oe("eo-draw-canvas",{styleTexts:[Ye.c]})],l=qe({attribute:!1}),o=qe({attribute:!1}),u=qe({attribute:!1}),h=qe({attribute:!1}),f=qe({attribute:!1}),p=qe({type:Boolean}),m=qe({type:Boolean}),x=qe({type:Boolean}),b=qe({type:Boolean}),C=qe({attribute:!1}),W=Ve({type:"activeTarget.change"}),T=Ve({type:"node.move"}),L=Ve({type:"cell.move"}),U=Ve({type:"cell.resize"}),j=Ve({type:"node.delete"}),O=Ve({type:"cell.delete"}),J=Ve({type:"cell.contextmenu"}),ee=Ve({type:"decorator.text.change"}),re=Ve({type:"scale.change"}),oe=Ke(),se=Ke(),ue=Ke(),de=Ke(),he=Ke(),ve=Ke();var Qe=new WeakMap,Ze=new WeakMap,$e=new WeakMap,et=new WeakMap,tt=new WeakMap,at=new WeakMap,nt=new WeakMap,rt=new WeakMap,it=new WeakMap,lt=new WeakMap,ct=new WeakMap,ot=new WeakMap,st=new WeakMap,ut=new WeakMap,dt=new WeakMap,ht=new WeakMap,vt=new WeakMap,ft=new WeakMap,gt=new WeakMap,pt=new WeakMap,wt=new WeakMap,mt=new WeakMap,kt=new WeakMap,xt=new WeakMap,yt=new WeakMap,bt=new WeakMap,Mt=new WeakMap,Ct=new WeakMap,Et=new WeakMap,Wt=new WeakMap,zt=new WeakMap,Nt=new WeakMap,St=new WeakMap,Tt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap,Dt=new WeakMap;class Lt extends We.ReactNextElement{constructor(){super(...arguments),(0,me.c)(this,Rt,{get:Zt,set:Qt}),(0,me.c)(this,Nt,{get:Jt,set:Vt}),(0,me.c)(this,Et,{get:Kt,set:qt}),(0,me.c)(this,bt,{get:Ot,set:Gt}),(0,me.c)(this,xt,{get:Ft,set:Xt}),(0,me.c)(this,wt,{get:jt,set:It}),(0,me.c)(this,ft,{get:_t,set:Yt}),(0,me.c)(this,ht,{get:Ut,set:At}),(0,me.c)(this,ot,{get:Pt,set:Ht}),(0,me.c)(this,Qe,{writable:!0,value:(n(this),c(this))}),(0,me.c)(this,Ze,{writable:!0,value:s(this,[20,20])}),(0,me.c)(this,$e,{writable:!0,value:d(this)}),(0,me.c)(this,et,{writable:!0,value:v(this)}),(0,me.c)(this,tt,{writable:!0,value:g(this)}),(0,me.c)(this,at,{writable:!0,value:w(this)}),(0,me.c)(this,nt,{writable:!0,value:k(this,!0)}),(0,me.c)(this,rt,{writable:!0,value:y(this,!0)}),(0,me.c)(this,it,{writable:!0,value:M(this,!0)}),(0,me.c)(this,lt,{writable:!0,value:E(this)}),(0,me.c)(this,ct,{writable:!0,value:z(this)}),(0,me.c)(this,st,{writable:!0,value:e=>{(0,ye.c)(this,ot).emit(e)}}),(0,me.c)(this,ut,{writable:!0,value:e=>{(0,Pe.M)(e,this.activeTarget)||(this.activeTarget=e)}}),(0,me.c)(this,dt,{writable:!0,value:R(this)}),(0,me.c)(this,vt,{writable:!0,value:H(this)}),(0,me.c)(this,gt,{writable:!0,value:e=>{(0,ye.c)(this,ft).emit(e),"node"===e.type&&(0,ye.c)(this,ht).emit(e)}}),(0,me.c)(this,pt,{writable:!0,value:Y(this)}),(0,me.c)(this,mt,{writable:!0,value:e=>{(0,ye.c)(this,wt).emit(e)}}),(0,me.c)(this,kt,{writable:!0,value:X(this)}),(0,me.c)(this,yt,{writable:!0,value:q(this)}),(0,me.c)(this,Mt,{writable:!0,value:e=>{(0,ye.c)(this,bt).emit(e),"node"===e.type&&(0,ye.c)(this,xt).emit(e)}}),(0,me.c)(this,Ct,{writable:!0,value:Q(this)}),(0,me.c)(this,Wt,{writable:!0,value:e=>{(0,ye.c)(this,Et).emit(e)}}),(0,me.c)(this,zt,{writable:!0,value:te(this)}),(0,me.c)(this,St,{writable:!0,value:e=>{(0,ye.c)(this,Nt).emit(e)}}),(0,me.c)(this,Tt,{writable:!0,value:ie(this)}),(0,me.c)(this,Bt,{writable:!0,value:e=>{(0,ye.c)(this,Rt).emit(e)}}),(0,me.c)(this,Dt,{writable:!0,value:(0,Me.createRef)()})}get cells(){return(0,ye.c)(this,Qe)}set cells(e){(0,xe.c)(this,Qe,e)}get defaultNodeSize(){return(0,ye.c)(this,Ze)}set defaultNodeSize(e){(0,xe.c)(this,Ze,e)}get defaultNodeBricks(){return(0,ye.c)(this,$e)}set defaultNodeBricks(e){(0,xe.c)(this,$e,e)}get defaultEdgeLines(){return(0,ye.c)(this,et)}set defaultEdgeLines(e){(0,xe.c)(this,et,e)}get activeTarget(){return(0,ye.c)(this,tt)}set activeTarget(e){(0,xe.c)(this,tt,e)}get fadeUnrelatedCells(){return(0,ye.c)(this,at)}set fadeUnrelatedCells(e){(0,xe.c)(this,at,e)}get zoomable(){return(0,ye.c)(this,nt)}set zoomable(e){(0,xe.c)(this,nt,e)}get scrollable(){return(0,ye.c)(this,rt)}set scrollable(e){(0,xe.c)(this,rt,e)}get pannable(){return(0,ye.c)(this,it)}set pannable(e){(0,xe.c)(this,it,e)}get scaleRange(){return(0,ye.c)(this,lt)}set scaleRange(e){(0,xe.c)(this,lt,e)}dropNode(e){var t=this;return(0,we.c)((function*(){var a,n,{id:r,position:i,size:l,data:c,useBrick:o}=e;if(null===(a=(n=document).elementsFromPoint)||void 0===a||null===(a=a.call(n,i[0],i[1]))||void 0===a?void 0:a.includes(t)){var s,u,d,h=t.getBoundingClientRect(),v=(0,ye.c)(t,Dt).current.getTransform(),f={type:"node",id:r,view:{x:(i[0]-h.left-v.x)/v.k,y:(i[1]-h.top-v.y)/v.k,width:null!==(s=null==l?void 0:l[0])&&void 0!==s?s:t.defaultNodeSize[0],height:null!==(u=null==l?void 0:l[1])&&void 0!==u?u:t.defaultNodeSize[0]},data:c,useBrick:o};return null===(d=(0,ye.c)(t,Dt).current)||void 0===d||d.dropNode(f),f}return null}))()}dropDecorator(e){var t=this;return(0,we.c)((function*(){var a,n,{position:r,decorator:i,text:l}=e;if(null===(a=(n=document).elementsFromPoint)||void 0===a||null===(a=a.call(n,r[0],r[1]))||void 0===a?void 0:a.includes(t)){var c,o=t.getBoundingClientRect(),s=(0,ye.c)(t,Dt).current.getTransform(),u={type:"decorator",decorator:i,id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),view:{x:(r[0]-o.left-s.x)/s.k,y:(r[1]-o.top-s.y)/s.k,width:100,height:60,text:l}};return null===(c=(0,ye.c)(t,Dt).current)||void 0===c||c.dropDecorator(u),u}return null}))()}addNodes(e){var t=this;return(0,we.c)((function*(){if(0===e.length)return[];var a=e.map((e=>{var a,n,{size:r,useBrick:i,id:l,data:c}=e;return{type:"node",id:l,data:c,view:{width:null!==(a=null==r?void 0:r[0])&&void 0!==a?a:t.defaultNodeSize[0],height:null!==(n=null==r?void 0:r[1])&&void 0!==n?n:t.defaultNodeSize[0]},useBrick:i}}));return(0,ye.c)(t,Dt).current.addNodes(a,{defaultNodeSize:t.defaultNodeSize,canvasHeight:t.clientHeight})}))()}addEdge(e){var t=this;return(0,we.c)((function*(){var a,{source:n,target:r,data:i}=e,l={type:"edge",source:n,target:r,data:i};return null===(a=(0,ye.c)(t,Dt).current)||void 0===a||a.addEdge(l),l}))()}manuallyConnectNodes(e){return(0,ye.c)(this,Dt).current.manuallyConnectNodes(e)}updateCells(e,t){var a=this;return(0,we.c)((function*(){var n=(0,ye.c)(a,Dt).current.getTransform(),{cells:r,updated:i}=(0,Xe.s)((0,pe.c)((0,pe.c)({},t),{},{cells:e,defaultNodeSize:a.defaultNodeSize,canvasHeight:a.clientHeight,transform:n}));return(0,ye.c)(a,Dt).current.updateCells(r),{updated:i}}))()}disconnectedCallback(){super.disconnectedCallback(),Ge(this,!1)}render(){return Ce().createElement(Je,{host:this,ref:(0,ye.c)(this,Dt),cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,ye.c)(this,st),onSwitchActiveTarget:(0,ye.c)(this,ut),onCellMove:(0,ye.c)(this,gt),onCellResize:(0,ye.c)(this,mt),onCellDelete:(0,ye.c)(this,Mt),onCellContextMenu:(0,ye.c)(this,Wt),onDecoratorTextChange:(0,ye.c)(this,St),onScaleChange:(0,ye.c)(this,Bt)})}}function Ht(e){S(this,e)}function Pt(){return N(this)}function At(e){D(this,e)}function Ut(){return B(this)}function Yt(e){A(this,e)}function _t(){return P(this)}function It(e){I(this,e)}function jt(){return _(this)}function Xt(e){G(this,e)}function Ft(){return F(this)}function Gt(e){V(this,e)}function Ot(){return K(this)}function qt(e){$(this,e)}function Kt(){return Z(this)}function Vt(e){ne(this,e)}function Jt(){return ae(this)}function Qt(e){ce(this,e)}function Zt(){return le(this)}function $t(e,t){var{host:a,cells:n,defaultNodeSize:r,defaultNodeBricks:i,defaultEdgeLines:l,activeTarget:c,fadeUnrelatedCells:o,zoomable:s,scrollable:u,pannable:d,scaleRange:h,onActiveTargetChange:v,onSwitchActiveTarget:f,onCellMove:g,onCellResize:p,onCellDelete:w,onCellContextMenu:m,onDecoratorTextChange:k,onScaleChange:x}=e,[{cells:y},b]=(0,Me.useReducer)(De.M,n,(e=>({cells:(0,Ie.S)(e,{defaultNodeSize:r})}))),M=(0,Me.useRef)(null),C=(0,Me.useRef)(null),E=(0,Me.useRef)(null),[W,z]=(0,Me.useState)([]),[N,S]=(0,Me.useState)(!1),[T,R]=(0,Me.useState)({k:1,x:0,y:0}),[B,D]=(0,Me.useState)(!1);(0,Me.useEffect)((()=>{x(T.k)}),[x,T.k]);var[L,H]=(0,Me.useState)(null),P=(0,Me.useMemo)((()=>null!=h?h:[.5,2]),[h]),A=(0,Me.useMemo)((()=>(0,Te.AT)()),[]);(0,Me.useEffect)((()=>{var e=!1;A.scaleExtent(s?P:[1,1]).on("start",(()=>{e=!1,S(!0)})).on("zoom",(t=>{e=!0,R(t.transform)})).on("end",(()=>{S(!1),e||null==f||f(null)}))}),[f,P,s,A]),(0,Me.useEffect)((()=>{var e=M.current;if(e){var t=(0,Se.c)(e),a=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(s||u||d)return(s||u)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),u&&(e.preventDefault(),A.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(A).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null).on("mousedown.zoom",null),d||t.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),a;a()}}),[d,u,s,A]),(0,Me.useEffect)((()=>{var e=M.current;if(0!==y.length&&e&&!B){var{k:t,x:a,y:n}=(0,je.c)(y,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:s?P:void 0});A.transform((0,Se.c)(e),new Te.O(t,a,n)),D(!0)}}),[y,B,P,s,A]),(0,Me.useImperativeHandle)(t,(()=>({dropNode(e){b({type:"drop-node",payload:e})},dropDecorator(e){b({type:"drop-decorator",payload:e})},addNodes(e,t){var{defaultNodeSize:a,canvasHeight:n}=t,r=y.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,i=[...y.slice(0,r),...e,...y.slice(r)],{cells:l,updated:c}=(0,Xe.s)({cells:i,defaultNodeSize:a,canvasHeight:n,transform:T});return b({type:"update-cells",payload:l}),c.filter((t=>e.includes(t)))},addEdge(e){b({type:"add-edge",payload:e})},updateCells(e){b({type:"update-cells",payload:e})},getTransform:()=>T,manuallyConnectNodes(e){var t=y.find((t=>(0,He.G4)(t)&&t.id===e));if(t){var a=M.current.getBoundingClientRect();return H({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[a.left,a.top]}),new Promise(((e,t)=>{E.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[y,T]);var U=(0,Me.useCallback)(((e,t)=>{for(var a,n=0;n<y.length;n++){var r=y[n];if((0,He.G4)(r)&&r.id!==e.source.id&&r.view.x<t[0]&&r.view.x+r.view.width>t[0]&&r.view.y<t[1]&&r.view.y+r.view.height>t[1]){var i;null===(i=E.current)||void 0===i||i.resolve({source:e.source,target:r});break}}null===(a=E.current)||void 0===a||a.reject(null),H(null)}),[y]);(0,Me.useEffect)((()=>{Ge(a,!!L)}),[L,a]);var Y=null!=c?c:null,[_,I]=(0,Me.useState)(Y);(0,Me.useEffect)((()=>{I((e=>(0,Pe.M)(e,Y)?e:Y))}),[Y]);var j=(0,Me.useRef)(!1);(0,Me.useEffect)((()=>{j.current?v(_):j.current=!0}),[_,v]);var[X,F]=(0,Me.useState)([]);(0,Me.useEffect)((()=>{var e=o?(0,Fe.Y)(y,_):[];F((t=>0===t.length&&0===e.length?t:e))}),[_,y,o]),(0,Me.useEffect)((()=>{if(_){var e=e=>{e.composedPath().indexOf(C.current)<=0&&I(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[_]),(0,Me.useEffect)((()=>{var e=M.current;if(e&&!(W.length>0)){var t=e=>{var t=(0,Ae.Y)(e,{cells:y,activeTarget:_});"delete-cell"===(null==t?void 0:t.action)&&w(t.cell)};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}}),[_,y,W.length,w]);var G=(0,Me.useMemo)((()=>"".concat((0,Ne.uniqueId)("diagram-"),"-")),[]),O="".concat(G,"line-arrow-"),q="".concat(O,"1"),K=(0,Me.useCallback)((e=>{b({type:"move-cell",payload:e})}),[]),V=(0,Me.useCallback)((e=>{b({type:"move-cell",payload:e}),g(e)}),[g]),J=(0,Me.useCallback)((e=>{b({type:"resize-cell",payload:e})}),[]),Q=(0,Me.useCallback)((e=>{b({type:"resize-cell",payload:e}),p(e)}),[p]),Z=(0,Me.useCallback)((e=>{var{id:t,editing:a}=e;z(a?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]);return Ce().createElement("svg",{width:"100%",height:"100%",ref:M,className:Be()("root",{grabbing:N,pannable:d}),tabIndex:-1},Ce().createElement("defs",null,Ce().createElement(Le.y,{id:q,type:"arrow",strokeColor:"gray"})),Ce().createElement("g",{transform:"translate(".concat(T.x," ").concat(T.y,") scale(").concat(T.k,")")},Ce().createElement("g",{className:"cells",ref:C},y.map((e=>Ce().createElement(Ue.s,{key:"".concat(e.type,":").concat("edge"===e.type?"".concat(e.source,"~").concat(e.target):e.id),cell:e,cells:y,defaultNodeBricks:i,defaultEdgeLines:l,transform:T,markerEnd:q,active:(0,Pe.M)(_,e),unrelatedCells:X,onCellMoving:K,onCellMoved:V,onCellResizing:J,onCellResized:Q,onSwitchActiveTarget:f,onCellContextMenu:m,onDecoratorTextChange:k,onDecoratorTextEditing:Z})))),Ce().createElement(_e.E,{connectLineState:L,transform:T,markerEnd:q,onConnect:U})))}fe=Lt,({e:[c,s,d,v,g,w,k,y,M,E,z,N,S,R,B,D,H,P,A,Y,_,I,X,F,G,q,K,V,Q,Z,$,te,ae,ne,ie,le,ce,n],c:[ge,r]}=(0,be.c)(fe,[[l,1,"cells"],[o,1,"defaultNodeSize"],[u,1,"defaultNodeBricks"],[h,1,"defaultEdgeLines"],[f,1,"activeTarget"],[p,1,"fadeUnrelatedCells"],[m,1,"zoomable"],[x,1,"scrollable"],[b,1,"pannable"],[C,1,"scaleRange"],[W,1,"activeTargetChangeEvent",e=>(0,ye.c)(e,ct),(e,t)=>(0,xe.c)(e,ct,t)],[T,1,"nodeMoveEvent",e=>(0,ye.c)(e,dt),(e,t)=>(0,xe.c)(e,dt,t)],[L,1,"cellMoveEvent",e=>(0,ye.c)(e,vt),(e,t)=>(0,xe.c)(e,vt,t)],[U,1,"cellResizeEvent",e=>(0,ye.c)(e,pt),(e,t)=>(0,xe.c)(e,pt,t)],[j,1,"nodeDelete",e=>(0,ye.c)(e,kt),(e,t)=>(0,xe.c)(e,kt,t)],[O,1,"cellDelete",e=>(0,ye.c)(e,yt),(e,t)=>(0,xe.c)(e,yt,t)],[J,1,"cellContextMenu",e=>(0,ye.c)(e,Ct),(e,t)=>(0,xe.c)(e,Ct,t)],[ee,1,"decoratorTextChange",e=>(0,ye.c)(e,zt),(e,t)=>(0,xe.c)(e,zt,t)],[re,1,"scaleChange",e=>(0,ye.c)(e,Tt),(e,t)=>(0,xe.c)(e,Tt,t)],[oe,2,"dropNode"],[se,2,"dropDecorator"],[ue,2,"addNodes"],[de,2,"addEdge"],[he,2,"manuallyConnectNodes"],[ve,2,"updateCells"]],i,0,(e=>Dt.has((0,ke.c)(e))),We.ReactNextElement)),r()}}]);
|
|
2
|
+
//# sourceMappingURL=eo-draw-canvas.bfc19b1c.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/eo-draw-canvas.bfc19b1c.js","mappings":"oKAYO,SAASA,EAAeC,GAIO,IAChCC,GAL0B,GAC9BC,EAAE,KACFC,EAAI,YACJC,GACqBJ,EAGrB,OAAQG,GACN,IAAK,OACHF,EAAYI,EACZ,MACF,IAAK,OACHJ,EAAYK,EACZ,MACF,QACEL,EAAYM,EAGhB,OAAOC,IAAAA,cAACP,EAAS,CAACC,GAAIA,EAAIE,YAAaA,GACzC,CAEA,SAASG,EAAWE,GAGsB,IAHrB,GACnBP,EAAE,YACFE,GACyBK,EACzB,OACED,IAAAA,cAAA,UACEN,GAAIA,EACJQ,QAAQ,UACRC,KAAM,EACNC,KAAM,EACNC,YAAa,EACbC,aAAc,EACdC,OAAO,qBACPC,eAAe,SAEfR,IAAAA,cAAA,QACES,EAAE,gCACFC,OAAQd,EACRe,YAAa,EACbC,KAAMhB,IAId,CAEA,SAASC,EAA6BgB,GAGI,IAHH,GACrCnB,EAAE,YACFE,GACyBiB,EACzB,OACEb,IAAAA,cAAA,UACEN,GAAIA,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AAAxR,GAAAiE,IAAA,CAAAvG,GAAA,gBAAA8T,IAAA1O,EAAAA,GAAAA,GAAA0O,EAAArR,IAAA,CAAAqR,EAAAvN,KAAAC,EAAAA,GAAAA,GAAAsN,EAAArR,GAAA8D,IAAA,CAAAtG,GAAA,eAAAC,GAAA,oBAAAC,GAAA,eAAAC,GAAA,cAAAC,GAAA,2BAAAC,GAAA,kBAAA7B,EAAA,GAAAsV,GAAAnR,GAAAoR,KAAAC,EAAAA,GAAAA,GAAAF,KAjR0BjR,GAAAA,mBAAgB8Q,G","sources":["webpack:///./src/diagram/MarkerComponent.tsx","webpack:///./src/diagram/lines/getDirectLinePoints.ts","webpack:///./src/diagram/processors/doTwoNodesOverlap.ts","webpack:///./src/draw-canvas/index.tsx"],"sourcesContent":["import React from \"react\";\nimport type { LineMarkerType } from \"./interfaces\";\n\nexport interface MarkerComponentProps extends BaseMarkerComponentProps {\n type: LineMarkerType;\n}\n\nexport interface BaseMarkerComponentProps {\n id: string;\n strokeColor?: string;\n}\n\nexport function MarkerComponent({\n id,\n type,\n strokeColor,\n}: MarkerComponentProps): JSX.Element {\n let Component: (props: BaseMarkerComponentProps) => JSX.Element;\n\n switch (type) {\n case \"0..1\":\n Component = EntityRelationZeroOrOneMarker;\n break;\n case \"0..N\":\n Component = EntityRelationZeroOrManyMarker;\n break;\n default:\n Component = ArrowMarker;\n }\n\n return <Component id={id} strokeColor={strokeColor} />;\n}\n\nfunction ArrowMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 6 6\"\n refX={5}\n refY={3}\n markerWidth={6}\n markerHeight={6}\n orient=\"auto-start-reverse\"\n strokeLinejoin=\"round\"\n >\n <path\n d=\"M 0.5 0.5 L 5.5 3 L 0.5 5.5 z\"\n stroke={strokeColor}\n strokeWidth={1}\n fill={strokeColor}\n />\n </marker>\n );\n}\n\nfunction EntityRelationZeroOrOneMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 21 11\"\n refX={0.5}\n refY={5.5}\n markerWidth={21}\n markerHeight={11}\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 15.5 0.5 V 10.5 M 10.5 5.5 H 20.5\"\n stroke={strokeColor}\n strokeWidth={1}\n fill=\"none\"\n />\n </marker>\n );\n}\n\nfunction EntityRelationZeroOrManyMarker({\n id,\n strokeColor,\n}: BaseMarkerComponentProps): JSX.Element {\n return (\n <marker\n id={id}\n viewBox=\"0 0 21 11\"\n refX={0.5}\n refY={5.5}\n markerWidth={21}\n markerHeight={11}\n orient=\"auto-start-reverse\"\n >\n <path\n d=\"M 5.5 5.5 m 5 0 a 5 5 0 1 0 -10 0 a 5 5 0 1 0 10 0 M 20.5 0.5 L 10.5 5.5 L 20.5 10.5 M 10.5 5.5 H 20.5\"\n stroke={strokeColor}\n strokeWidth={1}\n fill=\"none\"\n />\n </marker>\n );\n}\n","import type { NodePosition, NodeRect } from \"../interfaces\";\nimport { doTwoNodesOverlap } from \"../processors/doTwoNodesOverlap\";\n\nexport function getDirectLinePoints(\n source: NodeRect,\n target: NodeRect\n): NodePosition[] | null {\n // Ignore if two nodes are the same.\n // Ignore if two nodes overlap.\n if (source === target || doTwoNodesOverlap(source, target, 0, 0)) {\n return null;\n }\n\n const dx = target.x - source.x;\n const dy = target.y - source.y;\n\n let x0: number, y0: number, x1: number, y1: number;\n const directionX = dx > 0 ? 1 : -1;\n if (dy !== 0) {\n const deltaRadio = Math.abs(dx / dy);\n const directionY = dy > 0 ? 1 : -1;\n const sourceRadio = source.width / source.height;\n if (deltaRadio < sourceRadio) {\n x0 = source.x + ((deltaRadio * source.height) / 2) * directionX;\n y0 = source.y + (source.height / 2) * directionY;\n } else {\n x0 = source.x + (source.width / 2) * directionX;\n y0 = source.y + (source.width / 2 / deltaRadio) * directionY;\n }\n const targetRadio = target.width / target.height;\n if (deltaRadio < targetRadio) {\n x1 = target.x - ((deltaRadio * target.height) / 2) * directionX;\n y1 = target.y - (target.height / 2) * directionY;\n } else {\n x1 = target.x - (target.width / 2) * directionX;\n y1 = target.y - (target.width / 2 / deltaRadio) * directionY;\n }\n } else {\n x0 = source.x + (source.width / 2) * directionX;\n x1 = target.x - (target.width / 2) * directionX;\n y0 = y1 = source.y;\n }\n\n return [\n { x: x0, y: y0 },\n { x: x1, y: y1 },\n ];\n}\n","import type { NodeRect } from \"../interfaces\";\n\nexport function doTwoNodesOverlap(\n a: NodeRect,\n b: NodeRect,\n paddingA: number,\n paddingB: number\n): boolean {\n const A = paddingA ? getNodesWithPadding(a, paddingA) : a;\n const B = paddingB ? getNodesWithPadding(b, paddingB) : b;\n const left = Math.min(A.x - A.width / 2, B.x - B.width / 2);\n const right = Math.max(A.x + A.width / 2, B.x + B.width / 2);\n const top = Math.min(A.y - A.height / 2, B.y - B.height / 2);\n const bottom = Math.max(A.y + A.height / 2, B.y + B.height / 2);\n return right - left < A.width + B.width && bottom - top < A.height + B.height;\n}\n\nfunction getNodesWithPadding(node: NodeRect, padding: number) {\n return {\n x: node.x - node.width / 2 - padding,\n y: node.y - node.height / 2 - padding,\n width: node.width + padding * 2,\n height: node.height + padding * 2,\n };\n}\n","import React, {\n createRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport type { UseSingleBrickConf } from \"@next-core/react-runtime\";\nimport { unwrapProvider } from \"@next-core/utils/general\";\nimport \"@next-core/theme\";\nimport { uniqueId } from \"lodash\";\nimport { select } from \"d3-selection\";\nimport { ZoomTransform, zoom } from \"d3-zoom\";\nimport classNames from \"classnames\";\nimport type { lockBodyScroll as _lockBodyScroll } from \"@next-bricks/basic/data-providers/lock-body-scroll/lock-body-scroll\";\nimport type {\n PositionTuple,\n RangeTuple,\n SizeTuple,\n TransformLiteral,\n} from \"../diagram/interfaces\";\nimport type {\n ActiveTarget,\n Cell,\n EdgeCell,\n InitialCell,\n NodeBrickConf,\n NodeCell,\n NodeId,\n DecoratorCell,\n DecoratorType,\n CellContextMenuDetail,\n ConnectLineState,\n Deferred,\n ConnectNodesDetail,\n EdgeLineConf,\n DecoratorTextChangeDetail,\n NodeView,\n} from \"./interfaces\";\nimport { rootReducer } from \"./reducers\";\nimport { MarkerComponent } from \"../diagram/MarkerComponent\";\nimport { isNodeCell } from \"./processors/asserts\";\nimport type { MoveCellPayload, ResizeCellPayload } from \"./reducers/interfaces\";\nimport { sameTarget } from \"./processors/sameTarget\";\nimport { handleKeyboard } from \"./processors/handleKeyboard\";\nimport { CellComponent } from \"./CellComponent\";\nimport styleText from \"./styles.shadow.css\";\nimport { ConnectLineComponent } from \"./ConnectLineComponent\";\nimport { initializeCells } from \"./processors/initializeCells\";\nimport { transformToCenter } from \"./processors/transformToCenter\";\nimport { updateCells } from \"./processors/updateCells\";\nimport { getUnrelatedCells } from \"./processors/getUnrelatedCells\";\n\nconst DEFAULT_NODE_SIZE = 20;\nconst DEFAULT_AREA_WIDTH = 100;\nconst DEFAULT_AREA_HEIGHT = 60;\nconst DEFAULT_SCALE_RANGE_MIN = 0.5;\nconst DEFAULT_SCALE_RANGE_MAX = 2;\n\nconst lockBodyScroll = unwrapProvider<typeof _lockBodyScroll>(\n \"basic.lock-body-scroll\"\n);\n\nconst { defineElement, property, method, event } = createDecorators();\n\nexport interface EoDrawCanvasProps {\n cells: InitialCell[] | undefined;\n defaultNodeSize: SizeTuple;\n defaultNodeBricks?: NodeBrickConf[];\n defaultEdgeLines?: EdgeLineConf[];\n activeTarget?: ActiveTarget | null;\n fadeUnrelatedCells?: boolean;\n zoomable?: boolean;\n scrollable?: boolean;\n pannable?: boolean;\n scaleRange?: RangeTuple;\n}\n\nexport interface DropNodeInfo extends AddNodeInfo {\n /** [PointerEvent::clientX, PointerEvent::clientY] */\n position: PositionTuple;\n}\n\nexport interface DropDecoratorInfo {\n decorator: DecoratorType;\n /** [PointerEvent::clientX, PointerEvent::clientY] */\n position: PositionTuple;\n text?: string;\n}\n\nexport interface AddNodeInfo {\n id: NodeId;\n useBrick?: UseSingleBrickConf;\n data?: unknown;\n size?: SizeTuple;\n}\n\nexport interface AddEdgeInfo {\n source: NodeId;\n target: NodeId;\n data?: unknown;\n}\n\nexport interface UpdateCellsContext {\n reason: \"add-related-nodes\";\n parent: NodeId;\n}\n\nexport interface AddNodesContext {\n defaultNodeSize: SizeTuple;\n canvasHeight: number;\n}\n\nexport const EoDrawCanvasComponent = React.forwardRef(\n LegacyEoDrawCanvasComponent\n);\n\n/**\n * 用于手工绘图的画布。\n *\n * 注意:将配套另外一个用于展示的画布构件。\n */\nexport\n@defineElement(\"eo-draw-canvas\", {\n styleTexts: [styleText],\n})\nclass EoDrawCanvas extends ReactNextElement implements EoDrawCanvasProps {\n /**\n * 仅当初始化时使用,渲染后重新设置 `cells` 将无效。\n */\n @property({ attribute: false })\n accessor cells: InitialCell[] | undefined;\n\n @property({ attribute: false })\n accessor defaultNodeSize: SizeTuple = [DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE];\n\n @property({ attribute: false })\n accessor defaultNodeBricks: NodeBrickConf[] | undefined;\n\n /**\n * 使用条件判断设置默认的边对应的连线。在 `if` 表达式中 `DATA` 为 `{ edge }`,例如:\n *\n * ```yaml\n * defaultEdgeLines:\n * - if: <% DATA.edge.data?.virtual %>\n * dashed: true\n * ```\n */\n @property({ attribute: false })\n accessor defaultEdgeLines: EdgeLineConf[] | undefined;\n\n @property({ attribute: false })\n accessor activeTarget: ActiveTarget | null | undefined;\n\n @property({ type: Boolean })\n accessor fadeUnrelatedCells: boolean | undefined;\n\n @property({ type: Boolean })\n accessor zoomable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor scrollable: boolean | undefined = true;\n\n @property({ type: Boolean })\n accessor pannable: boolean | undefined = true;\n\n @property({ attribute: false })\n accessor scaleRange: RangeTuple | undefined;\n\n @event({ type: \"activeTarget.change\" })\n accessor #activeTargetChangeEvent!: EventEmitter<ActiveTarget | null>;\n\n #handleActiveTargetChange = (target: ActiveTarget | null) => {\n this.#activeTargetChangeEvent.emit(target);\n };\n\n #handleSwitchActiveTarget = (target: ActiveTarget | null) => {\n if (!sameTarget(target, this.activeTarget)) {\n this.activeTarget = target;\n }\n };\n\n /**\n * @deprecated Use `cell.move` instead.\n */\n @event({ type: \"node.move\" })\n accessor #nodeMoveEvent!: EventEmitter<MoveCellPayload>;\n\n @event({ type: \"cell.move\" })\n accessor #cellMoveEvent!: EventEmitter<MoveCellPayload>;\n\n #handleCellMove = (info: MoveCellPayload) => {\n this.#cellMoveEvent.emit(info);\n if (info.type === \"node\") {\n this.#nodeMoveEvent.emit(info);\n }\n };\n\n @event({ type: \"cell.resize\" })\n accessor #cellResizeEvent!: EventEmitter<ResizeCellPayload>;\n\n #handleCellResize = (info: ResizeCellPayload) => {\n this.#cellResizeEvent.emit(info);\n };\n\n /**\n * @deprecated Use `cell.delete` instead.\n */\n @event({ type: \"node.delete\" })\n accessor #nodeDelete!: EventEmitter<Cell>;\n\n @event({ type: \"cell.delete\" })\n accessor #cellDelete!: EventEmitter<Cell>;\n\n #handleCellDelete = (cell: Cell) => {\n this.#cellDelete.emit(cell);\n if (cell.type === \"node\") {\n this.#nodeDelete.emit(cell);\n }\n };\n\n @event({ type: \"cell.contextmenu\" })\n accessor #cellContextMenu!: EventEmitter<CellContextMenuDetail>;\n\n #handleCellContextMenu = (detail: CellContextMenuDetail) => {\n this.#cellContextMenu.emit(detail);\n };\n\n @event({ type: \"decorator.text.change\" })\n accessor #decoratorTextChange!: EventEmitter<DecoratorTextChangeDetail>;\n\n #handleDecoratorTextChange = (detail: DecoratorTextChangeDetail) => {\n this.#decoratorTextChange.emit(detail);\n };\n\n /**\n * 缩放变化后,从素材库拖拽元素进画布时,拖拽图像应设置对应的缩放比例。\n */\n @event({ type: \"scale.change\" })\n accessor #scaleChange!: EventEmitter<number>;\n\n #handleScaleChange = (scale: number) => {\n this.#scaleChange.emit(scale);\n };\n\n @method()\n async dropNode({\n id,\n position,\n size,\n data,\n useBrick,\n }: DropNodeInfo): Promise<NodeCell | null> {\n // Drag and then drop a node\n const droppedInside = document\n .elementsFromPoint?.(position[0], position[1])\n ?.includes(this);\n if (droppedInside) {\n const boundingClientRect = this.getBoundingClientRect();\n const transform = this.#canvasRef.current!.getTransform();\n const newNode: NodeCell = {\n type: \"node\",\n id,\n view: {\n x:\n (position[0] - boundingClientRect.left - transform.x) / transform.k,\n y: (position[1] - boundingClientRect.top - transform.y) / transform.k,\n width: size?.[0] ?? this.defaultNodeSize[0],\n height: size?.[1] ?? this.defaultNodeSize[0],\n },\n data,\n useBrick,\n };\n this.#canvasRef.current?.dropNode(newNode);\n return newNode;\n }\n return null;\n }\n\n @method()\n async dropDecorator({\n position,\n decorator,\n text,\n }: DropDecoratorInfo): Promise<DecoratorCell | null> {\n // Drag and then drop a node\n const droppedInside = document\n .elementsFromPoint?.(position[0], position[1])\n ?.includes(this);\n if (droppedInside) {\n const boundingClientRect = this.getBoundingClientRect();\n const transform = this.#canvasRef.current!.getTransform();\n const newDecorator: DecoratorCell = {\n type: \"decorator\",\n decorator,\n id: uuidV4(),\n view: {\n x:\n (position[0] - boundingClientRect.left - transform.x) / transform.k,\n y: (position[1] - boundingClientRect.top - transform.y) / transform.k,\n width: DEFAULT_AREA_WIDTH,\n height: DEFAULT_AREA_HEIGHT,\n text,\n },\n };\n this.#canvasRef.current?.dropDecorator(newDecorator);\n return newDecorator;\n }\n return null;\n }\n\n @method()\n async addNodes(nodes: AddNodeInfo[]): Promise<NodeCell[]> {\n if (nodes.length === 0) {\n return [];\n }\n const newNodes = nodes.map<NodeCell>(({ size, useBrick, id, data }) => ({\n type: \"node\",\n id,\n data,\n view: {\n width: size?.[0] ?? this.defaultNodeSize[0],\n height: size?.[1] ?? this.defaultNodeSize[0],\n } as NodeView,\n useBrick,\n }));\n return this.#canvasRef.current!.addNodes(newNodes, {\n defaultNodeSize: this.defaultNodeSize,\n canvasHeight: this.clientHeight,\n });\n }\n\n @method()\n async addEdge({ source, target, data }: AddEdgeInfo): Promise<EdgeCell> {\n const newEdge: EdgeCell = {\n type: \"edge\",\n source,\n target,\n data,\n };\n this.#canvasRef.current?.addEdge(newEdge);\n return newEdge;\n }\n\n @method()\n manuallyConnectNodes(source: NodeId): Promise<ConnectNodesDetail> {\n return this.#canvasRef.current!.manuallyConnectNodes(source);\n }\n\n @method()\n async updateCells(\n cells: InitialCell[],\n ctx?: UpdateCellsContext\n ): Promise<{ updated: Cell[] }> {\n const transform = this.#canvasRef.current!.getTransform();\n const { cells: newCells, updated } = updateCells({\n ...ctx,\n cells,\n defaultNodeSize: this.defaultNodeSize,\n canvasHeight: this.clientHeight,\n transform,\n });\n this.#canvasRef.current!.updateCells(newCells);\n return { updated };\n }\n\n #canvasRef = createRef<DrawCanvasRef>();\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n lockBodyScroll(this, false);\n }\n\n render() {\n return (\n <EoDrawCanvasComponent\n host={this}\n ref={this.#canvasRef}\n cells={this.cells}\n defaultNodeSize={this.defaultNodeSize}\n defaultNodeBricks={this.defaultNodeBricks}\n defaultEdgeLines={this.defaultEdgeLines}\n activeTarget={this.activeTarget}\n fadeUnrelatedCells={this.fadeUnrelatedCells}\n zoomable={this.zoomable}\n scrollable={this.scrollable}\n pannable={this.pannable}\n scaleRange={this.scaleRange}\n onActiveTargetChange={this.#handleActiveTargetChange}\n onSwitchActiveTarget={this.#handleSwitchActiveTarget}\n onCellMove={this.#handleCellMove}\n onCellResize={this.#handleCellResize}\n onCellDelete={this.#handleCellDelete}\n onCellContextMenu={this.#handleCellContextMenu}\n onDecoratorTextChange={this.#handleDecoratorTextChange}\n onScaleChange={this.#handleScaleChange}\n />\n );\n }\n}\n\nexport interface EoDrawCanvasComponentProps extends EoDrawCanvasProps {\n host: HTMLElement;\n onActiveTargetChange(target: ActiveTarget | null): void;\n onSwitchActiveTarget(target: ActiveTarget | null): void;\n onCellMove(info: MoveCellPayload): void;\n onCellResize(cell: ResizeCellPayload): void;\n onCellDelete(cell: Cell): void;\n onCellContextMenu(detail: CellContextMenuDetail): void;\n onDecoratorTextChange(detail: DecoratorTextChangeDetail): void;\n onScaleChange(scale: number): void;\n}\n\nexport interface DrawCanvasRef {\n dropNode(node: NodeCell): void;\n dropDecorator(decorator: DecoratorCell): void;\n addNodes(nodes: NodeCell[], ctx: AddNodesContext): NodeCell[];\n addEdge(edge: EdgeCell): void;\n manuallyConnectNodes(source: NodeId): Promise<ConnectNodesDetail>;\n updateCells(cells: Cell[]): void;\n getTransform(): TransformLiteral;\n}\n\nfunction LegacyEoDrawCanvasComponent(\n {\n host,\n cells: initialCells,\n defaultNodeSize,\n defaultNodeBricks,\n defaultEdgeLines,\n activeTarget: _activeTarget,\n fadeUnrelatedCells,\n zoomable,\n scrollable,\n pannable,\n scaleRange: _scaleRange,\n onActiveTargetChange,\n onSwitchActiveTarget,\n onCellMove,\n onCellResize,\n onCellDelete,\n onCellContextMenu,\n onDecoratorTextChange,\n onScaleChange,\n }: EoDrawCanvasComponentProps,\n ref: React.Ref<DrawCanvasRef>\n) {\n const [{ cells }, dispatch] = useReducer(\n rootReducer,\n initialCells,\n (initialCells) => ({\n cells: initializeCells(initialCells, { defaultNodeSize }),\n })\n );\n\n const rootRef = useRef<SVGSVGElement>(null);\n const cellsRef = useRef<SVGGElement>(null);\n const manualConnectDeferredRef = useRef<Deferred<ConnectNodesDetail> | null>(\n null\n );\n const [editingTexts, setEditingTexts] = useState<string[]>([]);\n const [grabbing, setGrabbing] = useState(false);\n const [transform, setTransform] = useState<TransformLiteral>({\n k: 1,\n x: 0,\n y: 0,\n });\n const [centered, setCentered] = useState(false);\n\n useEffect(() => {\n onScaleChange(transform.k);\n }, [onScaleChange, transform.k]);\n\n const [connectLineState, setConnectLineState] =\n useState<ConnectLineState | null>(null);\n\n const scaleRange = useMemo(\n () =>\n _scaleRange ??\n ([DEFAULT_SCALE_RANGE_MIN, DEFAULT_SCALE_RANGE_MAX] as RangeTuple),\n [_scaleRange]\n );\n\n const zoomer = useMemo(() => zoom<SVGSVGElement, unknown>(), []);\n\n // istanbul ignore next: d3-zoom currently hard to test\n useEffect(() => {\n let moved = false;\n zoomer\n .scaleExtent(zoomable ? scaleRange : [1, 1])\n .on(\"start\", () => {\n moved = false;\n setGrabbing(true);\n })\n .on(\"zoom\", (e: { transform: TransformLiteral }) => {\n moved = true;\n setTransform(e.transform);\n })\n .on(\"end\", () => {\n setGrabbing(false);\n if (!moved) {\n onSwitchActiveTarget?.(null);\n }\n });\n }, [onSwitchActiveTarget, scaleRange, zoomable, zoomer]);\n\n // istanbul ignore next: d3-zoom currently hard to test\n useEffect(() => {\n const root = rootRef.current;\n if (!root) {\n return;\n }\n\n const rootSelection = select(root);\n\n const unsetZoom = () => {\n rootSelection\n .on(\".zoom\", null)\n .on(\".zoom.custom\", null)\n .on(\"wheel\", null);\n };\n\n if (!(zoomable || scrollable || pannable)) {\n unsetZoom();\n return;\n }\n\n if (zoomable || scrollable) {\n // Do not override default d3 zoom handler.\n // Only handles *panning*\n rootSelection.on(\n \"wheel.zoom.custom\",\n (e: WheelEvent & { wheelDeltaX: number; wheelDeltaY: number }) => {\n // Mac OS trackpad pinch event is emitted as a wheel.zoom and d3.event.ctrlKey set to true\n if (!e.ctrlKey) {\n // Stop immediate propagation for default d3 zoom handler\n e.stopImmediatePropagation();\n if (scrollable) {\n e.preventDefault();\n zoomer.translateBy(\n rootSelection,\n e.wheelDeltaX / 5,\n e.wheelDeltaY / 5\n );\n }\n }\n // zoomer.scaleBy(rootSelection, Math.pow(2, defaultWheelDelta(e)))\n }\n );\n }\n\n rootSelection\n .call(zoomer)\n .on(\"wheel\", (e: WheelEvent) => e.preventDefault())\n .on(\"dblclick.zoom\", null)\n .on(\"mousedown.zoom\", null);\n\n if (!pannable) {\n rootSelection\n .on(\"touchstart.zoom\", null)\n .on(\"touchmove.zoom\", null)\n .on(\"touchend.zoom\", null);\n }\n\n return unsetZoom;\n }, [pannable, scrollable, zoomable, zoomer]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (cells.length === 0 || !root || centered) {\n return;\n }\n const { k, x, y } = transformToCenter(cells, {\n canvasWidth: root.clientWidth,\n canvasHeight: root.clientHeight,\n scaleRange: zoomable ? scaleRange : undefined,\n });\n // istanbul ignore next\n if (process.env.NODE_ENV !== \"test\") {\n // jsdom doesn't support svg baseVal yet.\n // https://github.com/jsdom/jsdom/issues/2531\n zoomer.transform(select(root), new ZoomTransform(k, x, y));\n }\n setCentered(true);\n }, [cells, centered, scaleRange, zoomable, zoomer]);\n\n useImperativeHandle(\n ref,\n () => ({\n dropNode(node) {\n dispatch({ type: \"drop-node\", payload: node });\n },\n dropDecorator(decorator) {\n dispatch({ type: \"drop-decorator\", payload: decorator });\n },\n addNodes(nodes, { defaultNodeSize, canvasHeight }: AddNodesContext) {\n const index =\n cells.findLastIndex(\n (cell) => !(cell.type === \"decorator\" && cell.decorator === \"text\")\n ) + 1;\n const newCells = [\n ...cells.slice(0, index),\n ...nodes,\n ...cells.slice(index),\n ];\n const { cells: allCells, updated } = updateCells({\n cells: newCells,\n defaultNodeSize,\n canvasHeight,\n transform,\n });\n dispatch({ type: \"update-cells\", payload: allCells });\n return updated.filter((node) =>\n nodes.includes(node as NodeCell)\n ) as NodeCell[];\n },\n addEdge(edge) {\n dispatch({ type: \"add-edge\", payload: edge });\n },\n updateCells(cells) {\n dispatch({ type: \"update-cells\", payload: cells });\n },\n getTransform() {\n return transform;\n },\n manuallyConnectNodes(sourceId) {\n const source = cells.find(\n (cell) => isNodeCell(cell) && cell.id === sourceId\n ) as NodeCell | undefined;\n if (source) {\n const rect = rootRef.current!.getBoundingClientRect();\n setConnectLineState({\n source,\n from: [\n source.view.x + source.view.width / 2,\n source.view.y + source.view.height / 2,\n ],\n offset: [rect.left, rect.top],\n });\n const promise = new Promise<ConnectNodesDetail>((resolve, reject) => {\n manualConnectDeferredRef.current = { resolve, reject };\n });\n return promise;\n }\n return Promise.reject(null);\n },\n }),\n [cells, transform]\n );\n\n const handleConnect = useCallback(\n (state: ConnectLineState, to: PositionTuple) => {\n // Find the target node from top bo bottom,\n // detect whether the pointer is inside the target node.\n for (let i = 0; i < cells.length; i++) {\n const cell = cells[i];\n // Currently ignore connecting to self\n if (isNodeCell(cell) && cell.id !== state.source.id) {\n if (\n cell.view.x < to[0] &&\n cell.view.x + cell.view.width > to[0] &&\n cell.view.y < to[1] &&\n cell.view.y + cell.view.height > to[1]\n ) {\n manualConnectDeferredRef.current?.resolve({\n source: state.source,\n target: cell,\n });\n break;\n }\n }\n }\n manualConnectDeferredRef.current?.reject(null);\n setConnectLineState(null);\n },\n [cells]\n );\n\n useEffect(() => {\n lockBodyScroll(host, !!connectLineState);\n }, [connectLineState, host]);\n\n const newActiveTarget = _activeTarget ?? null;\n const [activeTarget, setActiveTarget] = useState<ActiveTarget | null>(\n newActiveTarget\n );\n\n useEffect(() => {\n setActiveTarget((previous) =>\n sameTarget(previous, newActiveTarget) ? previous : newActiveTarget\n );\n }, [newActiveTarget]);\n\n const activeTargetChangeInitialized = useRef(false);\n useEffect(() => {\n if (!activeTargetChangeInitialized.current) {\n activeTargetChangeInitialized.current = true;\n return;\n }\n onActiveTargetChange(activeTarget);\n }, [activeTarget, onActiveTargetChange]);\n\n const [unrelatedCells, setUnrelatedCells] = useState<Cell[]>([]);\n useEffect(() => {\n const nextUnrelated = fadeUnrelatedCells\n ? getUnrelatedCells(cells, activeTarget)\n : [];\n // Do not update the state when prev and next are both empty.\n setUnrelatedCells((prev) =>\n prev.length === 0 && nextUnrelated.length === 0 ? prev : nextUnrelated\n );\n }, [activeTarget, cells, fadeUnrelatedCells]);\n\n useEffect(() => {\n if (!activeTarget) {\n return;\n }\n const resetActiveTarget = (e: MouseEvent) => {\n const path = e.composedPath();\n const cellsContainerIndex = path.indexOf(cellsRef.current!);\n // Reset active target to null when clicking outside of the cells container,\n // Or inside the cells container but not on any cell.\n if (cellsContainerIndex <= 0) {\n setActiveTarget(null);\n }\n };\n document.addEventListener(\"click\", resetActiveTarget);\n return () => {\n document.removeEventListener(\"click\", resetActiveTarget);\n };\n }, [activeTarget]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root || editingTexts.length > 0) {\n return;\n }\n const onKeydown = (event: KeyboardEvent) => {\n const action = handleKeyboard(event, {\n cells,\n activeTarget,\n });\n\n if (action?.action === \"delete-cell\") {\n onCellDelete(action.cell);\n }\n };\n root.addEventListener(\"keydown\", onKeydown);\n return () => {\n root.removeEventListener(\"keydown\", onKeydown);\n };\n }, [activeTarget, cells, editingTexts.length, onCellDelete]);\n\n const defPrefix = useMemo(() => `${uniqueId(\"diagram-\")}-`, []);\n const markerPrefix = `${defPrefix}line-arrow-`;\n const markerEnd = `${markerPrefix}1`;\n\n const handleCellMoving = useCallback((info: MoveCellPayload) => {\n dispatch({ type: \"move-cell\", payload: info });\n }, []);\n\n const handleCellMoved = useCallback(\n (info: MoveCellPayload) => {\n dispatch({ type: \"move-cell\", payload: info });\n onCellMove(info);\n },\n [onCellMove]\n );\n\n const handleCellResizing = useCallback((info: ResizeCellPayload) => {\n dispatch({ type: \"resize-cell\", payload: info });\n }, []);\n\n const handleCellResized = useCallback(\n (info: ResizeCellPayload) => {\n dispatch({ type: \"resize-cell\", payload: info });\n onCellResize(info);\n },\n [onCellResize]\n );\n\n const handleDecoratorTextEditing = useCallback(\n ({ id, editing }: { id: string; editing: boolean }) => {\n if (editing) {\n setEditingTexts((texts) =>\n texts.includes(id) ? texts : [...texts, id]\n );\n } else {\n setEditingTexts((texts) => texts.filter((text) => text !== id));\n }\n },\n []\n );\n\n return (\n <svg\n width=\"100%\"\n height=\"100%\"\n ref={rootRef}\n className={classNames(\"root\", { grabbing, pannable })}\n tabIndex={-1}\n >\n <defs>\n <MarkerComponent id={markerEnd} type=\"arrow\" strokeColor=\"gray\" />\n </defs>\n <g\n transform={`translate(${transform.x} ${transform.y}) scale(${transform.k})`}\n >\n <g className=\"cells\" ref={cellsRef}>\n {cells.map((cell) => (\n <CellComponent\n key={`${cell.type}:${cell.type === \"edge\" ? `${cell.source}~${cell.target}` : cell.id}`}\n cell={cell}\n cells={cells}\n defaultNodeBricks={defaultNodeBricks}\n defaultEdgeLines={defaultEdgeLines}\n transform={transform}\n markerEnd={markerEnd}\n active={sameTarget(activeTarget, cell)}\n unrelatedCells={unrelatedCells}\n onCellMoving={handleCellMoving}\n onCellMoved={handleCellMoved}\n onCellResizing={handleCellResizing}\n onCellResized={handleCellResized}\n onSwitchActiveTarget={onSwitchActiveTarget}\n onCellContextMenu={onCellContextMenu}\n onDecoratorTextChange={onDecoratorTextChange}\n onDecoratorTextEditing={handleDecoratorTextEditing}\n />\n ))}\n </g>\n <ConnectLineComponent\n connectLineState={connectLineState}\n transform={transform}\n markerEnd={markerEnd}\n onConnect={handleConnect}\n />\n </g>\n </svg>\n );\n}\n\nfunction uuidV4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n"],"names":["MarkerComponent","_ref","Component","id","type","strokeColor","EntityRelationZeroOrOneMarker","EntityRelationZeroOrManyMarker","ArrowMarker","React","_ref2","viewBox","refX","refY","markerWidth","markerHeight","orient","strokeLinejoin","d","stroke","strokeWidth","fill","_ref3","_ref4","getDirectLinePoints","source","target","doTwoNodesOverlap","x0","y0","x1","y1","dx","x","dy","y","directionX","deltaRadio","Math","abs","directionY","width","height","a","b","paddingA","paddingB","A","getNodesWithPadding","B","left","min","right","max","top","bottom","node","padding","_EoDrawCanvas","lockBodyScroll","unwrapProvider","defineElement","property","method","event","createDecorators","EoDrawCanvasComponent","LegacyEoDrawCanvasComponent","_classDecs","styleTexts","styleText","_dec","attribute","_dec2","_dec3","_dec4","_dec5","_dec6","Boolean","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_dec14","_dec15","_dec16","_dec17","_dec18","_dec19","_dec20","_dec21","_dec22","_dec23","_dec24","_dec25","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_activeTargetChangeEvent","_handleActiveTargetChange","_handleSwitchActiveTarget","_L","_nodeMoveEvent","_M","_cellMoveEvent","_handleCellMove","_N","_cellResizeEvent","_handleCellResize","_O","_nodeDelete","_P","_cellDelete","_handleCellDelete","_Q","_cellContextMenu","_handleCellContextMenu","_R","_decoratorTextChange","_handleDecoratorTextChange","_S","_scaleChange","_handleScaleChange","_canvasRef","EoDrawCanvas","ReactNextElement","constructor","arguments","_classPrivateFieldInitSpec","get","_get_scaleChange2","set","_set_scaleChange2","_get_decoratorTextChange2","_set_decoratorTextChange2","_get_cellContextMenu2","_set_cellContextMenu2","_get_cellDelete2","_set_cellDelete2","_get_nodeDelete2","_set_nodeDelete2","_get_cellResizeEvent2","_set_cellResizeEvent2","_get_cellMoveEvent2","_set_cellMoveEvent2","_get_nodeMoveEvent2","_set_nodeMoveEvent2","_get_activeTargetChangeEvent2","_set_activeTargetChangeEvent2","writable","value","_initProto","_init_cells","_init_defaultNodeSize","_init_defaultNodeBricks","_init_defaultEdgeLines","_init_activeTarget","_init_fadeUnrelatedCells","_init_zoomable","_init_scrollable","_init_pannable","_init_scaleRange","_init_activeTargetChangeEvent","_classPrivateFieldGet","this","emit","sameTarget","activeTarget","_init_nodeMoveEvent","_init_cellMoveEvent","info","_init_cellResizeEvent","_init_nodeDelete","_init_cellDelete","cell","_init_cellContextMenu","detail","_init_decoratorTextChange","_init_scaleChange","scale","createRef","cells","v","_classPrivateFieldSet","defaultNodeSize","defaultNodeBricks","defaultEdgeLines","fadeUnrelatedCells","zoomable","scrollable","pannable","scaleRange","dropNode","_this","_asyncToGenerator","_document$elementsFro","_document","position","size","data","useBrick","document","elementsFromPoint","call","includes","_size$","_size$2","_classPrivateFieldGet2","boundingClientRect","getBoundingClientRect","transform","current","getTransform","newNode","view","k","dropDecorator","_this2","_document$elementsFro2","_document2","decorator","text","_classPrivateFieldGet3","newDecorator","replace","c","r","random","toString","addNodes","nodes","_this3","length","newNodes","map","_size$3","_size$4","canvasHeight","clientHeight","addEdge","_this4","_classPrivateFieldGet4","newEdge","manuallyConnectNodes","updateCells","ctx","_this5","newCells","updated","_objectSpread","disconnectedCallback","super","render","host","ref","onActiveTargetChange","onSwitchActiveTarget","onCellMove","onCellResize","onCellDelete","onCellContextMenu","onDecoratorTextChange","onScaleChange","_set_activeTargetChangeEvent","_get_activeTargetChangeEvent","_set_nodeMoveEvent","_get_nodeMoveEvent","_set_cellMoveEvent","_get_cellMoveEvent","_set_cellResizeEvent","_get_cellResizeEvent","_set_nodeDelete","_get_nodeDelete","_set_cellDelete","_get_cellDelete","_set_cellContextMenu","_get_cellContextMenu","_set_decoratorTextChange","_get_decoratorTextChange","_set_scaleChange","_get_scaleChange","_ref5","initialCells","_activeTarget","_scaleRange","dispatch","useReducer","rootReducer","initializeCells","rootRef","useRef","cellsRef","manualConnectDeferredRef","editingTexts","setEditingTexts","useState","grabbing","setGrabbing","setTransform","centered","setCentered","useEffect","connectLineState","setConnectLineState","useMemo","zoomer","zoom","moved","scaleExtent","on","e","root","rootSelection","select","unsetZoom","ctrlKey","stopImmediatePropagation","preventDefault","translateBy","wheelDeltaX","wheelDeltaY","transformToCenter","canvasWidth","clientWidth","undefined","ZoomTransform","useImperativeHandle","payload","_ref6","index","findLastIndex","slice","allCells","filter","edge","sourceId","find","isNodeCell","rect","from","offset","Promise","resolve","reject","handleConnect","useCallback","state","to","_manualConnectDeferre2","i","_manualConnectDeferre","newActiveTarget","setActiveTarget","previous","activeTargetChangeInitialized","unrelatedCells","setUnrelatedCells","nextUnrelated","getUnrelatedCells","prev","resetActiveTarget","composedPath","indexOf","addEventListener","removeEventListener","onKeydown","action","handleKeyboard","defPrefix","concat","uniqueId","markerPrefix","markerEnd","handleCellMoving","handleCellMoved","handleCellResizing","handleCellResized","handleDecoratorTextEditing","_ref7","editing","texts","className","classNames","tabIndex","CellComponent","key","active","onCellMoving","onCellMoved","onCellResizing","onCellResized","onDecoratorTextEditing","ConnectLineComponent","onConnect","_EoDrawCanvas2","_initClass","_applyDecs","o","_","has","_checkInRHS"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var e,t,r,n,a,o,l,i,c,u,f,d,s,h,p,m,b,v,g,x,y,P,k,w={5480:(e,t,r)=>{Promise.all([r.e(3664),r.e(3132),r.e(5600),r.e(4516),r.e(7672),r.e(580),r.e(6960),r.e(5949),r.e(8020),r.e(9560),r.e(5676)]).then(r.bind(r,5676))}},j={};function S(e){var t=j[e];if(void 0!==t)return t.exports;var r=j[e]={id:e,loaded:!1,exports:{}};return w[e].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}S.m=w,S.c=j,S.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return S.d(t,{a:t}),t},S.d=(e,t)=>{for(var r in t)S.o(t,r)&&!S.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},S.f={},S.e=e=>Promise.all(Object.keys(S.f).reduce(((t,r)=>(S.f[r](e,t),t)),[])),S.u=e=>"chunks/"+e+"."+{242:"4bd90af0",580:"b1068458",632:"0c3947c5",788:"1e25450f",820:"83e05b04",824:"7c38c2ae",856:"8fe14637",1024:"b2fb4d97",1340:"19db159b",1372:"ddfaca58",1564:"dad51f47",1692:"29aa03b8",1772:"b9709e8a",1776:"6541feaf",1832:"80a95bcd",2356:"69ab211e",2584:"ac91a299",2976:"375fa83c",3132:"ccc1512e",3322:"63bf67fe",3664:"63190754",3680:"88310087",3748:"11a3041f",3752:"da97f490",3811:"8484a1b6",3968:"f63a8d5a",4068:"648adfd6",4516:"11f11c42",4524:"801d1c14",4847:"5cfb4368",5244:"1437dfdf",5356:"ec95af1d",5600:"f37375b9",5668:"ff11ba54",5676:"194219e1",5949:"f70f95aa",6064:"62257333",6192:"e969705a",6228:"1f4beffe",6352:"a1d077df",6408:"1aa0e97e",6736:"1db5763e",6960:"9646963d",7228:"fa4c35d3",7476:"2dcc0be8",7672:"00049a5a",7861:"a4c43abf",7928:"6eb9a99a",8020:"7d347956",8060:"a4decb5e",8440:"ce0da377",8644:"2e72c575",8648:"55f9fafb",8732:"9c55a3ea",8944:"952fed91",9560:"c7502aca",9604:"acb35426",9672:"f50edcea"}[e]+".js",S.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),S.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@next-bricks/diagram:",S.l=(r,n,a,o)=>{if(e[r])e[r].push(n);else{var l,i;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var f=c[u];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+a){l=f;break}}l||(i=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,S.nc&&l.setAttribute("nonce",S.nc),l.setAttribute("data-webpack",t+a),l.src=r),e[r]=[n];var d=(t,n)=>{l.onerror=l.onload=null,clearTimeout(s);var a=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(n))),t)return t(n)},s=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),i&&document.head.appendChild(l)}},S.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{S.S={};var e={},t={};S.I=(r,n)=>{n||(n=[]);var a=t[r];if(a||(a=t[r]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[r])return e[r];S.o(S.S,r)||(S.S[r]={});var o=S.S[r],l="@next-bricks/diagram",i=(e,t,r,n)=>{var a=o[e]=o[e]||{},i=a[t];(!i||!i.loaded&&(!n!=!i.eager?n:l>i.from))&&(a[t]={get:r,from:l,eager:!!n})},c=[];return"default"===r&&(i("@babel/parser","7.23.9",(()=>S.e(6228).then((()=>()=>S(6228))))),i("@easyops-cn/brick-next-pipes","0.6.0",(()=>Promise.all([S.e(8648),S.e(632)]).then((()=>()=>S(8648))))),i("@next-core/cook","2.2.12",(()=>Promise.all([S.e(1832),S.e(1692)]).then((()=>()=>S(1832))))),i("@next-core/element","1.2.2",(()=>S.e(6192).then((()=>()=>S(6192))))),i("@next-core/http","1.1.9",(()=>S.e(8732).then((()=>()=>S(8732))))),i("@next-core/i18n","1.0.38",(()=>Promise.all([S.e(4516),S.e(1340),S.e(788),S.e(820)]).then((()=>()=>S(820))))),i("@next-core/inject","1.0.28",(()=>Promise.all([S.e(9604),S.e(4068),S.e(6064)]).then((()=>()=>S(6064))))),i("@next-core/loader","1.5.4",(()=>S.e(1372).then((()=>()=>S(3752))))),i("@next-core/pipes","2.0.16",(()=>S.e(4524).then((()=>()=>S(4524))))),i("@next-core/react-element","1.0.21",(()=>Promise.all([S.e(5600),S.e(7672),S.e(3748),S.e(7228)]).then((()=>()=>S(7228))))),i("@next-core/react-runtime","1.1.52",(()=>Promise.all([S.e(5600),S.e(6960),S.e(242)]).then((()=>()=>S(7861))))),i("@next-core/runtime","1.31.1",(()=>Promise.all([S.e(3322),S.e(4516),S.e(9604),S.e(9672),S.e(1340),S.e(824),S.e(2584),S.e(8944)]).then((()=>()=>S(3322))))),i("@next-core/supply","2.1.11",(()=>Promise.all([S.e(9604),S.e(4068),S.e(9672),S.e(1024)]).then((()=>()=>S(1024))))),i("@next-core/theme","1.4.8",(()=>Promise.all([S.e(8060),S.e(856)]).then((()=>()=>S(8060))))),i("@next-core/utils/general","1.6.10",(()=>S.e(6408).then((()=>()=>S(6408))))),i("@next-core/utils/storyboard","1.6.10",(()=>Promise.all([S.e(4516),S.e(824),S.e(5356)]).then((()=>()=>S(5356))))),i("history","4.10.1",(()=>S.e(1776).then((()=>()=>S(1776))))),i("i18next-browser-languagedetector","7.2.0",(()=>S.e(1564).then((()=>()=>S(1564))))),i("i18next","22.5.1",(()=>S.e(5244).then((()=>()=>S(5244))))),i("js-yaml","3.14.1",(()=>S.e(1772).then((()=>()=>S(1772))))),i("lodash","4.17.21",(()=>S.e(7928).then((()=>()=>S(7928))))),i("moment/locale/zh-cn.js","2.29.4",(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(9748))))),i("moment","2.29.4",(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(6023))))),i("react-dom","0.0.0-experimental-ee8509801-20230117",(()=>Promise.all([S.e(2356),S.e(5600)]).then((()=>()=>S(2356))))),i("react","0.0.0-experimental-ee8509801-20230117",(()=>S.e(5668).then((()=>()=>S(5668)))))),e[r]=c.length?Promise.all(c).then((()=>e[r]=1)):1}}})(),(()=>{var e;S.g.importScripts&&(e=S.g.location+"");var t=S.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),S.p=e+"../"})(),r=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},n=(e,t)=>{e=r(e),t=r(t);for(var n=0;;){if(n>=e.length)return n<t.length&&"u"!=(typeof t[n])[0];var a=e[n],o=(typeof a)[0];if(n>=t.length)return"u"==o;var l=t[n],i=(typeof l)[0];if(o!=i)return"o"==o&&"n"==i||"s"==i||"u"==o;if("o"!=o&&"u"!=o&&a!=l)return a<l;n++}},a=e=>{var t=e[0],r="";if(1===e.length)return"*";if(t+.5){r+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,r+="u"==(typeof(i=e[o]))[0]?"-":(n>0?".":"")+(n=2,i);return r}var l=[];for(o=1;o<e.length;o++){var i=e[o];l.push(0===i?"not("+c()+")":1===i?"("+c()+" || "+c()+")":2===i?l.pop()+" "+l.pop():a(i))}return c();function c(){return l.pop().replace(/^\((.+)\)$/,"$1")}},o=(e,t)=>{if(0 in e){t=r(t);var n=e[0],a=n<0;a&&(n=-n-1);for(var l=0,i=1,c=!0;;i++,l++){var u,f,d=i<e.length?(typeof e[i])[0]:"";if(l>=t.length||"o"==(f=(typeof(u=t[l]))[0]))return!c||("u"==d?i>n&&!a:""==d!=a);if("u"==f){if(!c||"u"!=d)return!1}else if(c)if(d==f)if(i<=n){if(u!=e[i])return!1}else{if(a?u>e[i]:u<e[i])return!1;u!=e[i]&&(c=!1)}else if("s"!=d&&"n"!=d){if(a||i<=n)return!1;c=!1,i--}else{if(i<=n||f<d!=a)return!1;c=!1}else"s"!=d&&"n"!=d&&(c=!1,i--)}}var s=[],h=s.pop.bind(s);for(l=1;l<e.length;l++){var p=e[l];s.push(1==p?h()|h():2==p?h()&h():p?o(p,t):!h())}return!!h()},l=(e,t)=>{var r=e[t];return(t=Object.keys(r).reduce(((e,t)=>!e||n(e,t)?t:e),0))&&r[t]},i=(e,t)=>{var r=e[t];return Object.keys(r).reduce(((e,t)=>!e||!r[e].loaded&&n(e,t)?t:e),0)},c=(e,t,r,n)=>"Unsatisfied version "+r+" from "+(r&&e[t][r].from)+" of shared singleton module "+t+" (required "+a(n)+")",u=(e,t,r,n)=>{var a=i(e,r);return h(e[r][a])},f=(e,t,r,n)=>{var a=i(e,r);return o(n,a)||s(c(e,r,a,n)),h(e[r][a])},d=(e,t,r)=>{var a=e[t];return(t=Object.keys(a).reduce(((e,t)=>!o(r,t)||e&&!n(e,t)?e:t),0))&&a[t]},s=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},h=e=>(e.loaded=1,e.get()),m=(p=e=>function(t,r,n,a){var o=S.I(t);return o&&o.then?o.then(e.bind(e,t,S.S[t],r,n,a)):e(t,S.S[t],r,n,a)})(((e,t,r,n)=>t&&S.o(t,r)?h(l(t,r)):n())),b=p(((e,t,r,n)=>t&&S.o(t,r)?u(t,0,r):n())),v=p(((e,t,r,n,a)=>t&&S.o(t,r)?f(t,0,r,n):a())),g=p(((e,t,r,n,a)=>{var o=t&&S.o(t,r)&&d(t,r,n);return o?h(o):a()})),x={},y={5600:()=>g("default","react",[6,0,0,0,,"experimental-ee8509801-20230117"],(()=>S.e(5668).then((()=>()=>S(5668))))),4516:()=>v("default","@next-core/utils/general",[1,1,6,10],(()=>S.e(6408).then((()=>()=>S(6408))))),7672:()=>g("default","@next-core/element",[1,1,2,2],(()=>S.e(3811).then((()=>()=>S(6192))))),48:()=>v("default","@next-core/theme",[1,1,4,8],(()=>S.e(8060).then((()=>()=>S(8060))))),8160:()=>g("default","@next-core/react-element",[1,1,0,21],(()=>Promise.all([S.e(3748),S.e(4847)]).then((()=>()=>S(7228))))),6960:()=>v("default","@next-core/runtime",[1,1,31,1],(()=>Promise.all([S.e(3322),S.e(4516),S.e(9604),S.e(9672),S.e(1340),S.e(824),S.e(2584)]).then((()=>()=>S(3322))))),6196:()=>g("default","@next-core/react-runtime",[1,1,1,52],(()=>S.e(7861).then((()=>()=>S(7861))))),7568:()=>b("default","lodash",(()=>S.e(7928).then((()=>()=>S(7928))))),5800:()=>v("default","@next-core/http",[1,1,0,6],(()=>S.e(6352).then((()=>()=>S(8732))))),2096:()=>v("default","moment",[1,2,27,0],(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(6023))))),6712:()=>v("default","js-yaml",[1,3,14,0],(()=>S.e(1772).then((()=>()=>S(1772))))),7224:()=>v("default","lodash",[1,4,17,19],(()=>S.e(7928).then((()=>()=>S(7928))))),1692:()=>v("default","@babel/parser",[1,7,23,9],(()=>S.e(6228).then((()=>()=>S(6228))))),1340:()=>v("default","@next-core/i18n",[1,1,0,38],(()=>Promise.all([S.e(788),S.e(8440)]).then((()=>()=>S(820))))),2196:()=>v("default","i18next",[1,22,5,1],(()=>S.e(5244).then((()=>()=>S(5244))))),2592:()=>v("default","i18next-browser-languagedetector",[1,7,2,0],(()=>S.e(1564).then((()=>()=>S(1564))))),9604:()=>v("default","lodash",[1,4,17,21],(()=>S.e(7928).then((()=>()=>S(7928))))),4068:()=>v("default","@next-core/pipes",[1,2,0,16],(()=>S.e(4524).then((()=>()=>S(4524))))),8828:()=>v("default","@easyops-cn/brick-next-pipes",[2,0,6,0],(()=>Promise.all([S.e(8648),S.e(632)]).then((()=>()=>S(8648))))),5856:()=>m("default","react-dom",(()=>S.e(2356).then((()=>()=>S(2356))))),8924:()=>g("default","react-dom",[6,0,0,0,,"experimental-ee8509801-20230117"],(()=>S.e(2356).then((()=>()=>S(2356))))),9672:()=>v("default","moment",[1,2,30,1],(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(6023))))),824:()=>v("default","@next-core/cook",[1,2,2,12],(()=>Promise.all([S.e(1832),S.e(1692)]).then((()=>()=>S(1832))))),3608:()=>v("default","@next-core/loader",[1,1,5,4],(()=>S.e(3752).then((()=>()=>S(3752))))),5796:()=>v("default","@next-core/inject",[1,1,0,28],(()=>Promise.all([S.e(4068),S.e(3680)]).then((()=>()=>S(6064))))),5832:()=>v("default","@next-core/http",[1,1,1,9],(()=>S.e(3968).then((()=>()=>S(8732))))),6700:()=>v("default","@next-core/utils/storyboard",[1,1,6,10],(()=>S.e(2976).then((()=>()=>S(5356))))),6776:()=>v("default","@next-core/supply",[1,2,1,11],(()=>Promise.all([S.e(4068),S.e(8644)]).then((()=>()=>S(1024))))),7676:()=>v("default","history",[1,4,10,1],(()=>S.e(1776).then((()=>()=>S(1776))))),8989:()=>v("default","moment/locale/zh-cn.js",[1,2,30,1],(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(9748)))))},P={580:[48,8160],632:[2096,6712,7224],788:[2196,2592],824:[824],1340:[1340],1692:[1692],2584:[3608,5796,5832,6700,6776,7676,8989],3748:[5856,8924],4068:[4068],4516:[4516],4524:[8828],5600:[5600],5949:[6196,7568],6960:[6960],7672:[7672],8020:[5800],9604:[9604],9672:[9672]},k={},S.f.consumes=(e,t)=>{S.o(P,e)&&P[e].forEach((e=>{if(S.o(x,e))return t.push(x[e]);if(!k[e]){var r=t=>{x[e]=0,S.m[e]=r=>{delete S.c[e],r.exports=t()}};k[e]=!0;var n=t=>{delete x[e],S.m[e]=r=>{throw delete S.c[e],t}};try{var a=y[e]();a.then?t.push(x[e]=a.then(r).catch(n)):r(a)}catch(e){n(e)}}}))},(()=>{var e={1590:0};S.f.j=(t,r)=>{var n=S.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(5(600|80|949)|96(04|72)|(169|63|767)2|(374|406|78)8|1340|2584|4516|6960|824)$/.test(t))e[t]=0;else{var a=new Promise(((r,a)=>n=e[t]=[r,a]));r.push(n[2]=a);var o=S.p+S.u(t),l=new Error;S.l(o,(r=>{if(S.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",l.name="ChunkLoadError",l.type=a,l.request=o,n[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,a,[o,l,i]=r,c=0;if(o.some((t=>0!==e[t]))){for(n in l)S.o(l,n)&&(S.m[n]=l[n]);i&&i(S)}for(t&&t(r);c<o.length;c++)a=o[c],S.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),S.nc=void 0,S(5480)})();
|
|
2
|
-
//# sourceMappingURL=main.
|
|
1
|
+
(()=>{var e,t,r,n,a,o,l,i,c,u,d,f,s,h,p,m,b,v,g,x,y,P,k,w={5480:(e,t,r)=>{Promise.all([r.e(3664),r.e(3132),r.e(5600),r.e(4516),r.e(7672),r.e(580),r.e(6960),r.e(5949),r.e(8020),r.e(9560),r.e(5676)]).then(r.bind(r,5676))}},j={};function S(e){var t=j[e];if(void 0!==t)return t.exports;var r=j[e]={id:e,loaded:!1,exports:{}};return w[e].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}S.m=w,S.c=j,S.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return S.d(t,{a:t}),t},S.d=(e,t)=>{for(var r in t)S.o(t,r)&&!S.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},S.f={},S.e=e=>Promise.all(Object.keys(S.f).reduce(((t,r)=>(S.f[r](e,t),t)),[])),S.u=e=>"chunks/"+e+"."+{242:"4bd90af0",580:"b1068458",632:"0c3947c5",788:"1e25450f",820:"83e05b04",824:"7c38c2ae",856:"8fe14637",1024:"b2fb4d97",1340:"19db159b",1372:"ddfaca58",1564:"dad51f47",1692:"29aa03b8",1772:"b9709e8a",1776:"6541feaf",1832:"80a95bcd",2356:"69ab211e",2584:"ac91a299",2976:"375fa83c",3132:"ccc1512e",3322:"63bf67fe",3664:"63190754",3680:"88310087",3748:"11a3041f",3752:"da97f490",3811:"8484a1b6",3968:"f63a8d5a",4068:"648adfd6",4516:"11f11c42",4524:"801d1c14",4847:"5cfb4368",5244:"1437dfdf",5356:"ec95af1d",5600:"f37375b9",5668:"ff11ba54",5676:"d993ecb2",5949:"f70f95aa",6064:"62257333",6192:"e969705a",6228:"1f4beffe",6352:"a1d077df",6408:"1aa0e97e",6736:"1db5763e",6960:"9646963d",7228:"fa4c35d3",7476:"2dcc0be8",7672:"00049a5a",7861:"a4c43abf",7928:"6eb9a99a",8020:"7d347956",8060:"a4decb5e",8440:"ce0da377",8644:"2e72c575",8648:"55f9fafb",8732:"9c55a3ea",8944:"952fed91",9560:"db223429",9604:"acb35426",9672:"f50edcea"}[e]+".js",S.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),S.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@next-bricks/diagram:",S.l=(r,n,a,o)=>{if(e[r])e[r].push(n);else{var l,i;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+a){l=d;break}}l||(i=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,S.nc&&l.setAttribute("nonce",S.nc),l.setAttribute("data-webpack",t+a),l.src=r),e[r]=[n];var f=(t,n)=>{l.onerror=l.onload=null,clearTimeout(s);var a=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(n))),t)return t(n)},s=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),i&&document.head.appendChild(l)}},S.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{S.S={};var e={},t={};S.I=(r,n)=>{n||(n=[]);var a=t[r];if(a||(a=t[r]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[r])return e[r];S.o(S.S,r)||(S.S[r]={});var o=S.S[r],l="@next-bricks/diagram",i=(e,t,r,n)=>{var a=o[e]=o[e]||{},i=a[t];(!i||!i.loaded&&(!n!=!i.eager?n:l>i.from))&&(a[t]={get:r,from:l,eager:!!n})},c=[];return"default"===r&&(i("@babel/parser","7.23.9",(()=>S.e(6228).then((()=>()=>S(6228))))),i("@easyops-cn/brick-next-pipes","0.6.0",(()=>Promise.all([S.e(8648),S.e(632)]).then((()=>()=>S(8648))))),i("@next-core/cook","2.2.12",(()=>Promise.all([S.e(1832),S.e(1692)]).then((()=>()=>S(1832))))),i("@next-core/element","1.2.2",(()=>S.e(6192).then((()=>()=>S(6192))))),i("@next-core/http","1.1.9",(()=>S.e(8732).then((()=>()=>S(8732))))),i("@next-core/i18n","1.0.38",(()=>Promise.all([S.e(4516),S.e(1340),S.e(788),S.e(820)]).then((()=>()=>S(820))))),i("@next-core/inject","1.0.28",(()=>Promise.all([S.e(9604),S.e(4068),S.e(6064)]).then((()=>()=>S(6064))))),i("@next-core/loader","1.5.4",(()=>S.e(1372).then((()=>()=>S(3752))))),i("@next-core/pipes","2.0.16",(()=>S.e(4524).then((()=>()=>S(4524))))),i("@next-core/react-element","1.0.21",(()=>Promise.all([S.e(5600),S.e(7672),S.e(3748),S.e(7228)]).then((()=>()=>S(7228))))),i("@next-core/react-runtime","1.1.52",(()=>Promise.all([S.e(5600),S.e(6960),S.e(242)]).then((()=>()=>S(7861))))),i("@next-core/runtime","1.31.1",(()=>Promise.all([S.e(3322),S.e(4516),S.e(9604),S.e(9672),S.e(1340),S.e(824),S.e(2584),S.e(8944)]).then((()=>()=>S(3322))))),i("@next-core/supply","2.1.11",(()=>Promise.all([S.e(9604),S.e(4068),S.e(9672),S.e(1024)]).then((()=>()=>S(1024))))),i("@next-core/theme","1.4.8",(()=>Promise.all([S.e(8060),S.e(856)]).then((()=>()=>S(8060))))),i("@next-core/utils/general","1.6.10",(()=>S.e(6408).then((()=>()=>S(6408))))),i("@next-core/utils/storyboard","1.6.10",(()=>Promise.all([S.e(4516),S.e(824),S.e(5356)]).then((()=>()=>S(5356))))),i("history","4.10.1",(()=>S.e(1776).then((()=>()=>S(1776))))),i("i18next-browser-languagedetector","7.2.0",(()=>S.e(1564).then((()=>()=>S(1564))))),i("i18next","22.5.1",(()=>S.e(5244).then((()=>()=>S(5244))))),i("js-yaml","3.14.1",(()=>S.e(1772).then((()=>()=>S(1772))))),i("lodash","4.17.21",(()=>S.e(7928).then((()=>()=>S(7928))))),i("moment/locale/zh-cn.js","2.29.4",(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(9748))))),i("moment","2.29.4",(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(6023))))),i("react-dom","0.0.0-experimental-ee8509801-20230117",(()=>Promise.all([S.e(2356),S.e(5600)]).then((()=>()=>S(2356))))),i("react","0.0.0-experimental-ee8509801-20230117",(()=>S.e(5668).then((()=>()=>S(5668)))))),e[r]=c.length?Promise.all(c).then((()=>e[r]=1)):1}}})(),(()=>{var e;S.g.importScripts&&(e=S.g.location+"");var t=S.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),S.p=e+"../"})(),r=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},n=(e,t)=>{e=r(e),t=r(t);for(var n=0;;){if(n>=e.length)return n<t.length&&"u"!=(typeof t[n])[0];var a=e[n],o=(typeof a)[0];if(n>=t.length)return"u"==o;var l=t[n],i=(typeof l)[0];if(o!=i)return"o"==o&&"n"==i||"s"==i||"u"==o;if("o"!=o&&"u"!=o&&a!=l)return a<l;n++}},a=e=>{var t=e[0],r="";if(1===e.length)return"*";if(t+.5){r+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,r+="u"==(typeof(i=e[o]))[0]?"-":(n>0?".":"")+(n=2,i);return r}var l=[];for(o=1;o<e.length;o++){var i=e[o];l.push(0===i?"not("+c()+")":1===i?"("+c()+" || "+c()+")":2===i?l.pop()+" "+l.pop():a(i))}return c();function c(){return l.pop().replace(/^\((.+)\)$/,"$1")}},o=(e,t)=>{if(0 in e){t=r(t);var n=e[0],a=n<0;a&&(n=-n-1);for(var l=0,i=1,c=!0;;i++,l++){var u,d,f=i<e.length?(typeof e[i])[0]:"";if(l>=t.length||"o"==(d=(typeof(u=t[l]))[0]))return!c||("u"==f?i>n&&!a:""==f!=a);if("u"==d){if(!c||"u"!=f)return!1}else if(c)if(f==d)if(i<=n){if(u!=e[i])return!1}else{if(a?u>e[i]:u<e[i])return!1;u!=e[i]&&(c=!1)}else if("s"!=f&&"n"!=f){if(a||i<=n)return!1;c=!1,i--}else{if(i<=n||d<f!=a)return!1;c=!1}else"s"!=f&&"n"!=f&&(c=!1,i--)}}var s=[],h=s.pop.bind(s);for(l=1;l<e.length;l++){var p=e[l];s.push(1==p?h()|h():2==p?h()&h():p?o(p,t):!h())}return!!h()},l=(e,t)=>{var r=e[t];return(t=Object.keys(r).reduce(((e,t)=>!e||n(e,t)?t:e),0))&&r[t]},i=(e,t)=>{var r=e[t];return Object.keys(r).reduce(((e,t)=>!e||!r[e].loaded&&n(e,t)?t:e),0)},c=(e,t,r,n)=>"Unsatisfied version "+r+" from "+(r&&e[t][r].from)+" of shared singleton module "+t+" (required "+a(n)+")",u=(e,t,r,n)=>{var a=i(e,r);return h(e[r][a])},d=(e,t,r,n)=>{var a=i(e,r);return o(n,a)||s(c(e,r,a,n)),h(e[r][a])},f=(e,t,r)=>{var a=e[t];return(t=Object.keys(a).reduce(((e,t)=>!o(r,t)||e&&!n(e,t)?e:t),0))&&a[t]},s=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},h=e=>(e.loaded=1,e.get()),m=(p=e=>function(t,r,n,a){var o=S.I(t);return o&&o.then?o.then(e.bind(e,t,S.S[t],r,n,a)):e(t,S.S[t],r,n,a)})(((e,t,r,n)=>t&&S.o(t,r)?h(l(t,r)):n())),b=p(((e,t,r,n)=>t&&S.o(t,r)?u(t,0,r):n())),v=p(((e,t,r,n,a)=>t&&S.o(t,r)?d(t,0,r,n):a())),g=p(((e,t,r,n,a)=>{var o=t&&S.o(t,r)&&f(t,r,n);return o?h(o):a()})),x={},y={5600:()=>g("default","react",[6,0,0,0,,"experimental-ee8509801-20230117"],(()=>S.e(5668).then((()=>()=>S(5668))))),4516:()=>v("default","@next-core/utils/general",[1,1,6,10],(()=>S.e(6408).then((()=>()=>S(6408))))),7672:()=>g("default","@next-core/element",[1,1,2,2],(()=>S.e(3811).then((()=>()=>S(6192))))),48:()=>v("default","@next-core/theme",[1,1,4,8],(()=>S.e(8060).then((()=>()=>S(8060))))),8160:()=>g("default","@next-core/react-element",[1,1,0,21],(()=>Promise.all([S.e(3748),S.e(4847)]).then((()=>()=>S(7228))))),6960:()=>v("default","@next-core/runtime",[1,1,31,1],(()=>Promise.all([S.e(3322),S.e(4516),S.e(9604),S.e(9672),S.e(1340),S.e(824),S.e(2584)]).then((()=>()=>S(3322))))),6196:()=>g("default","@next-core/react-runtime",[1,1,1,52],(()=>S.e(7861).then((()=>()=>S(7861))))),7568:()=>b("default","lodash",(()=>S.e(7928).then((()=>()=>S(7928))))),5800:()=>v("default","@next-core/http",[1,1,0,6],(()=>S.e(6352).then((()=>()=>S(8732))))),2096:()=>v("default","moment",[1,2,27,0],(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(6023))))),6712:()=>v("default","js-yaml",[1,3,14,0],(()=>S.e(1772).then((()=>()=>S(1772))))),7224:()=>v("default","lodash",[1,4,17,19],(()=>S.e(7928).then((()=>()=>S(7928))))),1692:()=>v("default","@babel/parser",[1,7,23,9],(()=>S.e(6228).then((()=>()=>S(6228))))),1340:()=>v("default","@next-core/i18n",[1,1,0,38],(()=>Promise.all([S.e(788),S.e(8440)]).then((()=>()=>S(820))))),2196:()=>v("default","i18next",[1,22,5,1],(()=>S.e(5244).then((()=>()=>S(5244))))),2592:()=>v("default","i18next-browser-languagedetector",[1,7,2,0],(()=>S.e(1564).then((()=>()=>S(1564))))),9604:()=>v("default","lodash",[1,4,17,21],(()=>S.e(7928).then((()=>()=>S(7928))))),4068:()=>v("default","@next-core/pipes",[1,2,0,16],(()=>S.e(4524).then((()=>()=>S(4524))))),8828:()=>v("default","@easyops-cn/brick-next-pipes",[2,0,6,0],(()=>Promise.all([S.e(8648),S.e(632)]).then((()=>()=>S(8648))))),5856:()=>m("default","react-dom",(()=>S.e(2356).then((()=>()=>S(2356))))),8924:()=>g("default","react-dom",[6,0,0,0,,"experimental-ee8509801-20230117"],(()=>S.e(2356).then((()=>()=>S(2356))))),9672:()=>v("default","moment",[1,2,30,1],(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(6023))))),824:()=>v("default","@next-core/cook",[1,2,2,12],(()=>Promise.all([S.e(1832),S.e(1692)]).then((()=>()=>S(1832))))),3608:()=>v("default","@next-core/loader",[1,1,5,4],(()=>S.e(3752).then((()=>()=>S(3752))))),5796:()=>v("default","@next-core/inject",[1,1,0,28],(()=>Promise.all([S.e(4068),S.e(3680)]).then((()=>()=>S(6064))))),5832:()=>v("default","@next-core/http",[1,1,1,9],(()=>S.e(3968).then((()=>()=>S(8732))))),6700:()=>v("default","@next-core/utils/storyboard",[1,1,6,10],(()=>S.e(2976).then((()=>()=>S(5356))))),6776:()=>v("default","@next-core/supply",[1,2,1,11],(()=>Promise.all([S.e(4068),S.e(8644)]).then((()=>()=>S(1024))))),7676:()=>v("default","history",[1,4,10,1],(()=>S.e(1776).then((()=>()=>S(1776))))),8989:()=>v("default","moment/locale/zh-cn.js",[1,2,30,1],(()=>Promise.all([S.e(6736),S.e(7476)]).then((()=>()=>S(9748)))))},P={580:[48,8160],632:[2096,6712,7224],788:[2196,2592],824:[824],1340:[1340],1692:[1692],2584:[3608,5796,5832,6700,6776,7676,8989],3748:[5856,8924],4068:[4068],4516:[4516],4524:[8828],5600:[5600],5949:[6196,7568],6960:[6960],7672:[7672],8020:[5800],9604:[9604],9672:[9672]},k={},S.f.consumes=(e,t)=>{S.o(P,e)&&P[e].forEach((e=>{if(S.o(x,e))return t.push(x[e]);if(!k[e]){var r=t=>{x[e]=0,S.m[e]=r=>{delete S.c[e],r.exports=t()}};k[e]=!0;var n=t=>{delete x[e],S.m[e]=r=>{throw delete S.c[e],t}};try{var a=y[e]();a.then?t.push(x[e]=a.then(r).catch(n)):r(a)}catch(e){n(e)}}}))},(()=>{var e={1590:0};S.f.j=(t,r)=>{var n=S.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else if(/^(5(600|80|949)|96(04|72)|(169|63|767)2|(374|406|78)8|1340|2584|4516|6960|824)$/.test(t))e[t]=0;else{var a=new Promise(((r,a)=>n=e[t]=[r,a]));r.push(n[2]=a);var o=S.p+S.u(t),l=new Error;S.l(o,(r=>{if(S.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",l.name="ChunkLoadError",l.type=a,l.request=o,n[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,a,[o,l,i]=r,c=0;if(o.some((t=>0!==e[t]))){for(n in l)S.o(l,n)&&(S.m[n]=l[n]);i&&i(S)}for(t&&t(r);c<o.length;c++)a=o[c],S.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),S.nc=void 0,S(5480)})();
|
|
2
|
+
//# sourceMappingURL=main.954acef8.js.map
|