n8n-editor-ui
Version:
Workflow Editor UI for n8n
1 lines • 212 kB
JavaScript
(function(e){function t(t){for(var o,a,r=t[0],l=t[1],d=t[2],u=0,p=[];u<r.length;u++)a=r[u],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&p.push(i[a][0]),i[a]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o]);c&&c(t);while(p.length)p.shift()();return n.push.apply(n,d||[]),s()}function s(){for(var e,t=0;t<n.length;t++){for(var s=n[t],o=!0,r=1;r<s.length;r++){var l=s[r];0!==i[l]&&(o=!1)}o&&(n.splice(t--,1),e=a(a.s=s[0]))}return e}var o={},i={app:0},n=[];function a(t){if(o[t])return o[t].exports;var s=o[t]={i:t,l:!1,exports:{}};return e[t].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=e,a.c=o,a.d=function(e,t,s){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(s,o,function(t){return e[t]}.bind(null,o));return s},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],l=r.push.bind(r);r.push=t,r=r.slice();for(var d=0;d<r.length;d++)t(r[d]);var c=l;n.push([0,"chunk-vendors"]),s()})({0:function(e,t,s){e.exports=s("cd49")},"0579":function(e,t,s){"use strict";var o=s("78b0"),i=s.n(o);i.a},"0bf5":function(e,t,s){},"0fc8":function(e,t,s){},"13e8":function(e,t,s){},"13ee":function(e,t,s){},"19d7":function(e,t,s){"use strict";var o=s("62fc"),i=s.n(o);i.a},"1b39":function(e,t,s){"use strict";var o=s("8fef"),i=s.n(o);i.a},"1caf":function(e,t,s){"use strict";var o=s("f4a2"),i=s.n(o);i.a},2046:function(e,t,s){},2557:function(e,t,s){},"26fe":function(e,t,s){"use strict";var o=s("fbb7"),i=s.n(o);i.a},"2d96":function(e,t,s){"use strict";var o=s("13ee"),i=s.n(o);i.a},"31a8":function(e,t,s){"use strict";var o=s("9afe"),i=s.n(o);i.a},3961:function(e,t,s){"use strict";var o=s("ecd6"),i=s.n(o);i.a},"3a3b":function(e,t,s){"use strict";var o=s("bece"),i=s.n(o);i.a},"3c38":function(e,t,s){"use strict";s.r(t);var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"paramter-input-list-wrapper"},e._l(e.filteredParameters,(function(t){return s("div",{key:t.name},[!0===e.multipleValues(t)&&"fixedCollection"!==t.type?s("div",{staticClass:"parameter-item"},[s("multiple-parameter",{attrs:{parameter:t,values:e.getParameterValue(e.nodeValues,t.name,e.path),nodeValues:e.nodeValues,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}})],1):["collection","fixedCollection"].includes(t.type)?s("div",{staticClass:"multi-parameter"},[s("div",{staticClass:"parameter-name",attrs:{title:t.displayName}},[!0===e.hideDelete||e.isReadOnly?e._e():s("div",{staticClass:"delete-option clickable",attrs:{title:"Delete"}},[s("font-awesome-icon",{staticClass:"reset-icon clickable",attrs:{icon:"trash",title:"Parameter Options"},on:{click:function(s){return e.deleteOption(t.name)}}})],1),e._v("\n\t\t\t\t"+e._s(t.displayName)+":\n\t\t\t\t"),t.description?s("el-tooltip",{staticClass:"parameter-info",attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(t.description)},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"question-circle"}})],1):e._e()],1),s("div",["collection"===t.type?s("collection-parameter",{attrs:{parameter:t,values:e.getParameterValue(e.nodeValues,t.name,e.path),nodeValues:e.nodeValues,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}}):"fixedCollection"===t.type?s("fixed-collection-parameter",{attrs:{parameter:t,values:e.getParameterValue(e.nodeValues,t.name,e.path),nodeValues:e.nodeValues,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}}):e._e()],1)]):e.displayNodeParameter(t)?s("div",{staticClass:"parameter-item"},[!0===e.hideDelete||e.isReadOnly?e._e():s("div",{staticClass:"delete-option clickable",attrs:{title:"Delete"}},[s("font-awesome-icon",{staticClass:"reset-icon clickable",attrs:{icon:"trash",title:"Delete Parameter"},on:{click:function(s){return e.deleteOption(t.name)}}})],1),s("parameter-input-full",{attrs:{parameter:t,value:e.getParameterValue(e.nodeValues,t.name,e.path),displayOptions:!0,path:e.getPath(t.name)},on:{valueChanged:e.valueChanged}})],1):e._e()])})),0)},i=[],n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"duplicate-parameter",on:{keydown:function(e){e.stopPropagation()}}},[s("div",{staticClass:"parameter-name"},[e._v("\n\t\t"+e._s(e.parameter.displayName)+":\n\t\t"),e.parameter.description?s("el-tooltip",{staticClass:"parameter-info",attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.parameter.description)},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"question-circle"}})],1):e._e()],1),e._l(e.values,(function(t,o){return s("div",{key:o,staticClass:"duplicate-parameter-item",class:e.parameter.type},[e.isReadOnly?e._e():s("div",{staticClass:"delete-item clickable",attrs:{title:"Delete Item"},on:{click:function(t){return e.deleteItem(o)}}},[s("font-awesome-icon",{attrs:{icon:"trash"}})],1),"collection"===e.parameter.type?s("div",[s("collection-parameter",{attrs:{parameter:e.parameter,values:t,nodeValues:e.nodeValues,path:e.getPath(o),hideDelete:e.hideDelete},on:{valueChanged:e.valueChanged}})],1):s("div",[s("parameter-input",{staticClass:"duplicate-parameter-input-item",attrs:{parameter:e.parameter,value:t,displayOptions:!0,path:e.getPath(o)},on:{valueChanged:e.valueChanged}})],1)])})),s("div",{staticClass:"add-item-wrapper"},[e.values&&0===Object.keys(e.values).length||e.isReadOnly?s("div",{staticClass:"no-items-exist"},[e._v("\n\t\t\tCurrently no items exist\n\t\t")]):e._e(),e.isReadOnly?e._e():s("el-button",{staticClass:"add-item",attrs:{size:"small"},on:{click:function(t){return e.addItem()}}},[e._v(e._s(e.addButtonText))])],1)],2)},a=[],r=s("3eb9"),l=s("89e8"),d=s("2ef0"),c=s("4971"),u=s("1df6"),p=Object(u["a"])(c["a"]).extend({name:"MultipleParameter",components:{CollectionParameter:r["default"],ParameterInput:l["a"]},props:["nodeValues","parameter","path","values"],computed:{addButtonText(){return this.parameter.typeOptions&&this.parameter.typeOptions.multipleValueButtonText?this.parameter.typeOptions.multipleValueButtonText:"Add item"},hideDelete(){return 1===this.parameter.options.length}},methods:{addItem(){const e=this.getPath();let t=Object(d["get"])(this.nodeValues,e);void 0===t&&(t=[]),t.push(JSON.parse(JSON.stringify(this.parameter.default)));const s={name:e,value:t};this.$emit("valueChanged",s)},deleteItem(e){const t={name:this.getPath(e),value:void 0};this.$emit("valueChanged",t)},getPath(e){return this.path+(void 0!==e?`[${e}]`:"")},valueChanged(e){this.$emit("valueChanged",e)}}}),h=p,m=(s("7a4d"),s("5e82"),s("2877")),f=Object(m["a"])(h,n,a,!1,null,"8576aa2e",null),w=f.exports,g=s("6fae"),v=s("4a0c"),y=Object(u["a"])(c["a"],g["a"]).extend({name:"ParameterInputList",components:{MultipleParameter:w,ParameterInputFull:v["a"]},props:["nodeValues","parameters","path","hideDelete"],computed:{filteredParameters(){return this.parameters.filter(e=>this.displayNodeParameter(e))}},methods:{multipleValues(e){return!0===this.getArgument("multipleValues",e)},getArgument(e,t){if(void 0!==t.typeOptions&&void 0!==t.typeOptions[e])return t.typeOptions[e]},getPath(e){return(this.path?`${this.path}.`:"")+e},deleteOption(e){const t={name:this.getPath(e),value:void 0};this.$emit("valueChanged",t)},displayNodeParameter(e){return void 0===e.displayOptions||this.displayParameter(this.nodeValues,e,this.path)},valueChanged(e){this.$emit("valueChanged",e)}},beforeCreate:function(){this.$options.components.FixedCollectionParameter=s("fe0b").default,this.$options.components.CollectionParameter=s("3eb9").default}}),k=y,b=(s("ae93"),Object(m["a"])(k,o,i,!1,null,null,null));t["default"]=b.exports},"3eb9":function(e,t,s){"use strict";s.r(t);var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"collection-parameter",on:{keydown:function(e){e.stopPropagation()}}},[s("div",{staticClass:"collection-parameter-wrapper"},[0===e.getProperties.length?s("div",{staticClass:"no-items-exist"},[e._v("\n\t\t\tCurrently no properties exist\n\t\t")]):e._e(),s("parameter-input-list",{attrs:{parameters:e.getProperties,nodeValues:e.nodeValues,path:e.path,hideDelete:e.hideDelete},on:{valueChanged:e.valueChanged}}),e.parameterOptions.length>0&&!e.isReadOnly?s("div",[1===e.parameter.options.length?s("el-button",{staticClass:"add-option",attrs:{size:"small"},on:{click:function(t){return e.optionSelected(e.parameter.options[0].name)}}},[e._v(e._s(e.getPlaceholderText))]):s("el-select",{staticClass:"add-option",attrs:{placeholder:e.getPlaceholderText,size:"small",filterable:""},on:{change:e.optionSelected},model:{value:e.selectedOption,callback:function(t){e.selectedOption=t},expression:"selectedOption"}},e._l(e.parameterOptions,(function(e){return s("el-option",{key:e.name,attrs:{label:e.displayName,value:e.name}})})),1)],1):e._e()],1)])},i=[],n=s("4971"),a=s("6fae"),r=s("2ef0"),l=s("1df6"),d=Object(l["a"])(n["a"],a["a"]).extend({name:"CollectionParameter",props:["hideDelete","nodeValues","parameter","path","values"],data(){return{selectedOption:void 0}},computed:{getPlaceholderText(){return this.parameter.placeholder?this.parameter.placeholder:"Choose option to add"},getProperties(){const e=[];let t;for(const s of this.propertyNames)t=this.getOptionProperties(s),void 0!==t&&e.push(t);return e},filteredOptions(){return this.parameter.options.filter(e=>{return this.displayNodeParameter(e)})},parameterOptions(){return this.filteredOptions.filter(e=>{return!this.propertyNames.includes(e.name)})},propertyNames(){return this.values?Object.keys(this.values):[]}},methods:{getArgument(e){if(void 0!==this.parameter.typeOptions&&void 0!==this.parameter.typeOptions[e])return this.parameter.typeOptions[e]},getOptionProperties(e){for(const t of this.parameter.options)if(t.name===e)return t},displayNodeParameter(e){return void 0===e.displayOptions||this.displayParameter(this.nodeValues,e,this.path)},optionSelected(e){const t=this.getOptionProperties(e);if(void 0===t)return;const s=`${this.path}.${t.name}`;let o;if(void 0!==t.typeOptions&&!0===t.typeOptions.multipleValues){let i;"fixedCollection"===t.type?i=Object(r["get"])(this.nodeValues,`${this.path}.${e}`,{}):(i=Object(r["get"])(this.nodeValues,`${this.path}.${e}`,[]),i.push(JSON.parse(JSON.stringify(t.default)))),o={name:s,value:i}}else o={name:s,value:JSON.parse(JSON.stringify(t.default))};this.$emit("valueChanged",o),this.selectedOption=void 0},valueChanged(e){this.$emit("valueChanged",e)}},beforeCreate:function(){this.$options.components.ParameterInputList=s("3c38").default}}),c=d,u=(s("ab7d"),s("2877")),p=Object(u["a"])(c,o,i,!1,null,null,null);t["default"]=p.exports},"46d0":function(e,t,s){"use strict";var o=s("2557"),i=s.n(o);i.a},"470f":function(e,t,s){"use strict";var o=s("8b51"),i=s.n(o);i.a},4971:function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var o=s("b9b9"),i=s.n(o),n=s("77f0"),a=s("1df6");const r=Object(a["a"])(n["a"]).extend({data(){return{loadingService:null}},computed:{isReadOnly(){return!["NodeViewExisting","NodeViewNew"].includes(this.$route.name)}},methods:{convertToDisplayDate(e){return i()(e,"yyyy-mm-dd HH:MM:ss")},displayTimer(e,t=!1){if(e<6e4)return!1===t?`${Math.floor(e/1e3)} sec.`:`${e/1e3} sec.`;const s=Math.floor(e/1e3),o=Math.floor(s/60),i=(s-60*o).toString().padStart(2,"0");return`${o}:${i} min.`},editAllowedCheck(){return!this.isReadOnly||(this.$showMessage({title:"Workflow can not be changed!",message:"The workflow can not be edited as a past execution gets displayed. To make changed either open the original workflow of which the execution gets displayed or save it under a new name first.",type:"error",duration:0}),!1)},startLoading(){null===this.loadingService&&(this.loadingService=this.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(255, 255, 255, 0.8)"}))},stopLoading(){null!==this.loadingService&&(this.loadingService.close(),this.loadingService=null)},async confirmMessage(e,t,s="warning",o="OK",i="Cancel"){try{return await this.$confirm(e,t,{confirmButtonText:o,cancelButtonText:i,type:s,dangerouslyUseHTMLString:!0}),!0}catch(n){return!1}}}})},"4a0c":function(e,t,s){"use strict";var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-row",{staticClass:"parameter-wrapper"},[s("el-col",{staticClass:"parameter-name",class:{"multi-line":e.isMultiLineParameter},attrs:{span:e.isMultiLineParameter?24:10}},[s("span",{staticClass:"title",attrs:{title:e.parameter.displayName}},[e._v(e._s(e.parameter.displayName))]),e._v(":\n\t\t"),e.parameter.description?s("el-tooltip",{staticClass:"parameter-info",attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.parameter.description)},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"question-circle"}})],1):e._e()],1),s("el-col",{staticClass:"parameter-value",attrs:{span:e.isMultiLineParameter?24:14}},[s("parameter-input",{attrs:{parameter:e.parameter,value:e.value,displayOptions:e.displayOptions,path:e.path},on:{valueChanged:e.valueChanged}})],1)],1)},i=[],n=s("2b0e"),a=s("89e8"),r=n["default"].extend({name:"ParameterInputFull",components:{ParameterInput:a["a"]},computed:{isMultiLineParameter(){const e=this.getArgument("rows");return void 0!==e&&e>1}},props:["displayOptions","parameter","path","value"],methods:{getArgument(e){if(void 0!==this.parameter.typeOptions&&void 0!==this.parameter.typeOptions[e])return this.parameter.typeOptions[e]},valueChanged(e){this.$emit("valueChanged",e)}}}),l=r,d=(s("63f3"),s("2877")),c=Object(d["a"])(l,o,i,!1,null,null,null);t["a"]=c.exports},"4a15":function(e,t,s){"use strict";var o=s("caa7"),i=s.n(o);i.a},"4cb6":function(e,t,s){"use strict";var o=s("6c27"),i=s.n(o);i.a},"50ae":function(e,t,s){},5175:function(e,t,s){},5270:function(e,t,s){},"52f2":function(e,t,s){"use strict";var o=s("e540"),i=s.n(o);i.a},"53f5":function(e,t,s){"use strict";var o=s("d440"),i=s.n(o);i.a},5572:function(e,t,s){},"5c0b":function(e,t,s){"use strict";var o=s("e332"),i=s.n(o);i.a},"5e82":function(e,t,s){"use strict";var o=s("9cf7"),i=s.n(o);i.a},"62ca":function(e,t,s){"use strict";var o=s("5175"),i=s.n(o);i.a},"62fc":function(e,t,s){},"63f3":function(e,t,s){"use strict";var o=s("bf02"),i=s.n(o);i.a},"661d":function(e,t,s){"use strict";var o=s("c8eb"),i=s.n(o);i.a},"67be":function(e,t,s){"use strict";var o=s("2046"),i=s.n(o);i.a},"6c27":function(e,t,s){},"6e05":function(e,t,s){},"6e4f":function(e,t,s){"use strict";var o=s("7db6"),i=s.n(o);i.a},"6fae":function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var o=s("e105"),i=s("7b04"),n=s("2ef0"),a=s("1df6");const r=Object(a["a"])(i["a"]).extend({methods:{getParameterValue(e,t,s){return Object(n["get"])(e,s?s+"."+t:t)},displayParameter(e,t,s){return o["NodeHelpers"].displayParameterPath(e,t,s)},getNodeIssues(e,t,s){let i=null;if(s=s||[],!0===t.disabled)return null;if(null===e)s.includes("typeUnknown")||(i={typeUnknown:!0});else if(s.includes("parameters")||(i=o["NodeHelpers"].getNodeParametersIssues(e.properties,t)),!s.includes("credentials")){const s=this.getNodeCredentialIssues(t,e);null===i?i=s:o["NodeHelpers"].mergeIssues(i,s)}return!0!==this.hasNodeExecutionIssues(t)||s.includes("execution")||(null===i&&(i={}),i.execution=!0),i},hasNodeExecutionIssues(e){const t=this.$store.getters.getWorkflowRunData;if(null===t||!t.hasOwnProperty(e.name))return!1;for(const s of t[e.name])if(void 0!==s.error)return!0;return!1},updateNodesExecutionIssues(){const e=this.$store.getters.allNodes;for(const t of e)this.$store.commit("setNodeIssue",{node:t.name,type:"execution",value:!!this.hasNodeExecutionIssues(t)||null})},getNodeCredentialIssues(e,t){if(void 0===t&&(t=this.$store.getters.nodeType(e.type)),null===t||void 0===t.credentials)return null;if(void 0===t.credentials)return null;const s={};let o,i,n,a;for(const r of t.credentials)!0===this.displayParameter(e.parameters,r,"")&&(i=this.$store.getters.credentialType(r.name),n=null===i?r.name:i.displayName,void 0===e.credentials||void 0===e.credentials[r.name]?!0===r.required&&(s[r.name]=[`Credentials for "${n}" are not set.`]):(a=e.credentials[r.name],o=this.$store.getters.credentialsByType(r.name),null===o&&(o=[]),void 0===o.find(e=>e.name===a)&&(s[r.name]=[`Credentials with name "${a}" do not exist for "${n}".`])));return 0===Object.keys(s).length?null:{credentials:s}},updateNodesCredentialsIssues(){const e=this.$store.getters.allNodes;let t;for(const s of e)t=this.getNodeCredentialIssues(s),this.$store.commit("setNodeIssue",{node:s.name,type:"credentials",value:null===t?null:t.credentials})},getNodeInputData(e,t=0,s=0){if(null===e)return[];if(null===this.$store.getters.getWorkflowExecution)return[];const o=this.$store.getters.getWorkflowExecution.data,i=o.resultData.runData;return null!==i&&void 0!==i[e.name]&&i[e.name][t].data&&void 0!==i[e.name][t].data?this.getMainInputData(i[e.name][t].data,s):[]},getMainInputData(e,t){return!e||!e.hasOwnProperty("main")||void 0===e.main||e.main.length<t?[]:e.main[t]},getBinaryData(e,t,s,o){if(null===t)return[];const i=e;if(null===i||!i[t]||!i[t][s]||!i[t][s].data)return[];const n=this.getMainInputData(i[t][s].data,o),a=[];for(let r=0;r<n.length;r++)n[r].hasOwnProperty("binary")&&void 0!==n[r].binary&&a.push(n[r].binary);return a}}})},"77ba":function(e,t,s){},"77f0":function(e,t,s){"use strict";s.d(t,"a",(function(){return n}));var o=s("2b0e"),i=s("5c96");const n=o["default"].extend({methods:{$showMessage(e){return e.dangerouslyUseHTMLString=!0,void 0===e.position&&(e.position="bottom-right"),Object(i["Notification"])(e)},$showError(e,t,s){this.$showMessage({title:t,message:`${s}<br /><i>${e.message}</i>`,type:"error",duration:0})}}})},"78b0":function(e,t,s){},"7a34":function(e,t,s){},"7a4d":function(e,t,s){"use strict";var o=s("7ca7"),i=s.n(o);i.a},"7b04":function(e,t,s){"use strict";s.d(t,"a",(function(){return d}));var o=s("2b0e"),i=s("5bc5"),n=s("bc3a"),a=s.n(n);function r(e){const t={...e,workflowData:e.workflowData,data:Object(i["a"])(e.data)};return t.finished=!!t.finished&&t.finished,e.id&&(t.id=e.id),t}class l extends Error{constructor(e,t,s,o){super(e),this.name="ResponseError",t&&(this.errorCode=t),s&&(this.httpStatusCode=s),o&&(this.serverStackTrace=o)}}const d=o["default"].extend({methods:{restApi(){const e=this;return{async makeRestApiRequest(t,s,o){try{const i={method:t,url:s,baseURL:e.$store.getters.getRestUrl,headers:{sessionid:e.$store.getters.sessionId}};["PATCH","POST","PUT"].includes(t)?i.data=o:i.params=o;const n=await a.a.request(i);return n.data.data}catch(i){if("Network Error"===i.message)throw new l("API-Server can not be reached. It is probably down.");const e=i.response.data;if(void 0!==e&&void 0!==e.message)throw new l(e.message,e.code,i.response.status,e.stack);throw i}},getActiveWorkflows:()=>{return e.restApi().makeRestApiRequest("GET","/active")},getActivationError:t=>{return e.restApi().makeRestApiRequest("GET",`/active/error/${t}`)},getCurrentExecutions:t=>{let s={};return t&&(s={filter:t}),e.restApi().makeRestApiRequest("GET","/executions-current",s)},stopCurrentExecution:t=>{return e.restApi().makeRestApiRequest("POST",`/executions-current/${t}/stop`)},getSettings:()=>{return e.restApi().makeRestApiRequest("GET","/settings")},getNodeTypes:()=>{return e.restApi().makeRestApiRequest("GET","/node-types")},getNodeParameterOptions:(t,s,o)=>{const i={nodeType:t,methodName:s,credentials:o};return e.restApi().makeRestApiRequest("GET","/node-parameter-options",i)},removeTestWebhook:t=>{return e.restApi().makeRestApiRequest("DELETE",`/test-webhook/${t}`)},runWorkflow:async t=>{return e.restApi().makeRestApiRequest("POST","/workflows/run",t)},createNewWorkflow:t=>{return e.restApi().makeRestApiRequest("POST","/workflows",t)},updateWorkflow:(t,s)=>{return e.restApi().makeRestApiRequest("PATCH",`/workflows/${t}`,s)},deleteWorkflow:t=>{return e.restApi().makeRestApiRequest("DELETE",`/workflows/${t}`)},getWorkflow:t=>{return e.restApi().makeRestApiRequest("GET",`/workflows/${t}`)},getWorkflows:t=>{let s;return t&&(s={filter:t}),e.restApi().makeRestApiRequest("GET","/workflows",s)},getWorkflowFromUrl:t=>{return e.restApi().makeRestApiRequest("GET","/workflows/from-url",{url:t})},createNewCredentials:t=>{return e.restApi().makeRestApiRequest("POST","/credentials",t)},deleteCredentials:t=>{return e.restApi().makeRestApiRequest("DELETE",`/credentials/${t}`)},updateCredentials:(t,s)=>{return e.restApi().makeRestApiRequest("PATCH",`/credentials/${t}`,s)},getCredentials:(t,s)=>{let o;return s&&(o={includeData:s}),e.restApi().makeRestApiRequest("GET",`/credentials/${t}`,o)},getAllCredentials:t=>{let s;return t&&(s={filter:t}),e.restApi().makeRestApiRequest("GET","/credentials",s)},getCredentialTypes:()=>{return e.restApi().makeRestApiRequest("GET","/credential-types")},getExecution:async t=>{const s=await e.restApi().makeRestApiRequest("GET",`/executions/${t}`);return r(s)},deleteExecutions:t=>{return e.restApi().makeRestApiRequest("POST","/executions/delete",t)},retryExecution:t=>{return e.restApi().makeRestApiRequest("POST",`/executions/${t}/retry`)},getPastExecutions:(t,s,o)=>{let i={};return t&&(i={filter:t,lastStartedAt:o,limit:s}),e.restApi().makeRestApiRequest("GET","/executions",i)},getTimezones:()=>{return e.restApi().makeRestApiRequest("GET","/options/timezones")}}}}})},"7b46":function(e,t,s){"use strict";var o=s("9c90"),i=s.n(o);i.a},"7ca7":function(e,t,s){},"7db6":function(e,t,s){},"841f":function(e,t,s){},"847d":function(e,t,s){"use strict";var o=s("a6e8"),i=s.n(o);i.a},"85ee":function(e,t,s){"use strict";s.d(t,"a",(function(){return o})),s.d(t,"b",(function(){return i}));const o="node-",i="__EMPTY__"},"86ec":function(e,t,s){},"89e8":function(e,t,s){"use strict";var o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{class:e.parameterInputClasses,on:{keydown:function(e){e.stopPropagation()}}},[s("expression-edit",{attrs:{dialogVisible:e.expressionEditDialogVisible,value:e.value,parameter:e.parameter,path:e.path},on:{closeDialog:e.closeExpressionEditDialog,valueChanged:e.expressionUpdated}}),s("div",{staticClass:"parameter-input ignore-key-press",style:e.parameterInputWrapperStyle},[["json","string"].includes(e.parameter.type)?s("div",[s("code-edit",{attrs:{dialogVisible:e.codeEditDialogVisible,value:e.value,parameter:e.parameter},on:{closeDialog:e.closeCodeEditDialog,valueChanged:e.expressionUpdated}}),s("text-edit",{attrs:{dialogVisible:e.textEditDialogVisible,value:e.value,parameter:e.parameter},on:{closeDialog:e.closeTextEditDialog,valueChanged:e.expressionUpdated}}),!0===e.isEditor?s("div",{staticClass:"clickable",on:{click:function(t){return e.displayEditDialog()}}},[e.codeEditDialogVisible?e._e():s("prism-editor",{attrs:{lineNumbers:!0,readonly:!0,code:e.displayValue,language:"js"}})],1):s("el-input",{ref:"inputField",attrs:{size:"small",type:e.getStringInputType,rows:e.getArgument("rows"),value:e.displayValue,disabled:e.isReadOnly,title:e.displayTitle,placeholder:e.isValueExpression?"":e.parameter.placeholder},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus}},[e.isValueExpression||e.isReadOnly?e._e():s("font-awesome-icon",{staticClass:"edit-window-button clickable",attrs:{slot:"suffix",icon:"external-link-alt",title:"Open Edit Window"},on:{click:function(t){return e.displayEditDialog()}},slot:"suffix"})],1)],1):"dateTime"===e.parameter.type?s("div",[s("el-date-picker",{ref:"inputField",attrs:{type:"datetime",size:"small",value:e.displayValue,title:e.displayTitle,disabled:e.isReadOnly,placeholder:e.parameter.placeholder?e.parameter.placeholder:"Select date and time","picker-options":e.dateTimePickerOptions},on:{change:e.valueChanged,focus:e.setFocus,keydown:function(e){e.stopPropagation()}},model:{value:e.tempValue,callback:function(t){e.tempValue=t},expression:"tempValue"}})],1):"number"===e.parameter.type?s("div",[s("el-input-number",{ref:"inputField",attrs:{size:"small",value:e.displayValue,max:e.getArgument("maxValue"),min:e.getArgument("minValue"),precision:e.getArgument("numberPrecision"),step:e.getArgument("numberStepSize"),disabled:e.isReadOnly,title:e.displayTitle,placeholder:e.parameter.placeholder},on:{change:e.valueChanged,focus:e.setFocus,keydown:function(e){e.stopPropagation()}}})],1):"options"===e.parameter.type?s("el-select",{ref:"inputField",attrs:{size:"small",filterable:"",value:e.displayValue,loading:e.remoteParameterOptionsLoading,disabled:e.isReadOnly||e.remoteParameterOptionsLoading,title:e.displayTitle},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus}},e._l(e.parameterOptions,(function(t){return s("el-option",{key:t.value,attrs:{value:t.value,label:t.name}},[s("div",{staticClass:"option-headline"},[e._v(e._s(t.name))]),t.description?s("div",{staticClass:"option-description",domProps:{innerHTML:e._s(t.description)}}):e._e()])})),1):"multiOptions"===e.parameter.type?s("el-select",{ref:"inputField",attrs:{multiple:"",size:"small",value:e.displayValue,filterable:"",disabled:e.isReadOnly,title:e.displayTitle},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus}},e._l(e.parameter.options,(function(t){return s("el-option",{key:t.value,attrs:{value:t.value,label:t.name}},[s("div",{staticClass:"option-headline"},[e._v(e._s(t.name))]),t.description?s("div",{staticClass:"option-description",domProps:{innerHTML:e._s(t.description)}}):e._e()])})),1):"color"===e.parameter.type?s("div",{ref:"inputField",staticClass:"color-input"},[s("el-color-picker",{staticClass:"color-picker",attrs:{value:e.displayValue,disabled:e.isReadOnly,size:"small",title:e.displayTitle},on:{change:e.valueChanged,focus:e.setFocus}}),s("el-input",{attrs:{size:"small",type:"text",value:e.displayValue,disabled:e.isReadOnly,title:e.displayTitle},on:{change:e.valueChanged,keydown:function(e){e.stopPropagation()},focus:e.setFocus}})],1):"boolean"===e.parameter.type?s("div",[s("el-switch",{ref:"inputField",attrs:{value:e.displayValue,"active-color":"#13ce66",disabled:e.isValueExpression||e.isReadOnly},on:{change:e.valueChanged}}),s("div",{staticClass:"expression-info clickable",on:{click:function(t){e.expressionEditDialogVisible=!0}}},[e._v("Edit Expression")])],1):e._e()],1),e.displayOptionsComputed?s("div",{staticClass:"parameter-options"},[s("el-dropdown",{attrs:{trigger:"click",size:"mini"},on:{command:e.optionSelected}},[s("span",{staticClass:"el-dropdown-link"},[s("font-awesome-icon",{staticClass:"reset-icon clickable",attrs:{icon:"cogs",title:"Parameter Options"}})],1),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[!0===e.parameter.noDataExpression||e.isValueExpression?e._e():s("el-dropdown-item",{attrs:{command:"addExpression"}},[e._v("Add Expression")]),!0!==e.parameter.noDataExpression&&e.isValueExpression?s("el-dropdown-item",{attrs:{command:"removeExpression"}},[e._v("Remove Expression")]):e._e(),s("el-dropdown-item",{attrs:{command:"resetValue",disabled:e.isDefault,divided:""}},[e._v("Reset Value")])],1)],1)],1):e._e(),e.getIssues.length?s("div",{staticClass:"parameter-issues"},[s("el-tooltip",{attrs:{placement:"top",effect:"light"}},[s("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s("Issues:<br /> - "+e.getIssues.join("<br /> - "))},slot:"content"}),s("font-awesome-icon",{attrs:{icon:"exclamation-triangle"}})],1)],1):e._e()],1)},i=[],n=s("e105"),a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.dialogVisible?s("div",[s("el-dialog",{attrs:{visible:e.dialogVisible,"append-to-body":"",width:"80%",title:"Edit "+e.parameter.displayName,"before-close":e.closeDialog}},[s("div",{staticClass:"text-editor-wrapper ignore-key-press"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t"+e._s(e.parameter.displayName)+":\n\t\t\t")]),s("div",{staticClass:"text-editor",on:{keydown:function(e){e.stopPropagation()}}},[s("prism-editor",{attrs:{lineNumbers:!0,code:e.value,language:"js"},on:{change:e.valueChanged}})],1)])])],1):e._e()},r=[],l=s("2b0e"),d=s("431a"),c=s.n(d),u=l["default"].extend({name:"CodeEdit",props:["dialogVisible","parameter","value"],components:{PrismEditor:c.a},data(){return{}},methods:{valueChanged(e){this.$emit("valueChanged",e)},closeDialog(){return this.$emit("closeDialog"),!1}}}),p=u,h=(s("1caf"),s("2877")),m=Object(h["a"])(p,a,r,!1,null,"49397ad7",null),f=m.exports,w=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.dialogVisible?s("div",{on:{keydown:function(e){e.stopPropagation()}}},[s("el-dialog",{attrs:{visible:e.dialogVisible,"custom-class":"expression-dialog","append-to-body":"",width:"80%",title:"Edit Expression","before-close":e.closeDialog}},[s("el-row",[s("el-col",{attrs:{span:8}},[s("div",{staticClass:"header-side-menu"},[s("div",{staticClass:"headline"},[e._v("\n\t\t\t\t\t\tEdit Expression\n\t\t\t\t\t")]),s("div",{staticClass:"sub-headline"},[e._v("\n\t\t\t\t\t\tVariable Selector\n\t\t\t\t\t")])]),s("div",{staticClass:"variable-selector"},[s("variable-selector",{attrs:{path:e.path},on:{itemSelected:e.itemSelected}})],1)]),s("el-col",{staticClass:"right-side",attrs:{span:16}},[s("div",{staticClass:"expression-editor-wrapper"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t\t\tExpression\n\t\t\t\t\t")]),s("div",{staticClass:"expression-editor"},[s("expression-input",{ref:"inputFieldExpression",attrs:{parameter:e.parameter,rows:"8",value:e.value,path:e.path},on:{change:e.valueChanged,keydown:function(t){return t.stopPropagation(),e.noOp(t)}}})],1)]),s("div",{staticClass:"expression-result-wrapper"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t\t\tResult\n\t\t\t\t\t")]),s("expression-input",{attrs:{parameter:e.parameter,resolvedValue:"true",rows:"8",value:e.value,path:e.path}})],1)])],1)],1)],1):e._e()},g=[],v=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{ref:"expression-editor",staticClass:"ignore-key-press",style:e.editorStyle,on:{keydown:function(e){e.stopPropagation()}}})])},y=[],k=(s("a753"),s("9339")),b=s.n(k),x=s("8150"),C=s.n(x),N=s("d2e2"),E=s("1df6"),D=Object(E["a"])(N["a"]).extend({name:"ExpressionInput",props:["rows","value","parameter","path","resolvedValue"],data(){return{editor:null}},computed:{editorStyle(){let e=1;return this.rows&&(e=parseInt(this.rows,10)),{height:Math.max(26*e+10,40)+"px"}},workflow(){return this.getWorkflow()}},watch:{value(){this.resolvedValue&&this.initValue()}},mounted(){const e=this,t=b.a.import("blots/inline");class s extends t{static create(e){const t=super.create(e);return t.setAttribute("data-value",e),t.setAttribute("class","variable"),t}static formats(t){let s=t.innerHTML.trim();e.resolvedValue&&(s=t.getAttribute("data-value"));const o=e.getPlaceholderClasses(s);return t.getAttribute("class")!==o&&t.setAttribute("class",o),!0}}s.blotName="variable",s.className="variable",s.tagName="span",b.a.register({"formats/variable":s}),C.a.DEFAULTS={expression:{trigger:/\B[\w\s]/,find:/\{\{[^\s,;:!?}]+\}\}/i,format:"variable"}},this.editor=new b.a(this.$refs["expression-editor"],{readOnly:!!this.resolvedValue,modules:{autoformat:{}}}),this.editor.root.addEventListener("blur",e=>{this.$emit("blur",e)}),this.initValue(),this.resolvedValue||(this.setFocus(),this.editor.on("text-change",()=>this.update()))},methods:{customizeVariable(e){const t={classes:[],message:e};let s;try{s=this.resolveExpression(`=${e}`),void 0!==s?t.classes.push("valid"):t.classes.push("invalid")}catch(o){t.classes.push("invalid")}return t},resolveParameterString(e){let t;try{t=this.resolveExpression(`=${e}`)}catch(s){return"invalid"}return void 0===t?"not found":t},getPlaceholderClasses(e){const t=this.customizeVariable(e);return"variable "+t.classes.join(" ")},getValue(){if(!this.editor)return"";const e=this.editor.getContents();if(!e||!e.ops)return"";let t="";return e.ops.forEach(e=>{e.insert&&(t+=e.insert)}),"="+t.replace(/\s+$/g,"")},setFocus(){this.editor.focus()},itemSelected(e){this.editor.focus();const t=this.editor.getSelection();let s=null;if(t&&(s=t.index),s)this.editor.insertText(s,`{{${e.variable}}}`,"variable",!0),this.update();else{let t=this.value;"="!==t&&(t+=" "),t+=`{{${e.variable}}}\n`,this.$emit("change",t),this.resolvedValue||l["default"].nextTick(()=>{this.initValue()})}},initValue(){if(!this.value)return;let e=this.value;"="===e.charAt(0)&&(e=e.slice(1));const t=[];e.replace(/\{\{(.*?)\}\}/gi,"*%%#_@^$1*%%#_@").split("*%%#_@").forEach(e=>{if(e)if("^"===e.charAt(0)){let s=`{{${e.slice(1)}}}`;this.resolvedValue&&(s=this.resolveParameterString(s.toString())),t.push({attributes:{variable:`{{${e.slice(1)}}}`},insert:s.toString()})}else t.push({insert:e});else;}),this.editor.setContents(t)},update(){this.$emit("input",this.getValue()),this.$emit("change",this.getValue())}}}),$=D,O=(s("46d0"),Object(h["a"])($,v,y,!1,null,null,null)),T=O.exports,A=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"variable-selector-wrapper",on:{keydown:function(e){e.stopPropagation()}}},[s("div",{staticClass:"input-wrapper"},[s("el-input",{ref:"inputField",attrs:{placeholder:"Variable filter...",size:"small",type:"text"},model:{value:e.variableFilter,callback:function(t){e.variableFilter=t},expression:"variableFilter"}})],1),s("div",{staticClass:"result-wrapper"},e._l(e.currentResults,(function(t){return s("variable-selector-item",{key:t.key,attrs:{item:t,extendAll:e.extendAll},on:{itemSelected:e.forwardItemSelected}})})),1)])},S=[],_=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"item"},[e.item.options?s("div",{staticClass:"options"},[e.item.options.length?s("div",{staticClass:"headline clickable",on:{click:function(t){e.extended=!e.extended}}},[!0!==e.extendAll?s("div",{staticClass:"options-toggle"},[e.extended?s("font-awesome-icon",{attrs:{icon:"angle-down"}}):s("font-awesome-icon",{attrs:{icon:"angle-right"}})],1):e._e(),s("div",{staticClass:"option-title",attrs:{title:e.item.key}},[e._v("\n\t\t\t\t"+e._s(e.item.name)+"\n\n\t\t\t\t"),!0===e.allowParentSelect?s("el-dropdown",{attrs:{trigger:"click"},on:{click:function(e){e.stopPropagation()},command:function(t){return e.optionSelected(t,e.item)}}},[s("span",{staticClass:"el-dropdown-link clickable",on:{click:function(e){e.stopPropagation()}}},[s("font-awesome-icon",{attrs:{icon:"dot-circle",title:"Select Item"}})],1),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.itemAddOperations,(function(t){return s("el-dropdown-item",{key:t.command,attrs:{command:t.command}},[e._v(e._s(t.displayName))])})),1)],1):e._e()],1)]):e._e(),!e.item.options||!0!==e.extended&&!0!==e.extendAll?e._e():s("div",e._l(e.item.options,(function(t){return s("variable-selector-item",{key:t.key,staticClass:"sub-level",attrs:{item:t,extendAll:e.extendAll,allowParentSelect:t.allowParentSelect},on:{itemSelected:e.forwardItemSelected}})})),1)]):s("div",{staticClass:"value clickable",on:{click:function(t){return e.selectItem(e.item)}}},[s("div",{staticClass:"item-title",attrs:{title:e.item.key}},[e._v("\n\t\t\t"+e._s(e.item.name)+":\n\t\t\t"),s("font-awesome-icon",{attrs:{icon:"dot-circle",title:"Select Item"}})],1),s("div",{staticClass:"item-value"},[e._v(e._s(void 0!==e.item.value?e.item.value:"--- EMPTY ---"))])])])},P=[],I=l["default"].extend({name:"VariableSelectorItem",props:["allowParentSelect","extendAll","item"],computed:{itemAddOperations(){const e=[{command:"raw",displayName:"Raw value"}];return"array"===this.item.dataType?(e.push({command:"arrayLength",displayName:"Length"}),e.push({command:"arrayValues",displayName:"Values"})):"object"===this.item.dataType&&(e.push({command:"objectKeys",displayName:"Keys"}),e.push({command:"objectValues",displayName:"Values"})),e}},data(){return{extended:!1}},methods:{optionSelected(e,t){let s=t.key;"arrayValues"===e?s=`${t.key}.join(', ')`:"arrayLength"===e?s=`${t.key}.length`:"objectKeys"===e?s=`Object.keys(${t.key}).join(', ')`:"objectValues"===e&&(s=`Object.values(${t.key}).join(', ')`),this.$emit("itemSelected",{variable:s})},selectItem(e){this.$emit("itemSelected",{variable:e.key})},forwardItemSelected(e){this.$emit("itemSelected",e)}}}),V=I,W=(s("6e4f"),Object(h["a"])(V,_,P,!1,null,"42795557",null)),R=W.exports,L=Object(E["a"])(N["a"]).extend({name:"VariableSelector",components:{VariableSelectorItem:R},props:["path"],data(){return{variableFilter:"",selectorOpenInputIndex:null}},computed:{extendAll(){return!!this.variableFilter},currentResults(){return this.getFilterResults(this.variableFilter.toLowerCase(),0)},workflow(){return this.getWorkflow()}},methods:{forwardItemSelected(e){this.$emit("itemSelected",e)},sortOptions(e){return null===e?null:e.sort((e,t)=>{const s=e.hasOwnProperty("options"),o=t.hasOwnProperty("options");return o&&!s?1:!o&&s?-1:e.name<t.name?-1:e.name>t.name?1:0})},removeEmptyEntries(e){if(Array.isArray(e)){const t=[];let s;return e.forEach(e=>{s=this.removeEmptyEntries(e),null!==s&&t.push(s)}),t}if(e&&e.options){const t=this.removeEmptyEntries(e.options);return Array.isArray(t)&&t.length?(e.options=this.sortOptions(t),e):null}return e},getPathNormalized(e){if(void 0===e)return"";const t=e.split("."),s=[];let o;for(const i of t){const e=i.match(/\[.*?\]/g);if(null===e)s.push(i);else for(o of("["!==i.charAt(0)&&s.push(i.substr(0,i.indexOf("["))),e))o=o.slice(1,-1),['"',"'"].includes(o.charAt(0))?(o=o.slice(1,-1),s.push(o)):s.push(`[${o}]`)}return s.join("|")},jsonDataToFilterOption(e,t,s,o,i,n,a){let r=`${t}["${s}"]`;void 0!==i&&(r+=`[${i}]`);const l=[];if(null===e)return l;if(Array.isArray(e)){let d=s;void 0!==i&&(d+=`[${i}]`);const c=[];for(let s=0;s<e.length;s++)c.push.apply(c,this.jsonDataToFilterOption(e[s],t,d,o,s,`[Item: ${s}]`,a));l.push({name:n||s,options:c,key:r,allowParentSelect:!0,dataType:"array"})}else if("object"===typeof e){const t=[];for(const s of Object.keys(e))t.push.apply(t,this.jsonDataToFilterOption(e[s],r,s,o,void 0,void 0,a));t.length&&l.push({name:n||s,options:this.sortOptions(t),key:r,allowParentSelect:!0,dataType:"object"})}else{if(void 0!==o&&-1===s.toLowerCase().indexOf(o))return l;this.getPathNormalized(a)!==this.getPathNormalized(r)&&l.push({name:s,key:r,value:e})}return l},getNodeOutputData(e,t,s,o=0,i=0,n="main",a=0){if(!e.hasOwnProperty(t))return null;if(e[t].length<=i)return null;if(!e[t][i].hasOwnProperty("data")||null===e[t][i].data||void 0===e[t][i].data)return null;if(!e[t][i].data.hasOwnProperty(n))return null;if(e[t][i].data[n].length<=a)return null;if(null===e[t][i].data[n][a]||e[t][i].data[n][a].length<=o)return null;const r=e[t][i].data[n][a][o],l=[];if(r.hasOwnProperty("json")){const e=[];for(const o of Object.keys(r.json))e.push.apply(e,this.jsonDataToFilterOption(r.json[o],`$node["${t}"].data`,o,s));e.length&&l.push({name:"JSON",options:this.sortOptions(e)})}if(r.hasOwnProperty("binary")){const e=[];let o=[];for(const i of Object.keys(r.binary)){o=[];for(const e in r.binary[i])"data"!==e&&(s&&-1===e.toLowerCase().indexOf(s)||o.push({name:e,key:`$node["${t}"].binary.${i}.${e}`,value:r.binary[i][e]}));o.length&&e.push({name:i,key:`$node["${t}"].binary.${i}`,options:this.sortOptions(o),allowParentSelect:!0})}e.length&&l.push({name:"Binary",key:`$node["${t}"].binary`,options:this.sortOptions(e),allowParentSelect:!0})}return l},getNodeContext(e,t,s,o,i){const a=0,r=0,l="main",d=0,c=[],u=this.connectionInputData(s,l,d,a);if(null===u)return c;const p=new n["WorkflowDataProxy"](e,t,d,r,o,u),h=p.getDataProxy(),m=h.$node[o].context;for(const n of Object.keys(m))void 0!==i&&-1===n.toLowerCase().indexOf(i)||c.push({name:n,key:`$node["${o}"].context["${n}"]`,value:m[n]});return c},getNodeParameters(e,t,s,o){const i=this.workflow.getNode(e);if(null===i)return null;const n=[];for(const a in i.parameters)a!==s&&(void 0!==o&&-1===a.toLowerCase().indexOf(o)||n.push.apply(n,this.jsonDataToFilterOption(i.parameters[a],t,a,o,void 0,void 0,s)));return n},getFilterResults(e,t){const s="main",o=this.$store.getters.activeNode;if(null===o)return[];const i=this.$store.getters.getWorkflowExecution;let n=this.workflow.getParentNodes(o.name,s,1),a=this.$store.getters.getWorkflowRunData;null===a&&(a={});let r=[];const l=[];let d,c;if(null!==i){const t=i.data;d=this.getNodeContext(this.workflow,t,n,o.name,e),d.length&&l.push({name:"Context",options:this.sortOptions(d)})}if(n.length){const s=this.workflow.getNodeConnectionOutputIndex(o.name,n[0],"main");c=this.getNodeOutputData(a,n[0],e,t,0,"main",s),c&&l.push({name:"Input Data",options:this.sortOptions(c)})}const u="$parameter";let p=this.path;p.startsWith("parameters.")&&(p=u+p.substring(10)),l.push({name:"Parameters",options:this.sortOptions(this.getNodeParameters(o.name,u,p,e))}),r.push({name:"Current Node",options:this.sortOptions(l)});const h=[];let m;const f=this.workflow.getParentNodes(o.name,s);for(const w of Object.keys(this.workflow.nodes))if(w!==o.name){if(m=[{name:"Parameters",options:this.sortOptions(this.getNodeParameters(w,`$node["${w}"].parameter`,void 0,e))}],null!==i){const t=i.data;n=this.workflow.getParentNodes(w,s,1),d=this.getNodeContext(this.workflow,t,n,w,e),d.length&&(m=[{name:"Context",options:this.sortOptions(d)}])}f.includes(w)&&(c=this.getNodeOutputData(a,w,e,t),c&&m.push({name:"Output Data",options:this.sortOptions(c)})),h.push({name:w,options:this.sortOptions(m)})}return r.push({name:"Nodes",options:this.sortOptions(h)}),r=this.removeEmptyEntries(r),null===r?[]:r}}}),M=L,j=(s("0579"),Object(h["a"])(M,A,S,!1,null,"f6ca0d68",null)),B=j.exports,F=l["default"].extend({name:"ExpressionEdit",props:["dialogVisible","parameter","path","value"],components:{ExpressionInput:T,VariableSelector:B},data(){return{}},methods:{valueChanged(e){this.$emit("valueChanged",e)},closeDialog(){return this.$emit("closeDialog"),!1},itemSelected(e){this.$refs.inputFieldExpression.itemSelected(e)}}}),U=F,z=(s("a7f3"),Object(h["a"])(U,w,g,!1,null,"d5db668e",null)),q=z.exports,J=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.dialogVisible?s("div",[s("el-dialog",{attrs:{visible:e.dialogVisible,"append-to-body":"",width:"80%",title:"Edit "+e.parameter.displayName,"before-close":e.closeDialog}},[s("div",{staticClass:"text-editor-wrapper ignore-key-press"},[s("div",{staticClass:"editor-description"},[e._v("\n\t\t\t\t"+e._s(e.parameter.displayName)+":\n\t\t\t")]),s("div",{staticClass:"text-editor",on:{keydown:[function(e){e.stopPropagation()},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closeDialog()}]}},[s("el-input",{ref:"inputField",attrs:{type:"textarea",value:e.value,placeholder:e.parameter.placeholder,rows:"15"},on:{change:e.valueChanged,keydown:function(t){return t.stopPropagation(),e.noOp(t)}}})],1)])])],1):e._e()},H=[],K=l["default"].extend({name:"TextEdit",props:["dialogVisible","parameter","value"],data(){return{}},methods:{valueChanged(e){this.$emit("valueChanged",e)},closeDialog(){return this.$emit("closeDialog"),!1}},watch:{dialogVisible(){!0===this.dialogVisible&&l["default"].nextTick(()=>{this.$refs.inputField.focus()})}}}),Y=K,G=(s("bf72"),Object(h["a"])(Y,J,H,!1,null,"2e5e4ef2",null)),Z=G.exports,X=s("4971"),Q=s("6fae"),ee=s("77f0"),te=Object(E["a"])(X["a"],Q["a"],ee["a"],N["a"]).extend({name:"ParameterInput",components:{CodeEdit:f,ExpressionEdit:q,PrismEditor:c.a,TextEdit:Z},props:["displayOptions","parameter","path","value","isCredential"],data(){return{codeEditDialogVisible:!1,nodeName:"",expressionAddOperation:"set",expressionEditDialogVisible:!1,remoteParameterOptions:[],remoteParameterOptionsLoading:!1,remoteParameterOptionsLoadingIssues:null,textEditDialogVisible:!1,tempValue:"",dateTimePickerOptions:{shortcuts:[{text:"Today",onClick(e){e.$emit("pick",new Date)}},{text:"Yesterday",onClick(e){const t=new Date;t.setTime(t.getTime()-864e5),e.$emit("pick",t)}},{text:"A week ago",onClick(e){const t=new Date;t.setTime(t.getTime()-6048e5),e.$emit("pick",t)}}]}}},watch:{value(){this.tempValue=this.displayValue}},computed:{node(){return!0===this.isCredential?null:this.$store.getters.activeNode},displayTitle(){let e=`Parameter: "${this.shortPath}"`;return this.getIssues.length?(e+=" has issues",!0===this.isValueExpression&&(e+=" and expression"),e+="!"):!0===this.isValueExpression&&(e+=" has expression"),e},displayValue(){if(null!==this.remoteParameterOptionsLoadingIssues)return"Error loading...";if(!0===this.remoteParameterOptionsLoading)return"Loading options...";let e;if(e=!1===this.isValueExpression?this.value:this.expressionValueComputed,void 0!==e&&"string"===this.parameter.type){const t=this.getArgument("rows");void 0!==t&&1!==t||(e=e.toString().replace(/\n/,"|"))}return e},displayOptionsComputed(){return!0!==this.isReadOnly&&("collection"!==this.parameter.type&&!0===this.displayOptions)},expressionValueComputed(){if(!0===this.isCredential||null===this.node)return null;let e;try{e=this.resolveExpression(this.value)}catch(t){e=`[ERROR: ${t.message}]`}return"number"===this.parameter.type&&(e=parseInt(e,10),isNaN(e))?null:e},getStringInputType(){if(!0===this.getArgument("password"))return"password";const e=this.getArgument("rows");return void 0!==e&&e>1?"textarea":"text"},getIssues(){if(!0===this.isCredential||null===this.node)return[];const e=this.shortPath.split(".");e.pop();const t=n["NodeHelpers"].getParameterIssues(this.parameter,this.node.parameters,e.join("."));if("options"===this.parameter.type&&!1===this.remoteParameterOptionsLoading&&null===this.remoteParameterOptionsLoadingIssues){const e=this.parameterOptions.map(e=>e.value);null!==this.displayValue&&e.includes(this.displayValue)||(void 0===t.parameters&&(t.parameters={}),t.parameters[this.parameter.name]=[`The value "${this.displayValue}" is not supported!`])}else null!==this.remoteParameterOptionsLoadingIssues&&(void 0===t.parameters&&(t.parameters={}),t.parameters[this.parameter.name]=[`There was a problem loading the parameter options from server: "${this.remoteParameterOptionsLoadingIssues}"`]);return void 0!==t&&void 0!==t.parameters&&void 0!==t.parameters[this.parameter.name]?t.parameters[this.parameter.name]:[]},isDefault(){return this.parameter.default===this.value},isEditor(){return"code"===this.getArgument("editor")},isValueExpression(){return!0!==this.parameter.noDataExpression&&("string"===typeof this.value&&"="===this.value.charAt(0))},parameterOptions(){return void 0===this.remoteMethod?this.parameter.options:this.remoteParameterOptions},parameterInputClasses(){const e=[];return this.isValueExpression&&e.push("expression"),this.getIssues.length&&e.push("has-issues"),e},parameterInputWrapperStyle(){let e=0;const t={width:"100%"};return!0===this.displayOptionsComputed&&(e+=25),this.getIssues.length&&(e+=20),0!==e&&(t.width=`calc(100% - ${e}px)`),t},remoteMethod(){return this.getArgument("loadOptionsMethod")},shortPath(){const e=this.path.split(".");return e.shift(),e.join(".")},workflow(){return this.getWorkflow()}},methods:{async loadRemoteParameterOptions(){if(null!==this.node&&void 0!==this.remoteMethod){this.remoteParameterOptionsLoadingIssues=null,this.remoteParameterOptionsLoading=!0,this.remoteParameterOptions.length=0;try{const e=await this.restApi().getNodeParameterOptions(this.node.type,this.remoteMethod,this.node.credentials);this.remoteParameterOptions.push.apply(this.remoteParameterOptions,e)}catch(e){this.remoteParameterOptionsLoadingIssues=e.message}this.remoteParameterOptionsLoading=!1}},closeCodeEditDialog(){this.codeEditDialogVisible=!1},closeExpressionEditDialog(){this.expressionEditDialogVisible=!1},closeTextEditDialog(){this.textEditDialogVisible=!1},displayEditDialog(){this.isEditor?this.codeEditDialogVisible=!0:this.textEditDialogVisible=!0},getArgument(e){if(void 0!==this.parameter.typeOptions&&void 0!==this.parameter.typeOptions[e])return this.parameter.typeOptions[e]},expressionUpdated(e){this.valueChanged(e)},setFocus(){!0!==this.isReadOnly&&(this.isValueExpression?this.expressionEditDialogVisible=!0:"string"===this.parameter.type&&this.getArgument("alwaysOpenEditWindow")?this.displayEditDialog():(null!==this.node&&(this.nodeName=this.node.name),setTimeout(()=>{this.$refs.inputField.focus()})))},valueChanged(e){e instanceof Date&&(e=e.toISOString());const t={node:null!==this.node?this.node.name:this.nodeName,name:this.path,value:e};this.$emit("valueChanged",t)},optionSelected(e){"resetValue"===e?this.valueChanged(this.parameter.default):"addExpression"===e?(this.valueChanged(`=${this.value}`),this.expressionEditDialogVisible=!0):"removeExpression"===e&&this.valueChanged(this.expressionValueComputed||null)}},mounted(){this.tempValue=this.displayValue,null!==this.node&&(this.nodeName=this.node.name),void 0!==this.remoteMethod&&null!==this.node&&this.$watch(()=>this.node.credentials,()=>{this.loadRemoteParameterOptions()},{deep:!0,immediate:!0})}}),se=te,oe=(s("f6a6"),s("847d"),Object(h["a"])(se,o,i,!1,null,"66aa807d",null));t["a"]=oe.exports},"8b51":function(e,t,s){},"8ccb":function(e,t,s){},"8fef":function(e,t,s){},"951b":function(e,t,s){},9700:function(e,t,s){},9760:function(e,t,s){},"9afe":function(e,t,s){},"9c90":function(e,t,s){},"9cf7":function(e,t,s){},a46f:function(e,t,s){"use strict";var o=s("0bf5"),i=s.n(o);i.a},a5bc:function(e,t,s){"use strict";var o=s("5270"),i=s.n(o);i.a},a6e8:function(e,t,s){},a7f3:function(e,t,s){"use strict";var o=s("0fc8"),i=s.n(o);i.a},ab7d:function(e,t,s){"use strict";var o=s("9760"),i=s.n(o);i.a},ae93:function(e,t,s){"use strict";var o=s("7a34"),i=s.n(o);i.a},b337:function(e,t,s){"use strict";var o=s("bc99"),i=s.n(o);i.a},b47e:function(e,t,s){"use strict";var o=s("6e05"),i=s.n(o);i.