nodal-agents 0.7.0 → 0.7.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/cli.js +335 -35
- package/migrations/0054_audit2_db_integrity.sql +52 -0
- package/migrations/0055_entity_settings.sql +22 -0
- package/migrations/0056_agents_skills_entity_scoped_unique.sql +23 -0
- package/migrations/0057_telegram_allowed_chats.sql +34 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +1 -1
- package/runner.js +47123 -35332
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +4 -4
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +3 -3
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -2
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/agents/page.js +2 -2
- package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page.js +2 -2
- package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
- package/web/.next/server/app/(dashboard)/automations/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page.js +2 -2
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page.js +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/jobs/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page.js +2 -2
- package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/learned-skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/learned-skills/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/learned-skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page.js +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/logs/page.js +2 -2
- package/web/.next/server/app/(dashboard)/logs/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page.js +2 -2
- package/web/.next/server/app/(dashboard)/mcp/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
- package/web/.next/server/app/(dashboard)/memories/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js +2 -2
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/settings/page.js +2 -2
- package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/settings/root-context/page.js +2 -2
- package/web/.next/server/app/(dashboard)/settings/root-context/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/settings/root-context/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
- package/web/.next/server/app/(dashboard)/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/server/app/api/auth/[...all]/route.js +1 -1
- package/web/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -1
- package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -1
- package/web/.next/server/app/api/oauth/[provider]/callback/route.js.nft.json +1 -1
- package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -1
- package/web/.next/server/app/api/oauth/[provider]/start/route.js.nft.json +1 -1
- package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding/page.js +205 -185
- package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app-paths-manifest.json +4 -4
- package/web/.next/server/chunks/2713.js +47 -27
- package/web/.next/server/chunks/3223.js +1 -1
- package/web/.next/server/chunks/4574.js +1 -1
- package/web/.next/server/chunks/5515.js +1 -0
- package/web/.next/server/chunks/6468.js +1 -0
- package/web/.next/server/chunks/8410.js +1 -0
- package/web/.next/server/chunks/{4488.js → 8810.js} +2 -2
- package/web/.next/server/chunks/{3154.js → 960.js} +10 -10
- package/web/.next/server/middleware-build-manifest.js +1 -1
- package/web/.next/server/pages/404.html +1 -1
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/4964-c6711d3d479b6085.js +1 -0
- package/web/.next/static/chunks/{9836-6830cb9d49ad261f.js → 9836-177f6ca2f15ff703.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-cfce874f4acede5e.js +6 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-9249c2839f551ba1.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/agents/page-7d784d737acedccf.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/approvals/{page-9a01cb723a6ccff0.js → page-b3a838ecbc94a030.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/page-b1b548de4f52696c.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/chat/{page-a6cc7a58986c0340.js → page-bcf6dcc73b370eb0.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/connectors/{page-21d6c042800c8cd3.js → page-2c6f913cc6aea4b7.js} +1 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-43f033251eddcc4b.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/jobs/page-1f892f950bb30403.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/layout-e184673151ff8a05.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-f873bb6f8539e47e.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-64adda30176f4ccb.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/logs/page-79cfd9141c39d8ef.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-d276d7bab25286a1.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/memories/page-c66720494a340503.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/page-3649204dd27a0ad0.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/page-1cab404d2eccfd80.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-b5898c5444f88c9a.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-82d91fc6b6acc161.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-58b5ed04583ca7d4.js +1 -0
- package/web/.next/static/chunks/app/(dashboard)/skills/page-312bd4ae8ddc8114.js +1 -0
- package/web/.next/static/chunks/app/onboarding/{page-a4116e2f430eaff8.js → page-f2f04878e81fdf23.js} +2 -2
- package/web/.next/static/css/{eff119dd24f92093.css → 4d808b91d7b58fce.css} +1 -1
- package/web/.next/server/chunks/4626.js +0 -1
- package/web/.next/server/chunks/8971.js +0 -1
- package/web/.next/server/chunks/9043.js +0 -1
- package/web/.next/static/chunks/4964-08171c654e41b0a4.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-fa5717f0d0450659.js +0 -6
- package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-73012222871598aa.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/agents/page-7e9616b28c098e9e.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/automations/page-85c985cd687406ed.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-f6b993a88c70a2fe.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/jobs/page-d0d6b9db1b68451f.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/layout-d2ac2646967496bb.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-ec6312f6dfd7ee23.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-1fb26463eddf509c.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/logs/page-0bca733315e8a208.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/mcp/page-ff56ecf2f65f5466.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/memories/page-fe4d9438c93750d6.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/page-9402fe2931216f4b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/page-995662f10ebff365.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-785b6ce3e4c5890b.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-2106201c4df8b5a4.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/new/page-0135bcb86ab60dc2.js +0 -1
- package/web/.next/static/chunks/app/(dashboard)/skills/page-54e939d40c8b5b6d.js +0 -1
- /package/web/.next/static/{KFac7DQ7gdp9XPQ2bnb-2 → SgnP_MouhUmw0bBf-lUmD}/_buildManifest.js +0 -0
- /package/web/.next/static/{KFac7DQ7gdp9XPQ2bnb-2 → SgnP_MouhUmw0bBf-lUmD}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=8410,exports.ids=[8410],exports.modules={7720:(a,b,c)=>{c.d(b,{m:()=>e,o:()=>d});let d={"google-oauth":{title:"Get your Google OAuth credentials",intro:"You need a Google Cloud project with the relevant APIs enabled.",steps:[{number:1,text:"Go to Google Cloud Console and create a new project (any name).",link:{href:"https://console.cloud.google.com/",label:"console.cloud.google.com"}},{number:2,text:"Enable each API your agents will use — click the links below, then hit Enable:",subLinks:[{href:"https://console.cloud.google.com/apis/library/drive.googleapis.com",label:"Drive API"},{href:"https://console.cloud.google.com/apis/library/gmail.googleapis.com",label:"Gmail API"},{href:"https://console.cloud.google.com/apis/library/sheets.googleapis.com",label:"Sheets API"},{href:"https://console.cloud.google.com/apis/library/docs.googleapis.com",label:"Docs API"},{href:"https://console.cloud.google.com/apis/library/calendar-json.googleapis.com",label:"Calendar API"}]},{number:3,text:"In the left menu, go to APIs & Services → OAuth consent screen. Choose User Type: External, fill in the app name, then add your own email as a Test user."},{number:4,text:"Go to APIs & Services → Credentials → Create credentials → OAuth client ID → Application type: Web application."},{number:5,text:"Under Authorized JavaScript origins, add the origin shown below the form."},{number:6,text:"Under Authorized redirect URIs, paste the redirect URI shown below the form. This step is mandatory — Google rejects the connection if it is missing or differs by even one character.",hint:"Most common cause of failure when trying to connect."},{number:7,text:"Click Create. A dialog shows your Client ID and Client secret. Copy both."},{number:8,text:"Paste them into the fields below."}],format:"Client ID ends with .apps.googleusercontent.com"},"notion-oauth":{title:"Get your Notion OAuth credentials",intro:"You need a Public integration — not an Internal one. The distinction matters.",steps:[{number:1,text:"Go to Notion integrations and click + New integration.",link:{href:"https://www.notion.so/my-integrations",label:"notion.so/my-integrations"}},{number:2,text:"Set Integration type to Public (not Internal — Internal tokens are single-workspace only and cannot do OAuth).",hint:'If you see no "Type" field, you are on the wrong page.'},{number:3,text:"Fill in a name and optional logo. Under Capabilities, check at minimum: Read content, Update content, Insert content."},{number:4,text:"In the OAuth Domain & URIs section, paste the redirect URI shown below the form. This step is mandatory — Notion rejects the connection if it is missing or differs by even one character.",hint:"Most common cause of failure when trying to connect."},{number:5,text:"Click Submit. On the integration page, open the Secrets tab."},{number:6,text:"Copy the OAuth client ID (a UUID) and the OAuth client secret."},{number:7,text:"Paste them into the fields below."}],format:"Client ID is a UUID. Secret starts with secret_"},"airtable-oauth":{title:"Get your Airtable OAuth credentials",warning:"Airtable only accepts localhost or an HTTPS redirect URI — raw LAN IPs (e.g. 192.168.x.x) are rejected. Open the dashboard at http://localhost:3000 just for this flow. The resulting credential works from any host afterwards.",warningWhen:"lan-ip-only",steps:[{number:1,text:"Go to the Airtable OAuth integration page and click Register new OAuth integration.",link:{href:"https://airtable.com/create/oauth",label:"airtable.com/create/oauth"}},{number:2,text:"Give it a name (e.g. Nodal-Agents)."},{number:3,text:"In the Redirect URIs section, paste the redirect URI shown below the form. This step is mandatory — Airtable rejects the connection if it is missing or differs by even one character.",hint:"Most common cause of failure when trying to connect."},{number:4,text:"In the Scopes section, check the four scopes: data.records:read, data.records:write, schema.bases:read, schema.bases:write — then save / update the integration so the scopes are persisted.",hint:'If the scopes are not saved, Airtable returns "invalid_scope" during the OAuth flow.'},{number:5,text:"Click Register integration (or Save changes if editing an existing one)."},{number:6,text:"On the integration detail page, copy the Client ID and Client secret."},{number:7,text:"Paste them into the fields below."}],format:"Client ID is a UUID. Secret is longer."}},e={notion:{title:"Get your Notion Internal Integration Token",intro:"This is the Internal integration flow — single workspace, no OAuth redirect. Different from the Notion OAuth credential.",steps:[{number:1,text:"Go to Notion integrations and click + New integration.",link:{href:"https://www.notion.so/my-integrations",label:"notion.so/my-integrations"}},{number:2,text:"Set Integration type to Internal (not Public). Select your workspace."},{number:3,text:"Under Capabilities, check at minimum: Read content, Update content, Insert content."},{number:4,text:"Click Submit. On the integration page, open the Secrets tab and copy the Internal Integration Token."},{number:5,text:"Important: for each Notion page the agent should access, open the page, click the \xb7\xb7\xb7 menu → Connections → select your integration name.",hint:'Without this step the agent gets "object not found" errors.'}],format:"Token starts with secret_"},airtable:{title:"Get your Airtable Personal Access Token",steps:[{number:1,text:"Go to the Airtable token creation page and click Create new token.",link:{href:"https://airtable.com/create/tokens",label:"airtable.com/create/tokens"}},{number:2,text:"Give it a name. Under Scopes, add at minimum: data.records:read, data.records:write, schema.bases:read."},{number:3,text:"Under Access, choose the specific bases to expose or select All workspaces."},{number:4,text:"Click Create token and copy the value immediately — Airtable hides it after you close the dialog."}],format:"Token starts with pat"},apify:{title:"Get your Apify API token",steps:[{number:1,text:"Go to the Apify integrations page.",link:{href:"https://console.apify.com/account/integrations",label:"console.apify.com/account/integrations"}},{number:2,text:"Under API tokens, either copy the default Personal API token or click Create new token to generate a dedicated one."},{number:3,text:"Paste the token into the field below."}],format:"Token starts with apify_api_"},firecrawl:{title:"Get your Firecrawl API key",steps:[{number:1,text:"Go to your Firecrawl account page and navigate to API Keys.",link:{href:"https://www.firecrawl.dev/account",label:"firecrawl.dev/account"}},{number:2,text:"Copy your existing key or click to generate a new one, then paste it below."}],format:"Key starts with fc-"},tavily:{title:"Get your Tavily API key",steps:[{number:1,text:"Go to the Tavily app and open the API section.",link:{href:"https://app.tavily.com/",label:"app.tavily.com"}},{number:2,text:"Copy your API key and paste it below."}],format:"Key starts with tvly-"}}},22435:(a,b,c)=>{c.d(b,{A:()=>m});var d=c(10476),e=c(64565),f=c(82945),g=c(83433);let h=e.forwardRef((a,b)=>e.createElement(f.A,{ref:b,...a,weights:g.A}));h.displayName="CheckCircleIcon";var i=c(75683),j=c(44100);let k={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},l={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function m({variant:a,label:b,icon:c,className:e=""}){let f=b??k[a],g=null;return void 0!==c?g=c:"done"===a?g=(0,d.jsx)(h,{size:11,weight:"regular"}):"warn"===a?g=(0,d.jsx)(i.N,{size:11,weight:"regular"}):"run"===a&&(g=(0,d.jsx)(j.A,{variant:"blue",size:"sm"})),(0,d.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-[12px] font-medium leading-none ${l[a]} ${e}`,children:[g,f]})}},25568:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(10476),e=c(64565),f=c(63200);let g=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M76,64A12,12,0,0,1,88,52H216a12,12,0,0,1,0,24H88A12,12,0,0,1,76,64Zm140,52H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Zm0,64H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM44,112a16,16,0,1,0,16,16A16,16,0,0,0,44,112Zm0-64A16,16,0,1,0,60,64,16,16,0,0,0,44,48Zm0,128a16,16,0,1,0,16,16A16,16,0,0,0,44,176Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,64V192H88V64Z",opacity:"0.2"}),e.createElement("path",{d:"M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM68,188a12,12,0,1,1,12-12A12,12,0,0,1,68,188Zm0-48a12,12,0,1,1,12-12A12,12,0,0,1,68,140Zm0-48A12,12,0,1,1,80,80,12,12,0,0,1,68,92Zm124,92H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M82,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H88A6,6,0,0,1,82,64Zm134,58H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Zm0,64H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12ZM44,54A10,10,0,1,0,54,64,10,10,0,0,0,44,54Zm0,128a10,10,0,1,0,10,10A10,10,0,0,0,44,182Zm0-64a10,10,0,1,0,10,10A10,10,0,0,0,44,118Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M84,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H88A4,4,0,0,1,84,64Zm132,60H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Zm0,64H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8ZM44,120a8,8,0,1,0,8,8A8,8,0,0,0,44,120Zm0-64a8,8,0,1,0,8,8A8,8,0,0,0,44,56Zm0,128a8,8,0,1,0,8,8A8,8,0,0,0,44,184Z"}))]]),h=e.forwardRef((a,b)=>e.createElement(f.A,{ref:b,...a,weights:g}));function i({items:a,noun:b}){let c=a.length;return(0,d.jsxs)("span",{title:a.join("\n"),className:"inline-flex cursor-help items-center gap-1.5 rounded-md border border-rule-2 bg-hover px-2 py-1 font-mono text-[11px] whitespace-nowrap text-ink-2",children:[(0,d.jsx)(h,{size:12,weight:"bold",className:"text-ink-4"}),c," ",b,1!==c?"s":""]})}h.displayName="ListBulletsIcon"},28881:(a,b,c)=>{c.d(b,{Av:()=>q,Bs:()=>p,DF:()=>u,FT:()=>o,Gw:()=>s,Jh:()=>r,_E:()=>t});var d=c(43607),e=c(87388),f=c(69747),g=c(98472),h=c(61989),i=c(95488),j=c(57638),k=c(66402);function l(a){return{ok:!0,data:a}}function m(a,b){return{ok:!1,code:a,message:b}}async function n(){let a,b=(0,i.Iz)();try{let b=await (0,k.headers)();a=new Request("http://localhost/",{headers:b})}catch{a=new Request("http://localhost/")}return(0,j.oC)(a,b)}async function o(a){try{let b=await n(),c=(0,i.Lf)(),d=await c.select().from(f.z3).where((0,f.eq)(f.z3.ownerUserId,b.userId)),e=void 0!==a?d.filter(b=>b.type===a):d,g=await Promise.all(e.map(async a=>{let b=null,d=null,e=null,g=null;try{let g=await (0,f.G0)(c,a.id);g&&(b=g.payload.accountName??null,d=g.payload.expiresAt?new Date(g.payload.expiresAt):null,e=g.payload.scopes??null)}catch(a){g=a instanceof Error?a.message:"decrypt_failed"}let h=(await c.select({id:f.tK.id,slug:f.tK.slug}).from(f.tK).where((0,f.eq)(f.tK.credentialId,a.id))).map(a=>({connectorSlug:a.slug,connectorId:a.id}));return{id:a.id,name:a.name,type:a.type,accountName:b,expiresAt:d,scopes:e,inUseBy:h,createdAt:a.createdAt,updatedAt:a.updatedAt,decryptError:g}}));return l(g)}catch(a){return console.error("[listCredentialsAction]",a),m("db_error","Failed to load credentials")}}async function p(a){try{let b=await n();if(!h.Yj().guid().safeParse(a).success)return m("validation_failed","Invalid credential id");let c=(0,i.Lf)(),[d]=await c.select({id:f.z3.id,ownerUserId:f.z3.ownerUserId}).from(f.z3).where((0,f.eq)(f.z3.id,a));if(!d)return m("not_found","Credential not found");if(d.ownerUserId!==b.userId)return m("forbidden","Access denied");let g=(await c.select({id:f.tK.id}).from(f.tK).where((0,f.eq)(f.tK.credentialId,a))).length;return await c.delete(f.z3).where((0,f.eq)(f.z3.id,a)),(0,e.revalidatePath)("/credentials"),(0,e.revalidatePath)("/connectors"),l({disconnected:g})}catch(a){return console.error("[deleteCredentialAction]",a),m("db_error","Failed to delete credential")}}async function q(a,b){try{let c=await n();if(!h.Yj().guid().safeParse(a).success)return m("validation_failed","Invalid credential id");let d=b.trim();if(0===d.length||d.length>120)return m("validation_failed","Name must be 1–120 characters");let g=(0,i.Lf)(),[j]=await g.select({id:f.z3.id,ownerUserId:f.z3.ownerUserId}).from(f.z3).where((0,f.eq)(f.z3.id,a));if(!j)return m("not_found","Credential not found");if(j.ownerUserId!==c.userId)return m("forbidden","Access denied");return await g.update(f.z3).set({name:d,updatedAt:new Date}).where((0,f.eq)(f.z3.id,a)),(0,e.revalidatePath)("/credentials"),l(void 0)}catch(a){return console.error("[renameCredentialAction]",a),m("db_error","Failed to rename credential")}}async function r(a){try{let b=await n();if(!h.Yj().guid().safeParse(a).success)return m("validation_failed","Invalid credential id");let c=(0,i.Lf)(),[d]=await c.select({id:f.z3.id,ownerUserId:f.z3.ownerUserId}).from(f.z3).where((0,f.eq)(f.z3.id,a));if(!d)return m("not_found","Credential not found");if(d.ownerUserId!==b.userId)return m("forbidden","Access denied");let{expiresAt:g}=await (0,f.Ic)(c,a);return(0,e.revalidatePath)("/credentials"),l({expiresAt:g})}catch(b){let a=b instanceof Error?b.message:String(b);if(console.error("[refreshCredentialAction]",b),a.includes("does not support token refresh"))return m("oauth_no_refresh","This provider does not support token refresh");if(a.includes("missing refreshToken"))return m("missing_refresh_token","Credential is missing refresh token");return m("refresh_failed",`Token refresh failed: ${a}`)}}async function s(a){return(0,f.Se)((0,i.Lf)(),a)}async function t(a){return(0,f.Ic)((0,i.Lf)(),a)}async function u(a){let{ownerUserId:b,credentialType:c,name:d,payload:h}=a,j=(0,i.Lf)(),k=JSON.stringify(h),l=(0,g.ph)(k)?k:(0,g.w)(k),[m]=await j.insert(f.z3).values({ownerUserId:b,name:d,type:c,payload:l}).returning({id:f.z3.id});if(!m)throw Error("persistCredentialFromOauthFlow: insert returned no row");return(0,e.revalidatePath)("/credentials"),{id:m.id}}(0,c(75749).D)([o,p,q,r,s,t,u]),(0,d.A)(o,"40f7f20ef58d6639660c1ef4d0843b967617801444",null),(0,d.A)(p,"40fba692a4465f02e2f1a9090a4283354b126f7516",null),(0,d.A)(q,"6044e2d187ad19af5c53f0d8b0bcf6898813bb714b",null),(0,d.A)(r,"409ce43bdc500b9e9ab0809e2b6bb4bc2a6301e697",null),(0,d.A)(s,"40e17b303adf0043228000498c4ef40334ce2cdfd1",null),(0,d.A)(t,"40be75cfd4eeda487cc874b3a7890c0fadb4caeeca",null),(0,d.A)(u,"404d36c9e04eca75c66bedf3e46a4522fab292a189",null)},46022:(a,b,c)=>{c.r(b),c.d(b,{"0006e0dbfdc234858c268c627610f0329c6c8fdd31":()=>d.oA,"000751b498462554b2253bd39a508b194ca2bcc9fb":()=>d.Hy,"0015ae9570da3865f6182796ac321d0c45ba4c11b1":()=>d.$5,"002615fdcb7d91d4b4aeb800e9e203cc2661e1ed50":()=>d.pD,"0027ed0d23cffc13987606629752e123c0419f928c":()=>d.Ql,"004e8a15bf57c7045676e9ed99ef1d52c4a2e5c8d3":()=>d.cj,"00759604b38bbd9c787808baa84fcb4704e68d1c9f":()=>d.dS,"0080ca0ff13028732fdad90d5fbb2c46e10bbef42f":()=>d.Le,"008308c354a66e185a22d5acd4abaaf2ca409c7b6b":()=>d.GY,"008359dc21a48b756aebca6da88725f8d096c7486d":()=>d.Hu,"008792842917a0ae82f0ebca55cd41388af5c575ca":()=>d.JD,"008f846ebcf095d9e7e0368c21f0eaa8f9d602c0b1":()=>d.dO,"00998b155b03c18d894b6a187414dc00e46d952d9b":()=>d.jj,"00ac1f9144714e1b471c7d1c2d94d5024eb7f33814":()=>d.WD,"00b078241e200d030c387c79c4ab253df9c0fd19be":()=>d.bm,"00b9e853a3b08e82eca38f7a88cdc3ace7462ac143":()=>d.aG,"00bdc716a17646937e3e8a462f84d00cd07748d79d":()=>d.$z,"00d33931c0c5dbdce2c7cee39806c32bf98e20f8e3":()=>d.M3,"00d3f492cc13d1b35154112e51b975d90d58cb4c49":()=>d.Ko,"00d7178e544dccd4c780f71d3f8c6afa8a6aac8b86":()=>d.BO,"00ee92d4822efcc12364fd6f2b3fe4f03cb3e28c6e":()=>d.Zz,"00f1ef002f17a474f7a5a639159f2f208a67ab2fa7":()=>d.zh,"00f4b3acc107dcaff1c41e8f9d5b8145ac214f6379":()=>d.VZ,"00f59a0a74f98b5dec9ee1b4919a0a36e24ddccc97":()=>d.$4,"00fbc0f1e65e50d169bbf9ac697d5562cd1c92f5f1":()=>d.oG,"4002675d03f3a3ae308ea587d0af754f6ab2e91f03":()=>d.Sb,"40029d917e83102fc3fe53281772f0f4a67f3c8121":()=>d.fl,"4003c74e787eefda9053935e5d1f775934854ae3d5":()=>d.eP,"4004d900812277dfba594d33d54f4bfdb0d3986eda":()=>d.tS,"4008c000999cf72aefcb5c8821c0acad202099e26d":()=>d.cr,"4009043fe3667452d655983efe24a58679ba4a9c5c":()=>d.V8,"40128f20f2ebad81a526ad80d118b79904c93a3ec1":()=>d.hP,"4014bd701c0f15e956509e9b94a3773aadc29993d8":()=>d.hl,"40162a1eb76527101e735f9d5484ad419dadd50c09":()=>d.WH,"40187c68935817bc3ca7069ea3ef7f599be2644413":()=>d.rf,"401be6c3dc2139cceef264fd9521c8cfd73ae69b6d":()=>d._N,"401d9e22abc121ee3854dfdd6f8b3881807361c111":()=>d.c6,"40224a127742dd27b8bd9a9f77616ee50a4611a1d3":()=>d.PH,"402bf7efe6704b07e40114c7156ffbdf3f36848af8":()=>d.rv,"4036c45eb854bbde9ee06cf9db8d3754b3a08030de":()=>d.f_,"40397bed6f0cf2b3ba461e8e47ec7d4b6880ea452c":()=>d.D5,"403e6f7012baeb1cecd9d665de6d4a1cc7e52639b5":()=>d.Jb,"403f1c1da0489dadeb23050c8464c4d6cd873eb68c":()=>d.mJ,"403f71242c58eb91cbd4e5daef29d6bee071ec7e65":()=>d.JH,"4040cdc83e064cf466b5651d61a94b596e4b1741d8":()=>d.iu,"4041595d19f3f1f860fb51f915107b308f211e7516":()=>d.HO,"404ac94514d8619417640c43b3416a82ac42f252e5":()=>d.bN,"404ce25817920f99b2ecef8b96edb7521996e7cbb7":()=>d.Hq,"404d36c9e04eca75c66bedf3e46a4522fab292a189":()=>e.DF,"4054e0a82931897c7444f29711df8d4fda90fca470":()=>d.p5,"405714e3103acb8a86e8816a240e218d68c7bfe422":()=>d.CV,"40579337f2db185bdba19b691873fd80639183b430":()=>d.Ke,"405f3f64d0928dbf53df29e0f06104453025aa12fc":()=>d.bV,"40615f213887f9542e1d99817aa9e634dee85d1517":()=>d.UR,"4067b8ff4a00c2c92f2464e1cc7503fd9e22837eed":()=>d.Ir,"40691a0da2455c343c08f1395b3001a5dc40b8c2c8":()=>d.Yn,"4075af73aa89f327c28ef069aac4ff7be1e2b63a32":()=>d.lV,"40764e883ec0f0fc9e62e8154b0203023b0fc461b6":()=>d.Ro,"407703881b3cf4b39e3edb49fca9ee78486a4bfcb0":()=>d.AS,"40775b88cd24ee89c2e071391a9f7165c8a8d2b4d4":()=>d.ei,"407c0c65975bbce8f37884b7f13cbd9fc7d01702a6":()=>d.Og,"407f838ed1b5c8e36d9f0c2eaed5a3c3ef94106658":()=>d.KI,"408767e7dac33bd3ed8d4ab7a476d8cf70f18647f1":()=>d.xV,"408872bb8e87536ed63b8d60709ebea31f43f3c5b9":()=>d.iU,"4089229c3681af8ee5b66adb4c5d84e2fdb41eae0c":()=>d.Ev,"408df2b11931bbea4429c0a7c374cb7ade9635b895":()=>d.fG,"40910fd72ca0e8a4e413c0afb4b1cd57b5c2624578":()=>d.E4,"409319a7daeda40da84e77b6cc2ee79b1fa59a9efe":()=>d.Hl,"4097f6d231fec2cd16168a9412d1b68b03b108fe6a":()=>d.By,"40992882c713d264ddf42d592c84758ef5aebbaab4":()=>d.pu,"4099860aad72be08a9a28709f8a1ff32eb1736bccd":()=>d.lg,"409ce43bdc500b9e9ab0809e2b6bb4bc2a6301e697":()=>e.Jh,"409d9ec32f7e1c54762a2011af3c146357ca3045f5":()=>d.y4,"40a4519096db6470bb8434ac9e0b4b0d613af322bf":()=>d.LW,"40a92bc888d4c445e1f60ac74f0471b491e956600a":()=>d.Mo,"40ae693984abe2a327713b38a1c552f6df8ea1678b":()=>d.Wq,"40b0dab57a7e20d815a98e4317d947938102ca135b":()=>d.Rz,"40b125044576bba9d9b7d3d50455d2bfeaf7d8d5c5":()=>d.TD,"40b1e80a920ce475113b5fbce89c2494f0599c0318":()=>d.LN,"40b3d13f005d24eea4365d4a94bc32903b9b6c8eca":()=>d.kh,"40b949d58bd22598ed8f044c517eff538334a851c4":()=>d.S2,"40bc8c931f255353d02b3da6c94d343913bf6abb93":()=>d.gE,"40bdd006a671068473e215a769137c1ca068a3ddc3":()=>d.EA,"40be75cfd4eeda487cc874b3a7890c0fadb4caeeca":()=>e._E,"40c045237abd8e76436e9e8325969420a35178193e":()=>d.PD,"40c68523e4e2ba8b528d870b342dec12f542eb2fc5":()=>d.t3,"40cc515a6f0f6f3bdb9607287ae9531189c0ba1541":()=>d.Sh,"40d1e415eaf83dc3c586859635bfd0b4270a5004dd":()=>d.ZA,"40d79a9807a2a1bf294e36679f7b21e569893ff1ed":()=>d.FS,"40d912a4ab8fa1fff5a87cd3963ced9894de782dca":()=>d.rT,"40da2054f7dd1ff77d7eecb4a99030f358b09de707":()=>d._x,"40dafedcea4cd0ff41c2249fe35a33e569de082bdf":()=>d.fI,"40dcd921ca377eaff29d59be1d9bc43007b1e02f1c":()=>d.ML,"40de30a334259c82d756d3eb017a4a0d9402d86a91":()=>d.wI,"40de550eeec76905aec0e7d9e27c6051cf0a1470a9":()=>d.oC,"40df123f9b04c75f024f545f011643493659139a2b":()=>d.P7,"40e0c52dbe75d74f05eb90f5bcc786897231dbd120":()=>d.ND,"40e17b303adf0043228000498c4ef40334ce2cdfd1":()=>e.Gw,"40e6a7206a7a446219e1f72fe24b89fd18ee5f934a":()=>d.Hp,"40ebfa73d6ce5a7253441b08f876b0b93adee4c088":()=>d.e4,"40ee1dadf791a661179a364ced1053a3313c55a4eb":()=>d.Cy,"40eeb9b47eb311c660cb25084dd9dc26dda27b2bba":()=>d.ZG,"40ef217aa9916f074c45a6a7ebe489ade1058eb9ca":()=>d.QT,"40efec73e82f9575e8c7b168dfd02783dc30fe5542":()=>d.X1,"40f7f20ef58d6639660c1ef4d0843b967617801444":()=>e.FT,"40f90dbe85669e942896299b5163c991a0d5a83074":()=>d.cu,"40fa2dd4614f470d5da133f1c77a10d6774e3ab5b6":()=>d.g$,"40fba692a4465f02e2f1a9090a4283354b126f7516":()=>e.Bs,"602640429aa4ac0a169cdf4402a1e8acd3d3732ca7":()=>d.yU,"6044e2d187ad19af5c53f0d8b0bcf6898813bb714b":()=>e.Av,"6045090ad49d14ab85eab9c1de89827d7afe35aefb":()=>d.PC,"605016142997a33fe2b55107bc8a0400d3411529db":()=>d.dl,"605f7c75a0f45cae6282b52dcfe1bdf75a30089259":()=>d.vu,"606749fb478e59a9e4e327a2ff59b70482c1aef5f3":()=>d.qo,"606f68ac7973f9937b88d803329807fa4ae7c03ef7":()=>d.f2,"607a4e0fe270514e93af4dfa107b07c6e3fc451d55":()=>d.Ru,"60a6e6cd4b637a67c313c7570fc509b1d67ab4d576":()=>d.c2,"60a9a3db66df96af1bd3ce53ead612aa36c980fec0":()=>d.dd,"60cadb5ce28b559a8f145eec69f118015a83c5022d":()=>d.cD,"70590053974fb747b319578c031c5c846d9e2fc371":()=>d.Oc,"706d110d48e1718ed892cc0d5ae420c8d18a6cde6e":()=>d.z_,"70c7a8a1269734b871d26b7d12a6f4049a7202c2ed":()=>d.Jc,"70e3d92f9d3f3db7bb5de1894c29d0576420aeee94":()=>d.ch,"783b8b1ba4b89453f1cf1064c34a8453b8c45c7f7f":()=>d.wj,"78f711f46e63ddd4787714f658f99b4aa34eb4c229":()=>d.AH});var d=c(63245),e=c(28881)},60968:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(10476),e=c(64565);function f({guide:a}){let[b,c]=(0,e.useState)(!1);return(0,d.jsxs)("div",{className:"space-y-3",children:[a.intro&&(0,d.jsx)("p",{className:"text-xs text-ink-3 italic",children:a.intro}),b&&a.warning&&(0,d.jsxs)("div",{role:"note",className:"flex gap-2 rounded-md border border-warn/30 bg-warn px-3 py-2 text-xs text-warn",children:[(0,d.jsx)("span",{"aria-hidden":"true",className:"font-bold",children:"!"}),(0,d.jsx)("span",{children:a.warning})]}),(0,d.jsx)("ol",{className:"space-y-2.5",children:a.steps.map(a=>(0,d.jsxs)("li",{className:"flex gap-2",children:[(0,d.jsx)("span",{className:"shrink-0 w-5 h-5 rounded-full bg-hover text-ink-3 text-[11px] font-bold flex items-center justify-center mt-0.5",children:a.number}),(0,d.jsxs)("div",{className:"space-y-1.5 text-sm text-ink-3",children:[(0,d.jsxs)("span",{children:[a.text,a.link&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)("a",{href:a.link.href,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline",children:a.link.label})]})]}),a.subLinks&&a.subLinks.length>0&&(0,d.jsx)("ul",{className:"mt-1 space-y-1 pl-1",children:a.subLinks.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-1.5 text-xs",children:[(0,d.jsx)("span",{className:"text-ink-4",children:"•"}),(0,d.jsx)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline",children:a.label})]},a.href))}),a.hint&&(0,d.jsx)("p",{className:"text-xs text-ink-3 italic",children:a.hint})]})]},a.number))}),a.format&&(0,d.jsxs)("p",{className:"text-xs text-ink-3",children:["Format: ",(0,d.jsx)("code",{className:"font-mono text-ink-3",children:a.format})]})]})}},63364:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(10476),e=c(64565),f=c(90424),g=c(60968),h=c(7720);let i={"google-oauth":{label:"Google",callbackPath:"/api/oauth/google-oauth/callback",namePlaceholder:"Mon Google perso",clientIdLabel:"Client ID",clientSecretLabel:"Client secret"},"notion-oauth":{label:"Notion",callbackPath:"/api/oauth/notion-oauth/callback",namePlaceholder:"Mon Notion",clientIdLabel:"OAuth client ID",clientSecretLabel:"OAuth client secret"},"airtable-oauth":{label:"Airtable",callbackPath:"/api/oauth/airtable-oauth/callback",namePlaceholder:"Mon Airtable",clientIdLabel:"Client ID",clientSecretLabel:"Client secret"}},j=[{type:"google-oauth",label:"Google Workspace",description:"Drive, Gmail, Sheets, Docs"},{type:"notion-oauth",label:"Notion",description:"Public OAuth integration"},{type:"airtable-oauth",label:"Airtable",description:"Public OAuth integration"}];function k({initialType:a,returnToConnectorSlug:b,onClose:c}){let[l,m]=(0,e.useState)(a?"setup":"type"),[n,o]=(0,e.useState)(a??null),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(!1),t=(0,e.useRef)(null),u=n?i[n]:null,v=b?`/connectors?connectorSlug=${b}`:"/credentials",w=n?`/api/oauth/${n}/start`:"#";return r?(0,f.createPortal)((0,d.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"wizard-title",className:"fixed inset-0 z-50 flex items-center justify-center px-4",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:c,"aria-hidden":"true"}),(0,d.jsxs)("div",{className:"relative bg-paper border border-rule-2 rounded-xl w-full max-w-lg shadow-2xl flex flex-col max-h-[90vh]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-rule-2 shrink-0",children:[(0,d.jsx)("h2",{id:"wizard-title",className:"text-base font-semibold text-ink",children:"type"===l?"New credential":u?`Configure ${u.label} credential`:"Configure credential"}),(0,d.jsx)("button",{type:"button",onClick:c,className:"text-ink-3 hover:text-ink transition-colors text-xl leading-none","aria-label":"Close",children:"\xd7"})]}),"type"===l&&(0,d.jsxs)("div",{className:"overflow-y-auto px-6 py-5 space-y-3",children:[(0,d.jsx)("p",{className:"text-sm text-ink-3",children:"Choose the OAuth provider to connect to Nodal-Agents."}),(0,d.jsx)("div",{className:"space-y-2",children:j.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>{o(a.type),m("setup")},className:"w-full text-left px-4 py-3 rounded-lg border border-rule-2 hover:border-rule hover:bg-hover transition-colors group",children:[(0,d.jsx)("div",{className:"text-sm font-semibold text-ink group-hover:text-ink",children:a.label}),(0,d.jsx)("div",{className:"text-xs text-ink-3 mt-0.5",children:a.description})]},a.type))}),(0,d.jsx)("div",{className:"pt-2 flex justify-end",children:(0,d.jsx)("button",{type:"button",onClick:c,className:"px-4 py-2 text-sm font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink",children:"Cancel"})})]}),"setup"===l&&u&&n&&(0,d.jsxs)("form",{ref:t,method:"POST",action:w,encType:"application/x-www-form-urlencoded",className:"overflow-y-auto px-6 py-5 space-y-5",children:[(0,d.jsx)("input",{type:"hidden",name:"returnTo",value:v}),(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)("p",{className:"text-xs text-ink-3 font-semibold uppercase tracking-wider",children:"Setup instructions"}),(0,d.jsx)(g.A,{guide:h.o[n]})]}),(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("p",{className:"text-xs text-ink-3",children:"Authorized redirect URI"}),(0,d.jsxs)("div",{className:"flex items-center gap-2 bg-hover border border-rule rounded-md px-3 py-2",children:[(0,d.jsx)("code",{className:"text-xs text-ink-2 font-mono flex-1 break-all",children:p||"…"}),(0,d.jsx)("button",{type:"button",onClick:function(){p&&navigator.clipboard.writeText(p).then(()=>{})},className:"shrink-0 px-2 py-0.5 text-xs font-medium border border-rule text-ink-3 rounded hover:border-ink-3 hover:text-ink transition-colors",children:"Copy"})]})]}),(0,d.jsxs)("div",{className:"space-y-3 border-t border-rule-2 pt-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-xs text-ink-3 mb-1",children:["Display name ",(0,d.jsx)("span",{className:"text-ink-4",children:"(optional)"})]}),(0,d.jsx)("input",{name:"name",placeholder:u.namePlaceholder,className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink placeholder:text-ink-4 focus:border-ink-3 focus:outline-none"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-xs text-ink-3 mb-1",children:u.clientIdLabel}),(0,d.jsx)("input",{name:"clientId",required:!0,autoComplete:"off",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none font-mono"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-xs text-ink-3 mb-1",children:u.clientSecretLabel}),(0,d.jsx)("input",{name:"clientSecret",type:"password",required:!0,autoComplete:"off",className:"w-full bg-hover border border-rule rounded-md px-2 py-1.5 text-sm text-ink focus:border-ink-3 focus:outline-none font-mono"})]})]}),(0,d.jsxs)("div",{className:"flex gap-2 justify-end pt-1",children:[(0,d.jsx)("button",{type:"button",onClick:c,className:"px-4 py-2 text-sm font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink",children:"Cancel"}),!a&&(0,d.jsx)("button",{type:"button",onClick:()=>m("type"),className:"px-4 py-2 text-sm font-medium border border-rule-2 text-ink-3 rounded-md hover:border-rule hover:text-ink",children:"Back"}),(0,d.jsxs)("button",{type:"submit",className:"px-4 py-2 text-sm font-semibold bg-ink text-canvas rounded-md hover:brightness-[0.92]",children:["Continue with ",u.label]})]})]})]})]}),document.body):null}},75683:(a,b,c)=>{c.d(b,{N:()=>h});var d=c(64565),e=c(82945),f=c(35617);let g=d.forwardRef((a,b)=>d.createElement(e.A,{ref:b,...a,weights:f.A}));g.displayName="WarningIcon";let h=g},82945:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(64565);let e=d.forwardRef((a,b)=>{let{alt:c,color:e="currentColor",size:f="1em",weight:g="regular",mirrored:h=!1,children:i,weights:j,...k}=a;return d.createElement("svg",{ref:b,xmlns:"http://www.w3.org/2000/svg",width:f,height:f,fill:e,viewBox:"0 0 256 256",transform:h?"scale(-1, 1)":void 0,...k},!!c&&d.createElement("title",null,c),i,j.get(g))});e.displayName="SSRBase"}};
|