cortex-react-components 2.0.8 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/{chunk-5O4QU3FO.mjs → chunk-35MOYND3.mjs} +1 -1
  2. package/dist/chunk-45Z6Y2JZ.mjs +4 -0
  3. package/dist/{chunk-P53OTWDE.mjs → chunk-5TJPUM35.mjs} +1 -1
  4. package/dist/{chunk-CLGBBNRB.mjs → chunk-75WE6ZXB.mjs} +1 -1
  5. package/dist/{chunk-GLMVATBC.mjs → chunk-7NYJVQ22.mjs} +1 -1
  6. package/dist/{chunk-36PL6SXU.mjs → chunk-7Y6IS436.mjs} +1 -1
  7. package/dist/chunk-B753NNIJ.mjs +1 -0
  8. package/dist/{chunk-FONUFLBI.mjs → chunk-F3F54TXG.mjs} +1 -1
  9. package/dist/{chunk-PZCNIPIA.mjs → chunk-FMCBJ4WI.mjs} +1 -1
  10. package/dist/{chunk-WIIGZJLT.mjs → chunk-GKSMOZLR.mjs} +1 -1
  11. package/dist/{chunk-4FP5GLMD.mjs → chunk-GNFKYRNR.mjs} +1 -1
  12. package/dist/{chunk-MZ7ZHGT7.mjs → chunk-GUOVROAM.mjs} +1 -1
  13. package/dist/{chunk-MXISPX3W.mjs → chunk-HYX44K7F.mjs} +1 -1
  14. package/dist/{chunk-S36H4JAL.mjs → chunk-IGPG2Z5Y.mjs} +1 -1
  15. package/dist/{chunk-OO7RQCK6.mjs → chunk-MNMDMQ6E.mjs} +1 -1
  16. package/dist/{chunk-CSNHOTMZ.mjs → chunk-MZWGXTDT.mjs} +1 -1
  17. package/dist/{chunk-C3KGAABY.mjs → chunk-NABSSYAH.mjs} +1 -1
  18. package/dist/{chunk-MMOATE43.mjs → chunk-NEBCCCJK.mjs} +1 -1
  19. package/dist/{chunk-TIPBA4EM.mjs → chunk-ONJIFYPO.mjs} +1 -1
  20. package/dist/{chunk-IUDZWH6J.mjs → chunk-OWW3TCUF.mjs} +1 -1
  21. package/dist/{chunk-7RRPNMIO.mjs → chunk-OZWPWDGD.mjs} +1 -1
  22. package/dist/{chunk-FHJ4MHLT.mjs → chunk-TBM5A6KN.mjs} +1 -1
  23. package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
  24. package/dist/{chunk-72SLLEHW.mjs → chunk-U2MZLHPX.mjs} +1 -1
  25. package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
  26. package/dist/{chunk-B3IP63Q2.mjs → chunk-V5TQHIXH.mjs} +1 -1
  27. package/dist/{chunk-5B6FLVPH.mjs → chunk-V5W32NJ4.mjs} +1 -1
  28. package/dist/{chunk-RAMI7KEB.mjs → chunk-VX656CU4.mjs} +1 -1
  29. package/dist/{chunk-OE6DHWF3.mjs → chunk-WXPZ4HGC.mjs} +1 -1
  30. package/dist/{chunk-YYBKYJU2.mjs → chunk-XNJSFWXE.mjs} +1 -1
  31. package/dist/{chunk-3TFLP3CZ.mjs → chunk-YGEUYPGK.mjs} +1 -1
  32. package/dist/{chunk-RV2TWILK.mjs → chunk-ZJAZWWSJ.mjs} +1 -1
  33. package/dist/components/Blocks/Banner.mjs +1 -1
  34. package/dist/components/Blocks/CallToAction.mjs +1 -1
  35. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  36. package/dist/components/Blocks/Content.mjs +1 -1
  37. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  38. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  39. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  40. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  41. package/dist/components/Blocks/index.mjs +1 -1
  42. package/dist/components/Cards/ContentCard.mjs +1 -1
  43. package/dist/components/Cards/FeatureCard.mjs +1 -1
  44. package/dist/components/Cards/index.mjs +1 -1
  45. package/dist/components/Chat/ChatInterface.js +1 -1
  46. package/dist/components/Chat/ChatInterface.mjs +1 -1
  47. package/dist/components/Chat/CopilotInterface.js +1 -1
  48. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  49. package/dist/components/Chat/FILE_UPLOAD_GUIDE.js +219 -0
  50. package/dist/components/Chat/FILE_UPLOAD_GUIDE.mjs +219 -0
  51. package/dist/components/Chat/demo-long-messages.css +1 -0
  52. package/dist/components/Chat/demo-long-messages.d.ts +5 -0
  53. package/dist/components/Chat/demo-long-messages.js +59 -0
  54. package/dist/components/Chat/demo-long-messages.mjs +55 -0
  55. package/dist/components/Chat/demo.js +1 -1
  56. package/dist/components/Chat/demo.mjs +1 -1
  57. package/dist/components/Chat/example-usage.js +1 -1
  58. package/dist/components/Chat/example-usage.mjs +1 -1
  59. package/dist/components/Chat/example-with-file-uploads.css +1 -0
  60. package/dist/components/Chat/example-with-file-uploads.d.ts +54 -0
  61. package/dist/components/Chat/example-with-file-uploads.js +2 -0
  62. package/dist/components/Chat/example-with-file-uploads.mjs +2 -0
  63. package/dist/components/Chat/example-with-vercel-ai.d.ts +4 -0
  64. package/dist/components/Chat/example-with-vercel-ai.js +1 -1
  65. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  66. package/dist/components/Chat/index.js +2 -2
  67. package/dist/components/Chat/index.mjs +1 -1
  68. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  69. package/dist/components/DeliveryLead/index.mjs +1 -1
  70. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  71. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  72. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  73. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  74. package/dist/components/HeaderFooter/Header.mjs +1 -1
  75. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  76. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  77. package/dist/components/HeaderFooter/index.mjs +1 -1
  78. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  79. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  80. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  81. package/dist/components/Heros/RenderHero.mjs +1 -1
  82. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  83. package/dist/components/Heros/index.mjs +1 -1
  84. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  85. package/dist/components/Holidays/index.mjs +1 -1
  86. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  87. package/dist/components/Layouts/Print.mjs +1 -1
  88. package/dist/components/Layouts/SlideShow.mjs +1 -1
  89. package/dist/components/Layouts/index.mjs +1 -1
  90. package/dist/components/Other/index.mjs +1 -1
  91. package/dist/components/Payload/RichText/index.mjs +1 -1
  92. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  93. package/dist/components/Payload/index.mjs +1 -1
  94. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  95. package/dist/components/Projects/ProjectPage.mjs +1 -1
  96. package/dist/components/Projects/ProjectView.mjs +1 -1
  97. package/dist/components/dc-temp/index.mjs +1 -1
  98. package/dist/components/index.js +9 -9
  99. package/dist/components/index.mjs +1 -1
  100. package/dist/globals.css +1 -1
  101. package/dist/index.js +10 -10
  102. package/dist/index.mjs +1 -1
  103. package/dist/metafile-cjs.json +1 -1
  104. package/dist/metafile-esm.json +1 -1
  105. package/dist/pages/Blog.mjs +1 -1
  106. package/dist/pages/Documentation.mjs +1 -1
  107. package/dist/pages/IndexPage.mjs +1 -1
  108. package/dist/pages/Intranet.mjs +1 -1
  109. package/dist/pages/LandingPage.mjs +1 -1
  110. package/dist/pages/Page.mjs +1 -1
  111. package/dist/pages/Publish.mjs +1 -1
  112. package/dist/pages/Website.mjs +1 -1
  113. package/dist/sections/AboutSection.mjs +1 -1
  114. package/dist/sections/BlogDetail.mjs +1 -1
  115. package/dist/sections/BlogList.mjs +1 -1
  116. package/dist/sections/ContactSection.mjs +1 -1
  117. package/dist/sections/PageSections.mjs +1 -1
  118. package/dist/sections/PricingSection.mjs +1 -1
  119. package/dist/sections/ServiceDetail.mjs +1 -1
  120. package/dist/sections/ServiceDetailSection.mjs +1 -1
  121. package/dist/sections/ServiceSection.mjs +1 -1
  122. package/dist/sections/form/index.mjs +1 -1
  123. package/dist/sections/index.mjs +1 -1
  124. package/package.json +1 -1
  125. package/dist/chunk-AAIHHUX2.mjs +0 -4
  126. package/dist/chunk-L7W3JS7W.mjs +0 -1
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";var pt=Object.create;var ke=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames;var gt=Object.getPrototypeOf,ft=Object.prototype.hasOwnProperty;var bt=(e,t)=>{for(var a in t)ke(e,a,{get:t[a],enumerable:!0})},Be=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of mt(t))!ft.call(e,s)&&s!==a&&ke(e,s,{get:()=>t[s],enumerable:!(o=ut(t,s))||o.enumerable});return e};var ee=(e,t,a)=>(a=e!=null?pt(gt(e)):{},Be(t||!e||!e.__esModule?ke(a,"default",{value:e,enumerable:!0}):a,e)),ht=e=>Be(ke({},"__esModule",{value:!0}),e);var oa={};bt(oa,{ChatInterface:()=>ra});module.exports=ht(oa);var $=require("react"),de=require("framer-motion"),k=require("lucide-react");var Pe=ee(require("react")),W=ee(require("@radix-ui/react-avatar"));var We=require("clsx");var Me="-",vt=e=>{let t=xt(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let n=l.split(Me);return n[0]===""&&n.length!==1&&n.shift(),Ve(n,t)||yt(l)},getConflictingClassGroupIds:(l,n)=>{let m=a[l]||[];return n&&o[l]?[...m,...o[l]]:m}}},Ve=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Ve(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Me);return t.validators.find(({validator:l})=>l(i))?.classGroupId},He=/^\[(.+)\]$/,yt=e=>{if(He.test(e)){let t=He.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},xt=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return wt(Object.entries(e.classGroups),a).forEach(([i,l])=>{Se(l,o,i,t)}),o},Se=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Fe(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(Ct(s)){Se(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,l])=>{Se(l,Fe(t,i),a,o)})})},Fe=(e,t)=>{let a=e;return t.split(Me).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Ct=e=>e.isThemeGetter,wt=(e,t)=>t?e.map(([a,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,n])=>[t+l,n])):i);return[a,s]}):e,Nt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(i,l)=>{a.set(i,l),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let l=a.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return s(i,l),l},set(i,l){a.has(i)?a.set(i,l):s(i,l)}}},Ue="!",kt=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,l=n=>{let m=[],b=0,N=0,f;for(let x=0;x<n.length;x++){let A=n[x];if(b===0){if(A===s&&(o||n.slice(x,x+i)===t)){m.push(n.slice(N,x)),N=x+i;continue}if(A==="/"){f=x;continue}}A==="["?b++:A==="]"&&b--}let h=m.length===0?n:n.substring(N),P=h.startsWith(Ue),L=P?h.substring(1):h,y=f&&f>N?f-N:void 0;return{modifiers:m,hasImportantModifier:P,baseClassName:L,maybePostfixModifierPosition:y}};return a?n=>a({className:n,parseClassName:l}):l},Pt=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},At=e=>({cache:Nt(e.cacheSize),parseClassName:kt(e),...vt(e)}),Rt=/\s+/,Tt=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Rt),n="";for(let m=l.length-1;m>=0;m-=1){let b=l[m],{modifiers:N,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:P}=a(b),L=!!P,y=o(L?h.substring(0,P):h);if(!y){if(!L){n=b+(n.length>0?" "+n:n);continue}if(y=o(h),!y){n=b+(n.length>0?" "+n:n);continue}L=!1}let x=Pt(N).join(":"),A=f?x+Ue:x,R=A+y;if(i.includes(R))continue;i.push(R);let C=s(y,L);for(let D=0;D<C.length;++D){let pe=C[D];i.push(A+pe)}n=b+(n.length>0?" "+n:n)}return n};function St(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ge(t))&&(o&&(o+=" "),o+=a);return o}var Ge=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ge(e[o]))&&(a&&(a+=" "),a+=t);return a};function Mt(e,...t){let a,o,s,i=l;function l(m){let b=t.reduce((N,f)=>f(N),e());return a=At(b),o=a.cache.get,s=a.cache.set,i=n,n(m)}function n(m){let b=o(m);if(b)return b;let N=Tt(m,a);return s(m,N),N}return function(){return i(St.apply(null,arguments))}}var w=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},je=/^\[(?:([a-z-]+):)?(.+)\]$/i,It=/^\d+\/\d+$/,Lt=new Set(["px","full","screen"]),Dt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Et=/\d+(%|px|Ae?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|Ae?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ht=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,O=e=>se(e)||Lt.has(e)||It.test(e),Q=e=>le(e,"length",Wt),se=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>le(e,"number",se),be=e=>!!e&&Number.isInteger(Number(e)),Ft=e=>e.endsWith("%")&&se(e.slice(0,-1)),u=e=>je.test(e),X=e=>Dt.test(e),Vt=new Set(["length","size","percentage"]),Ut=e=>le(e,Vt,$e),Gt=e=>le(e,"position",$e),jt=new Set(["image","url"]),$t=e=>le(e,jt,_t),Ot=e=>le(e,"",Kt),he=()=>!0,le=(e,t,a)=>{let o=je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Wt=e=>Et.test(e)&&!zt.test(e),$e=()=>!1,Kt=e=>Bt.test(e),_t=e=>Ht.test(e);var Jt=()=>{let e=w("colors"),t=w("spacing"),a=w("blur"),o=w("brightness"),s=w("borderColor"),i=w("borderRadius"),l=w("borderSpacing"),n=w("borderWidth"),m=w("contrast"),b=w("grayscale"),N=w("hueRotate"),f=w("invert"),h=w("gap"),P=w("gradientColorStops"),L=w("gradientColorStopPositions"),y=w("inset"),x=w("margin"),A=w("opacity"),R=w("padding"),C=w("saturate"),D=w("scale"),pe=w("sepia"),ue=w("skew"),Ce=w("space"),ie=w("translate"),we=()=>["auto","contain","none"],me=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",u,t],v=()=>[u,t],Ne=()=>["",O,Q],Y=()=>["auto",se,u],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],c=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],S=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",u],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[se,u];return{cacheSize:500,separator:":",theme:{colors:[he],spacing:[O,Q],blur:["none","",X,u],brightness:M(),borderColor:[e],borderRadius:["none","","full",X,u],borderSpacing:v(),borderWidth:Ne(),contrast:M(),grayscale:T(),hueRotate:M(),invert:T(),gap:v(),gradientColorStops:[e],gradientColorStopPositions:[Ft,Q],inset:ge(),margin:ge(),opacity:M(),padding:v(),saturate:M(),scale:M(),sepia:T(),skew:M(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",u]}],container:["container"],columns:[{columns:[X]}],"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:[...fe(),u]}],overflow:[{overflow:me()}],"overflow-x":[{"overflow-x":me()}],"overflow-y":[{"overflow-y":me()}],overscroll:[{overscroll:we()}],"overscroll-x":[{"overscroll-x":we()}],"overscroll-y":[{"overscroll-y":we()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",be,u]}],basis:[{basis:ge()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",u]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",be,u]}],"grid-cols":[{"grid-cols":[he]}],"col-start-end":[{col:["auto",{span:["full",be,u]},u]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[he]}],"row-start-end":[{row:["auto",{span:[be,u]},u]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",u]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",u]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...S()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...S(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...S(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Ae:[{Ae:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",u,t]}],"min-w":[{"min-w":[u,t,"min","max","fit"]}],"max-w":[{"max-w":[u,t,"none","full","min","max","fit","prose",{screen:[X]},X]}],h:[{h:[u,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[u,t,"auto","min","max","fit"]}],"font-size":[{text:["base",X,Q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Te]}],"font-family":[{font:[he]}],"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",u]}],"line-clamp":[{"line-clamp":["none",se,Te]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",O,u]}],"list-image":[{"list-image":["none",u]}],"list-style-type":[{list:["none","disc","decimal",u]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",O,Q]}],"underline-offset":[{"underline-offset":["auto",O,u]}],"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:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u]}],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",u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),Gt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ut]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","Ae","br","b","bl","l","tl"]},$t]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-Ae":[{"rounded-Ae":[i]}],"rounded-b":[{"rounded-b":[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:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-Ae":[{"border-Ae":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:ne()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-Ae":[{"border-Ae":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[O,u]}],"outline-w":[{outline:[O,Q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[O,Q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",X,Ot]}],"shadow-color":[{shadow:[he]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...c(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":c()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",X,u]}],grayscale:[{grayscale:[b]}],"hue-rotate":[{"hue-rotate":[N]}],invert:[{invert:[f]}],saturate:[{saturate:[C]}],sepia:[{sepia:[pe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",u]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",u]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",u]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-x":[{"scale-x":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[be,u]}],"translate-x":[{"translate-x":[ie]}],"translate-y":[{"translate-y":[ie]}],"skew-x":[{"skew-x":[ue]}],"skew-y":[{"skew-y":[ue]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",u]}],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","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-Ae":[{"scroll-Ae":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"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",u]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[O,Q,Te]}],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"],Ae:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-Ae","rounded-b","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-Ae":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-Ae","border-w-b","border-w-l"],"border-w-x":["border-w-Ae","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-Ae","border-color-b","border-color-l"],"border-color-x":["border-color-Ae","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-Ae":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Oe=Mt(Jt);function d(...e){return Oe((0,We.clsx)(e))}var Ae=require("react/jsx-runtime"),ve=Pe.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)(W.Root,{ref:a,className:d("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ve.displayName=W.Root.displayName;var qt=Pe.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)(W.Image,{ref:a,className:d("aspect-square h-full w-full",e),...t}));qt.displayName=W.Image.displayName;var ye=Pe.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)(W.Fallback,{ref:a,className:d("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ye.displayName=W.Fallback.displayName;var Ke=require("@radix-ui/react-slot"),_e=require("class-variance-authority"),Je=ee(require("react")),Qt=(0,_e.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),z=Je.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,Ae.jsx)(e?Ke.Slot:"button",{className:d(Qt({className:t,size:a,variant:o})),ref:i,...s}));z.displayName="Button";var te=ee(require("react"));var V=te.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)("div",{ref:a,className:d("rounded-xl border bg-card text-card-foreground shadow",e),...t}));V.displayName="Card";var K=te.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)("div",{ref:a,className:d("flex flex-col space-y-1.5 Ae-6",e),...t}));K.displayName="CardHeader";var _=te.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)("div",{ref:a,className:d("font-semibold leading-none tracking-tight",e),...t}));_.displayName="CardTitle";var Ie=te.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)("div",{ref:a,className:d("text-sm text-muted-foreground",e),...t}));Ie.displayName="CardDescription";var G=te.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)("div",{ref:a,className:d("Ae-6 pt-0",e),...t}));G.displayName="CardContent";var xe=te.forwardRef(({className:e,...t},a)=>(0,Ae.jsx)("div",{ref:a,className:d("flex items-center Ae-6 pt-0",e),...t}));xe.displayName="CardFooter";var Qe=ee(require("react"));var Le=Qe.forwardRef(({className:e,type:t,...a},o)=>(0,Ae.jsx)("input",{type:t,className:d("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));Le.displayName="Input";var De=ee(require("react")),B=ee(require("@radix-ui/react-scroll-area"));var Ee=De.forwardRef(({className:e,children:t,...a},o)=>(0,Ae.jsxs)(B.Root,{ref:o,className:d("relative overflow-hidden",e),...a,children:[(0,Ae.jsx)(B.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ae.jsx)(Ze,{}),(0,Ae.jsx)(B.Corner,{})]}));Ee.displayName=B.Root.displayName;var Ze=De.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Ae.jsx)(B.ScrollAreaScrollbar,{ref:o,orientation:t,className:d("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent Ae-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent Ae-[1px]",e),...a,children:(0,Ae.jsx)(B.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ze.displayName=B.ScrollAreaScrollbar.displayName;var Xt=(0,_e.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 re({className:e,variant:t,...a}){return(0,Ae.jsx)("div",{className:d(Xt({variant:t}),e),...a})}var tt={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"]};function ze(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function at({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:i=tt,className:l}){let[n,m]=(0,$.useState)([]),[b,N]=(0,$.useState)([]),f=n[n.length-1],h=f?.children||e,P=(C,D)=>{switch(C.type){case"category":return i.categories[D%i.categories.length];case"list":return i.lists[D%i.lists.length];case"item":return i.items[D%i.items.length];default:return i.primary}},L=(0,$.useMemo)(()=>({path:n,selectedItems:b,filters:{}}),[n,b]);(0,$.useEffect)(()=>{s&&s(L)},[L,s]);let y=C=>{C.type==="category"||C.type==="list"?m([...n,C]):C.type==="item"&&N([...b,C])},x=()=>{m(n.slice(0,-1))},A=C=>{m(n.slice(0,C+1))},R=()=>f?.actions?f.actions:[];return t?(0,Ae.jsxs)("div",{className:d("w-full",l),children:[(0,Ae.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ae.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,Ae.jsx)(de.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:x,className:d("group Ae-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ae.jsx)(k.ChevronLeft,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Ae.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,Ae.jsx)(de.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:d("group Ae-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ae.jsx)(k.X,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,Ae.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Ae.jsx)(de.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>m([]),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ae.jsxs)("span",{className:"relative",children:["Capabilities",(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),n.map((C,D)=>(0,Ae.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ae.jsx)(k.ChevronRight,{className:"h-2 w-2"}),(0,Ae.jsx)(de.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>A(D),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ae.jsxs)("span",{className:"relative",children:[C.name,(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,Ae.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Ae.jsx)(de.AnimatePresence,{mode:"wait",children:(0,Ae.jsx)(de.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,Ae.jsx)(ea,{data:f.data,onItemSelect:C=>N([...b,C]),colorScheme:i}):(0,Ae.jsx)(Zt,{capabilities:h,onSelect:y,colorScheme:i})},f?.id||"root")})})]}):(0,Ae.jsxs)(z,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Ae.jsx)(k.Menu,{className:"h-4 w-4"}),(0,Ae.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Zt({capabilities:e,onSelect:t,colorScheme:a}){return(0,Ae.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Ae.jsx)(Yt,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function Yt({capability:e,onClick:t,selected:a,color:o}){return(0,Ae.jsxs)(de.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:d("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,Ae.jsx)("div",{className:d("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Ae.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-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,Ae.jsx)(k.ChevronRight,{className:d("h-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,Ae.jsx)(re,{variant:"secondary",className:d("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function ea({data:e,onItemSelect:t,colorScheme:a}){return(0,Ae.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Ae.jsxs)(de.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:d("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,Ae.jsx)("div",{className:d("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,Ae.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ae.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,Ae.jsx)("div",{className:d("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Ae.jsx)(re,{variant:"secondary",className:d("text-xs h-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 it=require("date-fns");function rt({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,$.useState)(null),[i,l]=(0,$.useState)(!1),[n,m]=(0,$.useState)(null),b=async(f=!0)=>{if(e){f&&l(!0);try{let h=await fetch(`/api/tasks/${e}`);if(!h.ok)throw new Error(`Failed to fetch task: ${h.statusText}`);let P=await h.json();s(P)}catch(h){console.error("Error fetching task:",h),m(h instanceof Error?h:new Error("Unknown error occurred"))}finally{f&&l(!1)}}},N=()=>b(!1);return(0,$.useEffect)(()=>{e&&b(!0);let f=null;return e&&t&&(f=setInterval(N,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:i,error:n}}var ta=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"}},aa=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function nt({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:i}=e||{};if(!t)return null;let l=null,n=!0,m=i,b=o!==void 0?o:!0;if(l=s||{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:b,taskData:l,error:m}),b){let{task:P,loading:L,error:y}=rt({taskId:t,system:a});l=P,n=L,m=y}else n=!1;let N=ta(l?.status||"todo"),f=aa(l?.status||"todo"),h=l?.dateLogged||new Date().toISOString();try{let P=new Date(l?.dateLogged||"");isNaN(P.getTime())||(h=(0,it.formatDistanceToNow)(P,{addSuffix:!0}))}catch{}return(0,Ae.jsxs)(V,{className:d("w-full max-w-md shadow-md",m&&"border border-destructive"),children:[(0,Ae.jsxs)(K,{className:"pb-2",children:[(0,Ae.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Ae.jsx)(_,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,Ae.jsx)(re,{className:`${N}`,children:f})]}),l?.project&&(0,Ae.jsxs)(Ie,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,Ae.jsx)(G,{className:"pb-2",children:n?(0,Ae.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):m?(0,Ae.jsx)("Ae",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ae.jsx)("Ae",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,Ae.jsx)(xe,{className:"pt-2 flex items-center justify-between",children:(0,Ae.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ae.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Ae.jsxs)("span",{children:["Created ",h]}),(0,Ae.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ae.jsxs)("span",{children:["Task #",t]})]})})]})}function ct({artefact:e,taskId:t,taskData:a,loading:o=!1,error:s=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=i.dateLogged;try{let n=new Date(i.dateLogged);isNaN(n.getTime())||(l=(0,it.formatDistanceToNow)(n,{addSuffix:!0}))}catch{}return(0,Ae.jsxs)(V,{className:"w-full max-w-md shadow-md",children:[(0,Ae.jsx)(K,{className:"pb-2",children:(0,Ae.jsx)("div",{className:"flex justify-between items-start",children:(0,Ae.jsx)(_,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,Ae.jsx)(G,{className:"pb-2",children:o?(0,Ae.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,Ae.jsx)("Ae",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ae.jsx)("Ae",{className:"text-sm text-foreground",children:e})}),(0,Ae.jsx)(xe,{className:"pt-2 flex items-center justify-between",children:(0,Ae.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ae.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Ae.jsxs)("span",{children:["Created ",l]}),(0,Ae.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ae.jsxs)("span",{children:["Task #",i.id]})]})})]})}function dt(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function ra({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:i,isDragOver:l,enableFileUpload:n,onInputChange:m,onSendMessage:b,onKeyPress:N,onFileUpload:f,onRemoveFile:h,onDragOver:P,className:L}){let y=(0,$.useRef)(null),x=(0,$.useRef)(null),A=(0,$.useRef)(null),[R,C]=(0,$.useState)(!1),[D,pe]=(0,$.useState)({path:[],selectedItems:[],filters:{}});(0,$.useEffect)(()=>{y.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,$.useEffect)(()=>{R&&setTimeout(()=>{y.current?.scrollIntoView({behavior:"smooth"})},100)},[R]);let ue=()=>ze(D),Ce=()=>{let c=[];return s.forEach(S=>{S.actions&&S.actions.forEach(T=>{c.push({label:T.label,action:()=>ie(T.id,{path:[S],selectedItems:[],filters:{}})})}),S.children&&S.children.forEach(T=>{T.type==="list"&&T.data&&c.push({label:`View ${T.name}`,action:()=>C(!0)})})}),c.slice(0,5)},ie=(c,S)=>{console.log("Capability action:",c,S);let T=`Executing ${c} with context: ${JSON.stringify(S.path.map(U=>U.name))}`;C(!1)},we=ze({path:[],selectedItems:[],filters:{}}),me=c=>{f(c.target.files),c.target.files&&(c.target.value="")},ge=c=>{c.preventDefault(),P(!0)},v=c=>{c.preventDefault(),P(!1)},Ne=c=>{c.preventDefault(),P(!1),f(c.dataTransfer.files)},Y=c=>{if(c===0)return"0 Bytes";let S=1024,T=["Bytes","KB","MB","GB"],U=Math.floor(Math.log(c)/Math.log(S));return parseFloat((c/Math.pow(S,U)).toFixed(2))+" "+T[U]},fe=c=>c.startsWith("image/")?(0,Ae.jsx)(k.Image,{className:"h-4 w-4"}):c.startsWith("text/")?(0,Ae.jsx)(k.FileText,{className:"h-4 w-4"}):(0,Ae.jsx)(k.File,{className:"h-4 w-4"}),ne=c=>{let S=c.role==="assistant",T=c.role==="user",U=dt(c);return(0,Ae.jsxs)("div",{className:d("flex items-start gap-3",T?"flex-row-reverse":""),children:[(0,Ae.jsx)(ve,{className:"h-8 w-8 shrink-0",children:(0,Ae.jsx)(ye,{className:d(T?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:T?(0,Ae.jsx)(k.User,{className:"h-4 w-4"}):(0,Ae.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Ae.jsxs)("div",{className:d("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",T?"bg-primary text-primary-foreground":"bg-muted"),children:[U&&(0,Ae.jsx)("div",{className:"mb-2 last:mb-0",children:(0,Ae.jsx)("Ae",{className:"text-sm",children:U})}),c.parts.map((M,H)=>{if(M.type==="text")return null;if(M.type==="file"){let g=M;return(0,Ae.jsx)("div",{className:"mb-2 Ae-2 bg-background/50 rounded-lg",children:(0,Ae.jsxs)("div",{className:"flex items-center gap-2",children:[fe(g.mimeType||"application/octet-stream"),(0,Ae.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ae.jsx)("Ae",{className:"text-sm font-medium truncate",children:g.name||g.url?.split("/").pop()||"File"}),g.size&&(0,Ae.jsx)("Ae",{className:"text-xs opacity-70",children:Y(g.size)}),g.mimeType&&(0,Ae.jsx)("Ae",{className:"text-xs opacity-70",children:g.mimeType})]}),g.url&&(0,Ae.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(g.url,"_blank"),className:"h-8 w-8 Ae-0",children:(0,Ae.jsx)(k.Download,{className:"h-4 w-4"})})]})},H)}if(M.type.startsWith("tool-")){let g=M,q=M.type.replace("tool-","");if(q==="task")switch(g.state){case"input-available":return(0,Ae.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},H);case"output-available":return(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsx)(nt,{data:{id:g.output?.id||g.input?.id,fetchLatest:!1,taskData:g.output||g.input}})},H);case"output-error":return(0,Ae.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",g.errorText]},H);default:return null}if(q==="artefact")switch(g.state){case"input-available":return(0,Ae.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},H);case"output-available":return(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsx)(ct,{artefact:g.output?.description||"",taskId:g.output?.id||g.input?.id,taskData:g.output||g.input})},H);case"output-error":return(0,Ae.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",g.errorText]},H);default:return null}return(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsxs)(V,{className:"w-full max-w-md",children:[(0,Ae.jsx)(K,{children:(0,Ae.jsx)(_,{className:"text-lg",children:q})}),(0,Ae.jsxs)(G,{children:[g.state==="input-available"&&(0,Ae.jsxs)("Ae",{className:"text-sm",children:["Processing ",q,"..."]}),g.state==="output-available"&&(0,Ae.jsx)("pre",{className:"text-sm",children:JSON.stringify(g.output,null,2)}),g.state==="output-error"&&(0,Ae.jsxs)("Ae",{className:"text-sm text-red-500",children:["Error: ",g.errorText]})]})]})},H)}if(M.type.startsWith("data-")){let g=M,q=M.type.replace("data-","");return q==="reference"?(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsx)(V,{className:"w-full",children:(0,Ae.jsx)(G,{className:"Ae-4",children:(0,Ae.jsx)("div",{className:"space-y-2",children:g.data?.references?.map((F,Re)=>(0,Ae.jsxs)("div",{className:"flex items-center gap-2 Ae-2 rounded-md bg-muted/50",children:[(0,Ae.jsx)(re,{variant:"outline",children:F.type||"link"}),(0,Ae.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ae.jsx)("Ae",{className:"text-sm font-medium truncate",children:F.title}),F.description&&(0,Ae.jsx)("Ae",{className:"text-xs text-muted-foreground truncate",children:F.description})]}),F.url&&(0,Ae.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(F.url,"_blank"),className:"h-8 w-8 Ae-0",children:(0,Ae.jsx)(k.ExternalLink,{className:"h-4 w-4"})})]},Re))})})})},H):q==="menu"?(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsxs)(V,{className:"w-full",children:[(0,Ae.jsx)(K,{children:(0,Ae.jsx)(_,{className:"text-lg",children:g.data?.title})}),(0,Ae.jsx)(G,{children:(0,Ae.jsx)("div",{className:"space-y-2",children:g.data?.items?.map((F,Re)=>(0,Ae.jsx)(z,{variant:"outline",className:"w-full justify-start",onClick:F.action,children:(0,Ae.jsxs)("div",{className:"text-left",children:[(0,Ae.jsx)("Ae",{className:"font-medium",children:F.label}),F.description&&(0,Ae.jsx)("Ae",{className:"text-xs text-muted-foreground",children:F.description})]})},Re))})})]})},H):(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsxs)(V,{className:"w-full max-w-md",children:[(0,Ae.jsx)(K,{children:(0,Ae.jsx)(_,{className:"text-lg",children:q})}),(0,Ae.jsx)(G,{children:(0,Ae.jsx)("pre",{className:"text-sm",children:JSON.stringify(g.data,null,2)})})]})},H)}return null})]})]})};return(0,Ae.jsxs)(V,{className:`h-full flex flex-col shadow-sm ${L||""}`,children:[(0,Ae.jsxs)(Ee,{ref:x,className:"flex-1 Ae-4",onDragOver:ge,onDragLeave:v,onDrop:Ne,children:[(0,Ae.jsxs)("div",{className:d("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Ae.jsx)(de.AnimatePresence,{children:e.map(c=>(0,Ae.jsx)(de.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:d("flex gap-3",c.role==="user"?"flex-row-reverse":"flex-row"),children:ne(c)},c.id))}),R&&(0,Ae.jsxs)(de.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Ae.jsx)(ve,{className:"h-8 w-8",children:(0,Ae.jsx)(ye,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ae.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Ae.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ae.jsx)(at,{capabilities:s,isOpen:R,onToggle:()=>C(!R),onActionSelect:ie,className:"w-full"})})]}),a&&(0,Ae.jsxs)(de.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Ae.jsx)(ve,{className:"h-8 w-8",children:(0,Ae.jsx)(ye,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ae.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Ae.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ae.jsxs)("div",{className:"flex space-x-1",children:[(0,Ae.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Ae.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Ae.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Ae.jsx)("div",{ref:y})]}),i.length>0&&(0,Ae.jsx)("div",{className:"Ae-4 border-t bg-muted/10",children:(0,Ae.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(c=>(0,Ae.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Ae-2 border",children:[fe(c.file.type),(0,Ae.jsx)("span",{className:"text-sm font-medium",children:c.file.name}),(0,Ae.jsx)("span",{className:"text-xs text-muted-foreground",children:Y(c.file.size)}),(0,Ae.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>h(c.id),className:"h-6 w-6 Ae-0",children:(0,Ae.jsx)(k.X,{className:"h-4 w-4"})})]},c.id))})}),(0,Ae.jsxs)("div",{className:"border-t Ae-4 bg-muted/20",children:[(0,Ae.jsxs)("div",{className:"flex gap-3",children:[(0,Ae.jsx)(Le,{value:t,onChange:c=>m(c.target.value),onKeyPress:N,placeholder:"How can Ae help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),n&&(0,Ae.jsx)(z,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Ae.jsx)(k.Paperclip,{className:"h-4 w-4"})}),(0,Ae.jsx)(z,{onClick:b,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Ae.jsx)(k.Send,{className:"h-4 w-4"})})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Ae.jsxs)(z,{onClick:()=>C(!R),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Ae.jsx)(k.Menu,{className:"h-3 w-3 mr-1"}),R?"Hide":"Show"," Capabilities"]}),(0,Ae.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[ue().map((c,S)=>(0,Ae.jsx)(z,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>ie(c.id,D),children:c.label},`context-${c.id}`)),ue().length===0&&Ce().map((c,S)=>(0,Ae.jsx)(z,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:c.action,children:c.label},`suggestion-${S}`))]})]}),n&&(0,Ae.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:me,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
5
+ "use strict";var pt=Object.create;var ke=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames;var gt=Object.getPrototypeOf,ft=Object.prototype.hasOwnProperty;var bt=(e,t)=>{for(var r in t)ke(e,r,{get:t[r],enumerable:!0})},Be=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of mt(t))!ft.call(e,s)&&s!==r&&ke(e,s,{get:()=>t[s],enumerable:!(o=ut(t,s))||o.enumerable});return e};var Y=(e,t,r)=>(r=e!=null?pt(gt(e)):{},Be(t||!e||!e.__esModule?ke(r,"default",{value:e,enumerable:!0}):r,e)),ht=e=>Be(ke({},"__esModule",{value:!0}),e);var or={};bt(or,{ChatInterface:()=>ar});module.exports=ht(or);var $=require("react"),de=require("framer-motion"),k=require("lucide-react");var Pe=Y(require("react")),W=Y(require("@radix-ui/react-avatar"));var We=require("clsx");var Me="-",vt=e=>{let t=xt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let n=l.split(Me);return n[0]===""&&n.length!==1&&n.shift(),Ve(n,t)||yt(l)},getConflictingClassGroupIds:(l,n)=>{let m=r[l]||[];return n&&o[l]?[...m,...o[l]]:m}}},Ve=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),s=o?Ve(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Me);return t.validators.find(({validator:l})=>l(i))?.classGroupId},He=/^\[(.+)\]$/,yt=e=>{if(He.test(e)){let t=He.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},xt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return wt(Object.entries(e.classGroups),r).forEach(([i,l])=>{Se(l,o,i,t)}),o},Se=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Fe(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Ct(s)){Se(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Se(l,Fe(t,i),r,o)})})},Fe=(e,t)=>{let r=e;return t.split(Me).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ct=e=>e.isThemeGetter,wt=(e,t)=>t?e.map(([r,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,n])=>[t+l,n])):i);return[r,s]}):e,Nt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},Ue="!",kt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,s=t[0],i=t.length,l=n=>{let m=[],f=0,N=0,g;for(let x=0;x<n.length;x++){let A=n[x];if(f===0){if(A===s&&(o||n.slice(x,x+i)===t)){m.push(n.slice(N,x)),N=x+i;continue}if(A==="/"){g=x;continue}}A==="["?f++:A==="]"&&f--}let h=m.length===0?n:n.substring(N),P=h.startsWith(Ue),L=P?h.substring(1):h,y=g&&g>N?g-N:void 0;return{modifiers:m,hasImportantModifier:P,baseClassName:L,maybePostfixModifierPosition:y}};return r?n=>r({className:n,parseClassName:l}):l},Pt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},At=e=>({cache:Nt(e.cacheSize),parseClassName:kt(e),...vt(e)}),Rt=/\s+/,Tt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Rt),n="";for(let m=l.length-1;m>=0;m-=1){let f=l[m],{modifiers:N,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:P}=r(f),L=!!P,y=o(L?h.substring(0,P):h);if(!y){if(!L){n=f+(n.length>0?" "+n:n);continue}if(y=o(h),!y){n=f+(n.length>0?" "+n:n);continue}L=!1}let x=Pt(N).join(":"),A=g?x+Ue:x,R=A+y;if(i.includes(R))continue;i.push(R);let C=s(y,L);for(let D=0;D<C.length;++D){let pe=C[D];i.push(A+pe)}n=f+(n.length>0?" "+n:n)}return n};function St(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ge(t))&&(o&&(o+=" "),o+=r);return o}var Ge=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ge(e[o]))&&(r&&(r+=" "),r+=t);return r};function Mt(e,...t){let r,o,s,i=l;function l(m){let f=t.reduce((N,g)=>g(N),e());return r=At(f),o=r.cache.get,s=r.cache.set,i=n,n(m)}function n(m){let f=o(m);if(f)return f;let N=Tt(m,r);return s(m,N),N}return function(){return i(St.apply(null,arguments))}}var w=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},je=/^\[(?:([Ae-z-]+):)?(.+)\]$/i,It=/^\d+\/\d+$/,Lt=new Set(["px","full","screen"]),Dt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Et=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Bt=/^(inset_)?-?((\d+)?\.?(\d+)[Ae-z]+|0)_-?((\d+)?\.?(\d+)[Ae-z]+|0)/,Ht=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,O=e=>se(e)||Lt.has(e)||It.test(e),Q=e=>le(e,"length",Wt),se=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>le(e,"number",se),be=e=>!!e&&Number.isInteger(Number(e)),Ft=e=>e.endsWith("%")&&se(e.slice(0,-1)),u=e=>je.test(e),X=e=>Dt.test(e),Vt=new Set(["length","size","percentage"]),Ut=e=>le(e,Vt,$e),Gt=e=>le(e,"position",$e),jt=new Set(["image","url"]),$t=e=>le(e,jt,_t),Ot=e=>le(e,"",Kt),he=()=>!0,le=(e,t,r)=>{let o=je.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Wt=e=>Et.test(e)&&!zt.test(e),$e=()=>!1,Kt=e=>Bt.test(e),_t=e=>Ht.test(e);var Jt=()=>{let e=w("colors"),t=w("spacing"),r=w("blur"),o=w("brightness"),s=w("borderColor"),i=w("borderRadius"),l=w("borderSpacing"),n=w("borderWidth"),m=w("contrast"),f=w("grayscale"),N=w("hueRotate"),g=w("invert"),h=w("gap"),P=w("gradientColorStops"),L=w("gradientColorStopPositions"),y=w("inset"),x=w("margin"),A=w("opacity"),R=w("padding"),C=w("saturate"),D=w("scale"),pe=w("sepia"),ue=w("skew"),Ce=w("space"),oe=w("translate"),we=()=>["auto","contain","none"],me=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",u,t],v=()=>[u,t],Ne=()=>["",O,Q],ie=()=>["auto",se,u],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],c=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],S=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",u],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[se,u];return{cacheSize:500,separator:":",theme:{colors:[he],spacing:[O,Q],blur:["none","",X,u],brightness:M(),borderColor:[e],borderRadius:["none","","full",X,u],borderSpacing:v(),borderWidth:Ne(),contrast:M(),grayscale:T(),hueRotate:M(),invert:T(),gap:v(),gradientColorStops:[e],gradientColorStopPositions:[Ft,Q],inset:ge(),margin:ge(),opacity:M(),padding:v(),saturate:M(),scale:M(),sepia:T(),skew:M(),space:v(),translate:v()},classGroups:{aspect:[{aspect:["auto","square","video",u]}],container:["container"],columns:[{columns:[X]}],"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:[...fe(),u]}],overflow:[{overflow:me()}],"overflow-x":[{"overflow-x":me()}],"overflow-y":[{"overflow-y":me()}],overscroll:[{overscroll:we()}],"overscroll-x":[{"overscroll-x":we()}],"overscroll-y":[{"overscroll-y":we()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",be,u]}],basis:[{basis:ge()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",u]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",be,u]}],"grid-cols":[{"grid-cols":[he]}],"col-start-end":[{col:["auto",{span:["full",be,u]},u]}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":[he]}],"row-start-end":[{row:["auto",{span:[be,u]},u]}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",u]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",u]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...S()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...S(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...S(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Ae:[{Ae:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",u,t]}],"min-w":[{"min-w":[u,t,"min","max","fit"]}],"max-w":[{"max-w":[u,t,"none","full","min","max","fit","prose",{screen:[X]},X]}],h:[{h:[u,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[u,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[u,t,"auto","min","max","fit"]}],"font-size":[{text:["base",X,Q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Te]}],"font-family":[{font:[he]}],"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",u]}],"line-clamp":[{"line-clamp":["none",se,Te]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",O,u]}],"list-image":[{"list-image":["none",u]}],"list-style-type":[{list:["none","disc","decimal",u]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",O,Q]}],"underline-offset":[{"underline-offset":["auto",O,u]}],"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:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u]}],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",u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),Gt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ut]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$t]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[L]}],"gradient-via-pos":[{via:[L]}],"gradient-to-pos":[{to:[L]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[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:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:ne()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[O,u]}],"outline-w":[{outline:[O,Q]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[O,Q]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",X,Ot]}],"shadow-color":[{shadow:[he]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...c(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":c()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",X,u]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[N]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[pe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",u]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",u]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",u]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-x":[{"scale-x":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[be,u]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[ue]}],"skew-y":[{"skew-y":[ue]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",u]}],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","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",u]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-Ae":[{"scroll-Ae":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"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",u]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[O,Q,Te]}],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"],Ae:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","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-b":["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-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-Ae":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Oe=Mt(Jt);function d(...e){return Oe((0,We.clsx)(e))}var Ae=require("react/jsx-runtime"),ve=Pe.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)(W.Root,{ref:r,className:d("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ve.displayName=W.Root.displayName;var qt=Pe.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)(W.Image,{ref:r,className:d("aspect-square h-full w-full",e),...t}));qt.displayName=W.Image.displayName;var ye=Pe.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)(W.Fallback,{ref:r,className:d("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ye.displayName=W.Fallback.displayName;var Ke=require("@radix-ui/react-slot"),_e=require("class-variance-authority"),Je=Y(require("react")),Qt=(0,_e.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),z=Je.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...s},i)=>(0,Ae.jsx)(e?Ke.Slot:"button",{className:d(Qt({className:t,size:r,variant:o})),ref:i,...s}));z.displayName="Button";var ee=Y(require("react"));var V=ee.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)("div",{ref:r,className:d("rounded-xl border bg-card text-card-foreground shadow",e),...t}));V.displayName="Card";var K=ee.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)("div",{ref:r,className:d("flex flex-col space-y-1.5 Ae-6",e),...t}));K.displayName="CardHeader";var _=ee.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)("div",{ref:r,className:d("font-semibold leading-none tracking-tight",e),...t}));_.displayName="CardTitle";var Ie=ee.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)("div",{ref:r,className:d("text-sm text-muted-foreground",e),...t}));Ie.displayName="CardDescription";var G=ee.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)("div",{ref:r,className:d("Ae-6 pt-0",e),...t}));G.displayName="CardContent";var xe=ee.forwardRef(({className:e,...t},r)=>(0,Ae.jsx)("div",{ref:r,className:d("flex items-center Ae-6 pt-0",e),...t}));xe.displayName="CardFooter";var Qe=Y(require("react"));var Le=Qe.forwardRef(({className:e,type:t,...r},o)=>(0,Ae.jsx)("input",{type:t,className:d("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));Le.displayName="Input";var De=Y(require("react")),B=Y(require("@radix-ui/react-scroll-area"));var Ee=De.forwardRef(({className:e,children:t,...r},o)=>(0,Ae.jsxs)(B.Root,{ref:o,className:d("relative overflow-hidden",e),...r,children:[(0,Ae.jsx)(B.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ae.jsx)(Ze,{}),(0,Ae.jsx)(B.Corner,{})]}));Ee.displayName=B.Root.displayName;var Ze=De.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Ae.jsx)(B.ScrollAreaScrollbar,{ref:o,orientation:t,className:d("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent Ae-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent Ae-[1px]",e),...r,children:(0,Ae.jsx)(B.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ze.displayName=B.ScrollAreaScrollbar.displayName;var Xt=(0,_e.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 re({className:e,variant:t,...r}){return(0,Ae.jsx)("div",{className:d(Xt({variant:t}),e),...r})}var tt={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"]};function ze(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function rt({capabilities:e,isOpen:t,onToggle:r,onActionSelect:o,onContextChange:s,colorScheme:i=tt,className:l}){let[n,m]=(0,$.useState)([]),[f,N]=(0,$.useState)([]),g=n[n.length-1],h=g?.children||e,P=(C,D)=>{switch(C.type){case"category":return i.categories[D%i.categories.length];case"list":return i.lists[D%i.lists.length];case"item":return i.items[D%i.items.length];default:return i.primary}},L=(0,$.useMemo)(()=>({path:n,selectedItems:f,filters:{}}),[n,f]);(0,$.useEffect)(()=>{s&&s(L)},[L,s]);let y=C=>{C.type==="category"||C.type==="list"?m([...n,C]):C.type==="item"&&N([...f,C])},x=()=>{m(n.slice(0,-1))},A=C=>{m(n.slice(0,C+1))},R=()=>g?.actions?g.actions:[];return t?(0,Ae.jsxs)("div",{className:d("w-full",l),children:[(0,Ae.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ae.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,Ae.jsx)(de.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:x,className:d("group Ae-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ae.jsx)(k.ChevronLeft,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Ae.jsx)("h4",{className:"font-medium text-sm",children:g?.name||"Capabilities"})]}),(0,Ae.jsx)(de.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:r,className:d("group Ae-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ae.jsx)(k.X,{className:d("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,Ae.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Ae.jsx)(de.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>m([]),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ae.jsxs)("span",{className:"relative",children:["Capabilities",(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),n.map((C,D)=>(0,Ae.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ae.jsx)(k.ChevronRight,{className:"h-2 w-2"}),(0,Ae.jsx)(de.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>A(D),className:d("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ae.jsxs)("span",{className:"relative",children:[C.name,(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,Ae.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,Ae.jsx)(de.AnimatePresence,{mode:"wait",children:(0,Ae.jsx)(de.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:g?.type==="list"&&g.data?(0,Ae.jsx)(er,{data:g.data,onItemSelect:C=>N([...f,C]),colorScheme:i}):(0,Ae.jsx)(Zt,{capabilities:h,onSelect:y,colorScheme:i})},g?.id||"root")})})]}):(0,Ae.jsxs)(z,{onClick:r,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Ae.jsx)(k.Menu,{className:"h-4 w-4"}),(0,Ae.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Zt({capabilities:e,onSelect:t,colorScheme:r}){return(0,Ae.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Ae.jsx)(Yt,{capability:o,onClick:()=>t(o),color:r.categories[s%r.categories.length]},o.id))})}function Yt({capability:e,onClick:t,selected:r,color:o}){return(0,Ae.jsxs)(de.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:d("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",r&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Ae.jsx)("div",{className:d("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Ae.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-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,Ae.jsx)(k.ChevronRight,{className:d("h-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,Ae.jsx)(re,{variant:"secondary",className:d("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function er({data:e,onItemSelect:t,colorScheme:r}){return(0,Ae.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Ae.jsxs)(de.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:d("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,Ae.jsx)("div",{className:d("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",r.items[s%r.items.length])}),(0,Ae.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ae.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Ae.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,Ae.jsx)("div",{className:d("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Ae.jsx)(re,{variant:"secondary",className:d("text-xs h-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 it=require("date-fns");function at({taskId:e,polling:t=!0,system:r="payload"}){let[o,s]=(0,$.useState)(null),[i,l]=(0,$.useState)(!1),[n,m]=(0,$.useState)(null),f=async(g=!0)=>{if(e){g&&l(!0);try{let h=await fetch(`/api/tasks/${e}`);if(!h.ok)throw new Error(`Failed to fetch task: ${h.statusText}`);let P=await h.json();s(P)}catch(h){console.error("Error fetching task:",h),m(h instanceof Error?h:new Error("Unknown error occurred"))}finally{g&&l(!1)}}},N=()=>f(!1);return(0,$.useEffect)(()=>{e&&f(!0);let g=null;return e&&t&&(g=setInterval(N,5e3)),()=>{g&&clearInterval(g)}},[e,t]),{task:o,loading:i,error:n}}var tr=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"}},rr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function nt({data:e}){let{id:t,system:r,fetchLatest:o,taskData:s,error:i}=e||{};if(!t)return null;let l=null,n=!0,m=i,f=o!==void 0?o:!0;if(l=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:r,fetchLatest:f,taskData:l,error:m}),f){let{task:P,loading:L,error:y}=at({taskId:t,system:r});l=P,n=L,m=y}else n=!1;let N=tr(l?.status||"todo"),g=rr(l?.status||"todo"),h=l?.dateLogged||new Date().toISOString();try{let P=new Date(l?.dateLogged||"");isNaN(P.getTime())||(h=(0,it.formatDistanceToNow)(P,{addSuffix:!0}))}catch{}return(0,Ae.jsxs)(V,{className:d("w-full max-w-md shadow-md",m&&"border border-destructive"),children:[(0,Ae.jsxs)(K,{className:"pb-2",children:[(0,Ae.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Ae.jsx)(_,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,Ae.jsx)(re,{className:`${N}`,children:g})]}),l?.project&&(0,Ae.jsxs)(Ie,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,Ae.jsx)(G,{className:"pb-2",children:n?(0,Ae.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):m?(0,Ae.jsx)("Ae",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ae.jsx)("Ae",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,Ae.jsx)(xe,{className:"pt-2 flex items-center justify-between",children:(0,Ae.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ae.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Ae.jsxs)("span",{children:["Created ",h]}),(0,Ae.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ae.jsxs)("span",{children:["Task #",t]})]})})]})}function ct({artefact:e,taskId:t,taskData:r,loading:o=!1,error:s=null}){let i=r||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=i.dateLogged;try{let n=new Date(i.dateLogged);isNaN(n.getTime())||(l=(0,it.formatDistanceToNow)(n,{addSuffix:!0}))}catch{}return(0,Ae.jsxs)(V,{className:"w-full max-w-md shadow-md",children:[(0,Ae.jsx)(K,{className:"pb-2",children:(0,Ae.jsx)("div",{className:"flex justify-between items-start",children:(0,Ae.jsx)(_,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,Ae.jsx)(G,{className:"pb-2",children:o?(0,Ae.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,Ae.jsx)("Ae",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ae.jsx)("Ae",{className:"text-sm text-foreground",children:e})}),(0,Ae.jsx)(xe,{className:"pt-2 flex items-center justify-between",children:(0,Ae.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ae.jsx)(k.Clock,{className:"h-3 w-3 mr-1"}),(0,Ae.jsxs)("span",{children:["Created ",l]}),(0,Ae.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ae.jsxs)("span",{children:["Task #",i.id]})]})})]})}function dt(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function ar({messages:e,input:t,isTyping:r=!1,currentSessionTitle:o,capabilities:s,fileUploads:i,isDragOver:l,enableFileUpload:n,onInputChange:m,onSendMessage:f,onKeyPress:N,onFileUpload:g,onRemoveFile:h,onDragOver:P,className:L}){let y=(0,$.useRef)(null),x=(0,$.useRef)(null),A=(0,$.useRef)(null),[R,C]=(0,$.useState)(!1),[D,pe]=(0,$.useState)({path:[],selectedItems:[],filters:{}});(0,$.useEffect)(()=>{y.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,$.useEffect)(()=>{R&&setTimeout(()=>{y.current?.scrollIntoView({behavior:"smooth"})},100)},[R]);let ue=()=>ze(D),Ce=()=>{let c=[];return s.forEach(S=>{S.actions&&S.actions.forEach(T=>{c.push({label:T.label,action:()=>oe(T.id,{path:[S],selectedItems:[],filters:{}})})}),S.children&&S.children.forEach(T=>{T.type==="list"&&T.data&&c.push({label:`View ${T.name}`,action:()=>C(!0)})})}),c.slice(0,5)},oe=(c,S)=>{console.log("Capability action:",c,S);let T=`Executing ${c} with context: ${JSON.stringify(S.path.map(U=>U.name))}`;C(!1)},we=ze({path:[],selectedItems:[],filters:{}}),me=c=>{g(c.target.files),c.target.files&&(c.target.value="")},ge=c=>{c.preventDefault(),P(!0)},v=c=>{c.preventDefault(),P(!1)},Ne=c=>{c.preventDefault(),P(!1),g(c.dataTransfer.files)},ie=c=>{if(c===0)return"0 Bytes";let S=1024,T=["Bytes","KB","MB","GB"],U=Math.floor(Math.log(c)/Math.log(S));return parseFloat((c/Math.pow(S,U)).toFixed(2))+" "+T[U]},fe=c=>c.startsWith("image/")?(0,Ae.jsx)(k.Image,{className:"h-4 w-4"}):c.startsWith("text/")?(0,Ae.jsx)(k.FileText,{className:"h-4 w-4"}):(0,Ae.jsx)(k.File,{className:"h-4 w-4"}),ne=c=>{let S=c.role==="assistant",T=c.role==="user",U=dt(c);return(0,Ae.jsxs)("div",{className:d("flex items-start gap-3",T?"flex-row-reverse":""),children:[(0,Ae.jsx)(ve,{className:"h-8 w-8 shrink-0",children:(0,Ae.jsx)(ye,{className:d(T?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:T?(0,Ae.jsx)(k.User,{className:"h-4 w-4"}):(0,Ae.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Ae.jsxs)("div",{className:d("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",T?"bg-primary text-primary-foreground":"bg-muted"),children:[U&&(0,Ae.jsx)("div",{className:"mb-2 last:mb-0",children:(0,Ae.jsx)("Ae",{className:"text-sm",children:U})}),c.parts.map((M,H)=>{if(M.type==="text")return null;if(M.type==="file"){let b=M;return(0,Ae.jsx)("div",{className:"mb-2 Ae-2 bg-background/50 rounded-lg",children:(0,Ae.jsxs)("div",{className:"flex items-center gap-2",children:[fe(b.mediaType||"application/octet-stream"),(0,Ae.jsx)("div",{className:"flex-1 min-w-0",children:(0,Ae.jsx)("Ae",{className:"text-sm font-medium truncate",children:b.filename||b.url?.split("/").pop()||"File"})}),b.url&&(0,Ae.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(b.url,"_blank"),className:"h-8 w-8 Ae-0",children:(0,Ae.jsx)(k.Download,{className:"h-4 w-4"})})]})},H)}if(M.type.startsWith("tool-")){let b=M,q=M.type.replace("tool-","");if(q==="task")switch(b.state){case"input-available":return(0,Ae.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},H);case"output-available":return(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsx)(nt,{data:{id:b.output?.id||b.input?.id,fetchLatest:!1,taskData:b.output||b.input}})},H);case"output-error":return(0,Ae.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",b.errorText]},H);default:return null}if(q==="artefact")switch(b.state){case"input-available":return(0,Ae.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},H);case"output-available":return(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsx)(ct,{artefact:b.output?.description||"",taskId:b.output?.id||b.input?.id,taskData:b.output||b.input})},H);case"output-error":return(0,Ae.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",b.errorText]},H);default:return null}return(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsxs)(V,{className:"w-full max-w-md",children:[(0,Ae.jsx)(K,{children:(0,Ae.jsx)(_,{className:"text-lg",children:q})}),(0,Ae.jsxs)(G,{children:[b.state==="input-available"&&(0,Ae.jsxs)("Ae",{className:"text-sm",children:["Processing ",q,"..."]}),b.state==="output-available"&&(0,Ae.jsx)("pre",{className:"text-sm",children:JSON.stringify(b.output,null,2)}),b.state==="output-error"&&(0,Ae.jsxs)("Ae",{className:"text-sm text-red-500",children:["Error: ",b.errorText]})]})]})},H)}if(M.type.startsWith("data-")){let b=M,q=M.type.replace("data-","");return q==="reference"?(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsx)(V,{className:"w-full",children:(0,Ae.jsx)(G,{className:"Ae-4",children:(0,Ae.jsx)("div",{className:"space-y-2",children:b.data?.references?.map((F,Re)=>(0,Ae.jsxs)("div",{className:"flex items-center gap-2 Ae-2 rounded-md bg-muted/50",children:[(0,Ae.jsx)(re,{variant:"outline",children:F.type||"link"}),(0,Ae.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ae.jsx)("Ae",{className:"text-sm font-medium truncate",children:F.title}),F.description&&(0,Ae.jsx)("Ae",{className:"text-xs text-muted-foreground truncate",children:F.description})]}),F.url&&(0,Ae.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(F.url,"_blank"),className:"h-8 w-8 Ae-0",children:(0,Ae.jsx)(k.ExternalLink,{className:"h-4 w-4"})})]},Re))})})})},H):q==="menu"?(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsxs)(V,{className:"w-full",children:[(0,Ae.jsx)(K,{children:(0,Ae.jsx)(_,{className:"text-lg",children:b.data?.title})}),(0,Ae.jsx)(G,{children:(0,Ae.jsx)("div",{className:"space-y-2",children:b.data?.items?.map((F,Re)=>(0,Ae.jsx)(z,{variant:"outline",className:"w-full justify-start",onClick:F.action,children:(0,Ae.jsxs)("div",{className:"text-left",children:[(0,Ae.jsx)("Ae",{className:"font-medium",children:F.label}),F.description&&(0,Ae.jsx)("Ae",{className:"text-xs text-muted-foreground",children:F.description})]})},Re))})})]})},H):(0,Ae.jsx)("div",{className:"mb-2",children:(0,Ae.jsxs)(V,{className:"w-full max-w-md",children:[(0,Ae.jsx)(K,{children:(0,Ae.jsx)(_,{className:"text-lg",children:q})}),(0,Ae.jsx)(G,{children:(0,Ae.jsx)("pre",{className:"text-sm",children:JSON.stringify(b.data,null,2)})})]})},H)}return null})]})]})};return(0,Ae.jsxs)(V,{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${L||""}`,children:[(0,Ae.jsxs)(Ee,{ref:x,className:"flex-1 Ae-4",onDragOver:ge,onDragLeave:v,onDrop:Ne,children:[(0,Ae.jsxs)("div",{className:d("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Ae.jsx)(de.AnimatePresence,{children:e.map(c=>(0,Ae.jsx)(de.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:d("flex gap-3",c.role==="user"?"flex-row-reverse":"flex-row"),children:ne(c)},c.id))}),R&&(0,Ae.jsxs)(de.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Ae.jsx)(ve,{className:"h-8 w-8",children:(0,Ae.jsx)(ye,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ae.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Ae.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ae.jsx)(rt,{capabilities:s,isOpen:R,onToggle:()=>C(!R),onActionSelect:oe,className:"w-full"})})]}),r&&(0,Ae.jsxs)(de.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Ae.jsx)(ve,{className:"h-8 w-8",children:(0,Ae.jsx)(ye,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ae.jsx)(k.Bot,{className:"h-4 w-4"})})}),(0,Ae.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ae.jsxs)("div",{className:"flex space-x-1",children:[(0,Ae.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Ae.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Ae.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Ae.jsx)("div",{ref:y})]}),i.length>0&&(0,Ae.jsx)("div",{className:"Ae-4 border-t bg-muted/10",children:(0,Ae.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(c=>(0,Ae.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Ae-2 border",children:[fe(c.file.type),(0,Ae.jsx)("span",{className:"text-sm font-medium",children:c.file.name}),(0,Ae.jsx)("span",{className:"text-xs text-muted-foreground",children:ie(c.file.size)}),(0,Ae.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>h(c.id),className:"h-6 w-6 Ae-0",children:(0,Ae.jsx)(k.X,{className:"h-4 w-4"})})]},c.id))})}),(0,Ae.jsxs)("div",{className:"border-t Ae-4 bg-muted/20",children:[(0,Ae.jsxs)("div",{className:"flex gap-3",children:[(0,Ae.jsx)(Le,{value:t,onChange:c=>m(c.target.value),onKeyPress:N,placeholder:"How can Ae help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:r}),n&&(0,Ae.jsx)(z,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Ae.jsx)(k.Paperclip,{className:"h-4 w-4"})}),(0,Ae.jsx)(z,{onClick:f,disabled:!t.trim()&&i.length===0||r,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Ae.jsx)(k.Send,{className:"h-4 w-4"})})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Ae.jsxs)(z,{onClick:()=>C(!R),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Ae.jsx)(k.Menu,{className:"h-3 w-3 mr-1"}),R?"Hide":"Show"," Capabilities"]}),(0,Ae.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[ue().map((c,S)=>(0,Ae.jsx)(z,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>oe(c.id,D),children:c.label},`context-${c.id}`)),ue().length===0&&Ce().map((c,S)=>(0,Ae.jsx)(z,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:c.action,children:c.label},`suggestion-${S}`))]})]}),n&&(0,Ae.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:me,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
@@ -1 +1 @@
1
- import{a}from"../../chunk-L7W3JS7W.mjs";import"../../chunk-LUPNE23E.mjs";import"../../chunk-A2AEX4YB.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-I3E2TYYZ.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as ChatInterface};
1
+ import{a}from"../../chunk-B753NNIJ.mjs";import"../../chunk-LUPNE23E.mjs";import"../../chunk-A2AEX4YB.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-I3E2TYYZ.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as ChatInterface};