@ai-development-environment/server 0.0.35 → 0.0.36
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/package.json +1 -1
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/build-manifest.json +3 -3
- package/standalone/.next/prerender-manifest.json +3 -3
- package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/analytics-events/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/console-logs/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/devices/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/devices/enroll/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/devices/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/provisioning-profiles/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/push-notifications/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/unified-events/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/_global-error.html +1 -1
- package/standalone/.next/server/app/_global-error.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v12ijp._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_012q7w6._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_07qmjrj._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_0dquba3._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_0t2jwg3._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1bzibio._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1h1k5ja._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1kle1nm._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1m50niy._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1pja493._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1y98hs-._.js +1 -1
- package/standalone/.next/server/chunks/ssr/_1z02bsk._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4ui._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_build-data_build-data-page_tsx_1t2rrh0._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_builds_coverage-report-page_tsx_1nhwba1._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_devices_device-detail-page_tsx_1mut_l4._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_devices_devices-page_tsx_1y45lv2._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_github_pull-request-detail-page_tsx_1etlamp._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_jira_cache-page_tsx_1znt1yl._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_jira_ticket-detail-page_tsx_0vmf8nk._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_jira_tickets-page_tsx_0_ocldp._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_push-notifications_push-notifications-page_tsx_1c_b-t4._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_signing-assets_provisioning-profiles-page_tsx_1zr20o7._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_skills_skill-sync-page_tsx_15sidhb._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_skills_skills-page_tsx_0o1nlbg._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +1 -1
- package/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +1 -1
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/{0rrwapb85e3vs.js → 0a8bo5bqge171.js} +1 -1
- package/standalone/.next/static/chunks/0bx-vj8k3jlsz.js +35 -0
- package/standalone/.next/static/chunks/{1z2n-kfxw0xxf.js → 0s_vkk_t0i4mg.js} +1 -1
- package/standalone/.next/static/chunks/12msdp4rhv6ti.js +7 -0
- package/standalone/.next/static/chunks/{1rvz2z_cov6ug.js → 15rske_fphtgw.js} +2 -2
- package/standalone/.next/static/chunks/19l74y4_uc81t.js +33 -0
- package/standalone/.next/static/chunks/{0elijgx6pfo7w.js → 1a5_4cpwnx9uu.js} +1 -1
- package/standalone/.next/static/chunks/1a9j-qydwrg8m.js +7 -0
- package/standalone/.next/static/chunks/1e-vykrs41myl.js +41 -0
- package/standalone/.next/static/chunks/1jwc4nasae27c.js +1 -0
- package/standalone/.next/static/chunks/1llwo8aslhpdp.js +1 -0
- package/standalone/.next/static/chunks/{2-k0gnjfr6ayw.js → 1nkkb5gu3-rhf.js} +1 -1
- package/standalone/.next/static/chunks/1oh9kzyxfy5ih.js +1 -0
- package/standalone/.next/static/chunks/1q87ulu5dp43f.js +1 -0
- package/standalone/.next/static/chunks/{2i8eu37_ggvr8.js → 1smbfkd1cb015.js} +10 -10
- package/standalone/.next/static/chunks/1ynnv9u7cfr4c.js +1 -0
- package/standalone/.next/static/chunks/1yx2no0f8qqs5.js +7 -0
- package/standalone/.next/static/chunks/{3kswwcsm5y95r.js → 1zw6r-idmbfgl.js} +1 -1
- package/standalone/.next/static/chunks/224rpxiffot1u.js +9 -0
- package/standalone/.next/static/chunks/24tqnzr1nzhom.js +1 -0
- package/standalone/.next/static/chunks/292r4qzwbnzg7.js +45 -0
- package/standalone/.next/static/chunks/{3zmi_6t6n2zhl.js → 29bdsmo8ketwt.js} +2 -2
- package/standalone/.next/static/chunks/{08n97leuqvfec.js → 29pirjk9q8gfx.js} +1 -1
- package/standalone/.next/static/chunks/{0gduhhe5i5fyj.js → 2bdfoatg4qo7w.js} +1 -1
- package/standalone/.next/static/chunks/{1mdi8gmbt3v4y.js → 2mzx47_wqfqf6.js} +1 -1
- package/standalone/.next/static/chunks/2rplo_7t3zrb9.js +1 -0
- package/standalone/.next/static/chunks/{0txd8z6bbq8sd.js → 2rv5r0dwu0nv6.js} +1 -1
- package/standalone/.next/static/chunks/2u51t_6-1w566.js +1 -0
- package/standalone/.next/static/chunks/{3fdxq7wzqx26o.js → 2xgehciyxxmdl.js} +1 -1
- package/standalone/.next/static/chunks/34pq01spesbci.js +1 -0
- package/standalone/.next/static/chunks/34pqiakzvfxgg.js +1 -0
- package/standalone/.next/static/chunks/{3g004cn7om3tw.js → 35hg231a8ig1t.js} +1 -1
- package/standalone/.next/static/chunks/36r84wnfwt4kn.css +1 -0
- package/standalone/.next/static/chunks/{11x96hq8bk827.js → 37dd1jthysw7j.js} +1 -1
- package/standalone/.next/static/chunks/{2cohukhgw3x39.js → 384f6qhpff4pn.js} +3 -3
- package/standalone/.next/static/chunks/3_xim7hqyyfr0.js +1 -0
- package/standalone/.next/static/chunks/3eumqpi7f1fek.js +30 -0
- package/standalone/.next/static/chunks/{1209uyjs06prv.js → 3hq055db_1oe4.js} +1 -1
- package/standalone/.next/static/chunks/3ns362pjxzs4s.js +3 -0
- package/standalone/.next/static/chunks/3ojl4tmmy52v4.js +29 -0
- package/standalone/.next/static/chunks/3sxc882-vifa-.js +10 -0
- package/standalone/.next/static/chunks/40k5mbsz_tzvi.js +1 -0
- package/standalone/.next/static/chunks/43pkxbd7uiq6-.js +33 -0
- package/standalone/.next/static/chunks/00vmfj3b0p_9v.js +0 -1
- package/standalone/.next/static/chunks/05qk7dn22ctyw.js +0 -33
- package/standalone/.next/static/chunks/08b5rziqjcmmv.js +0 -9
- package/standalone/.next/static/chunks/0hcrlyp4czqm4.js +0 -33
- package/standalone/.next/static/chunks/0kkylz4dfb-6-.css +0 -1
- package/standalone/.next/static/chunks/0ouxq2tjuuo5p.js +0 -1
- package/standalone/.next/static/chunks/0qslkhjg4g4wo.js +0 -1
- package/standalone/.next/static/chunks/0sgv58x3pi1lt.js +0 -1
- package/standalone/.next/static/chunks/1-uwntvgs-8hy.js +0 -7
- package/standalone/.next/static/chunks/175wjcrz57-r8.js +0 -3
- package/standalone/.next/static/chunks/1aymjnttvjkz8.js +0 -35
- package/standalone/.next/static/chunks/1p0jamt--jvn2.js +0 -1
- package/standalone/.next/static/chunks/1wm2l6ainzpua.js +0 -30
- package/standalone/.next/static/chunks/2aaudeflwvhrw.js +0 -1
- package/standalone/.next/static/chunks/2jj9hlwqhy5pr.js +0 -41
- package/standalone/.next/static/chunks/2ldet81o6fvx9.js +0 -7
- package/standalone/.next/static/chunks/2nnls3_0a15ot.js +0 -1
- package/standalone/.next/static/chunks/32ynps2o_ve-q.js +0 -10
- package/standalone/.next/static/chunks/3812zpxehpne1.js +0 -1
- package/standalone/.next/static/chunks/398-3q0cwr6rj.js +0 -29
- package/standalone/.next/static/chunks/3f0s63l_3ts3k.js +0 -1
- package/standalone/.next/static/chunks/3ognjxt-gne6-.js +0 -1
- package/standalone/.next/static/chunks/3q82abj2-3h1-.js +0 -1
- package/standalone/.next/static/chunks/3zux6x75u6-5-.js +0 -1
- package/standalone/.next/static/chunks/4260c5fq33ytz.js +0 -7
- package/standalone/.next/static/chunks/448r-ornlfrsf.js +0 -45
- /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_clientMiddlewareManifest.js +0 -0
- /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(a({variant:r}),e),...i})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===a(e)}function o(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let h=null;function m(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return h??=function(t){let r,n,a,i,{url:f,connectionParams:h,lazy:m=!0,onNonLazyError:g=console.error,lazyCloseTimeout:y=0,keepAlive:x=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:j=5,retryWait:k=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:w=p,on:C,webSocketImpl:S,generateID:E=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:T,jsonMessageReviver:N}=t;if(S){var R;if(!("function"==typeof(R=S)&&"constructor"in R&&"CLOSED"in R&&"CLOSING"in R&&"CONNECTING"in R&&"OPEN"in R))throw Error("Invalid WebSocket implementation provided");r=S}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let A=r,O=(n={},a={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},i={connecting:C?.connecting?[C.connecting]:[],opened:C?.opened?[C.opened]:[],connected:C?.connected?[C.connected]:[],ping:C?.ping?[C.ping]:[],pong:C?.pong?[C.pong]:[],message:C?.message?[a.emit,C.message]:[a.emit],closed:C?.closed?[C.closed]:[],error:C?.error?[C.error]:[]},{onMessage:a.on,on(e,t){let r=i[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...i[e]])r(...t)}});function D(e){let t=[O.on("error",r=>{t.forEach(e=>e()),e(r)}),O.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let $,P=0,I,M=!1,_=0,B=!1;async function z(){clearTimeout(I);let[e,t]=await ($??($=new Promise((e,t)=>(async()=>{let r,n;if(M){if(await k(_),!P)return $=void 0,t({code:1e3,reason:"All Subscriptions Gone"});_++}O.emit("connecting",M);let a=new A("function"==typeof f?await f():f,"graphql-transport-ws");function i(){isFinite(x)&&x>0&&(clearTimeout(n),n=setTimeout(()=>{a.readyState===A.OPEN&&(a.send(c({type:l.Ping})),O.emit("ping",!1,void 0))},x))}D(e=>{$=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>O.emit("error",e),a.onclose=e=>O.emit("closed",e),a.onopen=async()=>{try{O.emit("opened",a);let e="function"==typeof h?await h():h;if(a.readyState!==A.OPEN)return;a.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},T)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),i()}catch(e){O.emit("error",e),a.close(s.InternalClientError,o(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let n=d("string"==typeof t?JSON.parse(t,N):t);if(O.emit("message",n),"ping"===n.type||"pong"===n.type){O.emit(n.type,!0,n.payload),"pong"===n.type?i():b||(a.send(c(n.payload?{type:l.Pong,payload:n.payload}:{type:l.Pong})),O.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,O.emit("connected",a,n.payload,M),M=!1,_=0,e([a,new Promise((e,t)=>D(t))])}catch(e){a.onmessage=null,O.emit("error",e),a.close(s.BadResponse,o(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===A.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{P||(isFinite(y)&&y>0?I=setTimeout(()=>{e.readyState===A.OPEN&&e.close(1e3,"Normal Closure")},y):e.close(1e3,"Normal Closure"))}),t])]}function L(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(B)return!1;if(p(e)&&1e3===e.code)return P>0;if(!j||_>=j||!w(e))throw e;return M=!0}function H(e,t){let r=E(e),n=!1,a=!1,i=()=>{P--,n=!0};return(async()=>{for(P++;;)try{let[o,s,d]=await z();if(n)return s();let u=O.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:a=!0,n=!0,t.error(e.payload),i();return;case l.Complete:n=!0,i();return}});o.send(c({id:r,type:l.Subscribe,payload:e},T)),i=()=>{n||o.readyState!==A.OPEN||o.send(c({id:r,type:l.Complete},T)),P--,n=!0,s()},await d.finally(u);return}catch(e){if(!L(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{n||i()}}return m||(async()=>{for(P++;;)try{let[,,e]=await z();await e}catch(e){try{if(!L(e))return}catch(e){return g?.(e)}}})(),{on:O.on,subscribe:H,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=H(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(n(),{done:!0,value:void 0}),a},async dispose(){if(B=!0,$){let[e]=await $;e.close(1e3,"Normal Closure")}},terminate(){$&&O.emit("closed",new u)}}}({url:m,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),a=e.i(975157);let i=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:o=!1,...s}){let l=o?n.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,a.cn)(i({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:n,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",n),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...n})},"TableFooter",0,function({className:e,...n}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...n})}])},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},59497,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}var i=e.i(30030);function o(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var s=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var l=r[" useInsertionEffect ".trim().toString()]||s;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),f=Symbol.for("react.lazy");function h(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===f&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var m=r[" use ".trim().toString()],g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var i;let o,s=(i=`Primitive.${n}`,(o=r.forwardRef((e,t)=>{var n;let o,s,{children:l,...d}=e,c=null,u=!1,f=[];h(l)&&"function"==typeof m&&(l=m(l._payload)),r.Children.forEach(l,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;h(t)&&"function"==typeof m&&(t=m(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),f.push(c?.props?.children)}else f.push(e)}),c?c=r.cloneElement(c,void 0,f):!u&&1===r.Children.count(l)&&r.isValidElement(l)&&(c=l);let g=c?(n=c,(s=(o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.ref:(s=(o=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,y=a(t,g);if(!c){if(l||0===l){let e,t;throw Error(u?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return l}let x=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(d,c.props??{});return c.type!==r.Fragment&&(x.ref=t?y:g),r.cloneElement(c,x)})).displayName=`${i}.Slot`,o),l=r.forwardRef((e,r)=>{let{asChild:a,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(a?s:n,{...i,ref:r})});return l.displayName=`Primitive.${n}`,{...e,[n]:l}},{}),y="Checkbox",[x,b]=(0,i.createContextScope)(y),[v,j]=x(y);function k(e){let{__scopeCheckbox:n,checked:a,children:i,defaultChecked:o,disabled:s,form:d,name:c,onCheckedChange:u,required:p,value:f="on",internal_do_not_use_render:h}=e,[m,g]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){let[i,o,s]=function({defaultProp:e,onChange:t}){let[n,a]=r.useState(e),i=r.useRef(n),o=r.useRef(t);return l(()=>{o.current=t},[t]),r.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,a,o]}({defaultProp:t,onChange:n}),d=void 0!==e,c=d?e:i;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,a])}return[c,r.useCallback(t=>{if(d){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else o(t)},[d,e,o,s])]}({prop:a,defaultProp:o??!1,onChange:u,caller:y}),[x,b]=r.useState(null),[j,k]=r.useState(null),w=r.useRef(!1),C=!x||!!d||!!x.closest("form"),S={checked:m,disabled:s,setChecked:g,control:x,setControl:b,name:c,form:d,value:f,hasConsumerStoppedPropagationRef:w,required:p,defaultChecked:!A(o)&&o,isFormControl:C,bubbleInput:j,setBubbleInput:k};return(0,t.jsx)(v,{scope:n,...S,children:"function"==typeof h?h(S):i})}var w="CheckboxTrigger",C=r.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:i,...s},l)=>{let{control:d,value:c,disabled:u,checked:p,required:f,setControl:h,setChecked:m,hasConsumerStoppedPropagationRef:y,isFormControl:x,bubbleInput:b}=j(w,e),v=a(l,h),k=r.useRef(p);return r.useEffect(()=>{let e=d?.form;if(e){let t=()=>m(k.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,m]),(0,t.jsx)(g.button,{type:"button",role:"checkbox","aria-checked":A(p)?"mixed":p,"aria-required":f,"data-state":O(p),"data-disabled":u?"":void 0,disabled:u,value:c,...s,ref:v,onKeyDown:o(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:o(i,e=>{m(e=>!!A(e)||!e),b&&x&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})});C.displayName=w;var S=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,name:a,checked:i,defaultChecked:o,required:s,disabled:l,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(k,{__scopeCheckbox:n,checked:i,defaultChecked:o,disabled:l,required:s,onCheckedChange:c,name:a,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C,{...p,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(R,{__scopeCheckbox:n})]})})});S.displayName=y;var E="CheckboxIndicator",T=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,forceMount:a,...i}=e,o=j(E,n);return(0,t.jsx)(u.Presence,{present:a||A(o.checked)||!0===o.checked,children:(0,t.jsx)(g.span,{"data-state":O(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:r,style:{pointerEvents:"none",...e.style}})})});T.displayName=E;var N="CheckboxBubbleInput",R=r.forwardRef(({__scopeCheckbox:e,...n},i)=>{let{control:o,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:u,required:p,disabled:f,name:h,value:m,form:y,bubbleInput:x,setBubbleInput:b}=j(N,e),v=a(i,b),k=(0,d.usePrevious)(l),w=(0,c.useSize)(o);r.useEffect(()=>{if(!x)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!s.current;if(k!==l&&e){let r=new Event("click",{bubbles:t});x.indeterminate=A(l),e.call(x,!A(l)&&l),x.dispatchEvent(r)}},[x,k,l,s]);let C=r.useRef(!A(l)&&l);return(0,t.jsx)(g.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??C.current,required:p,disabled:f,name:h,value:m,form:y,...n,tabIndex:-1,ref:v,style:{...n.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function A(e){return"indeterminate"===e}function O(e){return A(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=N,e.s(["Checkbox",0,S,"CheckboxIndicator",0,T,"Indicator",0,T,"Root",0,S,"createCheckboxScope",0,b,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,k,"unstable_CheckboxTrigger",0,C,"unstable_Provider",0,k,"unstable_Trigger",0,C],388474);var D=e.i(388474),D=D,$=e.i(975157),P=e.i(593698);e.s(["Checkbox",0,function({className:e,...r}){return(0,t.jsx)(D.Root,{"data-slot":"checkbox",className:(0,$.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...r,children:(0,t.jsx)(D.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(P.CheckIcon,{})})})}],59497)},110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var a=Symbol.for("radix.slottable"),i=Symbol.for("react.lazy");function o(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===i&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var s=r[" use ".trim().toString()],l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,i)=>{var l;let d,c=(l=`Primitive.${i}`,(d=r.forwardRef((e,t)=>{var i;let d,c,{children:u,...p}=e,f=null,h=!1,m=[];o(u)&&"function"==typeof s&&(u=s(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===a){h=!0;let t="child"in e.props?e.props.child:e.props.children;o(t)&&"function"==typeof s&&(t=s(t._payload)),f=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),m.push(f?.props?.children)}else m.push(e)}),f?f=r.cloneElement(f,void 0,m):!h&&1===r.Children.count(u)&&r.isValidElement(u)&&(f=u);let g=f?(i=f,(c=(d=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?i.ref:(c=(d=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,y=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}(t,g);if(!f){if(u||0===u){let e,t;throw Error(h?(e=l,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=l,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let x=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==r.Fragment&&(x.ref=t?y:g),r.cloneElement(f,x)})).displayName=`${l}.Slot`,d),u=r.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?c:i,{...a,ref:r})});return u.displayName=`Primitive.${i}`,{...e,[i]:u}},{}),d=r.forwardRef((e,r)=>(0,t.jsx)(l.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));d.displayName="Label",e.s(["Label",0,d,"Root",0,d],973741);var c=e.i(973741),c=c,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(c.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}function i(e){let r=t.forwardRef((r,n)=>{var i;let l,f,{children:h,...m}=r,g=null,y=!1,x=[];d(h)&&"function"==typeof p&&(h=p(h._payload)),t.Children.forEach(h,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===o){y=!0;let t="child"in e.props?e.props.child:e.props.children;d(t)&&"function"==typeof p&&(t=p(t._payload)),g=s(e,t),x.push(g?.props?.children)}else x.push(e)}),g?g=t.cloneElement(g,void 0,x):!y&&1===t.Children.count(h)&&t.isValidElement(h)&&(g=h);let b=g?(i=g,(f=(l=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.ref:(f=(l=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,v=a(n,b);if(!g){if(h||0===h)throw Error(y?u(e):c(e));return h}let j=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(m,g.props??{});return g.type!==t.Fragment&&(j.ref=n?v:b),t.cloneElement(g,j)});return r.displayName=`${e}.Slot`,r}var o=Symbol.for("radix.slottable"),s=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},l=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===l&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var c=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),h=new WeakMap;function m(e,t){var r,n;let a,i,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,a=r.length,(o=(i=g(n))>=0?i:a+i)<0||o>=a?-1:o);return -1===s?void 0:e[s]}function g(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],h.set(this,!0)}set(e,t){return h.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),i=this.#e.length,o=g(e),s=o>=0?o:i+o,l=s<0||s>=i?-1:s;if(l===this.size||a&&l===this.size-1||-1===l)return this.set(t,r),this;let d=this.size+ +!a;o<0&&s++;let c=[...this.#e],u=!1;for(let e=s;e<d;e++)if(s===e){let i=c[e];c[e]===t&&(i=c[e+1]),a&&this.delete(t),n=this.get(i),this.set(t,r)}else{u||c[e-1]!==t||(u=!0);let r=c[u?e:e-1],a=n;n=this.get(r),this.delete(r),this.set(r,a)}return this}with(t,r,n){let a=new e(this);return a.insert(t,r,n),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=m(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=m(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return m(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&n.push(e),a++;return new e(n)}map(t,r){let n=[],a=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(n)}reduce(...e){let[t,r]=e,n=0,a=r??this.at(0);for(let r of this)a=0===n&&1===e.length?r:Reflect.apply(t,this,[a,r,n,this]),n++;return a}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);n=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[n,a,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,a=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[o,s]=(0,r.createContextScope)(n),[l,d]=o(n,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:n}=e,a=t.useRef(null),i=t.useRef(new Map).current;return(0,f.jsx)(l,{scope:r,itemMap:i,collectionRef:a,children:n})};c.displayName=n;let u=e+"CollectionSlot",p=i(u),h=t.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=a(t,d(u,r).collectionRef);return(0,f.jsx)(p,{ref:i,children:n})});h.displayName=u;let m=e+"CollectionItemSlot",g="data-radix-collection-item",y=i(m),x=t.forwardRef((e,r)=>{let{scope:n,children:i,...o}=e,s=t.useRef(null),l=a(r,s),c=d(m,n);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...o}),()=>void c.itemMap.delete(s))),(0,f.jsx)(y,{...{[g]:""},ref:l,children:i})});return x.displayName=m,[{Provider:c,Slot:h,ItemSlot:x},function(r){let n=d(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}],75830);var y=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(y);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(560964),n=e.i(964053),a=e.i(519455),i=e.i(975157);function o({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function s({className:e,...r}){return(0,t.jsx)(n.Dialog.Overlay,{className:(0,i.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:l,showCloseButton:d=!0,...c}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(s,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,i.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[l,d&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(a.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Description,{className:(0,i.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...r})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:o,...s}){return(0,t.jsxs)("div",{className:(0,i.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...s,children:[o,r&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(a.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Title,{className:(0,i.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(n.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},630299,e=>{"use strict";let t=(0,e.i(456420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t])},566595,e=>{"use strict";var t=e.i(630299);e.s(["Search",()=>t.default])},452330,e=>{"use strict";let t=(0,e.i(456420).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,t],452330)},131460,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);e.s(["ArrowDownToLine",0,t],131460)},669253,e=>{"use strict";let t=(0,e.i(456420).default)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);e.s(["FolderTree",0,t],669253)},41074,e=>{"use strict";var t=e.i(843476),r=e.i(131460),n=e.i(456420);let a=(0,n.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var i=e.i(689664),o=e.i(452330),s=e.i(809584),l=e.i(669253);let d=(0,n.default)("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);var c=e.i(77071),u=e.i(741120),p=e.i(566595),f=e.i(166794);let h=(0,n.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var m=e.i(328623);let g=(0,n.default)("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);var y=e.i(948148),x=e.i(271645),b=e.i(929592),v=e.i(487486),j=e.i(519455),k=e.i(515288),w=e.i(59497),C=e.i(776639),S=e.i(793479),E=e.i(110204),T=e.i(987968),N=e.i(967489),R=e.i(784774),A=e.i(677572),O=e.i(520133),D=e.i(637611);let $={CURSOR:"Cursor",GITHUB_COPILOT:"GitHub Copilot",CODEX:"OpenAI Codex",CLAUDE:"Claude Code",OPENCODE:"OpenCode"},P={CURSOR:d,GITHUB_COPILOT:m.Sparkles,CODEX:g,CLAUDE:a,OPENCODE:o.Code2},I=`
|
|
2
|
+
query SkillsOverview($search: String) {
|
|
3
|
+
skillsOverview(search: $search) {
|
|
4
|
+
skills {
|
|
5
|
+
id name description syncGlobally packageHash updatedAt
|
|
6
|
+
files { id path }
|
|
7
|
+
groups { id name }
|
|
8
|
+
}
|
|
9
|
+
groups { id name }
|
|
10
|
+
observations {
|
|
11
|
+
tool configured homePath checkedAt
|
|
12
|
+
agent { id name hostname connectionStatus }
|
|
13
|
+
}
|
|
14
|
+
installations {
|
|
15
|
+
id scope rootKind rootPath skillName description packageHash fileCount totalBytes tracked consumers lastSeenAt
|
|
16
|
+
agent { id name hostname connectionStatus }
|
|
17
|
+
codebase { id folder repository { id name displayOrigin } }
|
|
18
|
+
worktree { id folder }
|
|
19
|
+
skill { id name packageHash }
|
|
20
|
+
}
|
|
21
|
+
settings {
|
|
22
|
+
autoSyncProjectGroups cursorEnabled githubCopilotEnabled codexEnabled claudeEnabled openCodeEnabled updatedAt
|
|
23
|
+
}
|
|
24
|
+
repositories { id name displayOrigin }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`;function M(e,t){return"CURSOR"===t?e.cursorEnabled:"GITHUB_COPILOT"===t?e.githubCopilotEnabled:"CODEX"===t?e.codexEnabled:"CLAUDE"===t?e.claudeEnabled:e.openCodeEnabled}function _({overview:e}){let r=(0,y.useTranslations)("skills");return(0,t.jsxs)(k.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(k.CardHeader,{children:[(0,t.jsx)(k.CardTitle,{children:r("databaseSkills")}),(0,t.jsx)(k.CardDescription,{children:r("databaseSkillsDescription")})]}),(0,t.jsx)(k.CardContent,{className:"px-0",children:(0,t.jsxs)(R.Table,{children:[(0,t.jsx)(R.TableHeader,{children:(0,t.jsxs)(R.TableRow,{children:[(0,t.jsx)(R.TableHead,{children:r("name")}),(0,t.jsx)(R.TableHead,{children:r("skillDescription")}),(0,t.jsx)(R.TableHead,{children:r("scope")}),(0,t.jsx)(R.TableHead,{children:r("groups")}),(0,t.jsx)(R.TableHead,{children:r("files")}),(0,t.jsx)(R.TableHead,{children:r("updated")})]})}),(0,t.jsxs)(R.TableBody,{children:[e.skills.map(e=>(0,t.jsxs)(R.TableRow,{children:[(0,t.jsx)(R.TableCell,{children:(0,t.jsx)(O.Link,{className:"font-medium text-primary hover:underline",href:`/skills/${e.id}`,children:e.name})}),(0,t.jsx)(R.TableCell,{className:"max-w-lg whitespace-normal text-muted-foreground",children:e.description}),(0,t.jsx)(R.TableCell,{children:(0,t.jsx)(v.Badge,{variant:e.syncGlobally?"default":"secondary",children:e.syncGlobally?r("global"):r("groupOnly")})}),(0,t.jsx)(R.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e.groups.length?e.groups.map(e=>(0,t.jsx)(v.Badge,{variant:"outline",children:e.name},e.id)):"—"})}),(0,t.jsx)(R.TableCell,{children:e.files.length}),(0,t.jsx)(R.TableCell,{children:new Date(e.updatedAt).toLocaleString()})]},e.id)),!e.skills.length&&(0,t.jsx)(R.TableRow,{children:(0,t.jsx)(R.TableCell,{className:"py-10 text-center text-muted-foreground",colSpan:6,children:r("noSkills")})})]})]})})]})}function B({installations:e}){let n=(0,y.useTranslations)("skills");return(0,t.jsxs)(k.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(k.CardHeader,{children:[(0,t.jsx)(k.CardTitle,{children:n("clientSkills")}),(0,t.jsx)(k.CardDescription,{children:n("clientSkillsDescription")})]}),(0,t.jsx)(k.CardContent,{className:"px-0",children:(0,t.jsxs)(R.Table,{children:[(0,t.jsx)(R.TableHeader,{children:(0,t.jsxs)(R.TableRow,{children:[(0,t.jsx)(R.TableHead,{children:n("name")}),(0,t.jsx)(R.TableHead,{children:n("scope")}),(0,t.jsx)(R.TableHead,{children:n("agent")}),(0,t.jsx)(R.TableHead,{children:n("location")}),(0,t.jsx)(R.TableHead,{children:n("status")})]})}),(0,t.jsxs)(R.TableBody,{children:[e.map(e=>{let a=e.skill?e.skill.packageHash===e.packageHash?"UNCHANGED":"CONFLICT":"IMPORT";return(0,t.jsxs)(R.TableRow,{children:[(0,t.jsxs)(R.TableCell,{children:[(0,t.jsx)("div",{className:"font-medium",children:e.skillName}),(0,t.jsx)("div",{className:"max-w-md whitespace-normal text-xs text-muted-foreground",children:e.description})]}),(0,t.jsxs)(R.TableCell,{children:[(0,t.jsx)(v.Badge,{variant:"outline",children:"GLOBAL"===e.scope?n("global"):n("project")}),e.codebase&&(0,t.jsx)("div",{className:"mt-1 text-xs text-muted-foreground",children:e.codebase.repository.name})]}),(0,t.jsx)(R.TableCell,{children:e.agent.name}),(0,t.jsxs)(R.TableCell,{className:"max-w-md whitespace-normal font-mono text-xs",children:[e.rootPath,e.tracked&&(0,t.jsx)(v.Badge,{className:"ml-2",variant:"secondary",children:n("tracked")})]}),(0,t.jsx)(R.TableCell,{children:"UNCHANGED"===a?(0,t.jsxs)(v.Badge,{className:"gap-1",variant:"secondary",children:[(0,t.jsx)(i.Check,{})," ",n("inSync")]}):"IMPORT"===a?(0,t.jsxs)(v.Badge,{className:"gap-1",variant:"outline",children:[(0,t.jsx)(r.ArrowDownToLine,{})," ",n("toDatabase")]}):(0,t.jsxs)(v.Badge,{className:"gap-1",variant:"destructive",children:[(0,t.jsx)(h,{})," ",n("conflict")]})})]},e.id)}),!e.length&&(0,t.jsx)(R.TableRow,{children:(0,t.jsx)(R.TableCell,{className:"py-10 text-center text-muted-foreground",colSpan:5,children:n("noClientSkills")})})]})]})})]})}function z({configuredCounts:e,onOpenChange:r,onSaved:n,open:a,settings:i}){let o=(0,y.useTranslations)("skills"),[s,l]=(0,x.useState)(i),[d,c]=(0,x.useState)(!1),[u,p]=(0,x.useState)(null),f=async()=>{c(!0);try{await (0,D.controlPlaneRequest)(`mutation SaveSkillSettings($input: SaveSkillSettingsInput!) {
|
|
28
|
+
saveSkillSettings(input: $input) { updatedAt }
|
|
29
|
+
}`,{input:{autoSyncProjectGroups:s.autoSyncProjectGroups,cursorEnabled:s.cursorEnabled,githubCopilotEnabled:s.githubCopilotEnabled,codexEnabled:s.codexEnabled,claudeEnabled:s.claudeEnabled,openCodeEnabled:s.openCodeEnabled}}),await n(),r(!1)}catch(e){p(e instanceof Error?e.message:String(e))}finally{c(!1)}};return(0,t.jsx)(C.Dialog,{onOpenChange:r,open:a,children:(0,t.jsxs)(C.DialogContent,{children:[(0,t.jsxs)(C.DialogHeader,{children:[(0,t.jsx)(C.DialogTitle,{children:o("settingsTitle")}),(0,t.jsx)(C.DialogDescription,{children:o("settingsDescription")})]}),u&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:u})}),(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-lg border p-3",children:[(0,t.jsx)(w.Checkbox,{checked:s.autoSyncProjectGroups,id:"skills-auto-sync",onCheckedChange:e=>l(t=>({...t,autoSyncProjectGroups:!0===e}))}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Label,{htmlFor:"skills-auto-sync",children:o("autoSync")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("autoSyncHelp")})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(E.Label,{children:o("enabledTools")}),Object.keys($).map(r=>{let n=M(s,r);return(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2",children:[(0,t.jsx)(w.Checkbox,{checked:n,id:`skill-tool-${r}`,onCheckedChange:e=>{var t;return t=!0===e,void l(e=>({...e,..."CURSOR"===r?{cursorEnabled:t}:{},..."GITHUB_COPILOT"===r?{githubCopilotEnabled:t}:{},..."CODEX"===r?{codexEnabled:t}:{},..."CLAUDE"===r?{claudeEnabled:t}:{},..."OPENCODE"===r?{openCodeEnabled:t}:{}}))}}),(0,t.jsxs)(E.Label,{className:"flex flex-1 justify-between",htmlFor:`skill-tool-${r}`,children:[(0,t.jsx)("span",{children:$[r]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:e[r]>0?o("configuredAgents",{count:e[r]}):o("notDetected")})]})]},r)})]}),(0,t.jsx)(C.DialogFooter,{children:(0,t.jsxs)(j.Button,{disabled:d,onClick:()=>void f(),children:[d&&(0,t.jsx)(T.Spinner,{})," ",o("saveSettings")]})})]})})}e.s(["SkillsPage",0,function(){let e=(0,y.useTranslations)("skills"),r=(0,O.useRouter)(),[n,a]=(0,x.useState)(null),[i,o]=(0,x.useState)(""),[d,h]=(0,x.useState)("DATABASE"),[m,g]=(0,x.useState)(!1),[v,k]=(0,x.useState)(!0),[w,C]=(0,x.useState)(!1),[E,R]=(0,x.useState)(null),L=(0,x.useCallback)(async()=>{try{let e=await (0,D.controlPlaneRequest)(I,{search:i});a(e.skillsOverview),R(null)}catch(e){R(e instanceof Error?e.message:String(e))}finally{k(!1)}},[i]);(0,x.useEffect)(()=>{let e=window.setTimeout(()=>void L(),200);return()=>window.clearTimeout(e)},[L]);let H=(0,x.useMemo)(()=>n?Object.keys($).filter(e=>M(n.settings,e)&&n.observations.some(t=>t.tool===e&&t.configured)):[],[n]),q=(0,x.useMemo)(()=>Object.fromEntries(Object.keys($).map(e=>[e,n?.observations.filter(t=>t.tool===e&&t.configured).length??0])),[n]),G="DATABASE"===d||H.includes(d)?d:"DATABASE",U=async()=>{C(!0);try{let e=await (0,D.controlPlaneRequest)("mutation PrepareSkillSync { prepareSkillSync(kind: ALL) { id } }");r.push(`/skills/sync/${e.prepareSkillSync.id}`)}catch(e){R(e instanceof Error?e.message:String(e))}finally{C(!1)}};return(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col gap-4 overflow-auto p-4 sm:p-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("description")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(j.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(O.Link,{href:"/skills/groups",children:[(0,t.jsx)(l.FolderTree,{})," ",e("manageGroups")]})}),(0,t.jsxs)(j.Button,{onClick:()=>g(!0),variant:"outline",children:[(0,t.jsx)(f.Settings,{})," ",e("settings")]}),(0,t.jsx)(j.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(O.Link,{href:"/skills/new",children:[(0,t.jsx)(c.Plus,{})," ",e("addSkill")]})}),(0,t.jsxs)(j.Button,{disabled:w,onClick:()=>void U(),children:[w?(0,t.jsx)(T.Spinner,{}):(0,t.jsx)(u.RefreshCw,{})," ",e("syncAll")]})]})]}),E&&(0,t.jsx)(b.Alert,{variant:"destructive",children:(0,t.jsx)(b.AlertDescription,{children:E})}),(0,t.jsxs)("div",{className:"relative max-w-xl",children:[(0,t.jsx)(p.Search,{className:"absolute top-2.5 left-3 size-4 text-muted-foreground"}),(0,t.jsx)(S.Input,{"aria-label":e("search"),className:"pl-9",onChange:e=>o(e.target.value),placeholder:e("searchPlaceholder"),value:i})]}),(0,t.jsx)("div",{className:"sm:hidden",children:(0,t.jsxs)(N.Select,{onValueChange:h,value:G,children:[(0,t.jsx)(N.SelectTrigger,{"aria-label":e("skillSource"),className:"w-full",children:(0,t.jsx)(N.SelectValue,{})}),(0,t.jsxs)(N.SelectContent,{children:[(0,t.jsxs)(N.SelectItem,{value:"DATABASE",children:[(0,t.jsx)(s.Database,{})," ",e("database")]}),H.map(e=>{let r=P[e];return(0,t.jsxs)(N.SelectItem,{value:e,children:[(0,t.jsx)(r,{})," ",$[e]]},e)})]})]})}),(0,t.jsx)(A.Tabs,{className:"hidden sm:flex",onValueChange:h,value:G,children:(0,t.jsxs)(A.TabsList,{className:"h-auto flex-wrap justify-start",children:[(0,t.jsxs)(A.TabsTrigger,{value:"DATABASE",children:[(0,t.jsx)(s.Database,{})," ",e("database")]}),H.map(e=>{let r=P[e];return(0,t.jsxs)(A.TabsTrigger,{value:e,children:[(0,t.jsx)(r,{})," ",$[e]]},e)})]})}),v||!n?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(T.Spinner,{})," ",e("loading")]}):"DATABASE"===G?(0,t.jsx)(_,{overview:n}):(0,t.jsx)(B,{installations:n.installations.filter(e=>e.consumers.includes(G))}),n&&(0,t.jsx)(z,{configuredCounts:q,onOpenChange:g,onSaved:L,open:m,settings:n.settings},`${n.settings.updatedAt}-${m?"open":"closed"}`)]})}],41074)}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(975157);let o=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...n}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,a.cn)(o({variant:r}),e),...n})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:a="default",...o}){return(0,t.jsx)("div",{"data-slot":"card","data-size":a,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o})},"CardAction",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...a})},"CardDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a})},"CardFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...a})},"CardHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...a})},"CardTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...a})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),a=e.i(758379),a=a;e.s(["Spinner",0,function({className:e,...o}){return(0,t.jsx)(a.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...o})}],987968)},637611,e=>{"use strict";var t,r,a=e.i(247167);function o(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function n(e){return"object"===o(e)}function i(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!n(e))throw Error(`Message is expected to be an object, but got ${o(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${o(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${o(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${o(e.payload.query)}`);if(null!=e.payload.variables&&!n(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${o(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==o(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${o(e.payload.operationName)}`);if(null!=e.payload.extensions&&!n(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${o(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${o(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${o(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return n(e)&&"code"in e&&"reason"in e}async function m(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),a=await r.json();if(!r.ok||a.errors?.length||!a.data)throw Error(a.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return a.data}let g=null;function f(){return function(e,t,r){let a=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return a;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return a}catch{}return e}(a.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,m,"controlPlaneSubscriptions",0,function(){return g??=function(t){let r,a,o,n,{url:m,connectionParams:g,lazy:f=!0,onNonLazyError:x=console.error,lazyCloseTimeout:h=0,keepAlive:y=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:w=5,retryWait:j=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:N=p,on:C,webSocketImpl:T,generateID:E=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:S,jsonMessageReviver:k}=t;if(T){var $;if(!("function"==typeof($=T)&&"constructor"in $&&"CLOSED"in $&&"CLOSING"in $&&"CONNECTING"in $&&"OPEN"in $))throw Error("Invalid WebSocket implementation provided");r=T}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let A=r,P=(a={},o={on:(e,t)=>(a[e]=t,()=>{delete a[e]}),emit(e){"id"in e&&a[e.id]?.(e)}},n={connecting:C?.connecting?[C.connecting]:[],opened:C?.opened?[C.opened]:[],connected:C?.connected?[C.connected]:[],ping:C?.ping?[C.ping]:[],pong:C?.pong?[C.pong]:[],message:C?.message?[o.emit,C.message]:[o.emit],closed:C?.closed?[C.closed]:[],error:C?.error?[C.error]:[]},{onMessage:o.on,on(e,t){let r=n[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...n[e]])r(...t)}});function I(e){let t=[P.on("error",r=>{t.forEach(e=>e()),e(r)}),P.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let R,B=0,D,O=!1,q=0,L=!1;async function M(){clearTimeout(D);let[e,t]=await (R??(R=new Promise((e,t)=>(async()=>{let r,a;if(O){if(await j(q),!B)return R=void 0,t({code:1e3,reason:"All Subscriptions Gone"});q++}P.emit("connecting",O);let o=new A("function"==typeof m?await m():m,"graphql-transport-ws");function n(){isFinite(y)&&y>0&&(clearTimeout(a),a=setTimeout(()=>{o.readyState===A.OPEN&&(o.send(c({type:l.Ping})),P.emit("ping",!1,void 0))},y))}I(e=>{R=void 0,clearTimeout(r),clearTimeout(a),t(e),e instanceof u&&(o.close(4499,"Terminated"),o.onerror=null,o.onclose=null)}),o.onerror=e=>P.emit("error",e),o.onclose=e=>P.emit("closed",e),o.onopen=async()=>{try{P.emit("opened",o);let e="function"==typeof g?await g():g;if(o.readyState!==A.OPEN)return;o.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},S)),isFinite(v)&&v>0&&(r=setTimeout(()=>{o.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),n()}catch(e){P.emit("error",e),o.close(s.InternalClientError,i(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;o.onmessage=({data:t})=>{try{let a=d("string"==typeof t?JSON.parse(t,k):t);if(P.emit("message",a),"ping"===a.type||"pong"===a.type){P.emit(a.type,!0,a.payload),"pong"===a.type?n():b||(o.send(c(a.payload?{type:l.Pong,payload:a.payload}:{type:l.Pong})),P.emit("pong",!1,a.payload));return}if(p)return;if(a.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${a.type}`);clearTimeout(r),p=!0,P.emit("connected",o,a.payload,O),O=!1,q=0,e([o,new Promise((e,t)=>I(t))])}catch(e){o.onmessage=null,P.emit("error",e),o.close(s.BadResponse,i(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===A.CLOSING&&await t;let r=()=>{},a=new Promise(e=>r=e);return[e,r,Promise.race([a.then(()=>{B||(isFinite(h)&&h>0?D=setTimeout(()=>{e.readyState===A.OPEN&&e.close(1e3,"Normal Closure")},h):e.close(1e3,"Normal Closure"))}),t])]}function z(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(L)return!1;if(p(e)&&1e3===e.code)return B>0;if(!w||q>=w||!N(e))throw e;return O=!0}function _(e,t){let r=E(e),a=!1,o=!1,n=()=>{B--,a=!0};return(async()=>{for(B++;;)try{let[i,s,d]=await M();if(a)return s();let u=P.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:o=!0,a=!0,t.error(e.payload),n();return;case l.Complete:a=!0,n();return}});i.send(c({id:r,type:l.Subscribe,payload:e},S)),n=()=>{a||i.readyState!==A.OPEN||i.send(c({id:r,type:l.Complete},S)),B--,a=!0,s()},await d.finally(u);return}catch(e){if(!z(e))return}})().then(()=>{o||t.complete()}).catch(e=>{t.error(e)}),()=>{a||n()}}return f||(async()=>{for(B++;;)try{let[,,e]=await M();await e}catch(e){try{if(!z(e))return}catch(e){return x?.(e)}}})(),{on:P.on,subscribe:_,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},a=_(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),o=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return o.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),o.return=async()=>(a(),{done:!0,value:void 0}),o},async dispose(){if(L=!0,R){let[e]=await R;e.close(1e3,"Normal Closure")}},terminate(){R&&P.emit("closed",new u)}}}({url:f,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(709840),o=e.i(975157);let n=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:i=!1,...s}){let l=i?a.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,o.cn)(n({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:a,...o}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",a),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...o})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...a})},"TableFooter",0,function({className:e,...a}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...a})}])},711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},312159,e=>{"use strict";var t=e.i(843476),r=e.i(711241),a=e.i(986206),o=e.i(948148),n=e.i(271645),i=e.i(929592),s=e.i(487486),l=e.i(519455),d=e.i(515288),c=e.i(987968),u=e.i(784774),p=e.i(520133),m=e.i(637611);function g({label:e,value:r,mono:a=!1,className:o}){return(0,t.jsxs)("div",{className:o,children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:e}),(0,t.jsx)("p",{className:a?"break-all font-mono text-xs":"mt-1",children:r})]})}e.s(["ProvisioningProfileDetailPage",0,function({id:e}){let f=(0,o.useTranslations)("provisioningProfiles"),[x,h]=(0,n.useState)(null),[y,b]=(0,n.useState)(!0),[v,w]=(0,n.useState)(null),j=(0,n.useCallback)(async()=>{b(!0);try{let t=await (0,m.controlPlaneRequest)(`query ProvisioningProfileDetail($id: ID!) {
|
|
2
|
+
signingProfile(id: $id) {
|
|
3
|
+
id uuid contentHash name profileType bundleId teamId teamName
|
|
4
|
+
platforms deviceCount deviceUdids certificateSha1s createdAt expiresAt
|
|
5
|
+
expired xcodeManaged installedAgents { id name }
|
|
6
|
+
provisionedDevices {
|
|
7
|
+
udid deviceId displayName product osVersion status
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}`,{id:e});h(t.signingProfile),w(null)}catch(e){w(e instanceof Error?e.message:String(e))}finally{b(!1)}},[e]);if((0,n.useEffect)(()=>{let e=window.setTimeout(()=>void j(),0);return()=>window.clearTimeout(e)},[j]),y)return(0,t.jsxs)("p",{className:"flex items-center gap-2 p-6 text-sm text-muted-foreground",children:[(0,t.jsx)(c.Spinner,{})," ",f("loadingProfile")]});if(v)return(0,t.jsxs)("section",{className:"mx-auto w-full max-w-[1500px] space-y-4",children:[(0,t.jsx)(l.Button,{asChild:!0,variant:"ghost",children:(0,t.jsxs)(p.Link,{href:"/provisioning-profiles",children:[(0,t.jsx)(r.ArrowLeft,{})," ",f("backToProfiles")]})}),(0,t.jsx)(i.Alert,{variant:"destructive",children:(0,t.jsx)(i.AlertDescription,{children:v})})]});if(!x)return(0,t.jsxs)("section",{className:"mx-auto w-full max-w-[1500px] space-y-4",children:[(0,t.jsx)(l.Button,{asChild:!0,variant:"ghost",children:(0,t.jsxs)(p.Link,{href:"/provisioning-profiles",children:[(0,t.jsx)(r.ArrowLeft,{})," ",f("backToProfiles")]})}),(0,t.jsx)(d.Card,{children:(0,t.jsx)(d.CardContent,{className:"p-8 text-center text-muted-foreground",children:f("profileNotFound")})})]});let N=new Set,C=x.provisionedDevices.filter(e=>{let t=e.udid.toUpperCase();return!N.has(t)&&(N.add(t),!0)});return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,t.jsxs)(p.Link,{href:"/provisioning-profiles",children:[(0,t.jsx)(r.ArrowLeft,{})," ",f("backToProfiles")]})}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:x.name}),(0,t.jsx)(s.Badge,{variant:"outline",children:x.profileType}),x.expired&&(0,t.jsx)(s.Badge,{variant:"destructive",children:f("expired")}),x.xcodeManaged&&(0,t.jsx)(s.Badge,{variant:"secondary",children:"Xcode"})]}),(0,t.jsx)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:x.uuid})]}),(0,t.jsxs)(d.Card,{children:[(0,t.jsxs)(d.CardHeader,{children:[(0,t.jsx)(d.CardTitle,{children:f("profileDetails")}),(0,t.jsx)(d.CardDescription,{children:x.bundleId})]}),(0,t.jsxs)(d.CardContent,{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(g,{label:f("team"),value:x.teamName??x.teamId??"—"}),(0,t.jsx)(g,{label:f("platforms"),value:x.platforms.join(", ")||"—"}),(0,t.jsx)(g,{label:f("created"),value:x.createdAt?new Date(x.createdAt).toLocaleDateString():"—"}),(0,t.jsx)(g,{label:f("expires"),value:x.expiresAt?new Date(x.expiresAt).toLocaleDateString():"—"}),(0,t.jsx)(g,{label:f("installedAgents"),value:x.installedAgents.map(e=>e.name).join(", ")||"—"}),(0,t.jsx)(g,{className:"sm:col-span-2 lg:col-span-3",label:f("acceptedCertificates"),value:x.certificateSha1s.join(", ")||"—",mono:!0})]})]}),(0,t.jsxs)(d.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(d.CardHeader,{children:[(0,t.jsxs)(d.CardTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(a.Smartphone,{})," ",f("provisionedDevices")]}),(0,t.jsx)(d.CardDescription,{children:f("provisionedDevicesDescription",{count:C.length})})]}),0===x.deviceUdids.length?(0,t.jsx)("p",{className:"p-8 text-center text-sm text-muted-foreground",children:x.deviceCount>0?f("deviceListPendingRefresh"):f("noProvisionedDevices")}):(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:f("device")}),(0,t.jsx)(u.TableHead,{children:f("udid")}),(0,t.jsx)(u.TableHead,{children:f("status")})]})}),(0,t.jsx)(u.TableBody,{children:C.map((e,r)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsxs)(u.TableCell,{children:[e.deviceId&&e.displayName?(0,t.jsx)(p.Link,{className:"font-medium hover:underline",href:`/devices/${e.deviceId}`,children:e.displayName}):(0,t.jsx)("span",{className:"text-muted-foreground",children:f("unknownDevice")}),(e.product||e.osVersion)&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:[e.product,e.osVersion].filter(Boolean).join(" · ")})]}),(0,t.jsx)(u.TableCell,{className:"font-mono text-xs",children:e.udid}),(0,t.jsx)(u.TableCell,{children:e.status?(0,t.jsx)(s.Badge,{variant:"secondary",children:e.status}):"—"})]},`${e.udid}:${r}`))})]})]})]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...n}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,o.cn)(a({variant:r}),e),...n})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,o.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:o="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":o,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...o})},"CardContent",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...o})},"CardDescription",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...o})},"CardFooter",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...o})},"CardHeader",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...o})},"CardTitle",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...o})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),o=e.i(758379),o=o;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(o.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,o=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function n(e){return"object"===a(e)}function i(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!n(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!n(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!n(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return n(e)&&"code"in e&&"reason"in e}async function g(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),o=await r.json();if(!r.ok||o.errors?.length||!o.data)throw Error(o.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return o.data}let f=null;function m(){return function(e,t,r){let o=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return o;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return o}catch{}return e}(o.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,g,"controlPlaneSubscriptions",0,function(){return f??=function(t){let r,o,a,n,{url:g,connectionParams:f,lazy:m=!0,onNonLazyError:y=console.error,lazyCloseTimeout:h=0,keepAlive:v=0,disablePong:b,connectionAckWaitTimeout:x=0,retryAttempts:w=5,retryWait:E=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:C=p,on:S,webSocketImpl:k,generateID:j=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:T,jsonMessageReviver:N}=t;if(k){var $;if(!("function"==typeof($=k)&&"constructor"in $&&"CLOSED"in $&&"CLOSING"in $&&"CONNECTING"in $&&"OPEN"in $))throw Error("Invalid WebSocket implementation provided");r=k}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let R=r,I=(o={},a={on:(e,t)=>(o[e]=t,()=>{delete o[e]}),emit(e){"id"in e&&o[e.id]?.(e)}},n={connecting:S?.connecting?[S.connecting]:[],opened:S?.opened?[S.opened]:[],connected:S?.connected?[S.connected]:[],ping:S?.ping?[S.ping]:[],pong:S?.pong?[S.pong]:[],message:S?.message?[a.emit,S.message]:[a.emit],closed:S?.closed?[S.closed]:[],error:S?.error?[S.error]:[]},{onMessage:a.on,on(e,t){let r=n[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...n[e]])r(...t)}});function z(e){let t=[I.on("error",r=>{t.forEach(e=>e()),e(r)}),I.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let P,_=0,M,A=!1,O=0,q=!1;async function G(){clearTimeout(M);let[e,t]=await (P??(P=new Promise((e,t)=>(async()=>{let r,o;if(A){if(await E(O),!_)return P=void 0,t({code:1e3,reason:"All Subscriptions Gone"});O++}I.emit("connecting",A);let a=new R("function"==typeof g?await g():g,"graphql-transport-ws");function n(){isFinite(v)&&v>0&&(clearTimeout(o),o=setTimeout(()=>{a.readyState===R.OPEN&&(a.send(c({type:l.Ping})),I.emit("ping",!1,void 0))},v))}z(e=>{P=void 0,clearTimeout(r),clearTimeout(o),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>I.emit("error",e),a.onclose=e=>I.emit("closed",e),a.onopen=async()=>{try{I.emit("opened",a);let e="function"==typeof f?await f():f;if(a.readyState!==R.OPEN)return;a.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},T)),isFinite(x)&&x>0&&(r=setTimeout(()=>{a.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},x)),n()}catch(e){I.emit("error",e),a.close(s.InternalClientError,i(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let o=d("string"==typeof t?JSON.parse(t,N):t);if(I.emit("message",o),"ping"===o.type||"pong"===o.type){I.emit(o.type,!0,o.payload),"pong"===o.type?n():b||(a.send(c(o.payload?{type:l.Pong,payload:o.payload}:{type:l.Pong})),I.emit("pong",!1,o.payload));return}if(p)return;if(o.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${o.type}`);clearTimeout(r),p=!0,I.emit("connected",a,o.payload,A),A=!1,O=0,e([a,new Promise((e,t)=>z(t))])}catch(e){a.onmessage=null,I.emit("error",e),a.close(s.BadResponse,i(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===R.CLOSING&&await t;let r=()=>{},o=new Promise(e=>r=e);return[e,r,Promise.race([o.then(()=>{_||(isFinite(h)&&h>0?M=setTimeout(()=>{e.readyState===R.OPEN&&e.close(1e3,"Normal Closure")},h):e.close(1e3,"Normal Closure"))}),t])]}function D(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(q)return!1;if(p(e)&&1e3===e.code)return _>0;if(!w||O>=w||!C(e))throw e;return A=!0}function B(e,t){let r=j(e),o=!1,a=!1,n=()=>{_--,o=!0};return(async()=>{for(_++;;)try{let[i,s,d]=await G();if(o)return s();let u=I.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:a=!0,o=!0,t.error(e.payload),n();return;case l.Complete:o=!0,n();return}});i.send(c({id:r,type:l.Subscribe,payload:e},T)),n=()=>{o||i.readyState!==R.OPEN||i.send(c({id:r,type:l.Complete},T)),_--,o=!0,s()},await d.finally(u);return}catch(e){if(!D(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{o||n()}}return m||(async()=>{for(_++;;)try{let[,,e]=await G();await e}catch(e){try{if(!D(e))return}catch(e){return y?.(e)}}})(),{on:I.on,subscribe:B,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},o=B(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(o(),{done:!0,value:void 0}),a},async dispose(){if(q=!0,P){let[e]=await P;e.close(1e3,"Normal Closure")}},terminate(){P&&I.emit("closed",new u)}}}({url:m,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(709840),a=e.i(975157);let n=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:i=!1,...s}){let l=i?o.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,a.cn)(n({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:o,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",o),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...o}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...o})},"TableCell",0,function({className:e,...o}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...o})},"TableFooter",0,function({className:e,...o}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...o})},"TableHead",0,function({className:e,...o}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...o})},"TableHeader",0,function({className:e,...o}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...o})},"TableRow",0,function({className:e,...o}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...o})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},566595,e=>{"use strict";var t=e.i(630299);e.s(["Search",()=>t.default])},808562,e=>{"use strict";var t=e.i(843476),r=e.i(271645),o=e.i(30030);function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var n=Symbol.for("radix.slottable"),i=Symbol.for("react.lazy");function s(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===i&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var l=r[" use ".trim().toString()],d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,o)=>{var i;let d,c=(i=`Primitive.${o}`,(d=r.forwardRef((e,t)=>{var o;let d,c,{children:u,...p}=e,g=null,f=!1,m=[];s(u)&&"function"==typeof l&&(u=l(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===n){f=!0;let t="child"in e.props?e.props.child:e.props.children;s(t)&&"function"==typeof l&&(t=l(t._payload)),g=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),m.push(g?.props?.children)}else m.push(e)}),g?g=r.cloneElement(g,void 0,m):!f&&1===r.Children.count(u)&&r.isValidElement(u)&&(g=u);let y=g?(o=g,(c=(d=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?o.ref:(c=(d=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?o.props.ref:o.props.ref||o.ref):void 0,h=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,o=e.map(e=>{let o=a(e,t);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let t=0;t<o.length;t++){let r=o[t];"function"==typeof r?r():a(e[t],null)}}}}(...e),e)}(t,y);if(!g){if(u||0===u){let e,t;throw Error(f?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let v=function(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...e)=>{let t=n(...e);return a(...e),t}:a&&(r[o]=a):"style"===o?r[o]={...a,...n}:"className"===o&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}(p,g.props??{});return g.type!==r.Fragment&&(v.ref=t?h:y),r.cloneElement(g,v)})).displayName=`${i}.Slot`,d),u=r.forwardRef((e,r)=>{let{asChild:a,...n}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(a?c:o,{...n,ref:r})});return u.displayName=`Primitive.${o}`,{...e,[o]:u}},{}),c=e.i(842727);"u">typeof window&&window.document&&window.document.createElement;var u=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var p=r[" useInsertionEffect ".trim().toString()]||u;function g({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[n,i,s]=function({defaultProp:e,onChange:t}){let[o,a]=r.useState(e),n=r.useRef(o),i=r.useRef(t);return p(()=>{i.current=t},[t]),r.useEffect(()=>{n.current!==o&&(i.current?.(o),n.current=o)},[o,n]),[o,a,i]}({defaultProp:t,onChange:o}),l=void 0!==e,d=l?e:n;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,a])}return[d,r.useCallback(t=>{if(l){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else i(t)},[l,e,i,s])]}Symbol("RADIX:SYNC_STATE");var f="Toggle",m=r.forwardRef((e,r)=>{let{pressed:o,defaultPressed:a,onPressedChange:n,...i}=e,[s,l]=g({prop:o,onChange:n,defaultProp:a??!1,caller:f});return(0,t.jsx)(d.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:r,onClick:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),!1===r||!o||!o.defaultPrevented)return t?.(o)}}(e.onClick,()=>{e.disabled||l(!s)})})});m.displayName=f;var y=e.i(586318),h="ToggleGroup",[v,b]=(0,o.createContextScope)(h,[c.createRovingFocusGroupScope]),x=(0,c.createRovingFocusGroupScope)(),w=r.forwardRef((e,r)=>{let{type:o,...a}=e;if("single"===o)return(0,t.jsx)(S,{role:"radiogroup",...a,ref:r});if("multiple"===o)return(0,t.jsx)(k,{role:"toolbar",...a,ref:r});throw Error(`Missing prop \`type\` expected on \`${h}\``)});w.displayName=h;var[E,C]=v(h),S=r.forwardRef((e,o)=>{let{value:a,defaultValue:n,onValueChange:i=()=>{},...s}=e,[l,d]=g({prop:a,defaultProp:n??"",onChange:i,caller:h});return(0,t.jsx)(E,{scope:e.__scopeToggleGroup,type:"single",value:r.useMemo(()=>l?[l]:[],[l]),onItemActivate:d,onItemDeactivate:r.useCallback(()=>d(""),[d]),children:(0,t.jsx)(N,{...s,ref:o})})}),k=r.forwardRef((e,o)=>{let{value:a,defaultValue:n,onValueChange:i=()=>{},...s}=e,[l,d]=g({prop:a,defaultProp:n??[],onChange:i,caller:h}),c=r.useCallback(e=>d((t=[])=>[...t,e]),[d]),u=r.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return(0,t.jsx)(E,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:c,onItemDeactivate:u,children:(0,t.jsx)(N,{...s,ref:o})})});w.displayName=h;var[j,T]=v(h),N=r.forwardRef((e,r)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:n=!0,orientation:i,dir:s,loop:l=!0,...u}=e,p=x(o),g=(0,y.useDirection)(s),f={dir:g,...u};return(0,t.jsx)(j,{scope:o,rovingFocus:n,disabled:a,children:n?(0,t.jsx)(c.Root,{asChild:!0,...p,orientation:i,dir:g,loop:l,children:(0,t.jsx)(d.div,{...f,ref:r})}):(0,t.jsx)(d.div,{...f,ref:r})})}),$="ToggleGroupItem",R=r.forwardRef((e,o)=>{let a=C($,e.__scopeToggleGroup),n=T($,e.__scopeToggleGroup),i=x(e.__scopeToggleGroup),s=a.value.includes(e.value),l=n.disabled||e.disabled,d={...e,pressed:s,disabled:l},u=r.useRef(null);return n.rovingFocus?(0,t.jsx)(c.Item,{asChild:!0,...i,focusable:!l,active:s,ref:u,children:(0,t.jsx)(I,{...d,ref:o})}):(0,t.jsx)(I,{...d,ref:o})});R.displayName=$;var I=r.forwardRef((e,r)=>{let{__scopeToggleGroup:o,value:a,...n}=e,i=C($,o),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l="single"===i.type?s:void 0;return(0,t.jsx)(m,{...l,...n,ref:r,onPressedChange:e=>{e?i.onItemActivate(a):i.onItemDeactivate(a)}})});e.s(["Item",0,R,"Root",0,w,"ToggleGroup",0,w,"ToggleGroupItem",0,R,"createToggleGroupScope",0,b],459881);var z=e.i(459881),z=z,P=e.i(975157),_=e.i(225913);"u">typeof window&&window.document&&window.document.createElement;var M=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var A=r[" useInsertionEffect ".trim().toString()]||M;Symbol("RADIX:SYNC_STATE");var O=e.i(743556),q=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,o)=>{let a=(0,O.createSlot)(`Primitive.${o}`),n=r.forwardRef((e,r)=>{let{asChild:n,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?a:o,{...i,ref:r})});return n.displayName=`Primitive.${o}`,{...e,[o]:n}},{}),G="Toggle",D=r.forwardRef((e,o)=>{let{pressed:a,defaultPressed:n,onPressedChange:i,...s}=e,[l,d]=function({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[n,i,s]=function({defaultProp:e,onChange:t}){let[o,a]=r.useState(e),n=r.useRef(o),i=r.useRef(t);return A(()=>{i.current=t},[t]),r.useEffect(()=>{n.current!==o&&(i.current?.(o),n.current=o)},[o,n]),[o,a,i]}({defaultProp:t,onChange:o}),l=void 0!==e,d=l?e:n;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,a])}return[d,r.useCallback(t=>{if(l){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else i(t)},[l,e,i,s])]}({prop:a,onChange:i,defaultProp:n??!1,caller:G});return(0,t.jsx)(q.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:o,onClick:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),!1===r||!o||!o.defaultPrevented)return t?.(o)}}(e.onClick,()=>{e.disabled||d(!l)})})});D.displayName=G,e.s(["Root",0,D,"Toggle",0,D],864225),e.i(864225);let B=(0,_.cva)("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}}),W=r.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});e.s(["ToggleGroup",0,function({className:e,variant:r,size:o,spacing:a=2,orientation:n="horizontal",children:i,...s}){return(0,t.jsx)(z.Root,{"data-slot":"toggle-group","data-variant":r,"data-size":o,"data-spacing":a,"data-orientation":n,style:{"--gap":a},className:(0,P.cn)("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...s,children:(0,t.jsx)(W.Provider,{value:{variant:r,size:o,spacing:a,orientation:n},children:i})})},"ToggleGroupItem",0,function({className:e,children:o,variant:a="default",size:n="default",...i}){let s=r.useContext(W);return(0,t.jsx)(z.Item,{"data-slot":"toggle-group-item","data-variant":s.variant||a,"data-size":s.size||n,"data-spacing":s.spacing,className:(0,P.cn)("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",B({variant:s.variant||a,size:s.size||n}),e),...i,children:o})}],808562)},635416,96892,e=>{"use strict";var t=e.i(456420);let r=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,r],635416);let o=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,o],96892)},506184,e=>{"use strict";let t=(0,e.i(456420).default)("paintbrush",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);e.s(["Paintbrush",0,t],506184)},275043,e=>{"use strict";let t=(0,e.i(456420).default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},667259,e=>{"use strict";let t=(0,e.i(456420).default)("columns-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);e.s(["Columns3",0,t],667259)}]);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(a({variant:r}),e),...i})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===a(e)}function o(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let h=null;function m(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return h??=function(t){let r,n,a,i,{url:f,connectionParams:h,lazy:m=!0,onNonLazyError:g=console.error,lazyCloseTimeout:y=0,keepAlive:x=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:j=5,retryWait:w=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:k=p,on:S,webSocketImpl:C,generateID:E=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:N,jsonMessageReviver:R}=t;if(C){var T;if(!("function"==typeof(T=C)&&"constructor"in T&&"CLOSED"in T&&"CLOSING"in T&&"CONNECTING"in T&&"OPEN"in T))throw Error("Invalid WebSocket implementation provided");r=C}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let A=r,I=(n={},a={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},i={connecting:S?.connecting?[S.connecting]:[],opened:S?.opened?[S.opened]:[],connected:S?.connected?[S.connected]:[],ping:S?.ping?[S.ping]:[],pong:S?.pong?[S.pong]:[],message:S?.message?[a.emit,S.message]:[a.emit],closed:S?.closed?[S.closed]:[],error:S?.error?[S.error]:[]},{onMessage:a.on,on(e,t){let r=i[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...i[e]])r(...t)}});function L(e){let t=[I.on("error",r=>{t.forEach(e=>e()),e(r)}),I.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let P,D=0,$,_=!1,O=0,B=!1;async function M(){clearTimeout($);let[e,t]=await (P??(P=new Promise((e,t)=>(async()=>{let r,n;if(_){if(await w(O),!D)return P=void 0,t({code:1e3,reason:"All Subscriptions Gone"});O++}I.emit("connecting",_);let a=new A("function"==typeof f?await f():f,"graphql-transport-ws");function i(){isFinite(x)&&x>0&&(clearTimeout(n),n=setTimeout(()=>{a.readyState===A.OPEN&&(a.send(c({type:l.Ping})),I.emit("ping",!1,void 0))},x))}L(e=>{P=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>I.emit("error",e),a.onclose=e=>I.emit("closed",e),a.onopen=async()=>{try{I.emit("opened",a);let e="function"==typeof h?await h():h;if(a.readyState!==A.OPEN)return;a.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},N)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),i()}catch(e){I.emit("error",e),a.close(s.InternalClientError,o(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let n=d("string"==typeof t?JSON.parse(t,R):t);if(I.emit("message",n),"ping"===n.type||"pong"===n.type){I.emit(n.type,!0,n.payload),"pong"===n.type?i():b||(a.send(c(n.payload?{type:l.Pong,payload:n.payload}:{type:l.Pong})),I.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,I.emit("connected",a,n.payload,_),_=!1,O=0,e([a,new Promise((e,t)=>L(t))])}catch(e){a.onmessage=null,I.emit("error",e),a.close(s.BadResponse,o(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===A.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{D||(isFinite(y)&&y>0?$=setTimeout(()=>{e.readyState===A.OPEN&&e.close(1e3,"Normal Closure")},y):e.close(1e3,"Normal Closure"))}),t])]}function z(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(B)return!1;if(p(e)&&1e3===e.code)return D>0;if(!j||O>=j||!k(e))throw e;return _=!0}function F(e,t){let r=E(e),n=!1,a=!1,i=()=>{D--,n=!0};return(async()=>{for(D++;;)try{let[o,s,d]=await M();if(n)return s();let u=I.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:a=!0,n=!0,t.error(e.payload),i();return;case l.Complete:n=!0,i();return}});o.send(c({id:r,type:l.Subscribe,payload:e},N)),i=()=>{n||o.readyState!==A.OPEN||o.send(c({id:r,type:l.Complete},N)),D--,n=!0,s()},await d.finally(u);return}catch(e){if(!z(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{n||i()}}return m||(async()=>{for(D++;;)try{let[,,e]=await M();await e}catch(e){try{if(!z(e))return}catch(e){return g?.(e)}}})(),{on:I.on,subscribe:F,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=F(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(n(),{done:!0,value:void 0}),a},async dispose(){if(B=!0,P){let[e]=await P;e.close(1e3,"Normal Closure")}},terminate(){P&&I.emit("closed",new u)}}}({url:m,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),a=e.i(975157);let i=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:o=!1,...s}){let l=o?n.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,a.cn)(i({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:n,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",n),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...n})},"TableFooter",0,function({className:e,...n}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...n})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},624687,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Textarea",0,function({className:e,...n}){return(0,t.jsx)("textarea",{className:(0,r.cn)("min-h-24 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",e),...n})}])},59497,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}var i=e.i(30030);function o(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var s=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var l=r[" useInsertionEffect ".trim().toString()]||s;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),f=Symbol.for("react.lazy");function h(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===f&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var m=r[" use ".trim().toString()],g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var i;let o,s=(i=`Primitive.${n}`,(o=r.forwardRef((e,t)=>{var n;let o,s,{children:l,...d}=e,c=null,u=!1,f=[];h(l)&&"function"==typeof m&&(l=m(l._payload)),r.Children.forEach(l,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;h(t)&&"function"==typeof m&&(t=m(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),f.push(c?.props?.children)}else f.push(e)}),c?c=r.cloneElement(c,void 0,f):!u&&1===r.Children.count(l)&&r.isValidElement(l)&&(c=l);let g=c?(n=c,(s=(o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.ref:(s=(o=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,y=a(t,g);if(!c){if(l||0===l){let e,t;throw Error(u?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return l}let x=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(d,c.props??{});return c.type!==r.Fragment&&(x.ref=t?y:g),r.cloneElement(c,x)})).displayName=`${i}.Slot`,o),l=r.forwardRef((e,r)=>{let{asChild:a,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(a?s:n,{...i,ref:r})});return l.displayName=`Primitive.${n}`,{...e,[n]:l}},{}),y="Checkbox",[x,b]=(0,i.createContextScope)(y),[v,j]=x(y);function w(e){let{__scopeCheckbox:n,checked:a,children:i,defaultChecked:o,disabled:s,form:d,name:c,onCheckedChange:u,required:p,value:f="on",internal_do_not_use_render:h}=e,[m,g]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){let[i,o,s]=function({defaultProp:e,onChange:t}){let[n,a]=r.useState(e),i=r.useRef(n),o=r.useRef(t);return l(()=>{o.current=t},[t]),r.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,a,o]}({defaultProp:t,onChange:n}),d=void 0!==e,c=d?e:i;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${a} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,a])}return[c,r.useCallback(t=>{if(d){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else o(t)},[d,e,o,s])]}({prop:a,defaultProp:o??!1,onChange:u,caller:y}),[x,b]=r.useState(null),[j,w]=r.useState(null),k=r.useRef(!1),S=!x||!!d||!!x.closest("form"),C={checked:m,disabled:s,setChecked:g,control:x,setControl:b,name:c,form:d,value:f,hasConsumerStoppedPropagationRef:k,required:p,defaultChecked:!A(o)&&o,isFormControl:S,bubbleInput:j,setBubbleInput:w};return(0,t.jsx)(v,{scope:n,...C,children:"function"==typeof h?h(C):i})}var k="CheckboxTrigger",S=r.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:i,...s},l)=>{let{control:d,value:c,disabled:u,checked:p,required:f,setControl:h,setChecked:m,hasConsumerStoppedPropagationRef:y,isFormControl:x,bubbleInput:b}=j(k,e),v=a(l,h),w=r.useRef(p);return r.useEffect(()=>{let e=d?.form;if(e){let t=()=>m(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,m]),(0,t.jsx)(g.button,{type:"button",role:"checkbox","aria-checked":A(p)?"mixed":p,"aria-required":f,"data-state":I(p),"data-disabled":u?"":void 0,disabled:u,value:c,...s,ref:v,onKeyDown:o(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:o(i,e=>{m(e=>!!A(e)||!e),b&&x&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})});S.displayName=k;var C=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,name:a,checked:i,defaultChecked:o,required:s,disabled:l,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(w,{__scopeCheckbox:n,checked:i,defaultChecked:o,disabled:l,required:s,onCheckedChange:c,name:a,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S,{...p,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(T,{__scopeCheckbox:n})]})})});C.displayName=y;var E="CheckboxIndicator",N=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,forceMount:a,...i}=e,o=j(E,n);return(0,t.jsx)(u.Presence,{present:a||A(o.checked)||!0===o.checked,children:(0,t.jsx)(g.span,{"data-state":I(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:r,style:{pointerEvents:"none",...e.style}})})});N.displayName=E;var R="CheckboxBubbleInput",T=r.forwardRef(({__scopeCheckbox:e,...n},i)=>{let{control:o,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:u,required:p,disabled:f,name:h,value:m,form:y,bubbleInput:x,setBubbleInput:b}=j(R,e),v=a(i,b),w=(0,d.usePrevious)(l),k=(0,c.useSize)(o);r.useEffect(()=>{if(!x)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!s.current;if(w!==l&&e){let r=new Event("click",{bubbles:t});x.indeterminate=A(l),e.call(x,!A(l)&&l),x.dispatchEvent(r)}},[x,w,l,s]);let S=r.useRef(!A(l)&&l);return(0,t.jsx)(g.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??S.current,required:p,disabled:f,name:h,value:m,form:y,...n,tabIndex:-1,ref:v,style:{...n.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function A(e){return"indeterminate"===e}function I(e){return A(e)?"indeterminate":e?"checked":"unchecked"}T.displayName=R,e.s(["Checkbox",0,C,"CheckboxIndicator",0,N,"Indicator",0,N,"Root",0,C,"createCheckboxScope",0,b,"unstable_BubbleInput",0,T,"unstable_CheckboxBubbleInput",0,T,"unstable_CheckboxProvider",0,w,"unstable_CheckboxTrigger",0,S,"unstable_Provider",0,w,"unstable_Trigger",0,S],388474);var L=e.i(388474),L=L,P=e.i(975157),D=e.i(593698);e.s(["Checkbox",0,function({className:e,...r}){return(0,t.jsx)(L.Root,{"data-slot":"checkbox",className:(0,P.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...r,children:(0,t.jsx)(L.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(D.CheckIcon,{})})})}],59497)},110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var a=Symbol.for("radix.slottable"),i=Symbol.for("react.lazy");function o(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===i&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var s=r[" use ".trim().toString()],l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,i)=>{var l;let d,c=(l=`Primitive.${i}`,(d=r.forwardRef((e,t)=>{var i;let d,c,{children:u,...p}=e,f=null,h=!1,m=[];o(u)&&"function"==typeof s&&(u=s(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===a){h=!0;let t="child"in e.props?e.props.child:e.props.children;o(t)&&"function"==typeof s&&(t=s(t._payload)),f=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),m.push(f?.props?.children)}else m.push(e)}),f?f=r.cloneElement(f,void 0,m):!h&&1===r.Children.count(u)&&r.isValidElement(u)&&(f=u);let g=f?(i=f,(c=(d=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?i.ref:(c=(d=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,y=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}(t,g);if(!f){if(u||0===u){let e,t;throw Error(h?(e=l,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=l,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let x=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==r.Fragment&&(x.ref=t?y:g),r.cloneElement(f,x)})).displayName=`${l}.Slot`,d),u=r.forwardRef((e,r)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?c:i,{...a,ref:r})});return u.displayName=`Primitive.${i}`,{...e,[i]:u}},{}),d=r.forwardRef((e,r)=>(0,t.jsx)(l.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));d.displayName="Label",e.s(["Label",0,d,"Root",0,d],973741);var c=e.i(973741),c=c,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(c.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}function i(e){let r=t.forwardRef((r,n)=>{var i;let l,f,{children:h,...m}=r,g=null,y=!1,x=[];d(h)&&"function"==typeof p&&(h=p(h._payload)),t.Children.forEach(h,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===o){y=!0;let t="child"in e.props?e.props.child:e.props.children;d(t)&&"function"==typeof p&&(t=p(t._payload)),g=s(e,t),x.push(g?.props?.children)}else x.push(e)}),g?g=t.cloneElement(g,void 0,x):!y&&1===t.Children.count(h)&&t.isValidElement(h)&&(g=h);let b=g?(i=g,(f=(l=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.ref:(f=(l=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,v=a(n,b);if(!g){if(h||0===h)throw Error(y?u(e):c(e));return h}let j=function(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...e)=>{let t=i(...e);return a(...e),t}:a&&(r[n]=a):"style"===n?r[n]={...a,...i}:"className"===n&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}(m,g.props??{});return g.type!==t.Fragment&&(j.ref=n?v:b),t.cloneElement(g,j)});return r.displayName=`${e}.Slot`,r}var o=Symbol.for("radix.slottable"),s=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},l=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===l&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var c=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),h=new WeakMap;function m(e,t){var r,n;let a,i,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,a=r.length,(o=(i=g(n))>=0?i:a+i)<0||o>=a?-1:o);return -1===s?void 0:e[s]}function g(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],h.set(this,!0)}set(e,t){return h.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,a=this.has(t),i=this.#e.length,o=g(e),s=o>=0?o:i+o,l=s<0||s>=i?-1:s;if(l===this.size||a&&l===this.size-1||-1===l)return this.set(t,r),this;let d=this.size+ +!a;o<0&&s++;let c=[...this.#e],u=!1;for(let e=s;e<d;e++)if(s===e){let i=c[e];c[e]===t&&(i=c[e+1]),a&&this.delete(t),n=this.get(i),this.set(t,r)}else{u||c[e-1]!==t||(u=!0);let r=c[u?e:e-1],a=n;n=this.get(r),this.delete(r),this.set(r,a)}return this}with(t,r,n){let a=new e(this);return a.insert(t,r,n),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=m(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=m(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return m(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&n.push(e),a++;return new e(n)}map(t,r){let n=[],a=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(n)}reduce(...e){let[t,r]=e,n=0,a=r??this.at(0);for(let r of this)a=0===n&&1===e.length?r:Reflect.apply(t,this,[a,r,n,this]),n++;return a}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);n=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[n,a,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,a=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[o,s]=(0,r.createContextScope)(n),[l,d]=o(n,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:n}=e,a=t.useRef(null),i=t.useRef(new Map).current;return(0,f.jsx)(l,{scope:r,itemMap:i,collectionRef:a,children:n})};c.displayName=n;let u=e+"CollectionSlot",p=i(u),h=t.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=a(t,d(u,r).collectionRef);return(0,f.jsx)(p,{ref:i,children:n})});h.displayName=u;let m=e+"CollectionItemSlot",g="data-radix-collection-item",y=i(m),x=t.forwardRef((e,r)=>{let{scope:n,children:i,...o}=e,s=t.useRef(null),l=a(r,s),c=d(m,n);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...o}),()=>void c.itemMap.delete(s))),(0,f.jsx)(y,{...{[g]:""},ref:l,children:i})});return x.displayName=m,[{Provider:c,Slot:h,ItemSlot:x},function(r){let n=d(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}],75830);var y=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(y);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(560964),n=e.i(964053),a=e.i(519455),i=e.i(975157);function o({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function s({className:e,...r}){return(0,t.jsx)(n.Dialog.Overlay,{className:(0,i.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:l,showCloseButton:d=!0,...c}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(s,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,i.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[l,d&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(a.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Description,{className:(0,i.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...r})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:o,...s}){return(0,t.jsxs)("div",{className:(0,i.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...s,children:[o,r&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(a.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Title,{className:(0,i.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(n.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},21357,e=>{"use strict";let t=(0,e.i(456420).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],21357)},131460,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);e.s(["ArrowDownToLine",0,t],131460)},170428,e=>{"use strict";let t=(0,e.i(456420).default)("git-compare-arrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]);e.s(["GitCompareArrows",0,t],170428)},702143,e=>{"use strict";let t=`
|
|
2
|
+
id name description syncGlobally packageHash createdAt updatedAt
|
|
3
|
+
files { id path contentsBase64 executable contentHash createdAt updatedAt }
|
|
4
|
+
groups { id name createdAt updatedAt }
|
|
5
|
+
`,r=`
|
|
6
|
+
id kind status error createdAt updatedAt finishedAt
|
|
7
|
+
group { id name }
|
|
8
|
+
items {
|
|
9
|
+
id direction status sourceHash targetHash resolution candidatePackage error createdAt updatedAt
|
|
10
|
+
skill { id name description }
|
|
11
|
+
agent { id name hostname connectionStatus }
|
|
12
|
+
installation {
|
|
13
|
+
id scope rootKind rootPath skillName description packageHash fileCount totalBytes tracked consumers lastSeenAt
|
|
14
|
+
agent { id name hostname connectionStatus }
|
|
15
|
+
codebase { id folder repository { id name displayOrigin } }
|
|
16
|
+
worktree { id folder }
|
|
17
|
+
skill { id name packageHash }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;e.s(["SKILL_FIELDS",0,t,"SKILL_SYNC_RUN_FIELDS",0,r])},629864,e=>{"use strict";var t=e.i(843476),r=e.i(131460),n=e.i(711241),a=e.i(456420);let i=(0,a.default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);var o=e.i(689664),s=e.i(170428),l=e.i(21357);let d=(0,a.default)("skip-forward",[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]]);var c=e.i(573474),u=e.i(948148),p=e.i(271645),f=e.i(929592),h=e.i(487486),m=e.i(519455),g=e.i(515288),y=e.i(59497),x=e.i(776639),b=e.i(793479),v=e.i(110204),j=e.i(967489),w=e.i(987968),k=e.i(784774),S=e.i(624687),C=e.i(520133),E=e.i(637611),N=e.i(702143);let R="__none__",T={SCAN:0,READ:1,APPLY:2};function A(e){let t=window.atob(e);return Uint8Array.from(t,e=>e.charCodeAt(0))}function I(e){if(!e)return null;let t=A(e.contentsBase64);if(t.includes(0))return null;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch{return null}}function L(e){return e.toLocaleLowerCase().split("_").map(e=>e.charAt(0).toLocaleUpperCase()+e.slice(1)).join(" ")}function P({file:e,missingLabel:r,binaryLabel:n,executableLabel:a}){if(!e)return(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:r});let i=I(e);return null===i?(0,t.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,t.jsx)("p",{children:n}),(0,t.jsxs)("p",{children:[A(e.contentsBase64).byteLength.toLocaleString()," B"]}),e.executable&&(0,t.jsx)(h.Badge,{variant:"outline",children:a})]}):(0,t.jsx)("pre",{className:"max-h-64 overflow-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 font-mono text-xs",children:i})}e.s(["SkillSyncPage",0,function({runId:e}){let a=(0,u.useTranslations)("skills"),D=(0,u.useTranslations)("status"),[$,_]=(0,p.useState)(null),[O,B]=(0,p.useState)([]),[M,z]=(0,p.useState)(!0),[F,q]=(0,p.useState)(!1),[H,V]=(0,p.useState)(null),[K,W]=(0,p.useState)(null),[U,G]=(0,p.useState)([]),[Y,X]=(0,p.useState)([]),[J,Z]=(0,p.useState)("SKILL.md"),[Q,ee]=(0,p.useState)("SKILL.md"),[et,er]=(0,p.useState)(!1),[en,ea]=(0,p.useState)({}),ei=(0,p.useCallback)(async()=>{try{let t=await (0,E.controlPlaneRequest)(`query SkillSyncRun($id: ID!) {
|
|
21
|
+
skillSyncRun(id: $id) { ${N.SKILL_SYNC_RUN_FIELDS} }
|
|
22
|
+
skillsOverview { groups { id name } }
|
|
23
|
+
}`,{id:e});if(!t.skillSyncRun)throw Error(a("syncRunNotFound"));_(t.skillSyncRun),B(t.skillsOverview.groups),V(null)}catch(e){V(e instanceof Error?e.message:String(e))}finally{z(!1)}},[e,a]);(0,p.useEffect)(()=>{let t=window.setTimeout(()=>void ei(),0),r=window.setInterval(()=>void ei(),1e4),n=(0,E.controlPlaneSubscriptions)().subscribe({query:`subscription SkillSyncRunChanged($runId: ID!) {
|
|
24
|
+
skillSyncRunChanged(runId: $runId) { ${N.SKILL_SYNC_RUN_FIELDS} }
|
|
25
|
+
}`,variables:{runId:e}},{next:e=>e.data?.skillSyncRunChanged&&_(e.data.skillSyncRunChanged),error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(t),window.clearInterval(r),n()}},[ei,e]);let eo=(0,p.useMemo)(()=>$?.items.filter(e=>!["SCAN","READ","APPLY"].includes(e.direction))??[],[$]),es=(0,p.useMemo)(()=>{let e=new Map;for(let t of $?.items??[]){if(!["SCAN","READ","APPLY"].includes(t.direction))continue;let r=t.agent?.id??t.id,n=e.get(r),a=T[t.direction]??0,i=n?T[n.direction]??0:-1;(!n||a>i||a===i&&t.updatedAt>n.updatedAt)&&e.set(r,t)}return[...e.values()]},[$]),el=(0,p.useMemo)(()=>es.filter(e=>"PENDING"===e.status),[es]),ed=(0,p.useMemo)(()=>K?.candidatePackage?.package?.files??[],[K]),ec=(0,p.useMemo)(()=>[...new Set([...U,...ed,...Y].map(e=>e.path))].sort((e,t)=>e.localeCompare(t)),[U,Y,ed]),eu=U.find(e=>e.path===J),ep=ed.find(e=>e.path===J),ef=Y.find(e=>e.path===J),eh=async(e,t,r)=>{q(!0);try{let n=r?.package,a=await (0,E.controlPlaneRequest)(`mutation ResolveSkillSyncItem($input: ResolveSkillSyncItemInput!) {
|
|
26
|
+
resolveSkillSyncItem(input: $input) { ${N.SKILL_SYNC_RUN_FIELDS} }
|
|
27
|
+
}`,{input:{itemId:e.id,resolution:t,groupId:en[e.id]||null,package:n?{name:n.name,description:n.description,files:n.files}:null}});_(a.resolveSkillSyncItem),W(null),V(null)}catch(e){V(e instanceof Error?e.message:String(e))}finally{q(!1)}},em=async()=>{q(!0);try{let t=await (0,E.controlPlaneRequest)(`mutation ApplySkillSync($runId: ID!) {
|
|
28
|
+
applySkillSync(runId: $runId) { ${N.SKILL_SYNC_RUN_FIELDS} }
|
|
29
|
+
}`,{runId:e});_(t.applySkillSync)}catch(e){V(e instanceof Error?e.message:String(e))}finally{q(!1)}},eg=async()=>{q(!0);try{let t=await (0,E.controlPlaneRequest)(`mutation SkipPendingSkillSync($runId: ID!) {
|
|
30
|
+
skipPendingSkillSync(runId: $runId) { ${N.SKILL_SYNC_RUN_FIELDS} }
|
|
31
|
+
}`,{runId:e});_(t.skipPendingSkillSync),V(null)}catch(e){V(e instanceof Error?e.message:String(e))}finally{q(!1)}},ey=async e=>{let t=e.candidatePackage?.package;if(t&&(W(e),X(t.files.map(e=>({...e}))),Z("SKILL.md"),ee("SKILL.md"),G([]),e.skill)){er(!0);try{let t=await (0,E.controlPlaneRequest)(`query ConflictDatabasePackage($id: ID!) {
|
|
32
|
+
skill(id: $id) { files { path contentsBase64 executable } }
|
|
33
|
+
}`,{id:e.skill.id});G(t.skill?.files??[])}catch(e){V(e instanceof Error?e.message:String(e))}finally{er(!1)}}},ex=async()=>{if(!K?.candidatePackage?.package)return;let e=K.candidatePackage.package;await eh(K,"MANUAL",{...K.candidatePackage,package:{...e,files:Y}})},eb=async e=>{if(!e)return;let t=await Promise.all([...e].map(async e=>({path:e.name,contentsBase64:function(e){let t="";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return window.btoa(t)}(new Uint8Array(await e.arrayBuffer())),executable:!1})));X(e=>[...e.filter(e=>!t.some(t=>t.path===e.path)),...t]),t[0]&&(Z(t[0].path),ee(t[0].path))};return M||!$?(0,t.jsxs)("div",{className:"flex gap-2 p-6 text-sm text-muted-foreground",children:[(0,t.jsx)(w.Spinner,{})," ",a("loadingSync")]}):(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col gap-4 overflow-auto p-4 sm:p-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(m.Button,{asChild:!0,size:"icon",variant:"ghost",children:(0,t.jsx)(C.Link,{"aria-label":a("backToSkills"),href:"/skills",children:(0,t.jsx)(n.ArrowLeft,{})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:a("syncTitle")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:$.group?a("syncGroupName",{name:$.group.name}):a("syncAllDescription")})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.Badge,{variant:"SUCCEEDED"===$.status?"secondary":"outline",children:L($.status)}),el.length>0&&(0,t.jsxs)(m.Button,{disabled:F,onClick:()=>void eg(),variant:"outline",children:[F?(0,t.jsx)(w.Spinner,{}):(0,t.jsx)(d,{})," ",a("skipPendingClients")]}),(0,t.jsxs)(m.Button,{disabled:F||!["READY","PARTIAL"].includes($.status),onClick:()=>void em(),children:[F?(0,t.jsx)(w.Spinner,{}):(0,t.jsx)(l.Play,{})," ",a("applySync")]})]})]}),H&&(0,t.jsx)(f.Alert,{variant:"destructive",children:(0,t.jsx)(f.AlertDescription,{children:H})}),es.length>0&&(0,t.jsxs)(g.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(g.CardHeader,{children:[(0,t.jsx)(g.CardTitle,{children:a("syncAgents")}),(0,t.jsx)(g.CardDescription,{children:a("syncAgentsDescription")})]}),(0,t.jsx)(g.CardContent,{className:"px-0",children:(0,t.jsxs)(k.Table,{children:[(0,t.jsx)(k.TableHeader,{children:(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableHead,{children:a("agent")}),(0,t.jsx)(k.TableHead,{children:a("connection")}),(0,t.jsx)(k.TableHead,{children:a("operation")}),(0,t.jsx)(k.TableHead,{children:a("syncStatus")})]})}),(0,t.jsx)(k.TableBody,{children:es.map(e=>{let r=e.agent?.connectionStatus==="ONLINE";return(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableCell,{className:"font-medium",children:e.agent?.name??a("unknownAgent")}),(0,t.jsx)(k.TableCell,{children:(0,t.jsx)(h.Badge,{className:r?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":void 0,variant:r?"outline":"secondary",children:D(r?"online":"offline")})}),(0,t.jsx)(k.TableCell,{children:(0,t.jsx)(h.Badge,{variant:"outline",children:L(e.direction)})}),(0,t.jsx)(k.TableCell,{children:(0,t.jsx)(h.Badge,{variant:"FAILED"===e.status?"destructive":"COMPLETE"===e.status||"SUCCEEDED"===e.status?"secondary":"outline",children:L(e.status)})})]},e.id)})})]})})]}),(0,t.jsxs)(g.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(g.CardHeader,{children:[(0,t.jsx)(g.CardTitle,{children:a("syncChanges")}),(0,t.jsx)(g.CardDescription,{children:a("syncChangesDescription")})]}),(0,t.jsx)(g.CardContent,{className:"px-0",children:(0,t.jsxs)(k.Table,{children:[(0,t.jsx)(k.TableHeader,{children:(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableHead,{children:a("change")}),(0,t.jsx)(k.TableHead,{children:a("name")}),(0,t.jsx)(k.TableHead,{children:a("agent")}),(0,t.jsx)(k.TableHead,{children:a("location")}),(0,t.jsx)(k.TableHead,{children:a("status")}),(0,t.jsx)(k.TableHead,{children:a("resolution")})]})}),(0,t.jsxs)(k.TableBody,{children:[eo.map(e=>{var n;let l=e.candidatePackage?.projectGroupRequired,d="IMPORT"===e.direction&&e.installation&&!e.installation.tracked;return(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableCell,{children:(0,t.jsxs)(h.Badge,{className:"gap-1",variant:"CONFLICT"===e.direction?"destructive":"outline",children:["IMPORT"===(n=e.direction)?(0,t.jsx)(r.ArrowDownToLine,{}):"EXPORT"===n?(0,t.jsx)(i,{}):"DELETE_REDUNDANT"===n?(0,t.jsx)(c.Trash2,{}):"CONFLICT"===n?(0,t.jsx)(s.GitCompareArrows,{}):(0,t.jsx)(o.Check,{})," ",L(e.direction)]})}),(0,t.jsx)(k.TableCell,{className:"font-medium",children:e.skill?.name??e.installation?.skillName??"—"}),(0,t.jsx)(k.TableCell,{children:e.agent?.name??e.installation?.agent.name??"—"}),(0,t.jsx)(k.TableCell,{className:"max-w-md whitespace-normal font-mono text-xs",children:e.installation?.rootPath??a("newSharedLocation")}),(0,t.jsx)(k.TableCell,{children:(0,t.jsx)(h.Badge,{variant:"BLOCKED"===e.status?"destructive":"READY"===e.status||"COMPLETE"===e.status?"secondary":"outline",children:L(e.status)})}),(0,t.jsxs)(k.TableCell,{children:[l&&"BLOCKED"===e.status&&(0,t.jsxs)(j.Select,{onValueChange:t=>ea(r=>({...r,[e.id]:t===R?"":t})),value:en[e.id]||R,children:[(0,t.jsx)(j.SelectTrigger,{className:"mb-1 w-full min-w-48",size:"sm",children:(0,t.jsx)(j.SelectValue,{placeholder:a("chooseGroup")})}),(0,t.jsxs)(j.SelectContent,{align:"start",children:[(0,t.jsx)(j.SelectItem,{value:R,children:a("chooseGroup")}),O.map(e=>(0,t.jsx)(j.SelectItem,{value:e.id,children:e.name},e.id))]})]}),"BLOCKED"===e.status?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skill&&(0,t.jsx)(m.Button,{disabled:F,onClick:()=>void eh(e,"DATABASE"),size:"sm",variant:"outline",children:a("useDatabase")}),e.candidatePackage?.package&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{disabled:F||l&&!en[e.id],onClick:()=>void eh(e,"TARGET"),size:"sm",variant:"outline",children:a("useTarget")}),(0,t.jsxs)(m.Button,{disabled:F,onClick:()=>void ey(e),size:"sm",variant:"outline",children:[(0,t.jsx)(s.GitCompareArrows,{})," ",a("compareAndResolve")]})]}),d&&(0,t.jsxs)(m.Button,{disabled:F,onClick:()=>void eh(e,"DELETE"),size:"sm",variant:"destructive",children:[(0,t.jsx)(c.Trash2,{})," ",a("deleteClientCopy")]}),(0,t.jsx)(m.Button,{disabled:F,onClick:()=>void eh(e,"SKIP"),size:"sm",variant:"outline",children:a("skip")})]}):d&&"READY"===e.status?(0,t.jsxs)(m.Button,{disabled:F,onClick:()=>void eh(e,"DELETE"),size:"sm",variant:"destructive",children:[(0,t.jsx)(c.Trash2,{})," ",a("deleteClientCopy")]}):e.resolution?L(e.resolution):"—"]})]},e.id)}),!eo.length&&(0,t.jsx)(k.TableRow,{children:(0,t.jsx)(k.TableCell,{className:"py-10 text-center text-muted-foreground",colSpan:6,children:"PREPARING"===$.status?a("scanningAgents"):a("noSyncChanges")})})]})]})})]}),(0,t.jsx)(x.Dialog,{onOpenChange:e=>{e||(W(null),G([]),X([]))},open:!!K,children:(0,t.jsxs)(x.DialogContent,{className:"flex max-h-[92vh] flex-col overflow-hidden sm:max-w-6xl",children:[(0,t.jsxs)(x.DialogHeader,{className:"shrink-0",children:[(0,t.jsx)(x.DialogTitle,{children:a("manualResolution")}),(0,t.jsx)(x.DialogDescription,{children:a("manualResolutionDescription")})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,t.jsxs)(m.Button,{disabled:!U.length||et,onClick:()=>X(U.map(e=>({...e}))),size:"sm",variant:"outline",children:[et?(0,t.jsx)(w.Spinner,{}):(0,t.jsx)(r.ArrowDownToLine,{})," ",a("startFromDatabase")]}),(0,t.jsxs)(m.Button,{disabled:!ed.length,onClick:()=>X(ed.map(e=>({...e}))),size:"sm",variant:"outline",children:[(0,t.jsx)(r.ArrowDownToLine,{})," ",a("startFromTarget")]}),(0,t.jsx)(m.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsx)(v.Label,{className:"cursor-pointer",htmlFor:"manual-package-upload",children:a("addFiles")})}),(0,t.jsx)(b.Input,{className:"sr-only",id:"manual-package-upload",multiple:!0,onChange:e=>void eb(e.currentTarget.files),type:"file"})]}),(0,t.jsxs)("div",{className:"grid min-h-0 flex-1 gap-4 overflow-y-auto lg:grid-cols-[14rem_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"space-y-1 rounded-md border p-2",children:[(0,t.jsx)("p",{className:"px-2 py-1 text-xs font-medium text-muted-foreground",children:a("packageFiles")}),ec.map(e=>(0,t.jsx)("button",{className:`block w-full truncate rounded px-2 py-1.5 text-left font-mono text-xs ${e===J?"bg-accent text-accent-foreground":"hover:bg-muted"}`,onClick:()=>{Z(e),ee(e)},type:"button",children:e},e))]}),(0,t.jsxs)("div",{className:"min-w-0 space-y-4",children:[(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsx)(v.Label,{children:a("databaseVersion")}),et?(0,t.jsx)(w.Spinner,{}):(0,t.jsx)(P,{binaryLabel:a("binaryPreview"),executableLabel:a("executable"),file:eu,missingLabel:a("missingFile")})]}),(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsx)(v.Label,{children:a("targetVersion")}),(0,t.jsx)(P,{binaryLabel:a("binaryPreview"),executableLabel:a("executable"),file:ep,missingLabel:a("missingFile")})]})]}),(0,t.jsxs)("div",{className:"space-y-3 rounded-md border p-3",children:[(0,t.jsx)(v.Label,{children:a("resultVersion")}),ef?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,t.jsxs)("div",{className:"min-w-64 flex-1 space-y-1",children:[(0,t.jsx)(v.Label,{htmlFor:"manual-file-path",children:a("filePath")}),(0,t.jsx)(b.Input,{id:"manual-file-path",onChange:e=>ee(e.target.value),value:Q})]}),(0,t.jsx)(m.Button,{disabled:!Q.trim()||Q.trim()!==ef.path&&Y.some(e=>e.path===Q.trim()),onClick:()=>{let e=Q.trim().replaceAll("\\","/");!ef||!e||e!==ef.path&&Y.some(t=>t.path===e)||(X(t=>t.map(t=>t.path===ef.path?{...t,path:e}:t)),Z(e),ee(e))},variant:"outline",children:a("rename")}),(0,t.jsxs)(v.Label,{className:"flex h-8 items-center gap-2 rounded-lg border px-3",children:[(0,t.jsx)(y.Checkbox,{checked:ef.executable,onCheckedChange:e=>X(t=>t.map(t=>t.path===ef.path?{...t,executable:!0===e}:t))}),a("executable")]}),(0,t.jsxs)(m.Button,{disabled:"SKILL.md"===ef.path,onClick:()=>{X(e=>e.filter(e=>e.path!==ef.path));let e=ec.find(e=>e!==ef.path);Z(e??"SKILL.md"),ee(e??"SKILL.md")},variant:"destructive",children:[(0,t.jsx)(c.Trash2,{})," ",a("removeFile")]})]}),null===I(ef)?(0,t.jsxs)("div",{className:"space-y-2 rounded-md bg-muted/30 p-3 text-sm text-muted-foreground",children:[(0,t.jsx)("p",{children:a("binaryFile")}),(0,t.jsxs)("p",{children:[A(ef.contentsBase64).byteLength.toLocaleString()," ","B"]})]}):(0,t.jsx)(S.Textarea,{className:"min-h-48 font-mono text-xs",onChange:e=>X(t=>t.map(t=>t.path===ef.path?{...t,contentsBase64:function(e){let t=new TextEncoder().encode(e),r="";for(let e of t)r+=String.fromCharCode(e);return window.btoa(r)}(e.target.value)}:t)),value:I(ef)??""})]}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:a("missingResultFile")})]})]})]}),(0,t.jsx)(x.DialogFooter,{className:"shrink-0",children:(0,t.jsxs)(m.Button,{disabled:F||!Y.some(e=>"SKILL.md"===e.path)||K?.candidatePackage?.projectGroupRequired===!0&&!en[K.id],onClick:()=>void ex(),children:[F&&(0,t.jsx)(w.Spinner,{})," ",a("useManualVersion")]})})]})})]})}],629864)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(975157);let n=(0,r.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,a.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...r})},"EmptyDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,a.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...r})},"EmptyHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,a.cn)("flex max-w-sm flex-col items-center gap-2",e),...r})},"EmptyMedia",0,function({className:e,variant:r="default",...o}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":r,className:(0,a.cn)(n({variant:r,className:e})),...o})},"EmptyTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,a.cn)("font-heading text-sm font-medium tracking-tight",e),...r})}])},711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(975157);let n=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...o}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,a.cn)(n({variant:r}),e),...o})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:a="default",...n}){return(0,t.jsx)("div",{"data-slot":"card","data-size":a,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...a})},"CardDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a})},"CardFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...a})},"CardHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a})},"CardTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...a})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),a=e.i(758379),a=a;e.s(["Spinner",0,function({className:e,...n}){return(0,t.jsx)(a.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...n})}],987968)},637611,e=>{"use strict";var t,r,a=e.i(247167);function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function o(e){return"object"===n(e)}function i(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!o(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!o(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!o(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return o(e)&&"code"in e&&"reason"in e}async function m(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),a=await r.json();if(!r.ok||a.errors?.length||!a.data)throw Error(a.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return a.data}let f=null;function g(){return function(e,t,r){let a=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return a;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return a}catch{}return e}(a.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,m,"controlPlaneSubscriptions",0,function(){return f??=function(t){let r,a,n,o,{url:m,connectionParams:f,lazy:g=!0,onNonLazyError:x=console.error,lazyCloseTimeout:h=0,keepAlive:y=0,disablePong:v,connectionAckWaitTimeout:b=0,retryAttempts:j=5,retryWait:w=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:C=p,on:N,webSocketImpl:T,generateID:E=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:k,jsonMessageReviver:A}=t;if(T){var S;if(!("function"==typeof(S=T)&&"constructor"in S&&"CLOSED"in S&&"CLOSING"in S&&"CONNECTING"in S&&"OPEN"in S))throw Error("Invalid WebSocket implementation provided");r=T}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let D=r,R=(a={},n={on:(e,t)=>(a[e]=t,()=>{delete a[e]}),emit(e){"id"in e&&a[e.id]?.(e)}},o={connecting:N?.connecting?[N.connecting]:[],opened:N?.opened?[N.opened]:[],connected:N?.connected?[N.connected]:[],ping:N?.ping?[N.ping]:[],pong:N?.pong?[N.pong]:[],message:N?.message?[n.emit,N.message]:[n.emit],closed:N?.closed?[N.closed]:[],error:N?.error?[N.error]:[]},{onMessage:n.on,on(e,t){let r=o[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...o[e]])r(...t)}});function $(e){let t=[R.on("error",r=>{t.forEach(e=>e()),e(r)}),R.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let z,P=0,O,I=!1,M=0,q=!1;async function B(){clearTimeout(O);let[e,t]=await (z??(z=new Promise((e,t)=>(async()=>{let r,a;if(I){if(await w(M),!P)return z=void 0,t({code:1e3,reason:"All Subscriptions Gone"});M++}R.emit("connecting",I);let n=new D("function"==typeof m?await m():m,"graphql-transport-ws");function o(){isFinite(y)&&y>0&&(clearTimeout(a),a=setTimeout(()=>{n.readyState===D.OPEN&&(n.send(c({type:l.Ping})),R.emit("ping",!1,void 0))},y))}$(e=>{z=void 0,clearTimeout(r),clearTimeout(a),t(e),e instanceof u&&(n.close(4499,"Terminated"),n.onerror=null,n.onclose=null)}),n.onerror=e=>R.emit("error",e),n.onclose=e=>R.emit("closed",e),n.onopen=async()=>{try{R.emit("opened",n);let e="function"==typeof f?await f():f;if(n.readyState!==D.OPEN)return;n.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},k)),isFinite(b)&&b>0&&(r=setTimeout(()=>{n.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},b)),o()}catch(e){R.emit("error",e),n.close(s.InternalClientError,i(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;n.onmessage=({data:t})=>{try{let a=d("string"==typeof t?JSON.parse(t,A):t);if(R.emit("message",a),"ping"===a.type||"pong"===a.type){R.emit(a.type,!0,a.payload),"pong"===a.type?o():v||(n.send(c(a.payload?{type:l.Pong,payload:a.payload}:{type:l.Pong})),R.emit("pong",!1,a.payload));return}if(p)return;if(a.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${a.type}`);clearTimeout(r),p=!0,R.emit("connected",n,a.payload,I),I=!1,M=0,e([n,new Promise((e,t)=>$(t))])}catch(e){n.onmessage=null,R.emit("error",e),n.close(s.BadResponse,i(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===D.CLOSING&&await t;let r=()=>{},a=new Promise(e=>r=e);return[e,r,Promise.race([a.then(()=>{P||(isFinite(h)&&h>0?O=setTimeout(()=>{e.readyState===D.OPEN&&e.close(1e3,"Normal Closure")},h):e.close(1e3,"Normal Closure"))}),t])]}function _(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(q)return!1;if(p(e)&&1e3===e.code)return P>0;if(!j||M>=j||!C(e))throw e;return I=!0}function F(e,t){let r=E(e),a=!1,n=!1,o=()=>{P--,a=!0};return(async()=>{for(P++;;)try{let[i,s,d]=await B();if(a)return s();let u=R.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:n=!0,a=!0,t.error(e.payload),o();return;case l.Complete:a=!0,o();return}});i.send(c({id:r,type:l.Subscribe,payload:e},k)),o=()=>{a||i.readyState!==D.OPEN||i.send(c({id:r,type:l.Complete},k)),P--,a=!0,s()},await d.finally(u);return}catch(e){if(!_(e))return}})().then(()=>{n||t.complete()}).catch(e=>{t.error(e)}),()=>{a||o()}}return g||(async()=>{for(P++;;)try{let[,,e]=await B();await e}catch(e){try{if(!_(e))return}catch(e){return x?.(e)}}})(),{on:R.on,subscribe:F,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},a=F(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),n=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return n.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),n.return=async()=>(a(),{done:!0,value:void 0}),n},async dispose(){if(q=!0,z){let[e]=await z;e.close(1e3,"Normal Closure")}},terminate(){z&&R.emit("closed",new u)}}}({url:g,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(709840),n=e.i(975157);let o=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:i=!1,...s}){let l=i?a.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,n.cn)(o({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:a,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",a),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...n})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...a})},"TableFooter",0,function({className:e,...a}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...a})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function o(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=n(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}var i=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var s="AlertDialog",[l,d]=(0,a.createContextScope)(s,[i.createDialogScope]),c=(0,i.createDialogScope)(),u=e=>{let{__scopeAlertDialog:r,...a}=e,n=c(r);return(0,t.jsx)(i.Root,{...n,...a,modal:!0})};u.displayName=s;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Trigger,{...o,...n,ref:r})});p.displayName="AlertDialogTrigger";var m=e=>{let{__scopeAlertDialog:r,...a}=e,n=c(r);return(0,t.jsx)(i.Portal,{...n,...a})};m.displayName="AlertDialogPortal";var f=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Overlay,{...o,...n,ref:r})});f.displayName="AlertDialogOverlay";var g="AlertDialogContent",[x,h]=l(g),y=r.forwardRef((e,a)=>{let{__scopeAlertDialog:n,children:s,...l}=e,d=c(n),u=o(a,r.useRef(null)),p=r.useRef(null);return(0,t.jsx)(x,{scope:n,cancelRef:p,children:(0,t.jsx)(i.Content,{role:"alertdialog",...d,...l,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),!1===r||!a||!a.defaultPrevented)return t?.(a)}}(l.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:s})})});y.displayName=g;var v=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Title,{...o,...n,ref:r})});v.displayName="AlertDialogTitle";var b=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Description,{...o,...n,ref:r})});b.displayName="AlertDialogDescription";var j=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Close,{...o,...n,ref:r})});j.displayName="AlertDialogAction";var w="AlertDialogCancel",C=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,{cancelRef:s}=h(w,a),l=c(a),d=o(r,s);return(0,t.jsx)(i.Close,{...l,...n,ref:d})});C.displayName=w,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,C,"AlertDialogContent",0,y,"AlertDialogDescription",0,b,"AlertDialogOverlay",0,f,"AlertDialogPortal",0,m,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,p,"Cancel",0,C,"Content",0,y,"Description",0,b,"Overlay",0,f,"Portal",0,m,"Root",0,u,"Title",0,v,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var N=e.i(691162),N=N,T=e.i(975157),E=e.i(519455);function k({...e}){return(0,t.jsx)(N.Root,{"data-slot":"alert-dialog",...e})}function A({...e}){return(0,t.jsx)(N.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function S({...e}){return(0,t.jsx)(N.Portal,{"data-slot":"alert-dialog-portal",...e})}function D({className:e,...r}){return(0,t.jsx)(N.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,T.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...r})}function R({className:e,size:r="default",...a}){return(0,t.jsxs)(S,{children:[(0,t.jsx)(D,{}),(0,t.jsx)(N.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,T.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})]})}function $({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,T.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function z({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,T.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function P({className:e,...r}){return(0,t.jsx)(N.Title,{"data-slot":"alert-dialog-title",className:(0,T.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function O({className:e,...r}){return(0,t.jsx)(N.Description,{"data-slot":"alert-dialog-description",className:(0,T.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...r})}function I({className:e,variant:r="default",size:a="default",...n}){return(0,t.jsx)(E.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(N.Action,{"data-slot":"alert-dialog-action",className:(0,T.cn)(e),...n})})}function M({className:e,variant:r="outline",size:a="default",...n}){return(0,t.jsx)(E.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(N.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,T.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:r,description:a,onConfirm:n,onOpenChange:o,open:i,title:s,trigger:l}){return(0,t.jsxs)(k,{onOpenChange:o,open:i,children:[l&&(0,t.jsx)(A,{asChild:!0,children:l}),(0,t.jsxs)(R,{children:[(0,t.jsxs)($,{children:[(0,t.jsx)(P,{children:s}),(0,t.jsx)(O,{children:a})]}),(0,t.jsxs)(z,{children:[(0,t.jsx)(M,{children:r}),(0,t.jsx)(I,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},845363,e=>{"use strict";var t=e.i(843476),r=e.i(711241),a=e.i(741120),n=e.i(573474),o=e.i(948148),i=e.i(271645),s=e.i(340953),l=e.i(929592),d=e.i(487486),c=e.i(519455),u=e.i(515288),p=e.i(82612),m=e.i(987968),f=e.i(784774),g=e.i(520133),x=e.i(637611);function h(e){return e?new Date(e).toLocaleString():"—"}function y({label:e,value:r}){return(0,t.jsx)(u.Card,{children:(0,t.jsxs)(u.CardContent,{children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"mt-1 text-sm font-medium",children:r})]})})}function v({title:e,value:r}){let a=(0,o.useTranslations)("jiraCacheDetail");return(0,t.jsxs)(u.Card,{className:"gap-0 py-0",children:[(0,t.jsx)(u.CardHeader,{className:"border-b py-4",children:(0,t.jsx)(u.CardTitle,{children:e})}),null===r?(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground",children:a("notFetched")}):(0,t.jsx)("pre",{className:"max-h-[36rem] overflow-auto p-4 text-xs leading-5",children:JSON.stringify(r,null,2)})]})}e.s(["JiraCacheTicketDetailPage",0,function({issueKey:e}){let b=(0,o.useTranslations)("jiraCacheDetail"),j=(0,o.useTranslations)("common"),w=(0,g.useRouter)(),[C,N]=(0,i.useState)(null),[T,E]=(0,i.useState)(!0),[k,A]=(0,i.useState)(!1),[S,D]=(0,i.useState)(null),R=(0,i.useCallback)(async()=>{E(!0);try{let t=await (0,x.controlPlaneRequest)("query CachedJiraTicket($issueKey: ID!) { jiraCachedTicket(issueKey: $issueKey) { issueKey projectKey summary status coverage stale summaryFetchedAt detailFetchedAt commentsFetchedAt updatedAt summaryData detailData commentsData cacheEntries { id operation fetchedAt } } }",{issueKey:e});N(t.jiraCachedTicket),D(null)}catch(e){D(e instanceof Error?e.message:String(e))}finally{E(!1)}},[e]);(0,i.useEffect)(()=>{let e=window.setTimeout(()=>void R(),0);return()=>window.clearTimeout(e)},[R]);let $=async()=>{A(!0);try{await (0,x.controlPlaneRequest)("mutation RefreshCachedTicket($issueKey: ID!) { refreshJiraCachedTicket(issueKey: $issueKey) { key } }",{issueKey:e}),await R()}catch(e){D(e instanceof Error?e.message:String(e))}finally{A(!1)}},z=async()=>{A(!0);try{await (0,x.controlPlaneRequest)("mutation DeleteCachedTicket($issueKey: ID!) { deleteJiraCachedTicket(issueKey: $issueKey) }",{issueKey:e}),w.replace("/jira/cache")}catch(e){D(e instanceof Error?e.message:String(e)),A(!1)}};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-6xl flex-col gap-6",children:[(0,t.jsx)("div",{children:(0,t.jsx)(c.Button,{asChild:!0,size:"sm",variant:"ghost",children:(0,t.jsxs)(g.Link,{href:"/jira/cache",children:[(0,t.jsx)(r.ArrowLeft,{}),b("back")]})})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:C?.summary??b("description")})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(c.Button,{disabled:k||!C,onClick:()=>void $(),variant:"outline",children:[(0,t.jsx)(a.RefreshCw,{className:k?"animate-spin":void 0}),b("refresh")]}),(0,t.jsx)(s.ConfirmationDialog,{actionLabel:b("delete"),cancelLabel:j("cancel"),description:j("cannotBeUndone"),onConfirm:z,title:b("confirmDelete",{issueKey:e}),trigger:(0,t.jsxs)(c.Button,{disabled:k||!C,variant:"destructive",children:[(0,t.jsx)(n.Trash2,{}),b("delete")]})})]})]}),S&&(0,t.jsx)(l.Alert,{variant:"destructive",children:(0,t.jsx)(l.AlertDescription,{children:S})}),T?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(m.Spinner,{}),b("loading")]}):C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(y,{label:b("coverage"),value:(0,t.jsx)(d.Badge,{children:C.coverage})}),(0,t.jsx)(y,{label:b("freshness"),value:(0,t.jsx)(d.Badge,{className:C.stale?"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300":"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",children:b(C.stale?"stale":"fresh")})}),(0,t.jsx)(y,{label:b("detailFetched"),value:h(C.detailFetchedAt)}),(0,t.jsx)(y,{label:b("commentsFetched"),value:h(C.commentsFetchedAt)})]}),(0,t.jsx)(v,{title:b("summaryData"),value:C.summaryData}),(0,t.jsx)(v,{title:b("detailData"),value:C.detailData}),(0,t.jsx)(v,{title:b("commentsData"),value:C.commentsData}),(0,t.jsxs)(u.Card,{className:"gap-0 py-0",children:[(0,t.jsx)(u.CardHeader,{className:"border-b py-4",children:(0,t.jsx)(u.CardTitle,{children:b("relatedEntries")})}),0===C.cacheEntries.length?(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground",children:b("noEntries")}):(0,t.jsxs)(f.Table,{children:[(0,t.jsx)(f.TableHeader,{children:(0,t.jsxs)(f.TableRow,{children:[(0,t.jsx)(f.TableHead,{children:b("operation")}),(0,t.jsx)(f.TableHead,{children:b("fetchedAt")}),(0,t.jsx)(f.TableHead,{children:b("entryId")})]})}),(0,t.jsx)(f.TableBody,{children:C.cacheEntries.map(e=>(0,t.jsxs)(f.TableRow,{children:[(0,t.jsx)(f.TableCell,{className:"font-medium",children:e.operation}),(0,t.jsx)(f.TableCell,{children:h(e.fetchedAt)}),(0,t.jsx)(f.TableCell,{className:"font-mono text-xs",children:e.id})]},e.id))})]})]})]}):(0,t.jsx)(p.Empty,{className:"border py-10",children:(0,t.jsx)(p.EmptyHeader,{children:(0,t.jsx)(p.EmptyDescription,{children:b("notFound")})})})]})}])}]);
|