UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 3.19 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-IafOlCW8.js","./_MapCache-legacy-DwgdC8YO.js","./src-legacy-Dwzr7bD0.js","./_plugin-vue_export-helper-legacy-DEZAmQqp.js","./users.store-legacy-OKuN0qAC.js","./constants-legacy-DNCca_FT.js","./constants-legacy-iKNx7WD2.js","./chat.store-legacy-pzWGyzhB.js"],(function(e,t){var n,a,o,l,r,s,i,d,c,u,f,y,p,g,h,m,b,w,_,v,C,j,D,I,E,S,x,N,T,k,A;return e("n",(function(e){const t=o(!1),n=m(),a=g(),l=h(),s=c(D(e),{},{writeDefaults:!1,shallow:!0,serializer:{read:e=>{try{return A.parse(JSON.parse(e))}catch(t){return{}}},write:e=>JSON.stringify(e)}}),d=r((()=>t.value||n.allCredentials.length>0)),u=r((()=>Object.fromEntries(j.options.map((e=>{if(!T(e))return[e,null];const t=I[e];if(!t)return[e,null];const o=n.getCredentialsByType(t),l=a.moduleSettings?.["chat-hub"]?.providers[e];return l?.credentialId&&o.some((e=>e.id===l.credentialId))?[e,l.credentialId]:[e,o.toSorted(((e,t)=>+new Date(t.createdAt)-+new Date(e.createdAt)))[0]?.id??null]}))))),f=r((()=>d.value?j.options.reduce(((e,t)=>{const a=s.value[t]??null;return e[t]=a&&n.allCredentials.some((e=>e.id===a))?a:u.value[t],e}),{}):null));return i((()=>l.personalProject),(async e=>{e&&(await Promise.all([n.fetchCredentialTypes(!1),n.fetchAllCredentialsForWorkflow({projectId:e.id})]),t.value=!0)}),{immediate:!0}),{credentialsByProvider:f,selectCredential:function(e,t){s.value={...s.value,[e]:t}}}})),{setters:[function(e){n=e.$,a=e.E,o=e.Ft,l=e.N,r=e.S,s=e._n,i=e.gt,d=e.it},function(e){c=e.M,u=e.O},function(e){f=e.Ht,y=e._t},function(e){p=e.t},function(e){g=e.As,h=e.Ft,m=e.at,b=e.r},function(e){w=e.cs,_=e.di,v=e.ds,C=e.fi,j=e.hi,D=e.ic,I=e.li,E=e.ls,S=e.us},function(e){x=e.l},function(e){N=e.g,T=e.h}],execute:function(){(k=document.createElement("style")).textContent="._component_1txea_125{background-color:var(--color--background--light-2);flex-direction:column;align-items:stretch;width:100%;display:flex;overflow:hidden}\n/*$vite$:1*/",document.head.appendChild(k);try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(o=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="d288c0dc-3f1b-4fad-833f-5526a0ae8ecf",t._sentryDebugIdIdentifier="sentry-dbid-d288c0dc-3f1b-4fad-833f-5526a0ae8ecf")}catch(t){}var t,o;A=S(j,v().or(w())),e("r",C.and(E({cachedDisplayName:v().optional(),cachedIcon:_.optional()})).transform((e=>({...e,cachedDisplayName:e.cachedDisplayName||(N(e)?e.model:"")})))),e("t",p(l({__name:"ChatLayout",setup(e){const t=y(),o=b(),{isCtrlKeyPressed:l}=f();return u(document,"keydown",(e=>{"o"===e.key.toLowerCase()&&l(e)&&e.shiftKey&&!o.isAnyModalOpen&&(e.preventDefault(),e.stopPropagation(),t.push({name:x,force:!0}))})),(e,t)=>(n(),a("div",{class:s(e.$style.component)},[d(e.$slots,"default")],2))}}),[["__cssModules",{$style:{component:"_component_1txea_125"}}]]))}}})); //# sourceMappingURL=ChatLayout-legacy-Dhdxw-rO.js.map