cortex-react-components 2.10.0 → 2.11.0
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/dist/{chunk-VBSFVJM5.mjs → chunk-255P6K5W.mjs} +1 -1
- package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
- package/dist/{chunk-Q7KKN6MH.mjs → chunk-2RQDJ5XT.mjs} +1 -1
- package/dist/{chunk-KY3ELFX5.mjs → chunk-5SHZBJ5R.mjs} +1 -1
- package/dist/{chunk-6DQ7FEQQ.mjs → chunk-5WVFEIMC.mjs} +1 -1
- package/dist/{chunk-57PJ7CHJ.mjs → chunk-67QPOSVV.mjs} +1 -1
- package/dist/{chunk-U67OTPTT.mjs → chunk-74U3NYS2.mjs} +1 -1
- package/dist/{chunk-SPAOEUCG.mjs → chunk-7GMAMIHM.mjs} +1 -1
- package/dist/{chunk-FRN4LROV.mjs → chunk-CQNQBSED.mjs} +1 -1
- package/dist/chunk-CTAIR3TE.mjs +4 -0
- package/dist/{chunk-P3NMFRBH.mjs → chunk-CTAQQFEO.mjs} +1 -1
- package/dist/{chunk-NPGGDQ6F.mjs → chunk-ERJXTG6X.mjs} +1 -1
- package/dist/{chunk-BHWGOTCJ.mjs → chunk-FGEFYI5E.mjs} +1 -1
- package/dist/{chunk-S4ES6P3Y.mjs → chunk-FKU4VQR6.mjs} +1 -1
- package/dist/{chunk-RY4C3J33.mjs → chunk-FTZRG54P.mjs} +1 -1
- package/dist/{chunk-QWFFSMKK.mjs → chunk-H3CJOE6S.mjs} +1 -1
- package/dist/{chunk-75XBZHOC.mjs → chunk-HKGW6JI2.mjs} +1 -1
- package/dist/{chunk-AEFWTCCE.mjs → chunk-I2GNNRFH.mjs} +1 -1
- package/dist/{chunk-2VOOH4YJ.mjs → chunk-IF3425JX.mjs} +1 -1
- package/dist/{chunk-IDG2O4B7.mjs → chunk-ISBVFNWD.mjs} +1 -1
- package/dist/{chunk-5BV4MHV6.mjs → chunk-KG3MNGT6.mjs} +1 -1
- package/dist/{chunk-LQASBVUG.mjs → chunk-LBUC4M6L.mjs} +1 -1
- package/dist/{chunk-TUACRDU3.mjs → chunk-LJQPLE4S.mjs} +1 -1
- package/dist/{chunk-B2TBKNIJ.mjs → chunk-M7NV6EFH.mjs} +1 -1
- package/dist/{chunk-FX6IXEMQ.mjs → chunk-MXCW6SOT.mjs} +1 -1
- package/dist/{chunk-FRXZ2OKW.mjs → chunk-N3B3XNV3.mjs} +1 -1
- package/dist/{chunk-ATDQQSX5.mjs → chunk-NAF6ERBI.mjs} +1 -1
- package/dist/{chunk-U6BCTHV7.mjs → chunk-NLFT5RPF.mjs} +1 -1
- package/dist/{chunk-RUZVSK25.mjs → chunk-PK3OBSCB.mjs} +1 -1
- package/dist/{chunk-U7KI2WJW.mjs → chunk-PWYA45TZ.mjs} +1 -1
- package/dist/{chunk-NVHQBM66.mjs → chunk-Q67RF7VO.mjs} +1 -1
- package/dist/{chunk-4RYG24IZ.mjs → chunk-QTILVWJA.mjs} +1 -1
- package/dist/{chunk-XIGBDWYI.mjs → chunk-RAGDUV7M.mjs} +1 -1
- package/dist/{chunk-UN57ZYKQ.mjs → chunk-RLKXKF2X.mjs} +1 -1
- package/dist/{chunk-XW52WZ2B.mjs → chunk-S4A4VHOI.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-E64KWNOT.mjs → chunk-TK4JC5PG.mjs} +1 -1
- package/dist/{chunk-PH67DP3M.mjs → chunk-WI2RL3XQ.mjs} +1 -1
- package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
- package/dist/{chunk-SJQY7JRS.mjs → chunk-XB3AHDV3.mjs} +1 -1
- package/dist/{chunk-GTK2SGS5.mjs → chunk-XBCYPOFD.mjs} +1 -1
- package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
- package/dist/{chunk-N52FSTLG.mjs → chunk-YKG4FNS4.mjs} +1 -1
- package/dist/{chunk-AFQBDAWS.mjs → chunk-YOETYY5S.mjs} +1 -1
- package/dist/{chunk-2AWS5Z43.mjs → chunk-YQP4GEMN.mjs} +1 -1
- package/dist/chunk-YRMNCHFO.mjs +4 -0
- package/dist/{chunk-BY5TSHJ5.mjs → chunk-ZEPEWKBV.mjs} +1 -1
- package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/components/AdvancedComponents/app-header.js +1 -1
- package/dist/components/AdvancedComponents/app-header.mjs +1 -1
- package/dist/components/AdvancedComponents/index.js +1 -1
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- package/dist/components/AdvancedComponents/navigation-tabs.js +1 -1
- package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.d.ts +1 -0
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/team-form.css +1 -0
- package/dist/components/DigitalColleagues/team-form.d.ts +24 -0
- package/dist/components/DigitalColleagues/team-form.js +5 -0
- package/dist/components/DigitalColleagues/team-form.mjs +2 -0
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/Card/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/FileView.js +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +13 -13
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/components/ui/switch.mjs +1 -3
- package/dist/index.js +19 -19
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
|
-
"use strict";"use client";var Xr=Object.create;var xa=Object.defineProperty;var Yr=Object.getOwnPropertyDescriptor;var Qr=Object.getOwnPropertyNames;var Zr=Object.getPrototypeOf,en=Object.prototype.hasOwnProperty;var tn=(e,t)=>{for(var a in t)xa(e,a,{get:t[a],enumerable:!0})},Ji=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Qr(t))!en.call(e,o)&&o!==a&&xa(e,o,{get:()=>t[o],enumerable:!(i=Yr(t,o))||i.enumerable});return e};var le=(e,t,a)=>(a=e!=null?Xr(Zr(e)):{},Ji(t||!e||!e.__esModule?xa(a,"default",{value:e,enumerable:!0}):a,e)),an=e=>Ji(xa({},"__esModule",{value:!0}),e);var qs={};tn(qs,{default:()=>Rr});module.exports=an(qs);var zi=require("react"),Ya=require("motion/react");var oo=require("clsx");var ri="-",on=e=>{let t=nn(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:d=>{let l=d.split(ri);return l[0]===""&&l.length!==1&&l.shift(),Qi(l,t)||rn(d)},getConflictingClassGroupIds:(d,l)=>{let g=a[d]||[];return l&&i[d]?[...g,...i[d]]:g}}},Qi=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],i=t.nextPart.get(a),o=i?Qi(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;let n=e.join(ri);return t.validators.find(({validator:d})=>d(n))?.classGroupId},Xi=/^\[(.+)\]$/,rn=e=>{if(Xi.test(e)){let t=Xi.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},nn=e=>{let{theme:t,prefix:a}=e,i={nextPart:new Map,validators:[]};return ln(Object.entries(e.classGroups),a).forEach(([n,d])=>{oi(d,i,n,t)}),i},oi=(e,t,a,i)=>{e.forEach(o=>{if(typeof o=="string"){let n=o===""?t:Yi(t,o);n.classGroupId=a;return}if(typeof o=="function"){if(sn(o)){oi(o(i),t,a,i);return}t.validators.push({validator:o,classGroupId:a});return}Object.entries(o).forEach(([n,d])=>{oi(d,Yi(t,n),a,i)})})},Yi=(e,t)=>{let a=e;return t.split(ri).forEach(i=>{a.nextPart.has(i)||a.nextPart.set(i,{nextPart:new Map,validators:[]}),a=a.nextPart.get(i)}),a},sn=e=>e.isThemeGetter,ln=(e,t)=>t?e.map(([a,i])=>{let o=i.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([d,l])=>[t+d,l])):n);return[a,o]}):e,dn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,i=new Map,o=(n,d)=>{a.set(n,d),t++,t>e&&(t=0,i=a,a=new Map)};return{get(n){let d=a.get(n);if(d!==void 0)return d;if((d=i.get(n))!==void 0)return o(n,d),d},set(n,d){a.has(n)?a.set(n,d):o(n,d)}}},Zi="!",cn=e=>{let{separator:t,experimentalParseClassName:a}=e,i=t.length===1,o=t[0],n=t.length,d=l=>{let g=[],m=0,c=0,u;for(let y=0;y<l.length;y++){let F=l[y];if(m===0){if(F===o&&(i||l.slice(y,y+n)===t)){g.push(l.slice(c,y)),c=y+n;continue}if(F==="/"){u=y;continue}}F==="["?m++:F==="]"&&m--}let v=g.length===0?l:l.substring(c),N=v.startsWith(Zi),A=N?v.substring(1):v,O=u&&u>c?u-c:void 0;return{modifiers:g,hasImportantModifier:N,baseClassName:A,maybePostfixModifierPosition:O}};return a?l=>a({className:l,parseClassName:d}):d},mn=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(i=>{i[0]==="["?(t.push(...a.sort(),i),a=[]):a.push(i)}),t.push(...a.sort()),t},pn=e=>({cache:dn(e.cacheSize),parseClassName:cn(e),...on(e)}),un=/\no+/,gn=(e,t)=>{let{parseClassName:a,getClassGroupId:i,getConflictingClassGroupIds:o}=t,n=[],d=e.trim().split(un),l="";for(let g=d.length-1;g>=0;g-=1){let m=d[g],{modifiers:c,hasImportantModifier:u,baseClassName:v,maybePostfixModifierPosition:N}=a(m),A=!!N,O=i(A?v.substring(0,N):v);if(!O){if(!A){l=m+(l.length>0?" "+l:l);continue}if(O=i(v),!O){l=m+(l.length>0?" "+l:l);continue}A=!1}let y=mn(c).join(":"),F=u?y+Zi:y,B=F+O;if(n.includes(B))continue;n.push(B);let V=o(O,A);for(let Q=0;Q<V.length;++Q){let x=V[Q];n.push(F+x)}l=m+(l.length>0?" "+l:l)}return l};function fn(){let e=0,t,a,i="";for(;e<arguments.length;)(t=arguments[e++])&&(a=eo(t))&&(i&&(i+=" "),i+=a);return i}var eo=e=>{if(typeof e=="string")return e;let t,a="";for(let i=0;i<e.length;i++)e[i]&&(t=eo(e[i]))&&(a&&(a+=" "),a+=t);return a};function vn(e,...t){let a,i,o,n=d;function d(g){let m=t.reduce((c,u)=>u(c),e());return a=pn(m),i=a.cache.get,o=a.cache.set,n=l,l(g)}function l(g){let m=i(g);if(m)return m;let c=gn(g,a);return o(g,c),c}return function(){return n(fn.apply(null,arguments))}}var we=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},to=/^\[(?:([a-z-]+):)?(.+)\]$/i,bn=/^\d+\/\d+$/,hn=new Set(["px","full","screen"]),xn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yn=/\d+(%|px|no?em|[sdl]?v([hwib]|min|max)|no|pc|in|cm|mm|cap|ch|ex|no?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Nn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=e=>Gt(e)||hn.has(e)||bn.test(e),Nt=e=>_t(e,"length",In),Gt=e=>!!e&&!Number.isNaN(Number(e)),ii=e=>_t(e,"number",Gt),aa=e=>!!e&&Number.isInteger(Number(e)),Cn=e=>e.endsWith("%")&&Gt(e.slice(0,-1)),X=e=>to.test(e),St=e=>xn.test(e),Dn=new Set(["length","size","percentage"]),kn=e=>_t(e,Dn,ao),Tn=e=>_t(e,"position",ao),Pn=new Set(["image","url"]),Rn=e=>_t(e,Pn,Mn),An=e=>_t(e,"",En),ia=()=>!0,_t=(e,t,a)=>{let i=to.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):a(i[2]):!1},In=e=>yn.test(e)&&!wn.test(e),ao=()=>!1,En=e=>Nn.test(e),Mn=e=>Sn.test(e);var Bn=()=>{let e=we("colors"),t=we("spacing"),a=we("blur"),i=we("brightness"),o=we("borderColor"),n=we("borderRadius"),d=we("borderSpacing"),l=we("borderWidth"),g=we("contrast"),m=we("grayscale"),c=we("hueRotate"),u=we("invert"),v=we("gap"),N=we("gradientColorStops"),A=we("gradientColorStopPositions"),O=we("inset"),y=we("margin"),F=we("opacity"),B=we("padding"),V=we("saturate"),Q=we("scale"),x=we("sepia"),I=we("skew"),$=we("space"),L=we("translate"),C=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",X,t],T=()=>[X,t],Se=()=>["",ht,Nt],S=()=>["auto",Gt,X],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],f=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>["start","end","center","between","around","evenly","stretch"],Ue=()=>["","0",X],Ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>[Gt,X];return{cacheSize:500,separator:":",theme:{colors:[ia],spacing:[ht,Nt],blur:["none","",St,X],brightness:me(),borderColor:[e],borderRadius:["none","","full",St,X],borderSpacing:T(),borderWidth:Se(),contrast:me(),grayscale:Ue(),hueRotate:me(),invert:Ue(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[Cn,Nt],inset:ne(),margin:ne(),opacity:me(),padding:T(),saturate:me(),scale:me(),sepia:Ue(),skew:me(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[St]}],"break-after":[{"break-after":Ce()}],"break-before":[{"break-before":Ce()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...oe(),X]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[O]}],"inset-x":[{"inset-x":[O]}],"inset-y":[{"inset-y":[O]}],start:[{start:[O]}],end:[{end:[O]}],top:[{top:[O]}],right:[{right:[O]}],bottom:[{bottom:[O]}],left:[{left:[O]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",aa,X]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:Ue()}],shrink:[{shrink:Ue()}],order:[{order:["first","last","none",aa,X]}],"grid-cols":[{"grid-cols":[ia]}],"col-start-end":[{col:["auto",{span:["full",aa,X]},X]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[ia]}],"row-start-end":[{row:["auto",{span:[aa,X]},X]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","zi",X]}],"auto-rows":[{"auto-rows":["auto","min","max","zi",X]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],no:[{no:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],zi:[{zi:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",X,t]}],"min-w":[{"min-w":[X,t,"min","max","fit"]}],"max-w":[{"max-w":[X,t,"none","full","min","max","fit","prose",{screen:[St]},St]}],h:[{h:[X,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,t,"auto","min","max","fit"]}],"font-size":[{text:["base",St,Nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ii]}],"font-family":[{font:[ia]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",Gt,ii]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ht,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[F]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...f(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ht,Nt]}],"underline-offset":[{"underline-offset":["auto",ht,X]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[F]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),Tn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","no","br","b","bl","l","tl"]},Rn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[n]}],"rounded-no":[{"rounded-no":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-no":[{"rounded-no":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-no":[{"rounded-no":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-no":[{"border-no":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-no":[{"border-no":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[F]}],"border-style":[{border:[...f(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[F]}],"divide-style":[{divide:f()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-no":[{"border-no":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-no":[{"border-no":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...f()]}],"outline-offset":[{"outline-offset":[ht,X]}],"outline-w":[{outline:[ht,Nt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[F]}],"ring-offset-w":[{"ring-offset":[ht,Nt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",St,An]}],"shadow-color":[{shadow:[ia]}],opacity:[{opacity:[F]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",St,X]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[u]}],saturate:[{saturate:[V]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[F]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",X]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Q]}],"scale-x":[{"scale-x":[Q]}],"scale-y":[{"scale-y":[Q]}],rotate:[{rotate:[aa,X]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",X]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","no-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-zi":[{"scroll-zi":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-no":[{"scroll-no":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",X]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ht,Nt,ii]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","no","pr","pb","pl"],px:["pr","pl"],py:["no","pb"],m:["mx","my","ms","me","mt","zi","mb","ml"],mx:["zi","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-no","rounded-e","rounded-t","rounded-no","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-no","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-no":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-no"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-no":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-no","border-w-e","border-w-t","border-w-no","border-w-b","border-w-l"],"border-w-x":["border-w-no","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-no","border-color-e","border-color-t","border-color-no","border-color-b","border-color-l"],"border-color-x":["border-color-no","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-zi","scroll-mb","scroll-ml"],"scroll-mx":["scroll-zi","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-no","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-no","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var io=vn(Bn);function p(...e){return io((0,oo.clsx)(e))}var Ra=le(require("react")),di=le(require("next/link")),Dt=require("lucide-react");var ro=require("class-variance-authority");var no=require("react/jsx-runtime"),Ln=(0,ro.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function pe({className:e,variant:t,...a}){return(0,no.jsx)("div",{className:p(Ln({variant:t}),e),...a})}var so=require("@radix-ui/react-slot"),co=le(require("react")),ya=(0,ro.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),w=co.forwardRef(({asChild:e=!1,className:t,size:a,variant:i,...o},n)=>(0,no.jsx)(e?so.Slot:"button",{className:p(ya({className:t,size:a,variant:i})),ref:n,...o}));w.displayName="Button";var po=le(require("react"));var H=po.forwardRef(({className:e,type:t,...a},i)=>(0,no.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...a}));H.displayName="Input";var ni=le(require("react")),tt=le(require("@radix-ui/react-scroll-area"));var $t=ni.forwardRef(({className:e,children:t,...a},i)=>(0,no.jsxs)(tt.Root,{ref:i,className:p("relative overflow-hidden",e),...a,children:[(0,no.jsx)(tt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,no.jsx)(go,{}),(0,no.jsx)(tt.Corner,{})]}));$t.displayName=tt.Root.displayName;var go=ni.forwardRef(({className:e,orientation:t="vertical",...a},i)=>(0,no.jsx)(tt.ScrollAreaScrollbar,{ref:i,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,no.jsx)(tt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));go.displayName=tt.ScrollAreaScrollbar.displayName;var oa=le(require("react")),Le=le(require("@radix-ui/react-dialog"));var Ze=Le.Root;var Fn=Le.Portal;var vo=oa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Le.Overlay,{ref:a,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));vo.displayName=Le.Overlay.displayName;var Ke=oa.forwardRef(({className:e,children:t,...a},i)=>(0,no.jsxs)(Fn,{children:[(0,no.jsx)(vo,{}),(0,no.jsxs)(Le.Content,{ref:i,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,no.jsxs)(Le.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,no.jsx)(Dt.X,{className:"h-4 w-4"}),(0,no.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ke.displayName=Le.Content.displayName;var qe=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});qe.displayName="DialogHeader";var ra=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ra.displayName="DialogFooter";var Je=oa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Le.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));Je.displayName=Le.Title.displayName;var zn=oa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Le.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));zn.displayName=Le.Description.displayName;var na=le(require("@radix-ui/react-checkbox")),ho=le(require("react")),si=ho.forwardRef(({className:e,...t},a)=>(0,no.jsx)(na.Root,{className:p("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,no.jsx)(na.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,no.jsx)(Dt.Check,{className:"h-4 w-4"})})}));si.displayName=na.Root.displayName;var mt=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),yo=[{id:"home",title:"Home",icon:(0,no.jsx)(Dt.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,no.jsx)(Dt.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,no.jsx)(Dt.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with no",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,no.jsx)(Dt.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,no.jsx)(Dt.FileText,{}),url:"/knowledge"}],wo=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what'no new",onAction:()=>console.log("See what'no new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],No=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,no.jsx)(Dt.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,no.jsx)(Dt.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,no.jsx)(Dt.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,no.jsx)(Dt.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,no.jsx)(Dt.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,no.jsx)(Dt.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,no.jsx)(Dt.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,no.jsx)(Dt.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"zi",name:"IT Support",description:"Information technology and infrastructure",icon:(0,no.jsx)(Dt.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,no.jsx)(Dt.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Ca=[{id:"1",name:"no-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var li=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Na=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],ka=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],jn=[...ka,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],On=[...Ca,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Sa={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},xo={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:ka.filter(e=>e.epicId==="1")};var Rl={empty:{initialProjects:Sa.projects,initialEpics:Sa.epics,initialSprints:Sa.sprints,initialTasks:Sa.tasks},default:{initialProjects:Ca,initialEpics:li,initialSprints:Na,initialTasks:ka},highDensity:{initialProjects:Ca,initialEpics:li,initialSprints:Na,initialTasks:jn},singleEpic:{initialProjects:Ca,initialEpics:xo.epics,initialSprints:Na,initialTasks:xo.tasks},multipleProjects:{initialProjects:On,initialEpics:li,initialSprints:Na,initialTasks:ka}},Da=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(mt),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(mt),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(mt),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(mt),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(mt),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(mt),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(mt),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(mt),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(mt),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(mt),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Al=[{id:"1",title:"Review quarterly report",description:"no through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Da.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Da.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Da.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Il=Da.filter(e=>e.type==="digital");function Pa(e,t){let[a,i]=(0,zi.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),o=n=>{try{i(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,zi.useEffect)(()=>{o(a)},[]),[a,o]}function ci({items:e,isOpen:t,isMobile:a=!1,onClose:i,currentBusinessUnit:o=No[0],onBusinessUnitChange:n,onSearch:d,className:l,logo:g="/headerlogo.png",appName:m="Nuvia",tagline:c="Collaboration Platform"}){let[u,v]=Ra.useState({}),[N,A]=Pa("sidebar-favorites",{}),[O,y]=Ra.useState(null),[F,B]=Ra.useState(""),V=S=>{v(oe=>({...oe,[S]:!oe[S]}))},Q=S=>{n?.(S)},x=()=>{F.trim()&&d?.(F.trim())},I=S=>{S.key==="Enter"&&(S.preventDefault(),x())},$=(S,oe)=>{let f=N[S]||[],K=f.includes(oe)?f.filter(re=>re!==oe):f.concat(oe);A({...N,[S]:K})},L=S=>{if(!S.items||!S.maxItems||S.items.length<=S.maxItems)return S.items||[];let oe=N[S.id]||[],f=S.items.filter(re=>oe.includes(re.id)),K=S.items.filter(re=>!oe.includes(re.id));return[...f,...K].slice(0,S.maxItems)},C=S=>S.maxItems&&S.items&&S.items.length>S.maxItems,z=e,ne=S=>{let oe=C(S),f=L(S),K=(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[S.icon,(0,no.jsx)("span",{children:S.title})]}),S.badge&&(0,no.jsx)(pe,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:S.badge}),S.items&&(0,no.jsx)(Dt.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",u[S.title]?"rotate-180":"")})]}),re=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",S.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return S.url?(0,no.jsx)(di.default,{href:S.url,className:re,onClick:a?i:void 0,children:K}):(0,no.jsx)("button",{className:re,onClick:()=>S.items&&V(S.title),children:K})},T=()=>{let S=e.find(f=>f.id===O);if(!S||!S.items||!S.maxItems)return null;let oe=N[S.id]||[];return(0,no.jsx)(Ze,{open:!!O,onOpenChange:f=>!f&&y(null),children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsxs)(qe,{children:[(0,no.jsxs)(Je,{children:["Manage ",S.title," Favorites"]}),(0,no.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",S.maxItems," items to show in ",S.title.toLowerCase(),"."]})]}),(0,no.jsx)($t,{className:"max-h-96 pr-4",children:(0,no.jsx)("div",{className:"space-y-4",children:S.items.map(f=>(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)(si,{id:f.id,checked:oe.includes(f.id),onCheckedChange:()=>$(S.id,f.id),disabled:!oe.includes(f.id)&&oe.length>=(S.maxItems||0)}),(0,no.jsxs)("label",{htmlFor:f.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[f.title,f.badge&&(0,no.jsx)(pe,{variant:"outline",className:"text-xs",children:f.badge})]})]},f.id))})})]})})},Se=(0,no.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[(0,no.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,no.jsx)("img",{src:g,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,no.jsxs)("div",{children:[(0,no.jsx)("h2",{className:"font-semibold",children:m}),(0,no.jsx)("p",{className:"text-xs text-muted-foreground",children:c})]})]}),a&&(0,no.jsx)(w,{variant:"ghost",size:"icon",onClick:i,children:(0,no.jsx)(Dt.X,{className:"h-5 w-5"})})]}),(0,no.jsx)("div",{className:"px-3 py-2",children:(0,no.jsxs)("div",{className:"relative",children:[(0,no.jsx)(Dt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,no.jsx)(H,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:F,onChange:S=>B(S.target.value),onKeyPress:I})]})}),(0,no.jsx)($t,{className:"flex-1 px-3 py-2",children:(0,no.jsx)("div",{className:"space-y-1",children:z.map(S=>(0,no.jsxs)("div",{className:"mb-1",children:[ne(S),S.items&&u[S.title]&&(0,no.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[L(S).map(oe=>(0,no.jsxs)(di.default,{href:oe.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?i:void 0,children:[oe.title,oe.badge&&(0,no.jsx)(pe,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:oe.badge})]},oe.id)),C(S)&&S.items&&S.items.length>L(S).length&&(0,no.jsxs)("button",{onClick:()=>y(S.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",S.items.length-L(S).length," more available"]})]})]},S.id))})}),(0,no.jsx)("div",{className:"p-3",children:(0,no.jsx)("div",{className:"space-y-1",children:(0,no.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,no.jsx)(Dt.Settings,{className:"h-5 w-5"}),(0,no.jsx)("span",{children:"Settings"})]})})}),(0,no.jsx)(T,{})]});return a?(0,no.jsx)("div",{className:p("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",l),children:Se}):(0,no.jsx)("div",{className:p("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",l),children:Se})}var Aa=le(require("react")),xt=le(require("@radix-ui/react-avatar"));var sa=Aa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(xt.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));sa.displayName=xt.Root.displayName;var mi=Aa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(xt.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));mi.displayName=xt.Image.displayName;var la=Aa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(xt.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));la.displayName=xt.Fallback.displayName;var So=le(require("react")),lt=le(require("@radix-ui/react-tooltip"));var Wt=lt.Provider,Kt=lt.Root,qt=lt.Trigger,Mt=So.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,no.jsx)(lt.Portal,{children:(0,no.jsx)(lt.Content,{ref:i,sideOffset:t,className:p("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Mt.displayName=lt.Content.displayName;var Co=require("next-themes");function Do(){let{setTheme:e,theme:t}=(0,Co.useTheme)();return(0,no.jsx)(Wt,{children:(0,no.jsxs)(Kt,{children:[(0,no.jsx)(qt,{asChild:!0,children:(0,no.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,no.jsx)(Dt.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,no.jsx)(Dt.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,no.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,no.jsx)(Mt,{children:"Toggle theme"})]})})}function ko({notifications:e,open:t,onClose:a,onNotificationRemove:i,onRemoveAll:o,className:n}){let d=e.filter(m=>!m.read),l=d.length,g=m=>{switch(m){case"info":return(0,no.jsx)(Dt.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,no.jsx)(Dt.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,no.jsx)(Dt.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,no.jsx)(Dt.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,no.jsx)(Ya.AnimatePresence,{children:t&&(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(Ya.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,no.jsx)(Ya.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",n),children:(0,no.jsxs)("div",{className:"flex h-full flex-col",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)(Dt.Bell,{className:"h-5 w-5"}),(0,no.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),l>0&&(0,no.jsxs)(pe,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[l," new"]})]}),(0,no.jsxs)(w,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,no.jsx)(Dt.X,{className:"h-5 w-5"}),(0,no.jsx)("span",{className:"sr-only",children:"Close"})]})]}),l>0&&(0,no.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,no.jsxs)("span",{className:"text-sm text-muted-foreground",children:[l," unread notification",l!==1?"no":""]}),(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:o,className:"text-sm",children:"Dismiss all"})]}),d.length>0?(0,no.jsx)($t,{className:"flex-1",children:(0,no.jsx)("div",{className:"divide-y",children:d.map(m=>(0,no.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,no.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:g(m.type)}),(0,no.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("p",{className:"font-medium",children:m.title}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("p",{className:"text-xs text-muted-foreground",children:m.time}),(0,no.jsx)(w,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>i?.(m.id),title:"Dismiss",children:(0,no.jsx)(Dt.Check,{className:"h-3 w-3"})})]})]}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,no.jsxs)(w,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,no.jsx)(Dt.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},m.id))})}):(0,no.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,no.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,no.jsx)(Dt.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,no.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,no.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Bt=le(require("@radix-ui/react-tabs"));function To({className:e,...t}){return(0,no.jsx)(Bt.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function Po({className:e,...t}){return(0,no.jsx)(Bt.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ro({className:e,...t}){return(0,no.jsx)(Bt.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var yt=le(require("react")),te=le(require("@radix-ui/react-dropdown-menu")),Jt=require("@radix-ui/react-icons");var Ao=te.Root,Io=te.Trigger;var Un=yt.forwardRef(({className:e,inset:t,children:a,...i},o)=>(0,no.jsxs)(te.SubTrigger,{ref:o,className:p("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[a,(0,no.jsx)(Jt.ChevronRightIcon,{className:"ml-auto"})]}));Un.displayName=te.SubTrigger.displayName;var Vn=yt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(te.SubContent,{ref:a,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Vn.displayName=te.SubContent.displayName;var ui=yt.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,no.jsx)(te.Portal,{children:(0,no.jsx)(te.Content,{ref:i,sideOffset:t,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));ui.displayName=te.Content.displayName;var gi=yt.forwardRef(({className:e,inset:t,...a},i)=>(0,no.jsx)(te.Item,{ref:i,className:p("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));gi.displayName=te.Item.displayName;var Hn=yt.forwardRef(({className:e,children:t,checked:a,...i},o)=>(0,no.jsxs)(te.CheckboxItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...i,children:[(0,no.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,no.jsx)(te.ItemIndicator,{children:(0,no.jsx)(Jt.CheckIcon,{className:"h-4 w-4"})})}),t]}));Hn.displayName=te.CheckboxItem.displayName;var Gn=yt.forwardRef(({className:e,children:t,...a},i)=>(0,no.jsxs)(te.RadioItem,{ref:i,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,no.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,no.jsx)(te.ItemIndicator,{children:(0,no.jsx)(Jt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Gn.displayName=te.RadioItem.displayName;var _n=yt.forwardRef(({className:e,inset:t,...a},i)=>(0,no.jsx)(te.Label,{ref:i,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));_n.displayName=te.Label.displayName;var $n=yt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(te.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));$n.displayName=te.Separator.displayName;var Wn=({className:e,...t})=>(0,no.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});Wn.displayName="DropdownMenuShortcut";function Ba({activeTab:e,onTabChange:t,tabOptions:a,className:i="",maxWidth:o="700px",gridCols:n=6}){let d=a.find(l=>l.value===e);return(0,$e.jsxs)(Ya.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,$e.jsx)("div",{className:"hidden md:block",children:(0,$e.jsx)(To,{value:e,onValueChange:t,children:(0,$e.jsx)(Po,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:o,gridTemplateColumns:`repeat(${Math.min(n,a.length)}, minmax(0, 1fr))`},children:a.map(l=>(0,$e.jsx)(Ya.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,$e.jsx)(Ro,{value:l.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:l.label})},l.value))})})}),(0,$e.jsx)("div",{className:"md:hidden",children:(0,$e.jsxs)(Ao,{children:[(0,$e.jsx)(Io,{asChild:!0,children:(0,$e.jsxs)(w,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[d?.label||"Select",(0,$e.jsx)(Dt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,$e.jsx)(ui,{align:"center",className:"w-[180px]",children:a.map(l=>(0,$e.jsx)(gi,{onClick:()=>t?.(l.value),className:`cursor-pointer ${e===l.value?"bg-accent":""}`,children:l.label},l.value))})]})})]})}function Mo({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:i,sidebarOpen:o=!0,className:n,activeTab:d="assistant",onTabChange:l,showTabs:g=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:c,actionIcon:u=(0,no.jsx)(Dt.Bot,{className:"zi-2 h-4 w-4"}),actionText:v="Action",onNotificationRemove:N,onRemoveAll:A,logo:O="/headerlogo.png",appName:y="Nuvia",tagline:F="Collaboration Platform"}){let[B,V]=(0,zi.useState)(!1),[Q,x]=(0,zi.useState)(t),I=Q.filter(C=>!C.read).length,$=C=>{x(z=>z.filter(ne=>ne.id!==C)),N?.(C)},L=()=>{x(C=>C.filter(z=>z.read)),A?.()};return(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${n||""}`,children:[(0,no.jsx)(w,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,no.jsx)(Dt.Menu,{className:"h-5 w-5"})}),(0,no.jsx)(w,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,no.jsx)(Dt.PanelLeft,{className:"h-5 w-5"})}),!o&&(0,no.jsxs)(Ya.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,no.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,no.jsx)("img",{src:O,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,no.jsxs)("div",{children:[(0,no.jsx)("h2",{className:"font-semibold text-sm",children:y}),(0,no.jsx)("p",{className:"text-xs text-muted-foreground",children:F})]})]}),(0,no.jsxs)("div",{className:"flex flex-1 items-center",children:[g&&(0,no.jsx)(Ba,{activeTab:d,onTabChange:l,tabOptions:m}),(0,no.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,no.jsx)(Ya.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,no.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,no.jsxs)(w,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:c,children:[u,v]})})}),(0,no.jsx)(Do,{}),(0,no.jsx)(Wt,{children:(0,no.jsxs)(Kt,{children:[(0,no.jsx)(qt,{asChild:!0,children:(0,no.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,no.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>V(!0),children:[(0,no.jsx)(Ya.motion.div,{animate:I>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:I>0?1/0:0,repeatDelay:3},children:(0,no.jsx)(Dt.Bell,{className:"h-5 w-5"})}),I>0&&(0,no.jsx)(Ya.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:I})]})})}),(0,no.jsx)(Mt,{children:"Notifications"})]})}),(0,no.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,no.jsxs)(sa,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,no.jsx)(mi,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,no.jsx)(la,{})]})})]})]})]}),(0,no.jsx)(ko,{notifications:Q,open:B,onClose:()=>V(!1),onNotificationRemove:$,onRemoveAll:L})]})}var Bo=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,no.jsx)(Dt.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Fo({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:i=[],currentBusinessUnit:o=Bo[0],onBusinessUnitChange:n,onSearch:d,businessUnits:l=Bo,activeTab:g,onTabChange:m,showTabs:c=!1,onActionClick:u,actionIcon:v,actionText:N="Action",onNotificationRemove:A,onRemoveAll:O,logo:y="/headerlogo.png",appName:F="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:V=!1}){let[Q,x]=(0,zi.useState)(!V),[I,$]=(0,zi.useState)(!1),[L,C]=(0,zi.useState)(o),z=ne=>{C(ne),n?.(ne)};return(0,no.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[I&&(0,no.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>$(!1)}),(0,no.jsx)("div",{className:"md:hidden",children:(0,no.jsx)(ci,{items:e,isOpen:I,isMobile:!0,onClose:()=>$(!1),currentBusinessUnit:L,onBusinessUnitChange:z,onSearch:d,logo:y,appName:F,tagline:B})}),(0,no.jsx)("div",{className:"hidden md:block",children:(0,no.jsx)(ci,{items:e,isOpen:Q,isMobile:!1,currentBusinessUnit:L,onBusinessUnitChange:z,onSearch:d,logo:y,appName:F,tagline:B})}),(0,no.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",Q?"md:pl-64":"md:pl-0"),children:[(0,no.jsx)(Mo,{title:a,notifications:i,onToggleSidebar:()=>x(!Q),onToggleMobileMenu:()=>$(!0),sidebarOpen:Q,activeTab:g,onTabChange:m,showTabs:c,onActionClick:u,actionIcon:v,actionText:N,onNotificationRemove:A,onRemoveAll:O,logo:y,appName:F,tagline:B}),(0,no.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var Lt=le(require("react"));var fe=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));fe.displayName="Card";var Kn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));Kn.displayName="CardHeader";var qn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));qn.displayName="CardTitle";var Jn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));Jn.displayName="CardDescription";var Xt=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("p-6 no-0",e),...t}));Xt.displayName="CardContent";var Xn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("flex items-center p-6 no-0",e),...t}));Xn.displayName="CardFooter";var zo=le(require("react")),Ee=zo.forwardRef(({className:e,...t},a)=>(0,no.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ee.displayName="Textarea";var ae=le(require("@radix-ui/react-select")),Pt=le(require("react")),Ne=ae.Root;var Ae=ae.Value,be=Pt.forwardRef(({children:e,className:t,...a},i)=>(0,no.jsxs)(ae.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:i,...a,children:[e,(0,no.jsx)(ae.Icon,{asChild:!0,children:(0,no.jsx)(Dt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));be.displayName=ae.Trigger.displayName;var Oo=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,no.jsx)(Dt.ChevronUp,{className:"h-4 w-4"})}));Oo.displayName=ae.ScrollUpButton.displayName;var Uo=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,no.jsx)(Dt.ChevronDown,{className:"h-4 w-4"})}));Uo.displayName=ae.ScrollDownButton.displayName;var he=Pt.forwardRef(({children:e,className:t,position:a="popper",...i},o)=>(0,no.jsx)(ae.Portal,{children:(0,no.jsxs)(ae.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:o,...i,children:[(0,no.jsx)(Oo,{}),(0,no.jsx)(ae.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,no.jsx)(Uo,{})]})}));he.displayName=ae.Content.displayName;var Yn=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Yn.displayName=ae.Label.displayName;var _=Pt.forwardRef(({children:e,className:t,...a},i)=>(0,no.jsxs)(ae.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:i,...a,children:[(0,no.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,no.jsx)(ae.ItemIndicator,{children:(0,no.jsx)(Dt.Check,{className:"h-4 w-4"})})}),(0,no.jsx)(ae.ItemText,{children:e})]}));_.displayName=ae.Item.displayName;var Qn=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Qn.displayName=ae.Separator.displayName;var Z=le(require("react"));var Vo=(e=768)=>{let[t,a]=(0,zi.useState)(!1);return(0,zi.useEffect)(()=>{let i=()=>{a(window.innerWidth<e)};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e]),t};var Ho=le(require("react")),bi=le(require("@radix-ui/react-separator"));var hi=Ho.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...i},o)=>(0,no.jsx)(bi.Root,{ref:o,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));hi.displayName=bi.Root.displayName;var ca=le(require("react")),ze=le(require("@radix-ui/react-dialog"));var Wo=ze.Root;var Zn=ze.Portal,Ko=ca.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ze.Overlay,{className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));Ko.displayName=ze.Overlay.displayName;var es=(0,$o.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-no data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),xi=ca.forwardRef(({side:e="right",className:t,children:a,...i},o)=>(0,no.jsxs)(Zn,{children:[(0,no.jsx)(Ko,{}),(0,no.jsxs)(ze.Content,{ref:o,className:p(es({side:e}),t),...i,children:[(0,no.jsxs)(ze.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,no.jsx)(Jt.Cross2Icon,{className:"h-4 w-4"}),(0,no.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));xi.displayName=ze.Content.displayName;var ts=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col space-y-2 text-center sm:text-left",e),...t});ts.displayName="SheetHeader";var as=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});as.displayName="SheetFooter";var is=ca.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ze.Title,{ref:a,className:p("text-lg font-semibold text-foreground",e),...t}));is.displayName=ze.Title.displayName;var os=ca.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ze.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));os.displayName=ze.Description.displayName;function yi({className:e,...t}){return(0,no.jsx)("div",{className:p("animate-pulse rounded-md bg-primary/10",e),...t})}var rs="sidebar:state",ns=60*60*24*7,ss="16rem",ls="18rem",ds="3rem",cs="b",Yo=Z.createContext(null);function za(){let e=Z.useContext(Yo);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var wi=Z.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:i,style:o,children:n,...d},l)=>{let g=Vo(),[m,c]=Z.useState(!1),[u,v]=Z.useState(e),N=t??u,A=Z.useCallback(B=>{if(a)return a?.(typeof B=="function"?B(N):B);v(B),document.cookie=`${rs}=${N}; path=/; max-age=${ns}`},[a,N]),O=Z.useCallback(()=>g?c(B=>!B):A(B=>!B),[g,A,c]);Z.useEffect(()=>{let B=V=>{V.key===cs&&(V.metaKey||V.ctrlKey)&&(V.preventDefault(),O())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[O]);let y=N?"expanded":"collapsed",F=Z.useMemo(()=>({state:y,open:N,setOpen:A,isMobile:g,openMobile:m,setOpenMobile:c,toggleSidebar:O}),[y,N,A,g,m,c,O]);return(0,no.jsx)(Yo.Provider,{value:F,children:(0,no.jsx)(Wt,{delayDuration:0,children:(0,no.jsx)("div",{style:{"--sidebar-width":ss,"--sidebar-width-icon":ds,...o},className:p("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:l,...d,children:n})})})});wi.displayName="SidebarProvider";var ms=Z.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:i,children:o,...n},d)=>{let{isMobile:l,state:g,openMobile:m,setOpenMobile:c}=za();return a==="none"?(0,no.jsx)("div",{className:p("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:d,...n,children:o}):l?(0,no.jsx)(Wo,{open:m,onOpenChange:c,...n,children:(0,no.jsx)(xi,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":ls},side:e,children:(0,no.jsx)("div",{className:"flex h-full w-full flex-col",children:o})})}):(0,no.jsxs)("div",{ref:d,className:"group peer hidden md:block text-sidebar-foreground","data-state":g,"data-collapsible":g==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,no.jsx)("div",{className:p("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,no.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-no group-data-[side=right]:border-l",i),...n,children:(0,no.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});ms.displayName="Sidebar";var ps=Z.forwardRef(({className:e,onClick:t,...a},i)=>{let{toggleSidebar:o}=za();return(0,no.jsxs)(w,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("h-7 w-7",e),onClick:n=>{t?.(n),o()},...a,children:[(0,no.jsx)(Dt.PanelLeft,{}),(0,no.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});ps.displayName="SidebarTrigger";var us=Z.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:i}=za();return(0,no.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:p("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});us.displayName="SidebarRail";var gs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));gs.displayName="SidebarInset";var fs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)(H,{ref:a,"data-sidebar":"input",className:p("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));fs.displayName="SidebarInput";var vs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));vs.displayName="SidebarHeader";var bs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));bs.displayName="SidebarFooter";var hs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)(hi,{ref:a,"data-sidebar":"separator",className:p("mx-2 w-auto bg-sidebar-border",e),...t}));hs.displayName="SidebarSeparator";var xs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));xs.displayName="SidebarContent";var ys=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex w-full min-w-0 flex-col p-2",e),...t}));ys.displayName="SidebarGroup";var ws=Z.forwardRef(({className:e,asChild:t=!1,...a},i)=>(0,no.jsx)(t?so.Slot:"div",{ref:i,"data-sidebar":"group-label",className:p("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ws.displayName="SidebarGroupLabel";var Ns=Z.forwardRef(({className:e,asChild:t=!1,...a},i)=>(0,no.jsx)(t?so.Slot:"button",{ref:i,"data-sidebar":"group-action",className:p("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));Ns.displayName="SidebarGroupAction";var Ss=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("w-full text-sm",e),...t}));Ss.displayName="SidebarGroupContent";var Cs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("ul",{ref:a,"data-sidebar":"menu",className:p("flex w-full min-w-0 flex-col gap-1",e),...t}));Cs.displayName="SidebarMenu";var Ds=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));Ds.displayName="SidebarMenuItem";var ks=(0,ro.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ts=Z.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:i="default",tooltip:o,className:n,...d},l)=>{let g=e?so.Slot:"button",{isMobile:m,state:c}=za(),u=(0,no.jsx)(g,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:p(ks({variant:a,size:i}),n),...d});return o?(typeof o=="string"&&(o={children:o}),(0,no.jsxs)(Kt,{children:[(0,no.jsx)(qt,{asChild:!0,children:u}),(0,no.jsx)(Mt,{side:"right",align:"center",hidden:c!=="collapsed"||m,...o})]})):u});Ts.displayName="SidebarMenuButton";var Ps=Z.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...i},o)=>(0,no.jsx)(t?so.Slot:"button",{ref:o,"data-sidebar":"menu-action",className:p("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i}));Ps.displayName="SidebarMenuAction";var Rs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Rs.displayName="SidebarMenuBadge";var As=Z.forwardRef(({className:e,showIcon:t=!1,...a},i)=>{let o=Z.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,no.jsxs)("div",{ref:i,"data-sidebar":"menu-skeleton",className:p("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,no.jsx)(yi,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,no.jsx)(yi,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});As.displayName="SidebarMenuSkeleton";var Is=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:p("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Is.displayName="SidebarMenuSub";var Es=Z.forwardRef(({...e},t)=>(0,no.jsx)("li",{ref:t,...e}));Es.displayName="SidebarMenuSubItem";var Ms=Z.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:i,...o},n)=>(0,no.jsx)(e?so.Slot:"a",{ref:n,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...o}));Ms.displayName="SidebarMenuSubButton";var Qo=({projects:e,epics:t,sprints:a,currentView:i,onUpdateProject:o,onDeleteProject:n,onAddProject:d,onUpdateEpic:l,onDeleteEpic:g,onAddEpic:m,onAddSprint:c,onUpdateSprint:u,onDeleteSprint:v,onViewChange:N,mobileMenuOpen:A,onToggleMobileMenu:O})=>{let[y,F]=(0,zi.useState)(null),[B,V]=(0,zi.useState)(null),[Q,x]=(0,zi.useState)(null),[I,$]=(0,zi.useState)(null),[L,C]=(0,zi.useState)({name:"",description:""}),[z,ne]=(0,zi.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[T,Se]=(0,zi.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[S,oe]=(0,zi.useState)(!1),[f,K]=(0,zi.useState)(!1),[re,Ue]=(0,zi.useState)({name:"",description:""}),[Ce,me]=(0,zi.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),Ge=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],ye=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],Ye=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],ct=b=>{V(b.id),C({name:b.name,description:b.description||""})},G=()=>{B&&L.name.trim()&&(o(B,{name:L.name.trim(),description:L.description.trim()}),V(null))},ce=()=>{V(null),C({name:"",description:""})},Te=()=>{re.name.trim()&&(d({name:re.name.trim(),description:re.description.trim(),isSelected:!1}),Ue({name:"",description:""}),oe(!1))},Ve=b=>{o(b,{isSelected:!0})},vt=b=>{x(b.id),ne({name:b.name,description:b.description||"",color:b.color,confidence:b.confidence,phase:b.phase,startDate:b.startDate.toISOString().split("T")[0],endDate:b.endDate.toISOString().split("T")[0],progress:b.progress})},It=()=>{Q&&z.name.trim()&&(l(Q,{name:z.name.trim(),description:z.description.trim(),color:z.color,confidence:z.confidence,phase:z.phase,startDate:new Date(z.startDate),endDate:new Date(z.endDate),progress:z.progress}),x(null))},bt=()=>{x(null),ne({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},Qa=b=>{$(b.id),Se({name:b.name,description:b.description||"",startDate:b.startDate.toISOString().split("T")[0],endDate:b.endDate.toISOString().split("T")[0],isActive:b.isActive})},Za=()=>{I&&T.name.trim()&&(u(I,{name:T.name.trim(),description:T.description.trim(),startDate:new Date(T.startDate),endDate:new Date(T.endDate),isActive:T.isActive}),$(null))},ua=()=>{$(null),Se({name:"",description:"",startDate:"",endDate:"",isActive:!1})},ei=()=>{Ce.name.trim()&&(c({name:Ce.name.trim(),description:Ce.description.trim(),startDate:new Date(Ce.startDate),endDate:new Date(Ce.endDate),isActive:Ce.isActive,isSelected:!1}),me({name:"",description:"",startDate:"",endDate:"",isActive:!1}),K(!1))},ga=b=>{u(b,{isSelected:!0})},fa=b=>b.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),ta=b=>{let k=ye.find(se=>se.value===b);return k?{label:k.label,color:k.color}:{label:"Medium",color:"text-warning"}},va=b=>{let k=Ye.find(se=>se.value===b);return k?{label:k.label,color:k.color}:{label:"Phase 1",color:"text-primary"}};return(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${A?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,no.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,no.jsxs)("button",{onClick:()=>{N("kanban"),F(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[(0,no.jsx)(Dt.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,no.jsxs)("button",{onClick:()=>{N("planning"),F(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,no.jsx)(Dt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,no.jsxs)("button",{onClick:()=>F(y==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${y==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,no.jsx)(Dt.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,no.jsxs)("button",{onClick:()=>{N("epics"),F(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,no.jsx)(Dt.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,no.jsxs)("button",{onClick:()=>F(y==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${y==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,no.jsx)(Dt.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,no.jsxs)("button",{onClick:()=>{N("files"),F(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,no.jsx)(Dt.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,no.jsxs)("button",{onClick:()=>{N("tasks"),F(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,no.jsx)(Dt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),A&&(0,no.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:O}),y&&(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>F(null)}),(0,no.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,no.jsxs)("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[(0,no.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[y==="projects"&&"Projects",y==="epics"&&"Manage Epics",y==="sprints"&&"Manage Sprints",y==="files"&&"Files"]}),(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>F(null),children:(0,no.jsx)(Dt.X,{className:"h-4 w-4"})})]}),(0,no.jsxs)("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[y==="projects"&&(0,no.jsx)(fe,{className:"p-3",children:(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,no.jsxs)(w,{size:"sm",onClick:()=>oe(!0),className:"gap-1",children:[(0,no.jsx)(Dt.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),S&&(0,no.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,no.jsx)(H,{value:re.name,onChange:b=>Ue(k=>({...k,name:b.target.value})),placeholder:"Project name",className:"text-sm"}),(0,no.jsx)(Ee,{value:re.description,onChange:b=>Ue(k=>({...k,description:b.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:Te,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:()=>oe(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,no.jsx)("div",{className:"space-y-2",children:e.map(b=>(0,no.jsx)("div",{className:"border rounded p-2",children:B===b.id?(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(H,{value:L.name,onChange:k=>C(se=>({...se,name:k.target.value})),placeholder:"Project name",className:"text-sm"}),(0,no.jsx)(Ee,{value:L.description,onChange:k=>C(se=>({...se,description:k.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:G,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:ce,className:"text-xs h-6",children:"Cancel"})]})]}):(0,no.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${b.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>Ve(b.id),children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,no.jsx)(Dt.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,no.jsx)("span",{className:"font-medium text-xs",children:b.name})]}),b.description&&(0,no.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:b.description}),(0,no.jsxs)("div",{className:"flex gap-1",onClick:k=>k.stopPropagation(),children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>ct(b),className:"h-5 px-1",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>n(b.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]})},b.id))})]})}),y==="epics"&&(0,no.jsx)(fe,{className:"p-3",children:(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,no.jsxs)(w,{size:"sm",onClick:m,className:"gap-1",children:[(0,no.jsx)(Dt.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,no.jsx)("div",{className:"space-y-4",children:t.map(b=>(0,no.jsx)("div",{className:"border rounded-lg p-3",children:Q===b.id?(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsx)(H,{value:z.name,onChange:k=>ne(se=>({...se,name:k.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,no.jsx)(Ee,{value:z.description,onChange:k=>ne(se=>({...se,description:k.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,no.jsx)("div",{className:"flex gap-1 flex-wrap",children:Ge.map(k=>(0,no.jsx)("button",{onClick:()=>ne(se=>({...se,color:k})),className:`w-6 h-6 rounded-full ${k} ${z.color===k?"ring-2 ring-ring":""}`},k))})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,no.jsxs)(Ne,{value:z.confidence,onValueChange:k=>ne(se=>({...se,confidence:k})),children:[(0,no.jsx)(be,{className:"h-8 text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:ye.map(k=>(0,no.jsx)(_,{value:k.value,children:(0,no.jsx)("span",{className:k.color,children:k.label})},k.value))})]})]}),(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,no.jsxs)(Ne,{value:z.phase.toString(),onValueChange:k=>ne(se=>({...se,phase:parseInt(k)})),children:[(0,no.jsx)(be,{className:"h-8 text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:Ye.map(k=>(0,no.jsx)(_,{value:k.value.toString(),children:(0,no.jsx)("span",{className:k.color,children:k.label})},k.value))})]})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,no.jsx)(H,{type:"date",value:z.startDate,onChange:k=>ne(se=>({...se,startDate:k.target.value})),className:"text-xs h-8"})]}),(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,no.jsx)(H,{type:"date",value:z.endDate,onChange:k=>ne(se=>({...se,endDate:k.target.value})),className:"text-xs h-8"})]})]}),(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,no.jsx)(H,{type:"number",min:"0",max:"100",value:z.progress,onChange:k=>ne(se=>({...se,progress:parseInt(k.target.value)||0})),className:"text-xs h-8"})]}),(0,no.jsxs)("div",{className:"flex gap-2",children:[(0,no.jsx)(w,{size:"sm",onClick:It,className:"text-xs",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:bt,className:"text-xs",children:"Cancel"})]})]}):(0,no.jsxs)("div",{className:`cursor-pointer p-2 rounded transition-colors ${b.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>l(b.id,{isSelected:!b.isSelected}),children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${b.color}`}),(0,no.jsx)("span",{className:"font-medium text-sm",children:b.name})]}),b.description&&(0,no.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:b.description}),(0,no.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,no.jsx)("span",{className:ta(b.confidence).color,children:ta(b.confidence).label})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,no.jsx)("span",{className:va(b.phase).color,children:va(b.phase).label})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,no.jsxs)("span",{className:"text-foreground",children:[fa(b.startDate)," - ",fa(b.endDate)]})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,no.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${b.progress}%`}})}),(0,no.jsxs)("span",{className:"text-foreground",children:[b.progress,"%"]})]})]})]}),(0,no.jsxs)("div",{className:"flex gap-1",onClick:k=>k.stopPropagation(),children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>vt(b),className:"h-6 px-2",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>g(b.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]})},b.id))})]})}),y==="sprints"&&(0,no.jsx)(fe,{className:"p-3",children:(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,no.jsxs)(w,{size:"sm",onClick:()=>K(!0),className:"gap-1",children:[(0,no.jsx)(Dt.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),f&&(0,no.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,no.jsx)(H,{value:Ce.name,onChange:b=>me(k=>({...k,name:b.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,no.jsx)(H,{type:"date",value:Ce.startDate,onChange:b=>me(k=>({...k,startDate:b.target.value})),className:"text-xs"}),(0,no.jsx)(H,{type:"date",value:Ce.endDate,onChange:b=>me(k=>({...k,endDate:b.target.value})),className:"text-xs"})]}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("input",{type:"checkbox",checked:Ce.isActive,onChange:b=>me(k=>({...k,isActive:b.target.checked})),className:"w-3 h-3"}),(0,no.jsx)("span",{className:"text-xs",children:"Active"})]}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:ei,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:()=>K(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,no.jsx)("div",{className:"space-y-2",children:a.map(b=>(0,no.jsx)("div",{className:"border rounded p-2",children:I===b.id?(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(H,{value:T.name,onChange:k=>Se(se=>({...se,name:k.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:b.id==="backlog"||b.id==="all-tasks"}),b.id!=="backlog"&&b.id!=="all-tasks"&&(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,no.jsx)(H,{type:"date",value:T.startDate,onChange:k=>Se(se=>({...se,startDate:k.target.value})),className:"text-xs"}),(0,no.jsx)(H,{type:"date",value:T.endDate,onChange:k=>Se(se=>({...se,endDate:k.target.value})),className:"text-xs"})]}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("input",{type:"checkbox",checked:T.isActive,onChange:k=>Se(se=>({...se,isActive:k.target.checked})),className:"w-3 h-3"}),(0,no.jsx)("span",{className:"text-xs",children:"Active"})]})]}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:Za,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:ua,className:"text-xs h-6",children:"Cancel"})]})]}):(0,no.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${b.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>ga(b.id),children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,no.jsx)(Dt.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,no.jsx)("span",{className:"font-medium text-xs",children:b.name}),b.isActive&&(0,no.jsx)("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(b.id==="backlog"||b.id==="all-tasks")&&(0,no.jsx)("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),b.id!=="backlog"&&b.id!=="all-tasks"&&(0,no.jsxs)("p",{className:"text-xs text-muted-foreground mb-1",children:[b.startDate.toLocaleDateString()," - ",b.endDate.toLocaleDateString()]}),(0,no.jsxs)("div",{className:"flex gap-1",onClick:k=>k.stopPropagation(),children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>Qa(b),className:"h-5 px-1",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),b.id!=="backlog"&&b.id!=="all-tasks"&&(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>v(b.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]})},b.id))})]})})]})]})]})]})},Zo=e=>(0,no.jsx)(wi,{children:(0,no.jsxs)("div",{className:"flex w-full",children:[(0,no.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,no.jsx)(Qo,{...e})}),(0,no.jsx)("div",{className:"md:hidden",children:(0,no.jsx)(Qo,{...e})}),(0,no.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,no.jsx)("div",{className:"w-full",children:e.children})})]})});var er=({title:e,status:t,taskCount:a,children:i,onDrop:o,isCompact:n=!1})=>{let d=m=>{m.preventDefault()},l=m=>{m.preventDefault(),o(t)};return(0,no.jsxs)(fe,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 ${n?"lg:max-w-xs":""}`,onDragOver:d,onDrop:l,children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,no.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,no.jsx)(pe,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,no.jsx)("div",{className:"space-y-4 min-h-[200px]",children:i})]})};var ja=({task:e,epic:t,onDragStart:a,onTaskClick:i,isCompact:o=!1})=>{let n=c=>{a(e)},d=()=>{console.log("task clicked",e.title),i(e)},l=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},g=()=>{switch(e.type){case"story":return(0,no.jsx)(Dt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,no.jsx)(Dt.Bug,{className:"h-3 w-3"});case"spike":return(0,no.jsx)(Dt.Zap,{className:"h-3 w-3"});case"task":default:return(0,no.jsx)(Dt.AlertCircle,{className:"h-3 w-3"})}},m=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return o?(0,no.jsx)(fe,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:n,onClick:d,children:(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${m()}`,children:g()}),(0,no.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,no.jsxs)(fe,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:n,onClick:d,children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,no.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${m()}`,children:[g(),(0,no.jsx)("span",{className:"capitalize",children:e.type})]}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,no.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.points})]})]}),(0,no.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,no.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,no.jsxs)("div",{className:"flex items-center gap-1",children:[(0,no.jsx)(Dt.User,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:e.assignee})]})})]})};var tr=le(require("react")),Ni=le(require("@radix-ui/react-label"));var Bs=(0,ro.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),R=tr.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Ni.Root,{ref:a,className:p(Bs(),e),...t}));R.displayName=Ni.Root.displayName;var Ot=le(require("react")),Qt=le(require("@radix-ui/react-toggle-group"));var or=le(require("react")),Si=le(require("@radix-ui/react-toggle"));var Ci=(0,ro.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ls=or.forwardRef(({className:e,variant:t,size:a,...i},o)=>(0,no.jsx)(Si.Root,{ref:o,className:p(Ci({variant:t,size:a,className:e})),...i}));Ls.displayName=Si.Root.displayName;var sr=Ot.createContext({size:"default",variant:"default"}),Ut=Ot.forwardRef(({className:e,variant:t,size:a,children:i,...o},n)=>(0,no.jsx)(Qt.Root,{ref:n,className:p("flex items-center justify-center gap-1",e),...o,children:(0,no.jsx)(sr.Provider,{value:{variant:t,size:a},children:i})}));Ut.displayName=Qt.Root.displayName;var Vt=Ot.forwardRef(({className:e,children:t,variant:a,size:i,...o},n)=>{let d=Ot.useContext(sr);return(0,no.jsx)(Qt.Item,{ref:n,className:p(Ci({variant:d.variant||a,size:d.size||i}),e),...o,children:t})});Vt.displayName=Qt.Item.displayName;var Fs=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Dt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Dt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Dt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Dt.Zap}],zs=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Ua=({isOpen:e,onClose:t,onAddTask:a,epics:i,sprints:o,assignees:n,defaultEpicId:d})=>{let[l,g]=(0,zi.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,zi.useEffect)(()=>{e&&d&&g(u=>({...u,epicId:d}))},[e,d]),(0,zi.useEffect)(()=>{e&&g({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:d||"",sprintId:"none",assignee:""})},[e]);let m=u=>{u.preventDefault(),l.title.trim()&&(a({title:l.title.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,points:l.points,epicId:l.epicId,sprintId:l.sprintId==="none"?void 0:l.sprintId,assignee:l.assignee.trim()||"Unassigned"}),g({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:d||"",sprintId:"none",assignee:""}),t())},c=(u,v)=>{g(N=>({...N,[u]:v}))};return(0,no.jsx)(Ze,{open:e,onOpenChange:t,children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Task"})}),(0,no.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"title",children:"Task Title"}),(0,no.jsx)(H,{id:"title",value:l.title,onChange:u=>c("title",u.target.value),placeholder:"Enter task title",required:!0})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:l.description,onChange:u=>c("description",u.target.value),placeholder:"Enter task description",rows:3})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Type"}),(0,no.jsx)(Ut,{type:"single",value:l.type,onValueChange:u=>u&&c("type",u),children:Fs.map(u=>{let v=u.icon;return(0,no.jsxs)(Vt,{value:u.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,no.jsx)(v,{className:"h-4 w-4"}),u.label]},u.value)})})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Priority"}),(0,no.jsx)(Ut,{type:"single",value:l.priority,onValueChange:u=>u&&c("priority",u),children:zs.map(u=>(0,no.jsx)(Vt,{value:u.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:u.label},u.value))})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"points",children:"Story Points"}),(0,no.jsx)(H,{id:"points",type:"number",min:"1",max:"100",value:l.points,onChange:u=>c("points",parseInt(u.target.value)||1),placeholder:"Enter story points",required:!0})]}),!d&&(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"epic",children:"Epic"}),(0,no.jsxs)(Ne,{value:l.epicId,onValueChange:u=>c("epicId",u),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select an epic"})}),(0,no.jsx)(he,{children:i.map(u=>(0,no.jsx)(_,{value:u.id,children:(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${u.color}`}),u.name]})},u.id))})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,no.jsxs)(Ne,{value:l.sprintId,onValueChange:u=>c("sprintId",u),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select a sprint"})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"none",children:"No Sprint"}),o.map(u=>(0,no.jsx)(_,{value:u.id,children:(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[u.name,u.isActive&&(0,no.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},u.id))]})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"sprint",children:"Assignee"}),(0,no.jsxs)(Ne,{value:l.assignee,onValueChange:u=>c("assignee",u),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select an Assignee"})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"none",children:"No Assignee"}),n.map(u=>(0,no.jsx)(_,{value:u.id,children:(0,no.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,no.jsxs)(ra,{children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var ki=({fieldName:e,value:t,label:a,multiline:i=!1,onSave:o,className:n="",disabled:d=!1})=>{let[l,g]=(0,zi.useState)(!1),[m,c]=(0,zi.useState)(""),u=()=>{d||(g(!0),c(t))},v=async()=>{m!==t&&await o(e,m),g(!1)},N=A=>{A.key==="Enter"&&!i||A.key==="Enter"&&A.ctrlKey&&i?v():A.key==="Escape"&&(g(!1),c(""))};return(0,no.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,no.jsx)(R,{children:a}),l?i?(0,no.jsx)(Ee,{value:m,onChange:A=>c(A.target.value),onBlur:v,onKeyDown:N,autoFocus:!0,rows:4,className:"resize-none"}):(0,no.jsx)(H,{value:m,onChange:A=>c(A.target.value),onBlur:v,onKeyPress:N,autoFocus:!0,className:"text-lg font-medium"}):(0,no.jsxs)("div",{onClick:u,className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${i?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,no.jsx)("span",{className:i?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!d&&(0,no.jsx)(Dt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var cr=({comments:e,onAddComment:t})=>{let[a,i]=(0,zi.useState)(""),o=d=>d.split(" ").map(l=>l[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),i(""))};return(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)(Dt.MessageSquare,{className:"h-5 w-5"}),(0,no.jsx)(R,{className:"text-lg font-medium",children:"Comments"}),(0,no.jsx)(pe,{variant:"secondary",children:e.length})]}),(0,no.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(d=>(0,no.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,no.jsx)(sa,{className:"h-8 w-8 mt-1",children:(0,no.jsx)(la,{className:"text-xs bg-muted text-muted-foreground",children:o(d.author)})}),(0,no.jsxs)("div",{className:"flex-1",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,no.jsx)("span",{className:"font-medium text-sm",children:d.author}),(0,no.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.createdAt.toLocaleDateString()," no ",d.createdAt.toLocaleTimeString()]})]}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground",children:d.text})]})]},d.id))}),(0,no.jsxs)("div",{className:"flex gap-2",children:[(0,no.jsx)(Ee,{value:a,onChange:d=>i(d.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,no.jsx)(w,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,no.jsx)(Dt.Send,{className:"h-4 w-4"})})]})]})};var Ha=({label:e,value:t,onValueChange:a,options:i,showColor:o=!1,disabled:n=!1})=>{let[d,l]=(0,zi.useState)(!1),g=i.find(c=>c.value===t);return(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:e}),(0,no.jsxs)(Ne,{value:t,onValueChange:a,open:d,onOpenChange:c=>{n||l(c)},disabled:n,children:[(0,no.jsx)(be,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,no.jsxs)(pe,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!d),children:[o&&g?.color&&(0,no.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} zi-1`}),g?.label||"Select..."]})}),(0,no.jsx)(he,{children:i.map(c=>(0,no.jsx)(_,{value:c.value,children:o&&c.color?(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var pr=({label:e,value:t,onValueChange:a,options:i,placeholder:o="Search...",allowCustomValue:n=!1,disabled:d=!1})=>{let[l,g]=(0,zi.useState)(!1),[m,c]=(0,zi.useState)(""),u=i.find(y=>y.value===t),v=i.filter(y=>y.label.toLowerCase().includes(m.toLowerCase())),N=y=>{a(y),g(!1),c("")},A=()=>{n&&m.trim()&&!i.find(y=>y.value===m.trim())&&(a(m.trim()),g(!1),c(""))};return(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:e}),(0,no.jsxs)(Ne,{value:t,onValueChange:N,open:l,onOpenChange:y=>{d||g(y)},disabled:d,children:[(0,no.jsx)(be,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,no.jsx)(pe,{variant:"secondary",className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!d&&g(!l),children:u?.label||t||"Select..."})}),(0,no.jsxs)(he,{children:[(0,no.jsx)("div",{className:"p-2",children:(0,no.jsx)(H,{placeholder:o,value:m,onChange:y=>c(y.target.value),onKeyDown:y=>{y.key==="Enter"&&n&&A()},className:"mb-2"})}),v.map(y=>(0,no.jsx)(_,{value:y.value,children:y.label},y.value)),n&&m.trim()&&!v.find(y=>y.value===m.trim())&&(0,no.jsxs)(_,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};var js=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Dt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Dt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Dt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Dt.Zap}],Os=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Us=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],ur=({task:e,epics:t,sprints:a,lastUpdated:i,onUpdateTask:o,onClose:n,onDelete:d,isUpdating:l=!1,isDeleting:g=!1,deleteState:m="idle"})=>{let c=v=>v.split(" ").map(N=>N[0]).join("").toUpperCase(),u=()=>m==="loading"?(0,no.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,no.jsx)(Dt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,no.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,no.jsx)(Dt.Check,{className:"h-3 w-3"}),"Deleted"]}):m==="error"?(0,no.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,no.jsx)(Dt.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,no.jsxs)(w,{onClick:d,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||g,children:[(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,no.jsxs)("div",{className:"flex flex-col h-full",children:[(0,no.jsxs)("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Status"}),(0,no.jsx)(Ha,{label:"",value:e.status,onValueChange:v=>o("status",v),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Type"}),(0,no.jsx)(Ut,{type:"single",value:e.type,onValueChange:v=>v&&o("type",v),className:"grid grid-cols-2 gap-1",disabled:l,children:js.map(v=>{let N=v.icon;return(0,no.jsxs)(Vt,{value:v.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[(0,no.jsx)(N,{className:"h-3 w-3"}),v.label]},v.value)})})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,no.jsx)(Ut,{type:"single",value:e.priority,onValueChange:v=>v&&o("priority",v),className:"grid grid-cols-3 gap-1",disabled:l,children:Os.map(v=>(0,no.jsx)(Vt,{value:v.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:v.label},v.value))})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,no.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:v=>o("points",v.target.value),className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,no.jsx)(Ha,{label:"",value:e.epicId,onValueChange:v=>o("epicId",v),options:(t||[]).map(v=>({value:v.id,label:v.name,color:v.color})),showColor:!0,disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,no.jsx)(Ha,{label:"",value:e.sprintId||"none",onValueChange:v=>o("sprintId",v==="none"?"":v),options:[{value:"none",label:"No Sprint"},...(a||[]).map(v=>({value:v.id,label:`${v.name}${v.isActive?" (Active)":""}`}))],disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,no.jsx)(pr,{label:"",value:e.assignee,onValueChange:v=>o("assignee",v),options:Us,placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,no.jsxs)("div",{className:"mt-auto no-4 space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(w,{onClick:n,variant:"outline",className:"w-full h-8 text-xs",disabled:l||g,children:"Close"}),u()]}),(0,no.jsxs)("div",{className:"no-4 border-t border-border space-y-2",children:[(0,no.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,no.jsx)(Dt.User,{className:"h-3 w-3"}),(0,no.jsx)("span",{children:"System"})]})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,no.jsx)(Dt.Calendar,{className:"h-3 w-3"}),(0,no.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,no.jsx)(Dt.Clock,{className:"h-3 w-3"}),(0,no.jsxs)("span",{children:[i.toLocaleDateString()," no ",i.toLocaleTimeString()]})]})]})]})]})]})};var gr=({isOpen:e,onClose:t,task:a,epics:i,sprints:o,onUpdateTask:n,onDeleteTask:d})=>{let[l,g]=(0,zi.useState)(new Date),[m,c]=(0,zi.useState)("idle"),[u,v]=(0,zi.useState)("idle"),[N,A]=(0,zi.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),O=async(I,$)=>{if($!==a[I]){c("loading");try{await n(a.id,{[I]:$}),g(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},y=async(I,$)=>{if($!==a[I]){c("loading");try{await n(a.id,{[I]:$}),g(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},F=I=>{let $={id:Date.now().toString(),text:I,author:"Current User",createdAt:new Date};A([...N,$])},B=async()=>{v("loading");try{await d(a.id),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},V=m!=="loading"&&u!=="loading",Q=()=>{V&&t()},x=()=>m==="loading"?(0,no.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,no.jsx)(Dt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,no.jsx)("span",{children:"Updating..."})]}):m==="success"?(0,no.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,no.jsx)(Dt.Check,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:"Updated successfully"})]}):m==="error"?(0,no.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,no.jsx)(Dt.X,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:"Update failed"})]}):null;return(0,no.jsx)(Ze,{open:e,onOpenChange:Q,children:(0,no.jsxs)(Ke,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,no.jsxs)(qe,{children:[(0,no.jsx)(Je,{className:"sr-only",children:a.title}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("div",{className:"flex-1",children:x()}),!V&&(0,no.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,no.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,no.jsx)(ki,{fieldName:"title",value:a.title,label:"",onSave:O,className:"border-b border-border pb-3",disabled:m==="loading"}),(0,no.jsx)(ki,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:O,disabled:m==="loading"}),(0,no.jsx)(cr,{comments:N,onAddComment:F})]}),(0,no.jsx)(ur,{task:a,epics:i,sprints:o,lastUpdated:l,onUpdateTask:y,onClose:Q,onDelete:B,isUpdating:m==="loading",isDeleting:u==="loading",deleteState:u})]})]})})};var Ga=({isOpen:e,onClose:t,onAddEpic:a})=>{let[i,o]=(0,zi.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),n=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],d=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],g=c=>{c.preventDefault(),i.name.trim()&&(a({name:i.name.trim(),description:i.description.trim(),color:i.color,confidence:i.confidence,phase:i.phase,startDate:new Date(i.startDate),endDate:new Date(i.endDate),progress:i.progress,isSelected:!0}),o({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},m=(c,u)=>{o(v=>({...v,[c]:u}))};return(0,no.jsx)(Ze,{open:e,onOpenChange:t,children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Epic"})}),(0,no.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"name",children:"Epic Name"}),(0,no.jsx)(H,{id:"name",value:i.name,onChange:c=>m("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:i.description,onChange:c=>m("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Color"}),(0,no.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(c=>(0,no.jsx)("button",{type:"button",onClick:()=>m("color",c),className:`w-8 h-8 rounded-full ${c} ${i.color===c?"ring-2 ring-gray-400":""}`},c))})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Confidence"}),(0,no.jsxs)(Ne,{value:i.confidence,onValueChange:c=>m("confidence",c),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:d.map(c=>(0,no.jsx)(_,{value:c.value,children:c.label},c.value))})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Phase"}),(0,no.jsxs)(Ne,{value:i.phase.toString(),onValueChange:c=>m("phase",parseInt(c)),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:l.map(c=>(0,no.jsx)(_,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Start Date"}),(0,no.jsx)(H,{type:"date",value:i.startDate,onChange:c=>m("startDate",c.target.value)})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"End Date"}),(0,no.jsx)(H,{type:"date",value:i.endDate,onChange:c=>m("endDate",c.target.value)})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Progress (%)"}),(0,no.jsx)(H,{type:"number",min:"0",max:"100",value:i.progress,onChange:c=>m("progress",parseInt(c.target.value)||0)})]}),(0,no.jsxs)(ra,{children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var _a=require("react-icons/fa");function gt({title:e,description:t,badge:a,primaryAction:i,secondaryAction:o,gradient:n,children:d,className:l}){let[g,m]=Pa(`hero-section-minimized-${e.replace(/\no+/g,"-").toLowerCase()}`,!o&&!t),c=!o&&!t||g;return(0,no.jsxs)(Ya.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${l||""}`,children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,no.jsx)(pe,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,no.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[c&&i&&(0,no.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),(o||t)&&(0,no.jsx)("button",{"aria-label":g?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>m(!g),style:{lineHeight:0},children:g?(0,no.jsx)(_a.FaChevronDown,{size:22}):(0,no.jsx)(_a.FaChevronUp,{size:22})})]})]}),!c&&(0,no.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,no.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i&&(0,no.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),o&&(0,no.jsx)(w,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:o.onClick,children:o.label})]})]}),d&&(0,no.jsx)("div",{className:"hidden lg:block",children:d})]})]})}var br=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:i=[],initialColleagues:o=[],initialProjects:n=[],onAddTask:d,onUpdateTask:l,onDeleteTask:g,onTaskClick:m,onAddEpic:c})=>{let[u,v]=(0,zi.useState)(e),[N,A]=(0,zi.useState)(t),[O,y]=(0,zi.useState)(a),[F,B]=(0,zi.useState)(!1),[V,Q]=(0,zi.useState)(!1),[x,I]=(0,zi.useState)(null),[$,L]=(0,zi.useState)(null),[C,z]=(0,zi.useState)(i),[ne,T]=(0,zi.useState)(o),Se=N.filter(G=>!0).map(G=>G.id),S=O.find(G=>G.isSelected);Se.push("no-epic"),(0,zi.useEffect)(()=>{v(e)},[e]),(0,zi.useEffect)(()=>{A(t)},[t]),(0,zi.useEffect)(()=>{y(a)},[a]);let oe=u.filter(G=>{let ce=Se.includes(G.epicId)||!G.epicId;return!S||S.id==="all-tasks"?ce:S.id==="backlog"?ce&&!G.sprintId:ce&&G.sprintId===S.id}),f=G=>oe.filter(ce=>ce.status===G),K=G=>{let ce={};return N.forEach(Te=>{ce[Te.id]=G.filter(Ve=>Ve.epicId===Te.id)}),ce["no-epic"]=G.filter(Te=>!Te.epicId),ce},re=G=>{L(G)},Ue=G=>{$&&(v(ce=>ce.map(Te=>Te.id===$.id?{...Te,status:G}:Te)),l?.($.id,{status:G}),L(null))},Ce=G=>{let ce={...G,id:Date.now().toString(),createdAt:new Date};v(Te=>[...Te,ce]),d?.(G)},me=async(G,ce)=>{v(Te=>Te.map(Ve=>Ve.id===G?{...Ve,...ce}:Ve)),l&&await l(G,ce)},Ge=async G=>{v(ce=>ce.filter(Te=>Te.id!==G)),x?.id===G&&I(null),g&&await g(G)},ye=G=>{let ce={...G,id:Date.now().toString(),isSelected:!0};A(Te=>[...Te,ce]),c?.(G)},Ye=G=>{I(G),m?.(G)};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-no from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>B(!0)},secondaryAction:{label:"Add epic",onClick:()=>Q(!0)}}),(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsxs)("div",{className:"w-full",children:[(0,no.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(G=>{let ce=f(G.status),Te=K(ce);return(0,no.jsx)(er,{title:G.title,status:G.status,taskCount:ce.length,onDrop:Ue,isCompact:G.status==="done",children:Se.map(Ve=>{let vt=N.find(bt=>bt.id===Ve),It=Te[Ve]||[];return It.length===0?null:(0,no.jsxs)("div",{className:"mb-6",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${vt?.color}`}),(0,no.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:vt?.name||"No Epic"}),(0,no.jsx)(pe,{variant:"secondary",className:"text-xs",children:It.length})]})," ",(0,no.jsx)("div",{className:"space-y-3",children:It.map(bt=>(0,no.jsx)(ja,{task:bt,epic:vt,onDragStart:re,onTaskClick:Ye,isCompact:G.status==="done"},bt.id))})]},Ve)})},G.id)})}),(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(Ua,{isOpen:F,onClose:()=>B(!1),onAddTask:Ce,assignees:[...ne,...C],epics:N,sprints:O}),(0,no.jsx)(Ga,{isOpen:V,onClose:()=>Q(!1),onAddEpic:ye}),x&&(0,no.jsx)(gr,{isOpen:!!x,onClose:()=>I(null),task:x,epics:N,sprints:O,onUpdateTask:me,onDeleteTask:Ge})]})]})})]})};var hr=({tasks:e,epics:t,sprints:a,onUpdateTask:i,onTaskClick:o,onAddTaskToEpic:n,onAddEpic:d,onUpdateEpic:l,onDeleteEpic:g})=>{let[m,c]=(0,$a.useState)(null),[u,v]=(0,$a.useState)(null),[N,A]=(0,$a.useState)({}),O=C=>{c(C)},y=C=>{C.preventDefault()},F=(C,z)=>{C.preventDefault(),m&&m.epicId!==z&&(i(m.id,{epicId:z}),c(null))},B=C=>e.filter(z=>z.epicId===C),V=C=>{v(C.id),A({name:C.name,description:C.description,confidence:C.confidence,phase:C.phase,progress:C.progress})},Q=()=>{u&&N.name&&(l(u,N),v(null),A({}))},x=()=>{v(null),A({})},I=C=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&g(C)},$=C=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[C]||`Phase ${C}`,L=C=>{switch(C){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-no from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:d}}),(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsx)("div",{className:"w-full",children:(0,no.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(C=>{let z=B(C.id),ne=z.reduce((T,Se)=>T+Se.points,0);return(0,no.jsxs)(fe,{className:`flex flex-col ${u===C.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:y,onDrop:T=>F(T,C.id),children:[(0,no.jsx)("div",{className:"p-4 border-b border-border",children:u===C.id?(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)(H,{value:N.name||"",onChange:T=>A({...N,name:T.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,no.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:Q,className:"p-1 h-8 w-8",children:(0,no.jsx)(Dt.Check,{className:"h-4 w-4"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:x,className:"p-1 h-8 w-8",children:(0,no.jsx)(Dt.X,{className:"h-4 w-4"})})]})]}),(0,no.jsx)(Ee,{value:N.description||"",onChange:T=>A({...N,description:T.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,no.jsxs)(Ne,{value:N.confidence||C.confidence,onValueChange:T=>A({...N,confidence:T}),children:[(0,no.jsx)(be,{className:"text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"low",children:"Low"}),(0,no.jsx)(_,{value:"medium",children:"Medium"}),(0,no.jsx)(_,{value:"high",children:"High"})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,no.jsxs)(Ne,{value:N.phase?.toString()||C.phase.toString(),onValueChange:T=>A({...N,phase:parseInt(T)}),children:[(0,no.jsx)(be,{className:"text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:[1,2,3,4,5,6,7,8,9].map(T=>(0,no.jsxs)(_,{value:T.toString(),children:["Phase ",T]},T))})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,no.jsx)(H,{type:"number",min:"0",max:"100",value:N.progress||C.progress,onChange:T=>A({...N,progress:parseInt(T.target.value)||0}),className:"text-xs"})]})]}):(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,no.jsx)("div",{className:`w-4 h-4 rounded-full ${C.color}`}),(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:C.name}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>V(C),className:"p-1 h-8 w-8",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>I(C.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]}),(0,no.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,no.jsxs)(pe,{className:`text-xs ${L(C.confidence)}`,children:[C.confidence," confidence"]}),(0,no.jsxs)(pe,{variant:"outline",className:"text-xs",children:["Phase ",C.phase]}),(0,no.jsxs)(pe,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[z.length," tasks"]}),(0,no.jsxs)(pe,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ne," pts"]})]}),C.description&&(0,no.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:C.description}),(0,no.jsxs)("div",{className:"mb-3",children:[(0,no.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,no.jsx)("span",{className:"select-none",children:"Progress"}),(0,no.jsxs)("span",{className:"select-none",children:[C.progress,"%"]})]}),(0,no.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,no.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${C.progress}%`}})})]}),(0,no.jsxs)(w,{onClick:()=>n(C.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,no.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,no.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:z.length===0?(0,no.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,no.jsx)(Dt.Move,{className:"h-8 w-8 mb-2"}),(0,no.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):z.map(T=>(0,no.jsx)(ja,{task:T,epic:C,onDragStart:O,onTaskClick:o,isCompact:!0},T.id))})})]},C.id)})})})})]})};var xr=require("react-day-picker");function Wa({className:e,classNames:t,showOutsideDays:a=!0,...i}){return(0,no.jsx)(xr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center no-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:p(ya({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:p("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-no-md",i.mode==="range"?"[&:has(>.day-range-end)]:rounded-no-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-no-md":"[&:has([aria-selected])]:rounded-md"),day:p(ya({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...i})}Wa.displayName="Calendar";var wr=le(require("react")),ft=le(require("@radix-ui/react-popover"));var Ri=ft.Root,Ai=ft.Trigger;var Ka=wr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...i},o)=>(0,no.jsx)(ft.Portal,{children:(0,no.jsx)(ft.Content,{ref:o,align:t,sideOffset:a,className:p("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));Ka.displayName=ft.Content.displayName;var Ei=require("date-fns");var Sr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[i,o]=(0,zi.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),n=l=>{l.preventDefault(),!(!i.name||!i.startDate||!i.endDate)&&(a({name:i.name,description:i.description,startDate:i.startDate,endDate:i.endDate,isActive:i.isActive,isSelected:!1}),o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},d=()=>{o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,no.jsx)(Ze,{open:e,onOpenChange:d,children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Sprint"})}),(0,no.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"name",children:"Sprint Name *"}),(0,no.jsx)(H,{id:"name",value:i.name,onChange:l=>o(g=>({...g,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:i.description,onChange:l=>o(g=>({...g,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Start Date *"}),(0,no.jsxs)(Ri,{children:[(0,no.jsx)(Ai,{asChild:!0,children:(0,no.jsxs)(w,{variant:"outline",className:p("w-full justify-start text-left font-normal",!i.startDate&&"text-muted-foreground"),children:[(0,no.jsx)(Dt.CalendarIcon,{className:"zi-2 h-4 w-4"}),i.startDate?(0,Ei.format)(i.startDate,"PPP"):"Pick a date"]})}),(0,no.jsx)(Ka,{className:"w-auto p-0",align:"start",children:(0,no.jsx)(Wa,{mode:"single",selected:i.startDate,onSelect:l=>o(g=>({...g,startDate:l})),initialFocus:!0})})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"End Date *"}),(0,no.jsxs)(Ri,{children:[(0,no.jsx)(Ai,{asChild:!0,children:(0,no.jsxs)(w,{variant:"outline",className:p("w-full justify-start text-left font-normal",!i.endDate&&"text-muted-foreground"),children:[(0,no.jsx)(Dt.CalendarIcon,{className:"zi-2 h-4 w-4"}),i.endDate?(0,Ei.format)(i.endDate,"PPP"):"Pick a date"]})}),(0,no.jsx)(Ka,{className:"w-auto p-0",align:"start",children:(0,no.jsx)(Wa,{mode:"single",selected:i.endDate,onSelect:l=>o(g=>({...g,endDate:l})),initialFocus:!0,disabled:l=>i.startDate?l<i.startDate:!1})})]})]})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"isActive",checked:i.isActive,onChange:l=>o(g=>({...g,isActive:l.target.checked})),className:"rounded border-gray-300"}),(0,no.jsx)(R,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,no.jsxs)("div",{className:"flex justify-end gap-3 no-4",children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:d,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",disabled:!i.name||!i.startDate||!i.endDate,children:"Add Sprint"})]})]})]})})};var Cr=({tasks:e,epics:t,sprints:a,onUpdateTask:i,onTaskClick:o,onAddSprint:n})=>{let[d,l]=(0,zi.useState)(["2"]),[g,m]=(0,zi.useState)(null),[c,u]=(0,zi.useState)(!1),[v,N]=(0,zi.useState)(null),[A,O]=(0,zi.useState)(e.filter(f=>!f.sprintId)),[y,F]=(0,zi.useState)(e.filter(f=>f.sprintId&&d.includes(f.sprintId))),[B,V]=(0,zi.useState)(a.filter(f=>f.id!=="backlog"&&f.id!=="all-tasks").sort((f,K)=>f.startDate.getTime()-K.startDate.getTime()));(0,zi.useEffect)(()=>{O(e.filter(f=>!f.sprintId)),F(e.filter(f=>f.sprintId&&d.includes(f.sprintId))),V(a.filter(f=>f.id!=="backlog"&&f.id!=="all-tasks").sort((f,K)=>f.startDate.getTime()-K.startDate.getTime()))},[e,a,d]);let Q=f=>t.find(K=>K.id===f),x=f=>a.find(K=>K.id===f),I=f=>{switch(f){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},$=f=>f.split(" ").map(K=>K[0]).join("").toUpperCase(),L=f=>{m(f)},C=f=>{f.preventDefault()},z=f=>{N(f)},ne=()=>{N(null)},T=(f,K)=>{f.preventDefault(),N(null),g&&(i(g.id,{sprintId:K==="backlog"?void 0:K}),m(null))},Se=f=>{f==="backlog"||f==="all-tasks"||l(K=>K.includes(f)?K.filter(re=>re!==f):[...K,f])},S=f=>{n(f),u(!1)},oe=({task:f,showSprint:K=!1})=>{let re=Q(f.epicId),Ue=f.sprintId?x(f.sprintId):null,[Ce,me]=(0,zi.useState)(!1),Ge=ct=>{ct.defaultPrevented||Ce||o(f)},ye=ct=>{me(!0),L(f)},Ye=()=>{me(!1)};return(0,no.jsx)(fe,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${Ce?"opacity-50 shadow-lg scale-105":""} ${g?.id===f.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:ye,onDragEnd:Ye,onClick:Ge,children:(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-start justify-between",children:[(0,no.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:f.title}),(0,no.jsx)(pe,{className:`text-xs select-none pointer-events-none ${I(f.priority)}`,children:f.priority[0].toUpperCase()})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[(0,no.jsxs)("div",{className:"flex items-center gap-1",children:[re&&(0,no.jsx)("div",{className:`w-2 h-2 rounded-full ${re.color}`}),(0,no.jsx)("span",{className:"text-muted-foreground truncate select-none",children:re?.name})]}),(0,no.jsx)("span",{className:"text-muted-foreground select-none",children:$(f.assignee)})]}),K&&Ue&&(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[(0,no.jsx)(Dt.Calendar,{className:"h-3 w-3"}),(0,no.jsx)("span",{className:"select-none",children:Ue.name})]})]})})};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-no from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>u(!0)}}),(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsxs)("div",{className:"w-full",children:[(0,no.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,no.jsx)("div",{className:"lg:col-span-1",children:(0,no.jsxs)(fe,{className:"p-4 h-full bg-card shadow-sm",onDragOver:C,onDragEnter:()=>z("backlog"),onDragLeave:ne,onDrop:f=>T(f,"backlog"),children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,no.jsx)(pe,{variant:"secondary",className:"bg-muted text-muted-foreground",children:A.length})]}),(0,no.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${v==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[A.map(f=>(0,no.jsx)(oe,{task:f},f.id)),A.length===0&&(0,no.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"})]})]})}),(0,no.jsx)("div",{className:"lg:col-span-3",children:(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsxs)(fe,{className:"p-4 bg-card shadow-sm",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,no.jsxs)(w,{onClick:()=>u(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,no.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:B.map(f=>(0,no.jsxs)(w,{variant:d.includes(f.id)?"default":"outline",size:"sm",onClick:()=>Se(f.id),className:"text-xs h-8",children:[f.name,f.isActive&&(0,no.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},f.id))})]}),(0,no.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(f=>B.find(K=>K.id===f)).filter(Boolean).sort((f,K)=>f.startDate.getTime()-K.startDate.getTime()).map(f=>{let K=y.filter(re=>re.sprintId===f.id);return(0,no.jsxs)(fe,{className:"p-4 bg-card shadow-sm",onDragOver:C,onDragEnter:()=>z(f.id),onDragLeave:ne,onDrop:re=>T(re,f.id),children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none",children:f.name}),f.isActive&&(0,no.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,no.jsx)(pe,{variant:"secondary",className:"bg-muted text-muted-foreground",children:K.length})]}),(0,no.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${v===f.id?"border-primary bg-primary/10":"border-border"}`,children:[K.map(re=>(0,no.jsx)(oe,{task:re},re.id)),K.length===0&&(0,no.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},f.id)})})," "]})})]}),(0,no.jsx)(Sr,{isOpen:c,onClose:()=>u(!1),onAddSprint:S})]})})]})};var Vs=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Hs=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),Gs=e=>{let[t,a]=e.split(":"),i=new Date;return i.setHours(parseInt(t),parseInt(a)),i.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Mi=(e,t)=>{let a=new Date,i=new Date(e);if(t){let[o,n]=t.split(":");i.setHours(parseInt(o),parseInt(n))}return i<a},Bi=e=>{let t=new Date;return e.toDateString()===t.toDateString()},_s=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},$no=({colleagues:e,onAddReminder:t,open:a,setOpen:i})=>{let[o,n]=(0,zi.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[d,l]=(0,zi.useState)(!1),g=c=>{c.preventDefault();let u=e.find(N=>N?.id.toString()===o.colleagueId.toString());if(!u){console.error("No valid colleague selected"),l(!0);return}l(!1);let v={title:o.title,description:o.description,dueDate:new Date(o.dueDate),dueTime:o.dueTime||void 0,colleague:u,isCompleted:!1,isRecurring:o.isRecurring,recurrencePattern:o.isRecurring?o.recurrencePattern:void 0,recurrenceInterval:o.isRecurring?o.recurrenceInterval:void 0,priority:o.priority,reminderEnabled:o.reminderEnabled,reminderMinutes:o.reminderEnabled?o.reminderMinutes:void 0,tags:o.tags?o.tags.split(",").map(N=>N.trim()):void 0};t(v),i(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,zi.useEffect)(()=>{o.colleagueId&&l(!1)},[o.colleagueId]);let m=e.filter(Boolean);return(0,no.jsx)(Ze,{open:a,onOpenChange:i,children:(0,no.jsxs)(Ke,{className:"max-w-2xl",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Reminder"})}),(0,no.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,no.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"title",children:"Title"}),(0,no.jsx)(H,{id:"title",value:o.title,onChange:c=>n({...o,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:o.description,onChange:c=>n({...o,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"dueDate",children:"Due Date"}),(0,no.jsx)(H,{id:"dueDate",type:"date",value:o.dueDate,onChange:c=>n({...o,dueDate:c.target.value}),required:!0})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,no.jsx)(H,{id:"dueTime",type:"time",value:o.dueTime,onChange:c=>n({...o,dueTime:c.target.value})})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{className:`${d?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,no.jsxs)(Ne,{value:o.colleagueId,onValueChange:c=>{n({...o,colleagueId:c})},required:!0,children:[(0,no.jsx)(be,{className:`${d?"text-destructive border-red-500":""}`,children:(0,no.jsx)(Ae,{className:`${d?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(c=>c?.id.toString()===o.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,no.jsx)(he,{children:m.map(c=>(0,no.jsx)(_,{value:c.id,children:c.name},c.id))})]}),d&&(0,no.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"isRecurring",checked:o.isRecurring,onChange:c=>n({...o,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,no.jsx)(R,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),o.isRecurring&&(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,no.jsxs)(Ne,{value:o.recurrencePattern,onValueChange:c=>n({...o,recurrencePattern:c}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"daily",children:"Daily"}),(0,no.jsx)(_,{value:"weekly",children:"Weekly"}),(0,no.jsx)(_,{value:"monthly",children:"Monthly"}),(0,no.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"recurrenceInterval",children:"Every"}),(0,no.jsx)(H,{id:"recurrenceInterval",type:"number",min:"1",value:o.recurrenceInterval,onChange:c=>n({...o,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,no.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),(0,no.jsx)(w,{type:"submit",children:"Add Reminder"})]})]})]})})},Ws=({reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:o})=>{let[n,d]=(0,zi.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),l=m=>{m.preventDefault();let c=t.find(u=>u?.id===n.colleagueId);if(!c){console.error("No valid colleague selected");return}a(e.id,{title:n.title,description:n.description,dueDate:new Date(n.dueDate),dueTime:n.dueTime||void 0,colleague:c,priority:n.priority,isRecurring:n.isRecurring,recurrencePattern:n.isRecurring?n.recurrencePattern:void 0,recurrenceInterval:n.isRecurring?n.recurrenceInterval:void 0,reminderEnabled:n.reminderEnabled,reminderMinutes:n.reminderEnabled?n.reminderMinutes:void 0,tags:n.tags?n.tags.split(",").map(u=>u.trim()):void 0}),o()},g=t.filter(Boolean);return(0,no.jsx)(Ze,{open:i,onOpenChange:o,children:(0,no.jsxs)(Ke,{className:"max-w-2xl",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Edit Reminder"})}),(0,no.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-title",children:"Title"}),(0,no.jsx)(H,{id:"edit-title",value:n.title,onChange:m=>d({...n,title:m.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-priority",children:"Priority"}),(0,no.jsxs)(Ne,{value:n.priority,onValueChange:m=>d({...n,priority:m}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"low",children:"\u{1F7E2} Low"}),(0,no.jsx)(_,{value:"medium",children:"\u{1F7E1} Medium"}),(0,no.jsx)(_,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-description",children:"Description"}),(0,no.jsx)(Ee,{id:"edit-description",value:n.description,onChange:m=>d({...n,description:m.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,no.jsx)(H,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:m=>d({...n,dueDate:m.target.value}),required:!0})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,no.jsx)(H,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:m=>d({...n,dueTime:m.target.value})})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,no.jsxs)(Ne,{value:n.colleagueId,onValueChange:m=>d({...n,colleagueId:m}),required:!0,children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select a digital colleague"})}),(0,no.jsx)(he,{children:g.map(m=>(0,no.jsx)(_,{value:m.id,children:m.name},m.id))})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring,onChange:m=>d({...n,isRecurring:m.target.checked}),className:"rounded border-border"}),(0,no.jsx)(R,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),n.isRecurring&&(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,no.jsxs)(Ne,{value:n.recurrencePattern,onValueChange:m=>d({...n,recurrencePattern:m}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"daily",children:"Daily"}),(0,no.jsx)(_,{value:"weekly",children:"Weekly"}),(0,no.jsx)(_,{value:"monthly",children:"Monthly"}),(0,no.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,no.jsx)(H,{id:"edit-recurrenceInterval",type:"number",min:"1",value:n.recurrenceInterval,onChange:m=>d({...n,recurrenceInterval:parseInt(m.target.value)})})]})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:n.reminderEnabled,onChange:m=>d({...n,reminderEnabled:m.target.checked}),className:"rounded border-border"}),(0,no.jsx)(R,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),n.reminderEnabled&&(0,no.jsxs)("div",{className:"pl-6",children:[(0,no.jsx)(R,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,no.jsxs)(Ne,{value:n.reminderMinutes.toString(),onValueChange:m=>d({...n,reminderMinutes:parseInt(m)}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"5",children:"5 minutes before"}),(0,no.jsx)(_,{value:"15",children:"15 minutes before"}),(0,no.jsx)(_,{value:"30",children:"30 minutes before"}),(0,no.jsx)(_,{value:"60",children:"1 hour before"}),(0,no.jsx)(_,{value:"1440",children:"1 day before"})]})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,no.jsx)(H,{id:"edit-tags",value:n.tags,onChange:m=>d({...n,tags:m.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,no.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:o,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",children:"Save Changes"})]})]})]})})},Ks=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:i})=>{let[o,n]=(0,zi.useState)(!1);if(!e||!e.id)return null;let d=Mi(e.dueDate,e.dueTime),l=Bi(e.dueDate),g=_s(e.dueDate),m=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},c=()=>l?"Today":g?"Tomorrow":d&&!e.isCompleted?"Overdue":Hs(e.dueDate);return(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(Ws,{reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:()=>n(!1)}),(0,no.jsx)(fe,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${d&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,no.jsx)(Xt,{className:"p-4",children:(0,no.jsxs)("div",{className:"flex items-start justify-between",children:[(0,no.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,no.jsx)("button",{onClick:m,className:"mt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,no.jsx)(Dt.CheckCircle,{className:"h-5 w-5"}):(0,no.jsx)(Dt.Circle,{className:"h-5 w-5"})}),(0,no.jsxs)("div",{className:"flex-1",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,no.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,no.jsx)("span",{className:"text-sm",children:Vs(e.priority)}),e.isRecurring&&(0,no.jsx)(Dt.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,no.jsx)(Dt.Bell,{className:"h-4 w-4 text-success"})]}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,no.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(Dt.Calendar,{className:"h-4 w-4"}),(0,no.jsx)("span",{className:d&&!e.isCompleted?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(Dt.Clock,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:Gs(e.dueTime)})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(Dt.User,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,no.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map((u,v)=>(0,no.jsx)(pe,{variant:"secondary",className:"text-xs",children:u},v))})]})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 w-8 p-0",children:(0,no.jsx)(Dt.Edit2,{className:"h-4 w-4"})}),(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>i(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,no.jsx)(Dt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Dr=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:i,onDeleteReminder:o})=>{let[n,d]=(0,zi.useState)(e.filter(Boolean)),[l]=(0,zi.useState)(t.filter(Boolean)),[g,m]=(0,zi.useState)("all"),[c,u]=(0,zi.useState)(""),[v,N]=(0,zi.useState)(!1),A=x=>{if(!x.title||!x.colleague?.id){console.error("Invalid reminder data:",x);return}let I={...x,id:Date.now().toString(),createdAt:new Date};d($=>[...$,I]),a?.(x)},O=(x,I)=>{if(!x){console.error("No reminder ID provided for update");return}d($=>$.map(L=>L?.id===x?{...L,...I}:L)),i?.(x,I)},y=x=>{if(!x){console.error("No reminder ID provided for deletion");return}d(I=>I.filter($=>$?.id!==x)),o?.(x)},B=n.filter(x=>{if(!x)return!1;if(c){let I=c.toLowerCase();if(!(x.title.toLowerCase().includes(I)||x.description.toLowerCase().includes(I)||x.colleague?.name?.toLowerCase().includes(I)||x.tags?.some(L=>L.toLowerCase().includes(I))))return!1}switch(g){case"pending":return!x.isCompleted;case"completed":return x.isCompleted;case"overdue":return!x.isCompleted&&Mi(x.dueDate,x.dueTime);case"today":return Bi(new Date(x.dueDate));default:return!0}}).sort((x,I)=>{if(!x||!I)return 0;if(x.isCompleted&&!I.isCompleted)return 1;if(!x.isCompleted&&I.isCompleted)return-1;let $={high:3,medium:2,low:1},L=$[I.priority]-$[x.priority];return L!==0?L:x.dueDate.getTime()-I.dueDate.getTime()}),V={total:n.filter(Boolean).length,pending:n.filter(x=>x&&!x.isCompleted).length,completed:n.filter(x=>x&&x.isCompleted).length,overdue:n.filter(x=>x&&!x.isCompleted&&Mi(x.dueDate,x.dueTime)).length,today:n.filter(x=>x&&Bi(new Date(x.dueDate))).length},Q=l.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-no from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{N(!0)}}}),(0,no.jsxs)("div",{className:"h-full bg-background",children:[(0,no.jsx)($no,{colleagues:l,onAddReminder:A,open:v,setOpen:N}),(0,no.jsxs)("div",{className:"p-6",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,no.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,no.jsxs)(w,{className:"flex items-center space-x-2",onClick:()=>N(!0),children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:"Add Reminder"})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-foreground",children:V.total}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-primary",children:V.pending}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-success",children:V.completed}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-destructive",children:V.overdue}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-warning",children:V.today}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsx)(H,{placeholder:"Search reminders...",value:c,onChange:x=>u(x.target.value),className:"max-w-md"})}),(0,no.jsxs)(Ne,{value:g,onValueChange:x=>m(x),children:[(0,no.jsx)(be,{className:"w-40",children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsxs)(_,{value:"all",children:["All (",V.total,")"]}),(0,no.jsxs)(_,{value:"pending",children:["Pending (",V.pending,")"]}),(0,no.jsxs)(_,{value:"completed",children:["Completed (",V.completed,")"]}),(0,no.jsxs)(_,{value:"overdue",children:["Overdue (",V.overdue,")"]}),(0,no.jsxs)(_,{value:"today",children:["Today (",V.today,")"]})]})]})]}),(0,no.jsx)("div",{className:"space-y-4",children:B.length===0?(0,no.jsxs)(fe,{className:"p-8 text-center",children:[(0,no.jsx)("div",{className:"text-muted-foreground",children:c||g!=="all"?"No reminders match your filters":"No reminders yet"}),!c&&g==="all"&&(0,no.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):B.map(x=>x&&(0,no.jsx)(Ks,{reminder:x,colleagues:l,onUpdateReminder:O,onDeleteReminder:y},x.id))})]})]})]})};function Ja({files:e,onFileClick:t,onFileEdit:a,onFileDelete:i,showHeader:o=!0,className:n}){return(0,no.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${n||""}`,children:[o&&(0,no.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,no.jsx)("div",{className:"col-span-6",children:"Name"}),(0,no.jsx)("div",{className:"col-span-2",children:"Size"}),(0,no.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,no.jsx)("div",{className:"divide-y",children:e.map(d=>(0,no.jsxs)(Ya.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(d),children:[(0,no.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,no.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,no.jsx)("div",{children:(0,no.jsx)("p",{className:"font-medium",children:d.name})})]}),(0,no.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:d.filesize}),(0,no.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,no.jsx)("span",{className:"text-sm md:text-base",children:typeof d.createdAt=="string"?d.createdAt:d.createdAt.toLocaleDateString()}),(0,no.jsx)("div",{className:"flex gap-1",children:(0,no.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:l=>{l.stopPropagation(),i?.(d)},children:(0,no.jsx)(Dt.Trash2,{className:"h-4 w-4"})})})]})]},d.name))})]})}function Li({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:i,onFileClick:o,compactView:n=!1,className:d}){let[l,g]=(0,zi.useState)(e),[m,c]=(0,zi.useState)(""),[u,v]=(0,zi.useState)("all"),[N,A]=(0,zi.useState)("all");(0,zi.useEffect)(()=>{g(e)},[e]);let O=Array.from(new Set(l.map(L=>L.mimeType))),y=l.filter(L=>{let C=L.name.toLowerCase().includes(m.toLowerCase()),z=u==="all"||L.mimeType===u;return C&&z}),F=y.slice(0,10),B=y.filter(Boolean),V=()=>{t?.()},Q=L=>{a?.(L)},x=L=>{console.log("deleting file",L),g(C=>C.filter(z=>z.name!==L.name)),i?.(L.id)},I=L=>{o?.(L)},$=()=>{c(""),v("all")};return(0,no.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,no.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,no.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,no.jsxs)("div",{className:`space-y-6 ${d||""}`,children:[(0,no.jsx)(gt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-no from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:V},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,no.jsx)(fe,{children:(0,no.jsx)(Xt,{className:"no-6",children:(0,no.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsxs)("div",{className:"relative",children:[(0,no.jsx)(Dt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,no.jsx)(H,{placeholder:"Search files...",value:m,onChange:L=>c(L.target.value),className:"pl-9"})]})}),(m||u!=="all")&&(0,no.jsxs)(w,{variant:"outline",onClick:$,className:"gap-2",children:[(0,no.jsx)(Dt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsx)(Ba,{activeTab:N,onTabChange:A,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${F.length})`}],maxWidth:"500px",gridCols:3}),N==="all"&&(0,no.jsx)(Ja,{files:y,onFileClick:I,onFileEdit:Q,onFileDelete:x,showHeader:!n}),N==="recent"&&(0,no.jsx)(Ja,{files:F,onFileClick:I,onFileEdit:Q,onFileDelete:x,showHeader:!n}),N==="shared"&&(0,no.jsx)(Ja,{files:B,onFileClick:I,onFileEdit:Q,onFileDelete:x,showHeader:!n})]}),y.length===0&&(0,no.jsx)(fe,{children:(0,no.jsx)(Xt,{className:"no-6",children:(0,no.jsxs)("div",{className:"text-center py-8",children:[(0,no.jsx)(Dt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,no.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,no.jsx)("p",{className:"text-muted-foreground mb-4",children:m||u!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,no.jsxs)(w,{onClick:V,className:"gap-2",children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Pr=require("next/navigation");function Fi({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:i=[],initialProjects:o=[],initialReminders:n=[],initialColleagues:d=[],initialUsers:l=[],initialFiles:g=[],initialView:m="kanban",onAddTask:c,onUpdateTask:u,onDeleteTask:v,onTaskClick:N,onAddEpic:A,onUpdateEpic:O,onDeleteEpic:y,onAddTaskToEpic:F,onAddSprint:B,onUpdateSprint:V,onDeleteSprint:Q,onAddProject:x,onUpdateProject:I,onDeleteProject:$,onFileAdd:L,onFileEdit:C,onFileDelete:z,onFileClick:ne,onAddReminder:T,onUpdateReminder:Se,onDeleteReminder:S,onViewChange:oe,onToggleMobileMenu:f,onTeamClick:K,onTeamChange:re,onCopilotClick:Ue}){let[Ce,me]=(0,zi.useState)(t),[Ge,ye]=(0,zi.useState)(a),[Ye,ct]=(0,zi.useState)(i),[G,ce]=(0,zi.useState)(o),[Te,Ve]=(0,zi.useState)(n),[vt,It]=(0,zi.useState)(d),[bt,Qa]=(0,zi.useState)(l),[Za,ua]=(0,zi.useState)(g),[ei,ga]=(0,zi.useState)(!1),[fa,ta]=(0,zi.useState)(!1),[va,b]=(0,zi.useState)(null),[k,se]=(0,zi.useState)(null),[ji,Oi]=(0,zi.useState)(null),[Et,Ui]=(0,zi.useState)(m||"kanban"),[Ar,Ir]=(0,zi.useState)(!1),Vi=(0,Pr.useRouter)();(0,zi.useEffect)(()=>{me(t)},[t]),(0,zi.useEffect)(()=>{ct(i)},[i]),(0,zi.useEffect)(()=>{ye(a)},[a]),(0,zi.useEffect)(()=>{ce(o)},[o]),(0,zi.useEffect)(()=>{ua(g)},[g]),(0,zi.useEffect)(()=>{Qa(l)},[l]),(0,zi.useEffect)(()=>{It(d)},[d]),(0,zi.useEffect)(()=>{Ve(n)},[n]),(0,zi.useEffect)(()=>{Ui(m)},[m]);let Er=Ge.filter(h=>h.isSelected).map(h=>h.id),ba=Ye.find(h=>h.isSelected),Mr=Ce.filter(h=>{let P=Er.includes(h.epicId);return!ba||ba.id==="all-tasks"?P:ba.id==="backlog"?P&&!h.sprintId:P&&h.sprintId===ba.id}),Js=h=>Mr.filter(P=>P.status===h),Xs=h=>{let P={};return Ge.forEach(q=>{P[q.id]=h.filter(ve=>ve.epicId===q.id)}),P},Ys=h=>{Oi(h)},Qs=h=>{ji&&(me(P=>P.map(q=>q.id===ji.id?{...q,status:h}:q)),Oi(null))},Hi=h=>{let P={...h,id:Date.now().toString(),createdAt:new Date};me(q=>[...q,P]),c?.(P)},ha=(h,P)=>{me(q=>q.map(ve=>ve.id===h?{...ve,...P}:ve)),u?.(h,P)},Zs=async(h,P)=>{ha(h,P)},Gi=h=>{me(P=>P.filter(q=>q.id!==h)),va?.id===h&&b(null),v?.(h)},el=async h=>{Gi(h)},Br=h=>{let P={...h,id:Date.now().toString(),isSelected:!1};ce(q=>[...q,P]),x?.(h)},Lr=(h,P)=>{ce(q=>q.map(ve=>ve.id===h?P.isSelected?(Vi.push(`/project/${h}`),{...ve,...P}):{...ve,...P}:P.isSelected&&h!==ve.id?{...ve,isSelected:!1}:ve)),I?.(h,P)},Fr=h=>{ce(P=>P.filter(q=>q.id!==h)),$?.(h)},_i=h=>{let P={...h,id:Date.now().toString(),isSelected:!0};ye(q=>[...q,P]),A?.({...P})},$i=()=>{ta(!0)},Wi=(h,P)=>{ye(q=>q.map(ve=>ve.id===h?{...ve,...P}:ve)),O?.(h,P)},Ki=h=>{ye(P=>P.filter(q=>q.id!==h)),me(P=>P.filter(q=>q.epicId!==h)),y?.(h)},qi=h=>{let P={...h,id:Date.now().toString(),isSelected:!1};ct(q=>[...q,P]),B?.(h)},zr=(h,P)=>{ct(q=>q.map(ve=>ve.id===h?P.isSelected?{...ve,...P}:{...ve,...P}:P.isSelected&&h!==ve.id?{...ve,isSelected:!1}:ve)),V?.(h,P)},jr=h=>{h==="backlog"||h==="all-tasks"||(ct(P=>P.filter(q=>q.id!==h)),me(P=>P.map(q=>q.sprintId===h?{...q,sprintId:void 0}:q)),Q?.(h))},ti=h=>{b(h)},Or=h=>{h==="planning"&&window.innerWidth<768||(Ui(h),oe?.(h))},Ur=()=>{Ir(h=>!h),f?.()},tl=()=>{Vi.push("/")},al=h=>{console.log("Switching to team:",h)},il=h=>{console.log("Switching to team:",h)},Vr=h=>{se(h),ga(!0)},Hr=()=>{ga(!1),se(null)},Gr=h=>{let P={...h,id:Date.now().toString(),createdAt:new Date};Ve(q=>[...q,P]),T?.(h)},_r=(h,P)=>{Ve(q=>q.map(ve=>ve.id===h?{...ve,...P}:ve)),Se?.(h,P)},$no=h=>{Ve(P=>P.filter(q=>q.id!==h)),S?.(h)},Wr=()=>{L?.()},Kr=h=>{C?.(h)},qr=h=>{ua(P=>P.filter(q=>q.name!==h)),z?.(h)},Jr=h=>{ne?.(h)},ol=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],rl=()=>{switch(Et){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},ai=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],nl=ai.sort((h,P)=>P.lastUsed.getTime()-h.lastUsed.getTime()).slice(0,3),sl=ai.length>3,ll=ai.slice(3);return(0,no.jsxs)(Zo,{projects:G,epics:Ge,sprints:Ye,currentView:Et,onUpdateProject:Lr,onDeleteProject:Fr,onAddProject:Br,onUpdateEpic:Wi,onDeleteEpic:Ki,onAddEpic:$i,onAddSprint:qi,onUpdateSprint:zr,onDeleteSprint:jr,onViewChange:Or,mobileMenuOpen:Ar,onToggleMobileMenu:Ur,children:[Et==="kanban"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(br,{initialProjects:G,initialEpics:Ge,initialSprints:Ye,initialTasks:Ce,initialColleagues:vt,initialUsers:bt,onAddTask:Hi,onUpdateTask:ha,onDeleteTask:Gi,onTaskClick:ti,onAddEpic:_i})}),Et==="planning"&&(0,no.jsx)("div",{className:"hidden md:block h-full",children:(0,no.jsx)(Cr,{tasks:Ce,epics:Ge,sprints:Ye,onUpdateTask:ha,onTaskClick:ti,onAddSprint:qi})}),Et==="tasks"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(Dr,{initialReminders:Te,initialColleagues:vt,onAddReminder:Gr,onUpdateReminder:_r,onDeleteReminder:$no})}),Et==="files"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(Li,{initialFiles:Za,onFileAdd:Wr,onFileEdit:Kr,onFileDelete:qr,onFileClick:Jr,compactView:!1})}),Et==="epics"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(hr,{tasks:Ce,epics:Ge,sprints:Ye,onUpdateTask:ha,onTaskClick:ti,onAddTaskToEpic:Vr,onAddEpic:$i,onUpdateEpic:Wi,onDeleteEpic:Ki})}),(0,no.jsx)(Ua,{isOpen:ei,onClose:Hr,onAddTask:Hi,epics:Ge,sprints:Ye,assignees:[...vt,...bt],defaultEpicId:k||void 0}),(0,no.jsx)(Ga,{isOpen:fa,onClose:()=>ta(!1),onAddEpic:_i})]})}function Rr({title:e="",projects:t,businessUnits:a,epics:i,sprints:o,tasks:n,currentView:d,onAddTask:l,onUpdateTask:g,onDeleteTask:m,onTaskClick:c,onAddEpic:u,onUpdateEpic:v,onDeleteEpic:N,onAddTaskToEpic:A,onAddSprint:O,onUpdateSprint:y,onDeleteSprint:F,onAddProject:B,onUpdateProject:V,onDeleteProject:Q,onViewChange:x,mobileMenuOpen:I,onToggleMobileMenu:$,onTeamClick:L,onTeamChange:C,onCopilotClick:z}){let[ne,T]=(0,zi.useState)("projects"),[Se,S]=(0,zi.useState)(a[0]),oe=ye=>{console.log("Opening app:",ye.name)},f=ye=>{console.log("Favoriting app:",ye.name)},K=ye=>{console.log("Opening file:",ye.name)},re=ye=>{console.log("Sharing file:",ye.name)},Ue=ye=>{console.log("Opening project:",ye.name)},Ce=ye=>{console.log("Sharing project:",ye.name)},me=ye=>{console.log("Business unit changed to:",ye.name)},Ge=()=>{switch(ne){case"projects":return(0,no.jsx)(Fi,{initialProjects:t,initialEpics:i,initialSprints:o,initialTasks:n,onAddTask:l,onUpdateTask:g,onDeleteTask:m,onTaskClick:c,onAddEpic:u,onUpdateEpic:v,onDeleteEpic:N,onAddTaskToEpic:A,onAddSprint:O,onUpdateSprint:y,onDeleteSprint:F,onAddProject:B,onUpdateProject:V,onDeleteProject:Q,onViewChange:x,onToggleMobileMenu:$,onTeamClick:L,onTeamChange:C,onCopilotClick:z});default:return null}};return(0,no.jsx)(Fo,{sidebarItems:yo,title:e,notifications:wo,businessUnits:a,currentBusinessUnit:Se,onBusinessUnitChange:me,activeTab:ne,onTabChange:T,showTabs:!0,children:(0,no.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,no.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ge()},ne)})})}
|
|
5
|
+
"use strict";"use client";var Xr=Object.create;var xa=Object.defineProperty;var Yr=Object.getOwnPropertyDescriptor;var Qr=Object.getOwnPropertyNames;var Zr=Object.getPrototypeOf,en=Object.prototype.hasOwnProperty;var tn=(e,t)=>{for(var a in t)xa(e,a,{get:t[a],enumerable:!0})},Ji=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Qr(t))!en.call(e,o)&&o!==a&&xa(e,o,{get:()=>t[o],enumerable:!(i=Yr(t,o))||i.enumerable});return e};var le=(e,t,a)=>(a=e!=null?Xr(Zr(e)):{},Ji(t||!e||!e.__esModule?xa(a,"default",{value:e,enumerable:!0}):a,e)),an=e=>Ji(xa({},"__esModule",{value:!0}),e);var qs={};tn(qs,{default:()=>Rr});module.exports=an(qs);var zi=require("react"),Ya=require("motion/react");var oo=require("clsx");var ri="-",on=e=>{let t=nn(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:d=>{let l=d.split(ri);return l[0]===""&&l.length!==1&&l.shift(),Qi(l,t)||rn(d)},getConflictingClassGroupIds:(d,l)=>{let g=a[d]||[];return l&&i[d]?[...g,...i[d]]:g}}},Qi=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],i=t.nextPart.get(a),o=i?Qi(e.slice(1),i):void 0;if(o)return o;if(t.validators.length===0)return;let n=e.join(ri);return t.validators.find(({validator:d})=>d(n))?.classGroupId},Xi=/^\[(.+)\]$/,rn=e=>{if(Xi.test(e)){let t=Xi.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},nn=e=>{let{theme:t,prefix:a}=e,i={nextPart:new Map,validators:[]};return ln(Object.entries(e.classGroups),a).forEach(([n,d])=>{oi(d,i,n,t)}),i},oi=(e,t,a,i)=>{e.forEach(o=>{if(typeof o=="string"){let n=o===""?t:Yi(t,o);n.classGroupId=a;return}if(typeof o=="function"){if(sn(o)){oi(o(i),t,a,i);return}t.validators.push({validator:o,classGroupId:a});return}Object.entries(o).forEach(([n,d])=>{oi(d,Yi(t,n),a,i)})})},Yi=(e,t)=>{let a=e;return t.split(ri).forEach(i=>{a.nextPart.has(i)||a.nextPart.set(i,{nextPart:new Map,validators:[]}),a=a.nextPart.get(i)}),a},sn=e=>e.isThemeGetter,ln=(e,t)=>t?e.map(([a,i])=>{let o=i.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([d,l])=>[t+d,l])):n);return[a,o]}):e,dn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,i=new Map,o=(n,d)=>{a.set(n,d),t++,t>e&&(t=0,i=a,a=new Map)};return{get(n){let d=a.get(n);if(d!==void 0)return d;if((d=i.get(n))!==void 0)return o(n,d),d},set(n,d){a.has(n)?a.set(n,d):o(n,d)}}},Zi="!",cn=e=>{let{separator:t,experimentalParseClassName:a}=e,i=t.length===1,o=t[0],n=t.length,d=l=>{let g=[],m=0,c=0,u;for(let y=0;y<l.length;y++){let F=l[y];if(m===0){if(F===o&&(i||l.slice(y,y+n)===t)){g.push(l.slice(c,y)),c=y+n;continue}if(F==="/"){u=y;continue}}F==="["?m++:F==="]"&&m--}let v=g.length===0?l:l.substring(c),N=v.startsWith(Zi),A=N?v.substring(1):v,O=u&&u>c?u-c:void 0;return{modifiers:g,hasImportantModifier:N,baseClassName:A,maybePostfixModifierPosition:O}};return a?l=>a({className:l,parseClassName:d}):d},mn=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(i=>{i[0]==="["?(t.push(...a.sort(),i),a=[]):a.push(i)}),t.push(...a.sort()),t},pn=e=>({cache:dn(e.cacheSize),parseClassName:cn(e),...on(e)}),un=/\no+/,gn=(e,t)=>{let{parseClassName:a,getClassGroupId:i,getConflictingClassGroupIds:o}=t,n=[],d=e.trim().split(un),l="";for(let g=d.length-1;g>=0;g-=1){let m=d[g],{modifiers:c,hasImportantModifier:u,baseClassName:v,maybePostfixModifierPosition:N}=a(m),A=!!N,O=i(A?v.substring(0,N):v);if(!O){if(!A){l=m+(l.length>0?" "+l:l);continue}if(O=i(v),!O){l=m+(l.length>0?" "+l:l);continue}A=!1}let y=mn(c).join(":"),F=u?y+Zi:y,B=F+O;if(n.includes(B))continue;n.push(B);let V=o(O,A);for(let Q=0;Q<V.length;++Q){let x=V[Q];n.push(F+x)}l=m+(l.length>0?" "+l:l)}return l};function fn(){let e=0,t,a,i="";for(;e<arguments.length;)(t=arguments[e++])&&(a=eo(t))&&(i&&(i+=" "),i+=a);return i}var eo=e=>{if(typeof e=="string")return e;let t,a="";for(let i=0;i<e.length;i++)e[i]&&(t=eo(e[i]))&&(a&&(a+=" "),a+=t);return a};function vn(e,...t){let a,i,o,n=d;function d(g){let m=t.reduce((c,u)=>u(c),e());return a=pn(m),i=a.cache.get,o=a.cache.set,n=l,l(g)}function l(g){let m=i(g);if(m)return m;let c=gn(g,a);return o(g,c),c}return function(){return n(fn.apply(null,arguments))}}var we=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},to=/^\[(?:([a-z-]+):)?(.+)\]$/i,bn=/^\d+\/\d+$/,hn=new Set(["px","full","screen"]),xn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yn=/\d+(%|px|no?em|[sdl]?v([hwib]|min|max)|no|pc|in|cm|mm|cap|ch|ex|no?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Nn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=e=>Gt(e)||hn.has(e)||bn.test(e),Nt=e=>_t(e,"length",In),Gt=e=>!!e&&!Number.isNaN(Number(e)),ii=e=>_t(e,"number",Gt),aa=e=>!!e&&Number.isInteger(Number(e)),Cn=e=>e.endsWith("%")&&Gt(e.slice(0,-1)),X=e=>to.test(e),St=e=>xn.test(e),Dn=new Set(["length","size","percentage"]),kn=e=>_t(e,Dn,ao),Tn=e=>_t(e,"position",ao),Pn=new Set(["image","url"]),Rn=e=>_t(e,Pn,Mn),An=e=>_t(e,"",En),ia=()=>!0,_t=(e,t,a)=>{let i=to.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):a(i[2]):!1},In=e=>yn.test(e)&&!wn.test(e),ao=()=>!1,En=e=>Nn.test(e),Mn=e=>Sn.test(e);var Bn=()=>{let e=we("colors"),t=we("spacing"),a=we("blur"),i=we("brightness"),o=we("borderColor"),n=we("borderRadius"),d=we("borderSpacing"),l=we("borderWidth"),g=we("contrast"),m=we("grayscale"),c=we("hueRotate"),u=we("invert"),v=we("gap"),N=we("gradientColorStops"),A=we("gradientColorStopPositions"),O=we("inset"),y=we("margin"),F=we("opacity"),B=we("padding"),V=we("saturate"),Q=we("scale"),x=we("sepia"),I=we("skew"),$=we("space"),L=we("translate"),C=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",X,t],T=()=>[X,t],Se=()=>["",ht,Nt],S=()=>["auto",Gt,X],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],f=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>["start","end","center","between","around","evenly","stretch"],Ue=()=>["","0",X],Ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],me=()=>[Gt,X];return{cacheSize:500,separator:":",theme:{colors:[ia],spacing:[ht,Nt],blur:["none","",St,X],brightness:me(),borderColor:[e],borderRadius:["none","","full",St,X],borderSpacing:T(),borderWidth:Se(),contrast:me(),grayscale:Ue(),hueRotate:me(),invert:Ue(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[Cn,Nt],inset:ne(),margin:ne(),opacity:me(),padding:T(),saturate:me(),scale:me(),sepia:Ue(),skew:me(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[St]}],"break-after":[{"break-after":Ce()}],"break-before":[{"break-before":Ce()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...oe(),X]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[O]}],"inset-x":[{"inset-x":[O]}],"inset-y":[{"inset-y":[O]}],start:[{start:[O]}],end:[{end:[O]}],top:[{top:[O]}],right:[{right:[O]}],bottom:[{bottom:[O]}],left:[{left:[O]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",aa,X]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:Ue()}],shrink:[{shrink:Ue()}],order:[{order:["first","last","none",aa,X]}],"grid-cols":[{"grid-cols":[ia]}],"col-start-end":[{col:["auto",{span:["full",aa,X]},X]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[ia]}],"row-start-end":[{row:["auto",{span:[aa,X]},X]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","zi",X]}],"auto-rows":[{"auto-rows":["auto","min","max","zi",X]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],no:[{no:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],zi:[{zi:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",X,t]}],"min-w":[{"min-w":[X,t,"min","max","fit"]}],"max-w":[{"max-w":[X,t,"none","full","min","max","fit","prose",{screen:[St]},St]}],h:[{h:[X,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,t,"auto","min","max","fit"]}],"font-size":[{text:["base",St,Nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ii]}],"font-family":[{font:[ia]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",Gt,ii]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ht,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[F]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...f(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ht,Nt]}],"underline-offset":[{"underline-offset":["auto",ht,X]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[F]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),Tn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","no","br","b","bl","l","tl"]},Rn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[N]}],"gradient-via":[{via:[N]}],"gradient-to":[{to:[N]}],rounded:[{rounded:[n]}],"rounded-no":[{"rounded-no":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-no":[{"rounded-no":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-no":[{"rounded-no":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-no":[{"border-no":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-no":[{"border-no":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[F]}],"border-style":[{border:[...f(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[F]}],"divide-style":[{divide:f()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-no":[{"border-no":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-no":[{"border-no":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...f()]}],"outline-offset":[{"outline-offset":[ht,X]}],"outline-w":[{outline:[ht,Nt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[F]}],"ring-offset-w":[{"ring-offset":[ht,Nt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",St,An]}],"shadow-color":[{shadow:[ia]}],opacity:[{opacity:[F]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",St,X]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[u]}],saturate:[{saturate:[V]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[F]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",X]}],duration:[{duration:me()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:me()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Q]}],"scale-x":[{"scale-x":[Q]}],"scale-y":[{"scale-y":[Q]}],rotate:[{rotate:[aa,X]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",X]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","no-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-zi":[{"scroll-zi":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-no":[{"scroll-no":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",X]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ht,Nt,ii]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","no","pr","pb","pl"],px:["pr","pl"],py:["no","pb"],m:["mx","my","ms","me","mt","zi","mb","ml"],mx:["zi","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-no","rounded-e","rounded-t","rounded-no","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-no","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-no":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-no"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-no":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-no","border-w-e","border-w-t","border-w-no","border-w-b","border-w-l"],"border-w-x":["border-w-no","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-no","border-color-e","border-color-t","border-color-no","border-color-b","border-color-l"],"border-color-x":["border-color-no","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-zi","scroll-mb","scroll-ml"],"scroll-mx":["scroll-zi","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-no","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-no","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var io=vn(Bn);function p(...e){return io((0,oo.clsx)(e))}var Ra=le(require("react")),di=le(require("next/link")),Dt=require("lucide-react");var ro=require("class-variance-authority");var no=require("react/jsx-runtime"),Ln=(0,ro.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function pe({className:e,variant:t,...a}){return(0,no.jsx)("div",{className:p(Ln({variant:t}),e),...a})}var so=require("@radix-ui/react-slot"),co=le(require("react")),ya=(0,ro.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),w=co.forwardRef(({asChild:e=!1,className:t,size:a,variant:i,...o},n)=>(0,no.jsx)(e?so.Slot:"button",{className:p(ya({className:t,size:a,variant:i})),ref:n,...o}));w.displayName="Button";var po=le(require("react"));var H=po.forwardRef(({className:e,type:t,...a},i)=>(0,no.jsx)("input",{type:t,className:p("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...a}));H.displayName="Input";var ni=le(require("react")),tt=le(require("@radix-ui/react-scroll-area"));var $t=ni.forwardRef(({className:e,children:t,...a},i)=>(0,no.jsxs)(tt.Root,{ref:i,className:p("relative overflow-hidden",e),...a,children:[(0,no.jsx)(tt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,no.jsx)(go,{}),(0,no.jsx)(tt.Corner,{})]}));$t.displayName=tt.Root.displayName;var go=ni.forwardRef(({className:e,orientation:t="vertical",...a},i)=>(0,no.jsx)(tt.ScrollAreaScrollbar,{ref:i,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,no.jsx)(tt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));go.displayName=tt.ScrollAreaScrollbar.displayName;var oa=le(require("react")),Le=le(require("@radix-ui/react-dialog"));var Ze=Le.Root;var Fn=Le.Portal;var vo=oa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Le.Overlay,{ref:a,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));vo.displayName=Le.Overlay.displayName;var Ke=oa.forwardRef(({className:e,children:t,...a},i)=>(0,no.jsxs)(Fn,{children:[(0,no.jsx)(vo,{}),(0,no.jsxs)(Le.Content,{ref:i,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,no.jsxs)(Le.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,no.jsx)(Dt.X,{className:"h-4 w-4"}),(0,no.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ke.displayName=Le.Content.displayName;var qe=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});qe.displayName="DialogHeader";var ra=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ra.displayName="DialogFooter";var Je=oa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Le.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));Je.displayName=Le.Title.displayName;var zn=oa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Le.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));zn.displayName=Le.Description.displayName;var na=le(require("@radix-ui/react-checkbox")),ho=le(require("react")),si=ho.forwardRef(({className:e,...t},a)=>(0,no.jsx)(na.Root,{className:p("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,no.jsx)(na.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,no.jsx)(Dt.Check,{className:"h-4 w-4"})})}));si.displayName=na.Root.displayName;var mt=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),yo=[{id:"home",title:"Home",icon:(0,no.jsx)(Dt.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,no.jsx)(Dt.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,no.jsx)(Dt.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with no",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,no.jsx)(Dt.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,no.jsx)(Dt.FileText,{}),url:"/knowledge"}],wo=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what'no new",onAction:()=>console.log("See what'no new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],No=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,no.jsx)(Dt.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,no.jsx)(Dt.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,no.jsx)(Dt.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,no.jsx)(Dt.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,no.jsx)(Dt.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,no.jsx)(Dt.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,no.jsx)(Dt.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,no.jsx)(Dt.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"zi",name:"IT Support",description:"Information technology and infrastructure",icon:(0,no.jsx)(Dt.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,no.jsx)(Dt.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Ca=[{id:"1",name:"no-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var li=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Na=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],ka=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],jn=[...ka,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],On=[...Ca,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Sa={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},xo={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:ka.filter(e=>e.epicId==="1")};var Rl={empty:{initialProjects:Sa.projects,initialEpics:Sa.epics,initialSprints:Sa.sprints,initialTasks:Sa.tasks},default:{initialProjects:Ca,initialEpics:li,initialSprints:Na,initialTasks:ka},highDensity:{initialProjects:Ca,initialEpics:li,initialSprints:Na,initialTasks:jn},singleEpic:{initialProjects:Ca,initialEpics:xo.epics,initialSprints:Na,initialTasks:xo.tasks},multipleProjects:{initialProjects:On,initialEpics:li,initialSprints:Na,initialTasks:ka}},Da=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(mt),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(mt),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(mt),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(mt),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(mt),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(mt),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(mt),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(mt),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(mt),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(mt),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Al=[{id:"1",title:"Review quarterly report",description:"no through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Da.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Da.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Da.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Il=Da.filter(e=>e.type==="digital");function Pa(e,t){let[a,i]=(0,zi.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),o=n=>{try{i(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,zi.useEffect)(()=>{o(a)},[]),[a,o]}function ci({items:e,isOpen:t,isMobile:a=!1,onClose:i,currentBusinessUnit:o=No[0],onBusinessUnitChange:n,onSearch:d,className:l,logo:g="/headerlogo.png",appName:m="Nuvia",tagline:c="Collaboration Platform"}){let[u,v]=Ra.useState({}),[N,A]=Pa("sidebar-favorites",{}),[O,y]=Ra.useState(null),[F,B]=Ra.useState(""),V=S=>{v(oe=>({...oe,[S]:!oe[S]}))},Q=S=>{n?.(S)},x=()=>{F.trim()&&d?.(F.trim())},I=S=>{S.key==="Enter"&&(S.preventDefault(),x())},$=(S,oe)=>{let f=N[S]||[],K=f.includes(oe)?f.filter(re=>re!==oe):f.concat(oe);A({...N,[S]:K})},L=S=>{if(!S.items||!S.maxItems||S.items.length<=S.maxItems)return S.items||[];let oe=N[S.id]||[],f=S.items.filter(re=>oe.includes(re.id)),K=S.items.filter(re=>!oe.includes(re.id));return[...f,...K].slice(0,S.maxItems)},C=S=>S.maxItems&&S.items&&S.items.length>S.maxItems,z=e,ne=S=>{let oe=C(S),f=L(S),K=(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[S.icon,(0,no.jsx)("span",{children:S.title})]}),S.badge&&(0,no.jsx)(pe,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:S.badge}),S.items&&(0,no.jsx)(Dt.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",u[S.title]?"rotate-180":"")})]}),re=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",S.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return S.url?(0,no.jsx)(di.default,{href:S.url,className:re,onClick:a?i:void 0,children:K}):(0,no.jsx)("button",{className:re,onClick:()=>S.items&&V(S.title),children:K})},T=()=>{let S=e.find(f=>f.id===O);if(!S||!S.items||!S.maxItems)return null;let oe=N[S.id]||[];return(0,no.jsx)(Ze,{open:!!O,onOpenChange:f=>!f&&y(null),children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsxs)(qe,{children:[(0,no.jsxs)(Je,{children:["Manage ",S.title," Favorites"]}),(0,no.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",S.maxItems," items to show in ",S.title.toLowerCase(),"."]})]}),(0,no.jsx)($t,{className:"max-h-96 pr-4",children:(0,no.jsx)("div",{className:"space-y-4",children:S.items.map(f=>(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)(si,{id:f.id,checked:oe.includes(f.id),onCheckedChange:()=>$(S.id,f.id),disabled:!oe.includes(f.id)&&oe.length>=(S.maxItems||0)}),(0,no.jsxs)("label",{htmlFor:f.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[f.title,f.badge&&(0,no.jsx)(pe,{variant:"outline",className:"text-xs",children:f.badge})]})]},f.id))})})]})})},Se=(0,no.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[(0,no.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,no.jsx)("img",{src:g,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,no.jsxs)("div",{children:[(0,no.jsx)("h2",{className:"font-semibold",children:m}),(0,no.jsx)("p",{className:"text-xs text-muted-foreground",children:c})]})]}),a&&(0,no.jsx)(w,{variant:"ghost",size:"icon",onClick:i,children:(0,no.jsx)(Dt.X,{className:"h-5 w-5"})})]}),(0,no.jsx)("div",{className:"px-3 py-2",children:(0,no.jsxs)("div",{className:"relative",children:[(0,no.jsx)(Dt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,no.jsx)(H,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:F,onChange:S=>B(S.target.value),onKeyPress:I})]})}),(0,no.jsx)($t,{className:"flex-1 px-3 py-2",children:(0,no.jsx)("div",{className:"space-y-1",children:z.map(S=>(0,no.jsxs)("div",{className:"mb-1",children:[ne(S),S.items&&u[S.title]&&(0,no.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[L(S).map(oe=>(0,no.jsxs)(di.default,{href:oe.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?i:void 0,children:[oe.title,oe.badge&&(0,no.jsx)(pe,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:oe.badge})]},oe.id)),C(S)&&S.items&&S.items.length>L(S).length&&(0,no.jsxs)("button",{onClick:()=>y(S.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",S.items.length-L(S).length," more available"]})]})]},S.id))})}),(0,no.jsx)("div",{className:"p-3",children:(0,no.jsx)("div",{className:"space-y-1",children:(0,no.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,no.jsx)(Dt.Settings,{className:"h-5 w-5"}),(0,no.jsx)("span",{children:"Settings"})]})})}),(0,no.jsx)(T,{})]});return a?(0,no.jsx)("div",{className:p("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",l),children:Se}):(0,no.jsx)("div",{className:p("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",l),children:Se})}var Aa=le(require("react")),xt=le(require("@radix-ui/react-avatar"));var sa=Aa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(xt.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));sa.displayName=xt.Root.displayName;var mi=Aa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(xt.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));mi.displayName=xt.Image.displayName;var la=Aa.forwardRef(({className:e,...t},a)=>(0,no.jsx)(xt.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));la.displayName=xt.Fallback.displayName;var So=le(require("react")),lt=le(require("@radix-ui/react-tooltip"));var Wt=lt.Provider,Kt=lt.Root,qt=lt.Trigger,Mt=So.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,no.jsx)(lt.Portal,{children:(0,no.jsx)(lt.Content,{ref:i,sideOffset:t,className:p("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Mt.displayName=lt.Content.displayName;var Co=require("next-themes");function Do(){let{setTheme:e,theme:t}=(0,Co.useTheme)();return(0,no.jsx)(Wt,{children:(0,no.jsxs)(Kt,{children:[(0,no.jsx)(qt,{asChild:!0,children:(0,no.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,no.jsx)(Dt.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,no.jsx)(Dt.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,no.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,no.jsx)(Mt,{children:"Toggle theme"})]})})}function ko({notifications:e,open:t,onClose:a,onNotificationRemove:i,onRemoveAll:o,className:n}){let d=e.filter(m=>!m.read),l=d.length,g=m=>{switch(m){case"info":return(0,no.jsx)(Dt.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,no.jsx)(Dt.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,no.jsx)(Dt.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,no.jsx)(Dt.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,no.jsx)(Ya.AnimatePresence,{children:t&&(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(Ya.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,no.jsx)(Ya.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",n),children:(0,no.jsxs)("div",{className:"flex h-full flex-col",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)(Dt.Bell,{className:"h-5 w-5"}),(0,no.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),l>0&&(0,no.jsxs)(pe,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[l," new"]})]}),(0,no.jsxs)(w,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,no.jsx)(Dt.X,{className:"h-5 w-5"}),(0,no.jsx)("span",{className:"sr-only",children:"Close"})]})]}),l>0&&(0,no.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,no.jsxs)("span",{className:"text-sm text-muted-foreground",children:[l," unread notification",l!==1?"no":""]}),(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:o,className:"text-sm",children:"Dismiss all"})]}),d.length>0?(0,no.jsx)($t,{className:"flex-1",children:(0,no.jsx)("div",{className:"divide-y",children:d.map(m=>(0,no.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,no.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:g(m.type)}),(0,no.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("p",{className:"font-medium",children:m.title}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("p",{className:"text-xs text-muted-foreground",children:m.time}),(0,no.jsx)(w,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>i?.(m.id),title:"Dismiss",children:(0,no.jsx)(Dt.Check,{className:"h-3 w-3"})})]})]}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,no.jsxs)(w,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,no.jsx)(Dt.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},m.id))})}):(0,no.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,no.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,no.jsx)(Dt.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,no.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,no.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Bt=le(require("@radix-ui/react-tabs"));function To({className:e,...t}){return(0,no.jsx)(Bt.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function Po({className:e,...t}){return(0,no.jsx)(Bt.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ro({className:e,...t}){return(0,no.jsx)(Bt.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var yt=le(require("react")),te=le(require("@radix-ui/react-dropdown-menu")),Jt=require("@radix-ui/react-icons");var Ao=te.Root,Io=te.Trigger;var Un=yt.forwardRef(({className:e,inset:t,children:a,...i},o)=>(0,no.jsxs)(te.SubTrigger,{ref:o,className:p("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[a,(0,no.jsx)(Jt.ChevronRightIcon,{className:"ml-auto"})]}));Un.displayName=te.SubTrigger.displayName;var Vn=yt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(te.SubContent,{ref:a,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Vn.displayName=te.SubContent.displayName;var ui=yt.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,no.jsx)(te.Portal,{children:(0,no.jsx)(te.Content,{ref:i,sideOffset:t,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));ui.displayName=te.Content.displayName;var gi=yt.forwardRef(({className:e,inset:t,...a},i)=>(0,no.jsx)(te.Item,{ref:i,className:p("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));gi.displayName=te.Item.displayName;var Hn=yt.forwardRef(({className:e,children:t,checked:a,...i},o)=>(0,no.jsxs)(te.CheckboxItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...i,children:[(0,no.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,no.jsx)(te.ItemIndicator,{children:(0,no.jsx)(Jt.CheckIcon,{className:"h-4 w-4"})})}),t]}));Hn.displayName=te.CheckboxItem.displayName;var Gn=yt.forwardRef(({className:e,children:t,...a},i)=>(0,no.jsxs)(te.RadioItem,{ref:i,className:p("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,no.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,no.jsx)(te.ItemIndicator,{children:(0,no.jsx)(Jt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Gn.displayName=te.RadioItem.displayName;var _n=yt.forwardRef(({className:e,inset:t,...a},i)=>(0,no.jsx)(te.Label,{ref:i,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));_n.displayName=te.Label.displayName;var $n=yt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(te.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));$n.displayName=te.Separator.displayName;var Wn=({className:e,...t})=>(0,no.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});Wn.displayName="DropdownMenuShortcut";function Ba({activeTab:e,onTabChange:t,tabOptions:a,className:i="",maxWidth:o="700px",gridCols:n=6}){let d=a.find(l=>l.value===e);return(0,$e.jsxs)(Ya.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,$e.jsx)("div",{className:"hidden lg:block",children:(0,$e.jsx)(To,{value:e,onValueChange:t,children:(0,$e.jsx)(Po,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:o,gridTemplateColumns:`repeat(${Math.min(n,a.length)}, minmax(0, 1fr))`},children:a.map(l=>(0,$e.jsx)(Ya.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,$e.jsx)(Ro,{value:l.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:l.label})},l.value))})})}),(0,$e.jsx)("div",{className:"lg:hidden",children:(0,$e.jsxs)(Ao,{children:[(0,$e.jsx)(Io,{asChild:!0,children:(0,$e.jsxs)(w,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[d?.label||"Select",(0,$e.jsx)(Dt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,$e.jsx)(ui,{align:"center",className:"w-[180px]",children:a.map(l=>(0,$e.jsx)(gi,{onClick:()=>t?.(l.value),className:`cursor-pointer ${e===l.value?"bg-accent":""}`,children:l.label},l.value))})]})})]})}function Mo({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:i,sidebarOpen:o=!0,className:n,activeTab:d="assistant",onTabChange:l,showTabs:g=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:c,actionIcon:u=(0,no.jsx)(Dt.Bot,{className:"zi-2 h-4 w-4"}),actionText:v="Action",onNotificationRemove:N,onRemoveAll:A,logo:O="/headerlogo.png",appName:y="Nuvia",tagline:F="Collaboration Platform"}){let[B,V]=(0,zi.useState)(!1),[Q,x]=(0,zi.useState)(t),I=Q.filter(C=>!C.read).length,$=C=>{x(z=>z.filter(ne=>ne.id!==C)),N?.(C)},L=()=>{x(C=>C.filter(z=>z.read)),A?.()};return(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${n||""}`,children:[(0,no.jsx)(w,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,no.jsx)(Dt.Menu,{className:"h-5 w-5"})}),(0,no.jsx)(w,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,no.jsx)(Dt.PanelLeft,{className:"h-5 w-5"})}),!o&&(0,no.jsxs)(Ya.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,no.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,no.jsx)("img",{src:O,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,no.jsxs)("div",{children:[(0,no.jsx)("h2",{className:"font-semibold text-sm",children:y}),(0,no.jsx)("p",{className:"text-xs text-muted-foreground",children:F})]})]}),(0,no.jsxs)("div",{className:"flex flex-1 items-center",children:[g&&(0,no.jsx)(Ba,{activeTab:d,onTabChange:l,tabOptions:m}),(0,no.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,no.jsx)(Ya.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,no.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,no.jsxs)(w,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:c,children:[u,v]})})}),(0,no.jsx)(Do,{}),(0,no.jsx)(Wt,{children:(0,no.jsxs)(Kt,{children:[(0,no.jsx)(qt,{asChild:!0,children:(0,no.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,no.jsxs)(w,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>V(!0),children:[(0,no.jsx)(Ya.motion.div,{animate:I>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:I>0?1/0:0,repeatDelay:3},children:(0,no.jsx)(Dt.Bell,{className:"h-5 w-5"})}),I>0&&(0,no.jsx)(Ya.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:I})]})})}),(0,no.jsx)(Mt,{children:"Notifications"})]})}),(0,no.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,no.jsxs)(sa,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,no.jsx)(mi,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,no.jsx)(la,{})]})})]})]})]}),(0,no.jsx)(ko,{notifications:Q,open:B,onClose:()=>V(!1),onNotificationRemove:$,onRemoveAll:L})]})}var Bo=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,no.jsx)(Dt.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Fo({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:i=[],currentBusinessUnit:o=Bo[0],onBusinessUnitChange:n,onSearch:d,businessUnits:l=Bo,activeTab:g,onTabChange:m,showTabs:c=!1,onActionClick:u,actionIcon:v,actionText:N="Action",onNotificationRemove:A,onRemoveAll:O,logo:y="/headerlogo.png",appName:F="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:V=!1}){let[Q,x]=(0,zi.useState)(!V),[I,$]=(0,zi.useState)(!1),[L,C]=(0,zi.useState)(o),z=ne=>{C(ne),n?.(ne)};return(0,no.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[I&&(0,no.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>$(!1)}),(0,no.jsx)("div",{className:"md:hidden",children:(0,no.jsx)(ci,{items:e,isOpen:I,isMobile:!0,onClose:()=>$(!1),currentBusinessUnit:L,onBusinessUnitChange:z,onSearch:d,logo:y,appName:F,tagline:B})}),(0,no.jsx)("div",{className:"hidden md:block",children:(0,no.jsx)(ci,{items:e,isOpen:Q,isMobile:!1,currentBusinessUnit:L,onBusinessUnitChange:z,onSearch:d,logo:y,appName:F,tagline:B})}),(0,no.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",Q?"md:pl-64":"md:pl-0"),children:[(0,no.jsx)(Mo,{title:a,notifications:i,onToggleSidebar:()=>x(!Q),onToggleMobileMenu:()=>$(!0),sidebarOpen:Q,activeTab:g,onTabChange:m,showTabs:c,onActionClick:u,actionIcon:v,actionText:N,onNotificationRemove:A,onRemoveAll:O,logo:y,appName:F,tagline:B}),(0,no.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var Lt=le(require("react"));var fe=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));fe.displayName="Card";var Kn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));Kn.displayName="CardHeader";var qn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));qn.displayName="CardTitle";var Jn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));Jn.displayName="CardDescription";var Xt=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("p-6 no-0",e),...t}));Xt.displayName="CardContent";var Xn=Lt.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,className:p("flex items-center p-6 no-0",e),...t}));Xn.displayName="CardFooter";var zo=le(require("react")),Ee=zo.forwardRef(({className:e,...t},a)=>(0,no.jsx)("textarea",{className:p("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ee.displayName="Textarea";var ae=le(require("@radix-ui/react-select")),Pt=le(require("react")),Ne=ae.Root;var Ae=ae.Value,be=Pt.forwardRef(({children:e,className:t,...a},i)=>(0,no.jsxs)(ae.Trigger,{className:p("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:i,...a,children:[e,(0,no.jsx)(ae.Icon,{asChild:!0,children:(0,no.jsx)(Dt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));be.displayName=ae.Trigger.displayName;var Oo=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,no.jsx)(Dt.ChevronUp,{className:"h-4 w-4"})}));Oo.displayName=ae.ScrollUpButton.displayName;var Uo=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,no.jsx)(Dt.ChevronDown,{className:"h-4 w-4"})}));Uo.displayName=ae.ScrollDownButton.displayName;var he=Pt.forwardRef(({children:e,className:t,position:a="popper",...i},o)=>(0,no.jsx)(ae.Portal,{children:(0,no.jsxs)(ae.Content,{className:p("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:o,...i,children:[(0,no.jsx)(Oo,{}),(0,no.jsx)(ae.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,no.jsx)(Uo,{})]})}));he.displayName=ae.Content.displayName;var Yn=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Yn.displayName=ae.Label.displayName;var _=Pt.forwardRef(({children:e,className:t,...a},i)=>(0,no.jsxs)(ae.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:i,...a,children:[(0,no.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,no.jsx)(ae.ItemIndicator,{children:(0,no.jsx)(Dt.Check,{className:"h-4 w-4"})})}),(0,no.jsx)(ae.ItemText,{children:e})]}));_.displayName=ae.Item.displayName;var Qn=Pt.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ae.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Qn.displayName=ae.Separator.displayName;var Z=le(require("react"));var Vo=(e=768)=>{let[t,a]=(0,zi.useState)(!1);return(0,zi.useEffect)(()=>{let i=()=>{a(window.innerWidth<e)};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e]),t};var Ho=le(require("react")),bi=le(require("@radix-ui/react-separator"));var hi=Ho.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...i},o)=>(0,no.jsx)(bi.Root,{ref:o,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));hi.displayName=bi.Root.displayName;var ca=le(require("react")),ze=le(require("@radix-ui/react-dialog"));var Wo=ze.Root;var Zn=ze.Portal,Ko=ca.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ze.Overlay,{className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));Ko.displayName=ze.Overlay.displayName;var es=(0,$o.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-no data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),xi=ca.forwardRef(({side:e="right",className:t,children:a,...i},o)=>(0,no.jsxs)(Zn,{children:[(0,no.jsx)(Ko,{}),(0,no.jsxs)(ze.Content,{ref:o,className:p(es({side:e}),t),...i,children:[(0,no.jsxs)(ze.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,no.jsx)(Jt.Cross2Icon,{className:"h-4 w-4"}),(0,no.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));xi.displayName=ze.Content.displayName;var ts=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col space-y-2 text-center sm:text-left",e),...t});ts.displayName="SheetHeader";var as=({className:e,...t})=>(0,no.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});as.displayName="SheetFooter";var is=ca.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ze.Title,{ref:a,className:p("text-lg font-semibold text-foreground",e),...t}));is.displayName=ze.Title.displayName;var os=ca.forwardRef(({className:e,...t},a)=>(0,no.jsx)(ze.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));os.displayName=ze.Description.displayName;function yi({className:e,...t}){return(0,no.jsx)("div",{className:p("animate-pulse rounded-md bg-primary/10",e),...t})}var rs="sidebar:state",ns=60*60*24*7,ss="16rem",ls="18rem",ds="3rem",cs="b",Yo=Z.createContext(null);function za(){let e=Z.useContext(Yo);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var wi=Z.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:i,style:o,children:n,...d},l)=>{let g=Vo(),[m,c]=Z.useState(!1),[u,v]=Z.useState(e),N=t??u,A=Z.useCallback(B=>{if(a)return a?.(typeof B=="function"?B(N):B);v(B),document.cookie=`${rs}=${N}; path=/; max-age=${ns}`},[a,N]),O=Z.useCallback(()=>g?c(B=>!B):A(B=>!B),[g,A,c]);Z.useEffect(()=>{let B=V=>{V.key===cs&&(V.metaKey||V.ctrlKey)&&(V.preventDefault(),O())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[O]);let y=N?"expanded":"collapsed",F=Z.useMemo(()=>({state:y,open:N,setOpen:A,isMobile:g,openMobile:m,setOpenMobile:c,toggleSidebar:O}),[y,N,A,g,m,c,O]);return(0,no.jsx)(Yo.Provider,{value:F,children:(0,no.jsx)(Wt,{delayDuration:0,children:(0,no.jsx)("div",{style:{"--sidebar-width":ss,"--sidebar-width-icon":ds,...o},className:p("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:l,...d,children:n})})})});wi.displayName="SidebarProvider";var ms=Z.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:i,children:o,...n},d)=>{let{isMobile:l,state:g,openMobile:m,setOpenMobile:c}=za();return a==="none"?(0,no.jsx)("div",{className:p("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:d,...n,children:o}):l?(0,no.jsx)(Wo,{open:m,onOpenChange:c,...n,children:(0,no.jsx)(xi,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":ls},side:e,children:(0,no.jsx)("div",{className:"flex h-full w-full flex-col",children:o})})}):(0,no.jsxs)("div",{ref:d,className:"group peer hidden md:block text-sidebar-foreground","data-state":g,"data-collapsible":g==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,no.jsx)("div",{className:p("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,no.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-no group-data-[side=right]:border-l",i),...n,children:(0,no.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});ms.displayName="Sidebar";var ps=Z.forwardRef(({className:e,onClick:t,...a},i)=>{let{toggleSidebar:o}=za();return(0,no.jsxs)(w,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("h-7 w-7",e),onClick:n=>{t?.(n),o()},...a,children:[(0,no.jsx)(Dt.PanelLeft,{}),(0,no.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});ps.displayName="SidebarTrigger";var us=Z.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:i}=za();return(0,no.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:p("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});us.displayName="SidebarRail";var gs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));gs.displayName="SidebarInset";var fs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)(H,{ref:a,"data-sidebar":"input",className:p("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));fs.displayName="SidebarInput";var vs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));vs.displayName="SidebarHeader";var bs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));bs.displayName="SidebarFooter";var hs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)(hi,{ref:a,"data-sidebar":"separator",className:p("mx-2 w-auto bg-sidebar-border",e),...t}));hs.displayName="SidebarSeparator";var xs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));xs.displayName="SidebarContent";var ys=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex w-full min-w-0 flex-col p-2",e),...t}));ys.displayName="SidebarGroup";var ws=Z.forwardRef(({className:e,asChild:t=!1,...a},i)=>(0,no.jsx)(t?so.Slot:"div",{ref:i,"data-sidebar":"group-label",className:p("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ws.displayName="SidebarGroupLabel";var Ns=Z.forwardRef(({className:e,asChild:t=!1,...a},i)=>(0,no.jsx)(t?so.Slot:"button",{ref:i,"data-sidebar":"group-action",className:p("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));Ns.displayName="SidebarGroupAction";var Ss=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("w-full text-sm",e),...t}));Ss.displayName="SidebarGroupContent";var Cs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("ul",{ref:a,"data-sidebar":"menu",className:p("flex w-full min-w-0 flex-col gap-1",e),...t}));Cs.displayName="SidebarMenu";var Ds=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));Ds.displayName="SidebarMenuItem";var ks=(0,ro.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ts=Z.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:i="default",tooltip:o,className:n,...d},l)=>{let g=e?so.Slot:"button",{isMobile:m,state:c}=za(),u=(0,no.jsx)(g,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:p(ks({variant:a,size:i}),n),...d});return o?(typeof o=="string"&&(o={children:o}),(0,no.jsxs)(Kt,{children:[(0,no.jsx)(qt,{asChild:!0,children:u}),(0,no.jsx)(Mt,{side:"right",align:"center",hidden:c!=="collapsed"||m,...o})]})):u});Ts.displayName="SidebarMenuButton";var Ps=Z.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...i},o)=>(0,no.jsx)(t?so.Slot:"button",{ref:o,"data-sidebar":"menu-action",className:p("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i}));Ps.displayName="SidebarMenuAction";var Rs=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Rs.displayName="SidebarMenuBadge";var As=Z.forwardRef(({className:e,showIcon:t=!1,...a},i)=>{let o=Z.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,no.jsxs)("div",{ref:i,"data-sidebar":"menu-skeleton",className:p("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,no.jsx)(yi,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,no.jsx)(yi,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});As.displayName="SidebarMenuSkeleton";var Is=Z.forwardRef(({className:e,...t},a)=>(0,no.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:p("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Is.displayName="SidebarMenuSub";var Es=Z.forwardRef(({...e},t)=>(0,no.jsx)("li",{ref:t,...e}));Es.displayName="SidebarMenuSubItem";var Ms=Z.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:i,...o},n)=>(0,no.jsx)(e?so.Slot:"a",{ref:n,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...o}));Ms.displayName="SidebarMenuSubButton";var Qo=({projects:e,epics:t,sprints:a,currentView:i,onUpdateProject:o,onDeleteProject:n,onAddProject:d,onUpdateEpic:l,onDeleteEpic:g,onAddEpic:m,onAddSprint:c,onUpdateSprint:u,onDeleteSprint:v,onViewChange:N,mobileMenuOpen:A,onToggleMobileMenu:O})=>{let[y,F]=(0,zi.useState)(null),[B,V]=(0,zi.useState)(null),[Q,x]=(0,zi.useState)(null),[I,$]=(0,zi.useState)(null),[L,C]=(0,zi.useState)({name:"",description:""}),[z,ne]=(0,zi.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[T,Se]=(0,zi.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[S,oe]=(0,zi.useState)(!1),[f,K]=(0,zi.useState)(!1),[re,Ue]=(0,zi.useState)({name:"",description:""}),[Ce,me]=(0,zi.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),Ge=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],ye=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],Ye=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],ct=b=>{V(b.id),C({name:b.name,description:b.description||""})},G=()=>{B&&L.name.trim()&&(o(B,{name:L.name.trim(),description:L.description.trim()}),V(null))},ce=()=>{V(null),C({name:"",description:""})},Te=()=>{re.name.trim()&&(d({name:re.name.trim(),description:re.description.trim(),isSelected:!1}),Ue({name:"",description:""}),oe(!1))},Ve=b=>{o(b,{isSelected:!0})},vt=b=>{x(b.id),ne({name:b.name,description:b.description||"",color:b.color,confidence:b.confidence,phase:b.phase,startDate:b.startDate.toISOString().split("T")[0],endDate:b.endDate.toISOString().split("T")[0],progress:b.progress})},It=()=>{Q&&z.name.trim()&&(l(Q,{name:z.name.trim(),description:z.description.trim(),color:z.color,confidence:z.confidence,phase:z.phase,startDate:new Date(z.startDate),endDate:new Date(z.endDate),progress:z.progress}),x(null))},bt=()=>{x(null),ne({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},Qa=b=>{$(b.id),Se({name:b.name,description:b.description||"",startDate:b.startDate.toISOString().split("T")[0],endDate:b.endDate.toISOString().split("T")[0],isActive:b.isActive})},Za=()=>{I&&T.name.trim()&&(u(I,{name:T.name.trim(),description:T.description.trim(),startDate:new Date(T.startDate),endDate:new Date(T.endDate),isActive:T.isActive}),$(null))},ua=()=>{$(null),Se({name:"",description:"",startDate:"",endDate:"",isActive:!1})},ei=()=>{Ce.name.trim()&&(c({name:Ce.name.trim(),description:Ce.description.trim(),startDate:new Date(Ce.startDate),endDate:new Date(Ce.endDate),isActive:Ce.isActive,isSelected:!1}),me({name:"",description:"",startDate:"",endDate:"",isActive:!1}),K(!1))},ga=b=>{u(b,{isSelected:!0})},fa=b=>b.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),ta=b=>{let k=ye.find(se=>se.value===b);return k?{label:k.label,color:k.color}:{label:"Medium",color:"text-warning"}},va=b=>{let k=Ye.find(se=>se.value===b);return k?{label:k.label,color:k.color}:{label:"Phase 1",color:"text-primary"}};return(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${A?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,no.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,no.jsxs)("button",{onClick:()=>{N("kanban"),F(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[(0,no.jsx)(Dt.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,no.jsxs)("button",{onClick:()=>{N("planning"),F(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,no.jsx)(Dt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,no.jsxs)("button",{onClick:()=>F(y==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${y==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,no.jsx)(Dt.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,no.jsxs)("button",{onClick:()=>{N("epics"),F(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,no.jsx)(Dt.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,no.jsxs)("button",{onClick:()=>F(y==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${y==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,no.jsx)(Dt.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,no.jsxs)("button",{onClick:()=>{N("files"),F(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,no.jsx)(Dt.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,no.jsxs)("button",{onClick:()=>{N("tasks"),F(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${i==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,no.jsx)(Dt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,no.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),A&&(0,no.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:O}),y&&(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>F(null)}),(0,no.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,no.jsxs)("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[(0,no.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[y==="projects"&&"Projects",y==="epics"&&"Manage Epics",y==="sprints"&&"Manage Sprints",y==="files"&&"Files"]}),(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>F(null),children:(0,no.jsx)(Dt.X,{className:"h-4 w-4"})})]}),(0,no.jsxs)("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[y==="projects"&&(0,no.jsx)(fe,{className:"p-3",children:(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,no.jsxs)(w,{size:"sm",onClick:()=>oe(!0),className:"gap-1",children:[(0,no.jsx)(Dt.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),S&&(0,no.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,no.jsx)(H,{value:re.name,onChange:b=>Ue(k=>({...k,name:b.target.value})),placeholder:"Project name",className:"text-sm"}),(0,no.jsx)(Ee,{value:re.description,onChange:b=>Ue(k=>({...k,description:b.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:Te,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:()=>oe(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,no.jsx)("div",{className:"space-y-2",children:e.map(b=>(0,no.jsx)("div",{className:"border rounded p-2",children:B===b.id?(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(H,{value:L.name,onChange:k=>C(se=>({...se,name:k.target.value})),placeholder:"Project name",className:"text-sm"}),(0,no.jsx)(Ee,{value:L.description,onChange:k=>C(se=>({...se,description:k.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:G,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:ce,className:"text-xs h-6",children:"Cancel"})]})]}):(0,no.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${b.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>Ve(b.id),children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,no.jsx)(Dt.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,no.jsx)("span",{className:"font-medium text-xs",children:b.name})]}),b.description&&(0,no.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:b.description}),(0,no.jsxs)("div",{className:"flex gap-1",onClick:k=>k.stopPropagation(),children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>ct(b),className:"h-5 px-1",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>n(b.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]})},b.id))})]})}),y==="epics"&&(0,no.jsx)(fe,{className:"p-3",children:(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,no.jsxs)(w,{size:"sm",onClick:m,className:"gap-1",children:[(0,no.jsx)(Dt.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,no.jsx)("div",{className:"space-y-4",children:t.map(b=>(0,no.jsx)("div",{className:"border rounded-lg p-3",children:Q===b.id?(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsx)(H,{value:z.name,onChange:k=>ne(se=>({...se,name:k.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,no.jsx)(Ee,{value:z.description,onChange:k=>ne(se=>({...se,description:k.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,no.jsx)("div",{className:"flex gap-1 flex-wrap",children:Ge.map(k=>(0,no.jsx)("button",{onClick:()=>ne(se=>({...se,color:k})),className:`w-6 h-6 rounded-full ${k} ${z.color===k?"ring-2 ring-ring":""}`},k))})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,no.jsxs)(Ne,{value:z.confidence,onValueChange:k=>ne(se=>({...se,confidence:k})),children:[(0,no.jsx)(be,{className:"h-8 text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:ye.map(k=>(0,no.jsx)(_,{value:k.value,children:(0,no.jsx)("span",{className:k.color,children:k.label})},k.value))})]})]}),(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,no.jsxs)(Ne,{value:z.phase.toString(),onValueChange:k=>ne(se=>({...se,phase:parseInt(k)})),children:[(0,no.jsx)(be,{className:"h-8 text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:Ye.map(k=>(0,no.jsx)(_,{value:k.value.toString(),children:(0,no.jsx)("span",{className:k.color,children:k.label})},k.value))})]})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,no.jsx)(H,{type:"date",value:z.startDate,onChange:k=>ne(se=>({...se,startDate:k.target.value})),className:"text-xs h-8"})]}),(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,no.jsx)(H,{type:"date",value:z.endDate,onChange:k=>ne(se=>({...se,endDate:k.target.value})),className:"text-xs h-8"})]})]}),(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,no.jsx)(H,{type:"number",min:"0",max:"100",value:z.progress,onChange:k=>ne(se=>({...se,progress:parseInt(k.target.value)||0})),className:"text-xs h-8"})]}),(0,no.jsxs)("div",{className:"flex gap-2",children:[(0,no.jsx)(w,{size:"sm",onClick:It,className:"text-xs",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:bt,className:"text-xs",children:"Cancel"})]})]}):(0,no.jsxs)("div",{className:`cursor-pointer p-2 rounded transition-colors ${b.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>l(b.id,{isSelected:!b.isSelected}),children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${b.color}`}),(0,no.jsx)("span",{className:"font-medium text-sm",children:b.name})]}),b.description&&(0,no.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:b.description}),(0,no.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,no.jsx)("span",{className:ta(b.confidence).color,children:ta(b.confidence).label})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,no.jsx)("span",{className:va(b.phase).color,children:va(b.phase).label})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,no.jsxs)("span",{className:"text-foreground",children:[fa(b.startDate)," - ",fa(b.endDate)]})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,no.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,no.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${b.progress}%`}})}),(0,no.jsxs)("span",{className:"text-foreground",children:[b.progress,"%"]})]})]})]}),(0,no.jsxs)("div",{className:"flex gap-1",onClick:k=>k.stopPropagation(),children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>vt(b),className:"h-6 px-2",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>g(b.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]})},b.id))})]})}),y==="sprints"&&(0,no.jsx)(fe,{className:"p-3",children:(0,no.jsxs)("div",{className:"space-y-3",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,no.jsxs)(w,{size:"sm",onClick:()=>K(!0),className:"gap-1",children:[(0,no.jsx)(Dt.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),f&&(0,no.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,no.jsx)(H,{value:Ce.name,onChange:b=>me(k=>({...k,name:b.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,no.jsx)(H,{type:"date",value:Ce.startDate,onChange:b=>me(k=>({...k,startDate:b.target.value})),className:"text-xs"}),(0,no.jsx)(H,{type:"date",value:Ce.endDate,onChange:b=>me(k=>({...k,endDate:b.target.value})),className:"text-xs"})]}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("input",{type:"checkbox",checked:Ce.isActive,onChange:b=>me(k=>({...k,isActive:b.target.checked})),className:"w-3 h-3"}),(0,no.jsx)("span",{className:"text-xs",children:"Active"})]}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:ei,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:()=>K(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,no.jsx)("div",{className:"space-y-2",children:a.map(b=>(0,no.jsx)("div",{className:"border rounded p-2",children:I===b.id?(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(H,{value:T.name,onChange:k=>Se(se=>({...se,name:k.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:b.id==="backlog"||b.id==="all-tasks"}),b.id!=="backlog"&&b.id!=="all-tasks"&&(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,no.jsx)(H,{type:"date",value:T.startDate,onChange:k=>Se(se=>({...se,startDate:k.target.value})),className:"text-xs"}),(0,no.jsx)(H,{type:"date",value:T.endDate,onChange:k=>Se(se=>({...se,endDate:k.target.value})),className:"text-xs"})]}),(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("input",{type:"checkbox",checked:T.isActive,onChange:k=>Se(se=>({...se,isActive:k.target.checked})),className:"w-3 h-3"}),(0,no.jsx)("span",{className:"text-xs",children:"Active"})]})]}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",onClick:Za,className:"text-xs h-6",children:"Save"}),(0,no.jsx)(w,{size:"sm",variant:"outline",onClick:ua,className:"text-xs h-6",children:"Cancel"})]})]}):(0,no.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${b.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>ga(b.id),children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,no.jsx)(Dt.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,no.jsx)("span",{className:"font-medium text-xs",children:b.name}),b.isActive&&(0,no.jsx)("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(b.id==="backlog"||b.id==="all-tasks")&&(0,no.jsx)("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),b.id!=="backlog"&&b.id!=="all-tasks"&&(0,no.jsxs)("p",{className:"text-xs text-muted-foreground mb-1",children:[b.startDate.toLocaleDateString()," - ",b.endDate.toLocaleDateString()]}),(0,no.jsxs)("div",{className:"flex gap-1",onClick:k=>k.stopPropagation(),children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>Qa(b),className:"h-5 px-1",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),b.id!=="backlog"&&b.id!=="all-tasks"&&(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>v(b.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]})},b.id))})]})})]})]})]})]})},Zo=e=>(0,no.jsx)(wi,{children:(0,no.jsxs)("div",{className:"flex w-full",children:[(0,no.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,no.jsx)(Qo,{...e})}),(0,no.jsx)("div",{className:"md:hidden",children:(0,no.jsx)(Qo,{...e})}),(0,no.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,no.jsx)("div",{className:"w-full",children:e.children})})]})});var er=({title:e,status:t,taskCount:a,children:i,onDrop:o,isCompact:n=!1})=>{let d=m=>{m.preventDefault()},l=m=>{m.preventDefault(),o(t)};return(0,no.jsxs)(fe,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 ${n?"lg:max-w-xs":""}`,onDragOver:d,onDrop:l,children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,no.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,no.jsx)(pe,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,no.jsx)("div",{className:"space-y-4 min-h-[200px]",children:i})]})};var ja=({task:e,epic:t,onDragStart:a,onTaskClick:i,isCompact:o=!1})=>{let n=c=>{a(e)},d=()=>{console.log("task clicked",e.title),i(e)},l=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},g=()=>{switch(e.type){case"story":return(0,no.jsx)(Dt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,no.jsx)(Dt.Bug,{className:"h-3 w-3"});case"spike":return(0,no.jsx)(Dt.Zap,{className:"h-3 w-3"});case"task":default:return(0,no.jsx)(Dt.AlertCircle,{className:"h-3 w-3"})}},m=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return o?(0,no.jsx)(fe,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:n,onClick:d,children:(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${m()}`,children:g()}),(0,no.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,no.jsxs)(fe,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:n,onClick:d,children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,no.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${m()}`,children:[g(),(0,no.jsx)("span",{className:"capitalize",children:e.type})]}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,no.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.points})]})]}),(0,no.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,no.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,no.jsxs)("div",{className:"flex items-center gap-1",children:[(0,no.jsx)(Dt.User,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:e.assignee})]})})]})};var tr=le(require("react")),Ni=le(require("@radix-ui/react-label"));var Bs=(0,ro.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),R=tr.forwardRef(({className:e,...t},a)=>(0,no.jsx)(Ni.Root,{ref:a,className:p(Bs(),e),...t}));R.displayName=Ni.Root.displayName;var Ot=le(require("react")),Qt=le(require("@radix-ui/react-toggle-group"));var or=le(require("react")),Si=le(require("@radix-ui/react-toggle"));var Ci=(0,ro.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ls=or.forwardRef(({className:e,variant:t,size:a,...i},o)=>(0,no.jsx)(Si.Root,{ref:o,className:p(Ci({variant:t,size:a,className:e})),...i}));Ls.displayName=Si.Root.displayName;var sr=Ot.createContext({size:"default",variant:"default"}),Ut=Ot.forwardRef(({className:e,variant:t,size:a,children:i,...o},n)=>(0,no.jsx)(Qt.Root,{ref:n,className:p("flex items-center justify-center gap-1",e),...o,children:(0,no.jsx)(sr.Provider,{value:{variant:t,size:a},children:i})}));Ut.displayName=Qt.Root.displayName;var Vt=Ot.forwardRef(({className:e,children:t,variant:a,size:i,...o},n)=>{let d=Ot.useContext(sr);return(0,no.jsx)(Qt.Item,{ref:n,className:p(Ci({variant:d.variant||a,size:d.size||i}),e),...o,children:t})});Vt.displayName=Qt.Item.displayName;var Fs=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Dt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Dt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Dt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Dt.Zap}],zs=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Ua=({isOpen:e,onClose:t,onAddTask:a,epics:i,sprints:o,assignees:n,defaultEpicId:d})=>{let[l,g]=(0,zi.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,zi.useEffect)(()=>{e&&d&&g(u=>({...u,epicId:d}))},[e,d]),(0,zi.useEffect)(()=>{e&&g({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:d||"",sprintId:"none",assignee:""})},[e]);let m=u=>{u.preventDefault(),l.title.trim()&&(a({title:l.title.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,points:l.points,epicId:l.epicId,sprintId:l.sprintId==="none"?void 0:l.sprintId,assignee:l.assignee.trim()||"Unassigned"}),g({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:d||"",sprintId:"none",assignee:""}),t())},c=(u,v)=>{g(N=>({...N,[u]:v}))};return(0,no.jsx)(Ze,{open:e,onOpenChange:t,children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Task"})}),(0,no.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"title",children:"Task Title"}),(0,no.jsx)(H,{id:"title",value:l.title,onChange:u=>c("title",u.target.value),placeholder:"Enter task title",required:!0})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:l.description,onChange:u=>c("description",u.target.value),placeholder:"Enter task description",rows:3})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Type"}),(0,no.jsx)(Ut,{type:"single",value:l.type,onValueChange:u=>u&&c("type",u),children:Fs.map(u=>{let v=u.icon;return(0,no.jsxs)(Vt,{value:u.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,no.jsx)(v,{className:"h-4 w-4"}),u.label]},u.value)})})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Priority"}),(0,no.jsx)(Ut,{type:"single",value:l.priority,onValueChange:u=>u&&c("priority",u),children:zs.map(u=>(0,no.jsx)(Vt,{value:u.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:u.label},u.value))})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"points",children:"Story Points"}),(0,no.jsx)(H,{id:"points",type:"number",min:"1",max:"100",value:l.points,onChange:u=>c("points",parseInt(u.target.value)||1),placeholder:"Enter story points",required:!0})]}),!d&&(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"epic",children:"Epic"}),(0,no.jsxs)(Ne,{value:l.epicId,onValueChange:u=>c("epicId",u),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select an epic"})}),(0,no.jsx)(he,{children:i.map(u=>(0,no.jsx)(_,{value:u.id,children:(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${u.color}`}),u.name]})},u.id))})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,no.jsxs)(Ne,{value:l.sprintId,onValueChange:u=>c("sprintId",u),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select a sprint"})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"none",children:"No Sprint"}),o.map(u=>(0,no.jsx)(_,{value:u.id,children:(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[u.name,u.isActive&&(0,no.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},u.id))]})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"sprint",children:"Assignee"}),(0,no.jsxs)(Ne,{value:l.assignee,onValueChange:u=>c("assignee",u),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select an Assignee"})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"none",children:"No Assignee"}),n.map(u=>(0,no.jsx)(_,{value:u.id,children:(0,no.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,no.jsxs)(ra,{children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var ki=({fieldName:e,value:t,label:a,multiline:i=!1,onSave:o,className:n="",disabled:d=!1})=>{let[l,g]=(0,zi.useState)(!1),[m,c]=(0,zi.useState)(""),u=()=>{d||(g(!0),c(t))},v=async()=>{m!==t&&await o(e,m),g(!1)},N=A=>{A.key==="Enter"&&!i||A.key==="Enter"&&A.ctrlKey&&i?v():A.key==="Escape"&&(g(!1),c(""))};return(0,no.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,no.jsx)(R,{children:a}),l?i?(0,no.jsx)(Ee,{value:m,onChange:A=>c(A.target.value),onBlur:v,onKeyDown:N,autoFocus:!0,rows:4,className:"resize-none"}):(0,no.jsx)(H,{value:m,onChange:A=>c(A.target.value),onBlur:v,onKeyPress:N,autoFocus:!0,className:"text-lg font-medium"}):(0,no.jsxs)("div",{onClick:u,className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${i?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,no.jsx)("span",{className:i?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!d&&(0,no.jsx)(Dt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var cr=({comments:e,onAddComment:t})=>{let[a,i]=(0,zi.useState)(""),o=d=>d.split(" ").map(l=>l[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),i(""))};return(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)(Dt.MessageSquare,{className:"h-5 w-5"}),(0,no.jsx)(R,{className:"text-lg font-medium",children:"Comments"}),(0,no.jsx)(pe,{variant:"secondary",children:e.length})]}),(0,no.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(d=>(0,no.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,no.jsx)(sa,{className:"h-8 w-8 mt-1",children:(0,no.jsx)(la,{className:"text-xs bg-muted text-muted-foreground",children:o(d.author)})}),(0,no.jsxs)("div",{className:"flex-1",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,no.jsx)("span",{className:"font-medium text-sm",children:d.author}),(0,no.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.createdAt.toLocaleDateString()," no ",d.createdAt.toLocaleTimeString()]})]}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground",children:d.text})]})]},d.id))}),(0,no.jsxs)("div",{className:"flex gap-2",children:[(0,no.jsx)(Ee,{value:a,onChange:d=>i(d.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,no.jsx)(w,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,no.jsx)(Dt.Send,{className:"h-4 w-4"})})]})]})};var Ha=({label:e,value:t,onValueChange:a,options:i,showColor:o=!1,disabled:n=!1})=>{let[d,l]=(0,zi.useState)(!1),g=i.find(c=>c.value===t);return(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:e}),(0,no.jsxs)(Ne,{value:t,onValueChange:a,open:d,onOpenChange:c=>{n||l(c)},disabled:n,children:[(0,no.jsx)(be,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,no.jsxs)(pe,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!d),children:[o&&g?.color&&(0,no.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} zi-1`}),g?.label||"Select..."]})}),(0,no.jsx)(he,{children:i.map(c=>(0,no.jsx)(_,{value:c.value,children:o&&c.color?(0,no.jsxs)("div",{className:"flex items-center gap-2",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var pr=({label:e,value:t,onValueChange:a,options:i,placeholder:o="Search...",allowCustomValue:n=!1,disabled:d=!1})=>{let[l,g]=(0,zi.useState)(!1),[m,c]=(0,zi.useState)(""),u=i.find(y=>y.value===t),v=i.filter(y=>y.label.toLowerCase().includes(m.toLowerCase())),N=y=>{a(y),g(!1),c("")},A=()=>{n&&m.trim()&&!i.find(y=>y.value===m.trim())&&(a(m.trim()),g(!1),c(""))};return(0,no.jsxs)("div",{className:"space-y-1",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:e}),(0,no.jsxs)(Ne,{value:t,onValueChange:N,open:l,onOpenChange:y=>{d||g(y)},disabled:d,children:[(0,no.jsx)(be,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,no.jsx)(pe,{variant:"secondary",className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!d&&g(!l),children:u?.label||t||"Select..."})}),(0,no.jsxs)(he,{children:[(0,no.jsx)("div",{className:"p-2",children:(0,no.jsx)(H,{placeholder:o,value:m,onChange:y=>c(y.target.value),onKeyDown:y=>{y.key==="Enter"&&n&&A()},className:"mb-2"})}),v.map(y=>(0,no.jsx)(_,{value:y.value,children:y.label},y.value)),n&&m.trim()&&!v.find(y=>y.value===m.trim())&&(0,no.jsxs)(_,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};var js=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Dt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Dt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Dt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Dt.Zap}],Os=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Us=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],ur=({task:e,epics:t,sprints:a,lastUpdated:i,onUpdateTask:o,onClose:n,onDelete:d,isUpdating:l=!1,isDeleting:g=!1,deleteState:m="idle"})=>{let c=v=>v.split(" ").map(N=>N[0]).join("").toUpperCase(),u=()=>m==="loading"?(0,no.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,no.jsx)(Dt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,no.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,no.jsx)(Dt.Check,{className:"h-3 w-3"}),"Deleted"]}):m==="error"?(0,no.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,no.jsx)(Dt.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,no.jsxs)(w,{onClick:d,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||g,children:[(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,no.jsxs)("div",{className:"flex flex-col h-full",children:[(0,no.jsxs)("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Status"}),(0,no.jsx)(Ha,{label:"",value:e.status,onValueChange:v=>o("status",v),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Type"}),(0,no.jsx)(Ut,{type:"single",value:e.type,onValueChange:v=>v&&o("type",v),className:"grid grid-cols-2 gap-1",disabled:l,children:js.map(v=>{let N=v.icon;return(0,no.jsxs)(Vt,{value:v.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[(0,no.jsx)(N,{className:"h-3 w-3"}),v.label]},v.value)})})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,no.jsx)(Ut,{type:"single",value:e.priority,onValueChange:v=>v&&o("priority",v),className:"grid grid-cols-3 gap-1",disabled:l,children:Os.map(v=>(0,no.jsx)(Vt,{value:v.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:v.label},v.value))})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,no.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:v=>o("points",v.target.value),className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,no.jsx)(Ha,{label:"",value:e.epicId,onValueChange:v=>o("epicId",v),options:(t||[]).map(v=>({value:v.id,label:v.name,color:v.color})),showColor:!0,disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,no.jsx)(Ha,{label:"",value:e.sprintId||"none",onValueChange:v=>o("sprintId",v==="none"?"":v),options:[{value:"none",label:"No Sprint"},...(a||[]).map(v=>({value:v.id,label:`${v.name}${v.isActive?" (Active)":""}`}))],disabled:l})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,no.jsx)(pr,{label:"",value:e.assignee,onValueChange:v=>o("assignee",v),options:Us,placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,no.jsxs)("div",{className:"mt-auto no-4 space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(w,{onClick:n,variant:"outline",className:"w-full h-8 text-xs",disabled:l||g,children:"Close"}),u()]}),(0,no.jsxs)("div",{className:"no-4 border-t border-border space-y-2",children:[(0,no.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,no.jsx)(Dt.User,{className:"h-3 w-3"}),(0,no.jsx)("span",{children:"System"})]})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,no.jsx)(Dt.Calendar,{className:"h-3 w-3"}),(0,no.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,no.jsx)(Dt.Clock,{className:"h-3 w-3"}),(0,no.jsxs)("span",{children:[i.toLocaleDateString()," no ",i.toLocaleTimeString()]})]})]})]})]})]})};var gr=({isOpen:e,onClose:t,task:a,epics:i,sprints:o,onUpdateTask:n,onDeleteTask:d})=>{let[l,g]=(0,zi.useState)(new Date),[m,c]=(0,zi.useState)("idle"),[u,v]=(0,zi.useState)("idle"),[N,A]=(0,zi.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),O=async(I,$)=>{if($!==a[I]){c("loading");try{await n(a.id,{[I]:$}),g(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},y=async(I,$)=>{if($!==a[I]){c("loading");try{await n(a.id,{[I]:$}),g(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},F=I=>{let $={id:Date.now().toString(),text:I,author:"Current User",createdAt:new Date};A([...N,$])},B=async()=>{v("loading");try{await d(a.id),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},V=m!=="loading"&&u!=="loading",Q=()=>{V&&t()},x=()=>m==="loading"?(0,no.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,no.jsx)(Dt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,no.jsx)("span",{children:"Updating..."})]}):m==="success"?(0,no.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,no.jsx)(Dt.Check,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:"Updated successfully"})]}):m==="error"?(0,no.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,no.jsx)(Dt.X,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:"Update failed"})]}):null;return(0,no.jsx)(Ze,{open:e,onOpenChange:Q,children:(0,no.jsxs)(Ke,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,no.jsxs)(qe,{children:[(0,no.jsx)(Je,{className:"sr-only",children:a.title}),(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)("div",{className:"flex-1",children:x()}),!V&&(0,no.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,no.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,no.jsx)(ki,{fieldName:"title",value:a.title,label:"",onSave:O,className:"border-b border-border pb-3",disabled:m==="loading"}),(0,no.jsx)(ki,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:O,disabled:m==="loading"}),(0,no.jsx)(cr,{comments:N,onAddComment:F})]}),(0,no.jsx)(ur,{task:a,epics:i,sprints:o,lastUpdated:l,onUpdateTask:y,onClose:Q,onDelete:B,isUpdating:m==="loading",isDeleting:u==="loading",deleteState:u})]})]})})};var Ga=({isOpen:e,onClose:t,onAddEpic:a})=>{let[i,o]=(0,zi.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),n=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],d=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],g=c=>{c.preventDefault(),i.name.trim()&&(a({name:i.name.trim(),description:i.description.trim(),color:i.color,confidence:i.confidence,phase:i.phase,startDate:new Date(i.startDate),endDate:new Date(i.endDate),progress:i.progress,isSelected:!0}),o({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},m=(c,u)=>{o(v=>({...v,[c]:u}))};return(0,no.jsx)(Ze,{open:e,onOpenChange:t,children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Epic"})}),(0,no.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"name",children:"Epic Name"}),(0,no.jsx)(H,{id:"name",value:i.name,onChange:c=>m("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:i.description,onChange:c=>m("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Color"}),(0,no.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(c=>(0,no.jsx)("button",{type:"button",onClick:()=>m("color",c),className:`w-8 h-8 rounded-full ${c} ${i.color===c?"ring-2 ring-gray-400":""}`},c))})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Confidence"}),(0,no.jsxs)(Ne,{value:i.confidence,onValueChange:c=>m("confidence",c),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:d.map(c=>(0,no.jsx)(_,{value:c.value,children:c.label},c.value))})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Phase"}),(0,no.jsxs)(Ne,{value:i.phase.toString(),onValueChange:c=>m("phase",parseInt(c)),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:l.map(c=>(0,no.jsx)(_,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Start Date"}),(0,no.jsx)(H,{type:"date",value:i.startDate,onChange:c=>m("startDate",c.target.value)})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"End Date"}),(0,no.jsx)(H,{type:"date",value:i.endDate,onChange:c=>m("endDate",c.target.value)})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Progress (%)"}),(0,no.jsx)(H,{type:"number",min:"0",max:"100",value:i.progress,onChange:c=>m("progress",parseInt(c.target.value)||0)})]}),(0,no.jsxs)(ra,{children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var _a=require("react-icons/fa");function gt({title:e,description:t,badge:a,primaryAction:i,secondaryAction:o,gradient:n,children:d,className:l}){let[g,m]=Pa(`hero-section-minimized-${e.replace(/\no+/g,"-").toLowerCase()}`,!o&&!t),c=!o&&!t||g;return(0,no.jsxs)(Ya.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${l||""}`,children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,no.jsx)(pe,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,no.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,no.jsxs)("div",{className:"flex items-center gap-3",children:[c&&i&&(0,no.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),(o||t)&&(0,no.jsx)("button",{"aria-label":g?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>m(!g),style:{lineHeight:0},children:g?(0,no.jsx)(_a.FaChevronDown,{size:22}):(0,no.jsx)(_a.FaChevronUp,{size:22})})]})]}),!c&&(0,no.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,no.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i&&(0,no.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:i.onClick,children:i.label}),o&&(0,no.jsx)(w,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:o.onClick,children:o.label})]})]}),d&&(0,no.jsx)("div",{className:"hidden lg:block",children:d})]})]})}var br=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:i=[],initialColleagues:o=[],initialProjects:n=[],onAddTask:d,onUpdateTask:l,onDeleteTask:g,onTaskClick:m,onAddEpic:c})=>{let[u,v]=(0,zi.useState)(e),[N,A]=(0,zi.useState)(t),[O,y]=(0,zi.useState)(a),[F,B]=(0,zi.useState)(!1),[V,Q]=(0,zi.useState)(!1),[x,I]=(0,zi.useState)(null),[$,L]=(0,zi.useState)(null),[C,z]=(0,zi.useState)(i),[ne,T]=(0,zi.useState)(o),Se=N.filter(G=>!0).map(G=>G.id),S=O.find(G=>G.isSelected);Se.push("no-epic"),(0,zi.useEffect)(()=>{v(e)},[e]),(0,zi.useEffect)(()=>{A(t)},[t]),(0,zi.useEffect)(()=>{y(a)},[a]);let oe=u.filter(G=>{let ce=Se.includes(G.epicId)||!G.epicId;return!S||S.id==="all-tasks"?ce:S.id==="backlog"?ce&&!G.sprintId:ce&&G.sprintId===S.id}),f=G=>oe.filter(ce=>ce.status===G),K=G=>{let ce={};return N.forEach(Te=>{ce[Te.id]=G.filter(Ve=>Ve.epicId===Te.id)}),ce["no-epic"]=G.filter(Te=>!Te.epicId),ce},re=G=>{L(G)},Ue=G=>{$&&(v(ce=>ce.map(Te=>Te.id===$.id?{...Te,status:G}:Te)),l?.($.id,{status:G}),L(null))},Ce=G=>{let ce={...G,id:Date.now().toString(),createdAt:new Date};v(Te=>[...Te,ce]),d?.(G)},me=async(G,ce)=>{v(Te=>Te.map(Ve=>Ve.id===G?{...Ve,...ce}:Ve)),l&&await l(G,ce)},Ge=async G=>{v(ce=>ce.filter(Te=>Te.id!==G)),x?.id===G&&I(null),g&&await g(G)},ye=G=>{let ce={...G,id:Date.now().toString(),isSelected:!0};A(Te=>[...Te,ce]),c?.(G)},Ye=G=>{I(G),m?.(G)};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-no from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>B(!0)},secondaryAction:{label:"Add epic",onClick:()=>Q(!0)}}),(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsxs)("div",{className:"w-full",children:[(0,no.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(G=>{let ce=f(G.status),Te=K(ce);return(0,no.jsx)(er,{title:G.title,status:G.status,taskCount:ce.length,onDrop:Ue,isCompact:G.status==="done",children:Se.map(Ve=>{let vt=N.find(bt=>bt.id===Ve),It=Te[Ve]||[];return It.length===0?null:(0,no.jsxs)("div",{className:"mb-6",children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,no.jsx)("div",{className:`w-3 h-3 rounded-full ${vt?.color}`}),(0,no.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:vt?.name||"No Epic"}),(0,no.jsx)(pe,{variant:"secondary",className:"text-xs",children:It.length})]})," ",(0,no.jsx)("div",{className:"space-y-3",children:It.map(bt=>(0,no.jsx)(ja,{task:bt,epic:vt,onDragStart:re,onTaskClick:Ye,isCompact:G.status==="done"},bt.id))})]},Ve)})},G.id)})}),(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(Ua,{isOpen:F,onClose:()=>B(!1),onAddTask:Ce,assignees:[...ne,...C],epics:N,sprints:O}),(0,no.jsx)(Ga,{isOpen:V,onClose:()=>Q(!1),onAddEpic:ye}),x&&(0,no.jsx)(gr,{isOpen:!!x,onClose:()=>I(null),task:x,epics:N,sprints:O,onUpdateTask:me,onDeleteTask:Ge})]})]})})]})};var hr=({tasks:e,epics:t,sprints:a,onUpdateTask:i,onTaskClick:o,onAddTaskToEpic:n,onAddEpic:d,onUpdateEpic:l,onDeleteEpic:g})=>{let[m,c]=(0,$a.useState)(null),[u,v]=(0,$a.useState)(null),[N,A]=(0,$a.useState)({}),O=C=>{c(C)},y=C=>{C.preventDefault()},F=(C,z)=>{C.preventDefault(),m&&m.epicId!==z&&(i(m.id,{epicId:z}),c(null))},B=C=>e.filter(z=>z.epicId===C),V=C=>{v(C.id),A({name:C.name,description:C.description,confidence:C.confidence,phase:C.phase,progress:C.progress})},Q=()=>{u&&N.name&&(l(u,N),v(null),A({}))},x=()=>{v(null),A({})},I=C=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&g(C)},$=C=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[C]||`Phase ${C}`,L=C=>{switch(C){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-no from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:d}}),(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsx)("div",{className:"w-full",children:(0,no.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(C=>{let z=B(C.id),ne=z.reduce((T,Se)=>T+Se.points,0);return(0,no.jsxs)(fe,{className:`flex flex-col ${u===C.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:y,onDrop:T=>F(T,C.id),children:[(0,no.jsx)("div",{className:"p-4 border-b border-border",children:u===C.id?(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between",children:[(0,no.jsx)(H,{value:N.name||"",onChange:T=>A({...N,name:T.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,no.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:Q,className:"p-1 h-8 w-8",children:(0,no.jsx)(Dt.Check,{className:"h-4 w-4"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:x,className:"p-1 h-8 w-8",children:(0,no.jsx)(Dt.X,{className:"h-4 w-4"})})]})]}),(0,no.jsx)(Ee,{value:N.description||"",onChange:T=>A({...N,description:T.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,no.jsxs)(Ne,{value:N.confidence||C.confidence,onValueChange:T=>A({...N,confidence:T}),children:[(0,no.jsx)(be,{className:"text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"low",children:"Low"}),(0,no.jsx)(_,{value:"medium",children:"Medium"}),(0,no.jsx)(_,{value:"high",children:"High"})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,no.jsxs)(Ne,{value:N.phase?.toString()||C.phase.toString(),onValueChange:T=>A({...N,phase:parseInt(T)}),children:[(0,no.jsx)(be,{className:"text-xs",children:(0,no.jsx)(Ae,{})}),(0,no.jsx)(he,{children:[1,2,3,4,5,6,7,8,9].map(T=>(0,no.jsxs)(_,{value:T.toString(),children:["Phase ",T]},T))})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,no.jsx)(H,{type:"number",min:"0",max:"100",value:N.progress||C.progress,onChange:T=>A({...N,progress:parseInt(T.target.value)||0}),className:"text-xs"})]})]}):(0,no.jsxs)(no.Fragment,{children:[(0,no.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,no.jsx)("div",{className:`w-4 h-4 rounded-full ${C.color}`}),(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:C.name}),(0,no.jsxs)("div",{className:"flex gap-1",children:[(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>V(C),className:"p-1 h-8 w-8",children:(0,no.jsx)(Dt.Edit2,{className:"h-3 w-3"})}),(0,no.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>I(C.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,no.jsx)(Dt.Trash2,{className:"h-3 w-3"})})]})]}),(0,no.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,no.jsxs)(pe,{className:`text-xs ${L(C.confidence)}`,children:[C.confidence," confidence"]}),(0,no.jsxs)(pe,{variant:"outline",className:"text-xs",children:["Phase ",C.phase]}),(0,no.jsxs)(pe,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[z.length," tasks"]}),(0,no.jsxs)(pe,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ne," pts"]})]}),C.description&&(0,no.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:C.description}),(0,no.jsxs)("div",{className:"mb-3",children:[(0,no.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,no.jsx)("span",{className:"select-none",children:"Progress"}),(0,no.jsxs)("span",{className:"select-none",children:[C.progress,"%"]})]}),(0,no.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,no.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${C.progress}%`}})})]}),(0,no.jsxs)(w,{onClick:()=>n(C.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,no.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,no.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:z.length===0?(0,no.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,no.jsx)(Dt.Move,{className:"h-8 w-8 mb-2"}),(0,no.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):z.map(T=>(0,no.jsx)(ja,{task:T,epic:C,onDragStart:O,onTaskClick:o,isCompact:!0},T.id))})})]},C.id)})})})})]})};var xr=require("react-day-picker");function Wa({className:e,classNames:t,showOutsideDays:a=!0,...i}){return(0,no.jsx)(xr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center no-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:p(ya({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:p("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-no-md",i.mode==="range"?"[&:has(>.day-range-end)]:rounded-no-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-no-md":"[&:has([aria-selected])]:rounded-md"),day:p(ya({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...i})}Wa.displayName="Calendar";var wr=le(require("react")),ft=le(require("@radix-ui/react-popover"));var Ri=ft.Root,Ai=ft.Trigger;var Ka=wr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...i},o)=>(0,no.jsx)(ft.Portal,{children:(0,no.jsx)(ft.Content,{ref:o,align:t,sideOffset:a,className:p("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));Ka.displayName=ft.Content.displayName;var Ei=require("date-fns");var Sr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[i,o]=(0,zi.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),n=l=>{l.preventDefault(),!(!i.name||!i.startDate||!i.endDate)&&(a({name:i.name,description:i.description,startDate:i.startDate,endDate:i.endDate,isActive:i.isActive,isSelected:!1}),o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},d=()=>{o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,no.jsx)(Ze,{open:e,onOpenChange:d,children:(0,no.jsxs)(Ke,{className:"sm:max-w-md",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Sprint"})}),(0,no.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"name",children:"Sprint Name *"}),(0,no.jsx)(H,{id:"name",value:i.name,onChange:l=>o(g=>({...g,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:i.description,onChange:l=>o(g=>({...g,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"Start Date *"}),(0,no.jsxs)(Ri,{children:[(0,no.jsx)(Ai,{asChild:!0,children:(0,no.jsxs)(w,{variant:"outline",className:p("w-full justify-start text-left font-normal",!i.startDate&&"text-muted-foreground"),children:[(0,no.jsx)(Dt.CalendarIcon,{className:"zi-2 h-4 w-4"}),i.startDate?(0,Ei.format)(i.startDate,"PPP"):"Pick a date"]})}),(0,no.jsx)(Ka,{className:"w-auto p-0",align:"start",children:(0,no.jsx)(Wa,{mode:"single",selected:i.startDate,onSelect:l=>o(g=>({...g,startDate:l})),initialFocus:!0})})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsx)(R,{children:"End Date *"}),(0,no.jsxs)(Ri,{children:[(0,no.jsx)(Ai,{asChild:!0,children:(0,no.jsxs)(w,{variant:"outline",className:p("w-full justify-start text-left font-normal",!i.endDate&&"text-muted-foreground"),children:[(0,no.jsx)(Dt.CalendarIcon,{className:"zi-2 h-4 w-4"}),i.endDate?(0,Ei.format)(i.endDate,"PPP"):"Pick a date"]})}),(0,no.jsx)(Ka,{className:"w-auto p-0",align:"start",children:(0,no.jsx)(Wa,{mode:"single",selected:i.endDate,onSelect:l=>o(g=>({...g,endDate:l})),initialFocus:!0,disabled:l=>i.startDate?l<i.startDate:!1})})]})]})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"isActive",checked:i.isActive,onChange:l=>o(g=>({...g,isActive:l.target.checked})),className:"rounded border-gray-300"}),(0,no.jsx)(R,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,no.jsxs)("div",{className:"flex justify-end gap-3 no-4",children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:d,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",disabled:!i.name||!i.startDate||!i.endDate,children:"Add Sprint"})]})]})]})})};var Cr=({tasks:e,epics:t,sprints:a,onUpdateTask:i,onTaskClick:o,onAddSprint:n})=>{let[d,l]=(0,zi.useState)(["2"]),[g,m]=(0,zi.useState)(null),[c,u]=(0,zi.useState)(!1),[v,N]=(0,zi.useState)(null),[A,O]=(0,zi.useState)(e.filter(f=>!f.sprintId)),[y,F]=(0,zi.useState)(e.filter(f=>f.sprintId&&d.includes(f.sprintId))),[B,V]=(0,zi.useState)(a.filter(f=>f.id!=="backlog"&&f.id!=="all-tasks").sort((f,K)=>f.startDate.getTime()-K.startDate.getTime()));(0,zi.useEffect)(()=>{O(e.filter(f=>!f.sprintId)),F(e.filter(f=>f.sprintId&&d.includes(f.sprintId))),V(a.filter(f=>f.id!=="backlog"&&f.id!=="all-tasks").sort((f,K)=>f.startDate.getTime()-K.startDate.getTime()))},[e,a,d]);let Q=f=>t.find(K=>K.id===f),x=f=>a.find(K=>K.id===f),I=f=>{switch(f){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},$=f=>f.split(" ").map(K=>K[0]).join("").toUpperCase(),L=f=>{m(f)},C=f=>{f.preventDefault()},z=f=>{N(f)},ne=()=>{N(null)},T=(f,K)=>{f.preventDefault(),N(null),g&&(i(g.id,{sprintId:K==="backlog"?void 0:K}),m(null))},Se=f=>{f==="backlog"||f==="all-tasks"||l(K=>K.includes(f)?K.filter(re=>re!==f):[...K,f])},S=f=>{n(f),u(!1)},oe=({task:f,showSprint:K=!1})=>{let re=Q(f.epicId),Ue=f.sprintId?x(f.sprintId):null,[Ce,me]=(0,zi.useState)(!1),Ge=ct=>{ct.defaultPrevented||Ce||o(f)},ye=ct=>{me(!0),L(f)},Ye=()=>{me(!1)};return(0,no.jsx)(fe,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${Ce?"opacity-50 shadow-lg scale-105":""} ${g?.id===f.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:ye,onDragEnd:Ye,onClick:Ge,children:(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-start justify-between",children:[(0,no.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:f.title}),(0,no.jsx)(pe,{className:`text-xs select-none pointer-events-none ${I(f.priority)}`,children:f.priority[0].toUpperCase()})]}),(0,no.jsxs)("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[(0,no.jsxs)("div",{className:"flex items-center gap-1",children:[re&&(0,no.jsx)("div",{className:`w-2 h-2 rounded-full ${re.color}`}),(0,no.jsx)("span",{className:"text-muted-foreground truncate select-none",children:re?.name})]}),(0,no.jsx)("span",{className:"text-muted-foreground select-none",children:$(f.assignee)})]}),K&&Ue&&(0,no.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[(0,no.jsx)(Dt.Calendar,{className:"h-3 w-3"}),(0,no.jsx)("span",{className:"select-none",children:Ue.name})]})]})})};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-no from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>u(!0)}}),(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsxs)("div",{className:"w-full",children:[(0,no.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,no.jsx)("div",{className:"lg:col-span-1",children:(0,no.jsxs)(fe,{className:"p-4 h-full bg-card shadow-sm",onDragOver:C,onDragEnter:()=>z("backlog"),onDragLeave:ne,onDrop:f=>T(f,"backlog"),children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,no.jsx)(pe,{variant:"secondary",className:"bg-muted text-muted-foreground",children:A.length})]}),(0,no.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${v==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[A.map(f=>(0,no.jsx)(oe,{task:f},f.id)),A.length===0&&(0,no.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"})]})]})}),(0,no.jsx)("div",{className:"lg:col-span-3",children:(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsxs)(fe,{className:"p-4 bg-card shadow-sm",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,no.jsxs)(w,{onClick:()=>u(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,no.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:B.map(f=>(0,no.jsxs)(w,{variant:d.includes(f.id)?"default":"outline",size:"sm",onClick:()=>Se(f.id),className:"text-xs h-8",children:[f.name,f.isActive&&(0,no.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},f.id))})]}),(0,no.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(f=>B.find(K=>K.id===f)).filter(Boolean).sort((f,K)=>f.startDate.getTime()-K.startDate.getTime()).map(f=>{let K=y.filter(re=>re.sprintId===f.id);return(0,no.jsxs)(fe,{className:"p-4 bg-card shadow-sm",onDragOver:C,onDragEnter:()=>z(f.id),onDragLeave:ne,onDrop:re=>T(re,f.id),children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)("h3",{className:"font-semibold text-foreground select-none",children:f.name}),f.isActive&&(0,no.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,no.jsx)(pe,{variant:"secondary",className:"bg-muted text-muted-foreground",children:K.length})]}),(0,no.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${v===f.id?"border-primary bg-primary/10":"border-border"}`,children:[K.map(re=>(0,no.jsx)(oe,{task:re},re.id)),K.length===0&&(0,no.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},f.id)})})," "]})})]}),(0,no.jsx)(Sr,{isOpen:c,onClose:()=>u(!1),onAddSprint:S})]})})]})};var Vs=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Hs=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),Gs=e=>{let[t,a]=e.split(":"),i=new Date;return i.setHours(parseInt(t),parseInt(a)),i.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Mi=(e,t)=>{let a=new Date,i=new Date(e);if(t){let[o,n]=t.split(":");i.setHours(parseInt(o),parseInt(n))}return i<a},Bi=e=>{let t=new Date;return e.toDateString()===t.toDateString()},_s=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},$no=({colleagues:e,onAddReminder:t,open:a,setOpen:i})=>{let[o,n]=(0,zi.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[d,l]=(0,zi.useState)(!1),g=c=>{c.preventDefault();let u=e.find(N=>N?.id.toString()===o.colleagueId.toString());if(!u){console.error("No valid colleague selected"),l(!0);return}l(!1);let v={title:o.title,description:o.description,dueDate:new Date(o.dueDate),dueTime:o.dueTime||void 0,colleague:u,isCompleted:!1,isRecurring:o.isRecurring,recurrencePattern:o.isRecurring?o.recurrencePattern:void 0,recurrenceInterval:o.isRecurring?o.recurrenceInterval:void 0,priority:o.priority,reminderEnabled:o.reminderEnabled,reminderMinutes:o.reminderEnabled?o.reminderMinutes:void 0,tags:o.tags?o.tags.split(",").map(N=>N.trim()):void 0};t(v),i(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,zi.useEffect)(()=>{o.colleagueId&&l(!1)},[o.colleagueId]);let m=e.filter(Boolean);return(0,no.jsx)(Ze,{open:a,onOpenChange:i,children:(0,no.jsxs)(Ke,{className:"max-w-2xl",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Add New Reminder"})}),(0,no.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,no.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"title",children:"Title"}),(0,no.jsx)(H,{id:"title",value:o.title,onChange:c=>n({...o,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"description",children:"Description"}),(0,no.jsx)(Ee,{id:"description",value:o.description,onChange:c=>n({...o,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"dueDate",children:"Due Date"}),(0,no.jsx)(H,{id:"dueDate",type:"date",value:o.dueDate,onChange:c=>n({...o,dueDate:c.target.value}),required:!0})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,no.jsx)(H,{id:"dueTime",type:"time",value:o.dueTime,onChange:c=>n({...o,dueTime:c.target.value})})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{className:`${d?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,no.jsxs)(Ne,{value:o.colleagueId,onValueChange:c=>{n({...o,colleagueId:c})},required:!0,children:[(0,no.jsx)(be,{className:`${d?"text-destructive border-red-500":""}`,children:(0,no.jsx)(Ae,{className:`${d?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(c=>c?.id.toString()===o.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,no.jsx)(he,{children:m.map(c=>(0,no.jsx)(_,{value:c.id,children:c.name},c.id))})]}),d&&(0,no.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"isRecurring",checked:o.isRecurring,onChange:c=>n({...o,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,no.jsx)(R,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),o.isRecurring&&(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,no.jsxs)(Ne,{value:o.recurrencePattern,onValueChange:c=>n({...o,recurrencePattern:c}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"daily",children:"Daily"}),(0,no.jsx)(_,{value:"weekly",children:"Weekly"}),(0,no.jsx)(_,{value:"monthly",children:"Monthly"}),(0,no.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"recurrenceInterval",children:"Every"}),(0,no.jsx)(H,{id:"recurrenceInterval",type:"number",min:"1",value:o.recurrenceInterval,onChange:c=>n({...o,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,no.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),(0,no.jsx)(w,{type:"submit",children:"Add Reminder"})]})]})]})})},Ws=({reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:o})=>{let[n,d]=(0,zi.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),l=m=>{m.preventDefault();let c=t.find(u=>u?.id===n.colleagueId);if(!c){console.error("No valid colleague selected");return}a(e.id,{title:n.title,description:n.description,dueDate:new Date(n.dueDate),dueTime:n.dueTime||void 0,colleague:c,priority:n.priority,isRecurring:n.isRecurring,recurrencePattern:n.isRecurring?n.recurrencePattern:void 0,recurrenceInterval:n.isRecurring?n.recurrenceInterval:void 0,reminderEnabled:n.reminderEnabled,reminderMinutes:n.reminderEnabled?n.reminderMinutes:void 0,tags:n.tags?n.tags.split(",").map(u=>u.trim()):void 0}),o()},g=t.filter(Boolean);return(0,no.jsx)(Ze,{open:i,onOpenChange:o,children:(0,no.jsxs)(Ke,{className:"max-w-2xl",children:[(0,no.jsx)(qe,{children:(0,no.jsx)(Je,{children:"Edit Reminder"})}),(0,no.jsxs)("form",{onSubmit:l,className:"space-y-4",children:[(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-title",children:"Title"}),(0,no.jsx)(H,{id:"edit-title",value:n.title,onChange:m=>d({...n,title:m.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-priority",children:"Priority"}),(0,no.jsxs)(Ne,{value:n.priority,onValueChange:m=>d({...n,priority:m}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"low",children:"\u{1F7E2} Low"}),(0,no.jsx)(_,{value:"medium",children:"\u{1F7E1} Medium"}),(0,no.jsx)(_,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-description",children:"Description"}),(0,no.jsx)(Ee,{id:"edit-description",value:n.description,onChange:m=>d({...n,description:m.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,no.jsx)(H,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:m=>d({...n,dueDate:m.target.value}),required:!0})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,no.jsx)(H,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:m=>d({...n,dueTime:m.target.value})})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,no.jsxs)(Ne,{value:n.colleagueId,onValueChange:m=>d({...n,colleagueId:m}),required:!0,children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{placeholder:"Select a digital colleague"})}),(0,no.jsx)(he,{children:g.map(m=>(0,no.jsx)(_,{value:m.id,children:m.name},m.id))})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring,onChange:m=>d({...n,isRecurring:m.target.checked}),className:"rounded border-border"}),(0,no.jsx)(R,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),n.isRecurring&&(0,no.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,no.jsxs)(Ne,{value:n.recurrencePattern,onValueChange:m=>d({...n,recurrencePattern:m}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"daily",children:"Daily"}),(0,no.jsx)(_,{value:"weekly",children:"Weekly"}),(0,no.jsx)(_,{value:"monthly",children:"Monthly"}),(0,no.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,no.jsx)(H,{id:"edit-recurrenceInterval",type:"number",min:"1",value:n.recurrenceInterval,onChange:m=>d({...n,recurrenceInterval:parseInt(m.target.value)})})]})]})]}),(0,no.jsxs)("div",{className:"space-y-2",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,no.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:n.reminderEnabled,onChange:m=>d({...n,reminderEnabled:m.target.checked}),className:"rounded border-border"}),(0,no.jsx)(R,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),n.reminderEnabled&&(0,no.jsxs)("div",{className:"pl-6",children:[(0,no.jsx)(R,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,no.jsxs)(Ne,{value:n.reminderMinutes.toString(),onValueChange:m=>d({...n,reminderMinutes:parseInt(m)}),children:[(0,no.jsx)(be,{children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsx)(_,{value:"5",children:"5 minutes before"}),(0,no.jsx)(_,{value:"15",children:"15 minutes before"}),(0,no.jsx)(_,{value:"30",children:"30 minutes before"}),(0,no.jsx)(_,{value:"60",children:"1 hour before"}),(0,no.jsx)(_,{value:"1440",children:"1 day before"})]})]})]})]}),(0,no.jsxs)("div",{children:[(0,no.jsx)(R,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,no.jsx)(H,{id:"edit-tags",value:n.tags,onChange:m=>d({...n,tags:m.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,no.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,no.jsx)(w,{type:"button",variant:"outline",onClick:o,children:"Cancel"}),(0,no.jsx)(w,{type:"submit",children:"Save Changes"})]})]})]})})},Ks=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:i})=>{let[o,n]=(0,zi.useState)(!1);if(!e||!e.id)return null;let d=Mi(e.dueDate,e.dueTime),l=Bi(e.dueDate),g=_s(e.dueDate),m=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},c=()=>l?"Today":g?"Tomorrow":d&&!e.isCompleted?"Overdue":Hs(e.dueDate);return(0,no.jsxs)(no.Fragment,{children:[(0,no.jsx)(Ws,{reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:()=>n(!1)}),(0,no.jsx)(fe,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${d&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,no.jsx)(Xt,{className:"p-4",children:(0,no.jsxs)("div",{className:"flex items-start justify-between",children:[(0,no.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,no.jsx)("button",{onClick:m,className:"mt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,no.jsx)(Dt.CheckCircle,{className:"h-5 w-5"}):(0,no.jsx)(Dt.Circle,{className:"h-5 w-5"})}),(0,no.jsxs)("div",{className:"flex-1",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,no.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,no.jsx)("span",{className:"text-sm",children:Vs(e.priority)}),e.isRecurring&&(0,no.jsx)(Dt.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,no.jsx)(Dt.Bell,{className:"h-4 w-4 text-success"})]}),(0,no.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,no.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(Dt.Calendar,{className:"h-4 w-4"}),(0,no.jsx)("span",{className:d&&!e.isCompleted?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(Dt.Clock,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:Gs(e.dueTime)})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(Dt.User,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,no.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map((u,v)=>(0,no.jsx)(pe,{variant:"secondary",className:"text-xs",children:u},v))})]})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 w-8 p-0",children:(0,no.jsx)(Dt.Edit2,{className:"h-4 w-4"})}),(0,no.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>i(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,no.jsx)(Dt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Dr=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:i,onDeleteReminder:o})=>{let[n,d]=(0,zi.useState)(e.filter(Boolean)),[l]=(0,zi.useState)(t.filter(Boolean)),[g,m]=(0,zi.useState)("all"),[c,u]=(0,zi.useState)(""),[v,N]=(0,zi.useState)(!1),A=x=>{if(!x.title||!x.colleague?.id){console.error("Invalid reminder data:",x);return}let I={...x,id:Date.now().toString(),createdAt:new Date};d($=>[...$,I]),a?.(x)},O=(x,I)=>{if(!x){console.error("No reminder ID provided for update");return}d($=>$.map(L=>L?.id===x?{...L,...I}:L)),i?.(x,I)},y=x=>{if(!x){console.error("No reminder ID provided for deletion");return}d(I=>I.filter($=>$?.id!==x)),o?.(x)},B=n.filter(x=>{if(!x)return!1;if(c){let I=c.toLowerCase();if(!(x.title.toLowerCase().includes(I)||x.description.toLowerCase().includes(I)||x.colleague?.name?.toLowerCase().includes(I)||x.tags?.some(L=>L.toLowerCase().includes(I))))return!1}switch(g){case"pending":return!x.isCompleted;case"completed":return x.isCompleted;case"overdue":return!x.isCompleted&&Mi(x.dueDate,x.dueTime);case"today":return Bi(new Date(x.dueDate));default:return!0}}).sort((x,I)=>{if(!x||!I)return 0;if(x.isCompleted&&!I.isCompleted)return 1;if(!x.isCompleted&&I.isCompleted)return-1;let $={high:3,medium:2,low:1},L=$[I.priority]-$[x.priority];return L!==0?L:x.dueDate.getTime()-I.dueDate.getTime()}),V={total:n.filter(Boolean).length,pending:n.filter(x=>x&&!x.isCompleted).length,completed:n.filter(x=>x&&x.isCompleted).length,overdue:n.filter(x=>x&&!x.isCompleted&&Mi(x.dueDate,x.dueTime)).length,today:n.filter(x=>x&&Bi(new Date(x.dueDate))).length},Q=l.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,no.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,no.jsx)(gt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-no from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{N(!0)}}}),(0,no.jsxs)("div",{className:"h-full bg-background",children:[(0,no.jsx)($no,{colleagues:l,onAddReminder:A,open:v,setOpen:N}),(0,no.jsxs)("div",{className:"p-6",children:[(0,no.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,no.jsxs)("div",{children:[(0,no.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,no.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,no.jsxs)(w,{className:"flex items-center space-x-2",onClick:()=>N(!0),children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),(0,no.jsx)("span",{children:"Add Reminder"})]})]}),(0,no.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-foreground",children:V.total}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-primary",children:V.pending}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-success",children:V.completed}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-destructive",children:V.overdue}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,no.jsxs)(fe,{className:"p-4",children:[(0,no.jsx)("div",{className:"text-2xl font-bold text-warning",children:V.today}),(0,no.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,no.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsx)(H,{placeholder:"Search reminders...",value:c,onChange:x=>u(x.target.value),className:"max-w-md"})}),(0,no.jsxs)(Ne,{value:g,onValueChange:x=>m(x),children:[(0,no.jsx)(be,{className:"w-40",children:(0,no.jsx)(Ae,{})}),(0,no.jsxs)(he,{children:[(0,no.jsxs)(_,{value:"all",children:["All (",V.total,")"]}),(0,no.jsxs)(_,{value:"pending",children:["Pending (",V.pending,")"]}),(0,no.jsxs)(_,{value:"completed",children:["Completed (",V.completed,")"]}),(0,no.jsxs)(_,{value:"overdue",children:["Overdue (",V.overdue,")"]}),(0,no.jsxs)(_,{value:"today",children:["Today (",V.today,")"]})]})]})]}),(0,no.jsx)("div",{className:"space-y-4",children:B.length===0?(0,no.jsxs)(fe,{className:"p-8 text-center",children:[(0,no.jsx)("div",{className:"text-muted-foreground",children:c||g!=="all"?"No reminders match your filters":"No reminders yet"}),!c&&g==="all"&&(0,no.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):B.map(x=>x&&(0,no.jsx)(Ks,{reminder:x,colleagues:l,onUpdateReminder:O,onDeleteReminder:y},x.id))})]})]})]})};function Ja({files:e,onFileClick:t,onFileEdit:a,onFileDelete:i,showHeader:o=!0,className:n}){return(0,no.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${n||""}`,children:[o&&(0,no.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,no.jsx)("div",{className:"col-span-6",children:"Name"}),(0,no.jsx)("div",{className:"col-span-2",children:"Size"}),(0,no.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,no.jsx)("div",{className:"divide-y",children:e.map(d=>(0,no.jsxs)(Ya.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(d),children:[(0,no.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,no.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,no.jsx)("div",{children:(0,no.jsx)("p",{className:"font-medium",children:d.name})})]}),(0,no.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:d.filesize}),(0,no.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,no.jsx)("span",{className:"text-sm md:text-base",children:typeof d.createdAt=="string"?d.createdAt:d.createdAt.toLocaleDateString()}),(0,no.jsx)("div",{className:"flex gap-1",children:(0,no.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:l=>{l.stopPropagation(),i?.(d)},children:(0,no.jsx)(Dt.Trash2,{className:"h-4 w-4"})})})]})]},d.name))})]})}function Li({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:i,onFileClick:o,compactView:n=!1,className:d}){let[l,g]=(0,zi.useState)(e),[m,c]=(0,zi.useState)(""),[u,v]=(0,zi.useState)("all"),[N,A]=(0,zi.useState)("all");(0,zi.useEffect)(()=>{g(e)},[e]);let O=Array.from(new Set(l.map(L=>L.mimeType))),y=l.filter(L=>{let C=L.name.toLowerCase().includes(m.toLowerCase()),z=u==="all"||L.mimeType===u;return C&&z}),F=y.slice(0,10),B=y.filter(Boolean),V=()=>{t?.()},Q=L=>{a?.(L)},x=L=>{console.log("deleting file",L),g(C=>C.filter(z=>z.name!==L.name)),i?.(L.id)},I=L=>{o?.(L)},$=()=>{c(""),v("all")};return(0,no.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,no.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,no.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,no.jsxs)("div",{className:`space-y-6 ${d||""}`,children:[(0,no.jsx)(gt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-no from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:V},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,no.jsx)(fe,{children:(0,no.jsx)(Xt,{className:"no-6",children:(0,no.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,no.jsx)("div",{className:"flex-1",children:(0,no.jsxs)("div",{className:"relative",children:[(0,no.jsx)(Dt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,no.jsx)(H,{placeholder:"Search files...",value:m,onChange:L=>c(L.target.value),className:"pl-9"})]})}),(m||u!=="all")&&(0,no.jsxs)(w,{variant:"outline",onClick:$,className:"gap-2",children:[(0,no.jsx)(Dt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,no.jsxs)("div",{className:"space-y-4",children:[(0,no.jsx)(Ba,{activeTab:N,onTabChange:A,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${F.length})`}],maxWidth:"500px",gridCols:3}),N==="all"&&(0,no.jsx)(Ja,{files:y,onFileClick:I,onFileEdit:Q,onFileDelete:x,showHeader:!n}),N==="recent"&&(0,no.jsx)(Ja,{files:F,onFileClick:I,onFileEdit:Q,onFileDelete:x,showHeader:!n}),N==="shared"&&(0,no.jsx)(Ja,{files:B,onFileClick:I,onFileEdit:Q,onFileDelete:x,showHeader:!n})]}),y.length===0&&(0,no.jsx)(fe,{children:(0,no.jsx)(Xt,{className:"no-6",children:(0,no.jsxs)("div",{className:"text-center py-8",children:[(0,no.jsx)(Dt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,no.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,no.jsx)("p",{className:"text-muted-foreground mb-4",children:m||u!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,no.jsxs)(w,{onClick:V,className:"gap-2",children:[(0,no.jsx)(Dt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Pr=require("next/navigation");function Fi({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:i=[],initialProjects:o=[],initialReminders:n=[],initialColleagues:d=[],initialUsers:l=[],initialFiles:g=[],initialView:m="kanban",onAddTask:c,onUpdateTask:u,onDeleteTask:v,onTaskClick:N,onAddEpic:A,onUpdateEpic:O,onDeleteEpic:y,onAddTaskToEpic:F,onAddSprint:B,onUpdateSprint:V,onDeleteSprint:Q,onAddProject:x,onUpdateProject:I,onDeleteProject:$,onFileAdd:L,onFileEdit:C,onFileDelete:z,onFileClick:ne,onAddReminder:T,onUpdateReminder:Se,onDeleteReminder:S,onViewChange:oe,onToggleMobileMenu:f,onTeamClick:K,onTeamChange:re,onCopilotClick:Ue}){let[Ce,me]=(0,zi.useState)(t),[Ge,ye]=(0,zi.useState)(a),[Ye,ct]=(0,zi.useState)(i),[G,ce]=(0,zi.useState)(o),[Te,Ve]=(0,zi.useState)(n),[vt,It]=(0,zi.useState)(d),[bt,Qa]=(0,zi.useState)(l),[Za,ua]=(0,zi.useState)(g),[ei,ga]=(0,zi.useState)(!1),[fa,ta]=(0,zi.useState)(!1),[va,b]=(0,zi.useState)(null),[k,se]=(0,zi.useState)(null),[ji,Oi]=(0,zi.useState)(null),[Et,Ui]=(0,zi.useState)(m||"kanban"),[Ar,Ir]=(0,zi.useState)(!1),Vi=(0,Pr.useRouter)();(0,zi.useEffect)(()=>{me(t)},[t]),(0,zi.useEffect)(()=>{ct(i)},[i]),(0,zi.useEffect)(()=>{ye(a)},[a]),(0,zi.useEffect)(()=>{ce(o)},[o]),(0,zi.useEffect)(()=>{ua(g)},[g]),(0,zi.useEffect)(()=>{Qa(l)},[l]),(0,zi.useEffect)(()=>{It(d)},[d]),(0,zi.useEffect)(()=>{Ve(n)},[n]),(0,zi.useEffect)(()=>{Ui(m)},[m]);let Er=Ge.filter(h=>h.isSelected).map(h=>h.id),ba=Ye.find(h=>h.isSelected),Mr=Ce.filter(h=>{let P=Er.includes(h.epicId);return!ba||ba.id==="all-tasks"?P:ba.id==="backlog"?P&&!h.sprintId:P&&h.sprintId===ba.id}),Js=h=>Mr.filter(P=>P.status===h),Xs=h=>{let P={};return Ge.forEach(q=>{P[q.id]=h.filter(ve=>ve.epicId===q.id)}),P},Ys=h=>{Oi(h)},Qs=h=>{ji&&(me(P=>P.map(q=>q.id===ji.id?{...q,status:h}:q)),Oi(null))},Hi=h=>{let P={...h,id:Date.now().toString(),createdAt:new Date};me(q=>[...q,P]),c?.(P)},ha=(h,P)=>{me(q=>q.map(ve=>ve.id===h?{...ve,...P}:ve)),u?.(h,P)},Zs=async(h,P)=>{ha(h,P)},Gi=h=>{me(P=>P.filter(q=>q.id!==h)),va?.id===h&&b(null),v?.(h)},el=async h=>{Gi(h)},Br=h=>{let P={...h,id:Date.now().toString(),isSelected:!1};ce(q=>[...q,P]),x?.(h)},Lr=(h,P)=>{ce(q=>q.map(ve=>ve.id===h?P.isSelected?(Vi.push(`/project/${h}`),{...ve,...P}):{...ve,...P}:P.isSelected&&h!==ve.id?{...ve,isSelected:!1}:ve)),I?.(h,P)},Fr=h=>{ce(P=>P.filter(q=>q.id!==h)),$?.(h)},_i=h=>{let P={...h,id:Date.now().toString(),isSelected:!0};ye(q=>[...q,P]),A?.({...P})},$i=()=>{ta(!0)},Wi=(h,P)=>{ye(q=>q.map(ve=>ve.id===h?{...ve,...P}:ve)),O?.(h,P)},Ki=h=>{ye(P=>P.filter(q=>q.id!==h)),me(P=>P.filter(q=>q.epicId!==h)),y?.(h)},qi=h=>{let P={...h,id:Date.now().toString(),isSelected:!1};ct(q=>[...q,P]),B?.(h)},zr=(h,P)=>{ct(q=>q.map(ve=>ve.id===h?P.isSelected?{...ve,...P}:{...ve,...P}:P.isSelected&&h!==ve.id?{...ve,isSelected:!1}:ve)),V?.(h,P)},jr=h=>{h==="backlog"||h==="all-tasks"||(ct(P=>P.filter(q=>q.id!==h)),me(P=>P.map(q=>q.sprintId===h?{...q,sprintId:void 0}:q)),Q?.(h))},ti=h=>{b(h)},Or=h=>{h==="planning"&&window.innerWidth<768||(Ui(h),oe?.(h))},Ur=()=>{Ir(h=>!h),f?.()},tl=()=>{Vi.push("/")},al=h=>{console.log("Switching to team:",h)},il=h=>{console.log("Switching to team:",h)},Vr=h=>{se(h),ga(!0)},Hr=()=>{ga(!1),se(null)},Gr=h=>{let P={...h,id:Date.now().toString(),createdAt:new Date};Ve(q=>[...q,P]),T?.(h)},_r=(h,P)=>{Ve(q=>q.map(ve=>ve.id===h?{...ve,...P}:ve)),Se?.(h,P)},$no=h=>{Ve(P=>P.filter(q=>q.id!==h)),S?.(h)},Wr=()=>{L?.()},Kr=h=>{C?.(h)},qr=h=>{ua(P=>P.filter(q=>q.name!==h)),z?.(h)},Jr=h=>{ne?.(h)},ol=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],rl=()=>{switch(Et){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},ai=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],nl=ai.sort((h,P)=>P.lastUsed.getTime()-h.lastUsed.getTime()).slice(0,3),sl=ai.length>3,ll=ai.slice(3);return(0,no.jsxs)(Zo,{projects:G,epics:Ge,sprints:Ye,currentView:Et,onUpdateProject:Lr,onDeleteProject:Fr,onAddProject:Br,onUpdateEpic:Wi,onDeleteEpic:Ki,onAddEpic:$i,onAddSprint:qi,onUpdateSprint:zr,onDeleteSprint:jr,onViewChange:Or,mobileMenuOpen:Ar,onToggleMobileMenu:Ur,children:[Et==="kanban"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(br,{initialProjects:G,initialEpics:Ge,initialSprints:Ye,initialTasks:Ce,initialColleagues:vt,initialUsers:bt,onAddTask:Hi,onUpdateTask:ha,onDeleteTask:Gi,onTaskClick:ti,onAddEpic:_i})}),Et==="planning"&&(0,no.jsx)("div",{className:"hidden md:block h-full",children:(0,no.jsx)(Cr,{tasks:Ce,epics:Ge,sprints:Ye,onUpdateTask:ha,onTaskClick:ti,onAddSprint:qi})}),Et==="tasks"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(Dr,{initialReminders:Te,initialColleagues:vt,onAddReminder:Gr,onUpdateReminder:_r,onDeleteReminder:$no})}),Et==="files"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(Li,{initialFiles:Za,onFileAdd:Wr,onFileEdit:Kr,onFileDelete:qr,onFileClick:Jr,compactView:!1})}),Et==="epics"&&(0,no.jsx)("div",{className:"h-full",children:(0,no.jsx)(hr,{tasks:Ce,epics:Ge,sprints:Ye,onUpdateTask:ha,onTaskClick:ti,onAddTaskToEpic:Vr,onAddEpic:$i,onUpdateEpic:Wi,onDeleteEpic:Ki})}),(0,no.jsx)(Ua,{isOpen:ei,onClose:Hr,onAddTask:Hi,epics:Ge,sprints:Ye,assignees:[...vt,...bt],defaultEpicId:k||void 0}),(0,no.jsx)(Ga,{isOpen:fa,onClose:()=>ta(!1),onAddEpic:_i})]})}function Rr({title:e="",projects:t,businessUnits:a,epics:i,sprints:o,tasks:n,currentView:d,onAddTask:l,onUpdateTask:g,onDeleteTask:m,onTaskClick:c,onAddEpic:u,onUpdateEpic:v,onDeleteEpic:N,onAddTaskToEpic:A,onAddSprint:O,onUpdateSprint:y,onDeleteSprint:F,onAddProject:B,onUpdateProject:V,onDeleteProject:Q,onViewChange:x,mobileMenuOpen:I,onToggleMobileMenu:$,onTeamClick:L,onTeamChange:C,onCopilotClick:z}){let[ne,T]=(0,zi.useState)("projects"),[Se,S]=(0,zi.useState)(a[0]),oe=ye=>{console.log("Opening app:",ye.name)},f=ye=>{console.log("Favoriting app:",ye.name)},K=ye=>{console.log("Opening file:",ye.name)},re=ye=>{console.log("Sharing file:",ye.name)},Ue=ye=>{console.log("Opening project:",ye.name)},Ce=ye=>{console.log("Sharing project:",ye.name)},me=ye=>{console.log("Business unit changed to:",ye.name)},Ge=()=>{switch(ne){case"projects":return(0,no.jsx)(Fi,{initialProjects:t,initialEpics:i,initialSprints:o,initialTasks:n,onAddTask:l,onUpdateTask:g,onDeleteTask:m,onTaskClick:c,onAddEpic:u,onUpdateEpic:v,onDeleteEpic:N,onAddTaskToEpic:A,onAddSprint:O,onUpdateSprint:y,onDeleteSprint:F,onAddProject:B,onUpdateProject:V,onDeleteProject:Q,onViewChange:x,onToggleMobileMenu:$,onTeamClick:L,onTeamChange:C,onCopilotClick:z});default:return null}};return(0,no.jsx)(Fo,{sidebarItems:yo,title:e,notifications:wo,businessUnits:a,currentBusinessUnit:Se,onBusinessUnitChange:me,activeTab:ne,onTabChange:T,showTabs:!0,children:(0,no.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,no.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ge()},ne)})})}
|