UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 1.79 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","./users.store-legacy-OKuN0qAC.js","./constants-legacy-DNCca_FT.js"],(function(e,t){var r,i,n,s,a,d,l,u,c,o;return e("t",(function(){const e=l(),t=a(),f=s(),b=c(),y=u(),g=d(),C=n(),m=r(!1),w=i((()=>f.isAiCreditsEnabled)),p=i((()=>f.aiCreditsQuota)),h=i((()=>e.allCredentials.some((e=>e.type===o)))),A=i((()=>!!b.currentUser?.settings?.userClaimedAiCredits)),E=i((()=>w.value&&!h.value&&!A.value));return{isAiCreditsEnabled:w,aiCreditsQuota:p,userCanClaimOpenAiCredits:E,claimingCredits:m,claimCredits:async function(r){if(!E.value)return!1;m.value=!0;try{return await e.claimFreeAiCredits(t.currentProject?.id),b?.currentUser?.settings&&(b.currentUser.settings.userClaimedAiCredits=!0),y.track("User claimed OpenAI credits",{source:r}),!0}catch(i){return g.showError(i,C.baseText("freeAi.credits.showError.claim.title"),C.baseText("freeAi.credits.showError.claim.message")),!1}finally{m.value=!1}}}})),{setters:[function(e){r=e.Ft,i=e.S},function(e){n=e.bt},function(e){s=e.As,a=e.Ft,d=e.Tr,l=e.at,u=e.en,c=e.t},function(e){o=e.Lo}],execute:function(){try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(t=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5ccb8b39-6a5f-48a9-9d8f-b706615bae86",e._sentryDebugIdIdentifier="sentry-dbid-5ccb8b39-6a5f-48a9-9d8f-b706615bae86")}catch(e){}var e,t}}})); //# sourceMappingURL=useFreeAiCredits-legacy-CEp4XoS_.js.map