cortex-react-components 2.18.6 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-MFUZNS7C.mjs → chunk-2BRDNDUB.mjs} +1 -1
- package/dist/{chunk-JSHD7QTU.mjs → chunk-2YULWG5F.mjs} +1 -1
- package/dist/{chunk-QILFMWE5.mjs → chunk-3HNU2NYP.mjs} +1 -1
- package/dist/{chunk-GO42W2BM.mjs → chunk-3NRXQBBS.mjs} +1 -1
- package/dist/{chunk-MEVSHOG4.mjs → chunk-3Y7QG6VP.mjs} +1 -1
- package/dist/{chunk-YWRU7OE3.mjs → chunk-5MWZTJYP.mjs} +1 -1
- package/dist/{chunk-XYJ4S67W.mjs → chunk-6MSM3CZ6.mjs} +1 -1
- package/dist/{chunk-CTC6WSB6.mjs → chunk-75F3LJMX.mjs} +1 -1
- package/dist/{chunk-33CHGT4N.mjs → chunk-7R47MHQE.mjs} +1 -1
- package/dist/{chunk-PAEL4O5F.mjs → chunk-AEACICA7.mjs} +1 -1
- package/dist/{chunk-RMZLEIRP.mjs → chunk-AJQHGVZ5.mjs} +1 -1
- package/dist/{chunk-VQBOJHZF.mjs → chunk-C4RWEPVF.mjs} +1 -1
- package/dist/{chunk-3EGSOIRH.mjs → chunk-CXOVEABI.mjs} +1 -1
- package/dist/{chunk-CCJJAUGB.mjs → chunk-EM3T2XYC.mjs} +1 -1
- package/dist/{chunk-347B45ZS.mjs → chunk-EPJJKGCG.mjs} +1 -1
- package/dist/{chunk-JNJJAJPI.mjs → chunk-FE7ZGUPU.mjs} +1 -1
- package/dist/{chunk-YPSUDHCJ.mjs → chunk-GHOL5L32.mjs} +1 -1
- package/dist/chunk-GLARGNXX.mjs +4 -0
- package/dist/{chunk-JEWBD2UD.mjs → chunk-GTZDHELR.mjs} +1 -1
- package/dist/{chunk-R33MOMFK.mjs → chunk-GTZJWMZR.mjs} +1 -1
- package/dist/{chunk-4DR4ILAP.mjs → chunk-H7NKR2WR.mjs} +1 -1
- package/dist/chunk-HEKQ55BA.mjs +4 -0
- package/dist/{chunk-H5VFV6Q4.mjs → chunk-LJXTXROJ.mjs} +1 -1
- package/dist/chunk-MTA6RFZ7.mjs +1 -0
- package/dist/{chunk-6EKGV4I2.mjs → chunk-NINFDOV5.mjs} +1 -1
- package/dist/chunk-PLOUY2B7.mjs +4 -0
- package/dist/{chunk-MGSTQLZC.mjs → chunk-RGOKBIQ5.mjs} +1 -1
- package/dist/{chunk-HLTP3ZQN.mjs → chunk-RJGYVDOU.mjs} +1 -1
- package/dist/chunk-SH5SK6V2.mjs +1 -0
- package/dist/{chunk-UTRR5NUU.mjs → chunk-TVTTUSWM.mjs} +1 -1
- package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
- package/dist/{chunk-WAVVCASZ.mjs → chunk-UJITFLIZ.mjs} +1 -1
- package/dist/chunk-W2LPR7SX.mjs +1 -0
- package/dist/{chunk-ANCSWAD7.mjs → chunk-WIRQ5IRT.mjs} +1 -1
- package/dist/{chunk-QZIJTAPO.mjs → chunk-ZEALRBXW.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.js +6 -6
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +3 -3
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/MessageHandler.js +5 -5
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
- package/dist/components/Chat/PartTypes/PartApprovalTool.js +4 -4
- package/dist/components/Chat/PartTypes/PartApprovalTool.mjs +1 -1
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.d.ts +2 -1
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.js +3 -3
- package/dist/components/Chat/PartTypes/PartAuthenticateTool.mjs +1 -1
- package/dist/components/Chat/PartTypes/index.js +6 -6
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +11 -11
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +32 -32
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +3 -3
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +3 -3
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +3 -3
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +4 -4
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.js +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.js +1 -2
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/document-edit.js +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.js +5 -5
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.js +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.js +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/index.js +20 -20
- package/dist/components/index.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +25 -25
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3DZFESHK.mjs +0 -4
- package/dist/chunk-3F6AUCZF.mjs +0 -1
- package/dist/chunk-3ZQFJ5WD.mjs +0 -4
- package/dist/chunk-HHPTGV4F.mjs +0 -4
- package/dist/chunk-V5VE3EIY.mjs +0 -1
- package/dist/chunk-WRZP5K5X.mjs +0 -1
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
'use client'
|
|
4
4
|
'use client';
|
|
5
5
|
|
|
6
|
-
"use strict";var ni=Object.create;var Tt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var li=Object.getOwnPropertyNames;var di=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var pi=(e,t)=>{for(var a in t)Tt(e,a,{get:t[a],enumerable:!0})},Pa=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of li(t))!ci.call(e,n)&&n!==a&&Tt(e,n,{get:()=>t[n],enumerable:!(o=si(t,n))||o.enumerable});return e};var j=(e,t,a)=>(a=e!=null?ni(di(e)):{},Pa(t||!e||!e.__esModule?Tt(a,"default",{value:e,enumerable:!0}):a,e)),mi=e=>Pa(Tt({},"__esModule",{value:!0}),e);var Nr={};pi(Nr,{ChatDemoCapabilitiesInteraction:()=>Cr,ChatDemoErrorHandling:()=>wr,ChatDemoFileUploads:()=>xr,ChatDemoMarkdownResponses:()=>hr,ChatDemoToolCalling:()=>br,ChatDemoUIComponents:()=>yr});module.exports=mi(Nr);var tt=require("react");var Vo=require("@ai-sdk/react"),Kt=require("motion/react"),Go=require("lucide-react");var Ba=require("clsx");var Yt="-",ui=e=>{let t=fi(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:r=>{let s=r.split(Yt);return s[0]===""&&s.length!==1&&s.shift(),Da(s,t)||gi(r)},getConflictingClassGroupIds:(r,s)=>{let d=a[r]||[];return s&&o[r]?[...d,...o[r]]:d}}},Da=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),n=o?Da(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(Yt);return t.validators.find(({validator:r})=>r(i))?.classGroupId},Ta=/^\[(.+)\]$/,gi=e=>{if(Ta.test(e)){let t=Ta.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},fi=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return bi(Object.entries(e.classGroups),a).forEach(([i,r])=>{Xt(r,o,i,t)}),o},Xt=(e,t,a,o)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:Ra(t,n);i.classGroupId=a;return}if(typeof n=="function"){if(vi(n)){Xt(n(o),t,a,o);return}t.validators.push({validator:n,classGroupId:a});return}Object.entries(n).forEach(([i,r])=>{Xt(r,Ra(t,i),a,o)})})},Ra=(e,t)=>{let a=e;return t.split(Yt).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},vi=e=>e.isThemeGetter,bi=(e,t)=>t?e.map(([a,o])=>{let n=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([r,s])=>[t+r,s])):i);return[a,n]}):e,hi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,n=(i,r)=>{a.set(i,r),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let r=a.get(i);if(r!==void 0)return r;if((r=o.get(i))!==void 0)return n(i,r),r},set(i,r){a.has(i)?a.set(i,r):n(i,r)}}},Sa="!",yi=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,n=t[0],i=t.length,r=s=>{let d=[],m=0,w=0,f;for(let C=0;C<s.length;C++){let N=s[C];if(m===0){if(N===n&&(o||s.slice(C,C+i)===t)){d.push(s.slice(w,C)),w=C+i;continue}if(N==="/"){f=C;continue}}N==="["?m++:N==="]"&&m--}let y=d.length===0?s:s.substring(w),D=y.startsWith(Sa),A=D?y.substring(1):y,T=f&&f>w?f-w:void 0;return{modifiers:d,hasImportantModifier:D,baseClassName:A,maybePostfixModifierPosition:T}};return a?s=>a({className:s,parseClassName:r}):r},xi=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},wi=e=>({cache:hi(e.cacheSize),parseClassName:yi(e),...ui(e)}),Ci=/\s+/,Ni=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],r=e.trim().split(Ci),s="";for(let d=r.length-1;d>=0;d-=1){let m=r[d],{modifiers:w,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:D}=a(m),A=!!D,T=o(A?y.substring(0,D):y);if(!T){if(!A){s=m+(s.length>0?" "+s:s);continue}if(T=o(y),!T){s=m+(s.length>0?" "+s:s);continue}A=!1}let C=xi(w).join(":"),N=f?C+Sa:C,F=N+T;if(i.includes(F))continue;i.push(F);let S=n(T,A);for(let I=0;I<S.length;++I){let K=S[I];i.push(N+K)}s=m+(s.length>0?" "+s:s)}return s};function ki(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Aa(t))&&(o&&(o+=" "),o+=a);return o}var Aa=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Aa(e[o]))&&(a&&(a+=" "),a+=t);return a};function Pi(e,...t){let a,o,n,i=r;function r(d){let m=t.reduce((w,f)=>f(w),e());return a=wi(m),o=a.cache.get,n=a.cache.set,i=s,s(d)}function s(d){let m=o(d);if(m)return m;let w=Ni(d,a);return n(d,w),w}return function(){return i(ki.apply(null,arguments))}}var H=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ia=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ti=/^\d+\/\d+$/,Ri=new Set(["px","full","screen"]),Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Si=/\d+(%|px|r?em|[sdl]?La([hwib]|min|max)|tt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|La|i|La|min|max))|\La(calc|min|max|clamp)\(.+\)|^0$/,Ai=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ii=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Me=e=>at(e)||Ri.has(e)||Ti.test(e),He=e=>ot(e,"length",Hi),at=e=>!!e&&!Number.isNaN(Number(e)),Qt=e=>ot(e,"number",at),vt=e=>!!e&&Number.isInteger(Number(e)),Ei=e=>e.endsWith("%")&&at(e.slice(0,-1)),x=e=>Ia.test(e),Oe=e=>Di.test(e),Bi=new Set(["length","size","percentage"]),Ui=e=>ot(e,Bi,Ma),Li=e=>ot(e,"position",Ma),zi=new Set(["image","url"]),_i=e=>ot(e,zi,ji),Fi=e=>ot(e,"",Oi),bt=()=>!0,ot=(e,t,a)=>{let o=Ia.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Hi=e=>Si.test(e)&&!Ai.test(e),Ma=()=>!1,Oi=e=>Ii.test(e),ji=e=>Mi.test(e);var Wi=()=>{let e=H("colors"),t=H("spacing"),a=H("blur"),o=H("brightness"),n=H("borderColor"),i=H("borderRadius"),r=H("borderSpacing"),s=H("borderWidth"),d=H("contrast"),m=H("grayscale"),w=H("hueRotate"),f=H("invert"),y=H("gap"),D=H("gradientColorStops"),A=H("gradientColorStopPositions"),T=H("inset"),C=H("margin"),N=H("opacity"),F=H("padding"),S=H("saturate"),I=H("scale"),K=H("sepia"),G=H("skew"),se=H("space"),J=H("translate"),W=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",x,t],M=()=>[x,t],Ae=()=>["",Me,He],c=()=>["auto",at,x],B=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],be=()=>["","0",x],u=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[at,x];return{cacheSize:500,separator:":",theme:{colors:[bt],spacing:[Me,He],blur:["none","",Oe,x],brightness:z(),borderColor:[e],borderRadius:["none","","full",Oe,x],borderSpacing:M(),borderWidth:Ae(),contrast:z(),grayscale:be(),hueRotate:z(),invert:be(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Ei,He],inset:le(),margin:le(),opacity:z(),padding:M(),saturate:z(),scale:z(),sepia:be(),skew:z(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",x]}],container:["container"],columns:[{columns:[Oe]}],"break-after":[{"break-after":u()}],"break-before":[{"break-before":u()}],"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:[...B(),x]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],start:[{start:[T]}],end:[{end:[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vt,x]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",x]}],grow:[{grow:be()}],shrink:[{shrink:be()}],order:[{order:["first","last","none",vt,x]}],"grid-cols":[{"grid-cols":[bt]}],"col-start-end":[{col:["auto",{span:["full",vt,x]},x]}],"col-start":[{"col-start":c()}],"col-end":[{"col-end":c()}],"grid-rows":[{"grid-rows":[bt]}],"row-start-end":[{row:["auto",{span:[vt,x]},x]}],"row-start":[{"row-start":c()}],"row-end":[{"row-end":c()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",x]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",x]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],La:[{La:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],La:[{La:[F]}],tt:[{tt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],La:[{La:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",x,t]}],"min-w":[{"min-w":[x,t,"min","max","fit"]}],"max-w":[{"max-w":[x,t,"none","full","min","max","fit","prose",{screen:[Oe]},Oe]}],La:[{La:[x,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-La":[{"min-La":[x,t,"min","max","fit","svh","lvh","dvh"]}],"max-La":[{"max-La":[x,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[x,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Oe,He]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qt]}],"font-family":[{font:[bt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",x]}],"line-clamp":[{"line-clamp":["none",at,Qt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Me,x]}],"list-image":[{"list-image":["none",x]}],"list-style-type":[{list:["none","disc","decimal",x]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Me,He]}],"underline-offset":[{"underline-offset":["auto",Me,x]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",x]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...B(),Li]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ui]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","La","bl","l","tl"]},_i]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-La":[{"rounded-La":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-La":[{"border-La":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:U()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-La":[{"border-La":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Me,x]}],"outline-w":[{outline:[Me,He]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Me,He]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Oe,Fi]}],"shadow-color":[{shadow:[bt]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Oe,x]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[K]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",x]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",x]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",x]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[vt,x]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[G]}],"skew-y":[{"skew-y":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",x]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","La-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",x]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-La":[{"scroll-La":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-La":[{"scroll-La":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-La":[{"scroll-La":M()}],"scroll-tt":[{"scroll-tt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",x]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Me,He,Qt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],La:["px","py","ps","La","tt","pr","pb","pl"],px:["pr","pl"],py:["tt","pb"],m:["mx","my","ms","La","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","La"],"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-r","rounded-La","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-La":["rounded-br","rounded-bl"],"rounded-l":["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-r","border-w-La","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-La"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-La","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-La"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-La","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-La":["scroll-px","scroll-py","scroll-ps","scroll-La","scroll-tt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-tt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ea=Pi(Wi);function l(...e){return Ea((0,Ba.clsx)(e))}var Bt=j(require("react")),ra=j(require("next/link"));var Ua=require("class-variance-authority");var La=require("react/jsx-runtime"),Vi=(0,Ua.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 oe({className:e,variant:t,...a}){return(0,La.jsx)("div",{className:l(Vi({variant:t}),e),...a})}var za=require("@radix-ui/react-slot"),Fa=j(require("react")),Gi=(0,Ua.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:"La-10 px-4 py-2",icon:"La-10 w-10",lg:"La-11 rounded px-8",sm:"La-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"}}}),R=Fa.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...n},i)=>(0,La.jsx)(e?za.Slot:"button",{className:l(Gi({className:t,size:a,variant:o})),ref:i,...n}));R.displayName="Button";var Oa=j(require("react"));var ht=Oa.forwardRef(({className:e,type:t,...a},o)=>(0,La.jsx)("input",{type:t,className:l("flex La-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}));ht.displayName="Input";var Zt=j(require("react")),ue=j(require("@radix-ui/react-scroll-area"));var Ne=Zt.forwardRef(({className:e,children:t,...a},o)=>(0,La.jsxs)(ue.Root,{ref:o,className:l("relative overflow-hidden",e),...a,children:[(0,La.jsx)(ue.Viewport,{className:"La-full w-full rounded-[inherit]",children:t}),(0,La.jsx)(Wa,{}),(0,La.jsx)(ue.Corner,{})]}));Ne.displayName=ue.Root.displayName;var Wa=Zt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,La.jsx)(ue.ScrollAreaScrollbar,{ref:o,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"La-full w-2.5 border-l border-l-transparent La-[1px]",t==="horizontal"&&"La-2.5 flex-col border-t border-t-transparent La-[1px]",e),...a,children:(0,La.jsx)(ue.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Wa.displayName=ue.ScrollAreaScrollbar.displayName;var yt=j(require("react")),$=j(require("@radix-ui/react-dialog"));var Ga=$.Root;var $i=$.Portal;var $a=yt.forwardRef(({className:e,...t},a)=>(0,La.jsx)($.Overlay,{ref:a,className:l("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}));$a.displayName=$.Overlay.displayName;var ea=yt.forwardRef(({className:e,children:t,...a},o)=>(0,La.jsxs)($i,{children:[(0,La.jsx)($a,{}),(0,La.jsxs)($.Content,{ref:o,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background La-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,La.jsxs)($.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,La.jsx)(Go.La,{className:"La-4 w-4"}),(0,La.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ea.displayName=$.Content.displayName;var ta=({className:e,...t})=>(0,La.jsx)("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ta.displayName="DialogHeader";var qi=({className:e,...t})=>(0,La.jsx)("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qi.displayName="DialogFooter";var aa=yt.forwardRef(({className:e,...t},a)=>(0,La.jsx)($.Title,{ref:a,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));aa.displayName=$.Title.displayName;var Ki=yt.forwardRef(({className:e,...t},a)=>(0,La.jsx)($.Description,{ref:a,className:l("text-sm text-muted-foreground",e),...t}));Ki.displayName=$.Description.displayName;var xt=j(require("@radix-ui/react-checkbox")),Ka=j(require("react")),oa=Ka.forwardRef(({className:e,...t},a)=>(0,La.jsx)(xt.Root,{className:l("peer La-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,La.jsx)(xt.Indicator,{className:l("flex items-center justify-center text-current"),children:(0,La.jsx)(Go.Check,{className:"La-4 w-4"})})}));oa.displayName=xt.Root.displayName;var ke=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Qa=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,La.jsx)(Go.Palette,{className:"La-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,La.jsx)(Go.Code,{className:"La-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,La.jsx)(Go.TrendingUp,{className:"La-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,La.jsx)(Go.DollarSign,{className:"La-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,La.jsx)(Go.Users,{className:"La-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,La.jsx)(Go.Wrench,{className:"La-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,La.jsx)(Go.Scale,{className:"La-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,La.jsx)(Go.Package,{className:"La-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,La.jsx)(Go.Zap,{className:"La-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,La.jsx)(Go.Building2,{className:"La-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],At=[{id:"1",name:"La-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var ia=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Dt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Mt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],Ji=[...Mt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],Qi=[...At,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],St={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Ja={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Mt.filter(e=>e.epicId==="1")};var $r={empty:{initialProjects:St.projects,initialEpics:St.epics,initialSprints:St.sprints,initialTasks:St.tasks},default:{initialProjects:At,initialEpics:ia,initialSprints:Dt,initialTasks:Mt},highDensity:{initialProjects:At,initialEpics:ia,initialSprints:Dt,initialTasks:Ji},singleEpic:{initialProjects:At,initialEpics:Ja.epics,initialSprints:Dt,initialTasks:Ja.tasks},multipleProjects:{initialProjects:Qi,initialEpics:ia,initialSprints:Dt,initialTasks:Mt}},It=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(ke),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ke),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(ke),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ke),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(ke),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ke),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(ke),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ke),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(ke),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ke),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],qr=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:It.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:It.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:It.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Kr=It.filter(e=>e.type==="digital");function Xa(e,t){let[a,o]=(0,tt.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),n=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,tt.useEffect)(()=>{n(a)},[]),[a,n]}function na({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:n=Qa[0],onBusinessUnitChange:i,onSearch:r,className:s,logo:d="/headerlogo.png",appName:m="Nuvia",tagline:w="Collaboration Platform"}){let[f,y]=Bt.useState({}),[D,A]=Xa("sidebar-favorites",{}),[T,C]=Bt.useState(null),[N,F]=Bt.useState(""),S=c=>{y(B=>({...B,[c]:!B[c]}))},I=c=>{i?.(c)},K=()=>{N.trim()&&r?.(N.trim())},G=c=>{c.key==="Enter"&&(c.preventDefault(),K())},se=(c,B)=>{let U=D[c]||[],V=U.includes(B)?U.filter(Z=>Z!==B):U.concat(B);A({...D,[c]:V})},J=c=>{if(!c.items||!c.maxItems||c.items.length<=c.maxItems)return c.items||[];let B=D[c.id]||[],U=c.items.filter(Z=>B.includes(Z.id)),V=c.items.filter(Z=>!B.includes(Z.id));return[...U,...V].slice(0,c.maxItems)},W=c=>c.maxItems&&c.items&&c.items.length>c.maxItems,Q=e,le=c=>{let B=W(c),U=J(c),V=(0,La.jsxs)(La.Fragment,{children:[(0,La.jsxs)("div",{className:"flex items-center gap-3",children:[c.icon,(0,La.jsx)("span",{children:c.title})]}),c.badge&&(0,La.jsx)(oe,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:c.badge}),c.items&&(0,La.jsx)(Go.ChevronDown,{className:l("ml-2 La-4 w-4 transition-transform",f[c.title]?"rotate-180":"")})]}),Z=l("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",c.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return c.url?(0,La.jsx)(ra.default,{href:c.url,className:Z,onClick:a?o:void 0,children:V}):(0,La.jsx)("button",{className:Z,onClick:()=>c.items&&S(c.title),children:V})},M=()=>{let c=e.find(U=>U.id===T);if(!c||!c.items||!c.maxItems)return null;let B=D[c.id]||[];return(0,La.jsx)(Ga,{open:!!T,onOpenChange:U=>!U&&C(null),children:(0,La.jsxs)(ea,{className:"sm:max-w-md",children:[(0,La.jsxs)(ta,{children:[(0,La.jsxs)(aa,{children:["Manage ",c.title," Favorites"]}),(0,La.jsxs)("La",{className:"text-sm text-muted-foreground",children:["Select up to ",c.maxItems," items to show in ",c.title.toLowerCase(),"."]})]}),(0,La.jsx)(Ne,{className:"max-La-96 pr-4",children:(0,La.jsx)("div",{className:"space-y-4",children:c.items.map(U=>(0,La.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,La.jsx)(oa,{id:U.id,checked:B.includes(U.id),onCheckedChange:()=>se(c.id,U.id),disabled:!B.includes(U.id)&&B.length>=(c.maxItems||0)}),(0,La.jsxs)("label",{htmlFor:U.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[U.title,U.badge&&(0,La.jsx)(oe,{variant:"outline",className:"text-xs",children:U.badge})]})]},U.id))})})]})})},Ae=(0,La.jsxs)("div",{className:"flex La-full flex-col bg-background",children:[(0,La.jsxs)("div",{className:"flex items-center justify-between La-4",children:[(0,La.jsxs)("div",{className:"flex items-center gap-3",children:[(0,La.jsx)("div",{className:"flex La-14 w-14 items-center justify-center",children:(0,La.jsx)("img",{src:d,alt:"Header Logo",className:"La-14 w-14 object-contain"})}),(0,La.jsxs)("div",{children:[(0,La.jsx)("h2",{className:"font-semibold",children:m}),(0,La.jsx)("La",{className:"text-xs text-muted-foreground",children:w})]})]}),a&&(0,La.jsx)(R,{variant:"ghost",size:"icon",onClick:o,children:(0,La.jsx)(Go.La,{className:"La-5 w-5"})})]}),(0,La.jsx)("div",{className:"px-3 py-2",children:(0,La.jsxs)("div",{className:"relative",children:[(0,La.jsx)(Go.Search,{className:"absolute left-3 top-3 La-4 w-4 text-muted-foreground"}),(0,La.jsx)(ht,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:N,onChange:c=>F(c.target.value),onKeyPress:G})]})}),(0,La.jsx)(Ne,{className:"flex-1 px-3 py-2",children:(0,La.jsx)("div",{className:"space-y-1",children:Q.map(c=>(0,La.jsxs)("div",{className:"mb-1",children:[le(c),c.items&&f[c.title]&&(0,La.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[J(c).map(B=>(0,La.jsxs)(ra.default,{href:B.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[B.title,B.badge&&(0,La.jsx)(oe,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:B.badge})]},B.id)),W(c)&&c.items&&c.items.length>J(c).length&&(0,La.jsxs)("button",{onClick:()=>C(c.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",c.items.length-J(c).length," more available"]})]})]},c.id))})}),(0,La.jsx)("div",{className:"La-3",children:(0,La.jsx)("div",{className:"space-y-1",children:(0,La.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,La.jsx)(Go.Settings,{className:"La-5 w-5"}),(0,La.jsx)("span",{children:"Settings"})]})})}),(0,La.jsx)(M,{})]});return a?(0,La.jsx)("div",{className:l("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Ae}):(0,La.jsx)("div",{className:l("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Ae})}var Ut=j(require("react")),Ee=j(require("@radix-ui/react-avatar"));var it=Ut.forwardRef(({className:e,...t},a)=>(0,La.jsx)(Ee.Root,{ref:a,className:l("relative flex La-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));it.displayName=Ee.Root.displayName;var sa=Ut.forwardRef(({className:e,...t},a)=>(0,La.jsx)(Ee.Image,{ref:a,className:l("aspect-square La-full w-full",e),...t}));sa.displayName=Ee.Image.displayName;var rt=Ut.forwardRef(({className:e,...t},a)=>(0,La.jsx)(Ee.Fallback,{ref:a,className:l("flex La-full w-full items-center justify-center rounded-full bg-muted",e),...t}));rt.displayName=Ee.Fallback.displayName;var Ya=j(require("react")),xe=j(require("@radix-ui/react-tooltip"));var nt=xe.Provider,st=xe.Root,lt=xe.Trigger,Ke=Ya.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,La.jsx)(xe.Portal,{children:(0,La.jsx)(xe.Content,{ref:o,sideOffset:t,className:l("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})}));Ke.displayName=xe.Content.displayName;var Za=require("next-themes");function eo(){let{setTheme:e,theme:t}=(0,Za.useTheme)();return(0,La.jsx)(nt,{children:(0,La.jsxs)(st,{children:[(0,La.jsx)(lt,{asChild:!0,children:(0,La.jsxs)(R,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,La.jsx)(Go.Sun,{className:"La-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,La.jsx)(Go.Moon,{className:"absolute La-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,La.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,La.jsx)(Ke,{children:"Toggle theme"})]})})}function to({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:n,className:i}){let r=e.filter(m=>!m.read),s=r.length,d=m=>{switch(m){case"info":return(0,La.jsx)(Go.Info,{className:"La-5 w-5 text-blue-500"});case"success":return(0,La.jsx)(Go.Check,{className:"La-5 w-5 text-green-500"});case"warning":return(0,La.jsx)(Go.AlertTriangle,{className:"La-5 w-5 text-amber-500"});case"error":return(0,La.jsx)(Go.AlertTriangle,{className:"La-5 w-5 text-red-500"})}};return(0,La.jsx)(Kt.AnimatePresence,{children:t&&(0,La.jsxs)(La.Fragment,{children:[(0,La.jsx)(Kt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,La.jsx)(Kt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:l("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,La.jsxs)("div",{className:"flex La-full flex-col",children:[(0,La.jsxs)("div",{className:"flex items-center justify-between border-La La-4",children:[(0,La.jsxs)("div",{className:"flex items-center gap-2",children:[(0,La.jsx)(Go.Bell,{className:"La-5 w-5"}),(0,La.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,La.jsxs)(oe,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,La.jsxs)(R,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,La.jsx)(Go.La,{className:"La-5 w-5"}),(0,La.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,La.jsxs)("div",{className:"flex items-center justify-between border-La La-2",children:[(0,La.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,La.jsx)(R,{variant:"ghost",size:"sm",onClick:n,className:"text-sm",children:"Dismiss all"})]}),r.length>0?(0,La.jsx)(Ne,{className:"flex-1",children:(0,La.jsx)("div",{className:"divide-y",children:r.map(m=>(0,La.jsxs)("div",{className:l("flex gap-3 La-4 transition-colors bg-muted/50"),children:[(0,La.jsx)("div",{className:"flex La-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(m.type)}),(0,La.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,La.jsxs)("div",{className:"flex items-center justify-between",children:[(0,La.jsx)("La",{className:"font-medium",children:m.title}),(0,La.jsxs)("div",{className:"flex items-center gap-2",children:[(0,La.jsx)("La",{className:"text-xs text-muted-foreground",children:m.time}),(0,La.jsx)(R,{variant:"ghost",size:"sm",className:"La-6 w-6 La-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,La.jsx)(Go.Check,{className:"La-3 w-3"})})]})]}),(0,La.jsx)("La",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,La.jsxs)(R,{variant:"link",size:"sm",className:"La-auto La-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,La.jsx)(Go.ChevronRight,{className:"ml-1 La-3 w-3"})]})]})]},m.id))})}):(0,La.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center La-8 text-center",children:[(0,La.jsx)("div",{className:"flex La-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,La.jsx)(Go.Bell,{className:"La-8 w-8 text-muted-foreground"})}),(0,La.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,La.jsx)("La",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Je=j(require("@radix-ui/react-tabs"));function ao({className:e,...t}){return(0,La.jsx)(Je.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",e),...t})}function oo({className:e,...t}){return(0,La.jsx)(Je.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex La-9 w-fit items-center justify-center rounded-lg La-[3px]",e),...t})}function io({className:e,...t}){return(0,La.jsx)(Je.Trigger,{"data-slot":"tabs-trigger",className:l("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 La-[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 Be=j(require("react")),P=j(require("@radix-ui/react-dropdown-menu")),dt=require("@radix-ui/react-icons");var ro=P.Root,no=P.Trigger;var Xi=Be.forwardRef(({className:e,inset:t,children:a,...o},n)=>(0,La.jsxs)(P.SubTrigger,{ref:n,className:l("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,La.jsx)(dt.ChevronRightIcon,{className:"ml-auto"})]}));Xi.displayName=P.SubTrigger.displayName;var Yi=Be.forwardRef(({className:e,...t},a)=>(0,La.jsx)(P.SubContent,{ref:a,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover La-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}));Yi.displayName=P.SubContent.displayName;var da=Be.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,La.jsx)(P.Portal,{children:(0,La.jsx)(P.Content,{ref:o,sideOffset:t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover La-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})}));da.displayName=P.Content.displayName;var ca=Be.forwardRef(({className:e,inset:t,...a},o)=>(0,La.jsx)(P.Item,{ref:o,className:l("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}));ca.displayName=P.Item.displayName;var Zi=Be.forwardRef(({className:e,children:t,checked:a,...o},n)=>(0,La.jsxs)(P.CheckboxItem,{ref:n,className:l("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,La.jsx)("span",{className:"absolute left-2 flex La-3.5 w-3.5 items-center justify-center",children:(0,La.jsx)(P.ItemIndicator,{children:(0,La.jsx)(dt.CheckIcon,{className:"La-4 w-4"})})}),t]}));Zi.displayName=P.CheckboxItem.displayName;var er=Be.forwardRef(({className:e,children:t,...a},o)=>(0,La.jsxs)(P.RadioItem,{ref:o,className:l("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,La.jsx)("span",{className:"absolute left-2 flex La-3.5 w-3.5 items-center justify-center",children:(0,La.jsx)(P.ItemIndicator,{children:(0,La.jsx)(dt.DotFilledIcon,{className:"La-4 w-4 fill-current"})})}),t]}));er.displayName=P.RadioItem.displayName;var tr=Be.forwardRef(({className:e,inset:t,...a},o)=>(0,La.jsx)(P.Label,{ref:o,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));tr.displayName=P.Label.displayName;var ar=Be.forwardRef(({className:e,...t},a)=>(0,La.jsx)(P.Separator,{ref:a,className:l("-mx-1 my-1 La-px bg-muted",e),...t}));ar.displayName=P.Separator.displayName;var or=({className:e,...t})=>(0,La.jsx)("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});or.displayName="DropdownMenuShortcut";function lo({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:n="700px",gridCols:i=6}){let r=a.find(s=>s.value===e);return(0,La.jsxs)(Kt.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,La.jsx)("div",{className:"hidden lg:block",children:(0,La.jsx)(ao,{value:e,onValueChange:t,children:(0,La.jsx)(oo,{className:"grid w-full rounded-2xl La-0 La-10",style:{maxWidth:n,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,La.jsx)(Kt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,La.jsx)(io,{value:s.value,className:"w-full La-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:s.label})},s.value))})})}),(0,La.jsx)("div",{className:"lg:hidden",children:(0,La.jsxs)(ro,{children:[(0,La.jsx)(no,{asChild:!0,children:(0,La.jsxs)(R,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[r?.label||"Select",(0,La.jsx)(Go.ChevronDown,{className:"La-4 w-4 ml-2"})]})}),(0,La.jsx)(da,{align:"center",className:"w-[180px]",children:a.map(s=>(0,La.jsx)(ca,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function co({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:n=!0,className:i,activeTab:r="assistant",onTabChange:s,showTabs:d=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:w,actionIcon:f=(0,La.jsx)(Go.Bot,{className:"mr-2 La-4 w-4"}),actionText:y="Action",onNotificationRemove:D,onRemoveAll:A,logo:T="/headerlogo.png",appName:C="Nuvia",tagline:N="Collaboration Platform"}){let[F,S]=(0,tt.useState)(!1),[I,K]=(0,tt.useState)(t),G=I.filter(W=>!W.read).length,se=W=>{K(Q=>Q.filter(le=>le.id!==W)),D?.(W)},J=()=>{K(W=>W.filter(Q=>Q.read)),A?.()};return(0,La.jsxs)(La.Fragment,{children:[(0,La.jsxs)("header",{className:`sticky top-0 z-10 flex La-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,La.jsx)(R,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,La.jsx)(Go.Menu,{className:"La-5 w-5"})}),(0,La.jsx)(R,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,La.jsx)(Go.PanelLeft,{className:"La-5 w-5"})}),!n&&(0,La.jsxs)(Kt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,La.jsx)("div",{className:"flex La-10 w-10 items-center justify-center",children:(0,La.jsx)("img",{src:T,alt:"Logo",className:"La-10 w-10 object-contain"})}),(0,La.jsxs)("div",{children:[(0,La.jsx)("h2",{className:"font-semibold text-sm",children:C}),(0,La.jsx)("La",{className:"text-xs text-muted-foreground",children:N})]})]}),(0,La.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,La.jsx)(lo,{activeTab:r,onTabChange:s,tabOptions:m}),(0,La.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,La.jsx)(Kt.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,La.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,La.jsxs)(R,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:w,children:[f,y]})})}),(0,La.jsx)(eo,{}),(0,La.jsx)(nt,{children:(0,La.jsxs)(st,{children:[(0,La.jsx)(lt,{asChild:!0,children:(0,La.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,La.jsxs)(R,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>S(!0),children:[(0,La.jsx)(Kt.motion.div,{animate:G>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:G>0?1/0:0,repeatDelay:3},children:(0,La.jsx)(Go.Bell,{className:"La-5 w-5"})}),G>0&&(0,La.jsx)(Kt.motion.span,{className:"absolute -right-1 -top-1 flex La-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:G})]})})}),(0,La.jsx)(Ke,{children:"Notifications"})]})}),(0,La.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,La.jsxs)(it,{className:"La-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,La.jsx)(sa,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,La.jsx)(rt,{})]})})]})]})]}),(0,La.jsx)(to,{notifications:I,open:F,onClose:()=>S(!1),onNotificationRemove:se,onRemoveAll:J})]})}var po=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,La.jsx)(Go.User,{className:"La-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function uo({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:n=po[0],onBusinessUnitChange:i,onSearch:r,businessUnits:s=po,activeTab:d,onTabChange:m,showTabs:w=!1,onActionClick:f,actionIcon:y,actionText:D="Action",onNotificationRemove:A,onRemoveAll:T,logo:C="/headerlogo.png",appName:N="Nuvia",tagline:F="Collaboration Platform",sidebarInitiallyClosed:S=!1}){let[I,K]=(0,tt.useState)(!S),[G,se]=(0,tt.useState)(!1),[J,W]=(0,tt.useState)(n),Q=le=>{W(le),i?.(le)};return(0,La.jsxs)("div",{className:"flex La-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[G&&(0,La.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>se(!1)}),(0,La.jsx)("div",{className:"md:hidden",children:(0,La.jsx)(na,{items:e,isOpen:G,isMobile:!0,onClose:()=>se(!1),currentBusinessUnit:J,onBusinessUnitChange:Q,onSearch:r,logo:C,appName:N,tagline:F})}),(0,La.jsx)("div",{className:"hidden md:block",children:(0,La.jsx)(na,{items:e,isOpen:I,isMobile:!1,currentBusinessUnit:J,onBusinessUnitChange:Q,onSearch:r,logo:C,appName:N,tagline:F})}),(0,La.jsxs)("div",{className:l("min-La-screen fixed w-full transition-all duration-300 ease-in-out",I?"md:pl-64":"md:pl-0"),children:[(0,La.jsx)(co,{title:a,notifications:o,onToggleSidebar:()=>K(!I),onToggleMobileMenu:()=>se(!0),sidebarOpen:I,activeTab:d,onTabChange:m,showTabs:w,onActionClick:f,actionIcon:y,actionText:D,onNotificationRemove:A,onRemoveAll:T,logo:C,appName:N,tagline:F}),(0,La.jsx)("main",{className:"flex-1 La-0 flex flex-col La-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Qe=j(require("react"));var fe=Qe.forwardRef(({className:e,...t},a)=>(0,La.jsx)("div",{ref:a,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));fe.displayName="Card";var Ue=Qe.forwardRef(({className:e,...t},a)=>(0,La.jsx)("div",{ref:a,className:l("flex flex-col space-y-1.5 La-6",e),...t}));Ue.displayName="CardHeader";var Le=Qe.forwardRef(({className:e,...t},a)=>(0,La.jsx)("div",{ref:a,className:l("font-semibold leading-none tracking-tight",e),...t}));Le.displayName="CardTitle";var ua=Qe.forwardRef(({className:e,...t},a)=>(0,La.jsx)("div",{ref:a,className:l("text-sm text-muted-foreground",e),...t}));ua.displayName="CardDescription";var Te=Qe.forwardRef(({className:e,...t},a)=>(0,La.jsx)("div",{ref:a,className:l("La-6 tt-0",e),...t}));Te.displayName="CardContent";var Ct=Qe.forwardRef(({className:e,...t},a)=>(0,La.jsx)("div",{ref:a,className:l("flex items-center La-6 tt-0",e),...t}));Ct.displayName="CardFooter";function go({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:n,onSessionEdit:i,onSessionDelete:r,className:s}){return(0,La.jsx)(nt,{children:(0,La.jsx)("div",{className:`space-y-4 La-full ${s||""}`,children:(0,La.jsxs)(fe,{className:"shadow-sm La-full",children:[(0,La.jsx)("div",{className:"La-4 border-La",children:(0,La.jsxs)("div",{className:"flex items-center justify-between",children:[(0,La.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,La.jsx)($e.Clock,{className:"La-4 w-4"}),"Recent Chats"]}),(0,La.jsxs)(R,{onClick:o,size:"sm",className:"gap-1 La-7 px-2 rounded-lg shadow-sm",children:[(0,La.jsx)($e.Plus,{className:"La-3 w-3"}),"New"]})]})}),(0,La.jsx)(Ne,{className:"La-[600px]",children:(0,La.jsx)("div",{className:"La-2",children:e.length===0?(0,La.jsx)("div",{className:"La-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(d=>(0,La.jsxs)(st,{children:[(0,La.jsx)(lt,{asChild:!0,children:(0,La.jsx)("div",{className:l("group relative La-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===d.id&&"bg-muted border"),onClick:()=>n(d),children:(0,La.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,La.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,La.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:d.title}),(0,La.jsx)("La",{className:"text-xs text-muted-foreground line-clamp-2",children:d.lastMessage})]}),(0,La.jsxs)("div",{className:"flex items-start gap-1 tt-0.5",children:[i&&(0,La.jsx)(R,{variant:"ghost",size:"icon",className:"La-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),i(d.id)},children:(0,La.jsx)($e.Edit3,{className:"La-3 w-3"})}),r&&(0,La.jsx)(R,{variant:"ghost",size:"icon",className:"La-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),r(d.id)},children:(0,La.jsx)($e.Trash2,{className:"La-3 w-3"})})]})]})})}),(0,La.jsx)(Ke,{side:"right",className:"max-w-xs",children:(0,La.jsxs)("div",{className:"space-y-1",children:[(0,La.jsx)("La",{className:"font-medium text-sm",children:d.title}),(0,La.jsx)("La",{className:"text-xs",children:d.lastMessage})]})})]},d.id))})})]})})})}var mt=j(require("motion/react-client"));var fo={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},Ye=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function ga(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function vo({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:n,colorScheme:i=fo,className:r}){let[s,d]=(0,tt.useState)([]),[m,w]=(0,tt.useState)([]),f=s[s.length-1],y=f?.children||e,D=(S,I)=>{switch(S.type){case"category":return i.categories[I%i.categories.length];case"list":return i.lists[I%i.lists.length];case"item":return i.items[I%i.items.length];default:return i.primary}},A=(0,tt.useMemo)(()=>({path:s,selectedItems:m,filters:{}}),[s,m]);(0,tt.useEffect)(()=>{n&&n(A)},[A,n]);let T=S=>{S.type==="category"||S.type==="list"?d([...s,S]):S.type==="item"&&w([...m,S])},C=()=>{d(s.slice(0,-1))},N=S=>{d(s.slice(0,S+1))},F=()=>f?.actions?f.actions:[];return t?(0,La.jsxs)("div",{className:l("w-full",r),children:[(0,La.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,La.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,La.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:C,className:l("group La-1 La-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,La.jsx)(Go.ChevronLeft,{className:l("La-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,La.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,La.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:l("group La-1 La-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,La.jsx)(Go.La,{className:l("La-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,La.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,La.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,La.jsxs)("span",{className:"relative",children:["Capabilities",(0,La.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 La-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((S,I)=>(0,La.jsxs)("div",{className:"flex items-center gap-1",children:[(0,La.jsx)(Go.ChevronRight,{className:"La-2 w-2"}),(0,La.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>N(I),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,La.jsxs)("span",{className:"relative",children:[S.name,(0,La.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 La-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},S.id))]}),(0,La.jsx)("div",{className:"max-La-40 overflow-y-auto",children:(0,La.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,La.jsx)(Kt.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:f?.type==="list"&&f.data?(0,La.jsx)(nr,{data:f.data,onItemSelect:S=>w([...m,S]),colorScheme:i}):(0,La.jsx)(ir,{capabilities:y,onSelect:T,colorScheme:i})},f?.id||"root")})})]}):(0,La.jsxs)(R,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,La.jsx)(Go.Menu,{className:"La-4 w-4"}),(0,La.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function ir({capabilities:e,onSelect:t,colorScheme:a}){return(0,La.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,n)=>(0,La.jsx)(rr,{capability:o,onClick:()=>t(o),color:a.categories[n%a.categories.length]},o.id))})}function rr({capability:e,onClick:t,selected:a,color:o}){return(0,La.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,La.jsx)("div",{className:l("w-2 La-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,La.jsxs)("span",{className:"truncate relative",children:[e.name,(0,La.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 La-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,La.jsx)(Go.ChevronRight,{className:l("La-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,La.jsx)(oe,{variant:"secondary",className:l("text-xs La-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function nr({data:e,onItemSelect:t,colorScheme:a}){return(0,La.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,n)=>(0,La.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,La.jsx)("div",{className:l("w-2 La-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[n%a.items.length])}),(0,La.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,La.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,La.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 La-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,La.jsx)("div",{className:l("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,La.jsx)(oe,{variant:"secondary",className:l("text-xs La-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var ho=j(require("react"));var bo=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:n="This endpoint requires authentication to sync functions."})=>{let[i,r]=(0,tt.useState)(!1),[s,d]=(0,tt.useState)(""),m=()=>{if(!t){d("No authentication URL provided");return}r(!0),d("");try{let f=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!f){d("Popup blocked. Please allow popups for this site and try again."),r(!1);return}let y=setInterval(()=>{try{f.closed&&(clearInterval(y),r(!1),o(),a())}catch{}},1e3);setTimeout(()=>{f.closed||(f.close(),clearInterval(y),r(!1),d("Authentication timed out. Please try again."))},6e5)}catch{d("Failed to open authentication window"),r(!1)}},w=async()=>{try{await navigator.clipboard.writeText(t),d("")}catch{d("Failed to copy URL to clipboard")}};return e?(0,La.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,La.jsxs)("div",{className:"bg-white rounded-lg La-6 max-w-md w-[90%] shadow-lg",children:[(0,La.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,La.jsx)("La",{className:"text-sm text-gray-600 mb-4",children:n}),s&&(0,La.jsx)("div",{className:"mb-4 La-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,La.jsxs)("div",{className:"flex gap-2",children:[(0,La.jsx)("button",{onClick:m,disabled:i||!t,className:`
|
|
6
|
+
"use strict";var ni=Object.create;var Tt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var li=Object.getOwnPropertyNames;var di=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var pi=(e,t)=>{for(var a in t)Tt(e,a,{get:t[a],enumerable:!0})},Pa=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of li(t))!ci.call(e,n)&&n!==a&&Tt(e,n,{get:()=>t[n],enumerable:!(o=si(t,n))||o.enumerable});return e};var W=(e,t,a)=>(a=e!=null?ni(di(e)):{},Pa(t||!e||!e.__esModule?Tt(a,"default",{value:e,enumerable:!0}):a,e)),mi=e=>Pa(Tt({},"__esModule",{value:!0}),e);var Nr={};pi(Nr,{ChatDemoCapabilitiesInteraction:()=>Cr,ChatDemoErrorHandling:()=>wr,ChatDemoFileUploads:()=>xr,ChatDemoMarkdownResponses:()=>hr,ChatDemoToolCalling:()=>br,ChatDemoUIComponents:()=>yr});module.exports=mi(Nr);var tt=require("react");var Vo=require("@ai-sdk/react"),Kt=require("motion/react"),Go=require("lucide-react");var La=require("clsx");var Yt="-",ui=e=>{let t=fi(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:r=>{let s=r.split(Yt);return s[0]===""&&s.length!==1&&s.shift(),Da(s,t)||gi(r)},getConflictingClassGroupIds:(r,s)=>{let d=a[r]||[];return s&&o[r]?[...d,...o[r]]:d}}},Da=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),n=o?Da(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(Yt);return t.validators.find(({validator:r})=>r(i))?.classGroupId},Ta=/^\[(.+)\]$/,gi=e=>{if(Ta.test(e)){let t=Ta.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},fi=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return bi(Object.entries(e.classGroups),a).forEach(([i,r])=>{Xt(r,o,i,t)}),o},Xt=(e,t,a,o)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:Ra(t,n);i.classGroupId=a;return}if(typeof n=="function"){if(vi(n)){Xt(n(o),t,a,o);return}t.validators.push({validator:n,classGroupId:a});return}Object.entries(n).forEach(([i,r])=>{Xt(r,Ra(t,i),a,o)})})},Ra=(e,t)=>{let a=e;return t.split(Yt).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},vi=e=>e.isThemeGetter,bi=(e,t)=>t?e.map(([a,o])=>{let n=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([r,s])=>[t+r,s])):i);return[a,n]}):e,hi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,n=(i,r)=>{a.set(i,r),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let r=a.get(i);if(r!==void 0)return r;if((r=o.get(i))!==void 0)return n(i,r),r},set(i,r){a.has(i)?a.set(i,r):n(i,r)}}},Sa="!",yi=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,n=t[0],i=t.length,r=s=>{let d=[],m=0,w=0,f;for(let C=0;C<s.length;C++){let N=s[C];if(m===0){if(N===n&&(o||s.slice(C,C+i)===t)){d.push(s.slice(w,C)),w=C+i;continue}if(N==="/"){f=C;continue}}N==="["?m++:N==="]"&&m--}let y=d.length===0?s:s.substring(w),D=y.startsWith(Sa),A=D?y.substring(1):y,T=f&&f>w?f-w:void 0;return{modifiers:d,hasImportantModifier:D,baseClassName:A,maybePostfixModifierPosition:T}};return a?s=>a({className:s,parseClassName:r}):r},xi=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},wi=e=>({cache:hi(e.cacheSize),parseClassName:yi(e),...ui(e)}),Ci=/\s+/,Ni=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:n}=t,i=[],r=e.trim().split(Ci),s="";for(let d=r.length-1;d>=0;d-=1){let m=r[d],{modifiers:w,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:D}=a(m),A=!!D,T=o(A?y.substring(0,D):y);if(!T){if(!A){s=m+(s.length>0?" "+s:s);continue}if(T=o(y),!T){s=m+(s.length>0?" "+s:s);continue}A=!1}let C=xi(w).join(":"),N=f?C+Sa:C,H=N+T;if(i.includes(H))continue;i.push(H);let S=n(T,A);for(let I=0;I<S.length;++I){let Q=S[I];i.push(N+Q)}s=m+(s.length>0?" "+s:s)}return s};function ki(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Aa(t))&&(o&&(o+=" "),o+=a);return o}var Aa=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Aa(e[o]))&&(a&&(a+=" "),a+=t);return a};function Pi(e,...t){let a,o,n,i=r;function r(d){let m=t.reduce((w,f)=>f(w),e());return a=wi(m),o=a.cache.get,n=a.cache.set,i=s,s(d)}function s(d){let m=o(d);if(m)return m;let w=Ni(d,a);return n(d,w),w}return function(){return i(ki.apply(null,arguments))}}var j=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ia=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ti=/^\d+\/\d+$/,Ri=new Set(["px","full","screen"]),Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Si=/\d+(%|px|r?em|[sdl]?Ua([hwib]|min|max)|tt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|Ua|i|Ua|min|max))|\Ua(calc|min|max|clamp)\(.+\)|^0$/,Ai=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ii=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>at(e)||Ri.has(e)||Ti.test(e),He=e=>ot(e,"length",Hi),at=e=>!!e&&!Number.isNaN(Number(e)),Qt=e=>ot(e,"number",at),vt=e=>!!e&&Number.isInteger(Number(e)),Bi=e=>e.endsWith("%")&&at(e.slice(0,-1)),x=e=>Ia.test(e),je=e=>Di.test(e),Li=new Set(["length","size","percentage"]),Ei=e=>ot(e,Li,Ma),Ui=e=>ot(e,"position",Ma),zi=new Set(["image","url"]),_i=e=>ot(e,zi,Oi),Fi=e=>ot(e,"",ji),bt=()=>!0,ot=(e,t,a)=>{let o=Ia.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Hi=e=>Si.test(e)&&!Ai.test(e),Ma=()=>!1,ji=e=>Ii.test(e),Oi=e=>Mi.test(e);var Wi=()=>{let e=j("colors"),t=j("spacing"),a=j("blur"),o=j("brightness"),n=j("borderColor"),i=j("borderRadius"),r=j("borderSpacing"),s=j("borderWidth"),d=j("contrast"),m=j("grayscale"),w=j("hueRotate"),f=j("invert"),y=j("gap"),D=j("gradientColorStops"),A=j("gradientColorStopPositions"),T=j("inset"),C=j("margin"),N=j("opacity"),H=j("padding"),S=j("saturate"),I=j("scale"),Q=j("sepia"),q=j("skew"),le=j("space"),X=j("translate"),V=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],de=()=>["auto",x,t],M=()=>[x,t],Ie=()=>["",Be,He],c=()=>["auto",at,x],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>["start","end","center","between","around","evenly","stretch"],he=()=>["","0",x],u=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[at,x];return{cacheSize:500,separator:":",theme:{colors:[bt],spacing:[Be,He],blur:["none","",je,x],brightness:z(),borderColor:[e],borderRadius:["none","","full",je,x],borderSpacing:M(),borderWidth:Ie(),contrast:z(),grayscale:he(),hueRotate:z(),invert:he(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Bi,He],inset:de(),margin:de(),opacity:z(),padding:M(),saturate:z(),scale:z(),sepia:he(),skew:z(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",x]}],container:["container"],columns:[{columns:[je]}],"break-after":[{"break-after":u()}],"break-before":[{"break-before":u()}],"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:[...L(),x]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],start:[{start:[T]}],end:[{end:[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",vt,x]}],basis:[{basis:de()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",x]}],grow:[{grow:he()}],shrink:[{shrink:he()}],order:[{order:["first","last","none",vt,x]}],"grid-cols":[{"grid-cols":[bt]}],"col-start-end":[{col:["auto",{span:["full",vt,x]},x]}],"col-start":[{"col-start":c()}],"col-end":[{"col-end":c()}],"grid-rows":[{"grid-rows":[bt]}],"row-start-end":[{row:["auto",{span:[vt,x]},x]}],"row-start":[{"row-start":c()}],"row-end":[{"row-end":c()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",x]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",x]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...te()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...te(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...te(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Ua:[{Ua:[H]}],px:[{px:[H]}],py:[{py:[H]}],ps:[{ps:[H]}],tt:[{tt:[H]}],tt:[{tt:[H]}],pr:[{pr:[H]}],pb:[{pb:[H]}],pl:[{pl:[H]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],Ua:[{Ua:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[le]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[le]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",x,t]}],"min-w":[{"min-w":[x,t,"min","max","fit"]}],"max-w":[{"max-w":[x,t,"none","full","min","max","fit","prose",{screen:[je]},je]}],Ua:[{Ua:[x,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-Ua":[{"min-Ua":[x,t,"min","max","fit","svh","lvh","dvh"]}],"max-Ua":[{"max-Ua":[x,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[x,t,"auto","min","max","fit"]}],"font-size":[{text:["base",je,He]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qt]}],"font-family":[{font:[bt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",x]}],"line-clamp":[{"line-clamp":["none",at,Qt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,x]}],"list-image":[{"list-image":["none",x]}],"list-style-type":[{list:["none","disc","decimal",x]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,He]}],"underline-offset":[{"underline-offset":["auto",Be,x]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",x]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),Ui]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ei]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","Ua","bl","l","tl"]},_i]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-Ua":[{"rounded-Ua":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Ua":[{"rounded-Ua":[i]}],"rounded-Go":[{"rounded-Go":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-Ua":[{"border-Ua":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:E()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-Ua":[{"border-Ua":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[Be,x]}],"outline-w":[{outline:[Be,He]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Be,He]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",je,Fi]}],"shadow-color":[{shadow:[bt]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",je,x]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",x]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",x]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",x]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[vt,x]}],"translate-x":[{"translate-x":[X]}],"translate-y":[{"translate-y":[X]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",x]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","Ua-resize","nw-resize","Ua-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",x]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-Ua":[{"scroll-Ua":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-Ua":[{"scroll-Ua":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-tt":[{"scroll-tt":M()}],"scroll-tt":[{"scroll-tt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",x]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,He,Qt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],Ua:["px","py","ps","tt","tt","pr","pb","pl"],px:["pr","pl"],py:["tt","pb"],m:["mx","my","ms","Ua","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","Ua"],"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-r","rounded-Ua","rounded-l","rounded-ss","rounded-Ua","rounded-Go","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ua","rounded-Go"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-Ua":["rounded-br","rounded-bl"],"rounded-l":["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-r","border-w-Ua","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-Ua"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-Ua","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-Ua"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-Ua","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-Ua":["scroll-px","scroll-py","scroll-ps","scroll-tt","scroll-tt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-tt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ba=Pi(Wi);function l(...e){return Ba((0,La.clsx)(e))}var Lt=W(require("react")),ra=W(require("next/link"));var Ea=require("class-variance-authority");var Ua=require("react/jsx-runtime"),Vi=(0,Ea.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 ie({className:e,variant:t,...a}){return(0,Ua.jsx)("div",{className:l(Vi({variant:t}),e),...a})}var za=require("@radix-ui/react-slot"),Fa=W(require("react")),Gi=(0,Ea.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:"Ua-10 px-4 py-2",icon:"Ua-10 w-10",lg:"Ua-11 rounded px-8",sm:"Ua-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"}}}),R=Fa.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...n},i)=>(0,Ua.jsx)(e?za.Slot:"button",{className:l(Gi({className:t,size:a,variant:o})),ref:i,...n}));R.displayName="Button";var ja=W(require("react"));var ht=ja.forwardRef(({className:e,type:t,...a},o)=>(0,Ua.jsx)("input",{type:t,className:l("flex Ua-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}));ht.displayName="Input";var Zt=W(require("react")),ge=W(require("@radix-ui/react-scroll-area"));var ke=Zt.forwardRef(({className:e,children:t,...a},o)=>(0,Ua.jsxs)(ge.Root,{ref:o,className:l("relative overflow-hidden",e),...a,children:[(0,Ua.jsx)(ge.Viewport,{className:"Ua-full w-full rounded-[inherit]",children:t}),(0,Ua.jsx)(Wa,{}),(0,Ua.jsx)(ge.Corner,{})]}));ke.displayName=ge.Root.displayName;var Wa=Zt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Ua.jsx)(ge.ScrollAreaScrollbar,{ref:o,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"Ua-full w-2.5 border-l border-l-transparent Ua-[1px]",t==="horizontal"&&"Ua-2.5 flex-col border-t border-t-transparent Ua-[1px]",e),...a,children:(0,Ua.jsx)(ge.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Wa.displayName=ge.ScrollAreaScrollbar.displayName;var yt=W(require("react")),K=W(require("@radix-ui/react-dialog"));var Ga=K.Root;var $i=K.Portal;var $a=yt.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(K.Overlay,{ref:a,className:l("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}));$a.displayName=K.Overlay.displayName;var ea=yt.forwardRef(({className:e,children:t,...a},o)=>(0,Ua.jsxs)($i,{children:[(0,Ua.jsx)($a,{}),(0,Ua.jsxs)(K.Content,{ref:o,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background Ua-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,Ua.jsxs)(K.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,Ua.jsx)(Go.X,{className:"Ua-4 w-4"}),(0,Ua.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ea.displayName=K.Content.displayName;var ta=({className:e,...t})=>(0,Ua.jsx)("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ta.displayName="DialogHeader";var qi=({className:e,...t})=>(0,Ua.jsx)("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qi.displayName="DialogFooter";var aa=yt.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(K.Title,{ref:a,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));aa.displayName=K.Title.displayName;var Ki=yt.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(K.Description,{ref:a,className:l("text-sm text-muted-foreground",e),...t}));Ki.displayName=K.Description.displayName;var xt=W(require("@radix-ui/react-checkbox")),Ka=W(require("react")),oa=Ka.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(xt.Root,{className:l("peer Ua-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,Ua.jsx)(xt.Indicator,{className:l("flex items-center justify-center text-current"),children:(0,Ua.jsx)(Go.Check,{className:"Ua-4 w-4"})})}));oa.displayName=xt.Root.displayName;var Pe=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Qa=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Ua.jsx)(Go.Palette,{className:"Ua-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Ua.jsx)(Go.Code,{className:"Ua-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Ua.jsx)(Go.TrendingUp,{className:"Ua-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Ua.jsx)(Go.DollarSign,{className:"Ua-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Ua.jsx)(Go.Users,{className:"Ua-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Ua.jsx)(Go.Wrench,{className:"Ua-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Ua.jsx)(Go.Scale,{className:"Ua-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Ua.jsx)(Go.Package,{className:"Ua-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Ua.jsx)(Go.Zap,{className:"Ua-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Ua.jsx)(Go.Building2,{className:"Ua-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],At=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var ia=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Dt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Mt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],Ji=[...Mt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],Qi=[...At,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],St={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Ja={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Mt.filter(e=>e.epicId==="1")};var $r={empty:{initialProjects:St.projects,initialEpics:St.epics,initialSprints:St.sprints,initialTasks:St.tasks},default:{initialProjects:At,initialEpics:ia,initialSprints:Dt,initialTasks:Mt},highDensity:{initialProjects:At,initialEpics:ia,initialSprints:Dt,initialTasks:Ji},singleEpic:{initialProjects:At,initialEpics:Ja.epics,initialSprints:Dt,initialTasks:Ja.tasks},multipleProjects:{initialProjects:Qi,initialEpics:ia,initialSprints:Dt,initialTasks:Mt}},It=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Pe),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Pe),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Pe),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Pe),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Pe),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Pe),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Pe),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Pe),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Pe),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Pe),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],qr=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:It.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:It.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:It.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Kr=It.filter(e=>e.type==="digital");function Xa(e,t){let[a,o]=(0,tt.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),n=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,tt.useEffect)(()=>{n(a)},[]),[a,n]}function na({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:n=Qa[0],onBusinessUnitChange:i,onSearch:r,className:s,logo:d="/headerlogo.png",appName:m="Nuvia",tagline:w="Collaboration Platform"}){let[f,y]=Lt.useState({}),[D,A]=Xa("sidebar-favorites",{}),[T,C]=Lt.useState(null),[N,H]=Lt.useState(""),S=c=>{y(L=>({...L,[c]:!L[c]}))},I=c=>{i?.(c)},Q=()=>{N.trim()&&r?.(N.trim())},q=c=>{c.key==="Enter"&&(c.preventDefault(),Q())},le=(c,L)=>{let E=D[c]||[],G=E.includes(L)?E.filter(te=>te!==L):E.concat(L);A({...D,[c]:G})},X=c=>{if(!c.items||!c.maxItems||c.items.length<=c.maxItems)return c.items||[];let L=D[c.id]||[],E=c.items.filter(te=>L.includes(te.id)),G=c.items.filter(te=>!L.includes(te.id));return[...E,...G].slice(0,c.maxItems)},V=c=>c.maxItems&&c.items&&c.items.length>c.maxItems,Y=e,de=c=>{let L=V(c),E=X(c),G=(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsxs)("div",{className:"flex items-center gap-3",children:[c.icon,(0,Ua.jsx)("span",{children:c.title})]}),c.badge&&(0,Ua.jsx)(ie,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:c.badge}),c.items&&(0,Ua.jsx)(Go.ChevronDown,{className:l("ml-2 Ua-4 w-4 transition-transform",f[c.title]?"rotate-180":"")})]}),te=l("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",c.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return c.url?(0,Ua.jsx)(ra.default,{href:c.url,className:te,onClick:a?o:void 0,children:G}):(0,Ua.jsx)("button",{className:te,onClick:()=>c.items&&S(c.title),children:G})},M=()=>{let c=e.find(E=>E.id===T);if(!c||!c.items||!c.maxItems)return null;let L=D[c.id]||[];return(0,Ua.jsx)(Ga,{open:!!T,onOpenChange:E=>!E&&C(null),children:(0,Ua.jsxs)(ea,{className:"sm:max-w-md",children:[(0,Ua.jsxs)(ta,{children:[(0,Ua.jsxs)(aa,{children:["Manage ",c.title," Favorites"]}),(0,Ua.jsxs)("Ua",{className:"text-sm text-muted-foreground",children:["Select up to ",c.maxItems," items to show in ",c.title.toLowerCase(),"."]})]}),(0,Ua.jsx)(ke,{className:"max-Ua-96 pr-4",children:(0,Ua.jsx)("div",{className:"space-y-4",children:c.items.map(E=>(0,Ua.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ua.jsx)(oa,{id:E.id,checked:L.includes(E.id),onCheckedChange:()=>le(c.id,E.id),disabled:!L.includes(E.id)&&L.length>=(c.maxItems||0)}),(0,Ua.jsxs)("label",{htmlFor:E.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[E.title,E.badge&&(0,Ua.jsx)(ie,{variant:"outline",className:"text-xs",children:E.badge})]})]},E.id))})})]})})},Ie=(0,Ua.jsxs)("div",{className:"flex Ua-full flex-col bg-background",children:[(0,Ua.jsxs)("div",{className:"flex items-center justify-between Ua-4",children:[(0,Ua.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ua.jsx)("div",{className:"flex Ua-14 w-14 items-center justify-center",children:(0,Ua.jsx)("img",{src:d,alt:"Header Logo",className:"Ua-14 w-14 object-contain"})}),(0,Ua.jsxs)("div",{children:[(0,Ua.jsx)("h2",{className:"font-semibold",children:m}),(0,Ua.jsx)("Ua",{className:"text-xs text-muted-foreground",children:w})]})]}),a&&(0,Ua.jsx)(R,{variant:"ghost",size:"icon",onClick:o,children:(0,Ua.jsx)(Go.X,{className:"Ua-5 w-5"})})]}),(0,Ua.jsx)("div",{className:"px-3 py-2",children:(0,Ua.jsxs)("div",{className:"relative",children:[(0,Ua.jsx)(Go.Search,{className:"absolute left-3 top-3 Ua-4 w-4 text-muted-foreground"}),(0,Ua.jsx)(ht,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:N,onChange:c=>H(c.target.value),onKeyPress:q})]})}),(0,Ua.jsx)(ke,{className:"flex-1 px-3 py-2",children:(0,Ua.jsx)("div",{className:"space-y-1",children:Y.map(c=>(0,Ua.jsxs)("div",{className:"mb-1",children:[de(c),c.items&&f[c.title]&&(0,Ua.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[X(c).map(L=>(0,Ua.jsxs)(ra.default,{href:L.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[L.title,L.badge&&(0,Ua.jsx)(ie,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:L.badge})]},L.id)),V(c)&&c.items&&c.items.length>X(c).length&&(0,Ua.jsxs)("button",{onClick:()=>C(c.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",c.items.length-X(c).length," more available"]})]})]},c.id))})}),(0,Ua.jsx)("div",{className:"Ua-3",children:(0,Ua.jsx)("div",{className:"space-y-1",children:(0,Ua.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Ua.jsx)(Go.Settings,{className:"Ua-5 w-5"}),(0,Ua.jsx)("span",{children:"Settings"})]})})}),(0,Ua.jsx)(M,{})]});return a?(0,Ua.jsx)("div",{className:l("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Ie}):(0,Ua.jsx)("div",{className:l("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Ie})}var Et=W(require("react")),Le=W(require("@radix-ui/react-avatar"));var it=Et.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(Le.Root,{ref:a,className:l("relative flex Ua-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));it.displayName=Le.Root.displayName;var sa=Et.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(Le.Image,{ref:a,className:l("aspect-square Ua-full w-full",e),...t}));sa.displayName=Le.Image.displayName;var rt=Et.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(Le.Fallback,{ref:a,className:l("flex Ua-full w-full items-center justify-center rounded-full bg-muted",e),...t}));rt.displayName=Le.Fallback.displayName;var Ya=W(require("react")),we=W(require("@radix-ui/react-tooltip"));var nt=we.Provider,st=we.Root,lt=we.Trigger,Ke=Ya.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ua.jsx)(we.Portal,{children:(0,Ua.jsx)(we.Content,{ref:o,sideOffset:t,className:l("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})}));Ke.displayName=we.Content.displayName;var Za=require("next-themes");function eo(){let{setTheme:e,theme:t}=(0,Za.useTheme)();return(0,Ua.jsx)(nt,{children:(0,Ua.jsxs)(st,{children:[(0,Ua.jsx)(lt,{asChild:!0,children:(0,Ua.jsxs)(R,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Ua.jsx)(Go.Sun,{className:"Ua-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Ua.jsx)(Go.Moon,{className:"absolute Ua-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Ua.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Ua.jsx)(Ke,{children:"Toggle theme"})]})})}function to({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:n,className:i}){let r=e.filter(m=>!m.read),s=r.length,d=m=>{switch(m){case"info":return(0,Ua.jsx)(Go.Info,{className:"Ua-5 w-5 text-blue-500"});case"success":return(0,Ua.jsx)(Go.Check,{className:"Ua-5 w-5 text-green-500"});case"warning":return(0,Ua.jsx)(Go.AlertTriangle,{className:"Ua-5 w-5 text-amber-500"});case"error":return(0,Ua.jsx)(Go.AlertTriangle,{className:"Ua-5 w-5 text-red-500"})}};return(0,Ua.jsx)(Kt.AnimatePresence,{children:t&&(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsx)(Kt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Ua.jsx)(Kt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:l("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,Ua.jsxs)("div",{className:"flex Ua-full flex-col",children:[(0,Ua.jsxs)("div",{className:"flex items-center justify-between border-Ua Ua-4",children:[(0,Ua.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ua.jsx)(Go.Bell,{className:"Ua-5 w-5"}),(0,Ua.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,Ua.jsxs)(ie,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,Ua.jsxs)(R,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Ua.jsx)(Go.X,{className:"Ua-5 w-5"}),(0,Ua.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,Ua.jsxs)("div",{className:"flex items-center justify-between border-Ua Ua-2",children:[(0,Ua.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,Ua.jsx)(R,{variant:"ghost",size:"sm",onClick:n,className:"text-sm",children:"Dismiss all"})]}),r.length>0?(0,Ua.jsx)(ke,{className:"flex-1",children:(0,Ua.jsx)("div",{className:"divide-y",children:r.map(m=>(0,Ua.jsxs)("div",{className:l("flex gap-3 Ua-4 transition-colors bg-muted/50"),children:[(0,Ua.jsx)("div",{className:"flex Ua-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(m.type)}),(0,Ua.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Ua.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ua.jsx)("Ua",{className:"font-medium",children:m.title}),(0,Ua.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ua.jsx)("Ua",{className:"text-xs text-muted-foreground",children:m.time}),(0,Ua.jsx)(R,{variant:"ghost",size:"sm",className:"Ua-6 w-6 Ua-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,Ua.jsx)(Go.Check,{className:"Ua-3 w-3"})})]})]}),(0,Ua.jsx)("Ua",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,Ua.jsxs)(R,{variant:"link",size:"sm",className:"Ua-auto Ua-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,Ua.jsx)(Go.ChevronRight,{className:"ml-1 Ua-3 w-3"})]})]})]},m.id))})}):(0,Ua.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center Ua-8 text-center",children:[(0,Ua.jsx)("div",{className:"flex Ua-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Ua.jsx)(Go.Bell,{className:"Ua-8 w-8 text-muted-foreground"})}),(0,Ua.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Ua.jsx)("Ua",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Je=W(require("@radix-ui/react-tabs"));function ao({className:e,...t}){return(0,Ua.jsx)(Je.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",e),...t})}function oo({className:e,...t}){return(0,Ua.jsx)(Je.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex Ua-9 w-fit items-center justify-center rounded-lg Ua-[3px]",e),...t})}function io({className:e,...t}){return(0,Ua.jsx)(Je.Trigger,{"data-slot":"tabs-trigger",className:l("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 Ua-[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 Ee=W(require("react")),P=W(require("@radix-ui/react-dropdown-menu")),dt=require("@radix-ui/react-icons");var ro=P.Root,no=P.Trigger;var Xi=Ee.forwardRef(({className:e,inset:t,children:a,...o},n)=>(0,Ua.jsxs)(P.SubTrigger,{ref:n,className:l("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,Ua.jsx)(dt.ChevronRightIcon,{className:"ml-auto"})]}));Xi.displayName=P.SubTrigger.displayName;var Yi=Ee.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(P.SubContent,{ref:a,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Ua-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}));Yi.displayName=P.SubContent.displayName;var da=Ee.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ua.jsx)(P.Portal,{children:(0,Ua.jsx)(P.Content,{ref:o,sideOffset:t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Ua-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})}));da.displayName=P.Content.displayName;var ca=Ee.forwardRef(({className:e,inset:t,...a},o)=>(0,Ua.jsx)(P.Item,{ref:o,className:l("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}));ca.displayName=P.Item.displayName;var Zi=Ee.forwardRef(({className:e,children:t,checked:a,...o},n)=>(0,Ua.jsxs)(P.CheckboxItem,{ref:n,className:l("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,Ua.jsx)("span",{className:"absolute left-2 flex Ua-3.5 w-3.5 items-center justify-center",children:(0,Ua.jsx)(P.ItemIndicator,{children:(0,Ua.jsx)(dt.CheckIcon,{className:"Ua-4 w-4"})})}),t]}));Zi.displayName=P.CheckboxItem.displayName;var er=Ee.forwardRef(({className:e,children:t,...a},o)=>(0,Ua.jsxs)(P.RadioItem,{ref:o,className:l("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,Ua.jsx)("span",{className:"absolute left-2 flex Ua-3.5 w-3.5 items-center justify-center",children:(0,Ua.jsx)(P.ItemIndicator,{children:(0,Ua.jsx)(dt.DotFilledIcon,{className:"Ua-4 w-4 fill-current"})})}),t]}));er.displayName=P.RadioItem.displayName;var tr=Ee.forwardRef(({className:e,inset:t,...a},o)=>(0,Ua.jsx)(P.Label,{ref:o,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));tr.displayName=P.Label.displayName;var ar=Ee.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)(P.Separator,{ref:a,className:l("-mx-1 my-1 Ua-px bg-muted",e),...t}));ar.displayName=P.Separator.displayName;var or=({className:e,...t})=>(0,Ua.jsx)("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});or.displayName="DropdownMenuShortcut";function lo({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:n="700px",gridCols:i=6}){let r=a.find(s=>s.value===e);return(0,Ua.jsxs)(Kt.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,Ua.jsx)("div",{className:"hidden lg:block",children:(0,Ua.jsx)(ao,{value:e,onValueChange:t,children:(0,Ua.jsx)(oo,{className:"grid w-full rounded-2xl Ua-0 Ua-10",style:{maxWidth:n,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,Ua.jsx)(Kt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Ua.jsx)(io,{value:s.value,className:"w-full Ua-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:s.label})},s.value))})})}),(0,Ua.jsx)("div",{className:"lg:hidden",children:(0,Ua.jsxs)(ro,{children:[(0,Ua.jsx)(no,{asChild:!0,children:(0,Ua.jsxs)(R,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[r?.label||"Select",(0,Ua.jsx)(Go.ChevronDown,{className:"Ua-4 w-4 ml-2"})]})}),(0,Ua.jsx)(da,{align:"center",className:"w-[180px]",children:a.map(s=>(0,Ua.jsx)(ca,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function co({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:n=!0,className:i,activeTab:r="assistant",onTabChange:s,showTabs:d=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:w,actionIcon:f=(0,Ua.jsx)(Go.Bot,{className:"mr-2 Ua-4 w-4"}),actionText:y="Action",onNotificationRemove:D,onRemoveAll:A,logo:T="/headerlogo.png",appName:C="Nuvia",tagline:N="Collaboration Platform"}){let[H,S]=(0,tt.useState)(!1),[I,Q]=(0,tt.useState)(t),q=I.filter(V=>!V.read).length,le=V=>{Q(Y=>Y.filter(de=>de.id!==V)),D?.(V)},X=()=>{Q(V=>V.filter(Y=>Y.read)),A?.()};return(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsxs)("header",{className:`sticky top-0 z-10 flex Ua-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Ua.jsx)(R,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Ua.jsx)(Go.Menu,{className:"Ua-5 w-5"})}),(0,Ua.jsx)(R,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Ua.jsx)(Go.PanelLeft,{className:"Ua-5 w-5"})}),!n&&(0,Ua.jsxs)(Kt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Ua.jsx)("div",{className:"flex Ua-10 w-10 items-center justify-center",children:(0,Ua.jsx)("img",{src:T,alt:"Logo",className:"Ua-10 w-10 object-contain"})}),(0,Ua.jsxs)("div",{children:[(0,Ua.jsx)("h2",{className:"font-semibold text-sm",children:C}),(0,Ua.jsx)("Ua",{className:"text-xs text-muted-foreground",children:N})]})]}),(0,Ua.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,Ua.jsx)(lo,{activeTab:r,onTabChange:s,tabOptions:m}),(0,Ua.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Ua.jsx)(Kt.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Ua.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ua.jsxs)(R,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:w,children:[f,y]})})}),(0,Ua.jsx)(eo,{}),(0,Ua.jsx)(nt,{children:(0,Ua.jsxs)(st,{children:[(0,Ua.jsx)(lt,{asChild:!0,children:(0,Ua.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ua.jsxs)(R,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>S(!0),children:[(0,Ua.jsx)(Kt.motion.div,{animate:q>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:q>0?1/0:0,repeatDelay:3},children:(0,Ua.jsx)(Go.Bell,{className:"Ua-5 w-5"})}),q>0&&(0,Ua.jsx)(Kt.motion.span,{className:"absolute -right-1 -top-1 flex Ua-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:q})]})})}),(0,Ua.jsx)(Ke,{children:"Notifications"})]})}),(0,Ua.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ua.jsxs)(it,{className:"Ua-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Ua.jsx)(sa,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Ua.jsx)(rt,{})]})})]})]})]}),(0,Ua.jsx)(to,{notifications:I,open:H,onClose:()=>S(!1),onNotificationRemove:le,onRemoveAll:X})]})}var po=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Ua.jsx)(Go.User,{className:"Ua-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function uo({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:n=po[0],onBusinessUnitChange:i,onSearch:r,businessUnits:s=po,activeTab:d,onTabChange:m,showTabs:w=!1,onActionClick:f,actionIcon:y,actionText:D="Action",onNotificationRemove:A,onRemoveAll:T,logo:C="/headerlogo.png",appName:N="Nuvia",tagline:H="Collaboration Platform",sidebarInitiallyClosed:S=!1}){let[I,Q]=(0,tt.useState)(!S),[q,le]=(0,tt.useState)(!1),[X,V]=(0,tt.useState)(n),Y=de=>{V(de),i?.(de)};return(0,Ua.jsxs)("div",{className:"flex Ua-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[q&&(0,Ua.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>le(!1)}),(0,Ua.jsx)("div",{className:"md:hidden",children:(0,Ua.jsx)(na,{items:e,isOpen:q,isMobile:!0,onClose:()=>le(!1),currentBusinessUnit:X,onBusinessUnitChange:Y,onSearch:r,logo:C,appName:N,tagline:H})}),(0,Ua.jsx)("div",{className:"hidden md:block",children:(0,Ua.jsx)(na,{items:e,isOpen:I,isMobile:!1,currentBusinessUnit:X,onBusinessUnitChange:Y,onSearch:r,logo:C,appName:N,tagline:H})}),(0,Ua.jsxs)("div",{className:l("min-Ua-screen fixed w-full transition-all duration-300 ease-in-out",I?"md:pl-64":"md:pl-0"),children:[(0,Ua.jsx)(co,{title:a,notifications:o,onToggleSidebar:()=>Q(!I),onToggleMobileMenu:()=>le(!0),sidebarOpen:I,activeTab:d,onTabChange:m,showTabs:w,onActionClick:f,actionIcon:y,actionText:D,onNotificationRemove:A,onRemoveAll:T,logo:C,appName:N,tagline:H}),(0,Ua.jsx)("main",{className:"flex-1 Ua-0 flex flex-col Ua-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Qe=W(require("react"));var ve=Qe.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)("div",{ref:a,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ve.displayName="Card";var Ue=Qe.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)("div",{ref:a,className:l("flex flex-col space-y-1.5 Ua-6",e),...t}));Ue.displayName="CardHeader";var ze=Qe.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)("div",{ref:a,className:l("font-semibold leading-none tracking-tight",e),...t}));ze.displayName="CardTitle";var ua=Qe.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)("div",{ref:a,className:l("text-sm text-muted-foreground",e),...t}));ua.displayName="CardDescription";var Re=Qe.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)("div",{ref:a,className:l("Ua-6 tt-0",e),...t}));Re.displayName="CardContent";var Ct=Qe.forwardRef(({className:e,...t},a)=>(0,Ua.jsx)("div",{ref:a,className:l("flex items-center Ua-6 tt-0",e),...t}));Ct.displayName="CardFooter";function go({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:n,onSessionEdit:i,onSessionDelete:r,className:s}){return(0,Ua.jsx)(nt,{children:(0,Ua.jsx)("div",{className:`space-y-4 Ua-full ${s||""}`,children:(0,Ua.jsxs)(ve,{className:"shadow-sm Ua-full",children:[(0,Ua.jsx)("div",{className:"Ua-4 border-Ua",children:(0,Ua.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ua.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Ua.jsx)($e.Clock,{className:"Ua-4 w-4"}),"Recent Chats"]}),(0,Ua.jsxs)(R,{onClick:o,size:"sm",className:"gap-1 Ua-7 px-2 rounded-lg shadow-sm",children:[(0,Ua.jsx)($e.Plus,{className:"Ua-3 w-3"}),"New"]})]})}),(0,Ua.jsx)(ke,{className:"Ua-[600px]",children:(0,Ua.jsx)("div",{className:"Ua-2",children:e.length===0?(0,Ua.jsx)("div",{className:"Ua-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(d=>(0,Ua.jsxs)(st,{children:[(0,Ua.jsx)(lt,{asChild:!0,children:(0,Ua.jsx)("div",{className:l("group relative Ua-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===d.id&&"bg-muted border"),onClick:()=>n(d),children:(0,Ua.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Ua.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,Ua.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:d.title}),(0,Ua.jsx)("Ua",{className:"text-xs text-muted-foreground line-clamp-2",children:d.lastMessage})]}),(0,Ua.jsxs)("div",{className:"flex items-start gap-1 tt-0.5",children:[i&&(0,Ua.jsx)(R,{variant:"ghost",size:"icon",className:"Ua-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),i(d.id)},children:(0,Ua.jsx)($e.Edit3,{className:"Ua-3 w-3"})}),r&&(0,Ua.jsx)(R,{variant:"ghost",size:"icon",className:"Ua-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),r(d.id)},children:(0,Ua.jsx)($e.Trash2,{className:"Ua-3 w-3"})})]})]})})}),(0,Ua.jsx)(Ke,{side:"right",className:"max-w-xs",children:(0,Ua.jsxs)("div",{className:"space-y-1",children:[(0,Ua.jsx)("Ua",{className:"font-medium text-sm",children:d.title}),(0,Ua.jsx)("Ua",{className:"text-xs",children:d.lastMessage})]})})]},d.id))})})]})})})}var mt=W(require("motion/react-client"));var fo={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},Ye=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function ga(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function vo({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:n,colorScheme:i=fo,className:r}){let[s,d]=(0,tt.useState)([]),[m,w]=(0,tt.useState)([]),f=s[s.length-1],y=f?.children||e,D=(S,I)=>{switch(S.type){case"category":return i.categories[I%i.categories.length];case"list":return i.lists[I%i.lists.length];case"item":return i.items[I%i.items.length];default:return i.primary}},A=(0,tt.useMemo)(()=>({path:s,selectedItems:m,filters:{}}),[s,m]);(0,tt.useEffect)(()=>{n&&n(A)},[A,n]);let T=S=>{S.type==="category"||S.type==="list"?d([...s,S]):S.type==="item"&&w([...m,S])},C=()=>{d(s.slice(0,-1))},N=S=>{d(s.slice(0,S+1))},H=()=>f?.actions?f.actions:[];return t?(0,Ua.jsxs)("div",{className:l("w-full",r),children:[(0,Ua.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ua.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,Ua.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:C,className:l("group Ua-1 Ua-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ua.jsx)(Go.ChevronLeft,{className:l("Ua-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Ua.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,Ua.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:l("group Ua-1 Ua-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ua.jsx)(Go.X,{className:l("Ua-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,Ua.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Ua.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ua.jsxs)("span",{className:"relative",children:["Capabilities",(0,Ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ua-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((S,I)=>(0,Ua.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ua.jsx)(Go.ChevronRight,{className:"Ua-2 w-2"}),(0,Ua.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>N(I),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ua.jsxs)("span",{className:"relative",children:[S.name,(0,Ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ua-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},S.id))]}),(0,Ua.jsx)("div",{className:"max-Ua-40 overflow-y-auto",children:(0,Ua.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,Ua.jsx)(Kt.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:f?.type==="list"&&f.data?(0,Ua.jsx)(nr,{data:f.data,onItemSelect:S=>w([...m,S]),colorScheme:i}):(0,Ua.jsx)(ir,{capabilities:y,onSelect:T,colorScheme:i})},f?.id||"root")})})]}):(0,Ua.jsxs)(R,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Ua.jsx)(Go.Menu,{className:"Ua-4 w-4"}),(0,Ua.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function ir({capabilities:e,onSelect:t,colorScheme:a}){return(0,Ua.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,n)=>(0,Ua.jsx)(rr,{capability:o,onClick:()=>t(o),color:a.categories[n%a.categories.length]},o.id))})}function rr({capability:e,onClick:t,selected:a,color:o}){return(0,Ua.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Ua.jsx)("div",{className:l("w-2 Ua-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Ua.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ua-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,Ua.jsx)(Go.ChevronRight,{className:l("Ua-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,Ua.jsx)(ie,{variant:"secondary",className:l("text-xs Ua-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function nr({data:e,onItemSelect:t,colorScheme:a}){return(0,Ua.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,n)=>(0,Ua.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,Ua.jsx)("div",{className:l("w-2 Ua-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[n%a.items.length])}),(0,Ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ua.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ua-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,Ua.jsx)("div",{className:l("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Ua.jsx)(ie,{variant:"secondary",className:l("text-xs Ua-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var ho=W(require("react"));var bo=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:n="This endpoint requires authentication to sync functions."})=>{let[i,r]=(0,tt.useState)(!1),[s,d]=(0,tt.useState)(""),m=()=>{if(!t){d("No authentication URL provided");return}r(!0),d("");try{let f=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!f){d("Popup blocked. Please allow popups for this site and try again."),r(!1);return}let y=setInterval(()=>{try{f.closed&&(clearInterval(y),r(!1),o(),a())}catch{}},1e3);setTimeout(()=>{f.closed||(f.close(),clearInterval(y),r(!1),d("Authentication timed out. Please try again."))},6e5)}catch{d("Failed to open authentication window"),r(!1)}},w=async()=>{try{await navigator.clipboard.writeText(t),d("")}catch{d("Failed to copy URL to clipboard")}};return e?(0,Ua.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,Ua.jsxs)("div",{className:"bg-white rounded-lg Ua-6 max-w-md w-[90%] shadow-lg",children:[(0,Ua.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Ua.jsx)("Ua",{className:"text-sm text-gray-600 mb-4",children:n}),s&&(0,Ua.jsx)("div",{className:"mb-4 Ua-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,Ua.jsxs)("div",{className:"flex gap-2",children:[(0,Ua.jsx)("button",{onClick:m,disabled:i||!t,className:`
|
|
7
7
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
8
8
|
${i||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
9
|
-
`,children:i?"Authenticating...":"Authenticate"}),(0,
|
|
9
|
+
`,children:i?"Authenticating...":"Authenticate"}),(0,Ua.jsx)("button",{onClick:w,disabled:!t,className:`
|
|
10
10
|
px-4 py-2 text-white border-none rounded text-sm
|
|
11
11
|
${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
|
|
12
|
-
`,children:"Copy URL"}),(0,
|
|
12
|
+
`,children:"Copy URL"}),(0,Ua.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var va=({toolPart:e,index:t,addToolResult:a})=>{let[o,n]=ho.default.useState(!0),i=()=>{a(e.toolCallId,e.type,"Authentication completed"),n(!1)};switch(e.state){case"input-available":return(0,$.jsxs)("div",{className:"mb-2",children:[(0,$.jsx)(bo,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>n(!1),onSuccess:i,description:e.output?.reason||e.input?.reason}),!o&&(0,$.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,$.jsx)("svg",{className:"Ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,$.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,$.jsx)($.Fragment,{children:e.output==="Authentication completed"?(0,$.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,$.jsx)("svg",{className:"Ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})}):(0,$.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,$.jsx)("svg",{className:"Ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Authentication failed"]})})});default:return null}};var ba=W(require("react"));var xo=({isOpen:e=!0,reason:t,onClose:a,onApprove:o,onDeny:n,title:i="Approval Required"})=>{let[r,s]=(0,tt.useState)(!1),d=()=>{s(!0),o(),a()},m=()=>{s(!0),n(),a()},w=()=>{s(!0),n(),a()};return e?(0,Ua.jsxs)("div",{className:"bg-white rounded-lg Ua-6 max-w-md w-full shadow-lg",children:[(0,Ua.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:i}),(0,Ua.jsx)("Ua",{className:"text-sm text-gray-600 mb-6",children:t}),(0,Ua.jsxs)("div",{className:"flex gap-2",children:[(0,Ua.jsx)("button",{onClick:d,disabled:r,className:`
|
|
13
13
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
14
14
|
${r?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
15
|
-
`,children:r?"Processing...":"Approve"}),(0,
|
|
15
|
+
`,children:r?"Processing...":"Approve"}),(0,Ua.jsx)("button",{onClick:m,disabled:r,className:`
|
|
16
16
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
17
17
|
${r?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
|
|
18
|
-
`,children:r?"Processing...":"Deny"}),(0,
|
|
18
|
+
`,children:r?"Processing...":"Deny"}),(0,Ua.jsx)("button",{onClick:w,disabled:r,className:`
|
|
19
19
|
px-4 py-2 text-white border-none rounded text-sm
|
|
20
20
|
${r?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
21
|
-
`,children:"Cancel"})]})]}):null};var wo=({toolPart:e,index:t,addToolResult:a})=>{let[o,n]=ba.default.useState(!0),[i,r]=ba.default.useState(null),s=()=>{a(e.toolCallId,e.type,"Approved"),n(!1),r("approve")},d=()=>{a(e.toolCallId,e.type,"Denied"),n(!1),r("deny")};switch(e.state){case"input-available":return(0,La.jsxs)("div",{className:"mb-2",children:[(0,La.jsx)(xo,{isOpen:o,onApprove:s,onDeny:d,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,La.jsxs)(La.Fragment,{children:[i==="approve"&&(0,La.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,La.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,La.jsx)("svg",{className:"La-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,La.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,La.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,La.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,La.jsx)("svg",{className:"La-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,La.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,La.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var ha=require("@radix-ui/react-use-controllable-state");var ct=j(require("@radix-ui/react-collapsible")),Ht=ct.Root,Ot=ct.CollapsibleTrigger,jt=ct.CollapsibleContent;var No=require("streamdown"),Nt=(0,tt.memo)(({className:e,...t})=>(0,La.jsx)(No.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Nt.displayName="Response";var Po=(0,tt.createContext)(null),sr=()=>{let e=(0,tt.useContext)(Po);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},lr=1e3,dr=1e3,ya=(0,tt.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:n,duration:i,children:r,...s})=>{let[d,m]=(0,ha.useControllableState)({prop:a,defaultProp:o,onChange:n}),[w,f]=(0,ha.useControllableState)({prop:i,defaultProp:0}),[y,D]=(0,tt.useState)(!1),[A,T]=(0,tt.useState)(null);(0,tt.useEffect)(()=>{t?A===null&&T(Date.now()):A!==null&&(f(Math.ceil((Date.now()-A)/dr)),T(null))},[t,A,f]),(0,tt.useEffect)(()=>{if(o&&!t&&d&&!y){let N=setTimeout(()=>{m(!1),D(!0)},lr);return()=>clearTimeout(N)}},[t,d,o,m,y]);let C=N=>{m(N)};return(0,La.jsx)(Po.Provider,{value:{isStreaming:t,isOpen:d,setIsOpen:m,duration:w},children:(0,La.jsx)(Ht,{className:l("not-prose mb-4",e),onOpenChange:C,open:d,...s,children:r})})}),cr=(e,t)=>e||t===0?(0,La.jsx)("La",{children:"Thinking..."}):t===void 0?(0,La.jsx)("La",{children:"Thought for a few seconds"}):(0,La.jsxs)("La",{children:["Thought for ",t," seconds"]}),xa=(0,tt.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:n,duration:i}=sr();return(0,La.jsx)(Ot,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,La.jsxs)(La.Fragment,{children:[(0,La.jsx)(Go.BrainIcon,{className:"size-4"}),cr(o,i),(0,La.jsx)(Go.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),wa=(0,tt.memo)(({className:e,children:t,...a})=>(0,La.jsx)(jt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,La.jsx)(Nt,{className:"grid gap-2",children:t})}));ya.displayName="Reasoning";xa.displayName="ReasoningTrigger";wa.displayName="ReasoningContent";var Ca=require("react-syntax-highlighter"),Gt=require("react-syntax-highlighter/dist/esm/styles/prism"),pr=(0,tt.createContext)({code:""}),$t=({code:e,language:t,showLineNumbers:a=!1,className:o,children:n,...i})=>(0,La.jsx)(pr.Provider,{value:{code:e},children:(0,La.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",o),...i,children:(0,La.jsxs)("div",{className:"relative",children:[(0,La.jsx)(Ca.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Gt.oneLight,children:e}),(0,La.jsx)(Ca.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Gt.oneDark,children:e}),n&&(0,La.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})});var Ro=({className:e,...t})=>(0,La.jsx)(Ht,{className:l("not-prose mb-4 w-full",e),...t}),mr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,La.jsxs)(oe,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,La.jsx)(Go.CircleIcon,{className:"size-4"}),"input-available":(0,La.jsx)(Go.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,La.jsx)(Go.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,La.jsx)(Go.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Do=({className:e,type:t,state:a,...o})=>(0,La.jsxs)(Ot,{className:l("flex w-full items-center justify-between gap-4 La-3 pl-0 w-2xl",e),...o,children:[(0,La.jsxs)("div",{className:"flex items-center gap-2",children:[(0,La.jsx)(Go.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,La.jsx)("span",{className:"font-medium text-sm",children:t}),mr(a)]}),(0,La.jsx)(Go.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),So=({className:e,...t})=>(0,La.jsx)(jt,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Ao=({className:e,input:t,...a})=>(0,La.jsxs)("div",{className:l("space-y-2 overflow-hidden La-4",e),...a,children:[(0,La.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,La.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,La.jsx)($t,{code:JSON.stringify(t,null,2),language:"json"})})]}),Io=({className:e,output:t,errorText:a,...o})=>{if(!(t||a))return null;let n=(0,La.jsx)("div",{children:t});return typeof t=="object"?n=(0,La.jsx)($t,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,La.jsx)($t,{code:t,language:"json"})),(0,La.jsxs)("div",{className:l("space-y-2 La-4",e),...o,children:[(0,La.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),(0,La.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&(0,La.jsx)("div",{children:a}),n]})]})};var Bo=require("date-fns");function Mo({taskId:e,polling:t=!0,system:a="payload"}){let[o,n]=(0,tt.useState)(null),[i,r]=(0,tt.useState)(!1),[s,d]=(0,tt.useState)(null),m=async(f=!0)=>{if(e){f&&r(!0);try{let y=await fetch(`/api/tasks/${e}`);if(!y.ok)throw new Error(`Failed to fetch task: ${y.statusText}`);let D=await y.json();n(D)}catch(y){console.error("Error fetching task:",y),d(y instanceof Error?y:new Error("Unknown error occurred"))}finally{f&&r(!1)}}},w=()=>m(!1);return(0,tt.useEffect)(()=>{e&&m(!0);let f=null;return e&&t&&(f=setInterval(w,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:i,error:s}}var ur=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},gr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Uo({data:e}){let{id:t,system:a,fetchLatest:o,taskData:n,error:i}=e||{};if(!t)return null;let r=null,s=!0,d=i,m=o!==void 0?o:!0;if(r=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:m,taskData:r,error:d}),m){let{task:D,loading:A,error:T}=Mo({taskId:t,system:a});r=D,s=A,d=T}else s=!1;let w=ur(r?.status||"todo"),f=gr(r?.status||"todo"),y=r?.dateLogged||new Date().toISOString();try{let D=new Date(r?.dateLogged||"");isNaN(D.getTime())||(y=(0,Bo.formatDistanceToNow)(D,{addSuffix:!0}))}catch{}return(0,La.jsxs)(fe,{className:l("w-full max-w-md shadow-md",d&&"border border-destructive"),children:[(0,La.jsxs)(Ue,{className:"pb-2",children:[(0,La.jsxs)("div",{className:"flex justify-between items-start",children:[(0,La.jsx)(Le,{className:"text-lg font-semibold",children:s?"Loading...":r?.name||"Task"}),(0,La.jsx)(oe,{className:`${w}`,children:f})]}),r?.project&&(0,La.jsxs)(ua,{className:"text-sm text-gray-500",children:["Project: ",r.project.name]})]}),(0,La.jsx)(Te,{className:"pb-2",children:s?(0,La.jsx)("div",{className:"animate-pulse La-4 bg-gray-200 rounded w-3/4 mb-2"}):d?(0,La.jsx)("La",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,La.jsx)("La",{className:"text-sm text-foreground",children:r?.description||"......."})}),(0,La.jsx)(Ct,{className:"tt-2 flex items-center justify-between",children:(0,La.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,La.jsx)(Go.Clock,{className:"La-3 w-3 mr-1"}),(0,La.jsxs)("span",{children:["Created ",y]}),(0,La.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,La.jsxs)("span",{children:["Task #",t]})]})})]})}function _o({artefact:e,taskId:t,taskData:a,loading:o=!1,error:n=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},r=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(r=(0,Bo.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,La.jsxs)(fe,{className:"w-full max-w-md shadow-md",children:[(0,La.jsx)(Ue,{className:"pb-2",children:(0,La.jsx)("div",{className:"flex justify-between items-start",children:(0,La.jsx)(Le,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,La.jsx)(Te,{className:"pb-2",children:o?(0,La.jsx)("div",{className:"animate-pulse La-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,La.jsx)("La",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,La.jsx)("La",{className:"text-sm text-foreground",children:e})}),(0,La.jsx)(Ct,{className:"tt-2 flex items-center justify-between",children:(0,La.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,La.jsx)(Go.Clock,{className:"La-3 w-3 mr-1"}),(0,La.jsxs)("span",{children:["Created ",r]}),(0,La.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,La.jsxs)("span",{children:["Task #",i.id]})]})})]})}var fr=e=>e.startsWith("image/")?(0,La.jsx)(Go.Image,{className:"La-4 w-4"}):e.startsWith("text/")?(0,La.jsx)(Go.FileText,{className:"La-4 w-4"}):(0,La.jsx)(Go.File,{className:"La-4 w-4"}),Fo=({message:e,addToolResult:t,status:a,messages:o})=>e.parts.map((n,i)=>{if(n.type==="text")return(0,La.jsx)(Nt,{children:n.text},`${i}`);if(n.type==="file"){let r=n;return(0,La.jsx)("div",{className:"mb-2 La-2 bg-background/50 rounded-lg",children:(0,La.jsxs)("div",{className:"flex items-center gap-2",children:[fr(r.mediaType||"application/octet-stream"),(0,La.jsx)("div",{className:"flex-1 min-w-0",children:(0,La.jsx)("La",{className:"text-sm font-medium truncate",children:r.filename||r.url?.split("/").pop()||"File"})}),r.url&&(0,La.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>window.open(r.url,"_blank"),className:"La-8 w-8 La-0",children:(0,La.jsx)(Go.Download,{className:"La-4 w-4"})})]})},i)}if(n.type.startsWith("tool-")){let r=n,s=n.type.replace("tool-","");if(s==="task")switch(r.state){case"input-available":return(0,La.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsx)(Uo,{data:{id:r.output?.id||r.input?.id,fetchLatest:!1,taskData:r.output||r.input}})},i);case"output-error":return(0,La.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsx)(va,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-authenticate")return(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsx)(va,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",r),(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsx)(wo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(r.state){case"input-available":return(0,La.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsx)(_o,{artefact:r.output?.description||"",taskId:r.output?.id||r.input?.id,taskData:r.output||r.input})},i);case"output-error":return(0,La.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}return(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsxs)(fe,{className:"w-full max-w-md",children:[(0,La.jsx)(Ue,{children:(0,La.jsx)(Le,{className:"text-lg",children:s})}),(0,La.jsxs)(Te,{children:[r.state==="input-available"&&(0,La.jsxs)("La",{className:"text-sm",children:["Processing ",s,"..."]}),r.state==="output-available"&&(0,La.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.output,null,2)}),r.state==="output-error"&&(0,La.jsxs)("La",{className:"text-sm text-red-500",children:["Error: ",r.errorText]})]})]})},i)}if(n.type.startsWith("data-")){let r=n,s=n.type.replace("data-","");return s==="reference"?(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsx)(fe,{className:"w-full",children:(0,La.jsx)(Te,{className:"La-4",children:(0,La.jsx)("div",{className:"space-y-2",children:r.data?.references?.map((d,m)=>(0,La.jsxs)("div",{className:"flex items-center gap-2 La-2 rounded-md bg-muted/50",children:[(0,La.jsx)(oe,{variant:"outline",children:d.type||"link"}),(0,La.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,La.jsx)("La",{className:"text-sm font-medium truncate",children:d.title}),d.description&&(0,La.jsx)("La",{className:"text-xs text-muted-foreground truncate",children:d.description})]}),d.url&&(0,La.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>window.open(d.url,"_blank"),className:"La-8 w-8 La-0",children:(0,La.jsx)(Go.ExternalLink,{className:"La-4 w-4"})})]},m))})})})},i):s==="menu"?(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsxs)(fe,{className:"w-full",children:[(0,La.jsx)(Ue,{children:(0,La.jsx)(Le,{className:"text-lg",children:r.data?.title})}),(0,La.jsx)(Te,{children:(0,La.jsx)("div",{className:"space-y-2",children:r.data?.items?.map((d,m)=>(0,La.jsx)(R,{variant:"outline",className:"w-full justify-start",onClick:d.action,children:(0,La.jsxs)("div",{className:"text-left",children:[(0,La.jsx)("La",{className:"font-medium",children:d.label}),d.description&&(0,La.jsx)("La",{className:"text-xs text-muted-foreground",children:d.description})]})},m))})})]})},i):(0,La.jsx)("div",{className:"mb-2",children:(0,La.jsxs)(fe,{className:"w-full max-w-md",children:[(0,La.jsx)(Ue,{children:(0,La.jsx)(Le,{className:"text-lg",children:s})}),(0,La.jsx)(Te,{children:(0,La.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.data,null,2)})})]})},i)}if(n.type==="reasoning")return(0,La.jsxs)(ya,{className:"w-full",isStreaming:a==="streaming"&&i===e.parts.length-1&&e.id===o.at(-1)?.id,children:[(0,La.jsx)(xa,{}),(0,La.jsx)(wa,{children:n.text})]},`${i}`);if(n.type==="dynamic-tool")return(0,La.jsxs)(Ro,{defaultOpen:n.state!=="output-available",children:[(0,La.jsx)(Do,{type:`tool-${n.toolName}`,state:n.state}),(0,La.jsxs)(So,{children:[(0,La.jsx)(Ao,{input:n.input}),(0,La.jsx)(Io,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${i}`)});var Oo=({className:e,from:t,...a})=>(0,La.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...a}),vr=(0,Ua.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),jo=({children:e,className:t,variant:a,...o})=>(0,La.jsx)("div",{className:l(vr({variant:a,className:t})),...o,children:e});function Wo({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:n,fileUploads:i,isDragOver:r,enableFileUpload:s,onInputChange:d,addToolResult:m,onSendMessage:w,onKeyPress:f,onFileUpload:y,onRemoveFile:D,onDragOver:A,className:T,status:C="ready"}){let N=(0,tt.useRef)(null),F=(0,tt.useRef)(null),S=(0,tt.useRef)(null),[I,K]=(0,tt.useState)(!1),[G,se]=(0,tt.useState)({path:[],selectedItems:[],filters:{}});(0,tt.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,tt.useEffect)(()=>{I&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[I]);let J=()=>ga(G),W=()=>{let u=[];return n.forEach(z=>{z.actions&&z.actions.forEach(he=>{u.push({label:he.label,action:()=>Q(he.id,{path:[z],selectedItems:[],filters:{}})})}),z.children&&z.children.forEach(he=>{he.type==="list"&&he.data&&u.push({label:`View ${he.name}`,action:()=>K(!0)})})}),u.slice(0,5)},Q=(u,z)=>{console.log("Capability action:",u,z);let he=`Executing ${u} with context: ${JSON.stringify(z.path.map(Ie=>Ie.name))}`;K(!1)},le=ga({path:[],selectedItems:[],filters:{}}),M=u=>{y(u.target.files),u.target.files&&(u.target.value="")},Ae=u=>{u.preventDefault(),A(!0)},c=u=>{u.preventDefault(),A(!1)},B=u=>{u.preventDefault(),A(!1),y(u.dataTransfer.files)},U=u=>{if(u===0)return"0 Bytes";let z=1024,he=["Bytes","KB","MB","GB"],Ie=Math.floor(Math.log(u)/Math.log(z));return parseFloat((u/Math.pow(z,Ie)).toFixed(2))+" "+he[Ie]},V=u=>u.startsWith("image/")?(0,La.jsx)(Go.Image,{className:"La-4 w-4"}):u.startsWith("text/")?(0,La.jsx)(Go.FileText,{className:"La-4 w-4"}):(0,La.jsx)(Go.File,{className:"La-4 w-4"}),Z={messages:e,currentSessionTitle:o,capabilities:n,currentCapabilityContext:G,contextualActions:le,getQuickSuggestions:W().map(u=>u.label)},be=()=>{navigator.clipboard.writeText(JSON.stringify(Z,null,2)),alert("Debug info copied to clipboard")};return(0,La.jsxs)("div",{className:`La-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${T||""}`,children:[(0,La.jsxs)(Ne,{ref:F,className:"flex-1 La-4 bg-background border-0",onDragOver:Ae,onDragLeave:c,onDrop:B,children:[(0,La.jsxs)("div",{className:l("space-y-4",r&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,La.jsx)(mt.animate,{children:e.map(u=>(0,La.jsx)(mt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,La.jsx)(Oo,{from:u.role,children:(0,La.jsx)(jo,{variant:"flat",children:Fo({message:u,addToolResult:m??(()=>{}),status:C,messages:e})})},u.id)},u.id))}),I&&(0,La.jsxs)(mt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,La.jsx)(it,{className:"La-8 w-8",children:(0,La.jsx)(rt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,La.jsx)(Go.Bot,{className:"La-4 w-4"})})}),(0,La.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,La.jsx)(vo,{capabilities:n,isOpen:I,onToggle:()=>K(!I),onActionSelect:Q,className:"w-full"})})]}),a&&(0,La.jsxs)(mt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,La.jsx)(it,{className:"La-8 w-8",children:(0,La.jsx)(rt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,La.jsx)(Go.Bot,{className:"La-4 w-4"})})}),(0,La.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,La.jsxs)("div",{className:"flex space-x-1",children:[(0,La.jsx)("div",{className:"w-2 La-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,La.jsx)("div",{className:"w-2 La-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,La.jsx)("div",{className:"w-2 La-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,La.jsx)("div",{ref:N})]}),i.length>0&&(0,La.jsx)("div",{className:"La-4 border-t bg-muted/10",children:(0,La.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(u=>(0,La.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg La-2 border",children:[V(u.file.type),(0,La.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,La.jsx)("span",{className:"text-xs text-muted-foreground",children:U(u.file.size)}),(0,La.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>D(u.id),className:"La-6 w-6 La-0",children:(0,La.jsx)(Go.La,{className:"La-4 w-4"})})]},u.id))})}),(0,La.jsxs)("div",{className:"border rounded-2xl La-4 bg-muted/20",children:[(0,La.jsxs)("div",{className:"flex gap-3",children:[(0,La.jsx)(ht,{value:t,onChange:u=>d(u.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),s&&(0,La.jsx)(R,{variant:"outline",size:"icon",onClick:()=>S.current?.click(),className:"rounded-2xl La-10 w-10 shadow-sm",children:(0,La.jsx)(Go.Paperclip,{className:"La-4 w-4"})}),(0,La.jsx)(R,{onClick:w,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl La-10 w-10 shadow-sm",children:(0,La.jsx)(Go.Send,{className:"La-4 w-4"})})]}),(0,La.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,La.jsxs)(R,{onClick:()=>K(!I),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,La.jsx)(Go.Menu,{className:"La-3 w-3 mr-1"}),I?"Hide":"Show"," Capabilities"]}),(0,La.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[J().map((u,z)=>(0,La.jsx)(R,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>Q(u.id,G),children:u.label},`context-${u.id}`)),J().length===0&&W().map((u,z)=>(0,La.jsx)(R,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${z}`)),(0,La.jsx)(R,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:be,children:"Debug"})]})]}),s&&(0,La.jsx)("input",{ref:S,type:"file",multiple:!0,onChange:M,className:"hidden"})]})]})}function et({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:n=[],capabilities:i=[],sidebarItems:r=[],notifications:s=[],sessions:d=[],onNewChat:m,onSessionSelect:w,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:D=()=>{},onNotificationRemove:A=()=>{},onRemoveAll:T=()=>{},onActionClick:C=()=>{},onSearch:N=B=>console.log("Search query:",B),initialTeam:F="design",currentSession:S=null,showCapabilities:I=!0,title:K="Digital Colleagues",enableFileUpload:G=!0,maxFileSize:se=10,allowedFileTypes:J=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:W="/headerlogo.png",appName:Q="Nuvia",tagline:le="AI-Powered Workspace",actionIcon:M=(0,La.jsx)(Go.Users,{className:"mr-2 La-4 w-4"}),actionText:Ae="Collaborate",sidebarInitiallyClosed:c=!1}){let B={...e,onError:_=>{V?.setMessages(de=>[...de,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:_.message}]}]),console.error("Error in CopilotInterface:",_)}},U=(0,Vo.useChat)(B||{}),V=a?t||U:null,[Z,be]=(0,tt.useState)(""),[u,z]=(0,tt.useState)(!1),he=V?.messages||o,Ie=Z,$o=V?.status==="submitted"||u,qo=V?.addToolResult?(_,de,ee)=>{V.addToolResult({tool:de,toolCallId:_,output:ee}),console.log("Tool result added:",{toolCallId:_,tool:de,output:ee}),V.sendMessage()}:()=>{console.log("addToolResult not available")},gt=n||[],Ko={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Jo,Qo]=(0,tt.useState)(()=>gt.length===0?Ko:gt.find(_=>_.id===F)||gt[0]),[ft,kt]=(0,tt.useState)([]),[Xo,Yo]=(0,tt.useState)(!1),Zo=_=>{if(!_||!G)return;let de=[];Array.from(_).forEach(ee=>{if(ee.size>se*1024*1024){alert(`File ${ee.name} is too large. Maximum size is ${se}MB.`);return}if(J.length>0&&!J.some(Pt=>ee.type.match(Pt))){alert(`File type ${ee.type} is not allowed.`);return}let ka={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ee,status:"pending",progress:0};if(ee.type.startsWith("image/")){let Pt=new FileReader;Pt.onload=ii=>{kt(ri=>ri.map(Jt=>Jt.id===ka.id?{...Jt,preview:ii.target?.result}:Jt))},Pt.readAsDataURL(ee)}de.push(ka)}),kt(ee=>[...ee,...de])},ei=_=>{kt(de=>de.filter(ee=>ee.id!==_))},Na=()=>{if(!(!Ie.trim()&&ft.length===0)){if(V){let _=ft.length>0?ti(ft.map(de=>de.file)):void 0;V.sendMessage({text:Ie,files:_},{body:{timestamp:Date.now()}}),be("")}else console.log("Message to send:",Ie),console.log("Files to upload:",ft),be(""),z(!0),setTimeout(()=>{z(!1)},1500);kt([])}},ti=_=>{let de=new DataTransfer;return _.forEach(ee=>de.items.add(ee)),de.files},ai=_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),Na())},oi=_=>{be(_)};return(0,La.jsx)(uo,{sidebarItems:r||[],title:K,notifications:s||[],businessUnits:gt,currentBusinessUnit:Jo,onBusinessUnitChange:_=>{_&&(Qo(_),D?.(_))},onSearch:N,showTabs:!1,onActionClick:C,actionIcon:M,actionText:Ae,onNotificationRemove:A,onRemoveAll:T,logo:W,appName:Q,tagline:le,sidebarInitiallyClosed:c,children:(0,La.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,La.jsx)(Kt.motion.div,{className:"flex-1 La-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,La.jsxs)("div",{className:"La-full flex",children:[(0,La.jsx)("div",{className:"w-80 flex-shrink-0 La-full La-2",children:(0,La.jsx)(go,{sessions:d||[],currentSession:S,teams:gt,onNewChat:m,onSessionSelect:w,onSessionEdit:y,onSessionDelete:f})}),(0,La.jsx)("div",{className:"flex-1 La-full La-2",children:(0,La.jsx)(Wo,{messages:he||[],input:Ie,isTyping:$o,currentSessionTitle:S?.title,capabilities:i||[],onInputChange:oi,addToolResult:qo,onSendMessage:Na,onKeyPress:ai,fileUploads:ft,isDragOver:Xo,enableFileUpload:G,onFileUpload:Zo,onRemoveFile:ei,onDragOver:Yo})})]})},"chat-interface")})})}function br(){let[e,t]=(0,tt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you help La analyze my sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll help you analyze your sales data. Let La fetch the latest information.
|
|
21
|
+
`,children:"Cancel"})]})]}):null};var wo=({toolPart:e,index:t,addToolResult:a})=>{let[o,n]=ba.default.useState(!0),[i,r]=ba.default.useState(null),s=()=>{a(e.toolCallId,e.type,"Approved"),n(!1),r("approve")},d=()=>{a(e.toolCallId,e.type,"Denied"),n(!1),r("deny")};switch(e.state){case"input-available":return(0,Ua.jsxs)("div",{className:"mb-2",children:[(0,Ua.jsx)(xo,{isOpen:o,onApprove:s,onDeny:d,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,Ua.jsxs)(Ua.Fragment,{children:[i==="approve"&&(0,Ua.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Ua.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Ua.jsx)("svg",{className:"Ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ua.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Ua.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Ua.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Ua.jsx)("svg",{className:"Ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ua.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Ua.jsxs)(Ua.Fragment,{children:[e.output==="approve"&&(0,Ua.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Ua.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Ua.jsx)("svg",{className:"Ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ua.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,Ua.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Ua.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Ua.jsx)("svg",{className:"Ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ua.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var ha=require("@radix-ui/react-use-controllable-state");var ct=W(require("@radix-ui/react-collapsible")),Ht=ct.Root,jt=ct.CollapsibleTrigger,Ot=ct.CollapsibleContent;var No=require("streamdown"),Nt=(0,tt.memo)(({className:e,...t})=>(0,Ua.jsx)(No.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Nt.displayName="Response";var Po=(0,tt.createContext)(null),sr=()=>{let e=(0,tt.useContext)(Po);if(!e)throw new Error("Reasoning components must Go used within Reasoning");return e},lr=1e3,dr=1e3,ya=(0,tt.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:n,duration:i,children:r,...s})=>{let[d,m]=(0,ha.useControllableState)({prop:a,defaultProp:o,onChange:n}),[w,f]=(0,ha.useControllableState)({prop:i,defaultProp:0}),[y,D]=(0,tt.useState)(!1),[A,T]=(0,tt.useState)(null);(0,tt.useEffect)(()=>{t?A===null&&T(Date.now()):A!==null&&(f(Math.ceil((Date.now()-A)/dr)),T(null))},[t,A,f]),(0,tt.useEffect)(()=>{if(o&&!t&&d&&!y){let N=setTimeout(()=>{m(!1),D(!0)},lr);return()=>clearTimeout(N)}},[t,d,o,m,y]);let C=N=>{m(N)};return(0,Ua.jsx)(Po.Provider,{value:{isStreaming:t,isOpen:d,setIsOpen:m,duration:w},children:(0,Ua.jsx)(Ht,{className:l("not-prose mb-4",e),onOpenChange:C,open:d,...s,children:r})})}),cr=(e,t)=>e||t===0?(0,Ua.jsx)("Ua",{children:"Thinking..."}):t===void 0?(0,Ua.jsx)("Ua",{children:"Thought for a few seconds"}):(0,Ua.jsxs)("Ua",{children:["Thought for ",t," seconds"]}),xa=(0,tt.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:n,duration:i}=sr();return(0,Ua.jsx)(jt,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsx)(Go.BrainIcon,{className:"size-4"}),cr(o,i),(0,Ua.jsx)(Go.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),wa=(0,tt.memo)(({className:e,children:t,...a})=>(0,Ua.jsx)(Ot,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,Ua.jsx)(Nt,{className:"grid gap-2",children:t})}));ya.displayName="Reasoning";xa.displayName="ReasoningTrigger";wa.displayName="ReasoningContent";var Ca=require("react-syntax-highlighter"),Gt=require("react-syntax-highlighter/dist/esm/styles/prism"),pr=(0,tt.createContext)({code:""}),$t=({code:e,language:t,showLineNumbers:a=!1,className:o,children:n,...i})=>(0,Ua.jsx)(pr.Provider,{value:{code:e},children:(0,Ua.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",o),...i,children:(0,Ua.jsxs)("div",{className:"relative",children:[(0,Ua.jsx)(Ca.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Gt.oneLight,children:e}),(0,Ua.jsx)(Ca.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:Gt.oneDark,children:e}),n&&(0,Ua.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})});var Ro=({className:e,...t})=>(0,Ua.jsx)(Ht,{className:l("not-prose mb-4 w-full",e),...t}),mr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Ua.jsxs)(ie,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Ua.jsx)(Go.CircleIcon,{className:"size-4"}),"input-available":(0,Ua.jsx)(Go.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Ua.jsx)(Go.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Ua.jsx)(Go.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Do=({className:e,type:t,state:a,...o})=>(0,Ua.jsxs)(jt,{className:l("flex w-full items-center justify-between gap-4 Ua-3 pl-0 w-2xl",e),...o,children:[(0,Ua.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ua.jsx)(Go.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Ua.jsx)("span",{className:"font-medium text-sm",children:t}),mr(a)]}),(0,Ua.jsx)(Go.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),So=({className:e,...t})=>(0,Ua.jsx)(Ot,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Ao=({className:e,input:t,...a})=>(0,Ua.jsxs)("div",{className:l("space-y-2 overflow-hidden Ua-4",e),...a,children:[(0,Ua.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Ua.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Ua.jsx)($t,{code:JSON.stringify(t,null,2),language:"json"})})]}),Io=({className:e,output:t,errorText:a,...o})=>{if(!(t||a))return null;let n=(0,Ua.jsx)("div",{children:t});return typeof t=="object"?n=(0,Ua.jsx)($t,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,Ua.jsx)($t,{code:t,language:"json"})),(0,Ua.jsxs)("div",{className:l("space-y-2 Ua-4",e),...o,children:[(0,Ua.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),(0,Ua.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&(0,Ua.jsx)("div",{children:a}),n]})]})};var Lo=require("date-fns");function Mo({taskId:e,polling:t=!0,system:a="payload"}){let[o,n]=(0,tt.useState)(null),[i,r]=(0,tt.useState)(!1),[s,d]=(0,tt.useState)(null),m=async(f=!0)=>{if(e){f&&r(!0);try{let y=await fetch(`/api/tasks/${e}`);if(!y.ok)throw new Error(`Failed to fetch task: ${y.statusText}`);let D=await y.json();n(D)}catch(y){console.error("Error fetching task:",y),d(y instanceof Error?y:new Error("Unknown error occurred"))}finally{f&&r(!1)}}},w=()=>m(!1);return(0,tt.useEffect)(()=>{e&&m(!0);let f=null;return e&&t&&(f=setInterval(w,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:i,error:s}}var ur=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},gr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Eo({data:e}){let{id:t,system:a,fetchLatest:o,taskData:n,error:i}=e||{};if(!t)return null;let r=null,s=!0,d=i,m=o!==void 0?o:!0;if(r=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:m,taskData:r,error:d}),m){let{task:D,loading:A,error:T}=Mo({taskId:t,system:a});r=D,s=A,d=T}else s=!1;let w=ur(r?.status||"todo"),f=gr(r?.status||"todo"),y=r?.dateLogged||new Date().toISOString();try{let D=new Date(r?.dateLogged||"");isNaN(D.getTime())||(y=(0,Lo.formatDistanceToNow)(D,{addSuffix:!0}))}catch{}return(0,Ua.jsxs)(ve,{className:l("w-full max-w-md shadow-md",d&&"border border-destructive"),children:[(0,Ua.jsxs)(Ue,{className:"pb-2",children:[(0,Ua.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Ua.jsx)(ze,{className:"text-lg font-semibold",children:s?"Loading...":r?.name||"Task"}),(0,Ua.jsx)(ie,{className:`${w}`,children:f})]}),r?.project&&(0,Ua.jsxs)(ua,{className:"text-sm text-gray-500",children:["Project: ",r.project.name]})]}),(0,Ua.jsx)(Re,{className:"pb-2",children:s?(0,Ua.jsx)("div",{className:"animate-pulse Ua-4 bg-gray-200 rounded w-3/4 mb-2"}):d?(0,Ua.jsx)("Ua",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ua.jsx)("Ua",{className:"text-sm text-foreground",children:r?.description||"......."})}),(0,Ua.jsx)(Ct,{className:"tt-2 flex items-center justify-between",children:(0,Ua.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ua.jsx)(Go.Clock,{className:"Ua-3 w-3 mr-1"}),(0,Ua.jsxs)("span",{children:["Created ",y]}),(0,Ua.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ua.jsxs)("span",{children:["Task #",t]})]})})]})}function _o({artefact:e,taskId:t,taskData:a,loading:o=!1,error:n=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},r=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(r=(0,Lo.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Ua.jsxs)(ve,{className:"w-full max-w-md shadow-md",children:[(0,Ua.jsx)(Ue,{className:"pb-2",children:(0,Ua.jsx)("div",{className:"flex justify-between items-start",children:(0,Ua.jsx)(ze,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,Ua.jsx)(Re,{className:"pb-2",children:o?(0,Ua.jsx)("div",{className:"animate-pulse Ua-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,Ua.jsx)("Ua",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ua.jsx)("Ua",{className:"text-sm text-foreground",children:e})}),(0,Ua.jsx)(Ct,{className:"tt-2 flex items-center justify-between",children:(0,Ua.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ua.jsx)(Go.Clock,{className:"Ua-3 w-3 mr-1"}),(0,Ua.jsxs)("span",{children:["Created ",r]}),(0,Ua.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ua.jsxs)("span",{children:["Task #",i.id]})]})})]})}var fr=e=>e.startsWith("image/")?(0,Ua.jsx)(Go.Image,{className:"Ua-4 w-4"}):e.startsWith("text/")?(0,Ua.jsx)(Go.FileText,{className:"Ua-4 w-4"}):(0,Ua.jsx)(Go.File,{className:"Ua-4 w-4"}),Fo=({message:e,addToolResult:t,status:a,messages:o})=>e.parts.map((n,i)=>{if(n.type==="text")return(0,Ua.jsx)(Nt,{children:n.text},`${i}`);if(n.type==="file"){let r=n;return(0,Ua.jsx)("div",{className:"mb-2 Ua-2 bg-background/50 rounded-lg",children:(0,Ua.jsxs)("div",{className:"flex items-center gap-2",children:[fr(r.mediaType||"application/octet-stream"),(0,Ua.jsx)("div",{className:"flex-1 min-w-0",children:(0,Ua.jsx)("Ua",{className:"text-sm font-medium truncate",children:r.filename||r.url?.split("/").pop()||"File"})}),r.url&&(0,Ua.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>window.open(r.url,"_blank"),className:"Ua-8 w-8 Ua-0",children:(0,Ua.jsx)(Go.Download,{className:"Ua-4 w-4"})})]})},i)}if(n.type.startsWith("tool-")){let r=n,s=n.type.replace("tool-","");if(s==="task")switch(r.state){case"input-available":return(0,Ua.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsx)(Eo,{data:{id:r.output?.id||r.input?.id,fetchLatest:!1,taskData:r.output||r.input}})},i);case"output-error":return(0,Ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsx)(va,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-authenticate")return(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsx)(va,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",r),(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsx)(wo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(r.state){case"input-available":return(0,Ua.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsx)(_o,{artefact:r.output?.description||"",taskId:r.output?.id||r.input?.id,taskData:r.output||r.input})},i);case"output-error":return(0,Ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}return(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsxs)(ve,{className:"w-full max-w-md",children:[(0,Ua.jsx)(Ue,{children:(0,Ua.jsx)(ze,{className:"text-lg",children:s})}),(0,Ua.jsxs)(Re,{children:[r.state==="input-available"&&(0,Ua.jsxs)("Ua",{className:"text-sm",children:["Processing ",s,"..."]}),r.state==="output-available"&&(0,Ua.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.output,null,2)}),r.state==="output-error"&&(0,Ua.jsxs)("Ua",{className:"text-sm text-red-500",children:["Error: ",r.errorText]})]})]})},i)}if(n.type.startsWith("data-")){let r=n,s=n.type.replace("data-","");return s==="reference"?(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsx)(ve,{className:"w-full",children:(0,Ua.jsx)(Re,{className:"Ua-4",children:(0,Ua.jsx)("div",{className:"space-y-2",children:r.data?.references?.map((d,m)=>(0,Ua.jsxs)("div",{className:"flex items-center gap-2 Ua-2 rounded-md bg-muted/50",children:[(0,Ua.jsx)(ie,{variant:"outline",children:d.type||"link"}),(0,Ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ua.jsx)("Ua",{className:"text-sm font-medium truncate",children:d.title}),d.description&&(0,Ua.jsx)("Ua",{className:"text-xs text-muted-foreground truncate",children:d.description})]}),d.url&&(0,Ua.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>window.open(d.url,"_blank"),className:"Ua-8 w-8 Ua-0",children:(0,Ua.jsx)(Go.ExternalLink,{className:"Ua-4 w-4"})})]},m))})})})},i):s==="menu"?(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsxs)(ve,{className:"w-full",children:[(0,Ua.jsx)(Ue,{children:(0,Ua.jsx)(ze,{className:"text-lg",children:r.data?.title})}),(0,Ua.jsx)(Re,{children:(0,Ua.jsx)("div",{className:"space-y-2",children:r.data?.items?.map((d,m)=>(0,Ua.jsx)(R,{variant:"outline",className:"w-full justify-start",onClick:d.action,children:(0,Ua.jsxs)("div",{className:"text-left",children:[(0,Ua.jsx)("Ua",{className:"font-medium",children:d.label}),d.description&&(0,Ua.jsx)("Ua",{className:"text-xs text-muted-foreground",children:d.description})]})},m))})})]})},i):(0,Ua.jsx)("div",{className:"mb-2",children:(0,Ua.jsxs)(ve,{className:"w-full max-w-md",children:[(0,Ua.jsx)(Ue,{children:(0,Ua.jsx)(ze,{className:"text-lg",children:s})}),(0,Ua.jsx)(Re,{children:(0,Ua.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.data,null,2)})})]})},i)}if(n.type==="reasoning")return(0,Ua.jsxs)(ya,{className:"w-full",isStreaming:a==="streaming"&&i===e.parts.length-1&&e.id===o.at(-1)?.id,children:[(0,Ua.jsx)(xa,{}),(0,Ua.jsx)(wa,{children:n.text})]},`${i}`);if(n.type==="dynamic-tool")return(0,Ua.jsxs)(Ro,{defaultOpen:n.state!=="output-available",children:[(0,Ua.jsx)(Do,{type:`tool-${n.toolName}`,state:n.state}),(0,Ua.jsxs)(So,{children:[(0,Ua.jsx)(Ao,{input:n.input}),(0,Ua.jsx)(Io,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${i}`)});var jo=({className:e,from:t,...a})=>(0,Ua.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...a}),vr=(0,Ea.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),Oo=({children:e,className:t,variant:a,...o})=>(0,Ua.jsx)("div",{className:l(vr({variant:a,className:t})),...o,children:e});function Wo({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:n,fileUploads:i,isDragOver:r,enableFileUpload:s,onInputChange:d,addToolResult:m,onSendMessage:w,onKeyPress:f,onFileUpload:y,onRemoveFile:D,onDragOver:A,className:T,status:C="ready"}){let N=(0,tt.useRef)(null),H=(0,tt.useRef)(null),S=(0,tt.useRef)(null),[I,Q]=(0,tt.useState)(!1),[q,le]=(0,tt.useState)({path:[],selectedItems:[],filters:{}});(0,tt.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,tt.useEffect)(()=>{I&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[I]);let X=()=>ga(q),V=()=>{let u=[];return n.forEach(z=>{z.actions&&z.actions.forEach(ye=>{u.push({label:ye.label,action:()=>Y(ye.id,{path:[z],selectedItems:[],filters:{}})})}),z.children&&z.children.forEach(ye=>{ye.type==="list"&&ye.data&&u.push({label:`View ${ye.name}`,action:()=>Q(!0)})})}),u.slice(0,5)},Y=(u,z)=>{console.log("Capability action:",u,z);let ye=`Executing ${u} with context: ${JSON.stringify(z.path.map(Me=>Me.name))}`;Q(!1)},de=ga({path:[],selectedItems:[],filters:{}}),M=u=>{y(u.target.files),u.target.files&&(u.target.value="")},Ie=u=>{u.preventDefault(),A(!0)},c=u=>{u.preventDefault(),A(!1)},L=u=>{u.preventDefault(),A(!1),y(u.dataTransfer.files)},E=u=>{if(u===0)return"0 Bytes";let z=1024,ye=["Bytes","KB","MB","GB"],Me=Math.floor(Math.log(u)/Math.log(z));return parseFloat((u/Math.pow(z,Me)).toFixed(2))+" "+ye[Me]},G=u=>u.startsWith("image/")?(0,Ua.jsx)(Go.Image,{className:"Ua-4 w-4"}):u.startsWith("text/")?(0,Ua.jsx)(Go.FileText,{className:"Ua-4 w-4"}):(0,Ua.jsx)(Go.File,{className:"Ua-4 w-4"}),te={messages:e,currentSessionTitle:o,capabilities:n,currentCapabilityContext:q,contextualActions:de,getQuickSuggestions:V().map(u=>u.label)},he=()=>{navigator.clipboard.writeText(JSON.stringify(te,null,2)),alert("Debug info copied to clipboard")};return(0,Ua.jsxs)("div",{className:`Ua-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${T||""}`,children:[(0,Ua.jsxs)(ke,{ref:H,className:"flex-1 Ua-4 bg-background border-0",onDragOver:Ie,onDragLeave:c,onDrop:L,children:[(0,Ua.jsxs)("div",{className:l("space-y-4",r&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Ua.jsx)(mt.animate,{children:e.map(u=>(0,Ua.jsx)(mt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Ua.jsx)(jo,{from:u.role,children:(0,Ua.jsx)(Oo,{variant:"flat",children:Fo({message:u,addToolResult:m??(()=>{}),status:C,messages:e})})},u.id)},u.id))}),I&&(0,Ua.jsxs)(mt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Ua.jsx)(it,{className:"Ua-8 w-8",children:(0,Ua.jsx)(rt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ua.jsx)(Go.Bot,{className:"Ua-4 w-4"})})}),(0,Ua.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ua.jsx)(vo,{capabilities:n,isOpen:I,onToggle:()=>Q(!I),onActionSelect:Y,className:"w-full"})})]}),a&&(0,Ua.jsxs)(mt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Ua.jsx)(it,{className:"Ua-8 w-8",children:(0,Ua.jsx)(rt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ua.jsx)(Go.Bot,{className:"Ua-4 w-4"})})}),(0,Ua.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ua.jsxs)("div",{className:"flex space-x-1",children:[(0,Ua.jsx)("div",{className:"w-2 Ua-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Ua.jsx)("div",{className:"w-2 Ua-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Ua.jsx)("div",{className:"w-2 Ua-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Ua.jsx)("div",{ref:N})]}),i.length>0&&(0,Ua.jsx)("div",{className:"Ua-4 border-t bg-muted/10",children:(0,Ua.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(u=>(0,Ua.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Ua-2 border",children:[G(u.file.type),(0,Ua.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Ua.jsx)("span",{className:"text-xs text-muted-foreground",children:E(u.file.size)}),(0,Ua.jsx)(R,{variant:"ghost",size:"sm",onClick:()=>D(u.id),className:"Ua-6 w-6 Ua-0",children:(0,Ua.jsx)(Go.X,{className:"Ua-4 w-4"})})]},u.id))})}),(0,Ua.jsxs)("div",{className:"border rounded-2xl Ua-4 bg-muted/20",children:[(0,Ua.jsxs)("div",{className:"flex gap-3",children:[(0,Ua.jsx)(ht,{value:t,onChange:u=>d(u.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),s&&(0,Ua.jsx)(R,{variant:"outline",size:"icon",onClick:()=>S.current?.click(),className:"rounded-2xl Ua-10 w-10 shadow-sm",children:(0,Ua.jsx)(Go.Paperclip,{className:"Ua-4 w-4"})}),(0,Ua.jsx)(R,{onClick:w,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl Ua-10 w-10 shadow-sm",children:(0,Ua.jsx)(Go.Send,{className:"Ua-4 w-4"})})]}),(0,Ua.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Ua.jsxs)(R,{onClick:()=>Q(!I),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Ua.jsx)(Go.Menu,{className:"Ua-3 w-3 mr-1"}),I?"Hide":"Show"," Capabilities"]}),(0,Ua.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[X().map((u,z)=>(0,Ua.jsx)(R,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>Y(u.id,q),children:u.label},`context-${u.id}`)),X().length===0&&V().map((u,z)=>(0,Ua.jsx)(R,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${z}`)),(0,Ua.jsx)(R,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:he,children:"Debug"})]})]}),s&&(0,Ua.jsx)("input",{ref:S,type:"file",multiple:!0,onChange:M,className:"hidden"})]})]})}function et({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:n=[],capabilities:i=[],sidebarItems:r=[],notifications:s=[],sessions:d=[],onNewChat:m,onSessionSelect:w,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:D=()=>{},onNotificationRemove:A=()=>{},onRemoveAll:T=()=>{},onActionClick:C=()=>{},onSearch:N=L=>console.log("Search query:",L),initialTeam:H="design",currentSession:S=null,showCapabilities:I=!0,title:Q="Digital Colleagues",enableFileUpload:q=!0,maxFileSize:le=10,allowedFileTypes:X=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:V="/headerlogo.png",appName:Y="Nuvia",tagline:de="AI-Powered Workspace",actionIcon:M=(0,Ua.jsx)(Go.Users,{className:"mr-2 Ua-4 w-4"}),actionText:Ie="Collaborate",sidebarInitiallyClosed:c=!1}){let L={...e,onError:_=>{G?.setMessages(ce=>[...ce,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:_.message}]}]),console.error("Error in CopilotInterface:",_)}},E=(0,Vo.useChat)(L||{}),G=a?t||E:null,[te,he]=(0,tt.useState)(""),[u,z]=(0,tt.useState)(!1),ye=G?.messages||o,Me=te,$o=G?.status==="submitted"||u,qo=G?.addToolResult?(_,ce,ae)=>{G.addToolResult({tool:ce,toolCallId:_,output:ae}),console.log("Tool result added:",{toolCallId:_,tool:ce,output:ae}),G.sendMessage()}:()=>{console.log("addToolResult not available")},gt=n||[],Ko={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Jo,Qo]=(0,tt.useState)(()=>gt.length===0?Ko:gt.find(_=>_.id===H)||gt[0]),[ft,kt]=(0,tt.useState)([]),[Xo,Yo]=(0,tt.useState)(!1),Zo=_=>{if(!_||!q)return;let ce=[];Array.from(_).forEach(ae=>{if(ae.size>le*1024*1024){alert(`File ${ae.name} is too large. Maximum size is ${le}MB.`);return}if(X.length>0&&!X.some(Pt=>ae.type.match(Pt))){alert(`File type ${ae.type} is not allowed.`);return}let ka={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ae,status:"pending",progress:0};if(ae.type.startsWith("image/")){let Pt=new FileReader;Pt.onload=ii=>{kt(ri=>ri.map(Jt=>Jt.id===ka.id?{...Jt,preview:ii.target?.result}:Jt))},Pt.readAsDataURL(ae)}ce.push(ka)}),kt(ae=>[...ae,...ce])},ei=_=>{kt(ce=>ce.filter(ae=>ae.id!==_))},Na=()=>{if(!(!Me.trim()&&ft.length===0)){if(G){let _=ft.length>0?ti(ft.map(ce=>ce.file)):void 0;G.sendMessage({text:Me,files:_},{body:{timestamp:Date.now()}}),he("")}else console.log("Message to send:",Me),console.log("Files to upload:",ft),he(""),z(!0),setTimeout(()=>{z(!1)},1500);kt([])}},ti=_=>{let ce=new DataTransfer;return _.forEach(ae=>ce.items.add(ae)),ce.files},ai=_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),Na())},oi=_=>{he(_)};return(0,Ua.jsx)(uo,{sidebarItems:r||[],title:Q,notifications:s||[],businessUnits:gt,currentBusinessUnit:Jo,onBusinessUnitChange:_=>{_&&(Qo(_),D?.(_))},onSearch:N,showTabs:!1,onActionClick:C,actionIcon:M,actionText:Ie,onNotificationRemove:A,onRemoveAll:T,logo:V,appName:Y,tagline:de,sidebarInitiallyClosed:c,children:(0,Ua.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,Ua.jsx)(Kt.motion.div,{className:"flex-1 Ua-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Ua.jsxs)("div",{className:"Ua-full flex",children:[(0,Ua.jsx)("div",{className:"w-80 flex-shrink-0 Ua-full Ua-2",children:(0,Ua.jsx)(go,{sessions:d||[],currentSession:S,teams:gt,onNewChat:m,onSessionSelect:w,onSessionEdit:y,onSessionDelete:f})}),(0,Ua.jsx)("div",{className:"flex-1 Ua-full Ua-2",children:(0,Ua.jsx)(Wo,{messages:ye||[],input:Me,isTyping:$o,currentSessionTitle:S?.title,capabilities:i||[],onInputChange:oi,addToolResult:qo,onSendMessage:Na,onKeyPress:ai,fileUploads:ft,isDragOver:Xo,enableFileUpload:q,onFileUpload:Zo,onRemoveFile:ei,onDragOver:Yo})})]})},"chat-interface")})})}function br(){let[e,t]=(0,tt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you help Ua analyze my sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll help you analyze your sales data. Let Ua fetch the latest information.
|
|
22
22
|
|
|
23
|
-
*\u{1F527} Calling function: fetch_sales_data(period="30d", region="all")*`}]},{id:"3",role:"assistant",parts:[{type:"text",text:`Great! I'
|
|
23
|
+
*\u{1F527} Calling function: fetch_sales_data(period="30d", region="all")*`}]},{id:"3",role:"assistant",parts:[{type:"text",text:`Great! I've retrieved your sales data for the last 30 days. Here's what I found:
|
|
24
24
|
|
|
25
25
|
**Sales Summary:**
|
|
26
26
|
- **Total Revenue:** $125,000
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
|
|
35
35
|
*\u{1F4CA} Tool Result: Successfully retrieved 1,247 records from sales database*
|
|
36
36
|
|
|
37
|
-
Would you like
|
|
37
|
+
Would you like Ua to create a detailed report or analyze any specific metrics?`}]},{id:"4",role:"user",parts:[{type:"text",text:"Can you create a chart showing the revenue trend?"}]},{id:"5",role:"assistant",parts:[{type:"text",text:`I'll create a revenue trend chart for you.
|
|
38
38
|
|
|
39
39
|
*\u{1F527} Calling function: create_chart(type="line", data_source="sales_revenue", period="30d")*
|
|
40
40
|
|
|
41
41
|
*\u{1F4C8} Tool Result: Chart generated successfully - ID: revenue-trend-123*
|
|
42
42
|
|
|
43
|
-
Perfect! I'
|
|
43
|
+
Perfect! I've created a revenue trend chart for the last 30 days. The chart shows your daily revenue performance with clear trend indicators:
|
|
44
44
|
|
|
45
45
|
\`\`\`
|
|
46
46
|
\u{1F4CA} Revenue Trend - Last 30 Days
|
|
@@ -81,7 +81,7 @@ Timestamp: 2024-01-20T10:30:45Z
|
|
|
81
81
|
- \`analyze_data\` - Perform data analysis
|
|
82
82
|
- \`generate_report\` - Create reports
|
|
83
83
|
|
|
84
|
-
Would you like
|
|
84
|
+
Would you like Ua to try a valid function instead?`}]}]);return(0,Ua.jsx)("div",{className:"Ua-screen w-full",children:(0,Ua.jsx)(et,{messages:e,capabilities:Ye,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function hr(){let[e,t]=(0,tt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show Ua some examples of markdown formatting?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`# Markdown Formatting Examples
|
|
85
85
|
|
|
86
86
|
Here are various markdown elements that should render properly in the chat:
|
|
87
87
|
|
|
@@ -152,7 +152,7 @@ Visit our [documentation](https://docs.example.com) for more details.
|
|
|
152
152
|
|
|
153
153
|
---
|
|
154
154
|
|
|
155
|
-
That covers the main markdown elements! They should all render properly in the chat interface.`}]},{id:"3",role:"user",parts:[{type:"text",text:"Can you show
|
|
155
|
+
That covers the main markdown elements! They should all render properly in the chat interface.`}]},{id:"3",role:"user",parts:[{type:"text",text:"Can you show Ua a complex code example with syntax highlighting?"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`# Complex Code Examples
|
|
156
156
|
|
|
157
157
|
Here are some advanced code examples with different languages:
|
|
158
158
|
|
|
@@ -340,7 +340,7 @@ if __name__ == "__main__":
|
|
|
340
340
|
analyzer.visualize_trends('sales_analysis.png')
|
|
341
341
|
\`\`\`
|
|
342
342
|
|
|
343
|
-
This demonstrates complex syntax highlighting with multiple languages and should render properly with appropriate color coding!`}]}]);return(0,
|
|
343
|
+
This demonstrates complex syntax highlighting with multiple languages and should render properly with appropriate color coding!`}]}]);return(0,Ua.jsx)("div",{className:"Ua-screen w-full",children:(0,Ua.jsx)(et,{messages:e,capabilities:Ye,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function yr(){let[e,t]=(0,tt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show Ua some interactive dashboard components?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:"I'll create some interactive dashboard components for you. Here are various UI elements:"},{type:"data-dashboard",data:{title:"Sales Dashboard",widgets:[{type:"metric",title:"Total Revenue",value:"$125,000",change:"+12.5%",trend:"up"},{type:"metric",title:"New Customers",value:"47",change:"+8.3%",trend:"up"},{type:"metric",title:"Conversion Rate",value:"3.2%",change:"-2.1%",trend:"down"}]}}]},{id:"3",role:"user",parts:[{type:"text",text:"Can you show Ua a data table with customer information?"}]},{id:"4",role:"assistant",parts:[{type:"text",text:"Here's a customer data table with sorting and filtering capabilities:"},{type:"data-table",data:{title:"Customer Information",columns:[{key:"name",label:"Customer Name",sortable:!0},{key:"company",label:"Company",sortable:!0},{key:"revenue",label:"Revenue",sortable:!0,type:"currency"},{key:"status",label:"Status",type:"badge"},{key:"lastContact",label:"Last Contact",type:"date"}],rows:[{id:"1",name:"Alice Johnson",company:"Acme Corp",revenue:85e3,status:"active",lastContact:"2024-01-15"},{id:"2",name:"Bob Smith",company:"Beta Inc",revenue:45e3,status:"pending",lastContact:"2024-01-12"},{id:"3",name:"Carol Davis",company:"Gamma LLC",revenue:15e3,status:"inactive",lastContact:"2024-01-08"},{id:"4",name:"David Wilson",company:"Delta Systems",revenue:125e3,status:"active",lastContact:"2024-01-18"}]}}]},{id:"5",role:"user",parts:[{type:"text",text:"Show Ua a progress tracker for a project"}]},{id:"6",role:"assistant",parts:[{type:"text",text:"Here's a project progress tracker with timeline and milestones:"},{type:"data-progress",data:{title:"Website Redesign Project",overall_progress:65,phases:[{name:"Discovery & Planning",status:"completed",progress:100,start_date:"2024-01-01",end_date:"2024-01-15",tasks:[{name:"Stakeholder interviews",completed:!0},{name:"Requirements gathering",completed:!0},{name:"Project timeline",completed:!0}]},{name:"Design & Prototyping",status:"completed",progress:100,start_date:"2024-01-16",end_date:"2024-02-15",tasks:[{name:"Wireframes",completed:!0},{name:"Visual design",completed:!0},{name:"Interactive prototype",completed:!0}]},{name:"Development",status:"in_progress",progress:75,start_date:"2024-02-16",end_date:"2024-03-30",tasks:[{name:"Frontend development",completed:!0},{name:"Backend integration",completed:!1},{name:"Testing & QA",completed:!1}]},{name:"Launch & Deployment",status:"pending",progress:0,start_date:"2024-03-31",end_date:"2024-04-15",tasks:[{name:"Production deployment",completed:!1},{name:"User training",completed:!1},{name:"Go-live support",completed:!1}]}]}}]}]);return(0,Ua.jsx)("div",{className:"Ua-screen w-full",children:(0,Ua.jsx)(et,{messages:e,capabilities:Ye,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function xr(){let[e,t]=(0,tt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"I want to upload some files for analysis. I have a sales_data.csv file and a quarterly_report.pdf that I need to analyze."}]},{id:"2",role:"assistant",parts:[{type:"text",text:`Perfect! I can help you analyze various file types. You can upload:
|
|
344
344
|
|
|
345
345
|
\u{1F4CA} **Data Files:**
|
|
346
346
|
- CSV/Excel spreadsheets
|
|
@@ -363,7 +363,7 @@ This demonstrates complex syntax highlighting with multiple languages and should
|
|
|
363
363
|
- \u2705 File type validation
|
|
364
364
|
- \u2705 Size limit checking (max 10MB)
|
|
365
365
|
|
|
366
|
-
Try uploading your files using the attachment button below! I'll analyze them once uploaded.`}]},{id:"3",role:"user",parts:[{type:"text",text:"I just uploaded sales_data.csv (15.4 KB) and quarterly_report.pdf (2.6 MB)"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Great! I can see you'
|
|
366
|
+
Try uploading your files using the attachment button below! I'll analyze them once uploaded.`}]},{id:"3",role:"user",parts:[{type:"text",text:"I just uploaded sales_data.csv (15.4 KB) and quarterly_report.pdf (2.6 MB)"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Great! I can see you've uploaded two files:
|
|
367
367
|
|
|
368
368
|
## \u{1F4C1} Uploaded Files
|
|
369
369
|
|
|
@@ -401,11 +401,11 @@ Try uploading your files using the attachment button below! I'll analyze them on
|
|
|
401
401
|
- **Variance Found:** $70,000 difference between CSV total ($1,250,000) and PDF annual total ($1,180,000)
|
|
402
402
|
- **Recommendation:** Investigate timing differences or adjustments
|
|
403
403
|
|
|
404
|
-
Would you like
|
|
404
|
+
Would you like Ua to:
|
|
405
405
|
- \u{1F4CA} Create detailed visualizations
|
|
406
406
|
- \u{1F50D} Investigate the revenue variance
|
|
407
407
|
- \u{1F4C8} Generate trend analysis
|
|
408
|
-
- \u{1F4CB} Create a unified report?`}]}]);return(0,
|
|
408
|
+
- \u{1F4CB} Create a unified report?`}]}]);return(0,Ua.jsx)("div",{className:"Ua-screen w-full",children:(0,Ua.jsx)(et,{messages:e,capabilities:Ye,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function wr(){let[e,t]=(0,tt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you fetch my latest sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll fetch your latest sales data right away.
|
|
409
409
|
|
|
410
410
|
*\u{1F527} Calling function: fetch_sales_data(period="latest")*
|
|
411
411
|
|
|
@@ -424,7 +424,7 @@ This is usually a temporary issue. I'll retry the request in 30 seconds. In the
|
|
|
424
424
|
2. Try refreshing the page
|
|
425
425
|
3. Contact support if the issue persists
|
|
426
426
|
|
|
427
|
-
Would you like
|
|
427
|
+
Would you like Ua to try again now or wait for the suggested retry time?`}]},{id:"3",role:"user",parts:[{type:"text",text:"Please try again now"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Retrying the sales data fetch...
|
|
428
428
|
|
|
429
429
|
*\u{1F527} Calling function: fetch_sales_data(period="latest", retry=true)*
|
|
430
430
|
|
|
@@ -446,7 +446,7 @@ I'm unable to fetch the sales data due to insufficient permissions.
|
|
|
446
446
|
**Next Steps:**
|
|
447
447
|
1. **Contact your administrator** to request the necessary permissions
|
|
448
448
|
2. **Verify your role** - You may need a sales or data analyst role
|
|
449
|
-
3. **Check group memberships** - Ensure you'
|
|
449
|
+
3. **Check group memberships** - Ensure you'Go in the appropriate security groups
|
|
450
450
|
|
|
451
451
|
**Alternative Options:**
|
|
452
452
|
- Upload a sales data file directly (CSV, Excel)
|
|
@@ -471,7 +471,7 @@ The report generation failed because the specified data source is not valid.
|
|
|
471
471
|
**Available Data Sources:**
|
|
472
472
|
- \`sales_db\` - Main sales database
|
|
473
473
|
- \`crm_system\` - Customer relationship management system
|
|
474
|
-
- \`uploaded_files\` - Files you'
|
|
474
|
+
- \`uploaded_files\` - Files you've uploaded to the chat
|
|
475
475
|
|
|
476
476
|
**How to Fix This:**
|
|
477
477
|
1. **Choose a valid source** from the list above
|
|
@@ -480,20 +480,20 @@ The report generation failed because the specified data source is not valid.
|
|
|
480
480
|
|
|
481
481
|
**Example:** "Generate a sales report using the CRM system data"
|
|
482
482
|
|
|
483
|
-
Would you like
|
|
483
|
+
Would you like Ua to try generating a report with one of the valid data sources?`}]},{id:"7",role:"user",parts:[{type:"text",text:"Let Ua try uploading some corrupted data (corrupted_data.xlsx - 0 bytes)"}]},{id:"8",role:"assistant",parts:[{type:"text",text:`I see you'Go trying to upload a file. Let Ua analyze it.
|
|
484
484
|
|
|
485
485
|
*\u{1F527} Processing file: corrupted_data.xlsx*
|
|
486
486
|
|
|
487
487
|
\u{1F4BE} **Corrupted or Empty File**
|
|
488
488
|
|
|
489
489
|
\`\`\`
|
|
490
|
-
Error: File appears to
|
|
490
|
+
Error: File appears to Go corrupted or empty
|
|
491
491
|
Code: CORRUPTED_FILE
|
|
492
492
|
File size: 0 bytes
|
|
493
493
|
MIME type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
|
494
494
|
\`\`\`
|
|
495
495
|
|
|
496
|
-
The uploaded Excel file appears to
|
|
496
|
+
The uploaded Excel file appears to Go corrupted or empty (0 bytes).
|
|
497
497
|
|
|
498
498
|
**Possible Causes:**
|
|
499
499
|
- File upload was interrupted
|
|
@@ -503,7 +503,7 @@ The uploaded Excel file appears to be corrupted or empty (0 bytes).
|
|
|
503
503
|
|
|
504
504
|
**Troubleshooting Steps:**
|
|
505
505
|
|
|
506
|
-
1. **
|
|
506
|
+
1. **Re-save the file:**
|
|
507
507
|
- Open in Excel and save as a new file
|
|
508
508
|
- Try "Save As" \u2192 Excel Workbook (.xlsx)
|
|
509
509
|
|
|
@@ -513,9 +513,9 @@ The uploaded Excel file appears to be corrupted or empty (0 bytes).
|
|
|
513
513
|
|
|
514
514
|
3. **Check file integrity:**
|
|
515
515
|
- Verify you can open the file locally
|
|
516
|
-
- Check file size (should
|
|
516
|
+
- Check file size (should Go > 0 bytes)
|
|
517
517
|
|
|
518
|
-
4. **
|
|
518
|
+
4. **Re-upload:**
|
|
519
519
|
- Clear browser cache
|
|
520
520
|
- Try uploading again
|
|
521
521
|
|
|
@@ -524,7 +524,7 @@ The uploaded Excel file appears to be corrupted or empty (0 bytes).
|
|
|
524
524
|
- Use Google Sheets and export as Excel
|
|
525
525
|
- Upload as a text/CSV file instead
|
|
526
526
|
|
|
527
|
-
Would you like to try uploading the file again or in a different format?`}]},{id:"9",role:"user",parts:[{type:"text",text:"What about network connectivity issues?"}]},{id:"10",role:"assistant",parts:[{type:"text",text:`Let
|
|
527
|
+
Would you like to try uploading the file again or in a different format?`}]},{id:"9",role:"user",parts:[{type:"text",text:"What about network connectivity issues?"}]},{id:"10",role:"assistant",parts:[{type:"text",text:`Let Ua check the network connectivity and system status.
|
|
528
528
|
|
|
529
529
|
*\u{1F527} Calling function: check_system_status()*
|
|
530
530
|
|
|
@@ -547,7 +547,7 @@ It appears there are network connectivity issues affecting several services:
|
|
|
547
547
|
- \u2705 Authentication (operational)
|
|
548
548
|
|
|
549
549
|
**Impact:**
|
|
550
|
-
- File uploads may fail or
|
|
550
|
+
- File uploads may fail or Go delayed
|
|
551
551
|
- Data retrieval functions unavailable
|
|
552
552
|
- Real-time analytics temporarily disabled
|
|
553
553
|
- Chat functionality remains available
|
|
@@ -564,7 +564,7 @@ It appears there are network connectivity issues affecting several services:
|
|
|
564
564
|
- Access cached reports and documents
|
|
565
565
|
- Plan future actions for when services restore
|
|
566
566
|
|
|
567
|
-
I'll continue monitoring the connection status. Services typically restore within 5-10 minutes during maintenance windows.`}]}]);return(0,
|
|
567
|
+
I'll continue monitoring the connection status. Services typically restore within 5-10 minutes during maintenance windows.`}]}]);return(0,Ua.jsx)("div",{className:"Ua-screen w-full",children:(0,Ua.jsx)(et,{messages:e,capabilities:Ye,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function Cr(){let[e,t]=(0,tt.useState)([{id:"1",role:"assistant",parts:[{type:"text",text:`Welcome! I can help you with various business tasks. Use the capabilities menu at the bottom to explore what I can do, or ask Ua directly about:
|
|
568
568
|
|
|
569
569
|
\u{1F3E2} **Sales & CRM**
|
|
570
570
|
- Customer management
|
|
@@ -586,7 +586,7 @@ I'll continue monitoring the connection status. Services typically restore withi
|
|
|
586
586
|
- Budget analysis
|
|
587
587
|
- Expense tracking
|
|
588
588
|
|
|
589
|
-
Try clicking on any capability in the menu below to get started!`}]},{id:"2",role:"user",parts:[{type:"text",text:"I clicked on Sales \u2192 Customers \u2192 Acme Corp"}]},{id:"3",role:"assistant",parts:[{type:"text",text:"Great! You'
|
|
589
|
+
Try clicking on any capability in the menu below to get started!`}]},{id:"2",role:"user",parts:[{type:"text",text:"I clicked on Sales \u2192 Customers \u2192 Acme Corp"}]},{id:"3",role:"assistant",parts:[{type:"text",text:"Great! You've selected **Acme Corp** from the customers list. Here's what I found:"},{type:"data-customer-card",data:{id:"acme-corp",name:"Acme Corp",type:"Enterprise Customer",revenue:"$125,000 ARR",industry:"Technology",employees:500,lastContact:"2024-01-15",status:"active",contacts:[{name:"John Smith",role:"CTO",email:"john@acme.com"},{name:"Sarah Johnson",role:"Procurement",email:"sarah@acme.com"}],recent_activity:[{date:"2024-01-15",activity:"Contract renewal discussion"},{date:"2024-01-10",activity:"Product demo scheduled"},{date:"2024-01-05",activity:"Support ticket resolved"}],opportunities:[{name:"Enterprise License Renewal",value:"$150K",stage:"Negotiation"},{name:"Additional Modules",value:"$25K",stage:"Proposal"}]}}]},{id:"4",role:"assistant",parts:[{type:"text",text:`**Available Actions for Acme Corp:**
|
|
590
590
|
|
|
591
591
|
\u{1F3AF} **Sales Actions**
|
|
592
592
|
- Schedule follow-up meeting
|
|
@@ -603,7 +603,7 @@ Try clicking on any capability in the menu below to get started!`}]},{id:"2",rol
|
|
|
603
603
|
- Generate account report
|
|
604
604
|
- Analyze usage patterns
|
|
605
605
|
|
|
606
|
-
What would you like to do next?`}]},{id:"5",role:"user",parts:[{type:"text",text:"Now I want to explore Marketing \u2192 Campaign Management"}]},{id:"6",role:"assistant",parts:[{type:"text",text:"Perfect! You'
|
|
606
|
+
What would you like to do next?`}]},{id:"5",role:"user",parts:[{type:"text",text:"Now I want to explore Marketing \u2192 Campaign Management"}]},{id:"6",role:"assistant",parts:[{type:"text",text:"Perfect! You've navigated to **Campaign Management**. Here's an overview of your marketing campaigns:"},{type:"data-campaigns",data:{title:"Active Marketing Campaigns",campaigns:[{id:"winter-promo",name:"Winter Promotion 2024",status:"active",type:"Email + Social",start_date:"2024-01-01",end_date:"2024-02-29",budget:15e3,spent:8500,leads:247,conversions:23,roi:"180%"},{id:"product-launch",name:"New Product Launch",status:"planning",type:"Multi-channel",start_date:"2024-02-15",end_date:"2024-04-15",budget:25e3,spent:0,leads:0,conversions:0,roi:"TBD"},{id:"retargeting",name:"Retargeting Campaign",status:"active",type:"Digital Ads",start_date:"2024-01-10",end_date:"2024-03-10",budget:8e3,spent:3200,leads:89,conversions:12,roi:"150%"}]}}]},{id:"7",role:"assistant",parts:[{type:"text",text:`**Campaign Management Actions:**
|
|
607
607
|
|
|
608
608
|
\u{1F4DD} **Create & Edit**
|
|
609
609
|
- Create new campaign
|
|
@@ -621,11 +621,11 @@ What would you like to do next?`}]},{id:"5",role:"user",parts:[{type:"text",text
|
|
|
621
621
|
- Update target audiences
|
|
622
622
|
|
|
623
623
|
\u{1F3AF} **Optimization**
|
|
624
|
-
- A/
|
|
624
|
+
- A/Ua test variations
|
|
625
625
|
- Optimize targeting
|
|
626
626
|
- Adjust bidding strategies
|
|
627
627
|
|
|
628
|
-
Which campaign would you like to work with, or what action would you like to take?`}]},{id:"8",role:"user",parts:[{type:"text",text:"Let
|
|
628
|
+
Which campaign would you like to work with, or what action would you like to take?`}]},{id:"8",role:"user",parts:[{type:"text",text:"Let Ua check HR \u2192 Employee Management \u2192 Performance Reviews"}]},{id:"9",role:"assistant",parts:[{type:"text",text:"You've accessed **Performance Reviews** in HR. Here's the current status of performance reviews:"},{type:"data-performance",data:{title:"Performance Review Dashboard",period:"Q4 2023",overview:{total_employees:127,reviews_completed:89,reviews_pending:23,reviews_overdue:15,completion_rate:70.1},departments:[{name:"Engineering",employees:45,completed:38,pending:5,overdue:2,avg_rating:4.2},{name:"Sales",employees:28,completed:22,pending:4,overdue:2,avg_rating:3.9},{name:"Marketing",employees:18,completed:12,pending:3,overdue:3,avg_rating:4},{name:"Operations",employees:15,completed:9,pending:4,overdue:2,avg_rating:3.8}],upcoming_deadlines:[{employee:"Alex Chen",department:"Engineering",due_date:"2024-01-25"},{employee:"Maria Garcia",department:"Sales",due_date:"2024-01-27"},{employee:"David Kim",department:"Marketing",due_date:"2024-01-30"}]}}]},{id:"10",role:"assistant",parts:[{type:"text",text:`**Performance Review Actions:**
|
|
629
629
|
|
|
630
630
|
\u2705 **Review Management**
|
|
631
631
|
- Schedule new reviews
|
|
@@ -652,4 +652,4 @@ Which campaign would you like to work with, or what action would you like to tak
|
|
|
652
652
|
- 23 reviews are **pending**
|
|
653
653
|
- 3 employees have upcoming deadlines this week
|
|
654
654
|
|
|
655
|
-
Would you like
|
|
655
|
+
Would you like Ua to send reminder notifications or help with any specific review tasks?`}]}]);return(0,Ua.jsx)("div",{className:"Ua-screen w-full",children:(0,Ua.jsx)(et,{messages:e,capabilities:Ye,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}0&&(module.exports={ChatDemoCapabilitiesInteraction,ChatDemoErrorHandling,ChatDemoFileUploads,ChatDemoMarkdownResponses,ChatDemoToolCalling,ChatDemoUIComponents});
|