treege 3.0.0-beta.7 → 3.0.0-beta.70
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/LICENSE +18 -12
- package/README.md +476 -81
- package/dist/DefaultSubmitButton-PXs4TMgX.js +1766 -0
- package/dist/ThemeContext-CdHMLHiw.js +942 -0
- package/dist/editor/components/input/ComboboxWithCreate.d.ts +2 -1
- package/dist/editor/components/styles/EditorStyles.d.ts +2 -0
- package/dist/editor/constants/defaultNode.d.ts +1 -1
- package/dist/editor/constants/edgeTypes.d.ts +3 -2
- package/dist/editor/constants/inputTypeIcons.d.ts +3 -0
- package/dist/editor/constants/nodeSpacing.d.ts +25 -0
- package/dist/editor/constants/nodeTypes.d.ts +4 -5
- package/dist/editor/context/OpenApiContext.d.ts +79 -0
- package/dist/editor/context/TreegeEditorRuntimeProvider.d.ts +78 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/controls/MiniMapControl.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/dialogs/AuthorizeDialog.d.ts +20 -0
- package/dist/editor/features/TreegeEditor/dialogs/ChangeNodeTypeDialog.d.ts +2 -0
- package/dist/editor/features/TreegeEditor/dialogs/DeleteNodeDialog.d.ts +2 -0
- package/dist/editor/features/TreegeEditor/dialogs/HeadersDialog.d.ts +19 -0
- package/dist/editor/features/TreegeEditor/dialogs/OpenApiDialog.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/edges/ConditionalEdge.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/edges/DefaultEdge.d.ts +3 -0
- package/dist/editor/features/TreegeEditor/forms/JsonTemplateEditor.d.ts +13 -0
- package/dist/editor/features/TreegeEditor/forms/OptionsMappingFields.d.ts +34 -0
- package/dist/editor/features/TreegeEditor/forms/OptionsSourceForm.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/forms/SensitiveHeaderWarning.d.ts +13 -0
- package/dist/editor/features/TreegeEditor/forms/SubmitConfigForm.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/inputs/ApiUrlCombobox.d.ts +20 -0
- package/dist/editor/features/TreegeEditor/inputs/ComboboxPattern.d.ts +2 -1
- package/dist/editor/features/TreegeEditor/inputs/OptionImageField.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/inputs/SelectNodeGroup.d.ts +22 -1
- package/dist/editor/features/TreegeEditor/layout/AutoLayout.d.ts +15 -0
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +5 -0
- package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +25 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeGroupBadge.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeImage.d.ts +5 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeImageButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeInputPreview.d.ts +12 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeLabelInput.d.ts +10 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeRequiredButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeStackOrderButtons.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypePickerMenuContent.d.ts +12 -0
- package/dist/editor/features/TreegeEditor/nodes/layout/NodeWrapper.d.ts +4 -2
- package/dist/editor/features/TreegeEditor/panel/AIGeneratorDialog.d.ts +16 -0
- package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +7 -2
- package/dist/editor/features/TreegeEditor/panel/MultiSelectionPanel.d.ts +7 -0
- package/dist/editor/hooks/useAvailableParentFields.d.ts +13 -0
- package/dist/editor/hooks/useFlowActions.d.ts +6 -2
- package/dist/editor/hooks/useFlowConnections.d.ts +14 -0
- package/dist/editor/hooks/useHistoryStore.d.ts +26 -0
- package/dist/editor/hooks/useIsStackedEdge.d.ts +8 -0
- package/dist/editor/hooks/useKeyValueRows.d.ts +15 -0
- package/dist/editor/hooks/useNodesSelection.d.ts +5 -5
- package/dist/editor/hooks/useStackPosition.d.ts +14 -0
- package/dist/editor/hooks/useTranslate.d.ts +1 -1
- package/dist/editor/hooks/useUndoRedo.d.ts +31 -0
- package/dist/editor/types/ai.d.ts +65 -0
- package/dist/editor/types/editor.d.ts +97 -10
- package/dist/editor/types/openapi.d.ts +106 -0
- package/dist/editor/utils/aiFlowGenerator.d.ts +5 -0
- package/dist/editor/utils/cleanNodeConfig.d.ts +5 -0
- package/dist/editor/utils/dagreLayout.d.ts +8 -0
- package/dist/editor/utils/edge.d.ts +50 -0
- package/dist/editor/utils/groupColor.d.ts +14 -0
- package/dist/editor/utils/image.d.ts +7 -0
- package/dist/editor/utils/inputTypeIcon.d.ts +6 -0
- package/dist/editor/utils/jsonBindTarget.d.ts +15 -0
- package/dist/editor/utils/openApiPayload.d.ts +12 -0
- package/dist/editor/utils/openapi.d.ts +35 -0
- package/dist/editor/utils/sensitiveHeaders.d.ts +20 -0
- package/dist/editor/utils/stackPositionIndex.d.ts +9 -0
- package/dist/editor-Bh4AR91O.js +6407 -0
- package/dist/editor.js +3 -7
- package/dist/main.js +6 -52
- package/dist/renderer/context/TreegeRenderRuntimeProvider.d.ts +135 -0
- package/dist/renderer/context/TreegeRendererProvider.d.ts +15 -0
- package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +19 -11
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.d.ts +7 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputWrapper.d.ts +9 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +20 -15
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultLoadingSkeleton.d.ts +8 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultStep.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButton.d.ts +9 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButtonWrapper.d.ts +11 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +8 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DependencyHint.d.ts +15 -0
- package/dist/renderer/features/TreegeRenderer/native/components/OptionItemContent.d.ts +17 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAddressInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAutocompleteInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultCheckboxInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultFileInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHiddenInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHttpInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultNumberInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultPasswordInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultRadioInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSelectInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSubmitInput.d.ts +11 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSwitchInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextareaInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +97 -24
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultFormWrapper.d.ts +3 -2
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultInputWrapper.d.ts +9 -0
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultLoadingSkeleton.d.ts +7 -0
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultStep.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultSubmitButton.d.ts +5 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DependencyHint.d.ts +22 -0
- package/dist/renderer/features/TreegeRenderer/web/components/OptionItemContent.d.ts +17 -0
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultFileInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHiddenInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultNumberInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSelectInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSubmitInput.d.ts +11 -0
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/styles/RendererStyles.d.ts +2 -0
- package/dist/renderer/hooks/useInputOptions.d.ts +28 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +61 -0
- package/dist/renderer/hooks/useSubmitHandler.d.ts +36 -0
- package/dist/renderer/hooks/useTranslate.d.ts +7 -5
- package/dist/renderer/index.d.ts +4 -2
- package/dist/renderer/index.native.d.ts +19 -0
- package/dist/renderer/types/renderer.d.ts +279 -42
- package/dist/renderer/utils/flow.d.ts +1 -18
- package/dist/renderer/utils/form.d.ts +38 -2
- package/dist/renderer/utils/http.d.ts +161 -0
- package/dist/renderer/utils/jsonTemplate.d.ts +30 -0
- package/dist/renderer/utils/node.d.ts +29 -1
- package/dist/renderer/utils/sanitize.d.ts +85 -0
- package/dist/renderer/utils/sanitize.native.d.ts +69 -0
- package/dist/renderer/utils/step.d.ts +27 -0
- package/dist/renderer/utils/submit.d.ts +49 -0
- package/dist/renderer/utils/templateDependencies.d.ts +17 -0
- package/dist/renderer-DFzpylQb.js +255 -0
- package/dist/renderer-native.d.ts +2 -0
- package/dist/renderer-native.js +3746 -0
- package/dist/renderer.js +5 -45
- package/dist/shared/components/ui/badge.d.ts +2 -2
- package/dist/shared/components/ui/button.d.ts +3 -3
- package/dist/shared/components/ui/collapsible.d.ts +1 -1
- package/dist/shared/components/ui/command.d.ts +1 -1
- package/dist/shared/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/shared/components/ui/field.d.ts +24 -0
- package/dist/shared/components/ui/form.d.ts +1 -1
- package/dist/shared/components/ui/item.d.ts +23 -0
- package/dist/shared/components/ui/popover.d.ts +10 -2
- package/dist/shared/components/ui/select.d.ts +3 -1
- package/dist/shared/components/ui/sheet.d.ts +1 -1
- package/dist/shared/components/ui/skeleton.d.ts +3 -0
- package/dist/shared/components/ui/toggle-group.d.ts +7 -0
- package/dist/shared/components/ui/toggle.d.ts +9 -0
- package/dist/shared/components/ui/tooltip.d.ts +1 -1
- package/dist/shared/constants/colors.d.ts +45 -0
- package/dist/shared/constants/inputType.d.ts +6 -0
- package/dist/shared/constants/node.d.ts +0 -1
- package/dist/shared/context/PortalContainerContext.d.ts +5 -0
- package/dist/shared/context/ThemeContext.d.ts +2 -0
- package/dist/shared/context/ThemeContext.native.d.ts +22 -0
- package/dist/shared/hooks/useMediaQuery.d.ts +12 -0
- package/dist/shared/hooks/useThemeColors.d.ts +37 -0
- package/dist/shared/locales/ar.json.d.ts +253 -19
- package/dist/shared/locales/de.json.d.ts +254 -20
- package/dist/shared/locales/en.json.d.ts +255 -21
- package/dist/shared/locales/es.json.d.ts +254 -20
- package/dist/shared/locales/fr.json.d.ts +254 -20
- package/dist/shared/locales/it.json.d.ts +254 -20
- package/dist/shared/locales/pt.json.d.ts +254 -20
- package/dist/shared/types/edge.d.ts +6 -0
- package/dist/shared/types/node.d.ts +146 -18
- package/dist/shared/utils/httpRecord.d.ts +20 -0
- package/dist/shared/utils/inputTypeGuards.d.ts +7 -0
- package/dist/shared/utils/nodeTypeGuards.d.ts +1 -6
- package/dist/useRenderNode-DJGmt663.js +514 -0
- package/package.json +54 -22
- package/dist/ThemeContext-BIvs8Kw-.js +0 -758
- package/dist/TreegeEditor-Lv5Tn9_F.js +0 -2152
- package/dist/TreegeRenderer-D3EvsEfJ.js +0 -1413
- package/dist/editor/context/TreegeEditorContext.d.ts +0 -12
- package/dist/editor/features/TreegeEditor/forms/FlowNodeForm.d.ts +0 -2
- package/dist/editor/features/TreegeEditor/inputs/SelectInputType.d.ts +0 -7
- package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +0 -6
- package/dist/editor/hooks/useEdgesSelection.d.ts +0 -11
- package/dist/renderer/context/TreegeConfigContext.d.ts +0 -39
- package/dist/renderer/context/TreegeRendererContext.d.ts +0 -25
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +0 -7
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultGroup.d.ts +0 -6
- /package/dist/editor/components/{data-display/logo.d.ts → branding/Logo.d.ts} +0 -0
|
@@ -1,2152 +0,0 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-border-default:1px solid #bbb;--xy-node-border-selected-default:1px solid #555;--xy-handle-background-color-default:#333;--xy-selection-background-color-default:#9696b41a;--xy-selection-border-default:1px dotted #9b9b9bcc;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));min-width:5px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{justify-content:center;align-items:center;width:26px;height:26px;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border:var(--xy-node-border,var(--xy-node-border-default));color:var(--xy-node-color,var(--xy-node-color-default))}.react-flow__node-input.selected,.react-flow__node-input:focus,.react-flow__node-input:focus-visible,.react-flow__node-default.selected,.react-flow__node-default:focus,.react-flow__node-default:focus-visible,.react-flow__node-output.selected,.react-flow__node-output:focus,.react-flow__node-output:focus-visible,.react-flow__node-group.selected,.react-flow__node-group:focus,.react-flow__node-group:focus-visible{border:var(--xy-node-border-selected,var(--xy-node-border-selected-default));outline:none}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-widest:.1em;--radius-xs:.125rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-card:var(--card);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.-top-3\\.5{top:calc(var(--spacing)*-3.5)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-\\[50\\%\\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-5{left:calc(var(--spacing)*5)}.left-6{left:calc(var(--spacing)*6)}.left-\\[50\\%\\]{left:50%}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.size-\\(--cell-size\\){width:var(--cell-size);height:var(--cell-size)}.size-2{width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-auto{width:auto;height:auto}.size-full{width:100%;height:100%}.\\!h-3{height:calc(var(--spacing)*3)!important}.h-\\(--cell-size\\){height:var(--cell-size)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-\\[1\\.15rem\\]{height:1.15rem}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\(--radix-dropdown-menu-content-available-height\\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-150{max-height:calc(var(--spacing)*150)}.max-h-\\[300px\\]{max-height:300px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.\\!w-3{width:calc(var(--spacing)*3)!important}.w-\\(--cell-size\\){width:var(--cell-size)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-4{width:calc(var(--spacing)*4)}.w-4\\/12{width:33.3333%}.w-8{width:calc(var(--spacing)*8)}.w-8\\/12{width:66.6667%}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-96{width:calc(var(--spacing)*96)}.w-\\[300px\\]{width:300px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-50{max-width:calc(var(--spacing)*50)}.max-w-\\[350px\\]{max-width:350px}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.min-w-\\(--cell-size\\){min-width:var(--cell-size)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\\(--radix-dropdown-menu-content-transform-origin\\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\\(--radix-tooltip-content-transform-origin\\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.place-content-center{place-content:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing)*3)}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.gap-y-3{row-gap:calc(var(--spacing)*3)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.border-input{border-color:var(--input)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-chart-2{background-color:var(--chart-2)}.bg-destructive{background-color:var(--destructive)}.bg-foreground{background-color:var(--foreground)}.bg-muted\\/20{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\\/20{background-color:color-mix(in oklab,var(--muted)20%,transparent)}}.bg-muted\\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\\/30{background-color:color-mix(in oklab,var(--muted)30%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-primary{fill:var(--primary)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-px{padding:1px}.px-\\(--cell-size\\){padding-inline:var(--cell-size)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-1\\.5{padding-bottom:calc(var(--spacing)*1.5)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.text-nowrap{text-wrap:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-foreground{color:var(--foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-500{color:var(--color-red-500)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.underline-offset-4{text-underline-offset:4px}.\\[color-scheme\\:light\\]{color-scheme:light}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.drop-shadow-\\[0_0px_35px\\]{--tw-drop-shadow-size:drop-shadow(0 0px 35px var(--tw-drop-shadow-color,currentcolor));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-blue-600{--tw-drop-shadow-color:oklch(54.6% .245 262.881)}@supports (color:color-mix(in lab,red,red)){.drop-shadow-blue-600{--tw-drop-shadow-color:color-mix(in oklab,var(--color-blue-600)var(--tw-drop-shadow-alpha),transparent)}}.drop-shadow-blue-600{--tw-drop-shadow:var(--tw-drop-shadow-size)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\\[--cell-size\\:--spacing\\(8\\)\\]{--cell-size:calc(var(--spacing)*8)}.group-data-\\[disabled\\=true\\]\\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\\[disabled\\=true\\]\\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\\[focused\\=true\\]\\/day\\:relative:is(:where(.group\\/day)[data-focused=true] *){position:relative}.group-data-\\[focused\\=true\\]\\/day\\:z-10:is(:where(.group\\/day)[data-focused=true] *){z-index:10}.group-data-\\[focused\\=true\\]\\/day\\:border-ring:is(:where(.group\\/day)[data-focused=true] *){border-color:var(--ring)}.group-data-\\[focused\\=true\\]\\/day\\:ring-\\[3px\\]:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\\[focused\\=true\\]\\/day\\:ring-ring\\/50:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.group-data-\\[focused\\=true\\]\\/day\\:ring-ring\\/50:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\\:bg-primary ::selection{background-color:var(--primary)}.selection\\:bg-primary::selection{background-color:var(--primary)}.selection\\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media(hover:hover){.hover\\:bg-accent:hover{background-color:var(--accent)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\\:bg-secondary\\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\\:text-primary:hover{color:var(--primary)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}}.focus\\:bg-accent:focus{background-color:var(--accent)}.focus\\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\\:text-destructive:focus{color:var(--destructive)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-focus\\:border-ring:has(:focus){border-color:var(--ring)}.has-focus\\:ring-\\[3px\\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-focus\\:ring-ring\\/50:has(:focus){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.has-focus\\:ring-ring\\/50:has(:focus){--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.aria-selected\\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[disabled\\=true\\]\\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\\[disabled\\=true\\]\\:opacity-50[data-disabled=true]{opacity:.5}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:calc(var(--spacing)*8)}.data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal]{height:1px}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical]{width:1px}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\\[range-end\\=true\\]\\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\\[range-end\\=true\\]\\:rounded-r-md[data-range-end=true]{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.data-\\[range-end\\=true\\]\\:bg-primary[data-range-end=true]{background-color:var(--primary)}.data-\\[range-end\\=true\\]\\:text-primary-foreground[data-range-end=true]{color:var(--primary-foreground)}.data-\\[range-middle\\=true\\]\\:rounded-none[data-range-middle=true]{border-radius:0}.data-\\[range-middle\\=true\\]\\:bg-accent[data-range-middle=true]{background-color:var(--accent)}.data-\\[range-middle\\=true\\]\\:text-accent-foreground[data-range-middle=true]{color:var(--accent-foreground)}.data-\\[range-start\\=true\\]\\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\\[range-start\\=true\\]\\:rounded-l-md[data-range-start=true]{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.data-\\[range-start\\=true\\]\\:bg-primary[data-range-start=true]{background-color:var(--primary)}.data-\\[range-start\\=true\\]\\:text-primary-foreground[data-range-start=true]{color:var(--primary-foreground)}.data-\\[selected-single\\=true\\]\\:bg-primary[data-selected-single=true]{background-color:var(--primary)}.data-\\[selected-single\\=true\\]\\:text-primary-foreground[data-selected-single=true]{color:var(--primary-foreground)}.data-\\[selected\\=true\\]\\:rounded-none[data-selected=true]{border-radius:0}.data-\\[selected\\=true\\]\\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\\[selected\\=true\\]\\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\\*\\*\\:data-\\[slot\\=command-input-wrapper\\]\\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}.data-\\[state\\=checked\\]\\:translate-x-\\[calc\\(100\\%-2px\\)\\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=checked\\]\\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\\[state\\=checked\\]\\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\\[state\\=closed\\]\\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\\[state\\=closed\\]\\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\\[state\\=closed\\]\\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\\[state\\=open\\]\\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[state\\=open\\]\\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\\[state\\=open\\]\\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\\[state\\=open\\]\\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\\[state\\=open\\]\\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}@media(min-width:40rem){.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:max-w-sm{max-width:var(--container-sm)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}}@media(min-width:48rem){.md\\:flex-row{flex-direction:row}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\\:border-input:is(.dark *){border-color:var(--input)}.dark\\:bg-blue-600:is(.dark *){background-color:var(--color-blue-600)}.dark\\:bg-destructive\\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-destructive\\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.dark\\:bg-input\\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-input\\/30:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\\:\\[color-scheme\\:dark\\]:is(.dark *){color-scheme:dark}@media(hover:hover){.dark\\:hover\\:bg-accent\\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-accent\\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\\:hover\\:bg-input\\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-input\\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.dark\\:hover\\:text-accent-foreground:is(.dark *):hover{color:var(--accent-foreground)}}.dark\\:focus-visible\\:ring-destructive\\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:focus-visible\\:ring-destructive\\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\\:aria-invalid\\:ring-destructive\\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:aria-invalid\\:ring-destructive\\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\\:data-\\[state\\=checked\\]\\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\\:data-\\[state\\=checked\\]\\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\\:data-\\[state\\=unchecked\\]\\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\\:data-\\[state\\=unchecked\\]\\:bg-input\\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\\:data-\\[state\\=unchecked\\]\\:bg-input\\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input)80%,transparent)}}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\\[\\&\\:first-child\\[data-selected\\=true\\]_button\\]\\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}:is(.rtl\\:\\*\\*\\:\\[\\.rdp-button\\\\_next\\>svg\\]\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\\:\\*\\*\\:\\[\\.rdp-button\\\\_previous\\>svg\\]\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}:is(.data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\\[\\&\\:last-child\\[data-selected\\=true\\]_button\\]\\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\\[\\&\\>span\\]\\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&\\>span\\]\\:opacity-70>span{opacity:.7}.\\[\\&\\>svg\\]\\:pointer-events-none>svg{pointer-events:none}.\\[\\&\\>svg\\]\\:size-3>svg{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.\\[\\&\\>svg\\]\\:size-3\\.5>svg{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.\\[\\&\\>svg\\]\\:text-muted-foreground>svg{color:var(--muted-foreground)}[data-slot=card-content] .\\[\\[data-slot\\=card-content\\]_\\&\\]\\:bg-transparent,[data-slot=popover-content] .\\[\\[data-slot\\=popover-content\\]_\\&\\]\\:bg-transparent{background-color:#0000}@media(hover:hover){a.\\[a\\&\\]\\:hover\\:bg-accent:hover{background-color:var(--accent)}a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--secondary)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}:root{--node-width:280px;--node-height:150px;--node-border-radius:40px;--treege-color-primary:#13d3b4;--treege-color-tertiary:#0065a8;--treege-color-secondary:#007ff6}button{cursor:pointer;-webkit-user-select:none;user-select:none}#root{width:100vw;height:100vh}.react-flow__panel>a{display:none}div.react-flow__node{border:0!important}div.react-flow__node__wrapper{padding:calc(var(--spacing)*7);width:270px;height:150px;box-shadow:0 0 20px 6px oklch(from var(--treege-color-primary)l c h/10%),0 0 20px oklch(from var(--treege-color-tertiary)l c h/10%);background:linear-gradient(oklch(from var(--color-card)l c h/33%),oklch(from var(--color-card)l c h/33%))padding-box,linear-gradient(145deg,oklch(from var(--treege-color-primary)l c h/40%),#0000,oklch(from var(--treege-color-secondary)l c h/40%))border-box;border-radius:40px;flex-direction:column;justify-content:center;display:flex;border:3px solid #0000!important}div.react-flow__node__wrapper.in-group{background:linear-gradient(oklch(from var(--color-card)l c h/33%),oklch(from var(--color-card)l c h/33%))padding-box,linear-gradient(145deg,oklch(from var(--color-chart-2)l c h/33%),#0000,oklch(from var(--color-chart-2)l c h/33%))border-box}div.react-flow__node.selected .react-flow__node__wrapper{box-shadow:0 0 20px 6px oklch(from var(--treege-color-primary)l c h/30%),0 0 20px oklch(from var(--treege-color-tertiary)l c h/30%)}div.react-flow__node-group,div.react-flow__node-group.selected{background:oklch(from var(--color-chart-2)l c h/5%);box-shadow:none;border:3px dashed var(--color-chart-2)!important}div.react-flow__node-group .react-flow__resize-control{opacity:0;padding:4px;transition:opacity .2s}div.react-flow__node-group:hover .react-flow__resize-control,.react-flow__resize-control:hover{opacity:1}div.react-flow__handle{background-color:var(--muted-foreground);width:15px;height:15px}path.react-flow__edge-path{stroke:var(--muted-foreground)}.w-tc-editor{border-radius:calc(var(--radius) - 2px);border-style:var(--tw-border-style);border-width:1px;border-color:var(--input);background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.w-tc-editor{background-color:color-mix(in oklab,var(--input)30%,transparent)}}.w-tc-editor:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.w-tc-editor:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
import { j as e, i as he, e as Ue, s as D, P as Pe, p as ke, B as w, q as Ee, F as N, f as C, I as y, o as O, t as qe, S as $, w as A, x as z, y as G, A as f, L as ee, N as pe, z as q, c as ve, E as Ke, D as te, C as We, r as Ye, h as Je, k as Xe, l as Be, m as be, H as Te, a as Qe, b as et, G as tt, T as at } from "./ThemeContext-BIvs8Kw-.js";
|
|
3
|
-
import { useNodes as De, useEdges as $e, getBezierPath as st, useReactFlow as me, BaseEdge as nt, EdgeLabelRenderer as ot, Handle as se, Position as ne, NodeResizer as rt, Panel as lt, addEdge as it, ReactFlowProvider as ct, ReactFlow as dt, Background as ht, BackgroundVariant as ut, MiniMap as mt, Controls as xt } from "@xyflow/react";
|
|
4
|
-
import { useForm as ie } from "@tanstack/react-form";
|
|
5
|
-
import { Waypoints as pt, X as oe, Plus as xe, Network as jt, Boxes as gt, RectangleEllipsis as Ct, Type as Ae, LucidePencilRuler as vt, EllipsisVertical as ft, Copy as bt, Download as Nt, ArrowRightFromLine as yt, Save as wt, Trash2 as Ft, Variable as He, ChevronsUpDown as de, Check as St, PlusCircle as Vt, XIcon as Pt } from "lucide-react";
|
|
6
|
-
import { useMemo as ae, createContext as kt, useState as _, useContext as Et, useRef as Tt, useCallback as Z } from "react";
|
|
7
|
-
import * as ue from "@radix-ui/react-scroll-area";
|
|
8
|
-
import { Slot as Dt } from "@radix-ui/react-slot";
|
|
9
|
-
import { cva as Mt } from "class-variance-authority";
|
|
10
|
-
import { toast as R, Toaster as It } from "sonner";
|
|
11
|
-
import * as K from "@radix-ui/react-dropdown-menu";
|
|
12
|
-
import * as Me from "@radix-ui/react-collapsible";
|
|
13
|
-
import * as J from "@radix-ui/react-dialog";
|
|
14
|
-
import { useTheme as Lt } from "next-themes";
|
|
15
|
-
const Bt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Ht = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Ot = ({ theme: t = "dark" }) => /* @__PURE__ */ e.jsx("div", { className: "absolute top-5 left-5 z-50 select-none", children: /* @__PURE__ */ e.jsx(
|
|
16
|
-
"img",
|
|
17
|
-
{
|
|
18
|
-
src: t === "dark" ? Ht : Bt,
|
|
19
|
-
alt: "Treege",
|
|
20
|
-
className: "relative h-14 w-auto drop-shadow-[0_0px_35px] drop-shadow-blue-600"
|
|
21
|
-
}
|
|
22
|
-
) }), Ie = (t) => {
|
|
23
|
-
const r = De(), n = $e();
|
|
24
|
-
return ae(() => {
|
|
25
|
-
if (!t)
|
|
26
|
-
return [];
|
|
27
|
-
const l = (i, s = /* @__PURE__ */ new Set()) => {
|
|
28
|
-
if (s.has(i))
|
|
29
|
-
return [];
|
|
30
|
-
const c = new Set(s).add(i);
|
|
31
|
-
return n.filter((a) => a.target === i).flatMap((a) => [a.source, ...l(a.source, c)]);
|
|
32
|
-
}, m = l(t);
|
|
33
|
-
return r.filter((i) => m.includes(i.id) && he(i)).map((i) => {
|
|
34
|
-
const s = i.data, c = (typeof s.label == "object" ? s.label.en : s.label) || `Node ${i.id.slice(0, 8)}`;
|
|
35
|
-
return {
|
|
36
|
-
label: s.name ? `${c} (${s.name})` : c,
|
|
37
|
-
name: s.name,
|
|
38
|
-
nodeId: i.id,
|
|
39
|
-
type: s.type || "text"
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
}, [t, r, n]);
|
|
43
|
-
}, ze = kt(null), $t = ({ children: t, value: r }) => {
|
|
44
|
-
const [n, l] = _(r?.flowId), m = ae(
|
|
45
|
-
() => ({
|
|
46
|
-
...r,
|
|
47
|
-
flowId: n,
|
|
48
|
-
setFlowId: l
|
|
49
|
-
}),
|
|
50
|
-
[n, r]
|
|
51
|
-
);
|
|
52
|
-
return /* @__PURE__ */ e.jsx(ze.Provider, { value: m, children: t });
|
|
53
|
-
}, Ge = () => Et(ze) ?? {
|
|
54
|
-
flowId: void 0,
|
|
55
|
-
language: "en",
|
|
56
|
-
setFlowId: () => {
|
|
57
|
-
}
|
|
58
|
-
}, B = (t) => {
|
|
59
|
-
const n = Ge().language;
|
|
60
|
-
return Ue(n);
|
|
61
|
-
};
|
|
62
|
-
function _e({ className: t, children: r, ...n }) {
|
|
63
|
-
return /* @__PURE__ */ e.jsxs(ue.Root, { "data-slot": "scroll-area", className: D("relative", t), ...n, children: [
|
|
64
|
-
/* @__PURE__ */ e.jsx(
|
|
65
|
-
ue.Viewport,
|
|
66
|
-
{
|
|
67
|
-
"data-slot": "scroll-area-viewport",
|
|
68
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
69
|
-
children: r
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ e.jsx(At, {}),
|
|
73
|
-
/* @__PURE__ */ e.jsx(ue.Corner, {})
|
|
74
|
-
] });
|
|
75
|
-
}
|
|
76
|
-
function At({
|
|
77
|
-
className: t,
|
|
78
|
-
orientation: r = "vertical",
|
|
79
|
-
...n
|
|
80
|
-
}) {
|
|
81
|
-
return /* @__PURE__ */ e.jsx(
|
|
82
|
-
ue.ScrollAreaScrollbar,
|
|
83
|
-
{
|
|
84
|
-
"data-slot": "scroll-area-scrollbar",
|
|
85
|
-
orientation: r,
|
|
86
|
-
className: D(
|
|
87
|
-
"flex touch-none p-px transition-colors select-none",
|
|
88
|
-
r === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
89
|
-
r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
90
|
-
t
|
|
91
|
-
),
|
|
92
|
-
...n,
|
|
93
|
-
children: /* @__PURE__ */ e.jsx(ue.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" })
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
const zt = ({
|
|
98
|
-
id: t,
|
|
99
|
-
target: r,
|
|
100
|
-
sourceX: n,
|
|
101
|
-
sourceY: l,
|
|
102
|
-
targetX: m,
|
|
103
|
-
targetY: i,
|
|
104
|
-
sourcePosition: s,
|
|
105
|
-
targetPosition: c,
|
|
106
|
-
markerEnd: d,
|
|
107
|
-
style: a,
|
|
108
|
-
data: o
|
|
109
|
-
}) => {
|
|
110
|
-
const [u, h, x] = st({
|
|
111
|
-
sourcePosition: s,
|
|
112
|
-
sourceX: n,
|
|
113
|
-
sourceY: l,
|
|
114
|
-
targetPosition: c,
|
|
115
|
-
targetX: m,
|
|
116
|
-
targetY: i
|
|
117
|
-
}), [p, v] = _(!1), { updateEdgeData: M } = me(), F = Ie(r), S = o?.conditions && o.conditions.length > 0, g = B(), { handleSubmit: E, reset: V, Field: P } = ie({
|
|
118
|
-
defaultValues: {
|
|
119
|
-
conditions: o?.conditions || [{ field: F[0]?.nodeId ?? "", operator: "===", value: "" }],
|
|
120
|
-
isFallback: !!o?.isFallback,
|
|
121
|
-
label: o?.label || ""
|
|
122
|
-
},
|
|
123
|
-
listeners: {
|
|
124
|
-
onChange: ({ formApi: j }) => {
|
|
125
|
-
j.handleSubmit().then();
|
|
126
|
-
},
|
|
127
|
-
onChangeDebounceMs: 150
|
|
128
|
-
},
|
|
129
|
-
onSubmit: ({ value: j }) => {
|
|
130
|
-
M(t, j);
|
|
131
|
-
}
|
|
132
|
-
}), T = (j) => {
|
|
133
|
-
j.stopPropagation();
|
|
134
|
-
}, X = () => {
|
|
135
|
-
V({ conditions: [], isFallback: !1, label: "" }), M(t, { conditions: void 0, isFallback: void 0, label: void 0 });
|
|
136
|
-
}, b = () => {
|
|
137
|
-
if (o?.isFallback)
|
|
138
|
-
return o.label || g("editor.conditionalEdge.fallback");
|
|
139
|
-
if (!S)
|
|
140
|
-
return null;
|
|
141
|
-
if (o.label)
|
|
142
|
-
return o.label;
|
|
143
|
-
const j = o.conditions;
|
|
144
|
-
if (j.length === 1)
|
|
145
|
-
return `${F.find((L) => L.nodeId === j[0].field)?.label || j[0].field} ${j[0].operator} ${j[0].value}`;
|
|
146
|
-
const I = j.filter((k) => k.logicalOperator === ee.AND).length, fe = j.filter((k) => k.logicalOperator === ee.OR).length;
|
|
147
|
-
return I > 0 && fe === 0 ? `${j.length} ${g("editor.conditionalEdge.conditionsAnd")}` : fe > 0 && I === 0 ? `${j.length} ${g("editor.conditionalEdge.conditionsOr")}` : `${j.length} ${g("editor.conditionalEdge.conditionsMixed")}`;
|
|
148
|
-
}, Q = () => o?.isFallback ? "var(--color-chart-4)" : S ? "var(--color-chart-2)" : "var(--color-chart-3)";
|
|
149
|
-
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
150
|
-
/* @__PURE__ */ e.jsx(
|
|
151
|
-
nt,
|
|
152
|
-
{
|
|
153
|
-
path: u,
|
|
154
|
-
markerEnd: d,
|
|
155
|
-
style: {
|
|
156
|
-
...a,
|
|
157
|
-
stroke: Q(),
|
|
158
|
-
strokeDasharray: o?.isFallback ? "5,5" : void 0,
|
|
159
|
-
strokeWidth: S || o?.isFallback ? 2 : a?.strokeWidth
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
),
|
|
163
|
-
/* @__PURE__ */ e.jsx(ot, { children: /* @__PURE__ */ e.jsx(
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
className: "nodrag nopan absolute",
|
|
167
|
-
style: {
|
|
168
|
-
pointerEvents: "all",
|
|
169
|
-
transform: `translate(-50%, -50%) translate(${h}px,${x}px)`
|
|
170
|
-
},
|
|
171
|
-
children: /* @__PURE__ */ e.jsxs(Pe, { open: p, onOpenChange: v, children: [
|
|
172
|
-
/* @__PURE__ */ e.jsx(ke, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
173
|
-
w,
|
|
174
|
-
{
|
|
175
|
-
variant: S || o?.isFallback ? "default" : "secondary",
|
|
176
|
-
className: "h-8 px-2 text-xs",
|
|
177
|
-
onClick: T,
|
|
178
|
-
children: [
|
|
179
|
-
/* @__PURE__ */ e.jsx(pt, { className: "mr-1 h-3 w-3" }),
|
|
180
|
-
S || o?.isFallback ? b() : g("editor.conditionalEdge.condition")
|
|
181
|
-
]
|
|
182
|
-
}
|
|
183
|
-
) }),
|
|
184
|
-
/* @__PURE__ */ e.jsx(Ee, { className: "w-96 p-1", align: "center", onClick: (j) => j.stopPropagation(), children: /* @__PURE__ */ e.jsx(_e, { className: "flex max-h-150 flex-col p-3", children: /* @__PURE__ */ e.jsx(
|
|
185
|
-
"form",
|
|
186
|
-
{
|
|
187
|
-
onSubmit: (j) => {
|
|
188
|
-
j.preventDefault(), j.stopPropagation();
|
|
189
|
-
},
|
|
190
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-5", children: [
|
|
191
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
192
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: g("editor.conditionalEdge.displayConditions") }),
|
|
193
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground text-sm", children: g("editor.conditionalEdge.displayConditionsDesc") })
|
|
194
|
-
] }),
|
|
195
|
-
/* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
|
|
196
|
-
/* @__PURE__ */ e.jsx(P, { name: "label", children: (j) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
197
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: j.name, children: g("editor.conditionalEdge.labelOptional") }),
|
|
198
|
-
/* @__PURE__ */ e.jsx(
|
|
199
|
-
y,
|
|
200
|
-
{
|
|
201
|
-
id: j.name,
|
|
202
|
-
placeholder: g("editor.conditionalEdge.labelPlaceholder"),
|
|
203
|
-
value: j.state.value,
|
|
204
|
-
onChange: (I) => j.handleChange(I.target.value)
|
|
205
|
-
}
|
|
206
|
-
),
|
|
207
|
-
/* @__PURE__ */ e.jsx(O, { children: g("editor.conditionalEdge.labelDesc") })
|
|
208
|
-
] }) }),
|
|
209
|
-
/* @__PURE__ */ e.jsx(P, { name: "isFallback", children: (j) => /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3", children: [
|
|
210
|
-
/* @__PURE__ */ e.jsx(
|
|
211
|
-
qe,
|
|
212
|
-
{
|
|
213
|
-
id: j.name,
|
|
214
|
-
checked: j.state.value,
|
|
215
|
-
onCheckedChange: (I) => j.handleChange(I)
|
|
216
|
-
}
|
|
217
|
-
),
|
|
218
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
219
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: j.name, className: "cursor-pointer font-medium", children: g("editor.conditionalEdge.fallbackPath") }),
|
|
220
|
-
/* @__PURE__ */ e.jsx(O, { className: "text-xs", children: g("editor.conditionalEdge.fallbackPathDesc") })
|
|
221
|
-
] })
|
|
222
|
-
] }) }) }),
|
|
223
|
-
/* @__PURE__ */ e.jsx(P, { name: "conditions", mode: "array", children: (j) => {
|
|
224
|
-
const I = j.form.getFieldValue("isFallback");
|
|
225
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
226
|
-
/* @__PURE__ */ e.jsx(C, { className: I ? "text-muted-foreground" : "", children: g("editor.conditionalEdge.conditions") }),
|
|
227
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
228
|
-
j.state.value?.map((fe, k) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
229
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2 rounded-lg border bg-muted/30 p-3", children: [
|
|
230
|
-
/* @__PURE__ */ e.jsx(P, { name: `conditions[${k}].field`, children: (L) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
231
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: `field-${k}`, children: g("editor.conditionalEdge.field") }),
|
|
232
|
-
/* @__PURE__ */ e.jsxs(
|
|
233
|
-
$,
|
|
234
|
-
{
|
|
235
|
-
disabled: I,
|
|
236
|
-
value: L.state.value || "",
|
|
237
|
-
onValueChange: (H) => L.handleChange(H),
|
|
238
|
-
children: [
|
|
239
|
-
/* @__PURE__ */ e.jsx(A, { id: `field-${k}`, className: "w-full", children: /* @__PURE__ */ e.jsx(z, { placeholder: g("editor.conditionalEdge.selectField") }) }),
|
|
240
|
-
/* @__PURE__ */ e.jsx(G, { children: F.length === 0 ? /* @__PURE__ */ e.jsx(f, { value: "none", disabled: !0, children: g("editor.conditionalEdge.noFieldsAvailable") }) : F.map((H) => /* @__PURE__ */ e.jsxs(f, { value: H.nodeId, children: [
|
|
241
|
-
H.label,
|
|
242
|
-
" (",
|
|
243
|
-
H.type,
|
|
244
|
-
")"
|
|
245
|
-
] }, H.nodeId)) })
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
)
|
|
249
|
-
] }) }),
|
|
250
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
251
|
-
/* @__PURE__ */ e.jsx(P, { name: `conditions[${k}].operator`, children: (L) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
252
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: `operator-${k}`, children: g("editor.conditionalEdge.operator") }),
|
|
253
|
-
/* @__PURE__ */ e.jsxs(
|
|
254
|
-
$,
|
|
255
|
-
{
|
|
256
|
-
disabled: I,
|
|
257
|
-
value: L.state.value || "===",
|
|
258
|
-
onValueChange: (H) => L.handleChange(H),
|
|
259
|
-
children: [
|
|
260
|
-
/* @__PURE__ */ e.jsx(A, { id: `operator-${k}`, children: /* @__PURE__ */ e.jsx(z, {}) }),
|
|
261
|
-
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
262
|
-
/* @__PURE__ */ e.jsx(f, { value: "===", children: "=" }),
|
|
263
|
-
/* @__PURE__ */ e.jsx(f, { value: "!==", children: "≠" }),
|
|
264
|
-
/* @__PURE__ */ e.jsx(f, { value: ">", children: ">" }),
|
|
265
|
-
/* @__PURE__ */ e.jsx(f, { value: "<", children: "<" }),
|
|
266
|
-
/* @__PURE__ */ e.jsx(f, { value: ">=", children: ">=" }),
|
|
267
|
-
/* @__PURE__ */ e.jsx(f, { value: "<=", children: "<=" })
|
|
268
|
-
] })
|
|
269
|
-
]
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
] }) }),
|
|
273
|
-
/* @__PURE__ */ e.jsx(P, { name: `conditions[${k}].value`, children: (L) => /* @__PURE__ */ e.jsxs(N, { className: "w-full", children: [
|
|
274
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: `value-${k}`, children: g("editor.conditionalEdge.value") }),
|
|
275
|
-
/* @__PURE__ */ e.jsx(
|
|
276
|
-
y,
|
|
277
|
-
{
|
|
278
|
-
disabled: I,
|
|
279
|
-
id: `value-${k}`,
|
|
280
|
-
placeholder: g("editor.conditionalEdge.valuePlaceholder"),
|
|
281
|
-
value: L.state.value || "",
|
|
282
|
-
onChange: (H) => L.handleChange(H.target.value)
|
|
283
|
-
}
|
|
284
|
-
)
|
|
285
|
-
] }) })
|
|
286
|
-
] }),
|
|
287
|
-
j.state.value && j.state.value.length > 1 && /* @__PURE__ */ e.jsxs(
|
|
288
|
-
w,
|
|
289
|
-
{
|
|
290
|
-
disabled: I,
|
|
291
|
-
type: "button",
|
|
292
|
-
variant: "ghost",
|
|
293
|
-
size: "sm",
|
|
294
|
-
className: "w-full",
|
|
295
|
-
onClick: () => {
|
|
296
|
-
j.removeValue(k), E().then();
|
|
297
|
-
},
|
|
298
|
-
children: [
|
|
299
|
-
/* @__PURE__ */ e.jsx(oe, { className: "mr-1 h-4 w-4" }),
|
|
300
|
-
g("editor.conditionalEdge.removeCondition")
|
|
301
|
-
]
|
|
302
|
-
}
|
|
303
|
-
)
|
|
304
|
-
] }),
|
|
305
|
-
j.state.value && k < j.state.value.length - 1 && /* @__PURE__ */ e.jsx(P, { name: `conditions[${k}].logicalOperator`, children: (L) => /* @__PURE__ */ e.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ e.jsxs(
|
|
306
|
-
$,
|
|
307
|
-
{
|
|
308
|
-
disabled: I,
|
|
309
|
-
value: L.state.value || ee.AND,
|
|
310
|
-
onValueChange: (H) => L.handleChange(H),
|
|
311
|
-
children: [
|
|
312
|
-
/* @__PURE__ */ e.jsx(A, { className: "h-9 w-32 font-semibold", children: /* @__PURE__ */ e.jsx(z, {}) }),
|
|
313
|
-
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
314
|
-
/* @__PURE__ */ e.jsx(f, { value: ee.AND, children: "AND" }),
|
|
315
|
-
/* @__PURE__ */ e.jsx(f, { value: ee.OR, children: "OR" })
|
|
316
|
-
] })
|
|
317
|
-
]
|
|
318
|
-
}
|
|
319
|
-
) }) })
|
|
320
|
-
] }, `condition-${k}`)),
|
|
321
|
-
/* @__PURE__ */ e.jsxs(
|
|
322
|
-
w,
|
|
323
|
-
{
|
|
324
|
-
disabled: I,
|
|
325
|
-
type: "button",
|
|
326
|
-
variant: "outline",
|
|
327
|
-
size: "sm",
|
|
328
|
-
className: "w-full",
|
|
329
|
-
onClick: () => {
|
|
330
|
-
j.pushValue({
|
|
331
|
-
field: F[0]?.nodeId ?? "",
|
|
332
|
-
logicalOperator: ee.AND,
|
|
333
|
-
operator: "===",
|
|
334
|
-
value: ""
|
|
335
|
-
}), E().then();
|
|
336
|
-
},
|
|
337
|
-
children: [
|
|
338
|
-
/* @__PURE__ */ e.jsx(xe, { className: "mr-2 h-4 w-4" }),
|
|
339
|
-
g("editor.conditionalEdge.addCondition")
|
|
340
|
-
]
|
|
341
|
-
}
|
|
342
|
-
)
|
|
343
|
-
] })
|
|
344
|
-
] });
|
|
345
|
-
} })
|
|
346
|
-
] }),
|
|
347
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
348
|
-
/* @__PURE__ */ e.jsxs(w, { type: "button", size: "sm", variant: "outline", onClick: X, children: [
|
|
349
|
-
/* @__PURE__ */ e.jsx(oe, { className: "mr-1 h-4 w-4" }),
|
|
350
|
-
g("common.clear")
|
|
351
|
-
] }),
|
|
352
|
-
/* @__PURE__ */ e.jsx(w, { type: "button", size: "sm", onClick: () => v(!1), children: g("common.close") })
|
|
353
|
-
] })
|
|
354
|
-
] })
|
|
355
|
-
}
|
|
356
|
-
) }) })
|
|
357
|
-
] })
|
|
358
|
-
}
|
|
359
|
-
) })
|
|
360
|
-
] });
|
|
361
|
-
}, Gt = {
|
|
362
|
-
conditional: zt
|
|
363
|
-
}, Le = ({ children: t, inGroup: r }) => /* @__PURE__ */ e.jsx("div", { className: D("react-flow__node__wrapper", r ? "in-group" : ""), children: t }), _t = Mt(
|
|
364
|
-
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
365
|
-
{
|
|
366
|
-
defaultVariants: {
|
|
367
|
-
variant: "default"
|
|
368
|
-
},
|
|
369
|
-
variants: {
|
|
370
|
-
variant: {
|
|
371
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
372
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
373
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
374
|
-
purple: "bg-purple-600 hover:bg-purple-700 text-white",
|
|
375
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
);
|
|
380
|
-
function re({
|
|
381
|
-
className: t,
|
|
382
|
-
variant: r,
|
|
383
|
-
asChild: n = !1,
|
|
384
|
-
...l
|
|
385
|
-
}) {
|
|
386
|
-
const m = n ? Dt : "span";
|
|
387
|
-
return /* @__PURE__ */ e.jsx(m, { "data-slot": "badge", className: D(_t({ variant: r }), t), ...l });
|
|
388
|
-
}
|
|
389
|
-
const Rt = ({ data: t, isConnectable: r, type: n, parentId: l }) => {
|
|
390
|
-
const i = B()(t?.label);
|
|
391
|
-
return /* @__PURE__ */ e.jsxs(Le, { inGroup: !!l, children: [
|
|
392
|
-
/* @__PURE__ */ e.jsx(se, { type: "target", position: ne.Top, isConnectable: r }),
|
|
393
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl", children: i }),
|
|
394
|
-
/* @__PURE__ */ e.jsxs(re, { variant: "destructive", children: [
|
|
395
|
-
/* @__PURE__ */ e.jsx(jt, {}),
|
|
396
|
-
n
|
|
397
|
-
] }),
|
|
398
|
-
/* @__PURE__ */ e.jsx(se, { type: "source", position: ne.Bottom, isConnectable: r })
|
|
399
|
-
] });
|
|
400
|
-
}, Zt = ({ data: t }) => {
|
|
401
|
-
const n = B()(t?.label);
|
|
402
|
-
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
403
|
-
/* @__PURE__ */ e.jsx(rt, {}),
|
|
404
|
-
/* @__PURE__ */ e.jsx("div", { className: "-top-3.5 absolute left-6", children: /* @__PURE__ */ e.jsxs(re, { className: "max-w-50 bg-chart-2", children: [
|
|
405
|
-
/* @__PURE__ */ e.jsx(gt, { className: "!w-3 !h-3" }),
|
|
406
|
-
n
|
|
407
|
-
] }) })
|
|
408
|
-
] });
|
|
409
|
-
}, Ut = ({ data: t, isConnectable: r, type: n, parentId: l }) => {
|
|
410
|
-
const i = B()(t?.label);
|
|
411
|
-
return /* @__PURE__ */ e.jsxs(Le, { inGroup: !!l, children: [
|
|
412
|
-
/* @__PURE__ */ e.jsx(se, { type: "target", position: ne.Top, isConnectable: r }),
|
|
413
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl", children: i || t?.name }),
|
|
414
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
|
|
415
|
-
n && /* @__PURE__ */ e.jsxs(re, { variant: "secondary", className: "bg-blue-500 text-white dark:bg-blue-600", children: [
|
|
416
|
-
/* @__PURE__ */ e.jsx(Ct, {}),
|
|
417
|
-
n
|
|
418
|
-
] }),
|
|
419
|
-
t?.type && /* @__PURE__ */ e.jsxs(re, { variant: "outline", children: [
|
|
420
|
-
/* @__PURE__ */ e.jsx(Ae, {}),
|
|
421
|
-
t.type
|
|
422
|
-
] })
|
|
423
|
-
] }),
|
|
424
|
-
/* @__PURE__ */ e.jsx(se, { type: "source", position: ne.Bottom, isConnectable: r })
|
|
425
|
-
] });
|
|
426
|
-
}, qt = ({ data: t, isConnectable: r, type: n, parentId: l }) => {
|
|
427
|
-
const i = B()(t?.label);
|
|
428
|
-
return /* @__PURE__ */ e.jsxs(Le, { inGroup: !!l, children: [
|
|
429
|
-
/* @__PURE__ */ e.jsx(se, { type: "target", position: ne.Top, isConnectable: r }),
|
|
430
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl capitalize", children: i }),
|
|
431
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
|
|
432
|
-
/* @__PURE__ */ e.jsxs(re, { variant: "purple", children: [
|
|
433
|
-
/* @__PURE__ */ e.jsx(vt, {}),
|
|
434
|
-
n
|
|
435
|
-
] }),
|
|
436
|
-
t?.type && /* @__PURE__ */ e.jsxs(re, { variant: "outline", children: [
|
|
437
|
-
/* @__PURE__ */ e.jsx(Ae, {}),
|
|
438
|
-
t.type
|
|
439
|
-
] })
|
|
440
|
-
] }),
|
|
441
|
-
/* @__PURE__ */ e.jsx(se, { type: "source", position: ne.Bottom, isConnectable: r })
|
|
442
|
-
] });
|
|
443
|
-
}, Re = {
|
|
444
|
-
[pe.flow]: Rt,
|
|
445
|
-
[pe.group]: Zt,
|
|
446
|
-
[pe.input]: Ut,
|
|
447
|
-
[pe.ui]: qt
|
|
448
|
-
}, Kt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
449
|
-
let le = (t = 21) => {
|
|
450
|
-
let r = "", n = crypto.getRandomValues(new Uint8Array(t |= 0));
|
|
451
|
-
for (; t--; )
|
|
452
|
-
r += Kt[n[t] & 63];
|
|
453
|
-
return r;
|
|
454
|
-
};
|
|
455
|
-
const Ze = {
|
|
456
|
-
data: {
|
|
457
|
-
type: "text"
|
|
458
|
-
},
|
|
459
|
-
id: le(),
|
|
460
|
-
position: { x: 0, y: 0 },
|
|
461
|
-
type: "input"
|
|
462
|
-
};
|
|
463
|
-
function Fe({ ...t }) {
|
|
464
|
-
return /* @__PURE__ */ e.jsx(K.Root, { "data-slot": "dropdown-menu", ...t });
|
|
465
|
-
}
|
|
466
|
-
function Se({ ...t }) {
|
|
467
|
-
return /* @__PURE__ */ e.jsx(K.Trigger, { "data-slot": "dropdown-menu-trigger", ...t });
|
|
468
|
-
}
|
|
469
|
-
function Ve({ className: t, sideOffset: r = 4, ...n }) {
|
|
470
|
-
return /* @__PURE__ */ e.jsx(K.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
471
|
-
K.Content,
|
|
472
|
-
{
|
|
473
|
-
"data-slot": "dropdown-menu-content",
|
|
474
|
-
sideOffset: r,
|
|
475
|
-
className: D(
|
|
476
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
477
|
-
t
|
|
478
|
-
),
|
|
479
|
-
...n
|
|
480
|
-
}
|
|
481
|
-
) });
|
|
482
|
-
}
|
|
483
|
-
function Ne({ ...t }) {
|
|
484
|
-
return /* @__PURE__ */ e.jsx(K.Group, { "data-slot": "dropdown-menu-group", ...t });
|
|
485
|
-
}
|
|
486
|
-
function U({
|
|
487
|
-
className: t,
|
|
488
|
-
inset: r,
|
|
489
|
-
variant: n = "default",
|
|
490
|
-
...l
|
|
491
|
-
}) {
|
|
492
|
-
return /* @__PURE__ */ e.jsx(
|
|
493
|
-
K.Item,
|
|
494
|
-
{
|
|
495
|
-
"data-slot": "dropdown-menu-item",
|
|
496
|
-
"data-inset": r,
|
|
497
|
-
"data-variant": n,
|
|
498
|
-
className: D(
|
|
499
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
500
|
-
t
|
|
501
|
-
),
|
|
502
|
-
...l
|
|
503
|
-
}
|
|
504
|
-
);
|
|
505
|
-
}
|
|
506
|
-
function Wt({
|
|
507
|
-
className: t,
|
|
508
|
-
inset: r,
|
|
509
|
-
...n
|
|
510
|
-
}) {
|
|
511
|
-
return /* @__PURE__ */ e.jsx(
|
|
512
|
-
K.Label,
|
|
513
|
-
{
|
|
514
|
-
"data-slot": "dropdown-menu-label",
|
|
515
|
-
"data-inset": r,
|
|
516
|
-
className: D("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
|
|
517
|
-
...n
|
|
518
|
-
}
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
function ye({ className: t, ...r }) {
|
|
522
|
-
return /* @__PURE__ */ e.jsx(
|
|
523
|
-
K.Separator,
|
|
524
|
-
{
|
|
525
|
-
"data-slot": "dropdown-menu-separator",
|
|
526
|
-
className: D("bg-border -mx-1 my-1 h-px", t),
|
|
527
|
-
...r
|
|
528
|
-
}
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
const Yt = le(), Jt = ({ onExportJson: t, onSave: r }) => {
|
|
532
|
-
const { flowId: n, setFlowId: l } = Ge(), { setNodes: m, setEdges: i, addNodes: s, screenToFlowPosition: c } = me(), d = n || Yt, a = De(), o = $e(), u = Tt(null), h = B(), x = () => {
|
|
533
|
-
const g = (window.innerWidth || 0) / 2, E = (window.innerHeight || 0) / 2, V = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-width"), 10), P = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-height"), 10), T = c({ x: g - V, y: E - P });
|
|
534
|
-
s([
|
|
535
|
-
{
|
|
536
|
-
...Ze,
|
|
537
|
-
id: le(),
|
|
538
|
-
position: T
|
|
539
|
-
}
|
|
540
|
-
]);
|
|
541
|
-
}, p = ({ target: g }) => {
|
|
542
|
-
const E = g.files?.[0];
|
|
543
|
-
if (!E)
|
|
544
|
-
return;
|
|
545
|
-
const V = new FileReader();
|
|
546
|
-
V.onload = (P) => {
|
|
547
|
-
try {
|
|
548
|
-
const T = JSON.parse(P.target?.result);
|
|
549
|
-
T && Array.isArray(T.nodes) && Array.isArray(T.edges) ? (m(T.nodes), i(T.edges), R.success(h("editor.actionsPanel.importSuccess"), {
|
|
550
|
-
description: h("editor.actionsPanel.importSuccessDesc")
|
|
551
|
-
})) : R.error(h("editor.actionsPanel.invalidJson"), {
|
|
552
|
-
description: h("editor.actionsPanel.invalidJsonDesc")
|
|
553
|
-
});
|
|
554
|
-
} catch (T) {
|
|
555
|
-
console.warn(T), R.error(h("editor.actionsPanel.parseError"), {
|
|
556
|
-
description: h("editor.actionsPanel.parseErrorDesc")
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
u.current && (u.current.value = "");
|
|
560
|
-
}, V.readAsText(E);
|
|
561
|
-
}, v = () => {
|
|
562
|
-
const g = { edges: o, id: d, nodes: a }, E = new Blob([JSON.stringify(g, null, 2)], { type: "application/json" }), V = URL.createObjectURL(E), P = document.createElement("a");
|
|
563
|
-
P.href = V, P.download = "treege.json", P.click(), URL.revokeObjectURL(V), R.success(h("editor.actionsPanel.downloadSuccess"), {
|
|
564
|
-
description: h("editor.actionsPanel.downloadSuccessDesc")
|
|
565
|
-
}), n || l?.(d), t?.(g);
|
|
566
|
-
}, M = () => {
|
|
567
|
-
n || l?.(d), r?.({ edges: o, id: d, nodes: a });
|
|
568
|
-
}, F = async () => {
|
|
569
|
-
try {
|
|
570
|
-
await navigator.clipboard.writeText(d), R.success(h("editor.actionsPanel.idCopied"), {
|
|
571
|
-
description: d
|
|
572
|
-
});
|
|
573
|
-
} catch {
|
|
574
|
-
R.error(h("editor.actionsPanel.copyFailed"));
|
|
575
|
-
}
|
|
576
|
-
}, S = () => {
|
|
577
|
-
m([]), i([]), R.success(h("editor.actionsPanel.clearSuccess"), {
|
|
578
|
-
description: h("editor.actionsPanel.clearSuccessDesc")
|
|
579
|
-
});
|
|
580
|
-
};
|
|
581
|
-
return /* @__PURE__ */ e.jsxs(lt, { position: "top-right", className: "flex gap-2", children: [
|
|
582
|
-
/* @__PURE__ */ e.jsxs(w, { variant: "outline", size: "sm", onClick: x, children: [
|
|
583
|
-
/* @__PURE__ */ e.jsx(xe, {}),
|
|
584
|
-
" ",
|
|
585
|
-
h("editor.actionsPanel.addNode")
|
|
586
|
-
] }),
|
|
587
|
-
/* @__PURE__ */ e.jsxs(Fe, { children: [
|
|
588
|
-
/* @__PURE__ */ e.jsx(Se, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", size: "sm", children: /* @__PURE__ */ e.jsx(ft, {}) }) }),
|
|
589
|
-
/* @__PURE__ */ e.jsxs(Ve, { align: "start", children: [
|
|
590
|
-
/* @__PURE__ */ e.jsx(Wt, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
591
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground text-xs", children: "Treege ID" }),
|
|
592
|
-
/* @__PURE__ */ e.jsxs(
|
|
593
|
-
"button",
|
|
594
|
-
{
|
|
595
|
-
onClick: F,
|
|
596
|
-
className: "flex items-center gap-2 font-mono text-muted-foreground transition-colors hover:text-primary",
|
|
597
|
-
type: "button",
|
|
598
|
-
children: [
|
|
599
|
-
/* @__PURE__ */ e.jsx(bt, { className: "h-3 w-3" }),
|
|
600
|
-
/* @__PURE__ */ e.jsx("span", { className: "truncate text-xs", children: d })
|
|
601
|
-
]
|
|
602
|
-
}
|
|
603
|
-
)
|
|
604
|
-
] }) }),
|
|
605
|
-
/* @__PURE__ */ e.jsx(ye, {}),
|
|
606
|
-
/* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
607
|
-
/* @__PURE__ */ e.jsxs(U, { onClick: () => u?.current?.click(), children: [
|
|
608
|
-
/* @__PURE__ */ e.jsx(Nt, {}),
|
|
609
|
-
" ",
|
|
610
|
-
h("editor.actionsPanel.importJson")
|
|
611
|
-
] }),
|
|
612
|
-
/* @__PURE__ */ e.jsxs(U, { onClick: v, children: [
|
|
613
|
-
/* @__PURE__ */ e.jsx(yt, {}),
|
|
614
|
-
" ",
|
|
615
|
-
h("editor.actionsPanel.exportJson")
|
|
616
|
-
] })
|
|
617
|
-
] }),
|
|
618
|
-
/* @__PURE__ */ e.jsx(ye, {}),
|
|
619
|
-
/* @__PURE__ */ e.jsx(Ne, { children: /* @__PURE__ */ e.jsxs(U, { onClick: M, children: [
|
|
620
|
-
/* @__PURE__ */ e.jsx(wt, {}),
|
|
621
|
-
" ",
|
|
622
|
-
h("common.save")
|
|
623
|
-
] }) }),
|
|
624
|
-
/* @__PURE__ */ e.jsx(ye, {}),
|
|
625
|
-
/* @__PURE__ */ e.jsx(Ne, { children: /* @__PURE__ */ e.jsxs(U, { onClick: S, className: "text-destructive focus:text-destructive", children: [
|
|
626
|
-
/* @__PURE__ */ e.jsx(Ft, { className: "text-destructive" }),
|
|
627
|
-
" ",
|
|
628
|
-
h("editor.actionsPanel.clear")
|
|
629
|
-
] }) })
|
|
630
|
-
] })
|
|
631
|
-
] }),
|
|
632
|
-
/* @__PURE__ */ e.jsx("input", { type: "file", accept: "application/json,.json", className: "hidden", ref: u, onChange: p })
|
|
633
|
-
] });
|
|
634
|
-
}, Xt = {
|
|
635
|
-
ar: "ar",
|
|
636
|
-
de: "de",
|
|
637
|
-
en: "en",
|
|
638
|
-
es: "es",
|
|
639
|
-
fr: "fr",
|
|
640
|
-
it: "it",
|
|
641
|
-
pt: "pt"
|
|
642
|
-
}, Y = ({ value: t = "en", onValueChange: r }) => /* @__PURE__ */ e.jsxs($, { value: t, onValueChange: r, children: [
|
|
643
|
-
/* @__PURE__ */ e.jsx(A, { className: "uppercase", children: /* @__PURE__ */ e.jsx(z, { placeholder: "" }) }),
|
|
644
|
-
/* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(q, { children: Object.values(Xt).map((n) => /* @__PURE__ */ e.jsx(f, { value: n, className: "uppercase", children: n }, n)) }) })
|
|
645
|
-
] }), ce = () => {
|
|
646
|
-
const { setNodes: t, setEdges: r, getNodes: n } = me(), l = Z(() => {
|
|
647
|
-
t((d) => d.map(({ selected: a, ...o }) => o)), r((d) => d.map(({ selected: a, ...o }) => o));
|
|
648
|
-
}, [r, t]), m = Z(
|
|
649
|
-
(d, a) => {
|
|
650
|
-
t(
|
|
651
|
-
(o) => o.map((u) => u.id === d ? {
|
|
652
|
-
...u,
|
|
653
|
-
data: {
|
|
654
|
-
...u.data,
|
|
655
|
-
...a
|
|
656
|
-
}
|
|
657
|
-
} : u)
|
|
658
|
-
);
|
|
659
|
-
},
|
|
660
|
-
[t]
|
|
661
|
-
), i = Z(
|
|
662
|
-
(d, a) => {
|
|
663
|
-
t(
|
|
664
|
-
(o) => o.map((u) => u.id === d ? {
|
|
665
|
-
...u,
|
|
666
|
-
data: {},
|
|
667
|
-
type: a
|
|
668
|
-
} : u)
|
|
669
|
-
);
|
|
670
|
-
},
|
|
671
|
-
[t]
|
|
672
|
-
), s = Z(
|
|
673
|
-
(d) => {
|
|
674
|
-
const a = n().find((o) => o.selected);
|
|
675
|
-
a && i(a.id, d);
|
|
676
|
-
},
|
|
677
|
-
[n, i]
|
|
678
|
-
), c = Z(
|
|
679
|
-
(d) => {
|
|
680
|
-
const a = n().find((o) => o.selected);
|
|
681
|
-
a && m(a.id, d);
|
|
682
|
-
},
|
|
683
|
-
[n, m]
|
|
684
|
-
);
|
|
685
|
-
return {
|
|
686
|
-
clearSelection: l,
|
|
687
|
-
updateNodeData: m,
|
|
688
|
-
updateNodeType: i,
|
|
689
|
-
updateSelectedNodeData: c,
|
|
690
|
-
updateSelectedNodeType: s
|
|
691
|
-
};
|
|
692
|
-
}, W = () => {
|
|
693
|
-
const t = De(), r = ae(() => t.filter(ve), [t]), n = ae(() => t.filter((m) => m.selected), [t]), l = ae(() => t.find((m) => m.selected), [t]);
|
|
694
|
-
return {
|
|
695
|
-
groupNodes: r,
|
|
696
|
-
hasSelectedNodes: n.length > 0,
|
|
697
|
-
nodes: t,
|
|
698
|
-
selectedNode: l,
|
|
699
|
-
selectedNodes: n
|
|
700
|
-
};
|
|
701
|
-
}, Qt = () => {
|
|
702
|
-
const [t, r] = _("en"), { updateSelectedNodeData: n } = ce(), { selectedNode: l } = W(), m = B(), { Field: i } = ie({
|
|
703
|
-
defaultValues: {
|
|
704
|
-
label: l?.data?.label || { en: "" },
|
|
705
|
-
targetId: l?.data?.targetId || ""
|
|
706
|
-
},
|
|
707
|
-
listeners: {
|
|
708
|
-
onChange: ({ formApi: s }) => {
|
|
709
|
-
s.handleSubmit().then();
|
|
710
|
-
},
|
|
711
|
-
onChangeDebounceMs: 150
|
|
712
|
-
},
|
|
713
|
-
onSubmit: ({ value: s }) => {
|
|
714
|
-
n(s);
|
|
715
|
-
}
|
|
716
|
-
});
|
|
717
|
-
return /* @__PURE__ */ e.jsx(
|
|
718
|
-
"form",
|
|
719
|
-
{
|
|
720
|
-
onSubmit: (s) => {
|
|
721
|
-
s.preventDefault(), s.stopPropagation();
|
|
722
|
-
},
|
|
723
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
|
|
724
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
725
|
-
/* @__PURE__ */ e.jsx(
|
|
726
|
-
i,
|
|
727
|
-
{
|
|
728
|
-
name: "label",
|
|
729
|
-
children: (s) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
|
|
730
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: s.name, children: m("editor.flowNodeForm.label") }),
|
|
731
|
-
/* @__PURE__ */ e.jsx(
|
|
732
|
-
y,
|
|
733
|
-
{
|
|
734
|
-
id: s.name,
|
|
735
|
-
name: s.name,
|
|
736
|
-
value: s.state.value?.[t] || "",
|
|
737
|
-
onBlur: s.handleBlur,
|
|
738
|
-
onChange: ({ target: c }) => {
|
|
739
|
-
s.handleChange({
|
|
740
|
-
...s.state.value,
|
|
741
|
-
[t]: c.value
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
)
|
|
746
|
-
] })
|
|
747
|
-
}
|
|
748
|
-
),
|
|
749
|
-
/* @__PURE__ */ e.jsx(Y, { value: t, onValueChange: r })
|
|
750
|
-
] }),
|
|
751
|
-
/* @__PURE__ */ e.jsx(
|
|
752
|
-
i,
|
|
753
|
-
{
|
|
754
|
-
name: "targetId",
|
|
755
|
-
children: (s) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
756
|
-
/* @__PURE__ */ e.jsxs(C, { htmlFor: s.name, children: [
|
|
757
|
-
m("editor.flowNodeForm.targetId"),
|
|
758
|
-
" (Flow ID)"
|
|
759
|
-
] }),
|
|
760
|
-
/* @__PURE__ */ e.jsx(
|
|
761
|
-
y,
|
|
762
|
-
{
|
|
763
|
-
id: s.name,
|
|
764
|
-
name: s.name,
|
|
765
|
-
value: s.state.value,
|
|
766
|
-
onBlur: s.handleBlur,
|
|
767
|
-
onChange: ({ target: c }) => s.handleChange(c.value)
|
|
768
|
-
}
|
|
769
|
-
),
|
|
770
|
-
/* @__PURE__ */ e.jsx(O, { children: "Unique identifier of the target flow." })
|
|
771
|
-
] })
|
|
772
|
-
}
|
|
773
|
-
)
|
|
774
|
-
] })
|
|
775
|
-
}
|
|
776
|
-
);
|
|
777
|
-
}, ea = () => {
|
|
778
|
-
const [t, r] = _("en"), { selectedNode: n } = W(), { updateSelectedNodeData: l } = ce(), { Field: m } = ie({
|
|
779
|
-
defaultValues: {
|
|
780
|
-
label: n?.data?.label || { en: "" }
|
|
781
|
-
},
|
|
782
|
-
listeners: {
|
|
783
|
-
onChange: ({ formApi: i }) => {
|
|
784
|
-
i.handleSubmit().then();
|
|
785
|
-
},
|
|
786
|
-
onChangeDebounceMs: 150
|
|
787
|
-
},
|
|
788
|
-
onSubmit: ({ value: i }) => {
|
|
789
|
-
l(i);
|
|
790
|
-
}
|
|
791
|
-
});
|
|
792
|
-
return /* @__PURE__ */ e.jsx(
|
|
793
|
-
"form",
|
|
794
|
-
{
|
|
795
|
-
onSubmit: (i) => {
|
|
796
|
-
i.preventDefault(), i.stopPropagation();
|
|
797
|
-
},
|
|
798
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
799
|
-
/* @__PURE__ */ e.jsx(
|
|
800
|
-
m,
|
|
801
|
-
{
|
|
802
|
-
name: "label",
|
|
803
|
-
children: (i) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
|
|
804
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: i.name, children: "Label" }),
|
|
805
|
-
/* @__PURE__ */ e.jsx(
|
|
806
|
-
y,
|
|
807
|
-
{
|
|
808
|
-
id: i.name,
|
|
809
|
-
name: i.name,
|
|
810
|
-
value: i.state.value?.[t] || "",
|
|
811
|
-
onBlur: i.handleBlur,
|
|
812
|
-
onChange: ({ target: s }) => {
|
|
813
|
-
i.handleChange({
|
|
814
|
-
...i.state.value,
|
|
815
|
-
[t]: s.value
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
)
|
|
820
|
-
] })
|
|
821
|
-
}
|
|
822
|
-
),
|
|
823
|
-
/* @__PURE__ */ e.jsx(Y, { value: t, onValueChange: r })
|
|
824
|
-
] })
|
|
825
|
-
}
|
|
826
|
-
);
|
|
827
|
-
}, ta = ["POST", "PUT", "PATCH"], aa = ({ value: t, onChange: r }) => {
|
|
828
|
-
const { selectedNode: n } = W(), l = B(), m = Ie(n?.id), { handleSubmit: i, Field: s } = ie({
|
|
829
|
-
defaultValues: {
|
|
830
|
-
body: t?.body || "",
|
|
831
|
-
// fetchOnMount should be true by default if there's no searchParam
|
|
832
|
-
fetchOnMount: t?.fetchOnMount ?? !t?.searchParam,
|
|
833
|
-
headers: t?.headers || [],
|
|
834
|
-
method: t?.method || "GET",
|
|
835
|
-
responseMapping: t?.responseMapping || {
|
|
836
|
-
labelField: "",
|
|
837
|
-
valueField: ""
|
|
838
|
-
},
|
|
839
|
-
responsePath: t?.responsePath || "",
|
|
840
|
-
searchParam: t?.searchParam || "",
|
|
841
|
-
showLoading: t?.showLoading !== !1,
|
|
842
|
-
url: t?.url || ""
|
|
843
|
-
},
|
|
844
|
-
listeners: {
|
|
845
|
-
onChange: ({ formApi: c }) => {
|
|
846
|
-
c.handleSubmit().then();
|
|
847
|
-
},
|
|
848
|
-
onChangeDebounceMs: 150
|
|
849
|
-
},
|
|
850
|
-
onSubmit: ({ value: c }) => {
|
|
851
|
-
r(c);
|
|
852
|
-
}
|
|
853
|
-
});
|
|
854
|
-
return /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
|
|
855
|
-
/* @__PURE__ */ e.jsx(
|
|
856
|
-
s,
|
|
857
|
-
{
|
|
858
|
-
name: "url",
|
|
859
|
-
children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
860
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: c.name, children: l("editor.httpConfigForm.apiUrl") }),
|
|
861
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
862
|
-
/* @__PURE__ */ e.jsx(
|
|
863
|
-
y,
|
|
864
|
-
{
|
|
865
|
-
id: c.name,
|
|
866
|
-
name: c.name,
|
|
867
|
-
value: c.state.value,
|
|
868
|
-
onBlur: c.handleBlur,
|
|
869
|
-
onChange: ({ target: d }) => c.handleChange(d.value),
|
|
870
|
-
placeholder: l("editor.httpConfigForm.apiUrlPlaceholder"),
|
|
871
|
-
className: "flex-1"
|
|
872
|
-
}
|
|
873
|
-
),
|
|
874
|
-
/* @__PURE__ */ e.jsxs(Fe, { children: [
|
|
875
|
-
/* @__PURE__ */ e.jsx(Se, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { type: "button", variant: "outline", size: "icon", children: /* @__PURE__ */ e.jsx(He, { className: "h-4 w-4" }) }) }),
|
|
876
|
-
/* @__PURE__ */ e.jsx(Ve, { align: "end", children: m.length === 0 ? /* @__PURE__ */ e.jsx(U, { disabled: !0, children: l("editor.httpConfigForm.noFieldsAvailable") }) : m.map((d) => /* @__PURE__ */ e.jsx(
|
|
877
|
-
U,
|
|
878
|
-
{
|
|
879
|
-
onClick: () => {
|
|
880
|
-
const a = `{{${d.nodeId}}}`, o = c.state.value || "";
|
|
881
|
-
c.handleChange(o + a);
|
|
882
|
-
},
|
|
883
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
884
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: d.label }),
|
|
885
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground text-xs", children: `{{${d.nodeId}}}` })
|
|
886
|
-
] })
|
|
887
|
-
},
|
|
888
|
-
d.nodeId
|
|
889
|
-
)) })
|
|
890
|
-
] })
|
|
891
|
-
] }),
|
|
892
|
-
/* @__PURE__ */ e.jsx(O, { children: l("editor.httpConfigForm.apiUrlDesc") })
|
|
893
|
-
] })
|
|
894
|
-
}
|
|
895
|
-
),
|
|
896
|
-
/* @__PURE__ */ e.jsx(
|
|
897
|
-
s,
|
|
898
|
-
{
|
|
899
|
-
name: "method",
|
|
900
|
-
children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
901
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: c.name, children: l("editor.httpConfigForm.httpMethod") }),
|
|
902
|
-
/* @__PURE__ */ e.jsxs(
|
|
903
|
-
$,
|
|
904
|
-
{
|
|
905
|
-
value: c.state.value,
|
|
906
|
-
onValueChange: (d) => c.handleChange(d),
|
|
907
|
-
children: [
|
|
908
|
-
/* @__PURE__ */ e.jsx(A, { id: c.name, children: /* @__PURE__ */ e.jsx(z, { placeholder: l("editor.httpConfigForm.selectMethod") }) }),
|
|
909
|
-
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
910
|
-
/* @__PURE__ */ e.jsx(f, { value: "GET", children: l("editor.httpConfigForm.methodGet") }),
|
|
911
|
-
/* @__PURE__ */ e.jsx(f, { value: "POST", children: l("editor.httpConfigForm.methodPost") }),
|
|
912
|
-
/* @__PURE__ */ e.jsx(f, { value: "PUT", children: l("editor.httpConfigForm.methodPut") }),
|
|
913
|
-
/* @__PURE__ */ e.jsx(f, { value: "DELETE", children: l("editor.httpConfigForm.methodDelete") }),
|
|
914
|
-
/* @__PURE__ */ e.jsx(f, { value: "PATCH", children: l("editor.httpConfigForm.methodPatch") })
|
|
915
|
-
] })
|
|
916
|
-
]
|
|
917
|
-
}
|
|
918
|
-
)
|
|
919
|
-
] })
|
|
920
|
-
}
|
|
921
|
-
),
|
|
922
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
923
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: l("editor.httpConfigForm.headers") }),
|
|
924
|
-
/* @__PURE__ */ e.jsx(s, { name: "headers", mode: "array", children: (c) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
925
|
-
c.state.value?.map((d, a) => {
|
|
926
|
-
const o = `headers[${a}]`;
|
|
927
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
928
|
-
/* @__PURE__ */ e.jsx(s, { name: `headers[${a}].key`, children: (u) => /* @__PURE__ */ e.jsx(
|
|
929
|
-
y,
|
|
930
|
-
{
|
|
931
|
-
placeholder: l("editor.httpConfigForm.headerName"),
|
|
932
|
-
value: u.state.value || "",
|
|
933
|
-
onChange: ({ target: h }) => u.handleChange(h.value)
|
|
934
|
-
}
|
|
935
|
-
) }),
|
|
936
|
-
/* @__PURE__ */ e.jsx(s, { name: `headers[${a}].value`, children: (u) => /* @__PURE__ */ e.jsx(
|
|
937
|
-
y,
|
|
938
|
-
{
|
|
939
|
-
placeholder: l("editor.httpConfigForm.headerValue"),
|
|
940
|
-
value: u.state.value || "",
|
|
941
|
-
onChange: ({ target: h }) => u.handleChange(h.value)
|
|
942
|
-
}
|
|
943
|
-
) }),
|
|
944
|
-
/* @__PURE__ */ e.jsx(
|
|
945
|
-
w,
|
|
946
|
-
{
|
|
947
|
-
type: "button",
|
|
948
|
-
variant: "ghost",
|
|
949
|
-
size: "icon",
|
|
950
|
-
onClick: () => {
|
|
951
|
-
c.removeValue(a);
|
|
952
|
-
},
|
|
953
|
-
children: /* @__PURE__ */ e.jsx(oe, { className: "h-4 w-4" })
|
|
954
|
-
}
|
|
955
|
-
)
|
|
956
|
-
] }, o);
|
|
957
|
-
}),
|
|
958
|
-
/* @__PURE__ */ e.jsxs(
|
|
959
|
-
w,
|
|
960
|
-
{
|
|
961
|
-
type: "button",
|
|
962
|
-
variant: "outline",
|
|
963
|
-
size: "sm",
|
|
964
|
-
onClick: () => {
|
|
965
|
-
c.pushValue({ key: "", value: "" });
|
|
966
|
-
},
|
|
967
|
-
children: [
|
|
968
|
-
/* @__PURE__ */ e.jsx(xe, { className: "mr-2 h-4 w-4" }),
|
|
969
|
-
l("editor.httpConfigForm.addHeader")
|
|
970
|
-
]
|
|
971
|
-
}
|
|
972
|
-
)
|
|
973
|
-
] }) })
|
|
974
|
-
] }),
|
|
975
|
-
/* @__PURE__ */ e.jsx(s, { name: "method", children: (c) => ta.includes(c.state.value || "") && /* @__PURE__ */ e.jsx(s, { name: "body", children: (d) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
976
|
-
/* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
977
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: d.name, children: l("editor.httpConfigForm.requestBody") }),
|
|
978
|
-
/* @__PURE__ */ e.jsxs(Fe, { children: [
|
|
979
|
-
/* @__PURE__ */ e.jsx(Se, { asChild: !0, children: /* @__PURE__ */ e.jsxs(w, { type: "button", variant: "ghost", size: "sm", children: [
|
|
980
|
-
/* @__PURE__ */ e.jsx(He, { className: "mr-2 h-4 w-4" }),
|
|
981
|
-
l("editor.httpConfigForm.insertVariable")
|
|
982
|
-
] }) }),
|
|
983
|
-
/* @__PURE__ */ e.jsx(Ve, { align: "end", children: m.length === 0 ? /* @__PURE__ */ e.jsx(U, { disabled: !0, children: l("editor.httpConfigForm.noFieldsAvailable") }) : m.map((a) => /* @__PURE__ */ e.jsx(
|
|
984
|
-
U,
|
|
985
|
-
{
|
|
986
|
-
onClick: () => {
|
|
987
|
-
const u = `\${${a.name || a.nodeId}}`, h = d.state.value || "";
|
|
988
|
-
d.handleChange(h + u), i().then();
|
|
989
|
-
},
|
|
990
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
991
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: a.label }),
|
|
992
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground text-xs", children: `\${${a.name || a.nodeId}}` })
|
|
993
|
-
] })
|
|
994
|
-
},
|
|
995
|
-
a.nodeId
|
|
996
|
-
)) })
|
|
997
|
-
] })
|
|
998
|
-
] }),
|
|
999
|
-
/* @__PURE__ */ e.jsx(
|
|
1000
|
-
Ke,
|
|
1001
|
-
{
|
|
1002
|
-
id: d.name,
|
|
1003
|
-
name: d.name,
|
|
1004
|
-
value: d.state.value,
|
|
1005
|
-
onBlur: d.handleBlur,
|
|
1006
|
-
onChange: ({ target: a }) => d.handleChange(a.value),
|
|
1007
|
-
placeholder: l("editor.httpConfigForm.requestBodyPlaceholder"),
|
|
1008
|
-
rows: 4
|
|
1009
|
-
}
|
|
1010
|
-
),
|
|
1011
|
-
/* @__PURE__ */ e.jsx(O, { children: l("editor.httpConfigForm.requestBodyDesc") })
|
|
1012
|
-
] }) }) }),
|
|
1013
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
1014
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: l("editor.httpConfigForm.responseConfiguration") }),
|
|
1015
|
-
/* @__PURE__ */ e.jsx(
|
|
1016
|
-
s,
|
|
1017
|
-
{
|
|
1018
|
-
name: "responsePath",
|
|
1019
|
-
children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1020
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: c.name, children: l("editor.httpConfigForm.responsePath") }),
|
|
1021
|
-
/* @__PURE__ */ e.jsx(
|
|
1022
|
-
y,
|
|
1023
|
-
{
|
|
1024
|
-
id: c.name,
|
|
1025
|
-
name: c.name,
|
|
1026
|
-
value: c.state.value,
|
|
1027
|
-
onBlur: c.handleBlur,
|
|
1028
|
-
onChange: ({ target: d }) => c.handleChange(d.value),
|
|
1029
|
-
placeholder: l("editor.httpConfigForm.responsePathPlaceholder")
|
|
1030
|
-
}
|
|
1031
|
-
),
|
|
1032
|
-
/* @__PURE__ */ e.jsx(O, { children: l("editor.httpConfigForm.responsePathDesc") })
|
|
1033
|
-
] })
|
|
1034
|
-
}
|
|
1035
|
-
),
|
|
1036
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
1037
|
-
/* @__PURE__ */ e.jsx("h5", { className: "font-medium text-sm", children: l("editor.httpConfigForm.mapToOptions") }),
|
|
1038
|
-
/* @__PURE__ */ e.jsx(
|
|
1039
|
-
s,
|
|
1040
|
-
{
|
|
1041
|
-
name: "responseMapping.valueField",
|
|
1042
|
-
children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1043
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: c.name, children: l("editor.httpConfigForm.valueField") }),
|
|
1044
|
-
/* @__PURE__ */ e.jsx(
|
|
1045
|
-
y,
|
|
1046
|
-
{
|
|
1047
|
-
id: c.name,
|
|
1048
|
-
name: c.name,
|
|
1049
|
-
value: c.state.value,
|
|
1050
|
-
onBlur: c.handleBlur,
|
|
1051
|
-
onChange: ({ target: d }) => c.handleChange(d.value),
|
|
1052
|
-
placeholder: l("editor.httpConfigForm.valueFieldPlaceholder")
|
|
1053
|
-
}
|
|
1054
|
-
),
|
|
1055
|
-
/* @__PURE__ */ e.jsx(O, { children: l("editor.httpConfigForm.valueFieldDesc") })
|
|
1056
|
-
] })
|
|
1057
|
-
}
|
|
1058
|
-
),
|
|
1059
|
-
/* @__PURE__ */ e.jsx(
|
|
1060
|
-
s,
|
|
1061
|
-
{
|
|
1062
|
-
name: "responseMapping.labelField",
|
|
1063
|
-
children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1064
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: c.name, children: l("editor.httpConfigForm.labelField") }),
|
|
1065
|
-
/* @__PURE__ */ e.jsx(
|
|
1066
|
-
y,
|
|
1067
|
-
{
|
|
1068
|
-
id: c.name,
|
|
1069
|
-
name: c.name,
|
|
1070
|
-
value: c.state.value,
|
|
1071
|
-
onBlur: c.handleBlur,
|
|
1072
|
-
onChange: ({ target: d }) => c.handleChange(d.value),
|
|
1073
|
-
placeholder: l("editor.httpConfigForm.labelFieldPlaceholder")
|
|
1074
|
-
}
|
|
1075
|
-
),
|
|
1076
|
-
/* @__PURE__ */ e.jsx(O, { children: l("editor.httpConfigForm.labelFieldDesc") })
|
|
1077
|
-
] })
|
|
1078
|
-
}
|
|
1079
|
-
)
|
|
1080
|
-
] }),
|
|
1081
|
-
/* @__PURE__ */ e.jsx(
|
|
1082
|
-
s,
|
|
1083
|
-
{
|
|
1084
|
-
name: "searchParam",
|
|
1085
|
-
children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1086
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: c.name, children: l("editor.httpConfigForm.searchParameter") }),
|
|
1087
|
-
/* @__PURE__ */ e.jsx(
|
|
1088
|
-
y,
|
|
1089
|
-
{
|
|
1090
|
-
id: c.name,
|
|
1091
|
-
name: c.name,
|
|
1092
|
-
value: c.state.value,
|
|
1093
|
-
onBlur: c.handleBlur,
|
|
1094
|
-
onChange: ({ target: d }) => c.handleChange(d.value),
|
|
1095
|
-
placeholder: l("editor.httpConfigForm.searchParameterPlaceholder")
|
|
1096
|
-
}
|
|
1097
|
-
),
|
|
1098
|
-
/* @__PURE__ */ e.jsx(O, { children: l("editor.httpConfigForm.searchParameterDesc") })
|
|
1099
|
-
] })
|
|
1100
|
-
}
|
|
1101
|
-
)
|
|
1102
|
-
] }),
|
|
1103
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
1104
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: l("editor.httpConfigForm.behavior") }),
|
|
1105
|
-
/* @__PURE__ */ e.jsx(s, { name: "searchParam", children: (c) => /* @__PURE__ */ e.jsx(s, { name: "fetchOnMount", children: (d) => {
|
|
1106
|
-
const a = !!c.state.value?.trim(), o = a ? d.state.value : !0;
|
|
1107
|
-
return !a && d.state.value !== !0 && d.handleChange(!0), /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1108
|
-
/* @__PURE__ */ e.jsx(
|
|
1109
|
-
te,
|
|
1110
|
-
{
|
|
1111
|
-
id: d.name,
|
|
1112
|
-
checked: o,
|
|
1113
|
-
disabled: !a,
|
|
1114
|
-
onCheckedChange: (u) => d.handleChange(u)
|
|
1115
|
-
}
|
|
1116
|
-
),
|
|
1117
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: d.name, className: a ? "" : "text-muted-foreground", children: l("editor.httpConfigForm.fetchOnMount") })
|
|
1118
|
-
] });
|
|
1119
|
-
} }) }),
|
|
1120
|
-
/* @__PURE__ */ e.jsx(
|
|
1121
|
-
s,
|
|
1122
|
-
{
|
|
1123
|
-
name: "showLoading",
|
|
1124
|
-
children: (c) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1125
|
-
/* @__PURE__ */ e.jsx(te, { id: c.name, checked: c.state.value, onCheckedChange: (d) => c.handleChange(d) }),
|
|
1126
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: c.name, children: l("editor.httpConfigForm.showLoadingState") })
|
|
1127
|
-
] })
|
|
1128
|
-
}
|
|
1129
|
-
)
|
|
1130
|
-
] })
|
|
1131
|
-
] }) });
|
|
1132
|
-
}, sa = ({
|
|
1133
|
-
options: t,
|
|
1134
|
-
value: r,
|
|
1135
|
-
onValueChange: n,
|
|
1136
|
-
placeholder: l = "Select...",
|
|
1137
|
-
searchPlaceholder: m = "Search or create...",
|
|
1138
|
-
createLabel: i = (u) => `Use: ${u}`,
|
|
1139
|
-
clearLabel: s = "Clear selection",
|
|
1140
|
-
emptyLabel: c = "No results found",
|
|
1141
|
-
className: d,
|
|
1142
|
-
allowClear: a = !0,
|
|
1143
|
-
allowCreate: o = !0
|
|
1144
|
-
}) => {
|
|
1145
|
-
const [u, h] = _(!1), [x, p] = _(""), v = (b) => b ?? "", M = (b) => b.trim().toLowerCase(), F = v(r), S = r !== null && r !== "", g = S ? t.find((b) => v(b.value) === F) : void 0, E = M(x), V = o && E !== "" && !t.some((b) => M(b.label) === E || M(b.value ?? "") === E), P = (b) => {
|
|
1146
|
-
b === F ? a && n?.("") : n?.(b), h(!1), p("");
|
|
1147
|
-
}, T = () => {
|
|
1148
|
-
x.trim() && (n?.(x.trim()), h(!1), p(""));
|
|
1149
|
-
}, X = () => {
|
|
1150
|
-
n?.(""), h(!1), p("");
|
|
1151
|
-
};
|
|
1152
|
-
return /* @__PURE__ */ e.jsxs(Pe, { open: u, onOpenChange: h, children: [
|
|
1153
|
-
/* @__PURE__ */ e.jsx(ke, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1154
|
-
w,
|
|
1155
|
-
{
|
|
1156
|
-
type: "button",
|
|
1157
|
-
variant: "outline",
|
|
1158
|
-
role: "combobox",
|
|
1159
|
-
"aria-expanded": u,
|
|
1160
|
-
className: D("w-full justify-between font-normal", d),
|
|
1161
|
-
children: [
|
|
1162
|
-
/* @__PURE__ */ e.jsx("span", { className: "truncate", children: S && g ? g.label : l }),
|
|
1163
|
-
/* @__PURE__ */ e.jsx(de, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1164
|
-
]
|
|
1165
|
-
}
|
|
1166
|
-
) }),
|
|
1167
|
-
/* @__PURE__ */ e.jsx(Ee, { className: "w-full p-0", align: "start", children: /* @__PURE__ */ e.jsxs(We, { shouldFilter: !1, children: [
|
|
1168
|
-
/* @__PURE__ */ e.jsx(Ye, { placeholder: m, value: x, onValueChange: p }),
|
|
1169
|
-
/* @__PURE__ */ e.jsxs(Je, { children: [
|
|
1170
|
-
/* @__PURE__ */ e.jsx(Xe, { children: c }),
|
|
1171
|
-
a && S && /* @__PURE__ */ e.jsx(Be, { children: /* @__PURE__ */ e.jsxs(be, { value: "__clear__", onSelect: X, className: "text-muted-foreground mt-1", children: [
|
|
1172
|
-
/* @__PURE__ */ e.jsx(oe, { className: "mr-2 h-4 w-4" }),
|
|
1173
|
-
s
|
|
1174
|
-
] }) }),
|
|
1175
|
-
/* @__PURE__ */ e.jsxs(Be, { children: [
|
|
1176
|
-
V && /* @__PURE__ */ e.jsxs(be, { value: `__create__${x}`, onSelect: T, className: "text-primary", children: [
|
|
1177
|
-
/* @__PURE__ */ e.jsx(xe, { className: "mr-2 h-4 w-4" }),
|
|
1178
|
-
i(x)
|
|
1179
|
-
] }),
|
|
1180
|
-
t.filter((b) => {
|
|
1181
|
-
const Q = x.toLowerCase();
|
|
1182
|
-
return b.label.toLowerCase().includes(Q) || (b.value?.toLowerCase() ?? "").includes(Q);
|
|
1183
|
-
}).map((b, Q) => /* @__PURE__ */ e.jsxs(
|
|
1184
|
-
be,
|
|
1185
|
-
{
|
|
1186
|
-
value: b.label,
|
|
1187
|
-
onSelect: () => P(b?.value || ""),
|
|
1188
|
-
children: [
|
|
1189
|
-
/* @__PURE__ */ e.jsx(
|
|
1190
|
-
St,
|
|
1191
|
-
{
|
|
1192
|
-
"aria-hidden": "true",
|
|
1193
|
-
className: D(
|
|
1194
|
-
"mr-2 h-4 w-4",
|
|
1195
|
-
S && v(b.value) === F ? "opacity-100" : "opacity-0"
|
|
1196
|
-
)
|
|
1197
|
-
}
|
|
1198
|
-
),
|
|
1199
|
-
b.label
|
|
1200
|
-
]
|
|
1201
|
-
},
|
|
1202
|
-
b.value ?? b.label ?? Q
|
|
1203
|
-
))
|
|
1204
|
-
] })
|
|
1205
|
-
] })
|
|
1206
|
-
] }) })
|
|
1207
|
-
] });
|
|
1208
|
-
}, na = {
|
|
1209
|
-
alphanumeric: "^[a-zA-Z0-9]+$",
|
|
1210
|
-
email: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
|
|
1211
|
-
letters: "^[a-zA-Z]+$",
|
|
1212
|
-
number: "^[0-9]+$",
|
|
1213
|
-
url: "^https?:\\/\\/.+$"
|
|
1214
|
-
}, we = Object.entries(na).map(([t, r]) => ({
|
|
1215
|
-
label: t.charAt(0).toUpperCase() + t.slice(1).replace(/_/g, " "),
|
|
1216
|
-
value: r
|
|
1217
|
-
})), oa = ({ value: t, onValueChange: r }) => {
|
|
1218
|
-
const n = ae(() => t && !we.some((l) => l.value === t) ? [
|
|
1219
|
-
...we,
|
|
1220
|
-
{
|
|
1221
|
-
label: `Custom: ${t}`,
|
|
1222
|
-
value: t
|
|
1223
|
-
}
|
|
1224
|
-
] : we, [t]);
|
|
1225
|
-
return /* @__PURE__ */ e.jsx(
|
|
1226
|
-
sa,
|
|
1227
|
-
{
|
|
1228
|
-
options: n,
|
|
1229
|
-
value: t,
|
|
1230
|
-
onValueChange: r,
|
|
1231
|
-
placeholder: "Select or create a pattern",
|
|
1232
|
-
searchPlaceholder: "Search patterns...",
|
|
1233
|
-
createLabel: (l) => `Use pattern: ${l}`
|
|
1234
|
-
}
|
|
1235
|
-
);
|
|
1236
|
-
}, ra = {
|
|
1237
|
-
address: "address",
|
|
1238
|
-
autocomplete: "autocomplete",
|
|
1239
|
-
checkbox: "checkbox",
|
|
1240
|
-
date: "date",
|
|
1241
|
-
daterange: "daterange",
|
|
1242
|
-
file: "file",
|
|
1243
|
-
hidden: "hidden",
|
|
1244
|
-
http: "http",
|
|
1245
|
-
number: "number",
|
|
1246
|
-
password: "password",
|
|
1247
|
-
radio: "radio",
|
|
1248
|
-
select: "select",
|
|
1249
|
-
switch: "switch",
|
|
1250
|
-
text: "text",
|
|
1251
|
-
textarea: "textarea",
|
|
1252
|
-
time: "time",
|
|
1253
|
-
timerange: "timerange"
|
|
1254
|
-
}, la = ({ value: t, onValueChange: r }) => {
|
|
1255
|
-
const n = B();
|
|
1256
|
-
return /* @__PURE__ */ e.jsxs(q, { children: [
|
|
1257
|
-
/* @__PURE__ */ e.jsx(Te, { children: n("editor.selectInputType.type") }),
|
|
1258
|
-
/* @__PURE__ */ e.jsxs($, { value: t, onValueChange: r, children: [
|
|
1259
|
-
/* @__PURE__ */ e.jsx(A, { className: "w-full capitalize", children: /* @__PURE__ */ e.jsx(z, { placeholder: "" }) }),
|
|
1260
|
-
/* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(q, { children: Object.values(ra).map((l) => /* @__PURE__ */ e.jsx(f, { value: l, className: "capitalize", children: l }, l)) }) })
|
|
1261
|
-
] })
|
|
1262
|
-
] });
|
|
1263
|
-
};
|
|
1264
|
-
function je({ ...t }) {
|
|
1265
|
-
return /* @__PURE__ */ e.jsx(Me.Root, { "data-slot": "collapsible", ...t });
|
|
1266
|
-
}
|
|
1267
|
-
function ge({ ...t }) {
|
|
1268
|
-
return /* @__PURE__ */ e.jsx(Me.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...t });
|
|
1269
|
-
}
|
|
1270
|
-
function Ce({ ...t }) {
|
|
1271
|
-
return /* @__PURE__ */ e.jsx(Me.CollapsibleContent, { "data-slot": "collapsible-content", ...t });
|
|
1272
|
-
}
|
|
1273
|
-
const ia = () => {
|
|
1274
|
-
const [t, r] = _("en"), { selectedNode: n } = W(), { updateSelectedNodeData: l } = ce(), m = ["select", "radio", "autocomplete", "checkbox"].includes(n?.data?.type || ""), i = Ie(n?.id), s = B(), { handleSubmit: c, Field: d } = ie({
|
|
1275
|
-
defaultValues: {
|
|
1276
|
-
defaultValue: n?.data?.defaultValue,
|
|
1277
|
-
errorMessage: n?.data?.errorMessage || { en: "" },
|
|
1278
|
-
helperText: n?.data?.helperText || { en: "" },
|
|
1279
|
-
httpConfig: n?.data?.httpConfig,
|
|
1280
|
-
label: n?.data?.label || { en: "" },
|
|
1281
|
-
multiple: n?.data?.multiple,
|
|
1282
|
-
name: n?.data?.name || "",
|
|
1283
|
-
options: n?.data?.options || [],
|
|
1284
|
-
pattern: n?.data?.pattern || "",
|
|
1285
|
-
placeholder: n?.data?.placeholder || { en: "" },
|
|
1286
|
-
required: n?.data?.required,
|
|
1287
|
-
type: n?.data?.type || ""
|
|
1288
|
-
},
|
|
1289
|
-
listeners: {
|
|
1290
|
-
onChange: ({ formApi: a }) => {
|
|
1291
|
-
a.handleSubmit().then();
|
|
1292
|
-
},
|
|
1293
|
-
onChangeDebounceMs: 150
|
|
1294
|
-
},
|
|
1295
|
-
onSubmit: ({ value: a }) => {
|
|
1296
|
-
l(a);
|
|
1297
|
-
}
|
|
1298
|
-
});
|
|
1299
|
-
return /* @__PURE__ */ e.jsx(
|
|
1300
|
-
"form",
|
|
1301
|
-
{
|
|
1302
|
-
onSubmit: (a) => {
|
|
1303
|
-
a.preventDefault(), a.stopPropagation();
|
|
1304
|
-
},
|
|
1305
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
|
|
1306
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
1307
|
-
/* @__PURE__ */ e.jsx(
|
|
1308
|
-
d,
|
|
1309
|
-
{
|
|
1310
|
-
name: "label",
|
|
1311
|
-
children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
|
|
1312
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.label") }),
|
|
1313
|
-
/* @__PURE__ */ e.jsx(
|
|
1314
|
-
y,
|
|
1315
|
-
{
|
|
1316
|
-
id: a.name,
|
|
1317
|
-
name: a.name,
|
|
1318
|
-
value: a.state.value?.[t] || "",
|
|
1319
|
-
onBlur: a.handleBlur,
|
|
1320
|
-
onChange: ({ target: o }) => {
|
|
1321
|
-
a.handleChange({
|
|
1322
|
-
...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
|
|
1323
|
-
[t]: o.value
|
|
1324
|
-
});
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
)
|
|
1328
|
-
] })
|
|
1329
|
-
}
|
|
1330
|
-
),
|
|
1331
|
-
/* @__PURE__ */ e.jsx(Y, { value: t, onValueChange: r })
|
|
1332
|
-
] }),
|
|
1333
|
-
/* @__PURE__ */ e.jsx(
|
|
1334
|
-
d,
|
|
1335
|
-
{
|
|
1336
|
-
name: "type",
|
|
1337
|
-
children: (a) => /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(la, { value: a.state.value, onValueChange: (o) => a.handleChange(o) }) })
|
|
1338
|
-
}
|
|
1339
|
-
),
|
|
1340
|
-
/* @__PURE__ */ e.jsx(
|
|
1341
|
-
d,
|
|
1342
|
-
{
|
|
1343
|
-
name: "name",
|
|
1344
|
-
children: (a) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1345
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.name") }),
|
|
1346
|
-
/* @__PURE__ */ e.jsx(
|
|
1347
|
-
y,
|
|
1348
|
-
{
|
|
1349
|
-
id: a.name,
|
|
1350
|
-
name: a.name,
|
|
1351
|
-
value: a.state.value,
|
|
1352
|
-
onBlur: a.handleBlur,
|
|
1353
|
-
onChange: ({ target: o }) => a.handleChange(o.value)
|
|
1354
|
-
}
|
|
1355
|
-
)
|
|
1356
|
-
] })
|
|
1357
|
-
}
|
|
1358
|
-
),
|
|
1359
|
-
n?.data?.type !== "file" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
1360
|
-
/* @__PURE__ */ e.jsx(
|
|
1361
|
-
d,
|
|
1362
|
-
{
|
|
1363
|
-
name: "placeholder",
|
|
1364
|
-
children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
|
|
1365
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.placeholder") }),
|
|
1366
|
-
/* @__PURE__ */ e.jsx(
|
|
1367
|
-
y,
|
|
1368
|
-
{
|
|
1369
|
-
id: a.name,
|
|
1370
|
-
name: a.name,
|
|
1371
|
-
value: a.state.value?.[t] || "",
|
|
1372
|
-
onBlur: a.handleBlur,
|
|
1373
|
-
onChange: ({ target: o }) => {
|
|
1374
|
-
a.handleChange({
|
|
1375
|
-
...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
|
|
1376
|
-
[t]: o.value
|
|
1377
|
-
});
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
)
|
|
1381
|
-
] })
|
|
1382
|
-
}
|
|
1383
|
-
),
|
|
1384
|
-
/* @__PURE__ */ e.jsx(Y, { value: t, onValueChange: r })
|
|
1385
|
-
] }),
|
|
1386
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
1387
|
-
/* @__PURE__ */ e.jsx(
|
|
1388
|
-
d,
|
|
1389
|
-
{
|
|
1390
|
-
name: "helperText",
|
|
1391
|
-
children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
|
|
1392
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.helperText") }),
|
|
1393
|
-
/* @__PURE__ */ e.jsx(
|
|
1394
|
-
y,
|
|
1395
|
-
{
|
|
1396
|
-
id: a.name,
|
|
1397
|
-
name: a.name,
|
|
1398
|
-
value: a.state.value?.[t] || "",
|
|
1399
|
-
onBlur: a.handleBlur,
|
|
1400
|
-
onChange: ({ target: o }) => {
|
|
1401
|
-
a.handleChange({
|
|
1402
|
-
...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
|
|
1403
|
-
[t]: o.value
|
|
1404
|
-
});
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
|
-
)
|
|
1408
|
-
] })
|
|
1409
|
-
}
|
|
1410
|
-
),
|
|
1411
|
-
/* @__PURE__ */ e.jsx(Y, { value: t, onValueChange: r })
|
|
1412
|
-
] }),
|
|
1413
|
-
n?.data?.type === "http" && /* @__PURE__ */ e.jsxs(je, { defaultOpen: !0, className: "flex w-full max-w-[350px] flex-col gap-2", children: [
|
|
1414
|
-
/* @__PURE__ */ e.jsx(ge, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1415
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: s("editor.inputNodeForm.httpConfiguration") }),
|
|
1416
|
-
/* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
|
|
1417
|
-
/* @__PURE__ */ e.jsx(de, {}),
|
|
1418
|
-
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: s("common.toggle") })
|
|
1419
|
-
] })
|
|
1420
|
-
] }) }),
|
|
1421
|
-
/* @__PURE__ */ e.jsx(Ce, { className: "flex flex-col gap-4", children: /* @__PURE__ */ e.jsx(d, { name: "httpConfig", children: (a) => /* @__PURE__ */ e.jsx(
|
|
1422
|
-
aa,
|
|
1423
|
-
{
|
|
1424
|
-
value: a.state.value,
|
|
1425
|
-
onChange: (o) => {
|
|
1426
|
-
a.handleChange(o), c().then();
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
) }) })
|
|
1430
|
-
] }),
|
|
1431
|
-
n?.data?.type === "file" && /* @__PURE__ */ e.jsx(
|
|
1432
|
-
d,
|
|
1433
|
-
{
|
|
1434
|
-
name: "multiple",
|
|
1435
|
-
children: (a) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1436
|
-
/* @__PURE__ */ e.jsx(te, { id: a.name, checked: a.state.value, onCheckedChange: (o) => a.handleChange(o) }),
|
|
1437
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.multipleFiles") })
|
|
1438
|
-
] })
|
|
1439
|
-
}
|
|
1440
|
-
),
|
|
1441
|
-
m && /* @__PURE__ */ e.jsxs(je, { defaultOpen: !0, className: "flex w-full max-w-[350px] flex-col gap-2", children: [
|
|
1442
|
-
/* @__PURE__ */ e.jsx(ge, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1443
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: s("editor.inputNodeForm.options") }),
|
|
1444
|
-
/* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
|
|
1445
|
-
/* @__PURE__ */ e.jsx(de, {}),
|
|
1446
|
-
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: s("common.toggle") })
|
|
1447
|
-
] })
|
|
1448
|
-
] }) }),
|
|
1449
|
-
/* @__PURE__ */ e.jsxs(Ce, { className: "flex flex-col gap-4", children: [
|
|
1450
|
-
/* @__PURE__ */ e.jsx(d, { name: "options", mode: "array", children: (a) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1451
|
-
a.state.value?.map((o, u) => {
|
|
1452
|
-
const h = `options[${u}]`;
|
|
1453
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
1454
|
-
/* @__PURE__ */ e.jsx(d, { name: `options[${u}].label`, children: (x) => /* @__PURE__ */ e.jsx(
|
|
1455
|
-
y,
|
|
1456
|
-
{
|
|
1457
|
-
placeholder: s("editor.inputNodeForm.optionLabel"),
|
|
1458
|
-
value: x.state.value?.[t] || "",
|
|
1459
|
-
onChange: ({ target: p }) => {
|
|
1460
|
-
x.handleChange({
|
|
1461
|
-
...typeof x.state.value == "object" && x.state.value !== null ? x.state.value : {},
|
|
1462
|
-
[t]: p.value
|
|
1463
|
-
});
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
) }),
|
|
1467
|
-
/* @__PURE__ */ e.jsx(d, { name: `options[${u}].value`, children: (x) => /* @__PURE__ */ e.jsx(
|
|
1468
|
-
y,
|
|
1469
|
-
{
|
|
1470
|
-
placeholder: s("editor.inputNodeForm.optionValue"),
|
|
1471
|
-
value: x.state.value || "",
|
|
1472
|
-
onChange: ({ target: p }) => x.handleChange(p.value)
|
|
1473
|
-
}
|
|
1474
|
-
) }),
|
|
1475
|
-
/* @__PURE__ */ e.jsx(
|
|
1476
|
-
w,
|
|
1477
|
-
{
|
|
1478
|
-
type: "button",
|
|
1479
|
-
variant: "ghost",
|
|
1480
|
-
size: "icon",
|
|
1481
|
-
onClick: () => {
|
|
1482
|
-
a.removeValue(u), c().then();
|
|
1483
|
-
},
|
|
1484
|
-
children: /* @__PURE__ */ e.jsx(oe, { className: "h-4 w-4" })
|
|
1485
|
-
}
|
|
1486
|
-
)
|
|
1487
|
-
] }, h);
|
|
1488
|
-
}),
|
|
1489
|
-
/* @__PURE__ */ e.jsx(
|
|
1490
|
-
w,
|
|
1491
|
-
{
|
|
1492
|
-
type: "button",
|
|
1493
|
-
variant: "outline",
|
|
1494
|
-
size: "sm",
|
|
1495
|
-
onClick: () => {
|
|
1496
|
-
a.pushValue({ label: { en: "" }, value: "" }), c().then();
|
|
1497
|
-
},
|
|
1498
|
-
children: s("editor.inputNodeForm.addOption")
|
|
1499
|
-
}
|
|
1500
|
-
)
|
|
1501
|
-
] }) }),
|
|
1502
|
-
n?.data?.type === "select" && /* @__PURE__ */ e.jsx(
|
|
1503
|
-
d,
|
|
1504
|
-
{
|
|
1505
|
-
name: "multiple",
|
|
1506
|
-
children: (a) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1507
|
-
/* @__PURE__ */ e.jsx(te, { id: a.name, checked: a.state.value, onCheckedChange: (o) => a.handleChange(o) }),
|
|
1508
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.multipleSelection") })
|
|
1509
|
-
] })
|
|
1510
|
-
}
|
|
1511
|
-
)
|
|
1512
|
-
] })
|
|
1513
|
-
] }),
|
|
1514
|
-
/* @__PURE__ */ e.jsxs(je, { className: "flex w-full max-w-[350px] flex-col gap-2", children: [
|
|
1515
|
-
/* @__PURE__ */ e.jsx(ge, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1516
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: s("editor.inputNodeForm.validation") }),
|
|
1517
|
-
/* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
|
|
1518
|
-
/* @__PURE__ */ e.jsx(de, {}),
|
|
1519
|
-
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: s("common.toggle") })
|
|
1520
|
-
] })
|
|
1521
|
-
] }) }),
|
|
1522
|
-
/* @__PURE__ */ e.jsxs(Ce, { className: "flex flex-col gap-6", children: [
|
|
1523
|
-
/* @__PURE__ */ e.jsx(
|
|
1524
|
-
d,
|
|
1525
|
-
{
|
|
1526
|
-
name: "required",
|
|
1527
|
-
children: (a) => /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1528
|
-
/* @__PURE__ */ e.jsx(te, { id: a.name, checked: a.state.value, onCheckedChange: (o) => a.handleChange(o) }),
|
|
1529
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.required") })
|
|
1530
|
-
] }) })
|
|
1531
|
-
}
|
|
1532
|
-
),
|
|
1533
|
-
/* @__PURE__ */ e.jsx(
|
|
1534
|
-
d,
|
|
1535
|
-
{
|
|
1536
|
-
name: "pattern",
|
|
1537
|
-
children: (a) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1538
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.pattern") }),
|
|
1539
|
-
/* @__PURE__ */ e.jsx(oa, { value: a.state.value, onValueChange: a.handleChange })
|
|
1540
|
-
] })
|
|
1541
|
-
}
|
|
1542
|
-
),
|
|
1543
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
1544
|
-
/* @__PURE__ */ e.jsx(
|
|
1545
|
-
d,
|
|
1546
|
-
{
|
|
1547
|
-
name: "errorMessage",
|
|
1548
|
-
children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
|
|
1549
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.errorMessage") }),
|
|
1550
|
-
/* @__PURE__ */ e.jsx(
|
|
1551
|
-
y,
|
|
1552
|
-
{
|
|
1553
|
-
id: a.name,
|
|
1554
|
-
name: a.name,
|
|
1555
|
-
value: a.state.value?.[t] || "",
|
|
1556
|
-
onBlur: a.handleBlur,
|
|
1557
|
-
onChange: ({ target: o }) => {
|
|
1558
|
-
a.handleChange({
|
|
1559
|
-
...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
|
|
1560
|
-
[t]: o.value
|
|
1561
|
-
});
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
)
|
|
1565
|
-
] })
|
|
1566
|
-
}
|
|
1567
|
-
),
|
|
1568
|
-
/* @__PURE__ */ e.jsx(Y, { value: t, onValueChange: r })
|
|
1569
|
-
] })
|
|
1570
|
-
] })
|
|
1571
|
-
] }),
|
|
1572
|
-
/* @__PURE__ */ e.jsxs(je, { className: "flex w-full max-w-[350px] flex-col gap-2", children: [
|
|
1573
|
-
/* @__PURE__ */ e.jsx(ge, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
1574
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: s("editor.inputNodeForm.advancedConfiguration") }),
|
|
1575
|
-
/* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
|
|
1576
|
-
/* @__PURE__ */ e.jsx(de, {}),
|
|
1577
|
-
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: s("common.toggle") })
|
|
1578
|
-
] })
|
|
1579
|
-
] }) }),
|
|
1580
|
-
/* @__PURE__ */ e.jsx(Ce, { className: "flex flex-col gap-6", children: /* @__PURE__ */ e.jsx(d, { name: "defaultValue", children: (a) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1581
|
-
/* @__PURE__ */ e.jsxs(N, { children: [
|
|
1582
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: a.name, children: s("editor.inputNodeForm.defaultValueType") }),
|
|
1583
|
-
/* @__PURE__ */ e.jsxs(
|
|
1584
|
-
$,
|
|
1585
|
-
{
|
|
1586
|
-
value: a.state.value?.type || "none",
|
|
1587
|
-
onValueChange: (o) => {
|
|
1588
|
-
a.handleChange(o === "none" ? null : { type: o });
|
|
1589
|
-
},
|
|
1590
|
-
children: [
|
|
1591
|
-
/* @__PURE__ */ e.jsx(A, { id: a.name, children: /* @__PURE__ */ e.jsx(z, { placeholder: s("editor.inputNodeForm.selectType") }) }),
|
|
1592
|
-
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
1593
|
-
/* @__PURE__ */ e.jsx(f, { value: "none", children: s("editor.inputNodeForm.defaultValueTypeNone") }),
|
|
1594
|
-
/* @__PURE__ */ e.jsx(f, { value: "static", children: s("editor.inputNodeForm.defaultValueTypeStatic") }),
|
|
1595
|
-
/* @__PURE__ */ e.jsx(f, { value: "reference", children: s("editor.inputNodeForm.defaultValueTypeReference") })
|
|
1596
|
-
] })
|
|
1597
|
-
]
|
|
1598
|
-
}
|
|
1599
|
-
)
|
|
1600
|
-
] }),
|
|
1601
|
-
a.state.value?.type === "static" && /* @__PURE__ */ e.jsx(d, { name: "defaultValue.staticValue", children: (o) => {
|
|
1602
|
-
const u = n?.data?.type;
|
|
1603
|
-
return (u === "select" || u === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1604
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: o.name, children: s("editor.inputNodeForm.defaultValuesCommaSeparated") }),
|
|
1605
|
-
/* @__PURE__ */ e.jsx(
|
|
1606
|
-
y,
|
|
1607
|
-
{
|
|
1608
|
-
id: o.name,
|
|
1609
|
-
placeholder: s("editor.inputNodeForm.defaultValuesPlaceholder"),
|
|
1610
|
-
value: Array.isArray(o.state.value) ? o.state.value.join(", ") : "",
|
|
1611
|
-
onChange: ({ target: h }) => {
|
|
1612
|
-
const x = h.value.split(",").map((p) => p.trim()).filter(Boolean);
|
|
1613
|
-
o.handleChange(x.length > 0 ? x : null);
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
)
|
|
1617
|
-
] }) : u === "checkbox" ? /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1618
|
-
/* @__PURE__ */ e.jsx(
|
|
1619
|
-
te,
|
|
1620
|
-
{
|
|
1621
|
-
id: o.name,
|
|
1622
|
-
checked: !!o.state.value,
|
|
1623
|
-
onCheckedChange: (h) => o.handleChange(h)
|
|
1624
|
-
}
|
|
1625
|
-
),
|
|
1626
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: o.name, children: s("editor.inputNodeForm.defaultChecked") })
|
|
1627
|
-
] }) }) : /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1628
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: o.name, children: s("editor.inputNodeForm.staticValue") }),
|
|
1629
|
-
/* @__PURE__ */ e.jsx(
|
|
1630
|
-
y,
|
|
1631
|
-
{
|
|
1632
|
-
id: o.name,
|
|
1633
|
-
placeholder: s("editor.inputNodeForm.staticValuePlaceholder"),
|
|
1634
|
-
value: typeof o.state.value == "string" ? o.state.value : "",
|
|
1635
|
-
onChange: ({ target: h }) => o.handleChange(h.value || "")
|
|
1636
|
-
}
|
|
1637
|
-
)
|
|
1638
|
-
] });
|
|
1639
|
-
} }),
|
|
1640
|
-
a.state.value?.type === "reference" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1641
|
-
/* @__PURE__ */ e.jsx(d, { name: "defaultValue.referenceField", children: (o) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1642
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: o.name, children: s("editor.inputNodeForm.referenceField") }),
|
|
1643
|
-
/* @__PURE__ */ e.jsxs(
|
|
1644
|
-
$,
|
|
1645
|
-
{
|
|
1646
|
-
value: o.state.value || "",
|
|
1647
|
-
onValueChange: (u) => {
|
|
1648
|
-
o.handleChange(u);
|
|
1649
|
-
},
|
|
1650
|
-
children: [
|
|
1651
|
-
/* @__PURE__ */ e.jsx(A, { id: o.name, children: /* @__PURE__ */ e.jsx(z, { placeholder: s("editor.inputNodeForm.selectReferenceField") }) }),
|
|
1652
|
-
/* @__PURE__ */ e.jsx(G, { children: i.length === 0 ? /* @__PURE__ */ e.jsx(f, { value: "none", disabled: !0, children: s("editor.inputNodeForm.noParentFieldsAvailable") }) : i.map((u) => /* @__PURE__ */ e.jsxs(f, { value: u.nodeId, children: [
|
|
1653
|
-
u.label,
|
|
1654
|
-
" (",
|
|
1655
|
-
u.type,
|
|
1656
|
-
")"
|
|
1657
|
-
] }, u.nodeId)) })
|
|
1658
|
-
]
|
|
1659
|
-
}
|
|
1660
|
-
),
|
|
1661
|
-
i.length === 0 && /* @__PURE__ */ e.jsx(O, { children: s("editor.inputNodeForm.addInputFieldsBeforeReference") })
|
|
1662
|
-
] }) }),
|
|
1663
|
-
/* @__PURE__ */ e.jsx(d, { name: "defaultValue.transformFunction", children: (o) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1664
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: o.name, children: s("editor.inputNodeForm.transformType") }),
|
|
1665
|
-
/* @__PURE__ */ e.jsxs(
|
|
1666
|
-
$,
|
|
1667
|
-
{
|
|
1668
|
-
value: o.state.value || "none",
|
|
1669
|
-
onValueChange: (u) => {
|
|
1670
|
-
const h = u === "none" ? null : u;
|
|
1671
|
-
if (o.handleChange(h), u === "toObject") {
|
|
1672
|
-
const x = a.state.value;
|
|
1673
|
-
a.handleChange({
|
|
1674
|
-
...x,
|
|
1675
|
-
objectMapping: []
|
|
1676
|
-
});
|
|
1677
|
-
}
|
|
1678
|
-
},
|
|
1679
|
-
children: [
|
|
1680
|
-
/* @__PURE__ */ e.jsx(A, { id: o.name, children: /* @__PURE__ */ e.jsx(z, { placeholder: s("editor.inputNodeForm.selectTransformation") }) }),
|
|
1681
|
-
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
1682
|
-
/* @__PURE__ */ e.jsx(f, { value: "none", children: s("editor.inputNodeForm.transformNone") }),
|
|
1683
|
-
/* @__PURE__ */ e.jsx(f, { value: "toString", children: s("editor.inputNodeForm.transformString") }),
|
|
1684
|
-
/* @__PURE__ */ e.jsx(f, { value: "toNumber", children: s("editor.inputNodeForm.transformNumber") }),
|
|
1685
|
-
/* @__PURE__ */ e.jsx(f, { value: "toBoolean", children: s("editor.inputNodeForm.transformBoolean") }),
|
|
1686
|
-
/* @__PURE__ */ e.jsx(f, { value: "toArray", children: s("editor.inputNodeForm.transformArray") }),
|
|
1687
|
-
/* @__PURE__ */ e.jsx(f, { value: "toObject", children: s("editor.inputNodeForm.transformMapToObject") })
|
|
1688
|
-
] })
|
|
1689
|
-
]
|
|
1690
|
-
}
|
|
1691
|
-
),
|
|
1692
|
-
/* @__PURE__ */ e.jsx(O, { children: s("editor.inputNodeForm.transformDesc") })
|
|
1693
|
-
] }) }),
|
|
1694
|
-
a.state.value?.transformFunction === "toObject" && /* @__PURE__ */ e.jsx(d, { name: "defaultValue.objectMapping", mode: "array", children: (o) => /* @__PURE__ */ e.jsxs(N, { children: [
|
|
1695
|
-
/* @__PURE__ */ e.jsx(C, { children: s("editor.inputNodeForm.objectMapping") }),
|
|
1696
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1697
|
-
o.state.value?.map((u, h) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1698
|
-
/* @__PURE__ */ e.jsx(d, { name: `defaultValue.objectMapping[${h}].sourceKey`, children: (x) => /* @__PURE__ */ e.jsx(
|
|
1699
|
-
y,
|
|
1700
|
-
{
|
|
1701
|
-
placeholder: s("editor.inputNodeForm.sourceKey"),
|
|
1702
|
-
value: x.state.value || "",
|
|
1703
|
-
onChange: ({ target: p }) => x.handleChange(p.value)
|
|
1704
|
-
}
|
|
1705
|
-
) }),
|
|
1706
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "→" }),
|
|
1707
|
-
/* @__PURE__ */ e.jsx(d, { name: `defaultValue.objectMapping[${h}].targetKey`, children: (x) => /* @__PURE__ */ e.jsx(
|
|
1708
|
-
y,
|
|
1709
|
-
{
|
|
1710
|
-
placeholder: s("editor.inputNodeForm.targetKey"),
|
|
1711
|
-
value: x.state.value || "",
|
|
1712
|
-
onChange: ({ target: p }) => x.handleChange(p.value)
|
|
1713
|
-
}
|
|
1714
|
-
) }),
|
|
1715
|
-
/* @__PURE__ */ e.jsx(
|
|
1716
|
-
w,
|
|
1717
|
-
{
|
|
1718
|
-
type: "button",
|
|
1719
|
-
variant: "ghost",
|
|
1720
|
-
size: "icon",
|
|
1721
|
-
onClick: () => {
|
|
1722
|
-
o.removeValue(h), c().then();
|
|
1723
|
-
},
|
|
1724
|
-
children: /* @__PURE__ */ e.jsx(oe, { className: "h-4 w-4" })
|
|
1725
|
-
}
|
|
1726
|
-
)
|
|
1727
|
-
] }, `mapping-${h}`)),
|
|
1728
|
-
/* @__PURE__ */ e.jsxs(
|
|
1729
|
-
w,
|
|
1730
|
-
{
|
|
1731
|
-
type: "button",
|
|
1732
|
-
variant: "outline",
|
|
1733
|
-
size: "sm",
|
|
1734
|
-
className: "w-full",
|
|
1735
|
-
onClick: () => {
|
|
1736
|
-
o.pushValue({ sourceKey: "", targetKey: "" }), c().then();
|
|
1737
|
-
},
|
|
1738
|
-
children: [
|
|
1739
|
-
/* @__PURE__ */ e.jsx(xe, { className: "mr-2 h-4 w-4" }),
|
|
1740
|
-
s("editor.inputNodeForm.addMapping")
|
|
1741
|
-
]
|
|
1742
|
-
}
|
|
1743
|
-
)
|
|
1744
|
-
] }),
|
|
1745
|
-
/* @__PURE__ */ e.jsx(O, { children: s("editor.inputNodeForm.objectMappingDesc") })
|
|
1746
|
-
] }) })
|
|
1747
|
-
] })
|
|
1748
|
-
] }) }) })
|
|
1749
|
-
] })
|
|
1750
|
-
] })
|
|
1751
|
-
}
|
|
1752
|
-
);
|
|
1753
|
-
}, Oe = {
|
|
1754
|
-
divider: "divider",
|
|
1755
|
-
title: "title"
|
|
1756
|
-
}, ca = () => {
|
|
1757
|
-
const [t, r] = _("en"), { selectedNode: n } = W(), { updateSelectedNodeData: l } = ce(), { Field: m } = ie({
|
|
1758
|
-
defaultValues: {
|
|
1759
|
-
label: n?.data?.label || { en: "" },
|
|
1760
|
-
type: n?.data?.type
|
|
1761
|
-
},
|
|
1762
|
-
listeners: {
|
|
1763
|
-
onChange: ({ formApi: i }) => {
|
|
1764
|
-
i.handleSubmit().then();
|
|
1765
|
-
},
|
|
1766
|
-
onChangeDebounceMs: 150
|
|
1767
|
-
},
|
|
1768
|
-
onSubmit: ({ value: i }) => {
|
|
1769
|
-
l(i);
|
|
1770
|
-
}
|
|
1771
|
-
});
|
|
1772
|
-
return /* @__PURE__ */ e.jsx(
|
|
1773
|
-
"form",
|
|
1774
|
-
{
|
|
1775
|
-
onSubmit: (i) => {
|
|
1776
|
-
i.preventDefault(), i.stopPropagation();
|
|
1777
|
-
},
|
|
1778
|
-
children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
|
|
1779
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
1780
|
-
/* @__PURE__ */ e.jsx(
|
|
1781
|
-
m,
|
|
1782
|
-
{
|
|
1783
|
-
name: "label",
|
|
1784
|
-
children: (i) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
|
|
1785
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: i.name, children: "Label" }),
|
|
1786
|
-
/* @__PURE__ */ e.jsx(
|
|
1787
|
-
y,
|
|
1788
|
-
{
|
|
1789
|
-
id: i.name,
|
|
1790
|
-
name: i.name,
|
|
1791
|
-
value: i.state.value?.[t] || "",
|
|
1792
|
-
onBlur: i.handleBlur,
|
|
1793
|
-
onChange: ({ target: s }) => {
|
|
1794
|
-
i.handleChange({
|
|
1795
|
-
...i.state.value,
|
|
1796
|
-
[t]: s.value
|
|
1797
|
-
});
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
)
|
|
1801
|
-
] })
|
|
1802
|
-
}
|
|
1803
|
-
),
|
|
1804
|
-
/* @__PURE__ */ e.jsx(Y, { value: t, onValueChange: r })
|
|
1805
|
-
] }),
|
|
1806
|
-
/* @__PURE__ */ e.jsx(
|
|
1807
|
-
m,
|
|
1808
|
-
{
|
|
1809
|
-
name: "type",
|
|
1810
|
-
children: (i) => /* @__PURE__ */ e.jsxs(q, { children: [
|
|
1811
|
-
/* @__PURE__ */ e.jsx(Te, { children: "Type" }),
|
|
1812
|
-
/* @__PURE__ */ e.jsxs($, { value: i.state.value, onValueChange: (s) => i.handleChange(s), children: [
|
|
1813
|
-
/* @__PURE__ */ e.jsx(A, { className: "w-full", children: /* @__PURE__ */ e.jsx(z, { placeholder: "" }) }),
|
|
1814
|
-
/* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsxs(q, { children: [
|
|
1815
|
-
/* @__PURE__ */ e.jsx(f, { value: Oe.title, children: "Title" }),
|
|
1816
|
-
/* @__PURE__ */ e.jsx(f, { value: Oe.divider, children: "Divider" })
|
|
1817
|
-
] }) })
|
|
1818
|
-
] })
|
|
1819
|
-
] })
|
|
1820
|
-
}
|
|
1821
|
-
)
|
|
1822
|
-
] })
|
|
1823
|
-
}
|
|
1824
|
-
);
|
|
1825
|
-
}, da = () => {
|
|
1826
|
-
const [t, r] = _(""), [n, l] = _(!1), { selectedNode: m, groupNodes: i } = W(), { setNodes: s } = me(), c = m?.parentId || "none", d = ve(m), a = B();
|
|
1827
|
-
if (d)
|
|
1828
|
-
return null;
|
|
1829
|
-
const o = (h) => {
|
|
1830
|
-
m && s((x) => h === "none" ? x.map((v) => {
|
|
1831
|
-
if (v.id === m.id) {
|
|
1832
|
-
const { parentId: M, extent: F, ...S } = v;
|
|
1833
|
-
return S;
|
|
1834
|
-
}
|
|
1835
|
-
return v;
|
|
1836
|
-
}) : x.find((v) => v.id === h) ? x.map((v) => v.id === m.id ? {
|
|
1837
|
-
...v,
|
|
1838
|
-
extent: "parent",
|
|
1839
|
-
parentId: h,
|
|
1840
|
-
position: {
|
|
1841
|
-
x: 50,
|
|
1842
|
-
y: 80
|
|
1843
|
-
}
|
|
1844
|
-
} : v) : x);
|
|
1845
|
-
}, u = () => {
|
|
1846
|
-
if (!(t.trim() && m))
|
|
1847
|
-
return;
|
|
1848
|
-
if (i.find((p) => {
|
|
1849
|
-
const v = p.data?.label?.en || p.data?.label;
|
|
1850
|
-
return String(v).toLowerCase() === t.trim().toLowerCase();
|
|
1851
|
-
})) {
|
|
1852
|
-
R.error("This group already exists", {
|
|
1853
|
-
description: "Use the selector to add the node to an existing group."
|
|
1854
|
-
});
|
|
1855
|
-
return;
|
|
1856
|
-
}
|
|
1857
|
-
const x = le();
|
|
1858
|
-
s((p) => {
|
|
1859
|
-
const v = {
|
|
1860
|
-
data: {
|
|
1861
|
-
label: {
|
|
1862
|
-
en: t.trim()
|
|
1863
|
-
}
|
|
1864
|
-
},
|
|
1865
|
-
id: x,
|
|
1866
|
-
position: {
|
|
1867
|
-
x: m.position.x - 300,
|
|
1868
|
-
y: m.position.y
|
|
1869
|
-
},
|
|
1870
|
-
style: {
|
|
1871
|
-
height: 400,
|
|
1872
|
-
width: 600
|
|
1873
|
-
},
|
|
1874
|
-
type: "group"
|
|
1875
|
-
}, M = p.map((F) => F.id === m.id ? {
|
|
1876
|
-
...F,
|
|
1877
|
-
extent: "parent",
|
|
1878
|
-
parentId: x,
|
|
1879
|
-
position: {
|
|
1880
|
-
x: 175,
|
|
1881
|
-
y: 30
|
|
1882
|
-
}
|
|
1883
|
-
} : F);
|
|
1884
|
-
return [v, ...M];
|
|
1885
|
-
}), r(""), l(!1), R.success("Group created", {
|
|
1886
|
-
description: `The group "${t.trim()}" has been created successfully.`
|
|
1887
|
-
});
|
|
1888
|
-
};
|
|
1889
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1890
|
-
/* @__PURE__ */ e.jsx(C, { children: a("editor.selectNodeGroup.group") }),
|
|
1891
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1892
|
-
/* @__PURE__ */ e.jsxs($, { value: c, onValueChange: o, children: [
|
|
1893
|
-
/* @__PURE__ */ e.jsx(A, { className: "flex-1", children: /* @__PURE__ */ e.jsx(z, { placeholder: a("editor.selectNodeGroup.noGroup") }) }),
|
|
1894
|
-
/* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsxs(q, { children: [
|
|
1895
|
-
/* @__PURE__ */ e.jsx(f, { value: "none", children: a("editor.selectNodeGroup.noGroup") }),
|
|
1896
|
-
i.map((h) => /* @__PURE__ */ e.jsx(f, { value: h.id, children: h.data.label?.en ? String(h.data.label?.en) : h.id }, h.id))
|
|
1897
|
-
] }) })
|
|
1898
|
-
] }),
|
|
1899
|
-
/* @__PURE__ */ e.jsxs(Pe, { open: n, onOpenChange: l, children: [
|
|
1900
|
-
/* @__PURE__ */ e.jsx(ke, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", size: "icon", title: "Create a new group", children: /* @__PURE__ */ e.jsx(Vt, { className: "h-4 w-4" }) }) }),
|
|
1901
|
-
/* @__PURE__ */ e.jsx(Ee, { className: "w-80", align: "end", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
1902
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1903
|
-
/* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: a("editor.selectNodeGroup.newGroup") }),
|
|
1904
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground text-sm", children: a("editor.selectNodeGroup.newGroupDescription") })
|
|
1905
|
-
] }),
|
|
1906
|
-
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
1907
|
-
/* @__PURE__ */ e.jsx(C, { htmlFor: "group-label", children: a("editor.selectNodeGroup.groupName") }),
|
|
1908
|
-
/* @__PURE__ */ e.jsx(
|
|
1909
|
-
y,
|
|
1910
|
-
{
|
|
1911
|
-
value: t,
|
|
1912
|
-
onChange: (h) => r(h.target.value),
|
|
1913
|
-
placeholder: "Ex: Step 1 - Personal info",
|
|
1914
|
-
onKeyDown: (h) => {
|
|
1915
|
-
h.key === "Enter" && (h.preventDefault(), u());
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
)
|
|
1919
|
-
] }),
|
|
1920
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
1921
|
-
/* @__PURE__ */ e.jsx(w, { variant: "outline", size: "sm", onClick: () => l(!1), children: "Cancel" }),
|
|
1922
|
-
/* @__PURE__ */ e.jsx(w, { size: "sm", onClick: u, disabled: !t.trim(), children: "Create" })
|
|
1923
|
-
] })
|
|
1924
|
-
] }) })
|
|
1925
|
-
] })
|
|
1926
|
-
] })
|
|
1927
|
-
] });
|
|
1928
|
-
}, ha = () => {
|
|
1929
|
-
const { selectedNode: t } = W(), { updateSelectedNodeType: r } = ce(), n = t?.type || "", l = ve(t), m = B();
|
|
1930
|
-
return /* @__PURE__ */ e.jsxs(q, { children: [
|
|
1931
|
-
/* @__PURE__ */ e.jsx(Te, { children: m("editor.selectNodeType.nodeType") }),
|
|
1932
|
-
/* @__PURE__ */ e.jsxs($, { value: n, onValueChange: (i) => r(i), disabled: l, children: [
|
|
1933
|
-
/* @__PURE__ */ e.jsx(A, { className: "w-full", children: /* @__PURE__ */ e.jsx(z, { placeholder: m("editor.selectNodeType.nodeType") }) }),
|
|
1934
|
-
/* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx(q, { children: Object.keys(Re).filter((i) => l ? i === "group" : i !== "group").map((i) => /* @__PURE__ */ e.jsx(f, { value: i, children: i.charAt(0).toUpperCase() + i.slice(1) }, i)) }) })
|
|
1935
|
-
] })
|
|
1936
|
-
] });
|
|
1937
|
-
};
|
|
1938
|
-
function ua({ ...t }) {
|
|
1939
|
-
return /* @__PURE__ */ e.jsx(J.Root, { "data-slot": "sheet", ...t });
|
|
1940
|
-
}
|
|
1941
|
-
function ma({ ...t }) {
|
|
1942
|
-
return /* @__PURE__ */ e.jsx(J.Portal, { "data-slot": "sheet-portal", ...t });
|
|
1943
|
-
}
|
|
1944
|
-
function xa({ className: t, ...r }) {
|
|
1945
|
-
return /* @__PURE__ */ e.jsx(
|
|
1946
|
-
J.Overlay,
|
|
1947
|
-
{
|
|
1948
|
-
"data-slot": "sheet-overlay",
|
|
1949
|
-
className: D(
|
|
1950
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1951
|
-
t
|
|
1952
|
-
),
|
|
1953
|
-
...r
|
|
1954
|
-
}
|
|
1955
|
-
);
|
|
1956
|
-
}
|
|
1957
|
-
function pa({
|
|
1958
|
-
className: t,
|
|
1959
|
-
children: r,
|
|
1960
|
-
side: n = "right",
|
|
1961
|
-
...l
|
|
1962
|
-
}) {
|
|
1963
|
-
return /* @__PURE__ */ e.jsxs(ma, { children: [
|
|
1964
|
-
/* @__PURE__ */ e.jsx(xa, {}),
|
|
1965
|
-
/* @__PURE__ */ e.jsxs(
|
|
1966
|
-
J.Content,
|
|
1967
|
-
{
|
|
1968
|
-
"data-slot": "sheet-content",
|
|
1969
|
-
className: D(
|
|
1970
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1971
|
-
n === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
1972
|
-
n === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
1973
|
-
n === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
1974
|
-
n === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
1975
|
-
t
|
|
1976
|
-
),
|
|
1977
|
-
...l,
|
|
1978
|
-
children: [
|
|
1979
|
-
r,
|
|
1980
|
-
/* @__PURE__ */ e.jsxs(J.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
1981
|
-
/* @__PURE__ */ e.jsx(Pt, { className: "size-4" }),
|
|
1982
|
-
/* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close" })
|
|
1983
|
-
] })
|
|
1984
|
-
]
|
|
1985
|
-
}
|
|
1986
|
-
)
|
|
1987
|
-
] });
|
|
1988
|
-
}
|
|
1989
|
-
function ja({ className: t, ...r }) {
|
|
1990
|
-
return /* @__PURE__ */ e.jsx("div", { "data-slot": "sheet-header", className: D("flex flex-col gap-1.5 p-4", t), ...r });
|
|
1991
|
-
}
|
|
1992
|
-
function ga({ className: t, ...r }) {
|
|
1993
|
-
return /* @__PURE__ */ e.jsx(J.Title, { "data-slot": "sheet-title", className: D("text-foreground font-semibold", t), ...r });
|
|
1994
|
-
}
|
|
1995
|
-
function Ca({ className: t, ...r }) {
|
|
1996
|
-
return /* @__PURE__ */ e.jsx(J.Description, { "data-slot": "sheet-description", className: D("text-muted-foreground text-sm", t), ...r });
|
|
1997
|
-
}
|
|
1998
|
-
const va = () => {
|
|
1999
|
-
const { selectedNode: t, hasSelectedNodes: r } = W(), { clearSelection: n } = ce(), m = B()(t?.data?.label);
|
|
2000
|
-
return /* @__PURE__ */ e.jsx(ua, { open: r, onOpenChange: n, children: /* @__PURE__ */ e.jsxs(pa, { children: [
|
|
2001
|
-
/* @__PURE__ */ e.jsxs(ja, { children: [
|
|
2002
|
-
/* @__PURE__ */ e.jsxs(ga, { children: [
|
|
2003
|
-
"Edit node ",
|
|
2004
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-light text-muted-foreground text-xs", children: t?.id })
|
|
2005
|
-
] }),
|
|
2006
|
-
/* @__PURE__ */ e.jsx(Ca, { children: m || " " })
|
|
2007
|
-
] }),
|
|
2008
|
-
/* @__PURE__ */ e.jsx(_e, { className: "flex min-h-0 flex-1 flex-col px-4 py-6", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
|
|
2009
|
-
/* @__PURE__ */ e.jsx(ha, {}),
|
|
2010
|
-
/* @__PURE__ */ e.jsx(da, {}),
|
|
2011
|
-
/* @__PURE__ */ e.jsx(tt, {}),
|
|
2012
|
-
he(t) && /* @__PURE__ */ e.jsx(ia, {}),
|
|
2013
|
-
Qe(t) && /* @__PURE__ */ e.jsx(ca, {}),
|
|
2014
|
-
et(t) && /* @__PURE__ */ e.jsx(Qt, {}),
|
|
2015
|
-
ve(t) && /* @__PURE__ */ e.jsx(ea, {})
|
|
2016
|
-
] }) })
|
|
2017
|
-
] }) });
|
|
2018
|
-
}, fa = () => {
|
|
2019
|
-
const { setNodes: t, setEdges: r, screenToFlowPosition: n, getNode: l, getEdges: m } = me(), i = Z(
|
|
2020
|
-
(a) => {
|
|
2021
|
-
r((o) => {
|
|
2022
|
-
const u = it(a, o), h = a.source, x = l(h);
|
|
2023
|
-
return u.filter((v) => v.source === h).length > 1 && x && he(x) ? u.map((v) => v.source === h ? {
|
|
2024
|
-
...v,
|
|
2025
|
-
data: {
|
|
2026
|
-
...v.data,
|
|
2027
|
-
conditions: v.data?.conditions || [{ field: h, operator: "===", value: "" }]
|
|
2028
|
-
},
|
|
2029
|
-
type: "conditional"
|
|
2030
|
-
} : v) : u;
|
|
2031
|
-
});
|
|
2032
|
-
},
|
|
2033
|
-
[r, l]
|
|
2034
|
-
), s = Z(
|
|
2035
|
-
(a, o) => {
|
|
2036
|
-
if (!o.isValid) {
|
|
2037
|
-
const { clientX: u, clientY: h } = "changedTouches" in a ? a.changedTouches[0] : a, x = o.fromNode;
|
|
2038
|
-
if (!x)
|
|
2039
|
-
return;
|
|
2040
|
-
const p = x.id, M = m().filter((V) => V.source === p), F = x && he(x);
|
|
2041
|
-
if (M.length > 0 && !F)
|
|
2042
|
-
return;
|
|
2043
|
-
const S = le(), g = le(), E = {
|
|
2044
|
-
...Ze,
|
|
2045
|
-
id: S,
|
|
2046
|
-
origin: [0.5, 0],
|
|
2047
|
-
position: n({
|
|
2048
|
-
x: u,
|
|
2049
|
-
y: h
|
|
2050
|
-
})
|
|
2051
|
-
};
|
|
2052
|
-
x?.parentId && (E.parentId = x.parentId, E.extent = "parent"), t((V) => V.concat(E)), r((V) => {
|
|
2053
|
-
const T = V.filter((b) => b.source === p).length > 0, X = {
|
|
2054
|
-
data: T && F ? {
|
|
2055
|
-
conditions: [{ field: p, operator: "===", value: "" }]
|
|
2056
|
-
} : void 0,
|
|
2057
|
-
id: g,
|
|
2058
|
-
source: p,
|
|
2059
|
-
target: S,
|
|
2060
|
-
type: T && F ? "conditional" : "default"
|
|
2061
|
-
};
|
|
2062
|
-
return T && F ? V.map((b) => b.source === p ? {
|
|
2063
|
-
...b,
|
|
2064
|
-
data: {
|
|
2065
|
-
...b.data,
|
|
2066
|
-
conditions: b.data?.conditions || [{ field: p, operator: "===", value: "" }]
|
|
2067
|
-
},
|
|
2068
|
-
type: "conditional"
|
|
2069
|
-
} : b).concat(X) : V.concat(X);
|
|
2070
|
-
});
|
|
2071
|
-
}
|
|
2072
|
-
},
|
|
2073
|
-
[n, r, t, m]
|
|
2074
|
-
), c = Z(
|
|
2075
|
-
(a) => {
|
|
2076
|
-
r((o) => {
|
|
2077
|
-
const u = o.filter((p) => !a.find((v) => v.id === p.id)), h = new Set(a.map((p) => p.source)), x = /* @__PURE__ */ new Map();
|
|
2078
|
-
return u.forEach((p) => {
|
|
2079
|
-
x.set(p.source, (x.get(p.source) ?? 0) + 1);
|
|
2080
|
-
}), u.map((p) => {
|
|
2081
|
-
if (h.has(p.source) && (x.get(p.source) ?? 0) === 1) {
|
|
2082
|
-
const { conditions: M, isFallback: F, ...S } = p.data ?? {}, g = S && Object.keys(S).length > 0 ? S : void 0;
|
|
2083
|
-
return { ...p, data: g, type: "default" };
|
|
2084
|
-
}
|
|
2085
|
-
return p;
|
|
2086
|
-
});
|
|
2087
|
-
});
|
|
2088
|
-
},
|
|
2089
|
-
[r]
|
|
2090
|
-
);
|
|
2091
|
-
return {
|
|
2092
|
-
isValidConnection: Z(
|
|
2093
|
-
(a) => {
|
|
2094
|
-
if (a.source === a.target)
|
|
2095
|
-
return !1;
|
|
2096
|
-
const o = l(a.source);
|
|
2097
|
-
return o ? !(m().filter((x) => x.source === a.source).length > 0 && !he(o)) : !1;
|
|
2098
|
-
},
|
|
2099
|
-
[l, m]
|
|
2100
|
-
),
|
|
2101
|
-
onConnect: i,
|
|
2102
|
-
onConnectEnd: s,
|
|
2103
|
-
onEdgesDelete: c
|
|
2104
|
-
};
|
|
2105
|
-
}, ba = ({ ...t }) => {
|
|
2106
|
-
const { theme: r = "system" } = Lt();
|
|
2107
|
-
return /* @__PURE__ */ e.jsx(
|
|
2108
|
-
It,
|
|
2109
|
-
{
|
|
2110
|
-
theme: r,
|
|
2111
|
-
className: "toaster group",
|
|
2112
|
-
style: {
|
|
2113
|
-
"--normal-bg": "var(--popover)",
|
|
2114
|
-
"--normal-border": "var(--border)",
|
|
2115
|
-
"--normal-text": "var(--popover-foreground)"
|
|
2116
|
-
},
|
|
2117
|
-
...t
|
|
2118
|
-
}
|
|
2119
|
-
);
|
|
2120
|
-
}, Na = ({ edges: t, nodes: r, flow: n, onExportJson: l, onSave: m, theme: i }) => {
|
|
2121
|
-
const { onConnect: s, onConnectEnd: c, onEdgesDelete: d, isValidConnection: a } = fa();
|
|
2122
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2123
|
-
dt,
|
|
2124
|
-
{
|
|
2125
|
-
fitView: !0,
|
|
2126
|
-
colorMode: i,
|
|
2127
|
-
selectNodesOnDrag: !1,
|
|
2128
|
-
nodeTypes: Re,
|
|
2129
|
-
edgeTypes: Gt,
|
|
2130
|
-
defaultEdges: t || n?.edges || [],
|
|
2131
|
-
defaultNodes: r || n?.nodes || [],
|
|
2132
|
-
onConnect: s,
|
|
2133
|
-
onConnectEnd: c,
|
|
2134
|
-
onEdgesDelete: d,
|
|
2135
|
-
isValidConnection: a,
|
|
2136
|
-
children: [
|
|
2137
|
-
/* @__PURE__ */ e.jsx(ht, { gap: 10, variant: ut.Dots }),
|
|
2138
|
-
/* @__PURE__ */ e.jsx(Jt, { onExportJson: l, onSave: m }),
|
|
2139
|
-
/* @__PURE__ */ e.jsx(Ot, { theme: i }),
|
|
2140
|
-
/* @__PURE__ */ e.jsx(mt, {}),
|
|
2141
|
-
/* @__PURE__ */ e.jsx(xt, {}),
|
|
2142
|
-
/* @__PURE__ */ e.jsx(va, {})
|
|
2143
|
-
]
|
|
2144
|
-
}
|
|
2145
|
-
);
|
|
2146
|
-
}, Da = ({ edges: t, nodes: r, flow: n, onExportJson: l, onSave: m, theme: i = "dark", language: s = "en" }) => /* @__PURE__ */ e.jsx(at, { defaultTheme: i, storageKey: "treege-editor-theme", theme: i, children: /* @__PURE__ */ e.jsxs($t, { value: { flowId: n?.id, language: s }, children: [
|
|
2147
|
-
/* @__PURE__ */ e.jsx(ba, { position: "bottom-center" }),
|
|
2148
|
-
/* @__PURE__ */ e.jsx(ct, { children: /* @__PURE__ */ e.jsx(Na, { edges: t, nodes: r, onExportJson: l, onSave: m, flow: n, theme: i }) })
|
|
2149
|
-
] }) });
|
|
2150
|
-
export {
|
|
2151
|
-
Da as T
|
|
2152
|
-
};
|