cortex-react-components 2.12.4 → 2.12.5

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.
Files changed (99) hide show
  1. package/dist/{chunk-RGOKBIQ5.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-GTZJWMZR.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  3. package/dist/{chunk-75F3LJMX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  4. package/dist/{chunk-EM3T2XYC.mjs → chunk-5WVFEIMC.mjs} +1 -1
  5. package/dist/{chunk-RJGYVDOU.mjs → chunk-67QPOSVV.mjs} +1 -1
  6. package/dist/{chunk-CXOVEABI.mjs → chunk-7GMAMIHM.mjs} +1 -1
  7. package/dist/{chunk-OSXK6NGG.mjs → chunk-EMY52VZA.mjs} +1 -1
  8. package/dist/{chunk-WIRQ5IRT.mjs → chunk-ERJXTG6X.mjs} +1 -1
  9. package/dist/{chunk-3NRXQBBS.mjs → chunk-FKU4VQR6.mjs} +1 -1
  10. package/dist/{chunk-M4UVNIK2.mjs → chunk-FTZRG54P.mjs} +1 -1
  11. package/dist/{chunk-GHOL5L32.mjs → chunk-H3CJOE6S.mjs} +1 -1
  12. package/dist/{chunk-NINFDOV5.mjs → chunk-HKGW6JI2.mjs} +1 -1
  13. package/dist/{chunk-FE7ZGUPU.mjs → chunk-IF3425JX.mjs} +1 -1
  14. package/dist/{chunk-ZEALRBXW.mjs → chunk-LBUC4M6L.mjs} +1 -1
  15. package/dist/{chunk-KWYJ3XZI.mjs → chunk-LJOWXPWW.mjs} +1 -1
  16. package/dist/{chunk-AJQHGVZ5.mjs → chunk-LJQPLE4S.mjs} +1 -1
  17. package/dist/{chunk-3HNU2NYP.mjs → chunk-M7NV6EFH.mjs} +1 -1
  18. package/dist/{chunk-7R47MHQE.mjs → chunk-MXCW6SOT.mjs} +1 -1
  19. package/dist/{chunk-2BRDNDUB.mjs → chunk-N3B3XNV3.mjs} +1 -1
  20. package/dist/chunk-O6GWOXTH.mjs +1 -0
  21. package/dist/{chunk-5MWZTJYP.mjs → chunk-PK3OBSCB.mjs} +1 -1
  22. package/dist/{chunk-IPIDKLAW.mjs → chunk-RNMPX2AU.mjs} +1 -1
  23. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  24. package/dist/{chunk-6MSM3CZ6.mjs → chunk-TL2RQFU5.mjs} +1 -1
  25. package/dist/{chunk-KGKGZ4H2.mjs → chunk-W2JTSWVJ.mjs} +1 -1
  26. package/dist/{chunk-C4RWEPVF.mjs → chunk-YKG4FNS4.mjs} +1 -1
  27. package/dist/components/Blocks/Banner.mjs +1 -1
  28. package/dist/components/Blocks/CallToAction.mjs +1 -1
  29. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  30. package/dist/components/Blocks/Content.mjs +1 -1
  31. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  32. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  33. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  34. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  35. package/dist/components/Blocks/index.mjs +1 -1
  36. package/dist/components/Cards/ContentCard.mjs +1 -1
  37. package/dist/components/Cards/FeatureCard.mjs +1 -1
  38. package/dist/components/Cards/index.mjs +1 -1
  39. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  40. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  41. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  42. package/dist/components/DigitalColleagues/index.js +1 -1
  43. package/dist/components/DigitalColleagues/index.mjs +1 -1
  44. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  45. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  46. package/dist/components/HeaderFooter/index.mjs +1 -1
  47. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  48. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  49. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  50. package/dist/components/Heros/RenderHero.mjs +1 -1
  51. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  52. package/dist/components/Heros/index.mjs +1 -1
  53. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  54. package/dist/components/Layouts/Print.mjs +1 -1
  55. package/dist/components/Layouts/SlideShow.mjs +1 -1
  56. package/dist/components/Layouts/index.mjs +1 -1
  57. package/dist/components/Other/index.mjs +1 -1
  58. package/dist/components/Payload/RichText/index.mjs +1 -1
  59. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  60. package/dist/components/Payload/index.mjs +1 -1
  61. package/dist/components/Projects/PlanningView.js +1 -1
  62. package/dist/components/Projects/PlanningView.mjs +1 -1
  63. package/dist/components/Projects/ProjectPage.js +1 -1
  64. package/dist/components/Projects/ProjectPage.mjs +1 -1
  65. package/dist/components/Projects/ProjectView.js +1 -1
  66. package/dist/components/Projects/ProjectView.mjs +1 -1
  67. package/dist/components/index.js +1 -1
  68. package/dist/components/index.mjs +1 -1
  69. package/dist/globals.css +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/index.mjs +1 -1
  72. package/dist/metafile-cjs.json +1 -1
  73. package/dist/metafile-esm.json +1 -1
  74. package/dist/pages/Blog.mjs +1 -1
  75. package/dist/pages/Documentation.mjs +1 -1
  76. package/dist/pages/IndexPage.mjs +1 -1
  77. package/dist/pages/Intranet.mjs +1 -1
  78. package/dist/pages/LandingPage.mjs +1 -1
  79. package/dist/pages/Page.mjs +1 -1
  80. package/dist/pages/Publish.mjs +1 -1
  81. package/dist/pages/Website.mjs +1 -1
  82. package/dist/sections/AboutSection.mjs +1 -1
  83. package/dist/sections/BlogDetail.mjs +1 -1
  84. package/dist/sections/BlogList.mjs +1 -1
  85. package/dist/sections/BlogListSection.mjs +1 -1
  86. package/dist/sections/ContactSection.mjs +1 -1
  87. package/dist/sections/PageSections.mjs +1 -1
  88. package/dist/sections/PricingSection.mjs +1 -1
  89. package/dist/sections/ServiceDetail.mjs +1 -1
  90. package/dist/sections/ServiceDetailSection.mjs +1 -1
  91. package/dist/sections/ServiceSection.mjs +1 -1
  92. package/dist/sections/form/index.mjs +1 -1
  93. package/dist/sections/index.mjs +1 -1
  94. package/package.json +1 -1
  95. package/dist/chunk-ZMSNHKKT.mjs +0 -1
  96. package/dist/components/Projects/PlanningView_broken_backup.css +0 -1
  97. package/dist/components/Projects/PlanningView_broken_backup.d.ts +0 -14
  98. package/dist/components/Projects/PlanningView_broken_backup.js +0 -5
  99. package/dist/components/Projects/PlanningView_broken_backup.mjs +0 -1
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";"use client";var ei=Object.create;var aa=Object.defineProperty;var ti=Object.getOwnPropertyDescriptor;var ai=Object.getOwnPropertyNames;var oi=Object.getPrototypeOf,ri=Object.prototype.hasOwnProperty;var ii=(e,t)=>{for(var a in t)aa(e,a,{get:t[a],enumerable:!0})},no=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ai(t))!ri.call(e,i)&&i!==a&&aa(e,i,{get:()=>t[i],enumerable:!(o=ti(t,i))||o.enumerable});return e};var le=(e,t,a)=>(a=e!=null?ei(oi(e)):{},no(t||!e||!e.__esModule?aa(a,"default",{value:e,enumerable:!0}):a,e)),si=e=>no(aa({},"__esModule",{value:!0}),e);var Js={};ii(Js,{default:()=>Ir});module.exports=si(Js);var ge=require("react");var Pt=le(require("react"));var bo=require("clsx");var ka="-",ni=e=>{let t=di(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let n=c.split(ka);return n[0]===""&&n.length!==1&&n.shift(),mo(n,t)||li(c)},getConflictingClassGroupIds:(c,n)=>{let f=a[c]||[];return n&&o[c]?[...f,...o[c]]:f}}},mo=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),i=o?mo(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let s=e.join(ka);return t.validators.find(({validator:c})=>c(s))?.classGroupId},lo=/^\[(.+)\]$/,li=e=>{if(lo.test(e)){let t=lo.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},di=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return mi(Object.entries(e.classGroups),a).forEach(([s,c])=>{Sa(c,o,s,t)}),o},Sa=(e,t,a,o)=>{e.forEach(i=>{if(typeof i=="string"){let s=i===""?t:co(t,i);s.classGroupId=a;return}if(typeof i=="function"){if(ci(i)){Sa(i(o),t,a,o);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([s,c])=>{Sa(c,co(t,s),a,o)})})},co=(e,t)=>{let a=e;return t.split(ka).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ci=e=>e.isThemeGetter,mi=(e,t)=>t?e.map(([a,o])=>{let i=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,n])=>[t+c,n])):s);return[a,i]}):e,pi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,i=(s,c)=>{a.set(s,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let c=a.get(s);if(c!==void 0)return c;if((c=o.get(s))!==void 0)return i(s,c),c},set(s,c){a.has(s)?a.set(s,c):i(s,c)}}},po="!",ui=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,i=t[0],s=t.length,c=n=>{let f=[],p=0,d=0,b;for(let N=0;N<n.length;N++){let U=n[N];if(p===0){if(U===i&&(o||n.slice(N,N+s)===t)){f.push(n.slice(d,N)),d=N+s;continue}if(U==="/"){b=N;continue}}U==="["?p++:U==="]"&&p--}let R=f.length===0?n:n.substring(d),g=R.startsWith(po),y=g?R.substring(1):R,B=b&&b>d?b-d:void 0;return{modifiers:f,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:B}};return a?n=>a({className:n,parseClassName:c}):c},gi=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},fi=e=>({cache:pi(e.cacheSize),parseClassName:ui(e),...ni(e)}),vi=/\s+/,bi=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=t,s=[],c=e.trim().split(vi),n="";for(let f=c.length-1;f>=0;f-=1){let p=c[f],{modifiers:d,hasImportantModifier:b,baseClassName:R,maybePostfixModifierPosition:g}=a(p),y=!!g,B=o(y?R.substring(0,g):R);if(!B){if(!y){n=p+(n.length>0?" "+n:n);continue}if(B=o(R),!B){n=p+(n.length>0?" "+n:n);continue}y=!1}let N=gi(d).join(":"),U=b?N+po:N,O=U+B;if(s.includes(O))continue;s.push(O);let V=i(B,y);for(let Q=0;Q<V.length;++Q){let x=V[Q];s.push(U+x)}n=p+(n.length>0?" "+n:n)}return n};function hi(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=uo(t))&&(o&&(o+=" "),o+=a);return o}var uo=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=uo(e[o]))&&(a&&(a+=" "),a+=t);return a};function xi(e,...t){let a,o,i,s=c;function c(f){let p=t.reduce((d,b)=>b(d),e());return a=fi(p),o=a.cache.get,i=a.cache.set,s=n,n(f)}function n(f){let p=o(f);if(p)return p;let d=bi(f,a);return i(f,d),d}return function(){return s(hi.apply(null,arguments))}}var fe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},go=/^\[(?:([a-z-]+):)?(.+)\]$/i,yi=/^\d+\/\d+$/,wi=new Set(["px","full","screen"]),Ni=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ci=/\d+(%|px|Rt?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|Rt?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Si=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ki=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Rt-?((\d+)?\.?(\d+)[a-z]+|0)/,Ti=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ut=e=>zt(e)||wi.has(e)||yi.test(e),yt=e=>Ot(e,"length",Li),zt=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>Ot(e,"number",zt),qt=e=>!!e&&Number.isInteger(Number(e)),Di=e=>e.endsWith("%")&&zt(e.slice(0,-1)),G=e=>go.test(e),wt=e=>Ni.test(e),Pi=new Set(["length","size","percentage"]),Ri=e=>Ot(e,Pi,fo),Ei=e=>Ot(e,"position",fo),Mi=new Set(["image","url"]),Ii=e=>Ot(e,Mi,Fi),Ai=e=>Ot(e,"",Bi),Jt=()=>!0,Ot=(e,t,a)=>{let o=go.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Li=e=>Ci.test(e)&&!Si.test(e),fo=()=>!1,Bi=e=>ki.test(e),Fi=e=>Ti.test(e);var zi=()=>{let e=fe("colors"),t=fe("spacing"),a=fe("blur"),o=fe("brightness"),i=fe("borderColor"),s=fe("borderRadius"),c=fe("borderSpacing"),n=fe("borderWidth"),f=fe("contrast"),p=fe("grayscale"),d=fe("hueRotate"),b=fe("invert"),R=fe("gap"),g=fe("gradientColorStops"),y=fe("gradientColorStopPositions"),B=fe("inset"),N=fe("margin"),U=fe("opacity"),O=fe("padding"),V=fe("saturate"),Q=fe("scale"),x=fe("sepia"),L=fe("skew"),ie=fe("space"),F=fe("translate"),pe=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],Se=()=>["auto",G,t],z=()=>[G,t],D=()=>["",ut,yt],oe=()=>["auto",zt,G],je=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],he=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>["start","end","center","between","around","evenly","stretch"],Ue=()=>["","0",G],st=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ne=()=>[zt,G];return{cacheSize:500,separator:":",theme:{colors:[Jt],spacing:[ut,yt],blur:["none","",wt,G],brightness:Ne(),borderColor:[e],borderRadius:["none","","full",wt,G],borderSpacing:z(),borderWidth:D(),contrast:Ne(),grayscale:Ue(),hueRotate:Ne(),invert:Ue(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[Di,yt],inset:Se(),margin:Se(),opacity:Ne(),padding:z(),saturate:Ne(),scale:Ne(),sepia:Ue(),skew:Ne(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[wt]}],"break-after":[{"break-after":st()}],"break-before":[{"break-before":st()}],"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:[...je(),G]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:pe()}],"overscroll-x":[{"overscroll-x":pe()}],"overscroll-y":[{"overscroll-y":pe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[B]}],"inset-x":[{"inset-x":[B]}],"inset-y":[{"inset-y":[B]}],start:[{start:[B]}],end:[{end:[B]}],top:[{top:[B]}],right:[{right:[B]}],bottom:[{bottom:[B]}],left:[{left:[B]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qt,G]}],basis:[{basis:Se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:Ue()}],shrink:[{shrink:Ue()}],order:[{order:["first","last","none",qt,G]}],"grid-cols":[{"grid-cols":[Jt]}],"col-start-end":[{col:["auto",{span:["full",qt,G]},G]}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":[Jt]}],"row-start-end":[{row:["auto",{span:[qt,G]},G]}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[R]}],"gap-x":[{"gap-x":[R]}],"gap-y":[{"gap-y":[R]}],"justify-content":[{justify:["normal",..._e()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._e(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._e(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],Rt:[{Rt:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[ie]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ie]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[wt]},wt]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wt,yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ca]}],"font-family":[{font:[Jt]}],"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",G]}],"line-clamp":[{"line-clamp":["none",zt,Ca]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ut,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[U]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ut,yt]}],"underline-offset":[{"underline-offset":["auto",ut,G]}],"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:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],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",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[U]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...je(),Ei]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ri]}],"bg-image":[{bg:["none",{"gradient-to":["t","Rt","Rt","br","b","bl","Rt","tl"]},Ii]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-Rt":[{"rounded-Rt":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-Rt":[{"rounded-Rt":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-Rt":[{"rounded-Rt":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-Rt":[{"border-Rt":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-Rt":[{"border-Rt":[n]}],"border-opacity":[{"border-opacity":[U]}],"border-style":[{border:[...he(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[U]}],"divide-style":[{divide:he()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-Rt":[{"border-Rt":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-Rt":[{"border-Rt":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...he()]}],"outline-offset":[{"outline-offset":[ut,G]}],"outline-w":[{outline:[ut,yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[U]}],"ring-offset-w":[{"ring-offset":[ut,yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wt,Ai]}],"shadow-color":[{shadow:[Jt]}],opacity:[{opacity:[U]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",wt,G]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[b]}],saturate:[{saturate:[V]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[U]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:Ne()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:Ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Q]}],"scale-x":[{"scale-x":[Q]}],"scale-y":[{"scale-y":[Q]}],rotate:[{rotate:[qt,G]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],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","s-resize","w-resize","Rt-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-Rt":[{"scroll-Rt":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ut,yt,Ca]}],stroke:[{stroke:[e,"none"]}],ge:["ge-only","not-ge-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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],Rt:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","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-s","rounded-e","rounded-t","rounded-Rt","rounded-b","rounded-Rt","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-Rt","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-Rt"],"rounded-Rt":["rounded-Rt","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-Rt":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-Rt","border-w-b","border-w-Rt"],"border-w-x":["border-w-Rt","border-w-Rt"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-Rt","border-color-b","border-color-Rt"],"border-color-x":["border-color-Rt","border-color-Rt"],"border-color-y":["border-color-t","border-color-b"],"scroll-Rt":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var vo=xi(zi);function v(...e){return vo((0,bo.clsx)(e))}var Rt=require("react/jsx-runtime"),de=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("rounded-xl border bg-card text-card-foreground shadow",e),...t}));de.displayName="Card";var Oi=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("flex flex-col space-y-1.5 p-6",e),...t}));Oi.displayName="CardHeader";var Hi=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("font-semibold leading-none tracking-tight",e),...t}));Hi.displayName="CardTitle";var Vi=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("text-sm text-muted-foreground",e),...t}));Vi.displayName="CardDescription";var Ht=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("p-6 pt-0",e),...t}));Ht.displayName="CardContent";var ji=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("flex items-center p-6 pt-0",e),...t}));ji.displayName="CardFooter";var ho=require("@radix-ui/react-slot"),xo=require("class-variance-authority"),yo=le(require("react")),oa=(0,xo.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=yo.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...i},s)=>(0,Rt.jsx)(e?ho.Slot:"button",{className:v(oa({className:t,size:a,variant:o})),ref:s,...i}));w.displayName="Button";var No=le(require("react"));var $=No.forwardRef(({className:e,type:t,...a},o)=>(0,Rt.jsx)("input",{type:t,className:v("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:o,...a}));$.displayName="Input";var So=le(require("react")),xe=So.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("textarea",{className:v("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}));xe.displayName="Textarea";var q=le(require("react")),Ho=require("lucide-react");var To=(e=768)=>{let[t,a]=(0,ge.useState)(!1);return(0,ge.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Do=le(require("react")),Ta=le(require("@radix-ui/react-separator"));var Da=Do.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},i)=>(0,Rt.jsx)(Ta.Root,{ref:i,decorative:a,orientation:t,className:v("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Da.displayName=Ta.Root.displayName;var Xt=le(require("react")),Ae=le(require("@radix-ui/react-dialog")),Ro=require("@radix-ui/react-icons");var Mo=Ae.Root;var Ui=Ae.Portal,Io=Xt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Ae.Overlay,{className:v("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}));Io.displayName=Ae.Overlay.displayName;var $i=(0,xo.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-Rt 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-Rt data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Pa=Xt.forwardRef(({side:e="right",className:t,children:a,...o},i)=>(0,Rt.jsxs)(Ui,{children:[(0,Rt.jsx)(Io,{}),(0,Rt.jsxs)(Ae.Content,{ref:i,className:v($i({side:e}),t),...o,children:[(0,Rt.jsxs)(Ae.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,Rt.jsx)(Ro.Cross2Icon,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{className:"ge-only",children:"Close"})]}),a]})]}));Pa.displayName=Ae.Content.displayName;var Gi=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col space-y-2 text-center sm:text-left",e),...t});Gi.displayName="SheetHeader";var _i=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_i.displayName="SheetFooter";var Wi=Xt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Ae.Title,{ref:a,className:v("text-lg font-semibold text-foreground",e),...t}));Wi.displayName=Ae.Title.displayName;var Ki=Xt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Ae.Description,{ref:a,className:v("text-sm text-muted-foreground",e),...t}));Ki.displayName=Ae.Description.displayName;function Ra({className:e,...t}){return(0,Rt.jsx)("div",{className:v("animate-pulse rounded-md bg-primary/10",e),...t})}var Lo=le(require("react")),nt=le(require("@radix-ui/react-tooltip"));var Bo=nt.Provider,Fo=nt.Root,zo=nt.Trigger,Ma=Lo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Rt.jsx)(nt.Portal,{children:(0,Rt.jsx)(nt.Content,{ref:o,sideOffset:t,className:v("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})}));Ma.displayName=nt.Content.displayName;var qi="sidebar:state",Ji=60*60*24*7,Xi="16rem",Zi="18rem",Yi="3rem",Qi="b",Vo=q.createContext(null);function ia(){let e=q.useContext(Vo);if(!e)throw new Error("useSidebar must Rt used within a SidebarProvider.");return e}var Ia=q.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:s,...c},n)=>{let f=To(),[p,d]=q.useState(!1),[b,R]=q.useState(e),g=t??b,y=q.useCallback(O=>{if(a)return a?.(typeof O=="function"?O(g):O);R(O),document.cookie=`${qi}=${g}; path=/; max-age=${Ji}`},[a,g]),B=q.useCallback(()=>f?d(O=>!O):y(O=>!O),[f,y,d]);q.useEffect(()=>{let O=V=>{V.key===Qi&&(V.metaKey||V.ctrlKey)&&(V.preventDefault(),B())};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[B]);let N=g?"expanded":"collapsed",U=q.useMemo(()=>({state:N,open:g,setOpen:y,isMobile:f,openMobile:p,setOpenMobile:d,toggleSidebar:B}),[N,g,y,f,p,d,B]);return(0,Rt.jsx)(Vo.Provider,{value:U,children:(0,Rt.jsx)(Bo,{delayDuration:0,children:(0,Rt.jsx)("div",{style:{"--sidebar-width":Xi,"--sidebar-width-icon":Yi,...i},className:v("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:n,...c,children:s})})})});Ia.displayName="SidebarProvider";var es=q.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...s},c)=>{let{isMobile:n,state:f,openMobile:p,setOpenMobile:d}=ia();return a==="none"?(0,Rt.jsx)("div",{className:v("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:c,...s,children:i}):n?(0,Rt.jsx)(Mo,{open:p,onOpenChange:d,...s,children:(0,Rt.jsx)(Pa,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Zi},side:e,children:(0,Rt.jsx)("div",{className:"flex h-full w-full flex-col",children:i})})}):(0,Rt.jsxs)("div",{ref:c,className:"group peer hidden md:block text-sidebar-foreground","data-state":f,"data-collapsible":f==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Rt.jsx)("div",{className:v("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)Rt+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Rt.jsx)("div",{className:v("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)Rt+_theme(spacing.4)Rt+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-Rt group-data-[side=right]:border-Rt",o),...s,children:(0,Rt.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:i})})]})});es.displayName="Sidebar";var ts=q.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:i}=ia();return(0,Rt.jsxs)(w,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:v("h-7 w-7",e),onClick:s=>{t?.(s),i()},...a,children:[(0,Rt.jsx)(Ho.PanelLeft,{}),(0,Rt.jsx)("span",{className:"ge-only",children:"Toggle Sidebar"})]})});ts.displayName="SidebarTrigger";var as=q.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=ia();return(0,Rt.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:v("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]Rt&]:cursor-w-resize [[data-side=right]Rt&]:cursor-e-resize","[[data-side=left][data-state=collapsed]Rt&]:cursor-e-resize [[data-side=right][data-state=collapsed]Rt&]: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]Rt&]:-right-2","[[data-side=right][data-collapsible=offcanvas]Rt&]:-left-2",e),...t})});as.displayName="SidebarRail";var os=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("main",{ref:a,className:v("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:Rt-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}));os.displayName="SidebarInset";var rs=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)($,{ref:a,"data-sidebar":"input",className:v("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));rs.displayName="SidebarInput";var is=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"header",className:v("flex flex-col gap-2 p-2",e),...t}));is.displayName="SidebarHeader";var ss=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"footer",className:v("flex flex-col gap-2 p-2",e),...t}));ss.displayName="SidebarFooter";var ns=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Da,{ref:a,"data-sidebar":"separator",className:v("mx-2 w-auto bg-sidebar-border",e),...t}));ns.displayName="SidebarSeparator";var ls=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"content",className:v("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ls.displayName="SidebarContent";var ds=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"group",className:v("relative flex w-full min-w-0 flex-col p-2",e),...t}));ds.displayName="SidebarGroup";var cs=q.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Rt.jsx)(t?ho.Slot:"div",{ref:o,"data-sidebar":"group-label",className:v("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}));cs.displayName="SidebarGroupLabel";var ms=q.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Rt.jsx)(t?ho.Slot:"button",{ref:o,"data-sidebar":"group-action",className:v("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}));ms.displayName="SidebarGroupAction";var ps=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"group-content",className:v("w-full text-sm",e),...t}));ps.displayName="SidebarGroupContent";var us=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("ul",{ref:a,"data-sidebar":"menu",className:v("flex w-full min-w-0 flex-col gap-1",e),...t}));us.displayName="SidebarMenu";var gs=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:v("group/menu-item relative",e),...t}));gs.displayName="SidebarMenuItem";var fs=(0,xo.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"}}),vs=q.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:i,className:s,...c},n)=>{let f=e?ho.Slot:"button",{isMobile:p,state:d}=ia(),b=(0,Rt.jsx)(f,{ref:n,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:v(fs({variant:a,size:o}),s),...c});return i?(typeof i=="string"&&(i={children:i}),(0,Rt.jsxs)(Fo,{children:[(0,Rt.jsx)(zo,{asChild:!0,children:b}),(0,Rt.jsx)(Ma,{side:"right",align:"center",hidden:d!=="collapsed"||p,...i})]})):b});vs.displayName="SidebarMenuButton";var bs=q.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},i)=>(0,Rt.jsx)(t?ho.Slot:"button",{ref:i,"data-sidebar":"menu-action",className:v("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),...o}));bs.displayName="SidebarMenuAction";var hs=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:v("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}));hs.displayName="SidebarMenuBadge";var xs=q.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let i=q.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Rt.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:v("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Rt.jsx)(Ra,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Rt.jsx)(Ra,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});xs.displayName="SidebarMenuSkeleton";var ys=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:v("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-Rt border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ys.displayName="SidebarMenuSub";var ws=q.forwardRef(({...e},t)=>(0,Rt.jsx)("li",{ref:t,...e}));ws.displayName="SidebarMenuSubItem";var Ns=q.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...i},s)=>(0,Rt.jsx)(e?ho.Slot:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:v("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",o),...i}));Ns.displayName="SidebarMenuSubButton";var jo=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:i,onDeleteProject:s,onAddProject:c,onUpdateEpic:n,onDeleteEpic:f,onAddEpic:p,onViewChange:d,mobileMenuOpen:b,onToggleMobileMenu:R})=>{let[g,y]=(0,ge.useState)(null),[B,N]=(0,ge.useState)(null),[U,O]=(0,ge.useState)(null),[V,Q]=(0,ge.useState)({name:"",description:""}),[x,L]=(0,ge.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[ie,F]=(0,ge.useState)(!1),[pe,K]=(0,ge.useState)({name:"",description:""}),Se=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],z=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],D=[{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"}],oe=C=>{N(C.id),Q({name:C.name,description:C.description||""})},je=()=>{B&&V.name.trim()&&(i(B,{name:V.name.trim(),description:V.description.trim()}),N(null))},he=()=>{N(null),Q({name:"",description:""})},se=()=>{pe.name.trim()&&(c({name:pe.name.trim(),description:pe.description.trim(),isSelected:!1}),K({name:"",description:""}),F(!1))},_e=C=>{i(C,{isSelected:!0})},Ue=C=>{O(C.id),L({name:C.name,description:C.description||"",color:C.color,confidence:C.confidence,phase:C.phase,startDate:C.startDate.toISOString().split("T")[0],endDate:C.endDate.toISOString().split("T")[0],progress:C.progress})},st=()=>{U&&x.name.trim()&&(n(U,{name:x.name.trim(),description:x.description.trim(),color:x.color,confidence:x.confidence,phase:x.phase,startDate:new Date(x.startDate),endDate:new Date(x.endDate),progress:x.progress}),O(null))},Ne=()=>{O(null),L({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},Ee=C=>C.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Je=C=>{let I=z.find(re=>re.value===C);return I?{label:I.label,color:I.color}:{label:"Medium",color:"text-warning"}},Ye=C=>{let I=D.find(re=>re.value===C);return I?{label:I.label,color:I.color}:{label:"Phase 1",color:"text-primary"}};return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${b?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:(0,Rt.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,Rt.jsxs)("button",{onClick:()=>{d("kanban"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Kanban View",children:[(0,Rt.jsx)(Ho.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("planning"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="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,Rt.jsx)(Ho.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("epics"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,Rt.jsx)(Ho.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("files"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,Rt.jsx)(Ho.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("tasks"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="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,Rt.jsx)(Ho.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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"})]})]})}),b&&(0,Rt.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:R}),g&&(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>y(null)}),(0,Rt.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,Rt.jsxs)("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[(0,Rt.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[g==="projects"&&"Projects",g==="epics"&&"Manage Epics"]}),(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>y(null),children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]}),(0,Rt.jsxs)("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[g==="projects"&&(0,Rt.jsx)(de,{className:"p-3",children:(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,Rt.jsxs)(w,{size:"sm",onClick:()=>F(!0),className:"gap-1",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),ie&&(0,Rt.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,Rt.jsx)($,{value:pe.name,onChange:C=>K(I=>({...I,name:C.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Rt.jsx)(xe,{value:pe.description,onChange:C=>K(I=>({...I,description:C.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)(w,{size:"sm",onClick:se,className:"text-xs h-6",children:"Save"}),(0,Rt.jsx)(w,{size:"sm",variant:"outline",onClick:()=>F(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,Rt.jsx)("div",{className:"space-y-2",children:e.map(C=>(0,Rt.jsx)("div",{className:"border rounded p-2",children:B===C.id?(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)($,{value:V.name,onChange:I=>Q(re=>({...re,name:I.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Rt.jsx)(xe,{value:V.description,onChange:I=>Q(re=>({...re,description:I.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)(w,{size:"sm",onClick:je,className:"text-xs h-6",children:"Save"}),(0,Rt.jsx)(w,{size:"sm",variant:"outline",onClick:he,className:"text-xs h-6",children:"Cancel"})]})]}):(0,Rt.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${C.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>_e(C.id),children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Rt.jsx)(Ho.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,Rt.jsx)("span",{className:"font-medium text-xs",children:C.name})]}),C.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:C.description}),(0,Rt.jsxs)("div",{className:"flex gap-1",onClick:I=>I.stopPropagation(),children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>oe(C),className:"h-5 px-1",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>s(C.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]})},C.id))})]})}),g==="epics"&&(0,Rt.jsx)(de,{className:"p-3",children:(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,Rt.jsxs)(w,{size:"sm",onClick:p,className:"gap-1",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,Rt.jsx)("div",{className:"space-y-4",children:t.map(C=>(0,Rt.jsx)("div",{className:"border rounded-lg p-3",children:U===C.id?(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsx)($,{value:x.name,onChange:I=>L(re=>({...re,name:I.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,Rt.jsx)(xe,{value:x.description,onChange:I=>L(re=>({...re,description:I.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,Rt.jsx)("div",{className:"flex gap-1 flex-wrap",children:Se.map(I=>(0,Rt.jsx)("button",{onClick:()=>L(re=>({...re,color:I})),className:`w-6 h-6 rounded-full ${I} ${x.color===I?"ring-2 ring-ring":""}`},I))})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,Rt.jsx)("select",{value:x.confidence,onChange:I=>L(re=>({...re,confidence:I.target.value})),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:z.map(I=>(0,Rt.jsx)("option",{value:I.value,children:I.label},I.value))})]}),(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,Rt.jsx)("select",{value:x.phase.toString(),onChange:I=>L(re=>({...re,phase:parseInt(I.target.value)})),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:D.map(I=>(0,Rt.jsx)("option",{value:I.value.toString(),children:I.label},I.value))})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,Rt.jsx)($,{type:"date",value:x.startDate,onChange:I=>L(re=>({...re,startDate:I.target.value})),className:"text-xs h-8"})]}),(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,Rt.jsx)($,{type:"date",value:x.endDate,onChange:I=>L(re=>({...re,endDate:I.target.value})),className:"text-xs h-8"})]})]}),(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,Rt.jsx)($,{type:"number",min:"0",max:"100",value:x.progress,onChange:I=>L(re=>({...re,progress:parseInt(I.target.value)||0})),className:"text-xs h-8"})]}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsx)(w,{size:"sm",onClick:st,className:"text-xs",children:"Save"}),(0,Rt.jsx)(w,{size:"sm",variant:"outline",onClick:Ne,className:"text-xs",children:"Cancel"})]})]}):(0,Rt.jsxs)("div",{className:`cursor-pointer p-2 rounded transition-colors ${C.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>n(C.id,{isSelected:!C.isSelected}),children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${C.color}`}),(0,Rt.jsx)("span",{className:"font-medium text-sm",children:C.name})]}),C.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:C.description}),(0,Rt.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,Rt.jsx)("span",{className:Je(C.confidence).color,children:Je(C.confidence).label})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,Rt.jsx)("span",{className:Ye(C.phase).color,children:Ye(C.phase).label})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,Rt.jsxs)("span",{className:"text-foreground",children:[Ee(C.startDate)," - ",Ee(C.endDate)]})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,Rt.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${C.progress}%`}})}),(0,Rt.jsxs)("span",{className:"text-foreground",children:[C.progress,"%"]})]})]})]}),(0,Rt.jsxs)("div",{className:"flex gap-1",onClick:I=>I.stopPropagation(),children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>Ue(C),className:"h-6 px-2",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>f(C.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]})},C.id))})]})})]})]})]})]})},Uo=e=>(0,Rt.jsx)(Ia,{children:(0,Rt.jsxs)("div",{className:"flex w-full h-full",children:[(0,Rt.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,Rt.jsx)(jo,{...e})}),(0,Rt.jsx)("div",{className:"md:hidden",children:(0,Rt.jsx)(jo,{...e})}),(0,Rt.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6 h-full",children:(0,Rt.jsx)("div",{className:"w-full h-full",children:e.children})})]})});var Cs=(0,$o.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 ue({className:e,variant:t,...a}){return(0,Rt.jsx)("div",{className:v(Cs({variant:t}),e),...a})}var _o=({title:e,status:t,taskCount:a,children:o,onDrop:i,isCompact:s=!1,height:c})=>{let n=d=>{d.preventDefault()},f=d=>{d.preventDefault(),i(t)};return(0,Rt.jsxs)(de,{className:`p-4 bg-card border-Rt-4 ${(()=>{switch(t){case"todo":return"border-Rt-gray-400";case"in-progress":return"border-Rt-blue-500";case"review":return"border-Rt-orange-500";case"done":return"border-Rt-green-500";default:return"border-Rt-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${s?"lg:max-w-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:n,onDrop:f,children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Rt.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,Rt.jsx)(ue,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Rt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var sa=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:i=!1})=>{let s=d=>{a(e)},c=()=>{o(e)},n=()=>{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"}},f=()=>{switch(e.type){case"story":return(0,Rt.jsx)(Ho.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Rt.jsx)(Ho.Bug,{className:"h-3 w-3"});case"spike":return(0,Rt.jsx)(Ho.Zap,{className:"h-3 w-3"});case"task":default:return(0,Rt.jsx)(Ho.AlertCircle,{className:"h-3 w-3"})}},p=()=>{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 i?(0,Rt.jsx)(de,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:c,children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:f()}),(0,Rt.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Rt.jsxs)(de,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:c,children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Rt.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[f(),(0,Rt.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${n()}`,children:e.priority}),(0,Rt.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,Rt.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Rt.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,Rt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Rt.jsx)(Ho.User,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:e.assignee?.value?.name})]})})]})};var Zt=le(require("react")),Le=le(require("@radix-ui/react-dialog"));var lt=Le.Root;var Ss=Le.Portal;var Ko=Zt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Le.Overlay,{ref:a,className:v("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}));Ko.displayName=Le.Overlay.displayName;var Qe=Zt.forwardRef(({className:e,children:t,...a},o)=>(0,Rt.jsxs)(Ss,{children:[(0,Rt.jsx)(Ko,{}),(0,Rt.jsxs)(Le.Content,{ref:o,className:v("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,Rt.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,Rt.jsx)(Ho.X,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{className:"ge-only",children:"Close"})]})]})]}));Qe.displayName=Le.Content.displayName;var et=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});et.displayName="DialogHeader";var Yt=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yt.displayName="DialogFooter";var tt=Zt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Le.Title,{ref:a,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));tt.displayName=Le.Title.displayName;var ks=Zt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Le.Description,{ref:a,className:v("text-sm text-muted-foreground",e),...t}));ks.displayName=Le.Description.displayName;var X=le(require("@radix-ui/react-select")),Ct=le(require("react")),Be=X.Root;var We=X.Value,ke=Ct.forwardRef(({children:e,className:t,...a},o)=>(0,Rt.jsxs)(X.Trigger,{className:v("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:o,...a,children:[e,(0,Rt.jsx)(X.Icon,{asChild:!0,children:(0,Rt.jsx)(Ho.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ke.displayName=X.Trigger.displayName;var qo=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Rt.jsx)(Ho.ChevronUp,{className:"h-4 w-4"})}));qo.displayName=X.ScrollUpButton.displayName;var Jo=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Rt.jsx)(Ho.ChevronDown,{className:"h-4 w-4"})}));Jo.displayName=X.ScrollDownButton.displayName;var Te=Ct.forwardRef(({children:e,className:t,position:a="popper",...o},i)=>(0,Rt.jsx)(X.Portal,{children:(0,Rt.jsxs)(X.Content,{className:v("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:i,...o,children:[(0,Rt.jsx)(qo,{}),(0,Rt.jsx)(X.Viewport,{className:v("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Rt.jsx)(Jo,{})]})}));Te.displayName=X.Content.displayName;var Ts=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Ts.displayName=X.Label.displayName;var J=Ct.forwardRef(({children:e,className:t,...a},o)=>(0,Rt.jsxs)(X.Item,{className:v("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:o,...a,children:[(0,Rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Rt.jsx)(X.ItemIndicator,{children:(0,Rt.jsx)(Ho.Check,{className:"h-4 w-4"})})}),(0,Rt.jsx)(X.ItemText,{children:e})]}));J.displayName=X.Item.displayName;var Ds=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Ds.displayName=X.Separator.displayName;var Xo=le(require("react")),Aa=le(require("@radix-ui/react-label"));var Ps=(0,xo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T=Xo.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Aa.Root,{ref:a,className:v(Ps(),e),...t}));T.displayName=Aa.Root.displayName;var It=le(require("react")),jt=le(require("@radix-ui/react-toggle-group"));var Qo=le(require("react")),La=le(require("@radix-ui/react-toggle"));var Ba=(0,xo.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"}}),Rs=Qo.forwardRef(({className:e,variant:t,size:a,...o},i)=>(0,Rt.jsx)(La.Root,{ref:i,className:v(Ba({variant:t,size:a,className:e})),...o}));Rs.displayName=La.Root.displayName;var ar=It.createContext({size:"default",variant:"default"}),At=It.forwardRef(({className:e,variant:t,size:a,children:o,...i},s)=>(0,Rt.jsx)(jt.Root,{ref:s,className:v("flex items-center justify-center gap-1",e),...i,children:(0,Rt.jsx)(ar.Provider,{value:{variant:t,size:a},children:o})}));At.displayName=jt.Root.displayName;var Lt=It.forwardRef(({className:e,children:t,variant:a,size:o,...i},s)=>{let c=It.useContext(ar);return(0,Rt.jsx)(jt.Item,{ref:s,className:v(Ba({variant:c.variant||a,size:c.size||o}),e),...i,children:t})});Lt.displayName=jt.Item.displayName;var Es=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Ho.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Ho.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Ho.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Ho.Zap}],Ms=[{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"}],la=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:i,assignees:s,defaultEpicId:c})=>{let[n,f]=(0,ge.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,ge.useEffect)(()=>{e&&c&&f(b=>({...b,epicId:c}))},[e,c]),(0,ge.useEffect)(()=>{e&&f({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let p=b=>{b.preventDefault(),n.name.trim()&&(a({name:n.name.trim(),description:n.description.trim(),status:"todo",priority:n.priority,type:n.type,points:n.points,epicId:n.epicId,sprintId:n.sprintId==="none"?void 0:n.sprintId,assignee:n.assignee.trim()||"Unassigned"}),f({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""}),t())},d=(b,R)=>{f(g=>({...g,[b]:R}))};return(0,Rt.jsx)(lt,{open:e,onOpenChange:t,children:(0,Rt.jsxs)(Qe,{className:"sm:max-w-md",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Task"})}),(0,Rt.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"name",children:"Task Title"}),(0,Rt.jsx)($,{id:"name",value:n.name,onChange:b=>d("name",b.target.value),placeholder:"Enter task title",required:!0})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:n.description,onChange:b=>d("description",b.target.value),placeholder:"Enter task description",rows:3})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Type"}),(0,Rt.jsx)(At,{type:"single",value:n.type,onValueChange:b=>b&&d("type",b),children:Es.map(b=>{let R=b.icon;return(0,Rt.jsxs)(Lt,{value:b.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Rt.jsx)(R,{className:"h-4 w-4"}),b.label]},b.value)})})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Priority"}),(0,Rt.jsx)(At,{type:"single",value:n.priority,onValueChange:b=>b&&d("priority",b),children:Ms.map(b=>(0,Rt.jsx)(Lt,{value:b.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:b.label},b.value))})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"points",children:"Story Points"}),(0,Rt.jsx)($,{id:"points",type:"number",min:"1",max:"100",value:n.points,onChange:b=>d("points",parseInt(b.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"epic",children:"Epic"}),(0,Rt.jsxs)(Be,{value:n.epicId,onValueChange:b=>d("epicId",b),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select an epic"})}),(0,Rt.jsx)(Te,{children:o.map(b=>(0,Rt.jsx)(J,{value:b.id,children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${b.color}`}),b.name]})},b.id))})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Rt.jsxs)(Be,{value:n.sprintId,onValueChange:b=>d("sprintId",b),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select a sprint"})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"none",children:"No Sprint"}),i.map(b=>(0,Rt.jsx)(J,{value:b.id,children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[b.name,b.isActive&&(0,Rt.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},b.id))]})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"sprint",children:"Assignee"}),(0,Rt.jsxs)(Be,{value:n.assignee,onValueChange:b=>d("assignee",b),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select an Assignee"})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"none",children:"No Assignee"}),s.map(b=>(0,Rt.jsx)(J,{value:b.id,children:(0,Rt.jsx)("div",{className:"flex items-center gap-2",children:b.name})},b.id))]})]})]}),(0,Rt.jsxs)(Yt,{children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var za=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:i,className:s="",disabled:c=!1})=>{let[n,f]=(0,ge.useState)(!1),[p,d]=(0,ge.useState)(""),b=()=>{c||(f(!0),d(t))},R=async()=>{p!==t&&await i(e,p),f(!1)},g=y=>{y.key==="Enter"&&!o||y.key==="Enter"&&y.ctrlKey&&o?R():y.key==="Escape"&&(f(!1),d(""))};return(0,Rt.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,Rt.jsx)(T,{children:a}),n?o?(0,Rt.jsx)(xe,{value:p,onChange:y=>d(y.target.value),onBlur:R,onKeyDown:g,autoFocus:!0,rows:4,className:"resize-none"}):(0,Rt.jsx)($,{value:p,onChange:y=>d(y.target.value),onBlur:R,onKeyPress:g,autoFocus:!0,className:"text-lg font-medium"}):(0,Rt.jsxs)("div",{onClick:b,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Rt.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Rt.jsx)(Ho.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var da=le(require("react")),ft=le(require("@radix-ui/react-avatar"));var Oa=da.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(ft.Root,{ref:a,className:v("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Oa.displayName=ft.Root.displayName;var Is=da.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(ft.Image,{ref:a,className:v("aspect-square h-full w-full",e),...t}));Is.displayName=ft.Image.displayName;var Ha=da.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(ft.Fallback,{ref:a,className:v("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ha.displayName=ft.Fallback.displayName;var ir=({comments:e,onAddComment:t})=>{let[a,o]=(0,ge.useState)(""),i=c=>c.split(" ").map(n=>n[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)(Ho.MessageSquare,{className:"h-5 w-5"}),(0,Rt.jsx)(T,{className:"text-lg font-medium",children:"Comments"}),(0,Rt.jsx)(ue,{variant:"secondary",children:e.length})]}),(0,Rt.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,Rt.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Rt.jsx)(Oa,{className:"h-8 w-8 mt-1",children:(0,Rt.jsx)(Ha,{className:"text-xs bg-muted text-muted-foreground",children:i(c.author)})}),(0,Rt.jsxs)("div",{className:"flex-1",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Rt.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,Rt.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," Rt ",c.createdAt.toLocaleTimeString()]})]}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsx)(xe,{value:a,onChange:c=>o(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Rt.jsx)(w,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Rt.jsx)(Ho.Send,{className:"h-4 w-4"})})]})]})};var pa=({label:e,value:t,onValueChange:a,options:o,showColor:i=!1,disabled:s=!1})=>{let[c,n]=(0,ge.useState)(!1),f=o.find(d=>d.value===t);return(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Rt.jsxs)(Be,{value:t,onValueChange:a,open:c,onOpenChange:d=>{s||n(d)},disabled:s,children:[(0,Rt.jsx)(ke,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Rt.jsxs)(ue,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&n(!c),children:[i&&f?.color&&(0,Rt.jsx)("div",{className:`w-2 h-2 rounded-full ${f.color} mr-1`}),f?.label||"Select..."]})}),(0,Rt.jsx)(Te,{children:o.map(d=>(0,Rt.jsx)(J,{value:d.value,children:i&&d.color?(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var nr=({label:e,value:t,onValueChange:a,options:o,placeholder:i="Search...",allowCustomValue:s=!1,disabled:c=!1})=>{let[n,f]=(0,ge.useState)(!1),[p,d]=(0,ge.useState)(""),b=o.find(N=>N.value===t),R=o.filter(N=>N.label.toLowerCase().includes(p.toLowerCase())),g=N=>{a(N),f(!1),d("")},y=()=>{s&&p.trim()&&!o.find(N=>N.value===p.trim())&&(a(p.trim()),f(!1),d(""))};return(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Rt.jsxs)(Be,{value:t,onValueChange:g,open:n,onOpenChange:N=>{c||f(N)},disabled:c,children:[(0,Rt.jsx)(ke,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Rt.jsx)(ue,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&f(!n),children:b?.label||t||"Select..."})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)("div",{className:"p-2",children:(0,Rt.jsx)($,{placeholder:i,value:p,onChange:N=>d(N.target.value),onKeyDown:N=>{N.key==="Enter"&&s&&y()},className:"mb-2"})}),R.map(N=>(0,Rt.jsx)(J,{value:N.value,children:N.label},N.value)),s&&p.trim()&&!R.find(N=>N.value===p.trim())&&(0,Rt.jsxs)(J,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var As=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Ho.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Ho.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Ho.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Ho.Zap}],Ls=[{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"}];var lr=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:i,onClose:s,onDelete:c,isUpdating:n=!1,isDeleting:f=!1,deleteState:p="idle",teamMembers:d})=>{let b=g=>g.split(" ").map(y=>y[0]).join("").toUpperCase(),R=()=>p==="loading"?(0,Rt.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Rt.jsx)(Ho.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,Rt.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Rt.jsx)(Ho.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,Rt.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Rt.jsx)(Ho.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Rt.jsxs)(w,{onClick:c,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:n||f,children:[(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Rt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Rt.jsxs)("div",{className:"space-y-4",style:{opacity:n?.6:1},children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Rt.jsx)(pa,{label:"",value:e.status,onValueChange:g=>i("status",g),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Rt.jsx)(At,{type:"single",value:e.type,onValueChange:g=>g&&i("type",g),className:"grid grid-cols-2 gap-1",disabled:n,children:As.map(g=>{let y=g.icon;return(0,Rt.jsxs)(Lt,{value:g.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:n,children:[(0,Rt.jsx)(y,{className:"h-3 w-3"}),g.label]},g.value)})})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Rt.jsx)(At,{type:"single",value:e.priority,onValueChange:g=>g&&i("priority",g),className:"grid grid-cols-3 gap-1",disabled:n,children:Ls.map(g=>(0,Rt.jsx)(Lt,{value:g.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:n,children:g.label},g.value))})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Rt.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:g=>i("points",g.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:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Rt.jsx)(pa,{label:"",value:e.epicId,onValueChange:g=>i("epicId",g),options:(t||[]).map(g=>({value:g.id,label:g?.name,color:g.color})),showColor:!0,disabled:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Rt.jsx)(pa,{label:"",value:e.sprintId||"none",onValueChange:g=>i("sprintId",g==="none"?"":g),options:[{value:"none",label:"No Sprint"},...(a||[]).map(g=>({value:g.id,label:`${g?.name}${g.isActive?" (Active)":""}`}))],disabled:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Rt.jsx)(nr,{label:"",value:e.assignee?.value?.name,onValueChange:g=>i("assignee",g),options:d.map(g=>({value:`${typeof g.email=="string"?"users":"digital-colleagues"}:${g.id}`,label:g?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:n})]})]}),(0,Rt.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(w,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:n||f,children:"Close"}),R()]}),(0,Rt.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,Rt.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.User,{className:"h-3 w-3"}),(0,Rt.jsx)("span",{children:"System"})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-3 w-3"}),(0,Rt.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.Clock,{className:"h-3 w-3"}),(0,Rt.jsxs)("span",{children:[new Date(o).toLocaleDateString()," Rt"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var dr=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:i,onUpdateTask:s,onDeleteTask:c,onAddComment:n,colleagues:f})=>{let[p,d]=(0,ge.useState)(a),[b,R]=(0,ge.useState)(new Date),[g,y]=(0,ge.useState)("idle"),[B,N]=(0,ge.useState)("idle"),[U,O]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{d(a)},[a]);let V=async(K,Se)=>{if(Se!==p[K]){y("loading");try{let z=await s(p.id,{[K]:Se});d(z),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},Q=async(K,Se)=>{if(Se!==p[K]){y("loading");try{let z=await s(p.id,{[K]:Se});d(z),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},x=async K=>{if(n){y("loading");try{let Se=await n?.({content:K,taskId:p.id});d(Se),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},L=async()=>{N("loading");try{await c(p.id),N("success"),setTimeout(()=>{t(),N("idle")},1e3)}catch{N("error"),setTimeout(()=>N("idle"),3e3)}},ie=g!=="loading"&&B!=="loading",F=()=>{ie&&t()},pe=()=>g==="loading"?(0,Rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Rt.jsx)(Ho.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Rt.jsx)("span",{children:"Updating..."})]}):g==="success"?(0,Rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Rt.jsx)(Ho.Check,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:"Updated successfully"})]}):g==="error"?(0,Rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:"Update failed"})]}):null;return(0,Rt.jsx)(lt,{open:e,onOpenChange:F,children:(0,Rt.jsxs)(Qe,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Rt.jsxs)(et,{children:[(0,Rt.jsx)(tt,{className:"ge-only",children:p.name}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("div",{className:"flex-1",children:pe()}),!ie&&(0,Rt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Rt.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Rt.jsx)(za,{fieldName:"name",value:p.name,label:"",onSave:V,className:"border-b border-border pb-3",disabled:g==="loading"}),(0,Rt.jsx)(za,{fieldName:"description",value:p.description,label:"Description",multiline:!0,onSave:V,disabled:g==="loading"}),(0,Rt.jsx)(ir,{comments:(p?.comments||[]).map(K=>({author:K.author.value.name,createdAt:new Date(K.timestamp),text:K.content,id:K.id})),onAddComment:x})]}),(0,Rt.jsx)(lr,{task:p,epics:o,sprints:i,lastUpdated:b,onUpdateTask:Q,onClose:F,onDelete:L,isUpdating:g==="loading",isDeleting:B==="loading",deleteState:B,teamMembers:f})]})]})})};var ua=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,i]=(0,ge.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}),s=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],n=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],f=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),i({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())},p=(d,b)=>{i(R=>({...R,[d]:b}))};return(0,Rt.jsx)(lt,{open:e,onOpenChange:t,children:(0,Rt.jsxs)(Qe,{className:"sm:max-w-md",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Epic"})}),(0,Rt.jsxs)("form",{onSubmit:f,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"name",children:"Epic Name"}),(0,Rt.jsx)($,{id:"name",value:o.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:o.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Color"}),(0,Rt.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(d=>(0,Rt.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`w-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Confidence"}),(0,Rt.jsxs)(Be,{value:o.confidence,onValueChange:d=>p("confidence",d),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsx)(Te,{children:c.map(d=>(0,Rt.jsx)(J,{value:d.value,children:d.label},d.value))})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Phase"}),(0,Rt.jsxs)(Be,{value:o.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsx)(Te,{children:n.map(d=>(0,Rt.jsx)(J,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Start Date"}),(0,Rt.jsx)($,{type:"date",value:o.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"End Date"}),(0,Rt.jsx)($,{type:"date",value:o.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Progress (%)"}),(0,Rt.jsx)($,{type:"number",min:"0",max:"100",value:o.progress,onChange:d=>p("progress",parseInt(d.target.value)||0)})]}),(0,Rt.jsxs)(Yt,{children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var pr=require("motion/react");function mr(e,t){let[a,o]=(0,ge.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),i=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,ge.useEffect)(()=>{i(a)},[]),[a,i]}var fa=require("react-icons/fa");function mt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:i,gradient:s,children:c,className:n}){let[f,p]=mr(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!i&&!t),d=!i&&!t||f;return(0,Rt.jsxs)(pr.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${n||""}`,children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Rt.jsx)(ue,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Rt.jsx)("h2",{className:"text-3xl font-bold Rt-0",children:e})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,Rt.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(i||t)&&(0,Rt.jsx)("button",{"aria-label":f?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!f),style:{lineHeight:0},children:f?(0,Rt.jsx)(fa.FaChevronDown,{size:22}):(0,Rt.jsx)(fa.FaChevronUp,{size:22})})]})]}),!d&&(0,Rt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Rt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Rt.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),i&&(0,Rt.jsx)(w,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,Rt.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var ur=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:i=[],initialProjects:s=[],onAddTask:c,onUpdateTask:n,onDeleteTask:f,onTaskClick:p,onAddEpic:d,onAddComment:b})=>{let[R,g]=(0,ge.useState)(e),[y,B]=(0,ge.useState)(t),[N,U]=(0,ge.useState)(a),[O,V]=(0,ge.useState)(!1),[Q,x]=(0,ge.useState)(!1),[L,ie]=(0,ge.useState)(null),[F,pe]=(0,ge.useState)(null),[K,Se]=(0,ge.useState)(o),[z,D]=(0,ge.useState)(i),[oe,je]=(0,ge.useState)(0),he=(0,ge.useRef)(null),se=(0,ge.useRef)(null),_e=y.filter(A=>!0).map(A=>A.id),Ue=N.find(A=>A.isSelected);_e.push("no-epic"),(0,ge.useEffect)(()=>{g(e)},[e]),(0,ge.useEffect)(()=>{B(t)},[t]),(0,ge.useEffect)(()=>{U(a)},[a]),(0,ge.useEffect)(()=>{let A=()=>{if(he.current){let Me=he.current.offsetHeight;je(Me)}};A();let ee=new ResizeObserver(A);he.current&&ee.observe(he.current);let ce=()=>{setTimeout(A,100)};return window.addEventListener("storage",ce),()=>{ee.disconnect(),window.removeEventListener("storage",ce)}},[]),(0,ge.useEffect)(()=>{let A=setTimeout(()=>{he.current&&je(he.current.offsetHeight)},300);return()=>clearTimeout(A)},[O,Q]);let st=R.filter(A=>{let ee=_e.includes(A.epicId)||!A.epicId;return!Ue||Ue.id==="all-tasks"?ee:Ue.id==="backlog"?ee&&!A.sprintId:ee&&A.sprintId===Ue.id}),Ne=A=>st.filter(ee=>ee.status===A),Ee=A=>{let ee={};return y.forEach(ce=>{ee[ce.id]=A.filter(Me=>Me.epicId===ce.id)}),ee["no-epic"]=A.filter(ce=>!ce.epicId),ee},Je=A=>{pe(A)},Ye=A=>{F&&(g(ee=>ee.map(ce=>ce.id===F.id?{...ce,status:A}:ce)),n?.(F.id,{status:A}),pe(null))},C=A=>{let ee={...A,id:Date.now().toString(),createdAt:new Date};g(ce=>[...ce,ee]),c?.(A)},I=async(A,ee)=>{g(Me=>Me.map(u=>u.id===A?{...u,...ee}:u)),n&&await n(A,ee);let ce=R.find(Me=>Me.id===A);if(!ce)throw new Error("Task not found");return{...ce,...ee}},re=async A=>{g(ee=>ee.filter(ce=>ce.id!==A)),L?.id===A&&ie(null),f&&await f(A)},bt=A=>{let ee={...A,id:Date.now().toString(),isSelected:!0};B(ce=>[...ce,ee]),d?.(A)},Gt=A=>{ie(A),p?.(A)},ht=[{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"}],xt=oe>0?`calc(100vh - ${oe+120}px)`:"calc(100vh - 12rem)";return(0,Rt.jsxs)("div",{ref:se,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Rt.jsx)("div",{ref:he,className:"flex-shrink-0",children:(0,Rt.jsx)(mt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-Rt from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>V(!0)},secondaryAction:{label:"Add epic",onClick:()=>x(!0)}})}),(0,Rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Rt.jsx)("div",{className:"h-full",style:{height:oe>0?`calc(100vh - ${oe+120}px)`:"calc(100vh - 12rem)"},children:(0,Rt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ht.map(A=>{let ee=Ne(A.status),ce=Ee(ee);return(0,Rt.jsx)(_o,{title:A.title,status:A.status,taskCount:ee.length,onDrop:Ye,isCompact:A.status==="done",height:xt,children:_e.map(Me=>{let u=y.find(W=>W.id===Me),P=ce[Me]||[];return P.length===0?null:(0,Rt.jsxs)("div",{className:"mb-6",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${u?.color}`}),(0,Rt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:u?.name||"No Epic"}),(0,Rt.jsx)(ue,{variant:"secondary",className:"text-xs",children:P.length})]})," ",(0,Rt.jsx)("div",{className:"space-y-3",children:P.map(W=>(0,Rt.jsx)(sa,{task:W,epic:u,onDragStart:Je,onTaskClick:Gt,isCompact:A.status==="done"},W.id))})]},Me)})},A.id)})})})}),(0,Rt.jsx)(la,{isOpen:O,onClose:()=>V(!1),onAddTask:C,assignees:[...z,...K],epics:y,sprints:N}),(0,Rt.jsx)(ua,{isOpen:Q,onClose:()=>x(!1),onAddEpic:bt}),L&&(0,Rt.jsx)(dr,{isOpen:!!L,onClose:()=>ie(null),initialTask:L,epics:y,sprints:N,onUpdateTask:I,onDeleteTask:re,colleagues:[...z,...K],onAddComment:b})]})};var gr=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddTaskToEpic:s,onAddEpic:c,onUpdateEpic:n,onDeleteEpic:f})=>{let[p,d]=(0,ge.useState)(null),[b,R]=(0,ge.useState)(null),[g,y]=(0,ge.useState)({}),[B,N]=(0,ge.useState)(0),U=(0,ge.useRef)(null),O=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{let D=()=>{if(U.current){let he=U.current.offsetHeight;N(he)}};D();let oe=new ResizeObserver(D);U.current&&oe.observe(U.current);let je=()=>{setTimeout(D,100)};return window.addEventListener("storage",je),()=>{oe.disconnect(),window.removeEventListener("storage",je)}},[]),(0,ge.useEffect)(()=>{let D=setTimeout(()=>{U.current&&N(U.current.offsetHeight)},300);return()=>clearTimeout(D)},[b]);let V=D=>{d(D)},Q=D=>{D.preventDefault()},x=(D,oe)=>{D.preventDefault(),p&&p.epicId!==oe&&(o(p.id,{epicId:oe}),d(null))},L=D=>e.filter(oe=>oe.epicId===D),ie=D=>{R(D.id),y({name:D.name,description:D.description,confidence:D.confidence,phase:D.phase,progress:D.progress})},F=()=>{b&&g.name&&(n(b,g),R(null),y({}))},pe=()=>{R(null),y({})},K=D=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&f(D)},Se=D=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[D]||`Phase ${D}`,z=D=>{switch(D){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,Rt.jsxs)("div",{ref:O,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Rt.jsx)("div",{ref:U,className:"flex-shrink-0",children:(0,Rt.jsx)(mt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-Rt from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:c}})}),(0,Rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Rt.jsx)("div",{className:"h-full overflow-y-auto",style:{height:B>0?`calc(100vh - ${B+120}px)`:"calc(100vh - 12rem)"},children:(0,Rt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:t.map(D=>{let oe=L(D.id),je=oe.reduce((se,_e)=>se+_e.points,0),he=B>0?`calc(100vh - ${B+200}px)`:"calc(100vh - 14rem)";return(0,Rt.jsxs)(de,{className:`flex flex-col ${b===D.id?"h-auto":""} bg-card shadow-sm`,style:{height:b===D.id?"auto":he,minHeight:"400px"},onDragOver:Q,onDrop:se=>x(se,D.id),children:[(0,Rt.jsx)("div",{className:"p-4 border-b border-border",children:b===D.id?(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)($,{value:g.name||"",onChange:se=>y({...g,name:se.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Rt.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:F,className:"p-1 h-8 w-8",children:(0,Rt.jsx)(Ho.Check,{className:"h-4 w-4"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:pe,className:"p-1 h-8 w-8",children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]})]}),(0,Rt.jsx)(xe,{value:g.description||"",onChange:se=>y({...g,description:se.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Rt.jsxs)("select",{value:g.confidence||D.confidence,onChange:se=>y({...g,confidence:se.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[(0,Rt.jsx)("option",{value:"low",children:"Low"}),(0,Rt.jsx)("option",{value:"medium",children:"Medium"}),(0,Rt.jsx)("option",{value:"high",children:"High"})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Rt.jsx)("select",{value:g.phase?.toString()||D.phase.toString(),onChange:se=>y({...g,phase:parseInt(se.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[1,2,3,4,5,6,7,8,9].map(se=>(0,Rt.jsxs)("option",{value:se.toString(),children:["Phase ",se]},se))})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,Rt.jsx)($,{type:"number",min:"0",max:"100",value:g.progress||D.progress,onChange:se=>y({...g,progress:parseInt(se.target.value)||0}),className:"text-xs"})]})]}):(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Rt.jsx)("div",{className:`w-4 h-4 rounded-full ${D.color}`}),(0,Rt.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:D.name}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>ie(D),className:"p-1 h-8 w-8",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>K(D.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]}),(0,Rt.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Rt.jsxs)(ue,{className:`text-xs ${z(D.confidence)}`,children:[D.confidence," confidence"]}),(0,Rt.jsxs)(ue,{variant:"outline",className:"text-xs",children:["Phase ",D.phase]}),(0,Rt.jsxs)(ue,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[oe.length," tasks"]}),(0,Rt.jsxs)(ue,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[je," pts"]})]}),D.description&&(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:D.description}),(0,Rt.jsxs)("div",{className:"mb-3",children:[(0,Rt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,Rt.jsx)("span",{className:"select-none",children:"Progress"}),(0,Rt.jsxs)("span",{className:"select-none",children:[D.progress,"%"]})]}),(0,Rt.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,Rt.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${D.progress}%`}})})]}),(0,Rt.jsxs)(w,{onClick:()=>s(D.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Rt.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Rt.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:oe.length===0?(0,Rt.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,Rt.jsx)(Ho.Move,{className:"h-8 w-8 mb-2"}),(0,Rt.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):oe.map(se=>(0,Rt.jsx)(sa,{task:se,epic:D,onDragStart:V,onTaskClick:i,isCompact:!0},se.id))})})]},D.id)})})})})]})};var fr=require("react-day-picker");function va({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Rt.jsx)(fr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:v("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 pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:v(oa({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:v("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-Rt-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-Rt-md [&:has(>.day-range-start)]:rounded-Rt-md first:[&:has([aria-selected])]:rounded-Rt-md last:[&:has([aria-selected])]:rounded-Rt-md":"[&:has([aria-selected])]:rounded-md"),day:v(oa({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},...o})}va.displayName="Calendar";var br=le(require("react")),pt=le(require("@radix-ui/react-popover"));var Ua=pt.Root,$a=pt.Trigger;var ba=br.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},i)=>(0,Rt.jsx)(pt.Portal,{children:(0,Rt.jsx)(pt.Content,{ref:i,align:t,sideOffset:a,className:v("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),...o})}));ba.displayName=pt.Content.displayName;var _a=require("date-fns");var xr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,i]=(0,ge.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),s=n=>{n.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,Rt.jsx)(lt,{open:e,onOpenChange:c,children:(0,Rt.jsxs)(Qe,{className:"sm:max-w-md",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Sprint"})}),(0,Rt.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"name",children:"Sprint Name *"}),(0,Rt.jsx)($,{id:"name",value:o.name,onChange:n=>i(f=>({...f,name:n.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:o.description,onChange:n=>i(f=>({...f,description:n.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Start Date *"}),(0,Rt.jsxs)(Ua,{children:[(0,Rt.jsx)($a,{asChild:!0,children:(0,Rt.jsxs)(w,{variant:"outline",className:v("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Rt.jsx)(Ho.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,_a.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Rt.jsx)(ba,{className:"w-auto p-0",align:"start",children:(0,Rt.jsx)(va,{mode:"single",selected:o.startDate,onSelect:n=>i(f=>({...f,startDate:n})),initialFocus:!0})})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"End Date *"}),(0,Rt.jsxs)(Ua,{children:[(0,Rt.jsx)($a,{asChild:!0,children:(0,Rt.jsxs)(w,{variant:"outline",className:v("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Rt.jsx)(Ho.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,_a.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Rt.jsx)(ba,{className:"w-auto p-0",align:"start",children:(0,Rt.jsx)(va,{mode:"single",selected:o.endDate,onSelect:n=>i(f=>({...f,endDate:n})),initialFocus:!0,disabled:n=>o.startDate?n<o.startDate:!1})})]})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:n=>i(f=>({...f,isActive:n.target.checked})),className:"rounded border-gray-300"}),(0,Rt.jsx)(T,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,Rt.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var yr=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddSprint:s,onUpdateSprint:c,onDeleteSprint:n})=>{let[f,p]=(0,ge.useState)([]),[d,b]=(0,ge.useState)(new Set),[R,g]=(0,ge.useState)(null),[y,B]=(0,ge.useState)(!1),[N,U]=(0,ge.useState)(null),[O,V]=(0,ge.useState)(null),[Q,x]=(0,ge.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[L,ie]=(0,ge.useState)("upcoming"),[F,pe]=(0,ge.useState)(!1),[K,Se]=(0,ge.useState)(0),z=(0,ge.useRef)(null),D=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{let u=()=>{z.current&&Se(z.current.offsetHeight)};u();let P=new ResizeObserver(u);return z.current&&P.observe(z.current),()=>P.disconnect()},[]);let oe=u=>t.find(P=>P.id===u),je=u=>a.find(P=>P.id===u),he=u=>{let P={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return P[u]||P.medium},se=u=>{let P=u.trim().split(" ");if(P.length===1)return P[0];let W=P[0],ae=P[P.length-1][0].toUpperCase();return`${W} ${ae}.`},_e=u=>{let P={},W=[];return u.forEach(ae=>{ae.epicId?(P[ae.epicId]||(P[ae.epicId]=[]),P[ae.epicId].push(ae)):W.push(ae)}),{tasksByEpic:P,unassignedTasks:W}},Ue=a.filter(u=>u.id!=="backlog"&&u.id!=="all-tasks"),st=Ue.filter(u=>{switch(L){case"active":return u.isActive;case"upcoming":return!u.isActive;default:return!0}}),Ne=Ue.filter(u=>f.includes(u.id)),Ee=e.filter(u=>!u.sprintId||u.sprintId==="backlog"||u.sprintId==="Backlog"),Je=Ee.reduce((u,P)=>u+(P.points||0),0),Ye=u=>{p(P=>P.includes(u)?P.filter(W=>W!==u):P.length<3?[...P,u]:P)},C=u=>{b(P=>{let W=new Set(P);return W.has(u)?W.delete(u):W.add(u),W})},I=u=>{s(u),B(!1)},re=u=>{V(u.id),x({name:u.name,description:u.description||"",startDate:u.startDate instanceof Date?u.startDate.toISOString().split("T")[0]:u.startDate,endDate:u.endDate instanceof Date?u.endDate.toISOString().split("T")[0]:u.endDate,isActive:u.isActive})},bt=()=>{O&&(c(O,{name:Q.name,description:Q.description,startDate:new Date(Q.startDate),endDate:new Date(Q.endDate),isActive:Q.isActive}),V(null))},Gt=()=>{V(null),x({name:"",description:"",startDate:"",endDate:"",isActive:!1})},ht=(u,P)=>{g(P),u.dataTransfer.effectAllowed="move"},xt=u=>{u.preventDefault(),u.dataTransfer.dropEffect="move"},A=u=>{U(u)},ee=()=>{U(null)},ce=(u,P)=>{if(u.preventDefault(),U(null),!R)return;let W=R.sprintId||void 0,ae=P==="backlog"?void 0:P;W!==ae&&o(R.id,{sprintId:ae}),g(null)},Me=({task:u,showSprint:P=!1})=>{let W=u.epicId?oe(u.epicId):null,ae=u.sprintId?je(u.sprintId):null;return(0,Rt.jsx)(de,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:$e=>{$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("text/plain",u.id),ht($e,u)},onClick:$e=>{R===null&&i(u)},style:{userSelect:"none"},children:(0,Rt.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Rt.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Rt.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:u.name}),(0,Rt.jsx)(ue,{className:`text-xs ${he(u.priority)}`,children:u.priority[0].toUpperCase()})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-1",children:[W&&(0,Rt.jsx)("div",{className:`w-2 h-2 rounded-full ${W.color}`}),(0,Rt.jsx)("span",{className:"text-muted-foreground truncate",children:W?.name})]}),(0,Rt.jsx)("span",{className:"text-muted-foreground",children:se(u.assignee)})]}),P&&ae&&(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-3 w-3"}),(0,Rt.jsx)("span",{children:ae.name})]})]})})};return(0,Rt.jsxs)("div",{ref:D,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Rt.jsx)("div",{ref:z,className:"flex-shrink-0",children:(0,Rt.jsx)(mt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-Rt from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>B(!0)}})}),(0,Rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Rt.jsxs)("div",{className:"h-full",style:{height:K>0?`calc(100vh - ${K+120}px)`:"calc(100vh - 12rem)"},children:[(0,Rt.jsxs)("div",{className:"mb-4",children:[(0,Rt.jsx)(de,{className:"p-3 bg-card shadow-sm",children:(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Rt.jsx)("div",{children:(0,Rt.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),f.length>0&&(0,Rt.jsx)("div",{className:"flex items-center gap-2",children:(0,Rt.jsx)("div",{className:"flex flex-wrap gap-1",children:Ne.map(u=>(0,Rt.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Rt.jsx)("span",{className:"max-w-[80px] truncate",children:u.name}),u.isActive&&(0,Rt.jsx)("span",{className:"text-success text-[10px]",children:"\u25CF"}),(0,Rt.jsx)("button",{onClick:()=>Ye(u.id),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]},u.id))})})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsxs)(w,{onClick:()=>B(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Rt.jsxs)(w,{onClick:()=>pe(!F),variant:"outline",size:"sm",className:"gap-1",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-3 w-3"}),F?"Close":"Select"]})]})]})}),F&&(0,Rt.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>pe(!1)}),(0,Rt.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-Rt shadow-xl z-10 transition-all duration-300 ease-in-out ${F?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Rt.jsxs)(de,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Rt.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>pe(!1),className:"h-8 w-8 p-0",children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Rt.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Rt.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active",count:a.filter(u=>u.isActive).length},{key:"upcoming",label:"Upcoming",count:a.filter(u=>!u.isActive).length}].map(u=>(0,Rt.jsxs)(w,{variant:L===u.key?"default":"outline",size:"sm",onClick:()=>ie(u.key),className:"text-xs h-8 px-3 flex-1",children:[u.label," (",u.count,")"]},u.key))}),(0,Rt.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:st.length>0?st.map(u=>{let P=f.includes(u.id),W=e.filter(Ie=>Ie.sprintId===u.id).length,ae=!P&&f.length<3;return(0,Rt.jsx)("div",{className:`p-3 rounded-lg border transition-all ${P?"bg-primary/10 border-primary/30":ae?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:O===u.id?(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsx)($,{value:Q.name,onChange:Ie=>x(Ve=>({...Ve,name:Ie.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Rt.jsx)(xe,{value:Q.description,onChange:Ie=>x(Ve=>({...Ve,description:Ie.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsxs)(w,{size:"sm",onClick:()=>bt(),className:"flex-1",children:[(0,Rt.jsx)(Ho.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,Rt.jsxs)(w,{size:"sm",variant:"outline",onClick:Gt,className:"flex-1",children:[(0,Rt.jsx)(Ho.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,Rt.jsxs)("div",{children:[(0,Rt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Rt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Rt.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:u.name}),u.isActive&&(0,Rt.jsx)(ue,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:u.description}),(0,Rt.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Rt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Rt.jsx)(Ho.CalendarDays,{className:"h-3 w-3"}),new Date(u.startDate).toLocaleDateString()]}),(0,Rt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Rt.jsx)(Ho.User,{className:"h-3 w-3"}),W," tasks"]})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>re(u),className:"h-6 w-6 p-0",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),u.id!=="backlog"&&u.id!=="all-tasks"&&(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>n(u.id),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]}),(0,Rt.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Rt.jsx)(w,{variant:P?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>Ye(u.id),disabled:!P&&f.length>=3,children:(0,Rt.jsx)("span",{className:"pointer-events-none select-none",children:P?"Deselect":f.length>=3?"Limit Reached":"Select"})})})]})},u.id)}):(0,Rt.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Rt.jsxs)("p",{className:"text-sm",children:['No sprints found for "',L,'" filter']}),(0,Rt.jsx)(w,{variant:"link",size:"sm",onClick:()=>ie("all"),className:"text-xs",children:"Show all sprints"})]})}),f.length===0&&(0,Rt.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Rt.jsxs)("div",{className:"text-center",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Rt.jsx)("div",{className:"lg:col-span-1",children:(0,Rt.jsxs)(de,{className:"p-4 h-full bg-card border-Rt-4 border-Rt-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:xt,onDragEnter:()=>A("backlog"),onDragLeave:ee,onDrop:u=>ce(u,"backlog"),style:{height:K>0?`calc(100vh - ${K+200}px)`:"calc(100vh - 16rem)"},children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Rt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsxs)(ue,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[Ee.length," tasks"]}),(0,Rt.jsxs)(ue,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Je," pts"]})]})]}),(0,Rt.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${N==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:u,unassignedTasks:P}=_e(Ee);return(0,Rt.jsxs)(Rt.Fragment,{children:[Object.entries(u).map(([W,ae])=>{let Ie=oe(W);if(!Ie)return null;let Ve=d.has(W);return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C(W),children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${Ie.color}`}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:Ie.name}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",ae.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:Ve?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ve&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:ae.map($e=>(0,Rt.jsx)(Me,{task:$e},$e.id))})]},W)}),P.length>0&&(()=>{let W=d.has("no-epic");return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C("no-epic"),children:[(0,Rt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",P.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:W?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!W&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:P.map(ae=>(0,Rt.jsx)(Me,{task:ae},ae.id))})]})})(),Ee.length===0&&(0,Rt.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"}),Ee.length>0&&Object.keys(u).length===0&&P.length===0&&(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),Ee.map(W=>(0,Rt.jsx)(Me,{task:W},W.id))]})]})})()})]})}),Ne.map(u=>{let P=e.filter(ae=>ae.sprintId===u.id),W=P.reduce((ae,Ie)=>ae+(Ie.points||0),0);return(0,Rt.jsxs)(de,{className:"p-4 h-full bg-card border-Rt-4 border-Rt-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:xt,onDragEnter:()=>A(u.id),onDragLeave:ee,onDrop:ae=>ce(ae,u.id),style:{height:K>0?`calc(100vh - ${K+200}px)`:"calc(100vh - 16rem)"},children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:u.name}),u.isActive&&(0,Rt.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsxs)(ue,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[P.length," tasks"]}),(0,Rt.jsxs)(ue,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[W," pts"]}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>re(u),className:"h-6 px-2",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),u.id!=="backlog"&&u.id!=="all-tasks"&&(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>n(u.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]}),(0,Rt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:ae,unassignedTasks:Ie}=_e(P);return(0,Rt.jsxs)(Rt.Fragment,{children:[Object.entries(ae).map(([Ve,$e])=>{let _t=oe(Ve);if(!_t)return null;let Wt=d.has(Ve);return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C(Ve),children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${_t.color}`}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:_t.name}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",$e.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:Wt?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Wt&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:$e.map(Kt=>(0,Rt.jsx)(Me,{task:Kt},Kt.id))})]},Ve)}),Ie.length>0&&(()=>{let Ve=d.has("no-epic");return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C("no-epic"),children:[(0,Rt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",Ie.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:Ve?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ve&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:Ie.map($e=>(0,Rt.jsx)(Me,{task:$e},$e.id))})]})})(),P.length===0&&(0,Rt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},u.id)})]}),(0,Rt.jsx)(xr,{isOpen:y,onClose:()=>B(!1),onAddSprint:I})]})})]})};var Bs=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Fs=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),zs=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Wa=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[i,s]=t.split(":");o.setHours(parseInt(i),parseInt(s))}return o<a},Ka=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Os=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Hs=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[i,s]=(0,ge.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,n]=(0,ge.useState)(!1),f=d=>{d.preventDefault();let b=e.find(g=>g?.id.toString()===i.colleagueId.toString());if(!b){console.error("No valid colleague selected"),n(!0);return}n(!1);let R={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:b,isCompleted:!1,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,priority:i.priority,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(g=>g.trim()):void 0};t(R),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ge.useEffect)(()=>{i.colleagueId&&n(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,Rt.jsx)(lt,{open:a,onOpenChange:o,children:(0,Rt.jsxs)(Qe,{className:"max-w-2xl",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Reminder"})}),(0,Rt.jsxs)("form",{onSubmit:f,className:"space-y-4",children:[(0,Rt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"title",children:"Title"}),(0,Rt.jsx)($,{id:"title",value:i.title,onChange:d=>s({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:i.description,onChange:d=>s({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"dueDate",children:"Due Date"}),(0,Rt.jsx)($,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>s({...i,dueDate:d.target.value}),required:!0})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Rt.jsx)($,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>s({...i,dueTime:d.target.value})})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Rt.jsxs)(Be,{value:i.colleagueId,onValueChange:d=>{s({...i,colleagueId:d})},required:!0,children:[(0,Rt.jsx)(ke,{className:`${c?"text-destructive border-red-500":""}`,children:(0,Rt.jsx)(We,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Rt.jsx)(Te,{children:p.map(d=>(0,Rt.jsx)(J,{value:d.id,children:d.name},d.id))})]}),c&&(0,Rt.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>s({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Rt.jsx)(T,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Rt.jsxs)(Be,{value:i.recurrencePattern,onValueChange:d=>s({...i,recurrencePattern:d}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"daily",children:"Daily"}),(0,Rt.jsx)(J,{value:"weekly",children:"Weekly"}),(0,Rt.jsx)(J,{value:"monthly",children:"Monthly"}),(0,Rt.jsx)(J,{value:"yearly",children:"Yearly"})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Rt.jsx)($,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>s({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Rt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",children:"Add Reminder"})]})]})]})})},Vs=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:i})=>{let[s,c]=(0,ge.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(", ")||""}),n=p=>{p.preventDefault();let d=t.find(b=>b?.id===s.colleagueId);if(!d){console.error("No valid colleague selected");return}a(e.id,{title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:d,priority:s.priority,isRecurring:s.isRecurring,recurrencePattern:s.isRecurring?s.recurrencePattern:void 0,recurrenceInterval:s.isRecurring?s.recurrenceInterval:void 0,reminderEnabled:s.reminderEnabled,reminderMinutes:s.reminderEnabled?s.reminderMinutes:void 0,tags:s.tags?s.tags.split(",").map(b=>b.trim()):void 0}),i()},f=t.filter(Boolean);return(0,Rt.jsx)(lt,{open:o,onOpenChange:i,children:(0,Rt.jsxs)(Qe,{className:"max-w-2xl",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Edit Reminder"})}),(0,Rt.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-title",children:"Title"}),(0,Rt.jsx)($,{id:"edit-title",value:s.title,onChange:p=>c({...s,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-priority",children:"Priority"}),(0,Rt.jsxs)(Be,{value:s.priority,onValueChange:p=>c({...s,priority:p}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"low",children:"\u{1F7E2} Low"}),(0,Rt.jsx)(J,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Rt.jsx)(J,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-description",children:"Description"}),(0,Rt.jsx)(xe,{id:"edit-description",value:s.description,onChange:p=>c({...s,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Rt.jsx)($,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:p=>c({...s,dueDate:p.target.value}),required:!0})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Rt.jsx)($,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:p=>c({...s,dueTime:p.target.value})})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,Rt.jsxs)(Be,{value:s.colleagueId,onValueChange:p=>c({...s,colleagueId:p}),required:!0,children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select a digital colleague"})}),(0,Rt.jsx)(Te,{children:f.map(p=>(0,Rt.jsx)(J,{value:p.id,children:p.name},p.id))})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring,onChange:p=>c({...s,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,Rt.jsx)(T,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,Rt.jsxs)(Be,{value:s.recurrencePattern,onValueChange:p=>c({...s,recurrencePattern:p}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"daily",children:"Daily"}),(0,Rt.jsx)(J,{value:"weekly",children:"Weekly"}),(0,Rt.jsx)(J,{value:"monthly",children:"Monthly"}),(0,Rt.jsx)(J,{value:"yearly",children:"Yearly"})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,Rt.jsx)($,{id:"edit-recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:p=>c({...s,recurrenceInterval:parseInt(p.target.value)})})]})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:s.reminderEnabled,onChange:p=>c({...s,reminderEnabled:p.target.checked}),className:"rounded border-border"}),(0,Rt.jsx)(T,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),s.reminderEnabled&&(0,Rt.jsxs)("div",{className:"pl-6",children:[(0,Rt.jsx)(T,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,Rt.jsxs)(Be,{value:s.reminderMinutes.toString(),onValueChange:p=>c({...s,reminderMinutes:parseInt(p)}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"5",children:"5 minutes before"}),(0,Rt.jsx)(J,{value:"15",children:"15 minutes before"}),(0,Rt.jsx)(J,{value:"30",children:"30 minutes before"}),(0,Rt.jsx)(J,{value:"60",children:"1 hour before"}),(0,Rt.jsx)(J,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,Rt.jsx)($,{id:"edit-tags",value:s.tags,onChange:p=>c({...s,tags:p.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Rt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",children:"Save Changes"})]})]})]})})},js=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[i,s]=(0,ge.useState)(!1);if(!e||!e.id)return null;let c=Wa(e.dueDate,e.dueTime),n=Ka(e.dueDate),f=Os(e.dueDate),p=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},d=()=>n?"Today":f?"Tomorrow":c&&!e.isCompleted?"Overdue":Fs(e.dueDate);return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(Vs,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>s(!1)}),(0,Rt.jsx)(de,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${c&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,Rt.jsx)(Ht,{className:"p-4",children:(0,Rt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Rt.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Rt.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,Rt.jsx)(Ho.CheckCircle,{className:"h-5 w-5"}):(0,Rt.jsx)(Ho.Circle,{className:"h-5 w-5"})}),(0,Rt.jsxs)("div",{className:"flex-1",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Rt.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,Rt.jsx)("span",{className:"text-sm",children:Bs(e.priority)}),e.isRecurring&&(0,Rt.jsx)(Ho.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,Rt.jsx)(Ho.Bell,{className:"h-4 w-4 text-success"})]}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{className:c&&!e.isCompleted?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(Ho.Clock,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:zs(e.dueTime)})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(Ho.User,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,Rt.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map((b,R)=>(0,Rt.jsx)(ue,{variant:"secondary",className:"text-xs",children:b},R))})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-4 w-4"})}),(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-4 w-4"})})]})]})})})]})},wr=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:i})=>{let[s,c]=(0,ge.useState)(e.filter(Boolean)),[n]=(0,ge.useState)(t.filter(Boolean)),[f,p]=(0,ge.useState)("all"),[d,b]=(0,ge.useState)(""),[R,g]=(0,ge.useState)(!1),y=x=>{if(!x.title||!x.colleague?.id){console.error("Invalid reminder data:",x);return}let L={...x,id:Date.now().toString(),createdAt:new Date};c(ie=>[...ie,L]),a?.(x)},B=(x,L)=>{if(!x){console.error("No reminder ID provided for update");return}c(ie=>ie.map(F=>F?.id===x?{...F,...L}:F)),o?.(x,L)},N=x=>{if(!x){console.error("No reminder ID provided for deletion");return}c(L=>L.filter(ie=>ie?.id!==x)),i?.(x)},O=s.filter(x=>{if(!x)return!1;if(d){let L=d.toLowerCase();if(!(x.title.toLowerCase().includes(L)||x.description.toLowerCase().includes(L)||x.colleague?.name?.toLowerCase().includes(L)||x.tags?.some(F=>F.toLowerCase().includes(L))))return!1}switch(f){case"pending":return!x.isCompleted;case"completed":return x.isCompleted;case"overdue":return!x.isCompleted&&Wa(x.dueDate,x.dueTime);case"today":return Ka(new Date(x.dueDate));default:return!0}}).sort((x,L)=>{if(!x||!L)return 0;if(x.isCompleted&&!L.isCompleted)return 1;if(!x.isCompleted&&L.isCompleted)return-1;let ie={high:3,medium:2,low:1},F=ie[L.priority]-ie[x.priority];return F!==0?F:x.dueDate.getTime()-L.dueDate.getTime()}),V={total:s.filter(Boolean).length,pending:s.filter(x=>x&&!x.isCompleted).length,completed:s.filter(x=>x&&x.isCompleted).length,overdue:s.filter(x=>x&&!x.isCompleted&&Wa(x.dueDate,x.dueTime)).length,today:s.filter(x=>x&&Ka(new Date(x.dueDate))).length},Q=n.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,Rt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Rt.jsx)(mt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-Rt from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{g(!0)}}}),(0,Rt.jsxs)("div",{className:"h-full bg-background",children:[(0,Rt.jsx)(Hs,{colleagues:n,onAddReminder:y,open:R,setOpen:g}),(0,Rt.jsxs)("div",{className:"p-6",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Rt.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Rt.jsxs)(w,{className:"flex items-center space-x-2",onClick:()=>g(!0),children:[(0,Rt.jsx)(Ho.Plus,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:"Add Reminder"})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-foreground",children:V.total}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-primary",children:V.pending}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-success",children:V.completed}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-destructive",children:V.overdue}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-warning",children:V.today}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Rt.jsx)("div",{className:"flex-1",children:(0,Rt.jsx)($,{placeholder:"Search reminders...",value:d,onChange:x=>b(x.target.value),className:"max-w-md"})}),(0,Rt.jsxs)(Be,{value:f,onValueChange:x=>p(x),children:[(0,Rt.jsx)(ke,{className:"w-40",children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsxs)(J,{value:"all",children:["All (",V.total,")"]}),(0,Rt.jsxs)(J,{value:"pending",children:["Pending (",V.pending,")"]}),(0,Rt.jsxs)(J,{value:"completed",children:["Completed (",V.completed,")"]}),(0,Rt.jsxs)(J,{value:"overdue",children:["Overdue (",V.overdue,")"]}),(0,Rt.jsxs)(J,{value:"today",children:["Today (",V.today,")"]})]})]})]}),(0,Rt.jsx)("div",{className:"space-y-4",children:O.length===0?(0,Rt.jsxs)(de,{className:"p-8 text-center",children:[(0,Rt.jsx)("div",{className:"text-muted-foreground",children:d||f!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&f==="all"&&(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):O.map(x=>x&&(0,Rt.jsx)(js,{reminder:x,colleagues:n,onUpdateReminder:B,onDeleteReminder:N},x.id))})]})]})]})};var Bt=le(require("@radix-ui/react-tabs"));function Nr({className:e,...t}){return(0,Rt.jsx)(Bt.Root,{"data-slot":"tabs",className:v("flex flex-col gap-2",e),...t})}function Cr({className:e,...t}){return(0,Rt.jsx)(Bt.List,{"data-slot":"tabs-list",className:v("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Sr({className:e,...t}){return(0,Rt.jsx)(Bt.Trigger,{"data-slot":"tabs-trigger",className:v("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 vt=le(require("react")),Y=le(require("@radix-ui/react-dropdown-menu"));var kr=Y.Root,Tr=Y.Trigger;var Us=vt.forwardRef(({className:e,inset:t,children:a,...o},i)=>(0,Rt.jsxs)(Y.SubTrigger,{ref:i,className:v("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),...o,children:[a,(0,Rt.jsx)($t.ChevronRightIcon,{className:"ml-auto"})]}));Us.displayName=Y.SubTrigger.displayName;var $s=vt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Y.SubContent,{ref:a,className:v("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}));$s.displayName=Y.SubContent.displayName;var qa=vt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Rt.jsx)(Y.Portal,{children:(0,Rt.jsx)(Y.Content,{ref:o,sideOffset:t,className:v("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})}));qa.displayName=Y.Content.displayName;var Ja=vt.forwardRef(({className:e,inset:t,...a},o)=>(0,Rt.jsx)(Y.Item,{ref:o,className:v("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}));Ja.displayName=Y.Item.displayName;var Gs=vt.forwardRef(({className:e,children:t,checked:a,...o},i)=>(0,Rt.jsxs)(Y.CheckboxItem,{ref:i,className:v("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,...o,children:[(0,Rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Rt.jsx)(Y.ItemIndicator,{children:(0,Rt.jsx)($t.CheckIcon,{className:"h-4 w-4"})})}),t]}));Gs.displayName=Y.CheckboxItem.displayName;var _s=vt.forwardRef(({className:e,children:t,...a},o)=>(0,Rt.jsxs)(Y.RadioItem,{ref:o,className:v("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,Rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Rt.jsx)(Y.ItemIndicator,{children:(0,Rt.jsx)($t.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));_s.displayName=Y.RadioItem.displayName;var Ws=vt.forwardRef(({className:e,inset:t,...a},o)=>(0,Rt.jsx)(Y.Label,{ref:o,className:v("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Ws.displayName=Y.Label.displayName;var Ks=vt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Y.Separator,{ref:a,className:v("-mx-1 my-1 h-px bg-muted",e),...t}));Ks.displayName=Y.Separator.displayName;var qs=({className:e,...t})=>(0,Rt.jsx)("span",{className:v("ml-auto text-xs tracking-widest opacity-60",e),...t});qs.displayName="DropdownMenuShortcut";function Pr({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:i="700px",gridCols:s=6}){let c=a.find(n=>n.value===e);return(0,Rt.jsxs)(pr.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Rt.jsx)("div",{className:"hidden lg:block",children:(0,Rt.jsx)(Nr,{value:e,onValueChange:t,children:(0,Rt.jsx)(Cr,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,Rt.jsx)(pr.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Rt.jsx)(Sr,{value:n.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:n.label})},n.value))})})}),(0,Rt.jsx)("div",{className:"lg:hidden",children:(0,Rt.jsxs)(kr,{children:[(0,Rt.jsx)(Tr,{asChild:!0,children:(0,Rt.jsxs)(w,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,Rt.jsx)(Ho.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Rt.jsx)(qa,{align:"center",className:"w-[180px]",children:a.map(n=>(0,Rt.jsx)(Ja,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function xa({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:i=!0,className:s}){return(0,Rt.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[i&&(0,Rt.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Rt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Rt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Rt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Rt.jsx)("div",{className:"divide-y",children:e.map(c=>(0,Rt.jsxs)(pr.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?.(c),children:[(0,Rt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Rt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Rt.jsx)("div",{children:(0,Rt.jsx)("p",{className:"font-medium",children:c.name})})]}),(0,Rt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:c.filesize}),(0,Rt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Rt.jsx)("span",{className:"text-sm md:text-base",children:typeof c.createdAt=="string"?c.createdAt:new Date(c.createdAt).toLocaleDateString()}),(0,Rt.jsx)("div",{className:"flex gap-1",children:(0,Rt.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),o?.(c)},children:(0,Rt.jsx)(Ho.Trash2,{className:"h-4 w-4"})})})]})]},c.name))})]})}function Za({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:i,compactView:s=!1,className:c}){let[n,f]=(0,ge.useState)(e),[p,d]=(0,ge.useState)(""),[b,R]=(0,ge.useState)("all"),[g,y]=(0,ge.useState)("all");(0,ge.useEffect)(()=>{f(e)},[e]);let B=Array.from(new Set(n.map(F=>F.mimeType))),N=n.filter(F=>{let pe=F.name.toLowerCase().includes(p.toLowerCase()),K=b==="all"||F.mimeType===b;return pe&&K}),U=N.slice(0,10),O=N.filter(Boolean),V=()=>{t?.()},Q=F=>{a?.(F)},x=F=>{console.log("deleting file",F),f(pe=>pe.filter(K=>K.name!==F.name)),o?.(F.id)},L=F=>{i?.(F)},ie=()=>{d(""),R("all")};return(0,Rt.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Rt.jsx)(pr.AnimatePresence,{mode:"wait",children:(0,Rt.jsx)(pr.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Rt.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,Rt.jsx)(mt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-Rt 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,Rt.jsx)(de,{children:(0,Rt.jsx)(Ht,{className:"pt-6",children:(0,Rt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Rt.jsx)("div",{className:"flex-1",children:(0,Rt.jsxs)("div",{className:"relative",children:[(0,Rt.jsx)(Ho.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Rt.jsx)($,{placeholder:"Search files...",value:p,onChange:F=>d(F.target.value),className:"pl-9"})]})}),(p||b!=="all")&&(0,Rt.jsxs)(w,{variant:"outline",onClick:ie,className:"gap-2",children:[(0,Rt.jsx)(Ho.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsx)(Pr,{activeTab:g,onTabChange:y,tabOptions:[{value:"all",label:`All Files (${N.length})`},{value:"recent",label:`Recent (${U.length})`}],maxWidth:"500px",gridCols:3}),g==="all"&&(0,Rt.jsx)(xa,{files:N,onFileClick:L,onFileEdit:Q,onFileDelete:x,showHeader:!s}),g==="recent"&&(0,Rt.jsx)(xa,{files:U,onFileClick:L,onFileEdit:Q,onFileDelete:x,showHeader:!s}),g==="shared"&&(0,Rt.jsx)(xa,{files:O,onFileClick:L,onFileEdit:Q,onFileDelete:x,showHeader:!s})]}),N.length===0&&(0,Rt.jsx)(de,{children:(0,Rt.jsx)(Ht,{className:"pt-6",children:(0,Rt.jsxs)("div",{className:"text-center py-8",children:[(0,Rt.jsx)(Ho.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Rt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Rt.jsx)("p",{className:"text-muted-foreground mb-4",children:p||b!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Rt.jsxs)(w,{onClick:V,className:"gap-2",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Mr=require("next/navigation");function Ir({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:i=[],initialReminders:s=[],initialColleagues:c=[],initialUsers:n=[],initialFiles:f=[],initialView:p="kanban",onAddTask:d,onUpdateTask:b,onDeleteTask:R,onTaskClick:g,onAddEpic:y,onUpdateEpic:B,onDeleteEpic:N,onAddTaskToEpic:U,onAddSprint:O,onUpdateSprint:V,onDeleteSprint:Q,onAddProject:x,onUpdateProject:L,onDeleteProject:ie,onFileAdd:F,onFileEdit:pe,onFileDelete:K,onFileClick:Se,onAddReminder:z,onUpdateReminder:D,onDeleteReminder:oe,onViewChange:je,onToggleMobileMenu:he,onTeamClick:se,onTeamChange:_e,onCopilotClick:Ue,handleAddComment:st}){let[Ne,Ee]=(0,ge.useState)(t),[Je,Ye]=(0,ge.useState)(a),[C,I]=(0,ge.useState)(o),[re,bt]=(0,ge.useState)(i),[Gt,ht]=(0,ge.useState)(s),[xt,A]=(0,ge.useState)(c),[ee,ce]=(0,ge.useState)(n),[Me,u]=(0,ge.useState)(f),[P,W]=(0,ge.useState)(!1),[ae,Ie]=(0,ge.useState)(!1),[Ve,$e]=(0,ge.useState)(null),[_t,Wt]=(0,ge.useState)(null),[Kt,Ya]=(0,ge.useState)(null),[Dt,Qa]=(0,ge.useState)(p||"kanban"),[Ar,Lr]=(0,ge.useState)(!1),eo=(0,Mr.useRouter)();(0,ge.useEffect)(()=>{Ee(t)},[t]),(0,ge.useEffect)(()=>{I(o)},[o]),(0,ge.useEffect)(()=>{Ye(a)},[a]),(0,ge.useEffect)(()=>{bt(i)},[i]),(0,ge.useEffect)(()=>{u(f)},[f]),(0,ge.useEffect)(()=>{ce(n)},[n]),(0,ge.useEffect)(()=>{A(c)},[c]),(0,ge.useEffect)(()=>{ht(s)},[s]),(0,ge.useEffect)(()=>{Qa(p)},[p]);let Br=Je.filter(h=>h.isSelected).map(h=>h.id),ea=C.find(h=>h.isSelected),Fr=Ne.filter(h=>{let S=Br.includes(h.epicId);return!ea||ea.id==="all-tasks"?S:ea.id==="backlog"?S&&!h.sprintId:S&&h.sprintId===ea.id}),Xs=h=>Fr.filter(S=>S.status===h),Zs=h=>{let S={};return Je.forEach(j=>{S[j.id]=h.filter(me=>me.epicId===j.id)}),S},Ys=h=>{Ya(h)},Qs=h=>{Kt&&(Ee(S=>S.map(j=>j.id===Kt.id?{...j,status:h}:j)),Ya(null))},to=h=>{let S={...h,id:Date.now().toString(),createdAt:new Date};Ee(j=>[...j,S]),d?.(S)},ta=async(h,S)=>(Ee(j=>j.map(me=>me.id===h?{...me,...S}:me)),await b?.(h,S)),en=async(h,S)=>{ta(h,S)},ao=h=>{Ee(S=>S.filter(j=>j.id!==h)),Ve?.id===h&&$e(null),R?.(h)},tn=async h=>{ao(h)},zr=h=>{let S={...h,id:Date.now().toString(),isSelected:!1};bt(j=>[...j,S]),x?.(h)},Or=(h,S)=>{bt(j=>j.map(me=>me.id===h?S.isSelected?(eo.push(`/project/${h}`),{...me,...S}):{...me,...S}:S.isSelected&&h!==me.id?{...me,isSelected:!1}:me)),L?.(h,S)},Hr=h=>{bt(S=>S.filter(j=>j.id!==h)),ie?.(h)},oo=h=>{let S={...h,id:Date.now().toString(),isSelected:!0};Ye(j=>[...j,S]),y?.({...S})},ro=()=>{Ie(!0)},io=(h,S)=>{Ye(j=>j.map(me=>me.id===h?{...me,...S}:me)),B?.(h,S)},so=h=>{Ye(S=>S.filter(j=>j.id!==h)),Ee(S=>S.filter(j=>j.epicId!==h)),N?.(h)},Vr=h=>{let S={...h,id:Date.now().toString(),isSelected:!1};I(j=>[...j,S]),O?.(h)},jr=(h,S)=>{I(j=>j.map(me=>me.id===h?S.isSelected?{...me,...S}:{...me,...S}:S.isSelected&&h!==me.id?{...me,isSelected:!1}:me)),V?.(h,S)},Ur=h=>{h==="backlog"||h==="all-tasks"||(I(S=>S.filter(j=>j.id!==h)),Ee(S=>S.map(j=>j.sprintId===h?{...j,sprintId:void 0}:j)),Q?.(h))},wa=h=>{$e(h)},$Rt=h=>{h==="planning"&&window.innerWidth<768||(Qa(h),je?.(h))},Gr=()=>{Lr(h=>!h),he?.()},an=()=>{eo.push("/")},on=h=>{console.log("Switching to team:",h)},rn=h=>{console.log("Switching to team:",h)},_r=h=>{Wt(h),W(!0)},Wr=()=>{W(!1),Wt(null)},Kr=h=>{let S={...h,id:Date.now().toString(),createdAt:new Date};ht(j=>[...j,S]),z?.(h)},qr=(h,S)=>{ht(j=>j.map(me=>me.id===h?{...me,...S}:me)),D?.(h,S)},Jr=h=>{ht(S=>S.filter(j=>j.id!==h)),oe?.(h)},Xr=()=>{F?.()},Zr=h=>{pe?.(h)},Yr=h=>{u(S=>S.filter(j=>j.name!==h)),K?.(h)},Qr=h=>{Se?.(h)},sn=[{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"}],nn=()=>{switch(Dt){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"}},Na=[{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")}],ln=Na.sort((h,S)=>S.lastUsed.getTime()-h.lastUsed.getTime()).slice(0,3),dn=Na.length>3,cn=Na.slice(3);return(0,Rt.jsxs)(Uo,{projects:re,epics:Je,sprints:C,currentView:Dt,onUpdateProject:Or,onDeleteProject:Hr,onAddProject:zr,onUpdateEpic:io,onDeleteEpic:so,onAddEpic:ro,onViewChange:$Rt,mobileMenuOpen:Ar,onToggleMobileMenu:Gr,children:[Dt==="kanban"&&(0,Rt.jsx)("div",{className:"h-full overflow-hidden",children:(0,Rt.jsx)(ur,{initialProjects:re,initialEpics:Je,initialSprints:C,initialTasks:Ne,initialColleagues:xt,initialUsers:ee,onAddTask:to,onUpdateTask:ta,onDeleteTask:ao,onTaskClick:wa,onAddEpic:oo,onAddComment:st})}),Dt==="planning"&&(0,Rt.jsx)("div",{className:"hidden md:block h-full",children:(0,Rt.jsx)(yr,{tasks:Ne,epics:Je,sprints:C,onUpdateTask:ta,onTaskClick:wa,onAddSprint:Vr,onUpdateSprint:jr,onDeleteSprint:Ur})}),Dt==="tasks"&&(0,Rt.jsx)("div",{className:"h-full",children:(0,Rt.jsx)(wr,{initialReminders:Gt,initialColleagues:xt,onAddReminder:Kr,onUpdateReminder:qr,onDeleteReminder:Jr})}),Dt==="files"&&(0,Rt.jsx)("div",{className:"h-full",children:(0,Rt.jsx)(Za,{initialFiles:Me,onFileAdd:Xr,onFileEdit:Zr,onFileDelete:Yr,onFileClick:Qr,compactView:!1})}),Dt==="epics"&&(0,Rt.jsx)("div",{className:"h-full",children:(0,Rt.jsx)(gr,{tasks:Ne,epics:Je,sprints:C,onUpdateTask:ta,onTaskClick:wa,onAddTaskToEpic:_r,onAddEpic:ro,onUpdateEpic:io,onDeleteEpic:so})}),(0,Rt.jsx)(la,{isOpen:P,onClose:Wr,onAddTask:to,epics:Je,sprints:C,assignees:[...xt,...ee],defaultEpicId:_t||void 0}),(0,Rt.jsx)(ua,{isOpen:ae,onClose:()=>Ie(!1),onAddEpic:oo})]})}
5
+ "use strict";"use client";var ei=Object.create;var aa=Object.defineProperty;var ti=Object.getOwnPropertyDescriptor;var ai=Object.getOwnPropertyNames;var oi=Object.getPrototypeOf,ri=Object.prototype.hasOwnProperty;var ii=(e,t)=>{for(var a in t)aa(e,a,{get:t[a],enumerable:!0})},no=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ai(t))!ri.call(e,i)&&i!==a&&aa(e,i,{get:()=>t[i],enumerable:!(o=ti(t,i))||o.enumerable});return e};var le=(e,t,a)=>(a=e!=null?ei(oi(e)):{},no(t||!e||!e.__esModule?aa(a,"default",{value:e,enumerable:!0}):a,e)),si=e=>no(aa({},"__esModule",{value:!0}),e);var Js={};ii(Js,{default:()=>Ir});module.exports=si(Js);var ge=require("react");var Pt=le(require("react"));var bo=require("clsx");var ka="-",ni=e=>{let t=di(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let n=c.split(ka);return n[0]===""&&n.length!==1&&n.shift(),mo(n,t)||li(c)},getConflictingClassGroupIds:(c,n)=>{let f=a[c]||[];return n&&o[c]?[...f,...o[c]]:f}}},mo=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),i=o?mo(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let s=e.join(ka);return t.validators.find(({validator:c})=>c(s))?.classGroupId},lo=/^\[(.+)\]$/,li=e=>{if(lo.test(e)){let t=lo.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},di=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return mi(Object.entries(e.classGroups),a).forEach(([s,c])=>{Sa(c,o,s,t)}),o},Sa=(e,t,a,o)=>{e.forEach(i=>{if(typeof i=="string"){let s=i===""?t:co(t,i);s.classGroupId=a;return}if(typeof i=="function"){if(ci(i)){Sa(i(o),t,a,o);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([s,c])=>{Sa(c,co(t,s),a,o)})})},co=(e,t)=>{let a=e;return t.split(ka).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ci=e=>e.isThemeGetter,mi=(e,t)=>t?e.map(([a,o])=>{let i=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,n])=>[t+c,n])):s);return[a,i]}):e,pi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,i=(s,c)=>{a.set(s,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let c=a.get(s);if(c!==void 0)return c;if((c=o.get(s))!==void 0)return i(s,c),c},set(s,c){a.has(s)?a.set(s,c):i(s,c)}}},po="!",ui=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,i=t[0],s=t.length,c=n=>{let f=[],p=0,d=0,b;for(let N=0;N<n.length;N++){let U=n[N];if(p===0){if(U===i&&(o||n.slice(N,N+s)===t)){f.push(n.slice(d,N)),d=N+s;continue}if(U==="/"){b=N;continue}}U==="["?p++:U==="]"&&p--}let R=f.length===0?n:n.substring(d),g=R.startsWith(po),y=g?R.substring(1):R,B=b&&b>d?b-d:void 0;return{modifiers:f,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:B}};return a?n=>a({className:n,parseClassName:c}):c},gi=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},fi=e=>({cache:pi(e.cacheSize),parseClassName:ui(e),...ni(e)}),vi=/\s+/,bi=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=t,s=[],c=e.trim().split(vi),n="";for(let f=c.length-1;f>=0;f-=1){let p=c[f],{modifiers:d,hasImportantModifier:b,baseClassName:R,maybePostfixModifierPosition:g}=a(p),y=!!g,B=o(y?R.substring(0,g):R);if(!B){if(!y){n=p+(n.length>0?" "+n:n);continue}if(B=o(R),!B){n=p+(n.length>0?" "+n:n);continue}y=!1}let N=gi(d).join(":"),U=b?N+po:N,O=U+B;if(s.includes(O))continue;s.push(O);let V=i(B,y);for(let Q=0;Q<V.length;++Q){let x=V[Q];s.push(U+x)}n=p+(n.length>0?" "+n:n)}return n};function hi(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=uo(t))&&(o&&(o+=" "),o+=a);return o}var uo=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=uo(e[o]))&&(a&&(a+=" "),a+=t);return a};function xi(e,...t){let a,o,i,s=c;function c(f){let p=t.reduce((d,b)=>b(d),e());return a=fi(p),o=a.cache.get,i=a.cache.set,s=n,n(f)}function n(f){let p=o(f);if(p)return p;let d=bi(f,a);return i(f,d),d}return function(){return s(hi.apply(null,arguments))}}var fe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},go=/^\[(?:([a-z-]+):)?(.+)\]$/i,yi=/^\d+\/\d+$/,wi=new Set(["px","full","screen"]),Ni=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ci=/\d+(%|px|Rt?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|Rt?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Si=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ki=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Rt-?((\d+)?\.?(\d+)[a-z]+|0)/,Ti=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ut=e=>zt(e)||wi.has(e)||yi.test(e),yt=e=>Ot(e,"length",Li),zt=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>Ot(e,"number",zt),qt=e=>!!e&&Number.isInteger(Number(e)),Di=e=>e.endsWith("%")&&zt(e.slice(0,-1)),G=e=>go.test(e),wt=e=>Ni.test(e),Pi=new Set(["length","size","percentage"]),Ri=e=>Ot(e,Pi,fo),Ei=e=>Ot(e,"position",fo),Mi=new Set(["image","url"]),Ii=e=>Ot(e,Mi,Fi),Ai=e=>Ot(e,"",Bi),Jt=()=>!0,Ot=(e,t,a)=>{let o=go.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Li=e=>Ci.test(e)&&!Si.test(e),fo=()=>!1,Bi=e=>ki.test(e),Fi=e=>Ti.test(e);var zi=()=>{let e=fe("colors"),t=fe("spacing"),a=fe("blur"),o=fe("brightness"),i=fe("borderColor"),s=fe("borderRadius"),c=fe("borderSpacing"),n=fe("borderWidth"),f=fe("contrast"),p=fe("grayscale"),d=fe("hueRotate"),b=fe("invert"),R=fe("gap"),g=fe("gradientColorStops"),y=fe("gradientColorStopPositions"),B=fe("inset"),N=fe("margin"),U=fe("opacity"),O=fe("padding"),V=fe("saturate"),Q=fe("scale"),x=fe("sepia"),L=fe("skew"),ie=fe("space"),F=fe("translate"),pe=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],Se=()=>["auto",G,t],z=()=>[G,t],D=()=>["",ut,yt],oe=()=>["auto",zt,G],je=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],he=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>["start","end","center","between","around","evenly","stretch"],Ue=()=>["","0",G],st=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ne=()=>[zt,G];return{cacheSize:500,separator:":",theme:{colors:[Jt],spacing:[ut,yt],blur:["none","",wt,G],brightness:Ne(),borderColor:[e],borderRadius:["none","","full",wt,G],borderSpacing:z(),borderWidth:D(),contrast:Ne(),grayscale:Ue(),hueRotate:Ne(),invert:Ue(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[Di,yt],inset:Se(),margin:Se(),opacity:Ne(),padding:z(),saturate:Ne(),scale:Ne(),sepia:Ue(),skew:Ne(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[wt]}],"break-after":[{"break-after":st()}],"break-before":[{"break-before":st()}],"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:[...je(),G]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:pe()}],"overscroll-x":[{"overscroll-x":pe()}],"overscroll-y":[{"overscroll-y":pe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[B]}],"inset-x":[{"inset-x":[B]}],"inset-y":[{"inset-y":[B]}],start:[{start:[B]}],end:[{end:[B]}],top:[{top:[B]}],right:[{right:[B]}],bottom:[{bottom:[B]}],left:[{left:[B]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qt,G]}],basis:[{basis:Se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:Ue()}],shrink:[{shrink:Ue()}],order:[{order:["first","last","none",qt,G]}],"grid-cols":[{"grid-cols":[Jt]}],"col-start-end":[{col:["auto",{span:["full",qt,G]},G]}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":[Jt]}],"row-start-end":[{row:["auto",{span:[qt,G]},G]}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[R]}],"gap-x":[{"gap-x":[R]}],"gap-y":[{"gap-y":[R]}],"justify-content":[{justify:["normal",..._e()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._e(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._e(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],Rt:[{Rt:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[ie]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ie]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[wt]},wt]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wt,yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ca]}],"font-family":[{font:[Jt]}],"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",G]}],"line-clamp":[{"line-clamp":["none",zt,Ca]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ut,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[U]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ut,yt]}],"underline-offset":[{"underline-offset":["auto",ut,G]}],"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:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],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",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[U]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...je(),Ei]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ri]}],"bg-image":[{bg:["none",{"gradient-to":["t","Rt","Rt","br","b","bl","Rt","tl"]},Ii]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-Rt":[{"rounded-Rt":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-Rt":[{"rounded-Rt":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-Rt":[{"rounded-Rt":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-Rt":[{"border-Rt":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-Rt":[{"border-Rt":[n]}],"border-opacity":[{"border-opacity":[U]}],"border-style":[{border:[...he(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[U]}],"divide-style":[{divide:he()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-Rt":[{"border-Rt":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-Rt":[{"border-Rt":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...he()]}],"outline-offset":[{"outline-offset":[ut,G]}],"outline-w":[{outline:[ut,yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[U]}],"ring-offset-w":[{"ring-offset":[ut,yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wt,Ai]}],"shadow-color":[{shadow:[Jt]}],opacity:[{opacity:[U]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",wt,G]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[b]}],saturate:[{saturate:[V]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[U]}],"backdrop-saturate":[{"backdrop-saturate":[V]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:Ne()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:Ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Q]}],"scale-x":[{"scale-x":[Q]}],"scale-y":[{"scale-y":[Q]}],rotate:[{rotate:[qt,G]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],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","s-resize","w-resize","Rt-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-Rt":[{"scroll-Rt":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ut,yt,Ca]}],stroke:[{stroke:[e,"none"]}],ge:["ge-only","not-ge-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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],Rt:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","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-s","rounded-e","rounded-t","rounded-Rt","rounded-b","rounded-Rt","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-Rt","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-Rt"],"rounded-Rt":["rounded-Rt","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-Rt":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-Rt","border-w-b","border-w-Rt"],"border-w-x":["border-w-Rt","border-w-Rt"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-Rt","border-color-b","border-color-Rt"],"border-color-x":["border-color-Rt","border-color-Rt"],"border-color-y":["border-color-t","border-color-b"],"scroll-Rt":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var vo=xi(zi);function v(...e){return vo((0,bo.clsx)(e))}var Rt=require("react/jsx-runtime"),de=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("rounded-xl border bg-card text-card-foreground shadow",e),...t}));de.displayName="Card";var Oi=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("flex flex-col space-y-1.5 p-6",e),...t}));Oi.displayName="CardHeader";var Hi=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("font-semibold leading-none tracking-tight",e),...t}));Hi.displayName="CardTitle";var Vi=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("text-sm text-muted-foreground",e),...t}));Vi.displayName="CardDescription";var Ht=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("p-6 pt-0",e),...t}));Ht.displayName="CardContent";var ji=Pt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,className:v("flex items-center p-6 pt-0",e),...t}));ji.displayName="CardFooter";var ho=require("@radix-ui/react-slot"),xo=require("class-variance-authority"),yo=le(require("react")),oa=(0,xo.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=yo.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...i},s)=>(0,Rt.jsx)(e?ho.Slot:"button",{className:v(oa({className:t,size:a,variant:o})),ref:s,...i}));w.displayName="Button";var No=le(require("react"));var $=No.forwardRef(({className:e,type:t,...a},o)=>(0,Rt.jsx)("input",{type:t,className:v("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:o,...a}));$.displayName="Input";var So=le(require("react")),xe=So.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("textarea",{className:v("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}));xe.displayName="Textarea";var q=le(require("react")),Ho=require("lucide-react");var To=(e=768)=>{let[t,a]=(0,ge.useState)(!1);return(0,ge.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Do=le(require("react")),Ta=le(require("@radix-ui/react-separator"));var Da=Do.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},i)=>(0,Rt.jsx)(Ta.Root,{ref:i,decorative:a,orientation:t,className:v("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Da.displayName=Ta.Root.displayName;var Xt=le(require("react")),Ae=le(require("@radix-ui/react-dialog")),Ro=require("@radix-ui/react-icons");var Mo=Ae.Root;var Ui=Ae.Portal,Io=Xt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Ae.Overlay,{className:v("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}));Io.displayName=Ae.Overlay.displayName;var $i=(0,xo.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-Rt 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-Rt data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Pa=Xt.forwardRef(({side:e="right",className:t,children:a,...o},i)=>(0,Rt.jsxs)(Ui,{children:[(0,Rt.jsx)(Io,{}),(0,Rt.jsxs)(Ae.Content,{ref:i,className:v($i({side:e}),t),...o,children:[(0,Rt.jsxs)(Ae.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,Rt.jsx)(Ro.Cross2Icon,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{className:"ge-only",children:"Close"})]}),a]})]}));Pa.displayName=Ae.Content.displayName;var Gi=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col space-y-2 text-center sm:text-left",e),...t});Gi.displayName="SheetHeader";var _i=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_i.displayName="SheetFooter";var Wi=Xt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Ae.Title,{ref:a,className:v("text-lg font-semibold text-foreground",e),...t}));Wi.displayName=Ae.Title.displayName;var Ki=Xt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Ae.Description,{ref:a,className:v("text-sm text-muted-foreground",e),...t}));Ki.displayName=Ae.Description.displayName;function Ra({className:e,...t}){return(0,Rt.jsx)("div",{className:v("animate-pulse rounded-md bg-primary/10",e),...t})}var Lo=le(require("react")),nt=le(require("@radix-ui/react-tooltip"));var Bo=nt.Provider,Fo=nt.Root,zo=nt.Trigger,Ma=Lo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Rt.jsx)(nt.Portal,{children:(0,Rt.jsx)(nt.Content,{ref:o,sideOffset:t,className:v("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})}));Ma.displayName=nt.Content.displayName;var qi="sidebar:state",Ji=60*60*24*7,Xi="16rem",Zi="18rem",Yi="3rem",Qi="b",Vo=q.createContext(null);function ia(){let e=q.useContext(Vo);if(!e)throw new Error("useSidebar must Rt used within a SidebarProvider.");return e}var Ia=q.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:s,...c},n)=>{let f=To(),[p,d]=q.useState(!1),[b,R]=q.useState(e),g=t??b,y=q.useCallback(O=>{if(a)return a?.(typeof O=="function"?O(g):O);R(O),document.cookie=`${qi}=${g}; path=/; max-age=${Ji}`},[a,g]),B=q.useCallback(()=>f?d(O=>!O):y(O=>!O),[f,y,d]);q.useEffect(()=>{let O=V=>{V.key===Qi&&(V.metaKey||V.ctrlKey)&&(V.preventDefault(),B())};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[B]);let N=g?"expanded":"collapsed",U=q.useMemo(()=>({state:N,open:g,setOpen:y,isMobile:f,openMobile:p,setOpenMobile:d,toggleSidebar:B}),[N,g,y,f,p,d,B]);return(0,Rt.jsx)(Vo.Provider,{value:U,children:(0,Rt.jsx)(Bo,{delayDuration:0,children:(0,Rt.jsx)("div",{style:{"--sidebar-width":Xi,"--sidebar-width-icon":Yi,...i},className:v("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:n,...c,children:s})})})});Ia.displayName="SidebarProvider";var es=q.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...s},c)=>{let{isMobile:n,state:f,openMobile:p,setOpenMobile:d}=ia();return a==="none"?(0,Rt.jsx)("div",{className:v("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:c,...s,children:i}):n?(0,Rt.jsx)(Mo,{open:p,onOpenChange:d,...s,children:(0,Rt.jsx)(Pa,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Zi},side:e,children:(0,Rt.jsx)("div",{className:"flex h-full w-full flex-col",children:i})})}):(0,Rt.jsxs)("div",{ref:c,className:"group peer hidden md:block text-sidebar-foreground","data-state":f,"data-collapsible":f==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Rt.jsx)("div",{className:v("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)Rt+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Rt.jsx)("div",{className:v("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)Rt+_theme(spacing.4)Rt+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-Rt group-data-[side=right]:border-Rt",o),...s,children:(0,Rt.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:i})})]})});es.displayName="Sidebar";var ts=q.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:i}=ia();return(0,Rt.jsxs)(w,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:v("h-7 w-7",e),onClick:s=>{t?.(s),i()},...a,children:[(0,Rt.jsx)(Ho.PanelLeft,{}),(0,Rt.jsx)("span",{className:"ge-only",children:"Toggle Sidebar"})]})});ts.displayName="SidebarTrigger";var as=q.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=ia();return(0,Rt.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:v("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]Rt&]:cursor-w-resize [[data-side=right]Rt&]:cursor-e-resize","[[data-side=left][data-state=collapsed]Rt&]:cursor-e-resize [[data-side=right][data-state=collapsed]Rt&]: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]Rt&]:-right-2","[[data-side=right][data-collapsible=offcanvas]Rt&]:-left-2",e),...t})});as.displayName="SidebarRail";var os=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("main",{ref:a,className:v("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:Rt-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}));os.displayName="SidebarInset";var rs=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)($,{ref:a,"data-sidebar":"input",className:v("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));rs.displayName="SidebarInput";var is=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"header",className:v("flex flex-col gap-2 p-2",e),...t}));is.displayName="SidebarHeader";var ss=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"footer",className:v("flex flex-col gap-2 p-2",e),...t}));ss.displayName="SidebarFooter";var ns=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Da,{ref:a,"data-sidebar":"separator",className:v("mx-2 w-auto bg-sidebar-border",e),...t}));ns.displayName="SidebarSeparator";var ls=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"content",className:v("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ls.displayName="SidebarContent";var ds=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"group",className:v("relative flex w-full min-w-0 flex-col p-2",e),...t}));ds.displayName="SidebarGroup";var cs=q.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Rt.jsx)(t?ho.Slot:"div",{ref:o,"data-sidebar":"group-label",className:v("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}));cs.displayName="SidebarGroupLabel";var ms=q.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Rt.jsx)(t?ho.Slot:"button",{ref:o,"data-sidebar":"group-action",className:v("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}));ms.displayName="SidebarGroupAction";var ps=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"group-content",className:v("w-full text-sm",e),...t}));ps.displayName="SidebarGroupContent";var us=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("ul",{ref:a,"data-sidebar":"menu",className:v("flex w-full min-w-0 flex-col gap-1",e),...t}));us.displayName="SidebarMenu";var gs=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:v("group/menu-item relative",e),...t}));gs.displayName="SidebarMenuItem";var fs=(0,xo.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"}}),vs=q.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:i,className:s,...c},n)=>{let f=e?ho.Slot:"button",{isMobile:p,state:d}=ia(),b=(0,Rt.jsx)(f,{ref:n,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:v(fs({variant:a,size:o}),s),...c});return i?(typeof i=="string"&&(i={children:i}),(0,Rt.jsxs)(Fo,{children:[(0,Rt.jsx)(zo,{asChild:!0,children:b}),(0,Rt.jsx)(Ma,{side:"right",align:"center",hidden:d!=="collapsed"||p,...i})]})):b});vs.displayName="SidebarMenuButton";var bs=q.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},i)=>(0,Rt.jsx)(t?ho.Slot:"button",{ref:i,"data-sidebar":"menu-action",className:v("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),...o}));bs.displayName="SidebarMenuAction";var hs=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:v("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}));hs.displayName="SidebarMenuBadge";var xs=q.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let i=q.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Rt.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:v("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Rt.jsx)(Ra,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Rt.jsx)(Ra,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});xs.displayName="SidebarMenuSkeleton";var ys=q.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:v("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-Rt border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ys.displayName="SidebarMenuSub";var ws=q.forwardRef(({...e},t)=>(0,Rt.jsx)("li",{ref:t,...e}));ws.displayName="SidebarMenuSubItem";var Ns=q.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...i},s)=>(0,Rt.jsx)(e?ho.Slot:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:v("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",o),...i}));Ns.displayName="SidebarMenuSubButton";var jo=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:i,onDeleteProject:s,onAddProject:c,onUpdateEpic:n,onDeleteEpic:f,onAddEpic:p,onViewChange:d,mobileMenuOpen:b,onToggleMobileMenu:R})=>{let[g,y]=(0,ge.useState)(null),[B,N]=(0,ge.useState)(null),[U,O]=(0,ge.useState)(null),[V,Q]=(0,ge.useState)({name:"",description:""}),[x,L]=(0,ge.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[ie,F]=(0,ge.useState)(!1),[pe,K]=(0,ge.useState)({name:"",description:""}),Se=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],z=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],D=[{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"}],oe=C=>{N(C.id),Q({name:C.name,description:C.description||""})},je=()=>{B&&V.name.trim()&&(i(B,{name:V.name.trim(),description:V.description.trim()}),N(null))},he=()=>{N(null),Q({name:"",description:""})},se=()=>{pe.name.trim()&&(c({name:pe.name.trim(),description:pe.description.trim(),isSelected:!1}),K({name:"",description:""}),F(!1))},_e=C=>{i(C,{isSelected:!0})},Ue=C=>{O(C.id),L({name:C.name,description:C.description||"",color:C.color,confidence:C.confidence,phase:C.phase,startDate:C.startDate.toISOString().split("T")[0],endDate:C.endDate.toISOString().split("T")[0],progress:C.progress})},st=()=>{U&&x.name.trim()&&(n(U,{name:x.name.trim(),description:x.description.trim(),color:x.color,confidence:x.confidence,phase:x.phase,startDate:new Date(x.startDate),endDate:new Date(x.endDate),progress:x.progress}),O(null))},Ne=()=>{O(null),L({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},Ee=C=>C.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Je=C=>{let I=z.find(re=>re.value===C);return I?{label:I.label,color:I.color}:{label:"Medium",color:"text-warning"}},Ye=C=>{let I=D.find(re=>re.value===C);return I?{label:I.label,color:I.color}:{label:"Phase 1",color:"text-primary"}};return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${b?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:(0,Rt.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,Rt.jsxs)("button",{onClick:()=>{d("kanban"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Kanban View",children:[(0,Rt.jsx)(Ho.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("planning"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="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,Rt.jsx)(Ho.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("epics"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,Rt.jsx)(Ho.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("files"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,Rt.jsx)(Ho.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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,Rt.jsxs)("button",{onClick:()=>{d("tasks"),y(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="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,Rt.jsx)(Ho.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Rt.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"})]})]})}),b&&(0,Rt.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:R}),g&&(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>y(null)}),(0,Rt.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,Rt.jsxs)("div",{className:"p-3 md:p-4 border-b flex items-center justify-between",children:[(0,Rt.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[g==="projects"&&"Projects",g==="epics"&&"Manage Epics"]}),(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>y(null),children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]}),(0,Rt.jsxs)("div",{className:"p-3 md:p-4 space-y-4 h-full overflow-y-auto",children:[g==="projects"&&(0,Rt.jsx)(de,{className:"p-3",children:(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,Rt.jsxs)(w,{size:"sm",onClick:()=>F(!0),className:"gap-1",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),ie&&(0,Rt.jsxs)("div",{className:"border rounded-lg p-2 space-y-2",children:[(0,Rt.jsx)($,{value:pe.name,onChange:C=>K(I=>({...I,name:C.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Rt.jsx)(xe,{value:pe.description,onChange:C=>K(I=>({...I,description:C.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)(w,{size:"sm",onClick:se,className:"text-xs h-6",children:"Save"}),(0,Rt.jsx)(w,{size:"sm",variant:"outline",onClick:()=>F(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,Rt.jsx)("div",{className:"space-y-2",children:e.map(C=>(0,Rt.jsx)("div",{className:"border rounded p-2",children:B===C.id?(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)($,{value:V.name,onChange:I=>Q(re=>({...re,name:I.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Rt.jsx)(xe,{value:V.description,onChange:I=>Q(re=>({...re,description:I.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)(w,{size:"sm",onClick:je,className:"text-xs h-6",children:"Save"}),(0,Rt.jsx)(w,{size:"sm",variant:"outline",onClick:he,className:"text-xs h-6",children:"Cancel"})]})]}):(0,Rt.jsxs)("div",{className:`cursor-pointer p-1 rounded transition-colors ${C.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>_e(C.id),children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Rt.jsx)(Ho.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,Rt.jsx)("span",{className:"font-medium text-xs",children:C.name})]}),C.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground mb-1",children:C.description}),(0,Rt.jsxs)("div",{className:"flex gap-1",onClick:I=>I.stopPropagation(),children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>oe(C),className:"h-5 px-1",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>s(C.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]})},C.id))})]})}),g==="epics"&&(0,Rt.jsx)(de,{className:"p-3",children:(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,Rt.jsxs)(w,{size:"sm",onClick:p,className:"gap-1",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,Rt.jsx)("div",{className:"space-y-4",children:t.map(C=>(0,Rt.jsx)("div",{className:"border rounded-lg p-3",children:U===C.id?(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsx)($,{value:x.name,onChange:I=>L(re=>({...re,name:I.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,Rt.jsx)(xe,{value:x.description,onChange:I=>L(re=>({...re,description:I.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,Rt.jsx)("div",{className:"flex gap-1 flex-wrap",children:Se.map(I=>(0,Rt.jsx)("button",{onClick:()=>L(re=>({...re,color:I})),className:`w-6 h-6 rounded-full ${I} ${x.color===I?"ring-2 ring-ring":""}`},I))})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,Rt.jsx)("select",{value:x.confidence,onChange:I=>L(re=>({...re,confidence:I.target.value})),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:z.map(I=>(0,Rt.jsx)("option",{value:I.value,children:I.label},I.value))})]}),(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,Rt.jsx)("select",{value:x.phase.toString(),onChange:I=>L(re=>({...re,phase:parseInt(I.target.value)})),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:D.map(I=>(0,Rt.jsx)("option",{value:I.value.toString(),children:I.label},I.value))})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,Rt.jsx)($,{type:"date",value:x.startDate,onChange:I=>L(re=>({...re,startDate:I.target.value})),className:"text-xs h-8"})]}),(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,Rt.jsx)($,{type:"date",value:x.endDate,onChange:I=>L(re=>({...re,endDate:I.target.value})),className:"text-xs h-8"})]})]}),(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,Rt.jsx)($,{type:"number",min:"0",max:"100",value:x.progress,onChange:I=>L(re=>({...re,progress:parseInt(I.target.value)||0})),className:"text-xs h-8"})]}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsx)(w,{size:"sm",onClick:st,className:"text-xs",children:"Save"}),(0,Rt.jsx)(w,{size:"sm",variant:"outline",onClick:Ne,className:"text-xs",children:"Cancel"})]})]}):(0,Rt.jsxs)("div",{className:`cursor-pointer p-2 rounded transition-colors ${C.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>n(C.id,{isSelected:!C.isSelected}),children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${C.color}`}),(0,Rt.jsx)("span",{className:"font-medium text-sm",children:C.name})]}),C.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:C.description}),(0,Rt.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,Rt.jsx)("span",{className:Je(C.confidence).color,children:Je(C.confidence).label})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,Rt.jsx)("span",{className:Ye(C.phase).color,children:Ye(C.phase).label})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,Rt.jsxs)("span",{className:"text-foreground",children:[Ee(C.startDate)," - ",Ee(C.endDate)]})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,Rt.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${C.progress}%`}})}),(0,Rt.jsxs)("span",{className:"text-foreground",children:[C.progress,"%"]})]})]})]}),(0,Rt.jsxs)("div",{className:"flex gap-1",onClick:I=>I.stopPropagation(),children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>Ue(C),className:"h-6 px-2",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>f(C.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]})},C.id))})]})})]})]})]})]})},Uo=e=>(0,Rt.jsx)(Ia,{children:(0,Rt.jsxs)("div",{className:"flex w-full h-full",children:[(0,Rt.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,Rt.jsx)(jo,{...e})}),(0,Rt.jsx)("div",{className:"md:hidden",children:(0,Rt.jsx)(jo,{...e})}),(0,Rt.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6 h-full",children:(0,Rt.jsx)("div",{className:"w-full h-full",children:e.children})})]})});var Cs=(0,$o.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 ue({className:e,variant:t,...a}){return(0,Rt.jsx)("div",{className:v(Cs({variant:t}),e),...a})}var _o=({title:e,status:t,taskCount:a,children:o,onDrop:i,isCompact:s=!1,height:c})=>{let n=d=>{d.preventDefault()},f=d=>{d.preventDefault(),i(t)};return(0,Rt.jsxs)(de,{className:`p-4 bg-card border-Rt-4 ${(()=>{switch(t){case"todo":return"border-Rt-gray-400";case"in-progress":return"border-Rt-blue-500";case"review":return"border-Rt-orange-500";case"done":return"border-Rt-green-500";default:return"border-Rt-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${s?"lg:max-w-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:n,onDrop:f,children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Rt.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,Rt.jsx)(ue,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Rt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var sa=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:i=!1})=>{let s=d=>{a(e)},c=()=>{o(e)},n=()=>{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"}},f=()=>{switch(e.type){case"story":return(0,Rt.jsx)(Ho.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Rt.jsx)(Ho.Bug,{className:"h-3 w-3"});case"spike":return(0,Rt.jsx)(Ho.Zap,{className:"h-3 w-3"});case"task":default:return(0,Rt.jsx)(Ho.AlertCircle,{className:"h-3 w-3"})}},p=()=>{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 i?(0,Rt.jsx)(de,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:c,children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:f()}),(0,Rt.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Rt.jsxs)(de,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:c,children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Rt.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[f(),(0,Rt.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${n()}`,children:e.priority}),(0,Rt.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,Rt.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Rt.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,Rt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Rt.jsx)(Ho.User,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:e.assignee?.value?.name})]})})]})};var Zt=le(require("react")),Le=le(require("@radix-ui/react-dialog"));var lt=Le.Root;var Ss=Le.Portal;var Ko=Zt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Le.Overlay,{ref:a,className:v("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}));Ko.displayName=Le.Overlay.displayName;var Qe=Zt.forwardRef(({className:e,children:t,...a},o)=>(0,Rt.jsxs)(Ss,{children:[(0,Rt.jsx)(Ko,{}),(0,Rt.jsxs)(Le.Content,{ref:o,className:v("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,Rt.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,Rt.jsx)(Ho.X,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{className:"ge-only",children:"Close"})]})]})]}));Qe.displayName=Le.Content.displayName;var et=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});et.displayName="DialogHeader";var Yt=({className:e,...t})=>(0,Rt.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yt.displayName="DialogFooter";var tt=Zt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Le.Title,{ref:a,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));tt.displayName=Le.Title.displayName;var ks=Zt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Le.Description,{ref:a,className:v("text-sm text-muted-foreground",e),...t}));ks.displayName=Le.Description.displayName;var X=le(require("@radix-ui/react-select")),Ct=le(require("react")),Be=X.Root;var We=X.Value,ke=Ct.forwardRef(({children:e,className:t,...a},o)=>(0,Rt.jsxs)(X.Trigger,{className:v("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:o,...a,children:[e,(0,Rt.jsx)(X.Icon,{asChild:!0,children:(0,Rt.jsx)(Ho.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ke.displayName=X.Trigger.displayName;var qo=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Rt.jsx)(Ho.ChevronUp,{className:"h-4 w-4"})}));qo.displayName=X.ScrollUpButton.displayName;var Jo=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Rt.jsx)(Ho.ChevronDown,{className:"h-4 w-4"})}));Jo.displayName=X.ScrollDownButton.displayName;var Te=Ct.forwardRef(({children:e,className:t,position:a="popper",...o},i)=>(0,Rt.jsx)(X.Portal,{children:(0,Rt.jsxs)(X.Content,{className:v("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:i,...o,children:[(0,Rt.jsx)(qo,{}),(0,Rt.jsx)(X.Viewport,{className:v("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Rt.jsx)(Jo,{})]})}));Te.displayName=X.Content.displayName;var Ts=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Ts.displayName=X.Label.displayName;var J=Ct.forwardRef(({children:e,className:t,...a},o)=>(0,Rt.jsxs)(X.Item,{className:v("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:o,...a,children:[(0,Rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Rt.jsx)(X.ItemIndicator,{children:(0,Rt.jsx)(Ho.Check,{className:"h-4 w-4"})})}),(0,Rt.jsx)(X.ItemText,{children:e})]}));J.displayName=X.Item.displayName;var Ds=Ct.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(X.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Ds.displayName=X.Separator.displayName;var Xo=le(require("react")),Aa=le(require("@radix-ui/react-label"));var Ps=(0,xo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),T=Xo.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Aa.Root,{ref:a,className:v(Ps(),e),...t}));T.displayName=Aa.Root.displayName;var It=le(require("react")),jt=le(require("@radix-ui/react-toggle-group"));var Qo=le(require("react")),La=le(require("@radix-ui/react-toggle"));var Ba=(0,xo.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"}}),Rs=Qo.forwardRef(({className:e,variant:t,size:a,...o},i)=>(0,Rt.jsx)(La.Root,{ref:i,className:v(Ba({variant:t,size:a,className:e})),...o}));Rs.displayName=La.Root.displayName;var ar=It.createContext({size:"default",variant:"default"}),At=It.forwardRef(({className:e,variant:t,size:a,children:o,...i},s)=>(0,Rt.jsx)(jt.Root,{ref:s,className:v("flex items-center justify-center gap-1",e),...i,children:(0,Rt.jsx)(ar.Provider,{value:{variant:t,size:a},children:o})}));At.displayName=jt.Root.displayName;var Lt=It.forwardRef(({className:e,children:t,variant:a,size:o,...i},s)=>{let c=It.useContext(ar);return(0,Rt.jsx)(jt.Item,{ref:s,className:v(Ba({variant:c.variant||a,size:c.size||o}),e),...i,children:t})});Lt.displayName=jt.Item.displayName;var Es=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Ho.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:Ho.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Ho.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Ho.Zap}],Ms=[{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"}],la=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:i,assignees:s,defaultEpicId:c})=>{let[n,f]=(0,ge.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,ge.useEffect)(()=>{e&&c&&f(b=>({...b,epicId:c}))},[e,c]),(0,ge.useEffect)(()=>{e&&f({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let p=b=>{b.preventDefault(),n.name.trim()&&(a({name:n.name.trim(),description:n.description.trim(),status:"todo",priority:n.priority,type:n.type,points:n.points,epicId:n.epicId,sprintId:n.sprintId==="none"?void 0:n.sprintId,assignee:n.assignee.trim()||"Unassigned"}),f({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""}),t())},d=(b,R)=>{f(g=>({...g,[b]:R}))};return(0,Rt.jsx)(lt,{open:e,onOpenChange:t,children:(0,Rt.jsxs)(Qe,{className:"sm:max-w-md",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Task"})}),(0,Rt.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"name",children:"Task Title"}),(0,Rt.jsx)($,{id:"name",value:n.name,onChange:b=>d("name",b.target.value),placeholder:"Enter task title",required:!0})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:n.description,onChange:b=>d("description",b.target.value),placeholder:"Enter task description",rows:3})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Type"}),(0,Rt.jsx)(At,{type:"single",value:n.type,onValueChange:b=>b&&d("type",b),children:Es.map(b=>{let R=b.icon;return(0,Rt.jsxs)(Lt,{value:b.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Rt.jsx)(R,{className:"h-4 w-4"}),b.label]},b.value)})})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Priority"}),(0,Rt.jsx)(At,{type:"single",value:n.priority,onValueChange:b=>b&&d("priority",b),children:Ms.map(b=>(0,Rt.jsx)(Lt,{value:b.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:b.label},b.value))})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"points",children:"Story Points"}),(0,Rt.jsx)($,{id:"points",type:"number",min:"1",max:"100",value:n.points,onChange:b=>d("points",parseInt(b.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"epic",children:"Epic"}),(0,Rt.jsxs)(Be,{value:n.epicId,onValueChange:b=>d("epicId",b),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select an epic"})}),(0,Rt.jsx)(Te,{children:o.map(b=>(0,Rt.jsx)(J,{value:b.id,children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${b.color}`}),b.name]})},b.id))})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Rt.jsxs)(Be,{value:n.sprintId,onValueChange:b=>d("sprintId",b),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select a sprint"})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"none",children:"No Sprint"}),i.map(b=>(0,Rt.jsx)(J,{value:b.id,children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[b.name,b.isActive&&(0,Rt.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},b.id))]})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"sprint",children:"Assignee"}),(0,Rt.jsxs)(Be,{value:n.assignee,onValueChange:b=>d("assignee",b),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select an Assignee"})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"none",children:"No Assignee"}),s.map(b=>(0,Rt.jsx)(J,{value:b.id,children:(0,Rt.jsx)("div",{className:"flex items-center gap-2",children:b.name})},b.id))]})]})]}),(0,Rt.jsxs)(Yt,{children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var za=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:i,className:s="",disabled:c=!1})=>{let[n,f]=(0,ge.useState)(!1),[p,d]=(0,ge.useState)(""),b=()=>{c||(f(!0),d(t))},R=async()=>{p!==t&&await i(e,p),f(!1)},g=y=>{y.key==="Enter"&&!o||y.key==="Enter"&&y.ctrlKey&&o?R():y.key==="Escape"&&(f(!1),d(""))};return(0,Rt.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,Rt.jsx)(T,{children:a}),n?o?(0,Rt.jsx)(xe,{value:p,onChange:y=>d(y.target.value),onBlur:R,onKeyDown:g,autoFocus:!0,rows:4,className:"resize-none"}):(0,Rt.jsx)($,{value:p,onChange:y=>d(y.target.value),onBlur:R,onKeyPress:g,autoFocus:!0,className:"text-lg font-medium"}):(0,Rt.jsxs)("div",{onClick:b,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Rt.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Rt.jsx)(Ho.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var da=le(require("react")),ft=le(require("@radix-ui/react-avatar"));var Oa=da.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(ft.Root,{ref:a,className:v("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Oa.displayName=ft.Root.displayName;var Is=da.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(ft.Image,{ref:a,className:v("aspect-square h-full w-full",e),...t}));Is.displayName=ft.Image.displayName;var Ha=da.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(ft.Fallback,{ref:a,className:v("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ha.displayName=ft.Fallback.displayName;var ir=({comments:e,onAddComment:t})=>{let[a,o]=(0,ge.useState)(""),i=c=>c.split(" ").map(n=>n[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)(Ho.MessageSquare,{className:"h-5 w-5"}),(0,Rt.jsx)(T,{className:"text-lg font-medium",children:"Comments"}),(0,Rt.jsx)(ue,{variant:"secondary",children:e.length})]}),(0,Rt.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,Rt.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Rt.jsx)(Oa,{className:"h-8 w-8 mt-1",children:(0,Rt.jsx)(Ha,{className:"text-xs bg-muted text-muted-foreground",children:i(c.author)})}),(0,Rt.jsxs)("div",{className:"flex-1",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Rt.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,Rt.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," Rt ",c.createdAt.toLocaleTimeString()]})]}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsx)(xe,{value:a,onChange:c=>o(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Rt.jsx)(w,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Rt.jsx)(Ho.Send,{className:"h-4 w-4"})})]})]})};var pa=({label:e,value:t,onValueChange:a,options:o,showColor:i=!1,disabled:s=!1})=>{let[c,n]=(0,ge.useState)(!1),f=o.find(d=>d.value===t);return(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Rt.jsxs)(Be,{value:t,onValueChange:a,open:c,onOpenChange:d=>{s||n(d)},disabled:s,children:[(0,Rt.jsx)(ke,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Rt.jsxs)(ue,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&n(!c),children:[i&&f?.color&&(0,Rt.jsx)("div",{className:`w-2 h-2 rounded-full ${f.color} mr-1`}),f?.label||"Select..."]})}),(0,Rt.jsx)(Te,{children:o.map(d=>(0,Rt.jsx)(J,{value:d.value,children:i&&d.color?(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var nr=({label:e,value:t,onValueChange:a,options:o,placeholder:i="Search...",allowCustomValue:s=!1,disabled:c=!1})=>{let[n,f]=(0,ge.useState)(!1),[p,d]=(0,ge.useState)(""),b=o.find(N=>N.value===t),R=o.filter(N=>N.label.toLowerCase().includes(p.toLowerCase())),g=N=>{a(N),f(!1),d("")},y=()=>{s&&p.trim()&&!o.find(N=>N.value===p.trim())&&(a(p.trim()),f(!1),d(""))};return(0,Rt.jsxs)("div",{className:"space-y-1",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:e}),(0,Rt.jsxs)(Be,{value:t,onValueChange:g,open:n,onOpenChange:N=>{c||f(N)},disabled:c,children:[(0,Rt.jsx)(ke,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Rt.jsx)(ue,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&f(!n),children:b?.label||t||"Select..."})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)("div",{className:"p-2",children:(0,Rt.jsx)($,{placeholder:i,value:p,onChange:N=>d(N.target.value),onKeyDown:N=>{N.key==="Enter"&&s&&y()},className:"mb-2"})}),R.map(N=>(0,Rt.jsx)(J,{value:N.value,children:N.label},N.value)),s&&p.trim()&&!R.find(N=>N.value===p.trim())&&(0,Rt.jsxs)(J,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var As=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:Ho.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:Ho.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:Ho.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:Ho.Zap}],Ls=[{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"}];var lr=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:i,onClose:s,onDelete:c,isUpdating:n=!1,isDeleting:f=!1,deleteState:p="idle",teamMembers:d})=>{let b=g=>g.split(" ").map(y=>y[0]).join("").toUpperCase(),R=()=>p==="loading"?(0,Rt.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Rt.jsx)(Ho.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,Rt.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Rt.jsx)(Ho.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,Rt.jsxs)(w,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Rt.jsx)(Ho.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Rt.jsxs)(w,{onClick:c,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:n||f,children:[(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Rt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Rt.jsxs)("div",{className:"space-y-4",style:{opacity:n?.6:1},children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Rt.jsx)(pa,{label:"",value:e.status,onValueChange:g=>i("status",g),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Rt.jsx)(At,{type:"single",value:e.type,onValueChange:g=>g&&i("type",g),className:"grid grid-cols-2 gap-1",disabled:n,children:As.map(g=>{let y=g.icon;return(0,Rt.jsxs)(Lt,{value:g.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:n,children:[(0,Rt.jsx)(y,{className:"h-3 w-3"}),g.label]},g.value)})})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Rt.jsx)(At,{type:"single",value:e.priority,onValueChange:g=>g&&i("priority",g),className:"grid grid-cols-3 gap-1",disabled:n,children:Ls.map(g=>(0,Rt.jsx)(Lt,{value:g.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:n,children:g.label},g.value))})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Rt.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:g=>i("points",g.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:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Rt.jsx)(pa,{label:"",value:e.epicId,onValueChange:g=>i("epicId",g),options:(t||[]).map(g=>({value:g.id,label:g?.name,color:g.color})),showColor:!0,disabled:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Rt.jsx)(pa,{label:"",value:e.sprintId||"none",onValueChange:g=>i("sprintId",g==="none"?"":g),options:[{value:"none",label:"No Sprint"},...(a||[]).map(g=>({value:g.id,label:`${g?.name}${g.isActive?" (Active)":""}`}))],disabled:n})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Rt.jsx)(nr,{label:"",value:e.assignee?.value?.name,onValueChange:g=>i("assignee",g),options:d.map(g=>({value:`${typeof g.email=="string"?"users":"digital-colleagues"}:${g.id}`,label:g?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:n})]})]}),(0,Rt.jsxs)("div",{className:"mt-auto pt-4 space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(w,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:n||f,children:"Close"}),R()]}),(0,Rt.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,Rt.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.User,{className:"h-3 w-3"}),(0,Rt.jsx)("span",{children:"System"})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-3 w-3"}),(0,Rt.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.Clock,{className:"h-3 w-3"}),(0,Rt.jsxs)("span",{children:[new Date(o).toLocaleDateString()," Rt"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var dr=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:i,onUpdateTask:s,onDeleteTask:c,onAddComment:n,colleagues:f})=>{let[p,d]=(0,ge.useState)(a),[b,R]=(0,ge.useState)(new Date),[g,y]=(0,ge.useState)("idle"),[B,N]=(0,ge.useState)("idle"),[U,O]=(0,ge.useState)([]);(0,ge.useEffect)(()=>{d(a)},[a]);let V=async(K,Se)=>{if(Se!==p[K]){y("loading");try{let z=await s(p.id,{[K]:Se});d(z),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},Q=async(K,Se)=>{if(Se!==p[K]){y("loading");try{let z=await s(p.id,{[K]:Se});d(z),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},x=async K=>{if(n){y("loading");try{let Se=await n?.({content:K,taskId:p.id});d(Se),R(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},L=async()=>{N("loading");try{await c(p.id),N("success"),setTimeout(()=>{t(),N("idle")},1e3)}catch{N("error"),setTimeout(()=>N("idle"),3e3)}},ie=g!=="loading"&&B!=="loading",F=()=>{ie&&t()},pe=()=>g==="loading"?(0,Rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Rt.jsx)(Ho.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Rt.jsx)("span",{children:"Updating..."})]}):g==="success"?(0,Rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Rt.jsx)(Ho.Check,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:"Updated successfully"})]}):g==="error"?(0,Rt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:"Update failed"})]}):null;return(0,Rt.jsx)(lt,{open:e,onOpenChange:F,children:(0,Rt.jsxs)(Qe,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,Rt.jsxs)(et,{children:[(0,Rt.jsx)(tt,{className:"ge-only",children:p.name}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("div",{className:"flex-1",children:pe()}),!ie&&(0,Rt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Rt.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Rt.jsx)(za,{fieldName:"name",value:p.name,label:"",onSave:V,className:"border-b border-border pb-3",disabled:g==="loading"}),(0,Rt.jsx)(za,{fieldName:"description",value:p.description,label:"Description",multiline:!0,onSave:V,disabled:g==="loading"}),(0,Rt.jsx)(ir,{comments:(p?.comments||[]).map(K=>({author:K.author.value.name,createdAt:new Date(K.timestamp),text:K.content,id:K.id})),onAddComment:x})]}),(0,Rt.jsx)(lr,{task:p,epics:o,sprints:i,lastUpdated:b,onUpdateTask:Q,onClose:F,onDelete:L,isUpdating:g==="loading",isDeleting:B==="loading",deleteState:B,teamMembers:f})]})]})})};var ua=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,i]=(0,ge.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}),s=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],n=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],f=d=>{d.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),i({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())},p=(d,b)=>{i(R=>({...R,[d]:b}))};return(0,Rt.jsx)(lt,{open:e,onOpenChange:t,children:(0,Rt.jsxs)(Qe,{className:"sm:max-w-md",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Epic"})}),(0,Rt.jsxs)("form",{onSubmit:f,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"name",children:"Epic Name"}),(0,Rt.jsx)($,{id:"name",value:o.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:o.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Color"}),(0,Rt.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(d=>(0,Rt.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`w-8 h-8 rounded-full ${d} ${o.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Confidence"}),(0,Rt.jsxs)(Be,{value:o.confidence,onValueChange:d=>p("confidence",d),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsx)(Te,{children:c.map(d=>(0,Rt.jsx)(J,{value:d.value,children:d.label},d.value))})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Phase"}),(0,Rt.jsxs)(Be,{value:o.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsx)(Te,{children:n.map(d=>(0,Rt.jsx)(J,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Start Date"}),(0,Rt.jsx)($,{type:"date",value:o.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"End Date"}),(0,Rt.jsx)($,{type:"date",value:o.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Progress (%)"}),(0,Rt.jsx)($,{type:"number",min:"0",max:"100",value:o.progress,onChange:d=>p("progress",parseInt(d.target.value)||0)})]}),(0,Rt.jsxs)(Yt,{children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var pr=require("motion/react");function mr(e,t){let[a,o]=(0,ge.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),i=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,ge.useEffect)(()=>{i(a)},[]),[a,i]}var fa=require("react-icons/fa");function mt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:i,gradient:s,children:c,className:n}){let[f,p]=mr(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!i&&!t),d=!i&&!t||f;return(0,Rt.jsxs)(pr.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${n||""}`,children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Rt.jsx)(ue,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Rt.jsx)("h2",{className:"text-3xl font-bold Rt-0",children:e})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-3",children:[d&&o&&(0,Rt.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(i||t)&&(0,Rt.jsx)("button",{"aria-label":f?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!f),style:{lineHeight:0},children:f?(0,Rt.jsx)(fa.FaChevronDown,{size:22}):(0,Rt.jsx)(fa.FaChevronUp,{size:22})})]})]}),!d&&(0,Rt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Rt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Rt.jsx)(w,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),i&&(0,Rt.jsx)(w,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,Rt.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var ur=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:i=[],initialProjects:s=[],onAddTask:c,onUpdateTask:n,onDeleteTask:f,onTaskClick:p,onAddEpic:d,onAddComment:b})=>{let[R,g]=(0,ge.useState)(e),[y,B]=(0,ge.useState)(t),[N,U]=(0,ge.useState)(a),[O,V]=(0,ge.useState)(!1),[Q,x]=(0,ge.useState)(!1),[L,ie]=(0,ge.useState)(null),[F,pe]=(0,ge.useState)(null),[K,Se]=(0,ge.useState)(o),[z,D]=(0,ge.useState)(i),[oe,je]=(0,ge.useState)(0),he=(0,ge.useRef)(null),se=(0,ge.useRef)(null),_e=y.filter(A=>!0).map(A=>A.id),Ue=N.find(A=>A.isSelected);_e.push("no-epic"),(0,ge.useEffect)(()=>{g(e)},[e]),(0,ge.useEffect)(()=>{B(t)},[t]),(0,ge.useEffect)(()=>{U(a)},[a]),(0,ge.useEffect)(()=>{let A=()=>{if(he.current){let Me=he.current.offsetHeight;je(Me)}};A();let ee=new ResizeObserver(A);he.current&&ee.observe(he.current);let ce=()=>{setTimeout(A,100)};return window.addEventListener("storage",ce),()=>{ee.disconnect(),window.removeEventListener("storage",ce)}},[]),(0,ge.useEffect)(()=>{let A=setTimeout(()=>{he.current&&je(he.current.offsetHeight)},300);return()=>clearTimeout(A)},[O,Q]);let st=R.filter(A=>{let ee=_e.includes(A.epicId)||!A.epicId;return!Ue||Ue.id==="all-tasks"?ee:Ue.id==="backlog"?ee&&!A.sprintId:ee&&A.sprintId===Ue.id}),Ne=A=>st.filter(ee=>ee.status===A),Ee=A=>{let ee={};return y.forEach(ce=>{ee[ce.id]=A.filter(Me=>Me.epicId===ce.id)}),ee["no-epic"]=A.filter(ce=>!ce.epicId),ee},Je=A=>{pe(A)},Ye=A=>{F&&(g(ee=>ee.map(ce=>ce.id===F.id?{...ce,status:A}:ce)),n?.(F.id,{status:A}),pe(null))},C=A=>{let ee={...A,id:Date.now().toString(),createdAt:new Date};g(ce=>[...ce,ee]),c?.(A)},I=async(A,ee)=>{g(Me=>Me.map(u=>u.id===A?{...u,...ee}:u)),n&&await n(A,ee);let ce=R.find(Me=>Me.id===A);if(!ce)throw new Error("Task not found");return{...ce,...ee}},re=async A=>{g(ee=>ee.filter(ce=>ce.id!==A)),L?.id===A&&ie(null),f&&await f(A)},bt=A=>{let ee={...A,id:Date.now().toString(),isSelected:!0};B(ce=>[...ce,ee]),d?.(A)},Gt=A=>{ie(A),p?.(A)},ht=[{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"}],xt=oe>0?`calc(100vh - ${oe+120}px)`:"calc(100vh - 12rem)";return(0,Rt.jsxs)("div",{ref:se,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Rt.jsx)("div",{ref:he,className:"flex-shrink-0",children:(0,Rt.jsx)(mt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-Rt from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>V(!0)},secondaryAction:{label:"Add epic",onClick:()=>x(!0)}})}),(0,Rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Rt.jsx)("div",{className:"h-full",style:{height:oe>0?`calc(100vh - ${oe+120}px)`:"calc(100vh - 12rem)"},children:(0,Rt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ht.map(A=>{let ee=Ne(A.status),ce=Ee(ee);return(0,Rt.jsx)(_o,{title:A.title,status:A.status,taskCount:ee.length,onDrop:Ye,isCompact:A.status==="done",height:xt,children:_e.map(Me=>{let u=y.find(W=>W.id===Me),P=ce[Me]||[];return P.length===0?null:(0,Rt.jsxs)("div",{className:"mb-6",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${u?.color}`}),(0,Rt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:u?.name||"No Epic"}),(0,Rt.jsx)(ue,{variant:"secondary",className:"text-xs",children:P.length})]})," ",(0,Rt.jsx)("div",{className:"space-y-3",children:P.map(W=>(0,Rt.jsx)(sa,{task:W,epic:u,onDragStart:Je,onTaskClick:Gt,isCompact:A.status==="done"},W.id))})]},Me)})},A.id)})})})}),(0,Rt.jsx)(la,{isOpen:O,onClose:()=>V(!1),onAddTask:C,assignees:[...z,...K],epics:y,sprints:N}),(0,Rt.jsx)(ua,{isOpen:Q,onClose:()=>x(!1),onAddEpic:bt}),L&&(0,Rt.jsx)(dr,{isOpen:!!L,onClose:()=>ie(null),initialTask:L,epics:y,sprints:N,onUpdateTask:I,onDeleteTask:re,colleagues:[...z,...K],onAddComment:b})]})};var gr=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddTaskToEpic:s,onAddEpic:c,onUpdateEpic:n,onDeleteEpic:f})=>{let[p,d]=(0,ge.useState)(null),[b,R]=(0,ge.useState)(null),[g,y]=(0,ge.useState)({}),[B,N]=(0,ge.useState)(0),U=(0,ge.useRef)(null),O=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{let D=()=>{if(U.current){let he=U.current.offsetHeight;N(he)}};D();let oe=new ResizeObserver(D);U.current&&oe.observe(U.current);let je=()=>{setTimeout(D,100)};return window.addEventListener("storage",je),()=>{oe.disconnect(),window.removeEventListener("storage",je)}},[]),(0,ge.useEffect)(()=>{let D=setTimeout(()=>{U.current&&N(U.current.offsetHeight)},300);return()=>clearTimeout(D)},[b]);let V=D=>{d(D)},Q=D=>{D.preventDefault()},x=(D,oe)=>{D.preventDefault(),p&&p.epicId!==oe&&(o(p.id,{epicId:oe}),d(null))},L=D=>e.filter(oe=>oe.epicId===D),ie=D=>{R(D.id),y({name:D.name,description:D.description,confidence:D.confidence,phase:D.phase,progress:D.progress})},F=()=>{b&&g.name&&(n(b,g),R(null),y({}))},pe=()=>{R(null),y({})},K=D=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&f(D)},Se=D=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[D]||`Phase ${D}`,z=D=>{switch(D){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,Rt.jsxs)("div",{ref:O,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Rt.jsx)("div",{ref:U,className:"flex-shrink-0",children:(0,Rt.jsx)(mt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-Rt from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:c}})}),(0,Rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Rt.jsx)("div",{className:"h-full overflow-y-auto",style:{height:B>0?`calc(100vh - ${B+120}px)`:"calc(100vh - 12rem)"},children:(0,Rt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:t.map(D=>{let oe=L(D.id),je=oe.reduce((se,_e)=>se+_e.points,0),he=B>0?`calc(100vh - ${B+200}px)`:"calc(100vh - 14rem)";return(0,Rt.jsxs)(de,{className:`flex flex-col ${b===D.id?"h-auto":""} bg-card shadow-sm`,style:{height:b===D.id?"auto":he,minHeight:"400px"},onDragOver:Q,onDrop:se=>x(se,D.id),children:[(0,Rt.jsx)("div",{className:"p-4 border-b border-border",children:b===D.id?(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)($,{value:g.name||"",onChange:se=>y({...g,name:se.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Rt.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:F,className:"p-1 h-8 w-8",children:(0,Rt.jsx)(Ho.Check,{className:"h-4 w-4"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:pe,className:"p-1 h-8 w-8",children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]})]}),(0,Rt.jsx)(xe,{value:g.description||"",onChange:se=>y({...g,description:se.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Rt.jsxs)("select",{value:g.confidence||D.confidence,onChange:se=>y({...g,confidence:se.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[(0,Rt.jsx)("option",{value:"low",children:"Low"}),(0,Rt.jsx)("option",{value:"medium",children:"Medium"}),(0,Rt.jsx)("option",{value:"high",children:"High"})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Rt.jsx)("select",{value:g.phase?.toString()||D.phase.toString(),onChange:se=>y({...g,phase:parseInt(se.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",children:[1,2,3,4,5,6,7,8,9].map(se=>(0,Rt.jsxs)("option",{value:se.toString(),children:["Phase ",se]},se))})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,Rt.jsx)($,{type:"number",min:"0",max:"100",value:g.progress||D.progress,onChange:se=>y({...g,progress:parseInt(se.target.value)||0}),className:"text-xs"})]})]}):(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Rt.jsx)("div",{className:`w-4 h-4 rounded-full ${D.color}`}),(0,Rt.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:D.name}),(0,Rt.jsxs)("div",{className:"flex gap-1",children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>ie(D),className:"p-1 h-8 w-8",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>K(D.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]}),(0,Rt.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Rt.jsxs)(ue,{className:`text-xs ${z(D.confidence)}`,children:[D.confidence," confidence"]}),(0,Rt.jsxs)(ue,{variant:"outline",className:"text-xs",children:["Phase ",D.phase]}),(0,Rt.jsxs)(ue,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[oe.length," tasks"]}),(0,Rt.jsxs)(ue,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[je," pts"]})]}),D.description&&(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:D.description}),(0,Rt.jsxs)("div",{className:"mb-3",children:[(0,Rt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,Rt.jsx)("span",{className:"select-none",children:"Progress"}),(0,Rt.jsxs)("span",{className:"select-none",children:[D.progress,"%"]})]}),(0,Rt.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,Rt.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${D.progress}%`}})})]}),(0,Rt.jsxs)(w,{onClick:()=>s(D.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Rt.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,Rt.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${p?"border-primary bg-primary/10":"border-border"}`,children:oe.length===0?(0,Rt.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,Rt.jsx)(Ho.Move,{className:"h-8 w-8 mb-2"}),(0,Rt.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):oe.map(se=>(0,Rt.jsx)(sa,{task:se,epic:D,onDragStart:V,onTaskClick:i,isCompact:!0},se.id))})})]},D.id)})})})})]})};var fr=require("react-day-picker");function va({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Rt.jsx)(fr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:v("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 pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:v(oa({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:v("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-Rt-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-Rt-md [&:has(>.day-range-start)]:rounded-Rt-md first:[&:has([aria-selected])]:rounded-Rt-md last:[&:has([aria-selected])]:rounded-Rt-md":"[&:has([aria-selected])]:rounded-md"),day:v(oa({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},...o})}va.displayName="Calendar";var br=le(require("react")),pt=le(require("@radix-ui/react-popover"));var Ua=pt.Root,$a=pt.Trigger;var ba=br.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},i)=>(0,Rt.jsx)(pt.Portal,{children:(0,Rt.jsx)(pt.Content,{ref:i,align:t,sideOffset:a,className:v("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),...o})}));ba.displayName=pt.Content.displayName;var _a=require("date-fns");var xr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,i]=(0,ge.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),s=n=>{n.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,Rt.jsx)(lt,{open:e,onOpenChange:c,children:(0,Rt.jsxs)(Qe,{className:"sm:max-w-md",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Sprint"})}),(0,Rt.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"name",children:"Sprint Name *"}),(0,Rt.jsx)($,{id:"name",value:o.name,onChange:n=>i(f=>({...f,name:n.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:o.description,onChange:n=>i(f=>({...f,description:n.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"Start Date *"}),(0,Rt.jsxs)(Ua,{children:[(0,Rt.jsx)($a,{asChild:!0,children:(0,Rt.jsxs)(w,{variant:"outline",className:v("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Rt.jsx)(Ho.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,_a.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Rt.jsx)(ba,{className:"w-auto p-0",align:"start",children:(0,Rt.jsx)(va,{mode:"single",selected:o.startDate,onSelect:n=>i(f=>({...f,startDate:n})),initialFocus:!0})})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)(T,{children:"End Date *"}),(0,Rt.jsxs)(Ua,{children:[(0,Rt.jsx)($a,{asChild:!0,children:(0,Rt.jsxs)(w,{variant:"outline",className:v("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Rt.jsx)(Ho.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,_a.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Rt.jsx)(ba,{className:"w-auto p-0",align:"start",children:(0,Rt.jsx)(va,{mode:"single",selected:o.endDate,onSelect:n=>i(f=>({...f,endDate:n})),initialFocus:!0,disabled:n=>o.startDate?n<o.startDate:!1})})]})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:n=>i(f=>({...f,isActive:n.target.checked})),className:"rounded border-gray-300"}),(0,Rt.jsx)(T,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,Rt.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var yr=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddSprint:s,onUpdateSprint:c,onDeleteSprint:n})=>{let[f,p]=(0,ge.useState)([]),[d,b]=(0,ge.useState)(new Set),[R,g]=(0,ge.useState)(null),[y,B]=(0,ge.useState)(!1),[N,U]=(0,ge.useState)(null),[O,V]=(0,ge.useState)(null),[Q,x]=(0,ge.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[L,ie]=(0,ge.useState)("upcoming"),[F,pe]=(0,ge.useState)(!1),[K,Se]=(0,ge.useState)(0),z=(0,ge.useRef)(null),D=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{let u=()=>{z.current&&Se(z.current.offsetHeight)};u();let P=new ResizeObserver(u);return z.current&&P.observe(z.current),()=>P.disconnect()},[]);let oe=u=>t.find(P=>P.id===u),je=u=>a.find(P=>P.id===u),he=u=>{let P={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return P[u]||P.medium},se=u=>{let P=u.trim().split(" ");if(P.length===1)return P[0];let W=P[0],ae=P[P.length-1][0].toUpperCase();return`${W} ${ae}.`},_e=u=>{let P={},W=[];return u.forEach(ae=>{ae.epicId?(P[ae.epicId]||(P[ae.epicId]=[]),P[ae.epicId].push(ae)):W.push(ae)}),{tasksByEpic:P,unassignedTasks:W}},Ue=a.filter(u=>u.id!=="backlog"&&u.id!=="all-tasks"),st=Ue.filter(u=>{switch(L){case"active":return u.isActive;case"upcoming":return!u.isActive;default:return!0}}),Ne=Ue.filter(u=>f.includes(u.id)),Ee=e.filter(u=>!u.sprintId||u.sprintId==="backlog"||u.sprintId==="Backlog"),Je=Ee.reduce((u,P)=>u+(P.points||0),0),Ye=u=>{p(P=>P.includes(u)?P.filter(W=>W!==u):P.length<3?[...P,u]:P)},C=u=>{b(P=>{let W=new Set(P);return W.has(u)?W.delete(u):W.add(u),W})},I=u=>{s(u),B(!1)},re=u=>{V(u.id),x({name:u.name,description:u.description||"",startDate:u.startDate instanceof Date?u.startDate.toISOString().split("T")[0]:u.startDate,endDate:u.endDate instanceof Date?u.endDate.toISOString().split("T")[0]:u.endDate,isActive:u.isActive})},bt=()=>{O&&(c(O,{name:Q.name,description:Q.description,startDate:new Date(Q.startDate),endDate:new Date(Q.endDate),isActive:Q.isActive}),V(null))},Gt=()=>{V(null),x({name:"",description:"",startDate:"",endDate:"",isActive:!1})},ht=(u,P)=>{g(P),u.dataTransfer.effectAllowed="move"},xt=u=>{u.preventDefault(),u.dataTransfer.dropEffect="move"},A=u=>{U(u)},ee=()=>{U(null)},ce=(u,P)=>{if(u.preventDefault(),U(null),!R)return;let W=R.sprintId||void 0,ae=P==="backlog"?void 0:P;W!==ae&&o(R.id,{sprintId:ae}),g(null)},Me=({task:u,showSprint:P=!1})=>{let W=u.epicId?oe(u.epicId):null,ae=u.sprintId?je(u.sprintId):null;return(0,Rt.jsx)(de,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:$e=>{$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("text/plain",u.id),ht($e,u)},onClick:$e=>{R===null&&i(u)},style:{userSelect:"none"},children:(0,Rt.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,Rt.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Rt.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:u.name}),(0,Rt.jsx)(ue,{className:`text-xs ${he(u.priority)}`,children:u.priority[0].toUpperCase()})]}),(0,Rt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-1",children:[W&&(0,Rt.jsx)("div",{className:`w-2 h-2 rounded-full ${W.color}`}),(0,Rt.jsx)("span",{className:"text-muted-foreground truncate",children:W?.name})]}),(0,Rt.jsx)("span",{className:"text-muted-foreground",children:u.assignee})]}),P&&ae&&(0,Rt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-3 w-3"}),(0,Rt.jsx)("span",{children:ae.name})]})]})})};return(0,Rt.jsxs)("div",{ref:D,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Rt.jsx)("div",{ref:z,className:"flex-shrink-0",children:(0,Rt.jsx)(mt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-Rt from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>B(!0)}})}),(0,Rt.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Rt.jsxs)("div",{className:"h-full",style:{height:K>0?`calc(100vh - ${K+120}px)`:"calc(100vh - 12rem)"},children:[(0,Rt.jsxs)("div",{className:"mb-4",children:[(0,Rt.jsx)(de,{className:"p-3 bg-card shadow-sm",children:(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Rt.jsx)("div",{children:(0,Rt.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),f.length>0&&(0,Rt.jsx)("div",{className:"flex items-center gap-2",children:(0,Rt.jsx)("div",{className:"flex flex-wrap gap-1",children:Ne.map(u=>(0,Rt.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Rt.jsx)("span",{className:"max-w-[80px] truncate",children:u.name}),u.isActive&&(0,Rt.jsx)("span",{className:"text-success text-[10px]",children:"\u25CF"}),(0,Rt.jsx)("button",{onClick:()=>Ye(u.id),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]},u.id))})})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsxs)(w,{onClick:()=>B(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Rt.jsxs)(w,{onClick:()=>pe(!F),variant:"outline",size:"sm",className:"gap-1",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-3 w-3"}),F?"Close":"Select"]})]})]})}),F&&(0,Rt.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>pe(!1)}),(0,Rt.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-Rt shadow-xl z-10 transition-all duration-300 ease-in-out ${F?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,Rt.jsxs)(de,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Rt.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rt.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>pe(!1),className:"h-8 w-8 p-0",children:(0,Rt.jsx)(Ho.X,{className:"h-4 w-4"})})]}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Rt.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Rt.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active",count:a.filter(u=>u.isActive).length},{key:"upcoming",label:"Upcoming",count:a.filter(u=>!u.isActive).length}].map(u=>(0,Rt.jsxs)(w,{variant:L===u.key?"default":"outline",size:"sm",onClick:()=>ie(u.key),className:"text-xs h-8 px-3 flex-1",children:[u.label," (",u.count,")"]},u.key))}),(0,Rt.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:st.length>0?st.map(u=>{let P=f.includes(u.id),W=e.filter(Ie=>Ie.sprintId===u.id).length,ae=!P&&f.length<3;return(0,Rt.jsx)("div",{className:`p-3 rounded-lg border transition-all ${P?"bg-primary/10 border-primary/30":ae?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:O===u.id?(0,Rt.jsxs)("div",{className:"space-y-3",children:[(0,Rt.jsx)($,{value:Q.name,onChange:Ie=>x(Ve=>({...Ve,name:Ie.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Rt.jsx)(xe,{value:Q.description,onChange:Ie=>x(Ve=>({...Ve,description:Ie.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsxs)(w,{size:"sm",onClick:()=>bt(),className:"flex-1",children:[(0,Rt.jsx)(Ho.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,Rt.jsxs)(w,{size:"sm",variant:"outline",onClick:Gt,className:"flex-1",children:[(0,Rt.jsx)(Ho.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,Rt.jsxs)("div",{children:[(0,Rt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Rt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Rt.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:u.name}),u.isActive&&(0,Rt.jsx)(ue,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:u.description}),(0,Rt.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Rt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Rt.jsx)(Ho.CalendarDays,{className:"h-3 w-3"}),new Date(u.startDate).toLocaleDateString()]}),(0,Rt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Rt.jsx)(Ho.User,{className:"h-3 w-3"}),W," tasks"]})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>re(u),className:"h-6 w-6 p-0",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),u.id!=="backlog"&&u.id!=="all-tasks"&&(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>n(u.id),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]}),(0,Rt.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Rt.jsx)(w,{variant:P?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>Ye(u.id),disabled:!P&&f.length>=3,children:(0,Rt.jsx)("span",{className:"pointer-events-none select-none",children:P?"Deselect":f.length>=3?"Limit Reached":"Select"})})})]})},u.id)}):(0,Rt.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Rt.jsxs)("p",{className:"text-sm",children:['No sprints found for "',L,'" filter']}),(0,Rt.jsx)(w,{variant:"link",size:"sm",onClick:()=>ie("all"),className:"text-xs",children:"Show all sprints"})]})}),f.length===0&&(0,Rt.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Rt.jsxs)("div",{className:"text-center",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Rt.jsx)("div",{className:"lg:col-span-1",children:(0,Rt.jsxs)(de,{className:"p-4 h-full bg-card border-Rt-4 border-Rt-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:xt,onDragEnter:()=>A("backlog"),onDragLeave:ee,onDrop:u=>ce(u,"backlog"),style:{height:K>0?`calc(100vh - ${K+200}px)`:"calc(100vh - 16rem)"},children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Rt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsxs)(ue,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[Ee.length," tasks"]}),(0,Rt.jsxs)(ue,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[Je," pts"]})]})]}),(0,Rt.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${N==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:u,unassignedTasks:P}=_e(Ee);return(0,Rt.jsxs)(Rt.Fragment,{children:[Object.entries(u).map(([W,ae])=>{let Ie=oe(W);if(!Ie)return null;let Ve=d.has(W);return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C(W),children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${Ie.color}`}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:Ie.name}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",ae.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:Ve?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ve&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:ae.map($e=>(0,Rt.jsx)(Me,{task:$e},$e.id))})]},W)}),P.length>0&&(()=>{let W=d.has("no-epic");return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C("no-epic"),children:[(0,Rt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",P.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:W?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!W&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:P.map(ae=>(0,Rt.jsx)(Me,{task:ae},ae.id))})]})})(),Ee.length===0&&(0,Rt.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"}),Ee.length>0&&Object.keys(u).length===0&&P.length===0&&(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),Ee.map(W=>(0,Rt.jsx)(Me,{task:W},W.id))]})]})})()})]})}),Ne.map(u=>{let P=e.filter(ae=>ae.sprintId===u.id),W=P.reduce((ae,Ie)=>ae+(Ie.points||0),0);return(0,Rt.jsxs)(de,{className:"p-4 h-full bg-card border-Rt-4 border-Rt-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:xt,onDragEnter:()=>A(u.id),onDragLeave:ee,onDrop:ae=>ce(ae,u.id),style:{height:K>0?`calc(100vh - ${K+200}px)`:"calc(100vh - 16rem)"},children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:u.name}),u.isActive&&(0,Rt.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsxs)(ue,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[P.length," tasks"]}),(0,Rt.jsxs)(ue,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[W," pts"]}),(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>re(u),className:"h-6 px-2",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-3 w-3"})}),u.id!=="backlog"&&u.id!=="all-tasks"&&(0,Rt.jsx)(w,{size:"sm",variant:"ghost",onClick:()=>n(u.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-3 w-3"})})]})]}),(0,Rt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:ae,unassignedTasks:Ie}=_e(P);return(0,Rt.jsxs)(Rt.Fragment,{children:[Object.entries(ae).map(([Ve,$e])=>{let _t=oe(Ve);if(!_t)return null;let Wt=d.has(Ve);return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C(Ve),children:[(0,Rt.jsx)("div",{className:`w-3 h-3 rounded-full ${_t.color}`}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:_t.name}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",$e.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:Wt?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Wt&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:$e.map(Kt=>(0,Rt.jsx)(Me,{task:Kt},Kt.id))})]},Ve)}),Ie.length>0&&(()=>{let Ve=d.has("no-epic");return(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>C("no-epic"),children:[(0,Rt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Rt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Rt.jsxs)("span",{className:"text-muted-foreground",children:["(",Ie.length,")"]}),(0,Rt.jsx)("div",{className:"ml-auto",children:Ve?(0,Rt.jsx)(Ho.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Rt.jsx)(Ho.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Ve&&(0,Rt.jsx)("div",{className:"space-y-2 pl-2",children:Ie.map($e=>(0,Rt.jsx)(Me,{task:$e},$e.id))})]})})(),P.length===0&&(0,Rt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},u.id)})]}),(0,Rt.jsx)(xr,{isOpen:y,onClose:()=>B(!1),onAddSprint:I})]})})]})};var Bs=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Fs=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),zs=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Wa=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[i,s]=t.split(":");o.setHours(parseInt(i),parseInt(s))}return o<a},Ka=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Os=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Hs=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[i,s]=(0,ge.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,n]=(0,ge.useState)(!1),f=d=>{d.preventDefault();let b=e.find(g=>g?.id.toString()===i.colleagueId.toString());if(!b){console.error("No valid colleague selected"),n(!0);return}n(!1);let R={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:b,isCompleted:!1,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,priority:i.priority,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(g=>g.trim()):void 0};t(R),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ge.useEffect)(()=>{i.colleagueId&&n(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,Rt.jsx)(lt,{open:a,onOpenChange:o,children:(0,Rt.jsxs)(Qe,{className:"max-w-2xl",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Add New Reminder"})}),(0,Rt.jsxs)("form",{onSubmit:f,className:"space-y-4",children:[(0,Rt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"title",children:"Title"}),(0,Rt.jsx)($,{id:"title",value:i.title,onChange:d=>s({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"description",children:"Description"}),(0,Rt.jsx)(xe,{id:"description",value:i.description,onChange:d=>s({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"dueDate",children:"Due Date"}),(0,Rt.jsx)($,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>s({...i,dueDate:d.target.value}),required:!0})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Rt.jsx)($,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>s({...i,dueTime:d.target.value})})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Rt.jsxs)(Be,{value:i.colleagueId,onValueChange:d=>{s({...i,colleagueId:d})},required:!0,children:[(0,Rt.jsx)(ke,{className:`${c?"text-destructive border-red-500":""}`,children:(0,Rt.jsx)(We,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Rt.jsx)(Te,{children:p.map(d=>(0,Rt.jsx)(J,{value:d.id,children:d.name},d.id))})]}),c&&(0,Rt.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>s({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Rt.jsx)(T,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Rt.jsxs)(Be,{value:i.recurrencePattern,onValueChange:d=>s({...i,recurrencePattern:d}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"daily",children:"Daily"}),(0,Rt.jsx)(J,{value:"weekly",children:"Weekly"}),(0,Rt.jsx)(J,{value:"monthly",children:"Monthly"}),(0,Rt.jsx)(J,{value:"yearly",children:"Yearly"})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Rt.jsx)($,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>s({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Rt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",children:"Add Reminder"})]})]})]})})},Vs=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:i})=>{let[s,c]=(0,ge.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(", ")||""}),n=p=>{p.preventDefault();let d=t.find(b=>b?.id===s.colleagueId);if(!d){console.error("No valid colleague selected");return}a(e.id,{title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:d,priority:s.priority,isRecurring:s.isRecurring,recurrencePattern:s.isRecurring?s.recurrencePattern:void 0,recurrenceInterval:s.isRecurring?s.recurrenceInterval:void 0,reminderEnabled:s.reminderEnabled,reminderMinutes:s.reminderEnabled?s.reminderMinutes:void 0,tags:s.tags?s.tags.split(",").map(b=>b.trim()):void 0}),i()},f=t.filter(Boolean);return(0,Rt.jsx)(lt,{open:o,onOpenChange:i,children:(0,Rt.jsxs)(Qe,{className:"max-w-2xl",children:[(0,Rt.jsx)(et,{children:(0,Rt.jsx)(tt,{children:"Edit Reminder"})}),(0,Rt.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-title",children:"Title"}),(0,Rt.jsx)($,{id:"edit-title",value:s.title,onChange:p=>c({...s,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-priority",children:"Priority"}),(0,Rt.jsxs)(Be,{value:s.priority,onValueChange:p=>c({...s,priority:p}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"low",children:"\u{1F7E2} Low"}),(0,Rt.jsx)(J,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Rt.jsx)(J,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-description",children:"Description"}),(0,Rt.jsx)(xe,{id:"edit-description",value:s.description,onChange:p=>c({...s,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Rt.jsx)($,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:p=>c({...s,dueDate:p.target.value}),required:!0})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Rt.jsx)($,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:p=>c({...s,dueTime:p.target.value})})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,Rt.jsxs)(Be,{value:s.colleagueId,onValueChange:p=>c({...s,colleagueId:p}),required:!0,children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{placeholder:"Select a digital colleague"})}),(0,Rt.jsx)(Te,{children:f.map(p=>(0,Rt.jsx)(J,{value:p.id,children:p.name},p.id))})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring,onChange:p=>c({...s,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,Rt.jsx)(T,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,Rt.jsxs)(Be,{value:s.recurrencePattern,onValueChange:p=>c({...s,recurrencePattern:p}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"daily",children:"Daily"}),(0,Rt.jsx)(J,{value:"weekly",children:"Weekly"}),(0,Rt.jsx)(J,{value:"monthly",children:"Monthly"}),(0,Rt.jsx)(J,{value:"yearly",children:"Yearly"})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,Rt.jsx)($,{id:"edit-recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:p=>c({...s,recurrenceInterval:parseInt(p.target.value)})})]})]})]}),(0,Rt.jsxs)("div",{className:"space-y-2",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Rt.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:s.reminderEnabled,onChange:p=>c({...s,reminderEnabled:p.target.checked}),className:"rounded border-border"}),(0,Rt.jsx)(T,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),s.reminderEnabled&&(0,Rt.jsxs)("div",{className:"pl-6",children:[(0,Rt.jsx)(T,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,Rt.jsxs)(Be,{value:s.reminderMinutes.toString(),onValueChange:p=>c({...s,reminderMinutes:parseInt(p)}),children:[(0,Rt.jsx)(ke,{children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsx)(J,{value:"5",children:"5 minutes before"}),(0,Rt.jsx)(J,{value:"15",children:"15 minutes before"}),(0,Rt.jsx)(J,{value:"30",children:"30 minutes before"}),(0,Rt.jsx)(J,{value:"60",children:"1 hour before"}),(0,Rt.jsx)(J,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)(T,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,Rt.jsx)($,{id:"edit-tags",value:s.tags,onChange:p=>c({...s,tags:p.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Rt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Rt.jsx)(w,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,Rt.jsx)(w,{type:"submit",children:"Save Changes"})]})]})]})})},js=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[i,s]=(0,ge.useState)(!1);if(!e||!e.id)return null;let c=Wa(e.dueDate,e.dueTime),n=Ka(e.dueDate),f=Os(e.dueDate),p=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},d=()=>n?"Today":f?"Tomorrow":c&&!e.isCompleted?"Overdue":Fs(e.dueDate);return(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(Vs,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>s(!1)}),(0,Rt.jsx)(de,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${c&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,Rt.jsx)(Ht,{className:"p-4",children:(0,Rt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Rt.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Rt.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,Rt.jsx)(Ho.CheckCircle,{className:"h-5 w-5"}):(0,Rt.jsx)(Ho.Circle,{className:"h-5 w-5"})}),(0,Rt.jsxs)("div",{className:"flex-1",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Rt.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,Rt.jsx)("span",{className:"text-sm",children:Bs(e.priority)}),e.isRecurring&&(0,Rt.jsx)(Ho.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,Rt.jsx)(Ho.Bell,{className:"h-4 w-4 text-success"})]}),(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(Ho.Calendar,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{className:c&&!e.isCompleted?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(Ho.Clock,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:zs(e.dueTime)})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(Ho.User,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,Rt.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map((b,R)=>(0,Rt.jsx)(ue,{variant:"secondary",className:"text-xs",children:b},R))})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,Rt.jsx)(Ho.Edit2,{className:"h-4 w-4"})}),(0,Rt.jsx)(w,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Rt.jsx)(Ho.Trash2,{className:"h-4 w-4"})})]})]})})})]})},wr=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:i})=>{let[s,c]=(0,ge.useState)(e.filter(Boolean)),[n]=(0,ge.useState)(t.filter(Boolean)),[f,p]=(0,ge.useState)("all"),[d,b]=(0,ge.useState)(""),[R,g]=(0,ge.useState)(!1),y=x=>{if(!x.title||!x.colleague?.id){console.error("Invalid reminder data:",x);return}let L={...x,id:Date.now().toString(),createdAt:new Date};c(ie=>[...ie,L]),a?.(x)},B=(x,L)=>{if(!x){console.error("No reminder ID provided for update");return}c(ie=>ie.map(F=>F?.id===x?{...F,...L}:F)),o?.(x,L)},N=x=>{if(!x){console.error("No reminder ID provided for deletion");return}c(L=>L.filter(ie=>ie?.id!==x)),i?.(x)},O=s.filter(x=>{if(!x)return!1;if(d){let L=d.toLowerCase();if(!(x.title.toLowerCase().includes(L)||x.description.toLowerCase().includes(L)||x.colleague?.name?.toLowerCase().includes(L)||x.tags?.some(F=>F.toLowerCase().includes(L))))return!1}switch(f){case"pending":return!x.isCompleted;case"completed":return x.isCompleted;case"overdue":return!x.isCompleted&&Wa(x.dueDate,x.dueTime);case"today":return Ka(new Date(x.dueDate));default:return!0}}).sort((x,L)=>{if(!x||!L)return 0;if(x.isCompleted&&!L.isCompleted)return 1;if(!x.isCompleted&&L.isCompleted)return-1;let ie={high:3,medium:2,low:1},F=ie[L.priority]-ie[x.priority];return F!==0?F:x.dueDate.getTime()-L.dueDate.getTime()}),V={total:s.filter(Boolean).length,pending:s.filter(x=>x&&!x.isCompleted).length,completed:s.filter(x=>x&&x.isCompleted).length,overdue:s.filter(x=>x&&!x.isCompleted&&Wa(x.dueDate,x.dueTime)).length,today:s.filter(x=>x&&Ka(new Date(x.dueDate))).length},Q=n.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,Rt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Rt.jsx)(mt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-Rt from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{g(!0)}}}),(0,Rt.jsxs)("div",{className:"h-full bg-background",children:[(0,Rt.jsx)(Hs,{colleagues:n,onAddReminder:y,open:R,setOpen:g}),(0,Rt.jsxs)("div",{className:"p-6",children:[(0,Rt.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Rt.jsxs)("div",{children:[(0,Rt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Rt.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Rt.jsxs)(w,{className:"flex items-center space-x-2",onClick:()=>g(!0),children:[(0,Rt.jsx)(Ho.Plus,{className:"h-4 w-4"}),(0,Rt.jsx)("span",{children:"Add Reminder"})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-foreground",children:V.total}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-primary",children:V.pending}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-success",children:V.completed}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-destructive",children:V.overdue}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Rt.jsxs)(de,{className:"p-4",children:[(0,Rt.jsx)("div",{className:"text-2xl font-bold text-warning",children:V.today}),(0,Rt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Rt.jsx)("div",{className:"flex-1",children:(0,Rt.jsx)($,{placeholder:"Search reminders...",value:d,onChange:x=>b(x.target.value),className:"max-w-md"})}),(0,Rt.jsxs)(Be,{value:f,onValueChange:x=>p(x),children:[(0,Rt.jsx)(ke,{className:"w-40",children:(0,Rt.jsx)(We,{})}),(0,Rt.jsxs)(Te,{children:[(0,Rt.jsxs)(J,{value:"all",children:["All (",V.total,")"]}),(0,Rt.jsxs)(J,{value:"pending",children:["Pending (",V.pending,")"]}),(0,Rt.jsxs)(J,{value:"completed",children:["Completed (",V.completed,")"]}),(0,Rt.jsxs)(J,{value:"overdue",children:["Overdue (",V.overdue,")"]}),(0,Rt.jsxs)(J,{value:"today",children:["Today (",V.today,")"]})]})]})]}),(0,Rt.jsx)("div",{className:"space-y-4",children:O.length===0?(0,Rt.jsxs)(de,{className:"p-8 text-center",children:[(0,Rt.jsx)("div",{className:"text-muted-foreground",children:d||f!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&f==="all"&&(0,Rt.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):O.map(x=>x&&(0,Rt.jsx)(js,{reminder:x,colleagues:n,onUpdateReminder:B,onDeleteReminder:N},x.id))})]})]})]})};var Bt=le(require("@radix-ui/react-tabs"));function Nr({className:e,...t}){return(0,Rt.jsx)(Bt.Root,{"data-slot":"tabs",className:v("flex flex-col gap-2",e),...t})}function Cr({className:e,...t}){return(0,Rt.jsx)(Bt.List,{"data-slot":"tabs-list",className:v("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Sr({className:e,...t}){return(0,Rt.jsx)(Bt.Trigger,{"data-slot":"tabs-trigger",className:v("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 vt=le(require("react")),Y=le(require("@radix-ui/react-dropdown-menu"));var kr=Y.Root,Tr=Y.Trigger;var Us=vt.forwardRef(({className:e,inset:t,children:a,...o},i)=>(0,Rt.jsxs)(Y.SubTrigger,{ref:i,className:v("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),...o,children:[a,(0,Rt.jsx)($t.ChevronRightIcon,{className:"ml-auto"})]}));Us.displayName=Y.SubTrigger.displayName;var $s=vt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Y.SubContent,{ref:a,className:v("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}));$s.displayName=Y.SubContent.displayName;var qa=vt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Rt.jsx)(Y.Portal,{children:(0,Rt.jsx)(Y.Content,{ref:o,sideOffset:t,className:v("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})}));qa.displayName=Y.Content.displayName;var Ja=vt.forwardRef(({className:e,inset:t,...a},o)=>(0,Rt.jsx)(Y.Item,{ref:o,className:v("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}));Ja.displayName=Y.Item.displayName;var Gs=vt.forwardRef(({className:e,children:t,checked:a,...o},i)=>(0,Rt.jsxs)(Y.CheckboxItem,{ref:i,className:v("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,...o,children:[(0,Rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Rt.jsx)(Y.ItemIndicator,{children:(0,Rt.jsx)($t.CheckIcon,{className:"h-4 w-4"})})}),t]}));Gs.displayName=Y.CheckboxItem.displayName;var _s=vt.forwardRef(({className:e,children:t,...a},o)=>(0,Rt.jsxs)(Y.RadioItem,{ref:o,className:v("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,Rt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Rt.jsx)(Y.ItemIndicator,{children:(0,Rt.jsx)($t.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));_s.displayName=Y.RadioItem.displayName;var Ws=vt.forwardRef(({className:e,inset:t,...a},o)=>(0,Rt.jsx)(Y.Label,{ref:o,className:v("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Ws.displayName=Y.Label.displayName;var Ks=vt.forwardRef(({className:e,...t},a)=>(0,Rt.jsx)(Y.Separator,{ref:a,className:v("-mx-1 my-1 h-px bg-muted",e),...t}));Ks.displayName=Y.Separator.displayName;var qs=({className:e,...t})=>(0,Rt.jsx)("span",{className:v("ml-auto text-xs tracking-widest opacity-60",e),...t});qs.displayName="DropdownMenuShortcut";function Pr({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:i="700px",gridCols:s=6}){let c=a.find(n=>n.value===e);return(0,Rt.jsxs)(pr.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Rt.jsx)("div",{className:"hidden lg:block",children:(0,Rt.jsx)(Nr,{value:e,onValueChange:t,children:(0,Rt.jsx)(Cr,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,Rt.jsx)(pr.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Rt.jsx)(Sr,{value:n.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:n.label})},n.value))})})}),(0,Rt.jsx)("div",{className:"lg:hidden",children:(0,Rt.jsxs)(kr,{children:[(0,Rt.jsx)(Tr,{asChild:!0,children:(0,Rt.jsxs)(w,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,Rt.jsx)(Ho.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Rt.jsx)(qa,{align:"center",className:"w-[180px]",children:a.map(n=>(0,Rt.jsx)(Ja,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function xa({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:i=!0,className:s}){return(0,Rt.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[i&&(0,Rt.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Rt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Rt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Rt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Rt.jsx)("div",{className:"divide-y",children:e.map(c=>(0,Rt.jsxs)(pr.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?.(c),children:[(0,Rt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Rt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Rt.jsx)("div",{children:(0,Rt.jsx)("p",{className:"font-medium",children:c.name})})]}),(0,Rt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:c.filesize}),(0,Rt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Rt.jsx)("span",{className:"text-sm md:text-base",children:typeof c.createdAt=="string"?c.createdAt:new Date(c.createdAt).toLocaleDateString()}),(0,Rt.jsx)("div",{className:"flex gap-1",children:(0,Rt.jsx)(w,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),o?.(c)},children:(0,Rt.jsx)(Ho.Trash2,{className:"h-4 w-4"})})})]})]},c.name))})]})}function Za({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:i,compactView:s=!1,className:c}){let[n,f]=(0,ge.useState)(e),[p,d]=(0,ge.useState)(""),[b,R]=(0,ge.useState)("all"),[g,y]=(0,ge.useState)("all");(0,ge.useEffect)(()=>{f(e)},[e]);let B=Array.from(new Set(n.map(F=>F.mimeType))),N=n.filter(F=>{let pe=F.name.toLowerCase().includes(p.toLowerCase()),K=b==="all"||F.mimeType===b;return pe&&K}),U=N.slice(0,10),O=N.filter(Boolean),V=()=>{t?.()},Q=F=>{a?.(F)},x=F=>{console.log("deleting file",F),f(pe=>pe.filter(K=>K.name!==F.name)),o?.(F.id)},L=F=>{i?.(F)},ie=()=>{d(""),R("all")};return(0,Rt.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Rt.jsx)(pr.AnimatePresence,{mode:"wait",children:(0,Rt.jsx)(pr.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Rt.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,Rt.jsx)(mt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-Rt 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,Rt.jsx)(de,{children:(0,Rt.jsx)(Ht,{className:"pt-6",children:(0,Rt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Rt.jsx)("div",{className:"flex-1",children:(0,Rt.jsxs)("div",{className:"relative",children:[(0,Rt.jsx)(Ho.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Rt.jsx)($,{placeholder:"Search files...",value:p,onChange:F=>d(F.target.value),className:"pl-9"})]})}),(p||b!=="all")&&(0,Rt.jsxs)(w,{variant:"outline",onClick:ie,className:"gap-2",children:[(0,Rt.jsx)(Ho.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Rt.jsxs)("div",{className:"space-y-4",children:[(0,Rt.jsx)(Pr,{activeTab:g,onTabChange:y,tabOptions:[{value:"all",label:`All Files (${N.length})`},{value:"recent",label:`Recent (${U.length})`}],maxWidth:"500px",gridCols:3}),g==="all"&&(0,Rt.jsx)(xa,{files:N,onFileClick:L,onFileEdit:Q,onFileDelete:x,showHeader:!s}),g==="recent"&&(0,Rt.jsx)(xa,{files:U,onFileClick:L,onFileEdit:Q,onFileDelete:x,showHeader:!s}),g==="shared"&&(0,Rt.jsx)(xa,{files:O,onFileClick:L,onFileEdit:Q,onFileDelete:x,showHeader:!s})]}),N.length===0&&(0,Rt.jsx)(de,{children:(0,Rt.jsx)(Ht,{className:"pt-6",children:(0,Rt.jsxs)("div",{className:"text-center py-8",children:[(0,Rt.jsx)(Ho.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Rt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Rt.jsx)("p",{className:"text-muted-foreground mb-4",children:p||b!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Rt.jsxs)(w,{onClick:V,className:"gap-2",children:[(0,Rt.jsx)(Ho.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Mr=require("next/navigation");function Ir({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:i=[],initialReminders:s=[],initialColleagues:c=[],initialUsers:n=[],initialFiles:f=[],initialView:p="kanban",onAddTask:d,onUpdateTask:b,onDeleteTask:R,onTaskClick:g,onAddEpic:y,onUpdateEpic:B,onDeleteEpic:N,onAddTaskToEpic:U,onAddSprint:O,onUpdateSprint:V,onDeleteSprint:Q,onAddProject:x,onUpdateProject:L,onDeleteProject:ie,onFileAdd:F,onFileEdit:pe,onFileDelete:K,onFileClick:Se,onAddReminder:z,onUpdateReminder:D,onDeleteReminder:oe,onViewChange:je,onToggleMobileMenu:he,onTeamClick:se,onTeamChange:_e,onCopilotClick:Ue,handleAddComment:st}){let[Ne,Ee]=(0,ge.useState)(t),[Je,Ye]=(0,ge.useState)(a),[C,I]=(0,ge.useState)(o),[re,bt]=(0,ge.useState)(i),[Gt,ht]=(0,ge.useState)(s),[xt,A]=(0,ge.useState)(c),[ee,ce]=(0,ge.useState)(n),[Me,u]=(0,ge.useState)(f),[P,W]=(0,ge.useState)(!1),[ae,Ie]=(0,ge.useState)(!1),[Ve,$e]=(0,ge.useState)(null),[_t,Wt]=(0,ge.useState)(null),[Kt,Ya]=(0,ge.useState)(null),[Dt,Qa]=(0,ge.useState)(p||"kanban"),[Ar,Lr]=(0,ge.useState)(!1),eo=(0,Mr.useRouter)();(0,ge.useEffect)(()=>{Ee(t)},[t]),(0,ge.useEffect)(()=>{I(o)},[o]),(0,ge.useEffect)(()=>{Ye(a)},[a]),(0,ge.useEffect)(()=>{bt(i)},[i]),(0,ge.useEffect)(()=>{u(f)},[f]),(0,ge.useEffect)(()=>{ce(n)},[n]),(0,ge.useEffect)(()=>{A(c)},[c]),(0,ge.useEffect)(()=>{ht(s)},[s]),(0,ge.useEffect)(()=>{Qa(p)},[p]);let Br=Je.filter(h=>h.isSelected).map(h=>h.id),ea=C.find(h=>h.isSelected),Fr=Ne.filter(h=>{let S=Br.includes(h.epicId);return!ea||ea.id==="all-tasks"?S:ea.id==="backlog"?S&&!h.sprintId:S&&h.sprintId===ea.id}),Xs=h=>Fr.filter(S=>S.status===h),Zs=h=>{let S={};return Je.forEach(j=>{S[j.id]=h.filter(me=>me.epicId===j.id)}),S},Ys=h=>{Ya(h)},Qs=h=>{Kt&&(Ee(S=>S.map(j=>j.id===Kt.id?{...j,status:h}:j)),Ya(null))},to=h=>{let S={...h,id:Date.now().toString(),createdAt:new Date};Ee(j=>[...j,S]),d?.(S)},ta=async(h,S)=>(Ee(j=>j.map(me=>me.id===h?{...me,...S}:me)),await b?.(h,S)),en=async(h,S)=>{ta(h,S)},ao=h=>{Ee(S=>S.filter(j=>j.id!==h)),Ve?.id===h&&$e(null),R?.(h)},tn=async h=>{ao(h)},zr=h=>{let S={...h,id:Date.now().toString(),isSelected:!1};bt(j=>[...j,S]),x?.(h)},Or=(h,S)=>{bt(j=>j.map(me=>me.id===h?S.isSelected?(eo.push(`/project/${h}`),{...me,...S}):{...me,...S}:S.isSelected&&h!==me.id?{...me,isSelected:!1}:me)),L?.(h,S)},Hr=h=>{bt(S=>S.filter(j=>j.id!==h)),ie?.(h)},oo=h=>{let S={...h,id:Date.now().toString(),isSelected:!0};Ye(j=>[...j,S]),y?.({...S})},ro=()=>{Ie(!0)},io=(h,S)=>{Ye(j=>j.map(me=>me.id===h?{...me,...S}:me)),B?.(h,S)},so=h=>{Ye(S=>S.filter(j=>j.id!==h)),Ee(S=>S.filter(j=>j.epicId!==h)),N?.(h)},Vr=h=>{let S={...h,id:Date.now().toString(),isSelected:!1};I(j=>[...j,S]),O?.(h)},jr=(h,S)=>{I(j=>j.map(me=>me.id===h?S.isSelected?{...me,...S}:{...me,...S}:S.isSelected&&h!==me.id?{...me,isSelected:!1}:me)),V?.(h,S)},Ur=h=>{h==="backlog"||h==="all-tasks"||(I(S=>S.filter(j=>j.id!==h)),Ee(S=>S.map(j=>j.sprintId===h?{...j,sprintId:void 0}:j)),Q?.(h))},wa=h=>{$e(h)},$Rt=h=>{h==="planning"&&window.innerWidth<768||(Qa(h),je?.(h))},Gr=()=>{Lr(h=>!h),he?.()},an=()=>{eo.push("/")},on=h=>{console.log("Switching to team:",h)},rn=h=>{console.log("Switching to team:",h)},_r=h=>{Wt(h),W(!0)},Wr=()=>{W(!1),Wt(null)},Kr=h=>{let S={...h,id:Date.now().toString(),createdAt:new Date};ht(j=>[...j,S]),z?.(h)},qr=(h,S)=>{ht(j=>j.map(me=>me.id===h?{...me,...S}:me)),D?.(h,S)},Jr=h=>{ht(S=>S.filter(j=>j.id!==h)),oe?.(h)},Xr=()=>{F?.()},Zr=h=>{pe?.(h)},Yr=h=>{u(S=>S.filter(j=>j.name!==h)),K?.(h)},Qr=h=>{Se?.(h)},sn=[{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"}],nn=()=>{switch(Dt){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"}},Na=[{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")}],ln=Na.sort((h,S)=>S.lastUsed.getTime()-h.lastUsed.getTime()).slice(0,3),dn=Na.length>3,cn=Na.slice(3);return(0,Rt.jsxs)(Uo,{projects:re,epics:Je,sprints:C,currentView:Dt,onUpdateProject:Or,onDeleteProject:Hr,onAddProject:zr,onUpdateEpic:io,onDeleteEpic:so,onAddEpic:ro,onViewChange:$Rt,mobileMenuOpen:Ar,onToggleMobileMenu:Gr,children:[Dt==="kanban"&&(0,Rt.jsx)("div",{className:"h-full overflow-hidden",children:(0,Rt.jsx)(ur,{initialProjects:re,initialEpics:Je,initialSprints:C,initialTasks:Ne,initialColleagues:xt,initialUsers:ee,onAddTask:to,onUpdateTask:ta,onDeleteTask:ao,onTaskClick:wa,onAddEpic:oo,onAddComment:st})}),Dt==="planning"&&(0,Rt.jsx)("div",{className:"hidden md:block h-full",children:(0,Rt.jsx)(yr,{tasks:Ne,epics:Je,sprints:C,onUpdateTask:ta,onTaskClick:wa,onAddSprint:Vr,onUpdateSprint:jr,onDeleteSprint:Ur})}),Dt==="tasks"&&(0,Rt.jsx)("div",{className:"h-full",children:(0,Rt.jsx)(wr,{initialReminders:Gt,initialColleagues:xt,onAddReminder:Kr,onUpdateReminder:qr,onDeleteReminder:Jr})}),Dt==="files"&&(0,Rt.jsx)("div",{className:"h-full",children:(0,Rt.jsx)(Za,{initialFiles:Me,onFileAdd:Xr,onFileEdit:Zr,onFileDelete:Yr,onFileClick:Qr,compactView:!1})}),Dt==="epics"&&(0,Rt.jsx)("div",{className:"h-full",children:(0,Rt.jsx)(gr,{tasks:Ne,epics:Je,sprints:C,onUpdateTask:ta,onTaskClick:wa,onAddTaskToEpic:_r,onAddEpic:ro,onUpdateEpic:io,onDeleteEpic:so})}),(0,Rt.jsx)(la,{isOpen:P,onClose:Wr,onAddTask:to,epics:Je,sprints:C,assignees:[...xt,...ee],defaultEpicId:_t||void 0}),(0,Rt.jsx)(ua,{isOpen:ae,onClose:()=>Ie(!1),onAddEpic:oo})]})}