n8n-editor-ui 1.84.0 → 1.85.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-78eP7HIe.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DrqkIVnu.js} +1 -1
  2. package/dist/assets/{AuthView-Bn_LB3Kw.js → AuthView-Dr5rONBJ.js} +2 -2
  3. package/dist/assets/{CanvasChat-CGGQcCRA.css → CanvasChatSwitch-BcSDHC-c.css} +522 -24
  4. package/dist/assets/{CanvasChat-tuKMnT6J.js → CanvasChatSwitch-KHakeUZr.js} +919 -509
  5. package/dist/assets/{ChangePasswordView-aXYIR8zr.js → ChangePasswordView-nboaqw83.js} +3 -3
  6. package/dist/assets/CollectionParameter-EiFxXbJy.js +4 -0
  7. package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
  8. package/dist/assets/{CredentialsView-k8CeiyMJ.js → CredentialsView-Dz4nfk1f.js} +19 -8
  9. package/dist/assets/{ErrorView-e-cpk6J7.js → ErrorView-NNkncv05.js} +1 -1
  10. package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-BYacEmlc.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-CRWcQqp0.js} +2 -2
  11. package/dist/assets/{ExecutionsView-CQi8A4ps.js → ExecutionsView-DBrozEb_.js} +25 -8
  12. package/dist/assets/{ExecutionsView-CRTcP3sx.css → ExecutionsView-JCKikuIS.css} +2 -2
  13. package/dist/assets/{FileSaver.min-DmMmlWYQ.js → FileSaver.min-CH9W7aQx.js} +1 -1
  14. package/dist/assets/{FixedCollectionParameter-BfUPtP5M.js → FixedCollectionParameter-C4mulUvT.js} +1 -1
  15. package/dist/assets/{ForgotMyPasswordView-Dzao5PZ9.js → ForgotMyPasswordView-Di4MSlMs.js} +3 -3
  16. package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
  17. package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
  18. package/dist/assets/{Logo-DVRZ2qRx.js → Logo-B7J8RW26.js} +1 -1
  19. package/dist/assets/{MainHeader-CX-ZfeKE.css → MainHeader-CWA2JfVJ.css} +22 -22
  20. package/dist/assets/{MainHeader-BUw_JG4S.js → MainHeader-CtvSBfpo.js} +47 -22
  21. package/dist/assets/{MainSidebar-C6aXqICd.js → MainSidebar-DsEI7EAh.js} +2 -2
  22. package/dist/assets/{NodeCreation-B9-99kNr.js → NodeCreation-BxJhTqFb.js} +5 -5
  23. package/dist/assets/{NodeCreator-DDiuO5S0.css → NodeCreator-D9fmPdS2.css} +12 -12
  24. package/dist/assets/{NodeCreator-DH90304h.js → NodeCreator-IiXwtAjo.js} +10 -11
  25. package/dist/assets/{NodeDetailsView-0RXvy-0D.css → NodeDetailsView-C1z3N5z_.css} +46 -46
  26. package/dist/assets/{NodeDetailsView-Ci-9Cz_w.js → NodeDetailsView-DUaaykvi.js} +38 -38
  27. package/dist/assets/{NodeView-CFUO-Q9X.js → NodeView-SJePfWTh.js} +20 -23
  28. package/dist/assets/{ProjectCardBadge-CGqr1_BG.js → ProjectCardBadge-BiNKaCmD.js} +1 -1
  29. package/dist/assets/{ProjectHeader-CQjB5wC7.css → ProjectHeader-B-a6_GH6.css} +7 -7
  30. package/dist/assets/{ProjectHeader-C8hRwBFC.js → ProjectHeader-CyLw5s53.js} +8 -22
  31. package/dist/assets/{ProjectSettings-motYfWGR.js → ProjectSettings-DWDPCOgu.js} +2 -2
  32. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-DzkWenq4.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-Cc6mPRv6.js} +2 -2
  33. package/dist/assets/{ResourcesListLayout-BqQI0lCG.css → ResourcesListLayout-CWgWhtKq.css} +39 -36
  34. package/dist/assets/{ResourcesListLayout-BYVhS2j5.js → ResourcesListLayout-D3QxB6Mt.js} +21 -18
  35. package/dist/assets/{RunDataAi-pfKF0Nfm.js → RunDataAi-BtLQbSfL.js} +25 -20
  36. package/dist/assets/{RunDataAi-DJ-PSs_k.css → RunDataAi-CN9FrT9c.css} +2 -2
  37. package/dist/assets/{RunDataJson-CNT_rM-i.js → RunDataJson-Dq5WcTmp.js} +12 -12
  38. package/dist/assets/{RunDataJsonActions-BTLAUv9R.js → RunDataJsonActions-CTPgZ_Ap.js} +2 -2
  39. package/dist/assets/{RunDataSearch-BpcbBojC.js → RunDataSearch-Dhj2W7Uo.js} +1 -1
  40. package/dist/assets/{RunDataTable-ZnG9QEzJ.js → RunDataTable-7bn1EkU7.js} +2 -2
  41. package/dist/assets/{SamlOnboarding-DjhCWFIr.js → SamlOnboarding-D1PM8HAM.js} +3 -3
  42. package/dist/assets/{SettingsApiView-C1ClqjeG.js → SettingsApiView-5hGK32Zv.js} +2 -3
  43. package/dist/assets/{SettingsCommunityNodesView-D5eLIpQC.js → SettingsCommunityNodesView-cgiOdmlI.js} +5 -5
  44. package/dist/assets/{SettingsExternalSecrets-ubf6jijA.js → SettingsExternalSecrets-BzRxl3F3.js} +1 -1
  45. package/dist/assets/{SettingsLdapView-BezV6JLr.js → SettingsLdapView-EKueQ2CB.js} +1 -1
  46. package/dist/assets/{SettingsLogStreamingView-ETOxA5Tw.js → SettingsLogStreamingView-BtKQsZkR.js} +2 -2
  47. package/dist/assets/{SettingsPersonalView-DGxUC8Q4.js → SettingsPersonalView-tM84kaF9.js} +1 -1
  48. package/dist/assets/{SettingsSourceControl-1vHHG6W9.js → SettingsSourceControl-CzoIPnXf.js} +1 -1
  49. package/dist/assets/{SettingsSso-CdI26YPF.js → SettingsSso-Bp6l5AlD.js} +7 -7
  50. package/dist/assets/{SettingsSso-BjoJZ2DU.css → SettingsSso-DyrGnPdA.css} +10 -10
  51. package/dist/assets/{SettingsUsageAndPlan-Cul4YcIk.css → SettingsUsageAndPlan-b3WY2Ea_.css} +3 -3
  52. package/dist/assets/{SettingsUsageAndPlan-BmI8cSiq.js → SettingsUsageAndPlan-fPYKlrNm.js} +8 -3
  53. package/dist/assets/{SettingsUsersView-90JmT1qM.js → SettingsUsersView-Dcmef7Ov.js} +1 -1
  54. package/dist/assets/{SettingsView-i7rE7s3I.js → SettingsView-CE7pqxNy.js} +1 -1
  55. package/dist/assets/{SetupView-Lp4ullGE.js → SetupView-oDFJN3je.js} +3 -3
  56. package/dist/assets/{SetupWorkflowCredentialsButton-CoXXUd3B.js → SetupWorkflowCredentialsButton-C8VmrRKt.js} +1 -1
  57. package/dist/assets/{SetupWorkflowFromTemplateView-TVU0-Zq4.js → SetupWorkflowFromTemplateView-B01aWC7Z.js} +3 -3
  58. package/dist/assets/{SigninView-BqF8j6-h.js → SigninView-BOEnSofB.js} +3 -3
  59. package/dist/assets/{SignoutView-DrYJ9Qe3.js → SignoutView-DR8Sm3bw.js} +1 -1
  60. package/dist/assets/{SignupView-_EKPhYKN.js → SignupView-BvtcynJk.js} +3 -3
  61. package/dist/assets/{TemplateDetails-DAalg9G2.js → TemplateDetails-y8AXGWbs.js} +1 -1
  62. package/dist/assets/{TemplateList-BEYMeJMu.js → TemplateList-D-1dO4Eq.js} +1 -1
  63. package/dist/assets/{TemplatesCollectionView-fMELXCRX.js → TemplatesCollectionView-ClzAzyXF.js} +5 -5
  64. package/dist/assets/{TemplatesSearchView-BO-e3IH7.js → TemplatesSearchView-CmiSgpTu.js} +3 -3
  65. package/dist/assets/{TemplatesView-p57nARMp.js → TemplatesView-CyBLc8qH.js} +1 -1
  66. package/dist/assets/{TemplatesWorkflowView-DAbL5S1-.js → TemplatesWorkflowView-3W3FI7bJ.js} +5 -5
  67. package/dist/assets/{TestDefinitionEditView-BTo9LlAU.js → TestDefinitionEditView-BnNPA8Y7.js} +7 -8
  68. package/dist/assets/{TestDefinitionListView-D_-DyZDv.js → TestDefinitionListView-CKxRJzbr.js} +1 -1
  69. package/dist/assets/{TestDefinitionNewView-Crk5OePO.js → TestDefinitionNewView-BwxuCFrb.js} +2 -2
  70. package/dist/assets/{TestDefinitionRootView-BtiqAWW1.js → TestDefinitionRootView-XxqAJ8by.js} +1 -1
  71. package/dist/assets/{VariablesView-BvDpOTm3.css → VariablesView-ATWfdJsE.css} +5 -5
  72. package/dist/assets/{VariablesView-Bg3GI1iE.js → VariablesView-Jmww_g5c.js} +5 -5
  73. package/dist/assets/{WorkerView-CaTyr1ci.js → WorkerView-B6RZF_3e.js} +7 -7
  74. package/dist/assets/{WorkflowActivator-BvmRhIkt.js → WorkflowActivator-1S83wg3m.js} +2 -2
  75. package/dist/assets/{WorkflowExecutionsInfoAccordion-BuIbG1kZ.js → WorkflowExecutionsInfoAccordion-DyYf5xnM.js} +1 -1
  76. package/dist/assets/{WorkflowExecutionsLandingPage-BirtsKx4.js → WorkflowExecutionsLandingPage-BJJkMmAN.js} +2 -2
  77. package/dist/assets/{WorkflowExecutionsPreview-CPGOOAq2.css → WorkflowExecutionsPreview-CHu6M3Dh.css} +22 -22
  78. package/dist/assets/{WorkflowExecutionsPreview-DFyHWF9H.js → WorkflowExecutionsPreview-DOgsT3qO.js} +22 -22
  79. package/dist/assets/{WorkflowExecutionsView-IUjVjxU9.js → WorkflowExecutionsView-C5pQ01YU.js} +6 -7
  80. package/dist/assets/{WorkflowHistory-BqKSxr_5.js → WorkflowHistory-JYpRDL5b.js} +3 -3
  81. package/dist/assets/{WorkflowOnboardingView-Bs0Rmm6I.js → WorkflowOnboardingView-CI-nHjPv.js} +1 -1
  82. package/dist/assets/{WorkflowPreview-1jsK9hpV.js → WorkflowPreview-DeccEeOD.js} +1 -1
  83. package/dist/assets/{WorkflowsView-MzPw02jI.js → WorkflowsView-DpE8yGfm.js} +333 -80
  84. package/dist/assets/{WorkflowsView-Sg6GR5kC.css → WorkflowsView-r9qJOUEb.css} +22 -15
  85. package/dist/assets/{easyAiWorkflowUtils-DlyLBhIZ.js → easyAiWorkflowUtils-CZVa9QJH.js} +5 -5
  86. package/dist/assets/{global-link-actions-DvwtxSrW.js → global-link-actions-fxxB6c1M.js} +1 -1
  87. package/dist/assets/{import-curl-CbxpR02g.js → import-curl-BMQD81WG.js} +1 -1
  88. package/dist/assets/{index-tzkIB4Tg.js → index-CFXicF1K.js} +1 -1
  89. package/dist/assets/{index-74EeM2i2.css → index-CgXKy7t-.css} +1208 -1185
  90. package/dist/assets/{index-CyVlLoqB.js → index-TONfBAHg.js} +2656 -2132
  91. package/dist/assets/{pickBy-DI3cF803.js → pickBy-DMdfAEN5.js} +1 -1
  92. package/dist/assets/{pushConnection.store-BhUCpqAg.js → pushConnection.store-CXF122Ff.js} +1 -1
  93. package/dist/assets/{templateActions-BnGO7zdc.js → templateActions-BMN7PUps.js} +1 -1
  94. package/dist/assets/{useBeforeUnload-DtKxjKeS.js → useBeforeUnload-DaIbVPhm.js} +1 -1
  95. package/dist/assets/{useCanvasMapping-BCP7UO9p.js → useCanvasMapping-BkYlSNdK.js} +53 -54
  96. package/dist/assets/{useCanvasMapping-CI4ehFWu.css → useCanvasMapping-CJcAsQmx.css} +47 -47
  97. package/dist/assets/{useCanvasOperations-Ctquo5LL.js → useCanvasOperations-B2wChId3.js} +453 -183
  98. package/dist/assets/useClearExecutionButtonVisible-DXrP_YDx.js +23 -0
  99. package/dist/assets/{useExecutionDebugging-C0TAc9fj.js → useExecutionDebugging-B26z6tvj.js} +1 -1
  100. package/dist/assets/{useExecutionHelpers-BQHL3OpL.js → useExecutionHelpers-tpdv0KUa.js} +1 -1
  101. package/dist/assets/{useImportCurlCommand-IE8oJ9bp.js → useImportCurlCommand-DPFdzFcL.js} +2 -2
  102. package/dist/assets/useOverview-C8mSc1uX.js +161 -0
  103. package/dist/assets/useOverview-DcRuPjLJ.css +232 -0
  104. package/dist/assets/{usePushConnection-DXozzPWi.js → usePushConnection-C8yfU7M_.js} +4 -4
  105. package/dist/assets/{useRunWorkflow-D9JIEr1s.js → useRunWorkflow-B3mpLXeb.js} +12 -12
  106. package/dist/assets/{useTestDefinitionForm-8dJH3v29.js → useTestDefinitionForm-DsiSBIWm.js} +1 -1
  107. package/dist/assets/{useWorkflowActivate-CI3X35ZJ.js → useWorkflowActivate-wAFdzwEx.js} +1 -1
  108. package/dist/index.html +2 -2
  109. package/package.json +1 -1
  110. package/dist/assets/CollectionParameter-DR9e0MGf.js +0 -4
  111. package/dist/assets/open-sans-latin-400-normal-kLvSbl7y.woff +0 -0
  112. package/dist/assets/open-sans-latin-400-normal-sjvN8RAh.woff2 +0 -0
  113. package/dist/assets/open-sans-latin-600-normal-BYc6TgXR.woff2 +0 -0
  114. package/dist/assets/open-sans-latin-600-normal-CJ2UE_uF.woff +0 -0
  115. package/dist/assets/open-sans-latin-700-normal-DMXgkrz3.woff +0 -0
  116. package/dist/assets/open-sans-latin-700-normal-DXyImmHa.woff2 +0 -0
  117. package/dist/assets/usePinnedData-CtRDhd6k.js +0 -274
@@ -1,5 +1,41 @@
1
- import { e0 as createCompounder, e1 as SetCache, e2 as arrayIncludes, e3 as cacheHas, e4 as baseRest, e5 as isArrayLikeObject, e6 as baseFlatten, e7 as isValidCanvasConnectionMode, bR as CanvasConnectionMode, bQ as isValidNodeConnectionType, bg as NodeConnectionType, e8 as CORE_NODES_CATEGORY, e9 as DEFAULT_SUBCATEGORY, bm as v4, p as useSettingsStore, ea as AI_TRANSFORM_NODE_TYPE, b9 as AI_SUBCATEGORY, eb as HUMAN_IN_THE_LOOP_CATEGORY, ba as AI_CATEGORY_AGENTS, ec as sortBy, d6 as i18n, ed as AI_CATEGORY_OTHER_TOOLS, ee as SEND_AND_WAIT_OPERATION, ef as AI_CATEGORY_DOCUMENT_LOADERS, eg as AI_CATEGORY_LANGUAGE_MODELS, eh as AI_CATEGORY_MEMORY, ei as AI_CATEGORY_OUTPUTPARSER, ej as AI_CATEGORY_RETRIEVERS, ek as AI_CATEGORY_TEXT_SPLITTERS, el as AI_WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE, em as AI_CODE_TOOL_LANGCHAIN_NODE_TYPE, c as useI18n, en as AI_CATEGORY_TOOLS, eo as AI_CATEGORY_EMBEDDING, ep as AI_CATEGORY_VECTOR_STORES, eq as AI_UNCATEGORIZED_CATEGORY, er as AI_OTHERS_NODE_CREATOR_VIEW, bs as useNodeTypesStore, aN as useTemplatesStore, es as AI_NODE_CREATOR_VIEW, et as RSS_READ_NODE_TYPE, eu as EMAIL_SEND_NODE_TYPE, ev as SET_NODE_TYPE, ew as CODE_NODE_TYPE, ex as DATETIME_NODE_TYPE, ey as FILTER_NODE_TYPE, ez as REMOVE_DUPLICATES_NODE_TYPE, eA as SPLIT_OUT_NODE_TYPE, eB as LIMIT_NODE_TYPE, eC as SUMMARIZE_NODE_TYPE, eD as AGGREGATE_NODE_TYPE, eE as MERGE_NODE_TYPE, eF as HTML_NODE_TYPE, eG as MARKDOWN_NODE_TYPE, eH as XML_NODE_TYPE, eI as CRYPTO_NODE_TYPE, eJ as EXTRACT_FROM_FILE_NODE_TYPE, eK as CONVERT_TO_FILE_NODE_TYPE, eL as COMPRESSION_NODE_TYPE, eM as EDIT_IMAGE_NODE_TYPE, eN as TRANSFORM_DATA_SUBCATEGORY, eO as IF_NODE_TYPE, eP as SPLIT_IN_BATCHES_NODE_TYPE, eQ as FLOWS_CONTROL_SUBCATEGORY, eR as HTTP_REQUEST_NODE_TYPE, eS as WEBHOOK_NODE_TYPE, eT as HELPERS_SUBCATEGORY, eU as HITL_SUBCATEGORY, eV as TRIGGER_NODE_CREATOR_VIEW, eW as REGULAR_NODE_CREATOR_VIEW, eX as MANUAL_TRIGGER_NODE_TYPE, eY as EMAIL_IMAP_NODE_TYPE, eZ as SCHEDULE_TRIGGER_NODE_TYPE, e_ as FORM_TRIGGER_NODE_TYPE, du as EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, bh as CHAT_TRIGGER_NODE_TYPE, e$ as OTHER_TRIGGER_NODES_SUBCATEGORY, bb as AI_CATEGORY_CHAINS, S as defineStore, r as ref, q as computed, a1 as useCanvasStore, f0 as AI_CATEGORY_ROOT_NODES, z as nextTick, bc as AI_CODE_NODE_TYPE, f1 as AI_TRANSFORM_NODE_TYPE$1, T as useWorkflowsStore, as as useNDVStore, L as useUIStore, aP as useExternalHooks, f2 as isVueFlowConnection, bd as getNodeInputs, f3 as CUSTOM_API_CALL_KEY, X as STORES, bU as NODE_CREATOR_OPEN_SOURCES, ag as useTelemetry, a0 as useRootStore, bz as useCredentialsStore, bC as useHistoryStore, E as useTagsStore, at as useExecutionsStore, a3 as useProjectsStore, a as useToast, a6 as useWorkflowHelpers, bt as useNodeHelpers, b7 as useClipboard, f4 as UPDATE_WEBHOOK_ID_NODE_TYPES, dn as generateNodesGraph, f5 as getNewNodePosition, dB as AddConnectionCommand, ay as STICKY_NODE_TYPE, bf as getNodeOutputs, dC as RemoveConnectionCommand, ab as EnterpriseEditionFeature, bZ as deepCopy, f6 as isPresent, dD as RemoveNodeCommand, f7 as RenameNodeCommand, dQ as useDataSchema, f8 as MoveNodeCommand, f9 as DEFAULT_NODE_SIZE, fa as CONFIGURATION_NODE_SIZE, be as getConnectionTypes, fb as generateOffsets, fc as CONFIGURABLE_NODE_SIZE, fd as PUSH_NODES_OFFSET, dE as AddNodeCommand, fe as NODE_SIZE, ff as GRID_SIZE, fg as getNodeParameters } from "./index-CyVlLoqB.js";
2
- import { c as capitalize, u as usePinnedData } from "./usePinnedData-CtRDhd6k.js";
1
+ import { dS as baseSlice, dT as toString, dU as createCompounder, dV as SetCache, dW as arrayIncludes, dX as cacheHas, dY as baseRest, dZ as isArrayLikeObject, d_ as baseFlatten, bu as useNodeTypesStore, q as computed, m as unref, d$ as isSubNodeType, a0 as useRootStore, T as useWorkflowsStore, a as useToast, e0 as PIN_DATA_NODE_TYPES_DENYLIST, e1 as jsonStringify, c as useI18n, e2 as toMegaBytes, e3 as stringSizeInBytes, ah as useTelemetry, aQ as useExternalHooks, bL as jsonParse, e4 as useDataSchema, bs as getNodeOutputs, be as NodeConnectionTypes, e5 as MAX_PINNED_DATA_SIZE, e6 as MAX_WORKFLOW_SIZE, e7 as MAX_EXPECTED_REQUEST_SIZE, e8 as CORE_NODES_CATEGORY, e9 as DEFAULT_SUBCATEGORY, bi as v4, p as useSettingsStore, ea as AI_TRANSFORM_NODE_TYPE, bm as AI_SUBCATEGORY, eb as HUMAN_IN_THE_LOOP_CATEGORY, bn as AI_CATEGORY_AGENTS, ec as sortBy, d8 as i18n, ed as AI_CATEGORY_OTHER_TOOLS, ee as SEND_AND_WAIT_OPERATION, ef as AI_CATEGORY_DOCUMENT_LOADERS, eg as AI_CATEGORY_LANGUAGE_MODELS, eh as AI_CATEGORY_MEMORY, ei as AI_CATEGORY_OUTPUTPARSER, ej as AI_CATEGORY_RETRIEVERS, ek as AI_CATEGORY_TEXT_SPLITTERS, el as AI_WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE, em as AI_CODE_TOOL_LANGCHAIN_NODE_TYPE, en as AI_CATEGORY_TOOLS, eo as AI_CATEGORY_EMBEDDING, ep as AI_CATEGORY_VECTOR_STORES, eq as AI_UNCATEGORIZED_CATEGORY, er as AI_OTHERS_NODE_CREATOR_VIEW, aO as useTemplatesStore, es as AI_NODE_CREATOR_VIEW, et as RSS_READ_NODE_TYPE, eu as EMAIL_SEND_NODE_TYPE, ev as SET_NODE_TYPE, ew as CODE_NODE_TYPE, ex as DATETIME_NODE_TYPE, ey as FILTER_NODE_TYPE, ez as REMOVE_DUPLICATES_NODE_TYPE, eA as SPLIT_OUT_NODE_TYPE, eB as LIMIT_NODE_TYPE, eC as SUMMARIZE_NODE_TYPE, eD as AGGREGATE_NODE_TYPE, eE as MERGE_NODE_TYPE, eF as HTML_NODE_TYPE, eG as MARKDOWN_NODE_TYPE, eH as XML_NODE_TYPE, eI as CRYPTO_NODE_TYPE, eJ as EXTRACT_FROM_FILE_NODE_TYPE, eK as CONVERT_TO_FILE_NODE_TYPE, eL as COMPRESSION_NODE_TYPE, eM as EDIT_IMAGE_NODE_TYPE, eN as TRANSFORM_DATA_SUBCATEGORY, eO as IF_NODE_TYPE, eP as SPLIT_IN_BATCHES_NODE_TYPE, eQ as FLOWS_CONTROL_SUBCATEGORY, eR as HTTP_REQUEST_NODE_TYPE, eS as WEBHOOK_NODE_TYPE, eT as HELPERS_SUBCATEGORY, eU as HITL_SUBCATEGORY, eV as TRIGGER_NODE_CREATOR_VIEW, eW as REGULAR_NODE_CREATOR_VIEW, eX as MANUAL_TRIGGER_NODE_TYPE, eY as EMAIL_IMAP_NODE_TYPE, eZ as SCHEDULE_TRIGGER_NODE_TYPE, e_ as FORM_TRIGGER_NODE_TYPE, dw as EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, bt as CHAT_TRIGGER_NODE_TYPE, e$ as OTHER_TRIGGER_NODES_SUBCATEGORY, bo as AI_CATEGORY_CHAINS, S as defineStore, r as ref, a1 as useCanvasStore, f0 as AI_CATEGORY_ROOT_NODES, z as nextTick, bp as AI_CODE_NODE_TYPE, f1 as AI_TRANSFORM_NODE_TYPE$1, f2 as isValidCanvasConnectionMode, bV as CanvasConnectionMode, bU as isValidNodeConnectionType, at as useNDVStore, L as useUIStore, f3 as isVueFlowConnection, bq as getNodeInputs, f4 as CUSTOM_API_CALL_KEY, X as STORES, bY as NODE_CREATOR_OPEN_SOURCES, bD as useCredentialsStore, bG as useHistoryStore, E as useTagsStore, au as useExecutionsStore, a3 as useProjectsStore, a6 as useWorkflowHelpers, bv as useNodeHelpers, b8 as useClipboard, f5 as UPDATE_WEBHOOK_ID_NODE_TYPES, dq as generateNodesGraph, f6 as getNewNodePosition, dD as AddConnectionCommand, az as STICKY_NODE_TYPE, dE as RemoveConnectionCommand, ab as EnterpriseEditionFeature, c1 as deepCopy, f7 as isPresent, dF as RemoveNodeCommand, f8 as RenameNodeCommand, f9 as MoveNodeCommand, fa as DEFAULT_NODE_SIZE, fb as CONFIGURATION_NODE_SIZE, br as getConnectionTypes, fc as generateOffsets, fd as CONFIGURABLE_NODE_SIZE, fe as PUSH_NODES_OFFSET, dG as AddNodeCommand, ff as NODE_SIZE, fg as GRID_SIZE, fh as getNodeParameters } from "./index-TONfBAHg.js";
2
+ function castSlice(array, start, end) {
3
+ var length = array.length;
4
+ end = end === void 0 ? length : end;
5
+ return false ? array : baseSlice(array, start, end);
6
+ }
7
+ var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
8
+ var rsZWJ$1 = "\\u200d";
9
+ var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
10
+ function hasUnicode(string) {
11
+ return reHasUnicode.test(string);
12
+ }
13
+ function asciiToArray(string) {
14
+ return string.split("");
15
+ }
16
+ var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
17
+ var rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d";
18
+ var reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
19
+ var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
20
+ function unicodeToArray(string) {
21
+ return string.match(reUnicode) || [];
22
+ }
23
+ function stringToArray(string) {
24
+ return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
25
+ }
26
+ function createCaseFirst(methodName) {
27
+ return function(string) {
28
+ string = toString(string);
29
+ var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
30
+ var chr = strSymbols ? strSymbols[0] : string.charAt(0);
31
+ var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
32
+ return chr[methodName]() + trailing;
33
+ };
34
+ }
35
+ var upperFirst = createCaseFirst("toUpperCase");
36
+ function capitalize(string) {
37
+ return upperFirst(toString(string).toLowerCase());
38
+ }
3
39
  var camelCase = createCompounder(function(result, word, index) {
4
40
  word = word.toLowerCase();
5
41
  return result + (index ? capitalize(word) : word);
@@ -36,168 +72,235 @@ function baseDifference(array, values, iteratee, comparator) {
36
72
  var difference = baseRest(function(array, values) {
37
73
  return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];
38
74
  });
39
- function mapLegacyConnectionsToCanvasConnections(legacyConnections, nodes) {
40
- const mappedConnections = [];
41
- Object.keys(legacyConnections).forEach((fromNodeName) => {
42
- const fromId = nodes.find((node) => node.name === fromNodeName)?.id ?? "";
43
- const fromConnectionTypes = Object.keys(
44
- legacyConnections[fromNodeName]
45
- );
46
- fromConnectionTypes.forEach((fromConnectionType) => {
47
- const fromPorts = legacyConnections[fromNodeName][fromConnectionType];
48
- fromPorts?.forEach((toPorts, fromIndex) => {
49
- toPorts?.forEach((toPort) => {
50
- const toNodeName = toPort.node;
51
- const toId = nodes.find((node) => node.name === toNodeName)?.id ?? "";
52
- const toConnectionType = toPort.type;
53
- const toIndex = toPort.index;
54
- const sourceHandle = createCanvasConnectionHandleString({
55
- mode: CanvasConnectionMode.Output,
56
- type: fromConnectionType,
57
- index: fromIndex
58
- });
59
- const targetHandle = createCanvasConnectionHandleString({
60
- mode: CanvasConnectionMode.Input,
61
- type: toConnectionType,
62
- index: toIndex
63
- });
64
- const connectionId = createCanvasConnectionId({
65
- source: fromId,
66
- sourceHandle,
67
- target: toId,
68
- targetHandle
69
- });
70
- if (fromId && toId) {
71
- mappedConnections.push({
72
- id: connectionId,
73
- source: fromId,
74
- target: toId,
75
- sourceHandle,
76
- targetHandle,
77
- data: {
78
- source: {
79
- node: fromNodeName,
80
- index: fromIndex,
81
- type: fromConnectionType
82
- },
83
- target: {
84
- node: toNodeName,
85
- index: toIndex,
86
- type: toConnectionType
87
- }
88
- }
89
- });
90
- }
91
- });
92
- });
93
- });
94
- });
95
- return mappedConnections;
96
- }
97
- function mapLegacyConnectionToCanvasConnection(sourceNode, targetNode, legacyConnection) {
98
- const source = sourceNode.id;
99
- const sourceHandle = createCanvasConnectionHandleString({
100
- mode: CanvasConnectionMode.Output,
101
- type: legacyConnection[0].type,
102
- index: legacyConnection[0].index
75
+ function useNodeType(options = {}) {
76
+ const nodeTypesStore = useNodeTypesStore();
77
+ const nodeType = computed(() => {
78
+ if (options.nodeType) {
79
+ return unref(options.nodeType);
80
+ }
81
+ const activeNode = unref(options.node);
82
+ if (activeNode) {
83
+ return nodeTypesStore.getNodeType(activeNode.type, activeNode.typeVersion);
84
+ }
85
+ return null;
103
86
  });
104
- const target = targetNode.id;
105
- const targetHandle = createCanvasConnectionHandleString({
106
- mode: CanvasConnectionMode.Input,
107
- type: legacyConnection[1].type,
108
- index: legacyConnection[1].index
87
+ const isSubNodeType$1 = computed(() => isSubNodeType(nodeType.value));
88
+ const isMultipleOutputsNodeType = computed(() => {
89
+ const outputs = nodeType.value?.outputs;
90
+ if (typeof outputs === "string") return false;
91
+ return (outputs ?? []).length > 1;
109
92
  });
110
93
  return {
111
- source,
112
- sourceHandle,
113
- target,
114
- targetHandle
94
+ nodeType,
95
+ isSubNodeType: isSubNodeType$1,
96
+ isMultipleOutputsNodeType
115
97
  };
116
98
  }
117
- function parseCanvasConnectionHandleString(handle) {
118
- const [mode, type, index] = (handle ?? "").split("/");
119
- const resolvedMode = isValidCanvasConnectionMode(mode) ? mode : CanvasConnectionMode.Output;
120
- const resolvedType = isValidNodeConnectionType(type) ? type : NodeConnectionType.Main;
121
- let resolvedIndex = parseInt(index, 10);
122
- if (isNaN(resolvedIndex)) {
123
- resolvedIndex = 0;
99
+ function usePinnedData(node, options = {}) {
100
+ const rootStore = useRootStore();
101
+ const workflowsStore = useWorkflowsStore();
102
+ const toast = useToast();
103
+ const i18n2 = useI18n();
104
+ const telemetry = useTelemetry();
105
+ const externalHooks = useExternalHooks();
106
+ const { getInputDataWithPinned } = useDataSchema();
107
+ const { isSubNodeType: isSubNodeType2, isMultipleOutputsNodeType } = useNodeType({
108
+ node
109
+ });
110
+ const data = computed(() => {
111
+ const targetNode = unref(node);
112
+ return targetNode ? workflowsStore.pinDataByNodeName(targetNode.name) : void 0;
113
+ });
114
+ const hasData = computed(() => {
115
+ const targetNode = unref(node);
116
+ return !!targetNode && typeof data.value !== "undefined";
117
+ });
118
+ const isValidNodeType = computed(() => {
119
+ const targetNode = unref(node);
120
+ return !!targetNode && !isSubNodeType2.value && !isMultipleOutputsNodeType.value && !PIN_DATA_NODE_TYPES_DENYLIST.includes(targetNode.type);
121
+ });
122
+ function canPinNode(checkDataEmpty = false, outputIndex) {
123
+ const targetNode = unref(node);
124
+ if (targetNode === null || PIN_DATA_NODE_TYPES_DENYLIST.includes(targetNode.type)) return false;
125
+ const nodeType = useNodeTypesStore().getNodeType(targetNode.type, targetNode.typeVersion);
126
+ const dataToPin = getInputDataWithPinned(targetNode);
127
+ if (!nodeType || checkDataEmpty && dataToPin.length === 0) return false;
128
+ const workflow = workflowsStore.getCurrentWorkflow();
129
+ const outputs = getNodeOutputs(workflow, targetNode, nodeType).map(
130
+ (output) => typeof output === "string" ? { type: output } : output
131
+ );
132
+ const mainOutputs = outputs.filter(
133
+ (output) => output.type === NodeConnectionTypes.Main && output.category !== "error"
134
+ );
135
+ let indexAcceptable = true;
136
+ if (outputIndex !== void 0) {
137
+ const output = outputs[outputIndex];
138
+ if (outputs[outputIndex] === void 0) return false;
139
+ indexAcceptable = output.type === NodeConnectionTypes.Main && output.category !== "error";
140
+ }
141
+ return mainOutputs.length === 1 && indexAcceptable;
124
142
  }
125
- return {
126
- mode: resolvedMode,
127
- type: resolvedType,
128
- index: resolvedIndex
129
- };
130
- }
131
- function createCanvasConnectionHandleString({
132
- mode,
133
- type = NodeConnectionType.Main,
134
- index = 0
135
- }) {
136
- return `${mode}/${type}/${index}`;
137
- }
138
- function createCanvasConnectionId(connection) {
139
- return `[${connection.source}/${connection.sourceHandle}][${connection.target}/${connection.targetHandle}]`;
140
- }
141
- function mapCanvasConnectionToLegacyConnection(sourceNode, targetNode, connection) {
142
- const sourceNodeName = sourceNode?.name ?? "";
143
- const { type: sourceType, index: sourceIndex } = parseCanvasConnectionHandleString(
144
- connection.sourceHandle
145
- );
146
- const targetNodeName = targetNode?.name ?? "";
147
- const { type: targetType, index: targetIndex } = parseCanvasConnectionHandleString(
148
- connection.targetHandle
149
- );
150
- return [
151
- {
152
- node: sourceNodeName,
153
- type: sourceType,
154
- index: sourceIndex
155
- },
156
- {
157
- node: targetNodeName,
158
- type: targetType,
159
- index: targetIndex
143
+ function isValidJSON(data2) {
144
+ try {
145
+ JSON.parse(data2);
146
+ return true;
147
+ } catch (error) {
148
+ const title = i18n2.baseText("runData.editOutputInvalid");
149
+ const toRemove = new RegExp(/JSON\.parse:|of the JSON data/, "g");
150
+ const message = error.message.replace(toRemove, "").trim();
151
+ const positionMatchRegEx = /at position (\d+)/;
152
+ const positionMatch = error.message.match(positionMatchRegEx);
153
+ error.message = message.charAt(0).toUpperCase() + message.slice(1);
154
+ error.message = error.message.replace(
155
+ "Unexpected token ' in JSON",
156
+ i18n2.baseText("runData.editOutputInvalid.singleQuote")
157
+ );
158
+ if (positionMatch) {
159
+ const position = parseInt(positionMatch[1], 10);
160
+ const lineBreaksUpToPosition = (data2.slice(0, position).match(/\n/g) || []).length;
161
+ error.message = error.message.replace(
162
+ positionMatchRegEx,
163
+ i18n2.baseText("runData.editOutputInvalid.atPosition", {
164
+ interpolate: {
165
+ position: `${position}`
166
+ }
167
+ })
168
+ );
169
+ error.message = `${i18n2.baseText("runData.editOutputInvalid.onLine", {
170
+ interpolate: {
171
+ line: `${lineBreaksUpToPosition + 1}`
172
+ }
173
+ })} ${error.message}`;
174
+ }
175
+ toast.showError(error, title);
176
+ return false;
160
177
  }
161
- ];
162
- }
163
- function mapLegacyEndpointsToCanvasConnectionPort(endpoints, endpointNames = []) {
164
- if (typeof endpoints === "string") {
165
- console.warn("Node endpoints have not been evaluated", endpoints);
166
- return [];
167
178
  }
168
- return endpoints.map((endpoint, endpointIndex) => {
169
- const typeValue = typeof endpoint === "string" ? endpoint : endpoint.type;
170
- const type = isValidNodeConnectionType(typeValue) ? typeValue : NodeConnectionType.Main;
171
- const label = typeof endpoint === "string" ? endpointNames[endpointIndex] : endpoint.displayName;
172
- const index = endpoints.slice(0, endpointIndex + 1).filter((e) => (typeof e === "string" ? e : e.type) === type).length - 1;
173
- const required = typeof endpoint === "string" ? false : endpoint.required;
174
- const maxConnections = typeof endpoint === "string" ? void 0 : endpoint.maxConnections;
175
- return {
176
- type,
177
- index,
178
- label,
179
- ...maxConnections ? { maxConnections } : {},
180
- ...required ? { required } : {}
179
+ function getMaxPinnedDataSize() {
180
+ return window.maxPinnedDataSize ?? MAX_PINNED_DATA_SIZE;
181
+ }
182
+ function isValidSize(data2) {
183
+ const targetNode = unref(node);
184
+ if (!targetNode) {
185
+ return false;
186
+ }
187
+ if (typeof data2 === "object") data2 = JSON.stringify(data2);
188
+ const { pinData: currentPinData, ...workflow } = workflowsStore.getCurrentWorkflow();
189
+ const workflowJson = jsonStringify(workflow, { replaceCircularRefs: true });
190
+ const newPinData = { ...currentPinData, [targetNode.name]: data2 };
191
+ const newPinDataSize = workflowsStore.getPinDataSize(newPinData);
192
+ if (newPinDataSize > getMaxPinnedDataSize()) {
193
+ toast.showError(
194
+ new Error(
195
+ i18n2.baseText("ndv.pinData.error.tooLarge.description", {
196
+ interpolate: {
197
+ size: toMegaBytes(newPinDataSize),
198
+ limit: toMegaBytes(getMaxPinnedDataSize())
199
+ }
200
+ })
201
+ ),
202
+ i18n2.baseText("ndv.pinData.error.tooLarge.title")
203
+ );
204
+ return false;
205
+ }
206
+ const workflowSize = stringSizeInBytes(workflowJson) + newPinDataSize;
207
+ const limit = MAX_WORKFLOW_SIZE - MAX_EXPECTED_REQUEST_SIZE;
208
+ if (workflowSize > limit) {
209
+ toast.showError(
210
+ new Error(
211
+ i18n2.baseText("ndv.pinData.error.tooLargeWorkflow.description", {
212
+ interpolate: { size: toMegaBytes(workflowSize), limit: toMegaBytes(limit) }
213
+ })
214
+ ),
215
+ i18n2.baseText("ndv.pinData.error.tooLargeWorkflow.title")
216
+ );
217
+ return false;
218
+ }
219
+ return true;
220
+ }
221
+ function onSetDataSuccess({ source }) {
222
+ const targetNode = unref(node);
223
+ const displayMode = unref(options.displayMode);
224
+ const runIndex = unref(options.runIndex);
225
+ const telemetryPayload = {
226
+ pinning_source: source,
227
+ node_type: targetNode?.type,
228
+ push_ref: rootStore.pushRef,
229
+ data_size: stringSizeInBytes(data.value),
230
+ view: displayMode,
231
+ run_index: runIndex
181
232
  };
182
- });
183
- }
184
- function checkOverlap(node1, node2) {
185
- return !// node1 is completely to the left of node2
186
- (node1.x + node1.width <= node2.x || // node2 is completely to the left of node1
187
- node2.x + node2.width <= node1.x || // node1 is completely above node2
188
- node1.y + node1.height <= node2.y || // node2 is completely above node1
189
- node2.y + node2.height <= node1.y);
190
- }
191
- function insertSpacersBetweenEndpoints(endpoints, requiredEndpointsCount = 0, minEndpointsCount = 4) {
192
- const endpointsWithSpacers = [...endpoints];
193
- const optionalNonMainInputsCount = endpointsWithSpacers.length - requiredEndpointsCount;
194
- const spacerCount = minEndpointsCount - requiredEndpointsCount - optionalNonMainInputsCount;
195
- if (endpointsWithSpacers.length < minEndpointsCount) {
196
- for (let i = 0; i < spacerCount; i++) {
197
- endpointsWithSpacers.splice(requiredEndpointsCount + i, 0, null);
233
+ void externalHooks.run("runData.onDataPinningSuccess", telemetryPayload);
234
+ telemetry.track("Ndv data pinning success", telemetryPayload);
235
+ }
236
+ function onSetDataError({
237
+ errorType,
238
+ source
239
+ }) {
240
+ const targetNode = unref(node);
241
+ const displayMode = unref(options.displayMode);
242
+ const runIndex = unref(options.runIndex);
243
+ telemetry.track("Ndv data pinning failure", {
244
+ pinning_source: source,
245
+ node_type: targetNode?.type,
246
+ push_ref: rootStore.pushRef,
247
+ data_size: stringSizeInBytes(data.value),
248
+ view: displayMode,
249
+ run_index: runIndex,
250
+ error_type: errorType
251
+ });
252
+ }
253
+ function setData(data2, source) {
254
+ const targetNode = unref(node);
255
+ if (!targetNode) {
256
+ return;
198
257
  }
258
+ if (typeof data2 === "string") {
259
+ if (!isValidJSON(data2)) {
260
+ onSetDataError({ errorType: "invalid-json", source });
261
+ throw new Error("Invalid JSON");
262
+ }
263
+ data2 = jsonParse(data2);
264
+ }
265
+ if (!isValidSize(data2)) {
266
+ onSetDataError({ errorType: "data-too-large", source });
267
+ throw new Error("Data too large");
268
+ }
269
+ workflowsStore.pinData({ node: targetNode, data: data2 });
270
+ onSetDataSuccess({ source });
199
271
  }
200
- return endpointsWithSpacers;
272
+ function onUnsetData({ source }) {
273
+ const targetNode = unref(node);
274
+ const runIndex = unref(options.runIndex);
275
+ telemetry.track("User unpinned ndv data", {
276
+ node_type: targetNode?.type,
277
+ push_ref: rootStore.pushRef,
278
+ run_index: runIndex,
279
+ source,
280
+ data_size: stringSizeInBytes(data.value)
281
+ });
282
+ }
283
+ function unsetData(source) {
284
+ const targetNode = unref(node);
285
+ if (!targetNode) {
286
+ return;
287
+ }
288
+ onUnsetData({ source });
289
+ workflowsStore.unpinData({ node: targetNode });
290
+ }
291
+ return {
292
+ data,
293
+ hasData,
294
+ isValidNodeType,
295
+ canPinNode,
296
+ setData,
297
+ onSetDataSuccess,
298
+ onSetDataError,
299
+ unsetData,
300
+ onUnsetData,
301
+ isValidJSON,
302
+ isValidSize
303
+ };
201
304
  }
202
305
  const SEQUENTIAL_BONUS = 60;
203
306
  const SEPARATOR_BONUS = 30;
@@ -663,7 +766,7 @@ function AINodesView(_nodes) {
663
766
  title: AI_CATEGORY_DOCUMENT_LOADERS,
664
767
  info: getSubcategoryInfo(AI_CATEGORY_DOCUMENT_LOADERS),
665
768
  icon: "file-import",
666
- ...getAISubcategoryProperties(NodeConnectionType.AiDocument)
769
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiDocument)
667
770
  }
668
771
  },
669
772
  {
@@ -673,7 +776,7 @@ function AINodesView(_nodes) {
673
776
  title: AI_CATEGORY_LANGUAGE_MODELS,
674
777
  info: getSubcategoryInfo(AI_CATEGORY_LANGUAGE_MODELS),
675
778
  icon: "language",
676
- ...getAISubcategoryProperties(NodeConnectionType.AiLanguageModel)
779
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiLanguageModel)
677
780
  }
678
781
  },
679
782
  {
@@ -683,7 +786,7 @@ function AINodesView(_nodes) {
683
786
  title: AI_CATEGORY_MEMORY,
684
787
  info: getSubcategoryInfo(AI_CATEGORY_MEMORY),
685
788
  icon: "brain",
686
- ...getAISubcategoryProperties(NodeConnectionType.AiMemory)
789
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiMemory)
687
790
  }
688
791
  },
689
792
  {
@@ -693,7 +796,7 @@ function AINodesView(_nodes) {
693
796
  title: AI_CATEGORY_OUTPUTPARSER,
694
797
  info: getSubcategoryInfo(AI_CATEGORY_OUTPUTPARSER),
695
798
  icon: "list",
696
- ...getAISubcategoryProperties(NodeConnectionType.AiOutputParser)
799
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiOutputParser)
697
800
  }
698
801
  },
699
802
  {
@@ -703,7 +806,7 @@ function AINodesView(_nodes) {
703
806
  title: AI_CATEGORY_RETRIEVERS,
704
807
  info: getSubcategoryInfo(AI_CATEGORY_RETRIEVERS),
705
808
  icon: "search",
706
- ...getAISubcategoryProperties(NodeConnectionType.AiRetriever)
809
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiRetriever)
707
810
  }
708
811
  },
709
812
  {
@@ -713,7 +816,7 @@ function AINodesView(_nodes) {
713
816
  title: AI_CATEGORY_TEXT_SPLITTERS,
714
817
  info: getSubcategoryInfo(AI_CATEGORY_TEXT_SPLITTERS),
715
818
  icon: "grip-lines-vertical",
716
- ...getAISubcategoryProperties(NodeConnectionType.AiTextSplitter)
819
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiTextSplitter)
717
820
  }
718
821
  },
719
822
  {
@@ -724,7 +827,7 @@ function AINodesView(_nodes) {
724
827
  title: AI_CATEGORY_TOOLS,
725
828
  info: getSubcategoryInfo(AI_CATEGORY_TOOLS),
726
829
  icon: "tools",
727
- ...getAISubcategoryProperties(NodeConnectionType.AiTool),
830
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiTool),
728
831
  sections: [
729
832
  {
730
833
  key: "popular",
@@ -741,7 +844,7 @@ function AINodesView(_nodes) {
741
844
  title: AI_CATEGORY_EMBEDDING,
742
845
  info: getSubcategoryInfo(AI_CATEGORY_EMBEDDING),
743
846
  icon: "vector-square",
744
- ...getAISubcategoryProperties(NodeConnectionType.AiEmbedding)
847
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiEmbedding)
745
848
  }
746
849
  },
747
850
  {
@@ -751,7 +854,7 @@ function AINodesView(_nodes) {
751
854
  title: AI_CATEGORY_VECTOR_STORES,
752
855
  info: getSubcategoryInfo(AI_CATEGORY_VECTOR_STORES),
753
856
  icon: "project-diagram",
754
- ...getAISubcategoryProperties(NodeConnectionType.AiVectorStore)
857
+ ...getAISubcategoryProperties(NodeConnectionTypes.AiVectorStore)
755
858
  }
756
859
  },
757
860
  {
@@ -1442,6 +1545,169 @@ const useViewStacks = defineStore("nodeCreatorViewStacks", () => {
1442
1545
  popViewStack
1443
1546
  };
1444
1547
  });
1548
+ function mapLegacyConnectionsToCanvasConnections(legacyConnections, nodes) {
1549
+ const mappedConnections = [];
1550
+ Object.keys(legacyConnections).forEach((fromNodeName) => {
1551
+ const fromId = nodes.find((node) => node.name === fromNodeName)?.id ?? "";
1552
+ const fromConnectionTypes = Object.keys(
1553
+ legacyConnections[fromNodeName]
1554
+ );
1555
+ fromConnectionTypes.forEach((fromConnectionType) => {
1556
+ const fromPorts = legacyConnections[fromNodeName][fromConnectionType];
1557
+ fromPorts?.forEach((toPorts, fromIndex) => {
1558
+ toPorts?.forEach((toPort) => {
1559
+ const toNodeName = toPort.node;
1560
+ const toId = nodes.find((node) => node.name === toNodeName)?.id ?? "";
1561
+ const toConnectionType = toPort.type;
1562
+ const toIndex = toPort.index;
1563
+ const sourceHandle = createCanvasConnectionHandleString({
1564
+ mode: CanvasConnectionMode.Output,
1565
+ type: fromConnectionType,
1566
+ index: fromIndex
1567
+ });
1568
+ const targetHandle = createCanvasConnectionHandleString({
1569
+ mode: CanvasConnectionMode.Input,
1570
+ type: toConnectionType,
1571
+ index: toIndex
1572
+ });
1573
+ const connectionId = createCanvasConnectionId({
1574
+ source: fromId,
1575
+ sourceHandle,
1576
+ target: toId,
1577
+ targetHandle
1578
+ });
1579
+ if (fromId && toId) {
1580
+ mappedConnections.push({
1581
+ id: connectionId,
1582
+ source: fromId,
1583
+ target: toId,
1584
+ sourceHandle,
1585
+ targetHandle,
1586
+ data: {
1587
+ source: {
1588
+ node: fromNodeName,
1589
+ index: fromIndex,
1590
+ type: fromConnectionType
1591
+ },
1592
+ target: {
1593
+ node: toNodeName,
1594
+ index: toIndex,
1595
+ type: toConnectionType
1596
+ }
1597
+ }
1598
+ });
1599
+ }
1600
+ });
1601
+ });
1602
+ });
1603
+ });
1604
+ return mappedConnections;
1605
+ }
1606
+ function mapLegacyConnectionToCanvasConnection(sourceNode, targetNode, legacyConnection) {
1607
+ const source = sourceNode.id;
1608
+ const sourceHandle = createCanvasConnectionHandleString({
1609
+ mode: CanvasConnectionMode.Output,
1610
+ type: legacyConnection[0].type,
1611
+ index: legacyConnection[0].index
1612
+ });
1613
+ const target = targetNode.id;
1614
+ const targetHandle = createCanvasConnectionHandleString({
1615
+ mode: CanvasConnectionMode.Input,
1616
+ type: legacyConnection[1].type,
1617
+ index: legacyConnection[1].index
1618
+ });
1619
+ return {
1620
+ source,
1621
+ sourceHandle,
1622
+ target,
1623
+ targetHandle
1624
+ };
1625
+ }
1626
+ function parseCanvasConnectionHandleString(handle) {
1627
+ const [mode, type, index] = (handle ?? "").split("/");
1628
+ const resolvedMode = isValidCanvasConnectionMode(mode) ? mode : CanvasConnectionMode.Output;
1629
+ const resolvedType = isValidNodeConnectionType(type) ? type : NodeConnectionTypes.Main;
1630
+ let resolvedIndex = parseInt(index, 10);
1631
+ if (isNaN(resolvedIndex)) {
1632
+ resolvedIndex = 0;
1633
+ }
1634
+ return {
1635
+ mode: resolvedMode,
1636
+ type: resolvedType,
1637
+ index: resolvedIndex
1638
+ };
1639
+ }
1640
+ function createCanvasConnectionHandleString({
1641
+ mode,
1642
+ type = NodeConnectionTypes.Main,
1643
+ index = 0
1644
+ }) {
1645
+ return `${mode}/${type}/${index}`;
1646
+ }
1647
+ function createCanvasConnectionId(connection) {
1648
+ return `[${connection.source}/${connection.sourceHandle}][${connection.target}/${connection.targetHandle}]`;
1649
+ }
1650
+ function mapCanvasConnectionToLegacyConnection(sourceNode, targetNode, connection) {
1651
+ const sourceNodeName = sourceNode?.name ?? "";
1652
+ const { type: sourceType, index: sourceIndex } = parseCanvasConnectionHandleString(
1653
+ connection.sourceHandle
1654
+ );
1655
+ const targetNodeName = targetNode?.name ?? "";
1656
+ const { type: targetType, index: targetIndex } = parseCanvasConnectionHandleString(
1657
+ connection.targetHandle
1658
+ );
1659
+ return [
1660
+ {
1661
+ node: sourceNodeName,
1662
+ type: sourceType,
1663
+ index: sourceIndex
1664
+ },
1665
+ {
1666
+ node: targetNodeName,
1667
+ type: targetType,
1668
+ index: targetIndex
1669
+ }
1670
+ ];
1671
+ }
1672
+ function mapLegacyEndpointsToCanvasConnectionPort(endpoints, endpointNames = []) {
1673
+ if (typeof endpoints === "string") {
1674
+ console.warn("Node endpoints have not been evaluated", endpoints);
1675
+ return [];
1676
+ }
1677
+ return endpoints.map((endpoint, endpointIndex) => {
1678
+ const typeValue = typeof endpoint === "string" ? endpoint : endpoint.type;
1679
+ const type = isValidNodeConnectionType(typeValue) ? typeValue : NodeConnectionTypes.Main;
1680
+ const label = typeof endpoint === "string" ? endpointNames[endpointIndex] : endpoint.displayName;
1681
+ const index = endpoints.slice(0, endpointIndex + 1).filter((e) => (typeof e === "string" ? e : e.type) === type).length - 1;
1682
+ const required = typeof endpoint === "string" ? false : endpoint.required;
1683
+ const maxConnections = typeof endpoint === "string" ? void 0 : endpoint.maxConnections;
1684
+ return {
1685
+ type,
1686
+ index,
1687
+ label,
1688
+ ...maxConnections ? { maxConnections } : {},
1689
+ ...required ? { required } : {}
1690
+ };
1691
+ });
1692
+ }
1693
+ function checkOverlap(node1, node2) {
1694
+ return !// node1 is completely to the left of node2
1695
+ (node1.x + node1.width <= node2.x || // node2 is completely to the left of node1
1696
+ node2.x + node2.width <= node1.x || // node1 is completely above node2
1697
+ node1.y + node1.height <= node2.y || // node2 is completely above node1
1698
+ node2.y + node2.height <= node1.y);
1699
+ }
1700
+ function insertSpacersBetweenEndpoints(endpoints, requiredEndpointsCount = 0, minEndpointsCount = 4) {
1701
+ const endpointsWithSpacers = [...endpoints];
1702
+ const optionalNonMainInputsCount = endpointsWithSpacers.length - requiredEndpointsCount;
1703
+ const spacerCount = minEndpointsCount - requiredEndpointsCount - optionalNonMainInputsCount;
1704
+ if (endpointsWithSpacers.length < minEndpointsCount) {
1705
+ for (let i = 0; i < spacerCount; i++) {
1706
+ endpointsWithSpacers.splice(requiredEndpointsCount + i, 0, null);
1707
+ }
1708
+ }
1709
+ return endpointsWithSpacers;
1710
+ }
1445
1711
  const useNodeCreatorStore = defineStore(STORES.NODE_CREATOR, () => {
1446
1712
  const workflowsStore = useWorkflowsStore();
1447
1713
  const ndvStore = useNDVStore();
@@ -1548,7 +1814,7 @@ const useNodeCreatorStore = defineStore(STORES.NODE_CREATOR, () => {
1548
1814
  uiStore.lastInteractedWithNodeHandle = connection.sourceHandle ?? null;
1549
1815
  uiStore.lastInteractedWithNodeId = sourceNode.id;
1550
1816
  const isOutput = mode === CanvasConnectionMode.Output;
1551
- const isScopedConnection = type !== NodeConnectionType.Main;
1817
+ const isScopedConnection = type !== NodeConnectionTypes.Main;
1552
1818
  setNodeCreatorState({
1553
1819
  source: eventSource,
1554
1820
  createNodeActive: true,
@@ -2232,13 +2498,13 @@ function useCanvasOperations({ router }) {
2232
2498
  source: lastInteractedWithNodeId,
2233
2499
  sourceHandle: createCanvasConnectionHandleString({
2234
2500
  mode: CanvasConnectionMode.Output,
2235
- type: NodeConnectionType.Main,
2501
+ type: NodeConnectionTypes.Main,
2236
2502
  index: 0
2237
2503
  }),
2238
2504
  target: node.id,
2239
2505
  targetHandle: createCanvasConnectionHandleString({
2240
2506
  mode: CanvasConnectionMode.Input,
2241
- type: NodeConnectionType.Main,
2507
+ type: NodeConnectionTypes.Main,
2242
2508
  index: 0
2243
2509
  })
2244
2510
  });
@@ -2251,7 +2517,7 @@ function useCanvasOperations({ router }) {
2251
2517
  source: node.id,
2252
2518
  sourceHandle: createCanvasConnectionHandleString({
2253
2519
  mode: CanvasConnectionMode.Input,
2254
- type: NodeConnectionType.Main,
2520
+ type: NodeConnectionTypes.Main,
2255
2521
  index: 0
2256
2522
  }),
2257
2523
  target: lastInteractedWithNodeConnection.target,
@@ -2355,7 +2621,7 @@ function useCanvasOperations({ router }) {
2355
2621
  const { type: connectionType, index: connectionIndex } = parseCanvasConnectionHandleString(
2356
2622
  lastInteractedWithNodeHandle ?? lastInteractedWithNodeConnection?.sourceHandle ?? ""
2357
2623
  );
2358
- const nodeSize = connectionType === NodeConnectionType.Main ? DEFAULT_NODE_SIZE : CONFIGURATION_NODE_SIZE;
2624
+ const nodeSize = connectionType === NodeConnectionTypes.Main ? DEFAULT_NODE_SIZE : CONFIGURATION_NODE_SIZE;
2359
2625
  if (lastInteractedWithNode) {
2360
2626
  const lastInteractedWithNodeTypeDescription = nodeTypesStore.getNodeType(
2361
2627
  lastInteractedWithNode.type,
@@ -2366,8 +2632,8 @@ function useCanvasOperations({ router }) {
2366
2632
  );
2367
2633
  const newNodeInsertPosition = uiStore.lastCancelledConnectionPosition;
2368
2634
  if (newNodeInsertPosition) {
2369
- const xOffset = connectionType === NodeConnectionType.Main ? 0 : -nodeSize[0] / 2;
2370
- const yOffset = connectionType === NodeConnectionType.Main ? -nodeSize[1] / 2 : 0;
2635
+ const xOffset = connectionType === NodeConnectionTypes.Main ? 0 : -nodeSize[0] / 2;
2636
+ const yOffset = connectionType === NodeConnectionTypes.Main ? -nodeSize[1] / 2 : 0;
2371
2637
  position = [newNodeInsertPosition[0] + xOffset, newNodeInsertPosition[1] + yOffset];
2372
2638
  uiStore.lastCancelledConnectionPosition = void 0;
2373
2639
  } else if (lastInteractedWithNodeTypeDescription && lastInteractedWithNodeObject) {
@@ -2379,7 +2645,7 @@ function useCanvasOperations({ router }) {
2379
2645
  const lastInteractedWithNodeInputTypes = getConnectionTypes(
2380
2646
  lastInteractedWithNodeInputs
2381
2647
  );
2382
- const lastInteractedWithNodeScopedInputTypes = (lastInteractedWithNodeInputTypes || []).filter((input) => input !== NodeConnectionType.Main);
2648
+ const lastInteractedWithNodeScopedInputTypes = (lastInteractedWithNodeInputTypes || []).filter((input) => input !== NodeConnectionTypes.Main);
2383
2649
  const lastInteractedWithNodeOutputs = getNodeOutputs(
2384
2650
  editableWorkflowObject.value,
2385
2651
  lastInteractedWithNodeObject,
@@ -2389,7 +2655,7 @@ function useCanvasOperations({ router }) {
2389
2655
  lastInteractedWithNodeOutputs
2390
2656
  );
2391
2657
  const lastInteractedWithNodeMainOutputs = lastInteractedWithNodeOutputTypes.filter(
2392
- (output) => output === NodeConnectionType.Main
2658
+ (output) => output === NodeConnectionTypes.Main
2393
2659
  );
2394
2660
  let yOffset = 0;
2395
2661
  if (lastInteractedWithNodeConnection) {
@@ -2416,7 +2682,7 @@ function useCanvasOperations({ router }) {
2416
2682
  }
2417
2683
  const outputTypes = getConnectionTypes(outputs);
2418
2684
  pushOffsets = [100, 0];
2419
- if (outputTypes.length > 0 && outputTypes.every((outputName) => outputName !== NodeConnectionType.Main)) {
2685
+ if (outputTypes.length > 0 && outputTypes.every((outputName) => outputName !== NodeConnectionTypes.Main)) {
2420
2686
  const scopedConnectionIndex = lastInteractedWithNodeScopedInputTypes.findIndex(
2421
2687
  (inputType) => outputs[0] === inputType
2422
2688
  );
@@ -2430,7 +2696,7 @@ function useCanvasOperations({ router }) {
2430
2696
  ];
2431
2697
  } else {
2432
2698
  let pushOffset = PUSH_NODES_OFFSET;
2433
- if (!!lastInteractedWithNodeInputTypes.find((input) => input !== NodeConnectionType.Main)) {
2699
+ if (!!lastInteractedWithNodeInputTypes.find((input) => input !== NodeConnectionTypes.Main)) {
2434
2700
  pushOffset += 140;
2435
2701
  }
2436
2702
  position = [
@@ -3168,20 +3434,24 @@ export {
3168
3434
  AINodesView as A,
3169
3435
  RegularView as R,
3170
3436
  TriggerView as T,
3171
- useCanvasOperations as a,
3172
- checkOverlap as b,
3437
+ useNodeCreatorStore as a,
3438
+ useCanvasOperations as b,
3173
3439
  createCanvasConnectionHandleString as c,
3174
- mapLegacyConnectionsToCanvasConnections as d,
3175
- useViewStacks as e,
3176
- formatTriggerActionName as f,
3177
- camelCase as g,
3178
- useKeyboardNavigation as h,
3440
+ capitalize as d,
3441
+ checkOverlap as e,
3442
+ mapLegacyConnectionsToCanvasConnections as f,
3443
+ useNodeType as g,
3444
+ upperFirst as h,
3179
3445
  insertSpacersBetweenEndpoints as i,
3180
- AIView as j,
3181
- flattenCreateElements as k,
3446
+ formatTriggerActionName as j,
3447
+ useViewStacks as k,
3448
+ camelCase as l,
3182
3449
  mapLegacyEndpointsToCanvasConnectionPort as m,
3450
+ useKeyboardNavigation as n,
3451
+ AIView as o,
3183
3452
  parseCanvasConnectionHandleString as p,
3453
+ flattenCreateElements as q,
3184
3454
  sortNodeCreateElements as s,
3185
3455
  transformNodeType as t,
3186
- useNodeCreatorStore as u
3456
+ usePinnedData as u
3187
3457
  };