tower-studio 0.1.13 → 0.1.15
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +39 -39
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +23 -23
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +13 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +13 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +13 -13
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/missions/page/server-reference-manifest.json +45 -45
- package/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/onboarding/page/server-reference-manifest.json +23 -23
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding.html +1 -1
- package/.next/server/app/onboarding.rsc +15 -15
- package/.next/server/app/onboarding.segments/_full.segment.rsc +15 -15
- package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/_index.segment.rsc +8 -8
- package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +23 -23
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/settings/page/server-reference-manifest.json +32 -32
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +15 -15
- package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +77 -77
- package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +62 -62
- package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +59 -59
- package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +51 -51
- package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +23 -23
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +52 -52
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/page/server-reference-manifest.json +41 -41
- package/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/0uz~_next_dist_esm_build_templates_app-route_05yec2y.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0~33o~m._.js +2 -2
- package/.next/server/chunks/project_f_tower_0n1s3ym._.js +1 -1
- package/.next/server/chunks/project_f_tower_src_11e.cv5._.js +1 -1
- package/.next/server/chunks/ssr/04uy_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_01.s1p0._.js +1 -1
- package/.next/server/chunks/ssr/0y0r_f_tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0n4g3bn._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__06qzctf._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0p59u95._.js → [root-of-the-server]__0fb0m0v._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0ffdrwp._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__118z55s._.js → [root-of-the-server]__0fp7reb._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0fwuc5u._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0i4rk9v._.js +3 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0nmyvwk._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0w7gbe7._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0y3o4rp._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11j4k9o._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__13cjs8r._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__13eo85g._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0.txwd8._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_103i_mo._.js → project_f_tower_06z7x~2._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_0d_85uz._.js → project_f_tower_08d6__q._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_0qe3y7w._.js → project_f_tower_0arf7nr._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0f0-wva._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0hgtev9._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0ivvjwd._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0jy~1uf._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0l6ssf8._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0o5.y1e._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0gp-92y._.js → project_f_tower_0qepwa~._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_11iv6rj._.js → project_f_tower_0u8bo7w._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0ym-aea._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_135-_23._.js +3 -0
- package/.next/server/chunks/ssr/{project_f_tower_src_0dhz712._.js → project_f_tower_src_0w26c.x._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_src_actions_agent-actions_ts_0.s4~m-._.js +2 -2
- package/.next/server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_missions_missions-client_tsx_0ums4qx._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_settings_page_tsx_0oo06~d._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0jmj1xz._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +191 -191
- package/.next/static/chunks/0-ggl6l3h5syr.js +1 -0
- package/.next/static/chunks/{160iuo21rl~gx.js → 05_0-v~c00b__.js} +1 -1
- package/.next/static/chunks/{0b2l7e_-hz6uu.js → 05tpf5j-jft-k.js} +1 -1
- package/.next/static/chunks/{11y66l77sw_f_.js → 09wk17shlbfp6.js} +1 -1
- package/.next/static/chunks/{150hyh9in9gbd.js → 0_-rw81.wbmu..js} +2 -2
- package/.next/static/chunks/{0ufq5z-zsc_rq.js → 0_vexk9jnxj9q.js} +1 -1
- package/.next/static/chunks/{0uvcabj7_ht1m.js → 0gpckquc5j5cx.js} +1 -1
- package/.next/static/chunks/0h0m-v8uoeq~u.js +1 -0
- package/.next/static/chunks/{0i-bk-_pxq3kf.js → 0jz83jbb6_ldj.js} +1 -1
- package/.next/static/chunks/{0zk37-fhd4h6q.js → 0n3o6vvrc4ks4.js} +1 -1
- package/.next/static/chunks/0nvuuwr.v3r4k.js +1 -0
- package/.next/static/chunks/{0v6j_niujykvw.js → 0qz_w~ilkw07_.js} +1 -1
- package/.next/static/chunks/{0svo2_2.iajx0.js → 0ynxf.i-o3-xn.js} +1 -1
- package/.next/static/chunks/0zio-v5989p.b.js +1 -0
- package/.next/static/chunks/12x6kubkc37zq.js +1 -0
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/bin/tower.mjs +6 -0
- package/package.json +2 -4
- package/scripts/init-db.ts +17 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ukbsy0._.js +0 -3
- package/.next/server/chunks/ssr/project_f_tower_0fdpm0.._.js +0 -3
- package/.next/static/chunks/09k2v2gb9asa~.js +0 -1
- package/.next/static/chunks/0d8czythhy15~.js +0 -1
- package/.next/static/chunks/0hbu0b_cpu234.js +0 -1
- package/.next/static/chunks/0qz9.02.c_xy9.js +0 -1
- package/.next/static/chunks/0s.v9zvpavx.p.js +0 -1
- /package/.next/static/{z3fBPUSyN4JFEFJowhSmx → QCWJhjbC4McTn-0CAT1Gx}/_buildManifest.js +0 -0
- /package/.next/static/{z3fBPUSyN4JFEFJowhSmx → QCWJhjbC4McTn-0CAT1Gx}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{z3fBPUSyN4JFEFJowhSmx → QCWJhjbC4McTn-0CAT1Gx}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,342786,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return o},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function i(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,l(e));else t.set(r,l(a));return t}function o(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},457588,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return b},PageNotFoundError:function(){return y},SP:function(){return h},ST:function(){return v},WEB_VITALS:function(){return i},execOnce:function(){return l},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return o},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return C}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function m(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&f(r))return a;if(!a)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let h="u">typeof performance,v=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class b extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},66364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},378719,e=>{"use strict";var t=e.i(85212);let r=t.createContext(void 0);e.s(["useDirection",0,function(){let e=t.useContext(r);return e?.direction??"ltr"}])},912016,e=>{"use strict";var t=e.i(432377);let r="base-ui-disable-scrollbar";e.s(["styleDisableScrollbar",0,{className:r,getElement:e=>(0,t.jsx)("style",{nonce:e,href:r,precedence:"base-ui:low",children:`.${r}{scrollbar-width:none}.${r}::-webkit-scrollbar{display:none}`})}])},594683,e=>{"use strict";var t=e.i(85212);let r=t.createContext(void 0),a={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(r)??a}])},126273,e=>{"use strict";e.s(["clamp",0,function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}])},543485,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(16735),l=e.r(704894),s=e.r(503274)},478118,e=>{"use strict";let t=(0,e.i(863961).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},946960,e=>{"use strict";var t=e.i(478118);e.s(["Loader2",()=>t.default])},309542,(e,t,r)=>{t.exports=e.r(278039)},121538,e=>{"use strict";var t=e.i(85212);e.s(["useControlled",0,function({controlled:e,default:r,name:a,state:n="value"}){let{current:i}=t.useRef(void 0!==e),[l,s]=t.useState(r),o=t.useCallback(e=>{i||s(e)},[]);return[i?e:l,o]}])},12800,200525,e=>{"use strict";e.i(129893);var t,r=e.i(499875),a=e.i(85212),n=e.i(166508);let i=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),l={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},s={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},o={disabled:!1,...s};e.s(["DEFAULT_FIELD_ROOT_STATE",0,o,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,s,"DEFAULT_VALIDITY_STATE",0,l,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[i.valid]:""}:{[i.invalid]:""}}],200525);let u=a.createContext({invalid:void 0,name:void 0,validityData:{state:l,errors:[],error:"",value:"",initialValue:null},setValidityData:n.NOOP,disabled:void 0,touched:s.touched,setTouched:n.NOOP,dirty:s.dirty,setDirty:n.NOOP,filled:s.filled,setFilled:n.NOOP,focused:s.focused,setFocused:n.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:o,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=n.EMPTY_OBJECT)=>e,getInputValidationProps:(e=n.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,u,"useFieldRootContext",0,function(e=!0){let t=a.useContext(u);if(t.setValidityData===n.NOOP&&!e)throw Error((0,r.default)(28));return t}],12800)},191948,e=>{"use strict";var t=e.i(85212),r=e.i(166508);let a=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:r.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(a)}])},355283,e=>{"use strict";var t=e.i(85212),r=e.i(166508);let a=t.createContext({controlId:void 0,registerControlId:r.NOOP,labelId:void 0,setLabelId:r.NOOP,messageIds:[],setMessageIds:r.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,a,"useLabelableContext",0,function(){return t.useContext(a)}])},197494,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},148242,e=>{"use strict";var t=e.i(447120),r=e.i(924723),a=e.i(357030),n=e.i(75408),i=e.i(284060),l=e.i(443667),s=e.i(355283);e.s(["useLabel",0,function(e={}){let o,{id:u,fallbackControlId:c,native:d=!1,setLabelId:f,focusControl:m}=e,{controlId:p,setLabelId:h}=(0,s.useLabelableContext)(),v=(0,a.useStableCallback)(e=>{h(e),f?.(e)}),g=(o=(0,l.useBaseUiId)(u),(0,i.useIsoLayoutEffect)(()=>(v(o),()=>{v(void 0)}),[o,v]),o),b=p??c;function y(e){let a=(0,n.getTarget)(e.nativeEvent);a?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),d||function(e){if(m)return m(e,b);if(!b)return;let a=(0,r.ownerDocument)(e.currentTarget).getElementById(b);(0,t.isHTMLElement)(a)&&a.focus({focusVisible:!0})}(e))}return d?{id:g,htmlFor:b??void 0,onMouseDown:y}:{id:g,onClick:y,onPointerDown(e){e.preventDefault()}}}],148242)},281284,e=>{"use strict";var t=e.i(85212),r=e.i(284060),a=e.i(357030),n=e.i(524534),i=e.i(447120),l=e.i(166508),s=e.i(443667),o=e.i(355283);e.s(["useLabelableId",0,function(e={}){let{id:u,implicit:c=!1,controlRef:d}=e,{controlId:f,registerControlId:m}=(0,o.useLabelableContext)(),p=(0,s.useBaseUiId)(u),h=c?f:void 0,v=(0,n.useRefWithInit)(()=>Symbol("labelable-control")),g=t.useRef(!1),b=t.useRef(null!=u),y=(0,a.useStableCallback)(()=>{g.current&&m!==l.NOOP&&(g.current=!1,m(v.current,void 0))});return(0,r.useIsoLayoutEffect)(()=>{let e;if(m!==l.NOOP){if(c){let t=d?.current;e=(0,i.isElement)(t)&&null!=t.closest("label")?u??null:h??p}else if(null!=u)b.current=!0,e=u;else{if(!b.current)return void y();e=p}if(void 0===e)return void y();g.current=!0,m(v.current,e)}},[u,d,h,m,c,p,v,y]),t.useEffect(()=>y,[y]),f??p}])},305734,e=>{"use strict";var t=e.i(9235),r=e.i(284060),a=e.i(357030),n=e.i(197494),i=e.i(191948),l=e.i(12800);e.s(["useField",0,function(e){let{enabled:s=!0,value:o,id:u,name:c,controlRef:d,commit:f}=e,{formRef:m}=(0,i.useFormContext)(),{invalid:p,markedDirtyRef:h,validityData:v,setValidityData:g}=(0,l.useFieldRootContext)(),b=(0,a.useStableCallback)(e.getValue);(0,r.useIsoLayoutEffect)(()=>{if(!s)return;let e=o;void 0===e&&(e=b()),null===v.initialValue&&null!==e&&g(t=>({...t,initialValue:e}))},[s,g,o,v.initialValue,b]),(0,r.useIsoLayoutEffect)(()=>{s&&u&&m.current.fields.set(u,{getValue:b,name:c,controlRef:d,validityData:(0,n.getCombinedFieldValidityData)(v,p),validate(e=!0){let r=o;void 0===r&&(r=b()),h.current=!0,e?t.flushSync(()=>f(r)):f(r)}})},[f,d,s,m,b,u,p,h,c,v,o]),(0,r.useIsoLayoutEffect)(()=>{let e=m.current.fields;return()=>{u&&e.delete(u)}},[m,u])}])},555159,e=>{"use strict";let t=(0,e.i(863961).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],555159)},565037,e=>{"use strict";let t=(0,e.i(863961).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",0,t],565037)},478430,e=>{"use strict";let t=(0,e.i(863961).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],478430)},698654,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return o}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(968996)._(e.r(342786)),l=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",s=e.hash||"",o=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),o&&"object"==typeof o&&(o=String(i.urlQueryToSearchParams(o)));let c=e.search||o&&`?${o}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||l.test(a))&&!1!==u?(u="//"+(u||""),n&&"/"!==n[0]&&(n="/"+n)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${u}${n}${c}${s}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},396427,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(85212);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=i(e,a)),t&&(n.current=i(t,a))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},862126,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let a=e.r(457588),n=e.r(364700);function i(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},175926,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},631325,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return g},useLinkStatus:function(){return y}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(968996),l=e.r(432377),s=i._(e.r(85212)),o=e.r(698654),u=e.r(717921),c=e.r(396427),d=e.r(457588),f=e.r(835153);e.r(66364);let m=e.r(338875),p=e.r(807547),h=e.r(862126),v=e.r(816063);function g(t){var r,a;let n,i,g,[y,x]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),k=(0,s.useRef)(null),{href:C,as:S,children:w,prefetch:E=null,passHref:j,replace:M,shallow:P,scroll:R,onClick:I,onMouseEnter:T,onTouchStart:N,legacyBehavior:O=!1,onNavigate:L,transitionTypes:A,ref:_,unstable_dynamicOnHover:F,...D}=t;n=w,O&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let V=s.default.useContext(u.AppRouterContext),U=!1!==E,z=!1!==E?null===(a=E)||"auto"===a?v.FetchStrategy.PPR:v.FetchStrategy.Full:v.FetchStrategy.PPR,B="string"==typeof(r=S||C)?r:(0,o.formatUrl)(r);if(O){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(n)}let $=O?i&&"object"==typeof i&&i.ref:_,K=s.default.useCallback(e=>(null!==V&&(k.current=(0,p.mountLinkInstance)(e,B,V,z,U,x)),()=>{k.current&&((0,p.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,B,V,z,x]),H={ref:(0,c.useMergedRef)(K,$),onClick(t){O||"function"!=typeof I||I(t),O&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!V||t.defaultPrevented||function(t,r,a,n,i,l,o){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(752129);s.default.startTransition(()=>{d(r,n?"replace":"push",!1===i?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,a.current,o)})}}(t,B,k,M,R,L,A)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),V&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){O||"function"!=typeof N||N(e),O&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),V&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,d.isAbsoluteUrl)(B)?H.href=B:O&&!j&&("a"!==i.type||"href"in i.props)||(H.href=(0,f.addBasePath)(B)),g=O?s.default.cloneElement(i,H):(0,l.jsx)("a",{...D,...H,children:n}),(0,l.jsx)(b.Provider,{value:y,children:g})}e.r(175926);let b=(0,s.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},677436,142296,894296,e=>{"use strict";var t=e.i(863961);let r=(0,t.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,r],142296),e.s(["Search",0,r],677436);let a=(0,t.default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,a],894296)},812937,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("0073d9d770a70dc1a403ff147d6ea66df5bccc8686",t.callServer,void 0,t.findSourceMapURL,"getActualWsPort");e.s(["getActualWsPort",0,r])},460112,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("604ce07f6397de5dd0e4c9108ad4ea9d59a5f72960",t.callServer,void 0,t.findSourceMapURL,"getConfigValue");e.s(["getConfigValue",0,r])},103295,e=>{"use strict";let t=(0,e.i(863961).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],103295)},330521,e=>{"use strict";var t,r=e.i(432377);e.s([],967536),e.i(967536),e.i(129893);var a=e.i(85212),n=e.i(121538),i=e.i(357030),l=e.i(156420),s=e.i(284060),o=e.i(786546),u=e.i(166508),c=e.i(793988),d=e.i(337590),f=e.i(443667),m=e.i(136391),p=e.i(499875);let h=a.createContext(void 0);var v=e.i(200525);let g=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),b={...v.fieldValidityMapping,checked:e=>e?{[g.checked]:""}:{[g.unchecked]:""}};var y=e.i(305734),x=e.i(12800),k=e.i(191948),C=e.i(355283),S=e.i(281284),w=e.i(197167),E=e.i(394772),j=e.i(81456);let M=a.forwardRef(function(e,t){let{checked:p,className:v,defaultChecked:g,"aria-labelledby":M,id:P,inputRef:R,name:I,nativeButton:T=!1,onCheckedChange:N,readOnly:O=!1,required:L=!1,disabled:A=!1,render:_,uncheckedValue:F,value:D,...V}=e,{clearErrors:U}=(0,k.useFormContext)(),{state:z,setTouched:B,setDirty:$,validityData:K,setFilled:H,setFocused:J,shouldValidateOnChange:q,validationMode:W,disabled:G,name:Y,validation:X}=(0,x.useFieldRootContext)(),{labelId:Q}=(0,C.useLabelableContext)(),Z=G||A,ee=Y??I,et=(0,i.useStableCallback)(N),er=a.useRef(null),ea=(0,l.useMergedRefs)(er,R,X.inputRef),en=a.useRef(null),ei=(0,f.useBaseUiId)(),el=(0,S.useLabelableId)({id:P,implicit:!1,controlRef:en}),es=T?void 0:el,[eo,eu]=(0,n.useControlled)({controlled:p,default:!!g,name:"Switch",state:"checked"});(0,y.useField)({id:ei,commit:X.commit,value:eo,controlRef:en,name:ee,getValue:()=>eo}),(0,s.useIsoLayoutEffect)(()=>{er.current&&H(er.current.checked)},[er,H]),(0,j.useValueChanged)(eo,()=>{U(ee),$(eo!==K.initialValue),H(eo),q()?X.commit(eo):X.commit(eo,!0)});let{getButtonProps:ec,buttonRef:ed}=(0,m.useButton)({disabled:Z,native:T}),ef=function(e,t,r,n=!0,i){let[l,o]=a.useState(),u=(0,f.useBaseUiId)(i?`${i}-label`:void 0),c=e??t??l;return(0,s.useIsoLayoutEffect)(()=>{let a=e||t||!n?void 0:function(e,t){let r=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let r=e.id;if(r){let t=e.nextElementSibling;if(t&&t.htmlFor===r)return t}let a=e.labels;return a&&a[0]}(e);if(r)return!r.id&&t&&(r.id=t),r.id||void 0}(r.current,u);l!==a&&o(a)}),c}(M,Q,er,!T,es),em=a.useMemo(()=>(0,d.mergeProps)({checked:eo,disabled:Z,id:es,name:ee,required:L,style:ee?o.visuallyHiddenInput:o.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ea,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,r=(0,w.createChangeEventDetails)(E.REASONS.none,e.nativeEvent);et?.(t,r),r.isCanceled||eu(t)},onFocus(){en.current?.focus()}},X.getInputValidationProps,void 0!==D?{value:D}:u.EMPTY_OBJECT),[eo,Z,ea,es,ee,et,L,eu,X,D]),ep=a.useMemo(()=>({...z,checked:eo,disabled:Z,readOnly:O,required:L}),[z,eo,Z,O,L]),eh=(0,c.useRenderElement)("span",e,{state:ep,ref:[t,en,ed],props:[{id:T?el:ei,role:"switch","aria-checked":eo,"aria-readonly":O||void 0,"aria-required":L||void 0,"aria-labelledby":ef,onFocus(){Z||J(!0)},onBlur(){let e=er.current;e&&!Z&&(B(!0),J(!1),"onBlur"===W&&X.commit(e.checked))},onClick(e){O||Z||(e.preventDefault(),er.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},X.getValidationProps,V,ec],stateAttributesMapping:b});return(0,r.jsxs)(h.Provider,{value:ep,children:[eh,!eo&&ee&&void 0!==F&&(0,r.jsx)("input",{type:"hidden",name:ee,value:F}),(0,r.jsx)("input",{...em})]})}),P=a.forwardRef(function(e,t){let{render:r,className:n,...i}=e,{state:l}=(0,x.useFieldRootContext)(),s=function(){let e=a.useContext(h);if(void 0===e)throw Error((0,p.default)(63));return e}(),o={...l,...s};return(0,c.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:b,props:i})});e.s(["Root",0,M,"Thumb",0,P],50248);var R=e.i(50248),R=R,I=e.i(937756);e.s(["Switch",0,function({className:e,size:t="default",...a}){return(0,r.jsx)(R.Root,{"data-slot":"switch","data-size":t,className:(0,I.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...a,children:(0,r.jsx)(R.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],330521)},316403,e=>{"use strict";let t=(0,e.i(863961).default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["Bell",0,t],316403)},540032,e=>{"use strict";var t=e.i(432377),r=e.i(937756);e.s(["Textarea",0,function({className:e,...a}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}])},909260,e=>{"use strict";let t=(0,e.i(863961).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],909260)},923344,e=>{"use strict";let t=(0,e.i(863961).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],923344)},239358,e=>{"use strict";let t=(0,e.i(863961).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],239358)},962040,921280,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("60e5dd3ca68661ac45adf05e9927c2210cbcec9e45",t.callServer,void 0,t.findSourceMapURL,"analyzeProjectDirectory");e.s(["analyzeProjectDirectory",0,r],962040);var a=e.i(432377),n=e.i(85212),i=e.i(815681),l=e.i(863961);let s=(0,l.default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]),o=(0,l.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);var u=e.i(986044),c=e.i(677436);let d=(0,l.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);var f=e.i(718837),m=e.i(711296),p=e.i(831349),h=e.i(625054),v=e.i(142124);e.s(["FolderBrowserDialog",0,function({open:e,onOpenChange:t,onSelect:r,gitOnly:l=!1}){let{t:g}=(0,h.useI18n)(),[b,y]=(0,n.useState)(null),[x,k]=(0,n.useState)(!1),[C,S]=(0,n.useState)(null),[w,E]=(0,n.useState)(""),[j,M]=(0,n.useState)(""),[P,R]=(0,n.useState)(!1),I=(0,n.useRef)(null),T=(0,n.useCallback)(async e=>{k(!0),S(null),M(""),R(!1);try{let t=e?`/api/browse-fs?path=${encodeURIComponent(e)}`:"/api/browse-fs",r=await fetch(t);if(!r.ok){let e=await r.json();S(e.error||"Failed");return}let a=await r.json();y(a),E(a.currentPath)}catch{S("Failed to browse filesystem")}finally{k(!1)}},[]);(0,n.useEffect)(()=>{e&&(T(),setTimeout(()=>I.current?.focus(),200))},[e,T]);let N=()=>{w.trim()&&T(w.trim())},O=b?.folders.filter(e=>e.name.toLowerCase().includes(j.toLowerCase()))??[];return(0,a.jsx)(f.Dialog,{open:e,onOpenChange:t,children:(0,a.jsx)(f.DialogContent,{className:"p-0 gap-0",style:{maxWidth:"36rem",overflow:"hidden"},children:(0,a.jsxs)("div",{className:"flex flex-col max-h-[60vh] overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-5 pt-5 pb-3 shrink-0",children:[(0,a.jsx)(f.DialogTitle,{children:g(l?"folder.selectGitRepo":"folder.selectFolder")}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:g("folder.hint")})]}),(0,a.jsxs)("div",{className:"border-t border-border px-4 pt-3 pb-2 shrink-0",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:g("folder.manualInput")}),(0,a.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,a.jsx)(p.Input,{ref:I,value:w,onChange:e=>E(e.target.value),onKeyDown:e=>"Enter"===e.key&&N(),placeholder:"/path/to/your/project",title:w,className:"flex-1 min-w-0"}),(0,a.jsx)(m.Button,{variant:"outline",onClick:N,className:"h-8 px-3 shrink-0",children:g("folder.goTo")})]})]}),(0,a.jsxs)("div",{className:"px-4 py-2 shrink-0",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:g("folder.searchDir")}),(0,a.jsxs)("div",{className:"relative mt-1.5",children:[(0,a.jsx)(c.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("input",{value:j,onChange:e=>M(e.target.value),placeholder:"Filter folders and files...",className:"h-8 w-full rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 border-y border-border px-4 py-2 shrink-0 min-w-0",children:[(0,a.jsx)(m.Button,{variant:"outline",size:"icon-sm",onClick:()=>b?.homePath&&T(b.homePath),className:"shrink-0 text-muted-foreground",title:"Home",children:(0,a.jsx)(o,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(m.Button,{variant:"outline",size:"icon-sm",onClick:()=>{b&&("__DRIVES__"===b.parentPath?R(!0):(R(!1),T(b.parentPath)))},className:"shrink-0 text-muted-foreground",title:"Parent",children:(0,a.jsx)(u.ChevronUp,{className:"h-3.5 w-3.5"})}),b?.drives&&b.drives.length>0&&(0,a.jsx)(m.Button,{variant:P?"default":"outline",size:"icon-sm",onClick:()=>R(e=>!e),className:"shrink-0 text-muted-foreground",title:"Drives",children:(0,a.jsx)(d,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground font-mono",title:b?.currentPath??"",children:b?.currentPath??"..."})]}),(0,a.jsxs)(v.ScrollArea,{className:"min-h-0 flex-1",children:[x&&(0,a.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading..."}),C&&(0,a.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-rose-400",children:C}),P&&b?.drives&&b.drives.map(e=>(0,a.jsxs)("button",{onClick:()=>{var t;return t=e.path,void(R(!1),T(t))},className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,a.jsx)(d,{className:"h-4 w-4 text-blue-400 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),(0,a.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.path})]},e.path)),!P&&!x&&!C&&0===O.length&&(0,a.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:g("folder.empty")}),!P&&!x&&!C&&O.map(e=>(0,a.jsxs)("button",{onClick:()=>{e.isGit||l?(r(e.path),t(!1)):T(e.path)},onDoubleClick:()=>T(e.path),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[e.isGit?(0,a.jsx)(s,{className:"h-4 w-4 text-emerald-400 shrink-0"}):(0,a.jsx)(i.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),e.isGit&&(0,a.jsx)("span",{className:"shrink-0 rounded-md bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-400 ring-1 ring-emerald-500/20",children:"git"})]},e.path))]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2 px-5 py-3 shrink-0 border-t border-border",children:[(0,a.jsx)(m.Button,{variant:"outline",onClick:()=>t(!1),children:g("common.cancel")}),(0,a.jsx)(m.Button,{onClick:()=>{b?.currentPath&&(r(b.currentPath),t(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:g("folder.selectPath")})]})]})})})}],921280)},249472,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("406d8c0b0b85c4d776fbd5fed225d9c468a6631d31",t.callServer,void 0,t.findSourceMapURL,"createProject");e.s(["createProject",0,r])},867900,86982,e=>{"use strict";let t=(0,e.i(863961).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"}]]);e.s(["Bot",0,t],867900);var r=e.i(432377),a=e.i(85212),n=e.i(460112);let i="tower-assistant-sessions",l="tower-assistant-active-session";function s(){try{let e=localStorage.getItem(i);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t}catch{return[]}}function o(){return localStorage.getItem(l)}function u(e){null===e?localStorage.removeItem(l):localStorage.setItem(l,e)}let c=(0,a.createContext)(null);function d(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let f="assistant-image-cache";function m(e,t,r){try{let a=sessionStorage.getItem(f),n=a?JSON.parse(a):{};n[e]||(n[e]={}),n[e][t]=r,sessionStorage.setItem(f,JSON.stringify(n))}catch{}}e.s(["AssistantProvider",0,function({children:e}){let[t,l]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1),[v,g]=(0,a.useState)("sidebar"),[b,y]=(0,a.useState)(null),[x,k]=(0,a.useState)([]),[C,S]=(0,a.useState)("idle"),[w,E]=(0,a.useState)(!1),j=(0,a.useRef)([]),M=(0,a.useRef)(null),P=(0,a.useRef)(null),[R,I]=(0,a.useState)([]),[T,N]=(0,a.useState)(null),O=(0,a.useRef)(!1),L=(0,a.useCallback)(()=>{k([...j.current])},[]),A=(0,a.useCallback)(async()=>{g("dialog"===await (0,n.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,a.useEffect)(()=>{A()},[A]);let _=(0,a.useCallback)(async()=>{I(s())},[]),F=(0,a.useCallback)(async e=>{E(!0);try{let t=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`);if(!t.ok)return;let r=await t.json();if(Array.isArray(r.messages)){j.current=r.messages;let t=function(e){try{let t=sessionStorage.getItem(f);if(!t)return{};return JSON.parse(t)[e]??{}}catch{return{}}}(e);if(Object.keys(t).length>0){let e=0;j.current=j.current.map(r=>{if("user"===r.role){let a=t[e];if(e++,a?.length)return{...r,imageFilenames:a}}return r})}k([...j.current])}}catch{}finally{E(!1)}},[]);(0,a.useEffect)(()=>{_();let e=o();e&&(N(e),M.current=e,F(e))},[_,F]);let D=(0,a.useCallback)(()=>{P.current?.abort(),M.current=null,O.current=!1,N(null),u(null),j.current=[],k([]),S("idle")},[]),V=(0,a.useCallback)(e=>{P.current?.abort(),M.current=e,O.current=!0,N(e),u(e),j.current=[],k([]),S("idle"),F(e)},[F]),U=(0,a.useCallback)(e=>{let t;t=s().filter(t=>t.id!==e),localStorage.setItem(i,JSON.stringify(t)),o()===e&&u(null),I(s()),T===e&&D()},[T,D]),z=(0,a.useCallback)(async()=>{h(!0);try{await A(),l(!0)}finally{h(!1)}},[A]),B=(0,a.useCallback)(()=>{l(!1),P.current?.abort()},[]),$=(0,a.useCallback)(()=>{t||p?B():z()},[t,p,B,z]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"l"===e.key&&(e.preventDefault(),$())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[$]);let K=(0,a.useCallback)(async(e,t)=>{if(!e.trim()&&!t?.imageFilenames?.length)return;P.current?.abort();let r=new AbortController;P.current=r;let a=0!==j.current.length||O.current?null:e,n=d();if(j.current=[...j.current,{id:d(),role:"user",content:e,imageFilenames:t?.imageFilenames?.length?t.imageFilenames:void 0},{id:n,role:"thinking",content:"",isStreaming:!0}],L(),t?.imageFilenames?.length&&M.current){let e=j.current.filter(e=>"user"===e.role).length-1;m(M.current,e,t.imageFilenames)}S("connecting");let l=null;try{let o=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,sessionId:M.current,imageFilenames:t?.imageFilenames??[]}),signal:r.signal});if(!o.ok||!o.body)throw Error(`HTTP ${o.status}`);S("streaming");let c=o.body.getReader(),f=new TextDecoder,p="";for(;;){let{done:e,value:r}=await c.read();if(e)break;let o=(p+=f.decode(r,{stream:!0})).split("\n");for(let e of(p=o.pop()??"",o)){let r;if(e.startsWith("data: ")){try{r=JSON.parse(e.slice(6).trim())}catch{continue}if(r.sessionId){let e=M.current;if(M.current=r.sessionId,a&&!O.current&&r.sessionId!==e){O.current=!0;let e=new Date().toISOString(),n={id:r.sessionId,title:function(e){let t=e.trim();return t?t.length>30?t.slice(0,30):t:"New Session"}(a),createdAt:e,updatedAt:e};!function(e){let t=[e,...s().filter(t=>t.id!==e.id)].slice(0,10);localStorage.setItem(i,JSON.stringify(t))}(n),I(s()),N(r.sessionId),u(r.sessionId),t?.imageFilenames?.length&&m(r.sessionId,0,t.imageFilenames)}}switch(r.type){case"text_delta":{let e=j.current.filter(e=>e.id!==n);l?j.current=e.map(e=>e.id===l?{...e,content:e.content+(r.content??""),isStreaming:!0}:e):(l=d(),j.current=[...e,{id:l,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"text":{let e=j.current.filter(e=>e.id!==n);l?j.current=e.map(e=>e.id===l?{...e,content:r.content??e.content,isStreaming:!0}:e):(l=d(),j.current=[...e,{id:l,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"tool_start":{let e=j.current.filter(e=>e.id!==n);l?(j.current=e.map(e=>e.id===l?{...e,isStreaming:!1}:e),l=null):j.current=e,j.current=[...j.current,{id:d(),role:"tool",content:`Calling ${r.content??"tool"}...`,toolName:r.content,isStreaming:!0}],L();break}case"tool_use":{let e=j.current.filter(e=>e.id!==n),t=l?e.map(e=>e.id===l?{...e,isStreaming:!1}:e):e;l=null,j.current=[...t,{id:d(),role:"tool",content:JSON.stringify(r.toolInput??{},null,2),toolName:r.content}],L();break}case"tool_result":j.current=[...j.current,{id:d(),role:"tool",content:String(r.toolOutput??""),toolName:`${r.content??"tool"} (result)`}],L();break;case"error":j.current=[...j.current.filter(e=>e.id!==n),{id:d(),role:"assistant",content:`Error: ${r.content??"Unknown error"}`}],L(),S("error");break;case"done":l&&(j.current=j.current.map(e=>e.id===l?{...e,isStreaming:!1}:e)),j.current=j.current.filter(e=>e.id!==n),L(),S("idle")}}}}j.current=j.current.filter(e=>e.id!==n),L(),S(e=>"streaming"===e?"idle":e),_()}catch(e){if("AbortError"===e.name)return;j.current=[...j.current.filter(e=>e.id!==n),{id:d(),role:"assistant",content:`Connection error: ${e.message??"Unknown error"}`}],L(),S("error")}},[L,_]),H=(0,a.useCallback)(()=>{P.current?.abort(),P.current=null;let e=[...j.current].reverse().find(e=>"user"===e.role),t=e?.content??null;if(e){let t=j.current.lastIndexOf(e);j.current=j.current.slice(0,t),k([...j.current])}return S("idle"),t},[]),J=x[x.length-1],q="connecting"===C||"streaming"===C||J?.role==="thinking"&&!0===J.isStreaming;return(0,r.jsx)(c.Provider,{value:{isOpen:t,isStarting:p,displayMode:v,worktreePath:b,toggleAssistant:$,closeAssistant:B,chatMessages:x,chatStatus:C,isChatThinking:q,isLoadingHistory:w,sendChatMessage:K,cancelChat:H,sessions:R,activeSessionId:T,createNewSession:D,switchSession:V,removeSession:U,refreshSessions:_},children:e})},"useAssistant",0,function(){let e=(0,a.useContext)(c);if(!e)throw Error("useAssistant must be used within an AssistantProvider");return e}],86982)},780156,e=>{"use strict";let t=(0,e.i(863961).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],780156)},419613,e=>{"use strict";let t=(0,e.i(863961).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},831349,e=>{"use strict";var t=e.i(432377);e.i(129893);var r=e.i(85212);e.s([],758325),e.i(758325);var a=e.i(357030),n=e.i(12800),i=e.i(200525),l=e.i(499875);let s=r.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});var o=e.i(191948),u=e.i(524534),c=e.i(337590),d=e.i(443667),f=e.i(355283);let m=function(e){let n=(0,d.useBaseUiId)(),i=void 0===e.controlId?n:e.controlId,[l,s]=r.useState(i),[o,m]=r.useState(e.labelId),[p,h]=r.useState([]),v=(0,u.useRefWithInit)(()=>new Map),{messageIds:g}=(0,f.useLabelableContext)(),b=(0,a.useStableCallback)((e,t)=>{let r=v.current;void 0===t?r.delete(e):(r.set(e,t),s(e=>{let t;if(0!==r.size){for(let a of r.values()){if(void 0!==e&&a===e)return e;void 0===t&&(t=a)}return t}}))}),y=r.useCallback(e=>(0,c.mergeProps)({"aria-describedby":g.concat(p).join(" ")||void 0},e),[g,p]),x=r.useMemo(()=>({controlId:l,registerControlId:b,labelId:o,setLabelId:m,messageIds:p,setMessageIds:h,getDescriptionProps:y}),[l,b,o,m,p,h,y]);return(0,t.jsx)(f.LabelableContext.Provider,{value:x,children:e.children})};var p=e.i(793988),h=e.i(166508),v=e.i(617406),g=e.i(197494);let b=Object.keys(i.DEFAULT_VALIDITY_STATE),y=r.forwardRef(function(e,u){let{errors:d,validationMode:m,submitAttemptedRef:y}=(0,o.useFormContext)(),{render:x,className:k,validate:C,validationDebounceTime:S=0,validationMode:w=m,name:E,disabled:j=!1,invalid:M,dirty:P,touched:R,actionsRef:I,...T}=e,{disabled:N}=function(e=!1){let t=r.useContext(s);if(!t&&!e)throw Error((0,l.default)(86));return t}(),O=(0,a.useStableCallback)(C||(()=>null)),L=N||j,[A,_]=r.useState(!1),[F,D]=r.useState(!1),[V,U]=r.useState(!1),[z,B]=r.useState(!1),$=P??F,K=R??A,H=r.useRef(!1),J=(0,a.useStableCallback)(e=>{void 0===P&&(e&&(H.current=!0),D(e))}),q=(0,a.useStableCallback)(e=>{void 0===R&&_(e)}),W=(0,a.useStableCallback)(()=>"onChange"===w||"onSubmit"===w&&y.current),G=!!E&&Object.hasOwn(d,E)&&void 0!==d[E],Y=!0===M||G,[X,Q]=r.useState({state:i.DEFAULT_VALIDITY_STATE,error:"",errors:[],value:null,initialValue:null}),Z=!Y&&X.state.valid,ee=r.useMemo(()=>({disabled:L,touched:K,dirty:$,valid:Z,filled:V,focused:z}),[L,K,$,Z,V,z]),et=function(e){let{formRef:t,clearErrors:n}=(0,o.useFormContext)(),{setValidityData:l,validate:s,validityData:u,validationDebounceTime:d,invalid:m,markedDirtyRef:p,state:y,name:x,shouldValidateOnChange:k}=e,{controlId:C,getDescriptionProps:S}=(0,f.useLabelableContext)(),w=(0,v.useTimeout)(),E=r.useRef(null),j=(0,a.useStableCallback)(async(e,r=!1)=>{let a,n=E.current;if(!n)return;if(r){if(!1!==y.valid)return;let r=n.validity;if(!r.valueMissing){let r={value:e,state:{...i.DEFAULT_VALIDITY_STATE,valid:!0},error:"",errors:[],initialValue:u.initialValue};if(n.setCustomValidity(""),C){let e=t.current.fields.get(C);e&&t.current.fields.set(C,{...e,...(0,g.getCombinedFieldValidityData)(r,!1)})}l(r);return}let a=b.reduce((e,t)=>(e[t]=r[t],e),{});if(!a.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let r of b)"valid"!==r&&("valueMissing"===r&&(t=e[r]),e[r]&&(t=!1));return t}(a))return}w.clear();let o=null,c=[],d=function(e){let t=b.reduce((t,r)=>(t[r]=e.validity[r],t),{}),r=!1;for(let e of b)if("valid"!==e){if("valueMissing"===e&&t[e])r=!0;else if(t[e])return t}return r&&!p.current&&(t.valid=!0,t.valueMissing=!1),t}(n),f=k();if(n.validationMessage&&!f)a=n.validationMessage,c=[n.validationMessage];else{let r=s(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(o="object"==typeof r&&null!==r&&"then"in r?await r:r)?(d.valid=!1,d.customError=!0,Array.isArray(o)?(c=o,n.setCustomValidity(o.join("\n"))):o&&(c=[o],n.setCustomValidity(o))):f&&(n.setCustomValidity(""),d.customError=!1,n.validationMessage?(a=n.validationMessage,c=[n.validationMessage]):n.validity.valid&&!d.valid&&(d.valid=!0))}let h={value:e,state:d,error:a??(Array.isArray(o)?o[0]:o??""),errors:c,initialValue:u.initialValue};if(C){let e=t.current.fields.get(C);e&&t.current.fields.set(C,{...e,...(0,g.getCombinedFieldValidityData)(h,m)})}l(h)}),M=r.useCallback((e={})=>(0,c.mergeProps)(S,!1===y.valid?{"aria-invalid":!0}:h.EMPTY_OBJECT,e),[S,y.valid]),P=r.useCallback((e={})=>(0,c.mergeProps)({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(x),!k())return void j(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?j(t.value):(w.clear(),d?w.start(d,()=>{j(t.value)}):j(t.value))}},M(e)),[M,n,x,w,j,d,k]);return r.useMemo(()=>({getValidationProps:M,getInputValidationProps:P,inputRef:E,commit:j}),[M,P,j])}({setValidityData:Q,validate:O,validityData:X,validationDebounceTime:S,invalid:Y,markedDirtyRef:H,state:ee,name:E,shouldValidateOnChange:W}),er=r.useCallback(()=>{H.current=!0,et.commit(X.value)},[et,X]);r.useImperativeHandle(I,()=>({validate:er}),[er]);let ea=r.useMemo(()=>({invalid:Y,name:E,validityData:X,setValidityData:Q,disabled:L,touched:K,setTouched:q,dirty:$,setDirty:J,filled:V,setFilled:U,focused:z,setFocused:B,validate:O,validationMode:w,validationDebounceTime:S,shouldValidateOnChange:W,state:ee,markedDirtyRef:H,validation:et}),[Y,E,X,L,K,q,$,J,V,U,z,B,O,w,S,W,ee,et]),en=(0,p.useRenderElement)("div",e,{ref:u,state:ee,props:T,stateAttributesMapping:i.fieldValidityMapping});return(0,t.jsx)(n.FieldRootContext.Provider,{value:ea,children:en})}),x=r.forwardRef(function(e,r){return(0,t.jsx)(m,{children:(0,t.jsx)(y,{...e,ref:r})})});var k=e.i(148242);let C=r.forwardRef(function(e,t){let{render:a,className:l,id:s,nativeLabel:o=!0,...u}=e,c=(0,n.useFieldRootContext)(!1),{labelId:d}=(0,f.useLabelableContext)(),m=r.useRef(null),h=(0,k.useLabel)({id:d??s,native:o});return(0,p.useRenderElement)("label",e,{ref:[t,m],state:c.state,props:[h,u],stateAttributesMapping:i.fieldValidityMapping})});var S=e.i(284060),w=e.i(412360),E=e.i(144909),j=e.i(883993);let M={...i.fieldValidityMapping,...E.transitionStatusMapping},P=r.forwardRef(function(e,a){let{render:i,id:l,className:s,match:u,...c}=e,m=(0,d.useBaseUiId)(l),{validityData:h,state:v,name:g}=(0,n.useFieldRootContext)(!1),{setMessageIds:b}=(0,f.useLabelableContext)(),{errors:y}=(0,o.useFormContext)(),x=g?y[g]:null,k=!1;k=!!x||!0===u||(u?!!h.state[u]:!1===h.state.valid);let{mounted:C,transitionStatus:E,setMounted:P}=(0,j.useTransitionStatus)(k);(0,S.useIsoLayoutEffect)(()=>{if(k&&m)return b(e=>e.concat(m)),()=>{b(e=>e.filter(e=>e!==m))}},[k,m,b]);let R=r.useRef(null),[I,T]=r.useState(null),[N,O]=r.useState(null),L=x||(h.errors.length>1?(0,t.jsx)("ul",{children:h.errors.map(e=>(0,t.jsx)("li",{children:e},e))}):h.error),A=h.error;null!=x?A=Array.isArray(x)?JSON.stringify(x):x:h.errors.length>1&&(A=JSON.stringify(h.errors)),k&&A!==N&&(O(A),T(L)),(0,w.useOpenChangeComplete)({open:k,ref:R,onComplete(){k||P(!1)}});let _={...v,transitionStatus:E},F=(0,p.useRenderElement)("div",e,{ref:[a,R],state:_,props:[{id:m,children:k?L:I},c],stateAttributesMapping:M,enabled:C});return C?F:null}),R=r.forwardRef(function(e,t){let{render:r,id:a,className:l,...s}=e,o=(0,d.useBaseUiId)(a),u=(0,n.useFieldRootContext)(!1),{setMessageIds:c}=(0,f.useLabelableContext)();return(0,S.useIsoLayoutEffect)(()=>{if(o)return c(e=>e.concat(o)),()=>{c(e=>e.filter(e=>e!==o))}},[o,c]),(0,p.useRenderElement)("p",e,{ref:t,state:u.state,props:[{id:o},s],stateAttributesMapping:i.fieldValidityMapping})});var I=e.i(121538),T=e.i(924723),N=e.i(281284),O=e.i(305734),L=e.i(197167),A=e.i(394772),_=e.i(75408);let F=r.forwardRef(function(e,t){let{render:a,className:l,id:s,name:o,value:u,disabled:c=!1,onValueChange:d,defaultValue:m,autoFocus:h=!1,...v}=e,{state:g,name:b,disabled:y,setTouched:x,setDirty:k,validityData:C,setFocused:w,setFilled:E,validationMode:j,validation:M}=(0,n.useFieldRootContext)(),P=y||c,R=b??o,F={...g,disabled:P},{labelId:D}=(0,f.useLabelableContext)(),V=(0,N.useLabelableId)({id:s});(0,S.useIsoLayoutEffect)(()=>{let e=null!=u;M.inputRef.current?.value||e&&""!==u?E(!0):e&&""===u&&E(!1)},[M.inputRef,E,u]);let U=r.useRef(null);(0,S.useIsoLayoutEffect)(()=>{h&&U.current===(0,_.activeElement)((0,T.ownerDocument)(U.current))&&w(!0)},[h,w]);let[z]=(0,I.useControlled)({controlled:u,default:m,name:"FieldControl",state:"value"}),B=void 0!==u,$=B?z:void 0;return(0,O.useField)({id:V,name:R,commit:M.commit,value:$,getValue:()=>M.inputRef.current?.value,controlRef:M.inputRef}),(0,p.useRenderElement)("input",e,{ref:[t,U],state:F,props:[{id:V,disabled:P,name:R,ref:M.inputRef,"aria-labelledby":D,autoFocus:h,...B?{value:$}:{defaultValue:m},onChange(e){let t=e.currentTarget.value;d?.(t,(0,L.createChangeEventDetails)(A.REASONS.none,e.nativeEvent)),k(t!==C.initialValue),E(""!==t)},onFocus(){w(!0)},onBlur(e){x(!0),w(!1),"onBlur"===j&&M.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(x(!0),M.commit(e.currentTarget.value))}},M.getInputValidationProps(),v],stateAttributesMapping:i.fieldValidityMapping})}),D=r.createContext({disabled:!1}),V=r.createContext(void 0),U=r.forwardRef(function(e,a){let{render:s,className:o,disabled:u=!1,...c}=e,{state:d,disabled:f}=(0,n.useFieldRootContext)(!1),h=f||u,v=function(e=!0){let t=r.useContext(V);if(void 0===t&&!e)throw Error((0,l.default)(3));return t}(),g=v?.parent.id,b=v?.allValues!==void 0,y=r.useMemo(()=>({disabled:h}),[h]),x=(0,p.useRenderElement)("div",e,{ref:a,state:d,props:c,stateAttributesMapping:i.fieldValidityMapping});return(0,t.jsx)(m,{controlId:b?g:void 0,children:(0,t.jsx)(D.Provider,{value:y,children:x})})});e.s(["Control",0,F,"Description",0,R,"Error",0,P,"Item",0,U,"Label",0,C,"Root",0,x,"Validity",0,function(e){let{children:a}=e,{validityData:i,invalid:l}=(0,n.useFieldRootContext)(!1),s=r.useMemo(()=>(0,g.getCombinedFieldValidityData)(i,l),[i,l]),o=!1===s.state.valid,{transitionStatus:u}=(0,j.useTransitionStatus)(o),c=r.useMemo(()=>({...s,validity:s.state,transitionStatus:u}),[s,u]);return(0,t.jsx)(r.Fragment,{children:a(c)})}],882266);var z=e.i(882266),z=z;let B=r.forwardRef(function(e,r){return(0,t.jsx)(z.Control,{ref:r,...e})});var $=e.i(937756);e.s(["Input",0,function({className:e,type:r,...a}){return(0,t.jsx)(B,{type:r,"data-slot":"input",className:(0,$.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}],831349)},893832,e=>{"use strict";var t=e.i(789031);e.s(["Check",()=>t.default])},422364,e=>{"use strict";let t=(0,e.i(863961).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},357334,e=>{"use strict";let t=(0,e.i(863961).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],357334)},584685,e=>{"use strict";var t=e.i(432377),r=e.i(937756);e.s(["SegmentedControl",0,function({options:e,value:a,onChange:n,className:i}){return(0,t.jsx)("div",{className:(0,r.cn)("inline-flex rounded-md border border-border bg-muted p-1 gap-1",i),children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>n(e.value),className:(0,r.cn)("rounded px-3 py-1 text-sm transition-colors",a===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}])},275283,e=>{"use strict";var t=e.i(85212),r=(e,t,r,a,n,i,l,s)=>{let o=document.documentElement,u=["light","dark"];function c(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&i?n.map(e=>i[e]||e):n;r?(o.classList.remove(...a),o.classList.add(i&&i[t]?i[t]:t)):o.setAttribute(e,t)}),r=t,s&&u.includes(r)&&(o.style.colorScheme=r)}if(a)c(a);else try{let e=localStorage.getItem(t)||r,a=l&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(a)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",i="u"<typeof window,l=t.createContext(void 0),s={setTheme:e=>{},themes:[]},o=["light","dark"],u=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:i=!0,enableColorScheme:s=!0,storageKey:u="theme",themes:p=o,defaultTheme:h=i?"system":"light",attribute:v="data-theme",value:g,children:b,nonce:y,scriptProps:x})=>{let[k,C]=t.useState(()=>d(u,h)),[S,w]=t.useState(()=>"system"===k?m():k),E=g?Object.values(g):p,j=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&i&&(t=m());let n=g?g[t]:t,l=r?f(y):null,o=document.documentElement,u=e=>{"class"===e?(o.classList.remove(...E),n&&o.classList.add(n)):e.startsWith("data-")&&(n?o.setAttribute(e,n):o.removeAttribute(e))};if(Array.isArray(v)?v.forEach(u):u(v),s){let e=a.includes(h)?h:null,r=a.includes(t)?t:e;o.style.colorScheme=r}null==l||l()},[y]),M=t.useCallback(e=>{let t="function"==typeof e?e(k):e;C(t);try{localStorage.setItem(u,t)}catch(e){}},[k]),P=t.useCallback(t=>{w(m(t)),"system"===k&&i&&!e&&j("system")},[k,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(P),P(e),()=>e.removeListener(P)},[P]),t.useEffect(()=>{let e=e=>{e.key===u&&(e.newValue?C(e.newValue):M(h))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[M]),t.useEffect(()=>{j(null!=e?e:k)},[e,k]);let R=t.useMemo(()=>({theme:k,setTheme:M,forcedTheme:e,resolvedTheme:"system"===k?S:k,themes:i?[...p,"system"]:p,systemTheme:i?S:void 0}),[k,M,e,S,i,p]);return t.createElement(l.Provider,{value:R},t.createElement(c,{forcedTheme:e,storageKey:u,attribute:v,enableSystem:i,enableColorScheme:s,defaultTheme:h,value:g,themes:p,nonce:y,scriptProps:x}),b)},c=t.memo(({forcedTheme:e,storageKey:a,attribute:n,enableSystem:i,enableColorScheme:l,defaultTheme:s,value:o,themes:u,nonce:c,scriptProps:d})=>{let f=JSON.stringify([n,a,s,e,u,o,i,l]).slice(1,-1);return t.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${f})`}})}),d=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},f=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},m=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(l)?t.createElement(t.Fragment,null,e.children):t.createElement(u,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(l))?e:s}])},380402,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("60101684dc36433c5408f741671d65e79a1d2e3037",t.callServer,void 0,t.findSourceMapURL,"setConfigValue");e.s(["setConfigValue",0,r])},811424,809250,e=>{"use strict";var t=e.i(863961);let r=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,r],811424);let a=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],809250)},172854,e=>{e.v(t=>Promise.all(["static/chunks/17oc2l.ekcs8b.css","static/chunks/11y66l77sw_f_.js"].map(t=>e.l(t))).then(()=>t(467005)))},97351,e=>{e.v(t=>Promise.all(["static/chunks/07_bc0h5~tysp.js","static/chunks/0u6p4i4aoeb4m.js"].map(t=>e.l(t))).then(()=>t(834880)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,342786,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return o},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function i(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,l(e));else t.set(r,l(a));return t}function o(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},457588,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return g},PageNotFoundError:function(){return y},SP:function(){return h},ST:function(){return v},WEB_VITALS:function(){return i},execOnce:function(){return l},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return o},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return C}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function m(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&f(r))return a;if(!a)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let h="u">typeof performance,v=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class g extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},66364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},378719,e=>{"use strict";var t=e.i(85212);let r=t.createContext(void 0);e.s(["useDirection",0,function(){let e=t.useContext(r);return e?.direction??"ltr"}])},912016,e=>{"use strict";var t=e.i(432377);let r="base-ui-disable-scrollbar";e.s(["styleDisableScrollbar",0,{className:r,getElement:e=>(0,t.jsx)("style",{nonce:e,href:r,precedence:"base-ui:low",children:`.${r}{scrollbar-width:none}.${r}::-webkit-scrollbar{display:none}`})}])},594683,e=>{"use strict";var t=e.i(85212);let r=t.createContext(void 0),a={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(r)??a}])},126273,e=>{"use strict";e.s(["clamp",0,function(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}])},543485,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(16735),l=e.r(704894),s=e.r(503274)},478118,e=>{"use strict";let t=(0,e.i(863961).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},946960,e=>{"use strict";var t=e.i(478118);e.s(["Loader2",()=>t.default])},309542,(e,t,r)=>{t.exports=e.r(278039)},121538,e=>{"use strict";var t=e.i(85212);e.s(["useControlled",0,function({controlled:e,default:r,name:a,state:n="value"}){let{current:i}=t.useRef(void 0!==e),[l,s]=t.useState(r),o=t.useCallback(e=>{i||s(e)},[]);return[i?e:l,o]}])},12800,200525,e=>{"use strict";e.i(129893);var t,r=e.i(499875),a=e.i(85212),n=e.i(166508);let i=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),l={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},s={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},o={disabled:!1,...s};e.s(["DEFAULT_FIELD_ROOT_STATE",0,o,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,s,"DEFAULT_VALIDITY_STATE",0,l,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[i.valid]:""}:{[i.invalid]:""}}],200525);let u=a.createContext({invalid:void 0,name:void 0,validityData:{state:l,errors:[],error:"",value:"",initialValue:null},setValidityData:n.NOOP,disabled:void 0,touched:s.touched,setTouched:n.NOOP,dirty:s.dirty,setDirty:n.NOOP,filled:s.filled,setFilled:n.NOOP,focused:s.focused,setFocused:n.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:o,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=n.EMPTY_OBJECT)=>e,getInputValidationProps:(e=n.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,u,"useFieldRootContext",0,function(e=!0){let t=a.useContext(u);if(t.setValidityData===n.NOOP&&!e)throw Error((0,r.default)(28));return t}],12800)},191948,e=>{"use strict";var t=e.i(85212),r=e.i(166508);let a=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:r.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(a)}])},355283,e=>{"use strict";var t=e.i(85212),r=e.i(166508);let a=t.createContext({controlId:void 0,registerControlId:r.NOOP,labelId:void 0,setLabelId:r.NOOP,messageIds:[],setMessageIds:r.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,a,"useLabelableContext",0,function(){return t.useContext(a)}])},197494,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},148242,e=>{"use strict";var t=e.i(447120),r=e.i(924723),a=e.i(357030),n=e.i(75408),i=e.i(284060),l=e.i(443667),s=e.i(355283);e.s(["useLabel",0,function(e={}){let o,{id:u,fallbackControlId:c,native:d=!1,setLabelId:f,focusControl:m}=e,{controlId:p,setLabelId:h}=(0,s.useLabelableContext)(),v=(0,a.useStableCallback)(e=>{h(e),f?.(e)}),b=(o=(0,l.useBaseUiId)(u),(0,i.useIsoLayoutEffect)(()=>(v(o),()=>{v(void 0)}),[o,v]),o),g=p??c;function y(e){let a=(0,n.getTarget)(e.nativeEvent);a?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),d||function(e){if(m)return m(e,g);if(!g)return;let a=(0,r.ownerDocument)(e.currentTarget).getElementById(g);(0,t.isHTMLElement)(a)&&a.focus({focusVisible:!0})}(e))}return d?{id:b,htmlFor:g??void 0,onMouseDown:y}:{id:b,onClick:y,onPointerDown(e){e.preventDefault()}}}],148242)},281284,e=>{"use strict";var t=e.i(85212),r=e.i(284060),a=e.i(357030),n=e.i(524534),i=e.i(447120),l=e.i(166508),s=e.i(443667),o=e.i(355283);e.s(["useLabelableId",0,function(e={}){let{id:u,implicit:c=!1,controlRef:d}=e,{controlId:f,registerControlId:m}=(0,o.useLabelableContext)(),p=(0,s.useBaseUiId)(u),h=c?f:void 0,v=(0,n.useRefWithInit)(()=>Symbol("labelable-control")),b=t.useRef(!1),g=t.useRef(null!=u),y=(0,a.useStableCallback)(()=>{b.current&&m!==l.NOOP&&(b.current=!1,m(v.current,void 0))});return(0,r.useIsoLayoutEffect)(()=>{let e;if(m!==l.NOOP){if(c){let t=d?.current;e=(0,i.isElement)(t)&&null!=t.closest("label")?u??null:h??p}else if(null!=u)g.current=!0,e=u;else{if(!g.current)return void y();e=p}if(void 0===e)return void y();b.current=!0,m(v.current,e)}},[u,d,h,m,c,p,v,y]),t.useEffect(()=>y,[y]),f??p}])},305734,e=>{"use strict";var t=e.i(9235),r=e.i(284060),a=e.i(357030),n=e.i(197494),i=e.i(191948),l=e.i(12800);e.s(["useField",0,function(e){let{enabled:s=!0,value:o,id:u,name:c,controlRef:d,commit:f}=e,{formRef:m}=(0,i.useFormContext)(),{invalid:p,markedDirtyRef:h,validityData:v,setValidityData:b}=(0,l.useFieldRootContext)(),g=(0,a.useStableCallback)(e.getValue);(0,r.useIsoLayoutEffect)(()=>{if(!s)return;let e=o;void 0===e&&(e=g()),null===v.initialValue&&null!==e&&b(t=>({...t,initialValue:e}))},[s,b,o,v.initialValue,g]),(0,r.useIsoLayoutEffect)(()=>{s&&u&&m.current.fields.set(u,{getValue:g,name:c,controlRef:d,validityData:(0,n.getCombinedFieldValidityData)(v,p),validate(e=!0){let r=o;void 0===r&&(r=g()),h.current=!0,e?t.flushSync(()=>f(r)):f(r)}})},[f,d,s,m,g,u,p,h,c,v,o]),(0,r.useIsoLayoutEffect)(()=>{let e=m.current.fields;return()=>{u&&e.delete(u)}},[m,u])}])},555159,e=>{"use strict";let t=(0,e.i(863961).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],555159)},565037,e=>{"use strict";let t=(0,e.i(863961).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",0,t],565037)},478430,e=>{"use strict";let t=(0,e.i(863961).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],478430)},698654,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return o}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(968996)._(e.r(342786)),l=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",s=e.hash||"",o=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),o&&"object"==typeof o&&(o=String(i.urlQueryToSearchParams(o)));let c=e.search||o&&`?${o}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||l.test(a))&&!1!==u?(u="//"+(u||""),n&&"/"!==n[0]&&(n="/"+n)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${u}${n}${c}${s}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},396427,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(85212);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=i(e,a)),t&&(n.current=i(t,a))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},862126,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let a=e.r(457588),n=e.r(364700);function i(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},175926,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},631325,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return b},useLinkStatus:function(){return y}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(968996),l=e.r(432377),s=i._(e.r(85212)),o=e.r(698654),u=e.r(717921),c=e.r(396427),d=e.r(457588),f=e.r(835153);e.r(66364);let m=e.r(338875),p=e.r(807547),h=e.r(862126),v=e.r(816063);function b(t){var r,a;let n,i,b,[y,x]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),k=(0,s.useRef)(null),{href:C,as:S,children:w,prefetch:E=null,passHref:j,replace:M,shallow:P,scroll:R,onClick:I,onMouseEnter:T,onTouchStart:N,legacyBehavior:O=!1,onNavigate:L,transitionTypes:A,ref:F,unstable_dynamicOnHover:_,...D}=t;n=w,O&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let V=s.default.useContext(u.AppRouterContext),U=!1!==E,z=!1!==E?null===(a=E)||"auto"===a?v.FetchStrategy.PPR:v.FetchStrategy.Full:v.FetchStrategy.PPR,B="string"==typeof(r=S||C)?r:(0,o.formatUrl)(r);if(O){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=s.default.Children.only(n)}let $=O?i&&"object"==typeof i&&i.ref:F,K=s.default.useCallback(e=>(null!==V&&(k.current=(0,p.mountLinkInstance)(e,B,V,z,U,x)),()=>{k.current&&((0,p.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,B,V,z,x]),H={ref:(0,c.useMergedRef)(K,$),onClick(t){O||"function"!=typeof I||I(t),O&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!V||t.defaultPrevented||function(t,r,a,n,i,l,o){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(752129);s.default.startTransition(()=>{d(r,n?"replace":"push",!1===i?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,a.current,o)})}}(t,B,k,M,R,L,A)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),V&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===_)},onTouchStart:function(e){O||"function"!=typeof N||N(e),O&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),V&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===_)}};return(0,d.isAbsoluteUrl)(B)?H.href=B:O&&!j&&("a"!==i.type||"href"in i.props)||(H.href=(0,f.addBasePath)(B)),b=O?s.default.cloneElement(i,H):(0,l.jsx)("a",{...D,...H,children:n}),(0,l.jsx)(g.Provider,{value:y,children:b})}e.r(175926);let g=(0,s.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},677436,142296,894296,e=>{"use strict";var t=e.i(863961);let r=(0,t.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,r],142296),e.s(["Search",0,r],677436);let a=(0,t.default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,a],894296)},370951,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("0006200c83d8442fbd59f81b786b487a3951f59711",t.callServer,void 0,t.findSourceMapURL,"getActualWsPort");e.s(["getActualWsPort",0,r])},632426,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("602d7a01b7b9836d416f35bce2820d9c6b173d9c02",t.callServer,void 0,t.findSourceMapURL,"getConfigValue");e.s(["getConfigValue",0,r])},103295,e=>{"use strict";let t=(0,e.i(863961).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],103295)},330521,e=>{"use strict";var t,r=e.i(432377);e.s([],967536),e.i(967536),e.i(129893);var a=e.i(85212),n=e.i(121538),i=e.i(357030),l=e.i(156420),s=e.i(284060),o=e.i(786546),u=e.i(166508),c=e.i(793988),d=e.i(337590),f=e.i(443667),m=e.i(136391),p=e.i(499875);let h=a.createContext(void 0);var v=e.i(200525);let b=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),g={...v.fieldValidityMapping,checked:e=>e?{[b.checked]:""}:{[b.unchecked]:""}};var y=e.i(305734),x=e.i(12800),k=e.i(191948),C=e.i(355283),S=e.i(281284),w=e.i(197167),E=e.i(394772),j=e.i(81456);let M=a.forwardRef(function(e,t){let{checked:p,className:v,defaultChecked:b,"aria-labelledby":M,id:P,inputRef:R,name:I,nativeButton:T=!1,onCheckedChange:N,readOnly:O=!1,required:L=!1,disabled:A=!1,render:F,uncheckedValue:_,value:D,...V}=e,{clearErrors:U}=(0,k.useFormContext)(),{state:z,setTouched:B,setDirty:$,validityData:K,setFilled:H,setFocused:J,shouldValidateOnChange:q,validationMode:W,disabled:G,name:Y,validation:X}=(0,x.useFieldRootContext)(),{labelId:Q}=(0,C.useLabelableContext)(),Z=G||A,ee=Y??I,et=(0,i.useStableCallback)(N),er=a.useRef(null),ea=(0,l.useMergedRefs)(er,R,X.inputRef),en=a.useRef(null),ei=(0,f.useBaseUiId)(),el=(0,S.useLabelableId)({id:P,implicit:!1,controlRef:en}),es=T?void 0:el,[eo,eu]=(0,n.useControlled)({controlled:p,default:!!b,name:"Switch",state:"checked"});(0,y.useField)({id:ei,commit:X.commit,value:eo,controlRef:en,name:ee,getValue:()=>eo}),(0,s.useIsoLayoutEffect)(()=>{er.current&&H(er.current.checked)},[er,H]),(0,j.useValueChanged)(eo,()=>{U(ee),$(eo!==K.initialValue),H(eo),q()?X.commit(eo):X.commit(eo,!0)});let{getButtonProps:ec,buttonRef:ed}=(0,m.useButton)({disabled:Z,native:T}),ef=function(e,t,r,n=!0,i){let[l,o]=a.useState(),u=(0,f.useBaseUiId)(i?`${i}-label`:void 0),c=e??t??l;return(0,s.useIsoLayoutEffect)(()=>{let a=e||t||!n?void 0:function(e,t){let r=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let r=e.id;if(r){let t=e.nextElementSibling;if(t&&t.htmlFor===r)return t}let a=e.labels;return a&&a[0]}(e);if(r)return!r.id&&t&&(r.id=t),r.id||void 0}(r.current,u);l!==a&&o(a)}),c}(M,Q,er,!T,es),em=a.useMemo(()=>(0,d.mergeProps)({checked:eo,disabled:Z,id:es,name:ee,required:L,style:ee?o.visuallyHiddenInput:o.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ea,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,r=(0,w.createChangeEventDetails)(E.REASONS.none,e.nativeEvent);et?.(t,r),r.isCanceled||eu(t)},onFocus(){en.current?.focus()}},X.getInputValidationProps,void 0!==D?{value:D}:u.EMPTY_OBJECT),[eo,Z,ea,es,ee,et,L,eu,X,D]),ep=a.useMemo(()=>({...z,checked:eo,disabled:Z,readOnly:O,required:L}),[z,eo,Z,O,L]),eh=(0,c.useRenderElement)("span",e,{state:ep,ref:[t,en,ed],props:[{id:T?el:ei,role:"switch","aria-checked":eo,"aria-readonly":O||void 0,"aria-required":L||void 0,"aria-labelledby":ef,onFocus(){Z||J(!0)},onBlur(){let e=er.current;e&&!Z&&(B(!0),J(!1),"onBlur"===W&&X.commit(e.checked))},onClick(e){O||Z||(e.preventDefault(),er.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},X.getValidationProps,V,ec],stateAttributesMapping:g});return(0,r.jsxs)(h.Provider,{value:ep,children:[eh,!eo&&ee&&void 0!==_&&(0,r.jsx)("input",{type:"hidden",name:ee,value:_}),(0,r.jsx)("input",{...em})]})}),P=a.forwardRef(function(e,t){let{render:r,className:n,...i}=e,{state:l}=(0,x.useFieldRootContext)(),s=function(){let e=a.useContext(h);if(void 0===e)throw Error((0,p.default)(63));return e}(),o={...l,...s};return(0,c.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:g,props:i})});e.s(["Root",0,M,"Thumb",0,P],50248);var R=e.i(50248),R=R,I=e.i(937756);e.s(["Switch",0,function({className:e,size:t="default",...a}){return(0,r.jsx)(R.Root,{"data-slot":"switch","data-size":t,className:(0,I.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...a,children:(0,r.jsx)(R.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],330521)},316403,e=>{"use strict";let t=(0,e.i(863961).default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["Bell",0,t],316403)},540032,e=>{"use strict";var t=e.i(432377),r=e.i(937756);e.s(["Textarea",0,function({className:e,...a}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}])},909260,e=>{"use strict";let t=(0,e.i(863961).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],909260)},923344,e=>{"use strict";let t=(0,e.i(863961).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],923344)},239358,e=>{"use strict";let t=(0,e.i(863961).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],239358)},670074,921280,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("6021975fc50673c7323391469cb58b8009e8ef58d6",t.callServer,void 0,t.findSourceMapURL,"analyzeProjectDirectory");e.s(["analyzeProjectDirectory",0,r],670074);var a=e.i(432377),n=e.i(85212),i=e.i(815681),l=e.i(863961);let s=(0,l.default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]),o=(0,l.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);var u=e.i(986044),c=e.i(677436);let d=(0,l.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);var f=e.i(718837),m=e.i(711296),p=e.i(831349),h=e.i(625054),v=e.i(142124);e.s(["FolderBrowserDialog",0,function({open:e,onOpenChange:t,onSelect:r,gitOnly:l=!1}){let{t:b}=(0,h.useI18n)(),[g,y]=(0,n.useState)(null),[x,k]=(0,n.useState)(!1),[C,S]=(0,n.useState)(null),[w,E]=(0,n.useState)(""),[j,M]=(0,n.useState)(""),[P,R]=(0,n.useState)(!1),I=(0,n.useRef)(null),T=(0,n.useCallback)(async e=>{k(!0),S(null),M(""),R(!1);try{let t=e?`/api/browse-fs?path=${encodeURIComponent(e)}`:"/api/browse-fs",r=await fetch(t);if(!r.ok){let e=await r.json();S(e.error||"Failed");return}let a=await r.json();y(a),E(a.currentPath)}catch{S("Failed to browse filesystem")}finally{k(!1)}},[]);(0,n.useEffect)(()=>{e&&(T(),setTimeout(()=>I.current?.focus(),200))},[e,T]);let N=()=>{w.trim()&&T(w.trim())},O=g?.folders.filter(e=>e.name.toLowerCase().includes(j.toLowerCase()))??[];return(0,a.jsx)(f.Dialog,{open:e,onOpenChange:t,children:(0,a.jsx)(f.DialogContent,{className:"p-0 gap-0",style:{maxWidth:"36rem",overflow:"hidden"},children:(0,a.jsxs)("div",{className:"flex flex-col max-h-[60vh] overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-5 pt-5 pb-3 shrink-0",children:[(0,a.jsx)(f.DialogTitle,{children:b(l?"folder.selectGitRepo":"folder.selectFolder")}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:b("folder.hint")})]}),(0,a.jsxs)("div",{className:"border-t border-border px-4 pt-3 pb-2 shrink-0",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:b("folder.manualInput")}),(0,a.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,a.jsx)(p.Input,{ref:I,value:w,onChange:e=>E(e.target.value),onKeyDown:e=>"Enter"===e.key&&N(),placeholder:"/path/to/your/project",title:w,className:"flex-1 min-w-0"}),(0,a.jsx)(m.Button,{variant:"outline",onClick:N,className:"h-8 px-3 shrink-0",children:b("folder.goTo")})]})]}),(0,a.jsxs)("div",{className:"px-4 py-2 shrink-0",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:b("folder.searchDir")}),(0,a.jsxs)("div",{className:"relative mt-1.5",children:[(0,a.jsx)(c.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("input",{value:j,onChange:e=>M(e.target.value),placeholder:"Filter folders and files...",className:"h-8 w-full rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 border-y border-border px-4 py-2 shrink-0 min-w-0",children:[(0,a.jsx)(m.Button,{variant:"outline",size:"icon-sm",onClick:()=>g?.homePath&&T(g.homePath),className:"shrink-0 text-muted-foreground",title:"Home",children:(0,a.jsx)(o,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(m.Button,{variant:"outline",size:"icon-sm",onClick:()=>{g&&("__DRIVES__"===g.parentPath?R(!0):(R(!1),T(g.parentPath)))},className:"shrink-0 text-muted-foreground",title:"Parent",children:(0,a.jsx)(u.ChevronUp,{className:"h-3.5 w-3.5"})}),g?.drives&&g.drives.length>0&&(0,a.jsx)(m.Button,{variant:P?"default":"outline",size:"icon-sm",onClick:()=>R(e=>!e),className:"shrink-0 text-muted-foreground",title:"Drives",children:(0,a.jsx)(d,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground font-mono",title:g?.currentPath??"",children:g?.currentPath??"..."})]}),(0,a.jsxs)(v.ScrollArea,{className:"min-h-0 flex-1",children:[x&&(0,a.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading..."}),C&&(0,a.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-rose-400",children:C}),P&&g?.drives&&g.drives.map(e=>(0,a.jsxs)("button",{onClick:()=>{var t;return t=e.path,void(R(!1),T(t))},className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,a.jsx)(d,{className:"h-4 w-4 text-blue-400 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),(0,a.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.path})]},e.path)),!P&&!x&&!C&&0===O.length&&(0,a.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:b("folder.empty")}),!P&&!x&&!C&&O.map(e=>(0,a.jsxs)("button",{onClick:()=>{e.isGit||l?(r(e.path),t(!1)):T(e.path)},onDoubleClick:()=>T(e.path),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[e.isGit?(0,a.jsx)(s,{className:"h-4 w-4 text-emerald-400 shrink-0"}):(0,a.jsx)(i.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),e.isGit&&(0,a.jsx)("span",{className:"shrink-0 rounded-md bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-400 ring-1 ring-emerald-500/20",children:"git"})]},e.path))]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2 px-5 py-3 shrink-0 border-t border-border",children:[(0,a.jsx)(m.Button,{variant:"outline",onClick:()=>t(!1),children:b("common.cancel")}),(0,a.jsx)(m.Button,{onClick:()=>{g?.currentPath&&(r(g.currentPath),t(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:b("folder.selectPath")})]})]})})})}],921280)},244501,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("40b290a8b723e5d9ae2efac5ba686075fd0e43db66",t.callServer,void 0,t.findSourceMapURL,"createProject");e.s(["createProject",0,r])},867900,86982,e=>{"use strict";let t=(0,e.i(863961).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"}]]);e.s(["Bot",0,t],867900);var r=e.i(432377),a=e.i(85212),n=e.i(632426);let i="tower-assistant-sessions",l="tower-assistant-active-session";function s(){try{let e=localStorage.getItem(i);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t}catch{return[]}}function o(){return localStorage.getItem(l)}function u(e){null===e?localStorage.removeItem(l):localStorage.setItem(l,e)}let c=(0,a.createContext)(null);function d(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let f="assistant-image-cache";function m(e,t,r){try{let a=sessionStorage.getItem(f),n=a?JSON.parse(a):{};n[e]||(n[e]={}),n[e][t]=r,sessionStorage.setItem(f,JSON.stringify(n))}catch{}}e.s(["AssistantProvider",0,function({children:e}){let[t,l]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1),[v,b]=(0,a.useState)("sidebar"),[g,y]=(0,a.useState)(null),[x,k]=(0,a.useState)([]),[C,S]=(0,a.useState)("idle"),[w,E]=(0,a.useState)(!1),j=(0,a.useRef)([]),M=(0,a.useRef)(null),P=(0,a.useRef)(null),[R,I]=(0,a.useState)([]),[T,N]=(0,a.useState)(null),O=(0,a.useRef)(!1),L=(0,a.useCallback)(()=>{k([...j.current])},[]),A=(0,a.useCallback)(async()=>{b("dialog"===await (0,n.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,a.useEffect)(()=>{A()},[A]);let F=(0,a.useCallback)(async()=>{I(s())},[]),_=(0,a.useCallback)(async e=>{E(!0);try{let t=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`);if(!t.ok)return;let r=await t.json();if(Array.isArray(r.messages)){j.current=r.messages;let t=function(e){try{let t=sessionStorage.getItem(f);if(!t)return{};return JSON.parse(t)[e]??{}}catch{return{}}}(e);if(Object.keys(t).length>0){let e=0;j.current=j.current.map(r=>{if("user"===r.role){let a=t[e];if(e++,a?.length)return{...r,imageFilenames:a}}return r})}k([...j.current])}}catch{}finally{E(!1)}},[]);(0,a.useEffect)(()=>{F();let e=o();e&&(N(e),M.current=e,_(e))},[F,_]);let D=(0,a.useCallback)(()=>{P.current?.abort(),M.current=null,O.current=!1,N(null),u(null),j.current=[],k([]),S("idle")},[]),V=(0,a.useCallback)(e=>{P.current?.abort(),M.current=e,O.current=!0,N(e),u(e),j.current=[],k([]),S("idle"),_(e)},[_]),U=(0,a.useCallback)(e=>{let t;t=s().filter(t=>t.id!==e),localStorage.setItem(i,JSON.stringify(t)),o()===e&&u(null),I(s()),T===e&&D()},[T,D]),z=(0,a.useCallback)(async()=>{h(!0);try{await A(),l(!0)}finally{h(!1)}},[A]),B=(0,a.useCallback)(()=>{l(!1),P.current?.abort()},[]),$=(0,a.useCallback)(()=>{t||p?B():z()},[t,p,B,z]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"l"===e.key&&(e.preventDefault(),$())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[$]);let K=(0,a.useCallback)(async(e,t)=>{if(!e.trim()&&!t?.imageFilenames?.length)return;P.current?.abort();let r=new AbortController;P.current=r;let a=0!==j.current.length||O.current?null:e,n=d();if(j.current=[...j.current,{id:d(),role:"user",content:e,imageFilenames:t?.imageFilenames?.length?t.imageFilenames:void 0},{id:n,role:"thinking",content:"",isStreaming:!0}],L(),t?.imageFilenames?.length&&M.current){let e=j.current.filter(e=>"user"===e.role).length-1;m(M.current,e,t.imageFilenames)}S("connecting");let l=null;try{let o=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,sessionId:M.current,imageFilenames:t?.imageFilenames??[]}),signal:r.signal});if(!o.ok||!o.body)throw Error(`HTTP ${o.status}`);S("streaming");let c=o.body.getReader(),f=new TextDecoder,p="";for(;;){let{done:e,value:r}=await c.read();if(e)break;let o=(p+=f.decode(r,{stream:!0})).split("\n");for(let e of(p=o.pop()??"",o)){let r;if(e.startsWith("data: ")){try{r=JSON.parse(e.slice(6).trim())}catch{continue}if(r.sessionId){let e=M.current;if(M.current=r.sessionId,a&&!O.current&&r.sessionId!==e){O.current=!0;let e=new Date().toISOString(),n={id:r.sessionId,title:function(e){let t=e.trim();return t?t.length>30?t.slice(0,30):t:"New Session"}(a),createdAt:e,updatedAt:e};!function(e){let t=[e,...s().filter(t=>t.id!==e.id)].slice(0,10);localStorage.setItem(i,JSON.stringify(t))}(n),I(s()),N(r.sessionId),u(r.sessionId),t?.imageFilenames?.length&&m(r.sessionId,0,t.imageFilenames)}}switch(r.type){case"text_delta":{let e=j.current.filter(e=>e.id!==n);l?j.current=e.map(e=>e.id===l?{...e,content:e.content+(r.content??""),isStreaming:!0}:e):(l=d(),j.current=[...e,{id:l,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"text":{let e=j.current.filter(e=>e.id!==n);l?j.current=e.map(e=>e.id===l?{...e,content:r.content??e.content,isStreaming:!0}:e):(l=d(),j.current=[...e,{id:l,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"tool_start":{let e=j.current.filter(e=>e.id!==n);l?(j.current=e.map(e=>e.id===l?{...e,isStreaming:!1}:e),l=null):j.current=e,j.current=[...j.current,{id:d(),role:"tool",content:`Calling ${r.content??"tool"}...`,toolName:r.content,isStreaming:!0}],L();break}case"tool_use":{let e=j.current.filter(e=>e.id!==n),t=l?e.map(e=>e.id===l?{...e,isStreaming:!1}:e):e;l=null,j.current=[...t,{id:d(),role:"tool",content:JSON.stringify(r.toolInput??{},null,2),toolName:r.content}],L();break}case"tool_result":j.current=[...j.current,{id:d(),role:"tool",content:String(r.toolOutput??""),toolName:`${r.content??"tool"} (result)`}],L();break;case"error":j.current=[...j.current.filter(e=>e.id!==n),{id:d(),role:"assistant",content:`Error: ${r.content??"Unknown error"}`}],L(),S("error");break;case"done":l&&(j.current=j.current.map(e=>e.id===l?{...e,isStreaming:!1}:e)),j.current=j.current.filter(e=>e.id!==n),L(),S("idle")}}}}j.current=j.current.filter(e=>e.id!==n),L(),S(e=>"streaming"===e?"idle":e),F()}catch(e){if("AbortError"===e.name)return;j.current=[...j.current.filter(e=>e.id!==n),{id:d(),role:"assistant",content:`Connection error: ${e.message??"Unknown error"}`}],L(),S("error")}},[L,F]),H=(0,a.useCallback)(()=>{P.current?.abort(),P.current=null;let e=[...j.current].reverse().find(e=>"user"===e.role),t=e?.content??null;if(e){let t=j.current.lastIndexOf(e);j.current=j.current.slice(0,t),k([...j.current])}return S("idle"),t},[]),J=x[x.length-1],q="connecting"===C||"streaming"===C||J?.role==="thinking"&&!0===J.isStreaming;return(0,r.jsx)(c.Provider,{value:{isOpen:t,isStarting:p,displayMode:v,worktreePath:g,toggleAssistant:$,closeAssistant:B,chatMessages:x,chatStatus:C,isChatThinking:q,isLoadingHistory:w,sendChatMessage:K,cancelChat:H,sessions:R,activeSessionId:T,createNewSession:D,switchSession:V,removeSession:U,refreshSessions:F},children:e})},"useAssistant",0,function(){let e=(0,a.useContext)(c);if(!e)throw Error("useAssistant must be used within an AssistantProvider");return e}],86982)},780156,e=>{"use strict";let t=(0,e.i(863961).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],780156)},419613,e=>{"use strict";let t=(0,e.i(863961).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},831349,e=>{"use strict";var t=e.i(432377);e.i(129893);var r=e.i(85212);e.s([],758325),e.i(758325);var a=e.i(357030),n=e.i(12800),i=e.i(200525),l=e.i(499875);let s=r.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});var o=e.i(191948),u=e.i(524534),c=e.i(337590),d=e.i(443667),f=e.i(355283);let m=function(e){let n=(0,d.useBaseUiId)(),i=void 0===e.controlId?n:e.controlId,[l,s]=r.useState(i),[o,m]=r.useState(e.labelId),[p,h]=r.useState([]),v=(0,u.useRefWithInit)(()=>new Map),{messageIds:b}=(0,f.useLabelableContext)(),g=(0,a.useStableCallback)((e,t)=>{let r=v.current;void 0===t?r.delete(e):(r.set(e,t),s(e=>{let t;if(0!==r.size){for(let a of r.values()){if(void 0!==e&&a===e)return e;void 0===t&&(t=a)}return t}}))}),y=r.useCallback(e=>(0,c.mergeProps)({"aria-describedby":b.concat(p).join(" ")||void 0},e),[b,p]),x=r.useMemo(()=>({controlId:l,registerControlId:g,labelId:o,setLabelId:m,messageIds:p,setMessageIds:h,getDescriptionProps:y}),[l,g,o,m,p,h,y]);return(0,t.jsx)(f.LabelableContext.Provider,{value:x,children:e.children})};var p=e.i(793988),h=e.i(166508),v=e.i(617406),b=e.i(197494);let g=Object.keys(i.DEFAULT_VALIDITY_STATE),y=r.forwardRef(function(e,u){let{errors:d,validationMode:m,submitAttemptedRef:y}=(0,o.useFormContext)(),{render:x,className:k,validate:C,validationDebounceTime:S=0,validationMode:w=m,name:E,disabled:j=!1,invalid:M,dirty:P,touched:R,actionsRef:I,...T}=e,{disabled:N}=function(e=!1){let t=r.useContext(s);if(!t&&!e)throw Error((0,l.default)(86));return t}(),O=(0,a.useStableCallback)(C||(()=>null)),L=N||j,[A,F]=r.useState(!1),[_,D]=r.useState(!1),[V,U]=r.useState(!1),[z,B]=r.useState(!1),$=P??_,K=R??A,H=r.useRef(!1),J=(0,a.useStableCallback)(e=>{void 0===P&&(e&&(H.current=!0),D(e))}),q=(0,a.useStableCallback)(e=>{void 0===R&&F(e)}),W=(0,a.useStableCallback)(()=>"onChange"===w||"onSubmit"===w&&y.current),G=!!E&&Object.hasOwn(d,E)&&void 0!==d[E],Y=!0===M||G,[X,Q]=r.useState({state:i.DEFAULT_VALIDITY_STATE,error:"",errors:[],value:null,initialValue:null}),Z=!Y&&X.state.valid,ee=r.useMemo(()=>({disabled:L,touched:K,dirty:$,valid:Z,filled:V,focused:z}),[L,K,$,Z,V,z]),et=function(e){let{formRef:t,clearErrors:n}=(0,o.useFormContext)(),{setValidityData:l,validate:s,validityData:u,validationDebounceTime:d,invalid:m,markedDirtyRef:p,state:y,name:x,shouldValidateOnChange:k}=e,{controlId:C,getDescriptionProps:S}=(0,f.useLabelableContext)(),w=(0,v.useTimeout)(),E=r.useRef(null),j=(0,a.useStableCallback)(async(e,r=!1)=>{let a,n=E.current;if(!n)return;if(r){if(!1!==y.valid)return;let r=n.validity;if(!r.valueMissing){let r={value:e,state:{...i.DEFAULT_VALIDITY_STATE,valid:!0},error:"",errors:[],initialValue:u.initialValue};if(n.setCustomValidity(""),C){let e=t.current.fields.get(C);e&&t.current.fields.set(C,{...e,...(0,b.getCombinedFieldValidityData)(r,!1)})}l(r);return}let a=g.reduce((e,t)=>(e[t]=r[t],e),{});if(!a.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let r of g)"valid"!==r&&("valueMissing"===r&&(t=e[r]),e[r]&&(t=!1));return t}(a))return}w.clear();let o=null,c=[],d=function(e){let t=g.reduce((t,r)=>(t[r]=e.validity[r],t),{}),r=!1;for(let e of g)if("valid"!==e){if("valueMissing"===e&&t[e])r=!0;else if(t[e])return t}return r&&!p.current&&(t.valid=!0,t.valueMissing=!1),t}(n),f=k();if(n.validationMessage&&!f)a=n.validationMessage,c=[n.validationMessage];else{let r=s(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(o="object"==typeof r&&null!==r&&"then"in r?await r:r)?(d.valid=!1,d.customError=!0,Array.isArray(o)?(c=o,n.setCustomValidity(o.join("\n"))):o&&(c=[o],n.setCustomValidity(o))):f&&(n.setCustomValidity(""),d.customError=!1,n.validationMessage?(a=n.validationMessage,c=[n.validationMessage]):n.validity.valid&&!d.valid&&(d.valid=!0))}let h={value:e,state:d,error:a??(Array.isArray(o)?o[0]:o??""),errors:c,initialValue:u.initialValue};if(C){let e=t.current.fields.get(C);e&&t.current.fields.set(C,{...e,...(0,b.getCombinedFieldValidityData)(h,m)})}l(h)}),M=r.useCallback((e={})=>(0,c.mergeProps)(S,!1===y.valid?{"aria-invalid":!0}:h.EMPTY_OBJECT,e),[S,y.valid]),P=r.useCallback((e={})=>(0,c.mergeProps)({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(n(x),!k())return void j(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?j(t.value):(w.clear(),d?w.start(d,()=>{j(t.value)}):j(t.value))}},M(e)),[M,n,x,w,j,d,k]);return r.useMemo(()=>({getValidationProps:M,getInputValidationProps:P,inputRef:E,commit:j}),[M,P,j])}({setValidityData:Q,validate:O,validityData:X,validationDebounceTime:S,invalid:Y,markedDirtyRef:H,state:ee,name:E,shouldValidateOnChange:W}),er=r.useCallback(()=>{H.current=!0,et.commit(X.value)},[et,X]);r.useImperativeHandle(I,()=>({validate:er}),[er]);let ea=r.useMemo(()=>({invalid:Y,name:E,validityData:X,setValidityData:Q,disabled:L,touched:K,setTouched:q,dirty:$,setDirty:J,filled:V,setFilled:U,focused:z,setFocused:B,validate:O,validationMode:w,validationDebounceTime:S,shouldValidateOnChange:W,state:ee,markedDirtyRef:H,validation:et}),[Y,E,X,L,K,q,$,J,V,U,z,B,O,w,S,W,ee,et]),en=(0,p.useRenderElement)("div",e,{ref:u,state:ee,props:T,stateAttributesMapping:i.fieldValidityMapping});return(0,t.jsx)(n.FieldRootContext.Provider,{value:ea,children:en})}),x=r.forwardRef(function(e,r){return(0,t.jsx)(m,{children:(0,t.jsx)(y,{...e,ref:r})})});var k=e.i(148242);let C=r.forwardRef(function(e,t){let{render:a,className:l,id:s,nativeLabel:o=!0,...u}=e,c=(0,n.useFieldRootContext)(!1),{labelId:d}=(0,f.useLabelableContext)(),m=r.useRef(null),h=(0,k.useLabel)({id:d??s,native:o});return(0,p.useRenderElement)("label",e,{ref:[t,m],state:c.state,props:[h,u],stateAttributesMapping:i.fieldValidityMapping})});var S=e.i(284060),w=e.i(412360),E=e.i(144909),j=e.i(883993);let M={...i.fieldValidityMapping,...E.transitionStatusMapping},P=r.forwardRef(function(e,a){let{render:i,id:l,className:s,match:u,...c}=e,m=(0,d.useBaseUiId)(l),{validityData:h,state:v,name:b}=(0,n.useFieldRootContext)(!1),{setMessageIds:g}=(0,f.useLabelableContext)(),{errors:y}=(0,o.useFormContext)(),x=b?y[b]:null,k=!1;k=!!x||!0===u||(u?!!h.state[u]:!1===h.state.valid);let{mounted:C,transitionStatus:E,setMounted:P}=(0,j.useTransitionStatus)(k);(0,S.useIsoLayoutEffect)(()=>{if(k&&m)return g(e=>e.concat(m)),()=>{g(e=>e.filter(e=>e!==m))}},[k,m,g]);let R=r.useRef(null),[I,T]=r.useState(null),[N,O]=r.useState(null),L=x||(h.errors.length>1?(0,t.jsx)("ul",{children:h.errors.map(e=>(0,t.jsx)("li",{children:e},e))}):h.error),A=h.error;null!=x?A=Array.isArray(x)?JSON.stringify(x):x:h.errors.length>1&&(A=JSON.stringify(h.errors)),k&&A!==N&&(O(A),T(L)),(0,w.useOpenChangeComplete)({open:k,ref:R,onComplete(){k||P(!1)}});let F={...v,transitionStatus:E},_=(0,p.useRenderElement)("div",e,{ref:[a,R],state:F,props:[{id:m,children:k?L:I},c],stateAttributesMapping:M,enabled:C});return C?_:null}),R=r.forwardRef(function(e,t){let{render:r,id:a,className:l,...s}=e,o=(0,d.useBaseUiId)(a),u=(0,n.useFieldRootContext)(!1),{setMessageIds:c}=(0,f.useLabelableContext)();return(0,S.useIsoLayoutEffect)(()=>{if(o)return c(e=>e.concat(o)),()=>{c(e=>e.filter(e=>e!==o))}},[o,c]),(0,p.useRenderElement)("p",e,{ref:t,state:u.state,props:[{id:o},s],stateAttributesMapping:i.fieldValidityMapping})});var I=e.i(121538),T=e.i(924723),N=e.i(281284),O=e.i(305734),L=e.i(197167),A=e.i(394772),F=e.i(75408);let _=r.forwardRef(function(e,t){let{render:a,className:l,id:s,name:o,value:u,disabled:c=!1,onValueChange:d,defaultValue:m,autoFocus:h=!1,...v}=e,{state:b,name:g,disabled:y,setTouched:x,setDirty:k,validityData:C,setFocused:w,setFilled:E,validationMode:j,validation:M}=(0,n.useFieldRootContext)(),P=y||c,R=g??o,_={...b,disabled:P},{labelId:D}=(0,f.useLabelableContext)(),V=(0,N.useLabelableId)({id:s});(0,S.useIsoLayoutEffect)(()=>{let e=null!=u;M.inputRef.current?.value||e&&""!==u?E(!0):e&&""===u&&E(!1)},[M.inputRef,E,u]);let U=r.useRef(null);(0,S.useIsoLayoutEffect)(()=>{h&&U.current===(0,F.activeElement)((0,T.ownerDocument)(U.current))&&w(!0)},[h,w]);let[z]=(0,I.useControlled)({controlled:u,default:m,name:"FieldControl",state:"value"}),B=void 0!==u,$=B?z:void 0;return(0,O.useField)({id:V,name:R,commit:M.commit,value:$,getValue:()=>M.inputRef.current?.value,controlRef:M.inputRef}),(0,p.useRenderElement)("input",e,{ref:[t,U],state:_,props:[{id:V,disabled:P,name:R,ref:M.inputRef,"aria-labelledby":D,autoFocus:h,...B?{value:$}:{defaultValue:m},onChange(e){let t=e.currentTarget.value;d?.(t,(0,L.createChangeEventDetails)(A.REASONS.none,e.nativeEvent)),k(t!==C.initialValue),E(""!==t)},onFocus(){w(!0)},onBlur(e){x(!0),w(!1),"onBlur"===j&&M.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(x(!0),M.commit(e.currentTarget.value))}},M.getInputValidationProps(),v],stateAttributesMapping:i.fieldValidityMapping})}),D=r.createContext({disabled:!1}),V=r.createContext(void 0),U=r.forwardRef(function(e,a){let{render:s,className:o,disabled:u=!1,...c}=e,{state:d,disabled:f}=(0,n.useFieldRootContext)(!1),h=f||u,v=function(e=!0){let t=r.useContext(V);if(void 0===t&&!e)throw Error((0,l.default)(3));return t}(),b=v?.parent.id,g=v?.allValues!==void 0,y=r.useMemo(()=>({disabled:h}),[h]),x=(0,p.useRenderElement)("div",e,{ref:a,state:d,props:c,stateAttributesMapping:i.fieldValidityMapping});return(0,t.jsx)(m,{controlId:g?b:void 0,children:(0,t.jsx)(D.Provider,{value:y,children:x})})});e.s(["Control",0,_,"Description",0,R,"Error",0,P,"Item",0,U,"Label",0,C,"Root",0,x,"Validity",0,function(e){let{children:a}=e,{validityData:i,invalid:l}=(0,n.useFieldRootContext)(!1),s=r.useMemo(()=>(0,b.getCombinedFieldValidityData)(i,l),[i,l]),o=!1===s.state.valid,{transitionStatus:u}=(0,j.useTransitionStatus)(o),c=r.useMemo(()=>({...s,validity:s.state,transitionStatus:u}),[s,u]);return(0,t.jsx)(r.Fragment,{children:a(c)})}],882266);var z=e.i(882266),z=z;let B=r.forwardRef(function(e,r){return(0,t.jsx)(z.Control,{ref:r,...e})});var $=e.i(937756);e.s(["Input",0,function({className:e,type:r,...a}){return(0,t.jsx)(B,{type:r,"data-slot":"input",className:(0,$.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}],831349)},893832,e=>{"use strict";var t=e.i(789031);e.s(["Check",()=>t.default])},422364,e=>{"use strict";let t=(0,e.i(863961).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},357334,e=>{"use strict";let t=(0,e.i(863961).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],357334)},584685,e=>{"use strict";var t=e.i(432377),r=e.i(937756);e.s(["SegmentedControl",0,function({options:e,value:a,onChange:n,className:i}){return(0,t.jsx)("div",{className:(0,r.cn)("inline-flex rounded-md border border-border bg-muted p-1 gap-1",i),children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>n(e.value),className:(0,r.cn)("rounded px-3 py-1 text-sm transition-colors",a===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}])},275283,e=>{"use strict";var t=e.i(85212),r=(e,t,r,a,n,i,l,s)=>{let o=document.documentElement,u=["light","dark"];function c(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&i?n.map(e=>i[e]||e):n;r?(o.classList.remove(...a),o.classList.add(i&&i[t]?i[t]:t)):o.setAttribute(e,t)}),r=t,s&&u.includes(r)&&(o.style.colorScheme=r)}if(a)c(a);else try{let e=localStorage.getItem(t)||r,a=l&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(a)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",i="u"<typeof window,l=t.createContext(void 0),s={setTheme:e=>{},themes:[]},o=["light","dark"],u=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:i=!0,enableColorScheme:s=!0,storageKey:u="theme",themes:p=o,defaultTheme:h=i?"system":"light",attribute:v="data-theme",value:b,children:g,nonce:y,scriptProps:x})=>{let[k,C]=t.useState(()=>d(u,h)),[S,w]=t.useState(()=>"system"===k?m():k),E=b?Object.values(b):p,j=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&i&&(t=m());let n=b?b[t]:t,l=r?f(y):null,o=document.documentElement,u=e=>{"class"===e?(o.classList.remove(...E),n&&o.classList.add(n)):e.startsWith("data-")&&(n?o.setAttribute(e,n):o.removeAttribute(e))};if(Array.isArray(v)?v.forEach(u):u(v),s){let e=a.includes(h)?h:null,r=a.includes(t)?t:e;o.style.colorScheme=r}null==l||l()},[y]),M=t.useCallback(e=>{let t="function"==typeof e?e(k):e;C(t);try{localStorage.setItem(u,t)}catch(e){}},[k]),P=t.useCallback(t=>{w(m(t)),"system"===k&&i&&!e&&j("system")},[k,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(P),P(e),()=>e.removeListener(P)},[P]),t.useEffect(()=>{let e=e=>{e.key===u&&(e.newValue?C(e.newValue):M(h))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[M]),t.useEffect(()=>{j(null!=e?e:k)},[e,k]);let R=t.useMemo(()=>({theme:k,setTheme:M,forcedTheme:e,resolvedTheme:"system"===k?S:k,themes:i?[...p,"system"]:p,systemTheme:i?S:void 0}),[k,M,e,S,i,p]);return t.createElement(l.Provider,{value:R},t.createElement(c,{forcedTheme:e,storageKey:u,attribute:v,enableSystem:i,enableColorScheme:s,defaultTheme:h,value:b,themes:p,nonce:y,scriptProps:x}),g)},c=t.memo(({forcedTheme:e,storageKey:a,attribute:n,enableSystem:i,enableColorScheme:l,defaultTheme:s,value:o,themes:u,nonce:c,scriptProps:d})=>{let f=JSON.stringify([n,a,s,e,u,o,i,l]).slice(1,-1);return t.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${f})`}})}),d=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},f=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},m=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(l)?t.createElement(t.Fragment,null,e.children):t.createElement(u,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(l))?e:s}])},690175,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("60e717b64589146310c68266b1abebb0b6fcf06a70",t.callServer,void 0,t.findSourceMapURL,"setConfigValue");e.s(["setConfigValue",0,r])},811424,809250,e=>{"use strict";var t=e.i(863961);let r=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,r],811424);let a=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],809250)},172854,e=>{e.v(t=>Promise.all(["static/chunks/17oc2l.ekcs8b.css","static/chunks/09wk17shlbfp6.js"].map(t=>e.l(t))).then(()=>t(467005)))},97351,e=>{e.v(t=>Promise.all(["static/chunks/07_bc0h5~tysp.js","static/chunks/0u6p4i4aoeb4m.js"].map(t=>e.l(t))).then(()=>t(834880)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,750986,1156,e=>{"use strict";var s=e.i(419613);e.s(["CheckCircle2",()=>s.default],750986);let t=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],1156)},265826,e=>{"use strict";let s=(0,e.i(863961).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,s],265826)},593835,e=>{"use strict";var s=e.i(432377),t=e.i(631325),a=e.i(309542),r=e.i(265826),l=e.i(555159),i=e.i(478430),n=e.i(565037),c=e.i(625054);let d=[{key:"notes",icon:l.FileText},{key:"assets",icon:i.FolderOpen},{key:"archive",icon:n.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),i=(0,a.usePathname)(),n=d.find(e=>i.includes(`/${e.key}`))?.key;return(0,s.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,s.jsxs)(t.default,{href:`/workspaces/${e}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,s.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:l("archive.backToBoard")})]}),(0,s.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),d.map(a=>{let r=a.icon,i=n===a.key;return(0,s.jsxs)(t.default,{href:`/workspaces/${e}/${a.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${i?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,s.jsx)(r,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},732728,e=>{"use strict";var s=e.i(432377),t=e.i(85212),a=e.i(565037),r=e.i(750986),l=e.i(1156),i=e.i(946960),n=e.i(610874),c=e.i(625054),d=e.i(593835),o=e.i(543485);let x=(0,o.createServerReference)("
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,750986,1156,e=>{"use strict";var s=e.i(419613);e.s(["CheckCircle2",()=>s.default],750986);let t=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],1156)},265826,e=>{"use strict";let s=(0,e.i(863961).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,s],265826)},593835,e=>{"use strict";var s=e.i(432377),t=e.i(631325),a=e.i(309542),r=e.i(265826),l=e.i(555159),i=e.i(478430),n=e.i(565037),c=e.i(625054);let d=[{key:"notes",icon:l.FileText},{key:"assets",icon:i.FolderOpen},{key:"archive",icon:n.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),i=(0,a.usePathname)(),n=d.find(e=>i.includes(`/${e.key}`))?.key;return(0,s.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,s.jsxs)(t.default,{href:`/workspaces/${e}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,s.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:l("archive.backToBoard")})]}),(0,s.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),d.map(a=>{let r=a.icon,i=n===a.key;return(0,s.jsxs)(t.default,{href:`/workspaces/${e}/${a.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${i?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,s.jsx)(r,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},732728,e=>{"use strict";var s=e.i(432377),t=e.i(85212),a=e.i(565037),r=e.i(750986),l=e.i(1156),i=e.i(946960),n=e.i(610874),c=e.i(625054),d=e.i(593835),o=e.i(543485);let x=(0,o.createServerReference)("40d005870d5c05474a4447139634a368c57c565b53",o.callServer,void 0,o.findSourceMapURL,"getArchivedTasks");function m(e){return new Date(e).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function u({priority:e}){return(0,s.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[e]??"bg-slate-400"}`})}e.s(["ArchivePageClient",0,function({allWorkspaces:e,initialWorkspaceId:o,initialProjectId:h,initialTasks:p}){let f,{t:g}=(0,c.useI18n)(),[v,j]=(0,t.useTransition)(),[b,N]=(0,t.useState)(o),[y,k]=(0,t.useState)(h),[w,C]=(0,t.useState)(p),S=e.find(e=>e.id===b),A=S?.projects??[],$=(0,t.useCallback)(e=>{e?j(async()=>{C(await x(e))}):C([])},[j]);return(0,s.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,s.jsx)(d.SubPageNav,{workspaceId:b}),(0,s.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,s.jsxs)(n.Select,{value:b,onValueChange:s=>s&&(s=>{if(s===b)return;N(s);let t=e.find(e=>e.id===s),a=t?.projects[0]??null;k(a?.id??null),$(a?.id??null)})(s),children:[(0,s.jsx)(n.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,s.jsx)("span",{className:"truncate",children:S?.name??b})}),(0,s.jsx)(n.SelectContent,{children:e.map(e=>(0,s.jsx)(n.SelectItem,{value:e.id,children:e.name},e.id))})]}),A.length>0&&(0,s.jsxs)(n.Select,{value:y??"",onValueChange:e=>e&&void(e!==y&&(k(e),$(e))),children:[(0,s.jsx)(n.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,s.jsx)("span",{className:"truncate",children:(f=A.find(e=>e.id===y))?f.alias?`${f.name} (${f.alias})`:f.name:""})}),(0,s.jsx)(n.SelectContent,{children:A.map(e=>(0,s.jsxs)(n.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,s.jsxs)("span",{className:"ml-auto rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[w.length," ",g("archive.tasksCount")]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,s.jsxs)("div",{className:`relative ${v?"opacity-40 pointer-events-none":""} transition-opacity`,children:[v&&(0,s.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,s.jsx)(i.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===w.length?(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,s.jsx)(a.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:g("archive.noTasks")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/60",children:g("archive.noTasksDesc")})]}):(0,s.jsx)("div",{className:"space-y-2",children:w.map(e=>{let t="DONE"===e.status,a=e.executions[0];return(0,s.jsx)("div",{className:"group rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"mt-0.5 shrink-0",children:t?(0,s.jsx)(r.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,s.jsx)(l.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u,{priority:e.priority}),(0,s.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:e.title}),(0,s.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${t?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:t?g("archive.status.done"):g("archive.status.cancelled")})]}),e.labels.length>0&&(0,s.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,s.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,outline:`1px solid ${e.label.color}40`},children:e.label.name},e.label.id))}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:[g("archive.createdAt"),": ",m(e.createdAt)]}),(0,s.jsxs)("span",{children:[t?g("archive.completedAt"):g("archive.cancelledAt"),": ",m(e.updatedAt)]}),a&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[g("archive.lastExecution"),":"," ",(0,s.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===a.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===a.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:a.status})]})]})]})]})},e.id)})})]})})]})}],732728)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,864056,e=>{"use strict";let t=(0,e.i(863961).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],864056)},803041,e=>{"use strict";var t=e.i(422364);e.s(["ChevronRight",()=>t.default])},289208,e=>{"use strict";let t=(0,e.i(863961).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],289208)},466256,421845,e=>{"use strict";var t=e.i(863961);let r=(0,t.default)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);e.s(["ClipboardList",0,r],466256);let s=(0,t.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,s],421845)},787207,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},215234,109717,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("40633c20e7bbfb9483cc48d141195236c76f6903f7",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],215234);let s=(0,t.createServerReference)("4056b233232bc7270b4883d8d09885c980468014c8",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,s],109717)},265826,e=>{"use strict";let t=(0,e.i(863961).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],265826)},726111,e=>{"use strict";var t=e.i(432377),r=e.i(937756);e.s(["EmptyState",0,function({icon:e,title:s,description:a,action:i,className:n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:s}),a&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:a}),i&&(0,t.jsx)("div",{className:"mt-2",children:i})]})}])},616199,e=>{"use strict";let t=(0,e.i(863961).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],616199)},215365,636082,e=>{"use strict";let t=(0,e.i(863961).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],215365);var r=e.i(543485);let s=(0,r.createServerReference)("407bcbd4b847765ba2f147e345fe15268b4daba45d",r.callServer,void 0,r.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,s],636082)},993448,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("40c3e507ebd50da62a0ef43da20b044bca6840598b",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,r])},203529,e=>{"use strict";var t=e.i(337590),r=e.i(793988),s=e.i(164688),a=e.i(937756);let i=(0,s.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",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:s="default",render:n,...l}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,a.cn)(i({variant:s}),e)},l),render:n,state:{slot:"badge",variant:s}},(0,r.useRenderElement)(o.defaultTagName??"div",o,o)}],203529)},750986,1156,e=>{"use strict";var t=e.i(419613);e.s(["CheckCircle2",()=>t.default],750986);let r=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,r],1156)},950211,e=>{"use strict";let t=(0,e.i(863961).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],950211)},854860,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("40469f2202d21113210f7781acdbc73dad857aa680",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},9433,e=>{"use strict";var t=e.i(432377),r=e.i(937756);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.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),...s})}])},268244,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("78e2cd9bdb426640f014a1ec4624b473c25a849d42",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},763428,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("40fdf7b3c181dbd95bb2d785fd7925a65618a9bbfc",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r])},515932,351101,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("60097a58828811207251170fac5cf1eb4ee31bc301",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,r],515932);let s=(0,e.i(863961).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,s],351101)},287277,e=>{"use strict";let t=(0,e.i(863961).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],287277)},463638,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("60b53391796ce5572a3ec17841077beaea0761b0a9",t.callServer,void 0,t.findSourceMapURL,"updateProject");e.s(["updateProject",0,r])},909105,e=>{"use strict";var t=e.i(432377),r=e.i(85212),s=e.i(357334),a=e.i(458851),i=e.i(677436),n=e.i(893832),l=e.i(946960),o=e.i(718837),c=e.i(711296),d=e.i(831349),u=e.i(540032),x=e.i(625054);e.s(["CreateBranchDialog",0,function({open:e,onOpenChange:m,branches:h,currentBranch:f,localPath:g,onCreated:p,onError:b}){let{t:v}=(0,x.useI18n)(),[y,j]=(0,r.useState)(""),[N,w]=(0,r.useState)(f),[k,C]=(0,r.useState)(""),[S,M]=(0,r.useState)(!1),[L,R]=(0,r.useState)(""),[D,E]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&(j(""),w(f),C(""),R(""))},[e,f]);let T=[...new Set(h)].filter(e=>e.toLowerCase().includes(L.toLowerCase())),P=async()=>{if(y.trim()){M(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:y.trim(),baseBranch:N})});if(e.ok)m(!1),p();else{let t=await e.json();b(t.error||"Unknown error")}}catch{b("Network error")}finally{M(!1)}}};return(0,t.jsx)(o.Dialog,{open:e,onOpenChange:m,children:(0,t.jsxs)(o.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(o.DialogHeader,{children:(0,t.jsx)(o.DialogTitle,{children:v("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.branchName")}),(0,t.jsx)(d.Input,{value:y,onChange:e=>j(e.target.value),placeholder:v("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&P()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>E(!D),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,t.jsx)("span",{className:"font-mono text-xs text-foreground",children:N})]}),(0,t.jsx)(a.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${D?"rotate-180":""}`})]}),D&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:L,onChange:e=>R(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:T.map(e=>(0,t.jsxs)("button",{onClick:()=>{w(e),E(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===N?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(s.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",children:e}),e===N&&(0,t.jsx)(n.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.branchDesc")}),(0,t.jsx)(u.Textarea,{value:k,onChange:e=>C(e.target.value),placeholder:v("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(o.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>m(!1),children:v("common.cancel")}),(0,t.jsxs)(c.Button,{onClick:P,disabled:!y.trim()||S,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[S?(0,t.jsx)(l.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,v("common.create")]})]})]})})}])},871183,e=>{"use strict";let t=(0,e.i(863961).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"}]]);e.s(["ArrowUpFromLine",0,t],871183)},657572,e=>{"use strict";async function t(e,r,s={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:r,path:e,...s})});if(!a.ok)throw Error((await a.json()).error||`${r} failed`);return a.json()}e.s(["gitAction",0,t])},330111,e=>{"use strict";var t=e.i(807733);e.s(["AlertTriangle",()=>t.default])},442409,e=>{"use strict";let t=(0,e.i(863961).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],442409)},477795,486305,e=>{"use strict";var t=e.i(432377),r=e.i(85212),s=e.i(803041),a=e.i(458851),i=e.i(330111),n=e.i(442409),l=e.i(863961);let o=(0,l.default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);var c=e.i(711296),d=e.i(726111),u=e.i(203529),x=e.i(718837),m=e.i(540032),h=e.i(625054);e.s(["TaskDiffView",0,function({files:e,totalAdded:l,totalRemoved:f,hasConflicts:g,conflictFiles:p,onCommit:b,hasUncommitted:v}){let{t:y}=(0,h.useI18n)(),[j,N]=(0,r.useState)(new Set),[w,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(""),[M,L]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[e.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",l]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",f]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:v&&b&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>k(!0),className:"gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4"}),y("diff.commit")]})})]}),g&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(i.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",p.length," conflicting file",1!==p.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:p.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===e.length?(0,t.jsx)(d.EmptyState,{icon:n.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:e.map(e=>{let r=j.has(e.filename);return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{var t;return t=e.filename,void N(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[r?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(s.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(u.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:"Binary"}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),r&&e.patch&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:e.patch.split("\n").map((e,r)=>{let s=e.startsWith("+")&&!e.startsWith("+++")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")&&!e.startsWith("---")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:s,children:e||" "},r)})})})]},e.filename)})})}),(0,t.jsx)(x.Dialog,{open:w,onOpenChange:k,children:(0,t.jsxs)(x.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(x.DialogHeader,{children:(0,t.jsx)(x.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(m.Textarea,{value:C,onChange:e=>S(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>k(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(C.trim()&&b){L(!0);try{await b(C.trim()),S(""),k(!1)}finally{L(!1)}}},disabled:!C.trim()||M,children:M?"...":y("diff.commit")})]})]})})]})}],477795);var f=e.i(309542);let g=(0,l.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var p=e.i(946960);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:s,taskId:a,taskTitle:i,baseBranch:n,fileCount:l,commitCount:o,commitLog:d=[],onMergeComplete:u}){let m=(0,f.useRouter)(),[h,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null),j=async()=>{b(!0),y(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){s(!1),u(),m.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?y(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):y(t.error??"Merge failed")}catch{y("Network error — merge failed")}finally{b(!1)}};return(0,t.jsx)(x.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(x.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(x.DialogHeader,{children:(0,t.jsxs)(x.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(g,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:n})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:l})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:o})]})]}),d.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:d.map((e,r)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},r))})]}),v&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:v})})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>s(!1),disabled:h,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:j,disabled:h,className:"gap-2",children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],486305)},924484,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("40514bf5261873cfa56acd3eacfdff662ea87ad96b",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,r])},391041,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("40d34d213bc1ab35df38cb181947027c13e0e67544",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r])},14243,512568,446475,425059,e=>{"use strict";var t=e.i(543485);let r=(0,t.createServerReference)("60dfe37809ea924931c11329f457d09471f68f655c",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,r],14243);let s=(0,t.createServerReference)("4004bdf16d89b726cc790f34e08c76552e61156543",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,s],512568);let a=(0,t.createServerReference)("6079ac76a116c02db2d46ba5856a7f531199d158a3",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],446475);let i=(0,e.i(863961).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,i],425059)},612758,e=>{"use strict";var t=e.i(432377),r=e.i(85212),s=e.i(458851),a=e.i(986044),i=e.i(750986),n=e.i(1156),l=e.i(946960),o=e.i(425059),c=e.i(616199),d=e.i(351101),u=e.i(287277);let x=(0,e.i(863961).default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var m=e.i(711296),h=e.i(726111),f=e.i(625054);function g({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(i.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(n.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:i,onContinueLatest:n}){let{t:l,locale:o}=(0,f.useI18n)(),[p,b]=(0,r.useState)(null),[v,y]=(0,r.useState)(null);return 0===e.length?(0,t.jsx)(h.EmptyState,{icon:x,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(r=>{let x=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(r.gitStats??null),h=function(e,t){if(!e||!t)return"";let r=new Date(t).getTime()-new Date(e).getTime();if(r<0)return"";let s=Math.floor(r/1e3);if(s<60)return`${s}s`;let a=Math.floor(s/60);if(a<60)return`${a}m ${s%60}s`;let i=Math.floor(a/60);return`${i}h ${a%60}m`}(r.startedAt??null,r.endedAt??null),f=p===r.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(g,{status:r.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(r.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(r.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let r=new Date(e),s=Math.floor((new Date().getTime()-r.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",i=r.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===s?i:1===s?"zh"===t?`昨天 ${i}`:`Yesterday ${i}`:s<7?"zh"===t?`${s}天前 ${i}`:`${s}d ago ${i}`:r.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+i}(r.startedAt??null,o)}),h&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",h,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:r.summary||l("execution.noSummary")}),x&&(x.commits||x.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[x.commits?(0,t.jsxs)("span",{children:[x.commits," ",l("execution.commits")]}):null,x.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[x.filesChanged," ",l("execution.files")]})]}):null,x.insertions||x.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),x.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",x.insertions]}):null,x.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",x.deletions]}):null]}):null]}),r.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>y(v===r.id?null:r.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(u.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:r.insightNote.title}),v===r.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(s.ChevronDown,{className:"h-3 w-3"})]}),v===r.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:r.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[r.sessionId&&i?(0,t.jsxs)(m.Button,{size:"sm",onClick:()=>i(r.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!r.sessionId&&"FAILED"===r.status&&r.id===e[0]?.id&&n?(0,t.jsxs)(m.Button,{size:"sm",onClick:n,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(m.Button,{variant:"ghost",size:"sm",onClick:()=>b(f?null:r.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(s.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[r.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:r.gitLog.split("\n").slice(0,3).join("\n")})]}),r.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:r.terminalLog})]}),"FAILED"===r.status&&null!=r.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",r.exitCode]})]})]},r.id)})]})}],612758)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,398045,e=>{"use strict";var r=e.i(543485);let t=(0,r.createServerReference)("4064da2431a3e58576cf3e90ba9bf4214769cf2121",r.callServer,void 0,r.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,t])},203529,e=>{"use strict";var r=e.i(337590),t=e.i(793988),a=e.i(164688),i=e.i(937756);let d=(0,a.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",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:a="default",render:n,...s}){var o;return o={defaultTagName:"span",props:(0,r.mergeProps)({className:(0,i.cn)(d({variant:a}),e)},s),render:n,state:{slot:"badge",variant:a}},(0,t.useRenderElement)(o.defaultTagName??"div",o,o)}],203529)},750986,1156,e=>{"use strict";var r=e.i(419613);e.s(["CheckCircle2",()=>r.default],750986);let t=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],1156)},950211,e=>{"use strict";let r=(0,e.i(863961).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,r],950211)},854860,e=>{"use strict";var r=e.i(543485);let t=(0,r.createServerReference)("40469f2202d21113210f7781acdbc73dad857aa680",r.callServer,void 0,r.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,t])},9433,e=>{"use strict";var r=e.i(432377),t=e.i(937756);e.s(["Label",0,function({className:e,...a}){return(0,r.jsx)("label",{"data-slot":"label",className:(0,t.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),...a})}])}]);
|