n8n-editor-ui 1.47.0 → 1.47.2
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/.turbo/turbo-build.log +79 -79
- package/dist/assets/{AuthView-BgFWzBDm.js → AuthView-B_jZMnGj.js} +2 -2
- package/dist/assets/{AuthView-BgFWzBDm.js.map → AuthView-B_jZMnGj.js.map} +1 -1
- package/dist/assets/{CanvasControls-m_3acPPd.js → CanvasControls-ns1B0A0j.js} +2 -2
- package/dist/assets/{CanvasControls-m_3acPPd.js.map → CanvasControls-ns1B0A0j.js.map} +1 -1
- package/dist/assets/{ChangePasswordView-CN6JWR-N.js → ChangePasswordView-BDsuHv0B.js} +2 -2
- package/dist/assets/{ChangePasswordView-CN6JWR-N.js.map → ChangePasswordView-BDsuHv0B.js.map} +1 -1
- package/dist/assets/{CollectionParameter-DHmcKhO-.js → CollectionParameter-Br-xtutZ.js} +2 -2
- package/dist/assets/CollectionParameter-Br-xtutZ.js.map +1 -0
- package/dist/assets/{CredentialsView-D9TXjOnK.js → CredentialsView-DnJ_jhDo.js} +2 -2
- package/dist/assets/{CredentialsView-D9TXjOnK.js.map → CredentialsView-DnJ_jhDo.js.map} +1 -1
- package/dist/assets/{ErrorView-CYag8fsg.js → ErrorView-BfV5e5ko.js} +2 -2
- package/dist/assets/{ErrorView-CYag8fsg.js.map → ErrorView-BfV5e5ko.js.map} +1 -1
- package/dist/assets/{ExecutionsFilter-Cf35yNfd.js → ExecutionsFilter-0XcXH83H.js} +2 -2
- package/dist/assets/{ExecutionsFilter-Cf35yNfd.js.map → ExecutionsFilter-0XcXH83H.js.map} +1 -1
- package/dist/assets/{ExecutionsView-ztrgLYNP.js → ExecutionsView-aFiZuLVt.js} +2 -2
- package/dist/assets/{ExecutionsView-ztrgLYNP.js.map → ExecutionsView-aFiZuLVt.js.map} +1 -1
- package/dist/assets/{ForgotMyPasswordView-C-0yB-bx.js → ForgotMyPasswordView-64X9tXq4.js} +2 -2
- package/dist/assets/{ForgotMyPasswordView-C-0yB-bx.js.map → ForgotMyPasswordView-64X9tXq4.js.map} +1 -1
- package/dist/assets/MainHeader-Ch0Iz_7s.js +2 -0
- package/dist/assets/{MainHeader-CMxbwL4C.js.map → MainHeader-Ch0Iz_7s.js.map} +1 -1
- package/dist/assets/{MainSidebar-BuwaBgG9.js → MainSidebar-3ee-tTgz.js} +2 -2
- package/dist/assets/{MainSidebar-BuwaBgG9.js.map → MainSidebar-3ee-tTgz.js.map} +1 -1
- package/dist/assets/{NodeCreation-B7Uimsok.js → NodeCreation-PrQGENrl.js} +3 -3
- package/dist/assets/{NodeCreation-B7Uimsok.js.map → NodeCreation-PrQGENrl.js.map} +1 -1
- package/dist/assets/{NodeCreator-IRjqf3_R.js → NodeCreator-DlK1669m.js} +2 -2
- package/dist/assets/{NodeCreator-IRjqf3_R.js.map → NodeCreator-DlK1669m.js.map} +1 -1
- package/dist/assets/{NodeDetailsView-CSnjluIR.js → NodeDetailsView-DcV7LI-g.js} +4 -4
- package/dist/assets/{NodeDetailsView-CSnjluIR.js.map → NodeDetailsView-DcV7LI-g.js.map} +1 -1
- package/dist/assets/{NodeView-DMzj-gox.css → NodeView--67hs6V6.css} +1 -1
- package/dist/assets/NodeView-D_kbUfVN.js +3 -0
- package/dist/assets/NodeView-D_kbUfVN.js.map +1 -0
- package/dist/assets/{NodeView.v2-DyU_S0rY.js → NodeView.v2-D_Wbnl01.js} +3 -3
- package/dist/assets/{NodeView.v2-DyU_S0rY.js.map → NodeView.v2-D_Wbnl01.js.map} +1 -1
- package/dist/assets/{ProjectCardBadge.vue_vue_type_script_setup_true_lang-C1N0EZCM.js → ProjectCardBadge.vue_vue_type_script_setup_true_lang-6oVL0vKx.js} +2 -2
- package/dist/assets/{ProjectCardBadge.vue_vue_type_script_setup_true_lang-C1N0EZCM.js.map → ProjectCardBadge.vue_vue_type_script_setup_true_lang-6oVL0vKx.js.map} +1 -1
- package/dist/assets/{ProjectSettings-CbNlX27g.js → ProjectSettings-CfcplqBX.js} +2 -2
- package/dist/assets/{ProjectSettings-CbNlX27g.js.map → ProjectSettings-CfcplqBX.js.map} +1 -1
- package/dist/assets/{ProjectTabs-Cx2VWeba.js → ProjectTabs-5ZO9YR8J.js} +2 -2
- package/dist/assets/{ProjectTabs-Cx2VWeba.js.map → ProjectTabs-5ZO9YR8J.js.map} +1 -1
- package/dist/assets/{PushConnectionTracker-C_r8Zv-p.js → PushConnectionTracker-Bp-RjnYr.js} +2 -2
- package/dist/assets/{PushConnectionTracker-C_r8Zv-p.js.map → PushConnectionTracker-Bp-RjnYr.js.map} +1 -1
- package/dist/assets/{ResourcesListLayout-CKSHiUAP.js → ResourcesListLayout-B4W1PSHT.js} +2 -2
- package/dist/assets/{ResourcesListLayout-CKSHiUAP.js.map → ResourcesListLayout-B4W1PSHT.js.map} +1 -1
- package/dist/assets/{RunDataAi-BVqsN7UN.js → RunDataAi-C3XiqNZa.js} +2 -2
- package/dist/assets/{RunDataAi-BVqsN7UN.js.map → RunDataAi-C3XiqNZa.js.map} +1 -1
- package/dist/assets/{RunDataJson-6Yfwd78r.js → RunDataJson-CMcOD-78.js} +3 -3
- package/dist/assets/{RunDataJson-6Yfwd78r.js.map → RunDataJson-CMcOD-78.js.map} +1 -1
- package/dist/assets/{RunDataJsonActions-5ig3g4km.js → RunDataJsonActions-BQBpmtOi.js} +2 -2
- package/dist/assets/{RunDataJsonActions-5ig3g4km.js.map → RunDataJsonActions-BQBpmtOi.js.map} +1 -1
- package/dist/assets/{RunDataSchema-CrW957BW.js → RunDataSchema-CF4YH-8y.js} +3 -3
- package/dist/assets/{RunDataSchema-CrW957BW.js.map → RunDataSchema-CF4YH-8y.js.map} +1 -1
- package/dist/assets/{RunDataSearch-BrIWOZXO.js → RunDataSearch-DwB8g_cE.js} +2 -2
- package/dist/assets/{RunDataSearch-BrIWOZXO.js.map → RunDataSearch-DwB8g_cE.js.map} +1 -1
- package/dist/assets/RunDataTable-BVAuNDP9.js +2 -0
- package/dist/assets/{RunDataTable-B01U16vv.js.map → RunDataTable-BVAuNDP9.js.map} +1 -1
- package/dist/assets/{SamlOnboarding-CfbBlTNm.js → SamlOnboarding-Csd8l-7T.js} +2 -2
- package/dist/assets/{SamlOnboarding-CfbBlTNm.js.map → SamlOnboarding-Csd8l-7T.js.map} +1 -1
- package/dist/assets/{SettingsApiView-CuliNEKo.js → SettingsApiView-DnvdV7dx.js} +2 -2
- package/dist/assets/{SettingsApiView-CuliNEKo.js.map → SettingsApiView-DnvdV7dx.js.map} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-CeY4uqH-.js → SettingsCommunityNodesView-C11a_Ybs.js} +2 -2
- package/dist/assets/{SettingsCommunityNodesView-CeY4uqH-.js.map → SettingsCommunityNodesView-C11a_Ybs.js.map} +1 -1
- package/dist/assets/{SettingsExternalSecrets-CE7ObFx_.js → SettingsExternalSecrets-IIReUcRG.js} +2 -2
- package/dist/assets/{SettingsExternalSecrets-CE7ObFx_.js.map → SettingsExternalSecrets-IIReUcRG.js.map} +1 -1
- package/dist/assets/{SettingsFakeDoorView-DQqNf_Q9.js → SettingsFakeDoorView-BOUfBJS8.js} +2 -2
- package/dist/assets/{SettingsFakeDoorView-DQqNf_Q9.js.map → SettingsFakeDoorView-BOUfBJS8.js.map} +1 -1
- package/dist/assets/{SettingsLdapView-9hy5C87y.js → SettingsLdapView-BaSjQ4cy.js} +2 -2
- package/dist/assets/{SettingsLdapView-9hy5C87y.js.map → SettingsLdapView-BaSjQ4cy.js.map} +1 -1
- package/dist/assets/{SettingsLogStreamingView-Cc0h5DhT.js → SettingsLogStreamingView-COGhA1hN.js} +2 -2
- package/dist/assets/{SettingsLogStreamingView-Cc0h5DhT.js.map → SettingsLogStreamingView-COGhA1hN.js.map} +1 -1
- package/dist/assets/{SettingsPersonalView-Cs82ezMX.js → SettingsPersonalView-BJGgPTwa.js} +2 -2
- package/dist/assets/{SettingsPersonalView-Cs82ezMX.js.map → SettingsPersonalView-BJGgPTwa.js.map} +1 -1
- package/dist/assets/{SettingsSourceControl-Dr7R-QpH.js → SettingsSourceControl-DkdSLuvp.js} +2 -2
- package/dist/assets/{SettingsSourceControl-Dr7R-QpH.js.map → SettingsSourceControl-DkdSLuvp.js.map} +1 -1
- package/dist/assets/{SettingsSso-Di6lHXV2.js → SettingsSso-DA9AOKH5.js} +2 -2
- package/dist/assets/{SettingsSso-Di6lHXV2.js.map → SettingsSso-DA9AOKH5.js.map} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-g86Q7EQY.js → SettingsUsageAndPlan-BVPtlthH.js} +2 -2
- package/dist/assets/{SettingsUsageAndPlan-g86Q7EQY.js.map → SettingsUsageAndPlan-BVPtlthH.js.map} +1 -1
- package/dist/assets/{SettingsUsersView-dOWjUJTW.js → SettingsUsersView-BuKt4ZDO.js} +2 -2
- package/dist/assets/{SettingsUsersView-dOWjUJTW.js.map → SettingsUsersView-BuKt4ZDO.js.map} +1 -1
- package/dist/assets/{SettingsView-DQ0hQWFt.js → SettingsView-DJ78VuiY.js} +2 -2
- package/dist/assets/{SettingsView-DQ0hQWFt.js.map → SettingsView-DJ78VuiY.js.map} +1 -1
- package/dist/assets/{SetupView-CqT8d0D8.js → SetupView-C70Dkfed.js} +2 -2
- package/dist/assets/{SetupView-CqT8d0D8.js.map → SetupView-C70Dkfed.js.map} +1 -1
- package/dist/assets/{SetupWorkflowCredentialsButton-BR-ObOqw.js → SetupWorkflowCredentialsButton-CEQ1LrFl.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-BR-ObOqw.js.map → SetupWorkflowCredentialsButton-CEQ1LrFl.js.map} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-DHHtk6_-.js → SetupWorkflowFromTemplateView-BUzzXtBr.js} +2 -2
- package/dist/assets/{SetupWorkflowFromTemplateView-DHHtk6_-.js.map → SetupWorkflowFromTemplateView-BUzzXtBr.js.map} +1 -1
- package/dist/assets/{SigninView-2eLLF8DU.js → SigninView-B3CNL-yp.js} +2 -2
- package/dist/assets/{SigninView-2eLLF8DU.js.map → SigninView-B3CNL-yp.js.map} +1 -1
- package/dist/assets/{SignoutView-BQyCyjsK.js → SignoutView-svcLavkC.js} +2 -2
- package/dist/assets/{SignoutView-BQyCyjsK.js.map → SignoutView-svcLavkC.js.map} +1 -1
- package/dist/assets/{SignupView-ByYEkUpW.js → SignupView-DJWRTPKF.js} +2 -2
- package/dist/assets/{SignupView-ByYEkUpW.js.map → SignupView-DJWRTPKF.js.map} +1 -1
- package/dist/assets/{TemplateDetails-I6WMCxGm.js → TemplateDetails-BnbiWxo-.js} +2 -2
- package/dist/assets/{TemplateDetails-I6WMCxGm.js.map → TemplateDetails-BnbiWxo-.js.map} +1 -1
- package/dist/assets/{TemplateList-DRf0Cbhg.js → TemplateList-By-t2s0M.js} +2 -2
- package/dist/assets/{TemplateList-DRf0Cbhg.js.map → TemplateList-By-t2s0M.js.map} +1 -1
- package/dist/assets/{TemplatesCollectionView-BYkDe49v.js → TemplatesCollectionView-D2L1fmSc.js} +2 -2
- package/dist/assets/{TemplatesCollectionView-BYkDe49v.js.map → TemplatesCollectionView-D2L1fmSc.js.map} +1 -1
- package/dist/assets/{TemplatesSearchView-CiZ7aZcy.js → TemplatesSearchView-Bmr6Nd6g.js} +2 -2
- package/dist/assets/{TemplatesSearchView-CiZ7aZcy.js.map → TemplatesSearchView-Bmr6Nd6g.js.map} +1 -1
- package/dist/assets/{TemplatesView-zULLoEwu.js → TemplatesView-BbunSn-s.js} +2 -2
- package/dist/assets/{TemplatesView-zULLoEwu.js.map → TemplatesView-BbunSn-s.js.map} +1 -1
- package/dist/assets/{TemplatesWorkflowView-DptRLbdX.js → TemplatesWorkflowView-XxBIlMWY.js} +2 -2
- package/dist/assets/{TemplatesWorkflowView-DptRLbdX.js.map → TemplatesWorkflowView-XxBIlMWY.js.map} +1 -1
- package/dist/assets/{VariablesView-NcNcsjHY.js → VariablesView-ZY5xLmKI.js} +2 -2
- package/dist/assets/{VariablesView-NcNcsjHY.js.map → VariablesView-ZY5xLmKI.js.map} +1 -1
- package/dist/assets/{WorkerView-dtJzfgCM.js → WorkerView-DV19-i1-.js} +2 -2
- package/dist/assets/{WorkerView-dtJzfgCM.js.map → WorkerView-DV19-i1-.js.map} +1 -1
- package/dist/assets/{WorkflowActivator-D6Zad1X2.js → WorkflowActivator-BXWURYao.js} +2 -2
- package/dist/assets/{WorkflowActivator-D6Zad1X2.js.map → WorkflowActivator-BXWURYao.js.map} +1 -1
- package/dist/assets/{WorkflowExecutionsInfoAccordion-C86A1CHv.js → WorkflowExecutionsInfoAccordion-aldNazgt.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-C86A1CHv.js.map → WorkflowExecutionsInfoAccordion-aldNazgt.js.map} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-DAfHDMth.js → WorkflowExecutionsLandingPage-CaAameTk.js} +2 -2
- package/dist/assets/{WorkflowExecutionsLandingPage-DAfHDMth.js.map → WorkflowExecutionsLandingPage-CaAameTk.js.map} +1 -1
- package/dist/assets/{WorkflowExecutionsPreview-C_EBlNX6.js → WorkflowExecutionsPreview-Bb-wJtr-.js} +2 -2
- package/dist/assets/WorkflowExecutionsPreview-Bb-wJtr-.js.map +1 -0
- package/dist/assets/WorkflowExecutionsView-D7nlOP1-.js +2 -0
- package/dist/assets/WorkflowExecutionsView-D7nlOP1-.js.map +1 -0
- package/dist/assets/{WorkflowHistory-DkdQ1koF.js → WorkflowHistory-C6zCGFoY.js} +2 -2
- package/dist/assets/{WorkflowHistory-DkdQ1koF.js.map → WorkflowHistory-C6zCGFoY.js.map} +1 -1
- package/dist/assets/{WorkflowOnboardingView-BPMBW_hz.js → WorkflowOnboardingView-Bu_Oqtr7.js} +2 -2
- package/dist/assets/{WorkflowOnboardingView-BPMBW_hz.js.map → WorkflowOnboardingView-Bu_Oqtr7.js.map} +1 -1
- package/dist/assets/{WorkflowPreview-CLzyAzmJ.js → WorkflowPreview-CVwpKdpj.js} +2 -2
- package/dist/assets/{WorkflowPreview-CLzyAzmJ.js.map → WorkflowPreview-CVwpKdpj.js.map} +1 -1
- package/dist/assets/{WorkflowsView-CzJx_-P5.js → WorkflowsView-DVeAZ2zW.js} +2 -2
- package/dist/assets/{WorkflowsView-CzJx_-P5.js.map → WorkflowsView-DVeAZ2zW.js.map} +1 -1
- package/dist/assets/{cloud-CRMEbZfJ.js → cloud-BRhZDk2r.js} +2 -2
- package/dist/assets/{cloud-CRMEbZfJ.js.map → cloud-BRhZDk2r.js.map} +1 -1
- package/dist/assets/{collaboration.store-Co5wlk8y.js → collaboration.store-Ol7bcCFc.js} +2 -2
- package/dist/assets/{collaboration.store-Co5wlk8y.js.map → collaboration.store-Ol7bcCFc.js.map} +1 -1
- package/dist/assets/index-1OxaEeO3.js +341 -0
- package/dist/assets/index-1OxaEeO3.js.map +1 -0
- package/dist/assets/{nodeCreator.store-CTXKjjQB.js → nodeCreator.store-FIsc3SCx.js} +2 -2
- package/dist/assets/{nodeCreator.store-CTXKjjQB.js.map → nodeCreator.store-FIsc3SCx.js.map} +1 -1
- package/dist/assets/{templateActions-CIRsIG2W.js → templateActions-w_1vSarr.js} +2 -2
- package/dist/assets/{templateActions-CIRsIG2W.js.map → templateActions-w_1vSarr.js.map} +1 -1
- package/dist/assets/{useExecutionDebugging-BzC-1xF-.js → useExecutionDebugging-EHinBq_u.js} +2 -2
- package/dist/assets/{useExecutionDebugging-BzC-1xF-.js.map → useExecutionDebugging-EHinBq_u.js.map} +1 -1
- package/dist/assets/{useExecutionHelpers-C2K8pfbF.js → useExecutionHelpers-LeKoU_T-.js} +2 -2
- package/dist/assets/{useExecutionHelpers-C2K8pfbF.js.map → useExecutionHelpers-LeKoU_T-.js.map} +1 -1
- package/dist/assets/{usePushConnection-EMXpPhl-.js → usePushConnection-PQgFeT_8.js} +2 -2
- package/dist/assets/{usePushConnection-EMXpPhl-.js.map → usePushConnection-PQgFeT_8.js.map} +1 -1
- package/dist/assets/{useUserHelpers-Bn_ZV9Jv.js → useUserHelpers-DZtbUAMm.js} +2 -2
- package/dist/assets/{useUserHelpers-Bn_ZV9Jv.js.map → useUserHelpers-DZtbUAMm.js.map} +1 -1
- package/dist/assets/{useWorkflowActivate-BwVActuc.js → useWorkflowActivate-npf1npdP.js} +2 -2
- package/dist/assets/{useWorkflowActivate-BwVActuc.js.map → useWorkflowActivate-npf1npdP.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/CollectionParameter-DHmcKhO-.js.map +0 -1
- package/dist/assets/MainHeader-CMxbwL4C.js +0 -2
- package/dist/assets/NodeView-C-hQ3_xD.js +0 -3
- package/dist/assets/NodeView-C-hQ3_xD.js.map +0 -1
- package/dist/assets/RunDataTable-B01U16vv.js +0 -2
- package/dist/assets/WorkflowExecutionsPreview-C_EBlNX6.js.map +0 -1
- package/dist/assets/WorkflowExecutionsView-Nm1Oo9El.js +0 -2
- package/dist/assets/WorkflowExecutionsView-Nm1Oo9El.js.map +0 -1
- package/dist/assets/index-Dtri_pSJ.js +0 -341
- package/dist/assets/index-Dtri_pSJ.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"mappings":";wsGAgCA,MAAMA,GAAWC,EAAgB,CAAC,EAAG,CAAC,CAAC,EACjCC,GAASD,EAAI,EAAK,EAClBE,GAASF,EAAuB,CAAE,OAAQ,QAAU,GACpDG,GAAUH,EAA0B,EAAE,EACtCI,GAAiBJ,EAA+B,IAAM,CAAC,CAAC,EAEjDK,GAAiB,CAACC,EAAsC,IAAM,CAAC,IAAM,CACjF,MAAMC,EAAUC,KACVC,EAAiBC,KACjBC,EAAiBC,KACjBC,EAAqBC,KAErBC,EAAOC,KAEPC,EAAaC,EAClB,IAAML,EAAmB,YAAY,gBAAkBN,EAAQ,gBAG1DY,EAAcD,EAAS,IAAM,CAClC,GAAI,CAACjB,GAAO,MAAO,MAAO,GACpB,MAAAmB,EAAgBb,EAAQ,cAAc,IAAKc,GAChDV,EAAe,cAAcU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qDA3JN,QAAA/iB,GAAAX,EAAA,sBA+JWwjB,iBAAe,MADtB,GAcE,IAAAxjB,EA5KN,yDAgKgB8B,EAAAS,EAAA,CACX,IAAI,EACJ,KAAK,OACL,KAAK,QACJ,MAAK,iBAASohB,iBAAiC5iB,QAA+DA,wBAK9Gf,EAAA,sDAAAA,EAAA,iBAAS2jB,+BAAuB,EAEhC,QA3KN3jB,EAAA,uEAAAW,GAAAX,EAAA,yBA+KWwjB,gBAAe,UAAaI,eADnC,GASE,IAAA5jB,EAvLN,6DAgL2B8B,EAAAS,EAAA,CACtB,IAAI,EACJ,MAAK,iBACJ,KAAK,OACN,KAAK,QACL,gBAAa,SAA2C,sCACvD,4EAtLN,QAAA5B,GAAAX,EAAA,8DA0LmB4hB,EAAe,OAAgCzkB,CAA4BqmB,qCAA0BK,mBAW3G9iB,kDAAQwB,EAAQ,CACxB,IAAI,EACJ,MAAKvC,EAAO,4DACZ,aACC,0DAzMN,QAAAW,GAAAX,EAAA,2DAAAiB,EAAA,UAAAA,EAAA","names":["position","ref","isOpen","target","actions","actionCallback","useContextMenu","onAction","uiStore","useUIStore","nodeTypesStore","useNodeTypesStore","workflowsStore","useWorkflowsStore","sourceControlStore","useSourceControlStore","i18n","useI18n","isReadOnly","computed","targetNodes","selectedNodes","node","currentTarget","canAddNodeOfType","nodeType","sameTypeNodes","n","canDuplicateNode","NOT_DUPLICATABLE_NODE_TYPES","hasPinData","close","open","event","menuTarget","getMousePosition","nodes","onlyStickies","STICKY_NODE_TYPE","i18nOptions","selectionActions","menuActions","usePinnedData","singleNodeActions","_dispatchAction","action","watch","useCanvasMouseSelect","selectActive","selectBox","isTouchDevice","isCtrlKeyPressed","useDeviceSupport","canvasStore","useCanvasStore","isContextMenuOpen","_setSelectBoxStyle","styles","_showSelectBox","y","getMousePositionWithinNodeView","_updateSelectBox","selectionBox","_getSelectionBox","_hideSelectBox","_getNodesInSelection","returnNodes","_createSelectBox","mouseUpMouseSelect","_mouseMoveSelect","e","deselectAllNodes","nodeSelected","mouseDownMouseSelect","moveButtonPressed","mousePosition","relativeX","relativeY","nodeViewScale","nodeViewOffsetPosition","getRelativePosition","nodeDeselected","instance","onMounted","useUniqueNodeName","numberSuffixedNames","acc","uniqueNodeName","originalName","extraNames","canvasNames","nsn","unique","index","remainder","lastChar","match","_b","contextMenu","dropdown","emit","__emit","_a","onActionSelect","item","onVisibleChange","useNodeBase","name","workflowObject","deviceSupport","refs","getCurrentInstance","data","nodeId","inputs","outputs","createAddInputEndpointSpec","connectionName","color","multiple","NODE_CONNECTION_TYPE_ALLOW_MULTIPLE","createDiamondOutputEndpointSpec","getEndpointLabelLength","length","addEndpointTestingData","endpoint","type","inputIndex","canvas","addInputEndpoints","nodeTypeData","rootTypeIndexData","typeIndexData","NodeHelpers.getNodeInputs","sortedInputs","a","b","value","i","inputConfiguration","inputName","rootCategoryInputName","NodeConnectionType","rootTypeIndex","typeIndex","inputsOfSameRootType","inputData","thisInputName","nonMainInputs","requiredNonMainInputs","optionalNonMainInputs","spacerIndexes","getSpacerIndexes","anchorPosition","NodeViewUtils.getAnchorPosition","isValidNodeConnectionType","scope","NodeViewUtils.getEndpointScope","newEndpointData","NodeViewUtils.getInputEndpointUUID","NodeViewUtils.getInputEndpointStyle","NodeViewUtils.getScope","getInputConnectionStyle","NodeViewUtils.getInputNameOverlay","_c","leftGroupItemsCount","rightGroupItemsCount","insertSpacerBetweenGroups","NODE_INSERT_SPACER_BETWEEN_INPUT_GROUPS","minItemsCount","NODE_MIN_INPUT_ITEMS_COUNT","spacerIndex","addOutputEndpoints","NodeHelpers.getNodeOutputs","maxLabelLength","outputConfigurations","outputConfiguration","endpointLabelLength","_value","outputName","rootCategoryOutputName","outputsOfSameRootType","outputData","thisOutputName","NodeViewUtils.getOutputEndpointUUID","NodeViewUtils.getOutputEndpointStyle","getOutputConnectionStyle","overlaySpec","NodeViewUtils.getOutputNameOverlay","plusEndpointData","plusEndpoint","addNode","NO_OP_NODE_TYPE","getEndpointColor","connectionType","createSupplementalConnectionType","touchEnd","_e","mouseLeftClick","path","_sfc_main$4","defineComponent","TitledList","FontAwesomeIcon","NodeIcon","props","externalHooks","useExternalHooks","nodeHelpers","useNodeHelpers","pinnedData","callDebounced","useDebounce","nodeBase","mapStores","useNDVStore","useHistoryStore","workflowResultDataNode","nodeName","eventTriggerDescription","getTriggerNodeServiceName","MANUAL_TRIGGER_NODE_TYPE","classes","otherOutputs","NodeHelpers.getConnectionTypes","input","spacerCount","mainOutputs","output","nodeExecutionRunData","issues","executionRunData","message","description","issue","xss","NodeHelpers.nodeIssuesToString","workflowExecution","lastNodeExecuted","get","waitDate","WAIT_TIME_UNLIMITED","returnStyles","borderColor","_d","SIMULATE_NODE_TYPE","SIMULATE_TRIGGER_NODE_TYPE","icon","iconNodeType","newValue","oldValue","shouldShowTriggerTooltip","useStorage","LOCAL_STORAGE_PIN_DATA_DISCOVERY_CANVAS_FLAG","dataItemsCount","nodeSubtitle","CUSTOM_API_CALL_KEY","EnableNodeToggleCommand","args","source","_withScopeId","_pushScopeId","_popScopeId","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_createElementVNode","_hoisted_17","_hoisted_19","_hoisted_20","_hoisted_21","_directive_touch","_resolveDirective","_ctx","_openBlock","_createElementBlock","_cache","_vShow","isTouchActive","disablePointerEvents","_withDirectives","_normalizeClass","_normalizeStyle","isTriggerNode","_withModifiers","_createVNode","_component_n8n_tooltip","_withCtx","$locale","_component_FontAwesomeIcon","_createCommentVNode","hasIssues","hideNodeIssues","nodeIssues","waiting","_toDisplayString","showPinnedDataInfo","nodeExecutionStatus","workflowDataItems","_hoisted_14","showTriggerNodeTooltip","_hoisted_15","_hoisted_16","_createBlock","_createTextVNode","_component_NodeIcon","touchStart","showDisabledLineThrough","_hoisted_18","nodeTitle","_hoisted_22","_hoisted_23","_component_n8n_icon_button","executeNode","_hoisted_1","_sfc_main$3","GRID_SIZE","toast","useToast","colorPopoverTrigger","forceActions","setForceActions","content","property","isString","isNumber","assert","edit","link","isOnboardingNote","QUICKSTART_NOTE_NAME","isWelcomeVideo","height","width","dX","dY","params","nodeParameters","updateInformation","_component_n8n_sticky","defaultText","isActive","gridSize","onEdit","onResizeStart","onResize","onResizeEnd","_component_font_awesome_icon","_component_n8n_popover","onShowPopover","onHidePopover","_Fragment","_renderList","_","showActions","__props","nodeCreatorStore","useNodeCreatorStore","containerCssVars","aiStore","useAIStore","locale","telemetry","useTelemetry","aiAssistantChatOpen","title","options","style","onOptionSelected","option","useCanvasPanning","elementRef","moveLastPosition","panCanvas","offsetPosition","x","nodeViewOffsetPositionX","nodeViewOffsetPositionY","onMouseDown","MOUSE_EVENT_BUTTON","element","unref","onMouseMove","onMouseUp","MOUSE_EVENT_BUTTONS","onMouseMoveEnd","NodeCreation","defineAsyncComponent","__vitePreload","CanvasControls","SetupWorkflowCredentialsButton","_sfc_main","NodeDetailsView","Node","Sticky","CanvasAddButton","KeyboardShortcutTooltip","ContextMenu","NextStepPopup","to","from","next","getNodeViewTab","MAIN_HEADER_TABS","VIEWS","confirmModal","MODAL_CONFIRM","PLACEHOLDER_EMPTY_WORKFLOW_ID","MODAL_CANCEL","nodeViewRootRef","nodeViewRef","router","useRouter","ndvStore","dataSchema","useDataSchema","clipboard","useClipboard","activeNode","storeToRefs","canvasPanning","workflowHelpers","useWorkflowHelpers","runWorkflow","stopCurrentExecution","useRunWorkflow","useGlobalLinkActions","useTitleChange","useMessage","useExecutionDebugging","NodeViewUtils.GRID_SIZE","NODE_CREATOR_OPEN_SOURCES","useTagsStore","useCredentialsStore","useRootStore","useSettingsStore","useTemplatesStore","useUsersStore","useEnvironmentsStore","useWorkflowsEEStore","useExternalSecretsStore","useCollaborationStore","usePushConnectionStore","useExecutionsStore","useProjectsStore","useNpsSurveyStore","NodeViewUtils.getBackgroundStyles","returnClasses","START_NODE_TYPE","MANUAL_CHAT_TRIGGER_NODE_TYPE","CHAT_TRIGGER_NODE_TYPE","userHasSeenAIAssistantExperiment","AI_ASSISTANT_LOCAL_STORAGE_KEY","experimentEnabled","currentTab","nodeViewNotInitialized","workflowChanged","isOpeningTemplate","previousDirtyState","containsTrigger","newScale","err","loadPromises","promises","EnterpriseEditionFeature","error","ready","getAccountAge","ONBOARDING_PROMPT_TIMEBOX","onboardingResponse","promptTimeout","FIRST_ONBOARDING_PROMPT_TIMEOUT","ONBOARDING_CALL_SIGNUP_MODAL_KEY","sourceControlEventBus","nodeViewEventBus","historyBus","dataPinningEventBus","connectiontype","creatorview","nodeData","isVisible","telemetryPayload","WORKFLOW_LM_CHAT_MODAL_KEY","workflowData","TelemetryHelpers.generateNodesGraph","el","N8nAddInputEndpointType","n8nAddInputEndpoint","managedNode","endpoints","notice","saved","newNodeButton","lastConnectionInfo","TRIGGER_NODE_CREATOR_VIEW","executionId","deepCopy","nodeErrorFound","runData","errorCheck","taskData","NodeViewUtils.getFixedNodesList","templateId","tryToParseNumber","convertedNodes","workflow","selectedExecution","tags","tagIds","tag","ctrlModifier","shiftModifier","ctrlAltModifier","noModifierKeys","readOnly","workflowIsSaved","lastSelectedNode","connections","parentNode","connectionsParent","siblingNode","lastCheckedNodePosition","nextSelectNode","ouputConnections","ouputConnection","nextStatePinned","pinnedDataForNode","dataToPin","checkNodes","sourceNodeName","margin","recordHistory","sourceNode","oldPosition","MoveNodeCommand","deleteCopiedNodes","isCut","workflowToCopy","execution","executedData","pushData","trackProps","plainTextData","url","importTags","nodeIdMap","nodeNames","newName","UPDATE_WEBHOOK_ID_NODE_TYPES","uuid","newId","currInstanceId","nodeGraph","NodeViewUtils.getNewNodePosition","tagsEnabled","allTags","tagNames","workflowTags","notFound","creatingTagPromises","creationPromise","accu","imported","credential","dropData","jsonParse","DRAG_EVENT_DATA_KEY","insertNodePosition","NodeViewUtils.NODE_SIZE","setActive","deselectAllOthers","maxNodes","overrides","nodeVersion","newNodeData","credentialPerType","defaultCredential","selectedCredentials","selected","credentials","NodeHelpers.getNodeParameters","authentication","authDisplayOptions","parameters","displayOption","optionValue","nodeTypeName","showDetail","trackHistory","isAutoAdd","lastSelectedConnection","diffX","NodeViewUtils.getConnectorLengths","NodeViewUtils.MAX_X_TO_PUSH_DOWNSTREAM_NODES","NodeViewUtils.PUSH_NODES_OFFSET","yOffset","sourceNodeType","offsets","sourceNodeOutputs","sourceNodeOutputMainOutputs","offset","sourceOutputIndex","outputTypes","lastSelectedNodeType","lastSelectedNodeWorkflow","lastSelectedInputs","scopedConnectionIndex","inputType","inputsTypes","pushOffset","localizedName","useSegment","trackProperties","sourceNodeOutputIndex","targetNodeName","targetNodeOuputIndex","nodeConnections","connection","targetNodeOutputIndex","targetNode","connectionData","lastSelectedNodeOutputIndex","lastSelectedNodeEndpointUuid","outputIndex","targetEndpoint","lastSelectedEndpoint","newNodeElement","viableConnection","conn","targetOutputIndex","outputType","filter","workflowNode","filterFound","info","isOutput","nodeConnectionTypes","useViewStacks","overrideTargetEndpoint","isTarget","NodeViewUtils.resetConnectionAfterPull","endpointId","endpointElement","observer","mutations","mutation","isJSPlumbEndpointElement","newConnectionInfo","targetInfoType","targetNodeType","sourceInfo","targetInfo","tempEndpoint","NodeViewUtils.resetConnection","NodeViewUtils.moveBackInputLabelPosition","NodeViewUtils.hideOutputNameLabel","NodeViewUtils.addConnectionActionsOverlay","endpointArrow","NodeViewUtils.getOverlay","OVERLAY_ENDPOINT_ARROW_ID","getConnectorPaintStyleData","AddConnectionCommand","NodeViewUtils.addConnectionTestData","totalNodes","NodeViewUtils.showOrHideItemsLabel","NodeViewUtils.showOrHideMidpointArrow","overlay","isJSPlumbConnection","NodeViewUtils.hideConnectionActions","NodeViewUtils.showConnectionActions","NodeViewUtils.resetInputLabelPosition","connectionInfo","mouse","getConnectionInfo","NodeViewUtils.showOutputNameLabel","RemoveConnectionCommand","removeCommand","scopedEndpoints","requiredType","filteredEndpoints","isSameNode","endpointType","intersectingEndpoints","isEndpointIntersect","NodeViewUtils.isElementIntersection","isNodeElementIntersect","aEndpointIntersect","NodeViewUtils.calculateElementIntersection","bEndpointIntersect","NodeViewUtils.showDropConnectionState","NodeViewUtils.showPullConnectionState","getEndpointScope","AI_NODE_CREATOR_VIEW","EVENT_CONNECTION_ABORT","INTERCEPT_BEFORE_DROP","EVENT_CONNECTION","EVENT_DRAG_MOVE","EVENT_CONNECTION_MOUSEOVER","EVENT_CONNECTION_MOUSEOUT","EVENT_CONNECTION_MOVED","EVENT_ENDPOINT_MOUSEOVER","EVENT_ENDPOINT_MOUSEOUT","EVENT_CONNECTION_DETACHED","EVENT_CONNECTION_DRAG","EVENT_PLUS_ENDPOINT_CLICK","EVENT_ADD_INPUT_ENDPOINT_CLICK","elements","endpointInstance","N8nPlusEndpointType","TIME","currentProject","personalProject","homeProject","scopes","getVariant","usePostHog","CANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT","manualTriggerNode","workflowId","outputUuid","inputUuid","removeVisualConnection","sourceElement","targetElement","connectionInstance","nodeEl","outgoing","incoming","pinData","hasRun","NodeViewUtils.addClassesToOverlays","NodeViewUtils.OVERLAY_RUN_ITEMS_ID","sourceId","NodeViewUtils.getJSPlumbEndpoints","trackBulk","requiredNodeTypes","deleteAllowed","checkNode","waitForNewConnection","conn1","conn2","nextTick","RemoveNodeCommand","tempName","parameterData","currentName","promptResponsePromise","nameInput","promptResponse","RenameNodeCommand","nodeCredentialType","nodeCredentials","credentialOptions","credentialsId","credentialsForId","optionData","credentialsForName","newNode","WEBHOOK_NODE_TYPE","FORM_TRIGGER_NODE_TYPE","AddNodeCommand","batchedConnectionData","outwardConnections","sourceIndex","targetData","nodeNameTable","newNodeNames","nodeTypesCount","oldName","createNodes","localized","newConnections","currentConnections","createNodeNames","connectionIndex","nodeSourceConnections","tempWorkflow","pinDataSuccess","exportNodeNames","pinDataForNode","usedCredentials","connectionToKeep","typeConnections","projectId","nodeInfos","allNodes","nodesToBeFetched","nodeVersions","json","nodeElement","classNames","NodeViewUtils.addConnectionOutputSuccess","connectionsArray","createNodeActive","nodeCreatorView","REGULAR_NODE_CREATOR_VIEW","mode","dragAndDrop","currentPosition","openDetail","nodePosition","lastAddedNode","newNodesOffset","fromNode","toNode","lastNodeInputs","nodeUi","callback","suspend","canvasAddButtonStyle","onCanvasAddButtonCLick","showCanvasAddButton","_component_Node","isReadOnlyRoute","isProductionExecutionPreview","currentWorkflowObject","canOpenNDV","nodeDeselectedByName","nodeSelectedByName","onRunNode","onNodeMoved","onNodeRun","stickiesToRender","stickyData","_component_Sticky","pullConnActive","renamingActive","redrawNode","onSwitchSelectedNode","valueChanged","stopExecution","_Suspense","readOnlyEnv","onToggleNodeCreator","onAddNodes","_component_CanvasControls","_component_ContextMenu","isNextStepPopupVisible","isManualChatOnly","$event","_component_KeyboardShortcutTooltip","workflowRunning","runButtonText","_component_n8n_button","stopExecutionInProgress","executionWaitingForWebhook","allTriggersDisabled"],"ignoreList":[],"sources":["../../src/composables/useContextMenu.ts","../../src/composables/useCanvasMouseSelect.ts","../../src/composables/useUniqueNodeName.ts","../../src/components/ContextMenu/ContextMenu.vue","../../src/composables/useNodeBase.ts","../../src/components/Node.vue","../../src/components/Sticky.vue","../../src/views/CanvasAddButton.vue","../../src/components/AIAssistantChat/NextStepPopup.vue","../../src/composables/useCanvasPanning.ts","../../src/views/NodeView.vue"],"sourcesContent":["import type { ActionDropdownItem, XYPosition } from '@/Interface';\nimport { NOT_DUPLICATABLE_NODE_TYPES, STICKY_NODE_TYPE } from '@/constants';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport { useSourceControlStore } from '@/stores/sourceControl.store';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport type { INode, INodeTypeDescription } from 'n8n-workflow';\nimport { computed, ref, watch } from 'vue';\nimport { getMousePosition } from '../utils/nodeViewUtils';\nimport { useI18n } from './useI18n';\nimport { usePinnedData } from './usePinnedData';\n\nexport type ContextMenuTarget =\n\t| { source: 'canvas' }\n\t| { source: 'node-right-click'; node: INode }\n\t| { source: 'node-button'; node: INode };\nexport type ContextMenuActionCallback = (action: ContextMenuAction, targets: INode[]) => void;\nexport type ContextMenuAction =\n\t| 'open'\n\t| 'copy'\n\t| 'toggle_activation'\n\t| 'duplicate'\n\t| 'execute'\n\t| 'rename'\n\t| 'toggle_pin'\n\t| 'delete'\n\t| 'select_all'\n\t| 'deselect_all'\n\t| 'add_node'\n\t| 'add_sticky'\n\t| 'change_color';\n\nconst position = ref<XYPosition>([0, 0]);\nconst isOpen = ref(false);\nconst target = ref<ContextMenuTarget>({ source: 'canvas' });\nconst actions = ref<ActionDropdownItem[]>([]);\nconst actionCallback = ref<ContextMenuActionCallback>(() => {});\n\nexport const useContextMenu = (onAction: ContextMenuActionCallback = () => {}) => {\n\tconst uiStore = useUIStore();\n\tconst nodeTypesStore = useNodeTypesStore();\n\tconst workflowsStore = useWorkflowsStore();\n\tconst sourceControlStore = useSourceControlStore();\n\n\tconst i18n = useI18n();\n\n\tconst isReadOnly = computed(\n\t\t() => sourceControlStore.preferences.branchReadOnly || uiStore.isReadOnlyView,\n\t);\n\n\tconst targetNodes = computed(() => {\n\t\tif (!isOpen.value) return [];\n\t\tconst selectedNodes = uiStore.selectedNodes.map((node) =>\n\t\t\tworkflowsStore.getNodeByName(node.name),\n\t\t) as INode[];\n\t\tconst currentTarget = target.value;\n\t\tif (currentTarget.source === 'canvas') {\n\t\t\treturn selectedNodes;\n\t\t} else if (currentTarget.source === 'node-right-click') {\n\t\t\tconst isNodeInSelection = selectedNodes.some((node) => node.name === currentTarget.node.name);\n\t\t\treturn isNodeInSelection ? selectedNodes : [currentTarget.node];\n\t\t}\n\n\t\treturn [currentTarget.node];\n\t});\n\n\tconst canAddNodeOfType = (nodeType: INodeTypeDescription) => {\n\t\tconst sameTypeNodes = workflowsStore.allNodes.filter((n) => n.type === nodeType.name);\n\t\treturn nodeType.maxNodes === undefined || sameTypeNodes.length < nodeType.maxNodes;\n\t};\n\n\tconst canDuplicateNode = (node: INode): boolean => {\n\t\tconst nodeType = nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\t\tif (!nodeType) return false;\n\t\tif (NOT_DUPLICATABLE_NODE_TYPES.includes(nodeType.name)) return false;\n\n\t\treturn canAddNodeOfType(nodeType);\n\t};\n\n\tconst hasPinData = (node: INode): boolean => {\n\t\treturn !!workflowsStore.pinDataByNodeName(node.name);\n\t};\n\tconst close = () => {\n\t\ttarget.value = { source: 'canvas' };\n\t\tisOpen.value = false;\n\t\tactions.value = [];\n\t\tposition.value = [0, 0];\n\t};\n\n\tconst open = (event: MouseEvent, menuTarget: ContextMenuTarget = { source: 'canvas' }) => {\n\t\tevent.stopPropagation();\n\n\t\tif (isOpen.value && menuTarget.source === target.value.source) {\n\t\t\t// Close context menu, let browser open native context menu\n\t\t\tclose();\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tactionCallback.value = onAction;\n\t\ttarget.value = menuTarget;\n\t\tposition.value = getMousePosition(event);\n\t\tisOpen.value = true;\n\n\t\tconst nodes = targetNodes.value;\n\t\tconst onlyStickies = nodes.every((node) => node.type === STICKY_NODE_TYPE);\n\t\tconst i18nOptions = {\n\t\t\tadjustToNumber: nodes.length,\n\t\t\tinterpolate: {\n\t\t\t\tsubject: onlyStickies\n\t\t\t\t\t? i18n.baseText('contextMenu.sticky', { adjustToNumber: nodes.length })\n\t\t\t\t\t: i18n.baseText('contextMenu.node', { adjustToNumber: nodes.length }),\n\t\t\t},\n\t\t};\n\n\t\tconst selectionActions = [\n\t\t\t{\n\t\t\t\tid: 'select_all',\n\t\t\t\tdivided: true,\n\t\t\t\tlabel: i18n.baseText('contextMenu.selectAll'),\n\t\t\t\tshortcut: { metaKey: true, keys: ['A'] },\n\t\t\t\tdisabled: nodes.length === workflowsStore.allNodes.length,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'deselect_all',\n\t\t\t\tlabel: i18n.baseText('contextMenu.deselectAll'),\n\t\t\t\tdisabled: nodes.length === 0,\n\t\t\t},\n\t\t];\n\n\t\tif (nodes.length === 0) {\n\t\t\tactions.value = [\n\t\t\t\t{\n\t\t\t\t\tid: 'add_node',\n\t\t\t\t\tshortcut: { keys: ['Tab'] },\n\t\t\t\t\tlabel: i18n.baseText('contextMenu.addNode'),\n\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'add_sticky',\n\t\t\t\t\tshortcut: { shiftKey: true, keys: ['s'] },\n\t\t\t\t\tlabel: i18n.baseText('contextMenu.addSticky'),\n\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t},\n\t\t\t\t...selectionActions,\n\t\t\t];\n\t\t} else {\n\t\t\tconst menuActions: ActionDropdownItem[] = [\n\t\t\t\t!onlyStickies && {\n\t\t\t\t\tid: 'toggle_activation',\n\t\t\t\t\tlabel: nodes.every((node) => node.disabled)\n\t\t\t\t\t\t? i18n.baseText('contextMenu.activate', i18nOptions)\n\t\t\t\t\t\t: i18n.baseText('contextMenu.deactivate', i18nOptions),\n\t\t\t\t\tshortcut: { keys: ['D'] },\n\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t},\n\t\t\t\t!onlyStickies && {\n\t\t\t\t\tid: 'toggle_pin',\n\t\t\t\t\tlabel: nodes.every((node) => hasPinData(node))\n\t\t\t\t\t\t? i18n.baseText('contextMenu.unpin', i18nOptions)\n\t\t\t\t\t\t: i18n.baseText('contextMenu.pin', i18nOptions),\n\t\t\t\t\tshortcut: { keys: ['p'] },\n\t\t\t\t\tdisabled: isReadOnly.value || !nodes.every((n) => usePinnedData(n).canPinNode(true)),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'copy',\n\t\t\t\t\tlabel: i18n.baseText('contextMenu.copy', i18nOptions),\n\t\t\t\t\tshortcut: { metaKey: true, keys: ['C'] },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: 'duplicate',\n\t\t\t\t\tlabel: i18n.baseText('contextMenu.duplicate', i18nOptions),\n\t\t\t\t\tshortcut: { metaKey: true, keys: ['D'] },\n\t\t\t\t\tdisabled: isReadOnly.value || !nodes.every(canDuplicateNode),\n\t\t\t\t},\n\t\t\t\t...selectionActions,\n\t\t\t\t{\n\t\t\t\t\tid: 'delete',\n\t\t\t\t\tdivided: true,\n\t\t\t\t\tlabel: i18n.baseText('contextMenu.delete', i18nOptions),\n\t\t\t\t\tshortcut: { keys: ['Del'] },\n\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t},\n\t\t\t].filter(Boolean) as ActionDropdownItem[];\n\n\t\t\tif (nodes.length === 1) {\n\t\t\t\tconst singleNodeActions = onlyStickies\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: 'open',\n\t\t\t\t\t\t\t\tlabel: i18n.baseText('contextMenu.editSticky'),\n\t\t\t\t\t\t\t\tshortcut: { keys: ['↵'] },\n\t\t\t\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: 'change_color',\n\t\t\t\t\t\t\t\tlabel: i18n.baseText('contextMenu.changeColor'),\n\t\t\t\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: 'open',\n\t\t\t\t\t\t\t\tlabel: i18n.baseText('contextMenu.open'),\n\t\t\t\t\t\t\t\tshortcut: { keys: ['↵'] },\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: 'execute',\n\t\t\t\t\t\t\t\tlabel: i18n.baseText('contextMenu.test'),\n\t\t\t\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tid: 'rename',\n\t\t\t\t\t\t\t\tlabel: i18n.baseText('contextMenu.rename'),\n\t\t\t\t\t\t\t\tshortcut: { keys: ['F2'] },\n\t\t\t\t\t\t\t\tdisabled: isReadOnly.value,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t// Add actions only available for a single node\n\t\t\t\tmenuActions.unshift(...singleNodeActions);\n\t\t\t}\n\n\t\t\tactions.value = menuActions;\n\t\t}\n\t};\n\n\tconst _dispatchAction = (action: ContextMenuAction) => {\n\t\tactionCallback.value(action, targetNodes.value);\n\t};\n\n\twatch(\n\t\t() => uiStore.nodeViewOffsetPosition,\n\t\t() => {\n\t\t\tclose();\n\t\t},\n\t);\n\n\treturn {\n\t\tisOpen,\n\t\tposition,\n\t\ttarget,\n\t\tactions,\n\t\ttargetNodes,\n\t\topen,\n\t\tclose,\n\t\t_dispatchAction,\n\t};\n};\n","import type { INodeUi, XYPosition } from '@/Interface';\n\nimport { useDeviceSupport } from 'n8n-design-system';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { getMousePosition, getRelativePosition } from '@/utils/nodeViewUtils';\nimport { ref, onMounted, computed } from 'vue';\nimport { useCanvasStore } from '@/stores/canvas.store';\nimport { useContextMenu } from './useContextMenu';\n\ninterface ExtendedHTMLSpanElement extends HTMLSpanElement {\n\tx: number;\n\ty: number;\n}\n\nexport default function useCanvasMouseSelect() {\n\tconst selectActive = ref(false);\n\tconst selectBox = ref(document.createElement('span') as ExtendedHTMLSpanElement);\n\n\tconst { isTouchDevice, isCtrlKeyPressed } = useDeviceSupport();\n\tconst uiStore = useUIStore();\n\tconst canvasStore = useCanvasStore();\n\tconst workflowsStore = useWorkflowsStore();\n\tconst { isOpen: isContextMenuOpen } = useContextMenu();\n\n\tfunction _setSelectBoxStyle(styles: Record<string, string>) {\n\t\tObject.assign(selectBox.value.style, styles);\n\t}\n\n\tfunction _showSelectBox(event: MouseEvent) {\n\t\tconst [x, y] = getMousePositionWithinNodeView(event);\n\t\tselectBox.value = Object.assign(selectBox.value, { x, y });\n\n\t\t_setSelectBoxStyle({\n\t\t\tleft: selectBox.value.x + 'px',\n\t\t\ttop: selectBox.value.y + 'px',\n\t\t\tvisibility: 'visible',\n\t\t});\n\t\tselectActive.value = true;\n\t}\n\n\tfunction _updateSelectBox(event: MouseEvent) {\n\t\tconst selectionBox = _getSelectionBox(event);\n\n\t\t_setSelectBoxStyle({\n\t\t\tleft: selectionBox.x + 'px',\n\t\t\ttop: selectionBox.y + 'px',\n\t\t\twidth: selectionBox.width + 'px',\n\t\t\theight: selectionBox.height + 'px',\n\t\t});\n\t}\n\n\tfunction _hideSelectBox() {\n\t\tselectBox.value.x = 0;\n\t\tselectBox.value.y = 0;\n\n\t\t_setSelectBoxStyle({\n\t\t\tvisibility: 'hidden',\n\t\t\tleft: '0px',\n\t\t\ttop: '0px',\n\t\t\twidth: '0px',\n\t\t\theight: '0px',\n\t\t});\n\t\tselectActive.value = false;\n\t}\n\n\tfunction _getSelectionBox(event: MouseEvent | TouchEvent) {\n\t\tconst [x, y] = getMousePositionWithinNodeView(event);\n\t\treturn {\n\t\t\tx: Math.min(x, selectBox.value.x),\n\t\t\ty: Math.min(y, selectBox.value.y),\n\t\t\twidth: Math.abs(x - selectBox.value.x),\n\t\t\theight: Math.abs(y - selectBox.value.y),\n\t\t};\n\t}\n\n\tfunction _getNodesInSelection(event: MouseEvent | TouchEvent): INodeUi[] {\n\t\tconst returnNodes: INodeUi[] = [];\n\t\tconst selectionBox = _getSelectionBox(event);\n\n\t\t// Go through all nodes and check if they are selected\n\t\tworkflowsStore.allNodes.forEach((node: INodeUi) => {\n\t\t\t// TODO: Currently always uses the top left corner for checking. Should probably use the center instead\n\t\t\tif (\n\t\t\t\tnode.position[0] < selectionBox.x ||\n\t\t\t\tnode.position[0] > selectionBox.x + selectionBox.width\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (\n\t\t\t\tnode.position[1] < selectionBox.y ||\n\t\t\t\tnode.position[1] > selectionBox.y + selectionBox.height\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturnNodes.push(node);\n\t\t});\n\n\t\treturn returnNodes;\n\t}\n\n\tfunction _createSelectBox() {\n\t\tselectBox.value.id = 'select-box';\n\t\t_setSelectBoxStyle({\n\t\t\tmargin: '0px auto',\n\t\t\tborder: '2px dotted #FF0000',\n\t\t\t// Positioned absolutely within #node-view. This is consistent with how nodes are positioned.\n\t\t\tposition: 'absolute',\n\t\t\tzIndex: '100',\n\t\t\tvisibility: 'hidden',\n\t\t});\n\n\t\tselectBox.value.addEventListener('mouseup', mouseUpMouseSelect);\n\n\t\tconst nodeViewEl = document.querySelector('#node-view') as HTMLDivElement;\n\t\tnodeViewEl.appendChild(selectBox.value);\n\t}\n\n\tfunction _mouseMoveSelect(e: MouseEvent) {\n\t\tif (e.buttons === 0) {\n\t\t\t// Mouse button is not pressed anymore so stop selection mode\n\t\t\t// Happens normally when mouse leave the view pressed and then\n\t\t\t// comes back unpressed.\n\t\t\tmouseUpMouseSelect(e);\n\t\t\treturn;\n\t\t}\n\n\t\t_updateSelectBox(e);\n\t}\n\n\tfunction mouseUpMouseSelect(e: MouseEvent | TouchEvent) {\n\t\t// Ignore right-click\n\t\tif (('button' in e && e.button === 2) || isContextMenuOpen.value) return;\n\n\t\tif (!selectActive.value) {\n\t\t\tif (isTouchDevice && e.target instanceof HTMLElement) {\n\t\t\t\tif (e.target && e.target.id.includes('node-view')) {\n\t\t\t\t\t// Deselect all nodes\n\t\t\t\t\tdeselectAllNodes();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If it is not active return directly.\n\t\t\t// Else normal node dragging will not work.\n\t\t\treturn;\n\t\t}\n\t\tdocument.removeEventListener('mousemove', _mouseMoveSelect);\n\n\t\t// Deselect all nodes\n\t\tdeselectAllNodes();\n\n\t\t// Select the nodes which are in the selection box\n\t\tconst selectedNodes = _getNodesInSelection(e);\n\t\tselectedNodes.forEach((node) => {\n\t\t\tnodeSelected(node);\n\t\t});\n\n\t\tif (selectedNodes.length === 1) {\n\t\t\tuiStore.lastSelectedNode = selectedNodes[0].name;\n\t\t}\n\n\t\t_hideSelectBox();\n\t}\n\tfunction mouseDownMouseSelect(e: MouseEvent, moveButtonPressed: boolean) {\n\t\tif (isCtrlKeyPressed(e) || moveButtonPressed || e.button === 2) {\n\t\t\t// We only care about it when the ctrl key is not pressed at the same time.\n\t\t\t// So we exit when it is pressed.\n\t\t\treturn;\n\t\t}\n\n\t\tif (uiStore.isActionActive('dragActive')) {\n\t\t\t// If a node does currently get dragged we do not activate the selection\n\t\t\treturn;\n\t\t}\n\t\t_showSelectBox(e);\n\n\t\t// Leave like this.\n\t\t// Do not add an anonymous function because then remove would not work anymore\n\t\tdocument.addEventListener('mousemove', _mouseMoveSelect);\n\t}\n\n\tfunction getMousePositionWithinNodeView(event: MouseEvent | TouchEvent): XYPosition {\n\t\tconst mousePosition = getMousePosition(event);\n\n\t\tconst [relativeX, relativeY] = canvasStore.canvasPositionFromPagePosition(mousePosition);\n\t\tconst nodeViewScale = canvasStore.nodeViewScale;\n\t\tconst nodeViewOffsetPosition = uiStore.nodeViewOffsetPosition;\n\n\t\treturn getRelativePosition(relativeX, relativeY, nodeViewScale, nodeViewOffsetPosition);\n\t}\n\n\tfunction nodeDeselected(node: INodeUi) {\n\t\tuiStore.removeNodeFromSelection(node);\n\t\tinstance.value.removeFromDragSelection(instance.value.getManagedElement(node?.id));\n\t}\n\n\tfunction nodeSelected(node: INodeUi) {\n\t\tuiStore.addSelectedNode(node);\n\t\tinstance.value.addToDragSelection(instance.value.getManagedElement(node?.id));\n\t}\n\n\tfunction deselectAllNodes() {\n\t\tinstance.value.clearDragSelection();\n\t\tuiStore.resetSelectedNodes();\n\t\tuiStore.lastSelectedNode = null;\n\t\tuiStore.lastSelectedNodeOutputIndex = null;\n\n\t\tcanvasStore.newNodeInsertPosition = null;\n\t\tcanvasStore.setLastSelectedConnection(undefined);\n\t}\n\n\tconst instance = computed(() => canvasStore.jsPlumbInstance);\n\n\tonMounted(() => {\n\t\t_createSelectBox();\n\t});\n\n\treturn {\n\t\tselectActive,\n\t\tgetMousePositionWithinNodeView,\n\t\tmouseUpMouseSelect,\n\t\tmouseDownMouseSelect,\n\t\tnodeDeselected,\n\t\tnodeSelected,\n\t\tdeselectAllNodes,\n\t};\n}\n","import { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\n\nexport function useUniqueNodeName() {\n\t/**\n\t * All in-store node name defaults ending with a number, e.g.\n\t * `AWS S3`, `Magento 2`, `MSG91`, `S3`, `SIGNL4`, `sms77`\n\t */\n\tfunction numberSuffixedNames() {\n\t\treturn useNodeTypesStore().allNodeTypes.reduce<string[]>((acc, nodeType) => {\n\t\t\tif (typeof nodeType.defaults.name !== 'string') {\n\t\t\t\tthrow new Error('Expected node name default to be a string');\n\t\t\t}\n\n\t\t\tif (/\\d$/.test(nodeType.defaults.name)) acc.push(nodeType.defaults.name);\n\n\t\t\treturn acc;\n\t\t}, []);\n\t}\n\n\t/**\n\t * Create a unique node name from an original name, based on the names of\n\t * all nodes on canvas and any extra names that cannot be used.\n\t */\n\tfunction uniqueNodeName(originalName: string, extraNames: string[] = []) {\n\t\tconst { canvasNames } = useWorkflowsStore();\n\n\t\tconst isUnique = !canvasNames.has(originalName) && !extraNames.includes(originalName);\n\n\t\tif (isUnique) return originalName;\n\n\t\tconst nsn = numberSuffixedNames().find((nsn) => originalName.startsWith(nsn));\n\n\t\t// edge case, number suffix as part of name: S3 -> S31 -> S32\n\n\t\tif (nsn) {\n\t\t\tlet unique = '';\n\t\t\tlet index = 1;\n\n\t\t\tconst remainder = originalName.split(nsn).pop();\n\n\t\t\tconst lastChar = remainder?.[remainder.length - 1];\n\n\t\t\tif (lastChar && Number.isInteger(Number(lastChar))) {\n\t\t\t\tindex = parseInt(lastChar, 10);\n\t\t\t\toriginalName = originalName.slice(0, -1);\n\t\t\t}\n\n\t\t\tunique = originalName;\n\n\t\t\twhile (canvasNames.has(unique) || extraNames.includes(unique)) {\n\t\t\t\tunique = originalName + index++;\n\t\t\t}\n\n\t\t\treturn unique;\n\t\t}\n\n\t\t// edge case, all-number name: 123 -> 123-1 -> 123-2\n\n\t\tif (/^\\d+-?\\d*$/.test(originalName)) {\n\t\t\tlet unique = '';\n\t\t\tlet index = 1;\n\n\t\t\tconst match = originalName.match(/(?<base>\\d+)-?(?<suffix>\\d*)/);\n\n\t\t\tif (!match?.groups) {\n\t\t\t\tthrow new Error('Failed to find match for unique name');\n\t\t\t}\n\n\t\t\tif (match?.groups?.suffix !== '') {\n\t\t\t\tindex = parseInt(match.groups.suffix, 10);\n\t\t\t}\n\n\t\t\tunique = match.groups.base;\n\n\t\t\twhile (canvasNames.has(unique) || extraNames.includes(unique)) {\n\t\t\t\tunique = match.groups.base + '-' + index++;\n\t\t\t}\n\n\t\t\treturn unique;\n\t\t}\n\n\t\t// normal case: A -> A1 -> A2\n\n\t\tlet unique = '';\n\t\tlet index = 1;\n\n\t\tconst match = originalName.match(/(?<base>.*\\D+)(?<suffix>\\d*)/);\n\n\t\tif (!match?.groups) {\n\t\t\tthrow new Error('Failed to find match for unique name');\n\t\t}\n\n\t\tif (match?.groups?.suffix !== '') {\n\t\t\tindex = parseInt(match.groups.suffix, 10);\n\t\t}\n\n\t\tunique = match.groups.base;\n\n\t\twhile (canvasNames.has(unique) || extraNames.includes(unique)) {\n\t\t\tunique = match.groups.base + index++;\n\t\t}\n\n\t\treturn unique;\n\t}\n\n\treturn { uniqueNodeName };\n}\n","<script lang=\"ts\" setup>\nimport { type ContextMenuAction, useContextMenu } from '@/composables/useContextMenu';\nimport { N8nActionDropdown } from 'n8n-design-system';\nimport type { INode } from 'n8n-workflow';\nimport { watch, ref } from 'vue';\n\nconst contextMenu = useContextMenu();\nconst { position, isOpen, actions, target } = contextMenu;\nconst dropdown = ref<InstanceType<typeof N8nActionDropdown>>();\nconst emit = defineEmits<{ (event: 'action', action: ContextMenuAction, nodes: INode[]): void }>();\n\nwatch(\n\tisOpen,\n\t() => {\n\t\tif (isOpen) {\n\t\t\tdropdown.value?.open();\n\t\t} else {\n\t\t\tdropdown.value?.close();\n\t\t}\n\t},\n\t{ flush: 'post' },\n);\n\nfunction onActionSelect(item: string) {\n\tconst action = item as ContextMenuAction;\n\tcontextMenu._dispatchAction(action);\n\temit('action', action, contextMenu.targetNodes.value);\n}\n\nfunction onVisibleChange(open: boolean) {\n\tif (!open) {\n\t\tcontextMenu.close();\n\t}\n}\n</script>\n\n<template>\n\t<Teleport v-if=\"isOpen\" to=\"body\">\n\t\t<div\n\t\t\t:class=\"$style.contextMenu\"\n\t\t\t:style=\"{\n\t\t\t\tleft: `${position[0]}px`,\n\t\t\t\ttop: `${position[1]}px`,\n\t\t\t}\"\n\t\t>\n\t\t\t<N8nActionDropdown\n\t\t\t\tref=\"dropdown\"\n\t\t\t\t:items=\"actions\"\n\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\tdata-test-id=\"context-menu\"\n\t\t\t\t:hide-arrow=\"target.source !== 'node-button'\"\n\t\t\t\t@select=\"onActionSelect\"\n\t\t\t\t@visible-change=\"onVisibleChange\"\n\t\t\t>\n\t\t\t\t<template #activator>\n\t\t\t\t\t<div :class=\"$style.activator\"></div>\n\t\t\t\t</template>\n\t\t\t</N8nActionDropdown>\n\t\t</div>\n\t</Teleport>\n</template>\n\n<style module lang=\"scss\">\n.contextMenu {\n\tposition: fixed;\n}\n\n.activator {\n\tpointer-events: none;\n\topacity: 0;\n}\n</style>\n","import { computed, getCurrentInstance, ref } from 'vue';\n\nimport type { INodeUi } from '@/Interface';\nimport {\n\tNO_OP_NODE_TYPE,\n\tNODE_CONNECTION_TYPE_ALLOW_MULTIPLE,\n\tNODE_INSERT_SPACER_BETWEEN_INPUT_GROUPS,\n\tNODE_MIN_INPUT_ITEMS_COUNT,\n} from '@/constants';\n\nimport { NodeHelpers, NodeConnectionType } from 'n8n-workflow';\nimport type {\n\tConnectionTypes,\n\tINodeInputConfiguration,\n\tINodeTypeDescription,\n\tINodeOutputConfiguration,\n\tWorkflow,\n} from 'n8n-workflow';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport type { BrowserJsPlumbInstance } from '@jsplumb/browser-ui';\nimport type { Endpoint, EndpointOptions } from '@jsplumb/core';\nimport * as NodeViewUtils from '@/utils/nodeViewUtils';\nimport type { EndpointSpec } from '@jsplumb/common';\nimport { useDeviceSupport } from 'n8n-design-system';\nimport type { N8nEndpointLabelLength } from '@/plugins/jsplumb/N8nPlusEndpointType';\nimport { isValidNodeConnectionType } from '@/utils/typeGuards';\nimport { useI18n } from '@/composables/useI18n';\n\nexport function useNodeBase({\n\tname,\n\tinstance,\n\tworkflowObject,\n\tisReadOnly,\n\temit,\n}: {\n\tname: string;\n\tinstance: BrowserJsPlumbInstance;\n\tworkflowObject: Workflow;\n\tisReadOnly: boolean;\n\temit: (event: string, ...args: unknown[]) => void;\n}) {\n\tconst uiStore = useUIStore();\n\tconst deviceSupport = useDeviceSupport();\n\tconst workflowsStore = useWorkflowsStore();\n\tconst nodeTypesStore = useNodeTypesStore();\n\n\tconst i18n = useI18n();\n\n\t// @TODO Remove this when Node.vue and Sticky.vue are migrated to composition API and pass refs instead\n\tconst refs = computed(() => getCurrentInstance()?.refs ?? {});\n\n\tconst data = computed<INodeUi | null>(() => {\n\t\treturn workflowsStore.getNodeByName(name);\n\t});\n\n\tconst nodeId = computed<string>(() => data.value?.id ?? '');\n\n\tconst inputs = ref<Array<ConnectionTypes | INodeInputConfiguration>>([]);\n\tconst outputs = ref<Array<ConnectionTypes | INodeOutputConfiguration>>([]);\n\n\tconst createAddInputEndpointSpec = (\n\t\tconnectionName: NodeConnectionType,\n\t\tcolor: string,\n\t): EndpointSpec => {\n\t\tconst multiple = NODE_CONNECTION_TYPE_ALLOW_MULTIPLE.includes(connectionName);\n\n\t\treturn {\n\t\t\ttype: 'N8nAddInput',\n\t\t\toptions: {\n\t\t\t\twidth: 24,\n\t\t\t\theight: 72,\n\t\t\t\tcolor,\n\t\t\t\tmultiple,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst createDiamondOutputEndpointSpec = (): EndpointSpec => ({\n\t\ttype: 'Rectangle',\n\t\toptions: {\n\t\t\theight: 10,\n\t\t\twidth: 10,\n\t\t\tcssClass: 'diamond-output-endpoint',\n\t\t},\n\t});\n\n\tconst getEndpointLabelLength = (length: number): N8nEndpointLabelLength => {\n\t\tif (length <= 2) return 'small';\n\t\telse if (length <= 6) return 'medium';\n\t\treturn 'large';\n\t};\n\n\tfunction addEndpointTestingData(endpoint: Endpoint, type: string, inputIndex: number) {\n\t\tif (window?.Cypress && 'canvas' in endpoint.endpoint && instance) {\n\t\t\tconst canvas = endpoint.endpoint.canvas;\n\t\t\tinstance.setAttribute(canvas, 'data-endpoint-name', data.value?.name ?? '');\n\t\t\tinstance.setAttribute(canvas, 'data-input-index', inputIndex.toString());\n\t\t\tinstance.setAttribute(canvas, 'data-endpoint-type', type);\n\t\t}\n\t}\n\n\tfunction addInputEndpoints(node: INodeUi, nodeTypeData: INodeTypeDescription) {\n\t\t// Add Inputs\n\t\tconst rootTypeIndexData: {\n\t\t\t[key: string]: number;\n\t\t} = {};\n\t\tconst typeIndexData: {\n\t\t\t[key: string]: number;\n\t\t} = {};\n\n\t\tinputs.value = NodeHelpers.getNodeInputs(workflowObject, data.value!, nodeTypeData) || [];\n\n\t\tconst sortedInputs = [...inputs.value];\n\t\tsortedInputs.sort((a, b) => {\n\t\t\tif (typeof a === 'string') {\n\t\t\t\treturn 1;\n\t\t\t} else if (typeof b === 'string') {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tif (a.required && !b.required) {\n\t\t\t\treturn -1;\n\t\t\t} else if (!a.required && b.required) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t});\n\n\t\tsortedInputs.forEach((value, i) => {\n\t\t\tlet inputConfiguration: INodeInputConfiguration;\n\t\t\tif (typeof value === 'string') {\n\t\t\t\tinputConfiguration = {\n\t\t\t\t\ttype: value,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tinputConfiguration = value;\n\t\t\t}\n\n\t\t\tconst inputName: ConnectionTypes = inputConfiguration.type;\n\n\t\t\tconst rootCategoryInputName =\n\t\t\t\tinputName === NodeConnectionType.Main ? NodeConnectionType.Main : 'other';\n\n\t\t\t// Increment the index for inputs with current name\n\t\t\tif (rootTypeIndexData.hasOwnProperty(rootCategoryInputName)) {\n\t\t\t\trootTypeIndexData[rootCategoryInputName]++;\n\t\t\t} else {\n\t\t\t\trootTypeIndexData[rootCategoryInputName] = 0;\n\t\t\t}\n\n\t\t\tif (typeIndexData.hasOwnProperty(inputName)) {\n\t\t\t\ttypeIndexData[inputName]++;\n\t\t\t} else {\n\t\t\t\ttypeIndexData[inputName] = 0;\n\t\t\t}\n\n\t\t\tconst rootTypeIndex = rootTypeIndexData[rootCategoryInputName];\n\t\t\tconst typeIndex = typeIndexData[inputName];\n\n\t\t\tconst inputsOfSameRootType = inputs.value.filter((inputData) => {\n\t\t\t\tconst thisInputName: string = typeof inputData === 'string' ? inputData : inputData.type;\n\t\t\t\treturn inputName === NodeConnectionType.Main\n\t\t\t\t\t? thisInputName === NodeConnectionType.Main\n\t\t\t\t\t: thisInputName !== NodeConnectionType.Main;\n\t\t\t});\n\n\t\t\tconst nonMainInputs = inputsOfSameRootType.filter((inputData) => {\n\t\t\t\treturn inputData !== NodeConnectionType.Main;\n\t\t\t});\n\t\t\tconst requiredNonMainInputs = nonMainInputs.filter((inputData) => {\n\t\t\t\treturn typeof inputData !== 'string' && inputData.required;\n\t\t\t});\n\t\t\tconst optionalNonMainInputs = nonMainInputs.filter((inputData) => {\n\t\t\t\treturn typeof inputData !== 'string' && !inputData.required;\n\t\t\t});\n\t\t\tconst spacerIndexes = getSpacerIndexes(\n\t\t\t\trequiredNonMainInputs.length,\n\t\t\t\toptionalNonMainInputs.length,\n\t\t\t);\n\n\t\t\t// Get the position of the anchor depending on how many it has\n\t\t\tconst anchorPosition = NodeViewUtils.getAnchorPosition(\n\t\t\t\tinputName,\n\t\t\t\t'input',\n\t\t\t\tinputsOfSameRootType.length,\n\t\t\t\tspacerIndexes,\n\t\t\t)[rootTypeIndex];\n\n\t\t\tif (!isValidNodeConnectionType(inputName)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst scope = NodeViewUtils.getEndpointScope(inputName);\n\n\t\t\tconst newEndpointData: EndpointOptions = {\n\t\t\t\tuuid: NodeViewUtils.getInputEndpointUUID(nodeId.value, inputName, typeIndex),\n\t\t\t\tanchor: anchorPosition,\n\t\t\t\t// We potentially want to change that in the future to allow people to dynamically\n\t\t\t\t// activate and deactivate connected nodes\n\t\t\t\tmaxConnections: inputConfiguration.maxConnections ?? -1,\n\t\t\t\tendpoint: 'Rectangle',\n\t\t\t\tpaintStyle: NodeViewUtils.getInputEndpointStyle(\n\t\t\t\t\tnodeTypeData,\n\t\t\t\t\t'--color-foreground-xdark',\n\t\t\t\t\tinputName,\n\t\t\t\t),\n\t\t\t\thoverPaintStyle: NodeViewUtils.getInputEndpointStyle(\n\t\t\t\t\tnodeTypeData,\n\t\t\t\t\t'--color-primary',\n\t\t\t\t\tinputName,\n\t\t\t\t),\n\t\t\t\tscope: NodeViewUtils.getScope(scope),\n\t\t\t\tsource: inputName !== NodeConnectionType.Main,\n\t\t\t\ttarget: !isReadOnly && inputs.value.length > 1, // only enabled for nodes with multiple inputs.. otherwise attachment handled by connectionDrag event in NodeView,\n\t\t\t\tparameters: {\n\t\t\t\t\tconnection: 'target',\n\t\t\t\t\tnodeId: nodeId.value,\n\t\t\t\t\ttype: inputName,\n\t\t\t\t\tindex: typeIndex,\n\t\t\t\t},\n\t\t\t\tenabled: !isReadOnly, // enabled in default case to allow dragging\n\t\t\t\tcssClass: 'rect-input-endpoint',\n\t\t\t\tdragAllowedWhenFull: true,\n\t\t\t\thoverClass: 'rect-input-endpoint-hover',\n\t\t\t\t...getInputConnectionStyle(inputName, nodeTypeData),\n\t\t\t};\n\n\t\t\tconst endpoint = instance?.addEndpoint(\n\t\t\t\trefs.value[data.value?.name ?? ''] as Element,\n\t\t\t\tnewEndpointData,\n\t\t\t);\n\t\t\taddEndpointTestingData(endpoint, 'input', typeIndex);\n\t\t\tif (inputConfiguration.displayName ?? nodeTypeData.inputNames?.[i]) {\n\t\t\t\t// Apply input names if they got set\n\t\t\t\tendpoint.addOverlay(\n\t\t\t\t\tNodeViewUtils.getInputNameOverlay(\n\t\t\t\t\t\tinputConfiguration.displayName ?? nodeTypeData.inputNames?.[i] ?? '',\n\t\t\t\t\t\tinputName,\n\t\t\t\t\t\tinputConfiguration.required,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!Array.isArray(endpoint)) {\n\t\t\t\tendpoint.__meta = {\n\t\t\t\t\tnodeName: node.name,\n\t\t\t\t\tnodeId: nodeId.value,\n\t\t\t\t\tindex: typeIndex,\n\t\t\t\t\ttotalEndpoints: inputsOfSameRootType.length,\n\t\t\t\t\tnodeType: node.type,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// TODO: Activate again if it makes sense. Currently makes problems when removing\n\t\t\t// connection on which the input has a name. It does not get hidden because\n\t\t\t// the endpoint to which it connects when letting it go over the node is\n\t\t\t// different to the regular one (have different ids). So that seems to make\n\t\t\t// problems when hiding the input-name.\n\n\t\t\t// if (index === 0 && inputName === NodeConnectionType.Main) {\n\t\t\t// \t// Make the first main-input the default one to connect to when connection gets dropped on node\n\t\t\t// \tinstance.makeTarget(nodeId.value, newEndpointData);\n\t\t\t// }\n\t\t});\n\t\tif (sortedInputs.length === 0) {\n\t\t\tinstance?.manage(refs.value[data.value?.name ?? ''] as Element);\n\t\t}\n\t}\n\n\tfunction getSpacerIndexes(\n\t\tleftGroupItemsCount: number,\n\t\trightGroupItemsCount: number,\n\t\tinsertSpacerBetweenGroups = NODE_INSERT_SPACER_BETWEEN_INPUT_GROUPS,\n\t\tminItemsCount = NODE_MIN_INPUT_ITEMS_COUNT,\n\t): number[] {\n\t\tconst spacerIndexes = [];\n\n\t\tif (leftGroupItemsCount > 0 && rightGroupItemsCount > 0) {\n\t\t\tif (insertSpacerBetweenGroups) {\n\t\t\t\tspacerIndexes.push(leftGroupItemsCount);\n\t\t\t} else if (leftGroupItemsCount + rightGroupItemsCount < minItemsCount) {\n\t\t\t\tfor (\n\t\t\t\t\tlet spacerIndex = leftGroupItemsCount;\n\t\t\t\t\tspacerIndex < minItemsCount - rightGroupItemsCount;\n\t\t\t\t\tspacerIndex++\n\t\t\t\t) {\n\t\t\t\t\tspacerIndexes.push(spacerIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (\n\t\t\t\tleftGroupItemsCount > 0 &&\n\t\t\t\tleftGroupItemsCount < minItemsCount &&\n\t\t\t\trightGroupItemsCount === 0\n\t\t\t) {\n\t\t\t\tfor (\n\t\t\t\t\tlet spacerIndex = 0;\n\t\t\t\t\tspacerIndex < minItemsCount - leftGroupItemsCount;\n\t\t\t\t\tspacerIndex++\n\t\t\t\t) {\n\t\t\t\t\tspacerIndexes.push(spacerIndex + leftGroupItemsCount);\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tleftGroupItemsCount === 0 &&\n\t\t\t\trightGroupItemsCount > 0 &&\n\t\t\t\trightGroupItemsCount < minItemsCount\n\t\t\t) {\n\t\t\t\tfor (\n\t\t\t\t\tlet spacerIndex = 0;\n\t\t\t\t\tspacerIndex < minItemsCount - rightGroupItemsCount;\n\t\t\t\t\tspacerIndex++\n\t\t\t\t) {\n\t\t\t\t\tspacerIndexes.push(spacerIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn spacerIndexes;\n\t}\n\n\tfunction addOutputEndpoints(node: INodeUi, nodeTypeData: INodeTypeDescription) {\n\t\tconst rootTypeIndexData: {\n\t\t\t[key: string]: number;\n\t\t} = {};\n\t\tconst typeIndexData: {\n\t\t\t[key: string]: number;\n\t\t} = {};\n\n\t\tif (!data.value) {\n\t\t\treturn;\n\t\t}\n\n\t\toutputs.value = NodeHelpers.getNodeOutputs(workflowObject, data.value, nodeTypeData) || [];\n\n\t\t// TODO: There are still a lot of references of \"main\" in NodesView and\n\t\t// other locations. So assume there will be more problems\n\t\tlet maxLabelLength = 0;\n\t\tconst outputConfigurations: INodeOutputConfiguration[] = [];\n\t\toutputs.value.forEach((value, i) => {\n\t\t\tlet outputConfiguration: INodeOutputConfiguration;\n\t\t\tif (typeof value === 'string') {\n\t\t\t\toutputConfiguration = {\n\t\t\t\t\ttype: value,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\toutputConfiguration = value;\n\t\t\t}\n\t\t\tif (nodeTypeData.outputNames?.[i]) {\n\t\t\t\toutputConfiguration.displayName = nodeTypeData.outputNames[i];\n\t\t\t}\n\n\t\t\tif (outputConfiguration.displayName) {\n\t\t\t\tmaxLabelLength =\n\t\t\t\t\toutputConfiguration.displayName.length > maxLabelLength\n\t\t\t\t\t\t? outputConfiguration.displayName.length\n\t\t\t\t\t\t: maxLabelLength;\n\t\t\t}\n\n\t\t\toutputConfigurations.push(outputConfiguration);\n\t\t});\n\n\t\tconst endpointLabelLength = getEndpointLabelLength(maxLabelLength);\n\n\t\toutputs.value.forEach((_value, i) => {\n\t\t\tconst outputConfiguration = outputConfigurations[i];\n\n\t\t\tconst outputName: ConnectionTypes = outputConfiguration.type;\n\n\t\t\tconst rootCategoryOutputName =\n\t\t\t\toutputName === NodeConnectionType.Main ? NodeConnectionType.Main : 'other';\n\n\t\t\t// Increment the index for outputs with current name\n\t\t\tif (rootTypeIndexData.hasOwnProperty(rootCategoryOutputName)) {\n\t\t\t\trootTypeIndexData[rootCategoryOutputName]++;\n\t\t\t} else {\n\t\t\t\trootTypeIndexData[rootCategoryOutputName] = 0;\n\t\t\t}\n\n\t\t\tif (typeIndexData.hasOwnProperty(outputName)) {\n\t\t\t\ttypeIndexData[outputName]++;\n\t\t\t} else {\n\t\t\t\ttypeIndexData[outputName] = 0;\n\t\t\t}\n\n\t\t\tconst rootTypeIndex = rootTypeIndexData[rootCategoryOutputName];\n\t\t\tconst typeIndex = typeIndexData[outputName];\n\n\t\t\tconst outputsOfSameRootType = outputs.value.filter((outputData) => {\n\t\t\t\tconst thisOutputName: string =\n\t\t\t\t\ttypeof outputData === 'string' ? outputData : outputData.type;\n\t\t\t\treturn outputName === NodeConnectionType.Main\n\t\t\t\t\t? thisOutputName === NodeConnectionType.Main\n\t\t\t\t\t: thisOutputName !== NodeConnectionType.Main;\n\t\t\t});\n\n\t\t\t// Get the position of the anchor depending on how many it has\n\t\t\tconst anchorPosition = NodeViewUtils.getAnchorPosition(\n\t\t\t\toutputName,\n\t\t\t\t'output',\n\t\t\t\toutputsOfSameRootType.length,\n\t\t\t)[rootTypeIndex];\n\n\t\t\tif (!isValidNodeConnectionType(outputName)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst scope = NodeViewUtils.getEndpointScope(outputName);\n\n\t\t\tconst newEndpointData: EndpointOptions = {\n\t\t\t\tuuid: NodeViewUtils.getOutputEndpointUUID(nodeId.value, outputName, typeIndex),\n\t\t\t\tanchor: anchorPosition,\n\t\t\t\tmaxConnections: -1,\n\t\t\t\tendpoint: {\n\t\t\t\t\ttype: 'Dot',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tradius: nodeTypeData && outputsOfSameRootType.length > 2 ? 7 : 9,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\thoverPaintStyle: NodeViewUtils.getOutputEndpointStyle(nodeTypeData, '--color-primary'),\n\t\t\t\tscope,\n\t\t\t\tsource: true,\n\t\t\t\ttarget: outputName !== NodeConnectionType.Main,\n\t\t\t\tenabled: !isReadOnly,\n\t\t\t\tparameters: {\n\t\t\t\t\tconnection: 'source',\n\t\t\t\t\tnodeId: nodeId.value,\n\t\t\t\t\ttype: outputName,\n\t\t\t\t\tindex: typeIndex,\n\t\t\t\t},\n\t\t\t\thoverClass: 'dot-output-endpoint-hover',\n\t\t\t\tconnectionsDirected: true,\n\t\t\t\tdragAllowedWhenFull: false,\n\t\t\t\t...getOutputConnectionStyle(outputName, outputConfiguration, nodeTypeData),\n\t\t\t};\n\n\t\t\tconst endpoint = instance?.addEndpoint(\n\t\t\t\trefs.value[data.value?.name ?? ''] as Element,\n\t\t\t\tnewEndpointData,\n\t\t\t);\n\n\t\t\tif (!endpoint) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taddEndpointTestingData(endpoint, 'output', typeIndex);\n\t\t\tif (outputConfiguration.displayName && isValidNodeConnectionType(outputName)) {\n\t\t\t\t// Apply output names if they got set\n\t\t\t\tconst overlaySpec = NodeViewUtils.getOutputNameOverlay(\n\t\t\t\t\toutputConfiguration.displayName,\n\t\t\t\t\toutputName,\n\t\t\t\t\toutputConfiguration?.category,\n\t\t\t\t);\n\t\t\t\tendpoint.addOverlay(overlaySpec);\n\t\t\t}\n\n\t\t\tif (!Array.isArray(endpoint)) {\n\t\t\t\tendpoint.__meta = {\n\t\t\t\t\tnodeName: node.name,\n\t\t\t\t\tnodeId: nodeId.value,\n\t\t\t\t\tindex: typeIndex,\n\t\t\t\t\ttotalEndpoints: outputsOfSameRootType.length,\n\t\t\t\t\tendpointLabelLength,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (!isReadOnly && outputName === NodeConnectionType.Main) {\n\t\t\t\tconst plusEndpointData: EndpointOptions = {\n\t\t\t\t\tuuid: NodeViewUtils.getOutputEndpointUUID(nodeId.value, outputName, typeIndex),\n\t\t\t\t\tanchor: anchorPosition,\n\t\t\t\t\tmaxConnections: -1,\n\t\t\t\t\tendpoint: {\n\t\t\t\t\t\ttype: 'N8nPlus',\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tdimensions: 24,\n\t\t\t\t\t\t\tconnectedEndpoint: endpoint,\n\t\t\t\t\t\t\tshowOutputLabel: outputs.value.length === 1,\n\t\t\t\t\t\t\tsize: outputs.value.length >= 3 ? 'small' : 'medium',\n\t\t\t\t\t\t\tendpointLabelLength,\n\t\t\t\t\t\t\thoverMessage: i18n.baseText('nodeBase.clickToAddNodeOrDragToConnect'),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tsource: true,\n\t\t\t\t\ttarget: false,\n\t\t\t\t\tenabled: !isReadOnly,\n\t\t\t\t\tpaintStyle: {\n\t\t\t\t\t\toutlineStroke: 'none',\n\t\t\t\t\t},\n\t\t\t\t\thoverPaintStyle: {\n\t\t\t\t\t\toutlineStroke: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\tconnection: 'source',\n\t\t\t\t\t\tnodeId: nodeId.value,\n\t\t\t\t\t\ttype: outputName,\n\t\t\t\t\t\tindex: typeIndex,\n\t\t\t\t\t\tcategory: outputConfiguration?.category,\n\t\t\t\t\t},\n\t\t\t\t\tcssClass: 'plus-draggable-endpoint',\n\t\t\t\t\tdragAllowedWhenFull: false,\n\t\t\t\t};\n\n\t\t\t\tif (outputConfiguration?.category) {\n\t\t\t\t\tplusEndpointData.cssClass = `${plusEndpointData.cssClass} ${outputConfiguration?.category}`;\n\t\t\t\t}\n\n\t\t\t\tif (!instance || !data.value) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst plusEndpoint = instance.addEndpoint(\n\t\t\t\t\trefs.value[data.value.name] as Element,\n\t\t\t\t\tplusEndpointData,\n\t\t\t\t);\n\t\t\t\taddEndpointTestingData(plusEndpoint, 'plus', typeIndex);\n\n\t\t\t\tif (!Array.isArray(plusEndpoint)) {\n\t\t\t\t\tplusEndpoint.__meta = {\n\t\t\t\t\t\tnodeName: node.name,\n\t\t\t\t\t\tnodeId: nodeId.value,\n\t\t\t\t\t\tindex: typeIndex,\n\t\t\t\t\t\tnodeType: node.type,\n\t\t\t\t\t\ttotalEndpoints: outputsOfSameRootType.length,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tfunction addNode(node: INodeUi) {\n\t\tconst nodeTypeData = (nodeTypesStore.getNodeType(node.type, node.typeVersion) ??\n\t\t\tnodeTypesStore.getNodeType(NO_OP_NODE_TYPE)) as INodeTypeDescription;\n\n\t\taddInputEndpoints(node, nodeTypeData);\n\t\taddOutputEndpoints(node, nodeTypeData);\n\t}\n\n\tfunction getEndpointColor(connectionType: ConnectionTypes) {\n\t\treturn `--node-type-${connectionType}-color`;\n\t}\n\n\tfunction getInputConnectionStyle(\n\t\tconnectionType: ConnectionTypes,\n\t\tnodeTypeData: INodeTypeDescription,\n\t): EndpointOptions {\n\t\tif (connectionType === NodeConnectionType.Main) {\n\t\t\treturn {\n\t\t\t\tpaintStyle: NodeViewUtils.getInputEndpointStyle(\n\t\t\t\t\tnodeTypeData,\n\t\t\t\t\tgetEndpointColor(NodeConnectionType.Main),\n\t\t\t\t\tconnectionType,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (!isValidNodeConnectionType(connectionType)) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst createSupplementalConnectionType = (\n\t\t\tconnectionName: ConnectionTypes,\n\t\t): EndpointOptions => ({\n\t\t\tendpoint: createAddInputEndpointSpec(\n\t\t\t\tconnectionName as NodeConnectionType,\n\t\t\t\tgetEndpointColor(connectionName),\n\t\t\t),\n\t\t});\n\n\t\treturn createSupplementalConnectionType(connectionType);\n\t}\n\n\tfunction getOutputConnectionStyle(\n\t\tconnectionType: ConnectionTypes,\n\t\toutputConfiguration: INodeOutputConfiguration,\n\t\tnodeTypeData: INodeTypeDescription,\n\t): EndpointOptions {\n\t\tconst createSupplementalConnectionType = (\n\t\t\tconnectionName: ConnectionTypes,\n\t\t): EndpointOptions => ({\n\t\t\tendpoint: createDiamondOutputEndpointSpec(),\n\t\t\tpaintStyle: NodeViewUtils.getOutputEndpointStyle(\n\t\t\t\tnodeTypeData,\n\t\t\t\tgetEndpointColor(connectionName),\n\t\t\t),\n\t\t\thoverPaintStyle: NodeViewUtils.getOutputEndpointStyle(\n\t\t\t\tnodeTypeData,\n\t\t\t\tgetEndpointColor(connectionName),\n\t\t\t),\n\t\t});\n\n\t\tconst type = 'output';\n\n\t\tif (connectionType === NodeConnectionType.Main) {\n\t\t\tif (outputConfiguration.category === 'error') {\n\t\t\t\treturn {\n\t\t\t\t\tpaintStyle: {\n\t\t\t\t\t\t...NodeViewUtils.getOutputEndpointStyle(\n\t\t\t\t\t\t\tnodeTypeData,\n\t\t\t\t\t\t\tgetEndpointColor(NodeConnectionType.Main),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tfill: 'var(--color-danger)',\n\t\t\t\t\t},\n\t\t\t\t\tcssClass: `dot-${type}-endpoint`,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tpaintStyle: NodeViewUtils.getOutputEndpointStyle(\n\t\t\t\t\tnodeTypeData,\n\t\t\t\t\tgetEndpointColor(NodeConnectionType.Main),\n\t\t\t\t),\n\t\t\t\tcssClass: `dot-${type}-endpoint`,\n\t\t\t};\n\t\t}\n\n\t\tif (!isValidNodeConnectionType(connectionType)) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn createSupplementalConnectionType(connectionType);\n\t}\n\n\tfunction touchEnd(_e: MouseEvent) {\n\t\tif (deviceSupport.isTouchDevice && uiStore.isActionActive('dragActive')) {\n\t\t\tuiStore.removeActiveAction('dragActive');\n\t\t}\n\t}\n\n\tfunction mouseLeftClick(e: MouseEvent) {\n\t\t// @ts-expect-error path is not defined in MouseEvent on all browsers\n\t\tconst path = e.path || e.composedPath?.();\n\t\tfor (let index = 0; index < path.length; index++) {\n\t\t\tif (\n\t\t\t\tpath[index].className &&\n\t\t\t\ttypeof path[index].className === 'string' &&\n\t\t\t\tpath[index].className.includes('no-select-on-click')\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (!deviceSupport.isTouchDevice) {\n\t\t\tif (uiStore.isActionActive('dragActive')) {\n\t\t\t\tuiStore.removeActiveAction('dragActive');\n\t\t\t} else {\n\t\t\t\tif (!deviceSupport.isCtrlKeyPressed(e)) {\n\t\t\t\t\temit('deselectAllNodes');\n\t\t\t\t}\n\n\t\t\t\tif (uiStore.isNodeSelected(data.value?.name ?? '')) {\n\t\t\t\t\temit('deselectNode', name);\n\t\t\t\t} else {\n\t\t\t\t\temit('nodeSelected', name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tgetSpacerIndexes,\n\t\taddInputEndpoints,\n\t\taddOutputEndpoints,\n\t\taddEndpointTestingData,\n\t\taddNode,\n\t\tgetEndpointColor,\n\t\tgetInputConnectionStyle,\n\t\tgetOutputConnectionStyle,\n\t\tmouseLeftClick,\n\t\ttouchEnd,\n\t\tinputs,\n\t\toutputs,\n\t};\n}\n","<template>\n\t<div\n\t\tv-if=\"data\"\n\t\t:id=\"nodeId\"\n\t\t:ref=\"data.name\"\n\t\t:class=\"nodeWrapperClass\"\n\t\t:style=\"nodeWrapperStyles\"\n\t\tdata-test-id=\"canvas-node\"\n\t\t:data-name=\"data.name\"\n\t\t:data-node-type=\"nodeType?.name\"\n\t\t@contextmenu=\"(e: MouseEvent) => openContextMenu(e, 'node-right-click')\"\n\t>\n\t\t<div v-show=\"isSelected\" class=\"select-background\"></div>\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'node-default': true,\n\t\t\t\t'touch-active': isTouchActive,\n\t\t\t\t'is-touch-device': deviceSupport.isTouchDevice,\n\t\t\t\t'menu-open': isContextMenuOpen,\n\t\t\t\t'disable-pointer-events': disablePointerEvents,\n\t\t\t}\"\n\t\t>\n\t\t\t<div\n\t\t\t\tv-touch:start=\"touchStart\"\n\t\t\t\tv-touch:end=\"touchEnd\"\n\t\t\t\t:class=\"nodeClass\"\n\t\t\t\t:style=\"nodeStyle\"\n\t\t\t\t@click.left=\"onClick\"\n\t\t\t>\n\t\t\t\t<i v-if=\"isTriggerNode\" class=\"trigger-icon\">\n\t\t\t\t\t<n8n-tooltip placement=\"bottom\">\n\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t<span v-html=\"$locale.baseText('node.thisIsATriggerNode')\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<FontAwesomeIcon icon=\"bolt\" size=\"lg\" />\n\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t</i>\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"!data.disabled\"\n\t\t\t\t\t:class=\"{ 'node-info-icon': true, 'shift-icon': shiftOutputCount }\"\n\t\t\t\t>\n\t\t\t\t\t<div v-if=\"hasIssues && !hideNodeIssues\" class=\"node-issues\" data-test-id=\"node-issues\">\n\t\t\t\t\t\t<n8n-tooltip :show-after=\"500\" placement=\"bottom\">\n\t\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t\t<TitledList :title=\"`${$locale.baseText('node.issues')}:`\" :items=\"nodeIssues\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t<FontAwesomeIcon icon=\"exclamation-triangle\" />\n\t\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div v-else-if=\"waiting || nodeExecutionStatus === 'waiting'\" class=\"waiting\">\n\t\t\t\t\t\t<n8n-tooltip placement=\"bottom\">\n\t\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t\t<div v-text=\"waiting\"></div>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t<FontAwesomeIcon icon=\"clock\" />\n\t\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span v-else-if=\"showPinnedDataInfo\" class=\"node-pin-data-icon\">\n\t\t\t\t\t\t<FontAwesomeIcon icon=\"thumbtack\" />\n\t\t\t\t\t\t<span v-if=\"workflowDataItems > 1\" class=\"items-count\"> {{ workflowDataItems }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-else-if=\"nodeExecutionStatus === 'unknown'\">\n\t\t\t\t\t\t<!-- Do nothing, unknown means the node never executed -->\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-else-if=\"workflowDataItems\" class=\"data-count\">\n\t\t\t\t\t\t<FontAwesomeIcon icon=\"check\" />\n\t\t\t\t\t\t<span v-if=\"workflowDataItems > 1\" class=\"items-count\"> {{ workflowDataItems }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"node-executing-info\" :title=\"$locale.baseText('node.nodeIsExecuting')\">\n\t\t\t\t\t<FontAwesomeIcon icon=\"sync-alt\" spin />\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"node-trigger-tooltip__wrapper\">\n\t\t\t\t\t<n8n-tooltip\n\t\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t\t:show-after=\"500\"\n\t\t\t\t\t\t:visible=\"showTriggerNodeTooltip\"\n\t\t\t\t\t\tpopper-class=\"node-trigger-tooltip__wrapper--item\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t<div v-text=\"getTriggerNodeTooltip\"></div>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span />\n\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t\t<n8n-tooltip\n\t\t\t\t\t\tv-if=\"isTriggerNode\"\n\t\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t\t:visible=\"pinDataDiscoveryTooltipVisible\"\n\t\t\t\t\t\tpopper-class=\"node-trigger-tooltip__wrapper--item\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<template #content>\n\t\t\t\t\t\t\t{{ $locale.baseText('node.discovery.pinData.canvas') }}\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<span />\n\t\t\t\t\t</n8n-tooltip>\n\t\t\t\t</div>\n\n\t\t\t\t<NodeIcon\n\t\t\t\t\tclass=\"node-icon\"\n\t\t\t\t\t:node-type=\"iconNodeType\"\n\t\t\t\t\t:size=\"40\"\n\t\t\t\t\t:shrink=\"false\"\n\t\t\t\t\t:color-default=\"iconColorDefault\"\n\t\t\t\t\t:disabled=\"data.disabled\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tv-if=\"showDisabledLineThrough\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'disabled-line-through': true,\n\t\t\t\t\tsuccess: !['unknown'].includes(nodeExecutionStatus) && workflowDataItems > 0,\n\t\t\t\t}\"\n\t\t\t></div>\n\t\t</div>\n\t\t<div class=\"node-description\">\n\t\t\t<div class=\"node-name\" :title=\"nodeTitle\">\n\t\t\t\t<p data-test-id=\"canvas-node-box-title\">\n\t\t\t\t\t{{ nodeTitle }}\n\t\t\t\t</p>\n\t\t\t\t<p v-if=\"data.disabled\">({{ $locale.baseText('node.disabled') }})</p>\n\t\t\t</div>\n\t\t\t<div v-if=\"nodeSubtitle !== undefined\" class=\"node-subtitle\" :title=\"nodeSubtitle\">\n\t\t\t\t{{ nodeSubtitle }}\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"!isReadOnly\"\n\t\t\tv-show=\"!hideActions\"\n\t\t\tclass=\"node-options no-select-on-click\"\n\t\t\t@contextmenu.stop\n\t\t\t@mousedown.stop\n\t\t>\n\t\t\t<div class=\"node-options-inner\">\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\tv-if=\"!isConfigNode\"\n\t\t\t\t\tdata-test-id=\"execute-node-button\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\ttext\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticon=\"play\"\n\t\t\t\t\t:disabled=\"workflowRunning\"\n\t\t\t\t\t:title=\"$locale.baseText('node.testStep')\"\n\t\t\t\t\t@click=\"executeNode\"\n\t\t\t\t/>\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\tdata-test-id=\"disable-node-button\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\ttext\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticon=\"power-off\"\n\t\t\t\t\t:title=\"nodeDisabledTitle\"\n\t\t\t\t\t@click=\"toggleDisableNode\"\n\t\t\t\t/>\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\tdata-test-id=\"delete-node-button\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ttext\n\t\t\t\t\ticon=\"trash\"\n\t\t\t\t\t:title=\"$locale.baseText('node.delete')\"\n\t\t\t\t\t@click=\"deleteNode\"\n\t\t\t\t/>\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\tdata-test-id=\"overflow-node-button\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ttext\n\t\t\t\t\ticon=\"ellipsis-h\"\n\t\t\t\t\t@click=\"(e: MouseEvent) => openContextMenu(e, 'node-button')\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport type { PropType, CSSProperties } from 'vue';\nimport { mapStores } from 'pinia';\nimport xss from 'xss';\nimport { useStorage } from '@/composables/useStorage';\nimport {\n\tCUSTOM_API_CALL_KEY,\n\tLOCAL_STORAGE_PIN_DATA_DISCOVERY_CANVAS_FLAG,\n\tMANUAL_TRIGGER_NODE_TYPE,\n\tNODE_INSERT_SPACER_BETWEEN_INPUT_GROUPS,\n\tNOT_DUPLICATABLE_NODE_TYPES,\n\tSIMULATE_NODE_TYPE,\n\tSIMULATE_TRIGGER_NODE_TYPE,\n\tWAIT_TIME_UNLIMITED,\n} from '@/constants';\nimport { NodeConnectionType, NodeHelpers } from 'n8n-workflow';\nimport type {\n\tConnectionTypes,\n\tExecutionSummary,\n\tINodeInputConfiguration,\n\tINodeOutputConfiguration,\n\tINodeTypeDescription,\n\tITaskData,\n\tNodeOperationError,\n\tWorkflow,\n} from 'n8n-workflow';\n\nimport NodeIcon from '@/components/NodeIcon.vue';\nimport TitledList from '@/components/TitledList.vue';\n\nimport { get } from 'lodash-es';\nimport { getTriggerNodeServiceName } from '@/utils/nodeTypesUtils';\nimport type { INodeUi, XYPosition } from '@/Interface';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useNDVStore } from '@/stores/ndv.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport { EnableNodeToggleCommand } from '@/models/history';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport { type ContextMenuTarget, useContextMenu } from '@/composables/useContextMenu';\nimport { useNodeHelpers } from '@/composables/useNodeHelpers';\nimport { useExternalHooks } from '@/composables/useExternalHooks';\nimport { usePinnedData } from '@/composables/usePinnedData';\nimport { useDeviceSupport } from 'n8n-design-system';\nimport { useDebounce } from '@/composables/useDebounce';\nimport type { BrowserJsPlumbInstance } from '@jsplumb/browser-ui';\nimport { useCanvasStore } from '@/stores/canvas.store';\nimport { useHistoryStore } from '@/stores/history.store';\nimport { useNodeBase } from '@/composables/useNodeBase';\n\nexport default defineComponent({\n\tname: 'Node',\n\tcomponents: {\n\t\tTitledList,\n\t\tFontAwesomeIcon,\n\t\tNodeIcon,\n\t},\n\tprops: {\n\t\tisProductionExecutionPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tdisablePointerEvents: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\thideNodeIssues: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tinstance: {\n\t\t\ttype: Object as PropType<BrowserJsPlumbInstance>,\n\t\t\trequired: true,\n\t\t},\n\t\tisReadOnly: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\thideActions: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tdisableSelecting: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tshowCustomTooltip: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tworkflow: {\n\t\t\ttype: Object as PropType<Workflow>,\n\t\t\trequired: true,\n\t\t},\n\t},\n\temits: {\n\t\trun: null,\n\t\trunWorkflow: null,\n\t\tremoveNode: null,\n\t\ttoggleDisableNode: null,\n\t},\n\tsetup(props, { emit }) {\n\t\tconst workflowsStore = useWorkflowsStore();\n\t\tconst contextMenu = useContextMenu();\n\t\tconst externalHooks = useExternalHooks();\n\t\tconst nodeHelpers = useNodeHelpers();\n\t\tconst node = workflowsStore.getNodeByName(props.name);\n\t\tconst pinnedData = usePinnedData(node);\n\t\tconst deviceSupport = useDeviceSupport();\n\t\tconst { callDebounced } = useDebounce();\n\n\t\tconst nodeBase = useNodeBase({\n\t\t\tname: props.name,\n\t\t\tinstance: props.instance,\n\t\t\tworkflowObject: props.workflow,\n\t\t\tisReadOnly: props.isReadOnly,\n\t\t\temit: emit as (event: string, ...args: unknown[]) => void,\n\t\t});\n\n\t\treturn {\n\t\t\tcontextMenu,\n\t\t\texternalHooks,\n\t\t\tnodeHelpers,\n\t\t\tpinnedData,\n\t\t\tdeviceSupport,\n\t\t\t...nodeBase,\n\t\t\tcallDebounced,\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisTouchActive: false,\n\t\t\tnodeSubtitle: '',\n\t\t\tshowTriggerNodeTooltip: false,\n\t\t\tpinDataDiscoveryTooltipVisible: false,\n\t\t\tdragging: false,\n\t\t\tunwatchWorkflowDataItems: () => {},\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(\n\t\t\tuseNodeTypesStore,\n\t\t\tuseCanvasStore,\n\t\t\tuseNDVStore,\n\t\t\tuseUIStore,\n\t\t\tuseWorkflowsStore,\n\t\t\tuseHistoryStore,\n\t\t),\n\t\tdata(): INodeUi | null {\n\t\t\treturn this.workflowsStore.getNodeByName(this.name);\n\t\t},\n\t\tnodeId(): string {\n\t\t\treturn this.data?.id || '';\n\t\t},\n\t\tshowPinnedDataInfo(): boolean {\n\t\t\treturn this.pinnedData.hasData.value && !this.isProductionExecutionPreview;\n\t\t},\n\t\tisDuplicatable(): boolean {\n\t\t\tif (!this.nodeType) return true;\n\t\t\tif (NOT_DUPLICATABLE_NODE_TYPES.includes(this.nodeType.name)) return false;\n\t\t\treturn (\n\t\t\t\tthis.nodeType.maxNodes === undefined || this.sameTypeNodes.length < this.nodeType.maxNodes\n\t\t\t);\n\t\t},\n\t\tisScheduledGroup(): boolean {\n\t\t\treturn this.nodeType?.group.includes('schedule') === true;\n\t\t},\n\t\ticonColorDefault(): string | undefined {\n\t\t\tif (this.isConfigNode) {\n\t\t\t\treturn 'var(--color-text-base)';\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t\tnodeRunData(): ITaskData[] {\n\t\t\tif (!this.data) return [];\n\n\t\t\treturn this.workflowsStore.getWorkflowResultDataByNodeName(this.data.name) ?? [];\n\t\t},\n\t\thasIssues(): boolean {\n\t\t\tif (this.nodeExecutionStatus && ['crashed', 'error'].includes(this.nodeExecutionStatus))\n\t\t\t\treturn true;\n\t\t\tif (this.pinnedData.hasData.value) return false;\n\t\t\tif (this.data?.issues !== undefined && Object.keys(this.data.issues).length) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tworkflowDataItems(): number {\n\t\t\tconst workflowResultDataNode = this.nodeRunData;\n\t\t\tif (workflowResultDataNode === null) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\treturn workflowResultDataNode.length;\n\t\t},\n\t\tcanvasOffsetPosition() {\n\t\t\treturn this.uiStore.nodeViewOffsetPosition;\n\t\t},\n\t\tgetTriggerNodeTooltip(): string | undefined {\n\t\t\tif (this.nodeType !== null && this.nodeType.hasOwnProperty('eventTriggerDescription')) {\n\t\t\t\tconst nodeName = this.$locale.shortNodeType(this.nodeType.name);\n\t\t\t\tconst { eventTriggerDescription } = this.nodeType;\n\t\t\t\treturn this.$locale\n\t\t\t\t\t.nodeText()\n\t\t\t\t\t.eventTriggerDescription(nodeName, eventTriggerDescription ?? '');\n\t\t\t} else {\n\t\t\t\treturn this.$locale.baseText('node.waitingForYouToCreateAnEventIn', {\n\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\tnodeType: this.nodeType ? getTriggerNodeServiceName(this.nodeType) : '',\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tisPollingTypeNode(): boolean {\n\t\t\treturn !!this.nodeType?.polling;\n\t\t},\n\t\tisExecuting(): boolean {\n\t\t\tif (!this.data) return false;\n\t\t\treturn this.workflowsStore.isNodeExecuting(this.data.name);\n\t\t},\n\t\tisSingleActiveTriggerNode(): boolean {\n\t\t\tconst nodes = this.workflowsStore.workflowTriggerNodes.filter((node: INodeUi) => {\n\t\t\t\tconst nodeType = this.nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\t\t\t\treturn nodeType && nodeType.eventTriggerDescription !== '' && !node.disabled;\n\t\t\t});\n\n\t\t\treturn nodes.length === 1;\n\t\t},\n\t\tisManualTypeNode(): boolean {\n\t\t\treturn this.data?.type === MANUAL_TRIGGER_NODE_TYPE;\n\t\t},\n\t\tisConfigNode(): boolean {\n\t\t\tif (!this.data) return false;\n\t\t\treturn this.nodeTypesStore.isConfigNode(this.workflow, this.data, this.data.type ?? '');\n\t\t},\n\t\tisConfigurableNode(): boolean {\n\t\t\tif (!this.data) return false;\n\n\t\t\treturn this.nodeTypesStore.isConfigurableNode(\n\t\t\t\tthis.workflow,\n\t\t\t\tthis.data,\n\t\t\t\tthis.data?.type ?? '',\n\t\t\t);\n\t\t},\n\t\tisTriggerNode(): boolean {\n\t\t\treturn this.data ? this.nodeTypesStore.isTriggerNode(this.data.type) : false;\n\t\t},\n\t\tisTriggerNodeTooltipEmpty(): boolean {\n\t\t\treturn this.nodeType !== null ? this.nodeType.eventTriggerDescription === '' : false;\n\t\t},\n\t\tisNodeDisabled(): boolean | undefined {\n\t\t\treturn this.node && this.node.disabled;\n\t\t},\n\t\tnodeType(): INodeTypeDescription | null {\n\t\t\treturn this.data && this.nodeTypesStore.getNodeType(this.data.type, this.data.typeVersion);\n\t\t},\n\t\tnode(): INodeUi | undefined {\n\t\t\t// same as this.data but reactive..\n\t\t\treturn this.workflowsStore.nodesByName[this.name] as INodeUi | undefined;\n\t\t},\n\t\tsameTypeNodes(): INodeUi[] {\n\t\t\treturn this.workflowsStore.allNodes.filter((node: INodeUi) => node.type === this.data?.type);\n\t\t},\n\t\tnodeWrapperClass() {\n\t\t\tconst classes: Record<string, boolean> = {\n\t\t\t\t'node-wrapper': true,\n\t\t\t\t'node-wrapper--trigger': this.isTriggerNode,\n\t\t\t\t'node-wrapper--configurable': this.isConfigurableNode,\n\t\t\t\t'node-wrapper--config': this.isConfigNode,\n\t\t\t};\n\n\t\t\tif (this.outputs.length) {\n\t\t\t\tconst outputTypes = NodeHelpers.getConnectionTypes(this.outputs);\n\t\t\t\tconst otherOutputs = outputTypes.filter(\n\t\t\t\t\t(outputName) => outputName !== NodeConnectionType.Main,\n\t\t\t\t);\n\t\t\t\tif (otherOutputs.length) {\n\t\t\t\t\totherOutputs.forEach((outputName) => {\n\t\t\t\t\t\tclasses[`node-wrapper--connection-type-${outputName}`] = true;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn classes;\n\t\t},\n\t\tnodeWrapperStyles() {\n\t\t\tconst styles: CSSProperties = {\n\t\t\t\tleft: this.position[0] + 'px',\n\t\t\t\ttop: this.position[1] + 'px',\n\t\t\t};\n\n\t\t\tif (this.node && this.nodeType) {\n\t\t\t\tconst inputs =\n\t\t\t\t\tNodeHelpers.getNodeInputs(this.workflow, this.node, this.nodeType) ||\n\t\t\t\t\t([] as Array<ConnectionTypes | INodeInputConfiguration>);\n\t\t\t\tconst inputTypes = NodeHelpers.getConnectionTypes(inputs);\n\n\t\t\t\tconst nonMainInputs = inputTypes.filter((input) => input !== NodeConnectionType.Main);\n\t\t\t\tif (nonMainInputs.length) {\n\t\t\t\t\tconst requiredNonMainInputs = inputs.filter(\n\t\t\t\t\t\t(input) => typeof input !== 'string' && input.required,\n\t\t\t\t\t);\n\n\t\t\t\t\tlet spacerCount = 0;\n\t\t\t\t\tif (NODE_INSERT_SPACER_BETWEEN_INPUT_GROUPS) {\n\t\t\t\t\t\tconst requiredNonMainInputsCount = requiredNonMainInputs.length;\n\t\t\t\t\t\tconst optionalNonMainInputsCount = nonMainInputs.length - requiredNonMainInputsCount;\n\t\t\t\t\t\tspacerCount = requiredNonMainInputsCount > 0 && optionalNonMainInputsCount > 0 ? 1 : 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tstyles['--configurable-node-input-count'] = nonMainInputs.length + spacerCount;\n\t\t\t\t}\n\n\t\t\t\tlet outputs = [] as Array<ConnectionTypes | INodeOutputConfiguration>;\n\t\t\t\tif (this.workflow.nodes[this.node.name]) {\n\t\t\t\t\toutputs = NodeHelpers.getNodeOutputs(this.workflow, this.node, this.nodeType);\n\t\t\t\t}\n\n\t\t\t\tconst outputTypes = NodeHelpers.getConnectionTypes(outputs);\n\n\t\t\t\tconst mainOutputs = outputTypes.filter((output) => output === NodeConnectionType.Main);\n\t\t\t\tstyles['--node-main-output-count'] = mainOutputs.length;\n\t\t\t}\n\n\t\t\treturn styles;\n\t\t},\n\t\tnodeClass(): object {\n\t\t\treturn {\n\t\t\t\t'node-box': true,\n\t\t\t\tdisabled: this.data?.disabled,\n\t\t\t\texecuting: this.isExecuting,\n\t\t\t};\n\t\t},\n\t\tnodeExecutionStatus(): string {\n\t\t\tconst nodeExecutionRunData = this.workflowsStore.getWorkflowRunData?.[this.name];\n\t\t\tif (nodeExecutionRunData) {\n\t\t\t\treturn nodeExecutionRunData.filter(Boolean)[0].executionStatus ?? '';\n\t\t\t}\n\t\t\treturn '';\n\t\t},\n\t\tnodeIssues(): string[] {\n\t\t\tconst issues: string[] = [];\n\t\t\tconst nodeExecutionRunData = this.workflowsStore.getWorkflowRunData?.[this.name];\n\t\t\tif (nodeExecutionRunData) {\n\t\t\t\tnodeExecutionRunData.forEach((executionRunData) => {\n\t\t\t\t\tif (executionRunData?.error) {\n\t\t\t\t\t\tconst { message, description } = executionRunData.error;\n\t\t\t\t\t\tconst issue = `${message}${description ? ` (${description})` : ''}`;\n\t\t\t\t\t\tissues.push(xss(issue));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (this.data?.issues !== undefined) {\n\t\t\t\tissues.push(...NodeHelpers.nodeIssuesToString(this.data.issues, this.data));\n\t\t\t}\n\t\t\treturn issues;\n\t\t},\n\t\tnodeDisabledTitle(): string {\n\t\t\treturn this.data?.disabled\n\t\t\t\t? this.$locale.baseText('node.enable')\n\t\t\t\t: this.$locale.baseText('node.disable');\n\t\t},\n\t\tposition(): XYPosition {\n\t\t\treturn this.node ? this.node.position : [0, 0];\n\t\t},\n\t\tshowDisabledLineThrough(): boolean {\n\t\t\treturn (\n\t\t\t\t!this.isConfigurableNode &&\n\t\t\t\t!!(this.data?.disabled && this.inputs.length === 1 && this.outputs.length === 1)\n\t\t\t);\n\t\t},\n\t\tshortNodeType(): string {\n\t\t\treturn this.$locale.shortNodeType(this.data?.type ?? '');\n\t\t},\n\t\tnodeTitle(): string {\n\t\t\tif (this.data?.name === 'Start') {\n\t\t\t\treturn this.$locale.headerText({\n\t\t\t\t\tkey: 'headers.start.displayName',\n\t\t\t\t\tfallback: 'Start',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn this.data?.name ?? '';\n\t\t},\n\t\twaiting(): string | undefined {\n\t\t\tconst workflowExecution = this.workflowsStore.getWorkflowExecution as ExecutionSummary;\n\n\t\t\tif (workflowExecution?.waitTill) {\n\t\t\t\tconst lastNodeExecuted = get(workflowExecution, 'data.resultData.lastNodeExecuted');\n\t\t\t\tif (this.name === lastNodeExecuted) {\n\t\t\t\t\tconst waitDate = new Date(workflowExecution.waitTill);\n\t\t\t\t\tif (waitDate.toISOString() === WAIT_TIME_UNLIMITED) {\n\t\t\t\t\t\treturn this.$locale.baseText(\n\t\t\t\t\t\t\t'node.theNodeIsWaitingIndefinitelyForAnIncomingWebhookCall',\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn this.$locale.baseText('node.nodeIsWaitingTill', {\n\t\t\t\t\t\tinterpolate: {\n\t\t\t\t\t\t\tdate: waitDate.toLocaleDateString(),\n\t\t\t\t\t\t\ttime: waitDate.toLocaleTimeString(),\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\t\tworkflowRunning(): boolean {\n\t\t\treturn this.uiStore.isActionActive('workflowRunning');\n\t\t},\n\t\tnodeStyle() {\n\t\t\tconst returnStyles: {\n\t\t\t\t[key: string]: string;\n\t\t\t} = {};\n\n\t\t\tlet borderColor = '--color-foreground-xdark';\n\n\t\t\tif (this.isConfigurableNode || this.isConfigNode) {\n\t\t\t\tborderColor = '--color-foreground-dark';\n\t\t\t}\n\n\t\t\tif (this.data?.disabled) {\n\t\t\t\tborderColor = '--color-foreground-base';\n\t\t\t} else if (!this.isExecuting) {\n\t\t\t\tif (this.hasIssues && !this.hideNodeIssues) {\n\t\t\t\t\t// Do not set red border if there is an issue with the configuration node\n\t\t\t\t\tif (\n\t\t\t\t\t\t(this.nodeRunData?.[0]?.error as NodeOperationError)?.functionality !==\n\t\t\t\t\t\t'configuration-node'\n\t\t\t\t\t) {\n\t\t\t\t\t\tborderColor = '--color-danger';\n\t\t\t\t\t\treturnStyles['border-width'] = '2px';\n\t\t\t\t\t\treturnStyles['border-style'] = 'solid';\n\t\t\t\t\t}\n\t\t\t\t} else if (!!this.waiting || this.showPinnedDataInfo) {\n\t\t\t\t\tborderColor = '--color-node-pinned-border';\n\t\t\t\t} else if (this.nodeExecutionStatus === 'unknown') {\n\t\t\t\t\tborderColor = '--color-foreground-xdark';\n\t\t\t\t} else if (this.workflowDataItems) {\n\t\t\t\t\treturnStyles['border-width'] = '2px';\n\t\t\t\t\treturnStyles['border-style'] = 'solid';\n\t\t\t\t\tborderColor = '--color-success';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturnStyles['border-color'] = `var(${borderColor})`;\n\n\t\t\treturn returnStyles;\n\t\t},\n\t\tisSelected(): boolean {\n\t\t\treturn (\n\t\t\t\tthis.uiStore.getSelectedNodes.find((node: INodeUi) => node.name === this.data?.name) !==\n\t\t\t\tundefined\n\t\t\t);\n\t\t},\n\t\tshiftOutputCount(): boolean {\n\t\t\treturn !!(this.nodeType && this.outputs.length > 2);\n\t\t},\n\t\tshouldShowTriggerTooltip(): boolean {\n\t\t\treturn (\n\t\t\t\t!!this.node &&\n\t\t\t\tthis.isTriggerNode &&\n\t\t\t\t!this.isPollingTypeNode &&\n\t\t\t\t!this.pinnedData.hasData.value &&\n\t\t\t\t!this.isNodeDisabled &&\n\t\t\t\tthis.workflowRunning &&\n\t\t\t\tthis.workflowDataItems === 0 &&\n\t\t\t\tthis.isSingleActiveTriggerNode &&\n\t\t\t\t!this.isTriggerNodeTooltipEmpty &&\n\t\t\t\t!this.hasIssues &&\n\t\t\t\t!this.dragging\n\t\t\t);\n\t\t},\n\t\tisContextMenuOpen(): boolean {\n\t\t\treturn (\n\t\t\t\tthis.contextMenu.isOpen.value &&\n\t\t\t\tthis.contextMenu.target.value.source === 'node-button' &&\n\t\t\t\tthis.contextMenu.target.value.node.name === this.data?.name\n\t\t\t);\n\t\t},\n\t\ticonNodeType() {\n\t\t\tif (\n\t\t\t\tthis.data?.type === SIMULATE_NODE_TYPE ||\n\t\t\t\tthis.data?.type === SIMULATE_TRIGGER_NODE_TYPE\n\t\t\t) {\n\t\t\t\tconst icon = this.data.parameters?.icon as string;\n\t\t\t\tconst iconNodeType = this.workflow.expression.getSimpleParameterValue(\n\t\t\t\t\tthis.data,\n\t\t\t\t\ticon,\n\t\t\t\t\t'internal',\n\t\t\t\t\t{},\n\t\t\t\t);\n\t\t\t\tif (iconNodeType && typeof iconNodeType === 'string') {\n\t\t\t\t\treturn this.nodeTypesStore.getNodeType(iconNodeType);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this.nodeType;\n\t\t},\n\t},\n\twatch: {\n\t\tisActive(newValue, oldValue) {\n\t\t\tif (!newValue && oldValue) {\n\t\t\t\tthis.setSubtitle();\n\t\t\t}\n\t\t},\n\t\tcanvasOffsetPosition() {\n\t\t\tif (this.showTriggerNodeTooltip) {\n\t\t\t\tthis.showTriggerNodeTooltip = false;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.showTriggerNodeTooltip = this.shouldShowTriggerTooltip;\n\t\t\t\t}, 200);\n\t\t\t}\n\n\t\t\tif (this.pinDataDiscoveryTooltipVisible) {\n\t\t\t\tthis.pinDataDiscoveryTooltipVisible = false;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.pinDataDiscoveryTooltipVisible = true;\n\t\t\t\t}, 200);\n\t\t\t}\n\t\t},\n\t\tshouldShowTriggerTooltip(shouldShowTriggerTooltip) {\n\t\t\tif (shouldShowTriggerTooltip) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.showTriggerNodeTooltip = this.shouldShowTriggerTooltip;\n\t\t\t\t}, 2500);\n\t\t\t} else {\n\t\t\t\tthis.showTriggerNodeTooltip = false;\n\t\t\t}\n\t\t},\n\t\tnodeRunData: {\n\t\t\tdeep: true,\n\t\t\thandler(newValue) {\n\t\t\t\tif (!this.data) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.$emit('run', { name: this.data.name, data: newValue, waiting: !!this.waiting });\n\t\t\t},\n\t\t},\n\t},\n\tcreated() {\n\t\tconst hasSeenPinDataTooltip = useStorage(LOCAL_STORAGE_PIN_DATA_DISCOVERY_CANVAS_FLAG).value;\n\t\tif (!hasSeenPinDataTooltip) {\n\t\t\tthis.unwatchWorkflowDataItems = this.$watch('workflowDataItems', (dataItemsCount: number) => {\n\t\t\t\tthis.showPinDataDiscoveryTooltip(dataItemsCount);\n\t\t\t});\n\t\t}\n\t},\n\tmounted() {\n\t\t// Initialize the node\n\t\tif (this.data !== null) {\n\t\t\ttry {\n\t\t\t\tthis.addNode(this.data);\n\t\t\t} catch (error) {\n\t\t\t\t// This breaks when new nodes are loaded into store but workflow tab is not currently active\n\t\t\t\t// Shouldn't affect anything\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tthis.setSubtitle();\n\t\t}, 0);\n\t\tif (this.nodeRunData) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.$emit('run', {\n\t\t\t\t\tname: this.data?.name,\n\t\t\t\t\tdata: this.nodeRunData,\n\t\t\t\t\twaiting: !!this.waiting,\n\t\t\t\t});\n\t\t\t}, 0);\n\t\t}\n\t},\n\tmethods: {\n\t\tshowPinDataDiscoveryTooltip(dataItemsCount: number): void {\n\t\t\tif (\n\t\t\t\t!this.isTriggerNode ||\n\t\t\t\tthis.isManualTypeNode ||\n\t\t\t\tthis.isScheduledGroup ||\n\t\t\t\tthis.uiStore.isAnyModalOpen ||\n\t\t\t\tdataItemsCount === 0\n\t\t\t)\n\t\t\t\treturn;\n\n\t\t\tuseStorage(LOCAL_STORAGE_PIN_DATA_DISCOVERY_CANVAS_FLAG).value = 'true';\n\n\t\t\tthis.pinDataDiscoveryTooltipVisible = true;\n\t\t\tthis.unwatchWorkflowDataItems();\n\t\t},\n\t\tsetSubtitle() {\n\t\t\tif (!this.data || !this.nodeType) return;\n\t\t\t// why is this not a computed property? because it's a very expensive operation\n\t\t\t// it requires expressions to resolve each subtitle...\n\t\t\t// and ends up bogging down the UI with big workflows, for example when pasting a workflow or even opening a node...\n\t\t\t// so we only update it when necessary (when node is mounted and when it's opened and closed (isActive))\n\t\t\ttry {\n\t\t\t\tconst nodeSubtitle =\n\t\t\t\t\tthis.nodeHelpers.getNodeSubtitle(this.data, this.nodeType, this.workflow) ?? '';\n\n\t\t\t\tthis.nodeSubtitle = nodeSubtitle.includes(CUSTOM_API_CALL_KEY) ? '' : nodeSubtitle;\n\t\t\t} catch (e) {\n\t\t\t\t// avoid breaking UI if expression error occurs\n\t\t\t}\n\t\t},\n\t\tdisableNode() {\n\t\t\tif (this.data !== null) {\n\t\t\t\tthis.nodeHelpers.disableNodes([this.data]);\n\t\t\t\tthis.historyStore.pushCommandToUndo(\n\t\t\t\t\tnew EnableNodeToggleCommand(\n\t\t\t\t\t\tthis.data.name,\n\t\t\t\t\t\t!this.data.disabled,\n\t\t\t\t\t\tthis.data.disabled === true,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tthis.$telemetry.track('User clicked node hover button', {\n\t\t\t\t\tnode_type: this.data.type,\n\t\t\t\t\tbutton_name: 'disable',\n\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\texecuteNode() {\n\t\t\tthis.$emit('runWorkflow', this.data?.name, 'Node.executeNode');\n\t\t\tthis.$telemetry.track('User clicked node hover button', {\n\t\t\t\tnode_type: this.data?.type,\n\t\t\t\tbutton_name: 'execute',\n\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t});\n\t\t},\n\n\t\tdeleteNode() {\n\t\t\tthis.$telemetry.track('User clicked node hover button', {\n\t\t\t\tnode_type: this.data?.type,\n\t\t\t\tbutton_name: 'delete',\n\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t});\n\n\t\t\tthis.$emit('removeNode', this.data?.name);\n\t\t},\n\n\t\ttoggleDisableNode(event: MouseEvent) {\n\t\t\t(event.currentTarget as HTMLButtonElement).blur();\n\t\t\tthis.$telemetry.track('User clicked node hover button', {\n\t\t\t\tnode_type: this.data?.type,\n\t\t\t\tbutton_name: 'disable',\n\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t});\n\t\t\tthis.$emit('toggleDisableNode', this.data);\n\t\t},\n\n\t\tonClick(event: MouseEvent) {\n\t\t\tvoid this.callDebounced(this.onClickDebounced, { debounceTime: 50, trailing: true }, event);\n\t\t},\n\n\t\tonClickDebounced(...args: unknown[]) {\n\t\t\tconst event = args[0] as MouseEvent;\n\t\t\tconst isDoubleClick = event.detail >= 2;\n\t\t\tif (isDoubleClick) {\n\t\t\t\tthis.setNodeActive();\n\t\t\t} else {\n\t\t\t\tthis.mouseLeftClick(event);\n\t\t\t}\n\t\t},\n\n\t\tsetNodeActive() {\n\t\t\tthis.ndvStore.activeNodeName = this.data ? this.data.name : '';\n\t\t\tthis.pinDataDiscoveryTooltipVisible = false;\n\t\t},\n\t\ttouchStart() {\n\t\t\tif (this.deviceSupport.isTouchDevice && !this.deviceSupport.isMacOs && !this.isTouchActive) {\n\t\t\t\tthis.isTouchActive = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.isTouchActive = false;\n\t\t\t\t}, 2000);\n\t\t\t}\n\t\t},\n\t\topenContextMenu(event: MouseEvent, source: ContextMenuTarget['source']) {\n\t\t\tif (this.data) {\n\t\t\t\tthis.contextMenu.open(event, { source, node: this.data });\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.context-menu {\n\tposition: absolute;\n}\n\n.node-wrapper {\n\t--node-width: 100px;\n\t/*\n\t\tSet the node height to 100px as a base.\n\t\tIncrease height by 20px for each output beyond the 4th one.\n\t\tmax(0, var(--node-main-output-count, 1) - 4) ensures that we only start counting after the 4th output.\n\t*/\n\t--node-height: calc(100px + max(0, var(--node-main-output-count, 1) - 4) * 20px);\n\n\t--configurable-node-min-input-count: 4;\n\t--configurable-node-input-width: 65px;\n\n\tposition: absolute;\n\twidth: var(--node-width);\n\theight: var(--node-height);\n\n\t.node-description {\n\t\tposition: absolute;\n\t\ttop: var(--node-height);\n\t\tleft: calc(var(--node-width) / 2 * -1);\n\t\tline-height: 1.5;\n\t\ttext-align: center;\n\t\tcursor: default;\n\t\tpadding: 8px;\n\t\twidth: 100%;\n\t\tmin-width: calc(var(--node-width) * 2);\n\t\tpointer-events: none; // prevent container from being draggable\n\n\t\t.node-name > p {\n\t\t\t// must be paragraph tag to have two lines in safari\n\t\t\ttext-overflow: ellipsis;\n\t\t\tdisplay: -webkit-box;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\toverflow: hidden;\n\t\t\toverflow-wrap: anywhere;\n\t\t\tfont-weight: var(--font-weight-bold);\n\t\t\tline-height: var(--font-line-height-compact);\n\t\t}\n\n\t\t.node-subtitle {\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: $custom-font-light;\n\t\t\tfont-size: 0.8em;\n\t\t}\n\t}\n\n\t&.touch-active,\n\t&:hover,\n\t&.menu-open {\n\t\t.node-options {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t.node-options {\n\t\t:deep(.button) {\n\t\t\t--button-font-color: var(--color-text-light);\n\t\t\t--button-border-radius: 0;\n\t\t}\n\t\tcursor: default;\n\t\tposition: absolute;\n\t\tbottom: 100%;\n\t\tz-index: 11;\n\t\tmin-width: 100%;\n\t\tdisplay: flex;\n\t\tleft: calc(-1 * var(--spacing-4xs));\n\t\tright: calc(-1 * var(--spacing-4xs));\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tpadding-bottom: var(--spacing-2xs);\n\t\tfont-size: var(--font-size-s);\n\t\topacity: 0;\n\t\ttransition: opacity 100ms ease-in;\n\n\t\t&-inner {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tbackground-color: var(--color-canvas-background);\n\t\t\tborder-radius: var(--border-radius-base);\n\t\t}\n\t}\n\n\t.node-default {\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tcursor: pointer;\n\t\t&.disable-pointer-events {\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\t.node-box {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tborder: 2px solid var(--color-foreground-xdark);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\tbackground-color: var(--color-node-background);\n\t\t\t--color-background-node-icon-badge: var(--color-node-background);\n\t\t\t&.executing {\n\t\t\t\tbackground-color: var(--color-node-executing-background) !important;\n\n\t\t\t\t.node-executing-info {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.node-executing-info {\n\t\t\tdisplay: none;\n\t\t\tposition: absolute;\n\t\t\tleft: 0px;\n\t\t\ttop: 0px;\n\t\t\tz-index: 12;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tfont-size: 3.75em;\n\t\t\tline-height: 1.65em;\n\t\t\ttext-align: center;\n\t\t\tcolor: hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.7);\n\t\t}\n\n\t\t.node-icon {\n\t\t\tposition: absolute;\n\t\t\ttop: calc(50% - 20px);\n\t\t\tleft: calc(50% - 20px);\n\t\t}\n\n\t\t.node-info-icon {\n\t\t\tposition: absolute;\n\t\t\tbottom: 6px;\n\t\t\tright: 6px;\n\n\t\t\t&.shift-icon {\n\t\t\t\tright: 12px;\n\t\t\t}\n\n\t\t\t.data-count {\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcolor: var(--color-success);\n\t\t\t}\n\n\t\t\t.node-issues {\n\t\t\t\tcolor: var(--color-danger);\n\t\t\t}\n\n\t\t\t.items-count {\n\t\t\t\tfont-size: var(--font-size-s);\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t}\n\n\t\t.node-pin-data-icon {\n\t\t\tcolor: var(--color-secondary);\n\t\t\tmargin-right: 2px;\n\n\t\t\tsvg {\n\t\t\t\theight: 0.85rem;\n\t\t\t}\n\t\t}\n\n\t\t.waiting {\n\t\t\tcolor: var(--color-secondary);\n\t\t}\n\t}\n\n\t&--config {\n\t\t--configurable-node-input-width: 55px;\n\t\t--node-width: 75px;\n\t\t--node-height: 75px;\n\n\t\t.node-default {\n\t\t\t.node-icon {\n\t\t\t\tscale: 0.75;\n\t\t\t}\n\n\t\t\t.node-box {\n\t\t\t\tborder: 2px solid var(--color-foreground-xdark);\n\t\t\t\tborder-radius: 50px;\n\n\t\t\t\t&.executing {\n\t\t\t\t\tbackground-color: var(--color-node-executing-other-background) !important;\n\t\t\t\t}\n\n\t\t\t\t.node-executing-info {\n\t\t\t\t\tfont-size: 2.85em;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t@each $node-type in $supplemental-node-types {\n\t\t\t&.node-wrapper--connection-type-#{$node-type} {\n\t\t\t\t.node-default .node-box {\n\t\t\t\t\tbackground: var(--node-type-#{$node-type}-background);\n\t\t\t\t}\n\n\t\t\t\t.node-description {\n\t\t\t\t\t.node-subtitle {\n\t\t\t\t\t\tcolor: var(--node-type-#{$node-type}-color);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.node-info-icon {\n\t\t\tbottom: 4px !important;\n\t\t\tright: 50% !important;\n\t\t\ttransform: translateX(50%) scale(0.75);\n\t\t}\n\n\t\t&.node-wrapper--configurable {\n\t\t\t--configurable-node-icon-offset: 20px;\n\n\t\t\t.node-info-icon {\n\t\t\t\tbottom: 1px !important;\n\t\t\t\tright: 1px !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--configurable {\n\t\t--node-width: var(\n\t\t\t--configurable-node-width,\n\t\t\tcalc(\n\t\t\t\tmax(var(--configurable-node-input-count, 5), var(--configurable-node-min-input-count)) *\n\t\t\t\t\tvar(--configurable-node-input-width)\n\t\t\t)\n\t\t);\n\t\t--configurable-node-icon-offset: 40px;\n\t\t--configurable-node-icon-size: 30px;\n\n\t\t.node-description {\n\t\t\ttop: calc(50%);\n\t\t\ttransform: translateY(-50%);\n\t\t\tleft: calc(\n\t\t\t\tvar(--configurable-node-icon-offset) + var(--configurable-node-icon-size) + var(--spacing-s)\n\t\t\t);\n\t\t\ttext-align: left;\n\t\t\toverflow: auto;\n\t\t\twhite-space: normal;\n\t\t\tmin-width: unset;\n\t\t\tmax-width: calc(\n\t\t\t\tvar(--node-width) - var(--configurable-node-icon-offset) - var(\n\t\t\t\t\t\t--configurable-node-icon-size\n\t\t\t\t\t) - 2 * var(--spacing-s)\n\t\t\t);\n\t\t\t.node-name > p {\n\t\t\t\tcolor: var(--color-configurable-node-name);\n\t\t\t}\n\t\t}\n\n\t\t.node-default {\n\t\t\t.node-icon {\n\t\t\t\tleft: var(--configurable-node-icon-offset);\n\t\t\t}\n\n\t\t\t.node-executing-info {\n\t\t\t\tleft: -67px;\n\t\t\t}\n\t\t}\n\n\t\t&[data-node-type='@n8n/n8n-nodes-langchain.chatTrigger'] {\n\t\t\t--configurable-node-min-input-count: 1;\n\t\t\t--configurable-node-input-width: 176px;\n\t\t}\n\t}\n\n\t&--trigger .node-default .node-box {\n\t\tborder-radius: 32px 8px 8px 32px;\n\t}\n\n\t.trigger-icon {\n\t\tposition: absolute;\n\t\tright: 100%;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tmargin: auto;\n\t\tcolor: var(--color-primary);\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\theight: fit-content;\n\t\t// Increase click radius of the bolt icon\n\t\tpadding: var(--spacing-2xs);\n\t}\n}\n\n.select-background {\n\t--node--selected--box-shadow-radius: 8px;\n\n\tdisplay: block;\n\tbackground-color: var(--color-canvas-selected);\n\tborder-radius: var(--border-radius-xlarge);\n\toverflow: hidden;\n\tposition: absolute;\n\tleft: calc(var(--node--selected--box-shadow-radius) * -1) !important;\n\ttop: calc(var(--node--selected--box-shadow-radius) * -1) !important;\n\theight: calc(100% + 2 * var(--node--selected--box-shadow-radius));\n\twidth: calc(100% + 2 * var(--node--selected--box-shadow-radius)) !important;\n\n\t.node-wrapper--trigger & {\n\t\tborder-radius: 36px 8px 8px 36px;\n\t}\n\n\t.node-wrapper--config & {\n\t\t--node--selected--box-shadow-radius: 4px;\n\t\tborder-radius: 60px;\n\t}\n}\n\n.disabled-line-through {\n\tborder: 1px solid var(--color-foreground-dark);\n\tposition: absolute;\n\ttop: 49px;\n\tleft: -3px;\n\twidth: 111px;\n\tpointer-events: none;\n\n\t&.success {\n\t\tborder-color: var(--color-success-light);\n\t}\n}\n</style>\n\n<style lang=\"scss\">\n.jtk-endpoint {\n\tz-index: 2;\n}\n\n.node-trigger-tooltip {\n\t&__wrapper {\n\t\ttop: -22px;\n\t\tleft: 50px;\n\t\tposition: relative;\n\n\t\t&--item {\n\t\t\tmax-width: 160px;\n\t\t\tposition: fixed;\n\t\t\tz-index: 0 !important;\n\t\t}\n\t}\n}\n.dot-output-endpoint:hover circle {\n\tfill: var(--color-primary);\n}\n/** connector */\n.jtk-connector {\n\tz-index: 3;\n}\n\n.jtk-floating-endpoint {\n\topacity: 0;\n}\n\n.jtk-connector path {\n\ttransition: stroke 0.1s ease-in-out;\n}\n\n.jtk-overlay {\n\tz-index: 3;\n}\n.jtk-connector {\n\tz-index: 4;\n}\n.node-input-endpoint-label,\n.node-output-endpoint-label,\n.connection-run-items-label {\n\tz-index: 5;\n}\n.jtk-connector.jtk-hover {\n\tz-index: 6;\n}\n\n.jtk-endpoint.plus-endpoint {\n\tz-index: 6;\n}\n.jtk-endpoint.dot-output-endpoint {\n\tz-index: 7;\n\toverflow: auto;\n}\n\n.disabled-line-through {\n\tz-index: 8;\n}\n\n.jtk-drag-active.dot-output-endpoint,\n.jtk-drag-active.rect-input-endpoint {\n\tz-index: 9;\n}\n.rect-input-endpoint > * {\n\tpointer-events: none;\n}\n\n.connection-actions {\n\tz-index: 100;\n}\n\n.drop-add-node-label {\n\tz-index: 10;\n}\n</style>\n\n<style lang=\"scss\">\n:root {\n\t--endpoint-size-small: 14px;\n\t--endpoint-size-medium: 18px;\n\t--stalk-size: 40px;\n\t--stalk-medium-size: 60px;\n\t--stalk-large-size: 90px;\n\t--stalk-success-size: 87px;\n\t--stalk-success-size-without-label: 40px;\n\t--stalk-long-size: 127px;\n\t--plus-endpoint-box-size: 24px;\n\t--plus-endpoint-box-size-small: 17px;\n}\n\n.plus-svg-circle {\n\tz-index: 111;\n\tcircle {\n\t\tstroke: var(--color-foreground-xdark);\n\t\tstroke-width: 2px;\n\t\tfill: var(--color-foreground-xdark);\n\t}\n\n\t&:hover {\n\t\tcircle {\n\t\t\tstroke: var(--color-primary);\n\t\t\tfill: var(--color-primary);\n\t\t}\n\t}\n}\n.plus-stalk {\n\twidth: calc(var(--stalk-size) + 2px);\n\tborder: 1px solid var(--color-foreground-dark);\n\tmargin-left: calc(var(--stalk-size) / 2);\n\tz-index: 3;\n\t&.ep-success {\n\t\tborder-color: var(--color-success-light);\n\n\t\t&:after {\n\t\t\tcontent: attr(data-label);\n\t\t\tposition: absolute;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 100%;\n\t\t\tmargin: auto;\n\t\t\tmargin-bottom: 2px;\n\t\t\ttext-align: center;\n\n\t\t\tline-height: 1.3em;\n\t\t\tfont-size: var(--font-size-s);\n\t\t\tfont-weight: var(--font-weight-regular);\n\t\t\tcolor: var(--color-success);\n\t\t}\n\t}\n}\n.connection-run-items-label {\n\t// Disable points events so that the label does not block the connection\n\t// mouse over event.\n\tpointer-events: none;\n\tspan {\n\t\tbackground-color: hsla(\n\t\t\tvar(--color-canvas-background-h),\n\t\t\tvar(--color-canvas-background-s),\n\t\t\tvar(--color-canvas-background-l),\n\t\t\t0.85\n\t\t);\n\t\tborder-radius: var(--border-radius-base);\n\t\tline-height: 1.3em;\n\t\tpadding: 0px 3px;\n\t\twhite-space: nowrap;\n\t\tfont-size: var(--font-size-s);\n\t\tfont-weight: var(--font-weight-regular);\n\t\tmargin-top: -15px;\n\n\t\t&.floating {\n\t\t\tposition: absolute;\n\t\t\ttop: -6px;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\t}\n}\n\n.connection-input-name-label {\n\tposition: relative;\n\n\tspan {\n\t\tposition: absolute;\n\t\ttop: -10px;\n\t\tleft: -60px;\n\t}\n}\n\n.plus-endpoint {\n\tcursor: pointer;\n\tz-index: 10;\n\tmargin-left: calc((var(--stalk-size) + var(--plus-endpoint-box-size) / 2) - 1px);\n\tg {\n\t\tfill: var(--color-background-xlight);\n\t\tpointer-events: none;\n\t}\n\n\t&:hover {\n\t\tpath {\n\t\t\tfill: var(--color-primary);\n\t\t}\n\t\trect {\n\t\t\tstroke: var(--color-primary);\n\t\t}\n\t}\n\tpath {\n\t\tfill: var(--color-foreground-xdark);\n\t}\n\trect {\n\t\tstroke: var(--color-foreground-xdark);\n\t}\n\n\t&.error {\n\t\tpath {\n\t\t\tfill: var(--color-node-error-output-text-color);\n\t\t}\n\t\trect {\n\t\t\tstroke: var(--color-node-error-output-text-color);\n\t\t}\n\t}\n\n\t&.small {\n\t\tmargin-left: calc((var(--stalk-size) + var(--plus-endpoint-box-size-small) / 2));\n\t\tg {\n\t\t\ttransform: scale(0.75);\n\t\t\ttransform-origin: center;\n\t\t}\n\t\trect {\n\t\t\tstroke-width: 2.5;\n\t\t}\n\t}\n\t&:hover .plus-container {\n\t\tcolor: var(--color-primary);\n\t\tborder: 2px solid var(--color-primary);\n\t}\n\t&:hover .drop-hover-message {\n\t\tdisplay: block;\n\t}\n\n\t&.hidden {\n\t\tdisplay: none;\n\t}\n}\n\n.diamond-output-endpoint {\n\t--diamond-output-endpoint--transition-duration: 0.15s;\n\n\ttransition: transform var(--diamond-output-endpoint--transition-duration) ease;\n\ttransform: rotate(45deg);\n\tz-index: 10;\n}\n\n.add-input-endpoint {\n\t--add-input-endpoint--transition-duration: 0.15s;\n\n\t&:not(.jtk-endpoint-connected) {\n\t\tcursor: pointer;\n\t}\n\n\t&.add-input-endpoint-multiple {\n\t\tz-index: 100;\n\t\tcursor: pointer;\n\t}\n\n\t&.jtk-endpoint-connected {\n\t\tz-index: 10;\n\t}\n\n\t&.add-input-endpoint-error {\n\t\t--endpoint-svg-color: var(--color-danger);\n\t}\n\n\t.add-input-endpoint-default {\n\t\ttransition: transform var(--add-input-endpoint--transition-duration) ease;\n\t}\n\n\t.add-input-endpoint-diamond {\n\t\ttransition: fill var(--add-input-endpoint--transition-duration) ease;\n\t\tfill: var(--svg-color, var(--color-primary));\n\t}\n\n\t.add-input-endpoint-line {\n\t\ttransition: fill var(--add-input-endpoint--transition-duration) ease;\n\t\tfill: var(--svg-color, var(--color-primary));\n\t}\n\n\t.add-input-endpoint-plus-rectangle {\n\t\ttransition:\n\t\t\tfill var(--add-input-endpoint--transition-duration) ease,\n\t\t\tstroke var(--add-input-endpoint--transition-duration) ease;\n\t\tfill: var(--color-foreground-xlight);\n\t\tstroke: var(--svg-color, var(--color-primary));\n\t}\n\n\t.add-input-endpoint-plus-icon {\n\t\tstroke: none;\n\t\ttransition: fill var(--add-input-endpoint--transition-duration) ease;\n\t\tfill: var(--svg-color, var(--color-primary));\n\t}\n\n\t.add-input-endpoint-connected-rectangle {\n\t\ttransition:\n\t\t\tfill var(--add-input-endpoint--transition-duration) ease,\n\t\t\tstroke var(--add-input-endpoint--transition-duration) ease;\n\t\tfill: var(--color-foreground-xdark);\n\t\tstroke: var(--color-foreground-xdark);\n\t}\n\n\t&.rect-input-endpoint-hover {\n\t\t.add-input-endpoint-plus-rectangle {\n\t\t\tstroke: var(--svg-color, var(--color-primary));\n\t\t}\n\n\t\t.add-input-endpoint-plus-icon {\n\t\t\tfill: var(--svg-color, var(--color-primary));\n\t\t}\n\t}\n\n\t&.jtk-endpoint-connected:not(.add-input-endpoint-multiple) {\n\t\t.add-input-endpoint-unconnected {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t&.rect-input-endpoint-hover {\n\t\t\t.add-input-endpoint-connected-rectangle {\n\t\t\t\tfill: var(--svg-color, var(--color-primary));\n\t\t\t\tstroke: var(--svg-color, var(--color-primary));\n\t\t\t}\n\t\t}\n\t}\n}\n\n.node-input-endpoint-label,\n.node-output-endpoint-label {\n\t--node-endpoint-label--transition-duration: 0.15s;\n\n\tbackground-color: hsla(\n\t\tvar(--color-canvas-background-h),\n\t\tvar(--color-canvas-background-s),\n\t\tvar(--color-canvas-background-l),\n\t\t0.85\n\t);\n\tborder-radius: var(--border-radius-large);\n\tfont-size: var(--font-size-3xs);\n\tpadding: var(--spacing-5xs) var(--spacing-4xs);\n\twhite-space: nowrap;\n\ttransition: color var(--node-endpoint-label--transition-duration) ease;\n\n\t@each $node-type in $supplemental-node-types {\n\t\t&.node-connection-type-#{$node-type} {\n\t\t\tcolor: var(--node-type-supplemental-label-color);\n\t\t}\n\t}\n}\n\n.node-output-endpoint-label.node-connection-category-error {\n\tcolor: var(--color-node-error-output-text-color);\n}\n\n.node-output-endpoint-label {\n\tmargin-left: calc(var(--endpoint-size-small) + var(--spacing-2xs));\n\n\t&--data {\n\t\ttext-align: center;\n\t\tmargin-top: calc(var(--spacing-l) * -1);\n\t\tmargin-left: 0;\n\t}\n\n\t// Some nodes allow for dynamic connection labels\n\t// so we need to make sure the label does not overflow\n\t&.node-connection-type-main[data-endpoint-label-length] {\n\t\tmax-width: calc(var(--stalk-size) - var(--endpoint-size-small) - var(--spacing-4xs));\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttransform: translateY(-50%) !important;\n\t\tmargin-left: var(--endpoint-size-small);\n\t}\n}\n\n.node-input-endpoint-label {\n\ttext-align: right;\n\tmargin-left: -25px;\n\n\t&--moved {\n\t\tmargin-left: -40px;\n\t}\n\n\t&--data {\n\t\ttext-align: center;\n\t\tmargin-top: calc(var(--spacing-5xs) * -1);\n\t\tmargin-left: 0;\n\t}\n}\n\n.hover-message.jtk-overlay {\n\t--hover-message-width: 110px;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-2xs);\n\tline-height: var(--font-line-height-regular);\n\tcolor: var(--color-text-light);\n\twidth: var(--hover-message-width);\n\tmargin-left: calc(\n\t\t(var(--hover-message-width) / 2) + var(--stalk-size) + var(--plus-endpoint-box-size) +\n\t\t\tvar(--spacing-2xs)\n\t);\n\topacity: 0;\n\tpointer-events: none;\n\t&.small {\n\t\tmargin-left: calc(\n\t\t\t(var(--hover-message-width) / 2) + var(--stalk-size) + var(--plus-endpoint-box-size-small) +\n\t\t\t\tvar(--spacing-2xs)\n\t\t);\n\t}\n\t&.visible {\n\t\tpointer-events: all;\n\t\topacity: 1;\n\t}\n}\n\n.long-stalk {\n\t--stalk-size: var(--stalk-long-size);\n}\n.ep-success {\n\t--stalk-size: var(--stalk-success-size);\n}\n.ep-success--without-label {\n\t--stalk-size: var(--stalk-success-size-without-label);\n}\n\n[data-endpoint-label-length='medium'] {\n\t--stalk-size: var(--stalk-medium-size);\n}\n\n[data-endpoint-label-length='large'] {\n\t--stalk-size: var(--stalk-large-size);\n}\n</style>\n","<template>\n\t<div\n\t\t:id=\"nodeId\"\n\t\t:ref=\"data?.name\"\n\t\tclass=\"sticky-wrapper\"\n\t\t:style=\"stickyPosition\"\n\t\t:data-name=\"data?.name\"\n\t\tdata-test-id=\"sticky\"\n\t>\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'sticky-default': true,\n\t\t\t\t'touch-active': isTouchActive,\n\t\t\t\t'is-touch-device': deviceSupport.isTouchDevice,\n\t\t\t\t'is-read-only': isReadOnly,\n\t\t\t}\"\n\t\t\t:style=\"stickySize\"\n\t\t>\n\t\t\t<div v-show=\"isSelected\" class=\"select-sticky-background\" />\n\t\t\t<div\n\t\t\t\tv-touch:start=\"touchStart\"\n\t\t\t\tv-touch:end=\"touchEnd\"\n\t\t\t\tclass=\"sticky-box\"\n\t\t\t\t@click.left=\"mouseLeftClick\"\n\t\t\t\t@contextmenu=\"onContextMenu\"\n\t\t\t>\n\t\t\t\t<n8n-sticky\n\t\t\t\t\tv-if=\"node\"\n\t\t\t\t\t:id=\"node.id\"\n\t\t\t\t\t:model-value=\"node.parameters.content\"\n\t\t\t\t\t:height=\"node.parameters.height\"\n\t\t\t\t\t:width=\"node.parameters.width\"\n\t\t\t\t\t:scale=\"nodeViewScale\"\n\t\t\t\t\t:background-color=\"node.parameters.color\"\n\t\t\t\t\t:read-only=\"isReadOnly\"\n\t\t\t\t\t:default-text=\"defaultText\"\n\t\t\t\t\t:edit-mode=\"isActive && !isReadOnly\"\n\t\t\t\t\t:grid-size=\"gridSize\"\n\t\t\t\t\t@edit=\"onEdit\"\n\t\t\t\t\t@resizestart=\"onResizeStart\"\n\t\t\t\t\t@resize=\"onResize\"\n\t\t\t\t\t@resizeend=\"onResizeEnd\"\n\t\t\t\t\t@markdown-click=\"onMarkdownClick\"\n\t\t\t\t\t@update:model-value=\"onInputChange\"\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tv-show=\"showActions\"\n\t\t\t\t:class=\"{ 'sticky-options': true, 'no-select-on-click': true, 'force-show': forceActions }\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tv-touch:tap=\"deleteNode\"\n\t\t\t\t\tclass=\"option\"\n\t\t\t\t\tdata-test-id=\"delete-sticky\"\n\t\t\t\t\t:title=\"$locale.baseText('node.delete')\"\n\t\t\t\t>\n\t\t\t\t\t<font-awesome-icon icon=\"trash\" />\n\t\t\t\t</div>\n\t\t\t\t<n8n-popover\n\t\t\t\t\teffect=\"dark\"\n\t\t\t\t\t:popper-style=\"{ width: '208px' }\"\n\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t@show=\"onShowPopover\"\n\t\t\t\t\t@hide=\"onHidePopover\"\n\t\t\t\t>\n\t\t\t\t\t<template #reference>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref=\"colorPopoverTrigger\"\n\t\t\t\t\t\t\tclass=\"option\"\n\t\t\t\t\t\t\tdata-test-id=\"change-sticky-color\"\n\t\t\t\t\t\t\t:title=\"$locale.baseText('node.changeColor')\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<font-awesome-icon icon=\"palette\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tv-for=\"(_, index) in Array.from({ length: 7 })\"\n\t\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t\tclass=\"color\"\n\t\t\t\t\t\t\tdata-test-id=\"color\"\n\t\t\t\t\t\t\t:class=\"`sticky-color-${index + 1}`\"\n\t\t\t\t\t\t\t:style=\"{\n\t\t\t\t\t\t\t\t'border-width': '1px',\n\t\t\t\t\t\t\t\t'border-style': 'solid',\n\t\t\t\t\t\t\t\t'border-color': 'var(--color-foreground-xdark)',\n\t\t\t\t\t\t\t\t'background-color': `var(--color-sticky-background-${index + 1})`,\n\t\t\t\t\t\t\t\t'box-shadow':\n\t\t\t\t\t\t\t\t\t(index === 0 && node?.parameters.color === '') ||\n\t\t\t\t\t\t\t\t\tindex + 1 === node?.parameters.color\n\t\t\t\t\t\t\t\t\t\t? `0 0 0 1px var(--color-sticky-background-${index + 1})`\n\t\t\t\t\t\t\t\t\t\t: 'none',\n\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t@click=\"changeColor(index + 1)\"\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</div>\n\t\t\t\t</n8n-popover>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\nimport type { PropType, StyleValue } from 'vue';\nimport { mapStores } from 'pinia';\n\nimport { isNumber, isString } from '@/utils/typeGuards';\nimport type {\n\tINodeUi,\n\tINodeUpdatePropertiesInformation,\n\tIUpdateInformation,\n\tXYPosition,\n} from '@/Interface';\n\nimport type { INodeTypeDescription, Workflow } from 'n8n-workflow';\nimport { QUICKSTART_NOTE_NAME } from '@/constants';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport { useNDVStore } from '@/stores/ndv.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport { useContextMenu } from '@/composables/useContextMenu';\nimport { useDeviceSupport } from 'n8n-design-system';\nimport { GRID_SIZE } from '@/utils/nodeViewUtils';\nimport { useToast } from '@/composables/useToast';\nimport { assert } from '@/utils/assert';\nimport type { BrowserJsPlumbInstance } from '@jsplumb/browser-ui';\nimport { useCanvasStore } from '@/stores/canvas.store';\nimport { useHistoryStore } from '@/stores/history.store';\nimport { useNodeBase } from '@/composables/useNodeBase';\n\nexport default defineComponent({\n\tname: 'Sticky',\n\tprops: {\n\t\tnodeViewScale: {\n\t\t\ttype: Number,\n\t\t\tdefault: 1,\n\t\t},\n\t\tgridSize: {\n\t\t\ttype: Number,\n\t\t\tdefault: GRID_SIZE,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tinstance: {\n\t\t\ttype: Object as PropType<BrowserJsPlumbInstance>,\n\t\t\trequired: true,\n\t\t},\n\t\tisReadOnly: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\thideActions: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tdisableSelecting: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tshowCustomTooltip: {\n\t\t\ttype: Boolean,\n\t\t},\n\t\tworkflow: {\n\t\t\ttype: Object as PropType<Workflow>,\n\t\t\trequired: true,\n\t\t},\n\t},\n\temits: { removeNode: null, nodeSelected: null },\n\tsetup(props, { emit }) {\n\t\tconst deviceSupport = useDeviceSupport();\n\t\tconst toast = useToast();\n\t\tconst colorPopoverTrigger = ref<HTMLDivElement>();\n\t\tconst forceActions = ref(false);\n\t\tconst setForceActions = (value: boolean) => {\n\t\t\tforceActions.value = value;\n\t\t};\n\t\tconst contextMenu = useContextMenu((action) => {\n\t\t\tif (action === 'change_color') {\n\t\t\t\tsetForceActions(true);\n\t\t\t\tcolorPopoverTrigger.value?.click();\n\t\t\t}\n\t\t});\n\n\t\tconst nodeBase = useNodeBase({\n\t\t\tname: props.name,\n\t\t\tinstance: props.instance,\n\t\t\tworkflowObject: props.workflow,\n\t\t\tisReadOnly: props.isReadOnly,\n\t\t\temit: emit as (event: string, ...args: unknown[]) => void,\n\t\t});\n\n\t\treturn {\n\t\t\tdeviceSupport,\n\t\t\ttoast,\n\t\t\tcolorPopoverTrigger,\n\t\t\tcontextMenu,\n\t\t\tforceActions,\n\t\t\t...nodeBase,\n\t\t\tsetForceActions,\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisResizing: false,\n\t\t\tisTouchActive: false,\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(\n\t\t\tuseNodeTypesStore,\n\t\t\tuseUIStore,\n\t\t\tuseNDVStore,\n\t\t\tuseCanvasStore,\n\t\t\tuseWorkflowsStore,\n\t\t\tuseHistoryStore,\n\t\t),\n\t\tdata(): INodeUi | null {\n\t\t\treturn this.workflowsStore.getNodeByName(this.name);\n\t\t},\n\t\tnodeId(): string {\n\t\t\treturn this.data?.id || '';\n\t\t},\n\t\tdefaultText(): string {\n\t\t\tif (!this.nodeType) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tconst properties = this.nodeType.properties;\n\t\t\tconst content = properties.find((property) => property.name === 'content');\n\n\t\t\treturn content && isString(content.default) ? content.default : '';\n\t\t},\n\t\tisSelected(): boolean {\n\t\t\treturn (\n\t\t\t\tthis.uiStore.getSelectedNodes.find((node: INodeUi) => node.name === this.data?.name) !==\n\t\t\t\tundefined\n\t\t\t);\n\t\t},\n\t\tnodeType(): INodeTypeDescription | null {\n\t\t\treturn this.data && this.nodeTypesStore.getNodeType(this.data.type, this.data.typeVersion);\n\t\t},\n\t\tnode(): INodeUi | null {\n\t\t\t// same as this.data but reactive..\n\t\t\treturn this.workflowsStore.getNodeByName(this.name);\n\t\t},\n\t\tposition(): XYPosition {\n\t\t\tif (this.node) {\n\t\t\t\treturn this.node.position;\n\t\t\t} else {\n\t\t\t\treturn [0, 0];\n\t\t\t}\n\t\t},\n\t\theight(): number {\n\t\t\treturn this.node && isNumber(this.node.parameters.height) ? this.node.parameters.height : 0;\n\t\t},\n\t\twidth(): number {\n\t\t\treturn this.node && isNumber(this.node.parameters.width) ? this.node.parameters.width : 0;\n\t\t},\n\t\tstickySize(): StyleValue {\n\t\t\tconst returnStyles: {\n\t\t\t\t[key: string]: string | number;\n\t\t\t} = {\n\t\t\t\theight: this.height + 'px',\n\t\t\t\twidth: this.width + 'px',\n\t\t\t};\n\n\t\t\treturn returnStyles;\n\t\t},\n\t\tstickyPosition(): StyleValue {\n\t\t\tconst returnStyles: {\n\t\t\t\t[key: string]: string | number;\n\t\t\t} = {\n\t\t\t\tleft: this.position[0] + 'px',\n\t\t\t\ttop: this.position[1] + 'px',\n\t\t\t\tzIndex: this.isActive ? 9999999 : -1 * Math.floor((this.height * this.width) / 1000),\n\t\t\t};\n\n\t\t\treturn returnStyles;\n\t\t},\n\t\tshowActions(): boolean {\n\t\t\treturn (\n\t\t\t\t!(this.hideActions || this.isReadOnly || this.workflowRunning || this.isResizing) ||\n\t\t\t\tthis.forceActions\n\t\t\t);\n\t\t},\n\t\tworkflowRunning(): boolean {\n\t\t\treturn this.uiStore.isActionActive('workflowRunning');\n\t\t},\n\t},\n\tmounted() {\n\t\t// Initialize the node\n\t\tif (this.data !== null) {\n\t\t\ttry {\n\t\t\t\tthis.addNode(this.data);\n\t\t\t} catch (error) {\n\t\t\t\t// This breaks when new nodes are loaded into store but workflow tab is not currently active\n\t\t\t\t// Shouldn't affect anything\n\t\t\t}\n\t\t}\n\t},\n\tmethods: {\n\t\tonShowPopover() {\n\t\t\tthis.setForceActions(true);\n\t\t},\n\t\tonHidePopover() {\n\t\t\tthis.setForceActions(false);\n\t\t},\n\t\tasync deleteNode() {\n\t\t\tassert(this.data);\n\t\t\t// Wait a tick else vue causes problems because the data is gone\n\t\t\tawait this.$nextTick();\n\t\t\tthis.$emit('removeNode', this.data.name);\n\t\t},\n\t\tchangeColor(index: number) {\n\t\t\tthis.workflowsStore.updateNodeProperties({\n\t\t\t\tname: this.name,\n\t\t\t\tproperties: {\n\t\t\t\t\tparameters: {\n\t\t\t\t\t\t...this.node?.parameters,\n\t\t\t\t\t\tcolor: index,\n\t\t\t\t\t},\n\t\t\t\t\tposition: this.node?.position ?? [0, 0],\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonEdit(edit: boolean) {\n\t\t\tif (edit && !this.isActive && this.node) {\n\t\t\t\tthis.ndvStore.activeNodeName = this.node.name;\n\t\t\t} else if (this.isActive && !edit) {\n\t\t\t\tthis.ndvStore.activeNodeName = null;\n\t\t\t}\n\t\t},\n\t\tonMarkdownClick(link: HTMLAnchorElement) {\n\t\t\tif (link) {\n\t\t\t\tconst isOnboardingNote = this.name === QUICKSTART_NOTE_NAME;\n\t\t\t\tconst isWelcomeVideo = link.querySelector('img[alt=\"n8n quickstart video\"]');\n\t\t\t\tconst type =\n\t\t\t\t\tisOnboardingNote && isWelcomeVideo\n\t\t\t\t\t\t? 'welcome_video'\n\t\t\t\t\t\t: isOnboardingNote && link.getAttribute('href') === '/templates'\n\t\t\t\t\t\t\t? 'templates'\n\t\t\t\t\t\t\t: 'other';\n\n\t\t\t\tthis.$telemetry.track('User clicked note link', { type });\n\t\t\t}\n\t\t},\n\t\tonInputChange(content: string) {\n\t\t\tif (!this.node) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.node.parameters.content = content;\n\t\t\tthis.setParameters({ content });\n\t\t},\n\t\tonResizeStart() {\n\t\t\tthis.isResizing = true;\n\t\t\tif (!this.isSelected && this.node) {\n\t\t\t\tthis.$emit('nodeSelected', this.node.name, false, true);\n\t\t\t}\n\t\t},\n\t\tonResize({ height, width, dX, dY }: { width: number; height: number; dX: number; dY: number }) {\n\t\t\tif (!this.node) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (dX !== 0 || dY !== 0) {\n\t\t\t\tthis.setPosition([this.node.position[0] + (dX || 0), this.node.position[1] + (dY || 0)]);\n\t\t\t}\n\n\t\t\tthis.setParameters({ height, width });\n\t\t},\n\t\tonResizeEnd() {\n\t\t\tthis.isResizing = false;\n\t\t},\n\t\tsetParameters(params: { content?: string; height?: number; width?: number; color?: string }) {\n\t\t\tif (this.node) {\n\t\t\t\tconst nodeParameters = {\n\t\t\t\t\tcontent: isString(params.content) ? params.content : this.node.parameters.content,\n\t\t\t\t\theight: isNumber(params.height) ? params.height : this.node.parameters.height,\n\t\t\t\t\twidth: isNumber(params.width) ? params.width : this.node.parameters.width,\n\t\t\t\t\tcolor: isString(params.color) ? params.color : this.node.parameters.color,\n\t\t\t\t};\n\n\t\t\t\tconst updateInformation: IUpdateInformation = {\n\t\t\t\t\tkey: this.node.id,\n\t\t\t\t\tname: this.node.name,\n\t\t\t\t\tvalue: nodeParameters,\n\t\t\t\t};\n\n\t\t\t\tthis.workflowsStore.setNodeParameters(updateInformation);\n\t\t\t}\n\t\t},\n\t\tsetPosition(position: XYPosition) {\n\t\t\tif (!this.node) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst updateInformation: INodeUpdatePropertiesInformation = {\n\t\t\t\tname: this.node.name,\n\t\t\t\tproperties: {\n\t\t\t\t\tposition,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tthis.workflowsStore.updateNodeProperties(updateInformation);\n\t\t},\n\t\ttouchStart() {\n\t\t\tif (this.deviceSupport.isTouchDevice && !this.deviceSupport.isMacOs && !this.isTouchActive) {\n\t\t\t\tthis.isTouchActive = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.isTouchActive = false;\n\t\t\t\t}, 2000);\n\t\t\t}\n\t\t},\n\t\tonContextMenu(e: MouseEvent): void {\n\t\t\tif (this.node && !this.isActive) {\n\t\t\t\tthis.contextMenu.open(e, { source: 'node-right-click', node: this.node });\n\t\t\t} else {\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.sticky-wrapper {\n\tposition: absolute;\n\n\t.sticky-default {\n\t\t.sticky-box {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t&.touch-active,\n\t\t&:hover {\n\t\t\t.sticky-options {\n\t\t\t\tdisplay: flex;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t}\n\n\t\t&.is-read-only {\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\t.sticky-options {\n\t\t\tdisplay: none;\n\t\t\tjustify-content: flex-start;\n\t\t\tposition: absolute;\n\t\t\ttop: -25px;\n\t\t\tleft: -8px;\n\t\t\theight: 26px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttext-align: left;\n\t\t\tz-index: 10;\n\t\t\tcolor: #aaa;\n\t\t\ttext-align: center;\n\n\t\t\t.option {\n\t\t\t\twidth: 28px;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\t&.touch {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t&:hover {\n\t\t\t\t\tcolor: $color-primary;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.force-show {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t&.is-touch-device .sticky-options {\n\t\t\tleft: -25px;\n\t\t\twidth: 150px;\n\n\t\t\t.option.touch {\n\t\t\t\tdisplay: initial;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.select-sticky-background {\n\tdisplay: block;\n\tposition: absolute;\n\tbackground-color: var(--color-canvas-selected);\n\tborder-radius: var(--border-radius-xlarge);\n\toverflow: hidden;\n\theight: calc(100% + 16px);\n\twidth: calc(100% + 16px);\n\tleft: -8px;\n\ttop: -8px;\n\tz-index: 0;\n}\n\n.content {\n\tdisplay: flex;\n\tflex-direction: row;\n\twidth: fit-content;\n\tgap: var(--spacing-2xs);\n}\n\n.color {\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 50%;\n\tborder-color: var(--color-primary-shade-1);\n\n\t&:hover {\n\t\tcursor: pointer;\n\t}\n}\n</style>\n","<template>\n\t<div\n\t\tref=\"container\"\n\t\t:class=\"$style.canvasAddButton\"\n\t\t:style=\"containerCssVars\"\n\t\tdata-test-id=\"canvas-add-button\"\n\t>\n\t\t<n8n-tooltip\n\t\t\tplacement=\"top\"\n\t\t\t:visible=\"showTooltip\"\n\t\t\t:disabled=\"nodeCreatorStore.showScrim\"\n\t\t\t:popper-class=\"$style.tooltip\"\n\t\t\t:show-after=\"700\"\n\t\t>\n\t\t\t<button :class=\"$style.button\" data-test-id=\"canvas-plus-button\" @click=\"$emit('click')\">\n\t\t\t\t<font-awesome-icon icon=\"plus\" size=\"lg\" />\n\t\t\t</button>\n\t\t\t<template #content>\n\t\t\t\t{{ $locale.baseText('nodeView.canvasAddButton.addATriggerNodeBeforeExecuting') }}\n\t\t\t</template>\n\t\t</n8n-tooltip>\n\t\t<p :class=\"$style.label\" v-text=\"$locale.baseText('nodeView.canvasAddButton.addFirstStep')\" />\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { XYPosition } from '@/Interface';\nimport { useNodeCreatorStore } from '@/stores/nodeCreator.store';\n\nexport interface Props {\n\tshowTooltip: boolean;\n\tposition: XYPosition;\n}\n\nconst props = defineProps<Props>();\n\nconst nodeCreatorStore = useNodeCreatorStore();\nconst containerCssVars = computed(() => ({\n\t'--trigger-placeholder-left-position': `${props.position[0]}px`,\n\t'--trigger-placeholder-top-position': `${props.position[1]}px`,\n}));\n</script>\n\n<style lang=\"scss\" module>\n.canvasAddButton {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 100px;\n\theight: 100px;\n\tposition: absolute;\n\ttop: var(--trigger-placeholder-top-position);\n\tleft: var(--trigger-placeholder-left-position);\n\t// We have to increase z-index to make sure it's higher than selecting box in NodeView\n\t// otherwise the clicks wouldn't register\n\tz-index: 101;\n\n\t&:hover .button svg path {\n\t\tfill: var(--color-primary);\n\t}\n}\n\n.button {\n\tbackground: var(--color-foreground-xlight);\n\tborder: 2px dashed var(--color-foreground-xdark);\n\tborder-radius: 8px;\n\tpadding: 0;\n\n\tmin-width: 100px;\n\tmin-height: 100px;\n\tcursor: pointer;\n\n\tsvg {\n\t\twidth: 26px !important;\n\t\theight: 40px;\n\t\tpath {\n\t\t\tfill: var(--color-foreground-xdark);\n\t\t}\n\t}\n}\n\n.label {\n\twidth: max-content;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: var(--font-line-height-xloose);\n\tcolor: var(--color-text-dark);\n\tmargin-top: var(--spacing-2xs);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useAIStore } from '@/stores/ai.store';\nimport { useI18n } from '@/composables/useI18n';\nimport { computed } from 'vue';\nimport { useTelemetry } from '@/composables/useTelemetry';\n\nconst aiStore = useAIStore();\nconst locale = useI18n();\nconst telemetry = useTelemetry();\n\nconst emit = defineEmits<{ (event: 'optionSelected', option: string): void }>();\n\nconst aiAssistantChatOpen = computed(() => aiStore.assistantChatOpen);\n\nconst title = computed(() => {\n\treturn aiStore.nextStepPopupConfig.title;\n});\n\nconst options = computed(() => [\n\t{\n\t\tlabel: locale.baseText('nextStepPopup.option.choose'),\n\t\ticon: '➕',\n\t\tkey: 'choose',\n\t\tdisabled: false,\n\t},\n\t{\n\t\tlabel: locale.baseText('nextStepPopup.option.generate'),\n\t\ticon: '✨',\n\t\tkey: 'generate',\n\t\tdisabled: aiAssistantChatOpen.value,\n\t},\n]);\n\nconst position = computed(() => {\n\treturn [aiStore.nextStepPopupConfig.position[0], aiStore.nextStepPopupConfig.position[1]];\n});\n\nconst style = computed(() => {\n\treturn {\n\t\tleft: `${position.value[0]}px`,\n\t\ttop: `${position.value[1]}px`,\n\t};\n});\n\nconst close = () => {\n\taiStore.closeNextStepPopup();\n};\n\nconst onOptionSelected = (option: string) => {\n\tif (option === 'choose') {\n\t\temit('optionSelected', option);\n\t} else if (option === 'generate') {\n\t\ttelemetry.track('User clicked generate AI button', {}, { withPostHog: true });\n\t\taiStore.assistantChatOpen = true;\n\t}\n\tclose();\n};\n</script>\n\n<template>\n\t<div v-on-click-outside=\"close\" :class=\"$style.container\" :style=\"style\">\n\t\t<div :class=\"$style.title\">{{ title }}</div>\n\t\t<ul :class=\"$style.options\">\n\t\t\t<li\n\t\t\t\tv-for=\"option in options\"\n\t\t\t\t:key=\"option.key\"\n\t\t\t\t:class=\"{ [$style.option]: true, [$style.disabled]: option.disabled }\"\n\t\t\t\t@click=\"onOptionSelected(option.key)\"\n\t\t\t>\n\t\t\t\t<div :class=\"$style.icon\">\n\t\t\t\t\t{{ option.icon }}\n\t\t\t\t</div>\n\t\t\t\t<div :class=\"$style.label\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</template>\n\n<style module lang=\"scss\">\n.container {\n\tposition: fixed;\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-width: 190px;\n\tfont-size: var(--font-size-2xs);\n\tbackground: var(--color-background-xlight);\n\tfilter: drop-shadow(0px 6px 16px #441c170f);\n\tborder: var(--border-width-base) var(--border-style-base) var(--color-foreground-light);\n\tborder-radius: var(--border-radius-base);\n\n\t// Arrow border is created as the outer triange\n\t&:before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t\tleft: -11px;\n\t\ttop: calc(50% - 8px);\n\t\tborder-top: 10px solid transparent;\n\t\tborder-bottom: 10px solid transparent;\n\t\tborder-right: 10px solid var(--color-foreground-light);\n\t\tposition: absolute;\n\t}\n\n\t// Arrow background is created as the inner triangle\n\t&:after {\n\t\tcontent: '';\n\t\tposition: relative;\n\t\tleft: -10px;\n\t\ttop: calc(50% - 8px);\n\t\tborder-top: 10px solid transparent;\n\t\tborder-bottom: 10px solid transparent;\n\t\tborder-right: 10px solid var(--color-background-xlight);\n\t\tposition: absolute;\n\t}\n}\n\n.title {\n\tpadding: var(--spacing-xs);\n\tcolor: var(--color-text-base);\n\tfont-weight: var(--font-weight-bold);\n}\n\n.options {\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding-bottom: var(--spacing-2xs);\n}\n\n.option {\n\tdisplay: flex;\n\tpadding: var(--spacing-3xs) var(--spacing-xs);\n\tgap: var(--spacing-xs);\n\tcursor: pointer;\n\tcolor: var(--color-text-dark);\n\n\t&:hover {\n\t\tbackground: var(--color-background-base);\n\t\tfont-weight: var(--font-weight-bold);\n\t}\n\n\t&.disabled {\n\t\tpointer-events: none;\n\t\tcolor: var(--color-text-light);\n\t}\n}\n</style>\n","import type { Ref } from 'vue';\nimport { ref, unref } from 'vue';\n\nimport { getMousePosition } from '@/utils/nodeViewUtils';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useDeviceSupport } from 'n8n-design-system';\nimport { MOUSE_EVENT_BUTTON, MOUSE_EVENT_BUTTONS } from '@/constants';\n\n/**\n * Composable for handling canvas panning interactions - it facilitates the movement of the\n * canvas element in response to mouse events\n */\nexport function useCanvasPanning(\n\telementRef: Ref<null | HTMLElement>,\n\toptions: {\n\t\t// @TODO To be refactored (unref) when migrating NodeView to composition API\n\t\tonMouseMoveEnd?: Ref<null | ((e: MouseEvent) => void)>;\n\t} = {},\n) {\n\tconst uiStore = useUIStore();\n\tconst moveLastPosition = ref([0, 0]);\n\tconst deviceSupport = useDeviceSupport();\n\n\t/**\n\t * Updates the canvas offset position based on the mouse movement\n\t */\n\tfunction panCanvas(e: MouseEvent | TouchEvent) {\n\t\tconst offsetPosition = uiStore.nodeViewOffsetPosition;\n\n\t\tconst [x, y] = getMousePosition(e);\n\n\t\tconst nodeViewOffsetPositionX = offsetPosition[0] + (x - moveLastPosition.value[0]);\n\t\tconst nodeViewOffsetPositionY = offsetPosition[1] + (y - moveLastPosition.value[1]);\n\t\tuiStore.nodeViewOffsetPosition = [nodeViewOffsetPositionX, nodeViewOffsetPositionY];\n\n\t\t// Update the last position\n\t\tmoveLastPosition.value = [x, y];\n\n\t\treturn [nodeViewOffsetPositionX, nodeViewOffsetPositionY];\n\t}\n\n\t/**\n\t * Initiates the panning process when specific conditions are met (middle mouse or ctrl key pressed)\n\t */\n\tfunction onMouseDown(e: MouseEvent, moveButtonPressed: boolean) {\n\t\tif (!(deviceSupport.isCtrlKeyPressed(e) || moveButtonPressed)) {\n\t\t\t// We only care about it when the ctrl key is pressed at the same time.\n\t\t\t// So we exit when it is not pressed.\n\t\t\treturn;\n\t\t}\n\n\t\tif (uiStore.isActionActive('dragActive')) {\n\t\t\t// If a node does currently get dragged we do not activate the selection\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent moving canvas on anything but middle button\n\t\tif (e.button !== MOUSE_EVENT_BUTTON.MIDDLE) {\n\t\t\tuiStore.nodeViewMoveInProgress = true;\n\t\t}\n\n\t\tconst [x, y] = getMousePosition(e);\n\n\t\tmoveLastPosition.value = [x, y];\n\n\t\tconst element = unref(elementRef);\n\t\telement?.addEventListener('mousemove', onMouseMove);\n\t}\n\n\t/**\n\t * Ends the panning process and removes the mousemove event listener\n\t */\n\tfunction onMouseUp() {\n\t\tif (!uiStore.nodeViewMoveInProgress) {\n\t\t\t// If it is not active return directly.\n\t\t\t// Else normal node dragging will not work.\n\t\t\treturn;\n\t\t}\n\n\t\tconst element = unref(elementRef);\n\t\telement?.removeEventListener('mousemove', onMouseMove);\n\n\t\tuiStore.nodeViewMoveInProgress = false;\n\n\t\t// Nothing else to do. Simply leave the node view at the current offset\n\t}\n\n\t/**\n\t * Handles the actual movement of the canvas during a mouse drag,\n\t * updating the position based on the current mouse position\n\t */\n\tfunction onMouseMove(e: MouseEvent | TouchEvent) {\n\t\tconst element = unref(elementRef);\n\t\tif (e.target && !(element === e.target || element?.contains(e.target as Node))) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (uiStore.isActionActive('dragActive')) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Signal that moving canvas is active if middle button is pressed and mouse is moved\n\t\tif (e instanceof MouseEvent && e.buttons === MOUSE_EVENT_BUTTONS.MIDDLE) {\n\t\t\tuiStore.nodeViewMoveInProgress = true;\n\t\t}\n\n\t\tif (e instanceof MouseEvent && e.buttons === MOUSE_EVENT_BUTTONS.NONE) {\n\t\t\t// Mouse button is not pressed anymore so stop selection mode\n\t\t\t// Happens normally when mouse leave the view pressed and then\n\t\t\t// comes back unpressed.\n\t\t\tconst onMouseMoveEnd = unref(options.onMouseMoveEnd);\n\t\t\tonMouseMoveEnd?.(e);\n\t\t\treturn;\n\t\t}\n\n\t\tpanCanvas(e);\n\t}\n\n\treturn {\n\t\tmoveLastPosition,\n\t\tonMouseDown,\n\t\tonMouseUp,\n\t\tonMouseMove,\n\t\tpanCanvas,\n\t};\n}\n","<template>\n\t<div ref=\"nodeViewRootRef\" :class=\"$style['content']\">\n\t\t<div\n\t\t\tid=\"node-view-root\"\n\t\t\tclass=\"node-view-root do-not-select\"\n\t\t\tdata-test-id=\"node-view-root\"\n\t\t\t@dragover=\"onDragOver\"\n\t\t\t@drop=\"onDrop\"\n\t\t>\n\t\t\t<div\n\t\t\t\tv-touch:tap=\"touchTap\"\n\t\t\t\tclass=\"node-view-wrapper\"\n\t\t\t\t:class=\"workflowClasses\"\n\t\t\t\tdata-test-id=\"node-view-wrapper\"\n\t\t\t\t@touchstart=\"mouseDown\"\n\t\t\t\t@touchend=\"mouseUp\"\n\t\t\t\t@touchmove=\"canvasPanning.onMouseMove\"\n\t\t\t\t@mousedown=\"mouseDown\"\n\t\t\t\t@mouseup=\"mouseUp\"\n\t\t\t\t@contextmenu=\"contextMenu.open\"\n\t\t\t\t@wheel=\"canvasStore.wheelScroll\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tid=\"node-view-background\"\n\t\t\t\t\tclass=\"node-view-background\"\n\t\t\t\t\t:style=\"backgroundStyle\"\n\t\t\t\t\tdata-test-id=\"node-view-background\"\n\t\t\t\t/>\n\t\t\t\t<div\n\t\t\t\t\tid=\"node-view\"\n\t\t\t\t\tref=\"nodeViewRef\"\n\t\t\t\t\tclass=\"node-view\"\n\t\t\t\t\t:style=\"workflowStyle\"\n\t\t\t\t\tdata-test-id=\"node-view\"\n\t\t\t\t>\n\t\t\t\t\t<CanvasAddButton\n\t\t\t\t\t\tv-show=\"showCanvasAddButton\"\n\t\t\t\t\t\tref=\"canvasAddButton\"\n\t\t\t\t\t\t:style=\"canvasAddButtonStyle\"\n\t\t\t\t\t\t:show-tooltip=\"!containsTrigger && showTriggerMissingTooltip\"\n\t\t\t\t\t\t:position=\"canvasStore.canvasAddButtonPosition\"\n\t\t\t\t\t\tdata-test-id=\"canvas-add-button\"\n\t\t\t\t\t\t@click=\"onCanvasAddButtonCLick\"\n\t\t\t\t\t\t@hook:mounted=\"canvasStore.setRecenteredCanvasAddButtonPosition\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Node\n\t\t\t\t\t\tv-for=\"nodeData in nodesToRender\"\n\t\t\t\t\t\t:key=\"`${nodeData.id}_node`\"\n\t\t\t\t\t\t:name=\"nodeData.name\"\n\t\t\t\t\t\t:is-read-only=\"isReadOnlyRoute || readOnlyEnv\"\n\t\t\t\t\t\t:instance=\"instance\"\n\t\t\t\t\t\t:is-active=\"!!activeNode && activeNode.name === nodeData.name\"\n\t\t\t\t\t\t:hide-actions=\"pullConnActive\"\n\t\t\t\t\t\t:is-production-execution-preview=\"isProductionExecutionPreview\"\n\t\t\t\t\t\t:workflow=\"currentWorkflowObject\"\n\t\t\t\t\t\t:disable-pointer-events=\"!canOpenNDV\"\n\t\t\t\t\t\t:hide-node-issues=\"hideNodeIssues\"\n\t\t\t\t\t\t@deselect-all-nodes=\"deselectAllNodes\"\n\t\t\t\t\t\t@deselect-node=\"nodeDeselectedByName\"\n\t\t\t\t\t\t@node-selected=\"nodeSelectedByName\"\n\t\t\t\t\t\t@run-workflow=\"onRunNode\"\n\t\t\t\t\t\t@moved=\"onNodeMoved\"\n\t\t\t\t\t\t@run=\"onNodeRun\"\n\t\t\t\t\t\t@remove-node=\"(name) => removeNode(name, true)\"\n\t\t\t\t\t\t@toggle-disable-node=\"(node) => toggleActivationNodes([node])\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<template #custom-tooltip>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tv-text=\"$locale.baseText('nodeView.canvasAddButton.addATriggerNodeBeforeExecuting')\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</Node>\n\t\t\t\t\t<Sticky\n\t\t\t\t\t\tv-for=\"stickyData in stickiesToRender\"\n\t\t\t\t\t\t:key=\"`${stickyData.id}_sticky`\"\n\t\t\t\t\t\t:name=\"stickyData.name\"\n\t\t\t\t\t\t:workflow=\"currentWorkflowObject\"\n\t\t\t\t\t\t:is-read-only=\"isReadOnlyRoute || readOnlyEnv\"\n\t\t\t\t\t\t:instance=\"instance\"\n\t\t\t\t\t\t:is-active=\"!!activeNode && activeNode.name === stickyData.name\"\n\t\t\t\t\t\t:node-view-scale=\"nodeViewScale\"\n\t\t\t\t\t\t:grid-size=\"GRID_SIZE\"\n\t\t\t\t\t\t:hide-actions=\"pullConnActive\"\n\t\t\t\t\t\t@deselect-all-nodes=\"deselectAllNodes\"\n\t\t\t\t\t\t@deselect-node=\"nodeDeselectedByName\"\n\t\t\t\t\t\t@node-selected=\"nodeSelectedByName\"\n\t\t\t\t\t\t@remove-node=\"(name) => removeNode(name, true)\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<NodeDetailsView\n\t\t\t\t:read-only=\"isReadOnlyRoute || readOnlyEnv\"\n\t\t\t\t:renaming=\"renamingActive\"\n\t\t\t\t:is-production-execution-preview=\"isProductionExecutionPreview\"\n\t\t\t\t@redraw-node=\"redrawNode\"\n\t\t\t\t@switch-selected-node=\"onSwitchSelectedNode\"\n\t\t\t\t@open-connection-node-creator=\"onOpenConnectionNodeCreator\"\n\t\t\t\t@value-changed=\"valueChanged\"\n\t\t\t\t@stop-execution=\"stopExecution\"\n\t\t\t\t@save-keyboard-shortcut=\"onSaveKeyboardShortcut\"\n\t\t\t/>\n\t\t\t<Suspense>\n\t\t\t\t<div :class=\"$style.setupCredentialsButtonWrapper\">\n\t\t\t\t\t<SetupWorkflowCredentialsButton />\n\t\t\t\t</div>\n\t\t\t</Suspense>\n\t\t\t<Suspense>\n\t\t\t\t<NodeCreation\n\t\t\t\t\tv-if=\"!isReadOnlyRoute && !readOnlyEnv\"\n\t\t\t\t\t:create-node-active=\"createNodeActive\"\n\t\t\t\t\t:node-view-scale=\"nodeViewScale\"\n\t\t\t\t\t@toggle-node-creator=\"onToggleNodeCreator\"\n\t\t\t\t\t@add-nodes=\"onAddNodes\"\n\t\t\t\t/>\n\t\t\t</Suspense>\n\t\t\t<Suspense>\n\t\t\t\t<CanvasControls />\n\t\t\t</Suspense>\n\t\t\t<Suspense>\n\t\t\t\t<ContextMenu @action=\"onContextMenuAction\" />\n\t\t\t</Suspense>\n\t\t\t<Suspense>\n\t\t\t\t<NextStepPopup v-show=\"isNextStepPopupVisible\" @option-selected=\"onNextStepSelected\" />\n\t\t\t</Suspense>\n\t\t\t<div v-if=\"!isReadOnlyRoute && !readOnlyEnv\" class=\"workflow-execute-wrapper\">\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"!isManualChatOnly\"\n\t\t\t\t\t@mouseenter=\"showTriggerMissingToltip(true)\"\n\t\t\t\t\t@mouseleave=\"showTriggerMissingToltip(false)\"\n\t\t\t\t\t@click=\"onRunContainerClick\"\n\t\t\t\t>\n\t\t\t\t\t<KeyboardShortcutTooltip\n\t\t\t\t\t\t:label=\"runButtonText\"\n\t\t\t\t\t\t:shortcut=\"{ metaKey: true, keys: ['↵'] }\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<n8n-button\n\t\t\t\t\t\t\t:loading=\"workflowRunning\"\n\t\t\t\t\t\t\t:label=\"runButtonText\"\n\t\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\t\ticon=\"flask\"\n\t\t\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\t\t\t:disabled=\"isExecutionDisabled\"\n\t\t\t\t\t\t\tdata-test-id=\"execute-workflow-button\"\n\t\t\t\t\t\t\t@click.stop=\"onRunWorkflow\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</KeyboardShortcutTooltip>\n\t\t\t\t</span>\n\n\t\t\t\t<n8n-button\n\t\t\t\t\tv-if=\"containsChatNodes\"\n\t\t\t\t\tlabel=\"Chat\"\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\ticon=\"comment\"\n\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\tdata-test-id=\"workflow-chat-button\"\n\t\t\t\t\t@click.stop=\"onOpenChat\"\n\t\t\t\t/>\n\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\tv-if=\"workflowRunning === true && !executionWaitingForWebhook\"\n\t\t\t\t\ticon=\"stop\"\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\tclass=\"stop-execution\"\n\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t:title=\"\n\t\t\t\t\t\tstopExecutionInProgress\n\t\t\t\t\t\t\t? $locale.baseText('nodeView.stoppingCurrentExecution')\n\t\t\t\t\t\t\t: $locale.baseText('nodeView.stopCurrentExecution')\n\t\t\t\t\t\"\n\t\t\t\t\t:loading=\"stopExecutionInProgress\"\n\t\t\t\t\tdata-test-id=\"stop-execution-button\"\n\t\t\t\t\t@click.stop=\"stopExecution\"\n\t\t\t\t/>\n\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\tv-if=\"workflowRunning === true && executionWaitingForWebhook === true\"\n\t\t\t\t\tclass=\"stop-execution\"\n\t\t\t\t\ticon=\"stop\"\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t:title=\"$locale.baseText('nodeView.stopWaitingForWebhookCall')\"\n\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\tdata-test-id=\"stop-execution-waiting-for-webhook-button\"\n\t\t\t\t\t@click.stop=\"stopWaitingForWebhook\"\n\t\t\t\t/>\n\n\t\t\t\t<n8n-icon-button\n\t\t\t\t\tv-if=\"\n\t\t\t\t\t\t!isReadOnlyRoute &&\n\t\t\t\t\t\t!readOnlyEnv &&\n\t\t\t\t\t\tworkflowExecution &&\n\t\t\t\t\t\t!workflowRunning &&\n\t\t\t\t\t\t!allTriggersDisabled\n\t\t\t\t\t\"\n\t\t\t\t\t:title=\"$locale.baseText('nodeView.deletesTheCurrentExecutionData')\"\n\t\t\t\t\ticon=\"trash\"\n\t\t\t\t\tsize=\"large\"\n\t\t\t\t\tdata-test-id=\"clear-execution-data-button\"\n\t\t\t\t\t@click.stop=\"clearExecutionData\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script lang=\"ts\">\nimport { defineAsyncComponent, defineComponent, nextTick, ref } from 'vue';\nimport { mapStores, storeToRefs } from 'pinia';\n\nimport type {\n\tEndpoint,\n\tConnection,\n\tConnectionEstablishedParams,\n\tBeforeDropParams,\n\tConnectionDetachedParams,\n\tConnectionMovedParams,\n\tComponentParameters,\n} from '@jsplumb/core';\nimport {\n\tEVENT_CONNECTION,\n\tEVENT_CONNECTION_DETACHED,\n\tEVENT_CONNECTION_MOVED,\n\tINTERCEPT_BEFORE_DROP,\n} from '@jsplumb/core';\nimport type { NotificationHandle } from 'element-plus';\n\nimport {\n\tFIRST_ONBOARDING_PROMPT_TIMEOUT,\n\tMAIN_HEADER_TABS,\n\tMODAL_CANCEL,\n\tMODAL_CONFIRM,\n\tONBOARDING_CALL_SIGNUP_MODAL_KEY,\n\tONBOARDING_PROMPT_TIMEBOX,\n\tPLACEHOLDER_EMPTY_WORKFLOW_ID,\n\tQUICKSTART_NOTE_NAME,\n\tSTART_NODE_TYPE,\n\tSTICKY_NODE_TYPE,\n\tVIEWS,\n\tWEBHOOK_NODE_TYPE,\n\tFORM_TRIGGER_NODE_TYPE,\n\tTRIGGER_NODE_CREATOR_VIEW,\n\tEnterpriseEditionFeature,\n\tREGULAR_NODE_CREATOR_VIEW,\n\tNODE_CREATOR_OPEN_SOURCES,\n\tCHAT_TRIGGER_NODE_TYPE,\n\tMANUAL_CHAT_TRIGGER_NODE_TYPE,\n\tWORKFLOW_LM_CHAT_MODAL_KEY,\n\tAI_NODE_CREATOR_VIEW,\n\tDRAG_EVENT_DATA_KEY,\n\tUPDATE_WEBHOOK_ID_NODE_TYPES,\n\tTIME,\n\tAI_ASSISTANT_LOCAL_STORAGE_KEY,\n\tCANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT,\n} from '@/constants';\n\nimport useGlobalLinkActions from '@/composables/useGlobalLinkActions';\nimport { useNodeHelpers } from '@/composables/useNodeHelpers';\nimport useCanvasMouseSelect from '@/composables/useCanvasMouseSelect';\nimport { useExecutionDebugging } from '@/composables/useExecutionDebugging';\nimport { useTitleChange } from '@/composables/useTitleChange';\nimport { useDataSchema } from '@/composables/useDataSchema';\nimport { type ContextMenuAction, useContextMenu } from '@/composables/useContextMenu';\nimport { useUniqueNodeName } from '@/composables/useUniqueNodeName';\nimport { useI18n } from '@/composables/useI18n';\nimport { useMessage } from '@/composables/useMessage';\nimport { useToast } from '@/composables/useToast';\n\nimport NodeDetailsView from '@/components/NodeDetailsView.vue';\nimport ContextMenu from '@/components/ContextMenu/ContextMenu.vue';\nimport Node from '@/components/Node.vue';\nimport Sticky from '@/components/Sticky.vue';\nimport CanvasAddButton from './CanvasAddButton.vue';\nimport KeyboardShortcutTooltip from '@/components/KeyboardShortcutTooltip.vue';\nimport NextStepPopup from '@/components/AIAssistantChat/NextStepPopup.vue';\nimport { v4 as uuid } from 'uuid';\nimport type {\n\tIConnection,\n\tIConnections,\n\tIDataObject,\n\tExecutionSummary,\n\tINode,\n\tINodeConnections,\n\tINodeCredentialsDetails,\n\tINodeInputConfiguration,\n\tINodeTypeDescription,\n\tINodeTypeNameVersion,\n\tIPinData,\n\tITaskData,\n\tITelemetryTrackProperties,\n\tIWorkflowBase,\n\tWorkflow,\n\tConnectionTypes,\n\tINodeOutputConfiguration,\n\tIRun,\n} from 'n8n-workflow';\nimport {\n\tdeepCopy,\n\tjsonParse,\n\tNodeConnectionType,\n\tnodeConnectionTypes,\n\tNodeHelpers,\n\tTelemetryHelpers,\n} from 'n8n-workflow';\nimport type {\n\tNewConnectionInfo,\n\tICredentialsResponse,\n\tIExecutionResponse,\n\tIWorkflowDb,\n\tIWorkflowData,\n\tINodeUi,\n\tIUpdateInformation,\n\tIWorkflowDataUpdate,\n\tXYPosition,\n\tITag,\n\tINewWorkflowData,\n\tIWorkflowTemplate,\n\tIWorkflowToShare,\n\tIUser,\n\tINodeUpdatePropertiesInformation,\n\tNodeCreatorOpenSource,\n\tAddedNodesAndConnections,\n\tToggleNodeCreatorOptions,\n\tIPushDataExecutionFinished,\n\tAIAssistantConnectionInfo,\n\tNodeFilterType,\n} from '@/Interface';\n\nimport { type RouteLocation, useRouter } from 'vue-router';\nimport { dataPinningEventBus, nodeViewEventBus } from '@/event-bus';\nimport { useCanvasStore } from '@/stores/canvas.store';\nimport { useCollaborationStore } from '@/stores/collaboration.store';\nimport { useCredentialsStore } from '@/stores/credentials.store';\nimport { useEnvironmentsStore } from '@/stores/environments.ee.store';\nimport { useExternalSecretsStore } from '@/stores/externalSecrets.ee.store';\nimport { useHistoryStore } from '@/stores/history.store';\nimport { useNDVStore } from '@/stores/ndv.store';\nimport { useNodeCreatorStore } from '@/stores/nodeCreator.store';\nimport { useNodeTypesStore } from '@/stores/nodeTypes.store';\nimport { usePushConnectionStore } from '@/stores/pushConnection.store';\nimport { useRootStore } from '@/stores/root.store';\nimport { useSegment } from '@/stores/segment.store';\nimport { useSettingsStore } from '@/stores/settings.store';\nimport { useTagsStore } from '@/stores/tags.store';\nimport { useTemplatesStore } from '@/stores/templates.store';\nimport { useUIStore } from '@/stores/ui.store';\nimport { useUsersStore } from '@/stores/users.store';\nimport { useWorkflowsEEStore } from '@/stores/workflows.ee.store';\nimport { useWorkflowsStore } from '@/stores/workflows.store';\nimport * as NodeViewUtils from '@/utils/nodeViewUtils';\nimport { getAccountAge } from '@/utils/userUtils';\nimport { getConnectionInfo, getNodeViewTab } from '@/utils/canvasUtils';\nimport {\n\tAddConnectionCommand,\n\tAddNodeCommand,\n\tMoveNodeCommand,\n\tRemoveConnectionCommand,\n\tRemoveNodeCommand,\n\tRenameNodeCommand,\n\thistoryBus,\n} from '@/models/history';\nimport type { BrowserJsPlumbInstance } from '@jsplumb/browser-ui';\nimport {\n\tEVENT_ENDPOINT_MOUSEOVER,\n\tEVENT_ENDPOINT_MOUSEOUT,\n\tEVENT_DRAG_MOVE,\n\tEVENT_CONNECTION_DRAG,\n\tEVENT_CONNECTION_ABORT,\n\tEVENT_CONNECTION_MOUSEOUT,\n\tEVENT_CONNECTION_MOUSEOVER,\n\tready,\n} from '@jsplumb/browser-ui';\nimport type { N8nPlusEndpoint } from '@/plugins/jsplumb/N8nPlusEndpointType';\nimport {\n\tN8nPlusEndpointType,\n\tEVENT_PLUS_ENDPOINT_CLICK,\n} from '@/plugins/jsplumb/N8nPlusEndpointType';\nimport type { N8nAddInputEndpoint } from '@/plugins/jsplumb/N8nAddInputEndpointType';\nimport {\n\tEVENT_ADD_INPUT_ENDPOINT_CLICK,\n\tN8nAddInputEndpointType,\n} from '@/plugins/jsplumb/N8nAddInputEndpointType';\nimport { sourceControlEventBus } from '@/event-bus/source-control';\nimport {\n\tgetConnectorPaintStyleData,\n\tOVERLAY_ENDPOINT_ARROW_ID,\n\tgetEndpointScope,\n} from '@/utils/nodeViewUtils';\nimport { useViewStacks } from '@/components/Node/NodeCreator/composables/useViewStacks';\nimport { useExternalHooks } from '@/composables/useExternalHooks';\nimport { useClipboard } from '@/composables/useClipboard';\nimport { usePinnedData } from '@/composables/usePinnedData';\nimport { useSourceControlStore } from '@/stores/sourceControl.store';\nimport { useDeviceSupport } from 'n8n-design-system';\nimport { useDebounce } from '@/composables/useDebounce';\nimport { useExecutionsStore } from '@/stores/executions.store';\nimport { useCanvasPanning } from '@/composables/useCanvasPanning';\nimport { tryToParseNumber } from '@/utils/typesUtils';\nimport { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';\nimport { useRunWorkflow } from '@/composables/useRunWorkflow';\nimport { useProjectsStore } from '@/stores/projects.store';\nimport type { ProjectSharingData } from '@/types/projects.types';\nimport { useAIStore } from '@/stores/ai.store';\nimport { useStorage } from '@/composables/useStorage';\nimport { isJSPlumbEndpointElement, isJSPlumbConnection } from '@/utils/typeGuards';\nimport { usePostHog } from '@/stores/posthog.store';\nimport { useNpsSurveyStore } from '@/stores/npsSurvey.store';\n\ninterface AddNodeOptions {\n\tposition?: XYPosition;\n\tdragAndDrop?: boolean;\n\tname?: string;\n}\n\nconst NodeCreation = defineAsyncComponent(\n\tasync () => await import('@/components/Node/NodeCreation.vue'),\n);\nconst CanvasControls = defineAsyncComponent(\n\tasync () => await import('@/components/CanvasControls.vue'),\n);\nconst SetupWorkflowCredentialsButton = defineAsyncComponent(\n\tasync () =>\n\t\tawait import('@/components/SetupWorkflowCredentialsButton/SetupWorkflowCredentialsButton.vue'),\n);\n\nexport default defineComponent({\n\tname: 'NodeView',\n\tcomponents: {\n\t\tNodeDetailsView,\n\t\tNode,\n\t\tSticky,\n\t\tCanvasAddButton,\n\t\tKeyboardShortcutTooltip,\n\t\tNodeCreation,\n\t\tCanvasControls,\n\t\tContextMenu,\n\t\tSetupWorkflowCredentialsButton,\n\t\tNextStepPopup,\n\t},\n\tasync beforeRouteLeave(to, from, next) {\n\t\tif (\n\t\t\tgetNodeViewTab(to) === MAIN_HEADER_TABS.EXECUTIONS ||\n\t\t\tfrom.name === VIEWS.TEMPLATE_IMPORT ||\n\t\t\t(getNodeViewTab(to) === MAIN_HEADER_TABS.WORKFLOW && from.name === VIEWS.EXECUTION_DEBUG)\n\t\t) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\t\tif (this.uiStore.stateIsDirty && !this.readOnlyEnv) {\n\t\t\tconst confirmModal = await this.confirm(\n\t\t\t\tthis.$locale.baseText('generic.unsavedWork.confirmMessage.message'),\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$locale.baseText('generic.unsavedWork.confirmMessage.headline'),\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\tconfirmButtonText: this.$locale.baseText(\n\t\t\t\t\t\t'generic.unsavedWork.confirmMessage.confirmButtonText',\n\t\t\t\t\t),\n\t\t\t\t\tcancelButtonText: this.$locale.baseText(\n\t\t\t\t\t\t'generic.unsavedWork.confirmMessage.cancelButtonText',\n\t\t\t\t\t),\n\t\t\t\t\tshowClose: true,\n\t\t\t\t},\n\t\t\t);\n\t\t\tif (confirmModal === MODAL_CONFIRM) {\n\t\t\t\t// Make sure workflow id is empty when leaving the editor\n\t\t\t\tthis.workflowsStore.setWorkflowId(PLACEHOLDER_EMPTY_WORKFLOW_ID);\n\t\t\t\tconst saved = await this.workflowHelpers.saveCurrentWorkflow({}, false);\n\t\t\t\tif (saved) {\n\t\t\t\t\tawait this.npsSurveyStore.fetchPromptsData();\n\t\t\t\t}\n\t\t\t\tthis.uiStore.stateIsDirty = false;\n\n\t\t\t\tif (from.name === VIEWS.NEW_WORKFLOW) {\n\t\t\t\t\t// Replace the current route with the new workflow route\n\t\t\t\t\t// before navigating to the new route when saving new workflow.\n\t\t\t\t\tawait this.$router.replace({\n\t\t\t\t\t\tname: VIEWS.WORKFLOW,\n\t\t\t\t\t\tparams: { name: this.currentWorkflow },\n\t\t\t\t\t});\n\n\t\t\t\t\tawait this.$router.push(to);\n\t\t\t\t} else {\n\t\t\t\t\tthis.collaborationStore.notifyWorkflowClosed(this.currentWorkflow);\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t} else if (confirmModal === MODAL_CANCEL) {\n\t\t\t\tthis.collaborationStore.notifyWorkflowClosed(this.currentWorkflow);\n\t\t\t\tthis.workflowsStore.setWorkflowId(PLACEHOLDER_EMPTY_WORKFLOW_ID);\n\t\t\t\tthis.resetWorkspace();\n\t\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t\t\tnext();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.collaborationStore.notifyWorkflowClosed(this.currentWorkflow);\n\t\t\tnext();\n\t\t}\n\t},\n\tsetup() {\n\t\tconst nodeViewRootRef = ref<HTMLElement | null>(null);\n\t\tconst nodeViewRef = ref<HTMLElement | null>(null);\n\t\tconst onMouseMoveEnd = ref<((e: MouseEvent | TouchEvent) => void) | null>(null);\n\t\tconst router = useRouter();\n\n\t\tconst ndvStore = useNDVStore();\n\t\tconst externalHooks = useExternalHooks();\n\t\tconst locale = useI18n();\n\t\tconst contextMenu = useContextMenu();\n\t\tconst dataSchema = useDataSchema();\n\t\tconst nodeHelpers = useNodeHelpers();\n\t\tconst clipboard = useClipboard();\n\t\tconst { activeNode } = storeToRefs(ndvStore);\n\t\tconst pinnedData = usePinnedData(activeNode);\n\t\tconst deviceSupport = useDeviceSupport();\n\t\tconst { callDebounced } = useDebounce();\n\t\tconst canvasPanning = useCanvasPanning(nodeViewRootRef, { onMouseMoveEnd });\n\t\tconst workflowHelpers = useWorkflowHelpers({ router });\n\t\tconst { runWorkflow, stopCurrentExecution } = useRunWorkflow({ router });\n\n\t\treturn {\n\t\t\tlocale,\n\t\t\tcontextMenu,\n\t\t\tdataSchema,\n\t\t\tnodeHelpers,\n\t\t\texternalHooks,\n\t\t\tclipboard,\n\t\t\tpinnedData,\n\t\t\tdeviceSupport,\n\t\t\tcanvasPanning,\n\t\t\tnodeViewRootRef,\n\t\t\tnodeViewRef,\n\t\t\tonMouseMoveEnd,\n\t\t\tworkflowHelpers,\n\t\t\trunWorkflow,\n\t\t\tstopCurrentExecution,\n\t\t\tcallDebounced,\n\t\t\t...useCanvasMouseSelect(),\n\t\t\t...useGlobalLinkActions(),\n\t\t\t...useTitleChange(),\n\t\t\t...useToast(),\n\t\t\t...useMessage(),\n\t\t\t...useUniqueNodeName(),\n\t\t\t...useExecutionDebugging(),\n\t\t};\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tGRID_SIZE: NodeViewUtils.GRID_SIZE,\n\t\t\tSTICKY_NODE_TYPE,\n\t\t\tcreateNodeActive: false,\n\t\t\tlastClickPosition: [450, 450] as XYPosition,\n\t\t\tctrlKeyPressed: false,\n\t\t\tmoveCanvasKeyPressed: false,\n\t\t\tstopExecutionInProgress: false,\n\t\t\tblankRedirect: false,\n\t\t\tcredentialsUpdated: false,\n\t\t\tpullConnActiveNodeName: null as string | null,\n\t\t\tpullConnActive: false,\n\t\t\tdropPrevented: false,\n\t\t\tconnectionDragScope: {\n\t\t\t\ttype: null,\n\t\t\t\tconnection: null,\n\t\t\t} as { type: string | null; connection: 'source' | 'target' | null },\n\t\t\trenamingActive: false,\n\t\t\tshowStickyButton: false,\n\t\t\tisExecutionPreview: false,\n\t\t\tshowTriggerMissingTooltip: false,\n\t\t\tworkflowData: null as INewWorkflowData | null,\n\t\t\tactiveConnection: null as null | Connection,\n\t\t\tisInsertingNodes: false,\n\t\t\tisProductionExecutionPreview: false,\n\t\t\tenterTimer: undefined as undefined | ReturnType<typeof setTimeout>,\n\t\t\texitTimer: undefined as undefined | ReturnType<typeof setTimeout>,\n\t\t\treadOnlyNotification: null as null | NotificationHandle,\n\t\t\t// jsplumb automatically deletes all loose connections which is in turn recorded\n\t\t\t// in undo history as a user action.\n\t\t\t// This should prevent automatically removed connections from populating undo stack\n\t\t\tsuspendRecordingDetachedConnections: false,\n\t\t\tNODE_CREATOR_OPEN_SOURCES,\n\t\t\teventsAttached: false,\n\t\t\tunloadTimeout: undefined as undefined | ReturnType<typeof setTimeout>,\n\t\t\tcanOpenNDV: true,\n\t\t\thideNodeIssues: false,\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapStores(\n\t\t\tuseCanvasStore,\n\t\t\tuseTagsStore,\n\t\t\tuseCredentialsStore,\n\t\t\tuseNodeCreatorStore,\n\t\t\tuseNodeTypesStore,\n\t\t\tuseNDVStore,\n\t\t\tuseRootStore,\n\t\t\tuseSettingsStore,\n\t\t\tuseTemplatesStore,\n\t\t\tuseUIStore,\n\t\t\tuseWorkflowsStore,\n\t\t\tuseUsersStore,\n\t\t\tuseNodeCreatorStore,\n\t\t\tuseEnvironmentsStore,\n\t\t\tuseWorkflowsEEStore,\n\t\t\tuseHistoryStore,\n\t\t\tuseExternalSecretsStore,\n\t\t\tuseCollaborationStore,\n\t\t\tusePushConnectionStore,\n\t\t\tuseSourceControlStore,\n\t\t\tuseExecutionsStore,\n\t\t\tuseProjectsStore,\n\t\t\tuseAIStore,\n\t\t\tuseNpsSurveyStore,\n\t\t),\n\t\tnativelyNumberSuffixedDefaults(): string[] {\n\t\t\treturn this.nodeTypesStore.nativelyNumberSuffixedDefaults;\n\t\t},\n\t\tcurrentUser(): IUser | null {\n\t\t\treturn this.usersStore.currentUser;\n\t\t},\n\t\tactiveNode(): INodeUi | null {\n\t\t\treturn this.ndvStore.activeNode;\n\t\t},\n\t\texecutionWaitingForWebhook(): boolean {\n\t\t\treturn this.workflowsStore.executionWaitingForWebhook;\n\t\t},\n\t\tisDemo(): boolean {\n\t\t\treturn this.$route.name === VIEWS.DEMO;\n\t\t},\n\t\tshowCanvasAddButton(): boolean {\n\t\t\treturn !this.isLoading && !this.containsTrigger && !this.isDemo && !this.readOnlyEnv;\n\t\t},\n\t\tlastSelectedNode(): INodeUi | null {\n\t\t\treturn this.uiStore.getLastSelectedNode;\n\t\t},\n\t\tnodes(): INodeUi[] {\n\t\t\treturn this.workflowsStore.allNodes;\n\t\t},\n\t\tnodesToRender(): INodeUi[] {\n\t\t\treturn this.workflowsStore.allNodes.filter((node) => node.type !== STICKY_NODE_TYPE);\n\t\t},\n\t\tstickiesToRender(): INodeUi[] {\n\t\t\treturn this.workflowsStore.allNodes.filter((node) => node.type === STICKY_NODE_TYPE);\n\t\t},\n\t\trunButtonText(): string {\n\t\t\tif (!this.workflowRunning) {\n\t\t\t\treturn this.$locale.baseText('nodeView.runButtonText.executeWorkflow');\n\t\t\t}\n\n\t\t\tif (this.executionWaitingForWebhook) {\n\t\t\t\treturn this.$locale.baseText('nodeView.runButtonText.waitingForTriggerEvent');\n\t\t\t}\n\n\t\t\treturn this.$locale.baseText('nodeView.runButtonText.executingWorkflow');\n\t\t},\n\t\tworkflowStyle() {\n\t\t\tconst offsetPosition = this.uiStore.nodeViewOffsetPosition;\n\t\t\treturn {\n\t\t\t\tleft: offsetPosition[0] + 'px',\n\t\t\t\ttop: offsetPosition[1] + 'px',\n\t\t\t};\n\t\t},\n\t\tcanvasAddButtonStyle() {\n\t\t\treturn {\n\t\t\t\t'pointer-events': this.createNodeActive ? 'none' : 'all',\n\t\t\t};\n\t\t},\n\t\tbackgroundStyle() {\n\t\t\treturn NodeViewUtils.getBackgroundStyles(\n\t\t\t\tthis.nodeViewScale,\n\t\t\t\tthis.uiStore.nodeViewOffsetPosition,\n\t\t\t\tthis.isExecutionPreview,\n\t\t\t);\n\t\t},\n\t\tworkflowClasses() {\n\t\t\tconst returnClasses = [];\n\t\t\tif (this.ctrlKeyPressed || this.moveCanvasKeyPressed) {\n\t\t\t\tif (this.uiStore.nodeViewMoveInProgress) {\n\t\t\t\t\treturnClasses.push('move-in-process');\n\t\t\t\t} else {\n\t\t\t\t\treturnClasses.push('move-active');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.selectActive || this.ctrlKeyPressed || this.moveCanvasKeyPressed) {\n\t\t\t\t// Makes sure that nothing gets selected while select or move is active\n\t\t\t\treturnClasses.push('do-not-select');\n\t\t\t}\n\n\t\t\tif (this.connectionDragScope.type) {\n\t\t\t\treturnClasses.push('connection-drag-scope-active');\n\t\t\t\treturnClasses.push(`connection-drag-scope-active-type-${this.connectionDragScope.type}`);\n\t\t\t\treturnClasses.push(\n\t\t\t\t\t`connection-drag-scope-active-connection-${this.connectionDragScope.connection}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn returnClasses;\n\t\t},\n\t\tworkflowExecution(): IExecutionResponse | null {\n\t\t\treturn this.workflowsStore.getWorkflowExecution;\n\t\t},\n\t\tworkflowRunning(): boolean {\n\t\t\treturn this.uiStore.isActionActive('workflowRunning');\n\t\t},\n\t\tcurrentWorkflow(): string {\n\t\t\treturn this.$route.params.name?.toString() || this.workflowsStore.workflowId;\n\t\t},\n\t\tworkflowName(): string {\n\t\t\treturn this.workflowsStore.workflowName;\n\t\t},\n\t\tallTriggersDisabled(): boolean {\n\t\t\tconst disabledTriggerNodes = this.triggerNodes.filter((node) => node.disabled);\n\t\t\treturn disabledTriggerNodes.length === this.triggerNodes.length;\n\t\t},\n\t\ttriggerNodes(): INodeUi[] {\n\t\t\treturn this.nodes.filter(\n\t\t\t\t(node) => node.type === START_NODE_TYPE || this.nodeTypesStore.isTriggerNode(node.type),\n\t\t\t);\n\t\t},\n\t\tcontainsTrigger(): boolean {\n\t\t\treturn this.triggerNodes.length > 0;\n\t\t},\n\t\tcontainsChatNodes(): boolean {\n\t\t\treturn (\n\t\t\t\t!this.executionWaitingForWebhook &&\n\t\t\t\t!!this.nodes.find(\n\t\t\t\t\t(node) =>\n\t\t\t\t\t\t[MANUAL_CHAT_TRIGGER_NODE_TYPE, CHAT_TRIGGER_NODE_TYPE].includes(node.type) &&\n\t\t\t\t\t\tnode.disabled !== true,\n\t\t\t\t)\n\t\t\t);\n\t\t},\n\t\tisManualChatOnly(): boolean {\n\t\t\tif (!this.canvasChatNode) return false;\n\n\t\t\treturn this.containsChatNodes && this.triggerNodes.length === 1 && !this.pinnedChatNodeData;\n\t\t},\n\t\tcanvasChatNode() {\n\t\t\treturn this.nodes.find((node) => node.type === CHAT_TRIGGER_NODE_TYPE);\n\t\t},\n\t\tpinnedChatNodeData() {\n\t\t\tif (!this.canvasChatNode) return null;\n\n\t\t\treturn this.workflowsStore.pinDataByNodeName(this.canvasChatNode.name);\n\t\t},\n\t\tisExecutionDisabled(): boolean {\n\t\t\tif (\n\t\t\t\tthis.containsChatNodes &&\n\t\t\t\tthis.triggerNodes.every((node) => node.disabled || node.type === CHAT_TRIGGER_NODE_TYPE) &&\n\t\t\t\t!this.pinnedChatNodeData\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn !this.containsTrigger || this.allTriggersDisabled;\n\t\t},\n\t\tgetNodeViewOffsetPosition(): XYPosition {\n\t\t\treturn this.uiStore.nodeViewOffsetPosition;\n\t\t},\n\t\tnodeViewScale(): number {\n\t\t\treturn this.canvasStore.nodeViewScale;\n\t\t},\n\t\tinstance(): BrowserJsPlumbInstance {\n\t\t\treturn this.canvasStore.jsPlumbInstance;\n\t\t},\n\t\tisLoading(): boolean {\n\t\t\treturn this.canvasStore.isLoading;\n\t\t},\n\t\tcurrentWorkflowObject(): Workflow {\n\t\t\treturn this.workflowsStore.getCurrentWorkflow();\n\t\t},\n\t\treadOnlyEnv(): boolean {\n\t\t\treturn this.sourceControlStore.preferences.branchReadOnly;\n\t\t},\n\t\tisReadOnlyRoute() {\n\t\t\treturn this.$route?.meta?.readOnlyCanvas === true;\n\t\t},\n\t\tisNextStepPopupVisible(): boolean {\n\t\t\treturn this.aiStore.nextStepPopupConfig.open;\n\t\t},\n\t\tshouldShowNextStepDialog(): boolean {\n\t\t\tconst userHasSeenAIAssistantExperiment =\n\t\t\t\tuseStorage(AI_ASSISTANT_LOCAL_STORAGE_KEY).value === 'true';\n\t\t\tconst experimentEnabled = this.aiStore.isAssistantExperimentEnabled;\n\t\t\tconst isCloudDeployment = this.settingsStore.isCloudDeployment;\n\t\t\treturn isCloudDeployment && experimentEnabled && !userHasSeenAIAssistantExperiment;\n\t\t},\n\t},\n\twatch: {\n\t\t// Listen to route changes and load the workflow accordingly\n\t\tasync $route(to: RouteLocation, from: RouteLocation) {\n\t\t\tthis.readOnlyEnvRouteCheck();\n\n\t\t\tconst currentTab = getNodeViewTab(to);\n\t\t\tconst nodeViewNotInitialized = !this.uiStore.nodeViewInitialized;\n\t\t\tlet workflowChanged =\n\t\t\t\tfrom.params.name !== to.params.name &&\n\t\t\t\t// Both 'new' and __EMPTY__ are new workflow names, so ignore them when detecting if wf changed\n\t\t\t\t!(from.params.name === 'new' && this.currentWorkflow === PLACEHOLDER_EMPTY_WORKFLOW_ID) &&\n\t\t\t\t!(from.name === VIEWS.NEW_WORKFLOW) &&\n\t\t\t\t// Also ignore if workflow id changes when saving new workflow\n\t\t\t\tto.params.action !== 'workflowSave';\n\t\t\tconst isOpeningTemplate = to.name === VIEWS.TEMPLATE_IMPORT;\n\n\t\t\t// When entering this tab:\n\t\t\tif (currentTab === MAIN_HEADER_TABS.WORKFLOW || isOpeningTemplate) {\n\t\t\t\tif (workflowChanged || nodeViewNotInitialized || isOpeningTemplate) {\n\t\t\t\t\tthis.canvasStore.startLoading();\n\t\t\t\t\tif (nodeViewNotInitialized) {\n\t\t\t\t\t\tconst previousDirtyState = this.uiStore.stateIsDirty;\n\t\t\t\t\t\tthis.resetWorkspace();\n\t\t\t\t\t\tthis.uiStore.stateIsDirty = previousDirtyState;\n\t\t\t\t\t}\n\t\t\t\t\tawait this.initView();\n\t\t\t\t\tthis.canvasStore.stopLoading();\n\t\t\t\t\tif (this.blankRedirect) {\n\t\t\t\t\t\tthis.blankRedirect = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tawait this.checkAndInitDebugMode();\n\t\t\t}\n\t\t\t// Also, when landing on executions tab, check if workflow data is changed\n\t\t\tif (currentTab === MAIN_HEADER_TABS.EXECUTIONS) {\n\t\t\t\tworkflowChanged =\n\t\t\t\t\tfrom.params.name !== to.params.name &&\n\t\t\t\t\t!(to.params.name === 'new' && from.params.name === undefined);\n\t\t\t\tif (workflowChanged) {\n\t\t\t\t\t// This will trigger node view to update next time workflow tab is opened\n\t\t\t\t\tthis.uiStore.nodeViewInitialized = false;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tactiveNode() {\n\t\t\t// When a node gets set as active deactivate the create-menu\n\t\t\tthis.createNodeActive = false;\n\t\t},\n\t\tcontainsTrigger(containsTrigger) {\n\t\t\t// Re-center CanvasAddButton if there's no triggers\n\t\t\tif (containsTrigger === false)\n\t\t\t\tthis.canvasStore.setRecenteredCanvasAddButtonPosition(this.getNodeViewOffsetPosition);\n\t\t},\n\t\tnodeViewScale(newScale) {\n\t\t\tconst elementRef = this.nodeViewRef;\n\t\t\tif (elementRef) {\n\t\t\t\telementRef.style.transform = `scale(${newScale})`;\n\t\t\t}\n\t\t},\n\t},\n\terrorCaptured: (err) => {\n\t\tconsole.error('errorCaptured');\n\t\tconsole.error(err);\n\t},\n\tasync mounted() {\n\t\t// To be refactored (unref) when migrating to composition API\n\t\tthis.onMouseMoveEnd = this.mouseUp;\n\n\t\tthis.resetWorkspace();\n\t\tif (!this.nodeViewRef) {\n\t\t\tthis.showError(\n\t\t\t\tnew Error('NodeView reference not found'),\n\t\t\t\tthis.$locale.baseText('nodeView.showError.mounted1.title'),\n\t\t\t\tthis.$locale.baseText('nodeView.showError.mounted1.message') + ':',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tthis.canvasStore.initInstance(this.nodeViewRef);\n\t\tthis.titleReset();\n\n\t\twindow.addEventListener('message', this.onPostMessageReceived);\n\n\t\tthis.clipboard.onPaste.value = this.onClipboardPasteEvent;\n\n\t\tthis.canvasStore.startLoading();\n\n\t\tconst loadPromises = (() => {\n\t\t\tif (this.settingsStore.isPreviewMode && this.isDemo) return [];\n\t\t\tconst promises = [this.loadActiveWorkflows(), this.loadCredentialTypes()];\n\t\t\tif (this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Variables)) {\n\t\t\t\tpromises.push(this.loadVariables());\n\t\t\t}\n\t\t\tif (this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.ExternalSecrets)) {\n\t\t\t\tpromises.push(this.loadSecrets());\n\t\t\t}\n\t\t\treturn promises;\n\t\t})();\n\n\t\tif (this.nodeTypesStore.allNodeTypes.length === 0) {\n\t\t\tloadPromises.push(this.loadNodeTypes());\n\t\t}\n\n\t\ttry {\n\t\t\tawait Promise.all(loadPromises);\n\t\t} catch (error) {\n\t\t\tthis.showError(\n\t\t\t\terror,\n\t\t\t\tthis.$locale.baseText('nodeView.showError.mounted1.title'),\n\t\t\t\tthis.$locale.baseText('nodeView.showError.mounted1.message') + ':',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tready(async () => {\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\tthis.bindCanvasEvents();\n\t\t\t\t} catch {} // This will break if mounted after jsplumb has been initiated from executions preview, so continue if it breaks\n\t\t\t\tawait this.initView();\n\t\t\t\tif (window.parent) {\n\t\t\t\t\twindow.parent.postMessage(\n\t\t\t\t\t\tJSON.stringify({ command: 'n8nReady', version: this.rootStore.versionCli }),\n\t\t\t\t\t\t'*',\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('nodeView.showError.mounted2.title'),\n\t\t\t\t\tthis.$locale.baseText('nodeView.showError.mounted2.message') + ':',\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.canvasStore.stopLoading();\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tvoid this.usersStore.showPersonalizationSurvey();\n\t\t\t\tthis.addPinDataConnections(this.workflowsStore.pinnedWorkflowData);\n\t\t\t}, 0);\n\t\t});\n\n\t\t// TODO: This currently breaks since front-end hooks are still not updated to work with pinia store\n\t\tvoid this.externalHooks.run('nodeView.mount').catch(() => {});\n\n\t\tif (\n\t\t\tthis.currentUser?.personalizationAnswers !== null &&\n\t\t\tthis.settingsStore.onboardingCallPromptEnabled &&\n\t\t\tthis.currentUser &&\n\t\t\tgetAccountAge(this.currentUser) <= ONBOARDING_PROMPT_TIMEBOX\n\t\t) {\n\t\t\tconst onboardingResponse = await this.uiStore.getNextOnboardingPrompt();\n\t\t\tconst promptTimeout =\n\t\t\t\tonboardingResponse?.toast_sequence_number === 1 ? FIRST_ONBOARDING_PROMPT_TIMEOUT : 1000;\n\n\t\t\tif (onboardingResponse?.title && onboardingResponse?.description) {\n\t\t\t\tsetTimeout(async () => {\n\t\t\t\t\tthis.showToast({\n\t\t\t\t\t\ttype: 'info',\n\t\t\t\t\t\ttitle: onboardingResponse.title,\n\t\t\t\t\t\tmessage: onboardingResponse.description,\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t\tcustomClass: 'clickable',\n\t\t\t\t\t\tcloseOnClick: true,\n\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\tthis.$telemetry.track('user clicked onboarding toast', {\n\t\t\t\t\t\t\t\tseq_num: onboardingResponse.toast_sequence_number,\n\t\t\t\t\t\t\t\ttitle: onboardingResponse.title,\n\t\t\t\t\t\t\t\tdescription: onboardingResponse.description,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.uiStore.openModal(ONBOARDING_CALL_SIGNUP_MODAL_KEY);\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}, promptTimeout);\n\t\t\t}\n\t\t}\n\n\t\tsourceControlEventBus.on('pull', this.onSourceControlPull);\n\n\t\tthis.registerCustomAction({\n\t\t\tkey: 'openNodeDetail',\n\t\t\taction: ({ node }: { node: string }) => {\n\t\t\t\tthis.nodeSelectedByName(node, true);\n\t\t\t},\n\t\t});\n\n\t\tthis.registerCustomAction({\n\t\t\tkey: 'openSelectiveNodeCreator',\n\t\t\taction: this.openSelectiveNodeCreator,\n\t\t});\n\n\t\tthis.registerCustomAction({\n\t\t\tkey: 'showNodeCreator',\n\t\t\taction: () => {\n\t\t\t\tthis.ndvStore.activeNodeName = null;\n\n\t\t\t\tvoid this.$nextTick(() => {\n\t\t\t\t\tthis.showTriggerCreator(NODE_CREATOR_OPEN_SOURCES.TAB);\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\n\t\tthis.readOnlyEnvRouteCheck();\n\t\tthis.canvasStore.isDemo = this.isDemo;\n\t},\n\tactivated() {\n\t\tconst openSideMenu = this.uiStore.addFirstStepOnLoad;\n\t\tif (openSideMenu) {\n\t\t\tthis.showTriggerCreator(NODE_CREATOR_OPEN_SOURCES.TRIGGER_PLACEHOLDER_BUTTON);\n\t\t}\n\t\tthis.uiStore.addFirstStepOnLoad = false;\n\t\tthis.bindCanvasEvents();\n\t\tdocument.addEventListener('keydown', this.keyDown);\n\t\tdocument.addEventListener('keyup', this.keyUp);\n\t\twindow.addEventListener('message', this.onPostMessageReceived);\n\t\twindow.addEventListener('pageshow', this.onPageShow);\n\n\t\tnodeViewEventBus.on('newWorkflow', this.newWorkflow);\n\t\tnodeViewEventBus.on('importWorkflowData', this.onImportWorkflowDataEvent);\n\t\tnodeViewEventBus.on('importWorkflowUrl', this.onImportWorkflowUrlEvent);\n\t\tnodeViewEventBus.on('openChat', this.onOpenChat);\n\t\thistoryBus.on('nodeMove', this.onMoveNode);\n\t\thistoryBus.on('revertAddNode', this.onRevertAddNode);\n\t\thistoryBus.on('revertRemoveNode', this.onRevertRemoveNode);\n\t\thistoryBus.on('revertAddConnection', this.onRevertAddConnection);\n\t\thistoryBus.on('revertRemoveConnection', this.onRevertRemoveConnection);\n\t\thistoryBus.on('revertRenameNode', this.onRevertNameChange);\n\t\thistoryBus.on('enableNodeToggle', this.onRevertEnableToggle);\n\n\t\tdataPinningEventBus.on('pin-data', this.addPinDataConnections);\n\t\tdataPinningEventBus.on('unpin-data', this.removePinDataConnections);\n\t\tnodeViewEventBus.on('saveWorkflow', this.saveCurrentWorkflowExternal);\n\n\t\tthis.canvasStore.isDemo = this.isDemo;\n\t},\n\tdeactivated() {\n\t\tthis.unbindCanvasEvents();\n\t\tdocument.removeEventListener('keydown', this.keyDown);\n\t\tdocument.removeEventListener('keyup', this.keyUp);\n\t\twindow.removeEventListener('message', this.onPostMessageReceived);\n\t\twindow.removeEventListener('beforeunload', this.onBeforeUnload);\n\t\twindow.removeEventListener('pageshow', this.onPageShow);\n\n\t\tnodeViewEventBus.off('newWorkflow', this.newWorkflow);\n\t\tnodeViewEventBus.off('importWorkflowData', this.onImportWorkflowDataEvent);\n\t\tnodeViewEventBus.off('importWorkflowUrl', this.onImportWorkflowUrlEvent);\n\t\tnodeViewEventBus.off('openChat', this.onOpenChat);\n\t\thistoryBus.off('nodeMove', this.onMoveNode);\n\t\thistoryBus.off('revertAddNode', this.onRevertAddNode);\n\t\thistoryBus.off('revertRemoveNode', this.onRevertRemoveNode);\n\t\thistoryBus.off('revertAddConnection', this.onRevertAddConnection);\n\t\thistoryBus.off('revertRemoveConnection', this.onRevertRemoveConnection);\n\t\thistoryBus.off('revertRenameNode', this.onRevertNameChange);\n\t\thistoryBus.off('enableNodeToggle', this.onRevertEnableToggle);\n\n\t\tdataPinningEventBus.off('pin-data', this.addPinDataConnections);\n\t\tdataPinningEventBus.off('unpin-data', this.removePinDataConnections);\n\t\tnodeViewEventBus.off('saveWorkflow', this.saveCurrentWorkflowExternal);\n\t},\n\tbeforeMount() {\n\t\tif (!this.isDemo) {\n\t\t\tthis.pushStore.pushConnect();\n\t\t}\n\t\tthis.collaborationStore.initialize();\n\t},\n\tbeforeUnmount() {\n\t\t// Make sure the event listeners get removed again else we\n\t\t// could add up with them registered multiple times\n\t\tdocument.removeEventListener('keydown', this.keyDown);\n\t\tdocument.removeEventListener('keyup', this.keyUp);\n\t\tthis.unregisterCustomAction('showNodeCreator');\n\t\tthis.unregisterCustomAction('openNodeDetail');\n\t\tthis.unregisterCustomAction('openSelectiveNodeCreator');\n\n\t\tif (!this.isDemo) {\n\t\t\tthis.pushStore.pushDisconnect();\n\t\t}\n\t\tthis.collaborationStore.terminate();\n\n\t\tthis.resetWorkspace();\n\t\tthis.instance.unbind();\n\t\tthis.instance.destroy();\n\t\tthis.uiStore.stateIsDirty = false;\n\t\tthis.workflowsStore.resetChatMessages();\n\t\twindow.removeEventListener('message', this.onPostMessageReceived);\n\t\tnodeViewEventBus.off('newWorkflow', this.newWorkflow);\n\t\tnodeViewEventBus.off('importWorkflowData', this.onImportWorkflowDataEvent);\n\t\tnodeViewEventBus.off('importWorkflowUrl', this.onImportWorkflowUrlEvent);\n\t\tthis.workflowsStore.setWorkflowId(PLACEHOLDER_EMPTY_WORKFLOW_ID);\n\t\tsourceControlEventBus.off('pull', this.onSourceControlPull);\n\t},\n\tmethods: {\n\t\tasync openSelectiveNodeCreator({\n\t\t\tconnectiontype,\n\t\t\tnode,\n\t\t\tcreatorview,\n\t\t}: {\n\t\t\tconnectiontype: NodeConnectionType;\n\t\t\tnode: string;\n\t\t\tcreatorview?: NodeFilterType;\n\t\t}) {\n\t\t\tconst nodeName = node ?? this.ndvStore.activeNodeName;\n\t\t\tconst nodeData = nodeName ? this.workflowsStore.getNodeByName(nodeName) : null;\n\n\t\t\tthis.ndvStore.activeNodeName = null;\n\t\t\tawait this.redrawNode(node);\n\t\t\t// Wait for UI to update\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (creatorview) {\n\t\t\t\t\tthis.onToggleNodeCreator({\n\t\t\t\t\t\tcreateNodeActive: true,\n\t\t\t\t\t\tnodeCreatorView: creatorview,\n\t\t\t\t\t});\n\t\t\t\t} else if (connectiontype && nodeData) {\n\t\t\t\t\tthis.insertNodeAfterSelected({\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tendpointUuid: `${nodeData.id}-input${connectiontype}0`,\n\t\t\t\t\t\teventSource: NODE_CREATOR_OPEN_SOURCES.NOTICE_ERROR_MESSAGE,\n\t\t\t\t\t\toutputType: connectiontype,\n\t\t\t\t\t\tsourceId: nodeData.id,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\teditAllowedCheck(): boolean {\n\t\t\tif (this.readOnlyNotification) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (this.isReadOnlyRoute || this.readOnlyEnv) {\n\t\t\t\tthis.readOnlyNotification = this.showMessage({\n\t\t\t\t\ttitle: this.$locale.baseText(\n\t\t\t\t\t\tthis.readOnlyEnv\n\t\t\t\t\t\t\t? `readOnlyEnv.showMessage.${this.isReadOnlyRoute ? 'executions' : 'workflows'}.title`\n\t\t\t\t\t\t\t: 'readOnly.showMessage.executions.title',\n\t\t\t\t\t),\n\t\t\t\t\tmessage: this.$locale.baseText(\n\t\t\t\t\t\tthis.readOnlyEnv\n\t\t\t\t\t\t\t? `readOnlyEnv.showMessage.${\n\t\t\t\t\t\t\t\t\tthis.isReadOnlyRoute ? 'executions' : 'workflows'\n\t\t\t\t\t\t\t\t}.message`\n\t\t\t\t\t\t\t: 'readOnly.showMessage.executions.message',\n\t\t\t\t\t),\n\t\t\t\t\ttype: 'info',\n\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\tonClose: () => {\n\t\t\t\t\t\tthis.readOnlyNotification = null;\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tshowTriggerMissingToltip(isVisible: boolean) {\n\t\t\tthis.showTriggerMissingTooltip = isVisible;\n\t\t},\n\t\tonRunNode(nodeName: string, source: string) {\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tconst telemetryPayload = {\n\t\t\t\tnode_type: node ? node.type : null,\n\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\tsource: 'canvas',\n\t\t\t\tpush_ref: this.ndvStore.pushRef,\n\t\t\t};\n\t\t\tthis.$telemetry.track('User clicked execute node button', telemetryPayload);\n\t\t\tvoid this.externalHooks.run('nodeView.onRunNode', telemetryPayload);\n\t\t\tvoid this.runWorkflow({ destinationNode: nodeName, source });\n\t\t},\n\t\tasync onOpenChat() {\n\t\t\tconst telemetryPayload = {\n\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t};\n\t\t\tthis.$telemetry.track('User clicked chat open button', telemetryPayload);\n\t\t\tvoid this.externalHooks.run('nodeView.onOpenChat', telemetryPayload);\n\t\t\tthis.uiStore.openModal(WORKFLOW_LM_CHAT_MODAL_KEY);\n\t\t},\n\t\tasync onRunWorkflow() {\n\t\t\tvoid this.workflowHelpers.getWorkflowDataToSave().then((workflowData) => {\n\t\t\t\tconst telemetryPayload = {\n\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\tnode_graph_string: JSON.stringify(\n\t\t\t\t\t\tTelemetryHelpers.generateNodesGraph(\n\t\t\t\t\t\t\tworkflowData as IWorkflowBase,\n\t\t\t\t\t\t\tthis.workflowHelpers.getNodeTypes(),\n\t\t\t\t\t\t\t{ isCloudDeployment: this.settingsStore.isCloudDeployment },\n\t\t\t\t\t\t).nodeGraph,\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t\tthis.$telemetry.track('User clicked execute workflow button', telemetryPayload);\n\t\t\t\tvoid this.externalHooks.run('nodeView.onRunWorkflow', telemetryPayload);\n\t\t\t});\n\n\t\t\tawait this.runWorkflow({});\n\t\t\tthis.refreshEndpointsErrorsState();\n\t\t},\n\t\tresetEndpointsErrors() {\n\t\t\tconst allEndpoints = Object.values(this.instance.getManagedElements()).flatMap(\n\t\t\t\t(el) => el.endpoints,\n\t\t\t);\n\n\t\t\tallEndpoints\n\t\t\t\t.filter((endpoint) => endpoint?.endpoint.type === N8nAddInputEndpointType)\n\t\t\t\t.forEach((endpoint) => {\n\t\t\t\t\tconst n8nAddInputEndpoint = endpoint?.endpoint as N8nAddInputEndpoint;\n\t\t\t\t\tif (n8nAddInputEndpoint && (endpoint?.connections ?? []).length > 0) {\n\t\t\t\t\t\tn8nAddInputEndpoint.resetError();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\t\trefreshEndpointsErrorsState() {\n\t\t\tconst nodeIssues = this.workflowsStore.allNodes.filter((n) => n.issues);\n\t\t\t// Set input color to red if there are issues\n\t\t\tthis.resetEndpointsErrors();\n\t\t\tnodeIssues.forEach((node) => {\n\t\t\t\tconst managedNode = this.instance.getManagedElement(node.id);\n\t\t\t\tconst endpoints = this.instance.getEndpoints(managedNode);\n\n\t\t\t\tObject.keys(node?.issues?.input ?? {}).forEach((connectionType) => {\n\t\t\t\t\tconst inputEndpointsWithIssues = endpoints.filter(\n\t\t\t\t\t\t(e) => e._defaultType.scope === connectionType,\n\t\t\t\t\t);\n\t\t\t\t\tinputEndpointsWithIssues.forEach((endpoint) => {\n\t\t\t\t\t\tconst n8nAddInputEndpoint = endpoint?.endpoint as N8nAddInputEndpoint;\n\t\t\t\t\t\tif (n8nAddInputEndpoint) {\n\t\t\t\t\t\t\tn8nAddInputEndpoint.setError();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tonRunContainerClick() {\n\t\t\tif (this.containsTrigger && !this.allTriggersDisabled) return;\n\n\t\t\tconst message =\n\t\t\t\tthis.containsTrigger && this.allTriggersDisabled\n\t\t\t\t\t? this.$locale.baseText('nodeView.addOrEnableTriggerNode')\n\t\t\t\t\t: this.$locale.baseText('nodeView.addATriggerNodeFirst');\n\n\t\t\tconst notice = this.showMessage({\n\t\t\t\ttype: 'info',\n\t\t\t\ttitle: this.$locale.baseText('nodeView.cantExecuteNoTrigger'),\n\t\t\t\tmessage,\n\t\t\t\tduration: 3000,\n\t\t\t\tonClick: () =>\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t// Close the creator panel if user clicked on the link\n\t\t\t\t\t\tif (this.createNodeActive) notice.close();\n\t\t\t\t\t}, 0),\n\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t});\n\t\t},\n\t\tclearExecutionData() {\n\t\t\tthis.workflowsStore.workflowExecutionData = null;\n\t\t\tthis.nodeHelpers.updateNodesExecutionIssues();\n\t\t},\n\t\tasync onSaveKeyboardShortcut(e: KeyboardEvent) {\n\t\t\tlet saved = await this.workflowHelpers.saveCurrentWorkflow();\n\t\t\tif (saved) {\n\t\t\t\tawait this.npsSurveyStore.fetchPromptsData();\n\n\t\t\t\tif (this.$route.name === VIEWS.EXECUTION_DEBUG) {\n\t\t\t\t\tawait this.$router.replace({\n\t\t\t\t\t\tname: VIEWS.WORKFLOW,\n\t\t\t\t\t\tparams: { name: this.currentWorkflow },\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.activeNode) {\n\t\t\t\t// If NDV is open, save will not work from editable input fields\n\t\t\t\t// so don't show success message if this is true\n\t\t\t\tif (e.target instanceof HTMLInputElement) {\n\t\t\t\t\tsaved = e.target.readOnly;\n\t\t\t\t} else {\n\t\t\t\t\tsaved = true;\n\t\t\t\t}\n\t\t\t\tif (saved) {\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('generic.workflowSaved'),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync onCanvasAddButtonCLick(event: PointerEvent) {\n\t\t\tif (event) {\n\t\t\t\tif (this.shouldShowNextStepDialog) {\n\t\t\t\t\tconst newNodeButton = (event.target as HTMLElement).closest('button');\n\t\t\t\t\tif (newNodeButton) {\n\t\t\t\t\t\tthis.aiStore.latestConnectionInfo = null;\n\t\t\t\t\t\tthis.aiStore.openNextStepPopup(\n\t\t\t\t\t\t\tthis.$locale.baseText('nextStepPopup.title.firstStep'),\n\t\t\t\t\t\t\tnewNodeButton,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.showTriggerCreator(NODE_CREATOR_OPEN_SOURCES.TRIGGER_PLACEHOLDER_BUTTON);\n\t\t\t\treturn;\n\t\t\t}\n\t\t},\n\t\tonNextStepSelected(action: string) {\n\t\t\tif (action === 'choose') {\n\t\t\t\tconst lastConnectionInfo = this.aiStore.latestConnectionInfo as NewConnectionInfo;\n\t\t\t\tif (lastConnectionInfo === null) {\n\t\t\t\t\tthis.showTriggerCreator(NODE_CREATOR_OPEN_SOURCES.TRIGGER_PLACEHOLDER_BUTTON);\n\t\t\t\t} else {\n\t\t\t\t\tthis.insertNodeAfterSelected(lastConnectionInfo);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tshowTriggerCreator(source: NodeCreatorOpenSource) {\n\t\t\tif (this.createNodeActive) return;\n\n\t\t\tthis.ndvStore.activeNodeName = null;\n\t\t\tthis.nodeCreatorStore.setSelectedView(TRIGGER_NODE_CREATOR_VIEW);\n\t\t\tthis.nodeCreatorStore.setShowScrim(true);\n\t\t\tthis.onToggleNodeCreator({\n\t\t\t\tsource,\n\t\t\t\tcreateNodeActive: true,\n\t\t\t\tnodeCreatorView: TRIGGER_NODE_CREATOR_VIEW,\n\t\t\t});\n\t\t},\n\t\tasync openExecution(executionId: string) {\n\t\t\tthis.canvasStore.startLoading();\n\t\t\tthis.resetWorkspace();\n\t\t\tlet data: IExecutionResponse | undefined;\n\t\t\ttry {\n\t\t\t\tdata = await this.workflowsStore.getExecution(executionId);\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(error, this.$locale.baseText('nodeView.showError.openExecution.title'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (data === undefined) {\n\t\t\t\tthrow new Error(`Execution with id \"${executionId}\" could not be found!`);\n\t\t\t}\n\t\t\tthis.workflowsStore.setWorkflowName({\n\t\t\t\tnewName: data.workflowData.name,\n\t\t\t\tsetStateDirty: false,\n\t\t\t});\n\t\t\tthis.workflowsStore.setWorkflowId(PLACEHOLDER_EMPTY_WORKFLOW_ID);\n\t\t\tthis.workflowsStore.setWorkflowExecutionData(data);\n\t\t\tif (data.workflowData.pinData) {\n\t\t\t\tthis.workflowsStore.setWorkflowPinData(data.workflowData.pinData);\n\t\t\t}\n\n\t\t\tif (data.workflowData.sharedWithProjects) {\n\t\t\t\tthis.workflowsEEStore.setWorkflowSharedWith({\n\t\t\t\t\tworkflowId: data.workflowData.id,\n\t\t\t\t\tsharedWithProjects: data.workflowData.sharedWithProjects,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (data.workflowData.usedCredentials) {\n\t\t\t\tthis.workflowsStore.setUsedCredentials(data.workflowData.usedCredentials);\n\t\t\t}\n\n\t\t\tawait this.addNodes(\n\t\t\t\tdeepCopy(data.workflowData.nodes),\n\t\t\t\tdeepCopy(data.workflowData.connections),\n\t\t\t);\n\t\t\tawait this.$nextTick();\n\t\t\tthis.canvasStore.zoomToFit();\n\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t\tvoid this.externalHooks.run('execution.open', {\n\t\t\t\tworkflowId: data.workflowData.id,\n\t\t\t\tworkflowName: data.workflowData.name,\n\t\t\t\texecutionId,\n\t\t\t});\n\t\t\tthis.$telemetry.track('User opened read-only execution', {\n\t\t\t\tworkflow_id: data.workflowData.id,\n\t\t\t\texecution_mode: data.mode,\n\t\t\t\texecution_finished: data.finished,\n\t\t\t});\n\n\t\t\tif (!data.finished && data.data?.resultData?.error) {\n\t\t\t\t// Check if any node contains an error\n\t\t\t\tlet nodeErrorFound = false;\n\t\t\t\tif (data.data.resultData.runData) {\n\t\t\t\t\tconst runData = data.data.resultData.runData;\n\t\t\t\t\terrorCheck: for (const nodeName of Object.keys(runData)) {\n\t\t\t\t\t\tfor (const taskData of runData[nodeName]) {\n\t\t\t\t\t\t\tif (taskData.error) {\n\t\t\t\t\t\t\t\tnodeErrorFound = true;\n\t\t\t\t\t\t\t\tbreak errorCheck;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!nodeErrorFound &&\n\t\t\t\t\t(data.data.resultData.error.stack || data.data.resultData.error.message)\n\t\t\t\t) {\n\t\t\t\t\t// Display some more information for now in console to make debugging easier\n\t\t\t\t\tconsole.error(`Execution ${executionId} error:`);\n\t\t\t\t\tconsole.error(data.data.resultData.error.stack);\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showError.workflowError'),\n\t\t\t\t\t\tmessage: data.data.resultData.error.message,\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tduration: 0,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((data as ExecutionSummary).waitTill) {\n\t\t\t\tthis.showMessage({\n\t\t\t\t\ttitle: this.$locale.baseText('nodeView.thisExecutionHasntFinishedYet'),\n\t\t\t\t\tmessage: `<a data-action=\"reload\">${this.$locale.baseText(\n\t\t\t\t\t\t'nodeView.refresh',\n\t\t\t\t\t)}</a> ${this.$locale.baseText(\n\t\t\t\t\t\t'nodeView.toSeeTheLatestStatus',\n\t\t\t\t\t)}.<br/> <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\" target=\"_blank\">${this.$locale.baseText(\n\t\t\t\t\t\t'nodeView.moreInfo',\n\t\t\t\t\t)}</a>`,\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t\tduration: 0,\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.canvasStore.stopLoading();\n\t\t},\n\t\tasync importWorkflowExact(data: { workflow: IWorkflowDataUpdate }) {\n\t\t\tif (!data.workflow.nodes || !data.workflow.connections) {\n\t\t\t\tthrow new Error('Invalid workflow object');\n\t\t\t}\n\t\t\tthis.resetWorkspace();\n\t\t\tdata.workflow.nodes = NodeViewUtils.getFixedNodesList(data.workflow.nodes);\n\n\t\t\tawait this.addNodes(data.workflow.nodes as INodeUi[], data.workflow.connections);\n\n\t\t\tif (data.workflow.pinData) {\n\t\t\t\tthis.workflowsStore.setWorkflowPinData(data.workflow.pinData);\n\t\t\t}\n\t\t\tawait this.$nextTick();\n\t\t\tthis.canvasStore.zoomToFit();\n\t\t},\n\t\tasync openWorkflowTemplate(templateId: string) {\n\t\t\tthis.canvasStore.startLoading();\n\t\t\tthis.canvasStore.setLoadingText(this.$locale.baseText('nodeView.loadingTemplate'));\n\t\t\tthis.resetWorkspace();\n\n\t\t\tthis.workflowsStore.currentWorkflowExecutions = [];\n\t\t\tthis.executionsStore.activeExecution = null;\n\n\t\t\tlet data: IWorkflowTemplate | undefined;\n\t\t\ttry {\n\t\t\t\tvoid this.externalHooks.run('template.requested', { templateId });\n\t\t\t\tdata = await this.templatesStore.getFixedWorkflowTemplate(templateId);\n\n\t\t\t\tif (!data) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\tthis.$locale.baseText('nodeView.workflowTemplateWithIdCouldNotBeFound', {\n\t\t\t\t\t\t\tinterpolate: { templateId },\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(error, this.$locale.baseText('nodeView.couldntImportWorkflow'));\n\t\t\t\tawait this.$router.replace({ name: VIEWS.NEW_WORKFLOW });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.$telemetry.track(\n\t\t\t\t'User inserted workflow template',\n\t\t\t\t{\n\t\t\t\t\tsource: 'workflow',\n\t\t\t\t\ttemplate_id: tryToParseNumber(templateId),\n\t\t\t\t\twf_template_repo_session_id: this.templatesStore.previousSessionId,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\twithPostHog: true,\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tthis.blankRedirect = true;\n\t\t\tawait this.$router.replace({ name: VIEWS.NEW_WORKFLOW, query: { templateId } });\n\n\t\t\tconst convertedNodes = data.workflow.nodes.map(\n\t\t\t\tthis.workflowsStore.convertTemplateNodeToNodeUi,\n\t\t\t);\n\t\t\tawait this.addNodes(convertedNodes, data.workflow.connections);\n\t\t\tthis.workflowData =\n\t\t\t\t(await this.workflowsStore.getNewWorkflowData(\n\t\t\t\t\tdata.name,\n\t\t\t\t\tthis.projectsStore.currentProjectId,\n\t\t\t\t)) || {};\n\t\t\tthis.workflowsStore.addToWorkflowMetadata({ templateId });\n\t\t\tawait this.$nextTick();\n\t\t\tthis.canvasStore.zoomToFit();\n\t\t\tthis.uiStore.stateIsDirty = true;\n\n\t\t\tvoid this.externalHooks.run('template.open', {\n\t\t\t\ttemplateId,\n\t\t\t\ttemplateName: data.name,\n\t\t\t\tworkflow: data.workflow,\n\t\t\t});\n\t\t\tthis.canvasStore.stopLoading();\n\t\t},\n\t\tasync openWorkflow(workflow: IWorkflowDb) {\n\t\t\tthis.canvasStore.startLoading();\n\n\t\t\tconst selectedExecution = this.executionsStore.activeExecution;\n\n\t\t\tthis.resetWorkspace();\n\n\t\t\tthis.workflowsStore.addWorkflow(workflow);\n\t\t\tthis.workflowsStore.setActive(workflow.active || false);\n\t\t\tthis.workflowsStore.setWorkflowId(workflow.id);\n\t\t\tthis.workflowsStore.setWorkflowName({ newName: workflow.name, setStateDirty: false });\n\t\t\tthis.workflowsStore.setWorkflowSettings(workflow.settings ?? {});\n\t\t\tthis.workflowsStore.setWorkflowPinData(workflow.pinData ?? {});\n\t\t\tthis.workflowsStore.setWorkflowVersionId(workflow.versionId);\n\t\t\tthis.workflowsStore.setWorkflowMetadata(workflow.meta);\n\n\t\t\tif (workflow.sharedWithProjects) {\n\t\t\t\tthis.workflowsEEStore.setWorkflowSharedWith({\n\t\t\t\t\tworkflowId: workflow.id,\n\t\t\t\t\tsharedWithProjects: workflow.sharedWithProjects,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (workflow.usedCredentials) {\n\t\t\t\tthis.workflowsStore.setUsedCredentials(workflow.usedCredentials);\n\t\t\t}\n\n\t\t\tconst tags = (workflow.tags ?? []) as ITag[];\n\t\t\tconst tagIds = tags.map((tag) => tag.id);\n\t\t\tthis.workflowsStore.setWorkflowTagIds(tagIds || []);\n\t\t\tthis.tagsStore.upsertTags(tags);\n\n\t\t\tawait this.addNodes(workflow.nodes, workflow.connections);\n\n\t\t\tif (!this.credentialsUpdated) {\n\t\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t\t}\n\t\t\tthis.canvasStore.zoomToFit();\n\t\t\tvoid this.externalHooks.run('workflow.open', {\n\t\t\t\tworkflowId: workflow.id,\n\t\t\t\tworkflowName: workflow.name,\n\t\t\t});\n\t\t\tif (selectedExecution?.workflowId !== workflow.id) {\n\t\t\t\tthis.executionsStore.activeExecution = null;\n\t\t\t\tthis.workflowsStore.currentWorkflowExecutions = [];\n\t\t\t} else {\n\t\t\t\tthis.executionsStore.activeExecution = selectedExecution;\n\t\t\t}\n\t\t\tthis.canvasStore.stopLoading();\n\t\t\tthis.collaborationStore.notifyWorkflowOpened(workflow.id);\n\t\t},\n\t\ttouchTap(e: MouseEvent | TouchEvent) {\n\t\t\tif (this.deviceSupport.isTouchDevice) {\n\t\t\t\tthis.mouseDown(e);\n\t\t\t}\n\t\t},\n\t\tmouseDown(e: MouseEvent | TouchEvent) {\n\t\t\t// Save the location of the mouse click\n\t\t\tthis.lastClickPosition = this.getMousePositionWithinNodeView(e);\n\t\t\tif (e instanceof MouseEvent && e.button === 1) {\n\t\t\t\tthis.aiStore.closeNextStepPopup();\n\t\t\t\tthis.moveCanvasKeyPressed = true;\n\t\t\t}\n\n\t\t\tthis.mouseDownMouseSelect(e as MouseEvent, this.moveCanvasKeyPressed);\n\t\t\tthis.canvasPanning.onMouseDown(e as MouseEvent, this.moveCanvasKeyPressed);\n\n\t\t\t// Hide the node-creator\n\t\t\tthis.createNodeActive = false;\n\t\t},\n\t\tmouseUp(e: MouseEvent | TouchEvent) {\n\t\t\tif (e instanceof MouseEvent && e.button === 1) {\n\t\t\t\tthis.moveCanvasKeyPressed = false;\n\t\t\t}\n\t\t\tthis.mouseUpMouseSelect(e);\n\t\t\tthis.canvasPanning.onMouseUp();\n\t\t},\n\t\tkeyUp(e: KeyboardEvent) {\n\t\t\tif (e.key === this.deviceSupport.controlKeyCode) {\n\t\t\t\tthis.ctrlKeyPressed = false;\n\t\t\t}\n\t\t\tif (e.key === ' ') {\n\t\t\t\tthis.moveCanvasKeyPressed = false;\n\t\t\t}\n\t\t},\n\t\tasync keyDown(e: KeyboardEvent) {\n\t\t\tthis.contextMenu.close();\n\t\t\tthis.aiStore.closeNextStepPopup();\n\n\t\t\tconst ctrlModifier = this.deviceSupport.isCtrlKeyPressed(e) && !e.shiftKey && !e.altKey;\n\t\t\tconst shiftModifier = e.shiftKey && !e.altKey && !this.deviceSupport.isCtrlKeyPressed(e);\n\t\t\tconst ctrlAltModifier = this.deviceSupport.isCtrlKeyPressed(e) && e.altKey && !e.shiftKey;\n\t\t\tconst noModifierKeys = !this.deviceSupport.isCtrlKeyPressed(e) && !e.shiftKey && !e.altKey;\n\t\t\tconst readOnly = this.isReadOnlyRoute || this.readOnlyEnv;\n\n\t\t\tif (e.key === 's' && ctrlModifier && !readOnly) {\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\t\t\t\tconst workflowIsSaved = !this.uiStore.stateIsDirty;\n\n\t\t\t\tif (this.isReadOnlyRoute || this.readOnlyEnv || workflowIsSaved) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvoid this.callDebounced(this.onSaveKeyboardShortcut, { debounceTime: 1000 }, e);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst path = e?.composedPath() ?? [];\n\n\t\t\t// Check if the keys got emitted from a message box or from something\n\t\t\t// else which should ignore the default keybindings\n\t\t\tfor (const element of path) {\n\t\t\t\tif (\n\t\t\t\t\telement instanceof HTMLElement &&\n\t\t\t\t\telement.className &&\n\t\t\t\t\ttypeof element.className === 'string' &&\n\t\t\t\t\telement.className.includes('ignore-key-press')\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// el-dialog or el-message-box element is open\n\t\t\tif (window.document.body.classList.contains('el-popup-parent--hidden')) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (e.key === 'Escape' && noModifierKeys) {\n\t\t\t\tthis.createNodeActive = false;\n\t\t\t\tif (this.activeNode) {\n\t\t\t\t\tvoid this.externalHooks.run('dataDisplay.nodeEditingFinished');\n\t\t\t\t\tthis.ndvStore.activeNodeName = null;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// node modal is open\n\t\t\tif (this.activeNode) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedNodes = this.uiStore.getSelectedNodes\n\t\t\t\t.map((node) => node && this.workflowsStore.getNodeByName(node.name))\n\t\t\t\t.filter((node) => !!node) as INode[];\n\n\t\t\tif (e.key === 'd' && noModifierKeys && !readOnly) {\n\t\t\t\tvoid this.callDebounced(this.toggleActivationNodes, { debounceTime: 350 }, selectedNodes);\n\t\t\t} else if (e.key === 'd' && ctrlModifier && !readOnly) {\n\t\t\t\tif (selectedNodes.length > 0) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tvoid this.duplicateNodes(selectedNodes);\n\t\t\t\t}\n\t\t\t} else if (e.key === 'p' && noModifierKeys && !readOnly) {\n\t\t\t\tif (selectedNodes.length > 0) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.togglePinNodes(selectedNodes, 'keyboard-shortcut');\n\t\t\t\t}\n\t\t\t} else if ((e.key === 'Delete' || e.key === 'Backspace') && noModifierKeys && !readOnly) {\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvoid this.callDebounced(this.deleteNodes, { debounceTime: 500 }, selectedNodes);\n\t\t\t} else if (e.key === 'Tab' && noModifierKeys && !readOnly) {\n\t\t\t\tthis.onToggleNodeCreator({\n\t\t\t\t\tsource: NODE_CREATOR_OPEN_SOURCES.TAB,\n\t\t\t\t\tcreateNodeActive: !this.createNodeActive && !this.isReadOnlyRoute && !this.readOnlyEnv,\n\t\t\t\t});\n\t\t\t} else if (e.key === 'Enter' && ctrlModifier && !readOnly && !this.isExecutionDisabled) {\n\t\t\t\tvoid this.onRunWorkflow();\n\t\t\t} else if (e.key === 'S' && shiftModifier && !readOnly) {\n\t\t\t\tvoid this.onAddNodes({ nodes: [{ type: STICKY_NODE_TYPE }], connections: [] });\n\t\t\t} else if (e.key === this.deviceSupport.controlKeyCode) {\n\t\t\t\tthis.ctrlKeyPressed = true;\n\t\t\t} else if (e.key === ' ') {\n\t\t\t\tthis.moveCanvasKeyPressed = true;\n\t\t\t} else if (e.key === 'F2' && noModifierKeys && !readOnly) {\n\t\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\t\t\t\tif (lastSelectedNode !== null && lastSelectedNode.type !== STICKY_NODE_TYPE) {\n\t\t\t\t\tvoid this.callDebounced(\n\t\t\t\t\t\tthis.renameNodePrompt,\n\t\t\t\t\t\t{ debounceTime: 1500 },\n\t\t\t\t\t\tlastSelectedNode.name,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if (e.key === 'a' && ctrlModifier) {\n\t\t\t\t// Select all nodes\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvoid this.callDebounced(this.selectAllNodes, { debounceTime: 1000 });\n\t\t\t} else if (e.key === 'c' && ctrlModifier) {\n\t\t\t\tvoid this.callDebounced(this.copyNodes, { debounceTime: 1000 }, selectedNodes);\n\t\t\t} else if (e.key === 'x' && ctrlModifier && !readOnly) {\n\t\t\t\t// Cut nodes\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvoid this.callDebounced(this.cutNodes, { debounceTime: 1000 }, selectedNodes);\n\t\t\t} else if (e.key === 'n' && ctrlAltModifier) {\n\t\t\t\t// Create a new workflow\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\t\t\t\tif (this.isDemo) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (this.$router.currentRoute.value.name === VIEWS.NEW_WORKFLOW) {\n\t\t\t\t\tnodeViewEventBus.emit('newWorkflow');\n\t\t\t\t} else {\n\t\t\t\t\tvoid this.$router.push({ name: VIEWS.NEW_WORKFLOW });\n\t\t\t\t}\n\n\t\t\t\tthis.showMessage({\n\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showMessage.keyDown.title'),\n\t\t\t\t\ttype: 'success',\n\t\t\t\t});\n\t\t\t} else if (e.key === 'Enter' && noModifierKeys) {\n\t\t\t\t// Activate the last selected node\n\t\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\n\t\t\t\tif (lastSelectedNode !== null) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tlastSelectedNode.type === STICKY_NODE_TYPE &&\n\t\t\t\t\t\t(this.isReadOnlyRoute || this.readOnlyEnv)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.ndvStore.activeNodeName = lastSelectedNode.name;\n\t\t\t\t}\n\t\t\t} else if (e.key === 'ArrowRight' && shiftModifier) {\n\t\t\t\t// Select all downstream nodes\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvoid this.callDebounced(this.selectDownstreamNodes, {\n\t\t\t\t\tdebounceTime: 1000,\n\t\t\t\t});\n\t\t\t} else if (e.key === 'ArrowRight' && noModifierKeys) {\n\t\t\t\t// Set child node active\n\t\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\t\t\t\tif (lastSelectedNode === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst connections = this.workflowsStore.outgoingConnectionsByNodeName(\n\t\t\t\t\tlastSelectedNode.name,\n\t\t\t\t);\n\n\t\t\t\tif (connections.main === undefined || connections.main.length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvoid this.callDebounced(\n\t\t\t\t\tthis.nodeSelectedByName,\n\t\t\t\t\t{ debounceTime: 100 },\n\t\t\t\t\tconnections.main[0][0].node,\n\t\t\t\t\tfalse,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t} else if (e.key === 'ArrowLeft' && shiftModifier) {\n\t\t\t\t// Select all downstream nodes\n\t\t\t\te.stopPropagation();\n\t\t\t\te.preventDefault();\n\n\t\t\t\tvoid this.callDebounced(this.selectUpstreamNodes, {\n\t\t\t\t\tdebounceTime: 1000,\n\t\t\t\t});\n\t\t\t} else if (e.key === 'ArrowLeft' && noModifierKeys) {\n\t\t\t\t// Set parent node active\n\t\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\t\t\t\tif (lastSelectedNode === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\n\t\t\t\tif (!workflow.connectionsByDestinationNode.hasOwnProperty(lastSelectedNode.name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst connections = workflow.connectionsByDestinationNode[lastSelectedNode.name];\n\n\t\t\t\tif (connections.main === undefined || connections.main.length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvoid this.callDebounced(\n\t\t\t\t\tthis.nodeSelectedByName,\n\t\t\t\t\t{ debounceTime: 100 },\n\t\t\t\t\tconnections.main[0][0].node,\n\t\t\t\t\tfalse,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t} else if (['ArrowUp', 'ArrowDown'].includes(e.key) && noModifierKeys) {\n\t\t\t\t// Set sibling node as active\n\n\t\t\t\t// Check first if it has a parent node\n\t\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\t\t\t\tif (lastSelectedNode === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\n\t\t\t\tif (!workflow.connectionsByDestinationNode.hasOwnProperty(lastSelectedNode.name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst connections = workflow.connectionsByDestinationNode[lastSelectedNode.name];\n\n\t\t\t\tif (!Array.isArray(connections.main) || !connections.main.length) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst parentNode = connections.main[0][0].node;\n\t\t\t\tconst connectionsParent = this.workflowsStore.outgoingConnectionsByNodeName(parentNode);\n\n\t\t\t\tif (!Array.isArray(connectionsParent.main) || !connectionsParent.main.length) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get all the sibling nodes and their x positions to know which one to set active\n\t\t\t\tlet siblingNode: INodeUi | null;\n\t\t\t\tlet lastCheckedNodePosition = e.key === 'ArrowUp' ? -99999999 : 99999999;\n\t\t\t\tlet nextSelectNode: string | null = null;\n\t\t\t\tfor (const ouputConnections of connectionsParent.main) {\n\t\t\t\t\tfor (const ouputConnection of ouputConnections) {\n\t\t\t\t\t\tif (ouputConnection.node === lastSelectedNode.name) {\n\t\t\t\t\t\t\t// Ignore current node\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsiblingNode = this.workflowsStore.getNodeByName(ouputConnection.node);\n\n\t\t\t\t\t\tif (siblingNode) {\n\t\t\t\t\t\t\tif (e.key === 'ArrowUp') {\n\t\t\t\t\t\t\t\t// Get the next node on the left\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tsiblingNode.position[1] <= lastSelectedNode.position[1] &&\n\t\t\t\t\t\t\t\t\tsiblingNode.position[1] > lastCheckedNodePosition\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tnextSelectNode = siblingNode.name;\n\t\t\t\t\t\t\t\t\tlastCheckedNodePosition = siblingNode.position[1];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// Get the next node on the right\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tsiblingNode.position[1] >= lastSelectedNode.position[1] &&\n\t\t\t\t\t\t\t\t\tsiblingNode.position[1] < lastCheckedNodePosition\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tnextSelectNode = siblingNode.name;\n\t\t\t\t\t\t\t\t\tlastCheckedNodePosition = siblingNode.position[1];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (nextSelectNode !== null) {\n\t\t\t\t\tvoid this.callDebounced(\n\t\t\t\t\t\tthis.nodeSelectedByName,\n\t\t\t\t\t\t{ debounceTime: 100 },\n\t\t\t\t\t\tnextSelectNode,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\ttoggleActivationNodes(nodes: INode[]) {\n\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.nodeHelpers.disableNodes(nodes, true);\n\t\t},\n\n\t\ttogglePinNodes(nodes: INode[], source: 'keyboard-shortcut' | 'context-menu') {\n\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.historyStore.startRecordingUndo();\n\n\t\t\tconst nextStatePinned = nodes.some(\n\t\t\t\t(node) => !this.workflowsStore.pinDataByNodeName(node.name),\n\t\t\t);\n\n\t\t\tfor (const node of nodes) {\n\t\t\t\tconst pinnedDataForNode = usePinnedData(node);\n\t\t\t\tif (nextStatePinned) {\n\t\t\t\t\tconst dataToPin = this.dataSchema.getInputDataWithPinned(node);\n\t\t\t\t\tif (dataToPin.length !== 0) {\n\t\t\t\t\t\tpinnedDataForNode.setData(dataToPin, source);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpinnedDataForNode.unsetData(source);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.historyStore.stopRecordingUndo();\n\t\t},\n\n\t\tdeleteNodes(nodes: INode[]) {\n\t\t\t// Copy \"selectedNodes\" as the nodes get deleted out of selection\n\t\t\t// when they get deleted and if we would use original it would mess\n\t\t\t// with the index and would so not delete all nodes\n\t\t\tthis.historyStore.startRecordingUndo();\n\t\t\tnodes.forEach((node) => {\n\t\t\t\tthis.removeNode(node.name, true, false);\n\t\t\t});\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.historyStore.stopRecordingUndo();\n\t\t\t}, 200);\n\t\t},\n\n\t\tselectAllNodes() {\n\t\t\tthis.nodes.forEach((node) => {\n\t\t\t\tthis.nodeSelectedByName(node.name);\n\t\t\t});\n\t\t},\n\n\t\tselectUpstreamNodes() {\n\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\t\t\tif (lastSelectedNode === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.deselectAllNodes();\n\n\t\t\t// Get all upstream nodes and select them\n\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\n\t\t\tconst checkNodes = this.workflowHelpers.getConnectedNodes(\n\t\t\t\t'upstream',\n\t\t\t\tworkflow,\n\t\t\t\tlastSelectedNode.name,\n\t\t\t);\n\t\t\tfor (const nodeName of checkNodes) {\n\t\t\t\tthis.nodeSelectedByName(nodeName);\n\t\t\t}\n\n\t\t\t// At the end select the previously selected node again\n\t\t\tthis.nodeSelectedByName(lastSelectedNode.name);\n\t\t},\n\t\tselectDownstreamNodes() {\n\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\t\t\tif (lastSelectedNode === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.deselectAllNodes();\n\n\t\t\t// Get all downstream nodes and select them\n\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\n\t\t\tconst checkNodes = this.workflowHelpers.getConnectedNodes(\n\t\t\t\t'downstream',\n\t\t\t\tworkflow,\n\t\t\t\tlastSelectedNode.name,\n\t\t\t);\n\t\t\tfor (const nodeName of checkNodes) {\n\t\t\t\tthis.nodeSelectedByName(nodeName);\n\t\t\t}\n\n\t\t\t// At the end select the previously selected node again\n\t\t\tthis.nodeSelectedByName(lastSelectedNode.name);\n\t\t},\n\n\t\tpushDownstreamNodes(sourceNodeName: string, margin: number, recordHistory = false) {\n\t\t\tconst sourceNode = this.workflowsStore.nodesByName[sourceNodeName];\n\n\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\n\t\t\tconst checkNodes = this.workflowHelpers.getConnectedNodes(\n\t\t\t\t'downstream',\n\t\t\t\tworkflow,\n\t\t\t\tsourceNodeName,\n\t\t\t);\n\t\t\tfor (const nodeName of checkNodes) {\n\t\t\t\tconst node = this.workflowsStore.nodesByName[nodeName];\n\t\t\t\tconst oldPosition = node.position;\n\n\t\t\t\tif (node.position[0] < sourceNode.position[0]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst updateInformation: INodeUpdatePropertiesInformation = {\n\t\t\t\t\tname: nodeName,\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tposition: [node.position[0] + margin, node.position[1]],\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tthis.workflowsStore.updateNodeProperties(updateInformation);\n\t\t\t\tthis.onNodeMoved(node);\n\n\t\t\t\tif (\n\t\t\t\t\t(recordHistory && oldPosition[0] !== updateInformation.properties.position[0]) ||\n\t\t\t\t\toldPosition[1] !== updateInformation.properties.position[1]\n\t\t\t\t) {\n\t\t\t\t\tthis.historyStore.pushCommandToUndo(\n\t\t\t\t\t\tnew MoveNodeCommand(nodeName, oldPosition, updateInformation.properties.position),\n\t\t\t\t\t\trecordHistory,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tcutNodes(nodes: INode[]) {\n\t\t\tconst deleteCopiedNodes = !this.isReadOnlyRoute && !this.readOnlyEnv;\n\t\t\tthis.copyNodes(nodes, deleteCopiedNodes);\n\t\t\tif (deleteCopiedNodes) {\n\t\t\t\tthis.deleteNodes(nodes);\n\t\t\t}\n\t\t},\n\n\t\tcopyNodes(nodes: INode[], isCut = false) {\n\t\t\tvoid this.getNodesToSave(nodes).then((data) => {\n\t\t\t\tconst workflowToCopy: IWorkflowToShare = {\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\t...this.workflowsStore.workflow.meta,\n\t\t\t\t\t\tinstanceId: this.rootStore.instanceId,\n\t\t\t\t\t},\n\t\t\t\t\t...data,\n\t\t\t\t};\n\n\t\t\t\tdelete workflowToCopy.meta.templateCredsSetupCompleted;\n\n\t\t\t\tthis.workflowHelpers.removeForeignCredentialsFromWorkflow(\n\t\t\t\t\tworkflowToCopy,\n\t\t\t\t\tthis.credentialsStore.allCredentials,\n\t\t\t\t);\n\n\t\t\t\tconst nodeData = JSON.stringify(workflowToCopy, null, 2);\n\n\t\t\t\tvoid this.clipboard.copy(nodeData);\n\t\t\t\tif (data.nodes.length > 0) {\n\t\t\t\t\tif (!isCut) {\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle: 'Copied!',\n\t\t\t\t\t\t\tmessage: '',\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tthis.$telemetry.track('User copied nodes', {\n\t\t\t\t\t\tnode_types: data.nodes.map((node) => node.type),\n\t\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tasync stopExecution() {\n\t\t\tconst executionId = this.workflowsStore.activeExecutionId;\n\t\t\tif (executionId === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tthis.stopExecutionInProgress = true;\n\t\t\t\tawait this.executionsStore.stopCurrentExecution(executionId);\n\t\t\t} catch (error) {\n\t\t\t\t// Execution stop might fail when the execution has already finished. Let's treat this here.\n\t\t\t\tconst execution = await this.workflowsStore.getExecution(executionId);\n\n\t\t\t\tif (execution === undefined) {\n\t\t\t\t\t// execution finished but was not saved (e.g. due to low connectivity)\n\n\t\t\t\t\tthis.workflowsStore.finishActiveExecution({\n\t\t\t\t\t\texecutionId,\n\t\t\t\t\t\tdata: { finished: true, stoppedAt: new Date() },\n\t\t\t\t\t});\n\t\t\t\t\tthis.workflowsStore.executingNode.length = 0;\n\t\t\t\t\tthis.uiStore.removeActiveAction('workflowRunning');\n\n\t\t\t\t\tthis.titleSet(this.workflowsStore.workflowName, 'IDLE');\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showMessage.stopExecutionCatch.unsaved.title'),\n\t\t\t\t\t\tmessage: this.$locale.baseText(\n\t\t\t\t\t\t\t'nodeView.showMessage.stopExecutionCatch.unsaved.message',\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t} else if (execution?.finished) {\n\t\t\t\t\t// execution finished before it could be stopped\n\n\t\t\t\t\tconst executedData = {\n\t\t\t\t\t\tdata: execution.data,\n\t\t\t\t\t\tfinished: execution.finished,\n\t\t\t\t\t\tmode: execution.mode,\n\t\t\t\t\t\tstartedAt: execution.startedAt,\n\t\t\t\t\t\tstoppedAt: execution.stoppedAt,\n\t\t\t\t\t} as IRun;\n\t\t\t\t\tconst pushData = {\n\t\t\t\t\t\tdata: executedData,\n\t\t\t\t\t\texecutionId,\n\t\t\t\t\t\tretryOf: execution.retryOf,\n\t\t\t\t\t} as IPushDataExecutionFinished;\n\t\t\t\t\tthis.workflowsStore.finishActiveExecution(pushData);\n\t\t\t\t\tthis.titleSet(execution.workflowData.name, 'IDLE');\n\t\t\t\t\tthis.workflowsStore.executingNode.length = 0;\n\t\t\t\t\tthis.workflowsStore.setWorkflowExecutionData(executedData as IExecutionResponse);\n\t\t\t\t\tthis.uiStore.removeActiveAction('workflowRunning');\n\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showMessage.stopExecutionCatch.title'),\n\t\t\t\t\t\tmessage: this.$locale.baseText('nodeView.showMessage.stopExecutionCatch.message'),\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.showError(error, this.$locale.baseText('nodeView.showError.stopExecution.title'));\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.stopExecutionInProgress = false;\n\t\t\tvoid this.workflowHelpers.getWorkflowDataToSave().then((workflowData) => {\n\t\t\t\tconst trackProps = {\n\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\tnode_graph_string: JSON.stringify(\n\t\t\t\t\t\tTelemetryHelpers.generateNodesGraph(\n\t\t\t\t\t\t\tworkflowData as IWorkflowBase,\n\t\t\t\t\t\t\tthis.workflowHelpers.getNodeTypes(),\n\t\t\t\t\t\t\t{ isCloudDeployment: this.settingsStore.isCloudDeployment },\n\t\t\t\t\t\t).nodeGraph,\n\t\t\t\t\t),\n\t\t\t\t};\n\n\t\t\t\tthis.$telemetry.track('User clicked stop workflow execution', trackProps);\n\t\t\t});\n\t\t},\n\n\t\tasync stopWaitingForWebhook() {\n\t\t\ttry {\n\t\t\t\tawait this.workflowsStore.removeTestWebhook(this.workflowsStore.workflowId);\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('nodeView.showError.stopWaitingForWebhook.title'),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * This method gets called when data got pasted into the window\n\t\t */\n\t\tasync onClipboardPasteEvent(plainTextData: string): Promise<void> {\n\t\t\tif (this.readOnlyEnv) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentTab = getNodeViewTab(this.$route);\n\t\t\tif (currentTab === MAIN_HEADER_TABS.WORKFLOW) {\n\t\t\t\tlet workflowData: IWorkflowDataUpdate | undefined;\n\t\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Check if it is an URL which could contain workflow data\n\t\t\t\tif (plainTextData.match(/^http[s]?:\\/\\/.*\\.json$/i)) {\n\t\t\t\t\t// Pasted data points to a possible workflow JSON file\n\n\t\t\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst importConfirm = await this.confirm(\n\t\t\t\t\t\tthis.$locale.baseText('nodeView.confirmMessage.onClipboardPasteEvent.message', {\n\t\t\t\t\t\t\tinterpolate: { plainTextData },\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tthis.$locale.baseText('nodeView.confirmMessage.onClipboardPasteEvent.headline'),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: 'warning',\n\t\t\t\t\t\t\tconfirmButtonText: this.$locale.baseText(\n\t\t\t\t\t\t\t\t'nodeView.confirmMessage.onClipboardPasteEvent.confirmButtonText',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tcancelButtonText: this.$locale.baseText(\n\t\t\t\t\t\t\t\t'nodeView.confirmMessage.onClipboardPasteEvent.cancelButtonText',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tdangerouslyUseHTMLString: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tif (importConfirm !== MODAL_CONFIRM) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tworkflowData = await this.getWorkflowDataFromUrl(plainTextData);\n\t\t\t\t\tif (workflowData === undefined) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Pasted data is is possible workflow data\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Check first if it is valid JSON\n\t\t\t\t\t\tworkflowData = JSON.parse(plainTextData);\n\n\t\t\t\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t// Is no valid JSON so ignore\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!workflowData) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treturn await this.importWorkflowData(workflowData, 'paste', false);\n\t\t\t}\n\t\t},\n\n\t\t// Returns the workflow data from a given URL. If no data gets found or\n\t\t// data is invalid it returns undefined and displays an error message by itself.\n\t\tasync getWorkflowDataFromUrl(url: string): Promise<IWorkflowDataUpdate | undefined> {\n\t\t\tlet workflowData: IWorkflowDataUpdate;\n\n\t\t\tthis.canvasStore.startLoading();\n\t\t\ttry {\n\t\t\t\tworkflowData = await this.workflowsStore.getWorkflowFromUrl(url);\n\t\t\t} catch (error) {\n\t\t\t\tthis.canvasStore.stopLoading();\n\t\t\t\tthis.showError(\n\t\t\t\t\terror,\n\t\t\t\t\tthis.$locale.baseText('nodeView.showError.getWorkflowDataFromUrl.title'),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.canvasStore.stopLoading();\n\n\t\t\treturn workflowData;\n\t\t},\n\n\t\t// Imports the given workflow data into the current workflow\n\t\tasync importWorkflowData(\n\t\t\tworkflowData: IWorkflowDataUpdate,\n\t\t\tsource: string,\n\t\t\timportTags = true,\n\t\t): Promise<void> {\n\t\t\t// If it is JSON check if it looks on the first look like data we can use\n\t\t\tif (!workflowData.hasOwnProperty('nodes') || !workflowData.hasOwnProperty('connections')) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst nodeIdMap: { [prev: string]: string } = {};\n\t\t\t\tif (workflowData.nodes) {\n\t\t\t\t\tconst nodeNames = workflowData.nodes.map((node) => node.name);\n\t\t\t\t\tworkflowData.nodes.forEach((node: INode) => {\n\t\t\t\t\t\t// Provide a new name for nodes that don't have one\n\t\t\t\t\t\tif (!node.name) {\n\t\t\t\t\t\t\tconst nodeType = this.nodeTypesStore.getNodeType(node.type);\n\t\t\t\t\t\t\tconst newName = this.uniqueNodeName(nodeType?.displayName ?? node.type, nodeNames);\n\t\t\t\t\t\t\tnode.name = newName;\n\t\t\t\t\t\t\tnodeNames.push(newName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//generate new webhookId if workflow already contains a node with the same webhookId\n\t\t\t\t\t\tif (node.webhookId && UPDATE_WEBHOOK_ID_NODE_TYPES.includes(node.type)) {\n\t\t\t\t\t\t\tconst isDuplicate = Object.values(\n\t\t\t\t\t\t\t\tthis.workflowHelpers.getCurrentWorkflow().nodes,\n\t\t\t\t\t\t\t).some((n) => n.webhookId === node.webhookId);\n\t\t\t\t\t\t\tif (isDuplicate) {\n\t\t\t\t\t\t\t\tnode.webhookId = uuid();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// set all new ids when pasting/importing workflows\n\t\t\t\t\t\tif (node.id) {\n\t\t\t\t\t\t\tconst newId = uuid();\n\t\t\t\t\t\t\tnodeIdMap[newId] = node.id;\n\t\t\t\t\t\t\tnode.id = newId;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode.id = uuid();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.removeUnknownCredentials(workflowData);\n\n\t\t\t\tconst currInstanceId = this.rootStore.instanceId;\n\n\t\t\t\tconst nodeGraph = JSON.stringify(\n\t\t\t\t\tTelemetryHelpers.generateNodesGraph(\n\t\t\t\t\t\tworkflowData as IWorkflowBase,\n\t\t\t\t\t\tthis.workflowHelpers.getNodeTypes(),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnodeIdMap,\n\t\t\t\t\t\t\tsourceInstanceId:\n\t\t\t\t\t\t\t\tworkflowData.meta && workflowData.meta.instanceId !== currInstanceId\n\t\t\t\t\t\t\t\t\t? workflowData.meta.instanceId\n\t\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\t\tisCloudDeployment: this.settingsStore.isCloudDeployment,\n\t\t\t\t\t\t},\n\t\t\t\t\t).nodeGraph,\n\t\t\t\t);\n\t\t\t\tif (source === 'paste') {\n\t\t\t\t\tthis.$telemetry.track('User pasted nodes', {\n\t\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\t\tnode_graph_string: nodeGraph,\n\t\t\t\t\t});\n\t\t\t\t} else if (source === 'duplicate') {\n\t\t\t\t\tthis.$telemetry.track('User duplicated nodes', {\n\t\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\t\tnode_graph_string: nodeGraph,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.$telemetry.track('User imported workflow', {\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\t\tnode_graph_string: nodeGraph,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// By default we automatically deselect all the currently\n\t\t\t\t// selected nodes and select the new ones\n\t\t\t\tthis.deselectAllNodes();\n\n\t\t\t\t// Fix the node position as it could be totally offscreen\n\t\t\t\t// and the pasted nodes would so not be directly visible to\n\t\t\t\t// the user\n\t\t\t\tthis.workflowHelpers.updateNodePositions(\n\t\t\t\t\tworkflowData,\n\t\t\t\t\tNodeViewUtils.getNewNodePosition(this.nodes, this.lastClickPosition),\n\t\t\t\t);\n\n\t\t\t\tconst data = await this.addNodesToWorkflow(workflowData);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t(data?.nodes ?? []).forEach((node: INodeUi) => {\n\t\t\t\t\t\tthis.nodeSelectedByName(node.name);\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tconst tagsEnabled = this.settingsStore.areTagsEnabled;\n\t\t\t\tif (importTags && tagsEnabled && Array.isArray(workflowData.tags)) {\n\t\t\t\t\tconst allTags = await this.tagsStore.fetchAll();\n\t\t\t\t\tconst tagNames = new Set(allTags.map((tag) => tag.name));\n\n\t\t\t\t\tconst workflowTags = workflowData.tags as ITag[];\n\t\t\t\t\tconst notFound = workflowTags.filter((tag) => !tagNames.has(tag.name));\n\n\t\t\t\t\tconst creatingTagPromises: Array<Promise<ITag>> = [];\n\t\t\t\t\tfor (const tag of notFound) {\n\t\t\t\t\t\tconst creationPromise = this.tagsStore.create(tag.name).then((tag: ITag) => {\n\t\t\t\t\t\t\tallTags.push(tag);\n\t\t\t\t\t\t\treturn tag;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcreatingTagPromises.push(creationPromise);\n\t\t\t\t\t}\n\n\t\t\t\t\tawait Promise.all(creatingTagPromises);\n\n\t\t\t\t\tconst tagIds = workflowTags.reduce((accu: string[], imported: ITag) => {\n\t\t\t\t\t\tconst tag = allTags.find((tag) => tag.name === imported.name);\n\t\t\t\t\t\tif (tag) {\n\t\t\t\t\t\t\taccu.push(tag.id);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn accu;\n\t\t\t\t\t}, []);\n\n\t\t\t\t\tthis.workflowsStore.addWorkflowTagIds(tagIds);\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.addPinDataConnections(this.workflowsStore.pinnedWorkflowData);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(error, this.$locale.baseText('nodeView.showError.importWorkflowData.title'));\n\t\t\t}\n\t\t},\n\n\t\tremoveUnknownCredentials(workflow: IWorkflowDataUpdate) {\n\t\t\tif (!workflow?.nodes) return;\n\n\t\t\tfor (const node of workflow.nodes) {\n\t\t\t\tif (!node.credentials) continue;\n\n\t\t\t\tfor (const [name, credential] of Object.entries(node.credentials)) {\n\t\t\t\t\tif (typeof credential === 'string' || credential.id === null) continue;\n\n\t\t\t\t\tif (!this.credentialsStore.getCredentialById(credential.id)) {\n\t\t\t\t\t\tdelete node.credentials[name];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonDragOver(event: DragEvent) {\n\t\t\tevent.preventDefault();\n\t\t},\n\n\t\tasync onDrop(event: DragEvent) {\n\t\t\tif (!event.dataTransfer) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst dropData = jsonParse<AddedNodesAndConnections>(\n\t\t\t\tevent.dataTransfer.getData(DRAG_EVENT_DATA_KEY),\n\t\t\t);\n\t\t\tif (dropData) {\n\t\t\t\tconst mousePosition = this.getMousePositionWithinNodeView(event);\n\t\t\t\tconst insertNodePosition = [\n\t\t\t\t\tmousePosition[0] - NodeViewUtils.NODE_SIZE / 2 + NodeViewUtils.GRID_SIZE,\n\t\t\t\t\tmousePosition[1] - NodeViewUtils.NODE_SIZE / 2,\n\t\t\t\t] as XYPosition;\n\n\t\t\t\tawait this.onAddNodes(dropData, true, insertNodePosition);\n\t\t\t\tthis.createNodeActive = false;\n\t\t\t}\n\t\t},\n\n\t\tnodeDeselectedByName(nodeName: string) {\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tif (node) {\n\t\t\t\tthis.nodeDeselected(node);\n\t\t\t}\n\t\t},\n\n\t\tnodeSelectedByName(nodeName: string, setActive = false, deselectAllOthers?: boolean) {\n\t\t\tif (deselectAllOthers === true) {\n\t\t\t\tthis.deselectAllNodes();\n\t\t\t}\n\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tif (node) {\n\t\t\t\tthis.nodeSelected(node);\n\t\t\t\tthis.uiStore.lastSelectedNode = node.name;\n\t\t\t\tthis.uiStore.lastSelectedNodeOutputIndex = null;\n\t\t\t\tthis.uiStore.lastSelectedNodeEndpointUuid = null;\n\t\t\t\tthis.canvasStore.newNodeInsertPosition = null;\n\t\t\t\tthis.canvasStore.setLastSelectedConnection(undefined);\n\n\t\t\t\tif (setActive) {\n\t\t\t\t\tthis.ndvStore.activeNodeName = node.name;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tshowMaxNodeTypeError(nodeTypeData: INodeTypeDescription) {\n\t\t\tconst maxNodes = nodeTypeData.maxNodes;\n\t\t\tthis.showMessage({\n\t\t\t\ttitle: this.$locale.baseText('nodeView.showMessage.showMaxNodeTypeError.title'),\n\t\t\t\tmessage: this.$locale.baseText('nodeView.showMessage.showMaxNodeTypeError.message', {\n\t\t\t\t\tadjustToNumber: maxNodes,\n\t\t\t\t\tinterpolate: { nodeTypeDataDisplayName: nodeTypeData.displayName },\n\t\t\t\t}),\n\t\t\t\ttype: 'error',\n\t\t\t\tduration: 0,\n\t\t\t});\n\t\t},\n\n\t\tasync getNewNodeWithDefaultCredential(\n\t\t\tnodeTypeData: INodeTypeDescription,\n\t\t\toverrides: Partial<INodeUi>,\n\t\t) {\n\t\t\tlet nodeVersion = nodeTypeData.defaultVersion;\n\n\t\t\tif (nodeVersion === undefined) {\n\t\t\t\tnodeVersion = Array.isArray(nodeTypeData.version)\n\t\t\t\t\t? nodeTypeData.version.slice(-1)[0]\n\t\t\t\t\t: nodeTypeData.version;\n\t\t\t}\n\n\t\t\tconst newNodeData: INodeUi = {\n\t\t\t\tid: uuid(),\n\t\t\t\tname: overrides.name ?? (nodeTypeData.defaults.name as string),\n\t\t\t\ttype: nodeTypeData.name,\n\t\t\t\ttypeVersion: nodeVersion,\n\t\t\t\tposition: [0, 0],\n\t\t\t\tparameters: {},\n\t\t\t};\n\n\t\t\tconst credentialPerType = nodeTypeData.credentials\n\t\t\t\t?.map((type) => this.credentialsStore.getUsableCredentialByType(type.name))\n\t\t\t\t.flat();\n\n\t\t\tif (credentialPerType && credentialPerType.length === 1) {\n\t\t\t\tconst defaultCredential = credentialPerType[0];\n\n\t\t\t\tconst selectedCredentials = this.credentialsStore.getCredentialById(defaultCredential.id);\n\t\t\t\tconst selected = { id: selectedCredentials.id, name: selectedCredentials.name };\n\t\t\t\tconst credentials = {\n\t\t\t\t\t[defaultCredential.type]: selected,\n\t\t\t\t};\n\n\t\t\t\tawait this.loadNodesProperties(\n\t\t\t\t\t[newNodeData].map((node) => ({ name: node.type, version: node.typeVersion })),\n\t\t\t\t);\n\t\t\t\tconst nodeType = this.nodeTypesStore.getNodeType(newNodeData.type, newNodeData.typeVersion);\n\t\t\t\tconst nodeParameters = NodeHelpers.getNodeParameters(\n\t\t\t\t\tnodeType?.properties || [],\n\t\t\t\t\t{},\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tnewNodeData,\n\t\t\t\t);\n\n\t\t\t\tif (nodeTypeData.credentials) {\n\t\t\t\t\tconst authentication = nodeTypeData.credentials.find(\n\t\t\t\t\t\t(type) => type.name === defaultCredential.type,\n\t\t\t\t\t);\n\t\t\t\t\tif (authentication?.displayOptions?.hide) {\n\t\t\t\t\t\treturn newNodeData;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst authDisplayOptions = authentication?.displayOptions?.show;\n\t\t\t\t\tif (!authDisplayOptions) {\n\t\t\t\t\t\tnewNodeData.credentials = credentials;\n\t\t\t\t\t\treturn newNodeData;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Object.keys(authDisplayOptions).length === 1 && authDisplayOptions.authentication) {\n\t\t\t\t\t\t// ignore complex case when there's multiple dependencies\n\t\t\t\t\t\tnewNodeData.credentials = credentials;\n\n\t\t\t\t\t\tlet parameters: { [key: string]: string } = {};\n\t\t\t\t\t\tfor (const displayOption of Object.keys(authDisplayOptions)) {\n\t\t\t\t\t\t\tif (nodeParameters && !nodeParameters[displayOption]) {\n\t\t\t\t\t\t\t\tparameters = {};\n\t\t\t\t\t\t\t\tnewNodeData.credentials = undefined;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst optionValue = authDisplayOptions[displayOption]?.[0];\n\t\t\t\t\t\t\tif (optionValue && typeof optionValue === 'string') {\n\t\t\t\t\t\t\t\tparameters[displayOption] = optionValue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnewNodeData.parameters = {\n\t\t\t\t\t\t\t\t...newNodeData.parameters,\n\t\t\t\t\t\t\t\t...parameters,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newNodeData;\n\t\t},\n\n\t\tasync injectNode(\n\t\t\tnodeTypeName: string,\n\t\t\toptions: AddNodeOptions = {},\n\t\t\tshowDetail = true,\n\t\t\ttrackHistory = false,\n\t\t\tisAutoAdd = false,\n\t\t) {\n\t\t\tconst nodeTypeData: INodeTypeDescription | null =\n\t\t\t\tthis.nodeTypesStore.getNodeType(nodeTypeName);\n\n\t\t\tif (nodeTypeData === null) {\n\t\t\t\tthis.showMessage({\n\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showMessage.addNodeButton.title'),\n\t\t\t\t\tmessage: this.$locale.baseText('nodeView.showMessage.addNodeButton.message', {\n\t\t\t\t\t\tinterpolate: { nodeTypeName },\n\t\t\t\t\t}),\n\t\t\t\t\ttype: 'error',\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tnodeTypeData.maxNodes !== undefined &&\n\t\t\t\tthis.workflowHelpers.getNodeTypeCount(nodeTypeName) >= nodeTypeData.maxNodes\n\t\t\t) {\n\t\t\t\tthis.showMaxNodeTypeError(nodeTypeData);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newNodeData = await this.getNewNodeWithDefaultCredential(nodeTypeData, {\n\t\t\t\tname: options.name,\n\t\t\t});\n\n\t\t\t// when pulling new connection from node or injecting into a connection\n\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\n\t\t\tif (options.position) {\n\t\t\t\tnewNodeData.position = NodeViewUtils.getNewNodePosition(\n\t\t\t\t\tthis.canvasStore.getNodesWithPlaceholderNode(),\n\t\t\t\t\toptions.position,\n\t\t\t\t);\n\t\t\t} else if (lastSelectedNode) {\n\t\t\t\tconst lastSelectedConnection = this.canvasStore.lastSelectedConnection;\n\t\t\t\tif (lastSelectedConnection) {\n\t\t\t\t\t// set when injecting into a connection\n\t\t\t\t\tconst [diffX] = NodeViewUtils.getConnectorLengths(lastSelectedConnection);\n\t\t\t\t\tif (diffX <= NodeViewUtils.MAX_X_TO_PUSH_DOWNSTREAM_NODES) {\n\t\t\t\t\t\tthis.pushDownstreamNodes(\n\t\t\t\t\t\t\tlastSelectedNode.name,\n\t\t\t\t\t\t\tNodeViewUtils.PUSH_NODES_OFFSET,\n\t\t\t\t\t\t\ttrackHistory,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set when pulling connections\n\t\t\t\tif (this.canvasStore.newNodeInsertPosition) {\n\t\t\t\t\tnewNodeData.position = NodeViewUtils.getNewNodePosition(this.nodes, [\n\t\t\t\t\t\tthis.canvasStore.newNodeInsertPosition[0] + NodeViewUtils.GRID_SIZE,\n\t\t\t\t\t\tthis.canvasStore.newNodeInsertPosition[1] - NodeViewUtils.NODE_SIZE / 2,\n\t\t\t\t\t]);\n\t\t\t\t\tthis.canvasStore.newNodeInsertPosition = null;\n\t\t\t\t} else {\n\t\t\t\t\tlet yOffset = 0;\n\t\t\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\n\t\t\t\t\tif (lastSelectedConnection) {\n\t\t\t\t\t\tconst sourceNodeType = this.nodeTypesStore.getNodeType(\n\t\t\t\t\t\t\tlastSelectedNode.type,\n\t\t\t\t\t\t\tlastSelectedNode.typeVersion,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (sourceNodeType) {\n\t\t\t\t\t\t\tconst offsets = [\n\t\t\t\t\t\t\t\t[-100, 100],\n\t\t\t\t\t\t\t\t[-140, 0, 140],\n\t\t\t\t\t\t\t\t[-240, -100, 100, 240],\n\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tconst sourceNodeOutputs = NodeHelpers.getNodeOutputs(\n\t\t\t\t\t\t\t\tworkflow,\n\t\t\t\t\t\t\t\tlastSelectedNode,\n\t\t\t\t\t\t\t\tsourceNodeType,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst sourceNodeOutputTypes = NodeHelpers.getConnectionTypes(sourceNodeOutputs);\n\n\t\t\t\t\t\t\tconst sourceNodeOutputMainOutputs = sourceNodeOutputTypes.filter(\n\t\t\t\t\t\t\t\t(output) => output === NodeConnectionType.Main,\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (sourceNodeOutputMainOutputs.length > 1) {\n\t\t\t\t\t\t\t\tconst offset = offsets[sourceNodeOutputMainOutputs.length - 2];\n\t\t\t\t\t\t\t\tconst sourceOutputIndex = lastSelectedConnection.__meta\n\t\t\t\t\t\t\t\t\t? lastSelectedConnection.__meta.sourceOutputIndex\n\t\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t\t\t\tyOffset = offset[sourceOutputIndex];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet outputs: Array<ConnectionTypes | INodeOutputConfiguration> = [];\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// It fails when the outputs are an expression. As those nodes have\n\t\t\t\t\t\t// normally no outputs by default and the only reason we need the\n\t\t\t\t\t\t// outputs here is to calculate the position, it is fine to assume\n\t\t\t\t\t\t// that they have no outputs and are so treated as a regular node\n\t\t\t\t\t\t// with only \"main\" outputs.\n\t\t\t\t\t\toutputs = NodeHelpers.getNodeOutputs(workflow, newNodeData, nodeTypeData);\n\t\t\t\t\t} catch (e) {}\n\t\t\t\t\tconst outputTypes = NodeHelpers.getConnectionTypes(outputs);\n\t\t\t\t\tconst lastSelectedNodeType = this.nodeTypesStore.getNodeType(\n\t\t\t\t\t\tlastSelectedNode.type,\n\t\t\t\t\t\tlastSelectedNode.typeVersion,\n\t\t\t\t\t);\n\n\t\t\t\t\t// If node has only scoped outputs, position it below the last selected node\n\t\t\t\t\tconst lastSelectedNodeWorkflow = workflow.getNode(lastSelectedNode.name);\n\t\t\t\t\tif (!lastSelectedNodeWorkflow || !lastSelectedNodeType) {\n\t\t\t\t\t\tconsole.error('Could not find last selected node or node type');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\toutputTypes.length > 0 &&\n\t\t\t\t\t\toutputTypes.every((outputName) => outputName !== NodeConnectionType.Main)\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst lastSelectedInputs = NodeHelpers.getNodeInputs(\n\t\t\t\t\t\t\tworkflow,\n\t\t\t\t\t\t\tlastSelectedNodeWorkflow,\n\t\t\t\t\t\t\tlastSelectedNodeType,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst lastSelectedInputTypes = NodeHelpers.getConnectionTypes(lastSelectedInputs);\n\n\t\t\t\t\t\tconst scopedConnectionIndex = (lastSelectedInputTypes || [])\n\t\t\t\t\t\t\t.filter((input) => input !== NodeConnectionType.Main)\n\t\t\t\t\t\t\t.findIndex((inputType) => outputs[0] === inputType);\n\n\t\t\t\t\t\tnewNodeData.position = NodeViewUtils.getNewNodePosition(\n\t\t\t\t\t\t\tthis.nodes,\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\tlastSelectedNode.position[0] +\n\t\t\t\t\t\t\t\t\t(NodeViewUtils.NODE_SIZE /\n\t\t\t\t\t\t\t\t\t\t(Math.max(lastSelectedNodeType?.inputs?.length ?? 1), 1)) *\n\t\t\t\t\t\t\t\t\t\tscopedConnectionIndex,\n\t\t\t\t\t\t\t\tlastSelectedNode.position[1] + NodeViewUtils.PUSH_NODES_OFFSET,\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[100, 0],\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Has only main outputs or no outputs at all\n\t\t\t\t\t\tconst inputs = NodeHelpers.getNodeInputs(\n\t\t\t\t\t\t\tworkflow,\n\t\t\t\t\t\t\tlastSelectedNode,\n\t\t\t\t\t\t\tlastSelectedNodeType,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst inputsTypes = NodeHelpers.getConnectionTypes(inputs);\n\n\t\t\t\t\t\tlet pushOffset = NodeViewUtils.PUSH_NODES_OFFSET;\n\t\t\t\t\t\tif (!!inputsTypes.find((input) => input !== NodeConnectionType.Main)) {\n\t\t\t\t\t\t\t// If the node has scoped inputs, push it down a bit more\n\t\t\t\t\t\t\tpushOffset += 150;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If a node is active then add the new node directly after the current one\n\t\t\t\t\t\tnewNodeData.position = NodeViewUtils.getNewNodePosition(\n\t\t\t\t\t\t\tthis.nodes,\n\t\t\t\t\t\t\t[lastSelectedNode.position[0] + pushOffset, lastSelectedNode.position[1] + yOffset],\n\t\t\t\t\t\t\t[100, 0],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If added node is a trigger and it's the first one added to the canvas\n\t\t\t\t// we place it at canvasAddButtonPosition to replace the canvas add button\n\t\t\t\tconst position =\n\t\t\t\t\tthis.nodeTypesStore.isTriggerNode(nodeTypeName) && !this.containsTrigger\n\t\t\t\t\t\t? this.canvasStore.canvasAddButtonPosition\n\t\t\t\t\t\t: // If no node is active find a free spot\n\t\t\t\t\t\t\t(this.lastClickPosition as XYPosition);\n\n\t\t\t\tnewNodeData.position = NodeViewUtils.getNewNodePosition(this.nodes, position);\n\t\t\t}\n\n\t\t\tconst localizedName = this.locale.localizeNodeName(newNodeData.name, newNodeData.type);\n\n\t\t\tnewNodeData.name = this.uniqueNodeName(localizedName);\n\n\t\t\tif (nodeTypeData.webhooks?.length) {\n\t\t\t\tnewNodeData.webhookId = uuid();\n\t\t\t}\n\n\t\t\tawait this.addNodes([newNodeData], undefined, trackHistory);\n\t\t\tthis.workflowsStore.setNodePristine(newNodeData.name, true);\n\n\t\t\tthis.uiStore.stateIsDirty = true;\n\n\t\t\tif (nodeTypeName === STICKY_NODE_TYPE) {\n\t\t\t\tthis.$telemetry.trackNodesPanel('nodeView.addSticky', {\n\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tvoid this.externalHooks.run('nodeView.addNodeButton', { nodeTypeName });\n\t\t\t\tuseSegment().trackAddedTrigger(nodeTypeName);\n\t\t\t\tconst trackProperties: ITelemetryTrackProperties = {\n\t\t\t\t\tnode_type: nodeTypeName,\n\t\t\t\t\tnode_version: newNodeData.typeVersion,\n\t\t\t\t\tis_auto_add: isAutoAdd,\n\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\tdrag_and_drop: options.dragAndDrop,\n\t\t\t\t};\n\n\t\t\t\tif (lastSelectedNode) {\n\t\t\t\t\ttrackProperties.input_node_type = lastSelectedNode.type;\n\t\t\t\t}\n\n\t\t\t\tthis.$telemetry.trackNodesPanel('nodeView.addNodeButton', trackProperties);\n\t\t\t}\n\n\t\t\t// Automatically deselect all nodes and select the current one and also active\n\t\t\t// current node. But only if it's added manually by the user (not by undo/redo mechanism)\n\t\t\tif (trackHistory) {\n\t\t\t\tthis.deselectAllNodes();\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.nodeSelectedByName(\n\t\t\t\t\t\tnewNodeData.name,\n\t\t\t\t\t\tshowDetail && nodeTypeName !== STICKY_NODE_TYPE,\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn newNodeData;\n\t\t},\n\t\tgetConnection(\n\t\t\tsourceNodeName: string,\n\t\t\tsourceNodeOutputIndex: number,\n\t\t\ttargetNodeName: string,\n\t\t\ttargetNodeOuputIndex: number,\n\t\t\ttype: ConnectionTypes,\n\t\t): IConnection | undefined {\n\t\t\tconst nodeConnections =\n\t\t\t\tthis.workflowsStore.outgoingConnectionsByNodeName(sourceNodeName)[type];\n\t\t\tif (nodeConnections) {\n\t\t\t\tconst connections: IConnection[] | null = nodeConnections[sourceNodeOutputIndex];\n\n\t\t\t\tif (connections) {\n\t\t\t\t\treturn connections.find(\n\t\t\t\t\t\t(connection: IConnection) =>\n\t\t\t\t\t\t\tconnection.node === targetNodeName && connection.index === targetNodeOuputIndex,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\t\tconnectTwoNodes(\n\t\t\tsourceNodeName: string,\n\t\t\tsourceNodeOutputIndex: number,\n\t\t\ttargetNodeName: string,\n\t\t\ttargetNodeOutputIndex: number,\n\t\t\ttype: NodeConnectionType,\n\t\t) {\n\t\t\tthis.uiStore.stateIsDirty = true;\n\n\t\t\tconst sourceNode = this.workflowsStore.getNodeByName(sourceNodeName);\n\t\t\tconst targetNode = this.workflowsStore.getNodeByName(targetNodeName);\n\n\t\t\tif (\n\t\t\t\tsourceNode &&\n\t\t\t\ttargetNode &&\n\t\t\t\t!this.checkNodeConnectionAllowed(sourceNode, targetNode, type)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tthis.getConnection(\n\t\t\t\t\tsourceNodeName,\n\t\t\t\t\tsourceNodeOutputIndex,\n\t\t\t\t\ttargetNodeName,\n\t\t\t\t\ttargetNodeOutputIndex,\n\t\t\t\t\ttype,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst connectionData = [\n\t\t\t\t{\n\t\t\t\t\tnode: sourceNodeName,\n\t\t\t\t\ttype,\n\t\t\t\t\tindex: sourceNodeOutputIndex,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tnode: targetNodeName,\n\t\t\t\t\ttype,\n\t\t\t\t\tindex: targetNodeOutputIndex,\n\t\t\t\t},\n\t\t\t] as [IConnection, IConnection];\n\n\t\t\tthis.__addConnection(connectionData);\n\t\t},\n\t\tasync addNode(\n\t\t\tnodeTypeName: string,\n\t\t\toptions: AddNodeOptions = {},\n\t\t\tshowDetail = true,\n\t\t\ttrackHistory = false,\n\t\t\tisAutoAdd = false,\n\t\t) {\n\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst lastSelectedNode = this.lastSelectedNode;\n\t\t\tconst lastSelectedNodeOutputIndex = this.uiStore.lastSelectedNodeOutputIndex;\n\t\t\tconst lastSelectedNodeEndpointUuid = this.uiStore.lastSelectedNodeEndpointUuid;\n\t\t\tconst lastSelectedConnection = this.canvasStore.lastSelectedConnection;\n\n\t\t\tthis.historyStore.startRecordingUndo();\n\n\t\t\tconst newNodeData = await this.injectNode(\n\t\t\t\tnodeTypeName,\n\t\t\t\toptions,\n\t\t\t\tshowDetail,\n\t\t\t\ttrackHistory,\n\t\t\t\tisAutoAdd,\n\t\t\t);\n\t\t\tif (!newNodeData) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst outputIndex = lastSelectedNodeOutputIndex || 0;\n\t\t\tconst targetEndpoint = lastSelectedNodeEndpointUuid || '';\n\n\t\t\t// Handle connection of scoped_endpoint types\n\t\t\tif (lastSelectedNodeEndpointUuid && !isAutoAdd && lastSelectedNode) {\n\t\t\t\tconst lastSelectedEndpoint = this.instance.getEndpoint(lastSelectedNodeEndpointUuid);\n\t\t\t\tif (\n\t\t\t\t\tlastSelectedEndpoint &&\n\t\t\t\t\tthis.checkNodeConnectionAllowed(\n\t\t\t\t\t\tlastSelectedNode,\n\t\t\t\t\t\tnewNodeData,\n\t\t\t\t\t\tlastSelectedEndpoint.scope as NodeConnectionType,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst connectionType = lastSelectedEndpoint.scope as ConnectionTypes;\n\t\t\t\t\tconst newNodeElement = this.instance.getManagedElement(newNodeData.id);\n\t\t\t\t\tconst newNodeConnections = this.instance.getEndpoints(newNodeElement);\n\t\t\t\t\tconst viableConnection = newNodeConnections.find((conn) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tconn.scope === connectionType &&\n\t\t\t\t\t\t\tlastSelectedEndpoint.parameters.connection !== conn.parameters.connection\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\n\t\t\t\t\tthis.instance?.connect({\n\t\t\t\t\t\tuuids: [targetEndpoint, viableConnection?.uuid || ''],\n\t\t\t\t\t\tdetachable: !this.isReadOnlyRoute && !this.readOnlyEnv,\n\t\t\t\t\t});\n\t\t\t\t\tthis.historyStore.stopRecordingUndo();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If a node is last selected then connect between the active and its child ones\n\t\t\tif (lastSelectedNode && !isAutoAdd) {\n\t\t\t\tawait this.$nextTick();\n\n\t\t\t\tif (lastSelectedConnection?.__meta) {\n\t\t\t\t\tthis.__deleteJSPlumbConnection(lastSelectedConnection, trackHistory);\n\n\t\t\t\t\tconst targetNodeName = lastSelectedConnection.__meta.targetNodeName;\n\t\t\t\t\tconst targetOutputIndex = lastSelectedConnection.__meta.targetOutputIndex;\n\t\t\t\t\tthis.connectTwoNodes(\n\t\t\t\t\t\tnewNodeData.name,\n\t\t\t\t\t\t0,\n\t\t\t\t\t\ttargetNodeName,\n\t\t\t\t\t\ttargetOutputIndex,\n\t\t\t\t\t\tNodeConnectionType.Main,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Connect active node to the newly created one\n\t\t\t\tthis.connectTwoNodes(\n\t\t\t\t\tlastSelectedNode.name,\n\t\t\t\t\toutputIndex,\n\t\t\t\t\tnewNodeData.name,\n\t\t\t\t\t0,\n\t\t\t\t\tNodeConnectionType.Main,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.historyStore.stopRecordingUndo();\n\t\t},\n\t\tgetNodeCreatorFilter(nodeName: string, outputType?: NodeConnectionType) {\n\t\t\tlet filter;\n\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\t\t\tconst workflowNode = workflow.getNode(nodeName);\n\t\t\tif (!workflowNode) return { nodes: [] };\n\n\t\t\tconst nodeType = this.nodeTypesStore.getNodeType(\n\t\t\t\tworkflowNode?.type,\n\t\t\t\tworkflowNode.typeVersion,\n\t\t\t);\n\t\t\tif (nodeType) {\n\t\t\t\tconst inputs = NodeHelpers.getNodeInputs(workflow, workflowNode, nodeType);\n\n\t\t\t\tconst filterFound = inputs.filter((input) => {\n\t\t\t\t\tif (typeof input === 'string' || input.type !== outputType || !input.filter) {\n\t\t\t\t\t\t// No filters defined or wrong connection type\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t}) as INodeInputConfiguration[];\n\n\t\t\t\tif (filterFound.length) {\n\t\t\t\t\tfilter = filterFound[0].filter;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn filter;\n\t\t},\n\t\tinsertNodeAfterSelected(info: AIAssistantConnectionInfo) {\n\t\t\tconst type = info.outputType ?? NodeConnectionType.Main;\n\t\t\t// Get the node and set it as active that new nodes\n\t\t\t// which get created get automatically connected\n\t\t\t// to it.\n\t\t\tconst sourceNode = this.workflowsStore.getNodeById(info.sourceId);\n\t\t\tif (!sourceNode) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.uiStore.lastSelectedNode = sourceNode.name;\n\t\t\tthis.uiStore.lastSelectedNodeEndpointUuid =\n\t\t\t\tinfo.endpointUuid ?? info.connection?.target.jtk?.endpoint.uuid;\n\t\t\tthis.uiStore.lastSelectedNodeOutputIndex = info.index;\n\t\t\tthis.canvasStore.newNodeInsertPosition = null;\n\n\t\t\tif (info.connection) {\n\t\t\t\tthis.canvasStore.setLastSelectedConnection(info.connection);\n\t\t\t}\n\n\t\t\tthis.onToggleNodeCreator({\n\t\t\t\tsource: info.eventSource,\n\t\t\t\tcreateNodeActive: true,\n\t\t\t\tnodeCreatorView: info.nodeCreatorView,\n\t\t\t});\n\n\t\t\t// TODO: The animation is a bit glitchy because we're updating view stack immediately\n\t\t\t// after the node creator is opened\n\t\t\tconst isOutput = info.connection?.endpoints[0].parameters.connection === 'source';\n\t\t\tconst isScopedConnection =\n\t\t\t\ttype !== NodeConnectionType.Main && nodeConnectionTypes.includes(type);\n\n\t\t\tif (isScopedConnection) {\n\t\t\t\tuseViewStacks()\n\t\t\t\t\t.gotoCompatibleConnectionView(\n\t\t\t\t\t\ttype,\n\t\t\t\t\t\tisOutput,\n\t\t\t\t\t\tthis.getNodeCreatorFilter(sourceNode.name, type),\n\t\t\t\t\t)\n\t\t\t\t\t.catch(() => {});\n\t\t\t}\n\t\t},\n\t\tasync onEventConnectionAbort(connection: Connection) {\n\t\t\ttry {\n\t\t\t\tif (this.dropPrevented) {\n\t\t\t\t\tthis.dropPrevented = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (this.pullConnActiveNodeName) {\n\t\t\t\t\tconst sourceNode = this.workflowsStore.getNodeById(connection.parameters.nodeId);\n\t\t\t\t\tconst connectionType = connection.parameters.type ?? NodeConnectionType.Main;\n\t\t\t\t\tconst overrideTargetEndpoint = connection?.connector\n\t\t\t\t\t\t?.overrideTargetEndpoint as Endpoint | null;\n\n\t\t\t\t\tif (sourceNode) {\n\t\t\t\t\t\tconst isTarget = connection.parameters.connection === 'target';\n\t\t\t\t\t\tconst sourceNodeName = isTarget ? this.pullConnActiveNodeName : sourceNode.name;\n\t\t\t\t\t\tconst targetNodeName = isTarget ? sourceNode.name : this.pullConnActiveNodeName;\n\t\t\t\t\t\tconst outputIndex = connection.parameters.index;\n\t\t\t\t\t\tNodeViewUtils.resetConnectionAfterPull(connection);\n\t\t\t\t\t\tawait this.$nextTick();\n\n\t\t\t\t\t\tthis.connectTwoNodes(\n\t\t\t\t\t\t\tsourceNodeName,\n\t\t\t\t\t\t\toutputIndex,\n\t\t\t\t\t\t\ttargetNodeName,\n\t\t\t\t\t\t\toverrideTargetEndpoint?.parameters?.index ?? 0,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.pullConnActiveNodeName = null;\n\t\t\t\t\t\tthis.dropPrevented = false;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// When connection is aborted, we want to show the 'Next step' popup\n\t\t\t\tconst endpointId = `${connection.parameters.nodeId}-output${connection.parameters.index}`;\n\t\t\t\tconst endpoint = connection.instance.getEndpoint(endpointId);\n\t\t\t\t// First, show node creator if endpoint is not a plus endpoint\n\t\t\t\t// or if the AI Assistant experiment doesn't need to be shown to user\n\t\t\t\tif (!endpoint?.endpoint?.canvas || !this.shouldShowNextStepDialog) {\n\t\t\t\t\tthis.insertNodeAfterSelected({\n\t\t\t\t\t\tsourceId: connection.parameters.nodeId,\n\t\t\t\t\t\tindex: connection.parameters.index,\n\t\t\t\t\t\teventSource: NODE_CREATOR_OPEN_SOURCES.NODE_CONNECTION_DROP,\n\t\t\t\t\t\tconnection,\n\t\t\t\t\t\toutputType: connection.parameters.type,\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Else render the popup\n\t\t\t\tconst endpointElement: HTMLElement = endpoint.endpoint.canvas;\n\t\t\t\t// Use observer to trigger the popup once the endpoint is rendered back again\n\t\t\t\t// after connection drag is aborted (so we can get it's position and dimensions)\n\t\t\t\tconst observer = new MutationObserver((mutations) => {\n\t\t\t\t\t// Find the mutation in which the current endpoint becomes visible again\n\t\t\t\t\tconst endpointMutation = mutations.find((mutation) => {\n\t\t\t\t\t\tconst target = mutation.target;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tisJSPlumbEndpointElement(target) &&\n\t\t\t\t\t\t\ttarget.jtk?.endpoint?.uuid === endpoint.uuid &&\n\t\t\t\t\t\t\ttarget.style.display === 'block'\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t\tif (endpointMutation) {\n\t\t\t\t\t\t// When found, display the popup\n\t\t\t\t\t\tconst newConnectionInfo: AIAssistantConnectionInfo = {\n\t\t\t\t\t\t\tsourceId: connection.parameters.nodeId,\n\t\t\t\t\t\t\tindex: connection.parameters.index,\n\t\t\t\t\t\t\teventSource: NODE_CREATOR_OPEN_SOURCES.NODE_CONNECTION_DROP,\n\t\t\t\t\t\t\toutputType: connection.parameters.type,\n\t\t\t\t\t\t\tendpointUuid: endpoint.uuid,\n\t\t\t\t\t\t\tstepName: endpoint.__meta.nodeName,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.aiStore.latestConnectionInfo = newConnectionInfo;\n\t\t\t\t\t\tthis.aiStore.openNextStepPopup(\n\t\t\t\t\t\t\tthis.$locale.baseText('nextStepPopup.title.nextStep'),\n\t\t\t\t\t\t\tendpointElement,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tobserver.observe(this.$refs.nodeViewRef as HTMLElement, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeFilter: ['style'],\n\t\t\t\t\tsubtree: true,\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t},\n\t\tcheckNodeConnectionAllowed(\n\t\t\tsourceNode: INodeUi,\n\t\t\ttargetNode: INodeUi,\n\t\t\ttargetInfoType: NodeConnectionType,\n\t\t): boolean {\n\t\t\tconst targetNodeType = this.nodeTypesStore.getNodeType(\n\t\t\t\ttargetNode.type,\n\t\t\t\ttargetNode.typeVersion,\n\t\t\t);\n\n\t\t\tif (targetNodeType?.inputs?.length) {\n\t\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\t\t\t\tconst workflowNode = workflow.getNode(targetNode.name);\n\t\t\t\tlet inputs: Array<ConnectionTypes | INodeInputConfiguration> = [];\n\t\t\t\tif (targetNodeType && workflowNode) {\n\t\t\t\t\tinputs = NodeHelpers.getNodeInputs(workflow, workflowNode, targetNodeType);\n\t\t\t\t}\n\n\t\t\t\tfor (const input of inputs || []) {\n\t\t\t\t\tif (typeof input === 'string' || input.type !== targetInfoType || !input.filter) {\n\t\t\t\t\t\t// No filters defined or wrong connection type\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (input.filter.nodes.length) {\n\t\t\t\t\t\tif (!input.filter.nodes.includes(sourceNode.type)) {\n\t\t\t\t\t\t\tthis.dropPrevented = true;\n\t\t\t\t\t\t\tthis.showToast({\n\t\t\t\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showError.nodeNodeCompatible.title'),\n\t\t\t\t\t\t\t\tmessage: this.$locale.baseText('nodeView.showError.nodeNodeCompatible.message', {\n\t\t\t\t\t\t\t\t\tinterpolate: { sourceNodeName: sourceNode.name, targetNodeName: targetNode.name },\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\tduration: 5000,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tonInterceptBeforeDrop(info: BeforeDropParams) {\n\t\t\ttry {\n\t\t\t\tlet sourceInfo: ComponentParameters;\n\t\t\t\tlet targetInfo: ComponentParameters;\n\t\t\t\tif (info.connection.endpoints[0].parameters.connection === 'target') {\n\t\t\t\t\tsourceInfo = info.dropEndpoint.parameters;\n\t\t\t\t\ttargetInfo = info.connection.endpoints[0].parameters;\n\t\t\t\t} else {\n\t\t\t\t\tsourceInfo = info.connection.endpoints[0].parameters;\n\t\t\t\t\ttargetInfo = info.dropEndpoint.parameters;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tsourceInfo.type !== targetInfo.type ||\n\t\t\t\t\tsourceInfo.connection === targetInfo.connection\n\t\t\t\t) {\n\t\t\t\t\tthis.dropPrevented = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst sourceNode = this.workflowsStore.getNodeById(sourceInfo.nodeId);\n\t\t\t\tconst targetNode = this.workflowsStore.getNodeById(targetInfo.nodeId);\n\n\t\t\t\tconst sourceNodeName = sourceNode?.name || '';\n\t\t\t\tconst targetNodeName = targetNode?.name || '';\n\n\t\t\t\tif (sourceNode && targetNode) {\n\t\t\t\t\tif (!this.checkNodeConnectionAllowed(sourceNode, targetNode, targetInfo.type)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// check for duplicates\n\t\t\t\tif (\n\t\t\t\t\tthis.getConnection(\n\t\t\t\t\t\tsourceNodeName,\n\t\t\t\t\t\tsourceInfo.index,\n\t\t\t\t\t\ttargetNodeName,\n\t\t\t\t\t\ttargetInfo.index,\n\t\t\t\t\t\tsourceInfo.type,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tthis.dropPrevented = true;\n\t\t\t\t\tthis.pullConnActiveNodeName = null;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t},\n\t\tonEventConnection(info: ConnectionEstablishedParams) {\n\t\t\ttry {\n\t\t\t\tif (info.sourceEndpoint.parameters.connection === 'target') {\n\t\t\t\t\t// Allow that not \"main\" connections can also be dragged the other way around\n\t\t\t\t\t// so switch them around if necessary\n\t\t\t\t\tconst tempEndpoint = info.sourceEndpoint;\n\t\t\t\t\tinfo.sourceEndpoint = info.targetEndpoint;\n\t\t\t\t\tinfo.targetEndpoint = tempEndpoint;\n\t\t\t\t}\n\n\t\t\t\tconst sourceInfo = info.sourceEndpoint.parameters;\n\t\t\t\tconst targetInfo = info.targetEndpoint.parameters;\n\n\t\t\t\tconst sourceNodeName = this.workflowsStore.getNodeById(sourceInfo.nodeId)?.name;\n\t\t\t\tconst targetNodeName = this.workflowsStore.getNodeById(targetInfo.nodeId)?.name;\n\n\t\t\t\tif (sourceNodeName && targetNodeName) {\n\t\t\t\t\tinfo.connection.__meta = {\n\t\t\t\t\t\tsourceNodeName,\n\t\t\t\t\t\tsourceOutputIndex: sourceInfo.index,\n\t\t\t\t\t\ttargetNodeName,\n\t\t\t\t\t\ttargetOutputIndex: targetInfo.index,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tNodeViewUtils.resetConnection(info.connection);\n\t\t\t\tNodeViewUtils.moveBackInputLabelPosition(info.targetEndpoint);\n\n\t\t\t\tif (!sourceNodeName || !targetNodeName) {\n\t\t\t\t\tconsole.error('Could not find source or target node name');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst connectionData: [IConnection, IConnection] = [\n\t\t\t\t\t{\n\t\t\t\t\t\tnode: sourceNodeName,\n\t\t\t\t\t\ttype: sourceInfo.type,\n\t\t\t\t\t\tindex: sourceInfo.index,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tnode: targetNodeName,\n\t\t\t\t\t\ttype: targetInfo.type,\n\t\t\t\t\t\tindex: targetInfo.index,\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tthis.dropPrevented = true;\n\t\t\t\tthis.workflowsStore.addConnection({ connection: connectionData });\n\n\t\t\t\tif (!this.isReadOnlyRoute && !this.readOnlyEnv) {\n\t\t\t\t\tNodeViewUtils.hideOutputNameLabel(info.sourceEndpoint);\n\t\t\t\t\tNodeViewUtils.addConnectionActionsOverlay(\n\t\t\t\t\t\tinfo.connection,\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.activeConnection = null;\n\t\t\t\t\t\t\tthis.__deleteJSPlumbConnection(info.connection);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tthis.insertNodeAfterSelected({\n\t\t\t\t\t\t\t\tsourceId: info.sourceEndpoint.parameters.nodeId,\n\t\t\t\t\t\t\t\tindex: sourceInfo.index,\n\t\t\t\t\t\t\t\tconnection: info.connection,\n\t\t\t\t\t\t\t\teventSource: NODE_CREATOR_OPEN_SOURCES.NODE_CONNECTION_ACTION,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tconst endpointArrow = NodeViewUtils.getOverlay(\n\t\t\t\t\t\tinfo.connection,\n\t\t\t\t\t\tOVERLAY_ENDPOINT_ARROW_ID,\n\t\t\t\t\t);\n\t\t\t\t\tif (sourceInfo.type !== NodeConnectionType.Main) {\n\t\t\t\t\t\t// Not \"main\" connections get a different connection style\n\t\t\t\t\t\tinfo.connection.setPaintStyle(\n\t\t\t\t\t\t\tgetConnectorPaintStyleData(info.connection, info.sourceEndpoint.parameters.category),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tendpointArrow?.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.dropPrevented = false;\n\t\t\t\tif (!this.isLoading) {\n\t\t\t\t\tthis.uiStore.stateIsDirty = true;\n\t\t\t\t\tif (!this.suspendRecordingDetachedConnections) {\n\t\t\t\t\t\tthis.historyStore.pushCommandToUndo(new AddConnectionCommand(connectionData));\n\t\t\t\t\t}\n\t\t\t\t\t// When we add multiple nodes, this event could be fired hundreds of times for large workflows.\n\t\t\t\t\t// And because the updateNodesInputIssues() method is quite expensive, we only call it if not in insert mode\n\t\t\t\t\tif (!this.isInsertingNodes) {\n\t\t\t\t\t\tthis.nodeHelpers.updateNodesInputIssues();\n\t\t\t\t\t\tthis.resetEndpointsErrors();\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tNodeViewUtils.addConnectionTestData(\n\t\t\t\t\t\t\t\tinfo.source,\n\t\t\t\t\t\t\t\tinfo.target,\n\t\t\t\t\t\t\t\tinfo.connection?.connector?.hasOwnProperty('canvas')\n\t\t\t\t\t\t\t\t\t? info.connection.connector.canvas\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t},\n\t\taddConectionsTestData() {\n\t\t\tthis.instance.connections.forEach((connection) => {\n\t\t\t\tNodeViewUtils.addConnectionTestData(\n\t\t\t\t\tconnection.source,\n\t\t\t\t\tconnection.target,\n\t\t\t\t\tconnection?.connector?.hasOwnProperty('canvas')\n\t\t\t\t\t\t? connection?.connector.canvas\n\t\t\t\t\t\t: undefined,\n\t\t\t\t);\n\t\t\t});\n\t\t},\n\t\tonDragMove() {\n\t\t\tconst totalNodes = this.nodes.length;\n\t\t\tvoid this.callDebounced(this.updateConnectionsOverlays, {\n\t\t\t\tdebounceTime: totalNodes > 20 ? 200 : 0,\n\t\t\t});\n\t\t},\n\t\tupdateConnectionsOverlays() {\n\t\t\tthis.instance?.connections.forEach((connection) => {\n\t\t\t\tNodeViewUtils.showOrHideItemsLabel(connection);\n\t\t\t\tNodeViewUtils.showOrHideMidpointArrow(connection);\n\n\t\t\t\tObject.values(connection.overlays).forEach((overlay) => {\n\t\t\t\t\tif (!overlay.canvas) return;\n\t\t\t\t\tthis.instance?.repaint(overlay.canvas);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tisConnectionActive(connection: Connection | null) {\n\t\t\tif (!connection?.id || !this.activeConnection?.id) return false;\n\n\t\t\treturn this.activeConnection?.id === connection.id;\n\t\t},\n\t\tonConnectionMouseOver(connection: Connection) {\n\t\t\ttry {\n\t\t\t\tif (this.exitTimer !== undefined) {\n\t\t\t\t\tclearTimeout(this.exitTimer);\n\t\t\t\t\tthis.exitTimer = undefined;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t// eslint-disable-next-line no-constant-binary-expression\n\t\t\t\t\tthis.isReadOnlyRoute ??\n\t\t\t\t\tthis.readOnlyEnv ??\n\t\t\t\t\tthis.enterTimer ??\n\t\t\t\t\t!connection ??\n\t\t\t\t\tthis.isConnectionActive(connection)\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tthis.enterTimer = setTimeout(() => {\n\t\t\t\t\t// If there is already an active connection then hide it first\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.activeConnection &&\n\t\t\t\t\t\t!this.isConnectionActive(connection) &&\n\t\t\t\t\t\tisJSPlumbConnection(this.activeConnection)\n\t\t\t\t\t) {\n\t\t\t\t\t\tNodeViewUtils.hideConnectionActions(this.activeConnection);\n\t\t\t\t\t}\n\t\t\t\t\tthis.enterTimer = undefined;\n\t\t\t\t\tif (connection) {\n\t\t\t\t\t\tNodeViewUtils.showConnectionActions(connection);\n\t\t\t\t\t\tthis.activeConnection = connection;\n\t\t\t\t\t}\n\t\t\t\t}, 150);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t},\n\t\tonConnectionMouseOut(connection: Connection) {\n\t\t\ttry {\n\t\t\t\tif (this.exitTimer) return;\n\n\t\t\t\tif (this.enterTimer) {\n\t\t\t\t\tclearTimeout(this.enterTimer);\n\t\t\t\t\tthis.enterTimer = undefined;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t// eslint-disable-next-line no-constant-binary-expression\n\t\t\t\t\tthis.isReadOnlyRoute ??\n\t\t\t\t\tthis.readOnlyEnv ??\n\t\t\t\t\t!connection ??\n\t\t\t\t\t!this.isConnectionActive(connection)\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tthis.exitTimer = setTimeout(() => {\n\t\t\t\t\tthis.exitTimer = undefined;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tconnection &&\n\t\t\t\t\t\tthis.isConnectionActive(connection) &&\n\t\t\t\t\t\tisJSPlumbConnection(this.activeConnection)\n\t\t\t\t\t) {\n\t\t\t\t\t\tNodeViewUtils.hideConnectionActions(this.activeConnection);\n\t\t\t\t\t\tthis.activeConnection = null;\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t},\n\t\tonConnectionMoved(info: ConnectionMovedParams) {\n\t\t\ttry {\n\t\t\t\t// When a connection gets moved from one node to another it for some reason\n\t\t\t\t// calls the \"connection\" event but not the \"connectionDetached\" one. So we listen\n\t\t\t\t// additionally to the \"connectionMoved\" event and then only delete the existing connection.\n\n\t\t\t\tNodeViewUtils.resetInputLabelPosition(info.connection);\n\n\t\t\t\tconst sourceInfo = info.connection.parameters;\n\t\t\t\tconst targetInfo = info.originalEndpoint.parameters;\n\n\t\t\t\tconst connectionInfo = [\n\t\t\t\t\t{\n\t\t\t\t\t\tnode: this.workflowsStore.getNodeById(sourceInfo.nodeId)?.name || '',\n\t\t\t\t\t\ttype: sourceInfo.type,\n\t\t\t\t\t\tindex: sourceInfo.index,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tnode: this.workflowsStore.getNodeById(targetInfo.nodeId)?.name || '',\n\t\t\t\t\t\ttype: targetInfo.type,\n\t\t\t\t\t\tindex: targetInfo.index,\n\t\t\t\t\t},\n\t\t\t\t] as [IConnection, IConnection];\n\n\t\t\t\tthis.__removeConnection(connectionInfo, false);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t},\n\t\tonEndpointMouseOver(endpoint: Endpoint, mouse: MouseEvent) {\n\t\t\t// This event seems bugged. It gets called constantly even when the mouse is not over the endpoint\n\t\t\t// if the endpoint has a connection attached to it. So we need to check if the mouse is actually over\n\t\t\t// the endpoint.\n\t\t\tif (!endpoint.isTarget || mouse.target !== endpoint.endpoint.canvas) return;\n\t\t\tthis.instance.setHover(endpoint, true);\n\t\t},\n\t\tonEndpointMouseOut(endpoint: Endpoint) {\n\t\t\tif (!endpoint.isTarget) return;\n\t\t\tthis.instance.setHover(endpoint, false);\n\t\t},\n\t\tasync onConnectionDetached(info: ConnectionDetachedParams) {\n\t\t\ttry {\n\t\t\t\tif (info.sourceEndpoint.parameters.connection === 'target') {\n\t\t\t\t\t// Allow that not \"main\" connections can also be dragged the other way around\n\t\t\t\t\tconst tempEndpoint = info.sourceEndpoint;\n\t\t\t\t\tinfo.sourceEndpoint = info.targetEndpoint;\n\t\t\t\t\tinfo.targetEndpoint = tempEndpoint;\n\t\t\t\t}\n\n\t\t\t\tconst connectionInfo: [IConnection, IConnection] | null = getConnectionInfo(info);\n\t\t\t\tNodeViewUtils.resetInputLabelPosition(info.targetEndpoint);\n\t\t\t\tNodeViewUtils.showOutputNameLabel(info.sourceEndpoint, info.connection);\n\n\t\t\t\tinfo.connection.removeOverlays();\n\t\t\t\tthis.__removeConnectionByConnectionInfo(info, false, false);\n\n\t\t\t\tif (this.pullConnActiveNodeName) {\n\t\t\t\t\t// establish new connection when dragging connection from one node to another\n\t\t\t\t\tthis.historyStore.startRecordingUndo();\n\t\t\t\t\tconst sourceNode = this.workflowsStore.getNodeById(info.connection.parameters.nodeId);\n\n\t\t\t\t\tif (!sourceNode) {\n\t\t\t\t\t\tthrow new Error('Could not find source node');\n\t\t\t\t\t}\n\n\t\t\t\t\tconst sourceNodeName = sourceNode.name;\n\t\t\t\t\tconst outputIndex = info.connection.parameters.index;\n\t\t\t\t\tconst overrideTargetEndpoint = info.connection.connector\n\t\t\t\t\t\t.overrideTargetEndpoint as Endpoint | null;\n\n\t\t\t\t\tif (connectionInfo) {\n\t\t\t\t\t\tthis.historyStore.pushCommandToUndo(new RemoveConnectionCommand(connectionInfo));\n\t\t\t\t\t}\n\t\t\t\t\tthis.connectTwoNodes(\n\t\t\t\t\t\tsourceNodeName,\n\t\t\t\t\t\toutputIndex,\n\t\t\t\t\t\tthis.pullConnActiveNodeName,\n\t\t\t\t\t\toverrideTargetEndpoint?.parameters?.index ?? 0,\n\t\t\t\t\t\tNodeConnectionType.Main,\n\t\t\t\t\t);\n\t\t\t\t\tthis.pullConnActiveNodeName = null;\n\t\t\t\t\tawait this.$nextTick();\n\t\t\t\t\tthis.historyStore.stopRecordingUndo();\n\t\t\t\t} else if (\n\t\t\t\t\t!this.historyStore.bulkInProgress &&\n\t\t\t\t\t!this.suspendRecordingDetachedConnections &&\n\t\t\t\t\tconnectionInfo\n\t\t\t\t) {\n\t\t\t\t\t// Ff connection being detached by user, save this in history\n\t\t\t\t\t// but skip if it's detached as a side effect of bulk undo/redo or node rename process\n\t\t\t\t\tconst removeCommand = new RemoveConnectionCommand(connectionInfo);\n\t\t\t\t\tthis.historyStore.pushCommandToUndo(removeCommand);\n\t\t\t\t}\n\n\t\t\t\tvoid this.nodeHelpers.updateNodesInputIssues();\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t},\n\t\tonConnectionDrag(connection: Connection) {\n\t\t\t// The overlays are visible by default so we need to hide the midpoint arrow\n\t\t\t// manually\n\t\t\tconnection.overlays['midpoint-arrow']?.setVisible(false);\n\t\t\ttry {\n\t\t\t\tthis.pullConnActiveNodeName = null;\n\t\t\t\tthis.pullConnActive = true;\n\t\t\t\tthis.canvasStore.newNodeInsertPosition = null;\n\t\t\t\tNodeViewUtils.hideConnectionActions(connection);\n\t\t\t\tNodeViewUtils.resetConnection(connection);\n\n\t\t\t\tconst scope = connection.scope as ConnectionTypes;\n\t\t\t\tconst scopedEndpoints = Array.from(\n\t\t\t\t\tdocument.querySelectorAll(`[data-jtk-scope-${scope}=true]`),\n\t\t\t\t);\n\t\t\t\tconst connectionType = connection.parameters.connection;\n\t\t\t\tconst requiredType = connectionType === 'source' ? 'target' : 'source';\n\n\t\t\t\tconst filteredEndpoints = scopedEndpoints.filter((el) => {\n\t\t\t\t\tif (!isJSPlumbEndpointElement(el)) return false;\n\n\t\t\t\t\tconst endpoint = el.jtk.endpoint;\n\t\t\t\t\tif (!endpoint) return false;\n\n\t\t\t\t\t// Prevent snapping(but not connecting) to the same node\n\t\t\t\t\tconst isSameNode = endpoint.parameters.nodeId === connection.parameters.nodeId;\n\t\t\t\t\tconst endpointType = endpoint.parameters.connection;\n\n\t\t\t\t\treturn !isSameNode && endpointType === requiredType;\n\t\t\t\t});\n\n\t\t\t\tconst onMouseMove = (e: MouseEvent | TouchEvent) => {\n\t\t\t\t\tif (!connection) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst intersectingEndpoints = filteredEndpoints\n\t\t\t\t\t\t.filter((element: Element) => {\n\t\t\t\t\t\t\tif (!isJSPlumbEndpointElement(element)) return false;\n\t\t\t\t\t\t\tconst endpoint = element.jtk.endpoint as Endpoint;\n\n\t\t\t\t\t\t\tif (element.classList.contains('jtk-floating-endpoint')) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst isEndpointIntersect = NodeViewUtils.isElementIntersection(element, e, 50);\n\t\t\t\t\t\t\tconst isNodeElementIntersect = NodeViewUtils.isElementIntersection(\n\t\t\t\t\t\t\t\tendpoint.element,\n\t\t\t\t\t\t\t\te,\n\t\t\t\t\t\t\t\t30,\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (isEndpointIntersect || isNodeElementIntersect) {\n\t\t\t\t\t\t\t\tconst node = this.workflowsStore.getNodeById(endpoint.parameters.nodeId);\n\n\t\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\t\tconst nodeType = this.nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\n\t\t\t\t\t\t\t\t\tif (!nodeType) return false;\n\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.sort((a, b) => {\n\t\t\t\t\t\t\tconst aEndpointIntersect = NodeViewUtils.calculateElementIntersection(a, e, 50);\n\t\t\t\t\t\t\tconst bEndpointIntersect = NodeViewUtils.calculateElementIntersection(b, e, 50);\n\n\t\t\t\t\t\t\t// If both intersections are null, treat them as equal\n\t\t\t\t\t\t\tif (!aEndpointIntersect?.y && !bEndpointIntersect?.y) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// If one intersection is null, sort the non-null one first\n\t\t\t\t\t\t\tif (!aEndpointIntersect?.y) return 1;\n\t\t\t\t\t\t\tif (!bEndpointIntersect?.y) return -1;\n\n\t\t\t\t\t\t\t// Otherwise, sort by ascending Y distance\n\t\t\t\t\t\t\treturn bEndpointIntersect.y - aEndpointIntersect.y;\n\t\t\t\t\t\t});\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tintersectingEndpoints.length > 0 &&\n\t\t\t\t\t\tisJSPlumbEndpointElement(intersectingEndpoints[0])\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst intersectingEndpoint = intersectingEndpoints[0];\n\t\t\t\t\t\tconst endpoint = intersectingEndpoint.jtk.endpoint as Endpoint;\n\t\t\t\t\t\tconst node = this.workflowsStore.getNodeById(endpoint.parameters.nodeId);\n\n\t\t\t\t\t\tthis.pullConnActiveNodeName = node?.name ?? null;\n\n\t\t\t\t\t\tNodeViewUtils.showDropConnectionState(connection, endpoint);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNodeViewUtils.showPullConnectionState(connection);\n\t\t\t\t\t\tthis.pullConnActiveNodeName = null;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tconst onMouseUp = (e: MouseEvent | TouchEvent) => {\n\t\t\t\t\tthis.pullConnActive = false;\n\t\t\t\t\tthis.canvasStore.newNodeInsertPosition = this.getMousePositionWithinNodeView(e);\n\t\t\t\t\tNodeViewUtils.resetConnectionAfterPull(connection);\n\t\t\t\t\twindow.removeEventListener('mousemove', onMouseMove);\n\t\t\t\t\twindow.removeEventListener('mouseup', onMouseUp);\n\n\t\t\t\t\tthis.connectionDragScope = {\n\t\t\t\t\t\ttype: null,\n\t\t\t\t\t\tconnection: null,\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\twindow.addEventListener('mousemove', onMouseMove);\n\t\t\t\twindow.addEventListener('touchmove', onMouseMove);\n\t\t\t\twindow.addEventListener('mouseup', onMouseUp);\n\t\t\t\twindow.addEventListener('touchend', onMouseMove);\n\n\t\t\t\tthis.connectionDragScope = {\n\t\t\t\t\ttype: connection.parameters.type,\n\t\t\t\t\tconnection: connection.parameters.connection,\n\t\t\t\t};\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t},\n\t\tonConnectionDragAbortDetached() {\n\t\t\tObject.values(this.instance?.endpointsByElement)\n\t\t\t\t.flatMap((endpoints) => Object.values(endpoints))\n\t\t\t\t.filter((endpoint) => endpoint.endpoint.type === 'N8nPlus')\n\t\t\t\t.forEach((endpoint) => setTimeout(() => endpoint.instance.revalidate(endpoint.element), 0));\n\t\t},\n\t\tonPlusEndpointClick(endpoint: Endpoint) {\n\t\t\tif (this.shouldShowNextStepDialog) {\n\t\t\t\tif (endpoint?.__meta) {\n\t\t\t\t\tthis.aiStore.latestConnectionInfo = {\n\t\t\t\t\t\tsourceId: endpoint.__meta.nodeId,\n\t\t\t\t\t\tindex: endpoint.__meta.index,\n\t\t\t\t\t\teventSource: NODE_CREATOR_OPEN_SOURCES.PLUS_ENDPOINT,\n\t\t\t\t\t\toutputType: getEndpointScope(endpoint.scope),\n\t\t\t\t\t\tendpointUuid: endpoint.uuid,\n\t\t\t\t\t\tstepName: endpoint.__meta.nodeName,\n\t\t\t\t\t};\n\t\t\t\t\tconst endpointElement = endpoint.endpoint.canvas;\n\t\t\t\t\tthis.aiStore.openNextStepPopup(\n\t\t\t\t\t\tthis.$locale.baseText('nextStepPopup.title.nextStep'),\n\t\t\t\t\t\tendpointElement,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.insertNodeAfterSelected({\n\t\t\t\t\tsourceId: endpoint.__meta.nodeId,\n\t\t\t\t\tindex: endpoint.__meta.index,\n\t\t\t\t\teventSource: NODE_CREATOR_OPEN_SOURCES.PLUS_ENDPOINT,\n\t\t\t\t\toutputType: getEndpointScope(endpoint.scope),\n\t\t\t\t\tendpointUuid: endpoint.uuid,\n\t\t\t\t\tstepName: endpoint.__meta.nodeName,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tonAddInputEndpointClick(endpoint: Endpoint) {\n\t\t\tif (endpoint?.__meta) {\n\t\t\t\tthis.insertNodeAfterSelected({\n\t\t\t\t\tsourceId: endpoint.__meta.nodeId,\n\t\t\t\t\tindex: endpoint.__meta.index,\n\t\t\t\t\teventSource: NODE_CREATOR_OPEN_SOURCES.ADD_INPUT_ENDPOINT,\n\t\t\t\t\tnodeCreatorView: AI_NODE_CREATOR_VIEW,\n\t\t\t\t\toutputType: getEndpointScope(endpoint.scope),\n\t\t\t\t\tendpointUuid: endpoint.uuid,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tbindCanvasEvents() {\n\t\t\tif (this.eventsAttached) return;\n\t\t\tthis.instance.bind(EVENT_CONNECTION_ABORT, this.onEventConnectionAbort);\n\n\t\t\tthis.instance.bind(INTERCEPT_BEFORE_DROP, this.onInterceptBeforeDrop);\n\n\t\t\tthis.instance.bind(EVENT_CONNECTION, this.onEventConnection);\n\n\t\t\tthis.instance.bind(EVENT_DRAG_MOVE, this.onDragMove);\n\t\t\tthis.instance.bind(EVENT_CONNECTION_MOUSEOVER, this.onConnectionMouseOver);\n\t\t\tthis.instance.bind(EVENT_CONNECTION_MOUSEOUT, this.onConnectionMouseOut);\n\n\t\t\tthis.instance.bind(EVENT_CONNECTION_MOVED, this.onConnectionMoved);\n\t\t\tthis.instance.bind(EVENT_ENDPOINT_MOUSEOVER, this.onEndpointMouseOver);\n\t\t\tthis.instance.bind(EVENT_ENDPOINT_MOUSEOUT, this.onEndpointMouseOut);\n\t\t\tthis.instance.bind(EVENT_CONNECTION_DETACHED, this.onConnectionDetached);\n\t\t\tthis.instance.bind(EVENT_CONNECTION_DRAG, this.onConnectionDrag);\n\t\t\tthis.instance.bind(\n\t\t\t\t[EVENT_CONNECTION_DRAG, EVENT_CONNECTION_ABORT, EVENT_CONNECTION_DETACHED],\n\t\t\t\tthis.onConnectionDragAbortDetached,\n\t\t\t);\n\t\t\tthis.instance.bind(EVENT_PLUS_ENDPOINT_CLICK, this.onPlusEndpointClick);\n\t\t\tthis.instance.bind(EVENT_ADD_INPUT_ENDPOINT_CLICK, this.onAddInputEndpointClick);\n\n\t\t\tthis.eventsAttached = true;\n\t\t},\n\t\tunbindCanvasEvents() {\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_ABORT, this.onEventConnectionAbort);\n\n\t\t\tthis.instance.unbind(INTERCEPT_BEFORE_DROP, this.onInterceptBeforeDrop);\n\n\t\t\tthis.instance.unbind(EVENT_CONNECTION, this.onEventConnection);\n\n\t\t\tthis.instance.unbind(EVENT_DRAG_MOVE, this.onDragMove);\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_MOUSEOVER, this.onConnectionMouseOver);\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_MOUSEOUT, this.onConnectionMouseOut);\n\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_MOVED, this.onConnectionMoved);\n\t\t\tthis.instance.unbind(EVENT_ENDPOINT_MOUSEOVER, this.onEndpointMouseOver);\n\t\t\tthis.instance.unbind(EVENT_ENDPOINT_MOUSEOUT, this.onEndpointMouseOut);\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_DETACHED, this.onConnectionDetached);\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_DRAG, this.onConnectionDrag);\n\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_DRAG, this.onConnectionDragAbortDetached);\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_ABORT, this.onConnectionDragAbortDetached);\n\t\t\tthis.instance.unbind(EVENT_CONNECTION_DETACHED, this.onConnectionDragAbortDetached);\n\t\t\tthis.instance.unbind(EVENT_PLUS_ENDPOINT_CLICK, this.onPlusEndpointClick);\n\t\t\tthis.instance.unbind(EVENT_ADD_INPUT_ENDPOINT_CLICK, this.onAddInputEndpointClick);\n\t\t\tthis.eventsAttached = false;\n\t\t},\n\t\tunbindEndpointEventListeners() {\n\t\t\tif (this.instance) {\n\t\t\t\t// Get all the endpoints and unbind the events\n\t\t\t\tconst elements = this.instance.getManagedElements();\n\t\t\t\tfor (const element of Object.values(elements)) {\n\t\t\t\t\tconst endpoints = element.endpoints;\n\t\t\t\t\tfor (const endpoint of endpoints || []) {\n\t\t\t\t\t\tconst endpointInstance = endpoint?.endpoint;\n\t\t\t\t\t\tif (endpointInstance && endpointInstance.type === N8nPlusEndpointType) {\n\t\t\t\t\t\t\t(endpointInstance as N8nPlusEndpoint).unbindEvents();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.eventsAttached = false;\n\t\t},\n\t\tonBeforeUnload(e: BeforeUnloadEvent) {\n\t\t\tif (this.isDemo || window.preventNodeViewBeforeUnload) {\n\t\t\t\treturn;\n\t\t\t} else if (this.uiStore.stateIsDirty) {\n\t\t\t\t// A bit hacky solution to detecting users leaving the page after prompt:\n\t\t\t\t// 1. Notify that workflow is closed straight away\n\t\t\t\tthis.collaborationStore.notifyWorkflowClosed(this.workflowsStore.workflowId);\n\t\t\t\t// 2. If user decided to stay on the page we notify that the workflow is opened again\n\t\t\t\tthis.unloadTimeout = setTimeout(() => {\n\t\t\t\t\tthis.collaborationStore.notifyWorkflowOpened(this.workflowsStore.workflowId);\n\t\t\t\t}, 5 * TIME.SECOND);\n\t\t\t\te.returnValue = true; //Gecko + IE\n\t\t\t\treturn true; //Gecko + Webkit, Safari, Chrome etc.\n\t\t\t} else {\n\t\t\t\tthis.canvasStore.startLoading(this.$locale.baseText('nodeView.redirecting'));\n\t\t\t\tthis.collaborationStore.notifyWorkflowClosed(this.workflowsStore.workflowId);\n\t\t\t\treturn;\n\t\t\t}\n\t\t},\n\t\tonUnload() {\n\t\t\t// This will fire if users decides to leave the page after prompted\n\t\t\t// Clear the interval to prevent the notification from being sent\n\t\t\tclearTimeout(this.unloadTimeout);\n\t\t},\n\t\tmakeNewWorkflowShareable() {\n\t\t\tconst { currentProject, personalProject } = this.projectsStore;\n\t\t\tconst homeProject = currentProject ?? personalProject ?? {};\n\t\t\tconst scopes = currentProject?.scopes ?? personalProject?.scopes ?? [];\n\n\t\t\tthis.workflowsStore.workflow.homeProject = homeProject as ProjectSharingData;\n\t\t\tthis.workflowsStore.workflow.scopes = scopes;\n\t\t},\n\t\tasync newWorkflow(): Promise<void> {\n\t\t\tconst { getVariant } = usePostHog();\n\t\t\tthis.canvasStore.startLoading();\n\t\t\tthis.resetWorkspace();\n\t\t\tthis.workflowData = await this.workflowsStore.getNewWorkflowData(\n\t\t\t\tundefined,\n\t\t\t\tthis.projectsStore.currentProjectId,\n\t\t\t);\n\t\t\tthis.workflowsStore.currentWorkflowExecutions = [];\n\t\t\tthis.executionsStore.activeExecution = null;\n\n\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t\tthis.canvasStore.setZoomLevel(1, [0, 0]);\n\t\t\tthis.canvasStore.zoomToFit();\n\t\t\tthis.uiStore.nodeViewInitialized = true;\n\t\t\tthis.historyStore.reset();\n\t\t\tthis.executionsStore.activeExecution = null;\n\t\t\tthis.makeNewWorkflowShareable();\n\t\t\tthis.canvasStore.stopLoading();\n\n\t\t\t// Pre-populate the canvas with the manual trigger node if the experiment is enabled and the user is in the variant group\n\t\t\tif (\n\t\t\t\tgetVariant(CANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT.name) ===\n\t\t\t\tCANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT.variant\n\t\t\t) {\n\t\t\t\tconst manualTriggerNode = this.canvasStore.getAutoAddManualTriggerNode();\n\t\t\t\tif (manualTriggerNode) {\n\t\t\t\t\tawait this.addNodes([manualTriggerNode]);\n\t\t\t\t\tthis.uiStore.lastSelectedNode = manualTriggerNode.name;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync initView(): Promise<void> {\n\t\t\tif (this.$route.params.action === 'workflowSave') {\n\t\t\t\t// In case the workflow got saved we do not have to run init\n\t\t\t\t// as only the route changed but all the needed data is already loaded\n\t\t\t\tthis.uiStore.stateIsDirty = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.blankRedirect) {\n\t\t\t\tthis.blankRedirect = false;\n\t\t\t} else if (this.$route.name === VIEWS.TEMPLATE_IMPORT) {\n\t\t\t\tconst templateId = this.$route.params.id;\n\t\t\t\tawait this.openWorkflowTemplate(templateId.toString());\n\t\t\t} else {\n\t\t\t\tif (this.uiStore.stateIsDirty && !this.readOnlyEnv) {\n\t\t\t\t\tconst confirmModal = await this.confirm(\n\t\t\t\t\t\tthis.$locale.baseText('generic.unsavedWork.confirmMessage.message'),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttitle: this.$locale.baseText('generic.unsavedWork.confirmMessage.headline'),\n\t\t\t\t\t\t\ttype: 'warning',\n\t\t\t\t\t\t\tconfirmButtonText: this.$locale.baseText(\n\t\t\t\t\t\t\t\t'generic.unsavedWork.confirmMessage.confirmButtonText',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tcancelButtonText: this.$locale.baseText(\n\t\t\t\t\t\t\t\t'generic.unsavedWork.confirmMessage.cancelButtonText',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tshowClose: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t\tif (confirmModal === MODAL_CONFIRM) {\n\t\t\t\t\t\tconst saved = await this.workflowHelpers.saveCurrentWorkflow();\n\t\t\t\t\t\tif (saved) await this.npsSurveyStore.fetchPromptsData();\n\t\t\t\t\t} else if (confirmModal === MODAL_CANCEL) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Load a workflow\n\t\t\t\tlet workflowId = null as string | null;\n\t\t\t\tif (this.$route.params.name) {\n\t\t\t\t\tworkflowId = this.$route.params.name.toString();\n\t\t\t\t}\n\t\t\t\tif (workflowId !== null) {\n\t\t\t\t\tlet workflow: IWorkflowDb | undefined = undefined;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tworkflow = await this.workflowsStore.fetchWorkflow(workflowId);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthis.showError(error, this.$locale.baseText('openWorkflow.workflowNotFoundError'));\n\n\t\t\t\t\t\tvoid this.$router.push({\n\t\t\t\t\t\t\tname: VIEWS.NEW_WORKFLOW,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (workflow) {\n\t\t\t\t\t\tthis.titleSet(workflow.name, 'IDLE');\n\t\t\t\t\t\tawait this.openWorkflow(workflow);\n\t\t\t\t\t\tawait this.checkAndInitDebugMode();\n\n\t\t\t\t\t\tawait this.projectsStore.setProjectNavActiveIdByWorkflowHomeProject(\n\t\t\t\t\t\t\tworkflow.homeProject,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (workflow.meta?.onboardingId) {\n\t\t\t\t\t\t\tthis.$telemetry.track(\n\t\t\t\t\t\t\t\t`User opened workflow from onboarding template with ID ${workflow.meta.onboardingId}`,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tworkflow_id: workflow.id,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\twithPostHog: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.$route.meta?.nodeView === true) {\n\t\t\t\t\t// Create new workflow\n\t\t\t\t\tawait this.newWorkflow();\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait this.loadCredentials();\n\t\t\tthis.historyStore.reset();\n\t\t\tthis.uiStore.nodeViewInitialized = true;\n\t\t\tdocument.addEventListener('keydown', this.keyDown);\n\t\t\tdocument.addEventListener('keyup', this.keyUp);\n\n\t\t\twindow.addEventListener('beforeunload', this.onBeforeUnload);\n\t\t\twindow.addEventListener('unload', this.onUnload);\n\t\t\t// Once view is initialized, pick up all toast notifications\n\t\t\t// waiting in the store and display them\n\t\t\tthis.showNotificationForViews([VIEWS.WORKFLOW, VIEWS.NEW_WORKFLOW]);\n\t\t},\n\t\tgetOutputEndpointUUID(\n\t\t\tnodeName: string,\n\t\t\tconnectionType: NodeConnectionType,\n\t\t\tindex: number,\n\t\t): string | null {\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tif (!node) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn NodeViewUtils.getOutputEndpointUUID(node.id, connectionType, index);\n\t\t},\n\t\tgetInputEndpointUUID(nodeName: string, connectionType: NodeConnectionType, index: number) {\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tif (!node) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn NodeViewUtils.getInputEndpointUUID(node.id, connectionType, index);\n\t\t},\n\t\t__addConnection(connection: [IConnection, IConnection]) {\n\t\t\tconst outputUuid = this.getOutputEndpointUUID(\n\t\t\t\tconnection[0].node,\n\t\t\t\tconnection[0].type,\n\t\t\t\tconnection[0].index,\n\t\t\t);\n\t\t\tconst inputUuid = this.getInputEndpointUUID(\n\t\t\t\tconnection[1].node,\n\t\t\t\tconnection[1].type,\n\t\t\t\tconnection[1].index,\n\t\t\t);\n\t\t\tif (!outputUuid || !inputUuid) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst uuid: [string, string] = [outputUuid, inputUuid];\n\t\t\t// Create connections in DOM\n\t\t\tthis.instance?.connect({\n\t\t\t\tuuids: uuid,\n\t\t\t\tdetachable: !this.isReadOnlyRoute && !this.readOnlyEnv,\n\t\t\t});\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.addPinDataConnections(this.workflowsStore.pinnedWorkflowData);\n\t\t\t});\n\t\t},\n\t\t__removeConnection(connection: [IConnection, IConnection], removeVisualConnection = false) {\n\t\t\tif (removeVisualConnection) {\n\t\t\t\tconst sourceNode = this.workflowsStore.getNodeByName(connection[0].node);\n\t\t\t\tconst targetNode = this.workflowsStore.getNodeByName(connection[1].node);\n\n\t\t\t\tif (!sourceNode || !targetNode) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst sourceElement = document.getElementById(sourceNode.id);\n\t\t\t\tconst targetElement = document.getElementById(targetNode.id);\n\n\t\t\t\tif (sourceElement && targetElement) {\n\t\t\t\t\tconst connections = this.instance?.getConnections({\n\t\t\t\t\t\tsource: sourceElement,\n\t\t\t\t\t\ttarget: targetElement,\n\t\t\t\t\t});\n\n\t\t\t\t\tif (Array.isArray(connections)) {\n\t\t\t\t\t\tconnections.forEach((connectionInstance: Connection) => {\n\t\t\t\t\t\t\tif (connectionInstance.__meta) {\n\t\t\t\t\t\t\t\t// Only delete connections from specific indexes (if it can be determined by meta)\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tconnectionInstance.__meta.sourceOutputIndex === connection[0].index &&\n\t\t\t\t\t\t\t\t\tconnectionInstance.__meta.targetOutputIndex === connection[1].index\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tthis.__deleteJSPlumbConnection(connectionInstance);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.__deleteJSPlumbConnection(connectionInstance);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.workflowsStore.removeConnection({ connection });\n\t\t},\n\t\t__deleteJSPlumbConnection(connection: Connection, trackHistory = false) {\n\t\t\t// Make sure to remove the overlay else after the second move\n\t\t\t// it visibly stays behind free floating without a connection.\n\t\t\tconnection.removeOverlays();\n\n\t\t\tthis.pullConnActiveNodeName = null; // prevent new connections when connectionDetached is triggered\n\t\t\tthis.instance?.deleteConnection(connection); // on delete, triggers connectionDetached event which applies mutation to store\n\t\t\tif (trackHistory && connection.__meta) {\n\t\t\t\tconst connectionData: [IConnection, IConnection] = [\n\t\t\t\t\t{\n\t\t\t\t\t\tindex: connection.__meta?.sourceOutputIndex,\n\t\t\t\t\t\tnode: connection.__meta.sourceNodeName,\n\t\t\t\t\t\ttype: NodeConnectionType.Main,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tindex: connection.__meta?.targetOutputIndex,\n\t\t\t\t\t\tnode: connection.__meta.targetNodeName,\n\t\t\t\t\t\ttype: NodeConnectionType.Main,\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t\tconst removeCommand = new RemoveConnectionCommand(connectionData);\n\t\t\t\tthis.historyStore.pushCommandToUndo(removeCommand);\n\t\t\t}\n\t\t},\n\t\t__removeConnectionByConnectionInfo(\n\t\t\tinfo: ConnectionDetachedParams,\n\t\t\tremoveVisualConnection = false,\n\t\t\ttrackHistory = false,\n\t\t) {\n\t\t\tconst connectionInfo: [IConnection, IConnection] | null = getConnectionInfo(info);\n\n\t\t\tif (connectionInfo) {\n\t\t\t\tif (removeVisualConnection) {\n\t\t\t\t\tthis.__deleteJSPlumbConnection(info.connection, trackHistory);\n\t\t\t\t} else if (trackHistory) {\n\t\t\t\t\tthis.historyStore.pushCommandToUndo(new RemoveConnectionCommand(connectionInfo));\n\t\t\t\t}\n\t\t\t\tthis.workflowsStore.removeConnection({ connection: connectionInfo });\n\t\t\t}\n\t\t},\n\t\tasync duplicateNodes(nodes: INode[]): Promise<void> {\n\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst workflowData = deepCopy(await this.getNodesToSave(nodes));\n\t\t\tawait this.importWorkflowData(workflowData, 'duplicate', false);\n\t\t},\n\t\tgetIncomingOutgoingConnections(nodeName: string): {\n\t\t\tincoming: Connection[];\n\t\t\toutgoing: Connection[];\n\t\t} {\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\n\t\t\tif (node) {\n\t\t\t\tconst nodeEl = document.getElementById(node.id);\n\t\t\t\tif (!nodeEl) {\n\t\t\t\t\treturn { incoming: [], outgoing: [] };\n\t\t\t\t}\n\n\t\t\t\tconst outgoing = this.instance?.getConnections({\n\t\t\t\t\tsource: nodeEl,\n\t\t\t\t});\n\n\t\t\t\tconst incoming = this.instance?.getConnections({\n\t\t\t\t\ttarget: nodeEl,\n\t\t\t\t});\n\t\t\t\treturn {\n\t\t\t\t\tincoming: Array.isArray(incoming) ? incoming : Object.values(incoming),\n\t\t\t\t\toutgoing: Array.isArray(outgoing) ? outgoing : Object.values(outgoing),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn { incoming: [], outgoing: [] };\n\t\t},\n\t\tonNodeMoved(node: INodeUi) {\n\t\t\tconst { incoming, outgoing } = this.getIncomingOutgoingConnections(node.name);\n\n\t\t\t[...incoming, ...outgoing].forEach((connection: Connection) => {\n\t\t\t\tNodeViewUtils.showOrHideMidpointArrow(connection);\n\t\t\t\tNodeViewUtils.showOrHideItemsLabel(connection);\n\t\t\t});\n\t\t},\n\t\tonNodeRun({\n\t\t\tname,\n\t\t\tdata,\n\t\t\twaiting,\n\t\t}: {\n\t\t\tname: string;\n\t\t\tdata: ITaskData[] | null;\n\t\t\twaiting: boolean;\n\t\t}) {\n\t\t\tconst pinData = this.workflowsStore.pinnedWorkflowData;\n\n\t\t\tif (pinData?.[name]) {\n\t\t\t\tconst { outgoing } = this.getIncomingOutgoingConnections(name);\n\n\t\t\t\toutgoing.forEach((connection: Connection) => {\n\t\t\t\t\tif (connection.__meta?.sourceNodeName === name) {\n\t\t\t\t\t\tconst hasRun = this.workflowsStore.getWorkflowResultDataByNodeName(name) !== null;\n\t\t\t\t\t\tNodeViewUtils.addClassesToOverlays({\n\t\t\t\t\t\t\tconnection,\n\t\t\t\t\t\t\toverlayIds: [NodeViewUtils.OVERLAY_RUN_ITEMS_ID],\n\t\t\t\t\t\t\tclassNames: hasRun ? ['has-run'] : [],\n\t\t\t\t\t\t\tincludeConnector: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst sourceNodeName = name;\n\t\t\tconst sourceNode = this.workflowsStore.getNodeByName(sourceNodeName);\n\t\t\tconst sourceId = sourceNode !== null ? sourceNode.id : '';\n\n\t\t\tif (data === null || data.length === 0 || waiting) {\n\t\t\t\tconst sourceElement = document.getElementById(sourceId);\n\t\t\t\tif (!sourceElement) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst outgoing = this.instance?.getConnections({\n\t\t\t\t\tsource: sourceElement,\n\t\t\t\t});\n\n\t\t\t\t(Array.isArray(outgoing) ? outgoing : Object.values(outgoing)).forEach(\n\t\t\t\t\t(connection: Connection) => {\n\t\t\t\t\t\tNodeViewUtils.resetConnection(connection);\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tconst endpoints = NodeViewUtils.getJSPlumbEndpoints(sourceNode, this.instance);\n\t\t\t\tendpoints.forEach((endpoint: Endpoint) => {\n\t\t\t\t\tif (endpoint.endpoint.type === 'N8nPlus') {\n\t\t\t\t\t\t(endpoint.endpoint as N8nPlusEndpoint).clearSuccessOutput();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.nodeHelpers.setSuccessOutput(data, sourceNode);\n\t\t},\n\t\tremoveNode(nodeName: string, trackHistory = false, trackBulk = true) {\n\t\t\tif (!this.editAllowedCheck()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tif (!node) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (trackHistory && trackBulk) {\n\t\t\t\tthis.historyStore.startRecordingUndo();\n\t\t\t}\n\n\t\t\t// \"requiredNodeTypes\" are also defined in cli/commands/run.ts\n\t\t\tconst requiredNodeTypes: string[] = [];\n\n\t\t\tif (requiredNodeTypes.includes(node.type)) {\n\t\t\t\t// The node is of the required type so check first\n\t\t\t\t// if any node of that type would be left when the\n\t\t\t\t// current one would get deleted.\n\t\t\t\tlet deleteAllowed = false;\n\t\t\t\tfor (const checkNode of this.nodes) {\n\t\t\t\t\tif (checkNode.name === node.name) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (requiredNodeTypes.includes(checkNode.type)) {\n\t\t\t\t\t\tdeleteAllowed = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!deleteAllowed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (node.type === STICKY_NODE_TYPE) {\n\t\t\t\tthis.$telemetry.track('User deleted workflow note', {\n\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t\tis_welcome_note: node.name === QUICKSTART_NOTE_NAME,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tvoid this.externalHooks.run('node.deleteNode', { node });\n\t\t\t\tthis.$telemetry.track('User deleted node', {\n\t\t\t\t\tnode_type: node.type,\n\t\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet waitForNewConnection = false;\n\t\t\t// connect nodes before/after deleted node\n\t\t\tconst nodeType = this.nodeTypesStore.getNodeType(node.type, node.typeVersion);\n\n\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\t\t\tconst workflowNode = workflow.getNode(node.name);\n\t\t\tlet inputs: Array<ConnectionTypes | INodeInputConfiguration> = [];\n\t\t\tlet outputs: Array<ConnectionTypes | INodeOutputConfiguration> = [];\n\t\t\tif (nodeType && workflowNode) {\n\t\t\t\tinputs = NodeHelpers.getNodeInputs(workflow, workflowNode, nodeType);\n\t\t\t\toutputs = NodeHelpers.getNodeOutputs(workflow, workflowNode, nodeType);\n\t\t\t}\n\n\t\t\tif (outputs.length === 1 && inputs.length === 1) {\n\t\t\t\tconst { incoming, outgoing } = this.getIncomingOutgoingConnections(node.name);\n\t\t\t\tif (incoming.length === 1 && outgoing.length === 1) {\n\t\t\t\t\tconst conn1 = incoming[0];\n\t\t\t\t\tconst conn2 = outgoing[0];\n\t\t\t\t\tif (conn1.__meta && conn2.__meta) {\n\t\t\t\t\t\twaitForNewConnection = true;\n\t\t\t\t\t\tconst sourceNodeName = conn1.__meta.sourceNodeName;\n\t\t\t\t\t\tconst sourceNodeOutputIndex = conn1.__meta.sourceOutputIndex;\n\t\t\t\t\t\tconst targetNodeName = conn2.__meta.targetNodeName;\n\t\t\t\t\t\tconst targetNodeOuputIndex = conn2.__meta.targetOutputIndex;\n\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tthis.connectTwoNodes(\n\t\t\t\t\t\t\t\tsourceNodeName,\n\t\t\t\t\t\t\t\tsourceNodeOutputIndex,\n\t\t\t\t\t\t\t\ttargetNodeName,\n\t\t\t\t\t\t\t\ttargetNodeOuputIndex,\n\t\t\t\t\t\t\t\tNodeConnectionType.Main,\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (waitForNewConnection) {\n\t\t\t\t\t\t\t\tthis.instance?.setSuspendDrawing(false, true);\n\t\t\t\t\t\t\t\twaitForNewConnection = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 100); // just to make it clear to users that this is a new connection\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvoid nextTick(() => {\n\t\t\t\t// Suspend drawing\n\t\t\t\tthis.instance?.setSuspendDrawing(true);\n\t\t\t\t(this.instance?.endpointsByElement[node.id] || [])\n\t\t\t\t\t.flat()\n\t\t\t\t\t.forEach((endpoint) => this.instance?.deleteEndpoint(endpoint));\n\n\t\t\t\t// Remove the connections in data\n\t\t\t\tthis.workflowsStore.removeAllNodeConnection(node);\n\t\t\t\tthis.workflowsStore.removeNode(node);\n\t\t\t\tthis.workflowsStore.clearNodeExecutionData(node.name);\n\n\t\t\t\tif (!waitForNewConnection) {\n\t\t\t\t\t// Now it can draw again\n\t\t\t\t\tthis.instance?.setSuspendDrawing(false, true);\n\t\t\t\t}\n\n\t\t\t\t// Remove node from selected index if found in it\n\t\t\t\tthis.uiStore.removeNodeFromSelection(node);\n\t\t\t\tif (trackHistory) {\n\t\t\t\t\tthis.historyStore.pushCommandToUndo(new RemoveNodeCommand(node));\n\t\t\t\t}\n\t\t\t}); // allow other events to finish like drag stop\n\n\t\t\tif (trackHistory && trackBulk) {\n\t\t\t\tconst recordingTimeout = waitForNewConnection ? 100 : 0;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.historyStore.stopRecordingUndo();\n\t\t\t\t}, recordingTimeout);\n\t\t\t}\n\t\t},\n\t\tasync onSwitchSelectedNode(nodeName: string) {\n\t\t\tthis.nodeSelectedByName(nodeName, true, true);\n\t\t},\n\t\tasync onOpenConnectionNodeCreator(node: string, connectionType: NodeConnectionType) {\n\t\t\tawait this.openSelectiveNodeCreator({\n\t\t\t\tconnectiontype: connectionType,\n\t\t\t\tnode,\n\t\t\t});\n\t\t},\n\t\tasync redrawNode(nodeName: string) {\n\t\t\t// TODO: Improve later\n\t\t\t// For now we redraw the node by simply renaming it. Can for sure be\n\t\t\t// done better later but should be fine for now.\n\t\t\tconst tempName = 'x____XXXX____x';\n\t\t\tawait this.renameNode(nodeName, tempName);\n\t\t\tawait this.renameNode(tempName, nodeName);\n\t\t},\n\t\tvalueChanged(parameterData: IUpdateInformation) {\n\t\t\tif (parameterData.name === 'name' && parameterData.oldValue) {\n\t\t\t\t// The name changed so we have to take care that\n\t\t\t\t// the connections get changed.\n\t\t\t\tvoid this.renameNode(parameterData.oldValue as string, parameterData.value as string);\n\t\t\t}\n\t\t},\n\t\tasync renameNodePrompt(currentName: string) {\n\t\t\ttry {\n\t\t\t\tconst promptResponsePromise = this.prompt(\n\t\t\t\t\tthis.$locale.baseText('nodeView.prompt.newName') + ':',\n\t\t\t\t\tthis.$locale.baseText('nodeView.prompt.renameNode') + `: ${currentName}`,\n\t\t\t\t\t{\n\t\t\t\t\t\tcustomClass: 'rename-prompt',\n\t\t\t\t\t\tconfirmButtonText: this.$locale.baseText('nodeView.prompt.rename'),\n\t\t\t\t\t\tcancelButtonText: this.$locale.baseText('nodeView.prompt.cancel'),\n\t\t\t\t\t\tinputErrorMessage: this.$locale.baseText('nodeView.prompt.invalidName'),\n\t\t\t\t\t\tinputValue: currentName,\n\t\t\t\t\t\tinputValidator: (value: string) => {\n\t\t\t\t\t\t\tif (!value.trim()) {\n\t\t\t\t\t\t\t\treturn this.$locale.baseText('nodeView.prompt.invalidName');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\t// Wait till it had time to display\n\t\t\t\tawait this.$nextTick();\n\n\t\t\t\t// Get the input and select the text in it\n\t\t\t\tconst nameInput = document.querySelector('.rename-prompt .el-input__inner') as\n\t\t\t\t\t| HTMLInputElement\n\t\t\t\t\t| undefined;\n\t\t\t\tif (nameInput) {\n\t\t\t\t\tnameInput.focus();\n\t\t\t\t\tnameInput.select();\n\t\t\t\t}\n\n\t\t\t\tconst promptResponse = await promptResponsePromise;\n\n\t\t\t\tif (promptResponse?.action !== MODAL_CONFIRM) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tawait this.renameNode(currentName, promptResponse.value, true);\n\t\t\t} catch (e) {}\n\t\t},\n\t\tasync renameNode(currentName: string, newName: string, trackHistory = false) {\n\t\t\tif (currentName === newName) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.suspendRecordingDetachedConnections = true;\n\t\t\tif (trackHistory) {\n\t\t\t\tthis.historyStore.startRecordingUndo();\n\t\t\t}\n\n\t\t\tconst activeNodeName = this.activeNode?.name;\n\t\t\tconst isActive = activeNodeName === currentName;\n\t\t\tif (isActive) {\n\t\t\t\tthis.renamingActive = true;\n\t\t\t}\n\n\t\t\tnewName = this.uniqueNodeName(newName);\n\n\t\t\t// Rename the node and update the connections\n\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow(true);\n\t\t\tworkflow.renameNode(currentName, newName);\n\n\t\t\tif (trackHistory) {\n\t\t\t\tthis.historyStore.pushCommandToUndo(new RenameNodeCommand(currentName, newName));\n\t\t\t}\n\n\t\t\t// Update also last selected node and execution data\n\t\t\tthis.workflowsStore.renameNodeSelectedAndExecution({ old: currentName, new: newName });\n\n\t\t\t// Reset all nodes and connections to load the new ones\n\t\t\tthis.deleteEveryEndpoint();\n\n\t\t\tthis.workflowsStore.removeAllConnections({ setStateDirty: false });\n\t\t\tthis.workflowsStore.removeAllNodes({ removePinData: false, setStateDirty: true });\n\n\t\t\t// Wait a tick that the old nodes had time to get removed\n\t\t\tawait this.$nextTick();\n\n\t\t\t// Add the new updated nodes\n\t\t\tawait this.addNodes(Object.values(workflow.nodes), workflow.connectionsBySourceNode, false);\n\n\t\t\t// Make sure that the node is selected again\n\t\t\tthis.deselectAllNodes();\n\t\t\tthis.nodeSelectedByName(newName);\n\n\t\t\tif (isActive) {\n\t\t\t\tthis.ndvStore.activeNodeName = newName;\n\t\t\t\tthis.renamingActive = false;\n\t\t\t}\n\n\t\t\tif (trackHistory) {\n\t\t\t\tthis.historyStore.stopRecordingUndo();\n\t\t\t}\n\t\t\tthis.suspendRecordingDetachedConnections = false;\n\t\t},\n\t\tdeleteEveryEndpoint() {\n\t\t\t// Check as it does not exist on first load\n\t\t\tif (this.instance) {\n\t\t\t\tthis.instance?.reset();\n\t\t\t\tObject.values(this.instance?.endpointsByElement)\n\t\t\t\t\t.flatMap((endpoint) => endpoint)\n\t\t\t\t\t.forEach((endpoint) => endpoint.destroy());\n\n\t\t\t\tthis.instance.deleteEveryConnection({ fireEvent: true });\n\t\t\t}\n\t\t},\n\t\tmatchCredentials(node: INodeUi) {\n\t\t\tif (!node.credentials) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tObject.entries(node.credentials).forEach(\n\t\t\t\t([nodeCredentialType, nodeCredentials]: [string, INodeCredentialsDetails]) => {\n\t\t\t\t\tconst credentialOptions = this.credentialsStore.getCredentialsByType(nodeCredentialType);\n\n\t\t\t\t\t// Check if workflows applies old credentials style\n\t\t\t\t\tif (typeof nodeCredentials === 'string') {\n\t\t\t\t\t\tnodeCredentials = {\n\t\t\t\t\t\t\tid: null,\n\t\t\t\t\t\t\tname: nodeCredentials,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.credentialsUpdated = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (nodeCredentials.id) {\n\t\t\t\t\t\t// Check whether the id is matching with a credential\n\t\t\t\t\t\tconst credentialsId = nodeCredentials.id.toString(); // due to a fixed bug in the migration UpdateWorkflowCredentials (just sqlite) we have to cast to string and check later if it has been a number\n\t\t\t\t\t\tconst credentialsForId = credentialOptions.find(\n\t\t\t\t\t\t\t(optionData: ICredentialsResponse) => optionData.id === credentialsId,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (credentialsForId) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tcredentialsForId.name !== nodeCredentials.name ||\n\t\t\t\t\t\t\t\ttypeof nodeCredentials.id === 'number'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnode.credentials![nodeCredentialType] = {\n\t\t\t\t\t\t\t\t\tid: credentialsForId.id,\n\t\t\t\t\t\t\t\t\tname: credentialsForId.name,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tthis.credentialsUpdated = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// No match for id found or old credentials type used\n\t\t\t\t\tnode.credentials![nodeCredentialType] = nodeCredentials;\n\n\t\t\t\t\t// check if only one option with the name would exist\n\t\t\t\t\tconst credentialsForName = credentialOptions.filter(\n\t\t\t\t\t\t(optionData: ICredentialsResponse) => optionData.name === nodeCredentials.name,\n\t\t\t\t\t);\n\n\t\t\t\t\t// only one option exists for the name, take it\n\t\t\t\t\tif (credentialsForName.length === 1) {\n\t\t\t\t\t\tnode.credentials![nodeCredentialType].id = credentialsForName[0].id;\n\t\t\t\t\t\tthis.credentialsUpdated = true;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t},\n\t\tasync addNodes(nodes: INodeUi[], connections?: IConnections, trackHistory = false) {\n\t\t\tif (!nodes?.length) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.isInsertingNodes = true;\n\t\t\t// Before proceeding we must check if all nodes contain the `properties` attribute.\n\t\t\t// Nodes are loaded without this information so we must make sure that all nodes\n\t\t\t// being added have this information.\n\t\t\tawait this.loadNodesProperties(\n\t\t\t\tnodes.map((node) => ({ name: node.type, version: node.typeVersion })),\n\t\t\t);\n\n\t\t\t// Add the node to the node-list\n\t\t\tlet nodeType: INodeTypeDescription | null;\n\t\t\tnodes.forEach((node) => {\n\t\t\t\tconst newNode: INodeUi = {\n\t\t\t\t\t...node,\n\t\t\t\t};\n\n\t\t\t\tif (!newNode.id) {\n\t\t\t\t\tnewNode.id = uuid();\n\t\t\t\t}\n\n\t\t\t\tnodeType = this.nodeTypesStore.getNodeType(newNode.type, newNode.typeVersion);\n\n\t\t\t\t// Make sure that some properties always exist\n\t\t\t\tif (!newNode.hasOwnProperty('disabled')) {\n\t\t\t\t\tnewNode.disabled = false;\n\t\t\t\t}\n\n\t\t\t\tif (!newNode.hasOwnProperty('parameters')) {\n\t\t\t\t\tnewNode.parameters = {};\n\t\t\t\t}\n\n\t\t\t\t// Load the default parameter values because only values which differ\n\t\t\t\t// from the defaults get saved\n\t\t\t\tif (nodeType !== null) {\n\t\t\t\t\tlet nodeParameters = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnodeParameters = NodeHelpers.getNodeParameters(\n\t\t\t\t\t\t\tnodeType.properties,\n\t\t\t\t\t\t\tnewNode.parameters,\n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\tthis.$locale.baseText('nodeView.thereWasAProblemLoadingTheNodeParametersOfNode') +\n\t\t\t\t\t\t\t\t`: \"${newNode.name}\"`,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\t\t\t\t\tnewNode.parameters = nodeParameters ?? {};\n\n\t\t\t\t\t// if it's a webhook and the path is empty set the UUID as the default path\n\t\t\t\t\tif (\n\t\t\t\t\t\t[WEBHOOK_NODE_TYPE, FORM_TRIGGER_NODE_TYPE].includes(newNode.type) &&\n\t\t\t\t\t\tnewNode.parameters.path === ''\n\t\t\t\t\t) {\n\t\t\t\t\t\tnewNode.parameters.path = newNode.webhookId as string;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// check and match credentials, apply new format if old is used\n\t\t\t\tthis.matchCredentials(newNode);\n\t\t\t\tthis.workflowsStore.addNode(newNode);\n\t\t\t\tif (trackHistory) {\n\t\t\t\t\tthis.historyStore.pushCommandToUndo(new AddNodeCommand(newNode));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Wait for the nodes to be rendered\n\t\t\tawait this.$nextTick();\n\n\t\t\tthis.instance?.setSuspendDrawing(true);\n\n\t\t\tif (connections) {\n\t\t\t\tawait this.addConnections(connections);\n\t\t\t}\n\t\t\t// Add the node issues at the end as the node-connections are required\n\t\t\tthis.nodeHelpers.refreshNodeIssues();\n\t\t\tthis.nodeHelpers.updateNodesInputIssues();\n\t\t\tthis.resetEndpointsErrors();\n\t\t\tthis.isInsertingNodes = false;\n\n\t\t\t// Now it can draw again\n\t\t\tthis.instance?.setSuspendDrawing(false, true);\n\t\t},\n\t\tasync addConnections(connections: IConnections) {\n\t\t\tconst batchedConnectionData: Array<[IConnection, IConnection]> = [];\n\n\t\t\tfor (const sourceNode in connections) {\n\t\t\t\tfor (const type in connections[sourceNode]) {\n\t\t\t\t\tconnections[sourceNode][type].forEach((outwardConnections, sourceIndex) => {\n\t\t\t\t\t\tif (outwardConnections) {\n\t\t\t\t\t\t\toutwardConnections.forEach((targetData) => {\n\t\t\t\t\t\t\t\tbatchedConnectionData.push([\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tnode: sourceNode,\n\t\t\t\t\t\t\t\t\t\ttype: getEndpointScope(type) ?? NodeConnectionType.Main,\n\t\t\t\t\t\t\t\t\t\tindex: sourceIndex,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{ node: targetData.node, type: targetData.type, index: targetData.index },\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Process the connections in batches\n\t\t\tawait this.processConnectionBatch(batchedConnectionData);\n\t\t\tsetTimeout(this.addConectionsTestData, 0);\n\t\t},\n\n\t\tasync processConnectionBatch(batchedConnectionData: Array<[IConnection, IConnection]>) {\n\t\t\tconst batchSize = 100;\n\n\t\t\tfor (let i = 0; i < batchedConnectionData.length; i += batchSize) {\n\t\t\t\tconst batch = batchedConnectionData.slice(i, i + batchSize);\n\n\t\t\t\tbatch.forEach((connectionData) => {\n\t\t\t\t\tthis.__addConnection(connectionData);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\tasync addNodesToWorkflow(data: IWorkflowDataUpdate): Promise<IWorkflowDataUpdate> {\n\t\t\t// Because nodes with the same name maybe already exist, it could\n\t\t\t// be needed that they have to be renamed. Also could it be possible\n\t\t\t// that nodes are not allowed to be created because they have a create\n\t\t\t// limit set. So we would then link the new nodes with the already existing ones.\n\t\t\t// In this object all that nodes get saved in the format:\n\t\t\t// old-name -> new-name\n\t\t\tconst nodeNameTable: {\n\t\t\t\t[key: string]: string;\n\t\t\t} = {};\n\t\t\tconst newNodeNames: string[] = [];\n\n\t\t\tif (!data.nodes) {\n\t\t\t\t// No nodes to add\n\t\t\t\tthrow new Error(this.$locale.baseText('nodeView.noNodesGivenToAdd'));\n\t\t\t}\n\n\t\t\t// Get how many of the nodes of the types which have\n\t\t\t// a max limit set already exist\n\t\t\tconst nodeTypesCount = this.workflowHelpers.getNodeTypesMaxCount();\n\n\t\t\tlet oldName: string;\n\t\t\tlet newName: string;\n\t\t\tconst createNodes: INode[] = [];\n\n\t\t\tawait this.loadNodesProperties(\n\t\t\t\tdata.nodes.map((node) => ({ name: node.type, version: node.typeVersion })),\n\t\t\t);\n\n\t\t\tdata.nodes.forEach((node) => {\n\t\t\t\tif (nodeTypesCount[node.type] !== undefined) {\n\t\t\t\t\tif (nodeTypesCount[node.type].exist >= nodeTypesCount[node.type].max) {\n\t\t\t\t\t\t// Node is not allowed to be created so\n\t\t\t\t\t\t// do not add it to the create list but\n\t\t\t\t\t\t// add the name of the existing node\n\t\t\t\t\t\t// that this one gets linked up instead.\n\t\t\t\t\t\tnodeNameTable[node.name] = nodeTypesCount[node.type].nodeNames[0];\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Node can be created but increment the\n\t\t\t\t\t\t// counter in case multiple ones are\n\t\t\t\t\t\t// supposed to be created\n\t\t\t\t\t\tnodeTypesCount[node.type].exist += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\toldName = node.name;\n\n\t\t\t\tconst localized = this.locale.localizeNodeName(node.name, node.type);\n\n\t\t\t\tnewName = this.uniqueNodeName(localized, newNodeNames);\n\n\t\t\t\tnewNodeNames.push(newName);\n\t\t\t\tnodeNameTable[oldName] = newName;\n\n\t\t\t\tcreateNodes.push(node);\n\t\t\t});\n\n\t\t\t// Get only the connections of the nodes that get created\n\t\t\tconst newConnections: IConnections = {};\n\t\t\tconst currentConnections = data.connections!;\n\t\t\tconst createNodeNames = createNodes.map((node) => node.name);\n\t\t\tlet sourceNode, type, sourceIndex, connectionIndex, connectionData;\n\t\t\tfor (sourceNode of Object.keys(currentConnections)) {\n\t\t\t\tif (!createNodeNames.includes(sourceNode)) {\n\t\t\t\t\t// Node does not get created so skip output connections\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst connection: INodeConnections = {};\n\n\t\t\t\tfor (type of Object.keys(currentConnections[sourceNode])) {\n\t\t\t\t\tconnection[type] = [];\n\t\t\t\t\tfor (\n\t\t\t\t\t\tsourceIndex = 0;\n\t\t\t\t\t\tsourceIndex < currentConnections[sourceNode][type].length;\n\t\t\t\t\t\tsourceIndex++\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst nodeSourceConnections = [];\n\t\t\t\t\t\tif (currentConnections[sourceNode][type][sourceIndex]) {\n\t\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\t\tconnectionIndex = 0;\n\t\t\t\t\t\t\t\tconnectionIndex < currentConnections[sourceNode][type][sourceIndex].length;\n\t\t\t\t\t\t\t\tconnectionIndex++\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tconnectionData = currentConnections[sourceNode][type][sourceIndex][connectionIndex];\n\t\t\t\t\t\t\t\tif (!createNodeNames.includes(connectionData.node)) {\n\t\t\t\t\t\t\t\t\t// Node does not get created so skip input connection\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tnodeSourceConnections.push(connectionData);\n\t\t\t\t\t\t\t\t// Add connection\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconnection[type].push(nodeSourceConnections);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnewConnections[sourceNode] = connection;\n\t\t\t}\n\n\t\t\t// Create a workflow with the new nodes and connections that we can use\n\t\t\t// the rename method\n\t\t\tconst tempWorkflow: Workflow = this.workflowHelpers.getWorkflow(createNodes, newConnections);\n\n\t\t\t// Rename all the nodes of which the name changed\n\t\t\tfor (oldName in nodeNameTable) {\n\t\t\t\tif (oldName === nodeNameTable[oldName]) {\n\t\t\t\t\t// Name did not change so skip\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttempWorkflow.renameNode(oldName, nodeNameTable[oldName]);\n\t\t\t}\n\n\t\t\tif (data.pinData) {\n\t\t\t\tlet pinDataSuccess = true;\n\t\t\t\tfor (const nodeName of Object.keys(data.pinData)) {\n\t\t\t\t\t// Pin data limit reached\n\t\t\t\t\tif (!pinDataSuccess) {\n\t\t\t\t\t\tthis.showError(\n\t\t\t\t\t\t\tnew Error(this.$locale.baseText('ndv.pinData.error.tooLarge.description')),\n\t\t\t\t\t\t\tthis.$locale.baseText('ndv.pinData.error.tooLarge.title'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst node = tempWorkflow.nodes[nodeNameTable[nodeName]];\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst pinnedDataForNode = usePinnedData(node);\n\t\t\t\t\t\tpinnedDataForNode.setData(data.pinData[nodeName], 'add-nodes');\n\t\t\t\t\t\tpinDataSuccess = true;\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tpinDataSuccess = false;\n\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add the nodes with the changed node names, expressions and connections\n\t\t\tthis.historyStore.startRecordingUndo();\n\t\t\tawait this.addNodes(\n\t\t\t\tObject.values(tempWorkflow.nodes),\n\t\t\t\ttempWorkflow.connectionsBySourceNode,\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tthis.historyStore.stopRecordingUndo();\n\n\t\t\tthis.uiStore.stateIsDirty = true;\n\n\t\t\treturn {\n\t\t\t\tnodes: Object.values(tempWorkflow.nodes),\n\t\t\t\tconnections: tempWorkflow.connectionsBySourceNode,\n\t\t\t};\n\t\t},\n\t\tasync getNodesToSave(nodes: INode[]): Promise<IWorkflowData> {\n\t\t\tconst data: IWorkflowData = {\n\t\t\t\tnodes: [],\n\t\t\t\tconnections: {},\n\t\t\t\tpinData: {},\n\t\t\t};\n\n\t\t\t// Get data of all the selected noes\n\t\t\tlet nodeData;\n\t\t\tconst exportNodeNames: string[] = [];\n\n\t\t\tfor (const node of nodes) {\n\t\t\t\tnodeData = this.workflowHelpers.getNodeDataToSave(node);\n\t\t\t\texportNodeNames.push(node.name);\n\n\t\t\t\tdata.nodes.push(nodeData);\n\n\t\t\t\tconst pinDataForNode = this.workflowsStore.pinDataByNodeName(node.name);\n\t\t\t\tif (pinDataForNode) {\n\t\t\t\t\tdata.pinData![node.name] = pinDataForNode;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tnodeData.credentials &&\n\t\t\t\t\tthis.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Sharing)\n\t\t\t\t) {\n\t\t\t\t\tconst usedCredentials = this.workflowsStore.usedCredentials;\n\t\t\t\t\tnodeData.credentials = Object.fromEntries(\n\t\t\t\t\t\tObject.entries(nodeData.credentials).filter(([_, credential]) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\tcredential.id &&\n\t\t\t\t\t\t\t\t(!usedCredentials[credential.id] ||\n\t\t\t\t\t\t\t\t\tusedCredentials[credential.id]?.currentUserHasAccess)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get only connections of exported nodes and ignore all other ones\n\t\t\tlet connectionToKeep,\n\t\t\t\tconnections: INodeConnections,\n\t\t\t\ttype: string,\n\t\t\t\tconnectionIndex: number,\n\t\t\t\tsourceIndex: number,\n\t\t\t\tconnectionData: IConnection,\n\t\t\t\ttypeConnections: INodeConnections;\n\n\t\t\tdata.nodes.forEach((node) => {\n\t\t\t\tconnections = this.workflowsStore.outgoingConnectionsByNodeName(node.name);\n\t\t\t\tif (Object.keys(connections).length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Keep only the connection to node which get also exported\n\t\t\t\ttypeConnections = {};\n\t\t\t\tfor (type of Object.keys(connections)) {\n\t\t\t\t\tfor (sourceIndex = 0; sourceIndex < connections[type].length; sourceIndex++) {\n\t\t\t\t\t\tconnectionToKeep = [];\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tconnectionIndex = 0;\n\t\t\t\t\t\t\tconnectionIndex < connections[type][sourceIndex].length;\n\t\t\t\t\t\t\tconnectionIndex++\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tconnectionData = connections[type][sourceIndex][connectionIndex];\n\t\t\t\t\t\t\tif (exportNodeNames.indexOf(connectionData.node) !== -1) {\n\t\t\t\t\t\t\t\tconnectionToKeep.push(connectionData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (connectionToKeep.length) {\n\t\t\t\t\t\t\tif (!typeConnections.hasOwnProperty(type)) {\n\t\t\t\t\t\t\t\ttypeConnections[type] = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttypeConnections[type][sourceIndex] = connectionToKeep;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (Object.keys(typeConnections).length) {\n\t\t\t\t\tdata.connections[node.name] = typeConnections;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn data;\n\t\t},\n\t\tresetWorkspace() {\n\t\t\tthis.workflowsStore.resetWorkflow();\n\n\t\t\tthis.onToggleNodeCreator({ createNodeActive: false });\n\t\t\tthis.nodeCreatorStore.setShowScrim(false);\n\t\t\tthis.canvasStore.resetZoom();\n\n\t\t\t// Reset nodes\n\t\t\tthis.unbindEndpointEventListeners();\n\t\t\tthis.deleteEveryEndpoint();\n\n\t\t\t// Make sure that if there is a waiting test-webhook that it gets removed\n\t\t\tif (this.executionWaitingForWebhook) {\n\t\t\t\ttry {\n\t\t\t\t\tvoid this.workflowsStore.removeTestWebhook(this.workflowsStore.workflowId);\n\t\t\t\t} catch (error) {}\n\t\t\t}\n\t\t\tthis.workflowsStore.resetState();\n\t\t\tthis.uiStore.removeActiveAction('workflowRunning');\n\n\t\t\tthis.uiStore.resetSelectedNodes();\n\t\t\tthis.uiStore.nodeViewOffsetPosition = [0, 0];\n\n\t\t\tthis.credentialsUpdated = false;\n\t\t},\n\t\tasync loadActiveWorkflows(): Promise<void> {\n\t\t\tawait this.workflowsStore.fetchActiveWorkflows();\n\t\t},\n\t\tasync loadNodeTypes(): Promise<void> {\n\t\t\tawait this.nodeTypesStore.getNodeTypes();\n\t\t},\n\t\tasync loadCredentialTypes(): Promise<void> {\n\t\t\tawait this.credentialsStore.fetchCredentialTypes(true);\n\t\t},\n\t\tasync loadCredentials(): Promise<void> {\n\t\t\tconst workflow = this.workflowsStore.getWorkflowById(this.currentWorkflow);\n\t\t\tlet options: { workflowId: string } | { projectId: string };\n\n\t\t\tif (workflow) {\n\t\t\t\toptions = { workflowId: workflow.id };\n\t\t\t} else {\n\t\t\t\tconst queryParam =\n\t\t\t\t\ttypeof this.$route.query?.projectId === 'string'\n\t\t\t\t\t\t? this.$route.query?.projectId\n\t\t\t\t\t\t: undefined;\n\t\t\t\tconst projectId = queryParam ?? this.projectsStore.personalProject?.id;\n\n\t\t\t\tif (projectId === undefined) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Could not find projectId in the query nor could I find the personal project in the project store',\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\toptions = { projectId };\n\t\t\t}\n\t\t\tawait this.credentialsStore.fetchAllCredentialsForWorkflow(options);\n\t\t},\n\t\tasync loadVariables(): Promise<void> {\n\t\t\tawait this.environmentsStore.fetchAllVariables();\n\t\t},\n\t\tasync loadSecrets(): Promise<void> {\n\t\t\tawait this.externalSecretsStore.fetchAllSecrets();\n\t\t},\n\t\tasync loadNodesProperties(nodeInfos: INodeTypeNameVersion[]): Promise<void> {\n\t\t\tconst allNodes: INodeTypeDescription[] = this.nodeTypesStore.allNodeTypes;\n\n\t\t\tconst nodesToBeFetched: INodeTypeNameVersion[] = [];\n\t\t\tallNodes.forEach((node) => {\n\t\t\t\tconst nodeVersions = Array.isArray(node.version) ? node.version : [node.version];\n\t\t\t\tif (\n\t\t\t\t\t!!nodeInfos.find((n) => n.name === node.name && nodeVersions.includes(n.version)) &&\n\t\t\t\t\t!node.hasOwnProperty('properties')\n\t\t\t\t) {\n\t\t\t\t\tnodesToBeFetched.push({\n\t\t\t\t\t\tname: node.name,\n\t\t\t\t\t\tversion: Array.isArray(node.version) ? node.version.slice(-1)[0] : node.version,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (nodesToBeFetched.length > 0) {\n\t\t\t\t// Only call API if node information is actually missing\n\t\t\t\tthis.canvasStore.startLoading();\n\t\t\t\tawait this.nodeTypesStore.getNodesInformation(nodesToBeFetched);\n\t\t\t\tthis.canvasStore.stopLoading();\n\t\t\t}\n\t\t},\n\t\tasync onPostMessageReceived(message: MessageEvent) {\n\t\t\tif (!message || typeof message.data !== 'string' || !message.data?.includes?.('\"command\"')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst json = JSON.parse(message.data);\n\t\t\t\tif (json && json.command === 'openWorkflow') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this.importWorkflowExact(json);\n\t\t\t\t\t\tthis.canOpenNDV = json.canOpenNDV ?? true;\n\t\t\t\t\t\tthis.hideNodeIssues = json.hideNodeIssues ?? false;\n\t\t\t\t\t\tthis.isExecutionPreview = false;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tif (window.top) {\n\t\t\t\t\t\t\twindow.top.postMessage(\n\t\t\t\t\t\t\t\tJSON.stringify({\n\t\t\t\t\t\t\t\t\tcommand: 'error',\n\t\t\t\t\t\t\t\t\tmessage: this.$locale.baseText('openWorkflow.workflowImportError'),\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t'*',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle: this.$locale.baseText('openWorkflow.workflowImportError'),\n\t\t\t\t\t\t\tmessage: (e as Error).message,\n\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else if (json && json.command === 'openExecution') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// If this NodeView is used in preview mode (in iframe) it will not have access to the main app store\n\t\t\t\t\t\t// so everything it needs has to be sent using post messages and passed down to child components\n\t\t\t\t\t\tthis.isProductionExecutionPreview = json.executionMode !== 'manual';\n\n\t\t\t\t\t\tawait this.openExecution(json.executionId);\n\t\t\t\t\t\tthis.canOpenNDV = json.canOpenNDV ?? true;\n\t\t\t\t\t\tthis.hideNodeIssues = json.hideNodeIssues ?? false;\n\t\t\t\t\t\tthis.isExecutionPreview = true;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tif (window.top) {\n\t\t\t\t\t\t\twindow.top.postMessage(\n\t\t\t\t\t\t\t\tJSON.stringify({\n\t\t\t\t\t\t\t\t\tcommand: 'error',\n\t\t\t\t\t\t\t\t\tmessage: this.$locale.baseText('nodeView.showError.openExecution.title'),\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t'*',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.showMessage({\n\t\t\t\t\t\t\ttitle: this.$locale.baseText('nodeView.showError.openExecution.title'),\n\t\t\t\t\t\t\tmessage: (e as Error).message,\n\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else if (json?.command === 'setActiveExecution') {\n\t\t\t\t\tthis.executionsStore.activeExecution = (await this.executionsStore.fetchExecution(\n\t\t\t\t\t\tjson.executionId,\n\t\t\t\t\t)) as ExecutionSummary;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\t\t},\n\t\tasync onImportWorkflowDataEvent(data: IDataObject) {\n\t\t\tawait this.importWorkflowData(data.data as IWorkflowDataUpdate, 'file');\n\t\t},\n\t\tasync onImportWorkflowUrlEvent(data: IDataObject) {\n\t\t\tconst workflowData = await this.getWorkflowDataFromUrl(data.url as string);\n\t\t\tif (workflowData !== undefined) {\n\t\t\t\tawait this.importWorkflowData(workflowData, 'url');\n\t\t\t}\n\t\t},\n\t\taddPinDataConnections(pinData?: IPinData) {\n\t\t\tif (!pinData) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tObject.keys(pinData).forEach((nodeName) => {\n\t\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\t\tif (!node) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst nodeElement = document.getElementById(node.id);\n\t\t\t\tif (!nodeElement) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst hasRun = this.workflowsStore.getWorkflowResultDataByNodeName(nodeName) !== null;\n\t\t\t\t// In case we are showing a production execution preview we want\n\t\t\t\t// to show pinned data connections as they wouldn't have been pinned\n\t\t\t\tconst classNames = this.isProductionExecutionPreview ? [] : ['pinned'];\n\n\t\t\t\tif (hasRun) {\n\t\t\t\t\tclassNames.push('has-run');\n\t\t\t\t}\n\n\t\t\t\tconst connections = this.instance?.getConnections({\n\t\t\t\t\tsource: nodeElement,\n\t\t\t\t});\n\n\t\t\t\tconst connectionsArray = Array.isArray(connections)\n\t\t\t\t\t? connections\n\t\t\t\t\t: Object.values(connections);\n\n\t\t\t\tconnectionsArray.forEach((connection) => {\n\t\t\t\t\tNodeViewUtils.addConnectionOutputSuccess(connection, {\n\t\t\t\t\t\ttotal: pinData[nodeName].length,\n\t\t\t\t\t\titerations: 0,\n\t\t\t\t\t\tclassNames,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tremovePinDataConnections(pinData: IPinData) {\n\t\t\tObject.keys(pinData).forEach((nodeName) => {\n\t\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\t\tif (!node) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst nodeElement = document.getElementById(node.id);\n\t\t\t\tif (!nodeElement) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst connections = this.instance?.getConnections({\n\t\t\t\t\tsource: nodeElement,\n\t\t\t\t});\n\n\t\t\t\tconst connectionsArray = Array.isArray(connections)\n\t\t\t\t\t? connections\n\t\t\t\t\t: Object.values(connections);\n\n\t\t\t\tthis.instance.setSuspendDrawing(true);\n\t\t\t\tconnectionsArray.forEach(NodeViewUtils.resetConnection);\n\t\t\t\tthis.instance.setSuspendDrawing(false, true);\n\t\t\t});\n\t\t},\n\t\tonToggleNodeCreator({ source, createNodeActive, nodeCreatorView }: ToggleNodeCreatorOptions) {\n\t\t\tif (createNodeActive === this.createNodeActive) return;\n\n\t\t\tif (!nodeCreatorView) {\n\t\t\t\tnodeCreatorView = this.containsTrigger\n\t\t\t\t\t? REGULAR_NODE_CREATOR_VIEW\n\t\t\t\t\t: TRIGGER_NODE_CREATOR_VIEW;\n\t\t\t}\n\n\t\t\t// Default to the trigger tab in node creator if there's no trigger node yet\n\t\t\tthis.nodeCreatorStore.setSelectedView(nodeCreatorView);\n\n\t\t\tthis.createNodeActive = createNodeActive;\n\n\t\t\tlet mode;\n\t\t\tswitch (this.nodeCreatorStore.selectedView) {\n\t\t\t\tcase AI_NODE_CREATOR_VIEW:\n\t\t\t\t\tmode = 'ai';\n\t\t\t\t\tbreak;\n\t\t\t\tcase REGULAR_NODE_CREATOR_VIEW:\n\t\t\t\t\tmode = 'regular';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tmode = 'regular';\n\t\t\t}\n\n\t\t\tif (createNodeActive && source) this.nodeCreatorStore.setOpenSource(source);\n\t\t\tvoid this.externalHooks.run('nodeView.createNodeActiveChanged', {\n\t\t\t\tsource,\n\t\t\t\tmode,\n\t\t\t\tcreateNodeActive,\n\t\t\t});\n\t\t\tthis.$telemetry.trackNodesPanel('nodeView.createNodeActiveChanged', {\n\t\t\t\tsource,\n\t\t\t\tmode,\n\t\t\t\tcreateNodeActive,\n\t\t\t\tworkflow_id: this.workflowsStore.workflowId,\n\t\t\t});\n\t\t},\n\t\tasync onAddNodes(\n\t\t\t{ nodes, connections }: AddedNodesAndConnections,\n\t\t\tdragAndDrop = false,\n\t\t\tposition?: XYPosition,\n\t\t) {\n\t\t\tlet currentPosition = position;\n\t\t\tfor (const { type, isAutoAdd, name, openDetail, position: nodePosition } of nodes) {\n\t\t\t\tawait this.addNode(\n\t\t\t\t\ttype,\n\t\t\t\t\t{ position: nodePosition ?? currentPosition, dragAndDrop, name },\n\t\t\t\t\topenDetail ?? false,\n\t\t\t\t\ttrue,\n\t\t\t\t\tisAutoAdd,\n\t\t\t\t);\n\n\t\t\t\tconst lastAddedNode = this.nodes[this.nodes.length - 1];\n\t\t\t\tcurrentPosition = [\n\t\t\t\t\tlastAddedNode.position[0] + NodeViewUtils.NODE_SIZE * 2 + NodeViewUtils.GRID_SIZE,\n\t\t\t\t\tlastAddedNode.position[1],\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tconst newNodesOffset = this.nodes.length - nodes.length;\n\t\t\tfor (const { from, to } of connections) {\n\t\t\t\tconst fromNode = this.nodes[newNodesOffset + from.nodeIndex];\n\t\t\t\tconst toNode = this.nodes[newNodesOffset + to.nodeIndex];\n\n\t\t\t\tthis.connectTwoNodes(\n\t\t\t\t\tfromNode.name,\n\t\t\t\t\tfrom.outputIndex ?? 0,\n\t\t\t\t\ttoNode.name,\n\t\t\t\t\tto.inputIndex ?? 0,\n\t\t\t\t\tNodeConnectionType.Main,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst lastAddedNode = this.nodes[this.nodes.length - 1];\n\t\t\tconst workflow = this.workflowHelpers.getCurrentWorkflow();\n\t\t\tconst lastNodeInputs = workflow.getParentNodesByDepth(lastAddedNode.name, 1);\n\n\t\t\t// If the last added node has multiple inputs, move them down\n\t\t\tif (lastNodeInputs.length > 1) {\n\t\t\t\tlastNodeInputs.slice(1).forEach((node, index) => {\n\t\t\t\t\tconst nodeUi = this.workflowsStore.getNodeByName(node.name);\n\t\t\t\t\tif (!nodeUi) return;\n\n\t\t\t\t\tthis.onMoveNode({\n\t\t\t\t\t\tnodeName: nodeUi.name,\n\t\t\t\t\t\tposition: [nodeUi.position[0], nodeUi.position[1] + 100 * (index + 1)],\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.addPinDataConnections(this.workflowsStore.pinnedWorkflowData);\n\t\t},\n\n\t\tasync saveCurrentWorkflowExternal(callback: () => void) {\n\t\t\tawait this.workflowHelpers.saveCurrentWorkflow();\n\t\t\tcallback?.();\n\t\t},\n\t\tsetSuspendRecordingDetachedConnections(suspend: boolean) {\n\t\t\tthis.suspendRecordingDetachedConnections = suspend;\n\t\t},\n\t\tonMoveNode({ nodeName, position }: { nodeName: string; position: XYPosition }): void {\n\t\t\tthis.workflowsStore.updateNodeProperties({ name: nodeName, properties: { position } });\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (node) {\n\t\t\t\t\tthis.instance?.repaintEverything();\n\t\t\t\t\tthis.onNodeMoved(node);\n\t\t\t\t}\n\t\t\t}, 0);\n\t\t},\n\t\tonRevertAddNode({ node }: { node: INodeUi }): void {\n\t\t\tthis.removeNode(node.name, false);\n\t\t},\n\t\tasync onRevertRemoveNode({ node }: { node: INodeUi }): Promise<void> {\n\t\t\tconst prevNode = this.workflowsStore.workflow.nodes.find((n) => n.id === node.id);\n\t\t\tif (prevNode) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// For some reason, returning node to canvas with old id\n\t\t\t// makes it's endpoint to render at wrong position\n\t\t\tnode.id = uuid();\n\t\t\tawait this.addNodes([node]);\n\t\t},\n\t\tonRevertAddConnection({ connection }: { connection: [IConnection, IConnection] }) {\n\t\t\tthis.suspendRecordingDetachedConnections = true;\n\t\t\tthis.__removeConnection(connection, true);\n\t\t\tthis.suspendRecordingDetachedConnections = false;\n\t\t},\n\t\tasync onRevertRemoveConnection({ connection }: { connection: [IConnection, IConnection] }) {\n\t\t\tthis.suspendRecordingDetachedConnections = true;\n\t\t\tthis.__addConnection(connection);\n\t\t\tthis.suspendRecordingDetachedConnections = false;\n\t\t},\n\t\tasync onRevertNameChange({ currentName, newName }: { currentName: string; newName: string }) {\n\t\t\tawait this.renameNode(newName, currentName);\n\t\t},\n\t\tonRevertEnableToggle({ nodeName }: { nodeName: string }) {\n\t\t\tconst node = this.workflowsStore.getNodeByName(nodeName);\n\t\t\tif (node) {\n\t\t\t\tthis.nodeHelpers.disableNodes([node]);\n\t\t\t}\n\t\t},\n\t\tonPageShow(e: PageTransitionEvent) {\n\t\t\t// Page was restored from the bfcache (back-forward cache)\n\t\t\tif (e.persisted) {\n\t\t\t\tthis.canvasStore.stopLoading();\n\t\t\t}\n\t\t},\n\t\treadOnlyEnvRouteCheck() {\n\t\t\tif (\n\t\t\t\tthis.readOnlyEnv &&\n\t\t\t\t(this.$route.name === VIEWS.NEW_WORKFLOW || this.$route.name === VIEWS.TEMPLATE_IMPORT)\n\t\t\t) {\n\t\t\t\tvoid this.$nextTick(async () => {\n\t\t\t\t\tthis.resetWorkspace();\n\t\t\t\t\tthis.uiStore.stateIsDirty = false;\n\n\t\t\t\t\tawait this.$router.replace({ name: VIEWS.HOMEPAGE });\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tasync checkAndInitDebugMode() {\n\t\t\tif (this.$route.name === VIEWS.EXECUTION_DEBUG) {\n\t\t\t\tthis.titleSet(this.workflowName, 'DEBUG');\n\t\t\t\tif (!this.workflowsStore.isInDebugMode) {\n\t\t\t\t\tawait this.applyExecutionData(this.$route.params.executionId as string);\n\t\t\t\t\tthis.workflowsStore.isInDebugMode = true;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonContextMenuAction(action: ContextMenuAction, nodes: INode[]): void {\n\t\t\tswitch (action) {\n\t\t\t\tcase 'copy':\n\t\t\t\t\tthis.copyNodes(nodes);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'delete':\n\t\t\t\t\tthis.deleteNodes(nodes);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate':\n\t\t\t\t\tvoid this.duplicateNodes(nodes);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'execute':\n\t\t\t\t\tthis.onRunNode(nodes[0].name, 'NodeView.onContextMenuAction');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'open':\n\t\t\t\t\tthis.ndvStore.activeNodeName = nodes[0].name;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'rename':\n\t\t\t\t\tvoid this.renameNodePrompt(nodes[0].name);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'toggle_activation':\n\t\t\t\t\tthis.toggleActivationNodes(nodes);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'toggle_pin':\n\t\t\t\t\tthis.togglePinNodes(nodes, 'context-menu');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'add_node':\n\t\t\t\t\tthis.onToggleNodeCreator({\n\t\t\t\t\t\tsource: NODE_CREATOR_OPEN_SOURCES.CONTEXT_MENU,\n\t\t\t\t\t\tcreateNodeActive: !this.isReadOnlyRoute && !this.readOnlyEnv,\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'add_sticky':\n\t\t\t\t\tvoid this.onAddNodes({ nodes: [{ type: STICKY_NODE_TYPE }], connections: [] });\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select_all':\n\t\t\t\t\tthis.selectAllNodes();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'deselect_all':\n\t\t\t\t\tthis.deselectAllNodes();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\tasync onSourceControlPull() {\n\t\t\tlet workflowId = null as string | null;\n\t\t\tif (this.$route.params.name) {\n\t\t\t\tworkflowId = this.$route.params.name.toString();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tawait Promise.all([\n\t\t\t\t\tthis.loadVariables(),\n\t\t\t\t\tthis.tagsStore.fetchAll(),\n\t\t\t\t\tthis.loadCredentials(),\n\t\t\t\t]);\n\n\t\t\t\tif (workflowId !== null && !this.uiStore.stateIsDirty) {\n\t\t\t\t\tconst workflow: IWorkflowDb | undefined =\n\t\t\t\t\t\tawait this.workflowsStore.fetchWorkflow(workflowId);\n\t\t\t\t\tif (workflow) {\n\t\t\t\t\t\tthis.titleSet(workflow.name, 'IDLE');\n\t\t\t\t\t\tawait this.openWorkflow(workflow);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t}\n\t\t},\n\t},\n});\n</script>\n\n<style scoped lang=\"scss\">\n.node-view-root {\n\tposition: relative;\n\tflex: 1;\n\toverflow: hidden;\n\tbackground-color: var(--color-canvas-background);\n\twidth: 100%;\n\theight: 100%;\n\tposition: relative;\n}\n\n.node-view-wrapper {\n\tposition: fixed;\n}\n\n.node-view {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\ttransform-origin: 0 0;\n\tz-index: -1;\n}\n\n.node-view-background {\n\tbackground-color: var(--color-canvas-background);\n\tposition: absolute;\n\twidth: 100vw;\n\theight: 100vh;\n\tz-index: -2;\n}\n\n.move-active {\n\tcursor: grab;\n\tcursor: -moz-grab;\n\tcursor: -webkit-grab;\n\ttouch-action: none;\n}\n\n.move-in-process {\n\tcursor: grabbing;\n\tcursor: -moz-grabbing;\n\tcursor: -webkit-grabbing;\n\ttouch-action: none;\n}\n\n.workflow-execute-wrapper {\n\tposition: absolute;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tbottom: var(--spacing-l);\n\twidth: auto;\n\n\t@media (max-width: $breakpoint-2xs) {\n\t\tbottom: 150px;\n\t}\n\n\tbutton {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tmargin-left: 0.625rem;\n\n\t\t&:first-child {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n}\n\n/* Makes sure that when selected with mouse it does not select text */\n.do-not-select *,\n.jtk-drag-select * {\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\t-khtml-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n}\n</style>\n\n<style lang=\"scss\">\n.node-view-wrapper {\n\t--drag-scope-active-disabled-color: var(--color-foreground-dark);\n\n\t&.connection-drag-scope-active {\n\t\t@each $node-type in $supplemental-node-types {\n\t\t\t// Grey out incompatible node type endpoints\n\t\t\t&:not(.connection-drag-scope-active-type-#{$node-type}) {\n\t\t\t\t.diamond-output-endpoint,\n\t\t\t\t.jtk-connector,\n\t\t\t\t.add-input-endpoint {\n\t\t\t\t\t--node-type-#{$node-type}-color: var(--drag-scope-active-disabled-color);\n\t\t\t\t}\n\n\t\t\t\t.node-input-endpoint-label,\n\t\t\t\t.node-output-endpoint-label {\n\t\t\t\t\t--node-type-#{$node-type}-color: var(--drag-scope-active-disabled-color);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.connection-drag-scope-active-type-#{$node-type} {\n\t\t\t\t// Dragging input\n\t\t\t\t&.connection-drag-scope-active-connection-target {\n\t\t\t\t\t// Apply style to compatible output endpoints\n\t\t\t\t\t.diamond-output-endpoint[data-jtk-scope-#{$node-type}='true'] {\n\t\t\t\t\t\ttransform: scale(1.5) rotate(45deg);\n\t\t\t\t\t}\n\n\t\t\t\t\t.add-input-endpoint[data-jtk-scope-#{$node-type}='true'] {\n\t\t\t\t\t\t// Apply style to dragged compatible input endpoint\n\t\t\t\t\t\t&.jtk-dragging {\n\t\t\t\t\t\t\t.add-input-endpoint-default {\n\t\t\t\t\t\t\t\ttransform: translate(-5px, -5px) scale(1.5);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Apply style to non-dragged compatible input endpoints\n\t\t\t\t\t\t&:not(.jtk-dragging) {\n\t\t\t\t\t\t\t--node-type-#{$node-type}-color: var(--drag-scope-active-disabled-color);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.node-input-endpoint-label {\n\t\t\t\t\t\t&:not(.jtk-dragging) {\n\t\t\t\t\t\t\t--node-type-#{$node-type}-color: var(--drag-scope-active-disabled-color);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Dragging output\n\t\t\t\t&.connection-drag-scope-active-connection-source {\n\t\t\t\t\t// Apply style to dragged compatible output endpoint\n\t\t\t\t\t.diamond-output-endpoint[data-jtk-scope-#{$node-type}='true'] {\n\t\t\t\t\t\t&.jtk-dragging {\n\t\t\t\t\t\t\ttransform: scale(1.5) rotate(45deg);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Apply style to non-dragged compatible input endpoints\n\t\t\t\t\t\t&:not(.jtk-dragging) {\n\t\t\t\t\t\t\t--node-type-#{$node-type}-color: var(--drag-scope-active-disabled-color);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Apply style to compatible output endpoints\n\t\t\t\t\t.add-input-endpoint[data-jtk-scope-#{$node-type}='true'] {\n\t\t\t\t\t\t.add-input-endpoint-default {\n\t\t\t\t\t\t\ttransform: translate(-5px, -5px) scale(1.5);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.node-output-endpoint-label {\n\t\t\t\t\t\t&:not(.jtk-dragging) {\n\t\t\t\t\t\t\t--node-type-#{$node-type}-color: var(--drag-scope-active-disabled-color);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n.drop-add-node-label {\n\tcolor: var(--color-text-dark);\n\tfont-weight: 600;\n\tfont-size: 0.8em;\n\ttext-align: center;\n\tbackground-color: #ffffff55;\n}\n\n.connection-actions {\n\t&:hover {\n\t\tdisplay: block !important;\n\t}\n\n\t> button {\n\t\tcolor: var(--color-foreground-xdark);\n\t\tborder: 2px solid var(--color-foreground-xdark);\n\t\tbackground-color: var(--color-background-xlight);\n\t\tborder-radius: var(--border-radius-base);\n\t\theight: var(--spacing-l);\n\t\twidth: var(--spacing-l);\n\t\tcursor: pointer;\n\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\tposition: absolute;\n\t\ttop: -12px;\n\n\t\t&.add {\n\t\t\tright: 4px;\n\t\t}\n\n\t\t&.delete {\n\t\t\tleft: 4px;\n\t\t}\n\n\t\t&.delete-single {\n\t\t\tleft: -12px;\n\t\t}\n\n\t\tsvg {\n\t\t\tpointer-events: none;\n\t\t\tfont-size: var(--font-size-2xs);\n\t\t}\n\n\t\t&:hover {\n\t\t\tborder-color: var(--color-primary);\n\t\t\tcolor: var(--color-primary);\n\t\t}\n\t}\n}\n</style>\n\n<style module lang=\"scss\">\n.content {\n\tposition: relative;\n\tdisplay: flex;\n\toverflow: auto;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.shake {\n\tanimation: 1s 200ms shake;\n}\n\n@keyframes shake {\n\t10%,\n\t90% {\n\t\ttransform: translate3d(-1px, 0, 0);\n\t}\n\n\t20%,\n\t80% {\n\t\ttransform: translate3d(2px, 0, 0);\n\t}\n\n\t30%,\n\t50%,\n\t70% {\n\t\ttransform: translate3d(-4px, 0, 0);\n\t}\n\n\t40%,\n\t60% {\n\t\ttransform: translate3d(4px, 0, 0);\n\t}\n}\n\n.setupCredentialsButtonWrapper {\n\tposition: absolute;\n\tleft: var(--spacing-l);\n\ttop: var(--spacing-l);\n}\n</style>\n\n<style lang=\"scss\" scoped>\n@mixin applyColorToConnection($partialSelector, $cssColorVarName, $labelCssColorVarName) {\n\t.jtk-connector#{$partialSelector}:not(.jtk-hover) {\n\t\tpath:not(.jtk-connector-outline) {\n\t\t\tstroke: var(#{$cssColorVarName});\n\t\t}\n\t\tpath[jtk-overlay-id='reverse-arrow'],\n\t\tpath[jtk-overlay-id='endpoint-arrow'],\n\t\tpath[jtk-overlay-id='midpoint-arrow'] {\n\t\t\tfill: var(#{$cssColorVarName});\n\t\t}\n\t}\n\n\t.connection-run-items-label#{$partialSelector} {\n\t\tcolor: var(#{$labelCssColorVarName});\n\t}\n}\n\n:deep(.node-view) {\n\t@include applyColorToConnection('.success', '--color-success-light', '--color-success');\n\t@include applyColorToConnection(\n\t\t'.success.pinned',\n\t\t'--color-foreground-xdark',\n\t\t'--color-foreground-xdark'\n\t);\n\t@include applyColorToConnection(\n\t\t'.success.pinned.has-run',\n\t\t'--color-secondary',\n\t\t'--color-secondary'\n\t);\n}\n</style>\n"],"file":"assets/NodeView-C-hQ3_xD.js"}
|